codebuff 1.0.194 → 1.0.197
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/checkpoints/checkpoint-manager.d.ts +20 -9
- package/dist/checkpoints/checkpoint-manager.js +68 -46
- package/dist/checkpoints/checkpoint-manager.js.map +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +89 -40
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +3 -2
- package/dist/common/actions.d.ts +103 -551
- package/dist/common/actions.js +0 -11
- package/dist/common/actions.js.map +1 -1
- package/dist/common/constants.d.ts +11 -3
- package/dist/common/constants.js +16 -2
- package/dist/common/constants.js.map +1 -1
- package/dist/common/db/schema.d.ts +17 -0
- package/dist/common/db/schema.js +1 -0
- package/dist/common/db/schema.js.map +1 -1
- package/dist/common/project-file-tree.js +3 -3
- package/dist/common/project-file-tree.js.map +1 -1
- package/dist/common/types/agent-state.d.ts +15 -12
- package/dist/common/types/agent-state.js +2 -0
- package/dist/common/types/agent-state.js.map +1 -1
- package/dist/common/util/file.d.ts +2 -1
- package/dist/common/util/file.js +11 -3
- package/dist/common/util/file.js.map +1 -1
- package/dist/common/util/messages.d.ts +1 -0
- package/dist/common/util/messages.js +23 -0
- package/dist/common/util/messages.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +983 -2173
- package/dist/project-files.js +16 -6
- package/dist/project-files.js.map +1 -1
- package/dist/workers/checkpoint-worker.js +4 -3
- package/dist/workers/checkpoint-worker.js.map +1 -1
- package/package.json +2 -2
package/dist/common/actions.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ export declare const FileChangeSchema: z.ZodObject<{
|
|
|
4
4
|
path: z.ZodString;
|
|
5
5
|
content: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
type: "patch" | "file";
|
|
7
8
|
path: string;
|
|
8
9
|
content: string;
|
|
9
|
-
type: "file" | "patch";
|
|
10
10
|
}, {
|
|
11
|
+
type: "patch" | "file";
|
|
11
12
|
path: string;
|
|
12
13
|
content: string;
|
|
13
|
-
type: "file" | "patch";
|
|
14
14
|
}>;
|
|
15
15
|
export type FileChange = z.infer<typeof FileChangeSchema>;
|
|
16
16
|
export declare const CHANGES: z.ZodArray<z.ZodObject<{
|
|
@@ -18,13 +18,13 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
|
|
|
18
18
|
path: z.ZodString;
|
|
19
19
|
content: z.ZodString;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
type: "patch" | "file";
|
|
21
22
|
path: string;
|
|
22
23
|
content: string;
|
|
23
|
-
type: "file" | "patch";
|
|
24
24
|
}, {
|
|
25
|
+
type: "patch" | "file";
|
|
25
26
|
path: string;
|
|
26
27
|
content: string;
|
|
27
|
-
type: "file" | "patch";
|
|
28
28
|
}>, "many">;
|
|
29
29
|
export type FileChanges = z.infer<typeof CHANGES>;
|
|
30
30
|
export declare const ToolCallSchema: z.ZodObject<{
|
|
@@ -42,469 +42,6 @@ export declare const ToolCallSchema: z.ZodObject<{
|
|
|
42
42
|
}>;
|
|
43
43
|
export type ToolCall = z.infer<typeof ToolCallSchema>;
|
|
44
44
|
export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
45
|
-
type: z.ZodLiteral<"user-input">;
|
|
46
|
-
fingerprintId: z.ZodString;
|
|
47
|
-
authToken: z.ZodOptional<z.ZodString>;
|
|
48
|
-
userInputId: z.ZodString;
|
|
49
|
-
messages: z.ZodArray<z.ZodObject<{
|
|
50
|
-
role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
|
|
51
|
-
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
52
|
-
type: z.ZodLiteral<"text">;
|
|
53
|
-
text: z.ZodString;
|
|
54
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
55
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
56
|
-
}, "strip", z.ZodTypeAny, {
|
|
57
|
-
type: "ephemeral";
|
|
58
|
-
}, {
|
|
59
|
-
type: "ephemeral";
|
|
60
|
-
}>>;
|
|
61
|
-
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
type: "text";
|
|
63
|
-
text: string;
|
|
64
|
-
cache_control?: {
|
|
65
|
-
type: "ephemeral";
|
|
66
|
-
} | undefined;
|
|
67
|
-
}, {
|
|
68
|
-
type: "text";
|
|
69
|
-
text: string;
|
|
70
|
-
cache_control?: {
|
|
71
|
-
type: "ephemeral";
|
|
72
|
-
} | undefined;
|
|
73
|
-
}>, z.ZodObject<{
|
|
74
|
-
type: z.ZodLiteral<"tool_use">;
|
|
75
|
-
id: z.ZodString;
|
|
76
|
-
name: z.ZodString;
|
|
77
|
-
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
78
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
79
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
80
|
-
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
type: "ephemeral";
|
|
82
|
-
}, {
|
|
83
|
-
type: "ephemeral";
|
|
84
|
-
}>>;
|
|
85
|
-
}, "strip", z.ZodTypeAny, {
|
|
86
|
-
type: "tool_use";
|
|
87
|
-
name: string;
|
|
88
|
-
id: string;
|
|
89
|
-
input: Record<string, any>;
|
|
90
|
-
cache_control?: {
|
|
91
|
-
type: "ephemeral";
|
|
92
|
-
} | undefined;
|
|
93
|
-
}, {
|
|
94
|
-
type: "tool_use";
|
|
95
|
-
name: string;
|
|
96
|
-
id: string;
|
|
97
|
-
input: Record<string, any>;
|
|
98
|
-
cache_control?: {
|
|
99
|
-
type: "ephemeral";
|
|
100
|
-
} | undefined;
|
|
101
|
-
}>, z.ZodObject<{
|
|
102
|
-
type: z.ZodLiteral<"tool_result">;
|
|
103
|
-
tool_use_id: z.ZodString;
|
|
104
|
-
content: z.ZodString;
|
|
105
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
106
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
107
|
-
}, "strip", z.ZodTypeAny, {
|
|
108
|
-
type: "ephemeral";
|
|
109
|
-
}, {
|
|
110
|
-
type: "ephemeral";
|
|
111
|
-
}>>;
|
|
112
|
-
}, "strip", z.ZodTypeAny, {
|
|
113
|
-
content: string;
|
|
114
|
-
type: "tool_result";
|
|
115
|
-
tool_use_id: string;
|
|
116
|
-
cache_control?: {
|
|
117
|
-
type: "ephemeral";
|
|
118
|
-
} | undefined;
|
|
119
|
-
}, {
|
|
120
|
-
content: string;
|
|
121
|
-
type: "tool_result";
|
|
122
|
-
tool_use_id: string;
|
|
123
|
-
cache_control?: {
|
|
124
|
-
type: "ephemeral";
|
|
125
|
-
} | undefined;
|
|
126
|
-
}>, z.ZodObject<{
|
|
127
|
-
type: z.ZodLiteral<"image">;
|
|
128
|
-
source: z.ZodObject<{
|
|
129
|
-
type: z.ZodLiteral<"base64">;
|
|
130
|
-
media_type: z.ZodLiteral<"image/jpeg">;
|
|
131
|
-
data: z.ZodString;
|
|
132
|
-
}, "strip", z.ZodTypeAny, {
|
|
133
|
-
type: "base64";
|
|
134
|
-
media_type: "image/jpeg";
|
|
135
|
-
data: string;
|
|
136
|
-
}, {
|
|
137
|
-
type: "base64";
|
|
138
|
-
media_type: "image/jpeg";
|
|
139
|
-
data: string;
|
|
140
|
-
}>;
|
|
141
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
142
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
143
|
-
}, "strip", z.ZodTypeAny, {
|
|
144
|
-
type: "ephemeral";
|
|
145
|
-
}, {
|
|
146
|
-
type: "ephemeral";
|
|
147
|
-
}>>;
|
|
148
|
-
}, "strip", z.ZodTypeAny, {
|
|
149
|
-
type: "image";
|
|
150
|
-
source: {
|
|
151
|
-
type: "base64";
|
|
152
|
-
media_type: "image/jpeg";
|
|
153
|
-
data: string;
|
|
154
|
-
};
|
|
155
|
-
cache_control?: {
|
|
156
|
-
type: "ephemeral";
|
|
157
|
-
} | undefined;
|
|
158
|
-
}, {
|
|
159
|
-
type: "image";
|
|
160
|
-
source: {
|
|
161
|
-
type: "base64";
|
|
162
|
-
media_type: "image/jpeg";
|
|
163
|
-
data: string;
|
|
164
|
-
};
|
|
165
|
-
cache_control?: {
|
|
166
|
-
type: "ephemeral";
|
|
167
|
-
} | undefined;
|
|
168
|
-
}>]>, "many">]>;
|
|
169
|
-
}, "strip", z.ZodTypeAny, {
|
|
170
|
-
content: string | ({
|
|
171
|
-
type: "text";
|
|
172
|
-
text: string;
|
|
173
|
-
cache_control?: {
|
|
174
|
-
type: "ephemeral";
|
|
175
|
-
} | undefined;
|
|
176
|
-
} | {
|
|
177
|
-
type: "tool_use";
|
|
178
|
-
name: string;
|
|
179
|
-
id: string;
|
|
180
|
-
input: Record<string, any>;
|
|
181
|
-
cache_control?: {
|
|
182
|
-
type: "ephemeral";
|
|
183
|
-
} | undefined;
|
|
184
|
-
} | {
|
|
185
|
-
content: string;
|
|
186
|
-
type: "tool_result";
|
|
187
|
-
tool_use_id: string;
|
|
188
|
-
cache_control?: {
|
|
189
|
-
type: "ephemeral";
|
|
190
|
-
} | undefined;
|
|
191
|
-
} | {
|
|
192
|
-
type: "image";
|
|
193
|
-
source: {
|
|
194
|
-
type: "base64";
|
|
195
|
-
media_type: "image/jpeg";
|
|
196
|
-
data: string;
|
|
197
|
-
};
|
|
198
|
-
cache_control?: {
|
|
199
|
-
type: "ephemeral";
|
|
200
|
-
} | undefined;
|
|
201
|
-
})[];
|
|
202
|
-
role: "user" | "assistant";
|
|
203
|
-
}, {
|
|
204
|
-
content: string | ({
|
|
205
|
-
type: "text";
|
|
206
|
-
text: string;
|
|
207
|
-
cache_control?: {
|
|
208
|
-
type: "ephemeral";
|
|
209
|
-
} | undefined;
|
|
210
|
-
} | {
|
|
211
|
-
type: "tool_use";
|
|
212
|
-
name: string;
|
|
213
|
-
id: string;
|
|
214
|
-
input: Record<string, any>;
|
|
215
|
-
cache_control?: {
|
|
216
|
-
type: "ephemeral";
|
|
217
|
-
} | undefined;
|
|
218
|
-
} | {
|
|
219
|
-
content: string;
|
|
220
|
-
type: "tool_result";
|
|
221
|
-
tool_use_id: string;
|
|
222
|
-
cache_control?: {
|
|
223
|
-
type: "ephemeral";
|
|
224
|
-
} | undefined;
|
|
225
|
-
} | {
|
|
226
|
-
type: "image";
|
|
227
|
-
source: {
|
|
228
|
-
type: "base64";
|
|
229
|
-
media_type: "image/jpeg";
|
|
230
|
-
data: string;
|
|
231
|
-
};
|
|
232
|
-
cache_control?: {
|
|
233
|
-
type: "ephemeral";
|
|
234
|
-
} | undefined;
|
|
235
|
-
})[];
|
|
236
|
-
role: "user" | "assistant";
|
|
237
|
-
}>, "many">;
|
|
238
|
-
fileContext: z.ZodObject<{
|
|
239
|
-
currentWorkingDirectory: z.ZodString;
|
|
240
|
-
fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
|
|
241
|
-
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
242
|
-
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
243
|
-
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
244
|
-
gitChanges: z.ZodObject<{
|
|
245
|
-
status: z.ZodString;
|
|
246
|
-
diff: z.ZodString;
|
|
247
|
-
diffCached: z.ZodString;
|
|
248
|
-
lastCommitMessages: z.ZodString;
|
|
249
|
-
}, "strip", z.ZodTypeAny, {
|
|
250
|
-
status: string;
|
|
251
|
-
diff: string;
|
|
252
|
-
diffCached: string;
|
|
253
|
-
lastCommitMessages: string;
|
|
254
|
-
}, {
|
|
255
|
-
status: string;
|
|
256
|
-
diff: string;
|
|
257
|
-
diffCached: string;
|
|
258
|
-
lastCommitMessages: string;
|
|
259
|
-
}>;
|
|
260
|
-
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
261
|
-
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
262
|
-
systemInfo: z.ZodObject<{
|
|
263
|
-
platform: z.ZodString;
|
|
264
|
-
shell: z.ZodString;
|
|
265
|
-
nodeVersion: z.ZodString;
|
|
266
|
-
arch: z.ZodString;
|
|
267
|
-
homedir: z.ZodString;
|
|
268
|
-
cpus: z.ZodNumber;
|
|
269
|
-
}, "strip", z.ZodTypeAny, {
|
|
270
|
-
platform: string;
|
|
271
|
-
shell: string;
|
|
272
|
-
nodeVersion: string;
|
|
273
|
-
arch: string;
|
|
274
|
-
homedir: string;
|
|
275
|
-
cpus: number;
|
|
276
|
-
}, {
|
|
277
|
-
platform: string;
|
|
278
|
-
shell: string;
|
|
279
|
-
nodeVersion: string;
|
|
280
|
-
arch: string;
|
|
281
|
-
homedir: string;
|
|
282
|
-
cpus: number;
|
|
283
|
-
}>;
|
|
284
|
-
fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
285
|
-
path: z.ZodString;
|
|
286
|
-
content: z.ZodString;
|
|
287
|
-
}, "strip", z.ZodTypeAny, {
|
|
288
|
-
path: string;
|
|
289
|
-
content: string;
|
|
290
|
-
}, {
|
|
291
|
-
path: string;
|
|
292
|
-
content: string;
|
|
293
|
-
}>, "many">, "many">>;
|
|
294
|
-
}, "strip", z.ZodTypeAny, {
|
|
295
|
-
currentWorkingDirectory: string;
|
|
296
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
297
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
298
|
-
knowledgeFiles: Record<string, string>;
|
|
299
|
-
gitChanges: {
|
|
300
|
-
status: string;
|
|
301
|
-
diff: string;
|
|
302
|
-
diffCached: string;
|
|
303
|
-
lastCommitMessages: string;
|
|
304
|
-
};
|
|
305
|
-
changesSinceLastChat: Record<string, string>;
|
|
306
|
-
shellConfigFiles: Record<string, string>;
|
|
307
|
-
systemInfo: {
|
|
308
|
-
platform: string;
|
|
309
|
-
shell: string;
|
|
310
|
-
nodeVersion: string;
|
|
311
|
-
arch: string;
|
|
312
|
-
homedir: string;
|
|
313
|
-
cpus: number;
|
|
314
|
-
};
|
|
315
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
316
|
-
fileVersions?: {
|
|
317
|
-
path: string;
|
|
318
|
-
content: string;
|
|
319
|
-
}[][] | undefined;
|
|
320
|
-
}, {
|
|
321
|
-
currentWorkingDirectory: string;
|
|
322
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
323
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
324
|
-
knowledgeFiles: Record<string, string>;
|
|
325
|
-
gitChanges: {
|
|
326
|
-
status: string;
|
|
327
|
-
diff: string;
|
|
328
|
-
diffCached: string;
|
|
329
|
-
lastCommitMessages: string;
|
|
330
|
-
};
|
|
331
|
-
changesSinceLastChat: Record<string, string>;
|
|
332
|
-
shellConfigFiles: Record<string, string>;
|
|
333
|
-
systemInfo: {
|
|
334
|
-
platform: string;
|
|
335
|
-
shell: string;
|
|
336
|
-
nodeVersion: string;
|
|
337
|
-
arch: string;
|
|
338
|
-
homedir: string;
|
|
339
|
-
cpus: number;
|
|
340
|
-
};
|
|
341
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
342
|
-
fileVersions?: {
|
|
343
|
-
path: string;
|
|
344
|
-
content: string;
|
|
345
|
-
}[][] | undefined;
|
|
346
|
-
}>;
|
|
347
|
-
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
348
|
-
type: z.ZodEnum<["patch", "file"]>;
|
|
349
|
-
path: z.ZodString;
|
|
350
|
-
content: z.ZodString;
|
|
351
|
-
}, "strip", z.ZodTypeAny, {
|
|
352
|
-
path: string;
|
|
353
|
-
content: string;
|
|
354
|
-
type: "file" | "patch";
|
|
355
|
-
}, {
|
|
356
|
-
path: string;
|
|
357
|
-
content: string;
|
|
358
|
-
type: "file" | "patch";
|
|
359
|
-
}>, "many">;
|
|
360
|
-
costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
|
|
361
|
-
}, "strip", z.ZodTypeAny, {
|
|
362
|
-
type: "user-input";
|
|
363
|
-
fileContext: {
|
|
364
|
-
currentWorkingDirectory: string;
|
|
365
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
366
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
367
|
-
knowledgeFiles: Record<string, string>;
|
|
368
|
-
gitChanges: {
|
|
369
|
-
status: string;
|
|
370
|
-
diff: string;
|
|
371
|
-
diffCached: string;
|
|
372
|
-
lastCommitMessages: string;
|
|
373
|
-
};
|
|
374
|
-
changesSinceLastChat: Record<string, string>;
|
|
375
|
-
shellConfigFiles: Record<string, string>;
|
|
376
|
-
systemInfo: {
|
|
377
|
-
platform: string;
|
|
378
|
-
shell: string;
|
|
379
|
-
nodeVersion: string;
|
|
380
|
-
arch: string;
|
|
381
|
-
homedir: string;
|
|
382
|
-
cpus: number;
|
|
383
|
-
};
|
|
384
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
385
|
-
fileVersions?: {
|
|
386
|
-
path: string;
|
|
387
|
-
content: string;
|
|
388
|
-
}[][] | undefined;
|
|
389
|
-
};
|
|
390
|
-
fingerprintId: string;
|
|
391
|
-
userInputId: string;
|
|
392
|
-
messages: {
|
|
393
|
-
content: string | ({
|
|
394
|
-
type: "text";
|
|
395
|
-
text: string;
|
|
396
|
-
cache_control?: {
|
|
397
|
-
type: "ephemeral";
|
|
398
|
-
} | undefined;
|
|
399
|
-
} | {
|
|
400
|
-
type: "tool_use";
|
|
401
|
-
name: string;
|
|
402
|
-
id: string;
|
|
403
|
-
input: Record<string, any>;
|
|
404
|
-
cache_control?: {
|
|
405
|
-
type: "ephemeral";
|
|
406
|
-
} | undefined;
|
|
407
|
-
} | {
|
|
408
|
-
content: string;
|
|
409
|
-
type: "tool_result";
|
|
410
|
-
tool_use_id: string;
|
|
411
|
-
cache_control?: {
|
|
412
|
-
type: "ephemeral";
|
|
413
|
-
} | undefined;
|
|
414
|
-
} | {
|
|
415
|
-
type: "image";
|
|
416
|
-
source: {
|
|
417
|
-
type: "base64";
|
|
418
|
-
media_type: "image/jpeg";
|
|
419
|
-
data: string;
|
|
420
|
-
};
|
|
421
|
-
cache_control?: {
|
|
422
|
-
type: "ephemeral";
|
|
423
|
-
} | undefined;
|
|
424
|
-
})[];
|
|
425
|
-
role: "user" | "assistant";
|
|
426
|
-
}[];
|
|
427
|
-
changesAlreadyApplied: {
|
|
428
|
-
path: string;
|
|
429
|
-
content: string;
|
|
430
|
-
type: "file" | "patch";
|
|
431
|
-
}[];
|
|
432
|
-
costMode: "max" | "lite" | "normal";
|
|
433
|
-
authToken?: string | undefined;
|
|
434
|
-
}, {
|
|
435
|
-
type: "user-input";
|
|
436
|
-
fileContext: {
|
|
437
|
-
currentWorkingDirectory: string;
|
|
438
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
439
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
440
|
-
knowledgeFiles: Record<string, string>;
|
|
441
|
-
gitChanges: {
|
|
442
|
-
status: string;
|
|
443
|
-
diff: string;
|
|
444
|
-
diffCached: string;
|
|
445
|
-
lastCommitMessages: string;
|
|
446
|
-
};
|
|
447
|
-
changesSinceLastChat: Record<string, string>;
|
|
448
|
-
shellConfigFiles: Record<string, string>;
|
|
449
|
-
systemInfo: {
|
|
450
|
-
platform: string;
|
|
451
|
-
shell: string;
|
|
452
|
-
nodeVersion: string;
|
|
453
|
-
arch: string;
|
|
454
|
-
homedir: string;
|
|
455
|
-
cpus: number;
|
|
456
|
-
};
|
|
457
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
458
|
-
fileVersions?: {
|
|
459
|
-
path: string;
|
|
460
|
-
content: string;
|
|
461
|
-
}[][] | undefined;
|
|
462
|
-
};
|
|
463
|
-
fingerprintId: string;
|
|
464
|
-
userInputId: string;
|
|
465
|
-
messages: {
|
|
466
|
-
content: string | ({
|
|
467
|
-
type: "text";
|
|
468
|
-
text: string;
|
|
469
|
-
cache_control?: {
|
|
470
|
-
type: "ephemeral";
|
|
471
|
-
} | undefined;
|
|
472
|
-
} | {
|
|
473
|
-
type: "tool_use";
|
|
474
|
-
name: string;
|
|
475
|
-
id: string;
|
|
476
|
-
input: Record<string, any>;
|
|
477
|
-
cache_control?: {
|
|
478
|
-
type: "ephemeral";
|
|
479
|
-
} | undefined;
|
|
480
|
-
} | {
|
|
481
|
-
content: string;
|
|
482
|
-
type: "tool_result";
|
|
483
|
-
tool_use_id: string;
|
|
484
|
-
cache_control?: {
|
|
485
|
-
type: "ephemeral";
|
|
486
|
-
} | undefined;
|
|
487
|
-
} | {
|
|
488
|
-
type: "image";
|
|
489
|
-
source: {
|
|
490
|
-
type: "base64";
|
|
491
|
-
media_type: "image/jpeg";
|
|
492
|
-
data: string;
|
|
493
|
-
};
|
|
494
|
-
cache_control?: {
|
|
495
|
-
type: "ephemeral";
|
|
496
|
-
} | undefined;
|
|
497
|
-
})[];
|
|
498
|
-
role: "user" | "assistant";
|
|
499
|
-
}[];
|
|
500
|
-
changesAlreadyApplied: {
|
|
501
|
-
path: string;
|
|
502
|
-
content: string;
|
|
503
|
-
type: "file" | "patch";
|
|
504
|
-
}[];
|
|
505
|
-
authToken?: string | undefined;
|
|
506
|
-
costMode?: "max" | "lite" | "normal" | undefined;
|
|
507
|
-
}>, z.ZodObject<{
|
|
508
45
|
type: z.ZodLiteral<"prompt">;
|
|
509
46
|
promptId: z.ZodString;
|
|
510
47
|
prompt: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
|
|
@@ -686,15 +223,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
686
223
|
type: "ephemeral";
|
|
687
224
|
}>>;
|
|
688
225
|
}, "strip", z.ZodTypeAny, {
|
|
689
|
-
content: string;
|
|
690
226
|
type: "tool_result";
|
|
227
|
+
content: string;
|
|
691
228
|
tool_use_id: string;
|
|
692
229
|
cache_control?: {
|
|
693
230
|
type: "ephemeral";
|
|
694
231
|
} | undefined;
|
|
695
232
|
}, {
|
|
696
|
-
content: string;
|
|
697
233
|
type: "tool_result";
|
|
234
|
+
content: string;
|
|
698
235
|
tool_use_id: string;
|
|
699
236
|
cache_control?: {
|
|
700
237
|
type: "ephemeral";
|
|
@@ -758,8 +295,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
758
295
|
type: "ephemeral";
|
|
759
296
|
} | undefined;
|
|
760
297
|
} | {
|
|
761
|
-
content: string;
|
|
762
298
|
type: "tool_result";
|
|
299
|
+
content: string;
|
|
763
300
|
tool_use_id: string;
|
|
764
301
|
cache_control?: {
|
|
765
302
|
type: "ephemeral";
|
|
@@ -792,8 +329,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
792
329
|
type: "ephemeral";
|
|
793
330
|
} | undefined;
|
|
794
331
|
} | {
|
|
795
|
-
content: string;
|
|
796
332
|
type: "tool_result";
|
|
333
|
+
content: string;
|
|
797
334
|
tool_use_id: string;
|
|
798
335
|
cache_control?: {
|
|
799
336
|
type: "ephemeral";
|
|
@@ -811,6 +348,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
811
348
|
})[];
|
|
812
349
|
role: "user" | "assistant";
|
|
813
350
|
}>, "many">;
|
|
351
|
+
lastUserPromptIndex: z.ZodOptional<z.ZodNumber>;
|
|
814
352
|
}, "strip", z.ZodTypeAny, {
|
|
815
353
|
agentContext: string;
|
|
816
354
|
fileContext: {
|
|
@@ -856,8 +394,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
856
394
|
type: "ephemeral";
|
|
857
395
|
} | undefined;
|
|
858
396
|
} | {
|
|
859
|
-
content: string;
|
|
860
397
|
type: "tool_result";
|
|
398
|
+
content: string;
|
|
861
399
|
tool_use_id: string;
|
|
862
400
|
cache_control?: {
|
|
863
401
|
type: "ephemeral";
|
|
@@ -875,6 +413,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
875
413
|
})[];
|
|
876
414
|
role: "user" | "assistant";
|
|
877
415
|
}[];
|
|
416
|
+
lastUserPromptIndex?: number | undefined;
|
|
878
417
|
}, {
|
|
879
418
|
agentContext: string;
|
|
880
419
|
fileContext: {
|
|
@@ -920,8 +459,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
920
459
|
type: "ephemeral";
|
|
921
460
|
} | undefined;
|
|
922
461
|
} | {
|
|
923
|
-
content: string;
|
|
924
462
|
type: "tool_result";
|
|
463
|
+
content: string;
|
|
925
464
|
tool_use_id: string;
|
|
926
465
|
cache_control?: {
|
|
927
466
|
type: "ephemeral";
|
|
@@ -939,6 +478,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
939
478
|
})[];
|
|
940
479
|
role: "user" | "assistant";
|
|
941
480
|
}[];
|
|
481
|
+
lastUserPromptIndex?: number | undefined;
|
|
942
482
|
}>;
|
|
943
483
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
944
484
|
name: z.ZodString;
|
|
@@ -955,9 +495,9 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
955
495
|
}>, "many">;
|
|
956
496
|
}, "strip", z.ZodTypeAny, {
|
|
957
497
|
type: "prompt";
|
|
958
|
-
fingerprintId: string;
|
|
959
|
-
costMode: "max" | "lite" | "normal";
|
|
960
498
|
promptId: string;
|
|
499
|
+
fingerprintId: string;
|
|
500
|
+
costMode: "lite" | "normal" | "max";
|
|
961
501
|
agentState: {
|
|
962
502
|
agentContext: string;
|
|
963
503
|
fileContext: {
|
|
@@ -1003,8 +543,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1003
543
|
type: "ephemeral";
|
|
1004
544
|
} | undefined;
|
|
1005
545
|
} | {
|
|
1006
|
-
content: string;
|
|
1007
546
|
type: "tool_result";
|
|
547
|
+
content: string;
|
|
1008
548
|
tool_use_id: string;
|
|
1009
549
|
cache_control?: {
|
|
1010
550
|
type: "ephemeral";
|
|
@@ -1022,18 +562,19 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1022
562
|
})[];
|
|
1023
563
|
role: "user" | "assistant";
|
|
1024
564
|
}[];
|
|
565
|
+
lastUserPromptIndex?: number | undefined;
|
|
1025
566
|
};
|
|
1026
567
|
toolResults: {
|
|
1027
568
|
name: string;
|
|
1028
569
|
id: string;
|
|
1029
570
|
result: string;
|
|
1030
571
|
}[];
|
|
1031
|
-
authToken?: string | undefined;
|
|
1032
572
|
prompt?: string | undefined;
|
|
573
|
+
authToken?: string | undefined;
|
|
1033
574
|
}, {
|
|
1034
575
|
type: "prompt";
|
|
1035
|
-
fingerprintId: string;
|
|
1036
576
|
promptId: string;
|
|
577
|
+
fingerprintId: string;
|
|
1037
578
|
agentState: {
|
|
1038
579
|
agentContext: string;
|
|
1039
580
|
fileContext: {
|
|
@@ -1079,8 +620,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1079
620
|
type: "ephemeral";
|
|
1080
621
|
} | undefined;
|
|
1081
622
|
} | {
|
|
1082
|
-
content: string;
|
|
1083
623
|
type: "tool_result";
|
|
624
|
+
content: string;
|
|
1084
625
|
tool_use_id: string;
|
|
1085
626
|
cache_control?: {
|
|
1086
627
|
type: "ephemeral";
|
|
@@ -1098,15 +639,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1098
639
|
})[];
|
|
1099
640
|
role: "user" | "assistant";
|
|
1100
641
|
}[];
|
|
642
|
+
lastUserPromptIndex?: number | undefined;
|
|
1101
643
|
};
|
|
1102
644
|
toolResults: {
|
|
1103
645
|
name: string;
|
|
1104
646
|
id: string;
|
|
1105
647
|
result: string;
|
|
1106
648
|
}[];
|
|
1107
|
-
authToken?: string | undefined;
|
|
1108
|
-
costMode?: "max" | "lite" | "normal" | undefined;
|
|
1109
649
|
prompt?: string | undefined;
|
|
650
|
+
authToken?: string | undefined;
|
|
651
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
1110
652
|
}>, z.ZodObject<{
|
|
1111
653
|
type: z.ZodLiteral<"read-files-response">;
|
|
1112
654
|
files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
@@ -1234,6 +776,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1234
776
|
}>;
|
|
1235
777
|
}, "strip", z.ZodTypeAny, {
|
|
1236
778
|
type: "init";
|
|
779
|
+
fingerprintId: string;
|
|
1237
780
|
fileContext: {
|
|
1238
781
|
currentWorkingDirectory: string;
|
|
1239
782
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -1261,10 +804,10 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1261
804
|
content: string;
|
|
1262
805
|
}[][] | undefined;
|
|
1263
806
|
};
|
|
1264
|
-
fingerprintId: string;
|
|
1265
807
|
authToken?: string | undefined;
|
|
1266
808
|
}, {
|
|
1267
809
|
type: "init";
|
|
810
|
+
fingerprintId: string;
|
|
1268
811
|
fileContext: {
|
|
1269
812
|
currentWorkingDirectory: string;
|
|
1270
813
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -1292,7 +835,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1292
835
|
content: string;
|
|
1293
836
|
}[][] | undefined;
|
|
1294
837
|
};
|
|
1295
|
-
fingerprintId: string;
|
|
1296
838
|
authToken?: string | undefined;
|
|
1297
839
|
}>, z.ZodObject<{
|
|
1298
840
|
type: z.ZodLiteral<"generate-commit-message">;
|
|
@@ -1374,26 +916,26 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1374
916
|
path: z.ZodString;
|
|
1375
917
|
content: z.ZodString;
|
|
1376
918
|
}, "strip", z.ZodTypeAny, {
|
|
919
|
+
type: "patch" | "file";
|
|
1377
920
|
path: string;
|
|
1378
921
|
content: string;
|
|
1379
|
-
type: "file" | "patch";
|
|
1380
922
|
}, {
|
|
923
|
+
type: "patch" | "file";
|
|
1381
924
|
path: string;
|
|
1382
925
|
content: string;
|
|
1383
|
-
type: "file" | "patch";
|
|
1384
926
|
}>, "many">;
|
|
1385
927
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
1386
928
|
type: z.ZodEnum<["patch", "file"]>;
|
|
1387
929
|
path: z.ZodString;
|
|
1388
930
|
content: z.ZodString;
|
|
1389
931
|
}, "strip", z.ZodTypeAny, {
|
|
932
|
+
type: "patch" | "file";
|
|
1390
933
|
path: string;
|
|
1391
934
|
content: string;
|
|
1392
|
-
type: "file" | "patch";
|
|
1393
935
|
}, {
|
|
936
|
+
type: "patch" | "file";
|
|
1394
937
|
path: string;
|
|
1395
938
|
content: string;
|
|
1396
|
-
type: "file" | "patch";
|
|
1397
939
|
}>, "many">;
|
|
1398
940
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
1399
941
|
path: z.ZodString;
|
|
@@ -1416,16 +958,16 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1416
958
|
}>, "strip", z.ZodTypeAny, {
|
|
1417
959
|
type: "response-complete";
|
|
1418
960
|
userInputId: string;
|
|
1419
|
-
|
|
961
|
+
response: string;
|
|
962
|
+
changes: {
|
|
963
|
+
type: "patch" | "file";
|
|
1420
964
|
path: string;
|
|
1421
965
|
content: string;
|
|
1422
|
-
type: "file" | "patch";
|
|
1423
966
|
}[];
|
|
1424
|
-
|
|
1425
|
-
|
|
967
|
+
changesAlreadyApplied: {
|
|
968
|
+
type: "patch" | "file";
|
|
1426
969
|
path: string;
|
|
1427
970
|
content: string;
|
|
1428
|
-
type: "file" | "patch";
|
|
1429
971
|
}[];
|
|
1430
972
|
addedFileVersions: {
|
|
1431
973
|
path: string;
|
|
@@ -1441,16 +983,16 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1441
983
|
}, {
|
|
1442
984
|
type: "response-complete";
|
|
1443
985
|
userInputId: string;
|
|
1444
|
-
|
|
986
|
+
response: string;
|
|
987
|
+
changes: {
|
|
988
|
+
type: "patch" | "file";
|
|
1445
989
|
path: string;
|
|
1446
990
|
content: string;
|
|
1447
|
-
type: "file" | "patch";
|
|
1448
991
|
}[];
|
|
1449
|
-
|
|
1450
|
-
|
|
992
|
+
changesAlreadyApplied: {
|
|
993
|
+
type: "patch" | "file";
|
|
1451
994
|
path: string;
|
|
1452
995
|
content: string;
|
|
1453
|
-
type: "file" | "patch";
|
|
1454
996
|
}[];
|
|
1455
997
|
addedFileVersions: {
|
|
1456
998
|
path: string;
|
|
@@ -1656,15 +1198,15 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1656
1198
|
type: "ephemeral";
|
|
1657
1199
|
}>>;
|
|
1658
1200
|
}, "strip", z.ZodTypeAny, {
|
|
1659
|
-
content: string;
|
|
1660
1201
|
type: "tool_result";
|
|
1202
|
+
content: string;
|
|
1661
1203
|
tool_use_id: string;
|
|
1662
1204
|
cache_control?: {
|
|
1663
1205
|
type: "ephemeral";
|
|
1664
1206
|
} | undefined;
|
|
1665
1207
|
}, {
|
|
1666
|
-
content: string;
|
|
1667
1208
|
type: "tool_result";
|
|
1209
|
+
content: string;
|
|
1668
1210
|
tool_use_id: string;
|
|
1669
1211
|
cache_control?: {
|
|
1670
1212
|
type: "ephemeral";
|
|
@@ -1728,8 +1270,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1728
1270
|
type: "ephemeral";
|
|
1729
1271
|
} | undefined;
|
|
1730
1272
|
} | {
|
|
1731
|
-
content: string;
|
|
1732
1273
|
type: "tool_result";
|
|
1274
|
+
content: string;
|
|
1733
1275
|
tool_use_id: string;
|
|
1734
1276
|
cache_control?: {
|
|
1735
1277
|
type: "ephemeral";
|
|
@@ -1762,8 +1304,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1762
1304
|
type: "ephemeral";
|
|
1763
1305
|
} | undefined;
|
|
1764
1306
|
} | {
|
|
1765
|
-
content: string;
|
|
1766
1307
|
type: "tool_result";
|
|
1308
|
+
content: string;
|
|
1767
1309
|
tool_use_id: string;
|
|
1768
1310
|
cache_control?: {
|
|
1769
1311
|
type: "ephemeral";
|
|
@@ -1781,6 +1323,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1781
1323
|
})[];
|
|
1782
1324
|
role: "user" | "assistant";
|
|
1783
1325
|
}>, "many">;
|
|
1326
|
+
lastUserPromptIndex: z.ZodOptional<z.ZodNumber>;
|
|
1784
1327
|
}, "strip", z.ZodTypeAny, {
|
|
1785
1328
|
agentContext: string;
|
|
1786
1329
|
fileContext: {
|
|
@@ -1826,8 +1369,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1826
1369
|
type: "ephemeral";
|
|
1827
1370
|
} | undefined;
|
|
1828
1371
|
} | {
|
|
1829
|
-
content: string;
|
|
1830
1372
|
type: "tool_result";
|
|
1373
|
+
content: string;
|
|
1831
1374
|
tool_use_id: string;
|
|
1832
1375
|
cache_control?: {
|
|
1833
1376
|
type: "ephemeral";
|
|
@@ -1845,6 +1388,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1845
1388
|
})[];
|
|
1846
1389
|
role: "user" | "assistant";
|
|
1847
1390
|
}[];
|
|
1391
|
+
lastUserPromptIndex?: number | undefined;
|
|
1848
1392
|
}, {
|
|
1849
1393
|
agentContext: string;
|
|
1850
1394
|
fileContext: {
|
|
@@ -1890,8 +1434,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1890
1434
|
type: "ephemeral";
|
|
1891
1435
|
} | undefined;
|
|
1892
1436
|
} | {
|
|
1893
|
-
content: string;
|
|
1894
1437
|
type: "tool_result";
|
|
1438
|
+
content: string;
|
|
1895
1439
|
tool_use_id: string;
|
|
1896
1440
|
cache_control?: {
|
|
1897
1441
|
type: "ephemeral";
|
|
@@ -1909,6 +1453,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1909
1453
|
})[];
|
|
1910
1454
|
role: "user" | "assistant";
|
|
1911
1455
|
}[];
|
|
1456
|
+
lastUserPromptIndex?: number | undefined;
|
|
1912
1457
|
}>;
|
|
1913
1458
|
toolCalls: z.ZodArray<z.ZodObject<{
|
|
1914
1459
|
name: z.ZodString;
|
|
@@ -1916,12 +1461,12 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1916
1461
|
id: z.ZodString;
|
|
1917
1462
|
}, "strip", z.ZodTypeAny, {
|
|
1918
1463
|
name: string;
|
|
1919
|
-
parameters: Record<string, string>;
|
|
1920
1464
|
id: string;
|
|
1465
|
+
parameters: Record<string, string>;
|
|
1921
1466
|
}, {
|
|
1922
1467
|
name: string;
|
|
1923
|
-
parameters: Record<string, string>;
|
|
1924
1468
|
id: string;
|
|
1469
|
+
parameters: Record<string, string>;
|
|
1925
1470
|
}>, "many">;
|
|
1926
1471
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
1927
1472
|
name: z.ZodString;
|
|
@@ -1984,8 +1529,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1984
1529
|
type: "ephemeral";
|
|
1985
1530
|
} | undefined;
|
|
1986
1531
|
} | {
|
|
1987
|
-
content: string;
|
|
1988
1532
|
type: "tool_result";
|
|
1533
|
+
content: string;
|
|
1989
1534
|
tool_use_id: string;
|
|
1990
1535
|
cache_control?: {
|
|
1991
1536
|
type: "ephemeral";
|
|
@@ -2003,6 +1548,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
2003
1548
|
})[];
|
|
2004
1549
|
role: "user" | "assistant";
|
|
2005
1550
|
}[];
|
|
1551
|
+
lastUserPromptIndex?: number | undefined;
|
|
2006
1552
|
};
|
|
2007
1553
|
toolResults: {
|
|
2008
1554
|
name: string;
|
|
@@ -2011,8 +1557,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
2011
1557
|
}[];
|
|
2012
1558
|
toolCalls: {
|
|
2013
1559
|
name: string;
|
|
2014
|
-
parameters: Record<string, string>;
|
|
2015
1560
|
id: string;
|
|
1561
|
+
parameters: Record<string, string>;
|
|
2016
1562
|
}[];
|
|
2017
1563
|
}, {
|
|
2018
1564
|
type: "prompt-response";
|
|
@@ -2062,8 +1608,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
2062
1608
|
type: "ephemeral";
|
|
2063
1609
|
} | undefined;
|
|
2064
1610
|
} | {
|
|
2065
|
-
content: string;
|
|
2066
1611
|
type: "tool_result";
|
|
1612
|
+
content: string;
|
|
2067
1613
|
tool_use_id: string;
|
|
2068
1614
|
cache_control?: {
|
|
2069
1615
|
type: "ephemeral";
|
|
@@ -2081,6 +1627,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
2081
1627
|
})[];
|
|
2082
1628
|
role: "user" | "assistant";
|
|
2083
1629
|
}[];
|
|
1630
|
+
lastUserPromptIndex?: number | undefined;
|
|
2084
1631
|
};
|
|
2085
1632
|
toolResults: {
|
|
2086
1633
|
name: string;
|
|
@@ -2089,8 +1636,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
2089
1636
|
}[];
|
|
2090
1637
|
toolCalls: {
|
|
2091
1638
|
name: string;
|
|
2092
|
-
parameters: Record<string, string>;
|
|
2093
1639
|
id: string;
|
|
1640
|
+
parameters: Record<string, string>;
|
|
2094
1641
|
}[];
|
|
2095
1642
|
}>;
|
|
2096
1643
|
export type PromptResponse = z.infer<typeof PromptResponseSchema>;
|
|
@@ -2115,26 +1662,26 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2115
1662
|
path: z.ZodString;
|
|
2116
1663
|
content: z.ZodString;
|
|
2117
1664
|
}, "strip", z.ZodTypeAny, {
|
|
1665
|
+
type: "patch" | "file";
|
|
2118
1666
|
path: string;
|
|
2119
1667
|
content: string;
|
|
2120
|
-
type: "file" | "patch";
|
|
2121
1668
|
}, {
|
|
1669
|
+
type: "patch" | "file";
|
|
2122
1670
|
path: string;
|
|
2123
1671
|
content: string;
|
|
2124
|
-
type: "file" | "patch";
|
|
2125
1672
|
}>, "many">;
|
|
2126
1673
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
2127
1674
|
type: z.ZodEnum<["patch", "file"]>;
|
|
2128
1675
|
path: z.ZodString;
|
|
2129
1676
|
content: z.ZodString;
|
|
2130
1677
|
}, "strip", z.ZodTypeAny, {
|
|
1678
|
+
type: "patch" | "file";
|
|
2131
1679
|
path: string;
|
|
2132
1680
|
content: string;
|
|
2133
|
-
type: "file" | "patch";
|
|
2134
1681
|
}, {
|
|
1682
|
+
type: "patch" | "file";
|
|
2135
1683
|
path: string;
|
|
2136
1684
|
content: string;
|
|
2137
|
-
type: "file" | "patch";
|
|
2138
1685
|
}>, "many">;
|
|
2139
1686
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
2140
1687
|
path: z.ZodString;
|
|
@@ -2157,16 +1704,16 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2157
1704
|
}>, "strip", z.ZodTypeAny, {
|
|
2158
1705
|
type: "response-complete";
|
|
2159
1706
|
userInputId: string;
|
|
2160
|
-
|
|
1707
|
+
response: string;
|
|
1708
|
+
changes: {
|
|
1709
|
+
type: "patch" | "file";
|
|
2161
1710
|
path: string;
|
|
2162
1711
|
content: string;
|
|
2163
|
-
type: "file" | "patch";
|
|
2164
1712
|
}[];
|
|
2165
|
-
|
|
2166
|
-
|
|
1713
|
+
changesAlreadyApplied: {
|
|
1714
|
+
type: "patch" | "file";
|
|
2167
1715
|
path: string;
|
|
2168
1716
|
content: string;
|
|
2169
|
-
type: "file" | "patch";
|
|
2170
1717
|
}[];
|
|
2171
1718
|
addedFileVersions: {
|
|
2172
1719
|
path: string;
|
|
@@ -2182,16 +1729,16 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2182
1729
|
}, {
|
|
2183
1730
|
type: "response-complete";
|
|
2184
1731
|
userInputId: string;
|
|
2185
|
-
|
|
1732
|
+
response: string;
|
|
1733
|
+
changes: {
|
|
1734
|
+
type: "patch" | "file";
|
|
2186
1735
|
path: string;
|
|
2187
1736
|
content: string;
|
|
2188
|
-
type: "file" | "patch";
|
|
2189
1737
|
}[];
|
|
2190
|
-
|
|
2191
|
-
|
|
1738
|
+
changesAlreadyApplied: {
|
|
1739
|
+
type: "patch" | "file";
|
|
2192
1740
|
path: string;
|
|
2193
1741
|
content: string;
|
|
2194
|
-
type: "file" | "patch";
|
|
2195
1742
|
}[];
|
|
2196
1743
|
addedFileVersions: {
|
|
2197
1744
|
path: string;
|
|
@@ -2382,15 +1929,15 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2382
1929
|
type: "ephemeral";
|
|
2383
1930
|
}>>;
|
|
2384
1931
|
}, "strip", z.ZodTypeAny, {
|
|
2385
|
-
content: string;
|
|
2386
1932
|
type: "tool_result";
|
|
1933
|
+
content: string;
|
|
2387
1934
|
tool_use_id: string;
|
|
2388
1935
|
cache_control?: {
|
|
2389
1936
|
type: "ephemeral";
|
|
2390
1937
|
} | undefined;
|
|
2391
1938
|
}, {
|
|
2392
|
-
content: string;
|
|
2393
1939
|
type: "tool_result";
|
|
1940
|
+
content: string;
|
|
2394
1941
|
tool_use_id: string;
|
|
2395
1942
|
cache_control?: {
|
|
2396
1943
|
type: "ephemeral";
|
|
@@ -2454,8 +2001,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2454
2001
|
type: "ephemeral";
|
|
2455
2002
|
} | undefined;
|
|
2456
2003
|
} | {
|
|
2457
|
-
content: string;
|
|
2458
2004
|
type: "tool_result";
|
|
2005
|
+
content: string;
|
|
2459
2006
|
tool_use_id: string;
|
|
2460
2007
|
cache_control?: {
|
|
2461
2008
|
type: "ephemeral";
|
|
@@ -2488,8 +2035,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2488
2035
|
type: "ephemeral";
|
|
2489
2036
|
} | undefined;
|
|
2490
2037
|
} | {
|
|
2491
|
-
content: string;
|
|
2492
2038
|
type: "tool_result";
|
|
2039
|
+
content: string;
|
|
2493
2040
|
tool_use_id: string;
|
|
2494
2041
|
cache_control?: {
|
|
2495
2042
|
type: "ephemeral";
|
|
@@ -2507,6 +2054,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2507
2054
|
})[];
|
|
2508
2055
|
role: "user" | "assistant";
|
|
2509
2056
|
}>, "many">;
|
|
2057
|
+
lastUserPromptIndex: z.ZodOptional<z.ZodNumber>;
|
|
2510
2058
|
}, "strip", z.ZodTypeAny, {
|
|
2511
2059
|
agentContext: string;
|
|
2512
2060
|
fileContext: {
|
|
@@ -2552,8 +2100,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2552
2100
|
type: "ephemeral";
|
|
2553
2101
|
} | undefined;
|
|
2554
2102
|
} | {
|
|
2555
|
-
content: string;
|
|
2556
2103
|
type: "tool_result";
|
|
2104
|
+
content: string;
|
|
2557
2105
|
tool_use_id: string;
|
|
2558
2106
|
cache_control?: {
|
|
2559
2107
|
type: "ephemeral";
|
|
@@ -2571,6 +2119,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2571
2119
|
})[];
|
|
2572
2120
|
role: "user" | "assistant";
|
|
2573
2121
|
}[];
|
|
2122
|
+
lastUserPromptIndex?: number | undefined;
|
|
2574
2123
|
}, {
|
|
2575
2124
|
agentContext: string;
|
|
2576
2125
|
fileContext: {
|
|
@@ -2616,8 +2165,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2616
2165
|
type: "ephemeral";
|
|
2617
2166
|
} | undefined;
|
|
2618
2167
|
} | {
|
|
2619
|
-
content: string;
|
|
2620
2168
|
type: "tool_result";
|
|
2169
|
+
content: string;
|
|
2621
2170
|
tool_use_id: string;
|
|
2622
2171
|
cache_control?: {
|
|
2623
2172
|
type: "ephemeral";
|
|
@@ -2635,6 +2184,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2635
2184
|
})[];
|
|
2636
2185
|
role: "user" | "assistant";
|
|
2637
2186
|
}[];
|
|
2187
|
+
lastUserPromptIndex?: number | undefined;
|
|
2638
2188
|
}>;
|
|
2639
2189
|
toolCalls: z.ZodArray<z.ZodObject<{
|
|
2640
2190
|
name: z.ZodString;
|
|
@@ -2642,12 +2192,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2642
2192
|
id: z.ZodString;
|
|
2643
2193
|
}, "strip", z.ZodTypeAny, {
|
|
2644
2194
|
name: string;
|
|
2645
|
-
parameters: Record<string, string>;
|
|
2646
2195
|
id: string;
|
|
2196
|
+
parameters: Record<string, string>;
|
|
2647
2197
|
}, {
|
|
2648
2198
|
name: string;
|
|
2649
|
-
parameters: Record<string, string>;
|
|
2650
2199
|
id: string;
|
|
2200
|
+
parameters: Record<string, string>;
|
|
2651
2201
|
}>, "many">;
|
|
2652
2202
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
2653
2203
|
name: z.ZodString;
|
|
@@ -2710,8 +2260,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2710
2260
|
type: "ephemeral";
|
|
2711
2261
|
} | undefined;
|
|
2712
2262
|
} | {
|
|
2713
|
-
content: string;
|
|
2714
2263
|
type: "tool_result";
|
|
2264
|
+
content: string;
|
|
2715
2265
|
tool_use_id: string;
|
|
2716
2266
|
cache_control?: {
|
|
2717
2267
|
type: "ephemeral";
|
|
@@ -2729,6 +2279,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2729
2279
|
})[];
|
|
2730
2280
|
role: "user" | "assistant";
|
|
2731
2281
|
}[];
|
|
2282
|
+
lastUserPromptIndex?: number | undefined;
|
|
2732
2283
|
};
|
|
2733
2284
|
toolResults: {
|
|
2734
2285
|
name: string;
|
|
@@ -2737,8 +2288,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2737
2288
|
}[];
|
|
2738
2289
|
toolCalls: {
|
|
2739
2290
|
name: string;
|
|
2740
|
-
parameters: Record<string, string>;
|
|
2741
2291
|
id: string;
|
|
2292
|
+
parameters: Record<string, string>;
|
|
2742
2293
|
}[];
|
|
2743
2294
|
}, {
|
|
2744
2295
|
type: "prompt-response";
|
|
@@ -2788,8 +2339,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2788
2339
|
type: "ephemeral";
|
|
2789
2340
|
} | undefined;
|
|
2790
2341
|
} | {
|
|
2791
|
-
content: string;
|
|
2792
2342
|
type: "tool_result";
|
|
2343
|
+
content: string;
|
|
2793
2344
|
tool_use_id: string;
|
|
2794
2345
|
cache_control?: {
|
|
2795
2346
|
type: "ephemeral";
|
|
@@ -2807,6 +2358,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2807
2358
|
})[];
|
|
2808
2359
|
role: "user" | "assistant";
|
|
2809
2360
|
}[];
|
|
2361
|
+
lastUserPromptIndex?: number | undefined;
|
|
2810
2362
|
};
|
|
2811
2363
|
toolResults: {
|
|
2812
2364
|
name: string;
|
|
@@ -2815,8 +2367,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2815
2367
|
}[];
|
|
2816
2368
|
toolCalls: {
|
|
2817
2369
|
name: string;
|
|
2818
|
-
parameters: Record<string, string>;
|
|
2819
2370
|
id: string;
|
|
2371
|
+
parameters: Record<string, string>;
|
|
2820
2372
|
}[];
|
|
2821
2373
|
}>, z.ZodObject<{
|
|
2822
2374
|
type: z.ZodLiteral<"read-files">;
|
|
@@ -2852,26 +2404,26 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2852
2404
|
path: z.ZodString;
|
|
2853
2405
|
content: z.ZodString;
|
|
2854
2406
|
}, "strip", z.ZodTypeAny, {
|
|
2407
|
+
type: "patch" | "file";
|
|
2855
2408
|
path: string;
|
|
2856
2409
|
content: string;
|
|
2857
|
-
type: "file" | "patch";
|
|
2858
2410
|
}, {
|
|
2411
|
+
type: "patch" | "file";
|
|
2859
2412
|
path: string;
|
|
2860
2413
|
content: string;
|
|
2861
|
-
type: "file" | "patch";
|
|
2862
2414
|
}>, "many">;
|
|
2863
2415
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
2864
2416
|
type: z.ZodEnum<["patch", "file"]>;
|
|
2865
2417
|
path: z.ZodString;
|
|
2866
2418
|
content: z.ZodString;
|
|
2867
2419
|
}, "strip", z.ZodTypeAny, {
|
|
2420
|
+
type: "patch" | "file";
|
|
2868
2421
|
path: string;
|
|
2869
2422
|
content: string;
|
|
2870
|
-
type: "file" | "patch";
|
|
2871
2423
|
}, {
|
|
2424
|
+
type: "patch" | "file";
|
|
2872
2425
|
path: string;
|
|
2873
2426
|
content: string;
|
|
2874
|
-
type: "file" | "patch";
|
|
2875
2427
|
}>, "many">;
|
|
2876
2428
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
2877
2429
|
path: z.ZodString;
|
|
@@ -2892,16 +2444,16 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2892
2444
|
input: Record<string, any>;
|
|
2893
2445
|
};
|
|
2894
2446
|
userInputId: string;
|
|
2895
|
-
|
|
2447
|
+
response: string;
|
|
2448
|
+
changes: {
|
|
2449
|
+
type: "patch" | "file";
|
|
2896
2450
|
path: string;
|
|
2897
2451
|
content: string;
|
|
2898
|
-
type: "file" | "patch";
|
|
2899
2452
|
}[];
|
|
2900
|
-
|
|
2901
|
-
|
|
2453
|
+
changesAlreadyApplied: {
|
|
2454
|
+
type: "patch" | "file";
|
|
2902
2455
|
path: string;
|
|
2903
2456
|
content: string;
|
|
2904
|
-
type: "file" | "patch";
|
|
2905
2457
|
}[];
|
|
2906
2458
|
addedFileVersions: {
|
|
2907
2459
|
path: string;
|
|
@@ -2916,16 +2468,16 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2916
2468
|
input: Record<string, any>;
|
|
2917
2469
|
};
|
|
2918
2470
|
userInputId: string;
|
|
2919
|
-
|
|
2471
|
+
response: string;
|
|
2472
|
+
changes: {
|
|
2473
|
+
type: "patch" | "file";
|
|
2920
2474
|
path: string;
|
|
2921
2475
|
content: string;
|
|
2922
|
-
type: "file" | "patch";
|
|
2923
2476
|
}[];
|
|
2924
|
-
|
|
2925
|
-
|
|
2477
|
+
changesAlreadyApplied: {
|
|
2478
|
+
type: "patch" | "file";
|
|
2926
2479
|
path: string;
|
|
2927
2480
|
content: string;
|
|
2928
|
-
type: "file" | "patch";
|
|
2929
2481
|
}[];
|
|
2930
2482
|
addedFileVersions: {
|
|
2931
2483
|
path: string;
|
|
@@ -3022,11 +2574,11 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
3022
2574
|
type: z.ZodLiteral<"action-error">;
|
|
3023
2575
|
message: z.ZodString;
|
|
3024
2576
|
}, "strip", z.ZodTypeAny, {
|
|
3025
|
-
message: string;
|
|
3026
2577
|
type: "action-error";
|
|
3027
|
-
}, {
|
|
3028
2578
|
message: string;
|
|
2579
|
+
}, {
|
|
3029
2580
|
type: "action-error";
|
|
2581
|
+
message: string;
|
|
3030
2582
|
}>, z.ZodObject<{
|
|
3031
2583
|
type: z.ZodLiteral<"commit-message-response">;
|
|
3032
2584
|
commitMessage: z.ZodString;
|