@everfir/az8-cli 0.2.0-preview.5 → 0.2.0

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,27 @@
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
+ ## 0.2.0 - 2026-07-22
7
+
8
+ First stable semantic Project Canvas client for agents.
9
+
10
+ ### Added
11
+
12
+ - Project management, persistent NDJSON Canvas collaboration, one-shot compatibility wrappers,
13
+ semantic note and hierarchy authoring, Core Node generation, Workflow observation, and safe local
14
+ media upload/download.
15
+ - A runtime-discoverable built-in agent Skill covering platform concepts, capability discovery,
16
+ persistent request/process lifecycle, generation sequencing, recovery, and prohibited bypasses.
17
+
18
+ ### Stability contract
19
+
20
+ - Public Canvas writes remain available only through semantic Operations and internal Commands;
21
+ callers cannot write raw backend, Yjs, Core Node, or Project Content data.
22
+ - Protocol `1.0`, ordered request/Receipt behavior, authenticated presence, no automatic write retry,
23
+ and explicit deferred scopes form the initial stable compatibility boundary.
24
+ - 3D World, Asset aggregate management, automatic layout, media replacement, and batch upload remain
25
+ intentionally deferred rather than partially exposed.
26
+
6
27
  ## 0.2.0-preview.5 - 2026-07-22
7
28
 
8
29
  ### Changed
package/README.md CHANGED
@@ -3,12 +3,12 @@
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 20 or newer. Install the stable channel from the configured npm registry:
9
9
 
10
10
  ```bash
11
- npm install --global @everfir/az8-cli@preview
11
+ npm install --global @everfir/az8-cli
12
12
  az8 --version
13
13
  az8 help
14
14
  az8 guide
@@ -17,12 +17,12 @@ az8 guide
17
17
  For a supplied release artifact, install the exact immutable tarball instead:
18
18
 
19
19
  ```bash
20
- npm install --global ./everfir-az8-cli-0.2.0-preview.5.tgz
20
+ npm install --global ./everfir-az8-cli-0.2.0.tgz
21
21
  az8 --version
22
22
  ```
23
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.
24
+ `az8 --version` must report the version selected for the agent environment. Pin an exact version or
25
+ tarball for reproducible agent runs.
26
26
 
27
27
  ## Built-in agent Skill
28
28
 
@@ -349,9 +349,9 @@ Every output frame has `protocolVersion`, monotonic `streamSeq`, `type`, `payloa
349
349
  after collaboration-server acknowledgement. A timeout or lost acknowledgement is indeterminate,
350
350
  moves the Canvas context offline, and requires explicit reconnect and inspection before any retry.
351
351
 
352
- ## Preview acceptance checklist
352
+ ## Release acceptance checklist
353
353
 
354
- Before distributing a preview tarball, verify all of the following from its clean installation, not
354
+ Before distributing a release tarball, verify all of the following from its clean installation, not
355
355
  from TypeScript source:
356
356
 
357
357
  1. `az8 --version` matches the immutable package version; `az8 help` lists the built-in guide,
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,9 +12,11 @@ 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
22
  reuses an explicit test Project, starts one image generation, and uploads one tiny PNG:
@@ -28,28 +30,45 @@ node apps/az8-cli/scripts/smoke-test.js \
28
30
  The smoke report must show authenticated persistent stdio, ordered shutdown, a completed Workflow
29
31
  Run whose target resolves its output Core Node, upload replay without another transfer, and matching
30
32
  download SHA-256. `--skip-generation` is only for diagnosing unrelated media or transport checks;
31
- it cannot satisfy full release acceptance.
33
+ it cannot satisfy full release acceptance. When the release changes generation-time projection,
34
+ select a timing-enabled test Definition and require its persisted Web estimate:
35
+
36
+ ```bash
37
+ node apps/az8-cli/scripts/smoke-test.js \
38
+ --bin ./tmp/az8-cli-release/install/node_modules/.bin/az8 \
39
+ --env-file ./.env.local \
40
+ --generation-definition-id <timing-enabled-test-definition-id> \
41
+ --require-generation-estimate
42
+ ```
32
43
 
33
44
  Before publishing, also run the test-environment acceptance checklist in the packaged README and the
34
45
  repository-wide `pnpm verify`. Publishing is an external action and requires explicit operator
35
46
  authorization:
36
47
 
37
48
  ```bash
38
- npm publish ./tmp/az8-cli-release/everfir-az8-cli-0.2.0-preview.5.tgz --tag preview
49
+ npm publish ./tmp/az8-cli-release/everfir-az8-cli-0.2.0.tgz --tag latest
39
50
  npm view @everfir/az8-cli dist-tags versions --json
40
51
  ```
41
52
 
42
- Do not pass `--tag latest`. Do not publish from an unverified source directory.
53
+ Publish only the exact retained tarball whose SHA-512 appears in the stable release verification
54
+ record. Do not publish from an unverified source directory. If the obsolete misspelled `prewview`
55
+ tag still exists after stable publication, remove that tag without unpublishing its immutable
56
+ version:
57
+
58
+ ```bash
59
+ npm dist-tag rm @everfir/az8-cli prewview
60
+ npm view @everfir/az8-cli dist-tags --json
61
+ ```
43
62
 
44
63
  ## Rollback
45
64
 
46
- Published versions are immutable. Rollback moves the `preview` tag to a previously verified version
65
+ Published versions are immutable. Rollback moves `latest` to a previously verified stable version
47
66
  instead of unpublishing or overwriting a package:
48
67
 
49
68
  ```bash
50
- npm dist-tag add @everfir/az8-cli@<previous-version> preview
69
+ npm dist-tag add @everfir/az8-cli@<previous-stable-version> latest
51
70
  npm view @everfir/az8-cli dist-tags --json
52
- npm install --global @everfir/az8-cli@preview
71
+ npm install --global @everfir/az8-cli
53
72
  az8 --version
54
73
  ```
55
74
 
package/dist/main.js CHANGED
@@ -13600,10 +13600,7 @@ var HocuspocusProjectCanvasDocumentImplementation = class {
13600
13600
  this.setAwarenessFields({
13601
13601
  cursor: input.cursor,
13602
13602
  updatedAt: Date.now(),
13603
- view: {
13604
- kind: "canvas",
13605
- ...input.selection ? { selection: input.selection } : {}
13606
- }
13603
+ view: { kind: "canvas" }
13607
13604
  });
13608
13605
  }
13609
13606
  getAwareness() {
@@ -15937,6 +15934,7 @@ var CoreNodeCreativeLoop = class {
15937
15934
  prepared,
15938
15935
  timeoutMs
15939
15936
  });
15937
+ const submittedAt = this.context.now();
15940
15938
  const run = await this.systems.workflowRuntime.startRun({
15941
15939
  definitionId: definition.id,
15942
15940
  expectedCost: estimate.estimatedCost,
@@ -15954,11 +15952,13 @@ var CoreNodeCreativeLoop = class {
15954
15952
  runtime: {
15955
15953
  expectedCost: estimate.estimatedCost,
15956
15954
  expectedDefinitionVersion: estimate.definitionVersion,
15955
+ ...createEstimatedCompletionTimes(estimate, submittedAt),
15957
15956
  instanceIds: [run.id],
15958
15957
  materializedInputs: materialized.materializedInputs,
15959
15958
  originClientId: this.context.clientInstanceId,
15960
- submittedAt: timestamp
15961
- }
15959
+ submittedAt
15960
+ },
15961
+ updatedAt: timestamp
15962
15962
  };
15963
15963
  const { creationIntent: _creationIntent, ...data } = asRecord3(target.data);
15964
15964
  const after = {
@@ -16245,6 +16245,28 @@ var CoreNodeCreativeLoop = class {
16245
16245
  };
16246
16246
  }
16247
16247
  };
16248
+ function createEstimatedCompletionTimes(estimate, submittedAt) {
16249
+ const ranges = estimate.executionTimeRanges;
16250
+ if (!ranges?.length)
16251
+ return {};
16252
+ let medianSeconds = 0;
16253
+ let maxSeconds = 0;
16254
+ let validRangeCount = 0;
16255
+ for (const range of ranges) {
16256
+ if (!Number.isFinite(range.medianSeconds) || range.medianSeconds < 0 || !Number.isFinite(range.maxSeconds) || range.maxSeconds < 0) {
16257
+ continue;
16258
+ }
16259
+ medianSeconds += range.medianSeconds;
16260
+ maxSeconds += range.maxSeconds;
16261
+ validRangeCount += 1;
16262
+ }
16263
+ if (validRangeCount === 0)
16264
+ return {};
16265
+ return {
16266
+ estimatedMaxCompletionAt: submittedAt + maxSeconds * 1e3,
16267
+ estimatedMedianCompletionAt: submittedAt + medianSeconds * 1e3
16268
+ };
16269
+ }
16248
16270
  function attention(viewNodeId, result3) {
16249
16271
  return { attention: { kind: "view-nodes", viewNodeIds: [viewNodeId] }, result: result3 };
16250
16272
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everfir/az8-cli",
3
- "version": "0.2.0-preview.5",
3
+ "version": "0.2.0",
4
4
  "description": "Semantic Project Canvas client for AZ8 Studio agents.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -16,20 +16,21 @@
16
16
  "main": "./dist/main.js",
17
17
  "publishConfig": {
18
18
  "access": "public",
19
- "tag": "preview"
19
+ "tag": "latest"
20
20
  },
21
21
  "scripts": {
22
- "build": "rm -rf dist && esbuild src/main.ts --bundle --platform=node --format=esm --target=node20 --banner:js='import { createRequire } from \"node:module\"; const require = createRequire(import.meta.url);' --outfile=dist/main.js",
22
+ "build": "pnpm build:dependencies && rm -rf dist && esbuild src/main.ts --bundle --platform=node --format=esm --target=node20 --banner:js='import { createRequire } from \"node:module\"; const require = createRequire(import.meta.url);' --outfile=dist/main.js",
23
+ "build:dependencies": "pnpm --filter @everfir/az8-cli^... build",
23
24
  "dev": "tsx src/main.ts",
24
25
  "start": "node dist/main.js",
25
26
  "typecheck": "tsc -p tsconfig.json --noEmit",
26
27
  "lint": "biome check .",
27
28
  "prepack": "pnpm build",
28
29
  "prepublishOnly": "pnpm release:check",
29
- "release:check": "pnpm test && pnpm typecheck && node scripts/verify-package.js",
30
+ "release:check": "pnpm build:dependencies && pnpm test && pnpm typecheck && node scripts/verify-package.js",
30
31
  "release:pack": "node scripts/verify-package.js --output-dir ../../tmp/az8-cli-release --keep-install",
31
32
  "release:smoke": "node scripts/smoke-test.js",
32
- "test": "tsx --tsconfig tsconfig.test.json --test src/**/*.test.ts"
33
+ "test": "tsx --tsconfig tsconfig.test.json --test src/**/*.test.ts && node --test scripts/*.test.js"
33
34
  },
34
35
  "devDependencies": {
35
36
  "@types/node": "^25.5.0",
@@ -150,6 +150,24 @@ the authenticated user display name first.
150
150
  Protocol truth is written to stdout. stderr contains diagnostics only. Unknown optional fields are
151
151
  additive; ignore them. Do not treat a process exit code as the result of the last persistent request.
152
152
 
153
+ Treat the persistent process lifetime and each request lifetime separately:
154
+
155
+ - Keep the process running between requests. Decide request completion only from the matching
156
+ `requestId` and its `requestCompleted` or `requestFailed` frame; never wait for process exit.
157
+ - Treat `requestAccepted` as admission only. For a write, wait for its terminal Receipt before
158
+ issuing the next query or Operation.
159
+ - Continuously drain and parse stdout, but do not repeatedly poll an idle process merely to make it
160
+ produce output. No new frame is a normal healthy state when no lifecycle, request, Canvas, or
161
+ Workflow fact changed.
162
+ - Do not interpret a shell/agent-host read window ending with no output (for example, a 30-second
163
+ terminal yield) as CLI latency, request timeout, or connection failure. Check request terminal
164
+ frames and lifecycle/health facts instead.
165
+ - Keep one connected client for related work. Reopening one-shot clients repeatedly pays connection,
166
+ synchronization, and hydration cost each time and loses local History, Receipts, and presence.
167
+ - Remember that the current persistent protocol processes requests serially. A long
168
+ `waitWorkflowRun` occupies the request lane until the Run becomes terminal or its observation
169
+ window ends; submit it only when no other request needs that lane.
170
+
153
171
  Use one-shot only for:
154
172
 
155
173
  - an isolated read when no Canvas write is planned;
@@ -201,10 +219,15 @@ Generation is an explicit sequence, never one transaction:
201
219
  current facts. Stop after the first non-success.
202
220
  5. `startGeneration` succeeds when the Workflow Run is accepted and immediate Canvas effects are
203
221
  acknowledged. This completes the start interaction; it does not mean generation finished.
204
- 6. Retain the Workflow Run ID. Use `waitWorkflowRun` when waiting is useful, or `getWorkflowRun`
205
- later. An observation-window timeout while the authoritative Run remains pending/running is an
206
- ordinary read outcome and does not cancel the Run or take a healthy context offline.
207
- 7. On terminal success, query the target detail and resolve its current output Core Node through
222
+ 6. Retain the Workflow Run ID. After the successful start Receipt, continue any work that does not
223
+ require the generated output. Prefer `workflowChanged` observations while the persistent client
224
+ is active, and use `getWorkflowRun` at a meaningful later checkpoint.
225
+ 7. Use `waitWorkflowRun` only when the next step actually requires terminal output and the current
226
+ request lane can remain dedicated to waiting. Choose one intentional observation window; do not
227
+ emulate polling with repeated short waits. An observation-window timeout while the authoritative
228
+ Run remains pending/running is an ordinary read outcome and does not cancel the Run or take a
229
+ healthy context offline.
230
+ 8. On terminal success, query the target detail and resolve its current output Core Node through
208
231
  Project Content before downloading or placing it elsewhere.
209
232
 
210
233
  Workflow Definitions change over time. Query `workflowDefinitions.summary`, then