codeep 1.2.37 → 1.2.39
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/dist/acp/protocol.d.ts +26 -23
- package/dist/acp/server.js +58 -28
- package/package.json +1 -1
package/dist/acp/protocol.d.ts
CHANGED
|
@@ -117,46 +117,49 @@ export interface SetSessionConfigOptionParams {
|
|
|
117
117
|
configId: string;
|
|
118
118
|
value: unknown;
|
|
119
119
|
}
|
|
120
|
-
export
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
export interface SessionUpdateAgentMessageChunk {
|
|
121
|
+
sessionUpdate: 'agent_message_chunk';
|
|
122
|
+
content: ContentBlock;
|
|
123
|
+
}
|
|
124
|
+
export interface SessionUpdateAgentThoughtChunk {
|
|
125
|
+
sessionUpdate: 'agent_thought_chunk';
|
|
124
126
|
content: ContentBlock;
|
|
125
127
|
}
|
|
126
128
|
export interface SessionUpdateToolCall {
|
|
127
|
-
|
|
128
|
-
sessionId: string;
|
|
129
|
+
sessionUpdate: 'tool_call';
|
|
129
130
|
toolCallId: string;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
text: string;
|
|
131
|
+
title: string;
|
|
132
|
+
kind?: string;
|
|
133
|
+
status: 'pending' | 'in_progress';
|
|
134
|
+
locations?: {
|
|
135
|
+
uri: string;
|
|
136
136
|
}[];
|
|
137
137
|
}
|
|
138
|
-
export interface
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
export interface SessionUpdateToolCallUpdate {
|
|
139
|
+
sessionUpdate: 'tool_call_update';
|
|
140
|
+
toolCallId: string;
|
|
141
|
+
status: 'completed' | 'failed';
|
|
142
|
+
rawOutput?: string;
|
|
142
143
|
}
|
|
143
144
|
export interface SessionUpdateAvailableCommands {
|
|
144
|
-
|
|
145
|
-
sessionId: string;
|
|
145
|
+
sessionUpdate: 'available_commands_update';
|
|
146
146
|
availableCommands: {
|
|
147
147
|
name: string;
|
|
148
148
|
description: string;
|
|
149
149
|
input?: {
|
|
150
150
|
hint: string;
|
|
151
|
-
};
|
|
151
|
+
} | null;
|
|
152
152
|
}[];
|
|
153
153
|
}
|
|
154
154
|
export interface SessionUpdateCurrentMode {
|
|
155
|
-
|
|
156
|
-
sessionId: string;
|
|
155
|
+
sessionUpdate: 'current_mode_update';
|
|
157
156
|
currentModeId: string;
|
|
158
157
|
}
|
|
159
|
-
export type
|
|
158
|
+
export type SessionUpdateInner = SessionUpdateAgentMessageChunk | SessionUpdateAgentThoughtChunk | SessionUpdateToolCall | SessionUpdateToolCallUpdate | SessionUpdateAvailableCommands | SessionUpdateCurrentMode;
|
|
159
|
+
export interface SessionUpdateParams {
|
|
160
|
+
sessionId: string;
|
|
161
|
+
update: SessionUpdateInner;
|
|
162
|
+
}
|
|
160
163
|
export type PermissionOptionKind = 'allow_once' | 'allow_always' | 'reject_once' | 'reject_always';
|
|
161
164
|
export interface PermissionOption {
|
|
162
165
|
optionId: string;
|
|
@@ -169,7 +172,7 @@ export interface RequestPermissionParams {
|
|
|
169
172
|
toolCallId: string;
|
|
170
173
|
toolName: string;
|
|
171
174
|
toolInput: unknown;
|
|
172
|
-
|
|
175
|
+
status: 'pending' | 'completed' | 'failed';
|
|
173
176
|
content: unknown[];
|
|
174
177
|
};
|
|
175
178
|
options: PermissionOption[];
|
package/dist/acp/server.js
CHANGED
|
@@ -152,16 +152,20 @@ export function startAcpServer() {
|
|
|
152
152
|
};
|
|
153
153
|
transport.respond(msg.id, result);
|
|
154
154
|
// Advertise slash commands
|
|
155
|
-
transport.notify('
|
|
156
|
-
type: 'available_commands_update',
|
|
155
|
+
transport.notify('sessionUpdate', {
|
|
157
156
|
sessionId: acpSessionId,
|
|
158
|
-
|
|
157
|
+
update: {
|
|
158
|
+
sessionUpdate: 'available_commands_update',
|
|
159
|
+
availableCommands: AVAILABLE_COMMANDS,
|
|
160
|
+
},
|
|
159
161
|
});
|
|
160
162
|
// Send welcome message
|
|
161
|
-
transport.notify('
|
|
162
|
-
type: 'content_chunk',
|
|
163
|
+
transport.notify('sessionUpdate', {
|
|
163
164
|
sessionId: acpSessionId,
|
|
164
|
-
|
|
165
|
+
update: {
|
|
166
|
+
sessionUpdate: 'agent_message_chunk',
|
|
167
|
+
content: { type: 'text', text: welcomeText },
|
|
168
|
+
},
|
|
165
169
|
});
|
|
166
170
|
}
|
|
167
171
|
// ── session/load ────────────────────────────────────────────────────────────
|
|
@@ -196,10 +200,12 @@ export function startAcpServer() {
|
|
|
196
200
|
};
|
|
197
201
|
transport.respond(msg.id, result);
|
|
198
202
|
// Send restored session welcome
|
|
199
|
-
transport.notify('
|
|
200
|
-
type: 'content_chunk',
|
|
203
|
+
transport.notify('sessionUpdate', {
|
|
201
204
|
sessionId: params.sessionId,
|
|
202
|
-
|
|
205
|
+
update: {
|
|
206
|
+
sessionUpdate: 'agent_message_chunk',
|
|
207
|
+
content: { type: 'text', text: welcomeText },
|
|
208
|
+
},
|
|
203
209
|
});
|
|
204
210
|
}
|
|
205
211
|
// ── session/set_mode ────────────────────────────────────────────────────────
|
|
@@ -220,10 +226,12 @@ export function startAcpServer() {
|
|
|
220
226
|
config.set('agentConfirmation', modeId === 'manual' ? 'dangerous' : 'never');
|
|
221
227
|
transport.respond(msg.id, {});
|
|
222
228
|
// Notify Zed of the mode change
|
|
223
|
-
transport.notify('
|
|
224
|
-
type: 'current_mode_update',
|
|
229
|
+
transport.notify('sessionUpdate', {
|
|
225
230
|
sessionId,
|
|
226
|
-
|
|
231
|
+
update: {
|
|
232
|
+
sessionUpdate: 'current_mode_update',
|
|
233
|
+
currentModeId: modeId,
|
|
234
|
+
},
|
|
227
235
|
});
|
|
228
236
|
}
|
|
229
237
|
// ── session/set_config_option ───────────────────────────────────────────────
|
|
@@ -257,10 +265,12 @@ export function startAcpServer() {
|
|
|
257
265
|
const agentResponseChunks = [];
|
|
258
266
|
const sendChunk = (text) => {
|
|
259
267
|
agentResponseChunks.push(text);
|
|
260
|
-
transport.notify('
|
|
261
|
-
type: 'content_chunk',
|
|
268
|
+
transport.notify('sessionUpdate', {
|
|
262
269
|
sessionId: params.sessionId,
|
|
263
|
-
|
|
270
|
+
update: {
|
|
271
|
+
sessionUpdate: 'agent_message_chunk',
|
|
272
|
+
content: { type: 'text', text },
|
|
273
|
+
},
|
|
264
274
|
});
|
|
265
275
|
};
|
|
266
276
|
// Try slash commands first
|
|
@@ -288,22 +298,42 @@ export function startAcpServer() {
|
|
|
288
298
|
abortSignal: abortController.signal,
|
|
289
299
|
onChunk: sendChunk,
|
|
290
300
|
onThought: (text) => {
|
|
291
|
-
transport.notify('
|
|
292
|
-
type: 'agent_thought_chunk',
|
|
301
|
+
transport.notify('sessionUpdate', {
|
|
293
302
|
sessionId: params.sessionId,
|
|
294
|
-
|
|
303
|
+
update: {
|
|
304
|
+
sessionUpdate: 'agent_thought_chunk',
|
|
305
|
+
content: { type: 'text', text },
|
|
306
|
+
},
|
|
295
307
|
});
|
|
296
308
|
},
|
|
297
|
-
onToolCall: (toolCallId, toolName,
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
309
|
+
onToolCall: (toolCallId, toolName, kind, title, status, locations) => {
|
|
310
|
+
if (status === 'running') {
|
|
311
|
+
// Initial tool_call notification: spec ToolCall shape
|
|
312
|
+
transport.notify('sessionUpdate', {
|
|
313
|
+
sessionId: params.sessionId,
|
|
314
|
+
update: {
|
|
315
|
+
sessionUpdate: 'tool_call',
|
|
316
|
+
toolCallId,
|
|
317
|
+
title: title || toolName,
|
|
318
|
+
kind: kind || 'other',
|
|
319
|
+
status: 'in_progress',
|
|
320
|
+
...(locations && locations.length > 0
|
|
321
|
+
? { locations: locations.map(uri => ({ uri })) }
|
|
322
|
+
: {}),
|
|
323
|
+
},
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
// tool_call_update: update status to completed/failed
|
|
328
|
+
transport.notify('sessionUpdate', {
|
|
329
|
+
sessionId: params.sessionId,
|
|
330
|
+
update: {
|
|
331
|
+
sessionUpdate: 'tool_call_update',
|
|
332
|
+
toolCallId,
|
|
333
|
+
status: status === 'finished' ? 'completed' : 'failed',
|
|
334
|
+
},
|
|
335
|
+
});
|
|
336
|
+
}
|
|
307
337
|
},
|
|
308
338
|
onFileEdit: (uri, newText) => {
|
|
309
339
|
transport.notify('file/edit', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.39",
|
|
4
4
|
"description": "AI-powered coding assistant built for the terminal. Multiple LLM providers, project-aware context, and a seamless development workflow.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|