arcane-cli 1.18.0 → 1.19.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/README.md CHANGED
@@ -275,16 +275,17 @@ The shape is the JSON Schema at [`src/assets/schemas/state.schema.json`](src/ass
275
275
 
276
276
  ### Presence
277
277
 
278
- `spell presence` is an optional, local presence channel: which session is working on what, right now, and whether it is waiting for you ([ARC-060](DECISIONS.md#arc-060--the-presence-channel-one-package-behind-spell-presence-a-loopback-contract-checkout-keyed-sessions-and-a-prompt-driven-reporting-convention); working name `arcane-mcp`). You start the service; nothing listens until you do. It binds `127.0.0.1` only, keeps sessions in memory only (stale after 90 s without a report, dropped after 24 h), writes nothing but its token and `server.json` under `~/.arcane/presence/`, and never writes a repository file. It is observation only: everything it holds is reconstructable from `spell state --json`, and no route, tool or event steers a session. Spells report through it with one fragment in `spell-open-session`, `spell-close-session`, `spell-commit-work` and `spell-implement`; with no service running they behave exactly as before.
278
+ `spell presence` is an optional, local presence channel: which session is working on what, right now, and whether it is waiting for you ([ARC-060](DECISIONS.md#arc-060--the-presence-channel-one-package-behind-spell-presence-a-loopback-contract-checkout-keyed-sessions-and-a-prompt-driven-reporting-convention); working name `arcane-mcp`). You start the service; nothing listens until you do. It binds `127.0.0.1` only, keeps sessions in memory only (stale after 90 s without a report, dropped after 24 h), writes nothing but its token and `server.json` under `~/.arcane/presence/`, and never writes a repository file. It is observation only: everything it holds is reconstructable from `spell state --json`, and no route, tool or event steers a session. Spells report through it with one fragment in `spell-open-session`, `spell-close-session`, `spell-commit-work` and `spell-implement`, and every spell's "Needs you" block reports `waiting` with its lines; with no service running they behave exactly as before. `spell-open-session` also lists the sessions reporting from the repository's other checkouts, and `spell doctor` has a "Presence service" row (`--fix` removes a `server.json` left by a service that is gone).
279
279
 
280
280
  | Command | What it does |
281
281
  | --- | --- |
282
282
  | `spell presence serve [--port <n>] [--rotate]` | Runs the service in the foreground on `127.0.0.1` (port 27226, or `ARCANE_PRESENCE_PORT`) until Ctrl+C. `--rotate` replaces the token |
283
283
  | `spell presence status` | Exit 0 when the service answers this machine's token, 1 otherwise |
284
+ | `spell presence sessions [--json]` | The sessions the service holds, as a table or as the `GET /v0/sessions` document; exit 1 when no channel answers |
284
285
  | `spell presence stop` | Stops the recorded service; exit 0 either way |
285
286
  | `spell presence report --status <s> [--task ...] [--needs-you ...]` | Reports this checkout's session; silent and exit 0 with no service, never blocks |
286
287
  | `spell presence end` | Ends this checkout's session |
287
- | `spell presence mcp` | The same channel as an MCP server over stdio: tools `presence_report` and `presence_end`, resources `arcane://presence/sessions` and `arcane://presence/capabilities` |
288
+ | `spell presence mcp` | The same channel as an MCP server over stdio: tools `presence_report` and `presence_end`, resources `arcane://presence/sessions` and `arcane://presence/capabilities`, with update notifications on the sessions resource (`subscriptions/listen` on MCP 2026-07-28, `resources/subscribe` on earlier revisions) |
288
289
 
289
290
  **The token** is `~/.arcane/presence/token` (`0600` in a `0700` directory; restricted to your account on Windows). A subscriber that cannot read the file, such as a dashboard's server, gets it from the `ARCANE_PRESENCE_TOKEN` environment variable instead. No command takes a token as an argument. **Remote access** is only ever a tunnel you put in front of the loopback port, with the token still required. The contract is HTTP plus server-sent events under `/v0/`; its JSON Schema is [`src/assets/schemas/presence.schema.json`](src/assets/schemas/presence.schema.json) (`$id` `https://arcaneai.net/schemas/presence/v0`), shipped as `dist/assets/schemas/presence.schema.json`.
290
291
 
@@ -11,4 +11,5 @@
11
11
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
12
12
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
13
13
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
14
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
14
15
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
@@ -130,6 +130,7 @@ Resolve threads via the provider:
130
130
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
131
131
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
132
132
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
133
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
133
134
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
134
135
  <!-- fragment:needs-you:end -->
135
136
 
@@ -149,6 +149,7 @@ Hard rules for this phase:
149
149
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
150
150
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
151
151
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
152
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
152
153
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
153
154
  <!-- fragment:needs-you:end -->
154
155
 
@@ -401,6 +401,7 @@ questionnaire, uploading documents, paying a fee, phoning Apple — are required
401
401
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
402
402
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
403
403
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
404
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
404
405
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
405
406
  <!-- fragment:needs-you:end -->
406
407
 
@@ -125,6 +125,7 @@ Workflow:
125
125
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
126
126
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
127
127
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
128
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
128
129
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
129
130
  <!-- fragment:needs-you:end -->
130
131
 
@@ -268,6 +268,7 @@ Output format:
268
268
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
269
269
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
270
270
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
271
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
271
272
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
272
273
  <!-- fragment:needs-you:end -->
273
274
 
@@ -297,6 +297,7 @@ Output format after execution:
297
297
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
298
298
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
299
299
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
300
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
300
301
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
301
302
  <!-- fragment:needs-you:end -->
302
303
 
@@ -238,6 +238,7 @@ so they need no edit.
238
238
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
239
239
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
240
240
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
241
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
241
242
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
242
243
  <!-- fragment:needs-you:end -->
243
244
 
@@ -479,6 +479,7 @@ release — are required operator actions:
479
479
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
480
480
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
481
481
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
482
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
482
483
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
483
484
  <!-- fragment:needs-you:end -->
484
485
 
@@ -200,6 +200,7 @@ Execute the `spell-ship` workflow:
200
200
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
201
201
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
202
202
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
203
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
203
204
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
204
205
  <!-- fragment:needs-you:end -->
205
206
 
@@ -265,6 +265,7 @@ just because nothing threw an error.
265
265
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
266
266
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
267
267
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
268
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
268
269
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
269
270
  <!-- fragment:needs-you:end -->
270
271
 
@@ -127,6 +127,7 @@ Then produce output in this exact structure:
127
127
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
128
128
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
129
129
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
130
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
130
131
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
131
132
  <!-- fragment:needs-you:end -->
132
133
 
@@ -145,6 +146,7 @@ Before anything else, check:
145
146
  - **Otherwise** → **primary checkout on a session branch** (R2). This is the default and it is deliberately the do-nothing path: one actor, one checkout, no new tooling.
146
147
  - **Footprint overlap overrides the choice (R4).** If this session's work touches the same files or the same shared sequence (migration numbers, generated indexes, lockfiles) as work already running in another primitive, do **not** isolate it — serialize instead: wait, or re-scope to a disjoint footprint first. Isolation does not prevent those collisions, it hides them until merge review.
147
148
  - Working in a linked worktree changes two things later in the session and nothing else: `spell-close-session` must not check out `main` (see git-conventions.md's Post-Merge Cleanup section), and the worktree contains no untracked tooling state — budget for `npm install` or equivalent in a code repo. Branch naming, attribution, and the PR gate are identical from every primitive (R8).
149
+ - **Live sessions in this repository's other checkouts (presence):** run `spell presence sessions --json`; when it exits 0, list each session whose `repository.root` is this repository's root and whose `checkout.path` is not this checkout (its path, branch, status, task and `agent.slug`), so the footprint rule (R4 above) weighs work that is running now and not only the worktree list; when it exits 1, no presence channel is configured and this bullet adds nothing to the output.
148
150
  - **Session branch naming compliance:** judge the current branch against the branch-naming rule (Mutation Guard section above), including a branch a worktree or a parallel subagent created:
149
151
  - If it is noncompliant and no active PR depends on it, record the required rename for the Mutation Guard. Do not rename during a read-only session.
150
152
  - If an active PR uses the old branch name, do not force-delete the old remote branch; flag it and continue with a follow-up rename plan.
@@ -286,6 +286,7 @@ Every report the orchestrator ends a turn with leads with the ledger, then what
286
286
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
287
287
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
288
288
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
289
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
289
290
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
290
291
  <!-- fragment:needs-you:end -->
291
292
 
@@ -168,6 +168,7 @@ Workflow:
168
168
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
169
169
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
170
170
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
171
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
171
172
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
172
173
  <!-- fragment:needs-you:end -->
173
174
 
@@ -119,6 +119,7 @@ collide, but a PR title inserted verbatim as a label could).
119
119
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
120
120
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
121
121
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
122
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
122
123
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
123
124
  <!-- fragment:needs-you:end -->
124
125
 
@@ -136,6 +136,7 @@ Workflow:
136
136
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
137
137
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
138
138
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
139
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
139
140
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
140
141
  <!-- fragment:needs-you:end -->
141
142
 
@@ -266,6 +266,7 @@ If `external_provider=jira` or `external_provider=other`, add explicit TODOs in
266
266
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
267
267
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
268
268
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
269
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
269
270
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
270
271
  <!-- fragment:needs-you:end -->
271
272
 
@@ -111,6 +111,7 @@ Workflow:
111
111
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
112
112
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
113
113
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
114
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
114
115
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
115
116
  <!-- fragment:needs-you:end -->
116
117
 
@@ -186,6 +186,7 @@ report the discrepancy rather than declaring the sync done.
186
186
  - **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
187
187
  - **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
188
188
  - **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
189
+ - **Report it to the presence channel.** When the block is not empty, also run `spell presence report --status waiting --needs-you "<line 1>" --needs-you "<line 2>"`, one flag per line of the block; with no presence channel configured on this machine the command prints nothing and exits 0, so the block itself and the rest of the run are unchanged.
189
190
  - Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
190
191
  <!-- fragment:needs-you:end -->
191
192