@rolling-design-sync/agent-cli 0.0.0-stage → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +449 -2
- package/commands.generated.json +1243 -0
- package/package.json +42 -4
- package/rds-agent.js +562 -0
package/README.md
CHANGED
|
@@ -1,3 +1,450 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @rolling-design-sync/agent-cli (`rds-agent`)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Zero-dependency Node (>= 20) CLI over the file-scoped **v3** agent API of
|
|
4
|
+
[Rolling Design Sync](https://github.com/deven-bryant/rolling-design-sync).
|
|
5
|
+
Intended for non-interactive use from a worker session: list what changed in
|
|
6
|
+
Figma since it was last built, lease it, and clear it once it's committed.
|
|
7
|
+
|
|
8
|
+
From a checkout of the repository, run it as `node scripts/rds-agent.js` —
|
|
9
|
+
nothing to install — or use the npm package (`npx @rolling-design-sync/agent-cli`,
|
|
10
|
+
binary `rds-agent`). New to Rolling
|
|
11
|
+
Design Sync? Start with the [quickstart](https://github.com/deven-bryant/rolling-design-sync/blob/main/docs/quickstart.md).
|
|
12
|
+
|
|
13
|
+
The commands, their flags and the requests they send come from
|
|
14
|
+
`commands.generated.json`, which `gen-commands.js` builds from the API's OpenAPI
|
|
15
|
+
document (every operation annotated `x-rds-cli`). Addressing, paging, output and
|
|
16
|
+
error formatting are hand-written ([`docs/api-v3-phase2.md`](https://github.com/deven-bryant/rolling-design-sync/blob/main/docs/api-v3-phase2.md)).
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
export RDS_API_BASE_URL=https://rds.example.com
|
|
20
|
+
export RDS_AGENT_TOKEN=<one of RDS_AGENT_TOKENS>
|
|
21
|
+
export RDS_WORKER=agent-7 # optional default for --worker
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Getting those values into an agent host (Claude Code, Cursor, Devin), and the
|
|
25
|
+
agent recipes, are in [docs/agents.md](https://github.com/deven-bryant/rolling-design-sync/blob/main/docs/agents.md).
|
|
26
|
+
|
|
27
|
+
Every request sends `Authorization: Bearer $RDS_AGENT_TOKEN` and
|
|
28
|
+
`X-RDS-Client: cli/<version>`.
|
|
29
|
+
|
|
30
|
+
`rds-agent --help` lists the commands; `rds-agent <command> --help` lists a
|
|
31
|
+
command's flags, types, defaults and descriptions.
|
|
32
|
+
|
|
33
|
+
## Flags
|
|
34
|
+
|
|
35
|
+
Path, query and JSON-body parameters become flags (`camelCase` → `--kebab-case`):
|
|
36
|
+
`fileKey` is `--file-key`, a claim's `ttlSeconds` is `--ttl-seconds`, the
|
|
37
|
+
properties of a claim's `filter` are `--state`, `--under`, … Other path
|
|
38
|
+
parameters (`<nodeId>`, `<claimId>`) are positional arguments. List values are
|
|
39
|
+
comma-separated (`--node-ids 2-1,2-3`). Unknown flags are rejected with the list
|
|
40
|
+
of valid ones.
|
|
41
|
+
|
|
42
|
+
## Addressing
|
|
43
|
+
|
|
44
|
+
- **File** — every file-scoped command takes `--file-key <key>` *or*
|
|
45
|
+
`--url <figma link>` (the link's file key is used, and for commands with a
|
|
46
|
+
`<nodeId>` the link's `node-id` when the argument is left out). `resolve`
|
|
47
|
+
takes the link as its argument.
|
|
48
|
+
- **Nodes** — ids are accepted as `1:2` or `1-2` (the form in Figma links)
|
|
49
|
+
everywhere: positional ids, `--under`, `--component`, `--node-ids`, and the
|
|
50
|
+
`<nodeId>` of `clear` items.
|
|
51
|
+
|
|
52
|
+
## Paging
|
|
53
|
+
|
|
54
|
+
`--limit` and `--cursor` (`--after` for `events`) fetch one page; `--all`
|
|
55
|
+
follows the page token to the end and prints one merged response.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Dirty text nodes under a section, straight from a Figma link
|
|
59
|
+
rds-agent nodes ls --url "https://www.figma.com/design/AbC123/App?node-id=1-1" --under 1-1 --type TEXT
|
|
60
|
+
|
|
61
|
+
# Everything whose layout changed, ids + hashes only, every page
|
|
62
|
+
rds-agent nodes ls --file-key AbC123 --category layout --fields nodeId,contentHash --all
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Bulk clear
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
rds-agent clear --file-key AbC123 --commit-ref 3f2a9c1 2-1=<contentHash> 2:3=<contentHash>
|
|
69
|
+
|
|
70
|
+
# Read nodeId=hash pairs (one per line or whitespace-separated, # comments) from stdin with `-`
|
|
71
|
+
rds-agent nodes ls --file-key AbC123 --under 1-1 --fields nodeId,contentHash --all \
|
|
72
|
+
| jq -r '.nodes[] | "\(.nodeId)=\(.contentHash)"' \
|
|
73
|
+
| rds-agent clear --file-key AbC123 --commit-ref 3f2a9c1 -
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Each item is hash-guarded on its own and reported as `cleared`, `stale` (the
|
|
77
|
+
design changed since you read it; `contentHash` is the current one) or
|
|
78
|
+
`not_found`. The request still exits `0`; a `stale: …` / `not found: …` note per
|
|
79
|
+
item that was not cleared goes to stderr. Lists longer than the API's item limit
|
|
80
|
+
are sent in batches and merged.
|
|
81
|
+
|
|
82
|
+
## Leases
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
rds-agent claim --file-key AbC123 --worker agent-7 --label "Text pass" --ttl-seconds 900 --limit 10 --type TEXT
|
|
86
|
+
rds-agent claim --file-key AbC123 --node-ids 2-1,2-3
|
|
87
|
+
rds-agent renew <claimId> --file-key AbC123 --ttl-seconds 900
|
|
88
|
+
rds-agent release <claimId> --file-key AbC123
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`--worker` defaults to `$RDS_WORKER` wherever it is a body field (`claim`,
|
|
92
|
+
`block`, `unblock`); `nodes ls --claimed mine` needs an explicit `--worker`.
|
|
93
|
+
|
|
94
|
+
## Output
|
|
95
|
+
|
|
96
|
+
`--format json` (default) prints the API response pretty-printed on stdout.
|
|
97
|
+
`--format table` prints aligned columns for people:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
$ rds-agent nodes ls --file-key AbC123 --format table
|
|
101
|
+
NODE NAME TYPE CHANGE CATEGORIES CLAIMED
|
|
102
|
+
2:1 Card FRAME modified layout -
|
|
103
|
+
2:2 Header FRAME modified layout -
|
|
104
|
+
2:3 Title TEXT modified content agent-7 (Text pass)
|
|
105
|
+
3 of 3 nodes
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`--format ndjson` and `--format md` (`nodes ls`, `work`, `events`) are streamed
|
|
109
|
+
by the API and printed as received: one JSON object per line, or a markdown
|
|
110
|
+
checklist. They return every match from the cursor on, so `--all` is not needed.
|
|
111
|
+
`--format outline` (`nodes ls`, `work`) prints the whole outline; with
|
|
112
|
+
`--limit` it is one page of that many lines, and `--all` follows the API's
|
|
113
|
+
`X-RDS-Next-Cursor` header and joins the pages.
|
|
114
|
+
|
|
115
|
+
## Errors
|
|
116
|
+
|
|
117
|
+
Exit code is `0` on success (and for `--help`) and `1` on usage or API errors.
|
|
118
|
+
v3 errors are problem documents; the CLI prints them on stderr as:
|
|
119
|
+
|
|
120
|
+
```text
|
|
121
|
+
error: File not found — No tracked file with key 'https://www.figma.com/design/AbC123/App'.
|
|
122
|
+
hint: That looks like a Figma URL. Use the file key 'AbC123', or pass ?url=<figma link> with '-' as the file key.
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Regenerating
|
|
126
|
+
|
|
127
|
+
After changing an annotated operation in `apps/api/src/v3`, run `npm run gen`
|
|
128
|
+
in this folder and commit `commands.generated.json` and this README (the
|
|
129
|
+
reference below is generated too). CI runs `npm run gen:check`, which fails when
|
|
130
|
+
either is out of date.
|
|
131
|
+
|
|
132
|
+
<!-- BEGIN GENERATED COMMANDS (npm run gen) -->
|
|
133
|
+
|
|
134
|
+
## Command reference
|
|
135
|
+
|
|
136
|
+
Generated from the API's OpenAPI document (API 3.0.0) — one command per `x-rds-cli` operation.
|
|
137
|
+
|
|
138
|
+
| Command | Request | Summary |
|
|
139
|
+
|---------|---------|---------|
|
|
140
|
+
| [`files ls`](#rds-agent-files-ls) | `GET /v3/files` | List tracked files |
|
|
141
|
+
| [`files show`](#rds-agent-files-show) | `GET /v3/files/{fileKey}` | Get a file |
|
|
142
|
+
| [`scopes ls`](#rds-agent-scopes-ls) | `GET /v3/files/{fileKey}/scopes` | List synced scopes |
|
|
143
|
+
| [`nodes ls`](#rds-agent-nodes-ls) | `GET /v3/files/{fileKey}/nodes` | List nodes |
|
|
144
|
+
| [`nodes show`](#rds-agent-nodes-show) | `GET /v3/files/{fileKey}/nodes/{nodeId}` | Get a node |
|
|
145
|
+
| [`resolve`](#rds-agent-resolve) | `GET /v3/resolve` | Resolve a Figma link |
|
|
146
|
+
| [`claims ls`](#rds-agent-claims-ls) | `GET /v3/files/{fileKey}/claims` | List file claims |
|
|
147
|
+
| [`claim`](#rds-agent-claim) | `POST /v3/files/{fileKey}/claims` | Claim nodes |
|
|
148
|
+
| [`clear`](#rds-agent-clear) | `POST /v3/files/{fileKey}/clear` | Clear implemented nodes |
|
|
149
|
+
| [`renew`](#rds-agent-renew) | `POST /v3/files/{fileKey}/claims/{claimId}/renew` | Renew a claim |
|
|
150
|
+
| [`release`](#rds-agent-release) | `DELETE /v3/files/{fileKey}/claims/{claimId}` | Release a claim |
|
|
151
|
+
| [`events`](#rds-agent-events) | `GET /v3/files/{fileKey}/events` | List file events |
|
|
152
|
+
| [`block`](#rds-agent-block) | `POST /v3/files/{fileKey}/nodes/{nodeId}/block` | Block a node |
|
|
153
|
+
| [`unblock`](#rds-agent-unblock) | `POST /v3/files/{fileKey}/nodes/{nodeId}/unblock` | Unblock a node |
|
|
154
|
+
| [`summary`](#rds-agent-summary) | `GET /v3/files/{fileKey}/summary` | Summarize changes |
|
|
155
|
+
| [`trends`](#rds-agent-trends) | `GET /v3/insights/trends` | Weekly trends |
|
|
156
|
+
| [`work`](#rds-agent-work) | `GET /v3/files/{fileKey}/work` | List work items |
|
|
157
|
+
|
|
158
|
+
### rds-agent files ls
|
|
159
|
+
|
|
160
|
+
`GET /v3/files`
|
|
161
|
+
|
|
162
|
+
Every file the plugin has synced, most recently synced first, with node counts (total, dirty, clean, blocked) and the last sync time. Use it to find a `fileKey` when you have no Figma link; with a link, pass it as `url` (or use `resolve_url`).
|
|
163
|
+
|
|
164
|
+
### rds-agent files show
|
|
165
|
+
|
|
166
|
+
`GET /v3/files/{fileKey}`
|
|
167
|
+
|
|
168
|
+
One tracked file's node counts and last sync time: a quick check of how much is dirty. For counts by category, type or frame use `summarize`. `file_not_found`: the file was never synced — take the key from `list_files`, or pass the Figma link as `url` with fileKey '-'.
|
|
169
|
+
|
|
170
|
+
| Flag | Type | Sent as | Description |
|
|
171
|
+
|------|------|---------|-------------|
|
|
172
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
173
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
174
|
+
|
|
175
|
+
### rds-agent scopes ls
|
|
176
|
+
|
|
177
|
+
`GET /v3/files/{fileKey}/scopes`
|
|
178
|
+
|
|
179
|
+
The scopes (sections/frames) the plugin has synced in a file: each root's name, last sync, and current counts. Only nodes under these roots exist in the API; a `node_not_found` usually means the node is outside every scope and must be synced from the plugin first.
|
|
180
|
+
|
|
181
|
+
| Flag | Type | Sent as | Description |
|
|
182
|
+
|------|------|---------|-------------|
|
|
183
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
184
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
185
|
+
|
|
186
|
+
### rds-agent nodes ls
|
|
187
|
+
|
|
188
|
+
`GET /v3/files/{fileKey}/nodes`
|
|
189
|
+
|
|
190
|
+
Nodes of a file with their property-level changes — by default the dirty ones (design changed since last built), compact, in document order (the design's layer order), 100 per page. The main read for implementation work: filter by subtree (`under` — one node id or several comma-separated — or a `url` with node-id), type, change, category, component or name; values within a parameter are OR, parameters are AND. Each node's `changes` is `{ prop: { built, now } }` and `contentHash` is what `clear_nodes` needs. For counts only use `summarize`; to work component by component use `list_work_items`. Every node carries `changedProps` and, for instances, `isInstance` / `mainComponentId` (`instance=true` lists only instances). By default (`changes=auto`) `added` nodes have no `changes` — on a fresh sync every node is added, so pages stay small; get their values with `changes=diff`, `view=full` or `get_node`. Change values over 1 KB are replaced by `{ truncated: true, bytes }` and the page has `truncated: true`; `view=full` or `get_node` returns them whole. `expand=instances` returns everything a screen uses in one call: with `under` = the screen, it adds the main components its instances point at (and theirs, transitively), each once; filters apply to that union (`expand=instances&state=dirty` = every dirty node the screen uses). Scope nodes come first, then each component in discovery order; expanded nodes carry `via` (the instance that reached them), and `expansion` reports the count, `truncated` and `unresolved` (unsynced) components. Page with `nextCursor` → `cursor`. On `unknown_parameter` / `invalid_parameter` follow `hint`; on `invalid_cursor` keep every other parameter unchanged or drop `cursor`.
|
|
191
|
+
|
|
192
|
+
| Flag | Type | Sent as | Description |
|
|
193
|
+
|------|------|---------|-------------|
|
|
194
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
195
|
+
| `--state` | string | query `state` | Comma-separated: dirty, clean, blocked, all. Default dirty (changed since last built, not blocked); `all` for every state. |
|
|
196
|
+
| `--under` | string | query `under` | Only this node's subtree, the node included (1:2 or 1-2). Several subtrees: up to 50 comma-separated ids (1:2,1:5) for their union, each node once, in the order given. Defaults to the `url` link's node-id. |
|
|
197
|
+
| `--depth` | integer | query `depth` | Needs `under`: at most this many levels below it — below each root when there are several (1 = direct children). |
|
|
198
|
+
| `--type` | string | query `type` | Comma-separated Figma node types, e.g. TEXT,INSTANCE,FRAME. |
|
|
199
|
+
| `--change-type` | string | query `changeType` | Comma-separated: added, modified, deleted (dirty nodes only). |
|
|
200
|
+
| `--changed` | string | query `changed` | Comma-separated changed property names (fills, paddingLeft); a trailing `*` matches a prefix (padding*). |
|
|
201
|
+
| `--category` | string | query `category` | Comma-separated change categories: layout, color, typography, effects, component, content, structure, prototype, other. |
|
|
202
|
+
| `--component` | string | query `component` | Comma-separated main component ids: the components and all their instances. |
|
|
203
|
+
| `--name` | string | query `name` | Comma-separated case-insensitive name globs (`*`, `?`), e.g. Button*. |
|
|
204
|
+
| `--since` | string | query `since` | ISO 8601 time: only nodes changed at or after it. |
|
|
205
|
+
| `--claimed` | string | query `claimed` | Comma-separated: true (leased), false (free), mine (leased to `worker`). |
|
|
206
|
+
| `--worker` | string | query `worker` | Your worker id; needed with `claimed=mine`. |
|
|
207
|
+
| `--instance` | true\|false | query `instance` | true: only component instances (`isInstance`); false: only other nodes. |
|
|
208
|
+
| `--q` | string | query `q` | All the filters above in one string: space-separated `key:value` pairs, e.g. `state:dirty under:1:2 changed:fills` (several subtrees: `under:1:2,1:5`); quote values with spaces (name:"Primary Button"). A key may not also be passed as its own parameter. |
|
|
209
|
+
| `--view` | compact\|full | query `view` | compact (default: state, changes, hash, claim, block) or full (adds attrs, implementedAttrs, path; change values never truncated). |
|
|
210
|
+
| `--changes` | auto\|diff\|names | query `changes` | auto (default): the built→now diff for modified and deleted nodes, omitted for added ones (their property names are in `changedProps`) — keeps fresh-sync pages small; diff: the diff for every node, including added ones' full values; names: never `changes`, only `changedProps`. Ask for `changes=diff` (or `get_node`) when you need the values of added nodes. |
|
|
211
|
+
| `--fields` | string | query `fields` | Comma-separated node fields to return (overrides view): nodeId, name, type, parentId, isInstance, mainComponentId, component, state, changeType, changedProps, changes, changesKnown, contentHash, figmaUrl, claim, blocked, attrs, implementedAttrs, path, deleted, history, descendants, via (`via` needs `expand=instances`). |
|
|
212
|
+
| `--include` | counts | query `include` | `counts` adds subtree counts (`descendants`) to each node. |
|
|
213
|
+
| `--sort` | document\|path\|updatedAt\|name\|-document\|-path\|-updatedAt\|-name | query `sort` | document (default: the design's layer order — auto-layout flow order, else top-to-bottom, left-to-right), path (node-id path order), updatedAt or name; prefix `-` for descending. |
|
|
214
|
+
| `--limit` | integer | query `limit` | Page size (default 100, max 1000). With format=outline: rendered lines per page (default: every line). |
|
|
215
|
+
| `--cursor` | string | query `cursor` | The previous page's `nextCursor`, unchanged, with all other parameters the same (else `invalid_cursor`). With format=outline: the previous response's `X-RDS-Next-Cursor` header (a line position in the rendered outline). |
|
|
216
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
217
|
+
| `--expand` | instances | query `expand` | `instances`: also include the subtree of every main component the scope's instances use (the scope is `under`, or the whole file) — transitively through instances inside those components, breadth-first, each component once. Use it for "everything this screen uses" / "which components do I build for this screen". Other filters apply after expansion; `depth` cannot be combined with it. |
|
|
218
|
+
| `--expand-depth` | integer | query `expandDepth` | With `expand=instances`: at most this many instance → main hops (default 10, max 20; 1 = only the components the scope uses directly). |
|
|
219
|
+
|
|
220
|
+
`--format`: also `ndjson`, `md`, `outline` (from the server); `--all`: follows `nextCursor`.
|
|
221
|
+
|
|
222
|
+
### rds-agent nodes show
|
|
223
|
+
|
|
224
|
+
`GET /v3/files/{fileKey}/nodes/{nodeId}` — arguments: `<nodeId>`
|
|
225
|
+
|
|
226
|
+
One node in full: state, property changes (whole values, never truncated), component link (`isInstance`, `mainComponentId`), current `contentHash`, claim, block, subtree counts and history (when and in which commit it was last built). Use it to re-read a node before clearing it — e.g. after `clear_nodes` reports it `stale`. `node_not_found`: check the id against the link's node-id and that it is under a synced scope (`list_scopes`).
|
|
227
|
+
|
|
228
|
+
| Flag | Type | Sent as | Description |
|
|
229
|
+
|------|------|---------|-------------|
|
|
230
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
231
|
+
| `--fields` | string | query `fields` | Comma-separated node fields to return (default: all): nodeId, name, type, parentId, isInstance, mainComponentId, component, state, changeType, changedProps, changes, changesKnown, contentHash, figmaUrl, claim, blocked, attrs, implementedAttrs, path, deleted, history, descendants. |
|
|
232
|
+
| `--changes` | auto\|diff\|names | query `changes` | diff (default): the whole built→now diff, never truncated — the way to read an added node's values; auto: omitted for added nodes; names: never `changes`, only `changedProps`. |
|
|
233
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
234
|
+
|
|
235
|
+
### rds-agent resolve
|
|
236
|
+
|
|
237
|
+
`GET /v3/resolve`
|
|
238
|
+
|
|
239
|
+
Turns a Figma link into `{ fileKey, nodeId }` (nodeId as 1:2; `null` when the link has no node-id). Needs no tracked file. Most calls also take the link directly as `url` with '-' path parameters, so use this only when you need the ids themselves. `invalid_url`: pass a figma.com/design/… link, URL-encoded.
|
|
240
|
+
|
|
241
|
+
| Flag | Type | Sent as | Description |
|
|
242
|
+
|------|------|---------|-------------|
|
|
243
|
+
| `--url` | string | query `url` | **Required.** A Figma design link, e.g. https://www.figma.com/design/<fileKey>/<name>?node-id=1-2. |
|
|
244
|
+
|
|
245
|
+
### rds-agent claims ls
|
|
246
|
+
|
|
247
|
+
`GET /v3/files/{fileKey}/claims`
|
|
248
|
+
|
|
249
|
+
Active (unexpired) claims, soonest expiry first. `nodeCount` counts nodes still leased to each claim; `nodeIds` contains at most 500 of them in node-id order; `nodes` names the first 3 in document order. Cleared, released, expired or reassigned nodes are excluded. Use this to see agents at work, then list_nodes with claimed=mine and worker to inspect a worker's nodes.
|
|
250
|
+
|
|
251
|
+
| Flag | Type | Sent as | Description |
|
|
252
|
+
|------|------|---------|-------------|
|
|
253
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
254
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
255
|
+
|
|
256
|
+
### rds-agent claim
|
|
257
|
+
|
|
258
|
+
`POST /v3/files/{fileKey}/claims`
|
|
259
|
+
|
|
260
|
+
Leases nodes to `worker` so parallel agents do not implement the same nodes. Claim before working when other agents may share the file; alone, you can skip claims. Select by `nodeIds` or by `filter` (not both; neither = the dirty nodes, up to `limit`). Only free, expired or already-yours nodes are taken, and the response lists exactly those — work on those only; an empty `nodes` means nothing free matched. The lease ends at `expiresAt`: `renew_claim` before then for long work; `clear_nodes` releases cleared nodes, `release_claim` the rest.
|
|
261
|
+
|
|
262
|
+
| Flag | Type | Sent as | Description |
|
|
263
|
+
|------|------|---------|-------------|
|
|
264
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
265
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
266
|
+
| `--worker` | string | body `worker` | **Required.** A stable id for your agent session; reuse it on every call. |
|
|
267
|
+
| `--label` | string | body `label` | A short human-readable name for the work, shown in logs and UIs. |
|
|
268
|
+
| `--ttl-seconds` | integer | body `ttlSeconds` | Lease length in seconds (default: the server's RDS_CLAIM_TTL_SECONDS; capped at 86400 = 24 h). |
|
|
269
|
+
| `--limit` | integer | body `limit` | At most this many nodes (default 100 with a filter; every listed id with nodeIds). |
|
|
270
|
+
| `--node-ids` | string,… | body `nodeIds` | Exact node ids to claim (1:2 or 1-2); unknown ids are skipped. |
|
|
271
|
+
| `--q` | string | body `filter.q` | All the filters above in one string: space-separated `key:value` pairs, e.g. `state:dirty under:1:2 changed:fills` (several subtrees: `under:1:2,1:5`); quote values with spaces (name:"Primary Button"). A key may not also be passed as its own parameter. |
|
|
272
|
+
| `--state` | string | body `filter.state` | Comma-separated: dirty, clean, blocked, all. Default dirty (changed since last built, not blocked); `all` for every state. |
|
|
273
|
+
| `--under` | string | body `filter.under` | Only this node's subtree, the node included (1:2 or 1-2). Several subtrees: up to 50 comma-separated ids (1:2,1:5) for their union, each node once, in the order given. Defaults to the `url` link's node-id. |
|
|
274
|
+
| `--depth` | integer | body `filter.depth` | Needs `under`: at most this many levels below it — below each root when there are several (1 = direct children). |
|
|
275
|
+
| `--type` | string | body `filter.type` | Comma-separated Figma node types, e.g. TEXT,INSTANCE,FRAME. |
|
|
276
|
+
| `--change-type` | string | body `filter.changeType` | Comma-separated: added, modified, deleted (dirty nodes only). |
|
|
277
|
+
| `--changed` | string | body `filter.changed` | Comma-separated changed property names (fills, paddingLeft); a trailing `*` matches a prefix (padding*). |
|
|
278
|
+
| `--category` | string | body `filter.category` | Comma-separated change categories: layout, color, typography, effects, component, content, structure, prototype, other. |
|
|
279
|
+
| `--component` | string | body `filter.component` | Comma-separated main component ids: the components and all their instances. |
|
|
280
|
+
| `--instance` | true\|false | body `filter.instance` | true: only component instances (`isInstance`); false: only other nodes. |
|
|
281
|
+
| `--name` | string | body `filter.name` | Comma-separated case-insensitive name globs (`*`, `?`), e.g. Button*. |
|
|
282
|
+
| `--since` | string | body `filter.since` | ISO 8601 time: only nodes changed at or after it. |
|
|
283
|
+
|
|
284
|
+
### rds-agent clear
|
|
285
|
+
|
|
286
|
+
`POST /v3/files/{fileKey}/clear` — arguments: `<nodeId>=<contentHash> … | -`
|
|
287
|
+
|
|
288
|
+
Records nodes as implemented (up to 500 per call) once your code matches the design: they become clean, their current design becomes the new baseline, and their leases are released. Send each node with the `contentHash` you implemented (from `list_nodes` / `get_node`). Each item is checked on its own and the call is 200 even when some fail: `cleared`; `stale` — the design changed since you read it, so re-read that node with `get_node`, implement the new changes and clear it with the returned `contentHash`; `not_found` — a wrong id. Clear only what you actually built; never clear to hide changes (use `block_node` for nodes you cannot implement). The `nodes.cleared` event's actor is the body's `worker` when given, `portal:<label>` on a session-authenticated call, else the token label.
|
|
289
|
+
|
|
290
|
+
Arguments: The nodes to clear (1–500), each with the `contentHash` you implemented. (body `items`)
|
|
291
|
+
|
|
292
|
+
| Flag | Type | Sent as | Description |
|
|
293
|
+
|------|------|---------|-------------|
|
|
294
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
295
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
296
|
+
| `--commit-ref` | string | body `commitRef` | The commit (SHA or ref) that implements the nodes; shown in node history. |
|
|
297
|
+
| `--worker` | string | body `worker` | Your worker id; recorded as the `nodes.cleared` actor (default: the token label). |
|
|
298
|
+
|
|
299
|
+
### rds-agent renew
|
|
300
|
+
|
|
301
|
+
`POST /v3/files/{fileKey}/claims/{claimId}/renew` — arguments: `<claimId>`
|
|
302
|
+
|
|
303
|
+
Extends the lease (to now + `ttlSeconds`) on the nodes still held under this claim; nodes cleared, released, expired or re-claimed since are not renewed, and the response lists the rest. Renew before `expiresAt` while work takes longer than the lease. `claim_not_found`: the id is wrong — take a new claim with `claim_nodes`.
|
|
304
|
+
|
|
305
|
+
| Flag | Type | Sent as | Description |
|
|
306
|
+
|------|------|---------|-------------|
|
|
307
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
308
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
309
|
+
| `--ttl-seconds` | integer | body `ttlSeconds` | Lease length in seconds (default: the server's RDS_CLAIM_TTL_SECONDS; capped at 86400 = 24 h). |
|
|
310
|
+
|
|
311
|
+
### rds-agent release
|
|
312
|
+
|
|
313
|
+
`DELETE /v3/files/{fileKey}/claims/{claimId}` — arguments: `<claimId>`
|
|
314
|
+
|
|
315
|
+
Ends the claim and frees the nodes still under it, so other agents can take them. Call it when you stop without clearing everything (cleared nodes are already released). `claim_not_found`: the id is wrong; an unreleased lease simply expires at `expiresAt`.
|
|
316
|
+
|
|
317
|
+
| Flag | Type | Sent as | Description |
|
|
318
|
+
|------|------|---------|-------------|
|
|
319
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
320
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
321
|
+
|
|
322
|
+
### rds-agent events
|
|
323
|
+
|
|
324
|
+
`GET /v3/files/{fileKey}/events`
|
|
325
|
+
|
|
326
|
+
The file's activity log, oldest first: syncs, clears, claims, blocks (IDs, counts and labels, never design content). Use it to see what changed since you last looked, or who holds what. JSON page `{ events, nextAfter }`: poll with `after` = the previous `nextAfter`; `after=0` starts from the oldest retained event. After a `sync.completed`, re-read the affected nodes. To read the newest events first, pass `order=desc`: the page `{ events, nextBefore }` is newest first; pass `before` = the previous `nextBefore` for the next older page (omit `before` to start at the newest event). A page shorter than `limit` is the last one. Filters apply the same in both orders. Types: sync.completed, nodes.cleared, claim.created, claim.renewed, claim.released, node.blocked, node.unblocked. With `Accept: text/event-stream`: a server-sent-event stream. Each message has `id` (the event id), `event` (the type) and `data` (the event as JSON). It replays the events after `Last-Event-ID` (header, sent by EventSource on reconnect) or `?after=`, then streams live; without either it streams live only. A `: heartbeat` comment is sent every 20 s. When the requested id is older than the replay window (RDS_EVENT_REPLAY_HOURS), one `event: reset` is sent instead of the replay — re-fetch state — and the stream continues live. `format` applies to the JSON page only (`ndjson` / `md` stream every event after `after` — with order=desc, before `before`, newest first — up to `limit` when given). `nodeId` matches data.nodeId or a member of data.nodeIds in JSON and SSE. `since` is an inclusive ISO timestamp lower bound on JSON pages (ignored for SSE). Filters combine with types, after and before. `order` and `before` apply to JSON pages only (SSE is always oldest first).
|
|
327
|
+
|
|
328
|
+
| Flag | Type | Sent as | Description |
|
|
329
|
+
|------|------|---------|-------------|
|
|
330
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
331
|
+
| `--after` | integer | query `after` | Only events with a greater id: the previous page's `nextAfter` (default 0 = from the start of the log). |
|
|
332
|
+
| `--before` | integer | query `before` | Only events with a smaller id: with order=desc, the previous page's `nextBefore` (default: from the newest event). JSON pages only. |
|
|
333
|
+
| `--order` | asc\|desc | query `order` | Default `"asc"`. `asc` (default): oldest first, page with `after` / `nextAfter`. `desc`: newest first, page with `before` / `nextBefore`. JSON pages only; SSE is unchanged. |
|
|
334
|
+
| `--types` | string | query `types` | Comma-separated event types: sync.completed, nodes.cleared, claim.created, claim.renewed, claim.released, node.blocked, node.unblocked. |
|
|
335
|
+
| `--limit` | integer | query `limit` | JSON page size (default 100, max 1000). |
|
|
336
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
337
|
+
| `--node-id` | string | query `nodeId` | Only events mentioning this node in data.nodeId or data.nodeIds (1:2 or 1-2); JSON and SSE. |
|
|
338
|
+
| `--since` | string | query `since` | Inclusive ISO timestamp lower bound on createdAt for JSON pages; ignored for SSE. |
|
|
339
|
+
|
|
340
|
+
`--format`: also `ndjson`, `md` (from the server); `--all`: follows `nextAfter`.
|
|
341
|
+
|
|
342
|
+
### rds-agent block
|
|
343
|
+
|
|
344
|
+
`POST /v3/files/{fileKey}/nodes/{nodeId}/block` — arguments: `<nodeId>`
|
|
345
|
+
|
|
346
|
+
Marks a node you cannot implement (missing asset, unclear or impossible design, needs a human) as blocked, with a reason (1–500 chars) a person can act on. It leaves the default dirty listing (list it with `state=blocked`) until `unblock_node` or its next design change, and its lease is released. Blocking a blocked node replaces the reason. Use it instead of clearing a node you did not build.
|
|
347
|
+
|
|
348
|
+
| Flag | Type | Sent as | Description |
|
|
349
|
+
|------|------|---------|-------------|
|
|
350
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
351
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
352
|
+
| `--reason` | string | body `reason` | **Required.** Why the node cannot be implemented and what would unblock it. |
|
|
353
|
+
| `--worker` | string | body `worker` | Your worker id; recorded as `by` (default: the token label). |
|
|
354
|
+
|
|
355
|
+
### rds-agent unblock
|
|
356
|
+
|
|
357
|
+
`POST /v3/files/{fileKey}/nodes/{nodeId}/unblock` — arguments: `<nodeId>`
|
|
358
|
+
|
|
359
|
+
Removes a node's block once its blocker is resolved: it is dirty again (back in the default listing) or clean, by its hashes. `unblocked: false` when it was not blocked — nothing changed. A design change unblocks a node on its own.
|
|
360
|
+
|
|
361
|
+
| Flag | Type | Sent as | Description |
|
|
362
|
+
|------|------|---------|-------------|
|
|
363
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
364
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
365
|
+
| `--worker` | string | body `worker` | Your worker id; recorded as `by` (default: the token label). |
|
|
366
|
+
|
|
367
|
+
### rds-agent summary
|
|
368
|
+
|
|
369
|
+
`GET /v3/files/{fileKey}/summary`
|
|
370
|
+
|
|
371
|
+
Counts of the nodes the `list_nodes` filters match (default: dirty) by state, change type, change category and node type — a cheap overview before listing or planning work. With one `under` (e.g. a page), `byFrame` also counts per child frame of it (not with several `under` ids). With `expand=instances` the counts cover everything the scope uses — its nodes plus the main components its instances reach, transitively (`byFrame` still counts only nodes under `under`): how big is this screen, components included? Returns no nodes; use `list_nodes` or `list_work_items` for those.
|
|
372
|
+
|
|
373
|
+
| Flag | Type | Sent as | Description |
|
|
374
|
+
|------|------|---------|-------------|
|
|
375
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
376
|
+
| `--state` | string | query `state` | Comma-separated: dirty, clean, blocked, all. Default dirty (changed since last built, not blocked); `all` for every state. |
|
|
377
|
+
| `--under` | string | query `under` | Only this node's subtree, the node included (1:2 or 1-2). Several subtrees: up to 50 comma-separated ids (1:2,1:5) for their union, each node once, in the order given. Defaults to the `url` link's node-id. |
|
|
378
|
+
| `--depth` | integer | query `depth` | Needs `under`: at most this many levels below it — below each root when there are several (1 = direct children). |
|
|
379
|
+
| `--type` | string | query `type` | Comma-separated Figma node types, e.g. TEXT,INSTANCE,FRAME. |
|
|
380
|
+
| `--change-type` | string | query `changeType` | Comma-separated: added, modified, deleted (dirty nodes only). |
|
|
381
|
+
| `--changed` | string | query `changed` | Comma-separated changed property names (fills, paddingLeft); a trailing `*` matches a prefix (padding*). |
|
|
382
|
+
| `--category` | string | query `category` | Comma-separated change categories: layout, color, typography, effects, component, content, structure, prototype, other. |
|
|
383
|
+
| `--component` | string | query `component` | Comma-separated main component ids: the components and all their instances. |
|
|
384
|
+
| `--instance` | true\|false | query `instance` | true: only component instances (`isInstance`); false: only other nodes. |
|
|
385
|
+
| `--name` | string | query `name` | Comma-separated case-insensitive name globs (`*`, `?`), e.g. Button*. |
|
|
386
|
+
| `--since` | string | query `since` | ISO 8601 time: only nodes changed at or after it. |
|
|
387
|
+
| `--claimed` | string | query `claimed` | Comma-separated: true (leased), false (free), mine (leased to `worker`). |
|
|
388
|
+
| `--worker` | string | query `worker` | Your worker id; needed with `claimed=mine`. |
|
|
389
|
+
| `--q` | string | query `q` | All the filters above in one string: space-separated `key:value` pairs, e.g. `state:dirty under:1:2 changed:fills` (several subtrees: `under:1:2,1:5`); quote values with spaces (name:"Primary Button"). A key may not also be passed as its own parameter. |
|
|
390
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
391
|
+
| `--expand` | instances | query `expand` | `instances`: also include the subtree of every main component the scope's instances use (the scope is `under`, or the whole file) — transitively through instances inside those components, breadth-first, each component once. Use it for "everything this screen uses" / "which components do I build for this screen". Other filters apply after expansion; `depth` cannot be combined with it. |
|
|
392
|
+
| `--expand-depth` | integer | query `expandDepth` | With `expand=instances`: at most this many instance → main hops (default 10, max 20; 1 = only the components the scope uses directly). |
|
|
393
|
+
|
|
394
|
+
### rds-agent trends
|
|
395
|
+
|
|
396
|
+
`GET /v3/insights/trends`
|
|
397
|
+
|
|
398
|
+
How fast the backlog moves: nodes cleared and nodes newly dirtied by syncs in the last `windowDays` days (default 7) and the change in clears vs the window before, for the whole server (`total`) and each tracked file (`files`); `fileKey` narrows both to one file. Counts come from the event log, so `complete` is false when RDS_EVENT_RETENTION_DAYS (`retentionDays`) keeps less than two windows — `clearedPrevious` and `clearedChangePct` may then undercount. Returns no nodes.
|
|
399
|
+
|
|
400
|
+
| Flag | Type | Sent as | Description |
|
|
401
|
+
|------|------|---------|-------------|
|
|
402
|
+
| `--window-days` | integer | query `windowDays` | Default `7`. Window length in days, 1–14 (default 7). |
|
|
403
|
+
| `--file-key` | string | query `fileKey` | Only this tracked file (file_not_found otherwise). |
|
|
404
|
+
|
|
405
|
+
### rds-agent work
|
|
406
|
+
|
|
407
|
+
`GET /v3/files/{fileKey}/work`
|
|
408
|
+
|
|
409
|
+
The nodes the `list_nodes` filters match (default: dirty) bundled into work items — the best way to plan: fix a component once and its instances follow. Items are in document order (the design's layer order, by each item's key node), paged by `cursor`; each has its node ids (`claim_nodes` takes them), changed properties and categories. `group=component` (default): by the nearest COMPONENT / COMPONENT_SET ancestor-or-self; nodes with none form one item with `key: null`, listed last. `group=set`: merge variants of each known component set into one item named like the Figma set, with its Figma key, set reference and variants [{ key, name, nodeCount }]. Use this to build a design system. Standalone components and variants whose set is unavailable keep their component item; the default grouping is unchanged. `group=frame`: by the ancestor one level below `under` (required); the `under` node itself is in the `key: null` item. `include=progress` adds { total, clean } for each returned item across all states, independent of state= and the nodeIds cap. Use clean / total for a progress bar. `expand=instances` answers "which components do I need to build for this screen, and how often does it use each?": with `under` = the screen, items also cover every main component its instances reach (transitively, each once; filters apply after expansion), and with `group=component` each item has `placementsInScope` beside the file-wide `placements`. Nodes of expanded components that are outside `under` fall in the `key: null` item with `group=frame`. Each item's `changes` maps its listed node ids to their diffs (`changes=auto`: modified and deleted nodes; `diff`: added ones too; `names`: none — `changedProps` only). Values over 1 KB are `{ truncated: true, bytes }` and the page has `truncated: true`; `get_node` returns them whole.
|
|
410
|
+
|
|
411
|
+
| Flag | Type | Sent as | Description |
|
|
412
|
+
|------|------|---------|-------------|
|
|
413
|
+
| `--file-key` | string | path `fileKey` | **Required.** The Figma file key, e.g. `AbCdEf123456` from figma.com/design/<fileKey>/… — not a URL. Pass '-' to take it from `url` instead. |
|
|
414
|
+
| `--state` | string | query `state` | Comma-separated: dirty, clean, blocked, all. Default dirty (changed since last built, not blocked); `all` for every state. |
|
|
415
|
+
| `--under` | string | query `under` | Only this node's subtree, the node included (1:2 or 1-2). Several subtrees: up to 50 comma-separated ids (1:2,1:5) for their union, each node once, in the order given. Defaults to the `url` link's node-id. |
|
|
416
|
+
| `--depth` | integer | query `depth` | Needs `under`: at most this many levels below it — below each root when there are several (1 = direct children). |
|
|
417
|
+
| `--type` | string | query `type` | Comma-separated Figma node types, e.g. TEXT,INSTANCE,FRAME. |
|
|
418
|
+
| `--change-type` | string | query `changeType` | Comma-separated: added, modified, deleted (dirty nodes only). |
|
|
419
|
+
| `--changed` | string | query `changed` | Comma-separated changed property names (fills, paddingLeft); a trailing `*` matches a prefix (padding*). |
|
|
420
|
+
| `--category` | string | query `category` | Comma-separated change categories: layout, color, typography, effects, component, content, structure, prototype, other. |
|
|
421
|
+
| `--component` | string | query `component` | Comma-separated main component ids: the components and all their instances. |
|
|
422
|
+
| `--instance` | true\|false | query `instance` | true: only component instances (`isInstance`); false: only other nodes. |
|
|
423
|
+
| `--name` | string | query `name` | Comma-separated case-insensitive name globs (`*`, `?`), e.g. Button*. |
|
|
424
|
+
| `--since` | string | query `since` | ISO 8601 time: only nodes changed at or after it. |
|
|
425
|
+
| `--claimed` | string | query `claimed` | Comma-separated: true (leased), false (free), mine (leased to `worker`). |
|
|
426
|
+
| `--worker` | string | query `worker` | Your worker id; needed with `claimed=mine`. |
|
|
427
|
+
| `--q` | string | query `q` | All the filters above in one string: space-separated `key:value` pairs, e.g. `state:dirty under:1:2 changed:fills` (several subtrees: `under:1:2,1:5`); quote values with spaces (name:"Primary Button"). A key may not also be passed as its own parameter. |
|
|
428
|
+
| `--url` | string | query `url` | A Figma link (figma.com/design/<fileKey>/…?node-id=1-2). Supplies the path parameters given as '-'; on routes with `under`, its node-id is the default `under`. |
|
|
429
|
+
| `--expand` | instances | query `expand` | `instances`: also include the subtree of every main component the scope's instances use (the scope is `under`, or the whole file) — transitively through instances inside those components, breadth-first, each component once. Use it for "everything this screen uses" / "which components do I build for this screen". Other filters apply after expansion; `depth` cannot be combined with it. |
|
|
430
|
+
| `--expand-depth` | integer | query `expandDepth` | With `expand=instances`: at most this many instance → main hops (default 10, max 20; 1 = only the components the scope uses directly). |
|
|
431
|
+
| `--group` | component\|frame\|set | query `group` | component (default): by nearest component; set: merge all matching variants of a known component set (best for design systems); frame: by child frame of `under` (needs exactly one `under`). |
|
|
432
|
+
| `--changes` | auto\|diff\|names | query `changes` | auto (default): each item's `changes` has the diffs of its modified and deleted nodes; diff: of every listed node, added ones included (their full values); names: no `changes`, only `changedProps`. |
|
|
433
|
+
| `--limit` | integer | query `limit` | Items per page (default 100, max 1000). With format=outline: rendered lines per page (default: every line). |
|
|
434
|
+
| `--cursor` | string | query `cursor` | The previous page's `nextCursor`, unchanged, with all other parameters the same (else `invalid_cursor`). With format=outline: the previous response's `X-RDS-Next-Cursor` header (a line position in the rendered outline). |
|
|
435
|
+
| `--include` | progress | query `include` | progress: add total and clean node counts across all states for each work item. |
|
|
436
|
+
|
|
437
|
+
`--format`: also `ndjson`, `md`, `outline` (from the server); `--all`: follows `nextCursor`.
|
|
438
|
+
|
|
439
|
+
<!-- END GENERATED COMMANDS -->
|
|
440
|
+
|
|
441
|
+
## Tests
|
|
442
|
+
|
|
443
|
+
`npm test` in this folder: the generator against the annotated operations and
|
|
444
|
+
its drift check, request building, and every command end to end against a real
|
|
445
|
+
`buildApp` server (memory store) on an ephemeral port.
|
|
446
|
+
|
|
447
|
+
## License
|
|
448
|
+
|
|
449
|
+
[Apache-2.0](LICENSE), like the rest of the repository except `apps/api`
|
|
450
|
+
(FSL-1.1-ALv2).
|