@everfir/az8-cli 0.2.0 → 0.3.0-preview.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/CHANGELOG.md +43 -0
- package/README.md +112 -35
- package/RELEASE.md +20 -5
- package/dist/main.js +24263 -4020
- package/package.json +7 -5
- package/skills/az8-cli/SKILL.md +109 -56
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everfir/az8-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-preview.1",
|
|
4
4
|
"description": "Semantic Project Canvas client for AZ8 Studio agents.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"main": "./dist/main.js",
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public",
|
|
19
|
-
"tag": "
|
|
19
|
+
"tag": "preview"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "pnpm build:dependencies && rm -rf dist && esbuild src/main.ts --bundle --platform=node --format=esm --target=
|
|
22
|
+
"build": "pnpm build:dependencies && rm -rf dist && esbuild src/main.ts --bundle --platform=node --format=esm --target=node22.12 --banner:js='import { createRequire } from \"node:module\"; const require = createRequire(import.meta.url);' --outfile=dist/main.js",
|
|
23
23
|
"build:dependencies": "pnpm --filter @everfir/az8-cli^... build",
|
|
24
24
|
"dev": "tsx src/main.ts",
|
|
25
25
|
"start": "node dist/main.js",
|
|
@@ -48,9 +48,11 @@
|
|
|
48
48
|
"yjs": "^13.6.30"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
|
-
"node": ">=
|
|
51
|
+
"node": ">=22.12.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"
|
|
54
|
+
"commander": "^15.0.0",
|
|
55
|
+
"file-type": "^21.3.4",
|
|
56
|
+
"zod": "^4.4.3"
|
|
55
57
|
}
|
|
56
58
|
}
|
package/skills/az8-cli/SKILL.md
CHANGED
|
@@ -11,8 +11,9 @@ capabilities instead of guessing operation names or input shapes.
|
|
|
11
11
|
|
|
12
12
|
## Contract
|
|
13
13
|
|
|
14
|
-
- Use only public `az8 projects` and `az8 canvas` commands. Never mutate backend
|
|
15
|
-
Collaborative Document fields, Core Node payloads, or Project Content bindings
|
|
14
|
+
- Use only public `az8 projects`, `az8 session`, and `az8 canvas` commands. Never mutate backend
|
|
15
|
+
records, Yjs, Collaborative Document fields, Core Node payloads, or Project Content bindings
|
|
16
|
+
directly.
|
|
16
17
|
- Explicitly select `test` or `production`. Never infer authorization to write production data.
|
|
17
18
|
- Read the relevant Canvas facts before planning a write. Submit one semantic Operation at a time.
|
|
18
19
|
- Treat every accepted write as a blocker: wait for its terminal Receipt before issuing any later
|
|
@@ -33,7 +34,13 @@ capabilities instead of guessing operation names or input shapes.
|
|
|
33
34
|
has its own connection, lifecycle, projection, History, Receipt Log, and Awareness identity.
|
|
34
35
|
- **View Node** is a Canvas placement: note, group, or resource target with position, size, parent,
|
|
35
36
|
stacking, Draft, and presentation state.
|
|
36
|
-
- **
|
|
37
|
+
- **Note** is a sticky Canvas annotation. Its content uses `createNote` and `editNoteContent`; its
|
|
38
|
+
optional accent uses `setNoteColor` with only `blue`, `orange`, `red`, `gold`, `purple`, or
|
|
39
|
+
`green`. A Note is not a Text Resource.
|
|
40
|
+
- **Text Resource** is creative text content. Use `createTextNode` and `editTextContent` for manual
|
|
41
|
+
text, or `createGenerationTarget` with `contentType: "text"` for generated text. Do not represent
|
|
42
|
+
requested Text content by creating a Note.
|
|
43
|
+
- **Core Node** is immutable or server-owned creative content such as text, image, video, or audio.
|
|
37
44
|
Resource View Nodes resolve Core Nodes through Project Content. Do not manufacture Core Nodes or
|
|
38
45
|
bindings.
|
|
39
46
|
- **Project Content** is the authority that associates a View Node target with its effective Core
|
|
@@ -99,12 +106,22 @@ capabilities instead of guessing operation names or input shapes.
|
|
|
99
106
|
|
|
100
107
|
Retain the returned Project ID. Confirm the authenticated role before assuming write access.
|
|
101
108
|
|
|
102
|
-
4.
|
|
109
|
+
4. Choose the Canvas carrier before discovery. If the task may perform any Canvas write, open one
|
|
110
|
+
daemon-backed Agent Collaboration Session now and retain it through the authoring task:
|
|
103
111
|
|
|
104
112
|
```bash
|
|
105
|
-
az8
|
|
106
|
-
az8
|
|
107
|
-
az8
|
|
113
|
+
az8 session open <project-id> --environment test
|
|
114
|
+
az8 session query capabilities.summary
|
|
115
|
+
az8 session query capabilities.detail
|
|
116
|
+
az8 session query canvas.summary
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
For an isolated read-only task, use the process-independent query instead and do not open a
|
|
120
|
+
Session merely to retain unused state:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
az8 canvas query <project-id> capabilities.summary --environment test
|
|
124
|
+
az8 canvas query <project-id> canvas.summary --environment test
|
|
108
125
|
```
|
|
109
126
|
|
|
110
127
|
`capabilities.summary` is the short menu. `capabilities.detail` is authoritative for exact JSON
|
|
@@ -114,59 +131,82 @@ capabilities instead of guessing operation names or input shapes.
|
|
|
114
131
|
5. Use `canvas.detail` only when exact node geometry, Draft, status, or bindings are needed:
|
|
115
132
|
|
|
116
133
|
```bash
|
|
117
|
-
az8
|
|
134
|
+
az8 session query canvas.detail --view-node-id <view-node-id>
|
|
118
135
|
```
|
|
119
136
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
than trusting visual assumptions.
|
|
137
|
+
For the isolated read-only carrier, use `az8 canvas query <project-id> canvas.detail` with the
|
|
138
|
+
same selector. Opening a Session selects it for the current canonical working directory, so
|
|
139
|
+
later Session commands do not repeat its ID. Finish by inspecting affected View Nodes or
|
|
140
|
+
Workflow Runs, then close any opened Session rather than trusting visual assumptions.
|
|
124
141
|
|
|
125
142
|
## Interaction modes
|
|
126
143
|
|
|
127
|
-
Default to
|
|
128
|
-
is the normal mode whenever a task may create, edit, move, organize, remove,
|
|
129
|
-
or upload Canvas content.
|
|
130
|
-
|
|
144
|
+
Default to a daemon-backed Agent Collaboration Session for Canvas authoring. A one-write plan still
|
|
145
|
+
uses a Session. This is the normal mode whenever a task may create, edit, move, organize, remove,
|
|
146
|
+
undo, generate, import, or upload Canvas content. One private local daemon retains the authenticated
|
|
147
|
+
connection, Awareness, History, Receipts, Interests, and Watch Journal across ordinary short CLI
|
|
148
|
+
calls:
|
|
131
149
|
|
|
132
150
|
```bash
|
|
133
|
-
az8
|
|
151
|
+
az8 session open <project-id> --environment test
|
|
152
|
+
az8 session current
|
|
153
|
+
az8 session status
|
|
134
154
|
```
|
|
135
155
|
|
|
136
156
|
Use `--client-name <suffix>` only when a more specific CLI presence label helps collaborators. The
|
|
137
157
|
CLI owns the surrounding parentheses, rejects parentheses in the supplied suffix, and always keeps
|
|
138
158
|
the authenticated user display name first.
|
|
139
159
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
`
|
|
157
|
-
-
|
|
158
|
-
|
|
159
|
-
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
160
|
+
Session resolution is explicit and discoverable. A command-level `--session <id>` wins, then
|
|
161
|
+
`AZ8_SESSION_ID`, then the current Session for the local context. Use `AZ8_CONTEXT` to separate
|
|
162
|
+
parallel Agents intentionally sharing one working directory. `session list`, `current`, `status`,
|
|
163
|
+
and `use` must be used whenever the binding is uncertain; never guess a Session or Project.
|
|
164
|
+
|
|
165
|
+
Configure named semantic Interests once, then use the singular blocking Watch instead of polling:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
az8 session interests patch --input-json '{"upsert":[{"key":"canvas-ambient","patch":{"kind":"canvas"}},{"key":"workflow-terminal","patch":{"kind":"workflow"}}]}'
|
|
169
|
+
az8 session watch --timeout-ms 30000
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
- Canvas Interests exclude the Session's own changes unless `includeOwn: true` is explicit.
|
|
173
|
+
- Workflow Interests are terminal-only unless progress status is explicitly requested.
|
|
174
|
+
- `idle` ends one observation window normally. It does not indicate a failed connection or Run.
|
|
175
|
+
- `resync-required` means bounded continuity was lost. Query authoritative summary/detail, then run
|
|
176
|
+
`az8 session resynchronize`; never pretend the missing interval was observed.
|
|
177
|
+
- Exactly one consumer may wait on a Session. The daemon does not wake or restart an Agent that has
|
|
178
|
+
exited; it only completes an active `session watch` call.
|
|
179
|
+
- Watch acknowledgement is internal. If stdout delivery is interrupted before confirmation, the
|
|
180
|
+
same result may repeat. Treat repeat delivery as at-least-once readiness, not a new business fact.
|
|
181
|
+
- Queries wait behind an executing write. Watch collection remains independent of the write lane.
|
|
182
|
+
|
|
183
|
+
For a bounded human–Agent latency check, report readiness first, start
|
|
184
|
+
`az8 session watch --timeout-ms 60000`, and ask the human to make one recognizable Web Canvas change
|
|
185
|
+
only after the wait is active. Acknowledge the returned semantic change immediately, then wait again
|
|
186
|
+
for the next trial. `result.timing.waitedMs` measures the blocking window and each change's
|
|
187
|
+
`quietForMs` measures local observation-to-delivery delay; neither includes speech recognition or
|
|
188
|
+
Agent-host scheduling. Do not infer an end-to-end latency number from either field alone.
|
|
189
|
+
|
|
190
|
+
Execute reads and writes through the selected Session:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
az8 session query canvas.detail --view-node-id <view-node-id>
|
|
194
|
+
az8 session operation createNote --request-id <unique-id> \
|
|
195
|
+
--input-json '{"name":"Plan","content":"...","position":{"x":80,"y":80}}'
|
|
196
|
+
az8 session query receipt.detail --receipt-request-id <unique-id>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Every Session Operation returns one terminal Receipt. Keep writes sequential and stop after the
|
|
200
|
+
first failed or indeterminate Receipt. Close the Session explicitly when collaboration is complete:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
az8 session close
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
`az8 canvas open <project-id> --write --format ndjson` remains the lower-level persistent stdio
|
|
207
|
+
surface for a host that deliberately owns and continuously drains one child process. It has the
|
|
208
|
+
same semantic capabilities, but ordinary Agents should prefer `az8 session` and should not manually
|
|
209
|
+
implement its daemon behavior.
|
|
170
210
|
|
|
171
211
|
Use one-shot only for:
|
|
172
212
|
|
|
@@ -174,12 +214,12 @@ Use one-shot only for:
|
|
|
174
214
|
- a standalone media download;
|
|
175
215
|
- an explicitly standalone upload/import whose caller does not want an ongoing authoring session;
|
|
176
216
|
- an explicit user request for one-shot behavior; or
|
|
177
|
-
- a
|
|
217
|
+
- a platform that cannot run the local Session daemon or persistent stdio carrier.
|
|
178
218
|
|
|
179
219
|
Do not choose one-shot merely because the current plan has one write or because it requires fewer
|
|
180
|
-
tool calls. Codex and
|
|
181
|
-
limitation forces fallback, disclose that the client will not preserve local History,
|
|
182
|
-
Awareness, observations, or request replay across invocations.
|
|
220
|
+
tool calls. Codex and ordinary shell hosts can use daemon-backed Sessions without retaining stdin.
|
|
221
|
+
If a host limitation forces fallback, disclose that the client will not preserve local History,
|
|
222
|
+
Receipt Log, Awareness, observations, or request replay across invocations.
|
|
183
223
|
|
|
184
224
|
For a permitted one-shot call, supply Operation input through exactly one of `--input-stdin`,
|
|
185
225
|
`--input-file`, or `--input-json`, give every write a meaningful unique `--request-id`, and retain its
|
|
@@ -197,8 +237,9 @@ one-shot processes.
|
|
|
197
237
|
work depends on its exact state.
|
|
198
238
|
6. Only then plan the next interaction.
|
|
199
239
|
|
|
200
|
-
Common capabilities include notes, move/resize/rename, duplicate/remove,
|
|
201
|
-
Node placement, and
|
|
240
|
+
Common capabilities include notes, manual Text Resources, move/resize/rename, duplicate/remove,
|
|
241
|
+
groups and stacking, Core Node placement, and generation targets. The runtime catalog is
|
|
242
|
+
authoritative. Group nodes cannot nest;
|
|
202
243
|
stacking applies only among siblings. Unsupported World, Decoration, Asset, alignment, and automatic
|
|
203
244
|
layout behavior must not be simulated through lower-level writes.
|
|
204
245
|
|
|
@@ -210,9 +251,21 @@ entries. Never use compensating low-level mutations to imitate undo.
|
|
|
210
251
|
|
|
211
252
|
Generation is an explicit sequence, never one transaction:
|
|
212
253
|
|
|
213
|
-
1. Create a target with `
|
|
254
|
+
1. Create a target with `createGenerationTarget` and retain its View Node ID. It accepts `audio`,
|
|
255
|
+
`image`, `text`, or `video`; `createMediaTarget` remains a compatibility capability for non-text
|
|
256
|
+
targets when advertised.
|
|
214
257
|
2. Call the read-only `planGeneration` Operation with the target, prompt, and any references. Use
|
|
215
258
|
`detail: "detail"` when configuration fields or dynamic enum options are needed.
|
|
259
|
+
Every reference must be `{ "viewNodeId": "..." }`. If the desired Core Node is not currently
|
|
260
|
+
on the Canvas, first call `placeCoreNode`, wait for its successful Receipt, and use the returned
|
|
261
|
+
View Node ID. Never pass a Core Node ID as a generation reference or silently choose among
|
|
262
|
+
multiple placements of the same Core Node. A manual Text Resource is also a valid reference:
|
|
263
|
+
pass its View Node ID instead of copying its text into `prompt`. Planning reads its current text,
|
|
264
|
+
the Draft retains the View Node binding for Web lineage and connection rendering, and
|
|
265
|
+
`startGeneration` materializes the Text Core Node only after estimation succeeds. The stable
|
|
266
|
+
operation names `addVisualReference` and `removeVisualReference` cover these planned Text
|
|
267
|
+
bindings as well as image/video bindings; execute the names returned by the plan rather than
|
|
268
|
+
interpreting them literally.
|
|
216
269
|
3. If the plan reports blocking issues, resolve them and plan again. Do not execute a non-ready
|
|
217
270
|
plan.
|
|
218
271
|
4. Execute `plan.operations` exactly in order, one Operation at a time. Each step revalidates
|
|
@@ -338,8 +391,8 @@ Before reporting a task complete, verify all applicable facts:
|
|
|
338
391
|
- Generation start and generation completion were reported as separate interactions; the target's
|
|
339
392
|
effective Core Node was resolved after completion.
|
|
340
393
|
- Media transfers were verified by identities and checksums without exposing URLs or credentials.
|
|
341
|
-
-
|
|
342
|
-
was disclosed.
|
|
394
|
+
- The daemon-backed Session was closed explicitly (or persistent stdio was shut down in order), and
|
|
395
|
+
any abnormal termination or uncertain active write was disclosed.
|
|
343
396
|
- Deferred scopes were not approximated by bypassing the public semantic surface.
|
|
344
397
|
|
|
345
398
|
When any item cannot be proven, report the uncertainty and the next safe read or reconciliation
|