agents-can-communicate 0.2.0 → 0.3.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.
- package/README.md +91 -81
- package/SECURITY.md +7 -4
- package/bin/acc-bootstrap.mjs +56 -0
- package/bin/acc-claude-channel.mjs +177 -0
- package/bin/acc.mjs +7 -2
- package/docs/ADAPTER_AUTHORING.md +57 -21
- package/docs/ARCHITECTURE.md +23 -15
- package/docs/CAPABILITIES.md +51 -18
- package/docs/CLI.md +31 -13
- package/docs/CONCEPTS.md +91 -94
- package/docs/CONFIGURATION.md +33 -23
- package/docs/DESIGN_DECISIONS.md +8 -4
- package/docs/GETTING_STARTED.md +76 -100
- package/docs/GLOSSARY.md +4 -4
- package/docs/HOW_IT_WORKS.md +163 -0
- package/docs/MCP.md +8 -8
- package/docs/PROTOCOL.md +13 -8
- package/docs/RELEASING.md +112 -82
- package/docs/SECURITY_MODEL.md +13 -8
- package/docs/TROUBLESHOOTING.md +30 -12
- package/docs/WHY_ACC.md +18 -16
- package/docs/index.md +26 -16
- package/node_modules/@agents-can-communicate/adapter-claude-code/certification.json +196 -46
- package/node_modules/@agents-can-communicate/adapter-claude-code/fixtures/certification-provenance.json +237 -45
- package/node_modules/@agents-can-communicate/adapter-claude-code/fixtures/delivery/claude-code-2.1.252.json +3 -1
- package/node_modules/@agents-can-communicate/adapter-claude-code/fixtures/delivery/claude-code-2.1.258.json +23 -0
- package/node_modules/@agents-can-communicate/adapter-claude-code/fixtures/delivery/claude-code-2.1.260.json +23 -0
- package/node_modules/@agents-can-communicate/adapter-claude-code/package.json +5 -2
- package/node_modules/@agents-can-communicate/adapter-claude-code/plugin/.mcp.json +8 -0
- package/node_modules/@agents-can-communicate/adapter-claude-code/plugin/skills/acc/SKILL.md +10 -6
- package/node_modules/@agents-can-communicate/adapter-claude-code/src/adapter.mjs +34 -2
- package/node_modules/@agents-can-communicate/adapter-claude-code/src/channel.mjs +377 -0
- package/node_modules/@agents-can-communicate/adapter-claude-code/src/install.mjs +27 -7
- package/node_modules/@agents-can-communicate/adapter-claude-code/src/native-delivery.mjs +229 -0
- package/node_modules/@agents-can-communicate/adapter-codex/certification.json +38 -5
- package/node_modules/@agents-can-communicate/adapter-codex/fixtures/certification-provenance.json +171 -38
- package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.152.0.json +3 -1
- package/node_modules/@agents-can-communicate/adapter-codex/fixtures/delivery/codex-cli-0.152.1-remote-workspace.json +25 -0
- package/node_modules/@agents-can-communicate/adapter-codex/package.json +4 -2
- package/node_modules/@agents-can-communicate/adapter-codex/plugin/skills/acc/SKILL.md +9 -5
- package/node_modules/@agents-can-communicate/adapter-codex/src/adapter.mjs +42 -7
- package/node_modules/@agents-can-communicate/adapter-codex/src/app-server-client.mjs +121 -0
- package/node_modules/@agents-can-communicate/adapter-codex/src/native-delivery.mjs +151 -0
- package/node_modules/@agents-can-communicate/adapter-codex/src/ws-json-rpc.mjs +192 -0
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/certification.json +44 -28
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/gemini-extension.json +1 -1
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/extension/skills/acc/SKILL.md +9 -5
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/fixtures/{BeforeAgent.json → BeforeAgent-0.57.0.json} +2 -2
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/fixtures/{BeforeTool.json → BeforeTool-0.57.0.json} +2 -2
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/fixtures/{BeforeTool-shell.json → BeforeTool-shell-0.57.0.json} +2 -2
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/fixtures/{SessionEnd.json → SessionEnd-0.57.0.json} +2 -2
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/fixtures/{SessionStart.json → SessionStart-0.57.0.json} +2 -2
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/fixtures/certification-provenance.json +266 -39
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/package.json +6 -6
- package/node_modules/@agents-can-communicate/adapter-gemini-cli/src/adapter.mjs +25 -11
- package/node_modules/@agents-can-communicate/adapter-grok/package.json +1 -1
- package/node_modules/@agents-can-communicate/adapter-grok/plugin/skills/acc/SKILL.md +9 -5
- package/node_modules/@agents-can-communicate/adapter-grok/src/adapter.mjs +3 -1
- package/node_modules/@agents-can-communicate/adapter-kimi/package.json +1 -1
- package/node_modules/@agents-can-communicate/adapter-kimi/plugin/skills/acc/SKILL.md +9 -5
- package/node_modules/@agents-can-communicate/adapter-sdk/package.json +1 -1
- package/node_modules/@agents-can-communicate/adapter-sdk/src/capabilities.mjs +18 -0
- package/node_modules/@agents-can-communicate/adapter-sdk/src/hook-shim.mjs +2 -0
- package/node_modules/@agents-can-communicate/adapter-sdk/src/index.mjs +6 -2
- package/node_modules/@agents-can-communicate/adapter-sdk/src/native-activation.mjs +76 -0
- package/node_modules/@agents-can-communicate/adapter-sdk/src/native-delivery.mjs +202 -0
- package/node_modules/@agents-can-communicate/adapter-sdk/src/native-vocabulary.mjs +101 -0
- package/node_modules/@agents-can-communicate/adapter-sdk/src/session-binding.mjs +17 -2
- package/node_modules/@agents-can-communicate/cli/package.json +1 -1
- package/node_modules/@agents-can-communicate/cli/src/args.mjs +2 -2
- package/node_modules/@agents-can-communicate/cli/src/doctor-command.mjs +67 -5
- package/node_modules/@agents-can-communicate/cli/src/install-command.mjs +133 -11
- package/node_modules/@agents-can-communicate/core/package.json +1 -1
- package/node_modules/@agents-can-communicate/core/src/conversations.mjs +41 -1
- package/node_modules/@agents-can-communicate/core/src/delivery-bindings.mjs +52 -2
- package/node_modules/@agents-can-communicate/core/src/service.mjs +10 -0
- package/node_modules/@agents-can-communicate/delivery-router/package.json +1 -1
- package/node_modules/@agents-can-communicate/delivery-router/src/router.mjs +26 -12
- package/node_modules/@agents-can-communicate/hook-runner/package.json +4 -2
- package/node_modules/@agents-can-communicate/hook-runner/src/native-binding.mjs +90 -0
- package/node_modules/@agents-can-communicate/hook-runner/src/runner.mjs +123 -90
- package/node_modules/@agents-can-communicate/installer/package.json +4 -2
- package/node_modules/@agents-can-communicate/installer/src/apply.mjs +48 -4
- package/node_modules/@agents-can-communicate/installer/src/bootstrap-runtime.mjs +144 -0
- package/node_modules/@agents-can-communicate/installer/src/detect.mjs +72 -3
- package/node_modules/@agents-can-communicate/installer/src/index.mjs +7 -0
- package/node_modules/@agents-can-communicate/installer/src/native-activation.mjs +161 -0
- package/node_modules/@agents-can-communicate/installer/src/ownership.mjs +6 -2
- package/node_modules/@agents-can-communicate/installer/src/plan.mjs +41 -6
- package/node_modules/@agents-can-communicate/installer/src/shell-bootstrap.mjs +210 -0
- package/node_modules/@agents-can-communicate/mcp-server/package.json +1 -1
- package/node_modules/@agents-can-communicate/protocol/package.json +1 -1
- package/node_modules/@agents-can-communicate/protocol/src/fields.mjs +17 -0
- package/node_modules/@agents-can-communicate/protocol/src/schema.mjs +18 -3
- package/node_modules/@agents-can-communicate/storage-filesystem/package.json +1 -1
- package/package.json +2 -1
package/docs/CONFIGURATION.md
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
# Configuration
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
directory when
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
Start without configuration. ACC identifies a workspace from its Git common directory, or
|
|
4
|
+
from the directory itself when Git is absent. Sessions can communicate only when they run
|
|
5
|
+
as the same operating-system user on the same machine and resolve that same local
|
|
6
|
+
workspace.
|
|
7
|
+
|
|
8
|
+
Create `acc.workspace.json` only for stable workspace identity, roots, or shared
|
|
9
|
+
claim/context policy. It is optional project configuration that `acc config init` may write
|
|
10
|
+
at your request; runtime state remains in platform app data outside the repository. The
|
|
11
|
+
file never defines agents, messages, execution state, or delivery endpoints. Project map:
|
|
12
|
+
[README](index.md). Terms used below: [Glossary](GLOSSARY.md).
|
|
13
|
+
|
|
14
|
+
## Decide whether you need a config
|
|
15
|
+
|
|
16
|
+
- **Identity that survives a local move.** Without a config, the same non-Git project at two
|
|
17
|
+
paths is two workspaces. `workspaceId` lets the same OS user move or reopen it locally.
|
|
18
|
+
Matching ids never connect different machines or OS users.
|
|
16
19
|
- **More than one root.** A monorepo whose apps live in separate directories, or a
|
|
17
20
|
workspace that spans sibling checkouts.
|
|
18
21
|
- **Shared policy.** Claim mode and context budget, agreed once and committed, rather than
|
|
@@ -21,7 +24,7 @@ map: [README](index.md). Terms used below: [Glossary](GLOSSARY.md).
|
|
|
21
24
|
to be installed, so `acc doctor` can say what is missing rather than leaving a session
|
|
22
25
|
silently uncoordinated.
|
|
23
26
|
|
|
24
|
-
###
|
|
27
|
+
### Define the file
|
|
25
28
|
|
|
26
29
|
`acc.workspace.json`, at the root of the workspace. One name, so discovery is a lookup and
|
|
27
30
|
not a search. It is found by walking up from the working directory, because sessions start
|
|
@@ -64,7 +67,7 @@ like nothing at all to a parser that ignores what it does not know, and the resu
|
|
|
64
67
|
team whose policy quietly stopped applying. `extensions` is the one declared door for
|
|
65
68
|
anything ACC does not define.
|
|
66
69
|
|
|
67
|
-
###
|
|
70
|
+
### Keep runtime state out
|
|
68
71
|
|
|
69
72
|
Sessions, participants, messages, claims, receipts, intents, events, tokens, credentials.
|
|
70
73
|
All of it is refused, by name, with the key that caused it, for two reasons. Runtime state
|
|
@@ -73,7 +76,7 @@ without carrying presence and locks along. And a config lives in a repository, w
|
|
|
73
76
|
who can open a pull request can edit it — a file that could declare sessions would be a way
|
|
74
77
|
to hand a peer state it should have had to earn.
|
|
75
78
|
|
|
76
|
-
###
|
|
79
|
+
### Change identity safely
|
|
77
80
|
|
|
78
81
|
The config carries the workspace identity, so writing one moves the project to a new
|
|
79
82
|
workspace. Sessions already attached stay on the old one: they keep heartbeating it, they
|
|
@@ -90,7 +93,7 @@ pass --force to write anyway.
|
|
|
90
93
|
|
|
91
94
|
Close them, or pass `--force` if you mean it — and restart them afterwards.
|
|
92
95
|
|
|
93
|
-
###
|
|
96
|
+
### Create or validate it
|
|
94
97
|
|
|
95
98
|
<!-- test:illustration asks a person to confirm; there is nobody to ask in a test -->
|
|
96
99
|
```bash
|
|
@@ -107,7 +110,7 @@ and replacing it on a mistyped command would split one workspace into two.
|
|
|
107
110
|
thing it is inspecting. With no config present it reports the defaults rather than failing,
|
|
108
111
|
because not having one is a valid state.
|
|
109
112
|
|
|
110
|
-
##
|
|
113
|
+
## Keep delivery consent user-owned
|
|
111
114
|
|
|
112
115
|
Live delivery may start a model turn and spend that recipient's tokens, so it is configured
|
|
113
116
|
through the recipient's user-owned client installation:
|
|
@@ -118,12 +121,15 @@ acc install --adapter codex --delivery off
|
|
|
118
121
|
|
|
119
122
|
The allowed values are `off`, `actionable`, and `all`; the default is `off`. This setting
|
|
120
123
|
does not belong in `acc.workspace.json`, where a pull request could opt someone else into
|
|
121
|
-
spending a turn. It also cannot create a capability
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
spending a turn. It also cannot create a capability. Exact-version evidence governs
|
|
125
|
+
ordinary hook features; Claude Code live delivery separately requires macOS arm64, version
|
|
126
|
+
2.1.258 or newer, and a current feature probe before installation applies the requested
|
|
127
|
+
policy. If those install-time checks fail, effective policy remains `off` and the installer
|
|
128
|
+
reports next-turn or inbox fallback. Each later session must also pass its own
|
|
129
|
+
generation-bound handshake. A failed session handshake clears or refuses that binding and
|
|
130
|
+
reports degraded reachability; it does not rewrite the installed consent.
|
|
125
131
|
|
|
126
|
-
##
|
|
132
|
+
## Override local paths and identity
|
|
127
133
|
|
|
128
134
|
Nothing in `acc.workspace.json` says where state is stored, and nothing there can — that is
|
|
129
135
|
the job of these variables, or the platform's own locations, and ACC refuses any of them
|
|
@@ -141,3 +147,7 @@ that resolves inside a workspace.
|
|
|
141
147
|
| `ACC_MCP_WORKSPACE` | The project `acc-mcp` joins. Without it the server takes the directory the client launched it in, which is rarely the project |
|
|
142
148
|
| `ACC_NO_UPDATE_CHECK=1` | Never ask npm whether a newer ACC exists. `acc update` then says it is off, which is a different answer from "nothing is newer" |
|
|
143
149
|
| `ACC_PROBE_TIMEOUT_MS` | How long to wait for a client to print its version. Three seconds by default: generous on an idle machine, and not always enough on a busy one, where a client that overruns it is reported as not installed |
|
|
150
|
+
| `ACC_NATIVE_DELIVERY_POLICY` | Set only by an ACC-owned shell shim to the consented live policy (`off`, `actionable`, or `all`) before it `exec`s the real client, so the session's hook knows a native transport was activated. Not for a person to set: an ordinary or `ACC_BYPASS=1` launch leaves it unset, and the hook treats missing or invalid values as `off` |
|
|
151
|
+
| `ACC_BYPASS=1` | Runs the unmodified client through an ACC shim: no launch-time check, no native flags, and the reserved policy variable is unset. The escape hatch when you want the vendor command exactly as it was |
|
|
152
|
+
| `ACC_BOOTSTRAP_DEBUG=1` | Lets the internal `acc-bootstrap` check write one safe diagnostic line to stderr. Off, it is silent, and it never writes to stdout |
|
|
153
|
+
| `CODEX_HOME` | Codex's own home, honoured when locating the Codex App Server daemon's control socket for native delivery. Codex sets it; ACC only reads it |
|
package/docs/DESIGN_DECISIONS.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Design decisions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use this log to understand constraints that should survive refactors and proposals that
|
|
4
|
+
remain open. Runtime contracts live in [Protocol](PROTOCOL.md); this page records why the
|
|
5
|
+
boundaries exist.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## Preserve these decisions
|
|
6
8
|
|
|
7
9
|
| Decision | Reason |
|
|
8
10
|
|---|---|
|
|
@@ -24,7 +26,7 @@ Why ACC is shaped the way it is, and what is deliberately still open.
|
|
|
24
26
|
| Node 24 (current production LTS) | Uses `node:test`, modern `fs` promises, and no transpiler. |
|
|
25
27
|
| MCP session from launch config | Never from `initialize` or `clientInfo` — those are attacker-controllable. See the threat scenarios in [SECURITY_MODEL.md](SECURITY_MODEL.md) (scenario 8). |
|
|
26
28
|
|
|
27
|
-
##
|
|
29
|
+
## Avoid these rejected designs
|
|
28
30
|
|
|
29
31
|
| Rejected | Why |
|
|
30
32
|
|---|---|
|
|
@@ -36,6 +38,8 @@ Why ACC is shaped the way it is, and what is deliberately still open.
|
|
|
36
38
|
| Reporting queued messages as delivered | A delivery state that overstates itself is worse than no state. |
|
|
37
39
|
| Guessing file paths out of shell commands | It would block work at random and still miss real writes. See [CAPABILITIES.md](CAPABILITIES.md). |
|
|
38
40
|
|
|
41
|
+
### Reversals backed by failures
|
|
42
|
+
|
|
39
43
|
**Reversed in 0.1.11: removing the client's hook-trust record on uninstall.**
|
|
40
44
|
0.1.9 took Codex's `[hooks.state."<plugin>:…"]` tables out on uninstall,
|
|
41
45
|
reasoning they named a plugin that was gone. The check behind that reasoning
|
|
@@ -72,7 +76,7 @@ declared. Coverage is deliberately partial, and
|
|
|
72
76
|
[CAPABILITIES.md](CAPABILITIES.md) says where it ends: an agent that knows
|
|
73
77
|
where a guard stops behaves better than one that believes it absolute.
|
|
74
78
|
|
|
75
|
-
##
|
|
79
|
+
## Decide these later
|
|
76
80
|
|
|
77
81
|
1. **Storage backend.** The hardened filesystem store ships first. A transactional backend
|
|
78
82
|
can go behind the same interface later — but not merely to avoid a dependency.
|
package/docs/GETTING_STARTED.md
CHANGED
|
@@ -1,145 +1,121 @@
|
|
|
1
1
|
# Getting started
|
|
2
2
|
|
|
3
|
-
ACC
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
the message between windows.
|
|
7
|
-
|
|
8
|
-
```mermaid
|
|
9
|
-
sequenceDiagram
|
|
10
|
-
participant A as First session
|
|
11
|
-
participant ACC
|
|
12
|
-
participant B as Second session
|
|
13
|
-
A->>ACC: durable question
|
|
14
|
-
ACC-->>B: next-turn offer or inbox fallback
|
|
15
|
-
B->>ACC: reply in the same thread
|
|
16
|
-
ACC-->>A: next-turn offer or inbox fallback
|
|
17
|
-
```
|
|
3
|
+
Install ACC, open the AI sessions you already use, and give them related work. Supported
|
|
4
|
+
integrations make peers visible and teach each agent how to communicate. You do not need to
|
|
5
|
+
carry messages between windows or add coordination instructions to your task prompts.
|
|
18
6
|
|
|
19
|
-
## 1. Install once
|
|
7
|
+
## 1. Install once on this machine
|
|
20
8
|
|
|
21
|
-
|
|
9
|
+
ACC requires macOS or Linux and Node.js 24 or newer.
|
|
22
10
|
|
|
23
|
-
<!-- test:command -->
|
|
24
11
|
```bash
|
|
25
|
-
|
|
12
|
+
npm install -g agents-can-communicate
|
|
26
13
|
```
|
|
27
14
|
|
|
28
|
-
|
|
29
|
-
plugin. `acc doctor` names anything still missing and reports the effective delivery mode
|
|
30
|
-
for each detected version.
|
|
31
|
-
|
|
32
|
-
## 2. Open two sessions normally
|
|
33
|
-
|
|
34
|
-
Open Codex, Claude Code, Gemini CLI, Grok, or Kimi Code in the same project exactly as you
|
|
35
|
-
would without ACC. A generic MCP client can participate by running `acc-mcp`. ACC never
|
|
36
|
-
launches or owns either session.
|
|
37
|
-
|
|
38
|
-
In either window:
|
|
39
|
-
|
|
15
|
+
<!-- test:command -->
|
|
40
16
|
```bash
|
|
41
|
-
acc
|
|
17
|
+
acc install
|
|
42
18
|
```
|
|
43
19
|
|
|
44
|
-
The
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## 3. Publish intent, then claim narrowly
|
|
48
|
-
|
|
49
|
-
Intent is cheap awareness and grants no protection:
|
|
20
|
+
The installer connects only the supported clients it finds. Open a new terminal and
|
|
21
|
+
restart any running clients so they load their integrations. Codex asks you to trust its
|
|
22
|
+
plugin once.
|
|
50
23
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
24
|
+
If you opt into Claude Code's experimental idle delivery, Claude also shows its own
|
|
25
|
+
development-channel warning at every startup. The feature is off by default, can spend
|
|
26
|
+
model tokens, and currently requires Apple Silicon macOS, zsh, and Claude Code 2.1.258 or
|
|
27
|
+
newer. You do not need it for durable messages or supported next-turn delivery.
|
|
55
28
|
|
|
56
|
-
|
|
29
|
+
## 2. Open two sessions and give them ordinary tasks
|
|
57
30
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
--reason "updating receipt rendering"
|
|
61
|
-
```
|
|
31
|
+
Start each client normally in the same project. ACC does not launch, supervise, or assign
|
|
32
|
+
work to either session. For example:
|
|
62
33
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
34
|
+
| Session | Your prompt |
|
|
35
|
+
|---|---|
|
|
36
|
+
| Codex | Add an account-registration endpoint. |
|
|
37
|
+
| Claude Code | Build the account-registration screen. |
|
|
66
38
|
|
|
67
|
-
|
|
39
|
+
Those are complete prompts. The integration tells each agent that peers are present and
|
|
40
|
+
provides the coordination instructions. If an agent notices that the screen depends on the
|
|
41
|
+
endpoint contract, it can identify the peer, ask for the request and response shape, and
|
|
42
|
+
continue with the answer.
|
|
68
43
|
|
|
69
|
-
|
|
44
|
+
The sessions may use different supported clients or two instances of the same client.
|
|
45
|
+
Same-client addresses can be ambiguous when several instances are live; agents use the
|
|
46
|
+
exact participant ids in the roster when needed. See [Concepts](CONCEPTS.md) for participant
|
|
47
|
+
and session identity.
|
|
70
48
|
|
|
71
|
-
|
|
72
|
-
acc message --to models --type question --subject "receipt wording" \
|
|
73
|
-
--body "Should the UI say offered or delivered after the transport accepts bytes?" \
|
|
74
|
-
--client-message-id client_receipt_wording_1
|
|
75
|
-
```
|
|
49
|
+
## 3. Watch for useful coordination
|
|
76
50
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
logical message instead of creating a duplicate.
|
|
51
|
+
Look for an agent discovering a peer, publishing the files it expects to change, noticing a
|
|
52
|
+
shared dependency, asking a focused question, or answering one in the same thread. These
|
|
53
|
+
events appear in the agent's normal activity; the exact presentation depends on the client.
|
|
81
54
|
|
|
82
|
-
|
|
55
|
+
ACC provides awareness and communication tools. It cannot guarantee that a model will
|
|
56
|
+
notice every dependency or coordinate on every task. Each agent decides whether a peer is
|
|
57
|
+
relevant under its own instructions, context, and permissions.
|
|
83
58
|
|
|
84
|
-
|
|
85
|
-
|
|
59
|
+
The commands behind that activity belong to the agents' installed skill. They can publish
|
|
60
|
+
intent, make an advisory or guarded claim, send and reply to messages, acknowledge a thread,
|
|
61
|
+
and leave a handoff. If you want to inspect that interface, use the [CLI reference](CLI.md)
|
|
62
|
+
or follow the interaction through [How ACC works](HOW_IT_WORKS.md).
|
|
86
63
|
|
|
87
|
-
|
|
88
|
-
acc inbox
|
|
89
|
-
acc inbox --message message_x
|
|
90
|
-
acc reply --message message_x \
|
|
91
|
-
--body "Use offered. It proves transport acceptance, not that the model read it."
|
|
92
|
-
```
|
|
64
|
+
## 4. Know when messages arrive
|
|
93
65
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
first session receives the answer through its own next-turn or inbox path; you do not copy
|
|
97
|
-
the peer body between sessions.
|
|
66
|
+
Every message is recorded before ACC attempts faster delivery. Every participant has a
|
|
67
|
+
durable inbox, which is the universal recovery path.
|
|
98
68
|
|
|
99
|
-
|
|
100
|
-
|
|
69
|
+
On exact client versions and platforms with captured support, Codex, Claude Code, Gemini
|
|
70
|
+
CLI, and Kimi Code can receive a message at the next normal turn. That does not wake an idle
|
|
71
|
+
session. Grok, generic MCP clients, unknown versions, and unsupported platforms use the
|
|
72
|
+
durable inbox instead.
|
|
101
73
|
|
|
102
|
-
|
|
74
|
+
Claude Code's optional native channel is the only shipped idle-delivery path. It is
|
|
75
|
+
experimental, never interrupts a turn already in progress, and remains subject to current
|
|
76
|
+
reachability and recipient policy. Codex native live delivery is withdrawn; Codex uses its
|
|
77
|
+
certified next-turn path or inbox. Read [Capabilities](CAPABILITIES.md) for exact versions,
|
|
78
|
+
platforms, and limitations.
|
|
103
79
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
--blocker "waiting for fixture"
|
|
108
|
-
```
|
|
80
|
+
Delivery evidence is deliberately narrow: `queued -> offered -> retrieved -> acknowledged`.
|
|
81
|
+
An offer is not proof that the model read anything, retrieval is not proof of attention, and
|
|
82
|
+
a reply settles the communication obligation rather than proving that work is complete.
|
|
109
83
|
|
|
110
|
-
|
|
111
|
-
presence. It does not close the external client.
|
|
84
|
+
## 5. Keep the workspace boundary clear
|
|
112
85
|
|
|
113
|
-
|
|
86
|
+
ACC is local to the same machine and operating-system user. Git worktrees of one repository
|
|
87
|
+
share an ACC workspace while keeping their separate checkout facts. Git is optional, but
|
|
88
|
+
two unrelated plain folders do not share a workspace merely because people consider them
|
|
89
|
+
the same project.
|
|
114
90
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
adapter result.
|
|
91
|
+
Messages and runtime state live in platform app data outside the repository. ACC never
|
|
92
|
+
collects or shares raw transcripts. An optional `acc.workspace.json` can provide a stable
|
|
93
|
+
workspace id, multiple roots, or project policy; it is user-requested configuration, not
|
|
94
|
+
runtime state. See [Configuration](CONFIGURATION.md) and the
|
|
95
|
+
[non-Git example](https://github.com/automatis-tools/agents-can-communicate/blob/main/examples/non-git-research.md).
|
|
121
96
|
|
|
122
|
-
##
|
|
97
|
+
## Diagnose or remove it
|
|
123
98
|
|
|
124
|
-
|
|
125
|
-
project
|
|
99
|
+
If a peer does not appear or delivery differs from what you expected, run this from the
|
|
100
|
+
project directory:
|
|
126
101
|
|
|
127
102
|
<!-- test:command -->
|
|
128
103
|
```bash
|
|
129
|
-
acc
|
|
104
|
+
acc doctor
|
|
130
105
|
```
|
|
131
106
|
|
|
132
|
-
|
|
133
|
-
|
|
107
|
+
The report names detected clients, installed integrations, exact capability downgrades,
|
|
108
|
+
and the next action. Continue with [Troubleshooting](TROUBLESHOOTING.md).
|
|
134
109
|
|
|
135
|
-
|
|
110
|
+
To remove ACC's integrations:
|
|
136
111
|
|
|
112
|
+
<!-- test:command -->
|
|
137
113
|
```bash
|
|
138
114
|
acc uninstall
|
|
139
115
|
```
|
|
140
116
|
|
|
141
|
-
|
|
142
|
-
|
|
117
|
+
Uninstall removes only bytes ACC wrote that still match its install record. User edits are
|
|
118
|
+
reported and preserved.
|
|
143
119
|
|
|
144
120
|
Next: [Why ACC](WHY_ACC.md) · [Capabilities](CAPABILITIES.md) · [CLI](CLI.md) ·
|
|
145
121
|
[Troubleshooting](TROUBLESHOOTING.md)
|
package/docs/GLOSSARY.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Glossary
|
|
2
2
|
|
|
3
|
-
- **Workspace** — one
|
|
4
|
-
- **Participant** — the
|
|
5
|
-
- **Session** — one independently opened client conversation participating in a workspace.
|
|
3
|
+
- **Workspace** — one same-machine, same-OS-user coordination room; all worktrees of a Git repository share it.
|
|
4
|
+
- **Participant** — the address that sends and receives messages; it survives unrelated conversations only when explicitly configured.
|
|
5
|
+
- **Session** — one independently opened client conversation participating in a workspace; its id supplies the default participant address.
|
|
6
6
|
- **Generation** — the token proving a mutation belongs to the current opening of a session.
|
|
7
7
|
- **Presence** — `online`, `stale`, or `offline`, based only on observed heartbeat and pid facts.
|
|
8
8
|
- **Intent** — a session's current summary and resource hints; awareness, not permission.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
- **Retrieved** — the participant received the body; not proof of model attention.
|
|
17
17
|
- **Acknowledged** — that participant explicitly acknowledged or replied; a reply is not proof requested work finished.
|
|
18
18
|
- **Next-turn delivery** — certified projection at the client's next normal turn; it never interrupts an active turn.
|
|
19
|
-
- **Live push** — optional delivery to an already-running session through an official certified client API.
|
|
19
|
+
- **Live push** — optional delivery to an already-running session through an official certified client API. Claude Code 2.1.258+ on macOS arm64 qualifies, behind an opt-in; it waits for a turn in progress rather than interrupting it.
|
|
20
20
|
- **Recipient policy** — `off`, `actionable`, or `all`; opt-in permission to spend a turn, not a capability.
|
|
21
21
|
- **Delivery binding** — ephemeral, generation-bound reachability data owned by an adapter.
|
|
22
22
|
- **Fallback** — durable inbox or exact-certified next-turn recovery when live delivery is unavailable.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# How ACC works
|
|
2
|
+
|
|
3
|
+
Suppose Codex is adding an account-registration endpoint while Claude Code builds the
|
|
4
|
+
registration screen. You gave each session an ordinary task. ACC supplies the awareness
|
|
5
|
+
and communication layer around their work; the agents decide whether and how to use it.
|
|
6
|
+
|
|
7
|
+
This page follows the dependency from discovery to an acknowledged answer. For exact record
|
|
8
|
+
shapes and state rules, use [Protocol](PROTOCOL.md). For package boundaries, storage, and
|
|
9
|
+
recovery, use [Architecture](ARCHITECTURE.md).
|
|
10
|
+
|
|
11
|
+
```mermaid
|
|
12
|
+
sequenceDiagram
|
|
13
|
+
participant U as User
|
|
14
|
+
participant C as Codex
|
|
15
|
+
participant ACC
|
|
16
|
+
participant A as Claude Code
|
|
17
|
+
U->>C: Add the registration endpoint
|
|
18
|
+
U->>A: Build the registration screen
|
|
19
|
+
ACC-->>C: Claude Code is a peer
|
|
20
|
+
ACC-->>A: Codex is a peer
|
|
21
|
+
A->>ACC: Ask Codex for the endpoint contract
|
|
22
|
+
ACC-->>C: Offer the question or keep it in inbox
|
|
23
|
+
C->>ACC: Reply with the contract
|
|
24
|
+
ACC-->>A: Offer the answer or keep it in inbox
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 1. The integrations introduce the peers
|
|
28
|
+
|
|
29
|
+
`acc install` adds supported hooks, plugins, or extensions to native clients it finds. At
|
|
30
|
+
session startup, such a client calls `acc-hook`, which registers the session in the local
|
|
31
|
+
ACC workspace. The native integration also gives the agent a small skill describing peer
|
|
32
|
+
discovery, messages, replies, claims, and handoffs.
|
|
33
|
+
|
|
34
|
+
A generic MCP client instead joins through `acc-mcp`, which resolves its configured
|
|
35
|
+
participant and workspace when tools or resources are called. It exposes the coordination
|
|
36
|
+
tools but does not install the native clients' skill. See its
|
|
37
|
+
[manual MCP boundary](MCP.md#account-for-the-manual-boundary).
|
|
38
|
+
|
|
39
|
+
ACC does not add instructions to the user's task prompt, create a team, or choose work. The
|
|
40
|
+
agent still operates under its own conversation, permissions, and client policy.
|
|
41
|
+
|
|
42
|
+
Sessions meet only when they resolve to the same local workspace. Git worktrees of one
|
|
43
|
+
repository share a workspace through the Git common directory, while retaining separate
|
|
44
|
+
checkout and branch facts. A plain directory uses its canonical path unless optional
|
|
45
|
+
workspace configuration supplies a stable id or additional roots. Git is not required.
|
|
46
|
+
|
|
47
|
+
A workspace is local to one machine and operating-system user. ACC is not a remote sync
|
|
48
|
+
service, even if project files are synchronized elsewhere.
|
|
49
|
+
|
|
50
|
+
## 2. Each agent shares a small amount of work context
|
|
51
|
+
|
|
52
|
+
The Codex session may publish “adding the registration endpoint” with a hint for its API
|
|
53
|
+
files. Claude may publish “building the registration screen” with a UI hint. This intent is
|
|
54
|
+
short, explicit coordination data, not a copy of either conversation.
|
|
55
|
+
|
|
56
|
+
When peers are available, the integration can project their identity, intent, relevant
|
|
57
|
+
claims, and pending messages into a supported normal turn. The agent can then notice that
|
|
58
|
+
its work depends on a peer. ACC does not run a hidden classifier and does not guarantee the
|
|
59
|
+
model will coordinate; relevance remains the agent's decision.
|
|
60
|
+
|
|
61
|
+
Presence and intent can stay ephemeral while a session is alone. Durable workspace history
|
|
62
|
+
materializes when a second session appears or an agent creates the first durable message,
|
|
63
|
+
claim, or handoff. Runtime state lives in platform app data outside the repository.
|
|
64
|
+
|
|
65
|
+
## 3. A dependency becomes a direct question
|
|
66
|
+
|
|
67
|
+
Claude needs the endpoint contract, so it looks up the peer and sends an addressed
|
|
68
|
+
`question`. A client name such as `codex` resolves when exactly one peer session of that
|
|
69
|
+
client is eligible. If several Codex sessions are live, the agent uses the exact participant
|
|
70
|
+
id from `acc status --json`.
|
|
71
|
+
|
|
72
|
+
The sender is not granting itself authority over the recipient. Messages are attributed,
|
|
73
|
+
untrusted peer input. A `request` asks for action and a result, but it is not an order; the
|
|
74
|
+
receiving agent evaluates it under its own instructions and permissions.
|
|
75
|
+
|
|
76
|
+
## 4. ACC records before it tries delivery
|
|
77
|
+
|
|
78
|
+
Sending the question commits the message and one `queued` receipt for each recipient in a
|
|
79
|
+
single filesystem transaction. Only then does ACC attempt to make it arrive sooner. If a
|
|
80
|
+
hook, client, or experimental transport is unavailable, the recorded question remains in
|
|
81
|
+
the recipient's durable inbox.
|
|
82
|
+
|
|
83
|
+
That order is the central reliability guarantee:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
agent sends -> durable message and queued receipt -> optional delivery attempt
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The first message is also the root of its thread. Retries can carry a `clientMessageId` so
|
|
90
|
+
equivalent repeats return the original record while conflicting reuse is rejected. Room
|
|
91
|
+
messages resolve their recipients at commit time; later arrivals do not gain retroactive
|
|
92
|
+
receipts. [Protocol](PROTOCOL.md) defines these rules precisely.
|
|
93
|
+
|
|
94
|
+
## 5. The receiving client chooses the delivery path
|
|
95
|
+
|
|
96
|
+
All recipients have the same durable record, but adapters expose different acceleration:
|
|
97
|
+
|
|
98
|
+
- **Durable inbox:** universal recovery. An agent can retrieve the complete addressed
|
|
99
|
+
message with `acc inbox`, including by exact message id after compaction.
|
|
100
|
+
- **Next normal turn:** exact captured versions of Codex, Claude Code, Gemini CLI, and Kimi
|
|
101
|
+
Code can receive complete attributed peer context when the user next prompts that client.
|
|
102
|
+
This does not wake an idle session.
|
|
103
|
+
- **Optional Claude Code channel:** supported Claude Code versions on Apple Silicon macOS
|
|
104
|
+
may receive an addressed actionable message while idle. This is experimental, off by
|
|
105
|
+
default, can spend tokens, never interrupts a running turn, and requires the vendor's
|
|
106
|
+
visible development-channel warning.
|
|
107
|
+
|
|
108
|
+
Codex native live delivery is withdrawn because the required remote mode hides the
|
|
109
|
+
session's real workspace. Grok, generic MCP, unknown versions, and uncaptured platforms use
|
|
110
|
+
inbox polling. [Capabilities](CAPABILITIES.md) lists the evidence and exact fallbacks.
|
|
111
|
+
|
|
112
|
+
When a complete projected body cannot fit the configured byte budget, ACC keeps the message
|
|
113
|
+
id and exact inbox recovery command rather than silently truncating the peer's words.
|
|
114
|
+
|
|
115
|
+
## 6. The reply stays in the same thread
|
|
116
|
+
|
|
117
|
+
Codex replies with the request and response fields. The reply operation creates an `answer`
|
|
118
|
+
for Claude in the original thread and acknowledges Codex's receipt for the question in one
|
|
119
|
+
transaction. For a message that requires acknowledgement but no answer, the recipient uses
|
|
120
|
+
`ack` instead.
|
|
121
|
+
|
|
122
|
+
Receipts describe evidence, not assumptions:
|
|
123
|
+
|
|
124
|
+
```text
|
|
125
|
+
queued -> offered -> retrieved -> acknowledged
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
- `queued` means the message and receipt are durable;
|
|
129
|
+
- `offered` means bytes crossed ACC's transport boundary or a certified client accepted
|
|
130
|
+
them, not that the model read them;
|
|
131
|
+
- `retrieved` means the participant explicitly fetched the message, not that a model paid
|
|
132
|
+
attention; and
|
|
133
|
+
- `acknowledged` means the participant acknowledged or replied, not that requested work is
|
|
134
|
+
complete.
|
|
135
|
+
|
|
136
|
+
There is no `seen` receipt and no ACC task state such as accepted, running, or done.
|
|
137
|
+
|
|
138
|
+
## 7. Claims warn before edits overlap
|
|
139
|
+
|
|
140
|
+
Before changing files, an agent can publish intent and claim a narrow resource such as
|
|
141
|
+
`file:packages/api/**`. Another live session attempting an overlapping claim receives exit
|
|
142
|
+
code `5` with the holder, giving the peers a chance to narrow or sequence their work.
|
|
143
|
+
|
|
144
|
+
Claims are not operating-system locks. A claim is `guarded` only when every relevant live
|
|
145
|
+
client exposes a captured pre-write guard for the path ACC can recognize. Otherwise it is
|
|
146
|
+
`advisory`. Even a guarded claim cannot stop an unrelated program or a write path the client
|
|
147
|
+
does not expose. [Concepts](CONCEPTS.md#intent-is-awareness-a-claim-commits) explains the
|
|
148
|
+
user-facing distinction.
|
|
149
|
+
|
|
150
|
+
## 8. The boundaries remain visible
|
|
151
|
+
|
|
152
|
+
ACC stores only coordination data an agent explicitly publishes: identity, presence,
|
|
153
|
+
one-line intent, claims, messages, replies, handoffs, receipts, and events. It never collects
|
|
154
|
+
or shares raw prompts, assistant responses, or transcripts. Peer bodies are framed as
|
|
155
|
+
untrusted data and remain subject to the receiving session's permissions.
|
|
156
|
+
|
|
157
|
+
Hooks have a short time limit and fail open. A coordination failure may remove awareness or
|
|
158
|
+
force inbox fallback, but ACC must not be the reason a client action stops. Unknown versions
|
|
159
|
+
and platforms inherit no capability; `acc doctor` reports the downgrade and next action.
|
|
160
|
+
|
|
161
|
+
Continue with [Capabilities](CAPABILITIES.md) for client-specific behavior,
|
|
162
|
+
[Security model](SECURITY_MODEL.md) for trust boundaries, or
|
|
163
|
+
[Architecture](ARCHITECTURE.md) to trace these steps through the packages.
|
package/docs/MCP.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# MCP
|
|
2
2
|
|
|
3
|
-
`acc-mcp`
|
|
4
|
-
|
|
5
|
-
the client's lifecycle, intercept writes,
|
|
6
|
-
|
|
3
|
+
Use `acc-mcp` when a client can call MCP tools but has no native ACC adapter. The server
|
|
4
|
+
exposes durable messages, threads, receipts, intent, claims, and handoffs over stdio. It is
|
|
5
|
+
a manual polling integration: it cannot infer the client's lifecycle, intercept writes,
|
|
6
|
+
inject a normal turn, or push a message.
|
|
7
7
|
|
|
8
8
|
```mermaid
|
|
9
9
|
graph LR
|
|
@@ -11,7 +11,7 @@ graph LR
|
|
|
11
11
|
M --> S[("ACC durable store")]
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Configure the server
|
|
15
15
|
|
|
16
16
|
```json
|
|
17
17
|
{
|
|
@@ -33,7 +33,7 @@ The server implements MCP protocol revision `2026-07-28` over newline-delimited
|
|
|
33
33
|
stdio. Tool input schemas are closed: unknown fields and invalid conditional shapes are
|
|
34
34
|
rejected before a session is resolved.
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## Call the durable tools
|
|
37
37
|
|
|
38
38
|
| Tool | Required input | Optional input |
|
|
39
39
|
|---|---|---|
|
|
@@ -63,7 +63,7 @@ resolves the configured MCP participant and advances only the returned receipts
|
|
|
63
63
|
`retrieved`, just like the inbox tool. Snapshot and roster reads do not advance receipts.
|
|
64
64
|
A full snapshot is for explicit workspace forensics.
|
|
65
65
|
|
|
66
|
-
##
|
|
66
|
+
## Account for the manual boundary
|
|
67
67
|
|
|
68
68
|
The generic MCP capability declaration is all false:
|
|
69
69
|
|
|
@@ -79,7 +79,7 @@ An MCP participant therefore reports `advisory` enforcement and `manual` lifecyc
|
|
|
79
79
|
workspace protection is the weakest live participant's real guarantee, one MCP session
|
|
80
80
|
makes guarded claims advisory for the room.
|
|
81
81
|
|
|
82
|
-
##
|
|
82
|
+
## Poll without overstating delivery
|
|
83
83
|
|
|
84
84
|
Every outgoing message commits first. `acc_message`, `acc_request`, `acc_reply`, and
|
|
85
85
|
`acc_finish` cannot promise push; delivery results remain queued with a durable diagnostic.
|