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
|
@@ -53,678 +53,128 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
53
53
|
type: z.ZodLiteral<"action">;
|
|
54
54
|
txid: z.ZodNumber;
|
|
55
55
|
data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
56
|
-
type: z.ZodLiteral<"
|
|
56
|
+
type: z.ZodLiteral<"prompt">;
|
|
57
|
+
promptId: z.ZodString;
|
|
58
|
+
prompt: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
|
|
57
59
|
fingerprintId: z.ZodString;
|
|
58
60
|
authToken: z.ZodOptional<z.ZodString>;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
type: "text";
|
|
74
|
-
text: string;
|
|
75
|
-
cache_control?: {
|
|
76
|
-
type: "ephemeral";
|
|
77
|
-
} | undefined;
|
|
78
|
-
}, {
|
|
79
|
-
type: "text";
|
|
80
|
-
text: string;
|
|
81
|
-
cache_control?: {
|
|
82
|
-
type: "ephemeral";
|
|
83
|
-
} | undefined;
|
|
84
|
-
}>, z.ZodObject<{
|
|
85
|
-
type: z.ZodLiteral<"tool_use">;
|
|
86
|
-
id: z.ZodString;
|
|
87
|
-
name: z.ZodString;
|
|
88
|
-
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
89
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
90
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
91
|
-
}, "strip", z.ZodTypeAny, {
|
|
92
|
-
type: "ephemeral";
|
|
93
|
-
}, {
|
|
94
|
-
type: "ephemeral";
|
|
95
|
-
}>>;
|
|
96
|
-
}, "strip", z.ZodTypeAny, {
|
|
97
|
-
type: "tool_use";
|
|
98
|
-
name: string;
|
|
99
|
-
id: string;
|
|
100
|
-
input: Record<string, any>;
|
|
101
|
-
cache_control?: {
|
|
102
|
-
type: "ephemeral";
|
|
103
|
-
} | undefined;
|
|
104
|
-
}, {
|
|
105
|
-
type: "tool_use";
|
|
106
|
-
name: string;
|
|
107
|
-
id: string;
|
|
108
|
-
input: Record<string, any>;
|
|
109
|
-
cache_control?: {
|
|
110
|
-
type: "ephemeral";
|
|
111
|
-
} | undefined;
|
|
112
|
-
}>, z.ZodObject<{
|
|
113
|
-
type: z.ZodLiteral<"tool_result">;
|
|
114
|
-
tool_use_id: z.ZodString;
|
|
115
|
-
content: z.ZodString;
|
|
116
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
117
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
61
|
+
costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
|
|
62
|
+
agentState: z.ZodObject<{
|
|
63
|
+
agentContext: z.ZodString;
|
|
64
|
+
fileContext: z.ZodObject<{
|
|
65
|
+
currentWorkingDirectory: z.ZodString;
|
|
66
|
+
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
67
|
+
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
68
|
+
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
69
|
+
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
70
|
+
gitChanges: z.ZodObject<{
|
|
71
|
+
status: z.ZodString;
|
|
72
|
+
diff: z.ZodString;
|
|
73
|
+
diffCached: z.ZodString;
|
|
74
|
+
lastCommitMessages: z.ZodString;
|
|
118
75
|
}, "strip", z.ZodTypeAny, {
|
|
119
|
-
|
|
76
|
+
status: string;
|
|
77
|
+
diff: string;
|
|
78
|
+
diffCached: string;
|
|
79
|
+
lastCommitMessages: string;
|
|
120
80
|
}, {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
type: "ephemeral";
|
|
136
|
-
} | undefined;
|
|
137
|
-
}>, z.ZodObject<{
|
|
138
|
-
type: z.ZodLiteral<"image">;
|
|
139
|
-
source: z.ZodObject<{
|
|
140
|
-
type: z.ZodLiteral<"base64">;
|
|
141
|
-
media_type: z.ZodLiteral<"image/jpeg">;
|
|
142
|
-
data: z.ZodString;
|
|
81
|
+
status: string;
|
|
82
|
+
diff: string;
|
|
83
|
+
diffCached: string;
|
|
84
|
+
lastCommitMessages: string;
|
|
85
|
+
}>;
|
|
86
|
+
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
87
|
+
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
88
|
+
systemInfo: z.ZodObject<{
|
|
89
|
+
platform: z.ZodString;
|
|
90
|
+
shell: z.ZodString;
|
|
91
|
+
nodeVersion: z.ZodString;
|
|
92
|
+
arch: z.ZodString;
|
|
93
|
+
homedir: z.ZodString;
|
|
94
|
+
cpus: z.ZodNumber;
|
|
143
95
|
}, "strip", z.ZodTypeAny, {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
96
|
+
platform: string;
|
|
97
|
+
shell: string;
|
|
98
|
+
nodeVersion: string;
|
|
99
|
+
arch: string;
|
|
100
|
+
homedir: string;
|
|
101
|
+
cpus: number;
|
|
147
102
|
}, {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
103
|
+
platform: string;
|
|
104
|
+
shell: string;
|
|
105
|
+
nodeVersion: string;
|
|
106
|
+
arch: string;
|
|
107
|
+
homedir: string;
|
|
108
|
+
cpus: number;
|
|
151
109
|
}>;
|
|
152
|
-
|
|
153
|
-
|
|
110
|
+
fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
111
|
+
path: z.ZodString;
|
|
112
|
+
content: z.ZodString;
|
|
154
113
|
}, "strip", z.ZodTypeAny, {
|
|
155
|
-
|
|
114
|
+
path: string;
|
|
115
|
+
content: string;
|
|
156
116
|
}, {
|
|
157
|
-
|
|
158
|
-
|
|
117
|
+
path: string;
|
|
118
|
+
content: string;
|
|
119
|
+
}>, "many">, "many">>;
|
|
159
120
|
}, "strip", z.ZodTypeAny, {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
121
|
+
currentWorkingDirectory: string;
|
|
122
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
123
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
124
|
+
knowledgeFiles: Record<string, string>;
|
|
125
|
+
gitChanges: {
|
|
126
|
+
status: string;
|
|
127
|
+
diff: string;
|
|
128
|
+
diffCached: string;
|
|
129
|
+
lastCommitMessages: string;
|
|
165
130
|
};
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
131
|
+
changesSinceLastChat: Record<string, string>;
|
|
132
|
+
shellConfigFiles: Record<string, string>;
|
|
133
|
+
systemInfo: {
|
|
134
|
+
platform: string;
|
|
135
|
+
shell: string;
|
|
136
|
+
nodeVersion: string;
|
|
137
|
+
arch: string;
|
|
138
|
+
homedir: string;
|
|
139
|
+
cpus: number;
|
|
140
|
+
};
|
|
141
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
142
|
+
fileVersions?: {
|
|
143
|
+
path: string;
|
|
144
|
+
content: string;
|
|
145
|
+
}[][] | undefined;
|
|
169
146
|
}, {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
147
|
+
currentWorkingDirectory: string;
|
|
148
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
149
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
150
|
+
knowledgeFiles: Record<string, string>;
|
|
151
|
+
gitChanges: {
|
|
152
|
+
status: string;
|
|
153
|
+
diff: string;
|
|
154
|
+
diffCached: string;
|
|
155
|
+
lastCommitMessages: string;
|
|
175
156
|
};
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
type: "ephemeral";
|
|
186
|
-
} | undefined;
|
|
187
|
-
} | {
|
|
188
|
-
type: "tool_use";
|
|
189
|
-
name: string;
|
|
190
|
-
id: string;
|
|
191
|
-
input: Record<string, any>;
|
|
192
|
-
cache_control?: {
|
|
193
|
-
type: "ephemeral";
|
|
194
|
-
} | undefined;
|
|
195
|
-
} | {
|
|
196
|
-
content: string;
|
|
197
|
-
type: "tool_result";
|
|
198
|
-
tool_use_id: string;
|
|
199
|
-
cache_control?: {
|
|
200
|
-
type: "ephemeral";
|
|
201
|
-
} | undefined;
|
|
202
|
-
} | {
|
|
203
|
-
type: "image";
|
|
204
|
-
source: {
|
|
205
|
-
type: "base64";
|
|
206
|
-
media_type: "image/jpeg";
|
|
207
|
-
data: string;
|
|
157
|
+
changesSinceLastChat: Record<string, string>;
|
|
158
|
+
shellConfigFiles: Record<string, string>;
|
|
159
|
+
systemInfo: {
|
|
160
|
+
platform: string;
|
|
161
|
+
shell: string;
|
|
162
|
+
nodeVersion: string;
|
|
163
|
+
arch: string;
|
|
164
|
+
homedir: string;
|
|
165
|
+
cpus: number;
|
|
208
166
|
};
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
})[];
|
|
213
|
-
role: "user" | "assistant";
|
|
214
|
-
}, {
|
|
215
|
-
content: string | ({
|
|
216
|
-
type: "text";
|
|
217
|
-
text: string;
|
|
218
|
-
cache_control?: {
|
|
219
|
-
type: "ephemeral";
|
|
220
|
-
} | undefined;
|
|
221
|
-
} | {
|
|
222
|
-
type: "tool_use";
|
|
223
|
-
name: string;
|
|
224
|
-
id: string;
|
|
225
|
-
input: Record<string, any>;
|
|
226
|
-
cache_control?: {
|
|
227
|
-
type: "ephemeral";
|
|
228
|
-
} | undefined;
|
|
229
|
-
} | {
|
|
230
|
-
content: string;
|
|
231
|
-
type: "tool_result";
|
|
232
|
-
tool_use_id: string;
|
|
233
|
-
cache_control?: {
|
|
234
|
-
type: "ephemeral";
|
|
235
|
-
} | undefined;
|
|
236
|
-
} | {
|
|
237
|
-
type: "image";
|
|
238
|
-
source: {
|
|
239
|
-
type: "base64";
|
|
240
|
-
media_type: "image/jpeg";
|
|
241
|
-
data: string;
|
|
242
|
-
};
|
|
243
|
-
cache_control?: {
|
|
244
|
-
type: "ephemeral";
|
|
245
|
-
} | undefined;
|
|
246
|
-
})[];
|
|
247
|
-
role: "user" | "assistant";
|
|
248
|
-
}>, "many">;
|
|
249
|
-
fileContext: z.ZodObject<{
|
|
250
|
-
currentWorkingDirectory: z.ZodString;
|
|
251
|
-
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
252
|
-
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
253
|
-
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
254
|
-
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
255
|
-
gitChanges: z.ZodObject<{
|
|
256
|
-
status: z.ZodString;
|
|
257
|
-
diff: z.ZodString;
|
|
258
|
-
diffCached: z.ZodString;
|
|
259
|
-
lastCommitMessages: z.ZodString;
|
|
260
|
-
}, "strip", z.ZodTypeAny, {
|
|
261
|
-
status: string;
|
|
262
|
-
diff: string;
|
|
263
|
-
diffCached: string;
|
|
264
|
-
lastCommitMessages: string;
|
|
265
|
-
}, {
|
|
266
|
-
status: string;
|
|
267
|
-
diff: string;
|
|
268
|
-
diffCached: string;
|
|
269
|
-
lastCommitMessages: string;
|
|
270
|
-
}>;
|
|
271
|
-
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
272
|
-
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
273
|
-
systemInfo: z.ZodObject<{
|
|
274
|
-
platform: z.ZodString;
|
|
275
|
-
shell: z.ZodString;
|
|
276
|
-
nodeVersion: z.ZodString;
|
|
277
|
-
arch: z.ZodString;
|
|
278
|
-
homedir: z.ZodString;
|
|
279
|
-
cpus: z.ZodNumber;
|
|
280
|
-
}, "strip", z.ZodTypeAny, {
|
|
281
|
-
platform: string;
|
|
282
|
-
shell: string;
|
|
283
|
-
nodeVersion: string;
|
|
284
|
-
arch: string;
|
|
285
|
-
homedir: string;
|
|
286
|
-
cpus: number;
|
|
287
|
-
}, {
|
|
288
|
-
platform: string;
|
|
289
|
-
shell: string;
|
|
290
|
-
nodeVersion: string;
|
|
291
|
-
arch: string;
|
|
292
|
-
homedir: string;
|
|
293
|
-
cpus: number;
|
|
294
|
-
}>;
|
|
295
|
-
fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
296
|
-
path: z.ZodString;
|
|
297
|
-
content: z.ZodString;
|
|
298
|
-
}, "strip", z.ZodTypeAny, {
|
|
299
|
-
path: string;
|
|
300
|
-
content: string;
|
|
301
|
-
}, {
|
|
302
|
-
path: string;
|
|
303
|
-
content: string;
|
|
304
|
-
}>, "many">, "many">>;
|
|
305
|
-
}, "strip", z.ZodTypeAny, {
|
|
306
|
-
currentWorkingDirectory: string;
|
|
307
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
308
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
309
|
-
knowledgeFiles: Record<string, string>;
|
|
310
|
-
gitChanges: {
|
|
311
|
-
status: string;
|
|
312
|
-
diff: string;
|
|
313
|
-
diffCached: string;
|
|
314
|
-
lastCommitMessages: string;
|
|
315
|
-
};
|
|
316
|
-
changesSinceLastChat: Record<string, string>;
|
|
317
|
-
shellConfigFiles: Record<string, string>;
|
|
318
|
-
systemInfo: {
|
|
319
|
-
platform: string;
|
|
320
|
-
shell: string;
|
|
321
|
-
nodeVersion: string;
|
|
322
|
-
arch: string;
|
|
323
|
-
homedir: string;
|
|
324
|
-
cpus: number;
|
|
325
|
-
};
|
|
326
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
327
|
-
fileVersions?: {
|
|
328
|
-
path: string;
|
|
329
|
-
content: string;
|
|
330
|
-
}[][] | undefined;
|
|
331
|
-
}, {
|
|
332
|
-
currentWorkingDirectory: string;
|
|
333
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
334
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
335
|
-
knowledgeFiles: Record<string, string>;
|
|
336
|
-
gitChanges: {
|
|
337
|
-
status: string;
|
|
338
|
-
diff: string;
|
|
339
|
-
diffCached: string;
|
|
340
|
-
lastCommitMessages: string;
|
|
341
|
-
};
|
|
342
|
-
changesSinceLastChat: Record<string, string>;
|
|
343
|
-
shellConfigFiles: Record<string, string>;
|
|
344
|
-
systemInfo: {
|
|
345
|
-
platform: string;
|
|
346
|
-
shell: string;
|
|
347
|
-
nodeVersion: string;
|
|
348
|
-
arch: string;
|
|
349
|
-
homedir: string;
|
|
350
|
-
cpus: number;
|
|
351
|
-
};
|
|
352
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
353
|
-
fileVersions?: {
|
|
354
|
-
path: string;
|
|
355
|
-
content: string;
|
|
356
|
-
}[][] | undefined;
|
|
357
|
-
}>;
|
|
358
|
-
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
359
|
-
type: z.ZodEnum<["patch", "file"]>;
|
|
360
|
-
path: z.ZodString;
|
|
361
|
-
content: z.ZodString;
|
|
362
|
-
}, "strip", z.ZodTypeAny, {
|
|
363
|
-
path: string;
|
|
364
|
-
content: string;
|
|
365
|
-
type: "file" | "patch";
|
|
366
|
-
}, {
|
|
367
|
-
path: string;
|
|
368
|
-
content: string;
|
|
369
|
-
type: "file" | "patch";
|
|
370
|
-
}>, "many">;
|
|
371
|
-
costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
|
|
372
|
-
}, "strip", z.ZodTypeAny, {
|
|
373
|
-
type: "user-input";
|
|
374
|
-
fileContext: {
|
|
375
|
-
currentWorkingDirectory: string;
|
|
376
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
377
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
378
|
-
knowledgeFiles: Record<string, string>;
|
|
379
|
-
gitChanges: {
|
|
380
|
-
status: string;
|
|
381
|
-
diff: string;
|
|
382
|
-
diffCached: string;
|
|
383
|
-
lastCommitMessages: string;
|
|
384
|
-
};
|
|
385
|
-
changesSinceLastChat: Record<string, string>;
|
|
386
|
-
shellConfigFiles: Record<string, string>;
|
|
387
|
-
systemInfo: {
|
|
388
|
-
platform: string;
|
|
389
|
-
shell: string;
|
|
390
|
-
nodeVersion: string;
|
|
391
|
-
arch: string;
|
|
392
|
-
homedir: string;
|
|
393
|
-
cpus: number;
|
|
394
|
-
};
|
|
395
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
396
|
-
fileVersions?: {
|
|
397
|
-
path: string;
|
|
398
|
-
content: string;
|
|
399
|
-
}[][] | undefined;
|
|
400
|
-
};
|
|
401
|
-
fingerprintId: string;
|
|
402
|
-
userInputId: string;
|
|
403
|
-
messages: {
|
|
404
|
-
content: string | ({
|
|
405
|
-
type: "text";
|
|
406
|
-
text: string;
|
|
407
|
-
cache_control?: {
|
|
408
|
-
type: "ephemeral";
|
|
409
|
-
} | undefined;
|
|
410
|
-
} | {
|
|
411
|
-
type: "tool_use";
|
|
412
|
-
name: string;
|
|
413
|
-
id: string;
|
|
414
|
-
input: Record<string, any>;
|
|
415
|
-
cache_control?: {
|
|
416
|
-
type: "ephemeral";
|
|
417
|
-
} | undefined;
|
|
418
|
-
} | {
|
|
419
|
-
content: string;
|
|
420
|
-
type: "tool_result";
|
|
421
|
-
tool_use_id: string;
|
|
422
|
-
cache_control?: {
|
|
423
|
-
type: "ephemeral";
|
|
424
|
-
} | undefined;
|
|
425
|
-
} | {
|
|
426
|
-
type: "image";
|
|
427
|
-
source: {
|
|
428
|
-
type: "base64";
|
|
429
|
-
media_type: "image/jpeg";
|
|
430
|
-
data: string;
|
|
431
|
-
};
|
|
432
|
-
cache_control?: {
|
|
433
|
-
type: "ephemeral";
|
|
434
|
-
} | undefined;
|
|
435
|
-
})[];
|
|
436
|
-
role: "user" | "assistant";
|
|
437
|
-
}[];
|
|
438
|
-
changesAlreadyApplied: {
|
|
439
|
-
path: string;
|
|
440
|
-
content: string;
|
|
441
|
-
type: "file" | "patch";
|
|
442
|
-
}[];
|
|
443
|
-
costMode: "max" | "lite" | "normal";
|
|
444
|
-
authToken?: string | undefined;
|
|
445
|
-
}, {
|
|
446
|
-
type: "user-input";
|
|
447
|
-
fileContext: {
|
|
448
|
-
currentWorkingDirectory: string;
|
|
449
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
450
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
451
|
-
knowledgeFiles: Record<string, string>;
|
|
452
|
-
gitChanges: {
|
|
453
|
-
status: string;
|
|
454
|
-
diff: string;
|
|
455
|
-
diffCached: string;
|
|
456
|
-
lastCommitMessages: string;
|
|
457
|
-
};
|
|
458
|
-
changesSinceLastChat: Record<string, string>;
|
|
459
|
-
shellConfigFiles: Record<string, string>;
|
|
460
|
-
systemInfo: {
|
|
461
|
-
platform: string;
|
|
462
|
-
shell: string;
|
|
463
|
-
nodeVersion: string;
|
|
464
|
-
arch: string;
|
|
465
|
-
homedir: string;
|
|
466
|
-
cpus: number;
|
|
467
|
-
};
|
|
468
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
469
|
-
fileVersions?: {
|
|
470
|
-
path: string;
|
|
471
|
-
content: string;
|
|
472
|
-
}[][] | undefined;
|
|
473
|
-
};
|
|
474
|
-
fingerprintId: string;
|
|
475
|
-
userInputId: string;
|
|
476
|
-
messages: {
|
|
477
|
-
content: string | ({
|
|
478
|
-
type: "text";
|
|
479
|
-
text: string;
|
|
480
|
-
cache_control?: {
|
|
481
|
-
type: "ephemeral";
|
|
482
|
-
} | undefined;
|
|
483
|
-
} | {
|
|
484
|
-
type: "tool_use";
|
|
485
|
-
name: string;
|
|
486
|
-
id: string;
|
|
487
|
-
input: Record<string, any>;
|
|
488
|
-
cache_control?: {
|
|
489
|
-
type: "ephemeral";
|
|
490
|
-
} | undefined;
|
|
491
|
-
} | {
|
|
492
|
-
content: string;
|
|
493
|
-
type: "tool_result";
|
|
494
|
-
tool_use_id: string;
|
|
495
|
-
cache_control?: {
|
|
496
|
-
type: "ephemeral";
|
|
497
|
-
} | undefined;
|
|
498
|
-
} | {
|
|
499
|
-
type: "image";
|
|
500
|
-
source: {
|
|
501
|
-
type: "base64";
|
|
502
|
-
media_type: "image/jpeg";
|
|
503
|
-
data: string;
|
|
504
|
-
};
|
|
505
|
-
cache_control?: {
|
|
506
|
-
type: "ephemeral";
|
|
507
|
-
} | undefined;
|
|
508
|
-
})[];
|
|
509
|
-
role: "user" | "assistant";
|
|
510
|
-
}[];
|
|
511
|
-
changesAlreadyApplied: {
|
|
512
|
-
path: string;
|
|
513
|
-
content: string;
|
|
514
|
-
type: "file" | "patch";
|
|
515
|
-
}[];
|
|
516
|
-
authToken?: string | undefined;
|
|
517
|
-
costMode?: "max" | "lite" | "normal" | undefined;
|
|
518
|
-
}>, z.ZodObject<{
|
|
519
|
-
type: z.ZodLiteral<"prompt">;
|
|
520
|
-
promptId: z.ZodString;
|
|
521
|
-
prompt: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
|
|
522
|
-
fingerprintId: z.ZodString;
|
|
523
|
-
authToken: z.ZodOptional<z.ZodString>;
|
|
524
|
-
costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
|
|
525
|
-
agentState: z.ZodObject<{
|
|
526
|
-
agentContext: z.ZodString;
|
|
527
|
-
fileContext: z.ZodObject<{
|
|
528
|
-
currentWorkingDirectory: z.ZodString;
|
|
529
|
-
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
530
|
-
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
531
|
-
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
532
|
-
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
533
|
-
gitChanges: z.ZodObject<{
|
|
534
|
-
status: z.ZodString;
|
|
535
|
-
diff: z.ZodString;
|
|
536
|
-
diffCached: z.ZodString;
|
|
537
|
-
lastCommitMessages: z.ZodString;
|
|
538
|
-
}, "strip", z.ZodTypeAny, {
|
|
539
|
-
status: string;
|
|
540
|
-
diff: string;
|
|
541
|
-
diffCached: string;
|
|
542
|
-
lastCommitMessages: string;
|
|
543
|
-
}, {
|
|
544
|
-
status: string;
|
|
545
|
-
diff: string;
|
|
546
|
-
diffCached: string;
|
|
547
|
-
lastCommitMessages: string;
|
|
548
|
-
}>;
|
|
549
|
-
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
550
|
-
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
551
|
-
systemInfo: z.ZodObject<{
|
|
552
|
-
platform: z.ZodString;
|
|
553
|
-
shell: z.ZodString;
|
|
554
|
-
nodeVersion: z.ZodString;
|
|
555
|
-
arch: z.ZodString;
|
|
556
|
-
homedir: z.ZodString;
|
|
557
|
-
cpus: z.ZodNumber;
|
|
558
|
-
}, "strip", z.ZodTypeAny, {
|
|
559
|
-
platform: string;
|
|
560
|
-
shell: string;
|
|
561
|
-
nodeVersion: string;
|
|
562
|
-
arch: string;
|
|
563
|
-
homedir: string;
|
|
564
|
-
cpus: number;
|
|
565
|
-
}, {
|
|
566
|
-
platform: string;
|
|
567
|
-
shell: string;
|
|
568
|
-
nodeVersion: string;
|
|
569
|
-
arch: string;
|
|
570
|
-
homedir: string;
|
|
571
|
-
cpus: number;
|
|
572
|
-
}>;
|
|
573
|
-
fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
574
|
-
path: z.ZodString;
|
|
575
|
-
content: z.ZodString;
|
|
576
|
-
}, "strip", z.ZodTypeAny, {
|
|
577
|
-
path: string;
|
|
578
|
-
content: string;
|
|
579
|
-
}, {
|
|
580
|
-
path: string;
|
|
581
|
-
content: string;
|
|
582
|
-
}>, "many">, "many">>;
|
|
583
|
-
}, "strip", z.ZodTypeAny, {
|
|
584
|
-
currentWorkingDirectory: string;
|
|
585
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
586
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
587
|
-
knowledgeFiles: Record<string, string>;
|
|
588
|
-
gitChanges: {
|
|
589
|
-
status: string;
|
|
590
|
-
diff: string;
|
|
591
|
-
diffCached: string;
|
|
592
|
-
lastCommitMessages: string;
|
|
593
|
-
};
|
|
594
|
-
changesSinceLastChat: Record<string, string>;
|
|
595
|
-
shellConfigFiles: Record<string, string>;
|
|
596
|
-
systemInfo: {
|
|
597
|
-
platform: string;
|
|
598
|
-
shell: string;
|
|
599
|
-
nodeVersion: string;
|
|
600
|
-
arch: string;
|
|
601
|
-
homedir: string;
|
|
602
|
-
cpus: number;
|
|
603
|
-
};
|
|
604
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
605
|
-
fileVersions?: {
|
|
606
|
-
path: string;
|
|
607
|
-
content: string;
|
|
608
|
-
}[][] | undefined;
|
|
609
|
-
}, {
|
|
610
|
-
currentWorkingDirectory: string;
|
|
611
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
612
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
613
|
-
knowledgeFiles: Record<string, string>;
|
|
614
|
-
gitChanges: {
|
|
615
|
-
status: string;
|
|
616
|
-
diff: string;
|
|
617
|
-
diffCached: string;
|
|
618
|
-
lastCommitMessages: string;
|
|
619
|
-
};
|
|
620
|
-
changesSinceLastChat: Record<string, string>;
|
|
621
|
-
shellConfigFiles: Record<string, string>;
|
|
622
|
-
systemInfo: {
|
|
623
|
-
platform: string;
|
|
624
|
-
shell: string;
|
|
625
|
-
nodeVersion: string;
|
|
626
|
-
arch: string;
|
|
627
|
-
homedir: string;
|
|
628
|
-
cpus: number;
|
|
629
|
-
};
|
|
630
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
631
|
-
fileVersions?: {
|
|
632
|
-
path: string;
|
|
633
|
-
content: string;
|
|
634
|
-
}[][] | undefined;
|
|
635
|
-
}>;
|
|
636
|
-
messageHistory: z.ZodArray<z.ZodObject<{
|
|
637
|
-
role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
|
|
638
|
-
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
639
|
-
type: z.ZodLiteral<"text">;
|
|
640
|
-
text: z.ZodString;
|
|
641
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
642
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
643
|
-
}, "strip", z.ZodTypeAny, {
|
|
644
|
-
type: "ephemeral";
|
|
645
|
-
}, {
|
|
646
|
-
type: "ephemeral";
|
|
647
|
-
}>>;
|
|
648
|
-
}, "strip", z.ZodTypeAny, {
|
|
649
|
-
type: "text";
|
|
650
|
-
text: string;
|
|
651
|
-
cache_control?: {
|
|
652
|
-
type: "ephemeral";
|
|
653
|
-
} | undefined;
|
|
654
|
-
}, {
|
|
655
|
-
type: "text";
|
|
656
|
-
text: string;
|
|
657
|
-
cache_control?: {
|
|
658
|
-
type: "ephemeral";
|
|
659
|
-
} | undefined;
|
|
660
|
-
}>, z.ZodObject<{
|
|
661
|
-
type: z.ZodLiteral<"tool_use">;
|
|
662
|
-
id: z.ZodString;
|
|
663
|
-
name: z.ZodString;
|
|
664
|
-
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
665
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
666
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
667
|
-
}, "strip", z.ZodTypeAny, {
|
|
668
|
-
type: "ephemeral";
|
|
669
|
-
}, {
|
|
670
|
-
type: "ephemeral";
|
|
671
|
-
}>>;
|
|
672
|
-
}, "strip", z.ZodTypeAny, {
|
|
673
|
-
type: "tool_use";
|
|
674
|
-
name: string;
|
|
675
|
-
id: string;
|
|
676
|
-
input: Record<string, any>;
|
|
677
|
-
cache_control?: {
|
|
678
|
-
type: "ephemeral";
|
|
679
|
-
} | undefined;
|
|
680
|
-
}, {
|
|
681
|
-
type: "tool_use";
|
|
682
|
-
name: string;
|
|
683
|
-
id: string;
|
|
684
|
-
input: Record<string, any>;
|
|
685
|
-
cache_control?: {
|
|
686
|
-
type: "ephemeral";
|
|
687
|
-
} | undefined;
|
|
688
|
-
}>, z.ZodObject<{
|
|
689
|
-
type: z.ZodLiteral<"tool_result">;
|
|
690
|
-
tool_use_id: z.ZodString;
|
|
691
|
-
content: z.ZodString;
|
|
692
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
693
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
694
|
-
}, "strip", z.ZodTypeAny, {
|
|
695
|
-
type: "ephemeral";
|
|
696
|
-
}, {
|
|
697
|
-
type: "ephemeral";
|
|
698
|
-
}>>;
|
|
699
|
-
}, "strip", z.ZodTypeAny, {
|
|
700
|
-
content: string;
|
|
701
|
-
type: "tool_result";
|
|
702
|
-
tool_use_id: string;
|
|
703
|
-
cache_control?: {
|
|
704
|
-
type: "ephemeral";
|
|
705
|
-
} | undefined;
|
|
706
|
-
}, {
|
|
167
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
168
|
+
fileVersions?: {
|
|
169
|
+
path: string;
|
|
707
170
|
content: string;
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
source: z.ZodObject<{
|
|
716
|
-
type: z.ZodLiteral<"base64">;
|
|
717
|
-
media_type: z.ZodLiteral<"image/jpeg">;
|
|
718
|
-
data: z.ZodString;
|
|
719
|
-
}, "strip", z.ZodTypeAny, {
|
|
720
|
-
type: "base64";
|
|
721
|
-
media_type: "image/jpeg";
|
|
722
|
-
data: string;
|
|
723
|
-
}, {
|
|
724
|
-
type: "base64";
|
|
725
|
-
media_type: "image/jpeg";
|
|
726
|
-
data: string;
|
|
727
|
-
}>;
|
|
171
|
+
}[][] | undefined;
|
|
172
|
+
}>;
|
|
173
|
+
messageHistory: z.ZodArray<z.ZodObject<{
|
|
174
|
+
role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
|
|
175
|
+
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
176
|
+
type: z.ZodLiteral<"text">;
|
|
177
|
+
text: z.ZodString;
|
|
728
178
|
cache_control: z.ZodOptional<z.ZodObject<{
|
|
729
179
|
type: z.ZodLiteral<"ephemeral">;
|
|
730
180
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -733,196 +183,38 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
733
183
|
type: "ephemeral";
|
|
734
184
|
}>>;
|
|
735
185
|
}, "strip", z.ZodTypeAny, {
|
|
736
|
-
type: "image";
|
|
737
|
-
source: {
|
|
738
|
-
type: "base64";
|
|
739
|
-
media_type: "image/jpeg";
|
|
740
|
-
data: string;
|
|
741
|
-
};
|
|
742
|
-
cache_control?: {
|
|
743
|
-
type: "ephemeral";
|
|
744
|
-
} | undefined;
|
|
745
|
-
}, {
|
|
746
|
-
type: "image";
|
|
747
|
-
source: {
|
|
748
|
-
type: "base64";
|
|
749
|
-
media_type: "image/jpeg";
|
|
750
|
-
data: string;
|
|
751
|
-
};
|
|
752
|
-
cache_control?: {
|
|
753
|
-
type: "ephemeral";
|
|
754
|
-
} | undefined;
|
|
755
|
-
}>]>, "many">]>;
|
|
756
|
-
}, "strip", z.ZodTypeAny, {
|
|
757
|
-
content: string | ({
|
|
758
|
-
type: "text";
|
|
759
|
-
text: string;
|
|
760
|
-
cache_control?: {
|
|
761
|
-
type: "ephemeral";
|
|
762
|
-
} | undefined;
|
|
763
|
-
} | {
|
|
764
|
-
type: "tool_use";
|
|
765
|
-
name: string;
|
|
766
|
-
id: string;
|
|
767
|
-
input: Record<string, any>;
|
|
768
|
-
cache_control?: {
|
|
769
|
-
type: "ephemeral";
|
|
770
|
-
} | undefined;
|
|
771
|
-
} | {
|
|
772
|
-
content: string;
|
|
773
|
-
type: "tool_result";
|
|
774
|
-
tool_use_id: string;
|
|
775
|
-
cache_control?: {
|
|
776
|
-
type: "ephemeral";
|
|
777
|
-
} | undefined;
|
|
778
|
-
} | {
|
|
779
|
-
type: "image";
|
|
780
|
-
source: {
|
|
781
|
-
type: "base64";
|
|
782
|
-
media_type: "image/jpeg";
|
|
783
|
-
data: string;
|
|
784
|
-
};
|
|
785
|
-
cache_control?: {
|
|
786
|
-
type: "ephemeral";
|
|
787
|
-
} | undefined;
|
|
788
|
-
})[];
|
|
789
|
-
role: "user" | "assistant";
|
|
790
|
-
}, {
|
|
791
|
-
content: string | ({
|
|
792
186
|
type: "text";
|
|
793
187
|
text: string;
|
|
794
188
|
cache_control?: {
|
|
795
189
|
type: "ephemeral";
|
|
796
190
|
} | undefined;
|
|
797
|
-
}
|
|
798
|
-
type: "tool_use";
|
|
799
|
-
name: string;
|
|
800
|
-
id: string;
|
|
801
|
-
input: Record<string, any>;
|
|
802
|
-
cache_control?: {
|
|
803
|
-
type: "ephemeral";
|
|
804
|
-
} | undefined;
|
|
805
|
-
} | {
|
|
806
|
-
content: string;
|
|
807
|
-
type: "tool_result";
|
|
808
|
-
tool_use_id: string;
|
|
809
|
-
cache_control?: {
|
|
810
|
-
type: "ephemeral";
|
|
811
|
-
} | undefined;
|
|
812
|
-
} | {
|
|
813
|
-
type: "image";
|
|
814
|
-
source: {
|
|
815
|
-
type: "base64";
|
|
816
|
-
media_type: "image/jpeg";
|
|
817
|
-
data: string;
|
|
818
|
-
};
|
|
819
|
-
cache_control?: {
|
|
820
|
-
type: "ephemeral";
|
|
821
|
-
} | undefined;
|
|
822
|
-
})[];
|
|
823
|
-
role: "user" | "assistant";
|
|
824
|
-
}>, "many">;
|
|
825
|
-
}, "strip", z.ZodTypeAny, {
|
|
826
|
-
agentContext: string;
|
|
827
|
-
fileContext: {
|
|
828
|
-
currentWorkingDirectory: string;
|
|
829
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
830
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
831
|
-
knowledgeFiles: Record<string, string>;
|
|
832
|
-
gitChanges: {
|
|
833
|
-
status: string;
|
|
834
|
-
diff: string;
|
|
835
|
-
diffCached: string;
|
|
836
|
-
lastCommitMessages: string;
|
|
837
|
-
};
|
|
838
|
-
changesSinceLastChat: Record<string, string>;
|
|
839
|
-
shellConfigFiles: Record<string, string>;
|
|
840
|
-
systemInfo: {
|
|
841
|
-
platform: string;
|
|
842
|
-
shell: string;
|
|
843
|
-
nodeVersion: string;
|
|
844
|
-
arch: string;
|
|
845
|
-
homedir: string;
|
|
846
|
-
cpus: number;
|
|
847
|
-
};
|
|
848
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
849
|
-
fileVersions?: {
|
|
850
|
-
path: string;
|
|
851
|
-
content: string;
|
|
852
|
-
}[][] | undefined;
|
|
853
|
-
};
|
|
854
|
-
messageHistory: {
|
|
855
|
-
content: string | ({
|
|
191
|
+
}, {
|
|
856
192
|
type: "text";
|
|
857
193
|
text: string;
|
|
858
194
|
cache_control?: {
|
|
859
195
|
type: "ephemeral";
|
|
860
196
|
} | undefined;
|
|
861
|
-
}
|
|
862
|
-
type: "tool_use"
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
input:
|
|
866
|
-
cache_control
|
|
867
|
-
type: "ephemeral"
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
source: {
|
|
879
|
-
type: "base64";
|
|
880
|
-
media_type: "image/jpeg";
|
|
881
|
-
data: string;
|
|
882
|
-
};
|
|
883
|
-
cache_control?: {
|
|
884
|
-
type: "ephemeral";
|
|
885
|
-
} | undefined;
|
|
886
|
-
})[];
|
|
887
|
-
role: "user" | "assistant";
|
|
888
|
-
}[];
|
|
889
|
-
}, {
|
|
890
|
-
agentContext: string;
|
|
891
|
-
fileContext: {
|
|
892
|
-
currentWorkingDirectory: string;
|
|
893
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
894
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
895
|
-
knowledgeFiles: Record<string, string>;
|
|
896
|
-
gitChanges: {
|
|
897
|
-
status: string;
|
|
898
|
-
diff: string;
|
|
899
|
-
diffCached: string;
|
|
900
|
-
lastCommitMessages: string;
|
|
901
|
-
};
|
|
902
|
-
changesSinceLastChat: Record<string, string>;
|
|
903
|
-
shellConfigFiles: Record<string, string>;
|
|
904
|
-
systemInfo: {
|
|
905
|
-
platform: string;
|
|
906
|
-
shell: string;
|
|
907
|
-
nodeVersion: string;
|
|
908
|
-
arch: string;
|
|
909
|
-
homedir: string;
|
|
910
|
-
cpus: number;
|
|
911
|
-
};
|
|
912
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
913
|
-
fileVersions?: {
|
|
914
|
-
path: string;
|
|
915
|
-
content: string;
|
|
916
|
-
}[][] | undefined;
|
|
917
|
-
};
|
|
918
|
-
messageHistory: {
|
|
919
|
-
content: string | ({
|
|
920
|
-
type: "text";
|
|
921
|
-
text: string;
|
|
197
|
+
}>, z.ZodObject<{
|
|
198
|
+
type: z.ZodLiteral<"tool_use">;
|
|
199
|
+
id: z.ZodString;
|
|
200
|
+
name: z.ZodString;
|
|
201
|
+
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
202
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
203
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
204
|
+
}, "strip", z.ZodTypeAny, {
|
|
205
|
+
type: "ephemeral";
|
|
206
|
+
}, {
|
|
207
|
+
type: "ephemeral";
|
|
208
|
+
}>>;
|
|
209
|
+
}, "strip", z.ZodTypeAny, {
|
|
210
|
+
type: "tool_use";
|
|
211
|
+
name: string;
|
|
212
|
+
id: string;
|
|
213
|
+
input: Record<string, any>;
|
|
922
214
|
cache_control?: {
|
|
923
215
|
type: "ephemeral";
|
|
924
216
|
} | undefined;
|
|
925
|
-
}
|
|
217
|
+
}, {
|
|
926
218
|
type: "tool_use";
|
|
927
219
|
name: string;
|
|
928
220
|
id: string;
|
|
@@ -930,14 +222,54 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
930
222
|
cache_control?: {
|
|
931
223
|
type: "ephemeral";
|
|
932
224
|
} | undefined;
|
|
933
|
-
}
|
|
225
|
+
}>, z.ZodObject<{
|
|
226
|
+
type: z.ZodLiteral<"tool_result">;
|
|
227
|
+
tool_use_id: z.ZodString;
|
|
228
|
+
content: z.ZodString;
|
|
229
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
231
|
+
}, "strip", z.ZodTypeAny, {
|
|
232
|
+
type: "ephemeral";
|
|
233
|
+
}, {
|
|
234
|
+
type: "ephemeral";
|
|
235
|
+
}>>;
|
|
236
|
+
}, "strip", z.ZodTypeAny, {
|
|
237
|
+
type: "tool_result";
|
|
934
238
|
content: string;
|
|
239
|
+
tool_use_id: string;
|
|
240
|
+
cache_control?: {
|
|
241
|
+
type: "ephemeral";
|
|
242
|
+
} | undefined;
|
|
243
|
+
}, {
|
|
935
244
|
type: "tool_result";
|
|
245
|
+
content: string;
|
|
936
246
|
tool_use_id: string;
|
|
937
247
|
cache_control?: {
|
|
938
248
|
type: "ephemeral";
|
|
939
249
|
} | undefined;
|
|
940
|
-
}
|
|
250
|
+
}>, z.ZodObject<{
|
|
251
|
+
type: z.ZodLiteral<"image">;
|
|
252
|
+
source: z.ZodObject<{
|
|
253
|
+
type: z.ZodLiteral<"base64">;
|
|
254
|
+
media_type: z.ZodLiteral<"image/jpeg">;
|
|
255
|
+
data: z.ZodString;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
type: "base64";
|
|
258
|
+
media_type: "image/jpeg";
|
|
259
|
+
data: string;
|
|
260
|
+
}, {
|
|
261
|
+
type: "base64";
|
|
262
|
+
media_type: "image/jpeg";
|
|
263
|
+
data: string;
|
|
264
|
+
}>;
|
|
265
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
266
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
267
|
+
}, "strip", z.ZodTypeAny, {
|
|
268
|
+
type: "ephemeral";
|
|
269
|
+
}, {
|
|
270
|
+
type: "ephemeral";
|
|
271
|
+
}>>;
|
|
272
|
+
}, "strip", z.ZodTypeAny, {
|
|
941
273
|
type: "image";
|
|
942
274
|
source: {
|
|
943
275
|
type: "base64";
|
|
@@ -947,58 +279,18 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
947
279
|
cache_control?: {
|
|
948
280
|
type: "ephemeral";
|
|
949
281
|
} | undefined;
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
}, {
|
|
963
|
-
name: string;
|
|
964
|
-
id: string;
|
|
965
|
-
result: string;
|
|
966
|
-
}>, "many">;
|
|
967
|
-
}, "strip", z.ZodTypeAny, {
|
|
968
|
-
type: "prompt";
|
|
969
|
-
fingerprintId: string;
|
|
970
|
-
costMode: "max" | "lite" | "normal";
|
|
971
|
-
promptId: string;
|
|
972
|
-
agentState: {
|
|
973
|
-
agentContext: string;
|
|
974
|
-
fileContext: {
|
|
975
|
-
currentWorkingDirectory: string;
|
|
976
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
977
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
978
|
-
knowledgeFiles: Record<string, string>;
|
|
979
|
-
gitChanges: {
|
|
980
|
-
status: string;
|
|
981
|
-
diff: string;
|
|
982
|
-
diffCached: string;
|
|
983
|
-
lastCommitMessages: string;
|
|
984
|
-
};
|
|
985
|
-
changesSinceLastChat: Record<string, string>;
|
|
986
|
-
shellConfigFiles: Record<string, string>;
|
|
987
|
-
systemInfo: {
|
|
988
|
-
platform: string;
|
|
989
|
-
shell: string;
|
|
990
|
-
nodeVersion: string;
|
|
991
|
-
arch: string;
|
|
992
|
-
homedir: string;
|
|
993
|
-
cpus: number;
|
|
994
|
-
};
|
|
995
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
996
|
-
fileVersions?: {
|
|
997
|
-
path: string;
|
|
998
|
-
content: string;
|
|
999
|
-
}[][] | undefined;
|
|
1000
|
-
};
|
|
1001
|
-
messageHistory: {
|
|
282
|
+
}, {
|
|
283
|
+
type: "image";
|
|
284
|
+
source: {
|
|
285
|
+
type: "base64";
|
|
286
|
+
media_type: "image/jpeg";
|
|
287
|
+
data: string;
|
|
288
|
+
};
|
|
289
|
+
cache_control?: {
|
|
290
|
+
type: "ephemeral";
|
|
291
|
+
} | undefined;
|
|
292
|
+
}>]>, "many">]>;
|
|
293
|
+
}, "strip", z.ZodTypeAny, {
|
|
1002
294
|
content: string | ({
|
|
1003
295
|
type: "text";
|
|
1004
296
|
text: string;
|
|
@@ -1014,8 +306,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1014
306
|
type: "ephemeral";
|
|
1015
307
|
} | undefined;
|
|
1016
308
|
} | {
|
|
1017
|
-
content: string;
|
|
1018
309
|
type: "tool_result";
|
|
310
|
+
content: string;
|
|
1019
311
|
tool_use_id: string;
|
|
1020
312
|
cache_control?: {
|
|
1021
313
|
type: "ephemeral";
|
|
@@ -1032,49 +324,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1032
324
|
} | undefined;
|
|
1033
325
|
})[];
|
|
1034
326
|
role: "user" | "assistant";
|
|
1035
|
-
}
|
|
1036
|
-
};
|
|
1037
|
-
toolResults: {
|
|
1038
|
-
name: string;
|
|
1039
|
-
id: string;
|
|
1040
|
-
result: string;
|
|
1041
|
-
}[];
|
|
1042
|
-
authToken?: string | undefined;
|
|
1043
|
-
prompt?: string | undefined;
|
|
1044
|
-
}, {
|
|
1045
|
-
type: "prompt";
|
|
1046
|
-
fingerprintId: string;
|
|
1047
|
-
promptId: string;
|
|
1048
|
-
agentState: {
|
|
1049
|
-
agentContext: string;
|
|
1050
|
-
fileContext: {
|
|
1051
|
-
currentWorkingDirectory: string;
|
|
1052
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
1053
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1054
|
-
knowledgeFiles: Record<string, string>;
|
|
1055
|
-
gitChanges: {
|
|
1056
|
-
status: string;
|
|
1057
|
-
diff: string;
|
|
1058
|
-
diffCached: string;
|
|
1059
|
-
lastCommitMessages: string;
|
|
1060
|
-
};
|
|
1061
|
-
changesSinceLastChat: Record<string, string>;
|
|
1062
|
-
shellConfigFiles: Record<string, string>;
|
|
1063
|
-
systemInfo: {
|
|
1064
|
-
platform: string;
|
|
1065
|
-
shell: string;
|
|
1066
|
-
nodeVersion: string;
|
|
1067
|
-
arch: string;
|
|
1068
|
-
homedir: string;
|
|
1069
|
-
cpus: number;
|
|
1070
|
-
};
|
|
1071
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1072
|
-
fileVersions?: {
|
|
1073
|
-
path: string;
|
|
1074
|
-
content: string;
|
|
1075
|
-
}[][] | undefined;
|
|
1076
|
-
};
|
|
1077
|
-
messageHistory: {
|
|
327
|
+
}, {
|
|
1078
328
|
content: string | ({
|
|
1079
329
|
type: "text";
|
|
1080
330
|
text: string;
|
|
@@ -1090,8 +340,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1090
340
|
type: "ephemeral";
|
|
1091
341
|
} | undefined;
|
|
1092
342
|
} | {
|
|
1093
|
-
content: string;
|
|
1094
343
|
type: "tool_result";
|
|
344
|
+
content: string;
|
|
1095
345
|
tool_use_id: string;
|
|
1096
346
|
cache_control?: {
|
|
1097
347
|
type: "ephemeral";
|
|
@@ -1106,301 +356,159 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1106
356
|
cache_control?: {
|
|
1107
357
|
type: "ephemeral";
|
|
1108
358
|
} | undefined;
|
|
1109
|
-
})[];
|
|
1110
|
-
role: "user" | "assistant";
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
toolResults: {
|
|
1114
|
-
name: string;
|
|
1115
|
-
id: string;
|
|
1116
|
-
result: string;
|
|
1117
|
-
}[];
|
|
1118
|
-
authToken?: string | undefined;
|
|
1119
|
-
costMode?: "max" | "lite" | "normal" | undefined;
|
|
1120
|
-
prompt?: string | undefined;
|
|
1121
|
-
}>, z.ZodObject<{
|
|
1122
|
-
type: z.ZodLiteral<"read-files-response">;
|
|
1123
|
-
files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1124
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
1125
|
-
}, "strip", z.ZodTypeAny, {
|
|
1126
|
-
type: "read-files-response";
|
|
1127
|
-
files: Record<string, string | null>;
|
|
1128
|
-
requestId?: string | undefined;
|
|
1129
|
-
}, {
|
|
1130
|
-
type: "read-files-response";
|
|
1131
|
-
files: Record<string, string | null>;
|
|
1132
|
-
requestId?: string | undefined;
|
|
1133
|
-
}>, z.ZodObject<{
|
|
1134
|
-
type: z.ZodLiteral<"init">;
|
|
1135
|
-
fingerprintId: z.ZodString;
|
|
1136
|
-
authToken: z.ZodOptional<z.ZodString>;
|
|
1137
|
-
fileContext: z.ZodObject<{
|
|
1138
|
-
currentWorkingDirectory: z.ZodString;
|
|
1139
|
-
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
1140
|
-
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1141
|
-
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1142
|
-
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1143
|
-
gitChanges: z.ZodObject<{
|
|
1144
|
-
status: z.ZodString;
|
|
1145
|
-
diff: z.ZodString;
|
|
1146
|
-
diffCached: z.ZodString;
|
|
1147
|
-
lastCommitMessages: z.ZodString;
|
|
1148
|
-
}, "strip", z.ZodTypeAny, {
|
|
1149
|
-
status: string;
|
|
1150
|
-
diff: string;
|
|
1151
|
-
diffCached: string;
|
|
1152
|
-
lastCommitMessages: string;
|
|
1153
|
-
}, {
|
|
1154
|
-
status: string;
|
|
1155
|
-
diff: string;
|
|
1156
|
-
diffCached: string;
|
|
1157
|
-
lastCommitMessages: string;
|
|
1158
|
-
}>;
|
|
1159
|
-
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1160
|
-
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1161
|
-
systemInfo: z.ZodObject<{
|
|
1162
|
-
platform: z.ZodString;
|
|
1163
|
-
shell: z.ZodString;
|
|
1164
|
-
nodeVersion: z.ZodString;
|
|
1165
|
-
arch: z.ZodString;
|
|
1166
|
-
homedir: z.ZodString;
|
|
1167
|
-
cpus: z.ZodNumber;
|
|
1168
|
-
}, "strip", z.ZodTypeAny, {
|
|
1169
|
-
platform: string;
|
|
1170
|
-
shell: string;
|
|
1171
|
-
nodeVersion: string;
|
|
1172
|
-
arch: string;
|
|
1173
|
-
homedir: string;
|
|
1174
|
-
cpus: number;
|
|
1175
|
-
}, {
|
|
1176
|
-
platform: string;
|
|
1177
|
-
shell: string;
|
|
1178
|
-
nodeVersion: string;
|
|
1179
|
-
arch: string;
|
|
1180
|
-
homedir: string;
|
|
1181
|
-
cpus: number;
|
|
1182
|
-
}>;
|
|
1183
|
-
fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
1184
|
-
path: z.ZodString;
|
|
1185
|
-
content: z.ZodString;
|
|
1186
|
-
}, "strip", z.ZodTypeAny, {
|
|
1187
|
-
path: string;
|
|
1188
|
-
content: string;
|
|
1189
|
-
}, {
|
|
1190
|
-
path: string;
|
|
1191
|
-
content: string;
|
|
1192
|
-
}>, "many">, "many">>;
|
|
359
|
+
})[];
|
|
360
|
+
role: "user" | "assistant";
|
|
361
|
+
}>, "many">;
|
|
362
|
+
lastUserPromptIndex: z.ZodOptional<z.ZodNumber>;
|
|
1193
363
|
}, "strip", z.ZodTypeAny, {
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
364
|
+
agentContext: string;
|
|
365
|
+
fileContext: {
|
|
366
|
+
currentWorkingDirectory: string;
|
|
367
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
368
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
369
|
+
knowledgeFiles: Record<string, string>;
|
|
370
|
+
gitChanges: {
|
|
371
|
+
status: string;
|
|
372
|
+
diff: string;
|
|
373
|
+
diffCached: string;
|
|
374
|
+
lastCommitMessages: string;
|
|
375
|
+
};
|
|
376
|
+
changesSinceLastChat: Record<string, string>;
|
|
377
|
+
shellConfigFiles: Record<string, string>;
|
|
378
|
+
systemInfo: {
|
|
379
|
+
platform: string;
|
|
380
|
+
shell: string;
|
|
381
|
+
nodeVersion: string;
|
|
382
|
+
arch: string;
|
|
383
|
+
homedir: string;
|
|
384
|
+
cpus: number;
|
|
385
|
+
};
|
|
386
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
387
|
+
fileVersions?: {
|
|
388
|
+
path: string;
|
|
389
|
+
content: string;
|
|
390
|
+
}[][] | undefined;
|
|
1213
391
|
};
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
392
|
+
messageHistory: {
|
|
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
|
+
type: "tool_result";
|
|
409
|
+
content: string;
|
|
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
|
+
lastUserPromptIndex?: number | undefined;
|
|
1219
428
|
}, {
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
shellConfigFiles: Record<string, string>;
|
|
1232
|
-
systemInfo: {
|
|
1233
|
-
platform: string;
|
|
1234
|
-
shell: string;
|
|
1235
|
-
nodeVersion: string;
|
|
1236
|
-
arch: string;
|
|
1237
|
-
homedir: string;
|
|
1238
|
-
cpus: number;
|
|
1239
|
-
};
|
|
1240
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1241
|
-
fileVersions?: {
|
|
1242
|
-
path: string;
|
|
1243
|
-
content: string;
|
|
1244
|
-
}[][] | undefined;
|
|
1245
|
-
}>;
|
|
1246
|
-
}, "strip", z.ZodTypeAny, {
|
|
1247
|
-
type: "init";
|
|
1248
|
-
fileContext: {
|
|
1249
|
-
currentWorkingDirectory: string;
|
|
1250
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
1251
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1252
|
-
knowledgeFiles: Record<string, string>;
|
|
1253
|
-
gitChanges: {
|
|
1254
|
-
status: string;
|
|
1255
|
-
diff: string;
|
|
1256
|
-
diffCached: string;
|
|
1257
|
-
lastCommitMessages: string;
|
|
1258
|
-
};
|
|
1259
|
-
changesSinceLastChat: Record<string, string>;
|
|
1260
|
-
shellConfigFiles: Record<string, string>;
|
|
1261
|
-
systemInfo: {
|
|
1262
|
-
platform: string;
|
|
1263
|
-
shell: string;
|
|
1264
|
-
nodeVersion: string;
|
|
1265
|
-
arch: string;
|
|
1266
|
-
homedir: string;
|
|
1267
|
-
cpus: number;
|
|
1268
|
-
};
|
|
1269
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1270
|
-
fileVersions?: {
|
|
1271
|
-
path: string;
|
|
1272
|
-
content: string;
|
|
1273
|
-
}[][] | undefined;
|
|
1274
|
-
};
|
|
1275
|
-
fingerprintId: string;
|
|
1276
|
-
authToken?: string | undefined;
|
|
1277
|
-
}, {
|
|
1278
|
-
type: "init";
|
|
1279
|
-
fileContext: {
|
|
1280
|
-
currentWorkingDirectory: string;
|
|
1281
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
1282
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1283
|
-
knowledgeFiles: Record<string, string>;
|
|
1284
|
-
gitChanges: {
|
|
1285
|
-
status: string;
|
|
1286
|
-
diff: string;
|
|
1287
|
-
diffCached: string;
|
|
1288
|
-
lastCommitMessages: string;
|
|
1289
|
-
};
|
|
1290
|
-
changesSinceLastChat: Record<string, string>;
|
|
1291
|
-
shellConfigFiles: Record<string, string>;
|
|
1292
|
-
systemInfo: {
|
|
1293
|
-
platform: string;
|
|
1294
|
-
shell: string;
|
|
1295
|
-
nodeVersion: string;
|
|
1296
|
-
arch: string;
|
|
1297
|
-
homedir: string;
|
|
1298
|
-
cpus: number;
|
|
1299
|
-
};
|
|
1300
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1301
|
-
fileVersions?: {
|
|
1302
|
-
path: string;
|
|
1303
|
-
content: string;
|
|
1304
|
-
}[][] | undefined;
|
|
1305
|
-
};
|
|
1306
|
-
fingerprintId: string;
|
|
1307
|
-
authToken?: string | undefined;
|
|
1308
|
-
}>, z.ZodObject<{
|
|
1309
|
-
type: z.ZodLiteral<"generate-commit-message">;
|
|
1310
|
-
fingerprintId: z.ZodString;
|
|
1311
|
-
authToken: z.ZodOptional<z.ZodString>;
|
|
1312
|
-
stagedChanges: z.ZodString;
|
|
1313
|
-
}, "strip", z.ZodTypeAny, {
|
|
1314
|
-
type: "generate-commit-message";
|
|
1315
|
-
fingerprintId: string;
|
|
1316
|
-
stagedChanges: string;
|
|
1317
|
-
authToken?: string | undefined;
|
|
1318
|
-
}, {
|
|
1319
|
-
type: "generate-commit-message";
|
|
1320
|
-
fingerprintId: string;
|
|
1321
|
-
stagedChanges: string;
|
|
1322
|
-
authToken?: string | undefined;
|
|
1323
|
-
}>]>;
|
|
1324
|
-
}, "strip", z.ZodTypeAny, {
|
|
1325
|
-
type: "action";
|
|
1326
|
-
data: {
|
|
1327
|
-
type: "user-input";
|
|
1328
|
-
fileContext: {
|
|
1329
|
-
currentWorkingDirectory: string;
|
|
1330
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
1331
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1332
|
-
knowledgeFiles: Record<string, string>;
|
|
1333
|
-
gitChanges: {
|
|
1334
|
-
status: string;
|
|
1335
|
-
diff: string;
|
|
1336
|
-
diffCached: string;
|
|
1337
|
-
lastCommitMessages: string;
|
|
1338
|
-
};
|
|
1339
|
-
changesSinceLastChat: Record<string, string>;
|
|
1340
|
-
shellConfigFiles: Record<string, string>;
|
|
1341
|
-
systemInfo: {
|
|
1342
|
-
platform: string;
|
|
1343
|
-
shell: string;
|
|
1344
|
-
nodeVersion: string;
|
|
1345
|
-
arch: string;
|
|
1346
|
-
homedir: string;
|
|
1347
|
-
cpus: number;
|
|
1348
|
-
};
|
|
1349
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1350
|
-
fileVersions?: {
|
|
1351
|
-
path: string;
|
|
1352
|
-
content: string;
|
|
1353
|
-
}[][] | undefined;
|
|
1354
|
-
};
|
|
1355
|
-
fingerprintId: string;
|
|
1356
|
-
userInputId: string;
|
|
1357
|
-
messages: {
|
|
1358
|
-
content: string | ({
|
|
1359
|
-
type: "text";
|
|
1360
|
-
text: string;
|
|
1361
|
-
cache_control?: {
|
|
1362
|
-
type: "ephemeral";
|
|
1363
|
-
} | undefined;
|
|
1364
|
-
} | {
|
|
1365
|
-
type: "tool_use";
|
|
1366
|
-
name: string;
|
|
1367
|
-
id: string;
|
|
1368
|
-
input: Record<string, any>;
|
|
1369
|
-
cache_control?: {
|
|
1370
|
-
type: "ephemeral";
|
|
1371
|
-
} | undefined;
|
|
1372
|
-
} | {
|
|
1373
|
-
content: string;
|
|
1374
|
-
type: "tool_result";
|
|
1375
|
-
tool_use_id: string;
|
|
1376
|
-
cache_control?: {
|
|
1377
|
-
type: "ephemeral";
|
|
1378
|
-
} | undefined;
|
|
1379
|
-
} | {
|
|
1380
|
-
type: "image";
|
|
1381
|
-
source: {
|
|
1382
|
-
type: "base64";
|
|
1383
|
-
media_type: "image/jpeg";
|
|
1384
|
-
data: string;
|
|
429
|
+
agentContext: string;
|
|
430
|
+
fileContext: {
|
|
431
|
+
currentWorkingDirectory: string;
|
|
432
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
433
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
434
|
+
knowledgeFiles: Record<string, string>;
|
|
435
|
+
gitChanges: {
|
|
436
|
+
status: string;
|
|
437
|
+
diff: string;
|
|
438
|
+
diffCached: string;
|
|
439
|
+
lastCommitMessages: string;
|
|
1385
440
|
};
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
441
|
+
changesSinceLastChat: Record<string, string>;
|
|
442
|
+
shellConfigFiles: Record<string, string>;
|
|
443
|
+
systemInfo: {
|
|
444
|
+
platform: string;
|
|
445
|
+
shell: string;
|
|
446
|
+
nodeVersion: string;
|
|
447
|
+
arch: string;
|
|
448
|
+
homedir: string;
|
|
449
|
+
cpus: number;
|
|
450
|
+
};
|
|
451
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
452
|
+
fileVersions?: {
|
|
453
|
+
path: string;
|
|
454
|
+
content: string;
|
|
455
|
+
}[][] | undefined;
|
|
456
|
+
};
|
|
457
|
+
messageHistory: {
|
|
458
|
+
content: string | ({
|
|
459
|
+
type: "text";
|
|
460
|
+
text: string;
|
|
461
|
+
cache_control?: {
|
|
462
|
+
type: "ephemeral";
|
|
463
|
+
} | undefined;
|
|
464
|
+
} | {
|
|
465
|
+
type: "tool_use";
|
|
466
|
+
name: string;
|
|
467
|
+
id: string;
|
|
468
|
+
input: Record<string, any>;
|
|
469
|
+
cache_control?: {
|
|
470
|
+
type: "ephemeral";
|
|
471
|
+
} | undefined;
|
|
472
|
+
} | {
|
|
473
|
+
type: "tool_result";
|
|
474
|
+
content: string;
|
|
475
|
+
tool_use_id: string;
|
|
476
|
+
cache_control?: {
|
|
477
|
+
type: "ephemeral";
|
|
478
|
+
} | undefined;
|
|
479
|
+
} | {
|
|
480
|
+
type: "image";
|
|
481
|
+
source: {
|
|
482
|
+
type: "base64";
|
|
483
|
+
media_type: "image/jpeg";
|
|
484
|
+
data: string;
|
|
485
|
+
};
|
|
486
|
+
cache_control?: {
|
|
487
|
+
type: "ephemeral";
|
|
488
|
+
} | undefined;
|
|
489
|
+
})[];
|
|
490
|
+
role: "user" | "assistant";
|
|
491
|
+
}[];
|
|
492
|
+
lastUserPromptIndex?: number | undefined;
|
|
493
|
+
}>;
|
|
494
|
+
toolResults: z.ZodArray<z.ZodObject<{
|
|
495
|
+
name: z.ZodString;
|
|
496
|
+
result: z.ZodString;
|
|
497
|
+
id: z.ZodString;
|
|
498
|
+
}, "strip", z.ZodTypeAny, {
|
|
499
|
+
name: string;
|
|
500
|
+
id: string;
|
|
501
|
+
result: string;
|
|
502
|
+
}, {
|
|
503
|
+
name: string;
|
|
504
|
+
id: string;
|
|
505
|
+
result: string;
|
|
506
|
+
}>, "many">;
|
|
507
|
+
}, "strip", z.ZodTypeAny, {
|
|
1400
508
|
type: "prompt";
|
|
1401
|
-
fingerprintId: string;
|
|
1402
|
-
costMode: "max" | "lite" | "normal";
|
|
1403
509
|
promptId: string;
|
|
510
|
+
fingerprintId: string;
|
|
511
|
+
costMode: "lite" | "normal" | "max";
|
|
1404
512
|
agentState: {
|
|
1405
513
|
agentContext: string;
|
|
1406
514
|
fileContext: {
|
|
@@ -1446,8 +554,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1446
554
|
type: "ephemeral";
|
|
1447
555
|
} | undefined;
|
|
1448
556
|
} | {
|
|
1449
|
-
content: string;
|
|
1450
557
|
type: "tool_result";
|
|
558
|
+
content: string;
|
|
1451
559
|
tool_use_id: string;
|
|
1452
560
|
cache_control?: {
|
|
1453
561
|
type: "ephemeral";
|
|
@@ -1465,135 +573,19 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1465
573
|
})[];
|
|
1466
574
|
role: "user" | "assistant";
|
|
1467
575
|
}[];
|
|
576
|
+
lastUserPromptIndex?: number | undefined;
|
|
1468
577
|
};
|
|
1469
578
|
toolResults: {
|
|
1470
579
|
name: string;
|
|
1471
580
|
id: string;
|
|
1472
581
|
result: string;
|
|
1473
582
|
}[];
|
|
1474
|
-
authToken?: string | undefined;
|
|
1475
583
|
prompt?: string | undefined;
|
|
1476
|
-
} | {
|
|
1477
|
-
type: "read-files-response";
|
|
1478
|
-
files: Record<string, string | null>;
|
|
1479
|
-
requestId?: string | undefined;
|
|
1480
|
-
} | {
|
|
1481
|
-
type: "init";
|
|
1482
|
-
fileContext: {
|
|
1483
|
-
currentWorkingDirectory: string;
|
|
1484
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
1485
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1486
|
-
knowledgeFiles: Record<string, string>;
|
|
1487
|
-
gitChanges: {
|
|
1488
|
-
status: string;
|
|
1489
|
-
diff: string;
|
|
1490
|
-
diffCached: string;
|
|
1491
|
-
lastCommitMessages: string;
|
|
1492
|
-
};
|
|
1493
|
-
changesSinceLastChat: Record<string, string>;
|
|
1494
|
-
shellConfigFiles: Record<string, string>;
|
|
1495
|
-
systemInfo: {
|
|
1496
|
-
platform: string;
|
|
1497
|
-
shell: string;
|
|
1498
|
-
nodeVersion: string;
|
|
1499
|
-
arch: string;
|
|
1500
|
-
homedir: string;
|
|
1501
|
-
cpus: number;
|
|
1502
|
-
};
|
|
1503
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1504
|
-
fileVersions?: {
|
|
1505
|
-
path: string;
|
|
1506
|
-
content: string;
|
|
1507
|
-
}[][] | undefined;
|
|
1508
|
-
};
|
|
1509
|
-
fingerprintId: string;
|
|
1510
|
-
authToken?: string | undefined;
|
|
1511
|
-
} | {
|
|
1512
|
-
type: "generate-commit-message";
|
|
1513
|
-
fingerprintId: string;
|
|
1514
|
-
stagedChanges: string;
|
|
1515
|
-
authToken?: string | undefined;
|
|
1516
|
-
};
|
|
1517
|
-
txid: number;
|
|
1518
|
-
}, {
|
|
1519
|
-
type: "action";
|
|
1520
|
-
data: {
|
|
1521
|
-
type: "user-input";
|
|
1522
|
-
fileContext: {
|
|
1523
|
-
currentWorkingDirectory: string;
|
|
1524
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
1525
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1526
|
-
knowledgeFiles: Record<string, string>;
|
|
1527
|
-
gitChanges: {
|
|
1528
|
-
status: string;
|
|
1529
|
-
diff: string;
|
|
1530
|
-
diffCached: string;
|
|
1531
|
-
lastCommitMessages: string;
|
|
1532
|
-
};
|
|
1533
|
-
changesSinceLastChat: Record<string, string>;
|
|
1534
|
-
shellConfigFiles: Record<string, string>;
|
|
1535
|
-
systemInfo: {
|
|
1536
|
-
platform: string;
|
|
1537
|
-
shell: string;
|
|
1538
|
-
nodeVersion: string;
|
|
1539
|
-
arch: string;
|
|
1540
|
-
homedir: string;
|
|
1541
|
-
cpus: number;
|
|
1542
|
-
};
|
|
1543
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1544
|
-
fileVersions?: {
|
|
1545
|
-
path: string;
|
|
1546
|
-
content: string;
|
|
1547
|
-
}[][] | undefined;
|
|
1548
|
-
};
|
|
1549
|
-
fingerprintId: string;
|
|
1550
|
-
userInputId: string;
|
|
1551
|
-
messages: {
|
|
1552
|
-
content: string | ({
|
|
1553
|
-
type: "text";
|
|
1554
|
-
text: string;
|
|
1555
|
-
cache_control?: {
|
|
1556
|
-
type: "ephemeral";
|
|
1557
|
-
} | undefined;
|
|
1558
|
-
} | {
|
|
1559
|
-
type: "tool_use";
|
|
1560
|
-
name: string;
|
|
1561
|
-
id: string;
|
|
1562
|
-
input: Record<string, any>;
|
|
1563
|
-
cache_control?: {
|
|
1564
|
-
type: "ephemeral";
|
|
1565
|
-
} | undefined;
|
|
1566
|
-
} | {
|
|
1567
|
-
content: string;
|
|
1568
|
-
type: "tool_result";
|
|
1569
|
-
tool_use_id: string;
|
|
1570
|
-
cache_control?: {
|
|
1571
|
-
type: "ephemeral";
|
|
1572
|
-
} | undefined;
|
|
1573
|
-
} | {
|
|
1574
|
-
type: "image";
|
|
1575
|
-
source: {
|
|
1576
|
-
type: "base64";
|
|
1577
|
-
media_type: "image/jpeg";
|
|
1578
|
-
data: string;
|
|
1579
|
-
};
|
|
1580
|
-
cache_control?: {
|
|
1581
|
-
type: "ephemeral";
|
|
1582
|
-
} | undefined;
|
|
1583
|
-
})[];
|
|
1584
|
-
role: "user" | "assistant";
|
|
1585
|
-
}[];
|
|
1586
|
-
changesAlreadyApplied: {
|
|
1587
|
-
path: string;
|
|
1588
|
-
content: string;
|
|
1589
|
-
type: "file" | "patch";
|
|
1590
|
-
}[];
|
|
1591
584
|
authToken?: string | undefined;
|
|
1592
|
-
|
|
1593
|
-
} | {
|
|
585
|
+
}, {
|
|
1594
586
|
type: "prompt";
|
|
1595
|
-
fingerprintId: string;
|
|
1596
587
|
promptId: string;
|
|
588
|
+
fingerprintId: string;
|
|
1597
589
|
agentState: {
|
|
1598
590
|
agentContext: string;
|
|
1599
591
|
fileContext: {
|
|
@@ -1639,8 +631,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1639
631
|
type: "ephemeral";
|
|
1640
632
|
} | undefined;
|
|
1641
633
|
} | {
|
|
1642
|
-
content: string;
|
|
1643
634
|
type: "tool_result";
|
|
635
|
+
content: string;
|
|
1644
636
|
tool_use_id: string;
|
|
1645
637
|
cache_control?: {
|
|
1646
638
|
type: "ephemeral";
|
|
@@ -1658,22 +650,89 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1658
650
|
})[];
|
|
1659
651
|
role: "user" | "assistant";
|
|
1660
652
|
}[];
|
|
653
|
+
lastUserPromptIndex?: number | undefined;
|
|
1661
654
|
};
|
|
1662
655
|
toolResults: {
|
|
1663
656
|
name: string;
|
|
1664
657
|
id: string;
|
|
1665
658
|
result: string;
|
|
1666
659
|
}[];
|
|
1667
|
-
authToken?: string | undefined;
|
|
1668
|
-
costMode?: "max" | "lite" | "normal" | undefined;
|
|
1669
660
|
prompt?: string | undefined;
|
|
1670
|
-
|
|
661
|
+
authToken?: string | undefined;
|
|
662
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
663
|
+
}>, z.ZodObject<{
|
|
664
|
+
type: z.ZodLiteral<"read-files-response">;
|
|
665
|
+
files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
666
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
667
|
+
}, "strip", z.ZodTypeAny, {
|
|
1671
668
|
type: "read-files-response";
|
|
1672
669
|
files: Record<string, string | null>;
|
|
1673
670
|
requestId?: string | undefined;
|
|
1674
|
-
}
|
|
1675
|
-
type: "
|
|
1676
|
-
|
|
671
|
+
}, {
|
|
672
|
+
type: "read-files-response";
|
|
673
|
+
files: Record<string, string | null>;
|
|
674
|
+
requestId?: string | undefined;
|
|
675
|
+
}>, z.ZodObject<{
|
|
676
|
+
type: z.ZodLiteral<"init">;
|
|
677
|
+
fingerprintId: z.ZodString;
|
|
678
|
+
authToken: z.ZodOptional<z.ZodString>;
|
|
679
|
+
fileContext: z.ZodObject<{
|
|
680
|
+
currentWorkingDirectory: z.ZodString;
|
|
681
|
+
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
682
|
+
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
683
|
+
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
684
|
+
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
685
|
+
gitChanges: z.ZodObject<{
|
|
686
|
+
status: z.ZodString;
|
|
687
|
+
diff: z.ZodString;
|
|
688
|
+
diffCached: z.ZodString;
|
|
689
|
+
lastCommitMessages: z.ZodString;
|
|
690
|
+
}, "strip", z.ZodTypeAny, {
|
|
691
|
+
status: string;
|
|
692
|
+
diff: string;
|
|
693
|
+
diffCached: string;
|
|
694
|
+
lastCommitMessages: string;
|
|
695
|
+
}, {
|
|
696
|
+
status: string;
|
|
697
|
+
diff: string;
|
|
698
|
+
diffCached: string;
|
|
699
|
+
lastCommitMessages: string;
|
|
700
|
+
}>;
|
|
701
|
+
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
702
|
+
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
703
|
+
systemInfo: z.ZodObject<{
|
|
704
|
+
platform: z.ZodString;
|
|
705
|
+
shell: z.ZodString;
|
|
706
|
+
nodeVersion: z.ZodString;
|
|
707
|
+
arch: z.ZodString;
|
|
708
|
+
homedir: z.ZodString;
|
|
709
|
+
cpus: z.ZodNumber;
|
|
710
|
+
}, "strip", z.ZodTypeAny, {
|
|
711
|
+
platform: string;
|
|
712
|
+
shell: string;
|
|
713
|
+
nodeVersion: string;
|
|
714
|
+
arch: string;
|
|
715
|
+
homedir: string;
|
|
716
|
+
cpus: number;
|
|
717
|
+
}, {
|
|
718
|
+
platform: string;
|
|
719
|
+
shell: string;
|
|
720
|
+
nodeVersion: string;
|
|
721
|
+
arch: string;
|
|
722
|
+
homedir: string;
|
|
723
|
+
cpus: number;
|
|
724
|
+
}>;
|
|
725
|
+
fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
726
|
+
path: z.ZodString;
|
|
727
|
+
content: z.ZodString;
|
|
728
|
+
}, "strip", z.ZodTypeAny, {
|
|
729
|
+
path: string;
|
|
730
|
+
content: string;
|
|
731
|
+
}, {
|
|
732
|
+
path: string;
|
|
733
|
+
content: string;
|
|
734
|
+
}>, "many">, "many">>;
|
|
735
|
+
}, "strip", z.ZodTypeAny, {
|
|
1677
736
|
currentWorkingDirectory: string;
|
|
1678
737
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1679
738
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
@@ -1699,530 +758,406 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1699
758
|
path: string;
|
|
1700
759
|
content: string;
|
|
1701
760
|
}[][] | undefined;
|
|
1702
|
-
};
|
|
1703
|
-
fingerprintId: string;
|
|
1704
|
-
authToken?: string | undefined;
|
|
1705
|
-
} | {
|
|
1706
|
-
type: "generate-commit-message";
|
|
1707
|
-
fingerprintId: string;
|
|
1708
|
-
stagedChanges: string;
|
|
1709
|
-
authToken?: string | undefined;
|
|
1710
|
-
};
|
|
1711
|
-
txid: number;
|
|
1712
|
-
}>;
|
|
1713
|
-
};
|
|
1714
|
-
export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
1715
|
-
type: z.ZodLiteral<"identify">;
|
|
1716
|
-
txid: z.ZodNumber;
|
|
1717
|
-
clientSessionId: z.ZodString;
|
|
1718
|
-
}, "strip", z.ZodTypeAny, {
|
|
1719
|
-
type: "identify";
|
|
1720
|
-
txid: number;
|
|
1721
|
-
clientSessionId: string;
|
|
1722
|
-
}, {
|
|
1723
|
-
type: "identify";
|
|
1724
|
-
txid: number;
|
|
1725
|
-
clientSessionId: string;
|
|
1726
|
-
}>, z.ZodObject<{
|
|
1727
|
-
type: z.ZodLiteral<"subscribe">;
|
|
1728
|
-
txid: z.ZodNumber;
|
|
1729
|
-
topics: z.ZodArray<z.ZodString, "many">;
|
|
1730
|
-
}, "strip", z.ZodTypeAny, {
|
|
1731
|
-
type: "subscribe";
|
|
1732
|
-
txid: number;
|
|
1733
|
-
topics: string[];
|
|
1734
|
-
}, {
|
|
1735
|
-
type: "subscribe";
|
|
1736
|
-
txid: number;
|
|
1737
|
-
topics: string[];
|
|
1738
|
-
}>, z.ZodObject<{
|
|
1739
|
-
type: z.ZodLiteral<"unsubscribe">;
|
|
1740
|
-
txid: z.ZodNumber;
|
|
1741
|
-
topics: z.ZodArray<z.ZodString, "many">;
|
|
1742
|
-
}, "strip", z.ZodTypeAny, {
|
|
1743
|
-
type: "unsubscribe";
|
|
1744
|
-
txid: number;
|
|
1745
|
-
topics: string[];
|
|
1746
|
-
}, {
|
|
1747
|
-
type: "unsubscribe";
|
|
1748
|
-
txid: number;
|
|
1749
|
-
topics: string[];
|
|
1750
|
-
}>, z.ZodObject<{
|
|
1751
|
-
type: z.ZodLiteral<"ping">;
|
|
1752
|
-
txid: z.ZodNumber;
|
|
1753
|
-
}, "strip", z.ZodTypeAny, {
|
|
1754
|
-
type: "ping";
|
|
1755
|
-
txid: number;
|
|
1756
|
-
}, {
|
|
1757
|
-
type: "ping";
|
|
1758
|
-
txid: number;
|
|
1759
|
-
}>, z.ZodObject<{
|
|
1760
|
-
type: z.ZodLiteral<"action">;
|
|
1761
|
-
txid: z.ZodNumber;
|
|
1762
|
-
data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1763
|
-
type: z.ZodLiteral<"user-input">;
|
|
1764
|
-
fingerprintId: z.ZodString;
|
|
1765
|
-
authToken: z.ZodOptional<z.ZodString>;
|
|
1766
|
-
userInputId: z.ZodString;
|
|
1767
|
-
messages: z.ZodArray<z.ZodObject<{
|
|
1768
|
-
role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
|
|
1769
|
-
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1770
|
-
type: z.ZodLiteral<"text">;
|
|
1771
|
-
text: z.ZodString;
|
|
1772
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
1773
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
1774
|
-
}, "strip", z.ZodTypeAny, {
|
|
1775
|
-
type: "ephemeral";
|
|
1776
|
-
}, {
|
|
1777
|
-
type: "ephemeral";
|
|
1778
|
-
}>>;
|
|
1779
|
-
}, "strip", z.ZodTypeAny, {
|
|
1780
|
-
type: "text";
|
|
1781
|
-
text: string;
|
|
1782
|
-
cache_control?: {
|
|
1783
|
-
type: "ephemeral";
|
|
1784
|
-
} | undefined;
|
|
1785
|
-
}, {
|
|
1786
|
-
type: "text";
|
|
1787
|
-
text: string;
|
|
1788
|
-
cache_control?: {
|
|
1789
|
-
type: "ephemeral";
|
|
1790
|
-
} | undefined;
|
|
1791
|
-
}>, z.ZodObject<{
|
|
1792
|
-
type: z.ZodLiteral<"tool_use">;
|
|
1793
|
-
id: z.ZodString;
|
|
1794
|
-
name: z.ZodString;
|
|
1795
|
-
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1796
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
1797
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
1798
|
-
}, "strip", z.ZodTypeAny, {
|
|
1799
|
-
type: "ephemeral";
|
|
1800
|
-
}, {
|
|
1801
|
-
type: "ephemeral";
|
|
1802
|
-
}>>;
|
|
1803
|
-
}, "strip", z.ZodTypeAny, {
|
|
1804
|
-
type: "tool_use";
|
|
1805
|
-
name: string;
|
|
1806
|
-
id: string;
|
|
1807
|
-
input: Record<string, any>;
|
|
1808
|
-
cache_control?: {
|
|
1809
|
-
type: "ephemeral";
|
|
1810
|
-
} | undefined;
|
|
1811
|
-
}, {
|
|
1812
|
-
type: "tool_use";
|
|
1813
|
-
name: string;
|
|
1814
|
-
id: string;
|
|
1815
|
-
input: Record<string, any>;
|
|
1816
|
-
cache_control?: {
|
|
1817
|
-
type: "ephemeral";
|
|
1818
|
-
} | undefined;
|
|
1819
|
-
}>, z.ZodObject<{
|
|
1820
|
-
type: z.ZodLiteral<"tool_result">;
|
|
1821
|
-
tool_use_id: z.ZodString;
|
|
1822
|
-
content: z.ZodString;
|
|
1823
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
1824
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
1825
|
-
}, "strip", z.ZodTypeAny, {
|
|
1826
|
-
type: "ephemeral";
|
|
1827
|
-
}, {
|
|
1828
|
-
type: "ephemeral";
|
|
1829
|
-
}>>;
|
|
1830
|
-
}, "strip", z.ZodTypeAny, {
|
|
1831
|
-
content: string;
|
|
1832
|
-
type: "tool_result";
|
|
1833
|
-
tool_use_id: string;
|
|
1834
|
-
cache_control?: {
|
|
1835
|
-
type: "ephemeral";
|
|
1836
|
-
} | undefined;
|
|
1837
761
|
}, {
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
type: z.ZodLiteral<"base64">;
|
|
1848
|
-
media_type: z.ZodLiteral<"image/jpeg">;
|
|
1849
|
-
data: z.ZodString;
|
|
1850
|
-
}, "strip", z.ZodTypeAny, {
|
|
1851
|
-
type: "base64";
|
|
1852
|
-
media_type: "image/jpeg";
|
|
1853
|
-
data: string;
|
|
1854
|
-
}, {
|
|
1855
|
-
type: "base64";
|
|
1856
|
-
media_type: "image/jpeg";
|
|
1857
|
-
data: string;
|
|
1858
|
-
}>;
|
|
1859
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
1860
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
1861
|
-
}, "strip", z.ZodTypeAny, {
|
|
1862
|
-
type: "ephemeral";
|
|
1863
|
-
}, {
|
|
1864
|
-
type: "ephemeral";
|
|
1865
|
-
}>>;
|
|
1866
|
-
}, "strip", z.ZodTypeAny, {
|
|
1867
|
-
type: "image";
|
|
1868
|
-
source: {
|
|
1869
|
-
type: "base64";
|
|
1870
|
-
media_type: "image/jpeg";
|
|
1871
|
-
data: string;
|
|
762
|
+
currentWorkingDirectory: string;
|
|
763
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
764
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
765
|
+
knowledgeFiles: Record<string, string>;
|
|
766
|
+
gitChanges: {
|
|
767
|
+
status: string;
|
|
768
|
+
diff: string;
|
|
769
|
+
diffCached: string;
|
|
770
|
+
lastCommitMessages: string;
|
|
1872
771
|
};
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
772
|
+
changesSinceLastChat: Record<string, string>;
|
|
773
|
+
shellConfigFiles: Record<string, string>;
|
|
774
|
+
systemInfo: {
|
|
775
|
+
platform: string;
|
|
776
|
+
shell: string;
|
|
777
|
+
nodeVersion: string;
|
|
778
|
+
arch: string;
|
|
779
|
+
homedir: string;
|
|
780
|
+
cpus: number;
|
|
1882
781
|
};
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
782
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
783
|
+
fileVersions?: {
|
|
784
|
+
path: string;
|
|
785
|
+
content: string;
|
|
786
|
+
}[][] | undefined;
|
|
787
|
+
}>;
|
|
1887
788
|
}, "strip", z.ZodTypeAny, {
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
type: "ephemeral";
|
|
1901
|
-
} | undefined;
|
|
1902
|
-
} | {
|
|
1903
|
-
content: string;
|
|
1904
|
-
type: "tool_result";
|
|
1905
|
-
tool_use_id: string;
|
|
1906
|
-
cache_control?: {
|
|
1907
|
-
type: "ephemeral";
|
|
1908
|
-
} | undefined;
|
|
1909
|
-
} | {
|
|
1910
|
-
type: "image";
|
|
1911
|
-
source: {
|
|
1912
|
-
type: "base64";
|
|
1913
|
-
media_type: "image/jpeg";
|
|
1914
|
-
data: string;
|
|
789
|
+
type: "init";
|
|
790
|
+
fingerprintId: string;
|
|
791
|
+
fileContext: {
|
|
792
|
+
currentWorkingDirectory: string;
|
|
793
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
794
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
795
|
+
knowledgeFiles: Record<string, string>;
|
|
796
|
+
gitChanges: {
|
|
797
|
+
status: string;
|
|
798
|
+
diff: string;
|
|
799
|
+
diffCached: string;
|
|
800
|
+
lastCommitMessages: string;
|
|
1915
801
|
};
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
cache_control?: {
|
|
1926
|
-
type: "ephemeral";
|
|
1927
|
-
} | undefined;
|
|
1928
|
-
} | {
|
|
1929
|
-
type: "tool_use";
|
|
1930
|
-
name: string;
|
|
1931
|
-
id: string;
|
|
1932
|
-
input: Record<string, any>;
|
|
1933
|
-
cache_control?: {
|
|
1934
|
-
type: "ephemeral";
|
|
1935
|
-
} | undefined;
|
|
1936
|
-
} | {
|
|
1937
|
-
content: string;
|
|
1938
|
-
type: "tool_result";
|
|
1939
|
-
tool_use_id: string;
|
|
1940
|
-
cache_control?: {
|
|
1941
|
-
type: "ephemeral";
|
|
1942
|
-
} | undefined;
|
|
1943
|
-
} | {
|
|
1944
|
-
type: "image";
|
|
1945
|
-
source: {
|
|
1946
|
-
type: "base64";
|
|
1947
|
-
media_type: "image/jpeg";
|
|
1948
|
-
data: string;
|
|
802
|
+
changesSinceLastChat: Record<string, string>;
|
|
803
|
+
shellConfigFiles: Record<string, string>;
|
|
804
|
+
systemInfo: {
|
|
805
|
+
platform: string;
|
|
806
|
+
shell: string;
|
|
807
|
+
nodeVersion: string;
|
|
808
|
+
arch: string;
|
|
809
|
+
homedir: string;
|
|
810
|
+
cpus: number;
|
|
1949
811
|
};
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
}>, "many">;
|
|
1956
|
-
fileContext: z.ZodObject<{
|
|
1957
|
-
currentWorkingDirectory: z.ZodString;
|
|
1958
|
-
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
1959
|
-
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1960
|
-
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1961
|
-
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1962
|
-
gitChanges: z.ZodObject<{
|
|
1963
|
-
status: z.ZodString;
|
|
1964
|
-
diff: z.ZodString;
|
|
1965
|
-
diffCached: z.ZodString;
|
|
1966
|
-
lastCommitMessages: z.ZodString;
|
|
1967
|
-
}, "strip", z.ZodTypeAny, {
|
|
1968
|
-
status: string;
|
|
1969
|
-
diff: string;
|
|
1970
|
-
diffCached: string;
|
|
1971
|
-
lastCommitMessages: string;
|
|
1972
|
-
}, {
|
|
1973
|
-
status: string;
|
|
1974
|
-
diff: string;
|
|
1975
|
-
diffCached: string;
|
|
1976
|
-
lastCommitMessages: string;
|
|
1977
|
-
}>;
|
|
1978
|
-
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1979
|
-
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1980
|
-
systemInfo: z.ZodObject<{
|
|
1981
|
-
platform: z.ZodString;
|
|
1982
|
-
shell: z.ZodString;
|
|
1983
|
-
nodeVersion: z.ZodString;
|
|
1984
|
-
arch: z.ZodString;
|
|
1985
|
-
homedir: z.ZodString;
|
|
1986
|
-
cpus: z.ZodNumber;
|
|
1987
|
-
}, "strip", z.ZodTypeAny, {
|
|
1988
|
-
platform: string;
|
|
1989
|
-
shell: string;
|
|
1990
|
-
nodeVersion: string;
|
|
1991
|
-
arch: string;
|
|
1992
|
-
homedir: string;
|
|
1993
|
-
cpus: number;
|
|
1994
|
-
}, {
|
|
1995
|
-
platform: string;
|
|
1996
|
-
shell: string;
|
|
1997
|
-
nodeVersion: string;
|
|
1998
|
-
arch: string;
|
|
1999
|
-
homedir: string;
|
|
2000
|
-
cpus: number;
|
|
2001
|
-
}>;
|
|
2002
|
-
fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
2003
|
-
path: z.ZodString;
|
|
2004
|
-
content: z.ZodString;
|
|
2005
|
-
}, "strip", z.ZodTypeAny, {
|
|
2006
|
-
path: string;
|
|
2007
|
-
content: string;
|
|
2008
|
-
}, {
|
|
2009
|
-
path: string;
|
|
2010
|
-
content: string;
|
|
2011
|
-
}>, "many">, "many">>;
|
|
2012
|
-
}, "strip", z.ZodTypeAny, {
|
|
2013
|
-
currentWorkingDirectory: string;
|
|
2014
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
2015
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
2016
|
-
knowledgeFiles: Record<string, string>;
|
|
2017
|
-
gitChanges: {
|
|
2018
|
-
status: string;
|
|
2019
|
-
diff: string;
|
|
2020
|
-
diffCached: string;
|
|
2021
|
-
lastCommitMessages: string;
|
|
2022
|
-
};
|
|
2023
|
-
changesSinceLastChat: Record<string, string>;
|
|
2024
|
-
shellConfigFiles: Record<string, string>;
|
|
2025
|
-
systemInfo: {
|
|
2026
|
-
platform: string;
|
|
2027
|
-
shell: string;
|
|
2028
|
-
nodeVersion: string;
|
|
2029
|
-
arch: string;
|
|
2030
|
-
homedir: string;
|
|
2031
|
-
cpus: number;
|
|
812
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
813
|
+
fileVersions?: {
|
|
814
|
+
path: string;
|
|
815
|
+
content: string;
|
|
816
|
+
}[][] | undefined;
|
|
2032
817
|
};
|
|
2033
|
-
|
|
2034
|
-
fileVersions?: {
|
|
2035
|
-
path: string;
|
|
2036
|
-
content: string;
|
|
2037
|
-
}[][] | undefined;
|
|
818
|
+
authToken?: string | undefined;
|
|
2038
819
|
}, {
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
820
|
+
type: "init";
|
|
821
|
+
fingerprintId: string;
|
|
822
|
+
fileContext: {
|
|
823
|
+
currentWorkingDirectory: string;
|
|
824
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
825
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
826
|
+
knowledgeFiles: Record<string, string>;
|
|
827
|
+
gitChanges: {
|
|
828
|
+
status: string;
|
|
829
|
+
diff: string;
|
|
830
|
+
diffCached: string;
|
|
831
|
+
lastCommitMessages: string;
|
|
832
|
+
};
|
|
833
|
+
changesSinceLastChat: Record<string, string>;
|
|
834
|
+
shellConfigFiles: Record<string, string>;
|
|
835
|
+
systemInfo: {
|
|
836
|
+
platform: string;
|
|
837
|
+
shell: string;
|
|
838
|
+
nodeVersion: string;
|
|
839
|
+
arch: string;
|
|
840
|
+
homedir: string;
|
|
841
|
+
cpus: number;
|
|
842
|
+
};
|
|
843
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
844
|
+
fileVersions?: {
|
|
845
|
+
path: string;
|
|
846
|
+
content: string;
|
|
847
|
+
}[][] | undefined;
|
|
2058
848
|
};
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
2066
|
-
type: z.ZodEnum<["patch", "file"]>;
|
|
2067
|
-
path: z.ZodString;
|
|
2068
|
-
content: z.ZodString;
|
|
849
|
+
authToken?: string | undefined;
|
|
850
|
+
}>, z.ZodObject<{
|
|
851
|
+
type: z.ZodLiteral<"generate-commit-message">;
|
|
852
|
+
fingerprintId: z.ZodString;
|
|
853
|
+
authToken: z.ZodOptional<z.ZodString>;
|
|
854
|
+
stagedChanges: z.ZodString;
|
|
2069
855
|
}, "strip", z.ZodTypeAny, {
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
856
|
+
type: "generate-commit-message";
|
|
857
|
+
fingerprintId: string;
|
|
858
|
+
stagedChanges: string;
|
|
859
|
+
authToken?: string | undefined;
|
|
2073
860
|
}, {
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
861
|
+
type: "generate-commit-message";
|
|
862
|
+
fingerprintId: string;
|
|
863
|
+
stagedChanges: string;
|
|
864
|
+
authToken?: string | undefined;
|
|
865
|
+
}>]>;
|
|
2079
866
|
}, "strip", z.ZodTypeAny, {
|
|
2080
|
-
type: "
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
867
|
+
type: "action";
|
|
868
|
+
data: {
|
|
869
|
+
type: "prompt";
|
|
870
|
+
promptId: string;
|
|
871
|
+
fingerprintId: string;
|
|
872
|
+
costMode: "lite" | "normal" | "max";
|
|
873
|
+
agentState: {
|
|
874
|
+
agentContext: string;
|
|
875
|
+
fileContext: {
|
|
876
|
+
currentWorkingDirectory: string;
|
|
877
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
878
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
879
|
+
knowledgeFiles: Record<string, string>;
|
|
880
|
+
gitChanges: {
|
|
881
|
+
status: string;
|
|
882
|
+
diff: string;
|
|
883
|
+
diffCached: string;
|
|
884
|
+
lastCommitMessages: string;
|
|
885
|
+
};
|
|
886
|
+
changesSinceLastChat: Record<string, string>;
|
|
887
|
+
shellConfigFiles: Record<string, string>;
|
|
888
|
+
systemInfo: {
|
|
889
|
+
platform: string;
|
|
890
|
+
shell: string;
|
|
891
|
+
nodeVersion: string;
|
|
892
|
+
arch: string;
|
|
893
|
+
homedir: string;
|
|
894
|
+
cpus: number;
|
|
895
|
+
};
|
|
896
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
897
|
+
fileVersions?: {
|
|
898
|
+
path: string;
|
|
899
|
+
content: string;
|
|
900
|
+
}[][] | undefined;
|
|
901
|
+
};
|
|
902
|
+
messageHistory: {
|
|
903
|
+
content: string | ({
|
|
904
|
+
type: "text";
|
|
905
|
+
text: string;
|
|
906
|
+
cache_control?: {
|
|
907
|
+
type: "ephemeral";
|
|
908
|
+
} | undefined;
|
|
909
|
+
} | {
|
|
910
|
+
type: "tool_use";
|
|
911
|
+
name: string;
|
|
912
|
+
id: string;
|
|
913
|
+
input: Record<string, any>;
|
|
914
|
+
cache_control?: {
|
|
915
|
+
type: "ephemeral";
|
|
916
|
+
} | undefined;
|
|
917
|
+
} | {
|
|
918
|
+
type: "tool_result";
|
|
919
|
+
content: string;
|
|
920
|
+
tool_use_id: string;
|
|
921
|
+
cache_control?: {
|
|
922
|
+
type: "ephemeral";
|
|
923
|
+
} | undefined;
|
|
924
|
+
} | {
|
|
925
|
+
type: "image";
|
|
926
|
+
source: {
|
|
927
|
+
type: "base64";
|
|
928
|
+
media_type: "image/jpeg";
|
|
929
|
+
data: string;
|
|
930
|
+
};
|
|
931
|
+
cache_control?: {
|
|
932
|
+
type: "ephemeral";
|
|
933
|
+
} | undefined;
|
|
934
|
+
})[];
|
|
935
|
+
role: "user" | "assistant";
|
|
936
|
+
}[];
|
|
937
|
+
lastUserPromptIndex?: number | undefined;
|
|
2091
938
|
};
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
939
|
+
toolResults: {
|
|
940
|
+
name: string;
|
|
941
|
+
id: string;
|
|
942
|
+
result: string;
|
|
943
|
+
}[];
|
|
944
|
+
prompt?: string | undefined;
|
|
945
|
+
authToken?: string | undefined;
|
|
946
|
+
} | {
|
|
947
|
+
type: "read-files-response";
|
|
948
|
+
files: Record<string, string | null>;
|
|
949
|
+
requestId?: string | undefined;
|
|
950
|
+
} | {
|
|
951
|
+
type: "init";
|
|
952
|
+
fingerprintId: string;
|
|
953
|
+
fileContext: {
|
|
954
|
+
currentWorkingDirectory: string;
|
|
955
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
956
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
957
|
+
knowledgeFiles: Record<string, string>;
|
|
958
|
+
gitChanges: {
|
|
959
|
+
status: string;
|
|
960
|
+
diff: string;
|
|
961
|
+
diffCached: string;
|
|
962
|
+
lastCommitMessages: string;
|
|
963
|
+
};
|
|
964
|
+
changesSinceLastChat: Record<string, string>;
|
|
965
|
+
shellConfigFiles: Record<string, string>;
|
|
966
|
+
systemInfo: {
|
|
967
|
+
platform: string;
|
|
968
|
+
shell: string;
|
|
969
|
+
nodeVersion: string;
|
|
970
|
+
arch: string;
|
|
971
|
+
homedir: string;
|
|
972
|
+
cpus: number;
|
|
973
|
+
};
|
|
974
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
975
|
+
fileVersions?: {
|
|
976
|
+
path: string;
|
|
977
|
+
content: string;
|
|
978
|
+
}[][] | undefined;
|
|
979
|
+
};
|
|
980
|
+
authToken?: string | undefined;
|
|
981
|
+
} | {
|
|
982
|
+
type: "generate-commit-message";
|
|
983
|
+
fingerprintId: string;
|
|
984
|
+
stagedChanges: string;
|
|
985
|
+
authToken?: string | undefined;
|
|
986
|
+
};
|
|
987
|
+
txid: number;
|
|
988
|
+
}, {
|
|
989
|
+
type: "action";
|
|
990
|
+
data: {
|
|
991
|
+
type: "prompt";
|
|
992
|
+
promptId: string;
|
|
993
|
+
fingerprintId: string;
|
|
994
|
+
agentState: {
|
|
995
|
+
agentContext: string;
|
|
996
|
+
fileContext: {
|
|
997
|
+
currentWorkingDirectory: string;
|
|
998
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
999
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
1000
|
+
knowledgeFiles: Record<string, string>;
|
|
1001
|
+
gitChanges: {
|
|
1002
|
+
status: string;
|
|
1003
|
+
diff: string;
|
|
1004
|
+
diffCached: string;
|
|
1005
|
+
lastCommitMessages: string;
|
|
1006
|
+
};
|
|
1007
|
+
changesSinceLastChat: Record<string, string>;
|
|
1008
|
+
shellConfigFiles: Record<string, string>;
|
|
1009
|
+
systemInfo: {
|
|
1010
|
+
platform: string;
|
|
1011
|
+
shell: string;
|
|
1012
|
+
nodeVersion: string;
|
|
1013
|
+
arch: string;
|
|
1014
|
+
homedir: string;
|
|
1015
|
+
cpus: number;
|
|
1016
|
+
};
|
|
1017
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1018
|
+
fileVersions?: {
|
|
1019
|
+
path: string;
|
|
1020
|
+
content: string;
|
|
1021
|
+
}[][] | undefined;
|
|
1022
|
+
};
|
|
1023
|
+
messageHistory: {
|
|
1024
|
+
content: string | ({
|
|
1025
|
+
type: "text";
|
|
1026
|
+
text: string;
|
|
1027
|
+
cache_control?: {
|
|
1028
|
+
type: "ephemeral";
|
|
1029
|
+
} | undefined;
|
|
1030
|
+
} | {
|
|
1031
|
+
type: "tool_use";
|
|
1032
|
+
name: string;
|
|
1033
|
+
id: string;
|
|
1034
|
+
input: Record<string, any>;
|
|
1035
|
+
cache_control?: {
|
|
1036
|
+
type: "ephemeral";
|
|
1037
|
+
} | undefined;
|
|
1038
|
+
} | {
|
|
1039
|
+
type: "tool_result";
|
|
1040
|
+
content: string;
|
|
1041
|
+
tool_use_id: string;
|
|
1042
|
+
cache_control?: {
|
|
1043
|
+
type: "ephemeral";
|
|
1044
|
+
} | undefined;
|
|
1045
|
+
} | {
|
|
1046
|
+
type: "image";
|
|
1047
|
+
source: {
|
|
1048
|
+
type: "base64";
|
|
1049
|
+
media_type: "image/jpeg";
|
|
1050
|
+
data: string;
|
|
1051
|
+
};
|
|
1052
|
+
cache_control?: {
|
|
1053
|
+
type: "ephemeral";
|
|
1054
|
+
} | undefined;
|
|
1055
|
+
})[];
|
|
1056
|
+
role: "user" | "assistant";
|
|
1057
|
+
}[];
|
|
1058
|
+
lastUserPromptIndex?: number | undefined;
|
|
2101
1059
|
};
|
|
2102
|
-
|
|
2103
|
-
fileVersions?: {
|
|
2104
|
-
path: string;
|
|
2105
|
-
content: string;
|
|
2106
|
-
}[][] | undefined;
|
|
2107
|
-
};
|
|
2108
|
-
fingerprintId: string;
|
|
2109
|
-
userInputId: string;
|
|
2110
|
-
messages: {
|
|
2111
|
-
content: string | ({
|
|
2112
|
-
type: "text";
|
|
2113
|
-
text: string;
|
|
2114
|
-
cache_control?: {
|
|
2115
|
-
type: "ephemeral";
|
|
2116
|
-
} | undefined;
|
|
2117
|
-
} | {
|
|
2118
|
-
type: "tool_use";
|
|
1060
|
+
toolResults: {
|
|
2119
1061
|
name: string;
|
|
2120
1062
|
id: string;
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
1063
|
+
result: string;
|
|
1064
|
+
}[];
|
|
1065
|
+
prompt?: string | undefined;
|
|
1066
|
+
authToken?: string | undefined;
|
|
1067
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
1068
|
+
} | {
|
|
1069
|
+
type: "read-files-response";
|
|
1070
|
+
files: Record<string, string | null>;
|
|
1071
|
+
requestId?: string | undefined;
|
|
1072
|
+
} | {
|
|
1073
|
+
type: "init";
|
|
1074
|
+
fingerprintId: string;
|
|
1075
|
+
fileContext: {
|
|
1076
|
+
currentWorkingDirectory: string;
|
|
1077
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
1078
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
1079
|
+
knowledgeFiles: Record<string, string>;
|
|
1080
|
+
gitChanges: {
|
|
1081
|
+
status: string;
|
|
1082
|
+
diff: string;
|
|
1083
|
+
diffCached: string;
|
|
1084
|
+
lastCommitMessages: string;
|
|
2138
1085
|
};
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
fileContext: {
|
|
2155
|
-
currentWorkingDirectory: string;
|
|
2156
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
2157
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
2158
|
-
knowledgeFiles: Record<string, string>;
|
|
2159
|
-
gitChanges: {
|
|
2160
|
-
status: string;
|
|
2161
|
-
diff: string;
|
|
2162
|
-
diffCached: string;
|
|
2163
|
-
lastCommitMessages: string;
|
|
2164
|
-
};
|
|
2165
|
-
changesSinceLastChat: Record<string, string>;
|
|
2166
|
-
shellConfigFiles: Record<string, string>;
|
|
2167
|
-
systemInfo: {
|
|
2168
|
-
platform: string;
|
|
2169
|
-
shell: string;
|
|
2170
|
-
nodeVersion: string;
|
|
2171
|
-
arch: string;
|
|
2172
|
-
homedir: string;
|
|
2173
|
-
cpus: number;
|
|
1086
|
+
changesSinceLastChat: Record<string, string>;
|
|
1087
|
+
shellConfigFiles: Record<string, string>;
|
|
1088
|
+
systemInfo: {
|
|
1089
|
+
platform: string;
|
|
1090
|
+
shell: string;
|
|
1091
|
+
nodeVersion: string;
|
|
1092
|
+
arch: string;
|
|
1093
|
+
homedir: string;
|
|
1094
|
+
cpus: number;
|
|
1095
|
+
};
|
|
1096
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1097
|
+
fileVersions?: {
|
|
1098
|
+
path: string;
|
|
1099
|
+
content: string;
|
|
1100
|
+
}[][] | undefined;
|
|
2174
1101
|
};
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
1102
|
+
authToken?: string | undefined;
|
|
1103
|
+
} | {
|
|
1104
|
+
type: "generate-commit-message";
|
|
1105
|
+
fingerprintId: string;
|
|
1106
|
+
stagedChanges: string;
|
|
1107
|
+
authToken?: string | undefined;
|
|
2180
1108
|
};
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
1109
|
+
txid: number;
|
|
1110
|
+
}>;
|
|
1111
|
+
};
|
|
1112
|
+
export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
1113
|
+
type: z.ZodLiteral<"identify">;
|
|
1114
|
+
txid: z.ZodNumber;
|
|
1115
|
+
clientSessionId: z.ZodString;
|
|
1116
|
+
}, "strip", z.ZodTypeAny, {
|
|
1117
|
+
type: "identify";
|
|
1118
|
+
txid: number;
|
|
1119
|
+
clientSessionId: string;
|
|
1120
|
+
}, {
|
|
1121
|
+
type: "identify";
|
|
1122
|
+
txid: number;
|
|
1123
|
+
clientSessionId: string;
|
|
1124
|
+
}>, z.ZodObject<{
|
|
1125
|
+
type: z.ZodLiteral<"subscribe">;
|
|
1126
|
+
txid: z.ZodNumber;
|
|
1127
|
+
topics: z.ZodArray<z.ZodString, "many">;
|
|
1128
|
+
}, "strip", z.ZodTypeAny, {
|
|
1129
|
+
type: "subscribe";
|
|
1130
|
+
txid: number;
|
|
1131
|
+
topics: string[];
|
|
1132
|
+
}, {
|
|
1133
|
+
type: "subscribe";
|
|
1134
|
+
txid: number;
|
|
1135
|
+
topics: string[];
|
|
1136
|
+
}>, z.ZodObject<{
|
|
1137
|
+
type: z.ZodLiteral<"unsubscribe">;
|
|
1138
|
+
txid: z.ZodNumber;
|
|
1139
|
+
topics: z.ZodArray<z.ZodString, "many">;
|
|
1140
|
+
}, "strip", z.ZodTypeAny, {
|
|
1141
|
+
type: "unsubscribe";
|
|
1142
|
+
txid: number;
|
|
1143
|
+
topics: string[];
|
|
1144
|
+
}, {
|
|
1145
|
+
type: "unsubscribe";
|
|
1146
|
+
txid: number;
|
|
1147
|
+
topics: string[];
|
|
1148
|
+
}>, z.ZodObject<{
|
|
1149
|
+
type: z.ZodLiteral<"ping">;
|
|
1150
|
+
txid: z.ZodNumber;
|
|
1151
|
+
}, "strip", z.ZodTypeAny, {
|
|
1152
|
+
type: "ping";
|
|
1153
|
+
txid: number;
|
|
1154
|
+
}, {
|
|
1155
|
+
type: "ping";
|
|
1156
|
+
txid: number;
|
|
1157
|
+
}>, z.ZodObject<{
|
|
1158
|
+
type: z.ZodLiteral<"action">;
|
|
1159
|
+
txid: z.ZodNumber;
|
|
1160
|
+
data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2226
1161
|
type: z.ZodLiteral<"prompt">;
|
|
2227
1162
|
promptId: z.ZodString;
|
|
2228
1163
|
prompt: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
|
|
@@ -2404,15 +1339,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2404
1339
|
type: "ephemeral";
|
|
2405
1340
|
}>>;
|
|
2406
1341
|
}, "strip", z.ZodTypeAny, {
|
|
2407
|
-
content: string;
|
|
2408
1342
|
type: "tool_result";
|
|
1343
|
+
content: string;
|
|
2409
1344
|
tool_use_id: string;
|
|
2410
1345
|
cache_control?: {
|
|
2411
1346
|
type: "ephemeral";
|
|
2412
1347
|
} | undefined;
|
|
2413
1348
|
}, {
|
|
2414
|
-
content: string;
|
|
2415
1349
|
type: "tool_result";
|
|
1350
|
+
content: string;
|
|
2416
1351
|
tool_use_id: string;
|
|
2417
1352
|
cache_control?: {
|
|
2418
1353
|
type: "ephemeral";
|
|
@@ -2476,8 +1411,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2476
1411
|
type: "ephemeral";
|
|
2477
1412
|
} | undefined;
|
|
2478
1413
|
} | {
|
|
2479
|
-
content: string;
|
|
2480
1414
|
type: "tool_result";
|
|
1415
|
+
content: string;
|
|
2481
1416
|
tool_use_id: string;
|
|
2482
1417
|
cache_control?: {
|
|
2483
1418
|
type: "ephemeral";
|
|
@@ -2510,8 +1445,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2510
1445
|
type: "ephemeral";
|
|
2511
1446
|
} | undefined;
|
|
2512
1447
|
} | {
|
|
2513
|
-
content: string;
|
|
2514
1448
|
type: "tool_result";
|
|
1449
|
+
content: string;
|
|
2515
1450
|
tool_use_id: string;
|
|
2516
1451
|
cache_control?: {
|
|
2517
1452
|
type: "ephemeral";
|
|
@@ -2529,6 +1464,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2529
1464
|
})[];
|
|
2530
1465
|
role: "user" | "assistant";
|
|
2531
1466
|
}>, "many">;
|
|
1467
|
+
lastUserPromptIndex: z.ZodOptional<z.ZodNumber>;
|
|
2532
1468
|
}, "strip", z.ZodTypeAny, {
|
|
2533
1469
|
agentContext: string;
|
|
2534
1470
|
fileContext: {
|
|
@@ -2574,8 +1510,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2574
1510
|
type: "ephemeral";
|
|
2575
1511
|
} | undefined;
|
|
2576
1512
|
} | {
|
|
2577
|
-
content: string;
|
|
2578
1513
|
type: "tool_result";
|
|
1514
|
+
content: string;
|
|
2579
1515
|
tool_use_id: string;
|
|
2580
1516
|
cache_control?: {
|
|
2581
1517
|
type: "ephemeral";
|
|
@@ -2593,6 +1529,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2593
1529
|
})[];
|
|
2594
1530
|
role: "user" | "assistant";
|
|
2595
1531
|
}[];
|
|
1532
|
+
lastUserPromptIndex?: number | undefined;
|
|
2596
1533
|
}, {
|
|
2597
1534
|
agentContext: string;
|
|
2598
1535
|
fileContext: {
|
|
@@ -2638,8 +1575,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2638
1575
|
type: "ephemeral";
|
|
2639
1576
|
} | undefined;
|
|
2640
1577
|
} | {
|
|
2641
|
-
content: string;
|
|
2642
1578
|
type: "tool_result";
|
|
1579
|
+
content: string;
|
|
2643
1580
|
tool_use_id: string;
|
|
2644
1581
|
cache_control?: {
|
|
2645
1582
|
type: "ephemeral";
|
|
@@ -2657,6 +1594,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2657
1594
|
})[];
|
|
2658
1595
|
role: "user" | "assistant";
|
|
2659
1596
|
}[];
|
|
1597
|
+
lastUserPromptIndex?: number | undefined;
|
|
2660
1598
|
}>;
|
|
2661
1599
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
2662
1600
|
name: z.ZodString;
|
|
@@ -2673,9 +1611,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2673
1611
|
}>, "many">;
|
|
2674
1612
|
}, "strip", z.ZodTypeAny, {
|
|
2675
1613
|
type: "prompt";
|
|
2676
|
-
fingerprintId: string;
|
|
2677
|
-
costMode: "max" | "lite" | "normal";
|
|
2678
1614
|
promptId: string;
|
|
1615
|
+
fingerprintId: string;
|
|
1616
|
+
costMode: "lite" | "normal" | "max";
|
|
2679
1617
|
agentState: {
|
|
2680
1618
|
agentContext: string;
|
|
2681
1619
|
fileContext: {
|
|
@@ -2721,8 +1659,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2721
1659
|
type: "ephemeral";
|
|
2722
1660
|
} | undefined;
|
|
2723
1661
|
} | {
|
|
2724
|
-
content: string;
|
|
2725
1662
|
type: "tool_result";
|
|
1663
|
+
content: string;
|
|
2726
1664
|
tool_use_id: string;
|
|
2727
1665
|
cache_control?: {
|
|
2728
1666
|
type: "ephemeral";
|
|
@@ -2740,18 +1678,19 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2740
1678
|
})[];
|
|
2741
1679
|
role: "user" | "assistant";
|
|
2742
1680
|
}[];
|
|
1681
|
+
lastUserPromptIndex?: number | undefined;
|
|
2743
1682
|
};
|
|
2744
1683
|
toolResults: {
|
|
2745
1684
|
name: string;
|
|
2746
1685
|
id: string;
|
|
2747
1686
|
result: string;
|
|
2748
1687
|
}[];
|
|
2749
|
-
authToken?: string | undefined;
|
|
2750
1688
|
prompt?: string | undefined;
|
|
1689
|
+
authToken?: string | undefined;
|
|
2751
1690
|
}, {
|
|
2752
1691
|
type: "prompt";
|
|
2753
|
-
fingerprintId: string;
|
|
2754
1692
|
promptId: string;
|
|
1693
|
+
fingerprintId: string;
|
|
2755
1694
|
agentState: {
|
|
2756
1695
|
agentContext: string;
|
|
2757
1696
|
fileContext: {
|
|
@@ -2797,8 +1736,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2797
1736
|
type: "ephemeral";
|
|
2798
1737
|
} | undefined;
|
|
2799
1738
|
} | {
|
|
2800
|
-
content: string;
|
|
2801
1739
|
type: "tool_result";
|
|
1740
|
+
content: string;
|
|
2802
1741
|
tool_use_id: string;
|
|
2803
1742
|
cache_control?: {
|
|
2804
1743
|
type: "ephemeral";
|
|
@@ -2816,15 +1755,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2816
1755
|
})[];
|
|
2817
1756
|
role: "user" | "assistant";
|
|
2818
1757
|
}[];
|
|
1758
|
+
lastUserPromptIndex?: number | undefined;
|
|
2819
1759
|
};
|
|
2820
1760
|
toolResults: {
|
|
2821
1761
|
name: string;
|
|
2822
1762
|
id: string;
|
|
2823
1763
|
result: string;
|
|
2824
1764
|
}[];
|
|
2825
|
-
authToken?: string | undefined;
|
|
2826
|
-
costMode?: "max" | "lite" | "normal" | undefined;
|
|
2827
1765
|
prompt?: string | undefined;
|
|
1766
|
+
authToken?: string | undefined;
|
|
1767
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
2828
1768
|
}>, z.ZodObject<{
|
|
2829
1769
|
type: z.ZodLiteral<"read-files-response">;
|
|
2830
1770
|
files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
@@ -2952,6 +1892,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2952
1892
|
}>;
|
|
2953
1893
|
}, "strip", z.ZodTypeAny, {
|
|
2954
1894
|
type: "init";
|
|
1895
|
+
fingerprintId: string;
|
|
2955
1896
|
fileContext: {
|
|
2956
1897
|
currentWorkingDirectory: string;
|
|
2957
1898
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -2979,10 +1920,10 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2979
1920
|
content: string;
|
|
2980
1921
|
}[][] | undefined;
|
|
2981
1922
|
};
|
|
2982
|
-
fingerprintId: string;
|
|
2983
1923
|
authToken?: string | undefined;
|
|
2984
1924
|
}, {
|
|
2985
1925
|
type: "init";
|
|
1926
|
+
fingerprintId: string;
|
|
2986
1927
|
fileContext: {
|
|
2987
1928
|
currentWorkingDirectory: string;
|
|
2988
1929
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -3010,7 +1951,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3010
1951
|
content: string;
|
|
3011
1952
|
}[][] | undefined;
|
|
3012
1953
|
};
|
|
3013
|
-
fingerprintId: string;
|
|
3014
1954
|
authToken?: string | undefined;
|
|
3015
1955
|
}>, z.ZodObject<{
|
|
3016
1956
|
type: z.ZodLiteral<"generate-commit-message">;
|
|
@@ -3018,96 +1958,23 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3018
1958
|
authToken: z.ZodOptional<z.ZodString>;
|
|
3019
1959
|
stagedChanges: z.ZodString;
|
|
3020
1960
|
}, "strip", z.ZodTypeAny, {
|
|
3021
|
-
type: "generate-commit-message";
|
|
3022
|
-
fingerprintId: string;
|
|
3023
|
-
stagedChanges: string;
|
|
3024
|
-
authToken?: string | undefined;
|
|
3025
|
-
}, {
|
|
3026
|
-
type: "generate-commit-message";
|
|
3027
|
-
fingerprintId: string;
|
|
3028
|
-
stagedChanges: string;
|
|
3029
|
-
authToken?: string | undefined;
|
|
3030
|
-
}>]>;
|
|
3031
|
-
}, "strip", z.ZodTypeAny, {
|
|
3032
|
-
type: "action";
|
|
3033
|
-
data: {
|
|
3034
|
-
type: "user-input";
|
|
3035
|
-
fileContext: {
|
|
3036
|
-
currentWorkingDirectory: string;
|
|
3037
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
3038
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
3039
|
-
knowledgeFiles: Record<string, string>;
|
|
3040
|
-
gitChanges: {
|
|
3041
|
-
status: string;
|
|
3042
|
-
diff: string;
|
|
3043
|
-
diffCached: string;
|
|
3044
|
-
lastCommitMessages: string;
|
|
3045
|
-
};
|
|
3046
|
-
changesSinceLastChat: Record<string, string>;
|
|
3047
|
-
shellConfigFiles: Record<string, string>;
|
|
3048
|
-
systemInfo: {
|
|
3049
|
-
platform: string;
|
|
3050
|
-
shell: string;
|
|
3051
|
-
nodeVersion: string;
|
|
3052
|
-
arch: string;
|
|
3053
|
-
homedir: string;
|
|
3054
|
-
cpus: number;
|
|
3055
|
-
};
|
|
3056
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
3057
|
-
fileVersions?: {
|
|
3058
|
-
path: string;
|
|
3059
|
-
content: string;
|
|
3060
|
-
}[][] | undefined;
|
|
3061
|
-
};
|
|
1961
|
+
type: "generate-commit-message";
|
|
3062
1962
|
fingerprintId: string;
|
|
3063
|
-
|
|
3064
|
-
messages: {
|
|
3065
|
-
content: string | ({
|
|
3066
|
-
type: "text";
|
|
3067
|
-
text: string;
|
|
3068
|
-
cache_control?: {
|
|
3069
|
-
type: "ephemeral";
|
|
3070
|
-
} | undefined;
|
|
3071
|
-
} | {
|
|
3072
|
-
type: "tool_use";
|
|
3073
|
-
name: string;
|
|
3074
|
-
id: string;
|
|
3075
|
-
input: Record<string, any>;
|
|
3076
|
-
cache_control?: {
|
|
3077
|
-
type: "ephemeral";
|
|
3078
|
-
} | undefined;
|
|
3079
|
-
} | {
|
|
3080
|
-
content: string;
|
|
3081
|
-
type: "tool_result";
|
|
3082
|
-
tool_use_id: string;
|
|
3083
|
-
cache_control?: {
|
|
3084
|
-
type: "ephemeral";
|
|
3085
|
-
} | undefined;
|
|
3086
|
-
} | {
|
|
3087
|
-
type: "image";
|
|
3088
|
-
source: {
|
|
3089
|
-
type: "base64";
|
|
3090
|
-
media_type: "image/jpeg";
|
|
3091
|
-
data: string;
|
|
3092
|
-
};
|
|
3093
|
-
cache_control?: {
|
|
3094
|
-
type: "ephemeral";
|
|
3095
|
-
} | undefined;
|
|
3096
|
-
})[];
|
|
3097
|
-
role: "user" | "assistant";
|
|
3098
|
-
}[];
|
|
3099
|
-
changesAlreadyApplied: {
|
|
3100
|
-
path: string;
|
|
3101
|
-
content: string;
|
|
3102
|
-
type: "file" | "patch";
|
|
3103
|
-
}[];
|
|
3104
|
-
costMode: "max" | "lite" | "normal";
|
|
1963
|
+
stagedChanges: string;
|
|
3105
1964
|
authToken?: string | undefined;
|
|
3106
|
-
}
|
|
3107
|
-
type: "
|
|
1965
|
+
}, {
|
|
1966
|
+
type: "generate-commit-message";
|
|
3108
1967
|
fingerprintId: string;
|
|
3109
|
-
|
|
1968
|
+
stagedChanges: string;
|
|
1969
|
+
authToken?: string | undefined;
|
|
1970
|
+
}>]>;
|
|
1971
|
+
}, "strip", z.ZodTypeAny, {
|
|
1972
|
+
type: "action";
|
|
1973
|
+
data: {
|
|
1974
|
+
type: "prompt";
|
|
3110
1975
|
promptId: string;
|
|
1976
|
+
fingerprintId: string;
|
|
1977
|
+
costMode: "lite" | "normal" | "max";
|
|
3111
1978
|
agentState: {
|
|
3112
1979
|
agentContext: string;
|
|
3113
1980
|
fileContext: {
|
|
@@ -3153,8 +2020,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3153
2020
|
type: "ephemeral";
|
|
3154
2021
|
} | undefined;
|
|
3155
2022
|
} | {
|
|
3156
|
-
content: string;
|
|
3157
2023
|
type: "tool_result";
|
|
2024
|
+
content: string;
|
|
3158
2025
|
tool_use_id: string;
|
|
3159
2026
|
cache_control?: {
|
|
3160
2027
|
type: "ephemeral";
|
|
@@ -3172,20 +2039,22 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3172
2039
|
})[];
|
|
3173
2040
|
role: "user" | "assistant";
|
|
3174
2041
|
}[];
|
|
2042
|
+
lastUserPromptIndex?: number | undefined;
|
|
3175
2043
|
};
|
|
3176
2044
|
toolResults: {
|
|
3177
2045
|
name: string;
|
|
3178
2046
|
id: string;
|
|
3179
2047
|
result: string;
|
|
3180
2048
|
}[];
|
|
3181
|
-
authToken?: string | undefined;
|
|
3182
2049
|
prompt?: string | undefined;
|
|
2050
|
+
authToken?: string | undefined;
|
|
3183
2051
|
} | {
|
|
3184
2052
|
type: "read-files-response";
|
|
3185
2053
|
files: Record<string, string | null>;
|
|
3186
2054
|
requestId?: string | undefined;
|
|
3187
2055
|
} | {
|
|
3188
2056
|
type: "init";
|
|
2057
|
+
fingerprintId: string;
|
|
3189
2058
|
fileContext: {
|
|
3190
2059
|
currentWorkingDirectory: string;
|
|
3191
2060
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -3213,7 +2082,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3213
2082
|
content: string;
|
|
3214
2083
|
}[][] | undefined;
|
|
3215
2084
|
};
|
|
3216
|
-
fingerprintId: string;
|
|
3217
2085
|
authToken?: string | undefined;
|
|
3218
2086
|
} | {
|
|
3219
2087
|
type: "generate-commit-message";
|
|
@@ -3225,82 +2093,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3225
2093
|
}, {
|
|
3226
2094
|
type: "action";
|
|
3227
2095
|
data: {
|
|
3228
|
-
type: "user-input";
|
|
3229
|
-
fileContext: {
|
|
3230
|
-
currentWorkingDirectory: string;
|
|
3231
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
3232
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
3233
|
-
knowledgeFiles: Record<string, string>;
|
|
3234
|
-
gitChanges: {
|
|
3235
|
-
status: string;
|
|
3236
|
-
diff: string;
|
|
3237
|
-
diffCached: string;
|
|
3238
|
-
lastCommitMessages: string;
|
|
3239
|
-
};
|
|
3240
|
-
changesSinceLastChat: Record<string, string>;
|
|
3241
|
-
shellConfigFiles: Record<string, string>;
|
|
3242
|
-
systemInfo: {
|
|
3243
|
-
platform: string;
|
|
3244
|
-
shell: string;
|
|
3245
|
-
nodeVersion: string;
|
|
3246
|
-
arch: string;
|
|
3247
|
-
homedir: string;
|
|
3248
|
-
cpus: number;
|
|
3249
|
-
};
|
|
3250
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
3251
|
-
fileVersions?: {
|
|
3252
|
-
path: string;
|
|
3253
|
-
content: string;
|
|
3254
|
-
}[][] | undefined;
|
|
3255
|
-
};
|
|
3256
|
-
fingerprintId: string;
|
|
3257
|
-
userInputId: string;
|
|
3258
|
-
messages: {
|
|
3259
|
-
content: string | ({
|
|
3260
|
-
type: "text";
|
|
3261
|
-
text: string;
|
|
3262
|
-
cache_control?: {
|
|
3263
|
-
type: "ephemeral";
|
|
3264
|
-
} | undefined;
|
|
3265
|
-
} | {
|
|
3266
|
-
type: "tool_use";
|
|
3267
|
-
name: string;
|
|
3268
|
-
id: string;
|
|
3269
|
-
input: Record<string, any>;
|
|
3270
|
-
cache_control?: {
|
|
3271
|
-
type: "ephemeral";
|
|
3272
|
-
} | undefined;
|
|
3273
|
-
} | {
|
|
3274
|
-
content: string;
|
|
3275
|
-
type: "tool_result";
|
|
3276
|
-
tool_use_id: string;
|
|
3277
|
-
cache_control?: {
|
|
3278
|
-
type: "ephemeral";
|
|
3279
|
-
} | undefined;
|
|
3280
|
-
} | {
|
|
3281
|
-
type: "image";
|
|
3282
|
-
source: {
|
|
3283
|
-
type: "base64";
|
|
3284
|
-
media_type: "image/jpeg";
|
|
3285
|
-
data: string;
|
|
3286
|
-
};
|
|
3287
|
-
cache_control?: {
|
|
3288
|
-
type: "ephemeral";
|
|
3289
|
-
} | undefined;
|
|
3290
|
-
})[];
|
|
3291
|
-
role: "user" | "assistant";
|
|
3292
|
-
}[];
|
|
3293
|
-
changesAlreadyApplied: {
|
|
3294
|
-
path: string;
|
|
3295
|
-
content: string;
|
|
3296
|
-
type: "file" | "patch";
|
|
3297
|
-
}[];
|
|
3298
|
-
authToken?: string | undefined;
|
|
3299
|
-
costMode?: "max" | "lite" | "normal" | undefined;
|
|
3300
|
-
} | {
|
|
3301
2096
|
type: "prompt";
|
|
3302
|
-
fingerprintId: string;
|
|
3303
2097
|
promptId: string;
|
|
2098
|
+
fingerprintId: string;
|
|
3304
2099
|
agentState: {
|
|
3305
2100
|
agentContext: string;
|
|
3306
2101
|
fileContext: {
|
|
@@ -3346,8 +2141,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3346
2141
|
type: "ephemeral";
|
|
3347
2142
|
} | undefined;
|
|
3348
2143
|
} | {
|
|
3349
|
-
content: string;
|
|
3350
2144
|
type: "tool_result";
|
|
2145
|
+
content: string;
|
|
3351
2146
|
tool_use_id: string;
|
|
3352
2147
|
cache_control?: {
|
|
3353
2148
|
type: "ephemeral";
|
|
@@ -3365,21 +2160,23 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3365
2160
|
})[];
|
|
3366
2161
|
role: "user" | "assistant";
|
|
3367
2162
|
}[];
|
|
2163
|
+
lastUserPromptIndex?: number | undefined;
|
|
3368
2164
|
};
|
|
3369
2165
|
toolResults: {
|
|
3370
2166
|
name: string;
|
|
3371
2167
|
id: string;
|
|
3372
2168
|
result: string;
|
|
3373
2169
|
}[];
|
|
3374
|
-
authToken?: string | undefined;
|
|
3375
|
-
costMode?: "max" | "lite" | "normal" | undefined;
|
|
3376
2170
|
prompt?: string | undefined;
|
|
2171
|
+
authToken?: string | undefined;
|
|
2172
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
3377
2173
|
} | {
|
|
3378
2174
|
type: "read-files-response";
|
|
3379
2175
|
files: Record<string, string | null>;
|
|
3380
2176
|
requestId?: string | undefined;
|
|
3381
2177
|
} | {
|
|
3382
2178
|
type: "init";
|
|
2179
|
+
fingerprintId: string;
|
|
3383
2180
|
fileContext: {
|
|
3384
2181
|
currentWorkingDirectory: string;
|
|
3385
2182
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -3407,7 +2204,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3407
2204
|
content: string;
|
|
3408
2205
|
}[][] | undefined;
|
|
3409
2206
|
};
|
|
3410
|
-
fingerprintId: string;
|
|
3411
2207
|
authToken?: string | undefined;
|
|
3412
2208
|
} | {
|
|
3413
2209
|
type: "generate-commit-message";
|
|
@@ -3459,26 +2255,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3459
2255
|
path: z.ZodString;
|
|
3460
2256
|
content: z.ZodString;
|
|
3461
2257
|
}, "strip", z.ZodTypeAny, {
|
|
2258
|
+
type: "patch" | "file";
|
|
3462
2259
|
path: string;
|
|
3463
2260
|
content: string;
|
|
3464
|
-
type: "file" | "patch";
|
|
3465
2261
|
}, {
|
|
2262
|
+
type: "patch" | "file";
|
|
3466
2263
|
path: string;
|
|
3467
2264
|
content: string;
|
|
3468
|
-
type: "file" | "patch";
|
|
3469
2265
|
}>, "many">;
|
|
3470
2266
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
3471
2267
|
type: z.ZodEnum<["patch", "file"]>;
|
|
3472
2268
|
path: z.ZodString;
|
|
3473
2269
|
content: z.ZodString;
|
|
3474
2270
|
}, "strip", z.ZodTypeAny, {
|
|
2271
|
+
type: "patch" | "file";
|
|
3475
2272
|
path: string;
|
|
3476
2273
|
content: string;
|
|
3477
|
-
type: "file" | "patch";
|
|
3478
2274
|
}, {
|
|
2275
|
+
type: "patch" | "file";
|
|
3479
2276
|
path: string;
|
|
3480
2277
|
content: string;
|
|
3481
|
-
type: "file" | "patch";
|
|
3482
2278
|
}>, "many">;
|
|
3483
2279
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
3484
2280
|
path: z.ZodString;
|
|
@@ -3501,16 +2297,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3501
2297
|
}>, "strip", z.ZodTypeAny, {
|
|
3502
2298
|
type: "response-complete";
|
|
3503
2299
|
userInputId: string;
|
|
3504
|
-
|
|
2300
|
+
response: string;
|
|
2301
|
+
changes: {
|
|
2302
|
+
type: "patch" | "file";
|
|
3505
2303
|
path: string;
|
|
3506
2304
|
content: string;
|
|
3507
|
-
type: "file" | "patch";
|
|
3508
2305
|
}[];
|
|
3509
|
-
|
|
3510
|
-
|
|
2306
|
+
changesAlreadyApplied: {
|
|
2307
|
+
type: "patch" | "file";
|
|
3511
2308
|
path: string;
|
|
3512
2309
|
content: string;
|
|
3513
|
-
type: "file" | "patch";
|
|
3514
2310
|
}[];
|
|
3515
2311
|
addedFileVersions: {
|
|
3516
2312
|
path: string;
|
|
@@ -3526,16 +2322,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3526
2322
|
}, {
|
|
3527
2323
|
type: "response-complete";
|
|
3528
2324
|
userInputId: string;
|
|
3529
|
-
|
|
2325
|
+
response: string;
|
|
2326
|
+
changes: {
|
|
2327
|
+
type: "patch" | "file";
|
|
3530
2328
|
path: string;
|
|
3531
2329
|
content: string;
|
|
3532
|
-
type: "file" | "patch";
|
|
3533
2330
|
}[];
|
|
3534
|
-
|
|
3535
|
-
|
|
2331
|
+
changesAlreadyApplied: {
|
|
2332
|
+
type: "patch" | "file";
|
|
3536
2333
|
path: string;
|
|
3537
2334
|
content: string;
|
|
3538
|
-
type: "file" | "patch";
|
|
3539
2335
|
}[];
|
|
3540
2336
|
addedFileVersions: {
|
|
3541
2337
|
path: string;
|
|
@@ -3726,15 +2522,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3726
2522
|
type: "ephemeral";
|
|
3727
2523
|
}>>;
|
|
3728
2524
|
}, "strip", z.ZodTypeAny, {
|
|
3729
|
-
content: string;
|
|
3730
2525
|
type: "tool_result";
|
|
2526
|
+
content: string;
|
|
3731
2527
|
tool_use_id: string;
|
|
3732
2528
|
cache_control?: {
|
|
3733
2529
|
type: "ephemeral";
|
|
3734
2530
|
} | undefined;
|
|
3735
2531
|
}, {
|
|
3736
|
-
content: string;
|
|
3737
2532
|
type: "tool_result";
|
|
2533
|
+
content: string;
|
|
3738
2534
|
tool_use_id: string;
|
|
3739
2535
|
cache_control?: {
|
|
3740
2536
|
type: "ephemeral";
|
|
@@ -3798,8 +2594,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3798
2594
|
type: "ephemeral";
|
|
3799
2595
|
} | undefined;
|
|
3800
2596
|
} | {
|
|
3801
|
-
content: string;
|
|
3802
2597
|
type: "tool_result";
|
|
2598
|
+
content: string;
|
|
3803
2599
|
tool_use_id: string;
|
|
3804
2600
|
cache_control?: {
|
|
3805
2601
|
type: "ephemeral";
|
|
@@ -3832,8 +2628,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3832
2628
|
type: "ephemeral";
|
|
3833
2629
|
} | undefined;
|
|
3834
2630
|
} | {
|
|
3835
|
-
content: string;
|
|
3836
2631
|
type: "tool_result";
|
|
2632
|
+
content: string;
|
|
3837
2633
|
tool_use_id: string;
|
|
3838
2634
|
cache_control?: {
|
|
3839
2635
|
type: "ephemeral";
|
|
@@ -3851,6 +2647,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3851
2647
|
})[];
|
|
3852
2648
|
role: "user" | "assistant";
|
|
3853
2649
|
}>, "many">;
|
|
2650
|
+
lastUserPromptIndex: z.ZodOptional<z.ZodNumber>;
|
|
3854
2651
|
}, "strip", z.ZodTypeAny, {
|
|
3855
2652
|
agentContext: string;
|
|
3856
2653
|
fileContext: {
|
|
@@ -3896,8 +2693,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3896
2693
|
type: "ephemeral";
|
|
3897
2694
|
} | undefined;
|
|
3898
2695
|
} | {
|
|
3899
|
-
content: string;
|
|
3900
2696
|
type: "tool_result";
|
|
2697
|
+
content: string;
|
|
3901
2698
|
tool_use_id: string;
|
|
3902
2699
|
cache_control?: {
|
|
3903
2700
|
type: "ephemeral";
|
|
@@ -3915,6 +2712,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3915
2712
|
})[];
|
|
3916
2713
|
role: "user" | "assistant";
|
|
3917
2714
|
}[];
|
|
2715
|
+
lastUserPromptIndex?: number | undefined;
|
|
3918
2716
|
}, {
|
|
3919
2717
|
agentContext: string;
|
|
3920
2718
|
fileContext: {
|
|
@@ -3960,8 +2758,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3960
2758
|
type: "ephemeral";
|
|
3961
2759
|
} | undefined;
|
|
3962
2760
|
} | {
|
|
3963
|
-
content: string;
|
|
3964
2761
|
type: "tool_result";
|
|
2762
|
+
content: string;
|
|
3965
2763
|
tool_use_id: string;
|
|
3966
2764
|
cache_control?: {
|
|
3967
2765
|
type: "ephemeral";
|
|
@@ -3979,6 +2777,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3979
2777
|
})[];
|
|
3980
2778
|
role: "user" | "assistant";
|
|
3981
2779
|
}[];
|
|
2780
|
+
lastUserPromptIndex?: number | undefined;
|
|
3982
2781
|
}>;
|
|
3983
2782
|
toolCalls: z.ZodArray<z.ZodObject<{
|
|
3984
2783
|
name: z.ZodString;
|
|
@@ -3986,12 +2785,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3986
2785
|
id: z.ZodString;
|
|
3987
2786
|
}, "strip", z.ZodTypeAny, {
|
|
3988
2787
|
name: string;
|
|
3989
|
-
parameters: Record<string, string>;
|
|
3990
2788
|
id: string;
|
|
2789
|
+
parameters: Record<string, string>;
|
|
3991
2790
|
}, {
|
|
3992
2791
|
name: string;
|
|
3993
|
-
parameters: Record<string, string>;
|
|
3994
2792
|
id: string;
|
|
2793
|
+
parameters: Record<string, string>;
|
|
3995
2794
|
}>, "many">;
|
|
3996
2795
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
3997
2796
|
name: z.ZodString;
|
|
@@ -4054,8 +2853,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4054
2853
|
type: "ephemeral";
|
|
4055
2854
|
} | undefined;
|
|
4056
2855
|
} | {
|
|
4057
|
-
content: string;
|
|
4058
2856
|
type: "tool_result";
|
|
2857
|
+
content: string;
|
|
4059
2858
|
tool_use_id: string;
|
|
4060
2859
|
cache_control?: {
|
|
4061
2860
|
type: "ephemeral";
|
|
@@ -4073,6 +2872,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4073
2872
|
})[];
|
|
4074
2873
|
role: "user" | "assistant";
|
|
4075
2874
|
}[];
|
|
2875
|
+
lastUserPromptIndex?: number | undefined;
|
|
4076
2876
|
};
|
|
4077
2877
|
toolResults: {
|
|
4078
2878
|
name: string;
|
|
@@ -4081,8 +2881,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4081
2881
|
}[];
|
|
4082
2882
|
toolCalls: {
|
|
4083
2883
|
name: string;
|
|
4084
|
-
parameters: Record<string, string>;
|
|
4085
2884
|
id: string;
|
|
2885
|
+
parameters: Record<string, string>;
|
|
4086
2886
|
}[];
|
|
4087
2887
|
}, {
|
|
4088
2888
|
type: "prompt-response";
|
|
@@ -4132,8 +2932,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4132
2932
|
type: "ephemeral";
|
|
4133
2933
|
} | undefined;
|
|
4134
2934
|
} | {
|
|
4135
|
-
content: string;
|
|
4136
2935
|
type: "tool_result";
|
|
2936
|
+
content: string;
|
|
4137
2937
|
tool_use_id: string;
|
|
4138
2938
|
cache_control?: {
|
|
4139
2939
|
type: "ephemeral";
|
|
@@ -4151,6 +2951,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4151
2951
|
})[];
|
|
4152
2952
|
role: "user" | "assistant";
|
|
4153
2953
|
}[];
|
|
2954
|
+
lastUserPromptIndex?: number | undefined;
|
|
4154
2955
|
};
|
|
4155
2956
|
toolResults: {
|
|
4156
2957
|
name: string;
|
|
@@ -4159,8 +2960,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4159
2960
|
}[];
|
|
4160
2961
|
toolCalls: {
|
|
4161
2962
|
name: string;
|
|
4162
|
-
parameters: Record<string, string>;
|
|
4163
2963
|
id: string;
|
|
2964
|
+
parameters: Record<string, string>;
|
|
4164
2965
|
}[];
|
|
4165
2966
|
}>, z.ZodObject<{
|
|
4166
2967
|
type: z.ZodLiteral<"read-files">;
|
|
@@ -4196,26 +2997,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4196
2997
|
path: z.ZodString;
|
|
4197
2998
|
content: z.ZodString;
|
|
4198
2999
|
}, "strip", z.ZodTypeAny, {
|
|
3000
|
+
type: "patch" | "file";
|
|
4199
3001
|
path: string;
|
|
4200
3002
|
content: string;
|
|
4201
|
-
type: "file" | "patch";
|
|
4202
3003
|
}, {
|
|
3004
|
+
type: "patch" | "file";
|
|
4203
3005
|
path: string;
|
|
4204
3006
|
content: string;
|
|
4205
|
-
type: "file" | "patch";
|
|
4206
3007
|
}>, "many">;
|
|
4207
3008
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
4208
3009
|
type: z.ZodEnum<["patch", "file"]>;
|
|
4209
3010
|
path: z.ZodString;
|
|
4210
3011
|
content: z.ZodString;
|
|
4211
3012
|
}, "strip", z.ZodTypeAny, {
|
|
3013
|
+
type: "patch" | "file";
|
|
4212
3014
|
path: string;
|
|
4213
3015
|
content: string;
|
|
4214
|
-
type: "file" | "patch";
|
|
4215
3016
|
}, {
|
|
3017
|
+
type: "patch" | "file";
|
|
4216
3018
|
path: string;
|
|
4217
3019
|
content: string;
|
|
4218
|
-
type: "file" | "patch";
|
|
4219
3020
|
}>, "many">;
|
|
4220
3021
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
4221
3022
|
path: z.ZodString;
|
|
@@ -4236,16 +3037,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4236
3037
|
input: Record<string, any>;
|
|
4237
3038
|
};
|
|
4238
3039
|
userInputId: string;
|
|
4239
|
-
|
|
3040
|
+
response: string;
|
|
3041
|
+
changes: {
|
|
3042
|
+
type: "patch" | "file";
|
|
4240
3043
|
path: string;
|
|
4241
3044
|
content: string;
|
|
4242
|
-
type: "file" | "patch";
|
|
4243
3045
|
}[];
|
|
4244
|
-
|
|
4245
|
-
|
|
3046
|
+
changesAlreadyApplied: {
|
|
3047
|
+
type: "patch" | "file";
|
|
4246
3048
|
path: string;
|
|
4247
3049
|
content: string;
|
|
4248
|
-
type: "file" | "patch";
|
|
4249
3050
|
}[];
|
|
4250
3051
|
addedFileVersions: {
|
|
4251
3052
|
path: string;
|
|
@@ -4260,16 +3061,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4260
3061
|
input: Record<string, any>;
|
|
4261
3062
|
};
|
|
4262
3063
|
userInputId: string;
|
|
4263
|
-
|
|
3064
|
+
response: string;
|
|
3065
|
+
changes: {
|
|
3066
|
+
type: "patch" | "file";
|
|
4264
3067
|
path: string;
|
|
4265
3068
|
content: string;
|
|
4266
|
-
type: "file" | "patch";
|
|
4267
3069
|
}[];
|
|
4268
|
-
|
|
4269
|
-
|
|
3070
|
+
changesAlreadyApplied: {
|
|
3071
|
+
type: "patch" | "file";
|
|
4270
3072
|
path: string;
|
|
4271
3073
|
content: string;
|
|
4272
|
-
type: "file" | "patch";
|
|
4273
3074
|
}[];
|
|
4274
3075
|
addedFileVersions: {
|
|
4275
3076
|
path: string;
|
|
@@ -4366,11 +3167,11 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4366
3167
|
type: z.ZodLiteral<"action-error">;
|
|
4367
3168
|
message: z.ZodString;
|
|
4368
3169
|
}, "strip", z.ZodTypeAny, {
|
|
4369
|
-
message: string;
|
|
4370
3170
|
type: "action-error";
|
|
4371
|
-
}, {
|
|
4372
3171
|
message: string;
|
|
3172
|
+
}, {
|
|
4373
3173
|
type: "action-error";
|
|
3174
|
+
message: string;
|
|
4374
3175
|
}>, z.ZodObject<{
|
|
4375
3176
|
type: z.ZodLiteral<"commit-message-response">;
|
|
4376
3177
|
commitMessage: z.ZodString;
|
|
@@ -4402,16 +3203,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4402
3203
|
} | {
|
|
4403
3204
|
type: "response-complete";
|
|
4404
3205
|
userInputId: string;
|
|
4405
|
-
|
|
3206
|
+
response: string;
|
|
3207
|
+
changes: {
|
|
3208
|
+
type: "patch" | "file";
|
|
4406
3209
|
path: string;
|
|
4407
3210
|
content: string;
|
|
4408
|
-
type: "file" | "patch";
|
|
4409
3211
|
}[];
|
|
4410
|
-
|
|
4411
|
-
|
|
3212
|
+
changesAlreadyApplied: {
|
|
3213
|
+
type: "patch" | "file";
|
|
4412
3214
|
path: string;
|
|
4413
3215
|
content: string;
|
|
4414
|
-
type: "file" | "patch";
|
|
4415
3216
|
}[];
|
|
4416
3217
|
addedFileVersions: {
|
|
4417
3218
|
path: string;
|
|
@@ -4476,8 +3277,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4476
3277
|
type: "ephemeral";
|
|
4477
3278
|
} | undefined;
|
|
4478
3279
|
} | {
|
|
4479
|
-
content: string;
|
|
4480
3280
|
type: "tool_result";
|
|
3281
|
+
content: string;
|
|
4481
3282
|
tool_use_id: string;
|
|
4482
3283
|
cache_control?: {
|
|
4483
3284
|
type: "ephemeral";
|
|
@@ -4495,6 +3296,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4495
3296
|
})[];
|
|
4496
3297
|
role: "user" | "assistant";
|
|
4497
3298
|
}[];
|
|
3299
|
+
lastUserPromptIndex?: number | undefined;
|
|
4498
3300
|
};
|
|
4499
3301
|
toolResults: {
|
|
4500
3302
|
name: string;
|
|
@@ -4503,8 +3305,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4503
3305
|
}[];
|
|
4504
3306
|
toolCalls: {
|
|
4505
3307
|
name: string;
|
|
4506
|
-
parameters: Record<string, string>;
|
|
4507
3308
|
id: string;
|
|
3309
|
+
parameters: Record<string, string>;
|
|
4508
3310
|
}[];
|
|
4509
3311
|
} | {
|
|
4510
3312
|
type: "response-chunk";
|
|
@@ -4522,16 +3324,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4522
3324
|
input: Record<string, any>;
|
|
4523
3325
|
};
|
|
4524
3326
|
userInputId: string;
|
|
4525
|
-
|
|
3327
|
+
response: string;
|
|
3328
|
+
changes: {
|
|
3329
|
+
type: "patch" | "file";
|
|
4526
3330
|
path: string;
|
|
4527
3331
|
content: string;
|
|
4528
|
-
type: "file" | "patch";
|
|
4529
3332
|
}[];
|
|
4530
|
-
|
|
4531
|
-
|
|
3333
|
+
changesAlreadyApplied: {
|
|
3334
|
+
type: "patch" | "file";
|
|
4532
3335
|
path: string;
|
|
4533
3336
|
content: string;
|
|
4534
|
-
type: "file" | "patch";
|
|
4535
3337
|
}[];
|
|
4536
3338
|
addedFileVersions: {
|
|
4537
3339
|
path: string;
|
|
@@ -4547,8 +3349,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4547
3349
|
isUpToDate: boolean;
|
|
4548
3350
|
latestVersion: string;
|
|
4549
3351
|
} | {
|
|
4550
|
-
message: string;
|
|
4551
3352
|
type: "action-error";
|
|
3353
|
+
message: string;
|
|
4552
3354
|
} | {
|
|
4553
3355
|
type: "commit-message-response";
|
|
4554
3356
|
commitMessage: string;
|
|
@@ -4574,16 +3376,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4574
3376
|
} | {
|
|
4575
3377
|
type: "response-complete";
|
|
4576
3378
|
userInputId: string;
|
|
4577
|
-
|
|
3379
|
+
response: string;
|
|
3380
|
+
changes: {
|
|
3381
|
+
type: "patch" | "file";
|
|
4578
3382
|
path: string;
|
|
4579
3383
|
content: string;
|
|
4580
|
-
type: "file" | "patch";
|
|
4581
3384
|
}[];
|
|
4582
|
-
|
|
4583
|
-
|
|
3385
|
+
changesAlreadyApplied: {
|
|
3386
|
+
type: "patch" | "file";
|
|
4584
3387
|
path: string;
|
|
4585
3388
|
content: string;
|
|
4586
|
-
type: "file" | "patch";
|
|
4587
3389
|
}[];
|
|
4588
3390
|
addedFileVersions: {
|
|
4589
3391
|
path: string;
|
|
@@ -4648,8 +3450,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4648
3450
|
type: "ephemeral";
|
|
4649
3451
|
} | undefined;
|
|
4650
3452
|
} | {
|
|
4651
|
-
content: string;
|
|
4652
3453
|
type: "tool_result";
|
|
3454
|
+
content: string;
|
|
4653
3455
|
tool_use_id: string;
|
|
4654
3456
|
cache_control?: {
|
|
4655
3457
|
type: "ephemeral";
|
|
@@ -4667,6 +3469,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4667
3469
|
})[];
|
|
4668
3470
|
role: "user" | "assistant";
|
|
4669
3471
|
}[];
|
|
3472
|
+
lastUserPromptIndex?: number | undefined;
|
|
4670
3473
|
};
|
|
4671
3474
|
toolResults: {
|
|
4672
3475
|
name: string;
|
|
@@ -4675,8 +3478,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4675
3478
|
}[];
|
|
4676
3479
|
toolCalls: {
|
|
4677
3480
|
name: string;
|
|
4678
|
-
parameters: Record<string, string>;
|
|
4679
3481
|
id: string;
|
|
3482
|
+
parameters: Record<string, string>;
|
|
4680
3483
|
}[];
|
|
4681
3484
|
} | {
|
|
4682
3485
|
type: "response-chunk";
|
|
@@ -4694,16 +3497,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4694
3497
|
input: Record<string, any>;
|
|
4695
3498
|
};
|
|
4696
3499
|
userInputId: string;
|
|
4697
|
-
|
|
3500
|
+
response: string;
|
|
3501
|
+
changes: {
|
|
3502
|
+
type: "patch" | "file";
|
|
4698
3503
|
path: string;
|
|
4699
3504
|
content: string;
|
|
4700
|
-
type: "file" | "patch";
|
|
4701
3505
|
}[];
|
|
4702
|
-
|
|
4703
|
-
|
|
3506
|
+
changesAlreadyApplied: {
|
|
3507
|
+
type: "patch" | "file";
|
|
4704
3508
|
path: string;
|
|
4705
3509
|
content: string;
|
|
4706
|
-
type: "file" | "patch";
|
|
4707
3510
|
}[];
|
|
4708
3511
|
addedFileVersions: {
|
|
4709
3512
|
path: string;
|
|
@@ -4719,8 +3522,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4719
3522
|
isUpToDate: boolean;
|
|
4720
3523
|
latestVersion: string;
|
|
4721
3524
|
} | {
|
|
4722
|
-
message: string;
|
|
4723
3525
|
type: "action-error";
|
|
3526
|
+
message: string;
|
|
4724
3527
|
} | {
|
|
4725
3528
|
type: "commit-message-response";
|
|
4726
3529
|
commitMessage: string;
|
|
@@ -4765,26 +3568,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4765
3568
|
path: z.ZodString;
|
|
4766
3569
|
content: z.ZodString;
|
|
4767
3570
|
}, "strip", z.ZodTypeAny, {
|
|
3571
|
+
type: "patch" | "file";
|
|
4768
3572
|
path: string;
|
|
4769
3573
|
content: string;
|
|
4770
|
-
type: "file" | "patch";
|
|
4771
3574
|
}, {
|
|
3575
|
+
type: "patch" | "file";
|
|
4772
3576
|
path: string;
|
|
4773
3577
|
content: string;
|
|
4774
|
-
type: "file" | "patch";
|
|
4775
3578
|
}>, "many">;
|
|
4776
3579
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
4777
3580
|
type: z.ZodEnum<["patch", "file"]>;
|
|
4778
3581
|
path: z.ZodString;
|
|
4779
3582
|
content: z.ZodString;
|
|
4780
3583
|
}, "strip", z.ZodTypeAny, {
|
|
3584
|
+
type: "patch" | "file";
|
|
4781
3585
|
path: string;
|
|
4782
3586
|
content: string;
|
|
4783
|
-
type: "file" | "patch";
|
|
4784
3587
|
}, {
|
|
3588
|
+
type: "patch" | "file";
|
|
4785
3589
|
path: string;
|
|
4786
3590
|
content: string;
|
|
4787
|
-
type: "file" | "patch";
|
|
4788
3591
|
}>, "many">;
|
|
4789
3592
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
4790
3593
|
path: z.ZodString;
|
|
@@ -4807,16 +3610,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4807
3610
|
}>, "strip", z.ZodTypeAny, {
|
|
4808
3611
|
type: "response-complete";
|
|
4809
3612
|
userInputId: string;
|
|
4810
|
-
|
|
3613
|
+
response: string;
|
|
3614
|
+
changes: {
|
|
3615
|
+
type: "patch" | "file";
|
|
4811
3616
|
path: string;
|
|
4812
3617
|
content: string;
|
|
4813
|
-
type: "file" | "patch";
|
|
4814
3618
|
}[];
|
|
4815
|
-
|
|
4816
|
-
|
|
3619
|
+
changesAlreadyApplied: {
|
|
3620
|
+
type: "patch" | "file";
|
|
4817
3621
|
path: string;
|
|
4818
3622
|
content: string;
|
|
4819
|
-
type: "file" | "patch";
|
|
4820
3623
|
}[];
|
|
4821
3624
|
addedFileVersions: {
|
|
4822
3625
|
path: string;
|
|
@@ -4832,16 +3635,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4832
3635
|
}, {
|
|
4833
3636
|
type: "response-complete";
|
|
4834
3637
|
userInputId: string;
|
|
4835
|
-
|
|
3638
|
+
response: string;
|
|
3639
|
+
changes: {
|
|
3640
|
+
type: "patch" | "file";
|
|
4836
3641
|
path: string;
|
|
4837
3642
|
content: string;
|
|
4838
|
-
type: "file" | "patch";
|
|
4839
3643
|
}[];
|
|
4840
|
-
|
|
4841
|
-
|
|
3644
|
+
changesAlreadyApplied: {
|
|
3645
|
+
type: "patch" | "file";
|
|
4842
3646
|
path: string;
|
|
4843
3647
|
content: string;
|
|
4844
|
-
type: "file" | "patch";
|
|
4845
3648
|
}[];
|
|
4846
3649
|
addedFileVersions: {
|
|
4847
3650
|
path: string;
|
|
@@ -5032,15 +3835,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5032
3835
|
type: "ephemeral";
|
|
5033
3836
|
}>>;
|
|
5034
3837
|
}, "strip", z.ZodTypeAny, {
|
|
5035
|
-
content: string;
|
|
5036
3838
|
type: "tool_result";
|
|
3839
|
+
content: string;
|
|
5037
3840
|
tool_use_id: string;
|
|
5038
3841
|
cache_control?: {
|
|
5039
3842
|
type: "ephemeral";
|
|
5040
3843
|
} | undefined;
|
|
5041
3844
|
}, {
|
|
5042
|
-
content: string;
|
|
5043
3845
|
type: "tool_result";
|
|
3846
|
+
content: string;
|
|
5044
3847
|
tool_use_id: string;
|
|
5045
3848
|
cache_control?: {
|
|
5046
3849
|
type: "ephemeral";
|
|
@@ -5104,8 +3907,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5104
3907
|
type: "ephemeral";
|
|
5105
3908
|
} | undefined;
|
|
5106
3909
|
} | {
|
|
5107
|
-
content: string;
|
|
5108
3910
|
type: "tool_result";
|
|
3911
|
+
content: string;
|
|
5109
3912
|
tool_use_id: string;
|
|
5110
3913
|
cache_control?: {
|
|
5111
3914
|
type: "ephemeral";
|
|
@@ -5138,8 +3941,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5138
3941
|
type: "ephemeral";
|
|
5139
3942
|
} | undefined;
|
|
5140
3943
|
} | {
|
|
5141
|
-
content: string;
|
|
5142
3944
|
type: "tool_result";
|
|
3945
|
+
content: string;
|
|
5143
3946
|
tool_use_id: string;
|
|
5144
3947
|
cache_control?: {
|
|
5145
3948
|
type: "ephemeral";
|
|
@@ -5157,6 +3960,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5157
3960
|
})[];
|
|
5158
3961
|
role: "user" | "assistant";
|
|
5159
3962
|
}>, "many">;
|
|
3963
|
+
lastUserPromptIndex: z.ZodOptional<z.ZodNumber>;
|
|
5160
3964
|
}, "strip", z.ZodTypeAny, {
|
|
5161
3965
|
agentContext: string;
|
|
5162
3966
|
fileContext: {
|
|
@@ -5202,8 +4006,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5202
4006
|
type: "ephemeral";
|
|
5203
4007
|
} | undefined;
|
|
5204
4008
|
} | {
|
|
5205
|
-
content: string;
|
|
5206
4009
|
type: "tool_result";
|
|
4010
|
+
content: string;
|
|
5207
4011
|
tool_use_id: string;
|
|
5208
4012
|
cache_control?: {
|
|
5209
4013
|
type: "ephemeral";
|
|
@@ -5221,6 +4025,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5221
4025
|
})[];
|
|
5222
4026
|
role: "user" | "assistant";
|
|
5223
4027
|
}[];
|
|
4028
|
+
lastUserPromptIndex?: number | undefined;
|
|
5224
4029
|
}, {
|
|
5225
4030
|
agentContext: string;
|
|
5226
4031
|
fileContext: {
|
|
@@ -5266,8 +4071,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5266
4071
|
type: "ephemeral";
|
|
5267
4072
|
} | undefined;
|
|
5268
4073
|
} | {
|
|
5269
|
-
content: string;
|
|
5270
4074
|
type: "tool_result";
|
|
4075
|
+
content: string;
|
|
5271
4076
|
tool_use_id: string;
|
|
5272
4077
|
cache_control?: {
|
|
5273
4078
|
type: "ephemeral";
|
|
@@ -5285,6 +4090,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5285
4090
|
})[];
|
|
5286
4091
|
role: "user" | "assistant";
|
|
5287
4092
|
}[];
|
|
4093
|
+
lastUserPromptIndex?: number | undefined;
|
|
5288
4094
|
}>;
|
|
5289
4095
|
toolCalls: z.ZodArray<z.ZodObject<{
|
|
5290
4096
|
name: z.ZodString;
|
|
@@ -5292,12 +4098,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5292
4098
|
id: z.ZodString;
|
|
5293
4099
|
}, "strip", z.ZodTypeAny, {
|
|
5294
4100
|
name: string;
|
|
5295
|
-
parameters: Record<string, string>;
|
|
5296
4101
|
id: string;
|
|
4102
|
+
parameters: Record<string, string>;
|
|
5297
4103
|
}, {
|
|
5298
4104
|
name: string;
|
|
5299
|
-
parameters: Record<string, string>;
|
|
5300
4105
|
id: string;
|
|
4106
|
+
parameters: Record<string, string>;
|
|
5301
4107
|
}>, "many">;
|
|
5302
4108
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
5303
4109
|
name: z.ZodString;
|
|
@@ -5360,8 +4166,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5360
4166
|
type: "ephemeral";
|
|
5361
4167
|
} | undefined;
|
|
5362
4168
|
} | {
|
|
5363
|
-
content: string;
|
|
5364
4169
|
type: "tool_result";
|
|
4170
|
+
content: string;
|
|
5365
4171
|
tool_use_id: string;
|
|
5366
4172
|
cache_control?: {
|
|
5367
4173
|
type: "ephemeral";
|
|
@@ -5379,6 +4185,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5379
4185
|
})[];
|
|
5380
4186
|
role: "user" | "assistant";
|
|
5381
4187
|
}[];
|
|
4188
|
+
lastUserPromptIndex?: number | undefined;
|
|
5382
4189
|
};
|
|
5383
4190
|
toolResults: {
|
|
5384
4191
|
name: string;
|
|
@@ -5387,8 +4194,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5387
4194
|
}[];
|
|
5388
4195
|
toolCalls: {
|
|
5389
4196
|
name: string;
|
|
5390
|
-
parameters: Record<string, string>;
|
|
5391
4197
|
id: string;
|
|
4198
|
+
parameters: Record<string, string>;
|
|
5392
4199
|
}[];
|
|
5393
4200
|
}, {
|
|
5394
4201
|
type: "prompt-response";
|
|
@@ -5438,8 +4245,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5438
4245
|
type: "ephemeral";
|
|
5439
4246
|
} | undefined;
|
|
5440
4247
|
} | {
|
|
5441
|
-
content: string;
|
|
5442
4248
|
type: "tool_result";
|
|
4249
|
+
content: string;
|
|
5443
4250
|
tool_use_id: string;
|
|
5444
4251
|
cache_control?: {
|
|
5445
4252
|
type: "ephemeral";
|
|
@@ -5457,6 +4264,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5457
4264
|
})[];
|
|
5458
4265
|
role: "user" | "assistant";
|
|
5459
4266
|
}[];
|
|
4267
|
+
lastUserPromptIndex?: number | undefined;
|
|
5460
4268
|
};
|
|
5461
4269
|
toolResults: {
|
|
5462
4270
|
name: string;
|
|
@@ -5465,8 +4273,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5465
4273
|
}[];
|
|
5466
4274
|
toolCalls: {
|
|
5467
4275
|
name: string;
|
|
5468
|
-
parameters: Record<string, string>;
|
|
5469
4276
|
id: string;
|
|
4277
|
+
parameters: Record<string, string>;
|
|
5470
4278
|
}[];
|
|
5471
4279
|
}>, z.ZodObject<{
|
|
5472
4280
|
type: z.ZodLiteral<"read-files">;
|
|
@@ -5502,26 +4310,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5502
4310
|
path: z.ZodString;
|
|
5503
4311
|
content: z.ZodString;
|
|
5504
4312
|
}, "strip", z.ZodTypeAny, {
|
|
4313
|
+
type: "patch" | "file";
|
|
5505
4314
|
path: string;
|
|
5506
4315
|
content: string;
|
|
5507
|
-
type: "file" | "patch";
|
|
5508
4316
|
}, {
|
|
4317
|
+
type: "patch" | "file";
|
|
5509
4318
|
path: string;
|
|
5510
4319
|
content: string;
|
|
5511
|
-
type: "file" | "patch";
|
|
5512
4320
|
}>, "many">;
|
|
5513
4321
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
5514
4322
|
type: z.ZodEnum<["patch", "file"]>;
|
|
5515
4323
|
path: z.ZodString;
|
|
5516
4324
|
content: z.ZodString;
|
|
5517
4325
|
}, "strip", z.ZodTypeAny, {
|
|
4326
|
+
type: "patch" | "file";
|
|
5518
4327
|
path: string;
|
|
5519
4328
|
content: string;
|
|
5520
|
-
type: "file" | "patch";
|
|
5521
4329
|
}, {
|
|
4330
|
+
type: "patch" | "file";
|
|
5522
4331
|
path: string;
|
|
5523
4332
|
content: string;
|
|
5524
|
-
type: "file" | "patch";
|
|
5525
4333
|
}>, "many">;
|
|
5526
4334
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
5527
4335
|
path: z.ZodString;
|
|
@@ -5542,16 +4350,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5542
4350
|
input: Record<string, any>;
|
|
5543
4351
|
};
|
|
5544
4352
|
userInputId: string;
|
|
5545
|
-
|
|
4353
|
+
response: string;
|
|
4354
|
+
changes: {
|
|
4355
|
+
type: "patch" | "file";
|
|
5546
4356
|
path: string;
|
|
5547
4357
|
content: string;
|
|
5548
|
-
type: "file" | "patch";
|
|
5549
4358
|
}[];
|
|
5550
|
-
|
|
5551
|
-
|
|
4359
|
+
changesAlreadyApplied: {
|
|
4360
|
+
type: "patch" | "file";
|
|
5552
4361
|
path: string;
|
|
5553
4362
|
content: string;
|
|
5554
|
-
type: "file" | "patch";
|
|
5555
4363
|
}[];
|
|
5556
4364
|
addedFileVersions: {
|
|
5557
4365
|
path: string;
|
|
@@ -5566,16 +4374,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5566
4374
|
input: Record<string, any>;
|
|
5567
4375
|
};
|
|
5568
4376
|
userInputId: string;
|
|
5569
|
-
|
|
4377
|
+
response: string;
|
|
4378
|
+
changes: {
|
|
4379
|
+
type: "patch" | "file";
|
|
5570
4380
|
path: string;
|
|
5571
4381
|
content: string;
|
|
5572
|
-
type: "file" | "patch";
|
|
5573
4382
|
}[];
|
|
5574
|
-
|
|
5575
|
-
|
|
4383
|
+
changesAlreadyApplied: {
|
|
4384
|
+
type: "patch" | "file";
|
|
5576
4385
|
path: string;
|
|
5577
4386
|
content: string;
|
|
5578
|
-
type: "file" | "patch";
|
|
5579
4387
|
}[];
|
|
5580
4388
|
addedFileVersions: {
|
|
5581
4389
|
path: string;
|
|
@@ -5672,11 +4480,11 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5672
4480
|
type: z.ZodLiteral<"action-error">;
|
|
5673
4481
|
message: z.ZodString;
|
|
5674
4482
|
}, "strip", z.ZodTypeAny, {
|
|
5675
|
-
message: string;
|
|
5676
4483
|
type: "action-error";
|
|
5677
|
-
}, {
|
|
5678
4484
|
message: string;
|
|
4485
|
+
}, {
|
|
5679
4486
|
type: "action-error";
|
|
4487
|
+
message: string;
|
|
5680
4488
|
}>, z.ZodObject<{
|
|
5681
4489
|
type: z.ZodLiteral<"commit-message-response">;
|
|
5682
4490
|
commitMessage: z.ZodString;
|
|
@@ -5708,16 +4516,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5708
4516
|
} | {
|
|
5709
4517
|
type: "response-complete";
|
|
5710
4518
|
userInputId: string;
|
|
5711
|
-
|
|
4519
|
+
response: string;
|
|
4520
|
+
changes: {
|
|
4521
|
+
type: "patch" | "file";
|
|
5712
4522
|
path: string;
|
|
5713
4523
|
content: string;
|
|
5714
|
-
type: "file" | "patch";
|
|
5715
4524
|
}[];
|
|
5716
|
-
|
|
5717
|
-
|
|
4525
|
+
changesAlreadyApplied: {
|
|
4526
|
+
type: "patch" | "file";
|
|
5718
4527
|
path: string;
|
|
5719
4528
|
content: string;
|
|
5720
|
-
type: "file" | "patch";
|
|
5721
4529
|
}[];
|
|
5722
4530
|
addedFileVersions: {
|
|
5723
4531
|
path: string;
|
|
@@ -5782,8 +4590,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5782
4590
|
type: "ephemeral";
|
|
5783
4591
|
} | undefined;
|
|
5784
4592
|
} | {
|
|
5785
|
-
content: string;
|
|
5786
4593
|
type: "tool_result";
|
|
4594
|
+
content: string;
|
|
5787
4595
|
tool_use_id: string;
|
|
5788
4596
|
cache_control?: {
|
|
5789
4597
|
type: "ephemeral";
|
|
@@ -5801,6 +4609,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5801
4609
|
})[];
|
|
5802
4610
|
role: "user" | "assistant";
|
|
5803
4611
|
}[];
|
|
4612
|
+
lastUserPromptIndex?: number | undefined;
|
|
5804
4613
|
};
|
|
5805
4614
|
toolResults: {
|
|
5806
4615
|
name: string;
|
|
@@ -5809,8 +4618,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5809
4618
|
}[];
|
|
5810
4619
|
toolCalls: {
|
|
5811
4620
|
name: string;
|
|
5812
|
-
parameters: Record<string, string>;
|
|
5813
4621
|
id: string;
|
|
4622
|
+
parameters: Record<string, string>;
|
|
5814
4623
|
}[];
|
|
5815
4624
|
} | {
|
|
5816
4625
|
type: "response-chunk";
|
|
@@ -5828,16 +4637,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5828
4637
|
input: Record<string, any>;
|
|
5829
4638
|
};
|
|
5830
4639
|
userInputId: string;
|
|
5831
|
-
|
|
4640
|
+
response: string;
|
|
4641
|
+
changes: {
|
|
4642
|
+
type: "patch" | "file";
|
|
5832
4643
|
path: string;
|
|
5833
4644
|
content: string;
|
|
5834
|
-
type: "file" | "patch";
|
|
5835
4645
|
}[];
|
|
5836
|
-
|
|
5837
|
-
|
|
4646
|
+
changesAlreadyApplied: {
|
|
4647
|
+
type: "patch" | "file";
|
|
5838
4648
|
path: string;
|
|
5839
4649
|
content: string;
|
|
5840
|
-
type: "file" | "patch";
|
|
5841
4650
|
}[];
|
|
5842
4651
|
addedFileVersions: {
|
|
5843
4652
|
path: string;
|
|
@@ -5853,8 +4662,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5853
4662
|
isUpToDate: boolean;
|
|
5854
4663
|
latestVersion: string;
|
|
5855
4664
|
} | {
|
|
5856
|
-
message: string;
|
|
5857
4665
|
type: "action-error";
|
|
4666
|
+
message: string;
|
|
5858
4667
|
} | {
|
|
5859
4668
|
type: "commit-message-response";
|
|
5860
4669
|
commitMessage: string;
|
|
@@ -5880,16 +4689,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5880
4689
|
} | {
|
|
5881
4690
|
type: "response-complete";
|
|
5882
4691
|
userInputId: string;
|
|
5883
|
-
|
|
4692
|
+
response: string;
|
|
4693
|
+
changes: {
|
|
4694
|
+
type: "patch" | "file";
|
|
5884
4695
|
path: string;
|
|
5885
4696
|
content: string;
|
|
5886
|
-
type: "file" | "patch";
|
|
5887
4697
|
}[];
|
|
5888
|
-
|
|
5889
|
-
|
|
4698
|
+
changesAlreadyApplied: {
|
|
4699
|
+
type: "patch" | "file";
|
|
5890
4700
|
path: string;
|
|
5891
4701
|
content: string;
|
|
5892
|
-
type: "file" | "patch";
|
|
5893
4702
|
}[];
|
|
5894
4703
|
addedFileVersions: {
|
|
5895
4704
|
path: string;
|
|
@@ -5954,8 +4763,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5954
4763
|
type: "ephemeral";
|
|
5955
4764
|
} | undefined;
|
|
5956
4765
|
} | {
|
|
5957
|
-
content: string;
|
|
5958
4766
|
type: "tool_result";
|
|
4767
|
+
content: string;
|
|
5959
4768
|
tool_use_id: string;
|
|
5960
4769
|
cache_control?: {
|
|
5961
4770
|
type: "ephemeral";
|
|
@@ -5973,6 +4782,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5973
4782
|
})[];
|
|
5974
4783
|
role: "user" | "assistant";
|
|
5975
4784
|
}[];
|
|
4785
|
+
lastUserPromptIndex?: number | undefined;
|
|
5976
4786
|
};
|
|
5977
4787
|
toolResults: {
|
|
5978
4788
|
name: string;
|
|
@@ -5981,8 +4791,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5981
4791
|
}[];
|
|
5982
4792
|
toolCalls: {
|
|
5983
4793
|
name: string;
|
|
5984
|
-
parameters: Record<string, string>;
|
|
5985
4794
|
id: string;
|
|
4795
|
+
parameters: Record<string, string>;
|
|
5986
4796
|
}[];
|
|
5987
4797
|
} | {
|
|
5988
4798
|
type: "response-chunk";
|
|
@@ -6000,16 +4810,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
6000
4810
|
input: Record<string, any>;
|
|
6001
4811
|
};
|
|
6002
4812
|
userInputId: string;
|
|
6003
|
-
|
|
4813
|
+
response: string;
|
|
4814
|
+
changes: {
|
|
4815
|
+
type: "patch" | "file";
|
|
6004
4816
|
path: string;
|
|
6005
4817
|
content: string;
|
|
6006
|
-
type: "file" | "patch";
|
|
6007
4818
|
}[];
|
|
6008
|
-
|
|
6009
|
-
|
|
4819
|
+
changesAlreadyApplied: {
|
|
4820
|
+
type: "patch" | "file";
|
|
6010
4821
|
path: string;
|
|
6011
4822
|
content: string;
|
|
6012
|
-
type: "file" | "patch";
|
|
6013
4823
|
}[];
|
|
6014
4824
|
addedFileVersions: {
|
|
6015
4825
|
path: string;
|
|
@@ -6025,8 +4835,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
6025
4835
|
isUpToDate: boolean;
|
|
6026
4836
|
latestVersion: string;
|
|
6027
4837
|
} | {
|
|
6028
|
-
message: string;
|
|
6029
4838
|
type: "action-error";
|
|
4839
|
+
message: string;
|
|
6030
4840
|
} | {
|
|
6031
4841
|
type: "commit-message-response";
|
|
6032
4842
|
commitMessage: string;
|