agents-can-communicate 0.4.0 → 0.4.2

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 (56) hide show
  1. package/README.md +102 -73
  2. package/bin/entrypoints/hook-output.mjs +7 -3
  3. package/docs/ADAPTER_AUTHORING.md +11 -1
  4. package/docs/ARCHITECTURE.md +9 -1
  5. package/docs/CAPABILITIES.md +1 -1
  6. package/docs/CLI.md +27 -5
  7. package/docs/GETTING_STARTED.md +20 -8
  8. package/docs/RELEASING.md +1 -1
  9. package/docs/SECURITY_MODEL.md +3 -1
  10. package/docs/TROUBLESHOOTING.md +69 -7
  11. package/docs/UPGRADING.md +51 -4
  12. package/docs/index.md +2 -2
  13. package/node_modules/@agents-can-communicate/adapter-claude-code/package.json +1 -1
  14. package/node_modules/@agents-can-communicate/adapter-claude-code/src/adapter.mjs +3 -3
  15. package/node_modules/@agents-can-communicate/adapter-claude-code/src/install.mjs +10 -0
  16. package/node_modules/@agents-can-communicate/adapter-codex/package.json +1 -1
  17. package/node_modules/@agents-can-communicate/adapter-codex/src/app-server-client.mjs +1 -1
  18. package/node_modules/@agents-can-communicate/adapter-codex/src/native-delivery.mjs +1 -1
  19. package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/gemini-extension.json +1 -1
  20. package/node_modules/@agents-can-communicate/adapter-gemini-cli/package.json +1 -1
  21. package/node_modules/@agents-can-communicate/adapter-grok/package.json +1 -1
  22. package/node_modules/@agents-can-communicate/adapter-grok/plugin/skills/acc/SKILL.md +22 -9
  23. package/node_modules/@agents-can-communicate/adapter-grok/src/adapter.mjs +5 -3
  24. package/node_modules/@agents-can-communicate/adapter-grok/src/hooks.mjs +9 -0
  25. package/node_modules/@agents-can-communicate/adapter-kimi/package.json +1 -1
  26. package/node_modules/@agents-can-communicate/adapter-sdk/package.json +1 -1
  27. package/node_modules/@agents-can-communicate/adapter-sdk/src/index.mjs +2 -0
  28. package/node_modules/@agents-can-communicate/adapter-sdk/src/native-attempt-writer.mjs +64 -0
  29. package/node_modules/@agents-can-communicate/adapter-sdk/src/native-attempt.mjs +65 -0
  30. package/node_modules/@agents-can-communicate/adapter-sdk/src/native-vocabulary.mjs +1 -0
  31. package/node_modules/@agents-can-communicate/cli/package.json +1 -1
  32. package/node_modules/@agents-can-communicate/cli/src/doctor-command.mjs +17 -52
  33. package/node_modules/@agents-can-communicate/cli/src/help.mjs +1 -1
  34. package/node_modules/@agents-can-communicate/cli/src/install-command.mjs +22 -46
  35. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/command.mjs +1 -0
  36. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/install.mjs +6 -1
  37. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/state.mjs +1 -0
  38. package/node_modules/@agents-can-communicate/cli/src/native-delivery-status.mjs +88 -0
  39. package/node_modules/@agents-can-communicate/cli/src/native-session-diagnostics.mjs +64 -0
  40. package/node_modules/@agents-can-communicate/cli/src/runtime-paths.mjs +1 -1
  41. package/node_modules/@agents-can-communicate/core/package.json +1 -1
  42. package/node_modules/@agents-can-communicate/delivery-router/package.json +1 -1
  43. package/node_modules/@agents-can-communicate/hook-runner/package.json +1 -1
  44. package/node_modules/@agents-can-communicate/hook-runner/src/native-attempt.mjs +43 -0
  45. package/node_modules/@agents-can-communicate/hook-runner/src/owner-context.mjs +30 -0
  46. package/node_modules/@agents-can-communicate/hook-runner/src/runner.mjs +28 -41
  47. package/node_modules/@agents-can-communicate/installer/package.json +1 -1
  48. package/node_modules/@agents-can-communicate/installer/src/delivery-diagnostics.mjs +36 -0
  49. package/node_modules/@agents-can-communicate/installer/src/detect.mjs +23 -10
  50. package/node_modules/@agents-can-communicate/installer/src/index.mjs +3 -1
  51. package/node_modules/@agents-can-communicate/installer/src/live-policy.mjs +10 -3
  52. package/node_modules/@agents-can-communicate/installer/src/plan.mjs +6 -1
  53. package/node_modules/@agents-can-communicate/mcp-server/package.json +1 -1
  54. package/node_modules/@agents-can-communicate/protocol/package.json +1 -1
  55. package/node_modules/@agents-can-communicate/storage-filesystem/package.json +1 -1
  56. package/package.json +1 -1
package/README.md CHANGED
@@ -1,23 +1,19 @@
1
1
  # agents-can-communicate
2
2
 
3
- **Open your agents. Let them coordinate.**
3
+ **Independent AI sessions. Shared work context.**
4
4
 
5
- Give Codex the backend. Ask Claude Code to build the interface. Keep working as usual.
5
+ Give Codex the backend. Ask Claude Code to build the interface. Keep using the clients
6
+ and models you prefer.
6
7
 
7
- ACC makes supported sessions in the same project aware of each other and gives them
8
- instructions for coordinating. Agents discover their peers, share what they're working
9
- on, and decide when to ask questions, agree on changes, or avoid overlapping edits.
8
+ ACC is a local coordination layer for AI sessions you open yourself. It gives them peer
9
+ presence, work intent, file claims, messages, review requests, and durable handoffs.
10
+ Each session keeps its own conversation, permissions, and task. The agents decide when
11
+ coordination helps their work.
10
12
 
11
- Think of the coordination you expect from subagents, extended across the independent
12
- sessions you open yourself — with different clients and models. You keep giving them
13
- ordinary tasks; they handle the conversations around their work.
13
+ Sessions can use different clients or multiple instances of the same one. They meet in
14
+ the same workspace on the same machine and operating-system user; Git is optional.
14
15
 
15
- Active hooks supply each agent's own CLI arguments in coordination context; the installed
16
- skill tells the agent to use them. This path was observed in Claude Code 2.1.263 and
17
- Codex 0.153.4. Hooks must be enabled and trusted by the client. Without hook context, owner
18
- operations require an explicit pair or session-bound ACC MCP tools. See [CLI ownership](docs/CLI.md#coordinate-from-a-session).
19
-
20
- [Try it](#try-it) · [Supported clients](#when-messages-arrive) · [Documentation](docs/index.md)
16
+ [Try it](#try-it) · [Client support](#when-messages-arrive) · [Update ACC](#update-or-remove-acc) · [Documentation](docs/index.md)
21
17
 
22
18
  [![CI](https://github.com/automatis-tools/agents-can-communicate/actions/workflows/ci.yml/badge.svg)](https://github.com/automatis-tools/agents-can-communicate/actions/workflows/ci.yml)
23
19
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
@@ -32,9 +28,9 @@ Open two sessions in your project and give each its task:
32
28
  | Codex | Build the backend for account registration. |
33
29
  | Claude Code | Build the registration screen. |
34
30
 
35
- ACC's integration tells the agents that peers are present and teaches them how to find
36
- out what those peers are doing. As they work, they can notice the dependency and coordinate
37
- on their own. An illustrative exchange:
31
+ Supported integrations introduce peer awareness and teach agents how to find out what
32
+ others are doing. As they work, they can notice a dependency and coordinate. An
33
+ illustrative exchange:
38
34
 
39
35
  ```text
40
36
  Claude → Codex I'm building the registration screen. What will your endpoint accept?
@@ -42,87 +38,118 @@ Codex → Claude Email and password. I'll return the new user and handle valid
42
38
  Claude → Codex I'll use that shape and keep my changes in the UI files.
43
39
  ```
44
40
 
45
- The agents identify who to talk to and what to agree on. Your prompts stay focused on
46
- the feature you want to build.
47
-
48
- The same setup supports a review and handoff. Ask one session to implement a change and
49
- request review of an identified revision: a commit when Git is available, or named files
50
- and version otherwise. Ask the other to return blocking defects or approval. The author
51
- can address the verdict before finishing, or leave a durable handoff so a later session
52
- can recover what is complete and what remains. See the
53
- [review request](docs/CLI.md#messages-and-requests) and [handoff](docs/CLI.md#handoff)
54
- commands behind that flow.
41
+ Your prompts stay focused on the feature. Each agent decides which peers and messages
42
+ matter to its task; installing ACC does not guarantee that a model will coordinate on
43
+ every task. [Client support](#when-messages-arrive) determines how automatically that
44
+ awareness reaches it.
55
45
 
56
- Each session keeps its own conversation and instructions. Response timing depends on the
57
- receiving client: see [when messages arrive](#when-messages-arrive).
46
+ The same setup supports review and recovery. An author can request review of an
47
+ identified revision, receive defects or approval, and leave a handoff describing completed
48
+ work, remaining work, and blockers. A later session can look up that history. Git commits
49
+ can identify a revision; named files and versions work when Git is unavailable.
50
+ See [requests and replies](docs/CLI.md#messages-and-requests) and
51
+ [handoffs](docs/CLI.md#handoff).
58
52
 
59
53
  ## Try it
60
54
 
61
55
  You'll need **macOS or Linux, Node.js 24 or newer**, and two AI sessions in the same
62
- project. They can use different clients or the same one.
56
+ project. Install once on the machine:
63
57
 
64
58
  ```bash
65
59
  npm install -g agents-can-communicate
66
60
  acc install
67
61
  ```
68
62
 
69
- The installer connects the clients it finds. Open a new terminal and restart your AI
70
- clients to load the integration. If you use Codex, accept its plugin trust prompt.
71
- ACC then keeps its runtime and skills updated in the background, waiting for active clients
72
- to exit before switching versions. [Update controls](docs/UPGRADING.md#automatic-updates-after-installation)
73
- include manual update, opt-out, and version pinning.
63
+ The installer connects the supported clients it finds. Follow its activation instructions,
64
+ then restart your clients from the project directory. In Codex, check `/plugins` and
65
+ review the current ACC definitions in `/hooks`; changed hooks may need fresh trust.
66
+ [Getting started](docs/GETTING_STARTED.md) covers activation and preserved sandbox settings.
74
67
 
75
- Open two sessions in your project and give them ordinary tasks, as in the example above.
76
- On supported clients, ACC introduces peer awareness through the client's own integration;
77
- its installed instructions guide the agents to coordinate when their work overlaps.
68
+ Open two sessions and give them ordinary tasks, as above. Look for an agent discovering a
69
+ peer, checking who is changing a file, asking about a shared dependency, or replying to a
70
+ review request.
78
71
 
79
- Look for coordination in the agents' own activity: discovering a peer, checking who is
80
- changing a file, or asking about a shared dependency. Each agent decides what is relevant
81
- to its task; the integration provides awareness, not a guarantee that a model will
82
- coordinate on every task. [Client support](#when-messages-arrive) determines how
83
- automatically peers and messages reach it.
72
+ Run `acc doctor` from the project if a peer is missing. A directory containing ACC's own
73
+ state, commonly your home directory, cannot be used as a workspace; start the client in a
74
+ project directory. See [Troubleshooting](docs/TROUBLESHOOTING.md).
84
75
 
85
- If the other session doesn't appear, run `acc doctor` from your project directory.
86
- [Get help with setup](docs/TROUBLESHOOTING.md).
76
+ Already using ACC? Follow the [upgrade guide](docs/UPGRADING.md), including the 0.4.0/0.4.1 →
77
+ 0.4.2 update and the data-format boundary when moving from 0.3.1.
87
78
 
88
79
  ## When messages arrive
89
80
 
90
- ACC connects sessions **on the same machine** and saves messages locally, so a waiting
91
- session can pick them up later. Delivery depends on the client:
81
+ Messages are saved locally before delivery is attempted. A durable inbox remains
82
+ available when a faster route cannot be used.
92
83
 
93
84
  | Client | How the agent receives a message |
94
85
  |---|---|
95
- | Codex CLI, Claude Code, Gemini CLI, Kimi Code | At the next normal turn on verified versions and platforms; otherwise by checking its ACC inbox. |
96
- | Grok or another client connected through [MCP](docs/MCP.md) | By checking its ACC inbox. |
86
+ | Codex CLI, Claude Code, Gemini CLI, Kimi Code | At the next normal turn on the exact verified versions and platforms; otherwise through explicit ACC inbox reads. |
87
+ | Grok | Through explicit ACC inbox reads, using its installed hooks and skill. CLI ownership was verified on Grok 1.0.24. |
88
+ | Other clients connected through [MCP](docs/MCP.md) | Through ACC tools and inbox reads. Generic MCP requires its own client configuration and coordination instructions. |
89
+
90
+ Grok's updated skill first runs public status through the terminal. The ACC hook reminder
91
+ after that result supplies the session's own CLI arguments for subsequent inbox reads and
92
+ mutations. It adds no automatic peer-message injection or idle delivery. A relocated
93
+ `GROK_HOME` is respected by install, doctor, and uninstall.
94
+
95
+ **Optional live delivery can start a turn in an idle Codex or Claude Code session.** It is
96
+ experimental, off by default, and can spend model tokens. On Apple Silicon Macs, Codex
97
+ 0.152.1 or newer requires an already-running LocalDaemon and a verified session;
98
+ Claude Code 2.1.258 or newer requires zsh and client-side Channels activation; check its
99
+ startup notice for ACC and accept the development warning when shown. An MCP connection
100
+ alone does not verify inbound delivery. Messages arriving mid-turn wait for the turn to
101
+ finish. The receiving session's
102
+ opt-in policy and current reachability determine whether delivery can proceed.
103
+ `acc install` reports each client's delivery state and can save Codex consent before its
104
+ service is available. `acc doctor` also names each session’s last native binding result,
105
+ including missing launch consent, an unidentified client process or a failed handshake.
106
+ It distinguishes a disabled policy from an unavailable service or a missing live channel
107
+ in the current project.
108
+
109
+ A Codex thread retained by LocalDaemon can receive opted-in messages after its terminal
110
+ exits. Turning ACC delivery off prevents new native offers; already accepted queue entries
111
+ remain with the client. [Compatibility and delivery controls](docs/CAPABILITIES.md) describe
112
+ the exact evidence, versions, platforms, and fallback paths.
113
+
114
+ A recorded message is send success. An offer is not proof of reading, and an
115
+ acknowledgement or reply is not proof that the requested work is complete.
97
116
 
98
- **Codex and Claude Code can also reply while idle.** These optional modes are
99
- experimental, off by default, and can spend model tokens. On Apple Silicon Macs,
100
- Codex 0.152.1 or newer requires an already-running LocalDaemon and an exact session
101
- check; ACC preserves your ordinary launch command. Claude Code 2.1.258 or newer
102
- requires zsh and its development-channel warning at startup. Messages arriving
103
- mid-turn wait for it to finish.
117
+ ## Keep the workflow you like
104
118
 
105
- Each direction follows the receiving client's policy and current reachability.
106
- A Codex thread retained by LocalDaemon can receive opted-in messages after its
107
- terminal exits. Turn ACC delivery off to prevent new native offers; already accepted
108
- queue entries remain with the client.
119
+ - **Your usual tools.** Start clients with their normal commands. You choose each agent's
120
+ task, model, and permissions.
121
+ - **Separate checkouts, one project.** Git worktrees share an ACC workspace. Plain folders
122
+ work too; optional workspace configuration can supply a shared identity and roots.
123
+ - **Agree before editing.** Agents can claim files and identify overlapping work. CLI claims
124
+ default to advisory. Guarded claims require certified guards from every live participant.
125
+ [How claims work](docs/CONCEPTS.md#intent-is-awareness-a-claim-commits).
126
+ - **Focused context and durable history.** Normal turn context is bounded. Inbox and history
127
+ return summary pages, with message bodies fetched by id. Agents can supersede or withdraw
128
+ old decisions and recover prior handoffs when needed.
129
+ - **Local coordination.** State lives in app data outside your project. ACC never collects
130
+ or shares raw transcripts; peer messages are untrusted input. Your clients keep using
131
+ their usual model providers.
109
132
 
110
- [Full compatibility details](docs/CAPABILITIES.md).
133
+ One npm package. ACC needs no separate account, model API key, or hosted service.
111
134
 
112
- ## Keep the workflow you like
135
+ ## Update or remove ACC
113
136
 
114
- - **Your usual tools.** Start clients with their normal commands. You choose each
115
- agent's task, model, and permissions.
116
- - **Separate checkouts, one project.** Git worktrees share an ACC workspace.
117
- Plain project folders work too; Git is optional.
118
- - **Agree before editing.** Agents can reserve files and identify overlapping work.
119
- CLI reservations default to advisory. `--enforcement guarded` requests enforcement,
120
- which still requires certified guards from every live participant.
121
- [How reservations work](docs/CONCEPTS.md#intent-is-awareness-a-claim-commits).
122
- - **Local coordination.** Messages live in app data outside your project. ACC doesn't
123
- collect or share raw transcripts. Your clients use their usual model providers.
137
+ Initial installation enables automatic updates. ACC downloads stable releases in the
138
+ background and waits for active clients and ACC processes to exit before switching the
139
+ runtime and refreshing integrations. Restart clients afterward and complete any requested
140
+ hook or plugin trust review.
141
+
142
+ For an immediate update:
143
+
144
+ ```bash
145
+ acc update
146
+ ```
124
147
 
125
- One npm package. No account or separate coordination service to set up.
148
+ An existing managed installation selects its new runtime through this command. Updates
149
+ also support an explicit opt-out and version pinning. Reinstalling preserves your update
150
+ preference; see [update controls](docs/UPGRADING.md#automatic-updates-after-installation).
151
+ If you fully uninstalled ACC 0.4.0 before upgrading and want automatic updates back, run
152
+ `acc update --auto on` once: that version's uninstall record lost the previous preference.
126
153
 
127
154
  To remove the integrations:
128
155
 
@@ -130,7 +157,9 @@ To remove the integrations:
130
157
  acc uninstall
131
158
  ```
132
159
 
133
- ACC preserves configuration changes you've made since installation.
160
+ ACC removes owned artifacts that still match its install record, preserves your edits and
161
+ coordination history, and pauses automatic updates. A later install remembers the update
162
+ preference.
134
163
 
135
164
  ## Go further
136
165
 
@@ -50,9 +50,13 @@ function tryWrite(stream, output) {
50
50
  export async function completeHookOutput(result,
51
51
  { stdout = process.stdout, stderr = process.stderr } = {}) {
52
52
  if (result.failed || result.timedOut) {
53
- // Hook failures can include arbitrary payload or filesystem text. Report
54
- // degradation without reflecting those details into the client's output.
55
- tryWrite(stderr, "acc: coordination unavailable; hook continued without context\n");
53
+ // Only a known code selects static recovery advice. Arbitrary payload or
54
+ // filesystem error text must never become client-visible instructions.
55
+ const recovery = result.failureCode === "workspace_contains_runtime"
56
+ ? ": workspace contains ACC runtime state; open a project directory and restart the client"
57
+ + " (or set ACC_DATA_HOME outside the workspace)"
58
+ : "";
59
+ tryWrite(stderr, `acc: coordination unavailable${recovery}; hook continued without context\n`);
56
60
  }
57
61
  try {
58
62
  await writeOutput(stdout, result.stdout ?? "", { deadlineAt: result.deadlineAt });
@@ -42,6 +42,16 @@ removal before the installer deactivates native integration or deletes recorded
42
42
  artifacts. `uninstall` should retain its own validation for direct adapter callers;
43
43
  recorded artifact fingerprint checks still determine the `keep` paths it receives.
44
44
 
45
+ `injectToolOwnerOutcome({ owner, tool })` is an optional identity-only hook callback.
46
+ The runner calls it after an allowed `beforeTool` handler only when that hook's
47
+ binding still names an open session with the same generation in this workspace.
48
+ Return `null` for an unsupported tool, or `{ stdout, stderr? }` using the client's
49
+ documented context envelope. The runner preserves the guard decision and the
50
+ owner line's byte budget. The callback receives no peer bodies or raw tool input;
51
+ it cannot create a session or advance receipts. Grok uses it to supply CLI owner
52
+ arguments after a terminal result. This does not certify general context or peer
53
+ delivery, and a tool such as `finish` can close the owner before the line arrives.
54
+
45
55
  `renderContextResult` is required wherever an adapter renders peer messages. It returns
46
56
  `{ text, offeredMessageIds, includedAttentionIds }`, and the [receipt
47
57
  lifecycle](PROTOCOL.md#receipt-lifecycle) advances only from those ids — never by searching
@@ -197,7 +207,7 @@ Measure them. Every client differs, and a wrong shape fails **silently**:
197
207
  | Codex | exit 2 + stderr | plain stdout (`developer` message) |
198
208
  | Claude Code | `hookSpecificOutput.permissionDecision` | same envelope |
199
209
  | Gemini CLI | `{"decision":"block"}` | `hookSpecificOutput` envelope |
200
- | Grok | `{"decision":"deny","reason"}` (documented; deny not yet captured) | UserPromptSubmit stdout discarded on 1.0.13 |
210
+ | Grok | `{"decision":"deny","reason"}` (documented; deny not yet captured) | UserPromptSubmit stdout discarded; own identity only via PreToolUse after a terminal result, observed on 1.0.24 |
201
211
  | Kimi Code | `hookSpecificOutput.permissionDecision` | plain stdout |
202
212
 
203
213
  `denyOutcome(reason)` returns `{ stdout, stderr, exitCode }`, so the runtime never has to
@@ -68,7 +68,13 @@ livePolicy · opaqueEndpointRef · leaseUntil
68
68
 
69
69
  Core validates identity and expiry but never interprets the opaque endpoint. That remains
70
70
  inside the owning adapter. `acc status` reports available modes, policy, reachability, and
71
- lease without exposing the endpoint.
71
+ lease without exposing the endpoint. The hook runner also replaces one optional native
72
+ attempt diagnostic beside its session-owner file: closed policy/process/handshake
73
+ metadata with a timestamp, never vendor output. Doctor joins it only to the current open
74
+ generation and reports it separately from transport and receipt facts. It is not journalled
75
+ or projected into agent context; session restart replaces it and SessionEnd attempts bounded
76
+ cleanup. Doctor ignores closed or superseded generations even if cleanup could not finish. Diagnostic disk I/O runs in an
77
+ unreferenced worker, so a stalled write cannot hold the hook process open.
72
78
 
73
79
  ## Certified capability versus current reachability
74
80
 
@@ -104,6 +110,8 @@ A lone session can remain ephemeral. Durable state materialises when a second li
104
110
  appears or the first claim, message, or handoff is committed. Solo presence therefore
105
111
  does not require durable workspace history. Native turn hooks still supply the session's
106
112
  own CLI arguments, so a peer joining later in the same turn does not require reattachment.
113
+ Grok instead receives that own header after a terminal tool result through PreToolUse;
114
+ the first public status call makes it available for subsequent owned commands.
107
115
  Without relevant coordination context, that identity header is the only projected content.
108
116
 
109
117
  ## Inbox, attention, and projection
@@ -56,7 +56,7 @@ The limitations belong next to the adapters they affect:
56
56
  | Codex | Exact 0.147.0 next-turn context 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. |
57
57
  | 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). |
58
58
  | Gemini CLI | Only 0.57.0 has package-shipped next-turn certification. 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. |
59
- | Grok | 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. |
59
+ | 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. |
60
60
  | Kimi Code | 0.36.1 has next-turn and guard evidence, 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. |
61
61
  | Generic MCP | As a receiver, tool polling is not next-turn injection, live push, or a native reply route. It has no write guard or client-lifecycle evidence. Outgoing messages may use an eligible recipient's opted-in native adapter. |
62
62
 
package/docs/CLI.md CHANGED
@@ -239,8 +239,9 @@ external AI client. An addressed handoff requires acknowledgement; a room handof
239
239
  `--delivery off|actionable|all` is a per-client recipient policy request, not a capability
240
240
  switch, and the default is `off`. `--adapter` is repeatable to name several clients. An
241
241
  explicit `--delivery` applies uniformly and never prompts; omitting it on an interactive
242
- terminal asks one default-No question per eligible client, and on a non-interactive run or a
243
- `--dry-run` it keeps fresh clients off. A recorded opt-in is kept on upgrade. If the detected
242
+ terminal asks one default-No question per supported client. Codex can save consent while
243
+ its local service is unavailable or has no loaded session; this does not activate delivery.
244
+ A non-interactive run or a `--dry-run` keeps fresh clients off. A recorded opt-in is kept on upgrade. If the detected
244
245
  client cannot receive native delivery - unsupported, below the captured minimum, a
245
246
  prerelease, known-bad, a wrong platform, or an unsupported shell - installation keeps the
246
247
  effective policy off and prints the reason. Claude Code shell activation writes an owned
@@ -248,9 +249,30 @@ zsh PATH block and a shim that `exec`s the real client; `ACC_BYPASS=1` bypasses
248
249
  activation. Codex LocalDaemon delivery uses recorded installation consent without changing
249
250
  ordinary launch arguments. Its opt-in remains active when shim variables are absent or
250
251
  bypassed; `acc install --adapter codex --delivery off` disables new native offers. ACC never
251
- starts or stops the vendor daemon. See [delivery consent](CONFIGURATION.md#keep-delivery-consent-user-owned).
252
-
253
- A normal `acc install` enables automatic updates. A background worker checks stable releases
252
+ starts or stops the vendor daemon. The install summary names each client's requested policy,
253
+ activation state and verified fallback. `doctor` separates protocol readiness, recorded
254
+ consent and a live channel in the current workspace, with a next step for missing activation.
255
+ A supported version or an installed plugin alone is not an active delivery channel.
256
+ `runtime: active` means ACC has a reachable local transport binding. Claude can still
257
+ block inbound Channels messages while its MCP server and tools remain connected;
258
+ doctor therefore also names the client-side startup check.
259
+ In doctor JSON, `nativeDelivery.activation` distinguishes missing launch setup from a
260
+ recorded setup (or `not_required` for a pre-existing service). `policy` is the installed
261
+ choice; `sessionPolicy` describes a native binding when one is visible. Existing Claude
262
+ sessions can retain their launch policy after a different choice is installed for new
263
+ sessions; Codex checks current recorded consent before new offers.
264
+ `nativeDelivery.sessions` lists each current session's identity, present transport state
265
+ and `lastAttempt`: timestamp, startup/turn event, effective policy and its source, whether
266
+ that policy was missing/invalid/off, whether a client process was identified, and the closed
267
+ handshake result/reason. `lastAttempt: null` means no usable attempt was observed for this
268
+ generation; it does not prove hooks are disabled. A past successful handshake is separate
269
+ from current transport reachability. ACC replaces this small diagnostic beside the
270
+ hook-owner file outside the repository; it never adds attempt history to agent context.
271
+ See [delivery consent](CONFIGURATION.md#keep-delivery-consent-user-owned).
272
+
273
+ An initial `acc install` enables automatic updates. Reinstalling preserves an explicit
274
+ `acc update --auto off` choice. A full uninstall pauses updates; reinstalling restores
275
+ the remembered setting. A background worker checks stable releases
254
276
  at most once a day, downloads and verifies a separate runtime, then refreshes installed
255
277
  integrations and skills after ACC process leases and native binding holds clear. ACC leases
256
278
  require confirmed process exit; a native binding can clear on observed SessionEnd even
@@ -4,16 +4,19 @@ Install ACC, open the AI sessions you already use, and give them related work. S
4
4
  integrations make peers visible and teach each agent how to communicate. You do not need to
5
5
  carry messages between windows or add coordination instructions to your task prompts.
6
6
 
7
- Active hooks supply each agent's own CLI arguments in coordination context; the installed
8
- skill tells the agent to use them. This path was observed in Claude Code 2.1.263 and
9
- Codex 0.153.4. Hooks must be enabled and trusted by the client. Without hook context, owner
10
- operations require an explicit pair or session-bound ACC MCP tools. See [CLI ownership](CLI.md#coordinate-from-a-session).
7
+ Active hooks can supply each agent's own CLI arguments; the installed skill tells the
8
+ agent how to use them. This path was observed in Claude Code 2.1.263, Codex 0.153.4, and
9
+ Grok 1.0.24. Grok receives its own header after a terminal result, so its skill runs public
10
+ status first; peer messages still require explicit inbox reads. Hooks must be enabled and
11
+ trusted by the client. Without that owner context, owned operations require an explicit
12
+ pair or session-bound ACC MCP tools. See [CLI ownership](CLI.md#coordinate-from-a-session).
11
13
 
12
14
  ## 1. Install once on this machine
13
15
 
14
16
  ACC requires macOS or Linux and Node.js 24 or newer.
15
17
 
16
- Already using 0.3.1? Follow the [upgrade guide](UPGRADING.md) before mixing versions.
18
+ Already using ACC? Follow the [upgrade guide](UPGRADING.md) for the 0.4.0/0.4.1 → 0.4.2
19
+ update or the data-format boundary when upgrading from 0.3.1.
17
20
 
18
21
  ```bash
19
22
  npm install -g agents-can-communicate
@@ -24,7 +27,8 @@ npm install -g agents-can-communicate
24
27
  acc install
25
28
  ```
26
29
 
27
- Installation also enables automatic updates. ACC downloads releases in the background and
30
+ Initial installation also enables automatic updates; reinstalling keeps an explicit opt-out.
31
+ ACC downloads releases in the background and
28
32
  refreshes its runtime and skills when active clients have left. Use `acc update` for an
29
33
  immediate update, or `acc update --auto off` to disable background updates. See
30
34
  [update controls](UPGRADING.md#automatic-updates-after-installation).
@@ -40,8 +44,16 @@ state directory is in `sandbox_workspace_write.writable_roots` in the config it
40
44
  ACC keeps those user settings unchanged. Installed files alone do not establish that hooks
41
45
  are active; `acc doctor` leaves current readiness unverified and directs you to Codex.
42
46
 
43
- If you opt into Claude Code's experimental idle delivery, Claude also shows its own
44
- development-channel warning at every startup. The feature is off by default, can spend
47
+ Read the delivery summary for each client. Live delivery needs an explicit opt-in and a
48
+ verified channel in the current session. Codex can save your choice even when its local
49
+ service is not running yet. Declining uses the reported fallback: `acc inbox`, or next-turn
50
+ hooks only where the exact client version and platform are certified.
51
+
52
+ If you opt into Claude Code's experimental idle delivery, check Claude's Channels startup
53
+ notice for ACC and accept its development-channel warning when shown. If it reports Channels
54
+ unavailable or blocked, a connected MCP server does not make inbound delivery work;
55
+ see [troubleshooting](TROUBLESHOOTING.md#i-enabled-live-delivery-but-got-fallback).
56
+ The feature is off by default, can spend
45
57
  model tokens, and currently requires Apple Silicon macOS, zsh, and Claude Code 2.1.258 or
46
58
  newer. You do not need it for durable messages or supported next-turn delivery.
47
59
 
package/docs/RELEASING.md CHANGED
@@ -1,7 +1,7 @@
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.4.0`;
4
+ its evidence tied to the commit that supplied its bytes. The package is currently `0.4.2`;
5
5
  the commands derive the version from `package.json` so the filename cannot drift.
6
6
 
7
7
  ```mermaid
@@ -104,7 +104,9 @@ from operating merely because its own state is unavailable.
104
104
 
105
105
  ## Managed automatic updates
106
106
 
107
- A normal managed installation enables automatic updates. The latency-sensitive hook path
107
+ An initial managed installation enables automatic updates; later installs preserve an
108
+ explicit opt-out. Full uninstall pauses updates while retaining the setting for a later
109
+ reinstall. The latency-sensitive hook path
108
110
  does no network download; it may schedule a detached worker. That worker uses the configured
109
111
  npm registry/network and local npm executable, checks stable package identity/version and
110
112
  sha512 integrity against registry metadata, installs with lifecycle scripts disabled, and
@@ -24,12 +24,32 @@ requires plugin trust.
24
24
  ACC does not launch a missing session. Open it normally after fixing the installation or
25
25
  workspace path.
26
26
 
27
+ ## A hook says `workspace contains ACC runtime state`
28
+
29
+ The current directory contains ACC's own state, so ACC cannot use it as a workspace.
30
+ This commonly happens when a client starts in your home directory (`~`). The client
31
+ continues normally, but ACC provides no coordination context there.
32
+
33
+ Open a project directory and restart the client from it. A project inside your home
34
+ works normally; Git is optional. If you intentionally need the broader directory as
35
+ a workspace, configure `ACC_DATA_HOME` outside it for all participating clients.
36
+ This changes the state location; it does not migrate existing history or integrations.
37
+
38
+ For a generic `coordination unavailable` warning, run `acc status --json` from the
39
+ same directory to see the detailed workspace error, and `acc doctor` to check the
40
+ installation. Hook warnings deliberately omit arbitrary paths and error details.
41
+
27
42
  ## CLI says `caller_identity_unresolved`
28
43
 
29
44
  ACC cannot prove which session owns this shell command. A hook-created presence record
30
45
  and the client's native session ID are not shell credentials. Restarting hooks alone does
31
46
  not fix this CLI limitation.
32
47
 
48
+ In Grok, run public `acc status --json` through the terminal tool first. With the
49
+ updated integration, the ACC hook reminder arrives after that result and supplies
50
+ the session's own CLI arguments. Restart Grok after refreshing its integration;
51
+ a header returned with `finish` belongs to the session that just closed.
52
+
33
53
  Use this session's ACC MCP tools if available. For a manual CLI workflow, open your own
34
54
  session with `acc attach --participant my-session --json`, retain the returned `sessionId`
35
55
  and `generation`, and pass both as `--session` and `--generation` on subsequent mutations
@@ -74,13 +94,51 @@ For Codex, use your ordinary launch command with 0.152.1 or newer on Apple Silic
74
94
  macOS. Its LocalDaemon must already be running, and trusted hooks must establish
75
95
  the receiver's exact thread and workspace. Embedded sessions, an absent socket,
76
96
  ambiguous recipients or failed identity checks retain durable inbox access.
77
- `acc doctor` reports current eligibility. ACC preserves requested consent through
78
- a temporary daemon outage and does not start the daemon for you.
97
+ `acc doctor` reports readiness, consent and the current workspace's live channel separately.
98
+ `native_endpoint_unavailable` means the local service endpoint is missing or is not a safe socket;
99
+ `native_session_unavailable` means the service answered but has no loaded thread to probe.
100
+ An interactive install can save consent in either case. ACC preserves it through a temporary
101
+ outage and does not start the daemon for you.
102
+
103
+ Check `acc doctor --json` and `acc status --json` while both clients are open. If policy is
104
+ `off`, opt in with `acc install --adapter codex --delivery actionable` (or select another
105
+ adapter). This can spend model tokens. If policy is enabled but runtime is `waiting` and
106
+ `deliveryBindings` is empty, no live channel is bound in this workspace. Start a new client
107
+ session, check its integration prompts and re-run doctor. A healthy store, online peers,
108
+ or a connected MCP server does not by itself establish automatic delivery. `lifecycle:
109
+ manual` can also mean the current version has no certified session-end hook; it does not
110
+ prove that no hooks ran.
79
111
 
80
112
  For Claude Code, open a fresh interactive zsh after installation so its launcher
81
- is on PATH, and accept its visible development-channel warning. A failed channel
82
- connection may remain in Claude's `~/.claude/mcp-needs-auth-cache.json` for about
83
- fifteen minutes; remove only the `acc` entry and restart if that is the cause.
113
+ is on PATH. Check Claude's **Channels startup notice for ACC**, and accept the
114
+ development-channel warning when it appears. A successful bootstrap cache means the
115
+ executable passed ACC's compatibility probe. `/mcp` showing `connected` and two tools
116
+ means the MCP server connected. Even `runtime: active` in ACC's doctor JSON describes
117
+ the local transport; none of these proves that Claude enabled inbound channel messages.
118
+
119
+ If Claude says `--dangerously-load-development-channels ignored` or `Channels are not
120
+ currently available`, it has not enabled that delivery path. On a fresh 2.1.266 test
121
+ profile, the first launch showed those messages and the next launch showed the development
122
+ warning; restarting once can recheck availability, but is not a guaranteed fix. If it
123
+ remains unavailable, follow Claude's notice. Organization policy can also block Channels;
124
+ an administrator must enable them where required. ACC does not override that policy.
125
+ See [Claude's Channels documentation](https://code.claude.com/docs/en/channels).
126
+
127
+ If `deliveryBindings` is empty, ACC has not bound a local transport either. Read the
128
+ per-session lines in `acc doctor`, or `nativeDelivery.sessions[].lastAttempt` in JSON:
129
+
130
+ - An absent launch policy means that hook did not receive delivery consent, even if an
131
+ earlier bootstrap probe succeeded. For Claude, open a new terminal and client through
132
+ the installed launcher.
133
+ - `client_process_unknown` means ACC could not identify the client process. A new client
134
+ session repeats that lookup.
135
+ - `handshake_failed` or `handshake_timeout` means the session could not bind the local
136
+ channel. Check the client's integration/channel setup; the next ordinary turn retries.
137
+ - No attempt observed can mean no native hook ran, an older runtime wrote the owner, or
138
+ diagnostic persistence failed. Check hook activation and the runtime versions in doctor.
139
+
140
+ The timestamp describes the last attempt for that exact generation. A past successful
141
+ handshake does not establish a currently reachable channel or client-side admission.
84
142
 
85
143
  Closing a Codex terminal can leave its daemon thread loaded and eligible. Use
86
144
  `acc install --adapter codex --delivery off` to stop new ACC native offers.
@@ -112,8 +170,12 @@ or start the session somewhere trusted.
112
170
 
113
171
  ## Grok shows no injected message
114
172
 
115
- Grok 1.0.13 discarded UserPromptSubmit context in the real capture. Its next-turn and guard
116
- capabilities remain false. Use `acc status` and `acc inbox`; do not wait for a banner.
173
+ Grok discards UserPromptSubmit context. On the observed 1.0.24 client, run public
174
+ `acc status --json` in its terminal first: the ACC hook reminder after the result
175
+ supplies your own `--session` and `--generation` pair for subsequent inbox reads and
176
+ mutations. Restart Grok after refreshing its installed hooks and skill. Its next-turn,
177
+ live delivery, and guard capabilities remain false; peer messages require explicit inbox
178
+ reads. If the header never arrives, report missing ownership rather than adopting a peer.
117
179
 
118
180
  ## Kimi sessions remain in history
119
181