@everfir/az8-cli 0.2.0-preview.5 → 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 CHANGED
@@ -3,6 +3,70 @@
3
3
  All notable AZ8 CLI changes are recorded here. The CLI package has its own linear version sequence;
4
4
  it does not inherit the Web application or monorepo root version.
5
5
 
6
+ ## Unreleased
7
+
8
+ ## 0.3.0-preview.1 - 2026-07-23
9
+
10
+ ### Added
11
+
12
+ - Manual Text Resources through `createTextNode` and `editTextContent`, generated Text targets
13
+ through `createGenerationTarget`, and Web-compatible Note accents through `setNoteColor`.
14
+ - Daemon-backed Agent Collaboration Sessions through `az8 session`, with one isolated local daemon
15
+ per Session, current-context discovery, retained authenticated Canvas lifecycle, semantic
16
+ Operations and queries, Interests, bounded Watch delivery, and explicit close.
17
+ - A single semantic collaboration Watch for Canvas, Workflow, and Session facts, with bounded recent
18
+ history, pending continuity inspection, at-least-once stdout delivery, and explicit
19
+ resynchronization after journal loss.
20
+
21
+ ### Changed
22
+
23
+ - New generation references accept only visible Canvas View Node identities. Content available only
24
+ as a Core Node must first be placed with `placeCoreNode`, preserving Web's inferred connection
25
+ lines and preventing ambiguous placement selection.
26
+ - Agent authoring now defaults to daemon-backed Sessions. Persistent stdio remains the lower-level
27
+ carrier, while one-shot remains limited to isolated reads, standalone transfers, explicit caller
28
+ choice, or hosts that cannot retain a collaborative client.
29
+ - Numeric Workflow configuration enums normalize transport string values back to their declared
30
+ numeric domain before planning validation, matching Web behavior.
31
+
32
+ ### Safety and compatibility
33
+
34
+ - Tokens remain outside command arguments, daemon descriptors, and the private daemon protocol.
35
+ - Session writes remain serialized and never retry automatically. Queries wait behind executing
36
+ writes; Watch collection remains independent.
37
+ - The initial local daemon transport supports macOS and Linux. Windows remains explicitly
38
+ unsupported until the same private Session carrier is hosted through a named pipe.
39
+
40
+ ## 0.2.0 - 2026-07-22
41
+
42
+ First stable semantic Project Canvas client for agents.
43
+
44
+ ### Added
45
+
46
+ - Project management, persistent NDJSON Canvas collaboration, one-shot compatibility wrappers,
47
+ semantic note and hierarchy authoring, Core Node generation, Workflow observation, and safe local
48
+ media upload/download.
49
+ - A runtime-discoverable built-in agent Skill covering platform concepts, capability discovery,
50
+ persistent request/process lifecycle, generation sequencing, recovery, and prohibited bypasses.
51
+ - Commander 15 command routing and generated help, with Zod 4 schemas for typed option and
52
+ cross-option validation.
53
+
54
+ ### Changed
55
+
56
+ - Source is grouped into `src/cli`, `src/commands`, `src/canvas`, `src/media`, `src/integrations`,
57
+ `src/guide`, `src/schemas`, `src/errors`, and `src/utils`; tests remain colocated and domain
58
+ modules remain framework-independent.
59
+ - The CLI and repository development contract now require Node.js 22.12 or newer.
60
+
61
+ ### Stability contract
62
+
63
+ - Public Canvas writes remain available only through semantic Operations and internal Commands;
64
+ callers cannot write raw backend, Yjs, Core Node, or Project Content data.
65
+ - Protocol `1.0`, ordered request/Receipt behavior, authenticated presence, no automatic write retry,
66
+ and explicit deferred scopes form the initial stable compatibility boundary.
67
+ - 3D World, Asset aggregate management, automatic layout, media replacement, and batch upload remain
68
+ intentionally deferred rather than partially exposed.
69
+
6
70
  ## 0.2.0-preview.5 - 2026-07-22
7
71
 
8
72
  ### Changed
package/README.md CHANGED
@@ -3,26 +3,27 @@
3
3
  AZ8 CLI is a semantic Project Canvas client for agents. It does not import Web implementation code
4
4
  and does not expose raw backend, Yjs, or document mutation commands.
5
5
 
6
- ## Install the internal preview
6
+ ## Install
7
7
 
8
- AZ8 CLI requires Node.js 20 or newer. Install the preview channel from the configured npm registry:
8
+ AZ8 CLI requires Node.js 22.12 or newer. Install the stable channel from the configured npm
9
+ registry:
9
10
 
10
11
  ```bash
11
- npm install --global @everfir/az8-cli@preview
12
+ npm install --global @everfir/az8-cli
12
13
  az8 --version
13
14
  az8 help
14
15
  az8 guide
15
16
  ```
16
17
 
17
- For a supplied release artifact, install the exact immutable tarball instead:
18
+ For a supplied preview artifact, install the exact immutable tarball instead:
18
19
 
19
20
  ```bash
20
- npm install --global ./everfir-az8-cli-0.2.0-preview.5.tgz
21
+ npm install --global ./everfir-az8-cli-0.3.0-preview.1.tgz
21
22
  az8 --version
22
23
  ```
23
24
 
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.
25
+ `az8 --version` must report the version selected for the agent environment. Pin an exact version or
26
+ tarball for reproducible agent runs.
26
27
 
27
28
  ## Built-in agent Skill
28
29
 
@@ -61,6 +62,29 @@ An explicit file is selected by path, for example
61
62
  users to paste credential contents; verify authentication with a bounded `projects list` read.
62
63
  Tokens must not be passed through argv or stdio protocol payloads.
63
64
 
65
+ ## CLI architecture
66
+
67
+ The executable uses Commander for the command tree and generated help, and Zod as the typed option
68
+ validation boundary. CLI-specific code is organized by responsibility:
69
+
70
+ - `src/cli/` owns program assembly, runtime config, persistent stdio transport, output framing, and
71
+ package version resolution.
72
+ - `src/commands/` declares Project, Canvas, and guide commands.
73
+ - `src/agent-session/` owns isolated daemon lifecycles, local Session discovery, the private RPC
74
+ carrier, Watch delivery, and current-context selection.
75
+ - `src/canvas/` owns collaboration sessions, one-shot execution, awareness, and the NDJSON
76
+ protocol.
77
+ - `src/media/` owns safe local upload and download behavior.
78
+ - `src/integrations/` adapts AZ8 backend APIs to the account, Project, Project Content, Foundation
79
+ Data, Workflow, and snapshot ports.
80
+ - `src/guide/` loads and renders the packaged agent Skill.
81
+ - `src/schemas/` owns parsed option contracts and cross-option validation.
82
+ - `src/errors/` maps validation failures to stable CLI and Canvas error codes.
83
+ - `src/utils/` contains shared output and Commander option adapters.
84
+ - `src/index.ts` and `src/main.ts` remain the programmatic and executable entry points.
85
+
86
+ Canvas, media, guide, and integration modules do not depend on Commander or Zod.
87
+
64
88
  ## Project Management
65
89
 
66
90
  ```bash
@@ -77,23 +101,52 @@ indeterminate.
77
101
  ## First agent loop
78
102
 
79
103
  A new agent needs only the installed package, a token, and this document. Start by creating its own
80
- Project and retaining the returned `project.id`:
104
+ Project, then open one daemon-backed Agent Collaboration Session:
81
105
 
82
106
  ```bash
83
107
  az8 projects create --name "Agent preview workspace"
84
- az8 canvas query <project-id> capabilities.summary
85
- printf '%s\n' '{"text":"Release smoke note","position":{"x":160,"y":160}}' \
86
- | az8 canvas operation <project-id> createNote \
87
- --input-stdin --request-id preview-note-1
108
+ az8 session open <project-id> --environment test
109
+ az8 session query capabilities.summary
110
+ az8 session operation createNote --request-id preview-note-1 \
111
+ --input-json '{"text":"Release smoke note","position":{"x":160,"y":160}}'
112
+ az8 session query canvas.summary
113
+ ```
114
+
115
+ The Session remains selected for the current canonical working directory, so subsequent commands do
116
+ not repeat its ID. Use `session current`, `list`, and `status` rather than guessing which Project or
117
+ daemon is active. Configure semantic Interests and block on one Watch call when collaboration
118
+ updates matter:
119
+
120
+ ```bash
121
+ az8 session interests patch \
122
+ --input-json '{"upsert":[{"key":"canvas-ambient","patch":{"kind":"canvas"}},{"key":"workflow-terminal","patch":{"kind":"workflow"}}]}'
123
+ az8 session watch --timeout-ms 30000
124
+ az8 session close
88
125
  ```
89
126
 
90
- For a long-lived collaborative context, start `az8 canvas open <project-id> --write --format ndjson`,
91
- read its `hello` frame, send the documented `initialize` request, and wait for `ready` before sending
92
- queries or Operations. Keep the process and stdin/stdout pipes alive to preserve awareness, local
93
- History, Receipts, observations, and request replay.
127
+ `watch` returning `idle` is a successful empty observation window, not a connection error. Exactly
128
+ one caller may wait on a Session. The daemon retains the authenticated connection and collaboration
129
+ state between short CLI invocations, but it does not wake or restart an Agent that has exited.
130
+
131
+ For a manual human–Agent interaction latency check, have the Agent report that it is ready, start
132
+ one 60-second Watch, and only then make one recognizable Canvas change from Web:
94
133
 
95
- For generation, create an image target and call `planGeneration` with the returned View Node and a
96
- prompt. Execute its returned `plan.operations` in order, stopping after the first failure. A
134
+ ```bash
135
+ az8 session interests patch \
136
+ --input-json '{"upsert":[{"key":"latency-check","patch":{"kind":"canvas","filter":{"includeOwn":false}}}]}'
137
+ az8 session watch --timeout-ms 60000
138
+ ```
139
+
140
+ The Agent should acknowledge the returned semantic change immediately and then wait again. Record
141
+ the human-observed time from completing the Web interaction to seeing the Agent response.
142
+ `result.timing.waitedMs` is how long the blocking call waited, while each change's `quietForMs` is
143
+ the CLI's local observation-to-delivery delay; neither includes speech recognition or the Agent
144
+ host's scheduling time. Repeat only a small bounded sample, keep the Session open between trials,
145
+ and remove the temporary Interest or close the Session afterward.
146
+
147
+ For generation, create a target with `createGenerationTarget` (including `contentType: "text"`) and
148
+ call `planGeneration` with the returned View Node and a prompt. Execute its returned
149
+ `plan.operations` in order, stopping after the first failure. A
97
150
  successful `startGeneration` Receipt contains the Workflow Run identity; call `waitWorkflowRun`
98
151
  separately when a terminal output is required. Planning and starting are intentionally not one
99
152
  transaction.
@@ -108,9 +161,9 @@ the agent can verify identities, byte count, MIME, and SHA-256.
108
161
  One-shot commands open a real Canvas client, complete synchronization and hydration, invoke the same
109
162
  query or Operation used by the persistent client, and close after the result is authoritative:
110
163
 
111
- Persistent stdio is the default for any Canvas authoring task, including a plan with only one write.
112
- Use this wrapper only for an isolated read, standalone transfer, explicit one-shot request, or a host
113
- that cannot retain a child process and write later NDJSON to stdin.
164
+ Daemon-backed Sessions are the default for any Canvas authoring task, including a plan with only one
165
+ write. Use this wrapper only for an isolated read, standalone transfer, explicit one-shot request,
166
+ or a host that cannot run a Session daemon or retain a child process.
114
167
 
115
168
  ```bash
116
169
  az8 canvas query <project-id> canvas.summary
@@ -212,11 +265,13 @@ source, HTTP 4xx, or local-path failure; exit `2` is a retryable connection, HTT
212
265
  integrity, or timeout failure; exit `130` is caller cancellation. Downloads are never automatically
213
266
  retried. After any non-success, the agent must decide whether a new invocation is safe.
214
267
 
215
- ## Persistent Canvas client
268
+ ## Lower-level persistent stdio client
216
269
 
217
- This is the default mode whenever a task may perform any Canvas write. Open it before the first
218
- Canvas query, keep capability discovery and all ordered Operations in the same lifecycle, and shut
219
- it down only after the authoring task is complete.
270
+ This is the lower-level carrier for a host that deliberately owns and continuously drains one child
271
+ process. Ordinary Agents should use `az8 session`, whose private daemon retains the same Canvas
272
+ lifecycle across short commands. When using stdio directly, open it before the first Canvas query,
273
+ keep capability discovery and all ordered Operations in the same lifecycle, and shut it down only
274
+ after the authoring task is complete.
220
275
 
221
276
  ```bash
222
277
  az8 canvas open <project-id> --write --format ndjson [--client-name codex]
@@ -237,28 +292,45 @@ rename the persisted author. The CLI publishes its Attention Cursor but delibera
237
292
  bounds. Project owner metadata is likewise never treated as the current actor on shared Projects.
238
293
 
239
294
  After `ready`, requests use `query`, `configureObservations`, `operation`, `reconnect`, or `shutdown`.
240
- The public authoring surface includes the note lifecycle, non-World View Node hierarchy operations,
241
- and the Stage 3 Core Node creative loop. Hierarchy operations are `groupViewNodes`,
295
+ The public authoring surface includes distinct Note and Text Resource lifecycles, non-World View
296
+ Node hierarchy operations, and the Stage 3 Core Node creative loop. Note operations include
297
+ `createNote`, `editNoteContent`, and `setNoteColor`; manual Text Resource operations are
298
+ `createTextNode` and `editTextContent`. Hierarchy operations are `groupViewNodes`,
242
299
  `ungroupViewNode`, `moveViewNodes` with an optional `targetParentId`, and
243
300
  `updateViewNodeStacking`. Core Node operations are `getCoreNode`, `placeCoreNode`,
244
- `createMediaTarget`, `planGeneration`, `importExternalMedia`, `uploadMedia`, `editGenerationDraft`,
301
+ `createGenerationTarget`, the compatible non-text `createMediaTarget`, `planGeneration`,
302
+ `importExternalMedia`, `uploadMedia`, `editGenerationDraft`,
245
303
  `addVisualReference`, `removeVisualReference`, `startGeneration`, `getWorkflowRun`, and
246
304
  `waitWorkflowRun`. Capability detail is discoverable through `capabilities.detail`; callers should
247
305
  use it instead of hard-coding input schemas. Workflow Definitions are available through
248
306
  `workflowDefinitions.summary` and `workflowDefinition.detail` queries.
249
307
 
250
308
  Before editing a Draft, an agent can call the read-only `planGeneration` Operation for an existing
251
- media target. It recommends a Definition from the target and resolved Visual Reference modalities,
309
+ generation target. It recommends a Definition from the target and resolved generation-reference modalities,
252
310
  constructs configuration defaults, validates required inputs, and returns compact alternatives plus
253
311
  an ordered semantic Operation sequence. Use `detail: "detail"` to include slot and configuration
254
312
  field metadata, including dynamic enum options. Planning never creates a Core Node or changes the
255
313
  Canvas; returned Operations still execute independently and stop at the first failure.
256
314
 
315
+ Generation references always identify visible Canvas placements. Public planning and
316
+ `addVisualReference` accept only a View Node ID. If desired content exists only as a Core Node, call
317
+ `placeCoreNode` first, wait for its successful Receipt, and reference the returned View Node. This
318
+ preserves the same visible inferred connection as Web and avoids guessing when one Core Node has
319
+ multiple Canvas placements. Manual Text Resources are valid prompt references even though they do
320
+ not have a Core Node before generation starts. Their View Node binding remains in the launch history
321
+ for Web lineage and inferred-edge rendering; estimation uses the current text and materialization
322
+ creates the Text Core Node only after the estimate succeeds. The published operation names
323
+ `addVisualReference` and `removeVisualReference` are retained for compatibility and also carry these
324
+ planned Text bindings.
325
+
257
326
  ```json
258
327
  {"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"}}}
259
328
  ```
260
329
 
261
- `editNoteContent`, `renameViewNode`, and `resizeViewNodes` match Web's silent History policy.
330
+ `editNoteContent`, `setNoteColor`, `editTextContent`, `renameViewNode`, and `resizeViewNodes` match
331
+ Web's silent History policy. Note colors are limited to `blue`, `orange`, `red`, `gold`, `purple`,
332
+ and `green`. A manual Text Resource is `type: "resource"`, `contentType: "text"`; it must not be
333
+ approximated with a Note.
262
334
  `duplicateViewNodes` and `removeViewNodes` are undoable. Removal atomically cleans Draft references
263
335
  from surviving nodes. Duplication supports notes and non-World resource nodes; resource copies retain
264
336
  the currently displayed Project Content output without cloning a Core Node or creating Project
@@ -278,6 +350,8 @@ Example Stage 2 edits:
278
350
 
279
351
  ```json
280
352
  {"protocolVersion":"1.0","requestId":"edit-1","type":"operation","payload":{"name":"editNoteContent","input":{"viewNodeId":"view_node_1","text":"revised idea"}}}
353
+ {"protocolVersion":"1.0","requestId":"color-1","type":"operation","payload":{"name":"setNoteColor","input":{"viewNodeId":"view_node_1","color":"purple"}}}
354
+ {"protocolVersion":"1.0","requestId":"text-1","type":"operation","payload":{"name":"createTextNode","input":{"text":"A manual Text Resource","name":"Draft copy","position":{"x":520,"y":160}}}}}
281
355
  {"protocolVersion":"1.0","requestId":"resize-1","type":"operation","payload":{"name":"resizeViewNodes","input":{"resizes":[{"viewNodeId":"view_node_1","size":{"width":420,"height":360}}]}}}
282
356
  {"protocolVersion":"1.0","requestId":"duplicate-1","type":"operation","payload":{"name":"duplicateViewNodes","input":{"viewNodeIds":["view_node_1"]}}}
283
357
  ```
@@ -294,7 +368,7 @@ Example hierarchy sequence (each successful write is one independent undoable in
294
368
  Example Stage 3 generation sequence (each line is a separate ordered interaction):
295
369
 
296
370
  ```json
297
- {"protocolVersion":"1.0","requestId":"target-1","type":"operation","payload":{"name":"createMediaTarget","input":{"contentType":"image"}}}
371
+ {"protocolVersion":"1.0","requestId":"target-1","type":"operation","payload":{"name":"createGenerationTarget","input":{"contentType":"image"}}}
298
372
  {"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"}}}}
299
373
  {"protocolVersion":"1.0","requestId":"start-1","type":"operation","payload":{"name":"startGeneration","input":{"viewNodeId":"<target-id>"}}}
300
374
  {"protocolVersion":"1.0","requestId":"wait-1","type":"operation","payload":{"name":"waitWorkflowRun","input":{"workflowRunId":"<run-id>"},"timeoutMs":120000}}
@@ -349,26 +423,29 @@ Every output frame has `protocolVersion`, monotonic `streamSeq`, `type`, `payloa
349
423
  after collaboration-server acknowledgement. A timeout or lost acknowledgement is indeterminate,
350
424
  moves the Canvas context offline, and requires explicit reconnect and inspection before any retry.
351
425
 
352
- ## Preview acceptance checklist
426
+ ## Release acceptance checklist
353
427
 
354
- Before distributing a preview tarball, verify all of the following from its clean installation, not
428
+ Before distributing a release tarball, verify all of the following from its clean installation, not
355
429
  from TypeScript source:
356
430
 
357
431
  1. `az8 --version` matches the immutable package version; `az8 help` lists the built-in guide,
358
- Project, persistent Canvas, one-shot, upload, and download entry points; and `az8 guide` plus its
359
- JSON form work without credentials or network access.
432
+ Project, Session, persistent Canvas, one-shot, upload, and download entry points; and `az8 guide`
433
+ plus its JSON form work without credentials or network access.
360
434
  2. With no credential, an authenticated command fails without connecting and without printing a
361
435
  token. With the test token, `projects create` returns a new Project owned by the authenticated
362
436
  account.
363
- 3. Persistent stdio reaches `ready`, accepts a summary query, creates a note whose Receipt records
437
+ 3. A daemon-backed Session opens, becomes current, accepts a summary query and one semantic write,
438
+ reports healthy status, delivers an interested external change through `watch`, returns `idle`
439
+ for an empty bounded wait, and closes without leaving a live daemon or current binding.
440
+ 4. Persistent stdio reaches `ready`, accepts a summary query, creates a note whose Receipt records
364
441
  the authenticated Actor, and completes an ordered shutdown.
365
- 4. One-shot `createMediaTarget` plus `planGeneration` returns a ready semantic sequence; executing
366
- that sequence starts one Workflow Run, and `waitWorkflowRun` or later `getWorkflowRun` observes
367
- its authoritative state.
368
- 5. Upload one small local media file, confirm immediate detail resolution to its Core Node, replay
442
+ 5. One-shot `createGenerationTarget` plus `planGeneration` returns a ready semantic sequence with
443
+ only visible View Node references; executing that sequence starts one Workflow Run, and
444
+ `waitWorkflowRun` or later `getWorkflowRun` observes its authoritative state.
445
+ 6. Upload one small local media file, confirm immediate detail resolution to its Core Node, replay
369
446
  the same idempotency key without another transfer, and download the resolved media to a fresh
370
447
  destination whose SHA-256 is reported.
371
- 6. Run repository `pnpm verify`, retain the tarball SHA-512, and record the tested environment. Never
448
+ 7. Run repository `pnpm verify`, retain the tarball SHA-512, and record the tested environment. Never
372
449
  perform these acceptance writes against production.
373
450
 
374
451
  Release and rollback commands are in `RELEASE.md`; package changes are in `CHANGELOG.md`.
package/RELEASE.md CHANGED
@@ -1,7 +1,7 @@
1
- # AZ8 CLI preview release
1
+ # AZ8 CLI release
2
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.
3
+ `latest` is the stable release channel. Preview versions remain immutable historical artifacts and
4
+ must not be republished or renamed into a stable version.
5
5
 
6
6
  ## Release gate
7
7
 
@@ -12,12 +12,15 @@ pnpm release:az8-cli
12
12
  pnpm release:pack:az8-cli
13
13
  ```
14
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.
15
+ The first command rebuilds the CLI's classified workspace dependencies, runs CLI tests and type
16
+ checking, builds a real npm tarball, installs that tarball in a clean temporary directory, and
17
+ verifies the installed `az8` executable. The second repeats the dependency-aware prepack and
18
+ preserves the verified tarball and clean installation under `tmp/az8-cli-release/` for live
19
+ acceptance. Never bundle against pre-existing workspace `dist/` output.
18
20
 
19
21
  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:
22
+ reuses an explicit test Project, starts one visible-reference image generation, and uploads one
23
+ generated 512×512 PNG:
21
24
 
22
25
  ```bash
23
26
  node apps/az8-cli/scripts/smoke-test.js \
@@ -28,28 +31,59 @@ node apps/az8-cli/scripts/smoke-test.js \
28
31
  The smoke report must show authenticated persistent stdio, ordered shutdown, a completed Workflow
29
32
  Run whose target resolves its output Core Node, upload replay without another transfer, and matching
30
33
  download SHA-256. `--skip-generation` is only for diagnosing unrelated media or transport checks;
31
- it cannot satisfy full release acceptance.
34
+ it cannot satisfy full release acceptance. When the release changes generation-time projection,
35
+ select a timing-enabled test Definition and require its persisted Web estimate:
36
+
37
+ ```bash
38
+ node apps/az8-cli/scripts/smoke-test.js \
39
+ --bin ./tmp/az8-cli-release/install/node_modules/.bin/az8 \
40
+ --env-file ./.env.local \
41
+ --generation-definition-id <timing-enabled-test-definition-id> \
42
+ --require-generation-estimate
43
+ ```
44
+
45
+ When a release changes Text generation, add one bounded Text Workflow to the smoke with a known
46
+ test Definition. This is additive to the image acceptance unless the image path is being diagnosed
47
+ separately:
48
+
49
+ ```bash
50
+ node apps/az8-cli/scripts/smoke-test.js \
51
+ --bin ./tmp/az8-cli-release/install/node_modules/.bin/az8 \
52
+ --env-file ./.env.local \
53
+ --text-generation-definition-id <test-text-definition-id>
54
+ ```
32
55
 
33
56
  Before publishing, also run the test-environment acceptance checklist in the packaged README and the
34
57
  repository-wide `pnpm verify`. Publishing is an external action and requires explicit operator
35
58
  authorization:
36
59
 
60
+ For a preview candidate, publish the exact retained artifact to the preview channel:
61
+
37
62
  ```bash
38
- npm publish ./tmp/az8-cli-release/everfir-az8-cli-0.2.0-preview.5.tgz --tag preview
63
+ npm publish ./tmp/az8-cli-release/everfir-az8-cli-0.3.0-preview.1.tgz --tag preview
39
64
  npm view @everfir/az8-cli dist-tags versions --json
40
65
  ```
41
66
 
42
- Do not pass `--tag latest`. Do not publish from an unverified source directory.
67
+ Publish only the exact retained tarball whose SHA-512 appears in its release verification record.
68
+ Do not publish from an unverified source directory. A later stable promotion uses a new stable
69
+ version and `--tag latest`; it never retags or republishes this immutable preview artifact. If the
70
+ obsolete misspelled `prewview` tag still exists, remove that tag without unpublishing its immutable
71
+ version:
72
+
73
+ ```bash
74
+ npm dist-tag rm @everfir/az8-cli prewview
75
+ npm view @everfir/az8-cli dist-tags --json
76
+ ```
43
77
 
44
78
  ## Rollback
45
79
 
46
- Published versions are immutable. Rollback moves the `preview` tag to a previously verified version
80
+ Published versions are immutable. Rollback moves `latest` to a previously verified stable version
47
81
  instead of unpublishing or overwriting a package:
48
82
 
49
83
  ```bash
50
- npm dist-tag add @everfir/az8-cli@<previous-version> preview
84
+ npm dist-tag add @everfir/az8-cli@<previous-stable-version> latest
51
85
  npm view @everfir/az8-cli dist-tags --json
52
- npm install --global @everfir/az8-cli@preview
86
+ npm install --global @everfir/az8-cli
53
87
  az8 --version
54
88
  ```
55
89