@tencent-ai/agent-sdk 0.2.1 → 0.2.2
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/cli/CHANGELOG.md +15 -0
- package/cli/dist/codebuddy.js +9 -9
- package/cli/package.json +1 -1
- package/cli/product.cloudhosted.json +2 -2
- package/cli/product.internal.json +2 -2
- package/cli/product.ioa.json +2 -2
- package/cli/product.json +2 -2
- package/cli/product.selfhosted.json +2 -2
- package/lib/acp/acp-client.d.ts +62 -0
- package/lib/acp/acp-client.d.ts.map +1 -0
- package/lib/acp/acp-client.js +256 -0
- package/lib/acp/acp-client.js.map +1 -0
- package/lib/acp/index.d.ts +16 -0
- package/lib/acp/index.d.ts.map +1 -0
- package/lib/acp/index.js +22 -0
- package/lib/acp/index.js.map +1 -0
- package/lib/acp/tool-converter.d.ts +78 -0
- package/lib/acp/tool-converter.d.ts.map +1 -0
- package/lib/acp/tool-converter.js +436 -0
- package/lib/acp/tool-converter.js.map +1 -0
- package/lib/connect.d.ts +94 -0
- package/lib/connect.d.ts.map +1 -0
- package/lib/connect.js +139 -0
- package/lib/connect.js.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -1
- package/lib/index.js.map +1 -1
- package/lib/query.d.ts +26 -2
- package/lib/query.d.ts.map +1 -1
- package/lib/query.js +86 -1
- package/lib/query.js.map +1 -1
- package/lib/session.d.ts +17 -0
- package/lib/session.d.ts.map +1 -1
- package/lib/session.js +82 -3
- package/lib/session.js.map +1 -1
- package/lib/transport/index.d.ts +8 -0
- package/lib/transport/index.d.ts.map +1 -1
- package/lib/transport/index.js.map +1 -1
- package/lib/transport/process-transport.d.ts +9 -0
- package/lib/transport/process-transport.d.ts.map +1 -1
- package/lib/transport/process-transport.js +41 -0
- package/lib/transport/process-transport.js.map +1 -1
- package/lib/types.d.ts +33 -0
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/lib/utils/cli-resolver.d.ts +5 -0
- package/lib/utils/cli-resolver.d.ts.map +1 -1
- package/lib/utils/cli-resolver.js +22 -3
- package/lib/utils/cli-resolver.js.map +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +2 -1
- package/lib/utils/index.js.map +1 -1
- package/package.json +1 -1
package/cli/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencent-ai/codebuddy-code",
|
|
3
|
-
"version": "2.37.
|
|
3
|
+
"version": "2.37.2",
|
|
4
4
|
"description": "Use CodeBuddy, Tencent's AI assistant, right from your terminal. CodeBuddy can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.",
|
|
5
5
|
"main": "lib/node/index.js",
|
|
6
6
|
"typings": "lib/node/index.d.ts",
|
|
@@ -323,6 +323,6 @@
|
|
|
323
323
|
"BillingNotice": false,
|
|
324
324
|
"CustomModelsJSON": true
|
|
325
325
|
},
|
|
326
|
-
"commit": "
|
|
327
|
-
"date": "2026-01-
|
|
326
|
+
"commit": "0a8844ff1682b4458baf0a8a7d5f60fc1b42e6bf",
|
|
327
|
+
"date": "2026-01-19T16:12:04.475Z"
|
|
328
328
|
}
|
|
@@ -325,6 +325,6 @@
|
|
|
325
325
|
"BillingNotice": false,
|
|
326
326
|
"CustomModelsJSON": true
|
|
327
327
|
},
|
|
328
|
-
"commit": "
|
|
329
|
-
"date": "2026-01-
|
|
328
|
+
"commit": "0a8844ff1682b4458baf0a8a7d5f60fc1b42e6bf",
|
|
329
|
+
"date": "2026-01-19T16:12:01.839Z"
|
|
330
330
|
}
|
package/cli/product.ioa.json
CHANGED
|
@@ -535,6 +535,6 @@
|
|
|
535
535
|
"BillingNotice": false,
|
|
536
536
|
"CustomModelsJSON": true
|
|
537
537
|
},
|
|
538
|
-
"commit": "
|
|
539
|
-
"date": "2026-01-
|
|
538
|
+
"commit": "0a8844ff1682b4458baf0a8a7d5f60fc1b42e6bf",
|
|
539
|
+
"date": "2026-01-19T16:12:03.176Z"
|
|
540
540
|
}
|
package/cli/product.json
CHANGED
|
@@ -1044,6 +1044,6 @@
|
|
|
1044
1044
|
"description": "tool-structuredoutput-description"
|
|
1045
1045
|
}
|
|
1046
1046
|
],
|
|
1047
|
-
"commit": "
|
|
1048
|
-
"date": "2026-01-
|
|
1047
|
+
"commit": "0a8844ff1682b4458baf0a8a7d5f60fc1b42e6bf",
|
|
1048
|
+
"date": "2026-01-19T16:12:00.512Z"
|
|
1049
1049
|
}
|
|
@@ -205,6 +205,6 @@
|
|
|
205
205
|
"BillingNotice": false,
|
|
206
206
|
"CustomModelsJSON": true
|
|
207
207
|
},
|
|
208
|
-
"commit": "
|
|
209
|
-
"date": "2026-01-
|
|
208
|
+
"commit": "0a8844ff1682b4458baf0a8a7d5f60fc1b42e6bf",
|
|
209
|
+
"date": "2026-01-19T16:12:05.780Z"
|
|
210
210
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ACP Client Adapter
|
|
3
|
+
*
|
|
4
|
+
* Acts as a bridge between ACP protocol (JSON-RPC) and SDK internal format (JSON lines).
|
|
5
|
+
*
|
|
6
|
+
* Flow:
|
|
7
|
+
* 1. Caller writes ACP messages to WritableStream
|
|
8
|
+
* 2. Convert ACP format to SDK internal format
|
|
9
|
+
* 3. Send to CLI via ProcessTransport
|
|
10
|
+
* 4. Receive responses from CLI via ProcessTransport
|
|
11
|
+
* 5. Convert back to ACP format
|
|
12
|
+
* 6. Caller reads from ReadableStream
|
|
13
|
+
*/
|
|
14
|
+
import type { ProcessTransportOptions } from '../transport';
|
|
15
|
+
import { type AcpToolCall, type AcpToolResult } from './tool-converter';
|
|
16
|
+
/**
|
|
17
|
+
* Options for creating ACP client
|
|
18
|
+
*/
|
|
19
|
+
export interface AcpClientOptions extends ProcessTransportOptions {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* ACP message types (JSON-RPC 2.0 messages)
|
|
23
|
+
*/
|
|
24
|
+
export interface AcpMessage {
|
|
25
|
+
jsonrpc: '2.0';
|
|
26
|
+
id?: string | number;
|
|
27
|
+
method?: string;
|
|
28
|
+
params?: unknown;
|
|
29
|
+
result?: unknown;
|
|
30
|
+
error?: {
|
|
31
|
+
code: number;
|
|
32
|
+
message: string;
|
|
33
|
+
data?: unknown;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Result of createAcpClient
|
|
38
|
+
*/
|
|
39
|
+
export interface AcpClientResult {
|
|
40
|
+
readable: ReadableStream<AcpMessage>;
|
|
41
|
+
writable: WritableStream<AcpMessage>;
|
|
42
|
+
close(): void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Tool call message format from SDK
|
|
46
|
+
*/
|
|
47
|
+
export interface ToolCallMessage {
|
|
48
|
+
method: 'tool_call';
|
|
49
|
+
toolCall: AcpToolCall;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Tool result message format from ACP client
|
|
53
|
+
*/
|
|
54
|
+
export interface ToolResultMessage {
|
|
55
|
+
method: 'tool_result';
|
|
56
|
+
result: AcpToolResult;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create an ACP client that bridges between ACP protocol and SDK format
|
|
60
|
+
*/
|
|
61
|
+
export declare function createAcpClient(options?: AcpClientOptions): AcpClientResult;
|
|
62
|
+
//# sourceMappingURL=acp-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acp-client.d.ts","sourceRoot":"","sources":["../../src/acp/acp-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAG5D,OAAO,EAKH,KAAK,WAAW,EAChB,KAAK,aAAa,EACrB,MAAM,kBAAkB,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;CAEhE;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,OAAO,CAAC;KAClB,CAAC;CACL;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IACrC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IACrC,KAAK,IAAI,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,aAAa,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CA6Q/E"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createAcpClient = createAcpClient;
|
|
4
|
+
const process_transport_1 = require("../transport/process-transport");
|
|
5
|
+
const tool_converter_1 = require("./tool-converter");
|
|
6
|
+
/**
|
|
7
|
+
* Create an ACP client that bridges between ACP protocol and SDK format
|
|
8
|
+
*/
|
|
9
|
+
function createAcpClient(options = {}) {
|
|
10
|
+
const transport = new process_transport_1.ProcessTransport(options);
|
|
11
|
+
let closed = false;
|
|
12
|
+
// Message queues
|
|
13
|
+
const readableQueue = [];
|
|
14
|
+
const readableResolvers = [];
|
|
15
|
+
const writableQueue = [];
|
|
16
|
+
let processingWritable = false;
|
|
17
|
+
/**
|
|
18
|
+
* Convert ACP message to SDK internal format (JSON lines for CLI)
|
|
19
|
+
*/
|
|
20
|
+
function acpToSdk(acpMessage) {
|
|
21
|
+
var _a;
|
|
22
|
+
if (acpMessage.method === 'session/prompt') {
|
|
23
|
+
const params = acpMessage.params;
|
|
24
|
+
const sessionId = params === null || params === void 0 ? void 0 : params.sessionId;
|
|
25
|
+
const prompt = params === null || params === void 0 ? void 0 : params.prompt;
|
|
26
|
+
// Extract text content from prompt
|
|
27
|
+
let content = '';
|
|
28
|
+
if (prompt && Array.isArray(prompt)) {
|
|
29
|
+
for (const block of prompt) {
|
|
30
|
+
if (block.type === 'text' && block.text) {
|
|
31
|
+
content += block.text;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
type: 'user',
|
|
37
|
+
session_id: sessionId || 'unknown',
|
|
38
|
+
message: {
|
|
39
|
+
role: 'user',
|
|
40
|
+
content: content,
|
|
41
|
+
},
|
|
42
|
+
parent_tool_use_id: null,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
if (acpMessage.method === 'session/cancel') {
|
|
46
|
+
return {
|
|
47
|
+
type: 'control_request',
|
|
48
|
+
request: 'interrupt',
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (acpMessage.method === 'session/tool_result') {
|
|
52
|
+
// Handle tool result from ACP client
|
|
53
|
+
// params should be the AcpToolResult object itself
|
|
54
|
+
const acpResult = acpMessage.params;
|
|
55
|
+
if (acpResult === null || acpResult === void 0 ? void 0 : acpResult.toolCallId) {
|
|
56
|
+
console.error('[AcpClient] Converting tool result for toolCallId:', acpResult.toolCallId);
|
|
57
|
+
// Convert ACP result to SDK ToolResultContentBlock
|
|
58
|
+
const toolResultBlock = (0, tool_converter_1.convertAcpToolResultToSdk)(acpResult.toolCallId, acpResult);
|
|
59
|
+
// Wrap it in a user message with tool result
|
|
60
|
+
return {
|
|
61
|
+
type: 'user',
|
|
62
|
+
session_id: ((_a = acpMessage.params) === null || _a === void 0 ? void 0 : _a.sessionId) || 'unknown',
|
|
63
|
+
message: {
|
|
64
|
+
role: 'user',
|
|
65
|
+
content: [toolResultBlock],
|
|
66
|
+
},
|
|
67
|
+
parent_tool_use_id: acpResult.toolCallId,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// For other methods, return null - they don't map to SDK format
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Convert SDK message to ACP format
|
|
76
|
+
*/
|
|
77
|
+
function sdkToAcp(message) {
|
|
78
|
+
const messages = [];
|
|
79
|
+
// Handle assistant messages with tool uses
|
|
80
|
+
if ('type' in message && message.type === 'assistant') {
|
|
81
|
+
const assistantMsg = message;
|
|
82
|
+
if (assistantMsg.message.content && Array.isArray(assistantMsg.message.content)) {
|
|
83
|
+
// Extract tool use blocks and convert them
|
|
84
|
+
const toolUseBlocks = (0, tool_converter_1.extractToolUseBlocks)(assistantMsg.message.content);
|
|
85
|
+
for (const toolUse of toolUseBlocks) {
|
|
86
|
+
// Convert SDK tool use to ACP tool call
|
|
87
|
+
const acpToolCall = (0, tool_converter_1.convertSdkToolUseToAcpToolCall)(toolUse);
|
|
88
|
+
// Wrap in ACP message format
|
|
89
|
+
const toolCallMsg = {
|
|
90
|
+
jsonrpc: '2.0',
|
|
91
|
+
method: 'tool_call',
|
|
92
|
+
params: acpToolCall,
|
|
93
|
+
};
|
|
94
|
+
messages.push(toolCallMsg);
|
|
95
|
+
console.error('[AcpClient] Converted tool use:', toolUse.name, '→', acpToolCall.kind);
|
|
96
|
+
}
|
|
97
|
+
// Extract and send text content if present
|
|
98
|
+
const textContent = (0, tool_converter_1.extractTextContent)(assistantMsg.message.content);
|
|
99
|
+
if (textContent) {
|
|
100
|
+
messages.push({
|
|
101
|
+
jsonrpc: '2.0',
|
|
102
|
+
method: 'session/text',
|
|
103
|
+
params: {
|
|
104
|
+
content: textContent,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
return messages;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// Ignore system, result, and other non-content messages
|
|
112
|
+
// Only convert assistant messages to ACP format
|
|
113
|
+
const messageType = ('type' in message) ? message.type : null;
|
|
114
|
+
if (messageType === 'system' || messageType === 'result' || messageType === 'stream_event') {
|
|
115
|
+
// Skip these message types - don't send to ACP client
|
|
116
|
+
return [];
|
|
117
|
+
}
|
|
118
|
+
// For other message types, also skip by default
|
|
119
|
+
// ACP client only needs to know about tool calls and text responses
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Enqueue message for readable stream
|
|
124
|
+
*/
|
|
125
|
+
function enqueueReadable(message) {
|
|
126
|
+
if (readableResolvers.length > 0) {
|
|
127
|
+
const resolver = readableResolvers.shift();
|
|
128
|
+
resolver(message);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
readableQueue.push(message);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Dequeue message from readable stream
|
|
136
|
+
*/
|
|
137
|
+
function dequeueReadable() {
|
|
138
|
+
if (closed) {
|
|
139
|
+
return Promise.resolve(null);
|
|
140
|
+
}
|
|
141
|
+
if (readableQueue.length > 0) {
|
|
142
|
+
return Promise.resolve(readableQueue.shift());
|
|
143
|
+
}
|
|
144
|
+
return new Promise((resolve) => {
|
|
145
|
+
readableResolvers.push(resolve);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Process writable queue - convert ACP to JSON lines and send to CLI
|
|
150
|
+
*/
|
|
151
|
+
async function processWritableQueue() {
|
|
152
|
+
if (processingWritable) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
processingWritable = true;
|
|
156
|
+
try {
|
|
157
|
+
while (writableQueue.length > 0 && !closed) {
|
|
158
|
+
const acpMessage = writableQueue.shift();
|
|
159
|
+
console.error('[AcpClient] Processing writable message:', acpMessage.method);
|
|
160
|
+
// Convert ACP to SDK format
|
|
161
|
+
const sdkMessage = acpToSdk(acpMessage);
|
|
162
|
+
if (sdkMessage) {
|
|
163
|
+
console.error('[AcpClient] Converted to SDK format, sending to CLI');
|
|
164
|
+
if ('type' in sdkMessage && sdkMessage.type === 'user') {
|
|
165
|
+
transport.sendUserMessage(sdkMessage);
|
|
166
|
+
}
|
|
167
|
+
else if ('type' in sdkMessage && sdkMessage.type === 'control_request') {
|
|
168
|
+
const controlRequest = sdkMessage;
|
|
169
|
+
transport.sendControlRequestNoWait(controlRequest.request);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
console.error('[AcpClient] Could not convert ACP message to SDK format');
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
finally {
|
|
178
|
+
processingWritable = false;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Start receiving SDK messages from transport and convert to ACP
|
|
183
|
+
*/
|
|
184
|
+
async function startTransportLoop() {
|
|
185
|
+
transport.start();
|
|
186
|
+
// Read SDK messages from transport and convert to ACP for readable stream
|
|
187
|
+
try {
|
|
188
|
+
for await (const message of transport.messages()) {
|
|
189
|
+
if (closed)
|
|
190
|
+
break;
|
|
191
|
+
if ('type' in message && message.type !== 'control_request') {
|
|
192
|
+
const acpMessages = sdkToAcp(message);
|
|
193
|
+
for (const acpMessage of acpMessages) {
|
|
194
|
+
enqueueReadable(acpMessage);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
catch (error) {
|
|
200
|
+
console.error('[AcpClient] Transport loop error:', error);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Close the client
|
|
205
|
+
*/
|
|
206
|
+
function close() {
|
|
207
|
+
if (!closed) {
|
|
208
|
+
closed = true;
|
|
209
|
+
transport.close();
|
|
210
|
+
readableResolvers.forEach((resolver) => resolver(null));
|
|
211
|
+
readableResolvers.length = 0;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
// Start transport loop in background
|
|
215
|
+
startTransportLoop().catch((error) => {
|
|
216
|
+
console.error('[AcpClient] Transport loop error:', error);
|
|
217
|
+
close();
|
|
218
|
+
});
|
|
219
|
+
// Create readable stream
|
|
220
|
+
const readable = new ReadableStream({
|
|
221
|
+
async pull(controller) {
|
|
222
|
+
const message = await dequeueReadable();
|
|
223
|
+
if (message === null) {
|
|
224
|
+
controller.close();
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
controller.enqueue(message);
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
cancel() {
|
|
231
|
+
close();
|
|
232
|
+
},
|
|
233
|
+
});
|
|
234
|
+
// Create writable stream
|
|
235
|
+
const writable = new WritableStream({
|
|
236
|
+
async write(message) {
|
|
237
|
+
if (closed) {
|
|
238
|
+
throw new Error('AcpClient is closed');
|
|
239
|
+
}
|
|
240
|
+
writableQueue.push(message);
|
|
241
|
+
await processWritableQueue();
|
|
242
|
+
},
|
|
243
|
+
close() {
|
|
244
|
+
close();
|
|
245
|
+
},
|
|
246
|
+
abort() {
|
|
247
|
+
close();
|
|
248
|
+
},
|
|
249
|
+
});
|
|
250
|
+
return {
|
|
251
|
+
readable,
|
|
252
|
+
writable,
|
|
253
|
+
close,
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=acp-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acp-client.js","sourceRoot":"","sources":["../../src/acp/acp-client.ts"],"names":[],"mappings":";;AA4EA,0CA6QC;AA3UD,sEAAkE;AAElE,qDAO0B;AAkD1B;;GAEG;AACH,SAAgB,eAAe,CAAC,UAA4B,EA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jC,CAAC;IACL,CAAC;IAED,qCAAqC;IACrC,kBAAkB,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACjC,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAC;QAC1D,KAAK,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;IAEH,yBAAyB;IACzB,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAa;QAC5C,KAAK,CAAC,IAAI,CAAC,UAAU;YACjB,MAAM,OAAO,GAAG,MAAM,eAAe,EAAE,CAAC;YACxC,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;gBACnB,UAAU,CAAC,KAAK,EAAE,CAAC;YACvB,CAAC;iBAAM,CAAC;gBACJ,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAChC,CAAC;QACL,CAAC;QACD,MAAM;YACF,KAAK,EAAE,CAAC;QACZ,CAAC;KACJ,CAAC,CAAC;IAEH,yBAAyB;IACzB,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAa;QAC5C,KAAK,CAAC,KAAK,CAAC,OAAO;YACf,IAAI,MAAM,EAAE,CAAC;gBACT,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;YAC3C,CAAC;YACD,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5B,MAAM,oBAAoB,EAAE,CAAC;QACjC,CAAC;QACD,KAAK;YACD,KAAK,EAAE,CAAC;QACZ,CAAC;QACD,KAAK;YACD,KAAK,EAAE,CAAC;QACZ,CAAC;KACJ,CAAC,CAAC;IAEH,OAAO;QACH,QAAQ;QACR,QAAQ;QACR,KAAK;KACR,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ACP (Agent Client Protocol) Client Integration
|
|
3
|
+
*
|
|
4
|
+
* This module provides utilities for creating ACP clients that work with
|
|
5
|
+
* the agent SDK by converting ACP protocol messages to/from SDK format.
|
|
6
|
+
*
|
|
7
|
+
* Key Design Principles:
|
|
8
|
+
* - NO DATA LOSS: All tool inputs preserved in rawInput
|
|
9
|
+
* - Tool IDs maintained throughout conversion chain
|
|
10
|
+
* - Error states properly tracked and propagated
|
|
11
|
+
*/
|
|
12
|
+
export { createAcpClient } from './acp-client';
|
|
13
|
+
export type { AcpClientOptions, AcpMessage, AcpClientResult, ToolCallMessage, ToolResultMessage } from './acp-client';
|
|
14
|
+
export { convertSdkToolUseToAcpToolCall, convertAcpToolResultToSdk, extractToolUseBlocks, extractTextContent, } from './tool-converter';
|
|
15
|
+
export type { AcpToolCall, AcpToolKind, AcpContent, AcpDiff, AcpLocation, AcpToolResult, } from './tool-converter';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/acp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtH,OAAO,EACH,8BAA8B,EAC9B,yBAAyB,EACzB,oBAAoB,EACpB,kBAAkB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACR,WAAW,EACX,WAAW,EACX,UAAU,EACV,OAAO,EACP,WAAW,EACX,aAAa,GAChB,MAAM,kBAAkB,CAAC"}
|
package/lib/acp/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ACP (Agent Client Protocol) Client Integration
|
|
4
|
+
*
|
|
5
|
+
* This module provides utilities for creating ACP clients that work with
|
|
6
|
+
* the agent SDK by converting ACP protocol messages to/from SDK format.
|
|
7
|
+
*
|
|
8
|
+
* Key Design Principles:
|
|
9
|
+
* - NO DATA LOSS: All tool inputs preserved in rawInput
|
|
10
|
+
* - Tool IDs maintained throughout conversion chain
|
|
11
|
+
* - Error states properly tracked and propagated
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.extractTextContent = exports.extractToolUseBlocks = exports.convertAcpToolResultToSdk = exports.convertSdkToolUseToAcpToolCall = exports.createAcpClient = void 0;
|
|
15
|
+
var acp_client_1 = require("./acp-client");
|
|
16
|
+
Object.defineProperty(exports, "createAcpClient", { enumerable: true, get: function () { return acp_client_1.createAcpClient; } });
|
|
17
|
+
var tool_converter_1 = require("./tool-converter");
|
|
18
|
+
Object.defineProperty(exports, "convertSdkToolUseToAcpToolCall", { enumerable: true, get: function () { return tool_converter_1.convertSdkToolUseToAcpToolCall; } });
|
|
19
|
+
Object.defineProperty(exports, "convertAcpToolResultToSdk", { enumerable: true, get: function () { return tool_converter_1.convertAcpToolResultToSdk; } });
|
|
20
|
+
Object.defineProperty(exports, "extractToolUseBlocks", { enumerable: true, get: function () { return tool_converter_1.extractToolUseBlocks; } });
|
|
21
|
+
Object.defineProperty(exports, "extractTextContent", { enumerable: true, get: function () { return tool_converter_1.extractTextContent; } });
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/acp/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AAGxB,mDAK0B;AAJtB,gIAAA,8BAA8B,OAAA;AAC9B,2HAAA,yBAAyB,OAAA;AACzB,sHAAA,oBAAoB,OAAA;AACpB,oHAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Converter Utility
|
|
3
|
+
*
|
|
4
|
+
* Converts SDK internal tool formats to ACP (Agent Client Protocol) format and vice versa.
|
|
5
|
+
*
|
|
6
|
+
* Critical Design Principle: NO DATA LOSS
|
|
7
|
+
* - SDK tool inputs are preserved completely in rawInput
|
|
8
|
+
* - Tool IDs are maintained throughout the conversion
|
|
9
|
+
* - Tool results are preserved with error state tracking
|
|
10
|
+
*/
|
|
11
|
+
import type { ToolUseContentBlock, ToolResultContentBlock } from '../types';
|
|
12
|
+
/**
|
|
13
|
+
* ACP Tool Call representation (not JSON-RPC wrapped)
|
|
14
|
+
* This is the actual tool call information sent to ACP client
|
|
15
|
+
*/
|
|
16
|
+
export interface AcpToolCall {
|
|
17
|
+
toolCallId: string;
|
|
18
|
+
status: 'pending' | 'in_progress' | 'completed' | 'failed';
|
|
19
|
+
title: string;
|
|
20
|
+
kind: AcpToolKind;
|
|
21
|
+
rawInput: Record<string, unknown>;
|
|
22
|
+
content?: AcpContent[];
|
|
23
|
+
locations?: AcpLocation[];
|
|
24
|
+
rawOutput?: unknown;
|
|
25
|
+
}
|
|
26
|
+
export type AcpToolKind = 'read' | 'edit' | 'delete' | 'move' | 'search' | 'execute' | 'think' | 'fetch' | 'other';
|
|
27
|
+
export interface AcpContent {
|
|
28
|
+
type: 'text' | 'diff' | 'terminal';
|
|
29
|
+
content?: {
|
|
30
|
+
type: string;
|
|
31
|
+
text: string;
|
|
32
|
+
} | AcpDiff;
|
|
33
|
+
}
|
|
34
|
+
export interface AcpDiff {
|
|
35
|
+
path: string;
|
|
36
|
+
oldText: string | null;
|
|
37
|
+
newText: string;
|
|
38
|
+
}
|
|
39
|
+
export interface AcpLocation {
|
|
40
|
+
path: string;
|
|
41
|
+
line?: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* ACP Tool Result representation
|
|
45
|
+
*/
|
|
46
|
+
export interface AcpToolResult {
|
|
47
|
+
toolCallId: string;
|
|
48
|
+
status: 'completed' | 'failed';
|
|
49
|
+
content?: AcpContent[];
|
|
50
|
+
locations?: AcpLocation[];
|
|
51
|
+
rawOutput?: unknown;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Convert SDK ToolUseContentBlock to ACP Tool Call
|
|
55
|
+
* Preserves all input data in rawInput field
|
|
56
|
+
*
|
|
57
|
+
* @param toolUse - SDK tool use block
|
|
58
|
+
* @returns ACP tool call with complete data preservation
|
|
59
|
+
*/
|
|
60
|
+
export declare function convertSdkToolUseToAcpToolCall(toolUse: ToolUseContentBlock): AcpToolCall;
|
|
61
|
+
/**
|
|
62
|
+
* Convert ACP Tool Result to SDK ToolResultContentBlock
|
|
63
|
+
* Preserves tool_use_id and ensures error state is tracked
|
|
64
|
+
*
|
|
65
|
+
* @param toolCallId - Original tool call ID
|
|
66
|
+
* @param acpResult - ACP tool result
|
|
67
|
+
* @returns SDK ToolResultContentBlock
|
|
68
|
+
*/
|
|
69
|
+
export declare function convertAcpToolResultToSdk(toolCallId: string, acpResult: AcpToolResult): ToolResultContentBlock;
|
|
70
|
+
/**
|
|
71
|
+
* Extract tool use blocks from content blocks array
|
|
72
|
+
*/
|
|
73
|
+
export declare function extractToolUseBlocks(contentBlocks: unknown[]): ToolUseContentBlock[];
|
|
74
|
+
/**
|
|
75
|
+
* Extract text content from content blocks array
|
|
76
|
+
*/
|
|
77
|
+
export declare function extractTextContent(contentBlocks: unknown[]): string;
|
|
78
|
+
//# sourceMappingURL=tool-converter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-converter.d.ts","sourceRoot":"","sources":["../../src/acp/tool-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAkC,MAAM,UAAU,CAAC;AAI5G;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC,MA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