@everfir/az8-cli 0.1.1 → 0.2.0-preview.2

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 ADDED
@@ -0,0 +1,45 @@
1
+ # Changelog
2
+
3
+ All notable AZ8 CLI changes are recorded here. The CLI package has its own linear version sequence;
4
+ it does not inherit the Web application or monorepo root version.
5
+
6
+ ## 0.2.0-preview.2 - 2026-07-21
7
+
8
+ ### Added
9
+
10
+ - A platform-neutral built-in agent Skill available through `az8 guide` without credentials or a
11
+ network connection.
12
+ - Section-level Markdown and versioned JSON guide output for progressive discovery.
13
+ - Agent onboarding for platform concepts, runtime capability discovery, first-session, Canvas,
14
+ generation and media SOPs, failure recovery, prohibited actions, and completion checks.
15
+
16
+ ### Safety and compatibility
17
+
18
+ - The Skill never replaces Project-scoped `capabilities.detail` or Workflow Definition discovery;
19
+ dynamic schemas, permissions, completion, History, and retry policy remain runtime-authoritative.
20
+ - Existing semantic Operations and protocol version `1.0` are unchanged.
21
+
22
+ ## 0.2.0-preview.1 - 2026-07-21
23
+
24
+ First installable internal preview.
25
+
26
+ ### Added
27
+
28
+ - Project list, detail, create, and rename commands.
29
+ - Persistent NDJSON stdio Canvas client with lifecycle, awareness, observations, Receipts,
30
+ reconnect, explicit shutdown, backpressure, and authenticated actor identity.
31
+ - One-shot wrappers over the same Canvas Client and semantic Operation Registry.
32
+ - Note lifecycle, non-World hierarchy, History, summary/detail inspection, and Core Node placement.
33
+ - Generation Planning, Draft editing, Visual References, Workflow start, status query, and bounded
34
+ wait semantics with credit-usage information.
35
+ - Public media URL import and safe local image/video/audio upload and download.
36
+
37
+ ### Safety and compatibility
38
+
39
+ - Canvas writes are available only through semantic Operations and Commands.
40
+ - Writes are serialized, never automatically retried, and isolate the Canvas context after an
41
+ indeterminate result. Read retry remains bounded.
42
+ - Tokens are accepted only through environment variables or env files and are redacted from
43
+ program interaction and diagnostics.
44
+ - 3D World, Asset aggregate management, automatic layout, media replacement, and batch upload are
45
+ intentionally not part of this preview.
package/README.md ADDED
@@ -0,0 +1,352 @@
1
+ # AZ8 CLI
2
+
3
+ AZ8 CLI is a semantic Project Canvas client for agents. It does not import Web implementation code
4
+ and does not expose raw backend, Yjs, or document mutation commands.
5
+
6
+ ## Install the internal preview
7
+
8
+ AZ8 CLI requires Node.js 20 or newer. Install the preview channel from the configured npm registry:
9
+
10
+ ```bash
11
+ npm install --global @everfir/az8-cli@preview
12
+ az8 --version
13
+ az8 help
14
+ az8 guide
15
+ ```
16
+
17
+ For a supplied release artifact, install the exact immutable tarball instead:
18
+
19
+ ```bash
20
+ npm install --global ./everfir-az8-cli-0.2.0-preview.2.tgz
21
+ az8 --version
22
+ ```
23
+
24
+ `az8 --version` must report the version selected for the agent environment. Preview releases do not
25
+ replace npm's `latest` channel. Pin an exact version or tarball for reproducible agent runs.
26
+
27
+ ## Built-in agent Skill
28
+
29
+ Run `az8 guide` before the first AZ8 action in a new agent environment. It requires no token or
30
+ network access and prints the versioned Skill shipped in the installed package. The guide defines
31
+ the platform concepts, safe operating contract, first-session and authoring SOPs, generation and
32
+ media workflows, failure recovery, prohibited actions, and completion checklist:
33
+
34
+ ```bash
35
+ az8 guide
36
+ az8 guide --section bootstrap
37
+ az8 guide --section safety
38
+ az8 guide --format json
39
+ ```
40
+
41
+ The guide teaches discovery; it does not freeze dynamic product schemas. After selecting a Project,
42
+ the agent must query `capabilities.summary` and `capabilities.detail` for the effective Operations,
43
+ permissions, input schema, History, completion, and retry semantics of the installed version and
44
+ current account. Workflow Definition queries and `planGeneration` remain authoritative for current
45
+ generation inputs.
46
+
47
+ ## Credentials and environment
48
+
49
+ Use an ignored `.env.local` or process environment:
50
+
51
+ ```dotenv
52
+ AZ8_TOKEN=...
53
+ AZ8_ENVIRONMENT=test
54
+ ```
55
+
56
+ `AZ8_ENVIRONMENT` accepts `test` or `production`. Command-line `--environment` overrides the env
57
+ value. Tokens must not be passed through argv or stdio protocol payloads.
58
+
59
+ ## Project Management
60
+
61
+ ```bash
62
+ az8 projects list --scope owned
63
+ az8 projects get <project-id>
64
+ az8 projects create --name "CLI iteration"
65
+ az8 projects rename <project-id> --name "New name"
66
+ ```
67
+
68
+ List output is compact and paginated with an opaque cursor. Get returns detail including the current
69
+ collaboration route. Project writes never retry automatically; an uncertain response is reported as
70
+ indeterminate.
71
+
72
+ ## First agent loop
73
+
74
+ A new agent needs only the installed package, a token, and this document. Start by creating its own
75
+ Project and retaining the returned `project.id`:
76
+
77
+ ```bash
78
+ az8 projects create --name "Agent preview workspace"
79
+ az8 canvas query <project-id> capabilities.summary
80
+ printf '%s\n' '{"text":"Release smoke note","position":{"x":160,"y":160}}' \
81
+ | az8 canvas operation <project-id> createNote \
82
+ --input-stdin --request-id preview-note-1
83
+ ```
84
+
85
+ For a long-lived collaborative context, start `az8 canvas open <project-id> --write --format ndjson`,
86
+ read its `hello` frame, send the documented `initialize` request, and wait for `ready` before sending
87
+ queries or Operations. Keep the process and stdin/stdout pipes alive to preserve awareness, local
88
+ History, Receipts, observations, and request replay.
89
+
90
+ For generation, create an image target and call `planGeneration` with the returned View Node and a
91
+ prompt. Execute its returned `plan.operations` in order, stopping after the first failure. A
92
+ successful `startGeneration` Receipt contains the Workflow Run identity; call `waitWorkflowRun`
93
+ separately when a terminal output is required. Planning and starting are intentionally not one
94
+ transaction.
95
+
96
+ For media transfer, `canvas upload` places a verified local image/video/audio file through the
97
+ server-owned Core Node path. After detail query resolves the target's `resolvedCoreNodeId`, `canvas
98
+ download` saves that current output to a new local file. Both commands return structured metadata so
99
+ the agent can verify identities, byte count, MIME, and SHA-256.
100
+
101
+ ## One-shot Canvas wrapper
102
+
103
+ One-shot commands open a real Canvas client, complete synchronization and hydration, invoke the same
104
+ query or Operation used by the persistent client, and close after the result is authoritative:
105
+
106
+ ```bash
107
+ az8 canvas query <project-id> canvas.summary
108
+ az8 canvas query <project-id> canvas.detail --view-node-id <view-node-id>
109
+ printf '%s\n' '{"text":"idea","position":{"x":160,"y":160}}' \
110
+ | az8 canvas operation <project-id> createNote --input-stdin --request-id create-1
111
+ az8 canvas operation <project-id> startGeneration \
112
+ --input-json '{"viewNodeId":"<target-id>"}'
113
+ ```
114
+
115
+ Operation input is one JSON object supplied by exactly one of `--input-stdin`, `--input-file`, or
116
+ `--input-json`; omitted input defaults to `{}`. Input is limited to one MiB. `--timeout-ms` controls
117
+ the same Operation acknowledgement or domain observation window as persistent stdio, and
118
+ `--client-name` changes only the ephemeral awareness display name.
119
+
120
+ Success writes one `az8.canvas.one-shot.v1` JSON document to stdout and exits `0`. A definitive
121
+ input, validation, permission, or business failure writes structured JSON to stderr and exits `1`.
122
+ Connection loss, acknowledgement loss, timeout with unknown effects, or another indeterminate
123
+ lifecycle outcome writes its Receipt or structured error to stderr and exits `2`; mutating
124
+ Operations are never automatically retried.
125
+
126
+ The wrapper adds no Canvas protocol or business logic. Its query and Operation paths share
127
+ `CanvasClient`, Canvas Session, Operation Registry, domain validation, Commands, acknowledgement,
128
+ and Receipt construction with persistent stdio. Consequently `startGeneration` returns after the Run
129
+ start and immediate Canvas effects are acknowledged; waiting for generation remains a separate
130
+ `waitWorkflowRun` call.
131
+
132
+ Each one-shot invocation is a fresh runtime. It therefore does not expose `undo`, `redo`,
133
+ `receipts.summary`, or `receipt.detail`: local Canvas History and the Receipt Log belong to one
134
+ persistent process and are not fabricated across processes. `--request-id` labels the single
135
+ attempt's returned Receipt, but initial one-shot commands do not promise cross-process request replay
136
+ or durable idempotency. Use `canvas open` when an interaction requires History, Receipt lookup,
137
+ observations, or a long-lived awareness identity.
138
+
139
+ ## Local media upload
140
+
141
+ Upload one explicit local image, video, or audio file as a new Canvas resource:
142
+
143
+ ```bash
144
+ az8 canvas upload <project-id> \
145
+ --file ./reference.png \
146
+ --idempotency-key reference-image-1 \
147
+ --name "Reference image" \
148
+ --position-x 640 --position-y 160
149
+ ```
150
+
151
+ This is a convenience wrapper over the public `uploadMedia` Operation, not a separate backend
152
+ shortcut. The wrapper resolves `--file` to the Operation's adapter-owned `source` reference; the
153
+ environment-neutral Canvas Runtime never interprets a local path. The file must be a non-empty
154
+ regular non-symlink file whose bytes identify it as image, video, or audio media. Content type,
155
+ extension, MIME, byte count, and SHA-256 come from inspection rather than caller claims.
156
+
157
+ The Operation follows Web's product sequence: create one undoable `pending` View Node, request a
158
+ presigned upload, stream one credential-free PUT, call Project Content upload completion so the
159
+ server creates the Core Node and binding, then silently mark the View Node `ready`. A known failure
160
+ silently marks the same node `failed`. A lost presign, PUT, Project Content, or collaboration write
161
+ response leaves it `pending`, returns an indeterminate Receipt, takes the Canvas context offline,
162
+ and is never automatically retried.
163
+
164
+ `--idempotency-key` is required and identifies the logical upload independently from the Operation
165
+ Receipt's `--request-id`. Explicit replay with the same normalized file and key first reconciles
166
+ Project Content through a deterministic, opaque intent fingerprint in its source identity; an
167
+ existing binding returns without another upload, while conflicting key reuse fails. Results include
168
+ View Node/Core Node identities and reproducible file metadata but never the presigned or permanent
169
+ file URL. The wrapper uses the standard `az8.canvas.one-shot.v1` output and exit codes and defaults
170
+ to a 300-second deadline. Batch upload, replacement, text-file import, and a durable local upload
171
+ cache are outside the initial slice.
172
+
173
+ ## Local media download
174
+
175
+ Download the current image, video, or audio represented by a View Node, or select an explicit Core
176
+ Node within the Project context:
177
+
178
+ ```bash
179
+ az8 canvas download <project-id> --view-node-id <view-node-id> --output ./result.png
180
+ az8 canvas download <project-id> --core-node-id <core-node-id> --output ./result.mp4
181
+ ```
182
+
183
+ Exactly one source selector and one explicit output path are required. A View Node resolves through
184
+ its current Project Content output, including the compatible display-reference fallback; the CLI
185
+ then reads that Core Node through the same public `getCoreNode` Operation. This command does not
186
+ expose arbitrary URLs, mutate Canvas state, or add content to an Asset.
187
+
188
+ The command opens and hydrates one real collaboration context to resolve the source, then closes it
189
+ before transferring the media. The media request carries no AZ8 token or collaboration credential.
190
+ The response streams into a mode-`0600` temporary file beside the destination, verifies byte count
191
+ and image/video/audio type, computes SHA-256, and only then commits to the final path. Existing paths
192
+ are rejected by default. `--overwrite` may atomically replace an existing regular file, but never a
193
+ directory or symbolic link. A failed, interrupted, or timed-out transfer leaves no partial final
194
+ file and preserves an existing destination.
195
+
196
+ Success writes one `az8.canvas.media-download.v1` document with the absolute path, byte count,
197
+ SHA-256, detected MIME/extension, response metadata, resolved Core Node identity, and whether a file
198
+ was replaced. It deliberately omits the media URL. Exit `0` is success; exit `1` is a definitive
199
+ source, HTTP 4xx, or local-path failure; exit `2` is a retryable connection, HTTP 429/5xx, transfer,
200
+ integrity, or timeout failure; exit `130` is caller cancellation. Downloads are never automatically
201
+ retried. After any non-success, the agent must decide whether a new invocation is safe.
202
+
203
+ ## Persistent Canvas client
204
+
205
+ ```bash
206
+ az8 canvas open <project-id> --write --format ndjson
207
+ ```
208
+
209
+ The process writes one `hello` frame, then waits for an `initialize` request on stdin:
210
+
211
+ ```json
212
+ {"protocolVersion":"1.0","requestId":"init-1","type":"initialize","payload":{"projectId":"<project-id>","client":{"name":"my-agent"},"observationPreset":"compact"}}
213
+ ```
214
+
215
+ Before readiness the client hydrates the current authenticated account profile. Canvas Operations use
216
+ that immutable account id and display name for persisted creator data. The `client.name` supplied by
217
+ `initialize` is awareness-only and cannot impersonate or rename the persisted author. Project owner
218
+ metadata is likewise never treated as the current actor on shared Projects.
219
+
220
+ After `ready`, requests use `query`, `configureObservations`, `operation`, `reconnect`, or `shutdown`.
221
+ The public authoring surface includes the note lifecycle, non-World View Node hierarchy operations,
222
+ and the Stage 3 Core Node creative loop. Hierarchy operations are `groupViewNodes`,
223
+ `ungroupViewNode`, `moveViewNodes` with an optional `targetParentId`, and
224
+ `updateViewNodeStacking`. Core Node operations are `getCoreNode`, `placeCoreNode`,
225
+ `createMediaTarget`, `planGeneration`, `importExternalMedia`, `uploadMedia`, `editGenerationDraft`,
226
+ `addVisualReference`, `removeVisualReference`, `startGeneration`, `getWorkflowRun`, and
227
+ `waitWorkflowRun`. Capability detail is discoverable through `capabilities.detail`; callers should
228
+ use it instead of hard-coding input schemas. Workflow Definitions are available through
229
+ `workflowDefinitions.summary` and `workflowDefinition.detail` queries.
230
+
231
+ Before editing a Draft, an agent can call the read-only `planGeneration` Operation for an existing
232
+ media target. It recommends a Definition from the target and resolved Visual Reference modalities,
233
+ constructs configuration defaults, validates required inputs, and returns compact alternatives plus
234
+ an ordered semantic Operation sequence. Use `detail: "detail"` to include slot and configuration
235
+ field metadata, including dynamic enum options. Planning never creates a Core Node or changes the
236
+ Canvas; returned Operations still execute independently and stop at the first failure.
237
+
238
+ ```json
239
+ {"protocolVersion":"1.0","requestId":"plan-1","type":"operation","payload":{"name":"planGeneration","input":{"targetViewNodeId":"<target-id>","prompt":"A quiet observatory","references":[{"viewNodeId":"<reference-id>"}],"detail":"detail"}}}
240
+ ```
241
+
242
+ `editNoteContent`, `renameViewNode`, and `resizeViewNodes` match Web's silent History policy.
243
+ `duplicateViewNodes` and `removeViewNodes` are undoable. Removal atomically cleans Draft references
244
+ from surviving nodes. Duplication supports notes and non-World resource nodes; resource copies retain
245
+ the currently displayed Project Content output without cloning a Core Node or creating Project
246
+ Content. Grouping, ungrouping, reparenting, and stacking are also undoable. Their inputs use absolute
247
+ canvas coordinates even though grouped children are persisted relative to their parent. Reparenting
248
+ preserves absolute placement, expands a destination group when needed without shrinking it, and
249
+ removes a source group only when the move leaves it empty. Group nodes cannot be nested, and stacking
250
+ is scoped to siblings with the same parent. Decoration, Asset, and all World targets remain deferred.
251
+
252
+ Example write:
253
+
254
+ ```json
255
+ {"protocolVersion":"1.0","requestId":"create-1","type":"operation","payload":{"name":"createNote","input":{"text":"idea","position":{"x":160,"y":160}}}}
256
+ ```
257
+
258
+ Example Stage 2 edits:
259
+
260
+ ```json
261
+ {"protocolVersion":"1.0","requestId":"edit-1","type":"operation","payload":{"name":"editNoteContent","input":{"viewNodeId":"view_node_1","text":"revised idea"}}}
262
+ {"protocolVersion":"1.0","requestId":"resize-1","type":"operation","payload":{"name":"resizeViewNodes","input":{"resizes":[{"viewNodeId":"view_node_1","size":{"width":420,"height":360}}]}}}
263
+ {"protocolVersion":"1.0","requestId":"duplicate-1","type":"operation","payload":{"name":"duplicateViewNodes","input":{"viewNodeIds":["view_node_1"]}}}
264
+ ```
265
+
266
+ Example hierarchy sequence (each successful write is one independent undoable interaction):
267
+
268
+ ```json
269
+ {"protocolVersion":"1.0","requestId":"group-1","type":"operation","payload":{"name":"groupViewNodes","input":{"viewNodeIds":["view_node_1","view_node_2"],"name":"References"}}}
270
+ {"protocolVersion":"1.0","requestId":"reparent-1","type":"operation","payload":{"name":"moveViewNodes","input":{"moves":[{"id":"view_node_3","position":{"x":640,"y":360},"targetParentId":"<group-id>"}]}}}
271
+ {"protocolVersion":"1.0","requestId":"front-1","type":"operation","payload":{"name":"updateViewNodeStacking","input":{"viewNodeId":"view_node_3","direction":"front"}}}
272
+ {"protocolVersion":"1.0","requestId":"ungroup-1","type":"operation","payload":{"name":"ungroupViewNode","input":{"groupViewNodeId":"<group-id>"}}}
273
+ ```
274
+
275
+ Example Stage 3 generation sequence (each line is a separate ordered interaction):
276
+
277
+ ```json
278
+ {"protocolVersion":"1.0","requestId":"target-1","type":"operation","payload":{"name":"createMediaTarget","input":{"contentType":"image"}}}
279
+ {"protocolVersion":"1.0","requestId":"draft-1","type":"operation","payload":{"name":"editGenerationDraft","input":{"viewNodeId":"<target-id>","definitionId":"<definition-id>","prompt":"A quiet observatory","config":{"aspect_ratio":"16:9"}}}}
280
+ {"protocolVersion":"1.0","requestId":"start-1","type":"operation","payload":{"name":"startGeneration","input":{"viewNodeId":"<target-id>"}}}
281
+ {"protocolVersion":"1.0","requestId":"wait-1","type":"operation","payload":{"name":"waitWorkflowRun","input":{"workflowRunId":"<run-id>"},"timeoutMs":120000}}
282
+ ```
283
+
284
+ Example public media URL import:
285
+
286
+ ```json
287
+ {"protocolVersion":"1.0","requestId":"import-1","type":"operation","payload":{"name":"importExternalMedia","input":{"contentType":"image","idempotencyKey":"reference-image-1","url":"https://example.com/reference.png","name":"Reference image","position":{"x":640,"y":160}}}}
288
+ ```
289
+
290
+ `idempotencyKey` is required. Repeating the same normalized input returns the existing View Node and
291
+ Core Node without another write; reusing the key for different input fails. Image, video, and audio
292
+ are supported. The URL is referenced directly—this operation neither uploads a file nor adds the
293
+ Core Node to an Asset. Known failures leave one inspectable `failed` View Node that can be resumed by
294
+ explicitly submitting the same input. An uncertain backend or collaboration outcome leaves the node
295
+ `pending`, takes the context offline, and is never retried automatically.
296
+
297
+ `startGeneration` succeeds when the server accepts the Workflow Run and the immediate Canvas facts
298
+ are acknowledged. It first estimates the exact current Draft inputs, then materializes literal Core
299
+ Nodes and starts with the estimate's cost and Definition version. This estimate is internal: there is
300
+ no public estimate Operation, balance query, caller-supplied expected cost, or second confirmation.
301
+ Waiting for a terminal result is deliberately a separate operation. Generation is a non-undoable
302
+ Canvas History barrier. The CLI does not expose Assets, arbitrary Core Node creation, or 3D World
303
+ operations.
304
+
305
+ Initial connection and explicit reconnect recover every Workflow Run referenced by the Canvas
306
+ pending set before reporting `ready`. Pending/running Runs receive one live subscription; Runs that
307
+ completed while the CLI was offline refresh Project Content and clear their pending Canvas fact
308
+ through a semantic Command. Status-stream read recovery is bounded. Exhaustion, or an indeterminate
309
+ pending-fact cleanup acknowledgement, closes the Canvas context and requires explicit reconnect.
310
+ Cleanup writes are not automatically retried.
311
+
312
+ `waitWorkflowRun` uses `timeoutMs` as a caller-selected observation window. If that window expires
313
+ while the Run is still authoritatively pending or running, the request fails ordinarily, the Canvas
314
+ context remains ready, and lifecycle observation continues. This is distinct from a transport,
315
+ backend-execution, or collaboration-acknowledgement deadline whose unknown outcome isolates the
316
+ context as offline.
317
+
318
+ The start Receipt has an extensible `usage.credits` object. `status: "estimated"` means the Workflow
319
+ was accepted and `estimate.amount` is an estimate rather than authoritative charged usage;
320
+ `"not-consumed"` means generation was definitely not started; and `"unknown"` means the start write
321
+ lost its authoritative response and must be reconciled after reconnect. An available estimate also
322
+ records its Definition identity and version. The CLI never converts an estimate into an actual-charge
323
+ claim.
324
+
325
+ Every output frame has `protocolVersion`, monotonic `streamSeq`, `type`, `payload`, and optional
326
+ `requestId`. stdout contains protocol frames only; diagnostics use stderr. A write completes only
327
+ after collaboration-server acknowledgement. A timeout or lost acknowledgement is indeterminate,
328
+ moves the Canvas context offline, and requires explicit reconnect and inspection before any retry.
329
+
330
+ ## Preview acceptance checklist
331
+
332
+ Before distributing a preview tarball, verify all of the following from its clean installation, not
333
+ from TypeScript source:
334
+
335
+ 1. `az8 --version` matches the immutable package version; `az8 help` lists the built-in guide,
336
+ Project, persistent Canvas, one-shot, upload, and download entry points; and `az8 guide` plus its
337
+ JSON form work without credentials or network access.
338
+ 2. With no credential, an authenticated command fails without connecting and without printing a
339
+ token. With the test token, `projects create` returns a new Project owned by the authenticated
340
+ account.
341
+ 3. Persistent stdio reaches `ready`, accepts a summary query, creates a note whose Receipt records
342
+ the authenticated Actor, and completes an ordered shutdown.
343
+ 4. One-shot `createMediaTarget` plus `planGeneration` returns a ready semantic sequence; executing
344
+ that sequence starts one Workflow Run, and `waitWorkflowRun` or later `getWorkflowRun` observes
345
+ its authoritative state.
346
+ 5. Upload one small local media file, confirm immediate detail resolution to its Core Node, replay
347
+ the same idempotency key without another transfer, and download the resolved media to a fresh
348
+ destination whose SHA-256 is reported.
349
+ 6. Run repository `pnpm verify`, retain the tarball SHA-512, and record the tested environment. Never
350
+ perform these acceptance writes against production.
351
+
352
+ Release and rollback commands are in `RELEASE.md`; package changes are in `CHANGELOG.md`.
package/RELEASE.md ADDED
@@ -0,0 +1,59 @@
1
+ # AZ8 CLI preview release
2
+
3
+ This package is an internal preview. `preview` is the release channel; it must not replace npm's
4
+ `latest` tag until a separate stability decision is made.
5
+
6
+ ## Release gate
7
+
8
+ From the repository root:
9
+
10
+ ```bash
11
+ pnpm release:az8-cli
12
+ pnpm release:pack:az8-cli
13
+ ```
14
+
15
+ The first command runs CLI tests, type checking, builds a real npm tarball, installs that tarball in
16
+ a clean temporary directory, and verifies the installed `az8` executable. The second preserves the
17
+ verified tarball and clean installation under `tmp/az8-cli-release/` for live acceptance.
18
+
19
+ Run the live smoke only against the test environment. It creates one Project unless `--project-id`
20
+ reuses an explicit test Project, starts one image generation, and uploads one tiny PNG:
21
+
22
+ ```bash
23
+ node apps/az8-cli/scripts/smoke-test.js \
24
+ --bin ./tmp/az8-cli-release/install/node_modules/.bin/az8 \
25
+ --env-file ./.env.local
26
+ ```
27
+
28
+ The smoke report must show authenticated persistent stdio, ordered shutdown, a completed Workflow
29
+ Run whose target resolves its output Core Node, upload replay without another transfer, and matching
30
+ download SHA-256. `--skip-generation` is only for diagnosing unrelated media or transport checks;
31
+ it cannot satisfy full release acceptance.
32
+
33
+ Before publishing, also run the test-environment acceptance checklist in the packaged README and the
34
+ repository-wide `pnpm verify`. Publishing is an external action and requires explicit operator
35
+ authorization:
36
+
37
+ ```bash
38
+ npm publish ./tmp/az8-cli-release/everfir-az8-cli-0.2.0-preview.2.tgz --tag preview
39
+ npm view @everfir/az8-cli dist-tags versions --json
40
+ ```
41
+
42
+ Do not pass `--tag latest`. Do not publish from an unverified source directory.
43
+
44
+ ## Rollback
45
+
46
+ Published versions are immutable. Rollback moves the `preview` tag to a previously verified version
47
+ instead of unpublishing or overwriting a package:
48
+
49
+ ```bash
50
+ npm dist-tag add @everfir/az8-cli@<previous-version> preview
51
+ npm view @everfir/az8-cli dist-tags --json
52
+ npm install --global @everfir/az8-cli@preview
53
+ az8 --version
54
+ ```
55
+
56
+ For tarball distribution, retain every verified `.tgz`; reinstall the previous tarball and confirm
57
+ `az8 --version`. A rollback changes only the installed client. It never reverses already
58
+ acknowledged Project or Canvas effects; agents must use semantic compensation or Canvas History for
59
+ product data.