Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions data/agent-skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ whether you may write. Ask this instead of discovering limits through 403s
| upload a file | `POST …/files` (multipart or `{"url":…}`) → the id file blocks and chat attachments need |
| download a file or icon | `GET …/files/{file_id}/content`; use a file id or a space/member's `icon_image`. Optional `?width=` selects an image size. Supports ranges, conditional reads, and `HEAD`. |
| chat | `GET/POST …/chats/{id}/messages`, `POST …/read` — see Chats |
| put an object in the sidebar | `POST …/widgets` `{target, scope}` — `scope:"personal"` is this account's own sidebar (any writer); `scope:"space"` is the shared one (owner/admin; not offered in one-to-one spaces). `GET …/widgets` lists both; `PATCH`/`DELETE …/widgets/{id-or-target}` change or remove one. Not `is_favorite` |
| comment on an object | `POST …/objects/{id}/discussion` → `{id}`, then the chat routes with that id — see Chats |

## Read cheaply

Expand Down Expand Up @@ -230,14 +232,23 @@ read: no `Idempotency-Key`, `dry_run` ignored.
read. Cursors only (`?after=` walks forward; otherwise newest-first via
`next_before`); `?offset=` is rejected.
- Message `text` is inline markup both ways (mentions as
`<mention objectId="…">`); ≤8000 chars; `attachments` = up to 32 object
`<mention object_id="…">`); ≤8000 UTF-16 units; `attachments` = up to 32 object
ids from `POST …/files`. `?reactions=full` adds who reacted.
- Mark read: `POST …/chats/{id}/read` with `{"up_to": <order>,
"last_state_id": <id>}` — **both** from the same GET, else nothing marks.
- `PATCH …/messages/{id}` `{"text"}` edits text only (attachments kept);
- `PATCH …/messages/{id}` `{"text"}` edits text only (attachments kept; in a
discussion the text replaces the message's blocks, with a warning naming
dropped quotes/links);
editing/deleting another member's message → 403. DELETE permanently
removes orphaned attachments — the response warns with their ids.
- No etag/If-Match on chats; order ids are the concurrency vocabulary.
- An object's **discussion** (its comment thread) is a chat. An object read
carries `discussion: "<id>"` when one exists; `POST …/objects/{id}/discussion`
mints one (201, `created: true`) or returns the existing id (200). Use
that id as the chat id on every route above; `reply_to` makes a threaded
reply. Same message body; a discussion stores the text as one paragraph
block per line (blank lines dropped, a `---` line is a divider) and reads
it back as `text`. Discussions are not in `GET …/chats`.

## Conventions on every call

Expand Down Expand Up @@ -269,9 +280,11 @@ read: no `Idempotency-Key`, `dry_run` ignored.

- `GET /v2/schemas` — index. `GET /v2/schemas/{kind}` — strict JSON Schema
+ worked example per request kind (`object`, `shortcut`, `type`,
`template`, `property`, `query`, `collection`, `file`, `search`, `space`,
`filters`, `chat`, `chatMessage`, `chatMessageEdit`, `chatReaction`,
`chatRead`). The `filters` kind also serves the filter-string grammar
`type_document`, `template`, `document`, `property`, `query`,
`collection`, `file`, `search`, `space`, `filters`, `chat`,
`chatMessage`, `chatMessageEdit`, `chatReaction`, `chatRead`). The
three document kinds are narrowed to what their endpoint accepts;
`document` is the full format, what `POST /v2/validate` checks. The `filters` kind also serves the filter-string grammar
(EBNF + examples). `GET /v2/schemas/ops/{op}` — per-op schema + example.
- Live vocabulary: `GET …/types` and `GET …/types/{key}` (the type
document, incl. its property keys); `GET …/properties`;
Expand Down
4 changes: 2 additions & 2 deletions data/agent-skill/source.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"repository": "https://github.com/anyproto/anytype-heart",
"revision": "c9ea767a7bd90c92fd2a3c5f8b4d1cce6b5d5f55",
"revision": "fa3b696c891ce1ba44ea0545de07b389de8f1d4c",
"path": "core/api/v2/SKILL.md",
"modified": false,
"digest": "sha256:97bd1b56bca9152d0c2d5e0864cefce7fc1dd1de08e5ebd52613fc3297ca3261"
"digest": "sha256:02182547cb8c622a47ac566cd05f765ae8d789f90540fc005b3a8f32bb0ef951"
}
Loading
Loading