codeep 1.2.37 → 1.2.38

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.
@@ -117,46 +117,45 @@ export interface SetSessionConfigOptionParams {
117
117
  configId: string;
118
118
  value: unknown;
119
119
  }
120
- export type ToolCallState = 'running' | 'finished' | 'error';
121
- export interface SessionUpdateContentChunk {
122
- type: 'content_chunk';
123
- sessionId: string;
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
- type: 'tool_call';
128
- sessionId: string;
129
+ sessionUpdate: 'tool_call';
129
130
  toolCallId: string;
130
- toolName: string;
131
- toolInput: unknown;
132
- state: ToolCallState;
133
- content?: {
134
- type: 'text';
135
- text: string;
136
- }[];
131
+ status: 'pending';
132
+ rawInput: unknown;
137
133
  }
138
- export interface SessionUpdateThoughtChunk {
139
- type: 'agent_thought_chunk';
140
- sessionId: string;
141
- content: ContentBlock;
134
+ export interface SessionUpdateToolCallUpdate {
135
+ sessionUpdate: 'tool_call_update';
136
+ toolCallId: string;
137
+ status: 'completed' | 'failed';
138
+ rawOutput?: string;
142
139
  }
143
140
  export interface SessionUpdateAvailableCommands {
144
- type: 'available_commands_update';
145
- sessionId: string;
141
+ sessionUpdate: 'available_commands_update';
146
142
  availableCommands: {
147
143
  name: string;
148
144
  description: string;
149
145
  input?: {
150
146
  hint: string;
151
- };
147
+ } | null;
152
148
  }[];
153
149
  }
154
150
  export interface SessionUpdateCurrentMode {
155
- type: 'current_mode_update';
156
- sessionId: string;
151
+ sessionUpdate: 'current_mode_update';
157
152
  currentModeId: string;
158
153
  }
159
- export type SessionUpdateParams = SessionUpdateContentChunk | SessionUpdateToolCall | SessionUpdateThoughtChunk | SessionUpdateAvailableCommands | SessionUpdateCurrentMode;
154
+ export type SessionUpdateInner = SessionUpdateAgentMessageChunk | SessionUpdateAgentThoughtChunk | SessionUpdateToolCall | SessionUpdateToolCallUpdate | SessionUpdateAvailableCommands | SessionUpdateCurrentMode;
155
+ export interface SessionUpdateParams {
156
+ sessionId: string;
157
+ update: SessionUpdateInner;
158
+ }
160
159
  export type PermissionOptionKind = 'allow_once' | 'allow_always' | 'reject_once' | 'reject_always';
161
160
  export interface PermissionOption {
162
161
  optionId: string;
@@ -169,7 +168,7 @@ export interface RequestPermissionParams {
169
168
  toolCallId: string;
170
169
  toolName: string;
171
170
  toolInput: unknown;
172
- state: ToolCallState;
171
+ status: 'pending' | 'completed' | 'failed';
173
172
  content: unknown[];
174
173
  };
175
174
  options: PermissionOption[];
@@ -153,15 +153,19 @@ export function startAcpServer() {
153
153
  transport.respond(msg.id, result);
154
154
  // Advertise slash commands
155
155
  transport.notify('session/update', {
156
- type: 'available_commands_update',
157
156
  sessionId: acpSessionId,
158
- availableCommands: AVAILABLE_COMMANDS,
157
+ update: {
158
+ sessionUpdate: 'available_commands_update',
159
+ availableCommands: AVAILABLE_COMMANDS,
160
+ },
159
161
  });
160
162
  // Send welcome message
161
163
  transport.notify('session/update', {
162
- type: 'content_chunk',
163
164
  sessionId: acpSessionId,
164
- content: { type: 'text', text: welcomeText },
165
+ update: {
166
+ sessionUpdate: 'agent_message_chunk',
167
+ content: { type: 'text', text: welcomeText },
168
+ },
165
169
  });
166
170
  }
167
171
  // ── session/load ────────────────────────────────────────────────────────────
@@ -197,9 +201,11 @@ export function startAcpServer() {
197
201
  transport.respond(msg.id, result);
198
202
  // Send restored session welcome
199
203
  transport.notify('session/update', {
200
- type: 'content_chunk',
201
204
  sessionId: params.sessionId,
202
- content: { type: 'text', text: welcomeText },
205
+ update: {
206
+ sessionUpdate: 'agent_message_chunk',
207
+ content: { type: 'text', text: welcomeText },
208
+ },
203
209
  });
204
210
  }
205
211
  // ── session/set_mode ────────────────────────────────────────────────────────
@@ -221,9 +227,11 @@ export function startAcpServer() {
221
227
  transport.respond(msg.id, {});
222
228
  // Notify Zed of the mode change
223
229
  transport.notify('session/update', {
224
- type: 'current_mode_update',
225
230
  sessionId,
226
- currentModeId: modeId,
231
+ update: {
232
+ sessionUpdate: 'current_mode_update',
233
+ currentModeId: modeId,
234
+ },
227
235
  });
228
236
  }
229
237
  // ── session/set_config_option ───────────────────────────────────────────────
@@ -258,9 +266,11 @@ export function startAcpServer() {
258
266
  const sendChunk = (text) => {
259
267
  agentResponseChunks.push(text);
260
268
  transport.notify('session/update', {
261
- type: 'content_chunk',
262
269
  sessionId: params.sessionId,
263
- content: { type: 'text', text },
270
+ update: {
271
+ sessionUpdate: 'agent_message_chunk',
272
+ content: { type: 'text', text },
273
+ },
264
274
  });
265
275
  };
266
276
  // Try slash commands first
@@ -289,21 +299,36 @@ export function startAcpServer() {
289
299
  onChunk: sendChunk,
290
300
  onThought: (text) => {
291
301
  transport.notify('session/update', {
292
- type: 'agent_thought_chunk',
293
302
  sessionId: params.sessionId,
294
- content: { type: 'text', text },
303
+ update: {
304
+ sessionUpdate: 'agent_thought_chunk',
305
+ content: { type: 'text', text },
306
+ },
295
307
  });
296
308
  },
297
309
  onToolCall: (toolCallId, toolName, _kind, _title, status, _locations) => {
298
- transport.notify('session/update', {
299
- type: 'tool_call',
300
- sessionId: params.sessionId,
301
- toolCallId,
302
- toolName,
303
- toolInput: {},
304
- state: status === 'running' ? 'running' : status === 'finished' ? 'finished' : 'error',
305
- content: [],
306
- });
310
+ if (status === 'running') {
311
+ transport.notify('session/update', {
312
+ sessionId: params.sessionId,
313
+ update: {
314
+ sessionUpdate: 'tool_call',
315
+ toolCallId,
316
+ status: 'pending',
317
+ rawInput: { toolName },
318
+ },
319
+ });
320
+ }
321
+ else {
322
+ transport.notify('session/update', {
323
+ sessionId: params.sessionId,
324
+ update: {
325
+ sessionUpdate: 'tool_call_update',
326
+ toolCallId,
327
+ status: status === 'finished' ? 'completed' : 'failed',
328
+ rawOutput: '',
329
+ },
330
+ });
331
+ }
307
332
  },
308
333
  onFileEdit: (uri, newText) => {
309
334
  transport.notify('file/edit', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.2.37",
3
+ "version": "1.2.38",
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",