agents-can-communicate 0.3.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/README.md +95 -52
  2. package/SECURITY.md +1 -1
  3. package/bin/acc-bootstrap.mjs +5 -54
  4. package/bin/acc-claude-channel.mjs +8 -175
  5. package/bin/acc-hook.mjs +4 -133
  6. package/bin/acc-mcp.mjs +4 -59
  7. package/bin/acc-update-worker.mjs +8 -0
  8. package/bin/acc.mjs +5 -39
  9. package/bin/entrypoints/acc-bootstrap.mjs +47 -0
  10. package/bin/entrypoints/acc-claude-channel.mjs +149 -0
  11. package/bin/entrypoints/acc-hook.mjs +58 -0
  12. package/bin/entrypoints/acc-mcp.mjs +70 -0
  13. package/bin/entrypoints/acc.mjs +51 -0
  14. package/bin/entrypoints/claude-channel-stdio.mjs +29 -0
  15. package/bin/entrypoints/hook-output.mjs +77 -0
  16. package/docs/ADAPTER_AUTHORING.md +52 -8
  17. package/docs/ARCHITECTURE.md +64 -11
  18. package/docs/CAPABILITIES.md +41 -37
  19. package/docs/CLI.md +145 -25
  20. package/docs/CONCEPTS.md +13 -6
  21. package/docs/CONFIGURATION.md +37 -22
  22. package/docs/DESIGN_DECISIONS.md +16 -11
  23. package/docs/GETTING_STARTED.md +41 -7
  24. package/docs/GLOSSARY.md +9 -3
  25. package/docs/HOW_IT_WORKS.md +32 -11
  26. package/docs/MCP.md +91 -24
  27. package/docs/PROTOCOL.md +69 -12
  28. package/docs/RELEASING.md +28 -10
  29. package/docs/SECURITY_MODEL.md +47 -13
  30. package/docs/TROUBLESHOOTING.md +102 -20
  31. package/docs/UPGRADING.md +154 -0
  32. package/docs/WHY_ACC.md +5 -4
  33. package/docs/index.md +8 -0
  34. package/node_modules/@agents-can-communicate/adapter-claude-code/package.json +1 -1
  35. package/node_modules/@agents-can-communicate/adapter-claude-code/plugin/skills/acc/SKILL.md +106 -5
  36. package/node_modules/@agents-can-communicate/adapter-claude-code/src/install.mjs +6 -6
  37. package/node_modules/@agents-can-communicate/adapter-claude-code/src/native-delivery.mjs +2 -1
  38. package/node_modules/@agents-can-communicate/adapter-codex/certification.json +38 -13
  39. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/certification-provenance.json +220 -0
  40. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.152.1-local-daemon-current-binding-product-evidence.json +1549 -0
  41. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.152.1-local-daemon-current-binding-product.json +27 -0
  42. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.152.1-local-daemon-product-evidence.json +1549 -0
  43. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.152.1-local-daemon-product.json +27 -0
  44. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.152.1-local-daemon-transport-evidence.json +259 -0
  45. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.152.1-local-daemon-transport.json +21 -0
  46. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.153.4-local-daemon-current-binding-product-evidence.json +1549 -0
  47. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.153.4-local-daemon-current-binding-product.json +27 -0
  48. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.153.4-local-daemon-product-evidence.json +1549 -0
  49. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.153.4-local-daemon-product.json +27 -0
  50. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.153.4-local-daemon-transport-evidence.json +259 -0
  51. package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.153.4-local-daemon-transport.json +21 -0
  52. package/node_modules/@agents-can-communicate/adapter-codex/package.json +14 -2
  53. package/node_modules/@agents-can-communicate/adapter-codex/plugin/skills/acc/SKILL.md +106 -5
  54. package/node_modules/@agents-can-communicate/adapter-codex/src/adapter.mjs +26 -44
  55. package/node_modules/@agents-can-communicate/adapter-codex/src/app-server-client.mjs +70 -17
  56. package/node_modules/@agents-can-communicate/adapter-codex/src/config-block.mjs +231 -0
  57. package/node_modules/@agents-can-communicate/adapter-codex/src/hooks.mjs +1 -1
  58. package/node_modules/@agents-can-communicate/adapter-codex/src/install.mjs +71 -63
  59. package/node_modules/@agents-can-communicate/adapter-codex/src/native-delivery.mjs +107 -103
  60. package/node_modules/@agents-can-communicate/adapter-codex/src/native-endpoint.mjs +96 -0
  61. package/node_modules/@agents-can-communicate/adapter-codex/src/ws-json-rpc.mjs +3 -2
  62. package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/gemini-extension.json +1 -1
  63. package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/skills/acc/SKILL.md +106 -5
  64. package/node_modules/@agents-can-communicate/adapter-gemini-cli/package.json +1 -1
  65. package/node_modules/@agents-can-communicate/adapter-gemini-cli/src/install.mjs +2 -2
  66. package/node_modules/@agents-can-communicate/adapter-grok/package.json +1 -1
  67. package/node_modules/@agents-can-communicate/adapter-grok/plugin/skills/acc/SKILL.md +122 -8
  68. package/node_modules/@agents-can-communicate/adapter-grok/src/adapter.mjs +5 -3
  69. package/node_modules/@agents-can-communicate/adapter-grok/src/hooks.mjs +9 -0
  70. package/node_modules/@agents-can-communicate/adapter-grok/src/install.mjs +2 -2
  71. package/node_modules/@agents-can-communicate/adapter-kimi/package.json +1 -1
  72. package/node_modules/@agents-can-communicate/adapter-kimi/plugin/skills/acc/SKILL.md +106 -5
  73. package/node_modules/@agents-can-communicate/adapter-kimi/src/hooks.mjs +1 -1
  74. package/node_modules/@agents-can-communicate/adapter-kimi/src/install.mjs +2 -2
  75. package/node_modules/@agents-can-communicate/adapter-sdk/package.json +1 -1
  76. package/node_modules/@agents-can-communicate/adapter-sdk/src/capabilities.mjs +5 -0
  77. package/node_modules/@agents-can-communicate/adapter-sdk/src/context-projector.mjs +26 -4
  78. package/node_modules/@agents-can-communicate/adapter-sdk/src/decision-text.mjs +19 -0
  79. package/node_modules/@agents-can-communicate/adapter-sdk/src/hook-shim.mjs +5 -3
  80. package/node_modules/@agents-can-communicate/adapter-sdk/src/index.mjs +1 -0
  81. package/node_modules/@agents-can-communicate/adapter-sdk/src/native-delivery.mjs +9 -2
  82. package/node_modules/@agents-can-communicate/adapter-sdk/src/native-vocabulary.mjs +2 -6
  83. package/node_modules/@agents-can-communicate/adapter-sdk/src/session-binding.mjs +29 -9
  84. package/node_modules/@agents-can-communicate/adapter-sdk/src/toml-block.mjs +8 -6
  85. package/node_modules/@agents-can-communicate/cli/package.json +4 -2
  86. package/node_modules/@agents-can-communicate/cli/src/args.mjs +49 -22
  87. package/node_modules/@agents-can-communicate/cli/src/doctor-command.mjs +11 -4
  88. package/node_modules/@agents-can-communicate/cli/src/git-probe.mjs +9 -3
  89. package/node_modules/@agents-can-communicate/cli/src/help.mjs +109 -14
  90. package/node_modules/@agents-can-communicate/cli/src/install-command.mjs +24 -5
  91. package/node_modules/@agents-can-communicate/cli/src/main.mjs +35 -12
  92. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/activation.mjs +110 -0
  93. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/command.mjs +64 -0
  94. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/download.mjs +71 -0
  95. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/entry.mjs +110 -0
  96. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/generation.mjs +167 -0
  97. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/install.mjs +78 -0
  98. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/launchers.mjs +60 -0
  99. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/leases.mjs +60 -0
  100. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/location.mjs +55 -0
  101. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/mutex.mjs +145 -0
  102. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/policy.mjs +4 -0
  103. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/refresh.mjs +40 -0
  104. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/schedule.mjs +21 -0
  105. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/state.mjs +123 -0
  106. package/node_modules/@agents-can-communicate/cli/src/managed-runtime/worker.mjs +65 -0
  107. package/node_modules/@agents-can-communicate/cli/src/runtime-paths.mjs +1 -1
  108. package/node_modules/@agents-can-communicate/cli/src/session-owner.mjs +33 -108
  109. package/node_modules/@agents-can-communicate/cli/src/update-command.mjs +25 -7
  110. package/node_modules/@agents-can-communicate/core/package.json +1 -1
  111. package/node_modules/@agents-can-communicate/core/src/attention.mjs +3 -0
  112. package/node_modules/@agents-can-communicate/core/src/claims.mjs +13 -8
  113. package/node_modules/@agents-can-communicate/core/src/conversations.mjs +9 -25
  114. package/node_modules/@agents-can-communicate/core/src/decision-changes.mjs +36 -0
  115. package/node_modules/@agents-can-communicate/core/src/decision-state.mjs +42 -0
  116. package/node_modules/@agents-can-communicate/core/src/delivery-bindings.mjs +11 -4
  117. package/node_modules/@agents-can-communicate/core/src/inbox.mjs +48 -17
  118. package/node_modules/@agents-can-communicate/core/src/intents.mjs +35 -15
  119. package/node_modules/@agents-can-communicate/core/src/materialisation.mjs +7 -5
  120. package/node_modules/@agents-can-communicate/core/src/message-pages.mjs +75 -0
  121. package/node_modules/@agents-can-communicate/core/src/next-turn-delivery.mjs +31 -0
  122. package/node_modules/@agents-can-communicate/core/src/session-opening.mjs +128 -0
  123. package/node_modules/@agents-can-communicate/core/src/sessions.mjs +58 -132
  124. package/node_modules/@agents-can-communicate/core/src/sync.mjs +31 -2
  125. package/node_modules/@agents-can-communicate/delivery-router/package.json +1 -1
  126. package/node_modules/@agents-can-communicate/delivery-router/src/refresh-binding.mjs +38 -0
  127. package/node_modules/@agents-can-communicate/delivery-router/src/router.mjs +86 -10
  128. package/node_modules/@agents-can-communicate/hook-runner/package.json +1 -1
  129. package/node_modules/@agents-can-communicate/hook-runner/src/client-version.mjs +1 -0
  130. package/node_modules/@agents-can-communicate/hook-runner/src/native-binding.mjs +6 -4
  131. package/node_modules/@agents-can-communicate/hook-runner/src/native-retirement.mjs +48 -0
  132. package/node_modules/@agents-can-communicate/hook-runner/src/owner-context.mjs +30 -0
  133. package/node_modules/@agents-can-communicate/hook-runner/src/process-table.mjs +1 -1
  134. package/node_modules/@agents-can-communicate/hook-runner/src/runner.mjs +172 -67
  135. package/node_modules/@agents-can-communicate/hook-runner/src/session-lifecycle.mjs +13 -0
  136. package/node_modules/@agents-can-communicate/installer/package.json +1 -1
  137. package/node_modules/@agents-can-communicate/installer/src/apply.mjs +17 -2
  138. package/node_modules/@agents-can-communicate/installer/src/bootstrap-runtime.mjs +11 -5
  139. package/node_modules/@agents-can-communicate/installer/src/detect.mjs +1 -1
  140. package/node_modules/@agents-can-communicate/installer/src/index.mjs +1 -0
  141. package/node_modules/@agents-can-communicate/installer/src/live-policy.mjs +21 -0
  142. package/node_modules/@agents-can-communicate/installer/src/native-activation.mjs +20 -6
  143. package/node_modules/@agents-can-communicate/installer/src/ownership.mjs +10 -4
  144. package/node_modules/@agents-can-communicate/installer/src/plan.mjs +3 -3
  145. package/node_modules/@agents-can-communicate/mcp-server/package.json +1 -1
  146. package/node_modules/@agents-can-communicate/mcp-server/src/protocol.mjs +85 -0
  147. package/node_modules/@agents-can-communicate/mcp-server/src/resources.mjs +3 -2
  148. package/node_modules/@agents-can-communicate/mcp-server/src/server.mjs +59 -57
  149. package/node_modules/@agents-can-communicate/mcp-server/src/tools.mjs +47 -33
  150. package/node_modules/@agents-can-communicate/protocol/package.json +1 -1
  151. package/node_modules/@agents-can-communicate/protocol/src/conversations.mjs +3 -0
  152. package/node_modules/@agents-can-communicate/protocol/src/decision-changes.mjs +15 -0
  153. package/node_modules/@agents-can-communicate/protocol/src/index.mjs +3 -1
  154. package/node_modules/@agents-can-communicate/protocol/src/schema.mjs +14 -5
  155. package/node_modules/@agents-can-communicate/storage-filesystem/package.json +1 -1
  156. package/node_modules/@agents-can-communicate/storage-filesystem/src/atomic-json.mjs +5 -1
  157. package/node_modules/@agents-can-communicate/storage-filesystem/src/deadline.mjs +7 -0
  158. package/node_modules/@agents-can-communicate/storage-filesystem/src/index.mjs +2 -0
  159. package/node_modules/@agents-can-communicate/storage-filesystem/src/session-read.mjs +25 -0
  160. package/node_modules/@agents-can-communicate/storage-filesystem/src/store.mjs +28 -25
  161. package/package.json +2 -1
@@ -28,6 +28,7 @@ export function createExampleAdapter() {
28
28
 
29
29
  detect, install, uninstall, doctor,
30
30
  planInstall, // what install would write
31
+ preflightUninstall, // optional read-only removal validation
31
32
  normalizeHook, // client payload -> normalised event
32
33
  renderContext, // SyncResult -> text
33
34
  renderContextResult, // text + ids of complete rendered groups
@@ -36,6 +37,21 @@ export function createExampleAdapter() {
36
37
  }
37
38
  ```
38
39
 
40
+ `preflightUninstall(context)` is optional and read-only. Throw to refuse unsafe
41
+ removal before the installer deactivates native integration or deletes recorded
42
+ artifacts. `uninstall` should retain its own validation for direct adapter callers;
43
+ recorded artifact fingerprint checks still determine the `keep` paths it receives.
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
+
39
55
  `renderContextResult` is required wherever an adapter renders peer messages. It returns
40
56
  `{ text, offeredMessageIds, includedAttentionIds }`, and the [receipt
41
57
  lifecycle](PROTOCOL.md#receipt-lifecycle) advances only from those ids — never by searching
@@ -46,6 +62,12 @@ convenience API for adapters that don't need it. An adapter with only the older
46
62
  instead: repeating an untracked body every turn would be quieter in code and dishonest about
47
63
  what was actually delivered.
48
64
 
65
+ The hook also supplies `reminderMessageIds`, derived from this participant's `offered` or
66
+ `retrieved` receipts with unresolved obligations. The standard projector combines those
67
+ reply/acknowledgement attention items into counts after new bodies. A missing body alone
68
+ is not evidence for compaction. Counts add no ids to `offeredMessageIds` or
69
+ `includedAttentionIds`; complete inbox and status results remain available.
70
+
49
71
  `client.command` does double duty. `detect.mjs` uses it as the version-probe binary, and
50
72
  presence liveness separately walks the hook's process ancestry for the first ancestor whose
51
73
  executable basename matches it, to learn the client's own pid. Declare the binary the client
@@ -119,9 +141,30 @@ The rules `defineAdapter` enforces, and the ones the runtime applies:
119
141
  when numerically newer. `knownBad` names exact versions or inclusive intervals.
120
142
  - Exact-version certification still governs every non-native capability;
121
143
  `effectiveCapabilities()` is unchanged. The native rule is used for live delivery alone.
122
- - The three native methods return closed facts (`validateNativeActivationPlan()` closes the
144
+ - Native methods return closed facts (`validateNativeActivationPlan()` closes the
123
145
  activation plan) and never put vendor data - endpoints, sockets, raw errors - into core.
124
146
 
147
+ `nativeDelivery.policySource` defaults to the session environment. An adapter may
148
+ declare `"installation-record"` when hooks and senders must read current recorded
149
+ recipient consent independently of the vendor process environment. Installation
150
+ records the requested policy even when current activation is unavailable. An absent
151
+ or invalid record means `off`; a previously published binding cannot override it.
152
+
153
+ The optional `refreshNativeSession()` method may revalidate an expired lease before
154
+ an offer. It returns the same closed handshake shape as `bindNativeSession()` and
155
+ must preserve the exact endpoint and protocol identity. The router rechecks the
156
+ current session, generation, retirement, uniqueness and policy before publishing
157
+ the refreshed lease. Refresh is not a heartbeat and cannot extend presence beyond
158
+ its own expiry. Optional `retireNativeSession()` cleans adapter-owned endpoint state
159
+ after confirmed core retirement; it must remain bounded and fail open for hooks.
160
+
161
+ A package-shipped passing Codex installed-hook capture additionally references its
162
+ complete real product matrix through the selected provenance record's
163
+ `productEvidence: { fixture, sha256 }`. Package verification checks the actual file,
164
+ raw digest and client/version/platform/package identity. A transport-only capture
165
+ cannot certify the installed product route. `historicalFixtures` may retain hashed
166
+ earlier failures without duplicating a certification tuple.
167
+
125
168
  ## Choose the integration depth
126
169
 
127
170
  | Tier | You register | You get | You do not get |
@@ -131,12 +174,13 @@ The rules `defineAdapter` enforces, and the ones the runtime applies:
131
174
  | 2 | hooks + skill | only the lifecycle, context, guard, and next-turn behaviors separately captured for this client | uncaptured hook behaviors |
132
175
  | 3 | + native delivery surface | only captured live-push and reply-route modes | safe-point injection or child sessions unless separately captured |
133
176
 
134
- Installed hook wiring may reach tier 2, but the effective capability is still limited to
135
- an exact certified client/version/platform. Tier 3 ships for one client: Claude Code, from
136
- 2.1.258 on macOS arm64, behind the native delivery contract above. Codex reached a passing
137
- queue capture and was withdrawn anyway - the mode its transport needs reports the daemon's
138
- workspace as the session's - which is the standard: a capture that works is not the same
139
- claim as a capability that is safe to ship.
177
+ Installed hook wiring may reach tier 2, but each effective hook capability still
178
+ requires exact client/version/platform evidence. Tier 3 has separate native
179
+ contracts: Claude Code Channel from 2.1.258 and Codex LocalDaemon from 0.152.1 on
180
+ macOS arm64, with current probes and exact session handshakes. Codex's earlier
181
+ remote-wrapper failure remains historical evidence. Ordinary launch now preserves
182
+ workspace identity; the full installed product matrix, including negative controls
183
+ and fallback, backs its native claim.
140
184
 
141
185
  ## Normalize hook input
142
186
 
@@ -163,7 +207,7 @@ Measure them. Every client differs, and a wrong shape fails **silently**:
163
207
  | Codex | exit 2 + stderr | plain stdout (`developer` message) |
164
208
  | Claude Code | `hookSpecificOutput.permissionDecision` | same envelope |
165
209
  | Gemini CLI | `{"decision":"block"}` | `hookSpecificOutput` envelope |
166
- | 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 |
167
211
  | Kimi Code | `hookSpecificOutput.permissionDecision` | plain stdout |
168
212
 
169
213
  `denyOutcome(reason)` returns `{ stdout, stderr, exitCode }`, so the runtime never has to
@@ -81,12 +81,12 @@ a third exact-version certification check. A binding says what that current gene
81
81
  exposes and whether its lease is current, while recipient policy says whether it may spend a
82
82
  turn.
83
83
 
84
- Claude Code is the one client that proved the live seam: a Channel capture on 2.1.258,
85
- confirmed on 2.1.260 through the installed package, admitted by minimum-plus-probe rather
86
- than an exact version. Codex's queue transport passed its capture and the capability was
87
- withdrawn, because the mode it needs hides the session's workspace. Gemini CLI and Kimi
88
- Code have exact-version next-turn evidence only; Grok and generic MCP use inbox polling.
89
- The seam exists for every adapter; only one has earned it.
84
+ Claude Code Channel has installed-client evidence on 2.1.258 and 2.1.260; Codex
85
+ LocalDaemon has it on 0.152.1 and 0.153.4. Both use a captured platform minimum,
86
+ current probe and exact session handshake. Codex preserves the ordinary client
87
+ launch and verifies its registered thread and workspace; ACC owns no vendor daemon
88
+ lifecycle. Gemini CLI and Kimi Code have exact-version next-turn evidence only;
89
+ Grok and generic MCP use inbox polling.
90
90
 
91
91
  ## Storage and workspace identity
92
92
 
@@ -101,17 +101,31 @@ file ACC writes is an optional `acc.workspace.json` explicitly requested through
101
101
  `acc config init`.
102
102
 
103
103
  A lone session can remain ephemeral. Durable state materialises when a second live session
104
- appears or the first claim, message, or handoff is committed. This makes “silent when
105
- alone” an architectural behavior, not a UI preference.
104
+ appears or the first claim, message, or handoff is committed. Solo presence therefore
105
+ does not require durable workspace history. Native turn hooks still supply the session's
106
+ own CLI arguments, so a peer joining later in the same turn does not require reattachment.
107
+ Grok instead receives that own header after a terminal tool result through PreToolUse;
108
+ the first public status call makes it available for subsequent owned commands.
109
+ Without relevant coordination context, that identity header is the only projected content.
106
110
 
107
111
  ## Inbox, attention, and projection
108
112
 
109
- Inbox reads only messages addressed to the calling participant and advances that
110
- participant's receipt to `retrieved`. Reply validates ownership, creates an `answer` in the
113
+ Public inbox discovery uses core `listInbox`: bounded, read-only message summaries
114
+ addressed to the current participant. Exact body reads use `readInbox` and advance only
115
+ that participant's receipt to `retrieved`; the embedded core API still supports bulk
116
+ retrieval. History sync reads message records without receipt changes, using the same
117
+ summary pager or one exact id. Reply validates ownership, creates an `answer` in the
111
118
  same thread, and acknowledges the original atomically. No participant can advance another
112
119
  participant's receipt.
113
120
 
114
- Attention is computed from six explicit rules:
121
+ Decision lifecycle is derived from immutable message links, without a new record kind
122
+ or mutable decision store. Read copies carry bounded status; raw forensic snapshots stay
123
+ unchanged. Non-head decisions leave pending inbox, bulk delivery, and attention while
124
+ exact reads retain them. Replacement/withdrawal records inherit recipients before commit,
125
+ so offline readers receive the change without a forged acknowledgement. See
126
+ [the protocol contract](PROTOCOL.md#decision-lifecycle).
127
+
128
+ Attention is computed from six explicit rules for current obligations:
115
129
 
116
130
  | Priority | Kind | Observable trigger |
117
131
  |---|---|---|
@@ -129,6 +143,14 @@ Adapters project peer bodies in an attributed untrusted frame. If a complete bod
129
143
  fit, the projection keeps the message id and points to `acc inbox --message <id>` instead
130
144
  of silently truncating it.
131
145
 
146
+ For this participant's unresolved messages already `offered` or `retrieved`, the standard
147
+ projector combines reply and acknowledgement reminders into a compact count after new
148
+ message bodies. Queued obligations and claim conflicts remain individual attention items.
149
+ All pending headers stay discoverable through `acc inbox` pages; owned `acc status` retains
150
+ its complete attention list. Full bodies require an exact inbox read; projection
151
+ does not acknowledge or delete records. Explicit decision links, rather than the
152
+ projector or message age, retire old decision obligations.
153
+
132
154
  ## Hooks fail open
133
155
 
134
156
  Hook execution is bounded. If coordination state cannot be read or a decision cannot be
@@ -137,3 +159,34 @@ it, but a coordination tool must not be the reason a session stops working.
137
159
 
138
160
  Next: [Protocol](PROTOCOL.md) · [Capabilities](CAPABILITIES.md) ·
139
161
  [Security model](SECURITY_MODEL.md)
162
+
163
+ ## Managed runtime activation
164
+
165
+ The CLI owns installation generations under `<dataHome>/acc/runtime`, outside workspaces.
166
+ All five launch paths select a generation and publish an actual-process lease under one
167
+ admission mutex before loading workspace-capable code. Immutable launcher modules and
168
+ runtime directories preserve in-progress imports. Leases survive `main()` returning and
169
+ are removed only after confirmed process death. Parsed help, version, and update recovery
170
+ remain available when workspace admission is unavailable.
171
+
172
+ An independent worker downloads npm packages with lifecycle scripts disabled, checks exact
173
+ stable package identity and the discovered integrity, and health-checks the staged runtime.
174
+ Installer detection and planning happen before exclusive admission. The worker then checks
175
+ ACC process leases and native binding PIDs, records `activating`, applies every integration,
176
+ and only publishes the new active pointer after all applications succeed. Partial refresh
177
+ remains fenced and repairs forward, with the old active pointer retained but normal
178
+ workspace admission unavailable until recovery completes. Native bindings cease holding
179
+ after observed SessionEnd cleanup or confirmed process death; the vendor daemon may remain
180
+ running. Unknown PIDs remain holds until lifecycle cleanup. Presence TTL, `acc finish`,
181
+ and delivery off alone do not prove native lifecycle end. ACC never manages the daemon.
182
+
183
+ Lock ownership never expires by age. Retained nonempty tombstones prevent delayed observers
184
+ from reclaiming a successor. Under an acquired lock, maintenance removes historical
185
+ bookkeeping only when no live or unknown contender could still reference it; a stopped
186
+ contender postpones cleanup. Admission also removes confirmed-dead process leases. None of
187
+ this metadata is agent conversation history or injected context.
188
+
189
+ The first upgrade from an unmanaged binary still requires a restart. ACC cannot fence old
190
+ direct binaries or external applications importing core. Native trust and client-side cache
191
+ activation remain vendor responsibilities; refreshed files do not establish observed
192
+ capabilities.
@@ -3,8 +3,8 @@
3
3
  Use this page to set expectations after installation. Integration means ACC can introduce
4
4
  peer awareness and coordination instructions; it does not guarantee what a model will do
5
5
  with them. Delivery also varies independently from awareness. The durable inbox works for
6
- every participant, supported exact versions may add next-turn delivery, and only the
7
- experimental Claude Code channel can deliver while a session is idle.
6
+ every participant, supported exact versions may add next-turn delivery, and the
7
+ experimental Codex LocalDaemon and Claude Code Channel paths can deliver while a session is idle.
8
8
 
9
9
  Capability honesty separates four questions that are easy to collapse:
10
10
 
@@ -16,8 +16,8 @@ Capability honesty separates four questions that are easy to collapse:
16
16
  kind?
17
17
  4. **Fallback** — what durable path remains when any earlier answer is no?
18
18
 
19
- A source method or vendor documentation is not certification. Unknown versions and
20
- platforms degrade to false. No weaker session inherits a stronger peer's capability.
19
+ A source method or vendor documentation is not certification. Uncaptured hook versions and
20
+ unsupported platforms degrade to false. Native minimum-based eligibility is separate. No weaker session inherits a stronger peer's capability.
21
21
 
22
22
  Run `acc doctor` in the project when observed behavior differs from this page. It reports
23
23
  the installed client version, platform, effective capability, and fallback instead of
@@ -42,24 +42,23 @@ Passing evidence currently ships for these exact versions on `darwin-arm64`:
42
42
  Every other capability in the closed shape defaults to false, including session resume,
43
43
  child sessions, startup or safe-point injection, and before-read guards.
44
44
 
45
- The `delivery.livePush` and `delivery.replyRoute` row is `no` for the exact hook versions
46
- this matrix is keyed to. Native live delivery is captured on a newer client - Claude Code
47
- 2.1.258, livePush and replyRoute, confirmed again on 2.1.260 through the installed package -
48
- and is admitted through the native delivery contract rather than exact-version
49
- certification: it is off until a per-client opt-in, experimental, and never turns on for a
50
- client below the captured minimum. Codex's queue capture passed and the capability was
51
- withdrawn; the row below says why.
45
+ The native rows remain `no` for the older exact hook versions in this matrix.
46
+ Separate installed-client captures establish Codex `livePush` on 0.152.1 and
47
+ 0.153.4, and Claude Code `livePush` plus `replyRoute` on 2.1.258 and 2.1.260.
48
+ Native eligibility uses the captured platform minimum, a current feature probe,
49
+ and an exact per-session handshake. It is experimental and requires recipient
50
+ opt-in. Codex replies through `acc reply`; its native `replyRoute` remains false.
52
51
 
53
52
  The limitations belong next to the adapters they affect:
54
53
 
55
54
  | Adapter | Exact limitation and evidence |
56
55
  |---|---|
57
- | Codex | 0.147.0 next-turn stdout arrives as unwrapped developer-role context and requires plugin trust. A 0.152.1 capture proved the App Server queue transport, but the release capture then measured that native delivery there requires `codex --remote unix://`, and in that mode the session runs inside the daemon: both the hook payload and the App Server's own thread record report the daemon's directory instead of the session's, so ACC cannot tell which workspace the session is in. Nothing ACC can reach carries the real one, and placing a session in the wrong workspace is worse than not placing it, so `delivery.livePush` is **not** claimed - the probe and the handshake both refuse with `workspace_identity_unavailable`. `replyRoute` stays false. |
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. |
58
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). |
59
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. |
60
- | 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. |
61
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. |
62
- | Generic MCP | Tool polling is not next-turn injection, live push, or a native reply route. It has no write guard or client-lifecycle evidence. |
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. |
63
62
 
64
63
  `certification.json` beside each adapter is machine-readable. `COMPATIBILITY.md` records the
65
64
  captured client behavior, including what could not be observed.
@@ -71,25 +70,28 @@ would publish a generation-bound binding with `availableModes`, `clientVersion`,
71
70
  `livePolicy`, and `leaseUntil`. `acc status --json` reports these as `deliveryBindings`
72
71
  with a computed `reachable` boolean while keeping the opaque endpoint private.
73
72
 
74
- The router requires exactly one current eligible generation. No binding, an expired lease,
75
- several live sessions for one participant, and an adapter refusal each keep delivery on the
76
- durable fallback. Busy behavior belongs to the transport: Claude's Channel can accept a
73
+ The router requires exactly one current eligible generation. No binding, several live
74
+ sessions for one participant, and an adapter refusal keep delivery on the durable
75
+ fallback. An expired lease may be revalidated by an adapter's optional refresh method;
76
+ failure leaves the message queued. Busy behavior belongs to the transport: Claude's Channel can accept a
77
77
  message while the target is busy and queue it until the current turn finishes; an adapter
78
78
  that instead refuses with `recipient_busy` leaves the message on the durable path.
79
79
 
80
- The lease is extended by whoever serves the endpoint, because only that process knows it is
81
- still alive. A client that publishes no heartbeat - Claude Code among them - would otherwise
82
- let the lease run out under an idle session, which is exactly when live delivery is worth
83
- having. Giving a binding up is a separate, final fact rather than an expired lease, so a
84
- channel that has not yet noticed cannot extend something the session already retired.
80
+ An endpoint may renew its lease, or an adapter may revalidate that exact endpoint on
81
+ demand without a client heartbeat. Retirement is final: neither route may revive a
82
+ retired binding, a closed session or an old generation. Delivery lease refresh does
83
+ not renew participant presence.
85
84
 
86
- Current shipped reality: Claude Code on darwin-arm64 has a passing experimental `livePush`
87
- capture behind the native delivery contract, off until a per-client opt-in. Codex is
88
- next-turn and inbox only: its queue transport works, but the mode that makes a session
89
- reachable is the mode that hides which workspace it is in. Every other client is next-turn or
90
- inbox only. Gemini CLI and Kimi Code are next-turn only at their exact captured versions;
91
- Grok and MCP poll inbox. On Linux, the shipped captures above do not establish next-turn or
92
- live delivery, so the honest expectation is the durable inbox.
85
+ On darwin-arm64, Codex LocalDaemon and Claude Code Channel have captured
86
+ experimental live delivery. Other adapters retain their separately certified
87
+ next-turn paths or inbox polling. Linux and other uncaptured platforms retain
88
+ the durable inbox; these captures establish no new hook capabilities there.
89
+
90
+ Codex's 120-second delivery lease can refresh on demand for the same live endpoint;
91
+ it does not extend the 24-hour participant presence limit. A TUI exit can leave its
92
+ daemon thread loaded and able to execute opted-in messages. Actual thread teardown,
93
+ including explicit archive, runs `SessionEnd` and retires the binding. Turning ACC
94
+ delivery off prevents new offers even while that thread remains loaded.
93
95
 
94
96
  ## Recipient policy
95
97
 
@@ -102,14 +104,16 @@ policy:
102
104
  | `actionable` | questions, requests, answers, decisions, and addressed handoffs may use live push; notes wait for the next turn |
103
105
  | `all` | every addressed message kind may use live push |
104
106
 
105
- The default is `off`. `acc install --delivery actionable|all` is an explicit request, not
106
- a force switch. Exact-version certification governs ordinary hook capabilities. Native live
107
- delivery is separate: the installer applies the requested policy only when the client meets
108
- the captured minimum version, runs on a captured platform, and passes the current feature
109
- probe; otherwise effective policy remains off and the fallback diagnostic is printed. Each
110
- enabled session must then pass its generation-bound handshake. A failed handshake clears or
111
- refuses that session's binding and reports degraded reachability without rewriting the
112
- installed consent. Room messages are never live-push candidates.
107
+ The default is `off`. `acc install --delivery actionable|all` records recipient consent.
108
+ Current activation remains off when the platform, captured minimum or feature probe
109
+ does not qualify; that temporary failure does not erase the requested policy. Each
110
+ session must pass its own generation-bound handshake. An adapter using the installation
111
+ record rereads consent at hooks and before offers, so a long-running vendor process
112
+ cannot retain permission through an old environment value or binding snapshot.
113
+
114
+ For an adapter using recorded consent, `--delivery off` and uninstall prevent new
115
+ native offers. They cannot withdraw a submission already accepted by the vendor queue. Ordinary hook capabilities still
116
+ require exact-version certification. Room messages are never live-push candidates.
113
117
 
114
118
  ## Fallback
115
119
 
package/docs/CLI.md CHANGED
@@ -12,24 +12,62 @@ acc help
12
12
  acc version
13
13
  ```
14
14
 
15
+ Use `acc <command> --help` (or `-h`) and `acc help <command>` for that command's
16
+ required, optional, repeatable and flag options, accepted values, and usage notes.
17
+ For example, `acc work --help` lists intent modes, and `acc finish --help` lists
18
+ handoff statuses. `acc config --help` lists its subcommands;
19
+ `acc config init --help` and `acc help config init` describe initialization.
20
+
21
+ Add `--json` to receive the command description as structured data: `name`,
22
+ `summary`, `required`, `optional`, `repeated`, `flags`, `subcommands`, `choices`,
23
+ and `notes`, plus `subcommand` when selected. General `acc help --json` keeps its
24
+ grouped `commands` result. Help requires no session, workspace discovery, or
25
+ runtime storage, and does not execute the described command. A help-looking
26
+ option value remains data: `--body --help` sends the literal body `--help`.
27
+
15
28
  ## Coordinate from a session
16
29
 
17
30
  | Command | Required | Optional |
18
31
  |---|---|---|
19
- | `acc status` | — | `--participant`, `--all` |
20
- | `acc sync` | — | `--session`, `--cursor`, `--limit`, `--scope delta|full` |
32
+ | `acc status` | — | `--session`, `--generation`, `--participant`, `--all` |
33
+ | `acc sync` | — | `--session`, `--generation`, `--cursor`, `--limit`, `--scope delta|full|history`, `--type`, `--message`, `--current` |
21
34
  | `acc work` | `--summary` unless `--clear` | `--session`, `--generation`, `--mode`, `--state`, repeated `--hint`, `--clear` |
22
35
  | `acc claim` | `--resource` | `--session`, `--generation`, `--mode`, `--enforcement`, `--reason`, `--lease` |
23
- | `acc release` | `--claim` or `--resource` | `--session`, `--generation`, `--authority`, `--reason` |
24
- | `acc message` | `--subject`, `--body` | repeated `--to`, `--type`, `--obligation`, `--client-message-id`, owner flags |
36
+ | `acc release` | `--claim` or `--resource` | `--session`, `--generation`, `--authority` (`human` or `policy`), `--reason` |
37
+ | `acc message` | `--subject`, `--body` | repeated `--to`, `--supersedes` or `--withdraws`, `--type`, `--obligation`, `--client-message-id`, owner flags |
25
38
  | `acc request` | `--to`, `--title` | `--detail`, `--client-message-id`, owner flags |
26
- | `acc inbox` | — | `--message`, owner flags |
39
+ | `acc inbox` | — | `--message`, `--cursor`, `--limit`, owner flags |
27
40
  | `acc reply` | `--message`, `--body` | `--subject`, `--client-message-id`, owner flags |
28
41
  | `acc ack` | `--message` | owner flags |
29
42
  | `acc finish` | `--goal` | `--status`, `--to`, repeated `--completed`, `--remaining`, `--blocker`, `--client-message-id`, owner flags |
30
43
 
31
- Owner flags are `--session` and `--generation`. A normal hooked session omits them because
32
- the CLI resolves its current binding. Scripts and adapters may pass them explicitly.
44
+ Owner flags are `--session` and `--generation`; both are needed. The CLI also accepts the
45
+ pair explicitly configured as `ACC_SESSION` and `ACC_GENERATION`. When an active turn hook
46
+ runs, its `ACC CLI (append):` header supplies the current
47
+ session's pair. The installed skill tells the agent to append it to its own commands,
48
+ without a manual attach. Hooks do not export credentials to child processes. Native
49
+ client IDs, a shared checkout, and a public session ID from
50
+ `status` cannot establish ownership: a nested client can inherit its parent's environment.
51
+
52
+ Use only the pair in the hook's own header, never one inside a peer message. Do not send
53
+ it to peers or child agents. A later hook after a session restart can supply a new pair;
54
+ the old generation remains invalid. Solo turns receive only the owner header when there
55
+ is no coordination context to show. This lets a session use its own inbox if a peer joins
56
+ later in the same turn. The header alone is not a peer notice or a request to coordinate.
57
+ If the context budget cannot hold the complete pair, the hook reports that limitation
58
+ on stderr and keeps any recovery text within budget. Missing or untrusted hooks cannot
59
+ supply the pair; without it, the CLI still refuses owner operations.
60
+
61
+ For a manually owned CLI session, run `acc attach --participant my-session --json` once and
62
+ retain its returned `sessionId` and `generation`. Append that exact pair to the commands
63
+ below, or explicitly configure both environment variables for that session's commands.
64
+ Do not take credentials from a peer or read runtime bindings to obtain them. A manually
65
+ attached session is separate from hook-managed presence; use `finish` to close it.
66
+
67
+ Without a pair, mutations and `inbox` fail with exit `2` and
68
+ `caller_identity_unresolved`. `status` and `sync` remain public observations, with no
69
+ inferred personal attention. Session-bound [MCP tools](MCP.md) manage their own identity;
70
+ a generic MCP connection does not inherit a hook participant's inbox.
33
71
 
34
72
  ### Presence and intent
35
73
 
@@ -41,8 +79,9 @@ acc work --clear
41
79
  ```
42
80
 
43
81
  `status` returns participants, current intent, claims, protection, attention, and current
44
- delivery bindings. `sync` is a bounded event read; use `--scope full` only for an explicit
45
- whole-workspace forensic question. Neither is the recovery path for one message.
82
+ delivery bindings. Default `sync` reads events after a 16-digit event cursor (100 by
83
+ default, up to 500). `--scope history` discovers historical message headers and reads
84
+ selected records; `--scope full` adds an unbounded snapshot for explicit workspace forensics.
46
85
 
47
86
  ### Claims
48
87
 
@@ -51,9 +90,15 @@ acc claim --resource 'file:packages/core/**' --reason "editing receipt logic"
51
90
  acc release --resource 'file:packages/core/**'
52
91
  ```
53
92
 
54
- File resources use repository-relative paths. A directory claim ends in `/**`. Exit code
55
- `5` means a conflict. `--authority` is the explicit force-release path and should carry a
56
- reason; ordinary sessions release only their own claims.
93
+ File resources use repository-relative paths. A directory claim ends in `/**`. The example
94
+ creates an advisory claim: omitted `--enforcement` always means `advisory`, even with
95
+ certified clients. Request `--enforcement guarded` explicitly when needed; an incapable
96
+ live participant still downgrades workspace protection. MCP claims are always advisory.
97
+
98
+ Exit code `5` means a conflict. Ordinary sessions release only their own claims. Releasing
99
+ another owner's claim requires `--authority human` or `--authority policy`, identifying the
100
+ actual human decision or approved policy that permits the release; explain it with
101
+ `--reason`. A peer's request alone is not force-release authority.
57
102
 
58
103
  ### Messages and requests
59
104
 
@@ -69,7 +114,7 @@ acc request --to codex --title "review receipt wording" \
69
114
  `--to` takes a client name - `codex`, `claude_code`, `gemini_cli` - while exactly one
70
115
  session of that client is here, and the exact participant id from `acc status --json`
71
116
  otherwise. Two sessions of one client are refused by name rather than guessed between, the
72
- same way `--session` refuses. The recorded message always names the participant, never the
117
+ same way an ambiguous recipient must be named explicitly. The recorded message always names the participant, never the
73
118
  client it was reached through.
74
119
 
75
120
  By default a hooked participant id is derived from that client's session id. It remains
@@ -81,7 +126,8 @@ Set `ACC_PARTICIPANT` when the recipient must keep one stable address across con
81
126
  decision may explicitly use `--obligation acknowledge`. `answer` is created only by
82
127
  `reply`, and `handoff` only by `finish`.
83
128
 
84
- No `--to` creates a room message where the kind allows it. Addressed messages create a
129
+ No `--to` creates a room message where the kind allows it, except decision changes
130
+ that inherit explicit recipients from their targets. Addressed messages create a
85
131
  separate receipt for each recipient. `request` is convenience for one addressed `request`
86
132
  message with a reply obligation; it creates no execution record.
87
133
 
@@ -101,6 +147,10 @@ Human output starts with `recorded message_x`. A transport failure after that co
101
147
  not change the command exit code. Reuse an explicit `--client-message-id` after an
102
148
  uncertain result to recover the same logical message.
103
149
 
150
+ `reply` additionally returns `receipt`: the original message id, the replying participant,
151
+ and state `acknowledged`. Its `message` and `delivery` describe the outgoing answer.
152
+ Human output distinguishes `recorded <reply-id>` from `acknowledged <original-id>`.
153
+
104
154
  ### Inbox, reply, and acknowledgement
105
155
 
106
156
  ```bash
@@ -110,10 +160,56 @@ acc reply --message message_x --body "Yes. Use offered."
110
160
  acc ack --message message_y
111
161
  ```
112
162
 
113
- Inbox returns only unresolved messages addressed to this participant. Reading advances
114
- that participant's receipt to `retrieved`. Reply creates an `answer` in the same thread and
115
- acknowledges the original atomically. `ack` acknowledges without writing an answer and has
116
- no state override.
163
+ Without `--message`, inbox returns `{items, nextCursor}`. Each item has a `message`
164
+ summary and its `receipt`; listing never returns bodies or changes receipts. Summaries
165
+ include the complete message/thread/sender ids, kind, obligation, timestamp, reply link,
166
+ subject (up to 160 UTF-8 bytes), `bodyBytes`, `artifactCount`, and untrusted attribution.
167
+ Bodies, artifact details, handoff payloads, and recipient lists require an exact read.
168
+
169
+ Pages are newest first (descending message id breaks timestamp ties), default to 20 items,
170
+ and contain at most 12,000 bytes of formatted page JSON, excluding the CLI envelope.
171
+ `--limit` accepts 1..500 but cannot raise the byte ceiling. Continue with
172
+ `acc inbox --cursor <nextCursor>` until it is `null`. The cursor is a complete message id,
173
+ not an offset; reading or acknowledging it does not shift the next page. These are live
174
+ pages: omit the cursor to see new arrivals. An unknown or foreign cursor is an error.
175
+
176
+ `--message <id>` returns the existing one-item array with the complete message/receipt
177
+ pair, advancing that participant's receipt to `retrieved` when needed. It cannot be
178
+ combined with `--cursor` or `--limit`. An exact id also reads an acknowledged message,
179
+ preserving its receipt, timestamp, and event history.
180
+ Use the original message id to inspect acknowledgement; the outgoing reply belongs to
181
+ its recipient's inbox. Resolved messages stay out of the ordinary inbox.
182
+
183
+ Reply creates an `answer` in the same thread and acknowledges the original atomically.
184
+ `ack` acknowledges without writing an answer and has no state override.
185
+
186
+ ### Historical recovery
187
+
188
+ ```bash
189
+ acc sync --scope history --type handoff --json
190
+ acc sync --scope history --type handoff --cursor message_x --json
191
+ acc sync --scope history --message message_y --json
192
+ ```
193
+
194
+ History returns `{scope: "history", view: "summary", items, nextCursor}` with the same
195
+ summary fields, ordering, page limits, and message-id cursors as inbox. `--type` accepts
196
+ any message kind and filters before pagination; keep the same filter between pages.
197
+ This public workspace observation includes records from before your session joined.
198
+ Exact history reads return `view: "message"` and one complete message in `items`,
199
+ without changing any receipt. Do not combine `--message` with type, cursor, or limit;
200
+ message and type are valid only in history scope. Decision reads also include `decisionStatus`. Use
201
+ `acc sync --scope history --type decision --current --json` for terminal decisions
202
+ and withdrawals; keep these filters when paging. Exact reads cannot use `--current`.
203
+ `current` means no explicit successor, not truth or consensus.
204
+
205
+ To change a decision, send another `acc message --type decision` with repeated
206
+ `--supersedes <message-id>` or `--withdraws <message-id>` (1..16 unique IDs; exclusive).
207
+ Use subject/body for the new position or withdrawal reason. Changes inherit the target
208
+ recipients and authors, including offline participants; `--to` adds recipients.
209
+ Any owned participant can record an attributed change. Multiple successor branches
210
+ remain conflicted until a new change explicitly references all current alternatives.
211
+ Old records leave ordinary inbox/automatic attention without any receipt change;
212
+ exact inbox and history still recover them. See [decision lifecycle](PROTOCOL.md#decision-lifecycle).
117
213
 
118
214
  ### Handoff
119
215
 
@@ -136,7 +232,7 @@ external AI client. An addressed handoff requires acknowledgement; a room handof
136
232
  | `acc doctor` | `--home`, `--repair` |
137
233
  | `acc config init` | `--yes`, `--force` |
138
234
  | `acc config validate` | — |
139
- | `acc update` | `--apply` |
235
+ | `acc update` | `--check`, `--auto on\|off`, `--pin VERSION\|none`, `--apply` (alias) |
140
236
  | `acc help` | — |
141
237
  | `acc version` | — |
142
238
 
@@ -147,12 +243,36 @@ terminal asks one default-No question per eligible client, and on a non-interact
147
243
  `--dry-run` it keeps fresh clients off. A recorded opt-in is kept on upgrade. If the detected
148
244
  client cannot receive native delivery - unsupported, below the captured minimum, a
149
245
  prerelease, known-bad, a wrong platform, or an unsupported shell - installation keeps the
150
- effective policy off and prints the reason. A live install writes an owned zsh PATH block and
151
- a per-command shim that keeps your command name and `exec`s the real client; `ACC_BYPASS=1`
152
- runs the unmodified client, and ACC is never the parent of the session after that `exec`.
153
-
154
- Only `update` touches the network. `ACC_NO_UPDATE_CHECK=1` disables update checks. Hooks
155
- never perform them.
246
+ effective policy off and prints the reason. Claude Code shell activation writes an owned
247
+ zsh PATH block and a shim that `exec`s the real client; `ACC_BYPASS=1` bypasses that
248
+ activation. Codex LocalDaemon delivery uses recorded installation consent without changing
249
+ ordinary launch arguments. Its opt-in remains active when shim variables are absent or
250
+ 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
+ An initial `acc install` enables automatic updates. Reinstalling preserves an explicit
254
+ `acc update --auto off` choice. A full uninstall pauses updates; reinstalling restores
255
+ the remembered setting. A background worker checks stable releases
256
+ at most once a day, downloads and verifies a separate runtime, then refreshes installed
257
+ integrations and skills after ACC process leases and native binding holds clear. ACC leases
258
+ require confirmed process exit; a native binding can clear on observed SessionEnd even
259
+ while its vendor daemon remains alive, or on confirmed process death. Unknown PIDs remain
260
+ holds. `finish`, presence TTL, and delivery off are not observed native end. Hooks do not
261
+ wait for network work. `ACC_NO_UPDATE_CHECK=1` disables update networking and background
262
+ scheduling.
263
+
264
+ `acc update` requests the update immediately; it reports a pending update when a running or
265
+ unidentified client prevents activation. `--check` only checks and cannot be combined with
266
+ settings changes. `--auto off` disables background updates, and `--auto on` enables them.
267
+ `--pin 0.4.0` holds an exact stable version; `--pin none` follows stable releases. A pin
268
+ cannot downgrade the active runtime. The old `--apply` flag remains accepted.
269
+
270
+ Failed downloads keep the working runtime. A failed integration refresh exits with code
271
+ `4`, names the failed adapter and configuration error, and keeps workspace admission closed.
272
+ Fix the reported configuration problem, then run `acc update` to finish it. `acc doctor`
273
+ reports the update policy and pending notice. Native clients may still require hook trust
274
+ or activation review. See [Upgrading](UPGRADING.md) for the initial 0.3.1 transition and
275
+ recovery details.
156
276
 
157
277
  ## Integrate a client lifecycle
158
278