@prplkane/agentlink 0.3.0-beta.3 → 0.3.0-beta.5
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 +80 -320
- package/docs/acp-qualification.md +16 -0
- package/docs/architecture.md +95 -9
- package/docs/laptop-testing.md +38 -8
- package/package.json +1 -1
- package/src/bridges.mjs +28 -12
- package/src/child-process.mjs +19 -3
- package/src/discovery.mjs +47 -6
- package/src/doctor.mjs +6 -0
- package/src/gateway.mjs +125 -29
- package/src/json-spans.mjs +42 -0
- package/src/management-cli.mjs +8 -2
- package/src/probe.mjs +48 -14
- package/src/process.mjs +3 -3
- package/src/session-defaults.mjs +5 -7
- package/src/session-history.mjs +279 -0
- package/src/version.mjs +1 -1
- package/src/wire.mjs +6 -2
package/README.md
CHANGED
|
@@ -1,329 +1,89 @@
|
|
|
1
1
|
# AgentLink
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@prplkane/agentlink)
|
|
4
|
+
[](package.json)
|
|
5
|
+
[](LICENSE)
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
Agent Client Protocol (ACP)
|
|
7
|
-
agent. The client owns the conversation, and the agent supplies its capabilities.
|
|
7
|
+
Configure a coding agent once and reuse it across local apps that support the
|
|
8
|
+
**Agent Client Protocol (ACP)**.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
ACP defines how an app talks to an agent. AgentLink saves how to start that agent and
|
|
11
|
+
which model and reasoning level to use in a named **profile**. Apps share the profile
|
|
12
|
+
while keeping their connections and conversations separate.
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## Quick start
|
|
14
15
|
|
|
15
|
-
Install the
|
|
16
|
+
Install the public beta with Node.js 22 or newer. This example sets up Claude. Sign in
|
|
17
|
+
through your provider before starting a live session.
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
```sh
|
|
18
20
|
npm install -g @prplkane/agentlink@beta
|
|
19
|
-
~~~
|
|
20
|
-
|
|
21
|
-
From a source checkout, substitute `node /absolute/path/to/src/cli.mjs` for
|
|
22
|
-
`agentlink`.
|
|
23
|
-
|
|
24
|
-
~~~sh
|
|
25
|
-
# Native ACP in an already installed agent:
|
|
26
|
-
agentlink add kimi --command kimi
|
|
27
|
-
|
|
28
|
-
# Install and centrally manage the selected existing ACP bridges:
|
|
29
|
-
agentlink add codex --provider codex
|
|
30
21
|
agentlink add claude --provider claude
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
## Choose a model and effort once for a profile
|
|
101
|
-
|
|
102
|
-
Use the provider profile your projects already launch. Inspect the bridge's
|
|
103
|
-
live choices, then replace the example IDs below with values from the output.
|
|
104
|
-
|
|
105
|
-
~~~sh
|
|
106
|
-
agentlink models agy
|
|
107
|
-
agentlink models agy --model MODEL_ID
|
|
108
|
-
agentlink defaults agy --model MODEL_ID --effort EFFORT_ID
|
|
109
|
-
agentlink defaults agy
|
|
110
|
-
agentlink defaults agy --clear-model --clear-effort
|
|
111
|
-
~~~
|
|
112
|
-
|
|
113
|
-
`models` opens a temporary session with the profile's launch settings and an
|
|
114
|
-
empty working directory. It sends no prompt. The JSON shows the saved defaults,
|
|
115
|
-
the bridge's current model and effort, and each advertised choice's ID and
|
|
116
|
-
name. Use `--model` to preview the effort levels for a particular model.
|
|
117
|
-
An unavailable selector appears as `null`. Inspection ignores saved pins so it
|
|
118
|
-
can show replacements after a vendor retires a model.
|
|
119
|
-
|
|
120
|
-
`defaults` with no flags shows the saved choices. Setting a model or effort
|
|
121
|
-
validates the resulting pair in a temporary session before saving it. An
|
|
122
|
-
omitted flag keeps its previous setting. Use `--clear-effort` alongside a
|
|
123
|
-
model change to follow that model's own reasoning default. Clearing both
|
|
124
|
-
returns to vendor defaults and works offline.
|
|
125
|
-
|
|
126
|
-
All ACP clients launching that profile inherit the choices on their next
|
|
127
|
-
`session/new`, including on an open connection. Running and resumed sessions
|
|
128
|
-
keep their settings. A client may explicitly override a choice for its session.
|
|
129
|
-
If a saved ID disappears, session creation reports the unavailable choice so
|
|
130
|
-
you can replace it once for every project. Bridge updates still check ACP
|
|
131
|
-
initialization. Actual model and effort support is checked in the session.
|
|
132
|
-
|
|
133
|
-
## Discover an unfamiliar agent
|
|
134
|
-
|
|
135
|
-
~~~sh
|
|
136
|
-
# Inspect without saving:
|
|
137
|
-
agentlink inspect --command new-agent
|
|
138
|
-
|
|
139
|
-
# Discover, initialize and save locally:
|
|
140
|
-
agentlink add my-agent --command new-agent
|
|
141
|
-
|
|
142
|
-
# A custom help convention:
|
|
143
|
-
agentlink add unusual --command unusual-cli --help-args '["help"]'
|
|
144
|
-
|
|
145
|
-
# An exact launch recipe, including a standalone ACP server:
|
|
146
|
-
agentlink add custom --command custom-cli --acp-args '["serve","--protocol","acp"]'
|
|
147
|
-
agentlink add standalone --command /absolute/path/to/acp-server --acp-args '[]'
|
|
148
|
-
~~~
|
|
149
|
-
|
|
150
|
-
Discovery checks known recipes, then bounded `--help` / `-h` output, advertised
|
|
151
|
-
help aliases and relevant subcommands. Explicit `--help-args` replaces the
|
|
152
|
-
default help invocations. Recognizable help from a nonzero exit can still be
|
|
153
|
-
used. It never executes shell snippets or downloads URLs found in help text.
|
|
154
|
-
|
|
155
|
-
The saved profile includes launch arguments, a help hash when available,
|
|
156
|
-
capabilities and initialization status. It is personal configuration; adding
|
|
157
|
-
an unfamiliar compatible agent does not require a repository change.
|
|
158
|
-
|
|
159
|
-
`refresh` rediscovers help-derived external launches. Explicit `--acp-args`
|
|
160
|
-
(including an empty array) and managed bridge arguments are rechecked as saved;
|
|
161
|
-
refresh does not discard their options. To change an exact recipe, use `update`
|
|
162
|
-
with new `--acp-args`, or supply `--command` to request discovery again.
|
|
163
|
-
|
|
164
|
-
Inconclusive discovery does not prove an agent lacks ACP. Supply an exact launch
|
|
165
|
-
command or an existing bridge when needed. If there is no usable ACP
|
|
166
|
-
implementation, a separate bridge must supply that translation.
|
|
167
|
-
|
|
168
|
-
`--skip-check` can save a direct configuration as pending. Managed installations
|
|
169
|
-
always pass initialization before being activated. Initialization establishes a
|
|
170
|
-
protocol connection, not full task compatibility.
|
|
171
|
-
|
|
172
|
-
## Manage bridges and versions centrally
|
|
173
|
-
|
|
174
|
-
~~~sh
|
|
175
|
-
agentlink bridge list
|
|
176
|
-
agentlink bridge show codex
|
|
177
|
-
agentlink bridge update codex
|
|
178
|
-
|
|
179
|
-
# Multiple profiles can reference one managed bridge:
|
|
180
|
-
agentlink add work-codex --bridge codex
|
|
181
|
-
|
|
182
|
-
# Install another existing bridge using a package or registry entry:
|
|
183
|
-
agentlink bridge install custom --package some-acp-bridge --version 1.2.3
|
|
184
|
-
agentlink add custom --bridge custom
|
|
185
|
-
agentlink add another --manifest /absolute/path/to/agent.json
|
|
186
|
-
~~~
|
|
187
|
-
|
|
188
|
-
The package name/version above is illustrative. Use `--version` to pin a real
|
|
189
|
-
release or npm tag. npm tags are resolved once to an exact installed version.
|
|
190
|
-
There are no background updates. `bridge update` is an explicit update request.
|
|
191
|
-
|
|
192
|
-
Manifest input is an individual entry in the
|
|
193
|
-
[ACP registry format](https://github.com/agentclientprotocol/registry/blob/main/FORMAT.md).
|
|
194
|
-
Supported distributions:
|
|
195
|
-
|
|
196
|
-
| Distribution | Installation |
|
|
197
|
-
|---|---|
|
|
198
|
-
| `npx` | Pinned npm package in AgentLink's shared store; requires npm |
|
|
199
|
-
| `binary` | Raw file, ZIP or tar.gz for this platform; checks supplied SHA-256 |
|
|
200
|
-
| `uvx` | Pinned Python package in a shared virtual environment; requires Python with venv/pip |
|
|
201
|
-
|
|
202
|
-
Python entries use pip installation rather than running uvx on every connection.
|
|
203
|
-
Multiple command packages can select an entry with `--bin`.
|
|
204
|
-
Archives containing links, unsupported formats, or unsafe paths are rejected.
|
|
205
|
-
Those bridges can still be installed externally and connected with `--command`.
|
|
206
|
-
|
|
207
|
-
`--source` accepts an explicit package artifact, including a local tarball or
|
|
208
|
-
wheel. `--offline` requires local artifacts or package-manager cache and disables
|
|
209
|
-
registry downloads by AgentLink. It is not a network sandbox for third-party
|
|
210
|
-
install hooks or executable startup.
|
|
211
|
-
|
|
212
|
-
An update verifies the new launch, including profiles with custom arguments,
|
|
213
|
-
before atomically switching the shared bridge record. Failure preserves the
|
|
214
|
-
active record. Existing sessions retain leases on their old installed version.
|
|
215
|
-
New connections resolve the current shared version.
|
|
216
|
-
When adding or updating a profile also changes a bridge, both are prepared
|
|
217
|
-
before publication. If bridge publication fails, the profile is restored before
|
|
218
|
-
managed connections can resume.
|
|
219
|
-
|
|
220
|
-
~~~sh
|
|
221
|
-
agentlink update kimi --command /new/location/kimi
|
|
222
|
-
agentlink refresh kimi
|
|
223
|
-
agentlink show kimi
|
|
224
|
-
agentlink doctor
|
|
225
|
-
agentlink remove work-codex
|
|
226
|
-
|
|
227
|
-
# A referenced bridge cannot be removed:
|
|
228
|
-
agentlink bridge remove custom
|
|
229
|
-
|
|
230
|
-
# Explicitly remove unused versions after sessions finish:
|
|
231
|
-
agentlink bridge prune
|
|
232
|
-
agentlink bridge prune --cache
|
|
233
|
-
~~~
|
|
234
|
-
|
|
235
|
-
Pruning retains active installations and live leases. `--cache` also clears
|
|
236
|
-
AgentLink's package cache, reducing disk usage at the expense of offline reuse.
|
|
237
|
-
Externally installed bridges are never uninstalled.
|
|
238
|
-
|
|
239
|
-
## Local storage and limits
|
|
240
|
-
|
|
241
|
-
Default storage is `~/.agentlink/`; `AGENTLINK_HOME` or `--home` selects a different
|
|
242
|
-
absolute directory. Use `agentlink where --json` to inspect it. The default is
|
|
243
|
-
outside project repositories; keep any custom home outside them too. AgentLink
|
|
244
|
-
accepts an absolute custom path without checking whether it is inside a repository.
|
|
245
|
-
|
|
246
|
-
For ACP launches, place `--home` before `acp`:
|
|
247
|
-
|
|
248
|
-
~~~sh
|
|
249
|
-
agentlink --home /absolute/user-store acp kimi
|
|
250
|
-
~~~
|
|
251
|
-
|
|
252
|
-
Arguments after the profile are reserved for the agent's terminal-auth
|
|
253
|
-
invocation and are forwarded, not parsed as management options.
|
|
254
|
-
|
|
255
|
-
AgentLink stores profiles, bridge metadata, installation files, package cache,
|
|
256
|
-
short-lived leases and operation locks. It does not store prompts, responses,
|
|
257
|
-
or conversation history. Agents may maintain their own history and credentials.
|
|
258
|
-
Explicit `--env` settings and command arguments are saved as plain configuration;
|
|
259
|
-
use existing vendor login/environment handling for secrets.
|
|
260
|
-
|
|
261
|
-
Current boundaries:
|
|
262
|
-
|
|
263
|
-
- Local stdio connections. The gateway preserves ACP v1/v2 negotiations; it
|
|
264
|
-
does not translate between incompatible protocol versions.
|
|
265
|
-
- Default per-message bound: 16 MiB. No lifetime response-size or task timeout
|
|
266
|
-
is imposed by the gateway.
|
|
267
|
-
- Native artifact bounds: 256 MiB download, 512 MiB extracted contents,
|
|
268
|
-
10,000 entries. ZIP64, tar.bz2 and platform installers are unsupported.
|
|
269
|
-
- Installation hooks and agent processes run as the user, not in a sandbox.
|
|
270
|
-
- HTTPS artifact redirects are checked at every hop; redirects to HTTP fail
|
|
271
|
-
before contacting that destination.
|
|
272
|
-
- Managed Python on Windows requires an executable path shorter than 260
|
|
273
|
-
characters. A deeper store fails early with `PYTHON_PATH_TOO_LONG`; select a
|
|
274
|
-
shorter absolute `--home` or use an externally installed bridge.
|
|
275
|
-
- On Windows, normal disconnect/termination stops a still-running bridge tree.
|
|
276
|
-
Descendants already orphaned by an abrupt parent exit are not guaranteed to
|
|
277
|
-
be contained; this version does not use native Windows Job Objects.
|
|
278
|
-
- An abruptly killed management process can leave a lock. The diagnostic names
|
|
279
|
-
its owner and path; remove a stale lock only after that process has stopped.
|
|
280
|
-
|
|
281
|
-
`agentlink doctor [--json]` checks local profiles, launch files, managed
|
|
282
|
-
installation metadata and locks without starting agents or changing anything.
|
|
283
|
-
It exits with status 1 for detected errors. It does not test sign-in or ACP
|
|
284
|
-
compatibility; use `check PROFILE` for initialization.
|
|
285
|
-
|
|
286
|
-
## Verification and development
|
|
287
|
-
|
|
288
|
-
~~~sh
|
|
289
|
-
npm test
|
|
290
|
-
npm run test:maturity
|
|
291
|
-
npm pack
|
|
292
|
-
~~~
|
|
293
|
-
|
|
294
|
-
Tests use local fixture agents and locally produced npm packages, wheels and
|
|
295
|
-
binary archives. They cover independent ACP clients, shared updates, rollback,
|
|
296
|
-
leases/pruning, discovery, authentication forwarding and process cleanup.
|
|
297
|
-
The separate maturity check starts 50 batches of eight managed clients with
|
|
298
|
-
synthetic profiles, checks model and effort inheritance on every prompt, and
|
|
299
|
-
verifies lease cleanup after each batch.
|
|
300
|
-
Python installation coverage runs when Python is available. No vendor account
|
|
301
|
-
or paid model call is needed.
|
|
302
|
-
A GitHub Actions workflow is included for Windows/Linux/macOS with Node 22/24
|
|
303
|
-
and Python 3.13; it needs to run in the hosted repository before those platforms
|
|
304
|
-
can be claimed as validated.
|
|
305
|
-
|
|
306
|
-
See [laptop testing](docs/laptop-testing.md) for real-agent checks and
|
|
307
|
-
[architecture](docs/architecture.md) for the maintenance boundaries.
|
|
308
|
-
|
|
309
|
-
The original library exports and `examples/connect.mjs` remain
|
|
310
|
-
for compatibility. That helper is text-only ACP v1. New integrations should use
|
|
311
|
-
the standard gateway; the helper's limitations do not define the gateway.
|
|
312
|
-
|
|
313
|
-
## Working on this repository
|
|
314
|
-
|
|
315
|
-
Read [CONTRIBUTING.md](https://github.com/prplkane/agentlink/blob/main/CONTRIBUTING.md) and the shared
|
|
316
|
-
[AGENTS.md](https://github.com/prplkane/agentlink/blob/main/AGENTS.md). Non-trivial changes use the
|
|
317
|
-
[engineering work ledger](https://github.com/prplkane/agentlink/blob/main/docs/work/README.md). This is repository coordination,
|
|
318
|
-
not an AgentLink runtime feature.
|
|
319
|
-
|
|
320
|
-
The [source-document review](https://github.com/prplkane/agentlink/blob/main/docs/process/source-document-review.md) describes
|
|
321
|
-
the guidance adapted from Roundtable and Career Hub, grouped by project, with
|
|
322
|
-
explicit reasons for each inclusion and exclusion. See
|
|
323
|
-
[repository setup](https://github.com/prplkane/agentlink/blob/main/docs/process/repository-setup.md) for actual hosted settings.
|
|
324
|
-
|
|
325
|
-
## License
|
|
326
|
-
|
|
327
|
-
[Apache License 2.0](LICENSE), copyright 2026 prplkane.
|
|
328
|
-
[NOTICE](NOTICE) retains attribution for adapted process documentation.
|
|
329
|
-
The license does not change the repository's private visibility.
|
|
22
|
+
agentlink config claude
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The second command installs and checks the **bridge**, the adapter that lets the agent
|
|
26
|
+
speak ACP. The last command prints the executable and arguments to enter in your app's
|
|
27
|
+
ACP settings. If the app accepts a launch command, use `agentlink acp claude`.
|
|
28
|
+
|
|
29
|
+
## Share a model across apps
|
|
30
|
+
|
|
31
|
+
Suppose an editor and a code-review tool both use the `claude` profile. By default they
|
|
32
|
+
follow the agent's own settings. To choose a model and reasoning level for both, list the
|
|
33
|
+
available models, check the effort levels for the one you want, then save the pair.
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
agentlink models claude
|
|
37
|
+
agentlink models claude --model MODEL_ID
|
|
38
|
+
agentlink defaults claude --model MODEL_ID --effort EFFORT_ID
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Use the IDs advertised by the agent. Each new session picks up the change, and an app
|
|
42
|
+
can override it for that session. If the bridge stops offering a saved ID, AgentLink
|
|
43
|
+
reports it when an app opens a session. Choose a replacement once for the profile, or
|
|
44
|
+
return to the provider's choices with `agentlink defaults claude --clear-model --clear-effort`.
|
|
45
|
+
|
|
46
|
+
## Keep temporary work out of provider history
|
|
47
|
+
|
|
48
|
+
An ACP v1 app can request a temporary provider chat for an individual task. The
|
|
49
|
+
bridge reports whether it can disable local conversation persistence, archive the
|
|
50
|
+
chat when the app closes it, or leave history to the provider. Apps that require
|
|
51
|
+
native non-saving sessions can reject providers that lack them. The client can
|
|
52
|
+
leave out the preference for conversations the user wants to keep. [Session history negotiation](docs/architecture.md#session-history)
|
|
53
|
+
|
|
54
|
+
Run `agentlink check codex` to see what the installed profile supports. For
|
|
55
|
+
example, Codex can offer `exec --ephemeral` on the command line while its ACP
|
|
56
|
+
bridge can only archive a chat after it closes. Apps can read both results with
|
|
57
|
+
`agentlink check codex --json`.
|
|
58
|
+
|
|
59
|
+
## Manage connections
|
|
60
|
+
|
|
61
|
+
| Task | Command |
|
|
62
|
+
| --- | --- |
|
|
63
|
+
| List built-in provider configurations | `agentlink providers` |
|
|
64
|
+
| List configured profiles for an app's picker | `agentlink list --json` |
|
|
65
|
+
| Add Codex with a managed bridge | `agentlink add codex --provider codex` |
|
|
66
|
+
| Connect an installed command-line agent with ACP support | `agentlink add my-agent --command my-cli` |
|
|
67
|
+
| Update the shared Claude bridge | `agentlink bridge update claude` |
|
|
68
|
+
| Verify that a profile can start and negotiate ACP | `agentlink check claude` |
|
|
69
|
+
| Diagnose local profiles, installations, locks, and leases | `agentlink doctor` |
|
|
70
|
+
|
|
71
|
+
A managed update switches new connections to the verified bridge. Running connections
|
|
72
|
+
keep their version. For agents with native ACP support, such as Antigravity's `agy`,
|
|
73
|
+
update the command-line tool through its provider. [Setup and troubleshooting](docs/laptop-testing.md) ·
|
|
74
|
+
[Version pins and offline installs](docs/laptop-testing.md#custom-bridges-and-offline-installs)
|
|
75
|
+
|
|
76
|
+
## Compatibility and local data
|
|
77
|
+
|
|
78
|
+
AgentLink runs on demand and uses standard ACP over local stdin and stdout. The client
|
|
79
|
+
and bridge need a protocol version in common. Each bridge advertises the models, effort
|
|
80
|
+
levels, and commands it supports.
|
|
81
|
+
|
|
82
|
+
Profiles and managed installations live in `~/.agentlink/` by default. Run `agentlink where`
|
|
83
|
+
to find the active directory. Launch arguments and explicit environment settings are saved
|
|
84
|
+
as plain configuration, so keep credentials in the provider's sign-in mechanism.
|
|
85
|
+
Conversation history stays with the app and agent.
|
|
86
|
+
|
|
87
|
+
[Example ACP client](examples/acp-check.mjs) · [Architecture](docs/architecture.md) ·
|
|
88
|
+
[Release notes and test results](https://github.com/prplkane/agentlink/releases) ·
|
|
89
|
+
[Contributing](https://github.com/prplkane/agentlink/blob/main/CONTRIBUTING.md) · [Apache-2.0 license](LICENSE)
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# ACP and Roundtable qualification — 2026-11-09
|
|
2
2
|
|
|
3
|
+
> **Addendum, 2026-11-21.** This document describes the 2026-11-09 run and is
|
|
4
|
+
> kept as history. Two things have changed since:
|
|
5
|
+
>
|
|
6
|
+
> - Since `0.3.0-beta.3` a profile can hold a model and effort default
|
|
7
|
+
> (`agentlink models` and `agentlink defaults`, described in the README).
|
|
8
|
+
> That supersedes the statement below that no effort setting is needed in
|
|
9
|
+
> AgentLink. The `CODEX_CONFIG` route used here still works.
|
|
10
|
+
> - The bridge versions in the table are the ones tested on 2026-11-09. On
|
|
11
|
+
> 2026-11-21 the maintainer's machine had `codex-acp` 2.7.0 and
|
|
12
|
+
> `claude-agent-acp` 0.109.0 installed.
|
|
13
|
+
>
|
|
14
|
+
> Saved defaults were checked live with Codex, Claude and Antigravity on
|
|
15
|
+
> Windows before `0.3.0-beta.3` was published. Each bridge confirmed the
|
|
16
|
+
> selected model and effort in its session response. The bridge versions
|
|
17
|
+
> used in that check were not recorded.
|
|
18
|
+
|
|
3
19
|
The three real providers completed text prompts and two discussion rounds through
|
|
4
20
|
AgentLink and Roundtable. The deterministic small-agent mimic did too. The live
|
|
5
21
|
Codex chairman initially reached the test's 60-second deadline. The user-requested
|
package/docs/architecture.md
CHANGED
|
@@ -44,6 +44,12 @@ sessions on the same connection read later edits. Existing sessions, resume
|
|
|
44
44
|
operations and explicit client setters pass through. The connection keeps
|
|
45
45
|
its original bridge lease throughout.
|
|
46
46
|
|
|
47
|
+
If the gateway cannot prepare a creation, for example because the profile
|
|
48
|
+
file is unreadable at that moment, it answers that request with JSON-RPC
|
|
49
|
+
error `-32603` and the AgentLink or OS code in `data.code`. The request is
|
|
50
|
+
not forwarded to the bridge, and the reason is also written to stderr. The
|
|
51
|
+
connection and its other sessions continue.
|
|
52
|
+
|
|
47
53
|
Each configured creation keeps its own outstanding request ID. The gateway
|
|
48
54
|
reuses that ID upstream after the bridge's creation response and holds the
|
|
49
55
|
downstream response until configuration finishes. It replaces only the JSON
|
|
@@ -52,13 +58,84 @@ follow the creation reply. Intermediate configuration notifications are
|
|
|
52
58
|
superseded by the setter's complete option list. Pending setup and buffered
|
|
53
59
|
notifications have per-connection limits.
|
|
54
60
|
|
|
55
|
-
The connection owns one bridge process.
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
The connection owns one bridge process. When the client closes stdin, the
|
|
62
|
+
gateway forwards EOF and allows up to five seconds for the bridge to finish
|
|
63
|
+
and report its own exit status. If the bridge is still running, the gateway
|
|
64
|
+
stops its process tree where the host supports it. Existing ACP sessions
|
|
65
|
+
stay with that process when profiles or installations change.
|
|
58
66
|
Normal shutdown drains queued responses even for slow readers. Explicit
|
|
59
67
|
termination cancels both pumps and interrupts a blocked output drain, allowing
|
|
60
68
|
the connection to release its installation lease.
|
|
61
69
|
|
|
70
|
+
## Session history
|
|
71
|
+
|
|
72
|
+
An ACP v1 client opts in by sending `{"version":1}` under
|
|
73
|
+
`initialize.params.clientCapabilities._meta["agentlink.dev/session-history"]`.
|
|
74
|
+
The same key on `result.agentCapabilities._meta` returns the version and a
|
|
75
|
+
`strategy` of `ephemeral`, `archive-on-close` or `provider-managed`.
|
|
76
|
+
|
|
77
|
+
On an individual `session/new`, put `{"mode":"prefer-ephemeral"}` or
|
|
78
|
+
`{"mode":"require-ephemeral"}` under `params._meta["agentlink.dev/session-history"]`.
|
|
79
|
+
Omitting the key selects the provider's usual behavior. Each managed creation
|
|
80
|
+
returns `{"status":"..."}` under that key on `result._meta`. Check this actual
|
|
81
|
+
status before sending a prompt. Strict requests to a provider without native
|
|
82
|
+
non-saving support fail before session creation with
|
|
83
|
+
`error.data.code="SESSION_HISTORY_UNSUPPORTED"`. A Codex adapter that advertises
|
|
84
|
+
native support must also acknowledge it for the new thread. Missing or negative
|
|
85
|
+
acknowledgement fails creation with `SESSION_HISTORY_UNCONFIRMED`.
|
|
86
|
+
|
|
87
|
+
### Inspecting an installed transport
|
|
88
|
+
|
|
89
|
+
`add`, `inspect`, `check` and `refresh` expose `verification.sessionHistory` in
|
|
90
|
+
their JSON output. A stock Codex profile can produce the following result.
|
|
91
|
+
|
|
92
|
+
~~~json
|
|
93
|
+
{ "acpV1Strategy": "archive-on-close", "codexExecEphemeral": "advertised" }
|
|
94
|
+
~~~
|
|
95
|
+
|
|
96
|
+
`acpV1Strategy` describes the gateway's history policy for an ACP v1 client
|
|
97
|
+
using the opt-in above. It can also be `unknown` when the v1 handshake could
|
|
98
|
+
not be verified. A client still negotiates on its own connection and checks
|
|
99
|
+
the result of each requested creation.
|
|
100
|
+
|
|
101
|
+
For a bridge identifying itself as Codex ACP, `codexExecEphemeral` reports
|
|
102
|
+
whether its Codex executable lists `--ephemeral` in `exec --help`. AgentLink
|
|
103
|
+
checks the executable selected by `CODEX_PATH`, or the adapter's bundled CLI
|
|
104
|
+
via `codex-acp cli exec --help`. Values are `advertised`, `not-advertised`
|
|
105
|
+
and `unknown`. A failed command or unrecognized help format yields `unknown`.
|
|
106
|
+
Other agents omit this field. Direct CLI help never enables an ACP policy.
|
|
107
|
+
|
|
108
|
+
`inspect` and `check` return live observations. `add` and `refresh` save
|
|
109
|
+
them for offline reads with `show` or `list --json`. Older profiles and
|
|
110
|
+
profiles saved with `--skip-check` may lack this snapshot.
|
|
111
|
+
|
|
112
|
+
### Provider behavior
|
|
113
|
+
|
|
114
|
+
| Provider behavior | Creation status | Behavior at close |
|
|
115
|
+
| --- | --- | --- |
|
|
116
|
+
| Published Claude ACP releases from 0.109.0 through 0.112.0 | `ephemeral` | The gateway sets `_meta.claudeCode.options.persistSession=false` at creation. |
|
|
117
|
+
| Codex ACP with the versioned native extension | `ephemeral` | The adapter confirms the app-server started a non-saving thread. |
|
|
118
|
+
| Published Codex ACP releases from 2.7.0 through 2.12.0 | `archive-on-close` | The thread is persistent until archived. A successful archive removes it from active history and retains it in the provider's archive. |
|
|
119
|
+
| Antigravity and other bridges without qualified support | `provider-managed` | The provider controls storage and sidebar visibility. |
|
|
120
|
+
|
|
121
|
+
Use standard `session/close` when finished with an owned session. A successful
|
|
122
|
+
close reports `ephemeral`, `archived`, `provider-managed` or `unconfirmed` in
|
|
123
|
+
the result metadata. Upstream close errors reach the client. An archive error
|
|
124
|
+
or timeout produces `unconfirmed`. When the connection ends, the gateway makes
|
|
125
|
+
one bounded retry for a failed explicit archive. Sessions remain usable across prompts.
|
|
126
|
+
The legacy Codex path sets a fixed title before the first prompt when supported,
|
|
127
|
+
so an accepted title suppresses the adapter's automatic title generation.
|
|
128
|
+
When AIR session indexing is active, only its explicit archive operation is
|
|
129
|
+
eligible. The gateway takes cleanup IDs from managed creations on its own
|
|
130
|
+
connection. On disconnect it gives pending client close or removal requests
|
|
131
|
+
time to finish. A confirmed client removal completes cleanup. A refused
|
|
132
|
+
close can still be followed by an owned archive. Disconnect cleanup is bounded. Process death
|
|
133
|
+
or a failed bridge can leave a persistent thread in active history.
|
|
134
|
+
|
|
135
|
+
The gateway keeps ownership in memory. It records no transcript or list of
|
|
136
|
+
provider chats. Non-saving describes local provider conversation history.
|
|
137
|
+
Provider-side billing, data retention and the client's own records are separate.
|
|
138
|
+
|
|
62
139
|
## Management path
|
|
63
140
|
|
|
64
141
|
Profiles live in `profiles/NAME.json`. They contain a launch definition and
|
|
@@ -116,12 +193,18 @@ ACP commands are followed when advertised in command/option rows. An explicit
|
|
|
116
193
|
help argument array handles other conventions. Help is treated as data, never
|
|
117
194
|
as executable shell instructions or installation authority.
|
|
118
195
|
|
|
119
|
-
|
|
120
|
-
|
|
196
|
+
Discovery and connection checks open no sessions. AgentLink offers the v2
|
|
197
|
+
draft using `info` and `capabilities`, then reads the response
|
|
121
198
|
fields for the negotiated version (`agentInfo`/`agentCapabilities` in v1,
|
|
122
|
-
`info`/`capabilities` in v2).
|
|
123
|
-
|
|
124
|
-
|
|
199
|
+
`info`/`capabilities` in v2). A v2 reply, or a Codex reply to that initial
|
|
200
|
+
offer, gets a separate v1 initialization with the history opt-in. The primary
|
|
201
|
+
verification retains its negotiated protocol, capabilities and authentication
|
|
202
|
+
metadata even if this optional v1 check fails. A gateway connection uses the
|
|
203
|
+
caller's handshake and performs no help scans. Setup verification does not
|
|
204
|
+
verify model access, permissions enforcement, or complete task behavior. Model
|
|
205
|
+
listing uses read-only `session/options` when offered. Inspection that needs
|
|
206
|
+
live setters, or operates on a peer without that method, opens a fresh session
|
|
207
|
+
with the available non-saving or owned archive strategy and never sends a prompt.
|
|
125
208
|
Temporary probe directory cleanup retries transient Windows filesystem contention
|
|
126
209
|
for a bounded period; a persistent cleanup failure is still reported.
|
|
127
210
|
|
|
@@ -137,6 +220,7 @@ the profile instead of dropping its options and activating a different launch.
|
|
|
137
220
|
| `management-cli.mjs`, `doctor.mjs` | Management commands and read-only local diagnostics |
|
|
138
221
|
| `gateway.mjs`, `wire.mjs`, `terminal-auth.mjs`, `json-spans.mjs` | ACP forwarding, framing, backpressure and lossless JSON edits |
|
|
139
222
|
| `session-defaults.mjs`, `session-options.mjs` | Per-session defaults and bridge-advertised model and effort choices |
|
|
223
|
+
| `session-history.mjs` | Per-creation native history settings and connection-owned archive cleanup |
|
|
140
224
|
| `profiles.mjs`, `storage.mjs` | User profiles, atomic records and operation locks |
|
|
141
225
|
| `bridges.mjs`, `artifacts.mjs` | Selected distributions, shared installations, integrity and bounded extraction |
|
|
142
226
|
| `discovery.mjs`, `probe.mjs` | Help/metadata matching, initialization checks and explicit option inspection |
|
|
@@ -158,7 +242,9 @@ Windows process-tree cleanup uses taskkill while the owned bridge is alive.
|
|
|
158
242
|
Native Job Object containment is not implemented, so descendants orphaned by a
|
|
159
243
|
previously exited parent are a known limitation. Process ownership is not a
|
|
160
244
|
sandbox. Abrupt process death may leave a lock or lease; stale locks produce a
|
|
161
|
-
diagnostic
|
|
245
|
+
diagnostic. Doctor reports a lease whose process has exited as a note, and
|
|
246
|
+
pruning removes it. A management probe, help command or installer retains
|
|
247
|
+
its result if process cleanup fails. A warning on stderr identifies the PID.
|
|
162
248
|
Very deep Python virtual environments can exceed Windows launcher limits.
|
|
163
249
|
Installation detects an interpreter path of 260 or more characters before
|
|
164
250
|
running venv/pip and requests a shorter store. No path virtualization layer,
|