agents-can-communicate 0.7.1 → 0.8.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.
Files changed (105) hide show
  1. package/README.md +3 -1
  2. package/bin/entrypoints/acc-bootstrap.mjs +6 -48
  3. package/bin/entrypoints/acc-claude-channel.mjs +47 -157
  4. package/bin/entrypoints/acc-mcp.mjs +0 -1
  5. package/bin/entrypoints/acc.mjs +0 -1
  6. package/docs/ADAPTER_AUTHORING.md +74 -24
  7. package/docs/ARCHITECTURE.md +31 -18
  8. package/docs/CAPABILITIES.md +38 -25
  9. package/docs/CLI.md +51 -13
  10. package/docs/CONCEPTS.md +5 -4
  11. package/docs/CONFIGURATION.md +18 -11
  12. package/docs/GETTING_STARTED.md +15 -12
  13. package/docs/GLOSSARY.md +2 -1
  14. package/docs/HOW_IT_WORKS.md +8 -4
  15. package/docs/PROTOCOL.md +25 -6
  16. package/docs/RELEASING.md +8 -5
  17. package/docs/SECURITY_MODEL.md +14 -1
  18. package/docs/TROUBLESHOOTING.md +66 -29
  19. package/docs/UPGRADING.md +49 -8
  20. package/docs/WHY_ACC.md +5 -3
  21. package/node_modules/@agents-can-communicate/adapter-antigravity/package.json +1 -1
  22. package/node_modules/@agents-can-communicate/adapter-antigravity/plugin/plugin.json +1 -1
  23. package/node_modules/@agents-can-communicate/adapter-antigravity/src/adapter.mjs +2 -3
  24. package/node_modules/@agents-can-communicate/adapter-claude-code/certification.json +14 -73
  25. package/node_modules/@agents-can-communicate/adapter-claude-code/fixtures/certification-provenance.json +29 -71
  26. package/node_modules/@agents-can-communicate/adapter-claude-code/fixtures/delivery/claude-code-2.1.282-product-evidence.json +161 -0
  27. package/node_modules/@agents-can-communicate/adapter-claude-code/fixtures/delivery/claude-code-2.1.282.json +28 -0
  28. package/node_modules/@agents-can-communicate/adapter-claude-code/fixtures/inbox-wake-2.1.282.json +44 -0
  29. package/node_modules/@agents-can-communicate/adapter-claude-code/package.json +5 -2
  30. package/node_modules/@agents-can-communicate/adapter-claude-code/src/adapter.mjs +26 -30
  31. package/node_modules/@agents-can-communicate/adapter-claude-code/src/hooks.mjs +6 -0
  32. package/node_modules/@agents-can-communicate/adapter-claude-code/src/inbox-contract.mjs +10 -0
  33. package/node_modules/@agents-can-communicate/adapter-claude-code/src/inbox-delivery.mjs +249 -0
  34. package/node_modules/@agents-can-communicate/adapter-claude-code/src/inbox-endpoint.mjs +166 -0
  35. package/node_modules/@agents-can-communicate/adapter-claude-code/src/inbox-registry.mjs +71 -0
  36. package/node_modules/@agents-can-communicate/adapter-claude-code/src/inbox-settings.mjs +109 -0
  37. package/node_modules/@agents-can-communicate/adapter-claude-code/src/install.mjs +25 -31
  38. package/node_modules/@agents-can-communicate/adapter-codex/package.json +1 -1
  39. package/node_modules/@agents-can-communicate/adapter-codex/src/adapter.mjs +3 -4
  40. package/node_modules/@agents-can-communicate/adapter-codex/src/app-server-client.mjs +10 -13
  41. package/node_modules/@agents-can-communicate/adapter-codex/src/live-permissions.mjs +5 -5
  42. package/node_modules/@agents-can-communicate/adapter-codex/src/maintenance-host.mjs +46 -10
  43. package/node_modules/@agents-can-communicate/adapter-codex/src/maintenance.mjs +5 -7
  44. package/node_modules/@agents-can-communicate/adapter-codex/src/native-delivery.mjs +16 -12
  45. package/node_modules/@agents-can-communicate/adapter-codex/src/native-endpoint.mjs +12 -2
  46. package/node_modules/@agents-can-communicate/adapter-codex/src/service-setup.mjs +26 -9
  47. package/node_modules/@agents-can-communicate/adapter-codex/src/ws-json-rpc.mjs +12 -0
  48. package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/gemini-extension.json +1 -1
  49. package/node_modules/@agents-can-communicate/adapter-gemini-cli/package.json +1 -1
  50. package/node_modules/@agents-can-communicate/adapter-grok/package.json +1 -1
  51. package/node_modules/@agents-can-communicate/adapter-kimi/package.json +1 -1
  52. package/node_modules/@agents-can-communicate/adapter-sdk/package.json +1 -1
  53. package/node_modules/@agents-can-communicate/adapter-sdk/src/certification.mjs +2 -2
  54. package/node_modules/@agents-can-communicate/adapter-sdk/src/events.mjs +16 -3
  55. package/node_modules/@agents-can-communicate/adapter-sdk/src/hook-shim.mjs +4 -3
  56. package/node_modules/@agents-can-communicate/adapter-sdk/src/index.mjs +4 -3
  57. package/node_modules/@agents-can-communicate/adapter-sdk/src/native-activation.mjs +4 -14
  58. package/node_modules/@agents-can-communicate/adapter-sdk/src/native-delivery.mjs +104 -84
  59. package/node_modules/@agents-can-communicate/adapter-sdk/src/native-vocabulary.mjs +8 -4
  60. package/node_modules/@agents-can-communicate/cli/package.json +1 -1
  61. package/node_modules/@agents-can-communicate/cli/src/doctor-command.mjs +8 -6
  62. package/node_modules/@agents-can-communicate/cli/src/install-command.mjs +8 -23
  63. package/node_modules/@agents-can-communicate/cli/src/install-delivery-consent.mjs +3 -4
  64. package/node_modules/@agents-can-communicate/cli/src/main.mjs +24 -3
  65. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/entry.mjs +7 -43
  66. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/launchers.mjs +5 -3
  67. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/maintenance.mjs +9 -15
  68. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/pins.mjs +13 -4
  69. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/refresh.mjs +3 -4
  70. package/node_modules/@agents-can-communicate/cli/src/native-delivery-status.mjs +2 -2
  71. package/node_modules/@agents-can-communicate/core/package.json +1 -1
  72. package/node_modules/@agents-can-communicate/core/src/receipts.mjs +17 -2
  73. package/node_modules/@agents-can-communicate/core/src/sessions.mjs +25 -2
  74. package/node_modules/@agents-can-communicate/core/src/status.mjs +31 -1
  75. package/node_modules/@agents-can-communicate/delivery-router/package.json +1 -1
  76. package/node_modules/@agents-can-communicate/delivery-router/src/refresh-binding.mjs +2 -2
  77. package/node_modules/@agents-can-communicate/delivery-router/src/router.mjs +33 -48
  78. package/node_modules/@agents-can-communicate/hook-runner/package.json +1 -1
  79. package/node_modules/@agents-can-communicate/hook-runner/src/client-pid.mjs +30 -1
  80. package/node_modules/@agents-can-communicate/hook-runner/src/native-attempt.mjs +6 -8
  81. package/node_modules/@agents-can-communicate/hook-runner/src/native-binding.mjs +27 -15
  82. package/node_modules/@agents-can-communicate/hook-runner/src/process-table.mjs +30 -14
  83. package/node_modules/@agents-can-communicate/hook-runner/src/runner.mjs +4 -2
  84. package/node_modules/@agents-can-communicate/installer/package.json +1 -1
  85. package/node_modules/@agents-can-communicate/installer/src/apply.mjs +19 -5
  86. package/node_modules/@agents-can-communicate/installer/src/delivery-diagnostics.mjs +0 -2
  87. package/node_modules/@agents-can-communicate/installer/src/detect.mjs +6 -11
  88. package/node_modules/@agents-can-communicate/installer/src/index.mjs +4 -7
  89. package/node_modules/@agents-can-communicate/installer/src/native-activation.mjs +23 -61
  90. package/node_modules/@agents-can-communicate/installer/src/ownership.mjs +7 -1
  91. package/node_modules/@agents-can-communicate/installer/src/plan.mjs +15 -5
  92. package/node_modules/@agents-can-communicate/installer/src/shell-bootstrap.mjs +10 -133
  93. package/node_modules/@agents-can-communicate/mcp-server/package.json +1 -1
  94. package/node_modules/@agents-can-communicate/protocol/package.json +1 -1
  95. package/node_modules/@agents-can-communicate/storage-filesystem/package.json +1 -1
  96. package/node_modules/@agents-can-communicate/storage-filesystem/src/atomic-json.mjs +6 -1
  97. package/package.json +1 -1
  98. package/bin/acc-bootstrap.mjs +0 -7
  99. package/bin/acc-claude-channel.mjs +0 -10
  100. package/bin/entrypoints/claude-channel-binding.mjs +0 -46
  101. package/bin/entrypoints/claude-channel-stdio.mjs +0 -29
  102. package/node_modules/@agents-can-communicate/adapter-claude-code/plugin/.mcp.json +0 -8
  103. package/node_modules/@agents-can-communicate/adapter-claude-code/src/channel.mjs +0 -381
  104. package/node_modules/@agents-can-communicate/adapter-claude-code/src/native-delivery.mjs +0 -232
  105. package/node_modules/@agents-can-communicate/installer/src/bootstrap-runtime.mjs +0 -150
@@ -4,7 +4,8 @@ Use this page to set expectations after installation. Integration means ACC can
4
4
  peer awareness and coordination instructions; it does not guarantee what a model will do
5
5
  with them. Delivery also varies independently from awareness. The durable inbox works for
6
6
  every participant, a client at or after a captured version may add next-turn delivery, and the
7
- experimental Codex LocalDaemon and Claude Code Channel paths can deliver while a session is idle.
7
+ experimental Codex LocalDaemon, Claude Code inbox wake and Antigravity CLI relay paths can
8
+ deliver while a session is idle.
8
9
 
9
10
  Capability honesty separates four questions that are easy to collapse:
10
11
 
@@ -19,9 +20,9 @@ Capability honesty separates four questions that are easy to collapse:
19
20
  A source method or vendor documentation is not certification. A capture applies forward: from
20
21
  the version that recorded it until a later capture changes that capability, and to every
21
22
  platform until one of them records something of its own. A client older than every capture
22
- degrades to false, and so does a capability a capture recorded as failing. Native
23
- minimum-based eligibility is separate, and stays per-platform. No weaker session inherits a
24
- stronger peer's capability.
23
+ degrades to false, and so does a capability a capture recorded as failing. Native live
24
+ delivery reads its captured minimum the same way: on every platform, with a prerelease judged
25
+ by its release triple. No weaker session inherits a stronger peer's capability.
25
26
 
26
27
  Run `acc doctor` in the project when observed behavior differs from this page. It reports
27
28
  the installed client version, platform, effective capability, and fallback instead of
@@ -50,11 +51,21 @@ child sessions, startup or safe-point injection, and before-read guards.
50
51
 
51
52
  The native rows are `no` at the hook versions this matrix names.
52
53
  Separate installed-client captures establish Codex `livePush` on 0.152.1 and
53
- 0.153.4, Claude Code `livePush` plus `replyRoute` on 2.1.258 and 2.1.260, and
54
+ 0.153.4, Claude Code `livePush` on 2.1.282 through the session inbox, and
54
55
  Antigravity CLI `livePush` on 1.2.7 and later through a relay the agent starts in its own shell.
55
- Native eligibility uses the captured platform minimum, a current feature probe,
56
- and an exact per-session handshake. It is experimental and requires recipient
57
- opt-in. Codex and Antigravity CLI reply through `acc reply`; their native `replyRoute` remains false.
56
+ Native eligibility uses the captured minimum, a current feature probe, and an exact
57
+ per-session handshake. It is experimental and requires recipient opt-in.
58
+
59
+ What may refuse live delivery is exactly three things:
60
+
61
+ - the machine's own probe or per-session handshake failing;
62
+ - a client older than the first passing capture;
63
+ - a regression recorded in `knownBad`.
64
+
65
+ Nothing else: not the platform, not a prerelease suffix, not where the evidence was taken.
66
+ A platform whose transport is technically different is refused by the probe as a fact about
67
+ that transport, which is what Claude Code's named pipe on native Windows is. Codex, Claude Code and Antigravity CLI reply through `acc reply`. Their native
68
+ `replyRoute` remains false.
58
69
 
59
70
  The limitations belong next to the adapters they affect:
60
71
 
@@ -62,7 +73,7 @@ The limitations belong next to the adapters they affect:
62
73
  |---|---|
63
74
  | Antigravity CLI | 1.2.7 on darwin-arm64, captured in print mode, and every later release by the forward rule. Only `SessionStart`, `PreInvocation`, `PostInvocation` and `Stop` load; `SessionEnd`, `PreToolUse` and `PostToolUse` are accepted into the config file and silently dropped, so there is no tool guard and no session-end deregistration - a session goes offline by presence age or an explicit `acc finish`. Payloads carry no `hook_event_name`, so each registered command passes its own event name. The end-of-turn `Stop` continuation reaches the model and is a bounded nudge, not a gate: ACC continues a turn at most once and fails open, and the client caps consecutive continuations itself (vendor 1.1.9). `agy agentapi send-message` can wake an idle session - captured - but only with that session's language-server address and CSRF token, which exist in the agent's own shell and in no hook. ACC does not take that token, so live push and reply routing are false. A peer message that arrives while the model writes its last answer is carried by the `Stop` continuation instead. A write that parses can register nothing, so install and doctor read `agy -p "/hooks"` back instead of trusting the file. Live push (1.2.7, darwin-arm64, TUI only, experimental, recorded opt-in) runs through a relay the agent starts once per conversation from its own shell - the only process holding the session endpoint - after ACC's context asks it to, up to three times while none is serving; the operator approves that command at the client's permission prompt. An idle session wakes; a busy one sees the message after its running answer, or at the next model invocation when the turn waits on a tool. Print mode and the first session in a folder trusted at that launch get no relay. |
64
75
  | Codex | Next-turn context, captured on 0.147.0, requires plugin trust. The observed stock 0.153.4 upgrade from ACC 0.3.1 to 0.4 required fresh review of five modified hook definitions; a subsequent restart retained all five active (activation evidence, not new event certification). LocalDaemon native delivery was captured through the installed package on 0.152.1 and 0.153.4, darwin-arm64; minimum 0.152.1, recorded opt-in, current feature probe and exact thread/cwd/process/version/protocol checks are required. Ordinary launch preserves the receiver workspace without ACC arguments or daemon ownership. Embedded or unreachable sessions keep their inbox. Native `replyRoute` remains false. |
65
- | Claude Code | 2.1.233 next-turn delivery waits for the next user prompt. A 2.1.258 Channel capture proved idle offer, busy queue-after-turn, explicit reply, duplicate suppression, and durable fallback, so `delivery.livePush` and `delivery.replyRoute` are live capabilities behind the native contract (experimental, off until opted in; Claude's development-channel warning is vendor-owned and visible). |
76
+ | Claude Code | 2.1.233 next-turn delivery waits for the next user prompt. From 2.1.282, captured on darwin-arm64 and applied on every platform whose inbox is a Unix socket, `delivery.livePush` is a live capability behind the native contract (experimental, off until opted in). ACC wakes the session through the inbox socket that Claude Code opens for every session, with one line of fixed ACC text and the message id. An idle session starts a turn. A busy session takes the wake between two tool calls. Each delivered wake fires `UserPromptSubmit`, so the next-turn hook shows the body and records the receipt `offered` via `next-turn`. The model answers with `acc reply`, so `delivery.replyRoute` stays false. A session in `bypassPermissions` mode holds each wake for approval unless `crossSessionInbound` is `accept`, and `refuse` drops wakes. Native Windows keeps next-turn delivery: its inbox is a named pipe that requires an auth line, and it is uncaptured. Linux is uncaptured. |
66
77
  | Gemini CLI | Package-shipped next-turn certification starts at 0.57.0. Its TUI has no captured external wake or queue interface and `--acp` changes launch ownership, so native delivery is fallback-only; live push and reply routing remain false. |
67
78
  | Grok | The Grok 1.0.24 installed-client check observed own CLI arguments after a terminal result, followed by owned work, message, and finish calls. This identity-only path does not certify peer-context injection. Documentation-shaped payloads do not count as real captures. The public leader surface exposed no proven addressed injection into an ordinary TUI session, so native delivery is `awaiting_compatibility_capture`; all capabilities remain false. |
68
79
  | Kimi Code | Next-turn and guard evidence was captured on 0.36.1, plus a 60-second heartbeat. Its server/queue APIs do not prove a transparent binding to an independently opened session, so native delivery is fallback-only. |
@@ -81,19 +92,21 @@ with a computed `reachable` boolean while keeping the opaque endpoint private.
81
92
  The router requires exactly one current eligible generation. No binding, several live
82
93
  sessions for one participant, and an adapter refusal keep delivery on the durable
83
94
  fallback. An expired lease may be revalidated by an adapter's optional refresh method;
84
- failure leaves the message queued. Busy behavior belongs to the transport: Claude's Channel can accept a
85
- message while the target is busy and queue it until the current turn finishes; an adapter
86
- that instead refuses with `recipient_busy` leaves the message on the durable path.
95
+ failure leaves the message queued. Busy behavior belongs to the transport. Codex accepts a
96
+ message while the target is busy and holds it until the current turn finishes. Claude Code
97
+ takes a wake between two tool calls of the running turn. An adapter that instead refuses
98
+ with `recipient_busy` leaves the message on the durable path.
87
99
 
88
100
  An endpoint may renew its lease, or an adapter may revalidate that exact endpoint on
89
101
  demand without a client heartbeat. Retirement is final: neither route may revive a
90
102
  retired binding, a closed session or an old generation. Delivery lease refresh does
91
103
  not renew participant presence.
92
104
 
93
- On darwin-arm64, Codex LocalDaemon and Claude Code Channel have captured
94
- experimental live delivery. Other adapters retain their separately certified
95
- next-turn paths or inbox polling. Linux and other uncaptured platforms retain
96
- the durable inbox; these captures establish no new hook capabilities there.
105
+ Codex LocalDaemon, the Claude Code inbox wake and the Antigravity CLI relay have captured
106
+ experimental live delivery, on darwin-arm64. Those captures set the minimum that applies on
107
+ every platform; on a host they never named, the probe and the per-session handshake decide,
108
+ and a transport that does not answer keeps the durable inbox. Other adapters retain their
109
+ separately certified next-turn paths or inbox polling.
97
110
 
98
111
  Codex's 120-second delivery lease can refresh on demand for the same live endpoint;
99
112
  it does not extend the 24-hour participant presence limit. A TUI exit can leave its
@@ -113,15 +126,15 @@ policy:
113
126
  | `all` | every addressed message kind may use live push |
114
127
 
115
128
  The default is `off`. `acc install --delivery actionable|all` records recipient consent.
116
- Current activation remains off when the platform, captured minimum or feature probe
117
- does not qualify; that temporary failure does not erase the requested policy. Each
118
- session must pass its own generation-bound handshake. An adapter using the installation
119
- record rereads consent at hooks and before offers, so a long-running vendor process
120
- cannot retain permission through an old environment value or binding snapshot.
121
-
122
- For an adapter using recorded consent, `--delivery off` and uninstall prevent new
123
- native offers. They cannot withdraw a submission already accepted by the vendor queue. Ordinary hook capabilities still
124
- require exact-version certification. Room messages are never live-push candidates.
129
+ Current activation remains off when the captured minimum or the feature probe does not
130
+ qualify; that temporary failure does not erase the requested policy. Each
131
+ session must pass its own generation-bound handshake. Every adapter reads consent from the
132
+ installation record and rereads it at hooks and before offers, so a long-running vendor
133
+ process cannot retain permission through an old binding snapshot.
134
+
135
+ `--delivery off` and uninstall prevent new native offers. They cannot withdraw a submission
136
+ already accepted by the vendor queue. Ordinary hook capabilities still require exact-version
137
+ certification. Room messages are never live-push candidates.
125
138
 
126
139
  ## Fallback
127
140
 
package/docs/CLI.md CHANGED
@@ -102,7 +102,16 @@ the messages addressed to that participant that it has not fetched, split by how
102
102
  got. Two sessions of one participant show the same numbers, so read the workspace total from
103
103
  `counts.unretrieved` rather than adding rows, and the text line ends with
104
104
  `<n> offered, not retrieved` when that number is above zero. Offered is not read: a
105
- transport took the bytes, and the model may or may not have looked. Default `sync` reads
105
+ transport took the bytes, and the model may or may not have looked.
106
+
107
+ A participant with no open session is left out, unless messages still wait for it: queued,
108
+ or offered by a live transport and not yet shown again, so that its next turn would show
109
+ them. A message the next-turn hook already showed does not wait, since nothing will reach the
110
+ participant for it again. A waiting participant's latest session stays listed as `offline`,
111
+ with that number as `waiting`, and with `endReason` when the client said why the session
112
+ ended, such as `"clear"` for Claude Code's `/clear`. The text line names each one:
113
+ `waiting for a closed session: claude_code-b (cleared, 2)`. `acc status --all` lists every
114
+ session. Default `sync` reads
106
115
  events after a 16-digit event cursor (100 by
107
116
  default, up to 500). `--scope history` discovers historical message headers and reads
108
117
  selected records; `--scope full` adds an unbounded snapshot for explicit workspace forensics.
@@ -208,6 +217,36 @@ Human output starts with `recorded message_x`. A transport failure after that co
208
217
  not change the command exit code. Reuse an explicit `--client-message-id` after an
209
218
  uncertain result to recover the same logical message.
210
219
 
220
+ A queued result names why no live offer was made. `no_live_transport` means the recipient
221
+ is online but its session has no live transport bound: a participant attached with the CLI,
222
+ or a client without live delivery. It reads the message from its inbox or next turn, and
223
+ human output says `models has no live transport; the message waits in its inbox`.
224
+ `recipient_offline` means the recipient has no open session; the message waits until one
225
+ starts or resumes. When the client said why its last session ended, the result carries it,
226
+ for example `"endReason": "clear"` after Claude Code's `/clear`, and human output says
227
+ `models's conversation was cleared (/clear); the message waits until that conversation
228
+ resumes`. `recipient_unavailable` means the recipient's session is open but its live
229
+ transport could not be reached.
230
+
231
+ The delivery outcome `woken` means ACC woke a Claude Code session through its inbox:
232
+
233
+ ```json
234
+ { "recipientParticipantId": "models", "outcome": "woken", "transport": "claude-inbox" }
235
+ ```
236
+
237
+ Human output prints it as `woke models via claude-inbox; the message arrives with its next turn`.
238
+ The wake carries only fixed ACC text and the message id. The receipt stays `queued`. The
239
+ session's next-turn hook then shows the body and records the receipt as `offered` via
240
+ `next-turn`.
241
+
242
+ A Claude Code session that bypasses permission prompts holds each wake for its user's
243
+ approval, unless its `crossSessionInbound` setting is `accept`. The outcome then carries
244
+ `"pendingApproval": true`, and human output says
245
+ `sent a wake to models via claude-inbox, which its session holds for approval because it
246
+ bypasses permission prompts; the message arrives with its next turn`. A session whose
247
+ `crossSessionInbound` is `refuse` gets no wake: the message stays `queued` with
248
+ `delivery_disabled`.
249
+
211
250
  `reply` additionally returns `receipt`: the original message id, the replying participant,
212
251
  and state `acknowledged`. Its `message` and `delivery` describe the outgoing answer.
213
252
  Human output distinguishes `recorded <reply-id>` from `acknowledged <original-id>`.
@@ -320,12 +359,12 @@ terminal asks one default-No question for all selected clients that need a decis
320
359
  its local service is unavailable or has no loaded session; this does not activate delivery.
321
360
  A non-interactive run or a `--dry-run` keeps fresh clients off. A recorded opt-in is kept on upgrade. If the detected
322
361
  client cannot receive native delivery - unsupported, below the captured minimum, a
323
- prerelease, known-bad, a wrong platform, or an unsupported shell - installation keeps the
324
- effective policy off and prints the reason. Claude Code shell activation writes an owned
325
- zsh PATH block and a shim that `exec`s the real client; `ACC_BYPASS=1` bypasses that
326
- activation. Codex LocalDaemon delivery uses recorded installation consent without changing
327
- ordinary launch arguments. Its opt-in remains active when shim variables are absent or
328
- bypassed; `acc install --adapter codex --delivery off` disables new native offers. On a
362
+ prerelease, known-bad, or a wrong platform - installation keeps the
363
+ effective policy off and prints the reason. Every adapter reads live-delivery consent from
364
+ the installation record. Claude Code live delivery uses the inbox that each Claude Code
365
+ session opens itself. ACC adds no launch argument, shell file or wrapper for it. Codex
366
+ LocalDaemon delivery also keeps ordinary launch arguments unchanged.
367
+ `acc install --adapter <adapter> --delivery off` disables new native offers for that client. On a
329
368
  supported explicit install, complete consent can prepare a missing Codex service. On macOS
330
369
  arm64 with Codex 0.154.0 or newer, the same choice includes downloading a missing standalone
331
370
  package from OpenAI. ACC selects the installed CLI version and verifies the official
@@ -341,15 +380,14 @@ The install summary names each client's requested policy,
341
380
  activation state and verified fallback. `doctor` separates protocol readiness, recorded
342
381
  consent and a live channel in the current workspace, with a next step for missing activation.
343
382
  A supported version or an installed plugin alone is not an active delivery channel.
344
- `runtime: active` means ACC has a reachable local transport binding. Claude can still
345
- block inbound Channels messages while its MCP server and tools remain connected;
346
- doctor therefore also names the client-side startup check.
383
+ `runtime: active` means ACC has a reachable local transport binding. Claude Code applies
384
+ its own inbound controls to each wake: a session in `bypassPermissions` mode holds the wake
385
+ for approval. See [delivery troubleshooting](TROUBLESHOOTING.md#a-claude-code-session-holds-or-drops-acc-wakes).
347
386
  In doctor JSON, `nativeDelivery.activation` distinguishes missing launch setup from a
348
387
  recorded setup (or `not_required` for a pre-existing service). `policy` is the installed
349
388
  choice. `deliveryDecision` gives its known source and reports legacy provenance as unknown.
350
- `nativeServiceSetup` reports service infrastructure separately. `sessionPolicy` describes a native binding when one is visible. Existing Claude
351
- sessions can retain their launch policy after a different choice is installed for new
352
- sessions; Codex checks current recorded consent before new offers.
389
+ `nativeServiceSetup` reports service infrastructure separately. `sessionPolicy` describes a native binding when one is visible.
390
+ Every adapter rereads the current recorded consent at hooks and before new offers.
353
391
  `nativeDelivery.sessions` lists each current session's identity, present transport state
354
392
  and `lastAttempt`: timestamp, startup/turn event, effective policy and its source, whether
355
393
  that policy was missing/invalid/off, whether a client process was identified, and the closed
package/docs/CONCEPTS.md CHANGED
@@ -131,10 +131,11 @@ on a client that takes next-turn bodies.
131
131
  ## Durable first, faster delivery second
132
132
 
133
133
  The durable inbox is universal. An adapter whose captures reach the installed client may
134
- also offer messages at the next normal turn. Codex LocalDaemon and Claude Code Channel add
135
- experimental live delivery, off by default and subject to recipient policy and
136
- current reachability. Codex can retain an eligible daemon thread after its terminal
137
- exits. [Capabilities](CAPABILITIES.md) gives the current limits.
134
+ also offer messages at the next normal turn. Codex LocalDaemon and the Claude Code inbox
135
+ wake add experimental live delivery, off by default and subject to recipient policy and
136
+ current reachability. A Claude Code wake makes the session run a turn, and that turn's
137
+ next-turn hook shows the message. Codex can retain an eligible daemon thread after its
138
+ terminal exits. [Capabilities](CAPABILITIES.md) gives the current limits.
138
139
 
139
140
  ## Handoffs preserve explicit context
140
141
 
@@ -129,13 +129,22 @@ acc install --adapter codex --delivery off
129
129
 
130
130
  The allowed values are `off`, `actionable`, and `all`; the default is `off`. This setting
131
131
  does not belong in `acc.workspace.json`, where a pull request could opt someone else into
132
- spending a turn. It also cannot create a capability. Exact-version evidence governs
133
- ordinary hook features; Claude Code live delivery separately requires macOS arm64, version
134
- 2.1.258 or newer, and a current feature probe before installation applies the requested
132
+ spending a turn. It also cannot create a capability. Every adapter reads live-delivery
133
+ consent from this installation record, and only from it. Exact-version evidence governs
134
+ ordinary hook features. Claude Code live delivery separately requires macOS arm64, version
135
+ 2.1.282 or newer, and a current feature probe before installation applies the requested
135
136
  policy. If those install-time checks fail, effective policy remains `off` and the installer
136
137
  reports next-turn or inbox fallback. Each later session must also pass its own
137
138
  generation-bound handshake. A failed session handshake clears or refuses that binding and
138
- reports degraded reachability; it does not rewrite the installed consent.
139
+ reports degraded reachability. It does not rewrite the installed consent.
140
+
141
+ Claude Code live delivery wakes the session through the inbox socket that the session opens
142
+ itself. ACC changes no launch argument, shell profile or `PATH` entry for it. Claude Code's
143
+ own inbound controls still apply to each wake. A session in `bypassPermissions` mode holds
144
+ each wake for your approval unless its `crossSessionInbound` setting is `accept`. A
145
+ `crossSessionInbound` setting of `refuse` drops wakes. These controls belong to you, and ACC
146
+ never overrides them. See
147
+ [held or dropped wakes](TROUBLESHOOTING.md#a-claude-code-session-holds-or-drops-acc-wakes).
139
148
 
140
149
  Codex LocalDaemon delivery separately requires macOS arm64, Codex 0.152.1 or newer, a
141
150
  current feature probe, and exact thread, canonical cwd, process, version and protocol
@@ -144,10 +153,9 @@ standalone package and prepare a definitely absent service. The setup choice nam
144
153
  download. Existing service-start consent alone does not permit it. Codex files remain
145
154
  under the selected `CODEX_HOME`; the existing CLI command and shell profiles are preserved.
146
155
  Message delivery does not install Codex, start it, or stop it.
147
- Explicit update maintenance can restart a verified service after separate confirmation. Codex reads
148
- consent from the installation record, not a shell-shim variable. Unavailable or ineligible
149
- sessions retain durable inbox fallback. Use `acc install --adapter codex --delivery off`
150
- to stop new native offers; bypassing a shim does not disable that recorded opt-in.
156
+ Explicit update maintenance can restart a verified service after separate confirmation.
157
+ Unavailable or ineligible sessions retain durable inbox fallback. Use
158
+ `acc install --adapter codex --delivery off` to stop new native offers.
151
159
 
152
160
  ### Codex outgoing permissions
153
161
 
@@ -195,7 +203,6 @@ that resolves inside a workspace.
195
203
  | `ACC_NO_UPDATE_CHECK=1` | Disables update networking and background scheduling; manual recovery of an already downloaded update remains available |
196
204
  | `ACC_PROBE_TIMEOUT_MS` | How long to wait for a client to print its version. Three seconds by default: generous on an idle machine, and not always enough on a busy one, where a client that overruns it is reported as not installed |
197
205
  | `ACC_ANTIGRAVITY_HOOKS` | Where `acc install` registers Antigravity CLI hooks. `global`, the default, writes `~/.gemini/config/hooks.json`, which always loads and applies to every Antigravity session on the machine. `workspace` writes `<project>/.agents/hooks.json`, which is scoped to the project the command ran in and loads only while that project is an open Antigravity workspace - in print mode, only when it is passed with `--add-dir`. Any other value is refused by name rather than replaced by the default, and that client is skipped. The two cannot be combined: both files use the namespace `acc`, and a name in both is kept only once |
198
- | `ACC_NATIVE_DELIVERY_POLICY` | Owned shell-bootstrap consent, currently used by Claude Code. The shim sets `off`, `actionable`, or `all`; missing/invalid values mean off for that route. Codex instead reads recorded installation consent, even when this variable is absent |
199
- | `ACC_BYPASS=1` | Bypasses owned shell activation, currently Claude Code: no bootstrap check/native flags, and shim policy is unset. It does not disable Codex recorded opt-in; use `acc install --adapter codex --delivery off` for new Codex offers |
200
- | `ACC_BOOTSTRAP_DEBUG=1` | Lets the internal `acc-bootstrap` check write one safe diagnostic line to stderr. Off, it is silent, and it never writes to stdout |
201
206
  | `CODEX_HOME` | Codex's own home, honoured when locating the Codex App Server daemon's control socket for native delivery. Codex sets it; ACC only reads it |
207
+ | `CLAUDE_CONFIG_DIR` | Claude Code's own configuration directory, `~/.claude` by default. ACC reads the session registry `sessions/<pid>.json` under it to verify a session's inbox. ACC reads the value from the hook environment and never sets it |
208
+ | `CLAUDE_CODE_MESSAGING_SOCKET` | The inbox socket of one Claude Code session, which Claude Code exports to that session's hooks. ACC reads it in the hook environment and checks it against the session registry. ACC never reads `CLAUDE_CODE_MESSAGING_TOKEN` |
@@ -66,13 +66,14 @@ means the infrastructure is ready. Start a Codex session and complete the client
66
66
  trust review to establish a session-bound channel. An incomplete existing standalone
67
67
  installation or unsupported CLI version still needs the vendor action named by install.
68
68
 
69
- If you opt into Claude Code's experimental idle delivery, check Claude's Channels startup
70
- notice for ACC and accept its development-channel warning when shown. If it reports Channels
71
- unavailable or blocked, a connected MCP server does not make inbound delivery work;
72
- see [troubleshooting](TROUBLESHOOTING.md#i-enabled-live-delivery-but-got-fallback).
73
- The feature is off by default, can spend
74
- model tokens, and currently requires Apple Silicon macOS, zsh, and Claude Code 2.1.258 or
75
- newer. You do not need it for durable messages or supported next-turn delivery.
69
+ Claude Code's experimental live delivery wakes the session through the inbox that Claude
70
+ Code opens for every session. After you opt in, start Claude Code with your ordinary command.
71
+ ACC adds no launch flag, shell change or wrapper. A session in `bypassPermissions` mode asks
72
+ you to approve each ACC wake. See
73
+ [held or dropped wakes](TROUBLESHOOTING.md#a-claude-code-session-holds-or-drops-acc-wakes).
74
+ The feature is off by default, can spend model tokens, and currently requires Apple Silicon
75
+ macOS and Claude Code 2.1.282 or newer. You do not need it for durable messages or supported
76
+ next-turn delivery.
76
77
 
77
78
  ## 2. Open two sessions and give them ordinary tasks
78
79
 
@@ -140,11 +141,13 @@ Antigravity CLI carries one extra condition: its hooks are given a project direc
140
141
  when the session has an open workspace. A session started without one attaches nothing, and
141
142
  the client shows no hook output to say so - `acc doctor` names it.
142
143
 
143
- Codex LocalDaemon and Claude Code Channel offer optional native delivery on
144
- Apple Silicon macOS. They are experimental, can spend tokens, and queue messages
145
- until a running turn finishes. Codex requires 0.152.1 or newer, LocalDaemon infrastructure,
146
- recorded opt-in, and a verified session. Supported explicit setup can prepare a missing
147
- service. Start the client with your normal command. A loaded daemon thread can receive
144
+ Codex LocalDaemon and the Claude Code inbox wake offer optional native delivery on
145
+ Apple Silicon macOS. They are experimental and can spend tokens. Codex queues a message
146
+ until a running turn finishes. A busy Claude Code session takes the wake between two tool
147
+ calls. Claude Code requires 2.1.282 or newer and recorded opt-in, and it wakes through the
148
+ inbox that each session opens itself. Codex requires 0.152.1 or newer, LocalDaemon
149
+ infrastructure, recorded opt-in, and a verified session. Supported explicit setup can
150
+ prepare a missing service. Start the client with your normal command. A loaded daemon thread can receive
148
151
  messages after its terminal exits. Antigravity CLI 1.2.7 and later has one too: with delivery enabled,
149
152
  ACC's context asks the agent to start a relay from its own shell, up to three times while
150
153
  none is running, and you approve that command at the client's prompt.
package/docs/GLOSSARY.md CHANGED
@@ -16,7 +16,8 @@
16
16
  - **Retrieved** — the participant received the body; not proof of model attention.
17
17
  - **Acknowledged** — that participant explicitly acknowledged or replied; a reply is not proof requested work finished.
18
18
  - **Next-turn delivery** — certified projection at the client's next normal turn; it never interrupts an active turn.
19
- - **Live push** — optional delivery through Claude Code Channel or Codex LocalDaemon to an already-running session, behind recipient opt-in. Both wait for an active turn to finish; [Capabilities](CAPABILITIES.md) gives the measured eligibility and limits.
19
+ - **Live push** — optional delivery through the Claude Code inbox wake or Codex LocalDaemon to an already-running session, behind recipient opt-in. A busy Claude Code session takes the wake between two tool calls. Codex waits for an active turn to finish. [Capabilities](CAPABILITIES.md) gives the measured eligibility and limits.
20
+ - **Wake** — a live offer that carries only fixed ACC text and the message id. Its delivery outcome is `woken`, and the receipt stays `queued` until the next-turn hook shows the body.
20
21
  - **Recipient policy** — `off`, `actionable`, or `all`; opt-in permission to spend a turn, not a capability.
21
22
  - **Delivery binding** — ephemeral, generation-bound reachability data owned by an adapter.
22
23
  - **Fallback** — durable inbox or certified next-turn recovery when live delivery is unavailable.
@@ -102,10 +102,14 @@ All recipients have the same durable record, but adapters expose different accel
102
102
  - **Next normal turn:** exact captured versions of Codex, Claude Code, Gemini CLI, Antigravity CLI and Kimi
103
103
  Code can receive complete attributed peer context when the user next prompts that client.
104
104
  This does not wake an idle session.
105
- - **Optional Claude Code channel:** supported Claude Code versions on Apple Silicon macOS
106
- may receive an addressed actionable message while idle. This is experimental, off by
107
- default, can spend tokens, never interrupts a running turn, and requires the vendor's
108
- visible development-channel warning.
105
+ - **Optional Claude Code inbox wake:** on Apple Silicon macOS with Claude Code 2.1.282 or
106
+ later, ACC wakes the session through the inbox socket that the session opens itself. The
107
+ wake is one line of fixed ACC text with the message id. It carries no subject, body or
108
+ sender name. An idle session starts a turn. A busy session takes the wake between two tool
109
+ calls and keeps its turn. Each delivered wake fires `UserPromptSubmit`, ACC's next-turn
110
+ hook, which shows the message in its untrusted block. The model answers with
111
+ `acc reply`. This is experimental, off by default and can spend tokens. Claude Code's
112
+ own inbound controls apply to each wake.
109
113
 
110
114
  - **Optional Codex LocalDaemon delivery:** on Apple Silicon macOS, a captured
111
115
  minimum of 0.152.1 plus a current probe and exact session checks allow delivery
package/docs/PROTOCOL.md CHANGED
@@ -199,6 +199,24 @@ peer body into diagnostics.
199
199
  Receipt `offered` is committed only after the transport accepts bytes. A failed attempt
200
200
  leaves the receipt queued.
201
201
 
202
+ A wake is the one accepted offer that records nothing. An adapter whose native contract
203
+ declares `offerKind: "wake"` sends only a notice that makes the client run a turn. The
204
+ Claude Code inbox wake is one line of fixed ACC text with the message id, and it carries no
205
+ subject, body, sender name or other peer byte. The router records no event for an accepted
206
+ wake and returns this delivery outcome:
207
+
208
+ ```json
209
+ { "recipientParticipantId": "<id>", "outcome": "woken", "transport": "claude-inbox" }
210
+ ```
211
+
212
+ An adapter whose client took the wake but holds it for its user's approval adds
213
+ `"pendingApproval": true` to its acceptance, and the outcome carries it. Nothing about it is
214
+ stored.
215
+
216
+ The receipt stays `queued`. The recipient's next-turn hook shows the body and records
217
+ `message.offer_succeeded` with `transport: "next-turn"` after its output carried the body.
218
+ A failed wake is recorded as `message.offer_failed`, like any failed offer.
219
+
202
220
  The same transaction records how the receipt was offered, in the receipt's `extensions`:
203
221
 
204
222
  ```json
@@ -298,12 +316,13 @@ The recipient owns `livePolicy` because native push may start a model turn:
298
316
 
299
317
  Default is `off`. Policy never creates a capability. The router requires one
300
318
  current eligible recipient generation, supported client evidence, a verified
301
- binding and adapter acceptance. Claude Code Channel uses a captured 2.1.258
302
- minimum, confirmed on 2.1.260. Codex LocalDaemon uses a 0.152.1 minimum, confirmed
303
- through installed-product captures on 0.152.1 and 0.153.4; recorded consent and
304
- exact thread, cwd, process, version and protocol verification govern every session.
305
- Unavailable or refused routes fall back durably. Codex replies use the ACC CLI;
306
- its native reply route remains false.
319
+ binding and adapter acceptance. The Claude Code inbox wake uses a 2.1.282 minimum,
320
+ captured on darwin-arm64 and applied on every platform. Its binding requires the same pid and socket in Claude Code's
321
+ session registry, and every refresh and wake also requires the same session id. Codex LocalDaemon uses a 0.152.1 minimum, confirmed
322
+ through installed-product captures on 0.152.1 and 0.153.4. Recorded consent and
323
+ exact thread, cwd, process, version and protocol verification govern every Codex session.
324
+ Unavailable or refused routes fall back durably. Claude Code and Codex replies use the ACC
325
+ CLI. Their native reply route remains false.
307
326
 
308
327
  ## Attention and sync
309
328
 
package/docs/RELEASING.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Releasing
2
2
 
3
3
  Use this procedure to build one auditable npm artifact, verify that exact tarball, and keep
4
- its evidence tied to the commit that supplied its bytes. The package is currently `0.5.0`;
5
- the commands derive the version from `package.json` so the filename cannot drift.
4
+ its evidence tied to the commit that supplied its bytes. The commands derive the version
5
+ from `package.json` so the filename cannot drift.
6
6
 
7
7
  ```mermaid
8
8
  graph LR
@@ -118,9 +118,12 @@ work belongs under `Unreleased` and gets a new candidate record.
118
118
  ## Capture only capabilities you observed
119
119
 
120
120
  Run native real-client checks on the exact versions and platforms recorded in
121
- retained fixtures. Exact-version evidence governs normal-turn and guard behavior.
122
- Claude Code Channel uses its captured macOS arm64 minimum plus a current probe and
123
- per-session handshake; its vendor warning remains part of startup. Codex LocalDaemon
121
+ retained fixtures. A capture records evidence, and it never gates beyond that floor: what it
122
+ proves applies from its version onward and on every platform, and what refuses a client is
123
+ the machine's own probe or handshake, an older client, or a recorded regression.
124
+ The Claude Code inbox wake uses its captured minimum plus a current probe and
125
+ per-session handshake. Its passing capture is a real-client product run of the packed
126
+ candidate, launched with the ordinary command and installed hooks. Codex LocalDaemon
124
127
  uses a separate 0.152.1 minimum with installed-product captures on 0.152.1 and
125
128
  0.153.4. Its passing capture must ship the hashed complete product matrix and
126
129
  historical evidence references. Direct queue success alone cannot certify that route.
@@ -73,13 +73,26 @@ never copy the peer body.
73
73
 
74
74
  A live adapter must match its declared evidence contract, one current
75
75
  generation-bound binding and recipient opt-in. Opaque endpoints remain private
76
- and outside repositories. Claude Code Channel and Codex LocalDaemon delivery are
76
+ and outside repositories. Claude Code inbox wakes and Codex LocalDaemon delivery are
77
77
  experimental and off by default. Codex verifies the exact receiver thread,
78
78
  canonical cwd, live process, stable version and protocol, and rereads recorded
79
79
  consent before offers. A loaded daemon thread can receive messages after its TUI
80
80
  exits. Delivery off and uninstall prevent new Codex submissions; a submission
81
81
  already accepted by the vendor queue cannot be withdrawn.
82
82
 
83
+ A Claude Code inbox wake carries only fixed ACC text. It is one line with the message id,
84
+ and it carries no subject, body, sender name or other peer byte. The body reaches the model
85
+ only through the next-turn hook, inside the untrusted `acc-peer-message` block. Before each
86
+ wake, ACC checks that the session registry still names the same pid, session id and socket,
87
+ so a wake never reaches a reused pid.
88
+
89
+ ACC connects to the inbox without credentials. It never reads the session's
90
+ `CLAUDE_CODE_MESSAGING_TOKEN` or its `.key` file, and it sends no auth line. A frame with
91
+ that token would pass as the session's own child and skip the receiver's inbound controls.
92
+ ACC also never attests a permission mode. Claude Code's inbound controls therefore stay the
93
+ user's: a session in `bypassPermissions` mode holds each wake for approval unless
94
+ `crossSessionInbound` is `accept`, and `refuse` drops wakes.
95
+
83
96
  On captured Codex/macOS configurations, live opt-in also grants outgoing access to ACC's
84
97
  state and local Unix sockets through a deny-by-default network proxy. Custom permission
85
98
  policies remain user-owned. Selection, proxy and grants are restored together only while