@agentproto/acp 0.4.0 → 0.5.0
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 +202 -21
- package/dist/client/index.d.ts +21 -2
- package/dist/client/index.mjs +120 -17
- package/dist/client/index.mjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/manifest/index.d.ts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/tunnel/index.d.ts +268 -3
- package/dist/tunnel/index.mjs +331 -4
- package/dist/tunnel/index.mjs.map +1 -1
- package/dist/{types-Sxd1kKk2.d.ts → types-DQCJO97x.d.ts} +41 -1
- package/package.json +4 -3
|
@@ -9,6 +9,19 @@
|
|
|
9
9
|
* `AcpHandle` is the readonly view of the same shape; tighten it by
|
|
10
10
|
* hand for fields that get defaults applied in build().
|
|
11
11
|
*/
|
|
12
|
+
/**
|
|
13
|
+
* How a host resolves a `session/request_permission` request that was parked
|
|
14
|
+
* by permission-hold mode. `{ optionId }` selects one of the offered options
|
|
15
|
+
* (the allow- or reject-flavored one, chosen by the host); `{ cancelled: true }`
|
|
16
|
+
* maps to ACP's `cancelled` outcome (used when the request offers no matching
|
|
17
|
+
* option or the session is being torn down). Consumed by
|
|
18
|
+
* `AcpClient.respondPermission` and the daemon's permission inbox.
|
|
19
|
+
*/
|
|
20
|
+
type AcpPermissionResolution = {
|
|
21
|
+
optionId: string;
|
|
22
|
+
} | {
|
|
23
|
+
cancelled: true;
|
|
24
|
+
};
|
|
12
25
|
type AcpRole = "client" | "server" | "bridge";
|
|
13
26
|
type AcpTransport = "stdio" | "websocket";
|
|
14
27
|
type AcpTier = "basic" | "governance-aware" | "sandboxed";
|
|
@@ -119,6 +132,22 @@ type StreamEvent = {
|
|
|
119
132
|
toolCallId: string;
|
|
120
133
|
toolName: string;
|
|
121
134
|
arguments: unknown;
|
|
135
|
+
/**
|
|
136
|
+
* True when this event ENRICHES a call already announced under the same
|
|
137
|
+
* `toolCallId` rather than announcing a new one.
|
|
138
|
+
*
|
|
139
|
+
* ACP lets an agent announce a call before it knows the details and fill
|
|
140
|
+
* them in afterwards. The claude-code bridge does exactly that: its
|
|
141
|
+
* `tool_call` carries `title: "Read File"` with `rawInput: {}`, and the
|
|
142
|
+
* FOLLOWING `tool_call_update` carries `rawInput: {file_path: …}` plus a
|
|
143
|
+
* real title. Consumers must merge an update onto the existing call
|
|
144
|
+
* (keyed by `toolCallId`) rather than rendering a second card, and must
|
|
145
|
+
* not count it as a fresh call for logging or blocked-on purposes.
|
|
146
|
+
*
|
|
147
|
+
* `toolName` is `""` when the update carried no title — merge only
|
|
148
|
+
* non-empty names so an untitled enrichment can't erase a good one.
|
|
149
|
+
*/
|
|
150
|
+
isUpdate?: boolean;
|
|
122
151
|
} | {
|
|
123
152
|
kind: "tool-result";
|
|
124
153
|
sessionId: string;
|
|
@@ -132,8 +161,19 @@ type StreamEvent = {
|
|
|
132
161
|
} | {
|
|
133
162
|
kind: "agent-prompt";
|
|
134
163
|
sessionId: string;
|
|
164
|
+
/**
|
|
165
|
+
* Correlation id for this prompt. In permission-hold mode this is the
|
|
166
|
+
* stable request id the host passes back to `respondPermission` to
|
|
167
|
+
* resolve the parked `session/request_permission` RPC — derived from the
|
|
168
|
+
* ACP `toolCall.toolCallId` plus a per-client counter so it stays unique
|
|
169
|
+
* even when an agent re-requests permission for the same tool call.
|
|
170
|
+
*/
|
|
135
171
|
toolCallId: string;
|
|
136
172
|
options: unknown;
|
|
173
|
+
/** Human-readable "Allow X?" line, when derivable from the request. */
|
|
174
|
+
text?: string;
|
|
175
|
+
/** Tool title/kind the agent is asking permission for, when present. */
|
|
176
|
+
toolName?: string;
|
|
137
177
|
} | {
|
|
138
178
|
kind: "turn-end";
|
|
139
179
|
sessionId: string;
|
|
@@ -178,4 +218,4 @@ type StreamEvent = {
|
|
|
178
218
|
tokensOut?: number;
|
|
179
219
|
};
|
|
180
220
|
|
|
181
|
-
export type { AcpDefinition as A, StreamEvent as S, AcpAuditConfig as a, AcpCapabilities as b, AcpHandle as c, AcpMcpServer as d,
|
|
221
|
+
export type { AcpDefinition as A, StreamEvent as S, AcpAuditConfig as a, AcpCapabilities as b, AcpHandle as c, AcpMcpServer as d, AcpPermissionResolution as e, AcpRole as f, AcpTier as g, AcpTransport as h, Aip44Extensions as i };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentproto/acp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "@agentproto/acp — AIP-44 ACP.md reference implementation. An agentproto profile of the Agent Client Protocol (agentclientprotocol.com). Wraps @agentclientprotocol/sdk with createAcpClient (drives subprocess agents) and createAcpServer (exposes AIP-9 operators to ACP-speaking IDEs).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentproto",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"bugs": {
|
|
21
21
|
"url": "https://github.com/agentproto/ts/issues"
|
|
22
22
|
},
|
|
23
|
-
"license": "
|
|
23
|
+
"license": "Apache-2.0",
|
|
24
24
|
"type": "module",
|
|
25
25
|
"main": "dist/index.mjs",
|
|
26
26
|
"module": "dist/index.mjs",
|
|
@@ -65,13 +65,14 @@
|
|
|
65
65
|
"@agentclientprotocol/sdk": "^0.21.0",
|
|
66
66
|
"gray-matter": "^4.0.3",
|
|
67
67
|
"zod": "^4.4.3",
|
|
68
|
-
"@agentproto/define-doctype": "0.1.
|
|
68
|
+
"@agentproto/define-doctype": "0.1.1"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/node": "^25.6.2",
|
|
72
72
|
"tsup": "^8.5.1",
|
|
73
73
|
"typescript": "^5.9.3",
|
|
74
74
|
"vitest": "^3.2.4",
|
|
75
|
+
"@agentproto/secrets": "0.2.0",
|
|
75
76
|
"@agentproto/tooling": "0.1.0-alpha.0"
|
|
76
77
|
},
|
|
77
78
|
"scripts": {
|