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

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,29 @@
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-preview.4 - 2026-07-22
7
+
8
+ ### Changed
9
+
10
+ - Persistent NDJSON stdio is now the default interaction mode for every Canvas authoring task,
11
+ including a plan containing only one write.
12
+ - One-shot is limited to isolated reads, standalone transfers, explicit caller choice, or hosts that
13
+ genuinely cannot retain a child process; fewer tool calls alone is not a valid reason to use it.
14
+ - The outer repository Skill now requires preview.4 so a newly triggered agent receives this mode
15
+ selection policy.
16
+
17
+ ## 0.2.0-preview.3 - 2026-07-21
18
+
19
+ ### Changed
20
+
21
+ - The built-in Skill now treats credentials as an operator or agent-host provisioning precondition
22
+ and explains inherited environment, default `.env.local`, and explicit `--env-file` resolution.
23
+ - Authentication is verified with a bounded Project read without inspecting, printing, copying, or
24
+ editing the token source.
25
+ - The shell example that could encourage an agent to type a real token into a recorded interaction
26
+ has been removed, and missing or invalid credentials now direct the agent back to secure external
27
+ provisioning.
28
+
6
29
  ## 0.2.0-preview.2 - 2026-07-21
7
30
 
8
31
  ### Added
package/README.md CHANGED
@@ -17,7 +17,7 @@ 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.2.tgz
20
+ npm install --global ./everfir-az8-cli-0.2.0-preview.4.tgz
21
21
  az8 --version
22
22
  ```
23
23
 
@@ -46,15 +46,20 @@ generation inputs.
46
46
 
47
47
  ## Credentials and environment
48
48
 
49
- Use an ignored `.env.local` or process environment:
49
+ Credentials must be provisioned outside the agent's recorded interaction. Use an ignored
50
+ `.env.local`, an explicit env-file path, or an inherited process environment:
50
51
 
51
52
  ```dotenv
52
- AZ8_TOKEN=...
53
+ AZ8_TOKEN=<operator-provisioned-secret>
53
54
  AZ8_ENVIRONMENT=test
54
55
  ```
55
56
 
56
57
  `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
+ value. Without `--env-file`, the CLI searches from the working directory upward for `.env.local`.
59
+ An explicit file is selected by path, for example
60
+ `--environment test --env-file /secure/path/.env.local`. Agents must not read, print, edit, or ask
61
+ users to paste credential contents; verify authentication with a bounded `projects list` read.
62
+ Tokens must not be passed through argv or stdio protocol payloads.
58
63
 
59
64
  ## Project Management
60
65
 
@@ -103,6 +108,10 @@ the agent can verify identities, byte count, MIME, and SHA-256.
103
108
  One-shot commands open a real Canvas client, complete synchronization and hydration, invoke the same
104
109
  query or Operation used by the persistent client, and close after the result is authoritative:
105
110
 
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.
114
+
106
115
  ```bash
107
116
  az8 canvas query <project-id> canvas.summary
108
117
  az8 canvas query <project-id> canvas.detail --view-node-id <view-node-id>
@@ -202,6 +211,10 @@ retried. After any non-success, the agent must decide whether a new invocation i
202
211
 
203
212
  ## Persistent Canvas client
204
213
 
214
+ This is the default mode whenever a task may perform any Canvas write. Open it before the first
215
+ Canvas query, keep capability discovery and all ordered Operations in the same lifecycle, and shut
216
+ it down only after the authoring task is complete.
217
+
205
218
  ```bash
206
219
  az8 canvas open <project-id> --write --format ndjson
207
220
  ```
package/RELEASE.md CHANGED
@@ -35,7 +35,7 @@ repository-wide `pnpm verify`. Publishing is an external action and requires exp
35
35
  authorization:
36
36
 
37
37
  ```bash
38
- npm publish ./tmp/az8-cli-release/everfir-az8-cli-0.2.0-preview.2.tgz --tag preview
38
+ npm publish ./tmp/az8-cli-release/everfir-az8-cli-0.2.0-preview.4.tgz --tag preview
39
39
  npm view @everfir/az8-cli dist-tags versions --json
40
40
  ```
41
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everfir/az8-cli",
3
- "version": "0.2.0-preview.2",
3
+ "version": "0.2.0-preview.4",
4
4
  "description": "Semantic Project Canvas client for AZ8 Studio agents.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -21,8 +21,9 @@ capabilities instead of guessing operation names or input shapes.
21
21
  indeterminate result; do not execute later steps.
22
22
  - Never automatically retry a write. Retry only bounded reads when the returned error says doing so
23
23
  is safe. An idempotency key does not authorize blind replay.
24
- - Keep tokens in the process environment or an ignored env file. Never put a token in argv, an
25
- stdio frame, a prompt, a log, or output.
24
+ - Require the operator or agent host to provision credentials outside the recorded interaction.
25
+ Keep tokens in the inherited process environment or an ignored env file. Never type, read, copy,
26
+ print, or return a token through a shell tool call, argv, stdio frame, prompt, log, or output.
26
27
 
27
28
  ## Concepts
28
29
 
@@ -52,18 +53,41 @@ capabilities instead of guessing operation names or input shapes.
52
53
 
53
54
  ## Bootstrap
54
55
 
55
- 1. Verify the installed client and explicitly choose an environment:
56
+ 1. Verify the installed client without credentials:
56
57
 
57
58
  ```bash
58
59
  az8 --version
59
- export AZ8_ENVIRONMENT=test
60
- export AZ8_TOKEN=...
61
60
  ```
62
61
 
63
- Prefer an ignored `.env.local` when the shell environment is not appropriate. Never print the
64
- token to confirm it.
62
+ 2. Require credentials to be provisioned by the operator or agent host before authenticating. The
63
+ CLI accepts `AZ8_TOKEN` from its inherited process environment or an env file. A provisioned env
64
+ file has this shape, but the agent must not fill the placeholder with a real token in a recorded
65
+ interaction:
65
66
 
66
- 2. Select an existing Project or create a bounded workspace:
67
+ ```dotenv
68
+ AZ8_TOKEN=<operator-provisioned-secret>
69
+ AZ8_ENVIRONMENT=test
70
+ ```
71
+
72
+ With no `--env-file`, the CLI searches for `.env.local` from the working directory upward. An
73
+ explicit file may live elsewhere and is selected only by path:
74
+
75
+ ```bash
76
+ az8 projects list --scope owned --page-size 1 \
77
+ --environment test --env-file /secure/path/.env.local
78
+ ```
79
+
80
+ Use the authenticated read as the credential check. Never verify a token with `cat`, `sed`,
81
+ `grep`, `env`, `printenv`, `echo`, shell tracing, or by reading the env file through another
82
+ tool. Do not create, edit, move, or delete a credential file unless the operator explicitly asks
83
+ through a secure provisioning workflow. Keep it outside version control with owner-only access.
84
+
85
+ The inherited process environment overrides env-file values; `--environment` overrides
86
+ `AZ8_ENVIRONMENT`. Always pass or provision the intended environment explicitly. If the CLI
87
+ reports a missing token or authentication failure, stop and ask the operator to provision or
88
+ replace it outside the conversation. Never ask them to paste the secret into chat.
89
+
90
+ 3. Select an existing Project or create a bounded workspace:
67
91
 
68
92
  ```bash
69
93
  az8 projects list --scope owned
@@ -73,7 +97,7 @@ capabilities instead of guessing operation names or input shapes.
73
97
 
74
98
  Retain the returned Project ID. Confirm the authenticated role before assuming write access.
75
99
 
76
- 3. Discover the effective surface for that Project:
100
+ 4. Discover the effective surface for that Project:
77
101
 
78
102
  ```bash
79
103
  az8 canvas query <project-id> capabilities.summary
@@ -85,32 +109,23 @@ capabilities instead of guessing operation names or input shapes.
85
109
  Schema, `effect`, `history`, `completion`, and `retry`. Availability is filtered by the current
86
110
  account, Project role, upstream services, and CLI version. Do not rely on remembered schemas.
87
111
 
88
- 4. Use `canvas.detail` only when exact node geometry, Draft, status, or bindings are needed:
112
+ 5. Use `canvas.detail` only when exact node geometry, Draft, status, or bindings are needed:
89
113
 
90
114
  ```bash
91
115
  az8 canvas query <project-id> canvas.detail --view-node-id <view-node-id>
92
116
  ```
93
117
 
94
- 5. Choose one-shot for independent tasks and persistent stdio for a collaborative session. Finish
95
- by inspecting the affected View Nodes or Workflow Run rather than trusting visual assumptions.
118
+ 6. If the task may perform any Canvas write, open one persistent stdio client before the first
119
+ Canvas read or write and retain it through the authoring session. Use one-shot only under the
120
+ explicit exceptions below. Finish by inspecting the affected View Nodes or Workflow Run rather
121
+ than trusting visual assumptions.
96
122
 
97
123
  ## Interaction modes
98
124
 
99
- Use one-shot commands for a self-contained query, write, upload, or download:
100
-
101
- ```bash
102
- printf '%s\n' '{"text":"Idea","position":{"x":160,"y":160}}' |
103
- az8 canvas operation <project-id> createNote --input-stdin --request-id create-note-1
104
- ```
105
-
106
- - Supply Operation input through exactly one of `--input-stdin`, `--input-file`, or `--input-json`.
107
- - Give every write attempt a meaningful unique `--request-id` and retain its returned Receipt.
108
- - Each invocation opens, hydrates, executes, and closes a real Canvas client.
109
- - One-shot processes do not preserve local History, Receipt Log, Awareness, or request replay.
110
- Therefore `undo`, `redo`, `receipts.summary`, and `receipt.detail` require persistent stdio.
111
-
112
- Use persistent stdio when multiple ordered interactions, live synchronization, History, Receipt
113
- lookup, observations, or human collaboration matter:
125
+ Default to persistent stdio for Canvas authoring. A one-write plan still uses persistent stdio. This
126
+ is the normal mode whenever a task may create, edit, move, organize, remove, undo, generate, import,
127
+ or upload Canvas content. Open the client once, use it for capability discovery and subsequent reads
128
+ and Operations, observe concurrent changes, and shut it down only after the Canvas task is complete:
114
129
 
115
130
  ```bash
116
131
  az8 canvas open <project-id> --write --format ndjson
@@ -129,6 +144,24 @@ az8 canvas open <project-id> --write --format ndjson
129
144
  Protocol truth is written to stdout. stderr contains diagnostics only. Unknown optional fields are
130
145
  additive; ignore them. Do not treat a process exit code as the result of the last persistent request.
131
146
 
147
+ Use one-shot only for:
148
+
149
+ - an isolated read when no Canvas write is planned;
150
+ - a standalone media download;
151
+ - an explicitly standalone upload/import whose caller does not want an ongoing authoring session;
152
+ - an explicit user request for one-shot behavior; or
153
+ - a host that genuinely cannot retain a child process and write later NDJSON to its stdin.
154
+
155
+ Do not choose one-shot merely because the current plan has one write or because it requires fewer
156
+ tool calls. Codex and other hosts with retained process sessions can use persistent stdio. If a host
157
+ limitation forces fallback, disclose that the client will not preserve local History, Receipt Log,
158
+ Awareness, observations, or request replay across invocations.
159
+
160
+ For a permitted one-shot call, supply Operation input through exactly one of `--input-stdin`,
161
+ `--input-file`, or `--input-json`, give every write a meaningful unique `--request-id`, and retain its
162
+ returned Receipt. `undo`, `redo`, `receipts.summary`, and `receipt.detail` are never available across
163
+ one-shot processes.
164
+
132
165
  ## Canvas SOP
133
166
 
134
167
  1. Query `canvas.summary`; query selected details only as needed.
@@ -178,7 +211,9 @@ claim actual credit consumption from an estimate.
178
211
 
179
212
  ## Media
180
213
 
181
- For a local image, video, or audio file, use the semantic upload wrapper:
214
+ Within an active persistent authoring session, invoke the discovered `uploadMedia` Operation so the
215
+ write shares that client lifecycle. For an explicitly standalone local image, video, or audio
216
+ transfer, use the semantic one-shot upload wrapper:
182
217
 
183
218
  ```bash
184
219
  az8 canvas upload <project-id> \
@@ -248,6 +283,8 @@ Never:
248
283
  conclude that an Awareness event persisted data;
249
284
  - expose a token, presigned URL, permanent media URL, env-file contents, or private output in logs
250
285
  or protocol payloads;
286
+ - inspect, print, or edit an operator-provisioned credential source merely to check whether it
287
+ exists; authenticate with a bounded read instead;
251
288
  - use awareness client names to impersonate persisted authors or treat Attention Cursor position as
252
289
  authority;
253
290
  - use one-shot as if it retained History, Receipts, replay state, observations, or presence;