@chipschat/acp 0.0.0-stage → 1.0.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/LICENSE +201 -0
- package/README.md +195 -2
- package/dist/THIRD-PARTY-NOTICES.md +436 -0
- package/dist/main.js +26064 -0
- package/package.json +38 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 The Chips Authors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,196 @@
|
|
|
1
|
-
#
|
|
1
|
+
# chips-acp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An agent that speaks the [Agent Client Protocol](https://agentclientprotocol.com) (ACP) — Claude
|
|
4
|
+
Code, Codex, Goose, Gemini — as a Chips harness, one kind per harness. People make its agents from
|
|
5
|
+
Chips: a room from the +, a new agent from a room's Add page, a copy with Fork. Each agent works in a
|
|
6
|
+
folder of its own; each room it is in is one ACP session of it. There is no Main agent. The bridge
|
|
7
|
+
runs the agent's process, so the bridge is the harness (Chips ADR 0041), built on `@chipschat/harness`.
|
|
8
|
+
Phase 4 of Chips's `docs/proposals/open-source-harnesses-plan.md`, and Chips's
|
|
9
|
+
`docs/proposals/acp-agents-made-from-chips-plan.md`.
|
|
10
|
+
|
|
11
|
+
Local only: no remote, nothing published. The `@chipschat/*` packages come from `vendor/`, packed from
|
|
12
|
+
the Chips repo with `pnpm release:sdk`.
|
|
13
|
+
|
|
14
|
+
## From Chips's gallery
|
|
15
|
+
|
|
16
|
+
The card's line is `chips connect claude-code '<link>'` or `chips connect codex '<link>'` (Chips ADR 0218). It downloads this bridge as the npm package
|
|
17
|
+
`@chipschat/acp`, the newest 1.x, checks it against the registry's checksum, and runs it on the Node
|
|
18
|
+
that Chips carries, so the machine needs no Node or npm of its own. The bridge checks the agent's ACP adapter and its sign-in,
|
|
19
|
+
joins, and keeps itself running from login. `chips disconnect claude-code` or `chips disconnect codex` stops it. Claude Code and Codex share this one package: their cards hand it `~/.chips-acp/claude-code.json` or `codex.json`, and the file's name picks the kind. On another computer,
|
|
20
|
+
`curl -fsSL https://chipschat.ai/install | sh -s -- connect claude-code '<link>'` installs Chips there
|
|
21
|
+
first. The steps below run the bridge from this checkout instead, to work on it.
|
|
22
|
+
|
|
23
|
+
## Run it
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install -g @agentclientprotocol/claude-agent-acp # or @agentclientprotocol/codex-acp
|
|
27
|
+
npm install
|
|
28
|
+
CHIPS_JOIN_LINK='<a join link made in Chips>' npm run keep ~/.chips-acp/claude-code.json
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`npm run keep` joins, then keeps the bridge running from login ("Keep it running", below);
|
|
32
|
+
`npm start` is the same in the terminal only.
|
|
33
|
+
|
|
34
|
+
The link comes from Chips's gallery (Add an agent → Claude Code, or Codex), whose card gives this
|
|
35
|
+
line with the link in it (`codex.json` for Codex) and starts the link with what it needs on:
|
|
36
|
+
`agents`, `new_spaces`, `new_agents`, `forks` and `restarts`. `claude-code.json` and `codex.json`
|
|
37
|
+
need not be there: without them the bridge runs Claude Code or Codex, in the mode that asks (see
|
|
38
|
+
"Asking a person"), with each agent's folder under `~/chips-acp/claude-code` or `~/chips-acp/codex`.
|
|
39
|
+
|
|
40
|
+
Before it takes the link up, which works once, it checks:
|
|
41
|
+
- the config is there, or is one of those two;
|
|
42
|
+
- its command is on this machine's PATH (else how to install it);
|
|
43
|
+
- the agent starts, makes a session, and is signed in: Codex refuses a session while signed out,
|
|
44
|
+
and Claude Code says it is signed in as nobody (`_auth/status_update`). Signed out, it says how
|
|
45
|
+
to sign in: `codex login`, or `claude` then /login.
|
|
46
|
+
|
|
47
|
+
Anything missing stops it with what to do, and the link is still good. Joined, it says hello in its
|
|
48
|
+
room once, which the card waits for; a new link from Chips replaces the key it kept. Without a
|
|
49
|
+
link, set `CHIPS_URL` and allow the code it prints from Chips. Its key is kept as `join()` keeps
|
|
50
|
+
one (the keychain, under the kind's name); its cursor, unanswered events, unended runs, its agents
|
|
51
|
+
and which session each of their rooms is are kept in a folder beside the config, named after it
|
|
52
|
+
(`~/.chips-acp/claude-code/`), so a restart picks up where it was. Each start logs whether the
|
|
53
|
+
agent says it is signed in, and a turn it refuses for that says how to sign in.
|
|
54
|
+
|
|
55
|
+
The config names one kind:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{ "name": "Claude Code", "command": ["claude-agent-acp"], "mode": "default", "folders": "~/chips-acp/claude-code" }
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- `name` is the harness's name in Chips, and its own agent's.
|
|
62
|
+
- `command` is how the agent speaks ACP over stdio: `["claude-agent-acp"]`, `["codex-acp"]`,
|
|
63
|
+
`["goose", "acp"]`, `["gemini", "--acp"]`, `["opencode", "acp"]`.
|
|
64
|
+
- `folders` is where each agent gets a folder of its own, named after it (`~/chips-acp/claude-code/nova`),
|
|
65
|
+
made empty. A copy from Fork works on in its original's folder, with the files the conversation it
|
|
66
|
+
remembers expects. A deleted agent's folder stays.
|
|
67
|
+
- `folder`, in its place, puts every agent in one folder: a repository they work on together.
|
|
68
|
+
- `mode` is the mode its sessions are put in, of those the agent offers (see below). `env` adds to
|
|
69
|
+
its environment.
|
|
70
|
+
|
|
71
|
+
Installing any other agent and signing it in to a model is done the agent's own way, before it is
|
|
72
|
+
named here. A second kind is a second config, and a second bridge beside the first.
|
|
73
|
+
|
|
74
|
+
### Its agents
|
|
75
|
+
|
|
76
|
+
- **The + in Chips**, with the harness's face: the room is claimed, named from the first words, and
|
|
77
|
+
a new agent (Chips names it) answers them.
|
|
78
|
+
- **Add on a room → a new agent**: an agent called what the person asked joins the room.
|
|
79
|
+
- **Fork**: the agent's session in the room it is in is copied (`session/fork`), and the copy
|
|
80
|
+
remembers everything up to then. One that never spoke is copied fresh.
|
|
81
|
+
- **The harness's own room** has the agent Chips gives every harness, named after it: an ordinary
|
|
82
|
+
agent, which a person can move anywhere.
|
|
83
|
+
- A session quiet for 30 minutes is closed (`session/close`) and loaded again on the next word,
|
|
84
|
+
where the agent offers both: each open Claude Code session is a process of its own.
|
|
85
|
+
|
|
86
|
+
### Keep it running
|
|
87
|
+
|
|
88
|
+
`npm run keep <config>` does what `npm start <config>` does, with the link or without, then writes
|
|
89
|
+
a launch agent, `~/Library/LaunchAgents/chat.chips.acp.<config's name>.plist` (a systemd user unit
|
|
90
|
+
on Linux), that runs the bridge from login and again whenever it stops, and ends. Its log is
|
|
91
|
+
`~/Library/Logs/chips-acp-<config's name>.log`; `npm run keep -- <config> --stop` stops it and
|
|
92
|
+
removes the file. A launch agent of that name written by hand is left as it is, so a harness never
|
|
93
|
+
runs twice:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
launchctl kickstart -k gui/$(id -u)/chat.chips.acp.claude-code # restart one
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Stop any copy started by hand first: two bridges for one harness answer twice.
|
|
100
|
+
|
|
101
|
+
### Asking a person
|
|
102
|
+
|
|
103
|
+
Claude Code's and Codex's adapters start each session in a mode where the agent decides for
|
|
104
|
+
itself: Claude Code's `auto`, Codex's `agent` ("Auto review", where Codex's own reviewer answers
|
|
105
|
+
its asks). Then nothing reaches Chips as a card. Put them where they ask:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{ "name": "Claude Code", "command": ["claude-agent-acp"], "mode": "default" }
|
|
109
|
+
{ "name": "Codex", "command": ["codex-acp"], "mode": "workspace-write" }
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
- Claude Code still follows its own settings (`~/.claude/settings.json`). What they allow, it
|
|
113
|
+
does without asking, and read-only commands never ask.
|
|
114
|
+
- Codex in `workspace-write` changes its folder freely and asks before the network or anything
|
|
115
|
+
outside it. `read-only` asks before any change.
|
|
116
|
+
|
|
117
|
+
## Live
|
|
118
|
+
|
|
119
|
+
14 October 2026, on Chips's live server: Claude Code (`@agentclientprotocol/claude-agent-acp`
|
|
120
|
+
0.90.0, on its own sign-in) and Codex (`@agentclientprotocol/codex-acp` 2.2.2, on a ChatGPT
|
|
121
|
+
sign-in). Each took turns with steps, the gauge and the reply. Claude Code's cost came with its
|
|
122
|
+
turns; Codex's didn't, as on a ChatGPT sign-in its adapter reports none. An approval went round
|
|
123
|
+
from each, asked, approved in Chips, the call run, and said so. Chips's
|
|
124
|
+
`testing/scenarios/harnesses/acp-agents-live.md` has the run.
|
|
125
|
+
|
|
126
|
+
Later that night, one harness per kind (`~/.chips-acp/claude-code.json`, `codex.json`, launch
|
|
127
|
+
agents `chat.chips.acp.claude-code` and `chat.chips.acp.codex`), for each: a room from the +
|
|
128
|
+
claimed and answered by a new agent in its own folder; a new agent from Add; a Fork whose copy
|
|
129
|
+
remembered what came before and whose original didn't hear the copy; the harness's own agent
|
|
130
|
+
moved out of its room; the copy deleted, its folder kept; and a session closed after 30 quiet
|
|
131
|
+
minutes and loaded again with its memory. Fourteen runs, none failed, $0.35, all Claude Code's.
|
|
132
|
+
|
|
133
|
+
## What maps to what
|
|
134
|
+
|
|
135
|
+
| Chips | ACP |
|
|
136
|
+
|---|---|
|
|
137
|
+
| A message for an agent | `session/prompt` with the room note and who said it (`promptFor`), files saved under `<folder>/chips-files/` |
|
|
138
|
+
| The room | a session in the agent's folder: `session/new` the first time, `session/load` after a restart or an idle close where the agent offers it |
|
|
139
|
+
| A room from the + | `claimSpace` under a new key; Chips makes its agent; the first words are its first prompt |
|
|
140
|
+
| A new agent (Add) | a record and a folder, registered with `madeFor` and the room |
|
|
141
|
+
| Fork | `session/fork` of the original's session in its room, in its folder; the copy registered with `forkedFrom` |
|
|
142
|
+
| An agent deleted | its sessions closed (`session/close`), its record forgotten; its folder stays |
|
|
143
|
+
| The run | the prompt's turn; `stopReason` ends it (`refusal` fails it, `max_tokens` adds a follow-up) |
|
|
144
|
+
| Status | `agent_thought_chunk`, a line at most every 1.5 s |
|
|
145
|
+
| Steps | `tool_call` / `tool_call_update` by `toolCallId`, titled with the tool's name or kind |
|
|
146
|
+
| Plan | `plan` |
|
|
147
|
+
| Context gauge, cost | `usage_update` (`used`/`size`; `cost` in USD, the turn's share) |
|
|
148
|
+
| The reply | `agent_message_chunk`s gathered into one message; `NO_REPLY` alone is the turn passed |
|
|
149
|
+
| Files in the reply | each `MEDIA:<path>` line of the reply sent as an upload with its words, only from the agent's folder (`sendAnswer`); the post says why one could not go |
|
|
150
|
+
| Approval card | `session/request_permission`; allowed always picks `allow_always`, no picks `reject_once`; Stop answers `cancelled`; the card hears how the call went |
|
|
151
|
+
| Question card | `elicitation/create` form of up to four choice or yes/no fields; anything else is declined |
|
|
152
|
+
| Stop | `session/cancel` |
|
|
153
|
+
| Steer | the next prompt of the same run, after `session/cancel` when it interrupts |
|
|
154
|
+
| Not right? (Chips ADR 0200) | a `correction`, or an older device's 👎: one more turn of the agent who said the reply (by its id in the room's lines), in that room's session, quoting its reply and what was wrong; the run is *Looking again: …*; a 👍 or any other reaction is nothing, and each is answered once |
|
|
155
|
+
| Restart | the agent's process stopped and run again |
|
|
156
|
+
| Trouble | the agent not running; it is run again after 2 s, longer each time it fails to start |
|
|
157
|
+
|
|
158
|
+
The agent is offered no file system and no terminal: it works with its own tools, under its own
|
|
159
|
+
permissions, and each permission it asks for is an approval card.
|
|
160
|
+
|
|
161
|
+
## Not built yet
|
|
162
|
+
|
|
163
|
+
From the plan's Phase 4: agents over WebSocket (`goose serve`); `follows_rooms`; models and effort
|
|
164
|
+
from `configOptions`; context files; the bridge's own MCP server (reminders, ask a person) and heartbeats; sub-agents as lanes; free-text form fields; approval scopes limited to the
|
|
165
|
+
agent's options (a wire change, Phase 6).
|
|
166
|
+
|
|
167
|
+
## Tests
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
npm test
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
A scripted ACP agent (`test/fake-agent.ts`), in process and as a child process, against the
|
|
174
|
+
conformance kit's fake Chips, which checks every event against the protocol's schemas; and the kit's
|
|
175
|
+
golden scenario with the +, Add and Fork, which
|
|
176
|
+
`chips conformance custom --capabilities agents,new_spaces,new_agents,forks,restarts` runs live:
|
|
177
|
+
Lives in Chips 5 of 6.
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
npm run e2e
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
The gallery's ACP card, run as a person runs it, against a scratch Chips from a Chips checkout
|
|
184
|
+
(`CHIPS_REPO`, `~/Work/Chips/chips-main` unless set; skipped without one), with the fake agent installed on the
|
|
185
|
+
PATH under a name of its own (never `claude-agent-acp`, which this machine may have for real). Each
|
|
186
|
+
thing not set up stops it with the link still good; then it joins with what the card grants, says
|
|
187
|
+
hello once in its room, says nothing more started again, and takes up a new link in place of the key
|
|
188
|
+
it kept. The scratch Chips, the link and the run come from Chips's `tools/connect-kit`, which packs this checkout and serves it from a stand-in npm registry, so the card's `chips connect` downloads, checks and runs what would be published.
|
|
189
|
+
|
|
190
|
+
## Release
|
|
191
|
+
|
|
192
|
+
`npm run release` builds `dist/main.js`, one file with the SDK and everything else bundled in, and
|
|
193
|
+
`dist/THIRD-PARTY-NOTICES.md` beside it; runs the tests; and packs `chipschat-acp-<version>.tgz`. `npm publish`
|
|
194
|
+
publishes it. A version's major is the Chips protocol it speaks, and Chips's card names that major
|
|
195
|
+
(Chips ADR 0218): a fix is a minor or a patch, and reaches every card of its major the day it is
|
|
196
|
+
published.
|