@robota-sdk/agent-transport-acp 0.0.0-stage → 3.0.0-beta.101
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/CHANGELOG.md +176 -0
- package/LICENSE +661 -0
- package/README.md +76 -2
- package/dist/node/index.cjs +6 -0
- package/dist/node/index.d.cts +95 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.d.ts +95 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +7 -0
- package/dist/node/index.js.map +1 -0
- package/package.json +78 -3
- package/src/__tests__/acp-command.test.ts +179 -0
- package/src/__tests__/acp-editor-files.test.ts +236 -0
- package/src/__tests__/acp-events-and-mapping.test.ts +102 -0
- package/src/__tests__/acp-handshake.test.ts +191 -0
- package/src/__tests__/acp-permission.test.ts +600 -0
- package/src/__tests__/acp-prompt.test.ts +482 -0
- package/src/__tests__/acp-session-load.test.ts +649 -0
- package/src/__tests__/acp-test-harness.ts +228 -0
- package/src/__tests__/acp-transport-lifecycle.test.ts +142 -0
- package/src/acp-agent.ts +290 -0
- package/src/acp-editor-files.ts +87 -0
- package/src/acp-permission.ts +131 -0
- package/src/acp-prompt-text.ts +40 -0
- package/src/acp-session-catalog.ts +65 -0
- package/src/acp-session-events.ts +80 -0
- package/src/acp-tool-calls.ts +166 -0
- package/src/acp-tool-mapping.ts +48 -0
- package/src/acp-transport.ts +134 -0
- package/src/acp-turn.ts +174 -0
- package/src/acp-types.ts +103 -0
- package/src/acp-updates.ts +45 -0
- package/src/index.ts +9 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# @robota-sdk/agent-transport-acp
|
|
2
|
+
|
|
3
|
+
## 3.0.0-beta.101
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- 5783499: Harden file, HTTP, relay, hosted-runtime, editor, and native path boundaries against resource exhaustion, short writes, path races, and integer narrowing.
|
|
7
|
+
|
|
8
|
+
Editor integrations now carry `Read`, `Write`, and `Edit` only when their `IEditorFileAccess` adapter declares `pathAuthority: 'stable-root'`; pathname-only adapters continue to receive disk-search notices, while file operations use the tools' stable disk authority. Existing adapters that can prove stable rooted access should add the marker to retain editor-buffer reads and writes.
|
|
9
|
+
|
|
10
|
+
`HttpDagRuntimeProvider` accepts a `token` option and applies it to every orchestration and event-stream request so it interoperates with the authenticated native DAG runtime server.
|
|
11
|
+
- Updated dependencies [62663ae]
|
|
12
|
+
- @robota-sdk/agent-core@3.0.0-beta.101
|
|
13
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.101
|
|
14
|
+
- @robota-sdk/agent-interface-transport@3.0.0-beta.101
|
|
15
|
+
- @robota-sdk/agent-transport@3.0.0-beta.101
|
|
16
|
+
|
|
17
|
+
## 3.0.0-beta.100
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- @robota-sdk/agent-core@3.0.0-beta.100
|
|
21
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.100
|
|
22
|
+
- @robota-sdk/agent-interface-transport@3.0.0-beta.100
|
|
23
|
+
- @robota-sdk/agent-transport@3.0.0-beta.100
|
|
24
|
+
|
|
25
|
+
## 3.0.0-beta.99
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- @robota-sdk/agent-core@3.0.0-beta.99
|
|
29
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.99
|
|
30
|
+
- @robota-sdk/agent-interface-transport@3.0.0-beta.99
|
|
31
|
+
- @robota-sdk/agent-transport@3.0.0-beta.99
|
|
32
|
+
|
|
33
|
+
## 3.0.0-beta.98
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- @robota-sdk/agent-core@3.0.0-beta.98
|
|
37
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.98
|
|
38
|
+
- @robota-sdk/agent-interface-transport@3.0.0-beta.98
|
|
39
|
+
- @robota-sdk/agent-transport@3.0.0-beta.98
|
|
40
|
+
|
|
41
|
+
## 3.0.0-beta.97
|
|
42
|
+
### Minor Changes
|
|
43
|
+
|
|
44
|
+
- e5a4254: **An editor that offers its file system carries the file tools' reads and writes.**
|
|
45
|
+
|
|
46
|
+
`Read`, `Write` and `Edit` take an optional `editorFiles` port (`IEditorFileAccess`), asked at each
|
|
47
|
+
call. On the host, after the tool's containment check (the permission gate has already decided),
|
|
48
|
+
`Read` returns the editor's text, unsaved changes included, and `Write` hands the content to the
|
|
49
|
+
editor; `Edit` reads where `Read` reads and writes where `Write` writes. The editor's text keeps
|
|
50
|
+
`Read`'s byte budget, binary refusal, formatting and cancellation, and an editor failure becomes the
|
|
51
|
+
tool's error result. `Glob` and `Grep` still search the disk and end their result with a note saying
|
|
52
|
+
so while an editor is attached. A sandbox with its own filesystem still carries every file tool, and
|
|
53
|
+
commands never use the editor. `createDefaultTools` and `createCodingPack` pass `editorFiles` through
|
|
54
|
+
to those tools only.
|
|
55
|
+
|
|
56
|
+
The ACP agent transport records the editor's `clientCapabilities.fs` and, once `session/new` binds the
|
|
57
|
+
session, hands the host an access through the new `onEditorFileAccess` option that sends
|
|
58
|
+
`fs/read_text_file` and `fs/write_text_file` for that session, for what the editor offered; stopping
|
|
59
|
+
the transport withdraws it. `robota acp` connects the two, so Read, Write and Edit go through the
|
|
60
|
+
editor in an editor that offers `fs`; `terminal/*` is not used.
|
|
61
|
+
- 0d43f37: **An editor can reopen an earlier conversation over ACP and offer the agent's slash commands.**
|
|
62
|
+
|
|
63
|
+
`@robota-sdk/agent-transport-acp` sends `available_commands_update` once the editor holds the session
|
|
64
|
+
id — the runtime's commands and the user-invocable skills, each with its argument hint — and again
|
|
65
|
+
after a prompt that changed the list (a plugin reload, a preset). A host can supply `loadSession`;
|
|
66
|
+
the agent then offers `session/load`, checks it exactly like `session/new` (the served directory, no
|
|
67
|
+
editor MCP servers or extra roots, workspace trust), refuses it while a prompt runs, and replays the
|
|
68
|
+
loaded conversation — what was typed, what the agent answered, and each finished tool call, a reused
|
|
69
|
+
call id getting a row of its own — before it answers. The port makes the stored session current in
|
|
70
|
+
the object the transport was attached to, so a host attaches a forwarder such as a session slot.
|
|
71
|
+
The published narrow `IAcpTransportSession` contract remains supported: command listing and history
|
|
72
|
+
display reads are optional capabilities. Loading is offered only with both the host port and the
|
|
73
|
+
history read, so a session cannot be replaced without replaying its conversation.
|
|
74
|
+
|
|
75
|
+
`robota acp` supplies the load: the editor may load a stored session of the folder it serves that
|
|
76
|
+
this version can read, and the agent replaces its session with it and shuts the old one down. A load
|
|
77
|
+
is refused while the current session has work in progress, and for a stored session with an active
|
|
78
|
+
goal, a live loop or a schedule that restore would re-arm to fire, which would otherwise run unseen
|
|
79
|
+
by the editor. With `--no-session-persistence` nothing is stored, so loading is not offered.
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- Updated dependencies [c207a31]
|
|
84
|
+
- Updated dependencies [9b4f63b]
|
|
85
|
+
- Updated dependencies [7911a7d]
|
|
86
|
+
- Updated dependencies [23a30cd]
|
|
87
|
+
- @robota-sdk/agent-core@3.0.0-beta.97
|
|
88
|
+
- @robota-sdk/agent-transport@3.0.0-beta.97
|
|
89
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.97
|
|
90
|
+
- @robota-sdk/agent-interface-transport@3.0.0-beta.97
|
|
91
|
+
|
|
92
|
+
## 3.0.0-beta.96
|
|
93
|
+
### Patch Changes
|
|
94
|
+
|
|
95
|
+
- @robota-sdk/agent-core@3.0.0-beta.96
|
|
96
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.96
|
|
97
|
+
- @robota-sdk/agent-interface-transport@3.0.0-beta.96
|
|
98
|
+
- @robota-sdk/agent-transport@3.0.0-beta.96
|
|
99
|
+
|
|
100
|
+
## 3.0.0-beta.95
|
|
101
|
+
### Minor Changes
|
|
102
|
+
|
|
103
|
+
- c967c57: `robota acp` runs the agent as an Agent Client Protocol (v1) agent over stdio, so an editor that launches it (Zed, JetBrains and other ACP clients) can create a session, send prompts, see streamed replies and tool calls, approve or reject permission requests, and cancel a turn. Workspace trust, permission rules and the sandbox behave as in the terminal: the editor answers prompts and widens nothing. A folder that is not trusted yet is refused at `session/new` with the `trust` command to run, a working directory other than the one the agent was started in and any editor-supplied MCP servers or extra roots are refused, and a prompt that starts with `/` runs that command.
|
|
104
|
+
|
|
105
|
+
New package `@robota-sdk/agent-transport-acp` provides `createAcpTransport`, the ACP `ITransportAdapter` the command uses.
|
|
106
|
+
|
|
107
|
+
`@robota-sdk/agent-transport/node` gains `attachStdioCarrier`, the process-input bridge and close observation a stdio protocol carrier shares. `agent-transport-mcp` now uses it for its stdio carrier; its behavior is unchanged.
|
|
108
|
+
- 04719a9: **A permission request names the tool call it is about.**
|
|
109
|
+
|
|
110
|
+
`IPermissionRequestEvent` gains an optional `executionId`: the same id the call's `tool_start` and
|
|
111
|
+
`tool_end` carry, so a surface can hold one row from the request to the call's end. The session's
|
|
112
|
+
permission path carries the call's id from the tool wrapper to the prompt (`IPermissionAskContext.executionId`)
|
|
113
|
+
and the framework's prompt registry stamps it on the event, so it reaches every client that receives
|
|
114
|
+
the event, the WebSocket and HTTP `permission_request` frames included. It is present whenever the
|
|
115
|
+
session reports that call (its own, or an in-process background agent's) and absent for a
|
|
116
|
+
child-process agent's forwarded request.
|
|
117
|
+
|
|
118
|
+
The ACP agent transport keys its permission rows by that id: the request's `toolCallId` is the
|
|
119
|
+
call's execution id, its start and end address the same row, a denial the session decides on its
|
|
120
|
+
own while the editor's dialog is open closes that one row, and two same-named calls each follow
|
|
121
|
+
their own row whatever order the editor answers in. A request that names no call gets a row that
|
|
122
|
+
closes with the answer, and is closed at the end of the turn if no answer came. The name-ordered
|
|
123
|
+
matching is gone.
|
|
124
|
+
- 04a6de4: **Reasoning text a provider streams now reaches the editor as an ACP `agent_thought_chunk`, through a new `thinking_delta` session event.**
|
|
125
|
+
|
|
126
|
+
`IChatOptions.onThinkingDelta`, `IRunOptions.onThinkingDelta` and `IResumeExecutionOptions.onThinkingDelta`
|
|
127
|
+
(typed `TThinkingDeltaCallback`) carry reasoning text from a provider through the run, and the session
|
|
128
|
+
options (`ISessionOptions.onThinkingDelta`, `ICreateSessionOptions.onThinkingDelta`) hand it to the
|
|
129
|
+
session's owner. `InteractiveSession` emits it as `thinking_delta(delta)`, beside `text_delta`. The
|
|
130
|
+
text is never part of the reply: it is not appended to the conversation, not streamed through
|
|
131
|
+
`onTextDelta`, and the core adds no record of its own for it (no text-delta log entry, no
|
|
132
|
+
`provider_stream_raw_delta`); a provider's own native payload capture and response metadata keep
|
|
133
|
+
what the provider sent, as before. A reasoning delta counts as provider activity for the idle
|
|
134
|
+
timeout whether or not anyone listens to it, so a model that is only thinking is not cut off. The
|
|
135
|
+
existing `thinking(isThinking)` event is unchanged and remains the busy indicator. Where a provider
|
|
136
|
+
sends no reasoning text, nothing is emitted and nothing new is switched on.
|
|
137
|
+
|
|
138
|
+
`@robota-sdk/agent-interface-session` is a major change because a new session event name makes an
|
|
139
|
+
exhaustive map over the event names stop compiling until it classifies the event.
|
|
140
|
+
|
|
141
|
+
`@robota-sdk/agent-transport-acp` sends each non-empty `thinking_delta` to the editor as an
|
|
142
|
+
`agent_thought_chunk`, in order with the message chunks, so `robota acp` shows the model's reasoning
|
|
143
|
+
in the editor. A turn that streamed only thoughts still shows its result text, because only reply
|
|
144
|
+
text marks a turn as streamed. The WebSocket wire, the HTTP stream, headless stream-json, `query()`
|
|
145
|
+
and the terminal UI do not carry the new event in this change (`@robota-sdk/agent-transport` and
|
|
146
|
+
`@robota-sdk/agent-ui-terminal` classify it as non-surface). A forked skill and an in-process subagent
|
|
147
|
+
pass their reply text up but not their reasoning.
|
|
148
|
+
|
|
149
|
+
Two providers already receive reasoning text and now report it. `@robota-sdk/agent-provider-openai`
|
|
150
|
+
passes `response.reasoning_summary_text.delta` events of a streamed Responses call to
|
|
151
|
+
`onThinkingDelta`; the API sends them only when the provider profile asks for a reasoning summary, and
|
|
152
|
+
no request option changed; a summary streamed in several parts, and the summary of a later reasoning
|
|
153
|
+
item, each start on a new paragraph (`\n\n`) so the parts do not run together.
|
|
154
|
+
`@robota-sdk/agent-provider-openai-compatible` reports the text of Gemma's thought channel, which the
|
|
155
|
+
provider already removed from the reply, as it streams across chunk boundaries, with each later
|
|
156
|
+
channel of one reply on a new paragraph; the reply text is unchanged. No other provider reports
|
|
157
|
+
reasoning, and Anthropic thinking is not enabled. A model fallback chain still moves to the next model when only reasoning had streamed.
|
|
158
|
+
|
|
159
|
+
The scripted test provider (`@robota-sdk/agent-core/testing`) accepts an optional `thinking` string on
|
|
160
|
+
a turn and delivers it through `onThinkingDelta` before the turn's text; the scripted session harness
|
|
161
|
+
collects `thinking_delta` and now keeps a scripted tool-call turn's `usage`, which it used to drop.
|
|
162
|
+
|
|
163
|
+
### Patch Changes
|
|
164
|
+
|
|
165
|
+
- 0f7d214: Name a built-in file tool's path in the permission request an editor is asked about. The title of a Read request now reads `Read: <path>` instead of the tool name alone, because the adapter takes the call's identifying argument from the shared `permissionSummaryArgument` that the MCP transport also uses, which includes `filePath`.
|
|
166
|
+
- Updated dependencies [c967c57]
|
|
167
|
+
- Updated dependencies [60f3965]
|
|
168
|
+
- Updated dependencies [115e104]
|
|
169
|
+
- Updated dependencies [04719a9]
|
|
170
|
+
- Updated dependencies [04a6de4]
|
|
171
|
+
- Updated dependencies [0ba247b]
|
|
172
|
+
- Updated dependencies [02053ec]
|
|
173
|
+
- @robota-sdk/agent-transport@3.0.0-beta.95
|
|
174
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.95
|
|
175
|
+
- @robota-sdk/agent-core@3.0.0-beta.95
|
|
176
|
+
- @robota-sdk/agent-interface-transport@3.0.0-beta.95
|