agents-can-communicate 0.7.1 → 0.8.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.
Files changed (85) 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/docs/ADAPTER_AUTHORING.md +41 -10
  5. package/docs/ARCHITECTURE.md +23 -13
  6. package/docs/CAPABILITIES.md +19 -16
  7. package/docs/CLI.md +48 -13
  8. package/docs/CONCEPTS.md +5 -4
  9. package/docs/CONFIGURATION.md +18 -11
  10. package/docs/GETTING_STARTED.md +15 -12
  11. package/docs/GLOSSARY.md +2 -1
  12. package/docs/HOW_IT_WORKS.md +8 -4
  13. package/docs/PROTOCOL.md +25 -6
  14. package/docs/RELEASING.md +3 -2
  15. package/docs/SECURITY_MODEL.md +14 -1
  16. package/docs/TROUBLESHOOTING.md +64 -27
  17. package/docs/UPGRADING.md +49 -8
  18. package/docs/WHY_ACC.md +5 -3
  19. package/node_modules/@agents-can-communicate/adapter-antigravity/package.json +1 -1
  20. package/node_modules/@agents-can-communicate/adapter-antigravity/plugin/plugin.json +1 -1
  21. package/node_modules/@agents-can-communicate/adapter-claude-code/certification.json +14 -73
  22. package/node_modules/@agents-can-communicate/adapter-claude-code/fixtures/certification-provenance.json +29 -71
  23. package/node_modules/@agents-can-communicate/adapter-claude-code/fixtures/delivery/claude-code-2.1.282-product-evidence.json +161 -0
  24. package/node_modules/@agents-can-communicate/adapter-claude-code/fixtures/delivery/claude-code-2.1.282.json +28 -0
  25. package/node_modules/@agents-can-communicate/adapter-claude-code/fixtures/inbox-wake-2.1.282.json +44 -0
  26. package/node_modules/@agents-can-communicate/adapter-claude-code/package.json +5 -2
  27. package/node_modules/@agents-can-communicate/adapter-claude-code/src/adapter.mjs +25 -30
  28. package/node_modules/@agents-can-communicate/adapter-claude-code/src/hooks.mjs +6 -0
  29. package/node_modules/@agents-can-communicate/adapter-claude-code/src/inbox-contract.mjs +10 -0
  30. package/node_modules/@agents-can-communicate/adapter-claude-code/src/inbox-delivery.mjs +254 -0
  31. package/node_modules/@agents-can-communicate/adapter-claude-code/src/inbox-endpoint.mjs +166 -0
  32. package/node_modules/@agents-can-communicate/adapter-claude-code/src/inbox-registry.mjs +71 -0
  33. package/node_modules/@agents-can-communicate/adapter-claude-code/src/inbox-settings.mjs +109 -0
  34. package/node_modules/@agents-can-communicate/adapter-claude-code/src/install.mjs +25 -31
  35. package/node_modules/@agents-can-communicate/adapter-codex/package.json +1 -1
  36. package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/gemini-extension.json +1 -1
  37. package/node_modules/@agents-can-communicate/adapter-gemini-cli/package.json +1 -1
  38. package/node_modules/@agents-can-communicate/adapter-grok/package.json +1 -1
  39. package/node_modules/@agents-can-communicate/adapter-kimi/package.json +1 -1
  40. package/node_modules/@agents-can-communicate/adapter-sdk/package.json +1 -1
  41. package/node_modules/@agents-can-communicate/adapter-sdk/src/events.mjs +16 -3
  42. package/node_modules/@agents-can-communicate/adapter-sdk/src/hook-shim.mjs +4 -3
  43. package/node_modules/@agents-can-communicate/adapter-sdk/src/index.mjs +1 -1
  44. package/node_modules/@agents-can-communicate/adapter-sdk/src/native-activation.mjs +4 -14
  45. package/node_modules/@agents-can-communicate/adapter-sdk/src/native-delivery.mjs +23 -11
  46. package/node_modules/@agents-can-communicate/adapter-sdk/src/native-vocabulary.mjs +5 -1
  47. package/node_modules/@agents-can-communicate/cli/package.json +1 -1
  48. package/node_modules/@agents-can-communicate/cli/src/doctor-command.mjs +8 -6
  49. package/node_modules/@agents-can-communicate/cli/src/install-command.mjs +8 -23
  50. package/node_modules/@agents-can-communicate/cli/src/install-delivery-consent.mjs +3 -4
  51. package/node_modules/@agents-can-communicate/cli/src/main.mjs +25 -3
  52. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/entry.mjs +7 -43
  53. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/launchers.mjs +5 -3
  54. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/refresh.mjs +3 -4
  55. package/node_modules/@agents-can-communicate/cli/src/native-delivery-status.mjs +2 -2
  56. package/node_modules/@agents-can-communicate/core/package.json +1 -1
  57. package/node_modules/@agents-can-communicate/core/src/sessions.mjs +25 -2
  58. package/node_modules/@agents-can-communicate/core/src/status.mjs +19 -1
  59. package/node_modules/@agents-can-communicate/delivery-router/package.json +1 -1
  60. package/node_modules/@agents-can-communicate/delivery-router/src/router.mjs +24 -7
  61. package/node_modules/@agents-can-communicate/hook-runner/package.json +1 -1
  62. package/node_modules/@agents-can-communicate/hook-runner/src/native-attempt.mjs +6 -8
  63. package/node_modules/@agents-can-communicate/hook-runner/src/native-binding.mjs +24 -11
  64. package/node_modules/@agents-can-communicate/hook-runner/src/runner.mjs +1 -1
  65. package/node_modules/@agents-can-communicate/installer/package.json +1 -1
  66. package/node_modules/@agents-can-communicate/installer/src/apply.mjs +19 -5
  67. package/node_modules/@agents-can-communicate/installer/src/detect.mjs +3 -7
  68. package/node_modules/@agents-can-communicate/installer/src/index.mjs +4 -7
  69. package/node_modules/@agents-can-communicate/installer/src/native-activation.mjs +23 -61
  70. package/node_modules/@agents-can-communicate/installer/src/ownership.mjs +7 -1
  71. package/node_modules/@agents-can-communicate/installer/src/plan.mjs +15 -5
  72. package/node_modules/@agents-can-communicate/installer/src/shell-bootstrap.mjs +10 -133
  73. package/node_modules/@agents-can-communicate/mcp-server/package.json +1 -1
  74. package/node_modules/@agents-can-communicate/protocol/package.json +1 -1
  75. package/node_modules/@agents-can-communicate/storage-filesystem/package.json +1 -1
  76. package/node_modules/@agents-can-communicate/storage-filesystem/src/atomic-json.mjs +6 -1
  77. package/package.json +1 -1
  78. package/bin/acc-bootstrap.mjs +0 -7
  79. package/bin/acc-claude-channel.mjs +0 -10
  80. package/bin/entrypoints/claude-channel-binding.mjs +0 -46
  81. package/bin/entrypoints/claude-channel-stdio.mjs +0 -29
  82. package/node_modules/@agents-can-communicate/adapter-claude-code/plugin/.mcp.json +0 -8
  83. package/node_modules/@agents-can-communicate/adapter-claude-code/src/channel.mjs +0 -381
  84. package/node_modules/@agents-can-communicate/adapter-claude-code/src/native-delivery.mjs +0 -232
  85. package/node_modules/@agents-can-communicate/installer/src/bootstrap-runtime.mjs +0 -150
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 captured 2.1.282
320
+ minimum on darwin-arm64. 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
@@ -119,8 +119,9 @@ work belongs under `Unreleased` and gets a new candidate record.
119
119
 
120
120
  Run native real-client checks on the exact versions and platforms recorded in
121
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
122
+ The Claude Code inbox wake uses its captured macOS arm64 minimum plus a current probe and
123
+ per-session handshake. Its passing capture is a real-client product run of the packed
124
+ candidate, launched with the ordinary command and installed hooks. Codex LocalDaemon
124
125
  uses a separate 0.152.1 minimum with installed-product captures on 0.152.1 and
125
126
  0.153.4. Its passing capture must ship the hashed complete product matrix and
126
127
  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
@@ -154,31 +154,35 @@ or a connected MCP server does not by itself establish automatic delivery. `life
154
154
  manual` can also mean the current version has no certified session-end hook; it does not
155
155
  prove that no hooks ran.
156
156
 
157
- For Claude Code, open a fresh interactive zsh after installation so its launcher
158
- is on PATH. Check Claude's **Channels startup notice for ACC**, and accept the
159
- development-channel warning when it appears. A successful bootstrap cache means the
160
- executable passed ACC's compatibility probe. `/mcp` showing `connected` and two tools
161
- means the MCP server connected. Even `runtime: active` in ACC's doctor JSON describes
162
- the local transport; none of these proves that Claude enabled inbound channel messages.
163
-
164
- If Claude says `--dangerously-load-development-channels ignored` or `Channels are not
165
- currently available`, it has not enabled that delivery path. On a fresh 2.1.266 test
166
- profile, the first launch showed those messages and the next launch showed the development
167
- warning; restarting once can recheck availability, but is not a guaranteed fix. If it
168
- remains unavailable, follow Claude's notice. Organization policy can also block Channels;
169
- an administrator must enable them where required. ACC does not override that policy.
170
- See [Claude's Channels documentation](https://code.claude.com/docs/en/channels).
171
-
172
- If `deliveryBindings` is empty, ACC has not bound a local transport either. Read the
157
+ For Claude Code, use version 2.1.282 or newer on Apple Silicon macOS, and start it with
158
+ your ordinary command. Each Claude Code session opens its own inbox socket. ACC reads the
159
+ socket path from `CLAUDE_CODE_MESSAGING_SOCKET` in the hook environment. ACC then checks that
160
+ path against Claude Code's session registry `<config>/sessions/<pid>.json`, where
161
+ `<config>` is `CLAUDE_CONFIG_DIR` or `~/.claude`. The pid and the socket must match for the
162
+ binding, and the session id must match too before each wake. Each turn hook binds the
163
+ session again, so the next ordinary prompt retries a failed binding.
164
+
165
+ - Claude Code 2.1.224 and later open the inbox, but ACC's captured minimum is 2.1.282. An
166
+ older version reports `below_minimum_version` and keeps next-turn delivery.
167
+ - On native Windows, Claude Code serves its inbox on a named pipe that requires an auth
168
+ line. ACC has no capture of that inbox, so Windows keeps next-turn delivery.
169
+ - Linux is uncaptured for live delivery. A Linux session keeps next-turn delivery.
170
+ - A wake that reached the session can still wait for your approval. See
171
+ [the next section](#a-claude-code-session-holds-or-drops-acc-wakes).
172
+
173
+ If `deliveryBindings` is empty, ACC has not bound a local transport. Read the
173
174
  per-session lines in `acc doctor`, or `nativeDelivery.sessions[].lastAttempt` in JSON:
174
175
 
175
- - An absent launch policy means that hook did not receive delivery consent, even if an
176
- earlier bootstrap probe succeeded. For Claude, open a new terminal and client through
177
- the installed launcher.
176
+ - An absent or `off` policy means the installation record has no live-delivery consent
177
+ for that client. Run `acc install --adapter <adapter> --delivery actionable` (or `all`).
178
178
  - `client_process_unknown` means ACC could not identify the client process. A new client
179
179
  session repeats that lookup.
180
- - `handshake_failed` or `handshake_timeout` means the session could not bind the local
181
- channel. Check the client's integration/channel setup; the next ordinary turn retries.
180
+ - For Claude Code, `native_endpoint_unavailable` means the hook environment had no
181
+ `CLAUDE_CODE_MESSAGING_SOCKET`, or the socket failed ACC's safety checks.
182
+ `native_session_unavailable` means the session registry is missing or names another
183
+ session or socket.
184
+ - `handshake_failed` or `handshake_timeout` means the session could not bind its local
185
+ transport. Check the client's integration. The next ordinary turn retries.
182
186
  - No attempt observed can mean no native hook ran, an older runtime wrote the owner, or
183
187
  diagnostic persistence failed. Check hook activation and the runtime versions in doctor.
184
188
 
@@ -190,6 +194,37 @@ Closing a Codex terminal can leave its daemon thread loaded and eligible. Use
190
194
  Already accepted queue entries remain with the vendor. Actual thread archive
191
195
  requires Codex's confirmation and produces `SessionEnd`.
192
196
 
197
+ ## A Claude Code session holds or drops ACC wakes
198
+
199
+ Claude Code applies its own inbound controls to each ACC wake. These controls stay yours.
200
+ ACC never attests a permission mode, never reads the session's messaging token or key file,
201
+ and sends no auth line.
202
+
203
+ - A session in a prompting mode (`default`, `auto`, `acceptEdits` or `dontAsk`) takes each
204
+ wake.
205
+ - A session in `bypassPermissions` mode holds each wake for your approval. To let such a
206
+ session take wakes without approval, set Claude Code's `crossSessionInbound` setting to
207
+ `accept`.
208
+ - A session with `crossSessionInbound` set to `refuse` drops each wake. ACC then sends
209
+ none: the message stays `queued` with `delivery_disabled` and arrives with the next turn.
210
+
211
+ ACC reads the same inputs Claude Code reads: the hook's permission mode; before the first
212
+ prompt, whose hook carries none, the `--permission-mode` or `--dangerously-skip-permissions`
213
+ flag the session was started with, then `permissions.defaultMode`; and `crossSessionInbound`
214
+ from managed, local, project and user settings in that order. A held wake is still sent, because Claude
215
+ Code's approval dialog tells you a message is waiting, and the sender reads
216
+ `sent a wake to <participant> via claude-inbox, which its session holds for approval`.
217
+
218
+ The product re-run on 2.1.283 observed both the prompting case and a `bypassPermissions`
219
+ session holding the wake. When live delivery is on and your user or managed settings do not
220
+ say `accept`, `acc doctor` prints a `Claude Code inbound:` line naming the setting and the
221
+ file.
222
+
223
+ In every case the message stays durable. The receipt stays `queued` until the session's
224
+ next-turn hook shows the body. The message arrives with the session's next turn, and
225
+ `acc inbox` shows it at any time. The sender's `acc message` output still reports
226
+ `woke <participant> via claude-inbox`, because the wake reached the inbox.
227
+
193
228
  ## Codex plugin is listed but inactive
194
229
 
195
230
  Open `/plugins` in Codex and check ACC is enabled. Open `/hooks`, review each ACC hook,
@@ -333,7 +368,7 @@ reported and retained. Remove those leftovers manually if desired.
333
368
  Runtime state is outside the repository by design. `ACC_DATA_HOME` can relocate it, but ACC
334
369
  refuses a path inside any workspace root. Relocate the whole data directory; a symlink for
335
370
  that directory is supported. Install rejects a symlink that moves only the internal
336
- `acc/runtime` tree, because runtime admission and the bootstrap cache need the same data home.
371
+ `acc/runtime` tree, because the runtime launchers and their leases need the same data home.
337
372
 
338
373
  Next: [Getting started](GETTING_STARTED.md) · [Capabilities](CAPABILITIES.md) ·
339
374
  [Configuration](CONFIGURATION.md)
@@ -355,10 +390,11 @@ unrelated holds still require lifecycle cleanup or confirmed process exit; safet
355
390
  do not expire merely by elapsed time. See
356
391
  [maintenance and recovery](UPGRADING.md#confirmed-client-service-maintenance).
357
392
 
358
- If ACC 0.5.3 or 0.5.4 reports `acc-claude-channel; contract unknown` after an earlier
359
- 0.4.x upgrade, its active pointer may have lost the contract field. This can affect newly
360
- opened Channels too. A pending old updater retries its downloaded release without looking
361
- for a newer fix. Install the current global CLI, then use that CLI to complete the update:
393
+ If ACC 0.5.3 or 0.5.4 reports a Claude Code Channel process with `contract unknown` after
394
+ an earlier 0.4.x upgrade, its active pointer may have lost the contract field. This can
395
+ affect Channel processes opened after that upgrade too. A pending old updater retries its
396
+ downloaded release without looking for a newer fix. Install the current global CLI, then use
397
+ that CLI to complete the update:
362
398
 
363
399
  ```bash
364
400
  npm install -g agents-can-communicate@latest
@@ -366,9 +402,10 @@ acc update
366
402
  acc doctor
367
403
  ```
368
404
 
369
- The new reader can activate a compatible release while those Channels remain open.
405
+ The new reader can activate a compatible release while those processes remain open.
370
406
  It still waits for different contracts, unknown native bindings, or generation files it
371
407
  cannot verify. See [legacy contract recovery](UPGRADING.md#recover-missing-runtime-contracts).
408
+ Current releases retire the Channel path. See [upgrading from 0.7.x](UPGRADING.md#from-07x).
372
409
 
373
410
  Use `acc update` to retry a failed download or finish an interrupted integration refresh.
374
411
  A download failure keeps the working version. A partial integration refresh blocks
package/docs/UPGRADING.md CHANGED
@@ -1,11 +1,52 @@
1
1
  # Upgrading to 0.5.0
2
2
 
3
+ ## From 0.7.x
4
+
5
+ Claude Code live delivery wakes each session through the inbox socket that Claude Code opens
6
+ for every session. The research-preview Channels path of 0.7.x is retired. Update as usual:
7
+
8
+ ```bash
9
+ acc update
10
+ acc version
11
+ acc doctor
12
+ ```
13
+
14
+ `acc update` and `acc install` retire these 0.7.x parts automatically:
15
+
16
+ - the `claude` shim that 0.7.x put early on `PATH`, and its PATH block in `~/.zshrc`
17
+ - the Channel entry `acc-channel` in the plugin `.mcp.json`, from every kept plugin copy
18
+ - the `acc-bootstrap` and `acc-claude-channel` launchers
19
+ - the bootstrap cache
20
+
21
+ The shim and the `~/.zshrc` block are hash-checked. An edited shim or block is kept, and
22
+ the command reports it. Remove a kept one by hand when you no longer need it. An old shim
23
+ that is still on `PATH` launches the plain `claude` command, without
24
+ `--dangerously-load-development-channels`.
25
+
26
+ Live-delivery consent comes only from the installation record, and upgrading keeps the
27
+ recorded policy. ACC ignores `ACC_NATIVE_DELIVERY_POLICY`, `ACC_BYPASS` and
28
+ `ACC_BOOTSTRAP_DEBUG`. For Claude Code, the consent question now says that a session in
29
+ `bypassPermissions` mode asks before each ACC wake.
30
+
31
+ A Claude Code session that started through the old shim keeps its Channel until it exits.
32
+ Its next turn binds the inbox. Start new sessions with your ordinary `claude` command.
33
+
34
+ The Claude Code live-delivery minimum is now 2.1.282 on Apple Silicon macOS. With an older
35
+ Claude Code, live delivery stays off and the recorded policy is kept. Update Claude Code and
36
+ start a new session: the recorded policy applies to it, with nothing to install again.
37
+ `acc doctor` reports the state. Native Windows keeps next-turn delivery.
38
+
39
+ This release adds no new store event type or field, so a store it writes stays readable by
40
+ 0.7.x. The Channel captures remain as history in
41
+ `packages/adapter-claude-code/COMPATIBILITY.md`.
42
+
3
43
  ## Recover missing runtime contracts
4
44
 
5
45
  ACC 0.5.5 fixes an upgrade defect that can leave 0.5.3 or 0.5.4 waiting for
6
46
  `acc-claude-channel` processes with `contract unknown`. The 0.4.x updater can activate
7
- a newer generation without copying its store contract into the active pointer. Channels
8
- started afterward copy that incomplete pointer even though their runtime declares a contract.
47
+ a newer generation without copying its store contract into the active pointer. Claude Code
48
+ Channel processes started afterward copy that incomplete pointer even though their runtime
49
+ declares a contract.
9
50
 
10
51
  For an installation already waiting on an older pending release, run:
11
52
 
@@ -21,8 +62,8 @@ needed because the older updater retries its pending release before checking npm
21
62
  version. If a version pin selects an older release, clear it or select 0.5.5 first.
22
63
 
23
64
  The reader verifies the referenced generation's package identity, complete contents and
24
- file modes before recovering a missing contract. Compatible Channels can keep running on
25
- their original generation during activation. Explicit differing contracts and unknown
65
+ file modes before recovering a missing contract. Compatible Channel processes can keep
66
+ running on their original generation during activation. Explicit differing contracts and unknown
26
67
  native bindings still block. A generation without a contract, missing files, or changed
27
68
  contents remains unknown. ACC does not terminate these processes or edit their lease records.
28
69
 
@@ -51,15 +92,15 @@ policy is default or contains only ACC's legacy state root. Custom policies are
51
92
  and reported as unverified. See [outgoing permissions](CONFIGURATION.md#codex-outgoing-permissions).
52
93
  If doctor names a missing local service, follow its prerequisite or explicit install action
53
94
  before opening the new session. A supported explicit install can prepare the service. It
54
- does not make a session-bound channel ready.
95
+ does not make a session-bound transport ready.
55
96
 
56
97
  Run `acc doctor` in the project after the new clients have started (or submitted a normal
57
- turn). Its per-session lines now explain missing launch consent, an unidentified client
98
+ turn). Its per-session lines now explain missing consent, an unidentified client
58
99
  process and a failed or timed-out handshake. `nativeDelivery.sessions[].lastAttempt` in
59
100
  `acc doctor --json` provides the same closed metadata and timestamp. Existing owners may
60
101
  have no attempt record until a new hook runs; missing metadata does not prove hooks are
61
- disabled. A previous successful handshake and a connected MCP server do not prove that
62
- Claude admitted inbound Channels messages. See [delivery troubleshooting](TROUBLESHOOTING.md#i-enabled-live-delivery-but-got-fallback).
102
+ disabled. A previous successful handshake does not prove that the session is reachable
103
+ now. See [delivery troubleshooting](TROUBLESHOOTING.md#i-enabled-live-delivery-but-got-fallback).
63
104
 
64
105
  Upgrading preserves delivery consent. If doctor reports native delivery off and you want
65
106
  automatic peer requests, use `acc install --adapter codex --delivery actionable` (or the
package/docs/WHY_ACC.md CHANGED
@@ -53,9 +53,11 @@ coordinate across machines.
53
53
  ACC also does not merge model memory, read raw conversations, guarantee agent choices,
54
54
  approve tools, operate CI,
55
55
  or make guarded claims immune to unrelated local processes. Experimental live delivery is
56
- available through Claude Code Channel and Codex LocalDaemon on supported versions and
57
- platforms, behind recipient opt-in and with possible token spend. Neither interrupts a
58
- turn in progress; messages wait for it to finish. See [Capabilities](CAPABILITIES.md).
56
+ available through the Claude Code inbox wake and Codex LocalDaemon on supported versions and
57
+ platforms, behind recipient opt-in and with possible token spend. Both work inside the
58
+ session you opened with your ordinary command, and Claude Code needs no launcher shim.
59
+ Neither interrupts a turn in progress. A busy Claude Code session takes the message between
60
+ two tool calls, and Codex waits for the turn to finish. See [Capabilities](CAPABILITIES.md).
59
61
 
60
62
  If the sessions should remain yours and simply stop working in isolation, that is the
61
63
  product ACC is designed to be.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents-can-communicate/adapter-antigravity",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "acc",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "Coordinate this Antigravity CLI session with other AI agent sessions working in the same workspace."
5
5
  }
@@ -142,85 +142,26 @@
142
142
  },
143
143
  {
144
144
  "client": "claude-code",
145
- "version": "2.1.258",
145
+ "version": "2.1.282",
146
146
  "platform": "darwin-arm64",
147
- "observedAt": "2026-09-02T21:20:11.676Z",
147
+ "observedAt": "2026-09-25T21:35:56.792Z",
148
148
  "capability": "delivery.livePush",
149
- "fixture": "fixtures/delivery/claude-code-2.1.258.json",
149
+ "fixture": "fixtures/delivery/claude-code-2.1.282.json",
150
150
  "idleBehavior": "offered",
151
151
  "provenance": "fixtures/certification-provenance.json",
152
- "provenanceId": "native-delivery-2-1-258",
153
- "busyBehavior": "queued_after_turn",
152
+ "provenanceId": "native-delivery-2-1-282-inbox",
153
+ "busyBehavior": "presented_between_tool_calls",
154
154
  "authorityLevel": "experimental",
155
155
  "limitations": [
156
- "captured on darwin-arm64 only; Linux and Windows remain uncaptured",
157
- "the vendor development-channel warning stayed visible and was accepted by the operator by hand",
158
- "the plugin .mcp.json must live in the marketplace source copy; the plugin cache copy alone is not read",
159
- "acc_reply routed through the spike's explicit tool call; the spike created no durable ACC answer record",
160
- "presentation after the busy turn was observed by the operator; the channel log records the write at 21:18:45Z and the explicit reply at 21:19:21Z"
161
- ],
162
- "result": "pass"
163
- },
164
- {
165
- "client": "claude-code",
166
- "version": "2.1.258",
167
- "platform": "darwin-arm64",
168
- "observedAt": "2026-09-02T21:20:11.676Z",
169
- "capability": "delivery.replyRoute",
170
- "fixture": "fixtures/delivery/claude-code-2.1.258.json",
171
- "idleBehavior": "offered",
172
- "provenance": "fixtures/certification-provenance.json",
173
- "provenanceId": "native-delivery-2-1-258",
174
- "busyBehavior": "queued_after_turn",
175
- "authorityLevel": "experimental",
176
- "limitations": [
177
- "captured on darwin-arm64 only; Linux and Windows remain uncaptured",
178
- "the vendor development-channel warning stayed visible and was accepted by the operator by hand",
179
- "the plugin .mcp.json must live in the marketplace source copy; the plugin cache copy alone is not read",
180
- "acc_reply routed through the spike's explicit tool call; the spike created no durable ACC answer record",
181
- "presentation after the busy turn was observed by the operator; the channel log records the write at 21:18:45Z and the explicit reply at 21:19:21Z"
182
- ],
183
- "result": "pass"
184
- },
185
- {
186
- "client": "claude-code",
187
- "version": "2.1.260",
188
- "platform": "darwin-arm64",
189
- "observedAt": "2026-09-04T03:41:29.688Z",
190
- "capability": "delivery.livePush",
191
- "fixture": "fixtures/delivery/claude-code-2.1.260.json",
192
- "idleBehavior": "offered",
193
- "provenance": "fixtures/certification-provenance.json",
194
- "provenanceId": "native-delivery-2-1-260",
195
- "busyBehavior": "queued_after_turn",
196
- "authorityLevel": "experimental",
197
- "limitations": [
198
- "captured on darwin-arm64 only; Linux and Windows remain uncaptured",
199
- "the vendor development-channel warning stayed visible and was accepted by the operator by hand",
200
- "two ordinary sessions in one workspace, each bound to its own client process; the earlier 2.1.259 attempt is what exposed the channel binding another session identity, and this run is the verification of that fix",
201
- "duplicate was observed as one logical message id and one native offer: the repeated send took the durable path, so the channel was never asked to notify twice, and exactly one answer was recorded",
202
- "busy was observed by the operator: the running turn completed before the channel presented the message, and the session named that order in its own answer"
203
- ],
204
- "result": "pass"
205
- },
206
- {
207
- "client": "claude-code",
208
- "version": "2.1.260",
209
- "platform": "darwin-arm64",
210
- "observedAt": "2026-09-04T03:41:29.688Z",
211
- "capability": "delivery.replyRoute",
212
- "fixture": "fixtures/delivery/claude-code-2.1.260.json",
213
- "idleBehavior": "offered",
214
- "provenance": "fixtures/certification-provenance.json",
215
- "provenanceId": "native-delivery-2-1-260",
216
- "busyBehavior": "queued_after_turn",
217
- "authorityLevel": "experimental",
218
- "limitations": [
219
- "captured on darwin-arm64 only; Linux and Windows remain uncaptured",
220
- "the vendor development-channel warning stayed visible and was accepted by the operator by hand",
221
- "two ordinary sessions in one workspace, each bound to its own client process; the earlier 2.1.259 attempt is what exposed the channel binding another session identity, and this run is the verification of that fix",
222
- "duplicate was observed as one logical message id and one native offer: the repeated send took the durable path, so the channel was never asked to notify twice, and exactly one answer was recorded",
223
- "busy was observed by the operator: the running turn completed before the channel presented the message, and the session named that order in its own answer"
156
+ "Observed on darwin-arm64 with Claude Code 2.1.282 in the TUI, model Sonnet 5, auto permission mode, through a private candidate built from this branch and installed with an isolated ACC data home; the plugin registration in the real Claude config directory was restored byte for byte afterwards.",
157
+ "Every wake carried ACC wording and the message id only. The body reached the model through the UserPromptSubmit projection that each delivered wake fired, inside the untrusted acc-peer-message block.",
158
+ "An idle session started a turn with no user input. A wake sent while a Bash tool call ran was taken after that call returned and before the next one, and the turn continued.",
159
+ "The observed reply loop uses the installed acc reply CLI; native delivery.replyRoute remains false. The router reports a wake as outcome woken via claude-inbox and leaves the receipt queued until the hook's output carried the body, which records it offered via next-turn.",
160
+ "A repeated logical send kept its message id, took the durable path because the receipt was already acknowledged, and produced exactly one wake.",
161
+ "Two sessions in one workspace each bound their own inbox; a message addressed to one never woke the other.",
162
+ "An exited session left no registry entry; the next message stayed queued as recipient_unavailable.",
163
+ "A receiving session in bypassPermissions mode was not captured; Claude Code documents that such a session holds each wake whose sender does not attest bypass, and ACC never attests a mode.",
164
+ "Linux and native Windows remain uncaptured."
224
165
  ],
225
166
  "result": "pass"
226
167
  }