codebuff 1.0.196 → 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/client.d.ts +3 -2
- package/dist/code-map/tsconfig.tsbuildinfo +1 -1
- package/dist/common/actions.d.ts +107 -555
- package/dist/common/actions.js +0 -11
- package/dist/common/actions.js.map +1 -1
- package/dist/common/constants.d.ts +8 -0
- package/dist/common/constants.js +15 -1
- 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/logger.d.ts +1 -0
- package/dist/common/logger.js +7 -0
- package/dist/common/logger.js.map +1 -0
- 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 +19 -16
- package/dist/common/types/agent-state.js +2 -0
- package/dist/common/types/agent-state.js.map +1 -1
- package/dist/common/types/message.d.ts +6 -6
- package/dist/common/types/usage.d.ts +2 -2
- package/dist/common/util/constants.d.ts +1 -0
- package/dist/common/util/constants.js +7 -0
- package/dist/common/util/constants.js.map +1 -0
- package/dist/common/util/credentials.d.ts +2 -2
- package/dist/common/util/file.d.ts +1 -1
- package/dist/common/util/file.js +3 -3
- package/dist/common/util/file.js.map +1 -1
- package/dist/common/util/helpers.d.ts +1 -0
- package/dist/common/util/helpers.js +6 -0
- package/dist/common/util/helpers.js.map +1 -0
- package/dist/common/util/token-counter.d.ts +3 -0
- package/dist/common/util/token-counter.js +27 -0
- package/dist/common/util/token-counter.js.map +1 -0
- package/dist/common/websockets/websocket-schema.d.ts +1079 -2269
- package/dist/index.js +1 -1
- package/dist/project-files.js +16 -6
- package/dist/project-files.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
|
-
fingerprintId: string;
|
|
364
|
-
userInputId: string;
|
|
365
|
-
messages: {
|
|
366
|
-
content: string | ({
|
|
367
|
-
type: "text";
|
|
368
|
-
text: string;
|
|
369
|
-
cache_control?: {
|
|
370
|
-
type: "ephemeral";
|
|
371
|
-
} | undefined;
|
|
372
|
-
} | {
|
|
373
|
-
type: "tool_use";
|
|
374
|
-
name: string;
|
|
375
|
-
id: string;
|
|
376
|
-
input: Record<string, any>;
|
|
377
|
-
cache_control?: {
|
|
378
|
-
type: "ephemeral";
|
|
379
|
-
} | undefined;
|
|
380
|
-
} | {
|
|
381
|
-
content: string;
|
|
382
|
-
type: "tool_result";
|
|
383
|
-
tool_use_id: string;
|
|
384
|
-
cache_control?: {
|
|
385
|
-
type: "ephemeral";
|
|
386
|
-
} | undefined;
|
|
387
|
-
} | {
|
|
388
|
-
type: "image";
|
|
389
|
-
source: {
|
|
390
|
-
type: "base64";
|
|
391
|
-
media_type: "image/jpeg";
|
|
392
|
-
data: string;
|
|
393
|
-
};
|
|
394
|
-
cache_control?: {
|
|
395
|
-
type: "ephemeral";
|
|
396
|
-
} | undefined;
|
|
397
|
-
})[];
|
|
398
|
-
role: "user" | "assistant";
|
|
399
|
-
}[];
|
|
400
|
-
fileContext: {
|
|
401
|
-
currentWorkingDirectory: string;
|
|
402
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
403
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
404
|
-
knowledgeFiles: Record<string, string>;
|
|
405
|
-
gitChanges: {
|
|
406
|
-
status: string;
|
|
407
|
-
diff: string;
|
|
408
|
-
diffCached: string;
|
|
409
|
-
lastCommitMessages: string;
|
|
410
|
-
};
|
|
411
|
-
changesSinceLastChat: Record<string, string>;
|
|
412
|
-
shellConfigFiles: Record<string, string>;
|
|
413
|
-
systemInfo: {
|
|
414
|
-
platform: string;
|
|
415
|
-
shell: string;
|
|
416
|
-
nodeVersion: string;
|
|
417
|
-
arch: string;
|
|
418
|
-
homedir: string;
|
|
419
|
-
cpus: number;
|
|
420
|
-
};
|
|
421
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
422
|
-
fileVersions?: {
|
|
423
|
-
path: string;
|
|
424
|
-
content: string;
|
|
425
|
-
}[][] | undefined;
|
|
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
|
-
fingerprintId: string;
|
|
437
|
-
userInputId: string;
|
|
438
|
-
messages: {
|
|
439
|
-
content: string | ({
|
|
440
|
-
type: "text";
|
|
441
|
-
text: string;
|
|
442
|
-
cache_control?: {
|
|
443
|
-
type: "ephemeral";
|
|
444
|
-
} | undefined;
|
|
445
|
-
} | {
|
|
446
|
-
type: "tool_use";
|
|
447
|
-
name: string;
|
|
448
|
-
id: string;
|
|
449
|
-
input: Record<string, any>;
|
|
450
|
-
cache_control?: {
|
|
451
|
-
type: "ephemeral";
|
|
452
|
-
} | undefined;
|
|
453
|
-
} | {
|
|
454
|
-
content: string;
|
|
455
|
-
type: "tool_result";
|
|
456
|
-
tool_use_id: string;
|
|
457
|
-
cache_control?: {
|
|
458
|
-
type: "ephemeral";
|
|
459
|
-
} | undefined;
|
|
460
|
-
} | {
|
|
461
|
-
type: "image";
|
|
462
|
-
source: {
|
|
463
|
-
type: "base64";
|
|
464
|
-
media_type: "image/jpeg";
|
|
465
|
-
data: string;
|
|
466
|
-
};
|
|
467
|
-
cache_control?: {
|
|
468
|
-
type: "ephemeral";
|
|
469
|
-
} | undefined;
|
|
470
|
-
})[];
|
|
471
|
-
role: "user" | "assistant";
|
|
472
|
-
}[];
|
|
473
|
-
fileContext: {
|
|
474
|
-
currentWorkingDirectory: string;
|
|
475
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
476
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
477
|
-
knowledgeFiles: Record<string, string>;
|
|
478
|
-
gitChanges: {
|
|
479
|
-
status: string;
|
|
480
|
-
diff: string;
|
|
481
|
-
diffCached: string;
|
|
482
|
-
lastCommitMessages: string;
|
|
483
|
-
};
|
|
484
|
-
changesSinceLastChat: Record<string, string>;
|
|
485
|
-
shellConfigFiles: Record<string, string>;
|
|
486
|
-
systemInfo: {
|
|
487
|
-
platform: string;
|
|
488
|
-
shell: string;
|
|
489
|
-
nodeVersion: string;
|
|
490
|
-
arch: string;
|
|
491
|
-
homedir: string;
|
|
492
|
-
cpus: number;
|
|
493
|
-
};
|
|
494
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
495
|
-
fileVersions?: {
|
|
496
|
-
path: string;
|
|
497
|
-
content: string;
|
|
498
|
-
}[][] | undefined;
|
|
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,7 +348,9 @@ 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, {
|
|
353
|
+
agentContext: string;
|
|
815
354
|
fileContext: {
|
|
816
355
|
currentWorkingDirectory: string;
|
|
817
356
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -839,7 +378,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
839
378
|
content: string;
|
|
840
379
|
}[][] | undefined;
|
|
841
380
|
};
|
|
842
|
-
agentContext: string;
|
|
843
381
|
messageHistory: {
|
|
844
382
|
content: string | ({
|
|
845
383
|
type: "text";
|
|
@@ -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,7 +413,9 @@ 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
|
}, {
|
|
418
|
+
agentContext: string;
|
|
879
419
|
fileContext: {
|
|
880
420
|
currentWorkingDirectory: string;
|
|
881
421
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -903,7 +443,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
903
443
|
content: string;
|
|
904
444
|
}[][] | undefined;
|
|
905
445
|
};
|
|
906
|
-
agentContext: string;
|
|
907
446
|
messageHistory: {
|
|
908
447
|
content: string | ({
|
|
909
448
|
type: "text";
|
|
@@ -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,10 +495,11 @@ 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: {
|
|
502
|
+
agentContext: string;
|
|
962
503
|
fileContext: {
|
|
963
504
|
currentWorkingDirectory: string;
|
|
964
505
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -986,7 +527,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
986
527
|
content: string;
|
|
987
528
|
}[][] | undefined;
|
|
988
529
|
};
|
|
989
|
-
agentContext: string;
|
|
990
530
|
messageHistory: {
|
|
991
531
|
content: string | ({
|
|
992
532
|
type: "text";
|
|
@@ -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,19 +562,21 @@ 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: {
|
|
579
|
+
agentContext: string;
|
|
1038
580
|
fileContext: {
|
|
1039
581
|
currentWorkingDirectory: string;
|
|
1040
582
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -1062,7 +604,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1062
604
|
content: string;
|
|
1063
605
|
}[][] | undefined;
|
|
1064
606
|
};
|
|
1065
|
-
agentContext: string;
|
|
1066
607
|
messageHistory: {
|
|
1067
608
|
content: string | ({
|
|
1068
609
|
type: "text";
|
|
@@ -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]>>;
|
|
@@ -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,7 +1323,9 @@ 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, {
|
|
1328
|
+
agentContext: string;
|
|
1785
1329
|
fileContext: {
|
|
1786
1330
|
currentWorkingDirectory: string;
|
|
1787
1331
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -1809,7 +1353,6 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1809
1353
|
content: string;
|
|
1810
1354
|
}[][] | undefined;
|
|
1811
1355
|
};
|
|
1812
|
-
agentContext: string;
|
|
1813
1356
|
messageHistory: {
|
|
1814
1357
|
content: string | ({
|
|
1815
1358
|
type: "text";
|
|
@@ -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,7 +1388,9 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1845
1388
|
})[];
|
|
1846
1389
|
role: "user" | "assistant";
|
|
1847
1390
|
}[];
|
|
1391
|
+
lastUserPromptIndex?: number | undefined;
|
|
1848
1392
|
}, {
|
|
1393
|
+
agentContext: string;
|
|
1849
1394
|
fileContext: {
|
|
1850
1395
|
currentWorkingDirectory: string;
|
|
1851
1396
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -1873,7 +1418,6 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1873
1418
|
content: string;
|
|
1874
1419
|
}[][] | undefined;
|
|
1875
1420
|
};
|
|
1876
|
-
agentContext: string;
|
|
1877
1421
|
messageHistory: {
|
|
1878
1422
|
content: string | ({
|
|
1879
1423
|
type: "text";
|
|
@@ -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;
|
|
@@ -1940,6 +1485,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1940
1485
|
type: "prompt-response";
|
|
1941
1486
|
promptId: string;
|
|
1942
1487
|
agentState: {
|
|
1488
|
+
agentContext: string;
|
|
1943
1489
|
fileContext: {
|
|
1944
1490
|
currentWorkingDirectory: string;
|
|
1945
1491
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -1967,7 +1513,6 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1967
1513
|
content: string;
|
|
1968
1514
|
}[][] | undefined;
|
|
1969
1515
|
};
|
|
1970
|
-
agentContext: string;
|
|
1971
1516
|
messageHistory: {
|
|
1972
1517
|
content: string | ({
|
|
1973
1518
|
type: "text";
|
|
@@ -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;
|
|
@@ -2018,6 +1564,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
2018
1564
|
type: "prompt-response";
|
|
2019
1565
|
promptId: string;
|
|
2020
1566
|
agentState: {
|
|
1567
|
+
agentContext: string;
|
|
2021
1568
|
fileContext: {
|
|
2022
1569
|
currentWorkingDirectory: string;
|
|
2023
1570
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -2045,7 +1592,6 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
2045
1592
|
content: string;
|
|
2046
1593
|
}[][] | undefined;
|
|
2047
1594
|
};
|
|
2048
|
-
agentContext: string;
|
|
2049
1595
|
messageHistory: {
|
|
2050
1596
|
content: string | ({
|
|
2051
1597
|
type: "text";
|
|
@@ -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;
|
|
@@ -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,7 +2054,9 @@ 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, {
|
|
2059
|
+
agentContext: string;
|
|
2511
2060
|
fileContext: {
|
|
2512
2061
|
currentWorkingDirectory: string;
|
|
2513
2062
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -2535,7 +2084,6 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2535
2084
|
content: string;
|
|
2536
2085
|
}[][] | undefined;
|
|
2537
2086
|
};
|
|
2538
|
-
agentContext: string;
|
|
2539
2087
|
messageHistory: {
|
|
2540
2088
|
content: string | ({
|
|
2541
2089
|
type: "text";
|
|
@@ -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,7 +2119,9 @@ 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
|
}, {
|
|
2124
|
+
agentContext: string;
|
|
2575
2125
|
fileContext: {
|
|
2576
2126
|
currentWorkingDirectory: string;
|
|
2577
2127
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -2599,7 +2149,6 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2599
2149
|
content: string;
|
|
2600
2150
|
}[][] | undefined;
|
|
2601
2151
|
};
|
|
2602
|
-
agentContext: string;
|
|
2603
2152
|
messageHistory: {
|
|
2604
2153
|
content: string | ({
|
|
2605
2154
|
type: "text";
|
|
@@ -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;
|
|
@@ -2666,6 +2216,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2666
2216
|
type: "prompt-response";
|
|
2667
2217
|
promptId: string;
|
|
2668
2218
|
agentState: {
|
|
2219
|
+
agentContext: string;
|
|
2669
2220
|
fileContext: {
|
|
2670
2221
|
currentWorkingDirectory: string;
|
|
2671
2222
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -2693,7 +2244,6 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2693
2244
|
content: string;
|
|
2694
2245
|
}[][] | undefined;
|
|
2695
2246
|
};
|
|
2696
|
-
agentContext: string;
|
|
2697
2247
|
messageHistory: {
|
|
2698
2248
|
content: string | ({
|
|
2699
2249
|
type: "text";
|
|
@@ -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;
|
|
@@ -2744,6 +2295,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2744
2295
|
type: "prompt-response";
|
|
2745
2296
|
promptId: string;
|
|
2746
2297
|
agentState: {
|
|
2298
|
+
agentContext: string;
|
|
2747
2299
|
fileContext: {
|
|
2748
2300
|
currentWorkingDirectory: string;
|
|
2749
2301
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -2771,7 +2323,6 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2771
2323
|
content: string;
|
|
2772
2324
|
}[][] | undefined;
|
|
2773
2325
|
};
|
|
2774
|
-
agentContext: string;
|
|
2775
2326
|
messageHistory: {
|
|
2776
2327
|
content: string | ({
|
|
2777
2328
|
type: "text";
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -2938,12 +2490,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2938
2490
|
result: z.ZodString;
|
|
2939
2491
|
}, "strip", z.ZodTypeAny, {
|
|
2940
2492
|
type: "terminal-command-result";
|
|
2941
|
-
userInputId: string;
|
|
2942
2493
|
result: string;
|
|
2494
|
+
userInputId: string;
|
|
2943
2495
|
}, {
|
|
2944
2496
|
type: "terminal-command-result";
|
|
2945
|
-
userInputId: string;
|
|
2946
2497
|
result: string;
|
|
2498
|
+
userInputId: string;
|
|
2947
2499
|
}>, z.ZodObject<{
|
|
2948
2500
|
type: z.ZodLiteral<"npm-version-status">;
|
|
2949
2501
|
isUpToDate: z.ZodBoolean;
|
|
@@ -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;
|