codebuff 1.0.196 → 1.0.198
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 +3 -1
- package/dist/checkpoints/checkpoint-manager.js +12 -10
- package/dist/checkpoints/checkpoint-manager.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +5 -4
- package/dist/client.js +14 -12
- package/dist/client.js.map +1 -1
- package/dist/code-map/tsconfig.tsbuildinfo +1 -1
- package/dist/common/actions.d.ts +107 -555
- package/dist/common/actions.js +0 -11
- package/dist/common/actions.js.map +1 -1
- package/dist/common/constants.d.ts +9 -0
- package/dist/common/constants.js +23 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/db/schema.d.ts +17 -0
- package/dist/common/db/schema.js +1 -0
- package/dist/common/db/schema.js.map +1 -1
- package/dist/common/project-file-tree.js +3 -3
- package/dist/common/project-file-tree.js.map +1 -1
- package/dist/common/types/agent-state.d.ts +19 -16
- package/dist/common/types/agent-state.js +2 -0
- package/dist/common/types/agent-state.js.map +1 -1
- package/dist/common/util/changes.js +1 -1
- package/dist/common/util/changes.js.map +1 -1
- package/dist/common/util/file.d.ts +1 -1
- package/dist/common/util/file.js +3 -3
- package/dist/common/util/file.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +1030 -2220
- package/dist/project-files.d.ts +3 -0
- package/dist/project-files.js +25 -7
- package/dist/project-files.js.map +1 -1
- package/package.json +2 -2
|
@@ -53,579 +53,116 @@ 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;
|
|
208
|
-
};
|
|
209
|
-
cache_control?: {
|
|
210
|
-
type: "ephemeral";
|
|
211
|
-
} | undefined;
|
|
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
|
-
fingerprintId: string;
|
|
375
|
-
userInputId: string;
|
|
376
|
-
messages: {
|
|
377
|
-
content: string | ({
|
|
378
|
-
type: "text";
|
|
379
|
-
text: string;
|
|
380
|
-
cache_control?: {
|
|
381
|
-
type: "ephemeral";
|
|
382
|
-
} | undefined;
|
|
383
|
-
} | {
|
|
384
|
-
type: "tool_use";
|
|
385
|
-
name: string;
|
|
386
|
-
id: string;
|
|
387
|
-
input: Record<string, any>;
|
|
388
|
-
cache_control?: {
|
|
389
|
-
type: "ephemeral";
|
|
390
|
-
} | undefined;
|
|
391
|
-
} | {
|
|
392
|
-
content: string;
|
|
393
|
-
type: "tool_result";
|
|
394
|
-
tool_use_id: string;
|
|
395
|
-
cache_control?: {
|
|
396
|
-
type: "ephemeral";
|
|
397
|
-
} | undefined;
|
|
398
|
-
} | {
|
|
399
|
-
type: "image";
|
|
400
|
-
source: {
|
|
401
|
-
type: "base64";
|
|
402
|
-
media_type: "image/jpeg";
|
|
403
|
-
data: string;
|
|
404
|
-
};
|
|
405
|
-
cache_control?: {
|
|
406
|
-
type: "ephemeral";
|
|
407
|
-
} | undefined;
|
|
408
|
-
})[];
|
|
409
|
-
role: "user" | "assistant";
|
|
410
|
-
}[];
|
|
411
|
-
fileContext: {
|
|
412
|
-
currentWorkingDirectory: string;
|
|
413
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
414
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
415
|
-
knowledgeFiles: Record<string, string>;
|
|
416
|
-
gitChanges: {
|
|
417
|
-
status: string;
|
|
418
|
-
diff: string;
|
|
419
|
-
diffCached: string;
|
|
420
|
-
lastCommitMessages: string;
|
|
421
|
-
};
|
|
422
|
-
changesSinceLastChat: Record<string, string>;
|
|
423
|
-
shellConfigFiles: Record<string, string>;
|
|
424
|
-
systemInfo: {
|
|
425
|
-
platform: string;
|
|
426
|
-
shell: string;
|
|
427
|
-
nodeVersion: string;
|
|
428
|
-
arch: string;
|
|
429
|
-
homedir: string;
|
|
430
|
-
cpus: number;
|
|
431
|
-
};
|
|
432
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
433
|
-
fileVersions?: {
|
|
434
|
-
path: string;
|
|
435
|
-
content: string;
|
|
436
|
-
}[][] | undefined;
|
|
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
|
-
fingerprintId: string;
|
|
448
|
-
userInputId: string;
|
|
449
|
-
messages: {
|
|
450
|
-
content: string | ({
|
|
451
|
-
type: "text";
|
|
452
|
-
text: string;
|
|
453
|
-
cache_control?: {
|
|
454
|
-
type: "ephemeral";
|
|
455
|
-
} | undefined;
|
|
456
|
-
} | {
|
|
457
|
-
type: "tool_use";
|
|
458
|
-
name: string;
|
|
459
|
-
id: string;
|
|
460
|
-
input: Record<string, any>;
|
|
461
|
-
cache_control?: {
|
|
462
|
-
type: "ephemeral";
|
|
463
|
-
} | undefined;
|
|
464
|
-
} | {
|
|
465
|
-
content: string;
|
|
466
|
-
type: "tool_result";
|
|
467
|
-
tool_use_id: string;
|
|
468
|
-
cache_control?: {
|
|
469
|
-
type: "ephemeral";
|
|
470
|
-
} | undefined;
|
|
471
|
-
} | {
|
|
472
|
-
type: "image";
|
|
473
|
-
source: {
|
|
474
|
-
type: "base64";
|
|
475
|
-
media_type: "image/jpeg";
|
|
476
|
-
data: string;
|
|
477
|
-
};
|
|
478
|
-
cache_control?: {
|
|
479
|
-
type: "ephemeral";
|
|
480
|
-
} | undefined;
|
|
481
|
-
})[];
|
|
482
|
-
role: "user" | "assistant";
|
|
483
|
-
}[];
|
|
484
|
-
fileContext: {
|
|
485
|
-
currentWorkingDirectory: string;
|
|
486
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
487
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
488
|
-
knowledgeFiles: Record<string, string>;
|
|
489
|
-
gitChanges: {
|
|
490
|
-
status: string;
|
|
491
|
-
diff: string;
|
|
492
|
-
diffCached: string;
|
|
493
|
-
lastCommitMessages: string;
|
|
494
|
-
};
|
|
495
|
-
changesSinceLastChat: Record<string, string>;
|
|
496
|
-
shellConfigFiles: Record<string, string>;
|
|
497
|
-
systemInfo: {
|
|
498
|
-
platform: string;
|
|
499
|
-
shell: string;
|
|
500
|
-
nodeVersion: string;
|
|
501
|
-
arch: string;
|
|
502
|
-
homedir: string;
|
|
503
|
-
cpus: number;
|
|
504
|
-
};
|
|
505
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
506
|
-
fileVersions?: {
|
|
507
|
-
path: string;
|
|
508
|
-
content: string;
|
|
509
|
-
}[][] | undefined;
|
|
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;
|
|
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;
|
|
629
166
|
};
|
|
630
167
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
631
168
|
fileVersions?: {
|
|
@@ -693,251 +230,46 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
693
230
|
type: z.ZodLiteral<"ephemeral">;
|
|
694
231
|
}, "strip", z.ZodTypeAny, {
|
|
695
232
|
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
|
-
}, {
|
|
707
|
-
content: string;
|
|
708
|
-
type: "tool_result";
|
|
709
|
-
tool_use_id: string;
|
|
710
|
-
cache_control?: {
|
|
711
|
-
type: "ephemeral";
|
|
712
|
-
} | undefined;
|
|
713
|
-
}>, z.ZodObject<{
|
|
714
|
-
type: z.ZodLiteral<"image">;
|
|
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
|
-
}>;
|
|
728
|
-
cache_control: z.ZodOptional<z.ZodObject<{
|
|
729
|
-
type: z.ZodLiteral<"ephemeral">;
|
|
730
|
-
}, "strip", z.ZodTypeAny, {
|
|
731
|
-
type: "ephemeral";
|
|
732
|
-
}, {
|
|
733
|
-
type: "ephemeral";
|
|
734
|
-
}>>;
|
|
735
|
-
}, "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
|
-
type: "text";
|
|
793
|
-
text: string;
|
|
794
|
-
cache_control?: {
|
|
795
|
-
type: "ephemeral";
|
|
796
|
-
} | 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
|
-
fileContext: {
|
|
827
|
-
currentWorkingDirectory: string;
|
|
828
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
829
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
830
|
-
knowledgeFiles: Record<string, string>;
|
|
831
|
-
gitChanges: {
|
|
832
|
-
status: string;
|
|
833
|
-
diff: string;
|
|
834
|
-
diffCached: string;
|
|
835
|
-
lastCommitMessages: string;
|
|
836
|
-
};
|
|
837
|
-
changesSinceLastChat: Record<string, string>;
|
|
838
|
-
shellConfigFiles: Record<string, string>;
|
|
839
|
-
systemInfo: {
|
|
840
|
-
platform: string;
|
|
841
|
-
shell: string;
|
|
842
|
-
nodeVersion: string;
|
|
843
|
-
arch: string;
|
|
844
|
-
homedir: string;
|
|
845
|
-
cpus: number;
|
|
846
|
-
};
|
|
847
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
848
|
-
fileVersions?: {
|
|
849
|
-
path: string;
|
|
850
|
-
content: string;
|
|
851
|
-
}[][] | undefined;
|
|
852
|
-
};
|
|
853
|
-
agentContext: string;
|
|
854
|
-
messageHistory: {
|
|
855
|
-
content: string | ({
|
|
856
|
-
type: "text";
|
|
857
|
-
text: string;
|
|
858
|
-
cache_control?: {
|
|
859
|
-
type: "ephemeral";
|
|
860
|
-
} | undefined;
|
|
861
|
-
} | {
|
|
862
|
-
type: "tool_use";
|
|
863
|
-
name: string;
|
|
864
|
-
id: string;
|
|
865
|
-
input: Record<string, any>;
|
|
866
|
-
cache_control?: {
|
|
867
|
-
type: "ephemeral";
|
|
868
|
-
} | undefined;
|
|
869
|
-
} | {
|
|
870
|
-
content: string;
|
|
871
|
-
type: "tool_result";
|
|
872
|
-
tool_use_id: string;
|
|
873
|
-
cache_control?: {
|
|
874
|
-
type: "ephemeral";
|
|
875
|
-
} | undefined;
|
|
876
|
-
} | {
|
|
877
|
-
type: "image";
|
|
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
|
-
fileContext: {
|
|
891
|
-
currentWorkingDirectory: string;
|
|
892
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
893
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
894
|
-
knowledgeFiles: Record<string, string>;
|
|
895
|
-
gitChanges: {
|
|
896
|
-
status: string;
|
|
897
|
-
diff: string;
|
|
898
|
-
diffCached: string;
|
|
899
|
-
lastCommitMessages: string;
|
|
900
|
-
};
|
|
901
|
-
changesSinceLastChat: Record<string, string>;
|
|
902
|
-
shellConfigFiles: Record<string, string>;
|
|
903
|
-
systemInfo: {
|
|
904
|
-
platform: string;
|
|
905
|
-
shell: string;
|
|
906
|
-
nodeVersion: string;
|
|
907
|
-
arch: string;
|
|
908
|
-
homedir: string;
|
|
909
|
-
cpus: number;
|
|
910
|
-
};
|
|
911
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
912
|
-
fileVersions?: {
|
|
913
|
-
path: string;
|
|
914
|
-
content: string;
|
|
915
|
-
}[][] | undefined;
|
|
916
|
-
};
|
|
917
|
-
agentContext: string;
|
|
918
|
-
messageHistory: {
|
|
919
|
-
content: string | ({
|
|
920
|
-
type: "text";
|
|
921
|
-
text: string;
|
|
922
|
-
cache_control?: {
|
|
233
|
+
}, {
|
|
923
234
|
type: "ephemeral";
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
type: "
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
input: Record<string, any>;
|
|
235
|
+
}>>;
|
|
236
|
+
}, "strip", z.ZodTypeAny, {
|
|
237
|
+
type: "tool_result";
|
|
238
|
+
content: string;
|
|
239
|
+
tool_use_id: string;
|
|
930
240
|
cache_control?: {
|
|
931
241
|
type: "ephemeral";
|
|
932
242
|
} | undefined;
|
|
933
|
-
}
|
|
934
|
-
content: string;
|
|
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
|
-
fileContext: {
|
|
974
|
-
currentWorkingDirectory: string;
|
|
975
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
976
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
977
|
-
knowledgeFiles: Record<string, string>;
|
|
978
|
-
gitChanges: {
|
|
979
|
-
status: string;
|
|
980
|
-
diff: string;
|
|
981
|
-
diffCached: string;
|
|
982
|
-
lastCommitMessages: string;
|
|
983
|
-
};
|
|
984
|
-
changesSinceLastChat: Record<string, string>;
|
|
985
|
-
shellConfigFiles: Record<string, string>;
|
|
986
|
-
systemInfo: {
|
|
987
|
-
platform: string;
|
|
988
|
-
shell: string;
|
|
989
|
-
nodeVersion: string;
|
|
990
|
-
arch: string;
|
|
991
|
-
homedir: string;
|
|
992
|
-
cpus: number;
|
|
993
|
-
};
|
|
994
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
995
|
-
fileVersions?: {
|
|
996
|
-
path: string;
|
|
997
|
-
content: string;
|
|
998
|
-
}[][] | undefined;
|
|
999
|
-
};
|
|
1000
|
-
agentContext: string;
|
|
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
|
-
fileContext: {
|
|
1050
|
-
currentWorkingDirectory: string;
|
|
1051
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
1052
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1053
|
-
knowledgeFiles: Record<string, string>;
|
|
1054
|
-
gitChanges: {
|
|
1055
|
-
status: string;
|
|
1056
|
-
diff: string;
|
|
1057
|
-
diffCached: string;
|
|
1058
|
-
lastCommitMessages: string;
|
|
1059
|
-
};
|
|
1060
|
-
changesSinceLastChat: Record<string, string>;
|
|
1061
|
-
shellConfigFiles: Record<string, string>;
|
|
1062
|
-
systemInfo: {
|
|
1063
|
-
platform: string;
|
|
1064
|
-
shell: string;
|
|
1065
|
-
nodeVersion: string;
|
|
1066
|
-
arch: string;
|
|
1067
|
-
homedir: string;
|
|
1068
|
-
cpus: number;
|
|
1069
|
-
};
|
|
1070
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1071
|
-
fileVersions?: {
|
|
1072
|
-
path: string;
|
|
1073
|
-
content: string;
|
|
1074
|
-
}[][] | undefined;
|
|
1075
|
-
};
|
|
1076
|
-
agentContext: string;
|
|
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";
|
|
@@ -1104,304 +354,163 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1104
354
|
data: string;
|
|
1105
355
|
};
|
|
1106
356
|
cache_control?: {
|
|
1107
|
-
type: "ephemeral";
|
|
1108
|
-
} | undefined;
|
|
1109
|
-
})[];
|
|
1110
|
-
role: "user" | "assistant";
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
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">>;
|
|
1193
|
-
}, "strip", z.ZodTypeAny, {
|
|
1194
|
-
currentWorkingDirectory: string;
|
|
1195
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
1196
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1197
|
-
knowledgeFiles: Record<string, string>;
|
|
1198
|
-
gitChanges: {
|
|
1199
|
-
status: string;
|
|
1200
|
-
diff: string;
|
|
1201
|
-
diffCached: string;
|
|
1202
|
-
lastCommitMessages: string;
|
|
1203
|
-
};
|
|
1204
|
-
changesSinceLastChat: Record<string, string>;
|
|
1205
|
-
shellConfigFiles: Record<string, string>;
|
|
1206
|
-
systemInfo: {
|
|
1207
|
-
platform: string;
|
|
1208
|
-
shell: string;
|
|
1209
|
-
nodeVersion: string;
|
|
1210
|
-
arch: string;
|
|
1211
|
-
homedir: string;
|
|
1212
|
-
cpus: number;
|
|
357
|
+
type: "ephemeral";
|
|
358
|
+
} | undefined;
|
|
359
|
+
})[];
|
|
360
|
+
role: "user" | "assistant";
|
|
361
|
+
}>, "many">;
|
|
362
|
+
lastUserPromptIndex: z.ZodOptional<z.ZodNumber>;
|
|
363
|
+
}, "strip", z.ZodTypeAny, {
|
|
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
|
-
fingerprintId: string;
|
|
1249
|
-
fileContext: {
|
|
1250
|
-
currentWorkingDirectory: string;
|
|
1251
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
1252
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1253
|
-
knowledgeFiles: Record<string, string>;
|
|
1254
|
-
gitChanges: {
|
|
1255
|
-
status: string;
|
|
1256
|
-
diff: string;
|
|
1257
|
-
diffCached: string;
|
|
1258
|
-
lastCommitMessages: string;
|
|
1259
|
-
};
|
|
1260
|
-
changesSinceLastChat: Record<string, string>;
|
|
1261
|
-
shellConfigFiles: Record<string, string>;
|
|
1262
|
-
systemInfo: {
|
|
1263
|
-
platform: string;
|
|
1264
|
-
shell: string;
|
|
1265
|
-
nodeVersion: string;
|
|
1266
|
-
arch: string;
|
|
1267
|
-
homedir: string;
|
|
1268
|
-
cpus: number;
|
|
1269
|
-
};
|
|
1270
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1271
|
-
fileVersions?: {
|
|
1272
|
-
path: string;
|
|
1273
|
-
content: string;
|
|
1274
|
-
}[][] | undefined;
|
|
1275
|
-
};
|
|
1276
|
-
authToken?: string | undefined;
|
|
1277
|
-
}, {
|
|
1278
|
-
type: "init";
|
|
1279
|
-
fingerprintId: string;
|
|
1280
|
-
fileContext: {
|
|
1281
|
-
currentWorkingDirectory: string;
|
|
1282
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
1283
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1284
|
-
knowledgeFiles: Record<string, string>;
|
|
1285
|
-
gitChanges: {
|
|
1286
|
-
status: string;
|
|
1287
|
-
diff: string;
|
|
1288
|
-
diffCached: string;
|
|
1289
|
-
lastCommitMessages: string;
|
|
1290
|
-
};
|
|
1291
|
-
changesSinceLastChat: Record<string, string>;
|
|
1292
|
-
shellConfigFiles: Record<string, string>;
|
|
1293
|
-
systemInfo: {
|
|
1294
|
-
platform: string;
|
|
1295
|
-
shell: string;
|
|
1296
|
-
nodeVersion: string;
|
|
1297
|
-
arch: string;
|
|
1298
|
-
homedir: string;
|
|
1299
|
-
cpus: number;
|
|
1300
|
-
};
|
|
1301
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1302
|
-
fileVersions?: {
|
|
1303
|
-
path: string;
|
|
1304
|
-
content: string;
|
|
1305
|
-
}[][] | undefined;
|
|
1306
|
-
};
|
|
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
|
-
fingerprintId: string;
|
|
1329
|
-
userInputId: string;
|
|
1330
|
-
messages: {
|
|
1331
|
-
content: string | ({
|
|
1332
|
-
type: "text";
|
|
1333
|
-
text: string;
|
|
1334
|
-
cache_control?: {
|
|
1335
|
-
type: "ephemeral";
|
|
1336
|
-
} | undefined;
|
|
1337
|
-
} | {
|
|
1338
|
-
type: "tool_use";
|
|
1339
|
-
name: string;
|
|
1340
|
-
id: string;
|
|
1341
|
-
input: Record<string, any>;
|
|
1342
|
-
cache_control?: {
|
|
1343
|
-
type: "ephemeral";
|
|
1344
|
-
} | undefined;
|
|
1345
|
-
} | {
|
|
1346
|
-
content: string;
|
|
1347
|
-
type: "tool_result";
|
|
1348
|
-
tool_use_id: string;
|
|
1349
|
-
cache_control?: {
|
|
1350
|
-
type: "ephemeral";
|
|
1351
|
-
} | undefined;
|
|
1352
|
-
} | {
|
|
1353
|
-
type: "image";
|
|
1354
|
-
source: {
|
|
1355
|
-
type: "base64";
|
|
1356
|
-
media_type: "image/jpeg";
|
|
1357
|
-
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;
|
|
1358
440
|
};
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
lastCommitMessages: string;
|
|
1375
|
-
};
|
|
1376
|
-
changesSinceLastChat: Record<string, string>;
|
|
1377
|
-
shellConfigFiles: Record<string, string>;
|
|
1378
|
-
systemInfo: {
|
|
1379
|
-
platform: string;
|
|
1380
|
-
shell: string;
|
|
1381
|
-
nodeVersion: string;
|
|
1382
|
-
arch: string;
|
|
1383
|
-
homedir: string;
|
|
1384
|
-
cpus: number;
|
|
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;
|
|
1385
456
|
};
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
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: {
|
|
513
|
+
agentContext: string;
|
|
1405
514
|
fileContext: {
|
|
1406
515
|
currentWorkingDirectory: string;
|
|
1407
516
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -1429,7 +538,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1429
538
|
content: string;
|
|
1430
539
|
}[][] | undefined;
|
|
1431
540
|
};
|
|
1432
|
-
agentContext: string;
|
|
1433
541
|
messageHistory: {
|
|
1434
542
|
content: string | ({
|
|
1435
543
|
type: "text";
|
|
@@ -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,136 +573,21 @@ 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
|
-
fingerprintId: string;
|
|
1483
|
-
fileContext: {
|
|
1484
|
-
currentWorkingDirectory: string;
|
|
1485
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
1486
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1487
|
-
knowledgeFiles: Record<string, string>;
|
|
1488
|
-
gitChanges: {
|
|
1489
|
-
status: string;
|
|
1490
|
-
diff: string;
|
|
1491
|
-
diffCached: string;
|
|
1492
|
-
lastCommitMessages: string;
|
|
1493
|
-
};
|
|
1494
|
-
changesSinceLastChat: Record<string, string>;
|
|
1495
|
-
shellConfigFiles: Record<string, string>;
|
|
1496
|
-
systemInfo: {
|
|
1497
|
-
platform: string;
|
|
1498
|
-
shell: string;
|
|
1499
|
-
nodeVersion: string;
|
|
1500
|
-
arch: string;
|
|
1501
|
-
homedir: string;
|
|
1502
|
-
cpus: number;
|
|
1503
|
-
};
|
|
1504
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1505
|
-
fileVersions?: {
|
|
1506
|
-
path: string;
|
|
1507
|
-
content: string;
|
|
1508
|
-
}[][] | undefined;
|
|
1509
|
-
};
|
|
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
|
-
fingerprintId: string;
|
|
1523
|
-
userInputId: string;
|
|
1524
|
-
messages: {
|
|
1525
|
-
content: string | ({
|
|
1526
|
-
type: "text";
|
|
1527
|
-
text: string;
|
|
1528
|
-
cache_control?: {
|
|
1529
|
-
type: "ephemeral";
|
|
1530
|
-
} | undefined;
|
|
1531
|
-
} | {
|
|
1532
|
-
type: "tool_use";
|
|
1533
|
-
name: string;
|
|
1534
|
-
id: string;
|
|
1535
|
-
input: Record<string, any>;
|
|
1536
|
-
cache_control?: {
|
|
1537
|
-
type: "ephemeral";
|
|
1538
|
-
} | undefined;
|
|
1539
|
-
} | {
|
|
1540
|
-
content: string;
|
|
1541
|
-
type: "tool_result";
|
|
1542
|
-
tool_use_id: string;
|
|
1543
|
-
cache_control?: {
|
|
1544
|
-
type: "ephemeral";
|
|
1545
|
-
} | undefined;
|
|
1546
|
-
} | {
|
|
1547
|
-
type: "image";
|
|
1548
|
-
source: {
|
|
1549
|
-
type: "base64";
|
|
1550
|
-
media_type: "image/jpeg";
|
|
1551
|
-
data: string;
|
|
1552
|
-
};
|
|
1553
|
-
cache_control?: {
|
|
1554
|
-
type: "ephemeral";
|
|
1555
|
-
} | undefined;
|
|
1556
|
-
})[];
|
|
1557
|
-
role: "user" | "assistant";
|
|
1558
|
-
}[];
|
|
1559
|
-
fileContext: {
|
|
1560
|
-
currentWorkingDirectory: string;
|
|
1561
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
1562
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1563
|
-
knowledgeFiles: Record<string, string>;
|
|
1564
|
-
gitChanges: {
|
|
1565
|
-
status: string;
|
|
1566
|
-
diff: string;
|
|
1567
|
-
diffCached: string;
|
|
1568
|
-
lastCommitMessages: string;
|
|
1569
|
-
};
|
|
1570
|
-
changesSinceLastChat: Record<string, string>;
|
|
1571
|
-
shellConfigFiles: Record<string, string>;
|
|
1572
|
-
systemInfo: {
|
|
1573
|
-
platform: string;
|
|
1574
|
-
shell: string;
|
|
1575
|
-
nodeVersion: string;
|
|
1576
|
-
arch: string;
|
|
1577
|
-
homedir: string;
|
|
1578
|
-
cpus: number;
|
|
1579
|
-
};
|
|
1580
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1581
|
-
fileVersions?: {
|
|
1582
|
-
path: string;
|
|
1583
|
-
content: string;
|
|
1584
|
-
}[][] | undefined;
|
|
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: {
|
|
590
|
+
agentContext: string;
|
|
1598
591
|
fileContext: {
|
|
1599
592
|
currentWorkingDirectory: string;
|
|
1600
593
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -1622,7 +615,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1622
615
|
content: string;
|
|
1623
616
|
}[][] | undefined;
|
|
1624
617
|
};
|
|
1625
|
-
agentContext: string;
|
|
1626
618
|
messageHistory: {
|
|
1627
619
|
content: string | ({
|
|
1628
620
|
type: "text";
|
|
@@ -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,23 +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
|
-
|
|
1677
|
-
|
|
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, {
|
|
1678
736
|
currentWorkingDirectory: string;
|
|
1679
737
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1680
738
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
@@ -1700,529 +758,406 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1700
758
|
path: string;
|
|
1701
759
|
content: string;
|
|
1702
760
|
}[][] | undefined;
|
|
1703
|
-
};
|
|
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
|
-
}, {
|
|
1838
|
-
content: string;
|
|
1839
|
-
type: "tool_result";
|
|
1840
|
-
tool_use_id: string;
|
|
1841
|
-
cache_control?: {
|
|
1842
|
-
type: "ephemeral";
|
|
1843
|
-
} | undefined;
|
|
1844
|
-
}>, z.ZodObject<{
|
|
1845
|
-
type: z.ZodLiteral<"image">;
|
|
1846
|
-
source: z.ZodObject<{
|
|
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;
|
|
1872
|
-
};
|
|
1873
|
-
cache_control?: {
|
|
1874
|
-
type: "ephemeral";
|
|
1875
|
-
} | undefined;
|
|
1876
761
|
}, {
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
}>]>, "many">]>;
|
|
1887
|
-
}, "strip", z.ZodTypeAny, {
|
|
1888
|
-
content: string | ({
|
|
1889
|
-
type: "text";
|
|
1890
|
-
text: string;
|
|
1891
|
-
cache_control?: {
|
|
1892
|
-
type: "ephemeral";
|
|
1893
|
-
} | undefined;
|
|
1894
|
-
} | {
|
|
1895
|
-
type: "tool_use";
|
|
1896
|
-
name: string;
|
|
1897
|
-
id: string;
|
|
1898
|
-
input: Record<string, any>;
|
|
1899
|
-
cache_control?: {
|
|
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;
|
|
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;
|
|
1915
771
|
};
|
|
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;
|
|
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;
|
|
1949
781
|
};
|
|
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;
|
|
782
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
783
|
+
fileVersions?: {
|
|
784
|
+
path: string;
|
|
785
|
+
content: string;
|
|
786
|
+
}[][] | undefined;
|
|
2001
787
|
}>;
|
|
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
788
|
}, "strip", z.ZodTypeAny, {
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
2042
|
-
knowledgeFiles: Record<string, string>;
|
|
2043
|
-
gitChanges: {
|
|
2044
|
-
status: string;
|
|
2045
|
-
diff: string;
|
|
2046
|
-
diffCached: string;
|
|
2047
|
-
lastCommitMessages: 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;
|
|
801
|
+
};
|
|
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;
|
|
811
|
+
};
|
|
812
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
813
|
+
fileVersions?: {
|
|
814
|
+
path: string;
|
|
815
|
+
content: string;
|
|
816
|
+
}[][] | undefined;
|
|
2048
817
|
};
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
818
|
+
authToken?: string | undefined;
|
|
819
|
+
}, {
|
|
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
|
-
|
|
2091
|
-
|
|
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;
|
|
938
|
+
};
|
|
939
|
+
toolResults: {
|
|
2092
940
|
name: string;
|
|
2093
941
|
id: string;
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
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;
|
|
2111
963
|
};
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
lastCommitMessages: string;
|
|
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;
|
|
2128
979
|
};
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
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;
|
|
2138
1059
|
};
|
|
2139
|
-
|
|
2140
|
-
fileVersions?: {
|
|
2141
|
-
path: string;
|
|
2142
|
-
content: string;
|
|
2143
|
-
}[][] | undefined;
|
|
2144
|
-
};
|
|
2145
|
-
changesAlreadyApplied: {
|
|
2146
|
-
path: string;
|
|
2147
|
-
content: string;
|
|
2148
|
-
type: "file" | "patch";
|
|
2149
|
-
}[];
|
|
2150
|
-
costMode: "max" | "lite" | "normal";
|
|
2151
|
-
authToken?: string | undefined;
|
|
2152
|
-
}, {
|
|
2153
|
-
type: "user-input";
|
|
2154
|
-
fingerprintId: string;
|
|
2155
|
-
userInputId: string;
|
|
2156
|
-
messages: {
|
|
2157
|
-
content: string | ({
|
|
2158
|
-
type: "text";
|
|
2159
|
-
text: string;
|
|
2160
|
-
cache_control?: {
|
|
2161
|
-
type: "ephemeral";
|
|
2162
|
-
} | undefined;
|
|
2163
|
-
} | {
|
|
2164
|
-
type: "tool_use";
|
|
1060
|
+
toolResults: {
|
|
2165
1061
|
name: string;
|
|
2166
1062
|
id: string;
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
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;
|
|
2184
1085
|
};
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
lastCommitMessages: string;
|
|
2201
|
-
};
|
|
2202
|
-
changesSinceLastChat: Record<string, string>;
|
|
2203
|
-
shellConfigFiles: Record<string, string>;
|
|
2204
|
-
systemInfo: {
|
|
2205
|
-
platform: string;
|
|
2206
|
-
shell: string;
|
|
2207
|
-
nodeVersion: string;
|
|
2208
|
-
arch: string;
|
|
2209
|
-
homedir: string;
|
|
2210
|
-
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;
|
|
2211
1101
|
};
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
1102
|
+
authToken?: string | undefined;
|
|
1103
|
+
} | {
|
|
1104
|
+
type: "generate-commit-message";
|
|
1105
|
+
fingerprintId: string;
|
|
1106
|
+
stagedChanges: string;
|
|
1107
|
+
authToken?: string | undefined;
|
|
2217
1108
|
};
|
|
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,7 +1464,9 @@ 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, {
|
|
1469
|
+
agentContext: string;
|
|
2533
1470
|
fileContext: {
|
|
2534
1471
|
currentWorkingDirectory: string;
|
|
2535
1472
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -2557,7 +1494,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2557
1494
|
content: string;
|
|
2558
1495
|
}[][] | undefined;
|
|
2559
1496
|
};
|
|
2560
|
-
agentContext: string;
|
|
2561
1497
|
messageHistory: {
|
|
2562
1498
|
content: string | ({
|
|
2563
1499
|
type: "text";
|
|
@@ -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,7 +1529,9 @@ 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
|
}, {
|
|
1534
|
+
agentContext: string;
|
|
2597
1535
|
fileContext: {
|
|
2598
1536
|
currentWorkingDirectory: string;
|
|
2599
1537
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -2621,7 +1559,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2621
1559
|
content: string;
|
|
2622
1560
|
}[][] | undefined;
|
|
2623
1561
|
};
|
|
2624
|
-
agentContext: string;
|
|
2625
1562
|
messageHistory: {
|
|
2626
1563
|
content: string | ({
|
|
2627
1564
|
type: "text";
|
|
@@ -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,10 +1611,11 @@ 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: {
|
|
1618
|
+
agentContext: string;
|
|
2680
1619
|
fileContext: {
|
|
2681
1620
|
currentWorkingDirectory: string;
|
|
2682
1621
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -2704,7 +1643,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2704
1643
|
content: string;
|
|
2705
1644
|
}[][] | undefined;
|
|
2706
1645
|
};
|
|
2707
|
-
agentContext: string;
|
|
2708
1646
|
messageHistory: {
|
|
2709
1647
|
content: string | ({
|
|
2710
1648
|
type: "text";
|
|
@@ -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,19 +1678,21 @@ 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: {
|
|
1695
|
+
agentContext: string;
|
|
2756
1696
|
fileContext: {
|
|
2757
1697
|
currentWorkingDirectory: string;
|
|
2758
1698
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -2780,7 +1720,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2780
1720
|
content: string;
|
|
2781
1721
|
}[][] | undefined;
|
|
2782
1722
|
};
|
|
2783
|
-
agentContext: string;
|
|
2784
1723
|
messageHistory: {
|
|
2785
1724
|
content: string | ({
|
|
2786
1725
|
type: "text";
|
|
@@ -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]>>;
|
|
@@ -2981,94 +1921,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2981
1921
|
}[][] | undefined;
|
|
2982
1922
|
};
|
|
2983
1923
|
authToken?: string | undefined;
|
|
2984
|
-
}, {
|
|
2985
|
-
type: "init";
|
|
2986
|
-
fingerprintId: string;
|
|
2987
|
-
fileContext: {
|
|
2988
|
-
currentWorkingDirectory: string;
|
|
2989
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
2990
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
2991
|
-
knowledgeFiles: Record<string, string>;
|
|
2992
|
-
gitChanges: {
|
|
2993
|
-
status: string;
|
|
2994
|
-
diff: string;
|
|
2995
|
-
diffCached: string;
|
|
2996
|
-
lastCommitMessages: string;
|
|
2997
|
-
};
|
|
2998
|
-
changesSinceLastChat: Record<string, string>;
|
|
2999
|
-
shellConfigFiles: Record<string, string>;
|
|
3000
|
-
systemInfo: {
|
|
3001
|
-
platform: string;
|
|
3002
|
-
shell: string;
|
|
3003
|
-
nodeVersion: string;
|
|
3004
|
-
arch: string;
|
|
3005
|
-
homedir: string;
|
|
3006
|
-
cpus: number;
|
|
3007
|
-
};
|
|
3008
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
3009
|
-
fileVersions?: {
|
|
3010
|
-
path: string;
|
|
3011
|
-
content: string;
|
|
3012
|
-
}[][] | undefined;
|
|
3013
|
-
};
|
|
3014
|
-
authToken?: string | undefined;
|
|
3015
|
-
}>, z.ZodObject<{
|
|
3016
|
-
type: z.ZodLiteral<"generate-commit-message">;
|
|
3017
|
-
fingerprintId: z.ZodString;
|
|
3018
|
-
authToken: z.ZodOptional<z.ZodString>;
|
|
3019
|
-
stagedChanges: z.ZodString;
|
|
3020
|
-
}, "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";
|
|
1924
|
+
}, {
|
|
1925
|
+
type: "init";
|
|
3035
1926
|
fingerprintId: string;
|
|
3036
|
-
userInputId: string;
|
|
3037
|
-
messages: {
|
|
3038
|
-
content: string | ({
|
|
3039
|
-
type: "text";
|
|
3040
|
-
text: string;
|
|
3041
|
-
cache_control?: {
|
|
3042
|
-
type: "ephemeral";
|
|
3043
|
-
} | undefined;
|
|
3044
|
-
} | {
|
|
3045
|
-
type: "tool_use";
|
|
3046
|
-
name: string;
|
|
3047
|
-
id: string;
|
|
3048
|
-
input: Record<string, any>;
|
|
3049
|
-
cache_control?: {
|
|
3050
|
-
type: "ephemeral";
|
|
3051
|
-
} | undefined;
|
|
3052
|
-
} | {
|
|
3053
|
-
content: string;
|
|
3054
|
-
type: "tool_result";
|
|
3055
|
-
tool_use_id: string;
|
|
3056
|
-
cache_control?: {
|
|
3057
|
-
type: "ephemeral";
|
|
3058
|
-
} | undefined;
|
|
3059
|
-
} | {
|
|
3060
|
-
type: "image";
|
|
3061
|
-
source: {
|
|
3062
|
-
type: "base64";
|
|
3063
|
-
media_type: "image/jpeg";
|
|
3064
|
-
data: string;
|
|
3065
|
-
};
|
|
3066
|
-
cache_control?: {
|
|
3067
|
-
type: "ephemeral";
|
|
3068
|
-
} | undefined;
|
|
3069
|
-
})[];
|
|
3070
|
-
role: "user" | "assistant";
|
|
3071
|
-
}[];
|
|
3072
1927
|
fileContext: {
|
|
3073
1928
|
currentWorkingDirectory: string;
|
|
3074
1929
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -3096,19 +1951,32 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3096
1951
|
content: string;
|
|
3097
1952
|
}[][] | undefined;
|
|
3098
1953
|
};
|
|
3099
|
-
changesAlreadyApplied: {
|
|
3100
|
-
path: string;
|
|
3101
|
-
content: string;
|
|
3102
|
-
type: "file" | "patch";
|
|
3103
|
-
}[];
|
|
3104
|
-
costMode: "max" | "lite" | "normal";
|
|
3105
1954
|
authToken?: string | undefined;
|
|
3106
|
-
}
|
|
3107
|
-
type: "
|
|
1955
|
+
}>, z.ZodObject<{
|
|
1956
|
+
type: z.ZodLiteral<"generate-commit-message">;
|
|
1957
|
+
fingerprintId: z.ZodString;
|
|
1958
|
+
authToken: z.ZodOptional<z.ZodString>;
|
|
1959
|
+
stagedChanges: z.ZodString;
|
|
1960
|
+
}, "strip", z.ZodTypeAny, {
|
|
1961
|
+
type: "generate-commit-message";
|
|
1962
|
+
fingerprintId: string;
|
|
1963
|
+
stagedChanges: string;
|
|
1964
|
+
authToken?: string | undefined;
|
|
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: {
|
|
1979
|
+
agentContext: string;
|
|
3112
1980
|
fileContext: {
|
|
3113
1981
|
currentWorkingDirectory: string;
|
|
3114
1982
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -3136,7 +2004,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3136
2004
|
content: string;
|
|
3137
2005
|
}[][] | undefined;
|
|
3138
2006
|
};
|
|
3139
|
-
agentContext: string;
|
|
3140
2007
|
messageHistory: {
|
|
3141
2008
|
content: string | ({
|
|
3142
2009
|
type: "text";
|
|
@@ -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,14 +2039,15 @@ 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>;
|
|
@@ -3225,83 +2093,11 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3225
2093
|
}, {
|
|
3226
2094
|
type: "action";
|
|
3227
2095
|
data: {
|
|
3228
|
-
type: "user-input";
|
|
3229
|
-
fingerprintId: string;
|
|
3230
|
-
userInputId: string;
|
|
3231
|
-
messages: {
|
|
3232
|
-
content: string | ({
|
|
3233
|
-
type: "text";
|
|
3234
|
-
text: string;
|
|
3235
|
-
cache_control?: {
|
|
3236
|
-
type: "ephemeral";
|
|
3237
|
-
} | undefined;
|
|
3238
|
-
} | {
|
|
3239
|
-
type: "tool_use";
|
|
3240
|
-
name: string;
|
|
3241
|
-
id: string;
|
|
3242
|
-
input: Record<string, any>;
|
|
3243
|
-
cache_control?: {
|
|
3244
|
-
type: "ephemeral";
|
|
3245
|
-
} | undefined;
|
|
3246
|
-
} | {
|
|
3247
|
-
content: string;
|
|
3248
|
-
type: "tool_result";
|
|
3249
|
-
tool_use_id: string;
|
|
3250
|
-
cache_control?: {
|
|
3251
|
-
type: "ephemeral";
|
|
3252
|
-
} | undefined;
|
|
3253
|
-
} | {
|
|
3254
|
-
type: "image";
|
|
3255
|
-
source: {
|
|
3256
|
-
type: "base64";
|
|
3257
|
-
media_type: "image/jpeg";
|
|
3258
|
-
data: string;
|
|
3259
|
-
};
|
|
3260
|
-
cache_control?: {
|
|
3261
|
-
type: "ephemeral";
|
|
3262
|
-
} | undefined;
|
|
3263
|
-
})[];
|
|
3264
|
-
role: "user" | "assistant";
|
|
3265
|
-
}[];
|
|
3266
|
-
fileContext: {
|
|
3267
|
-
currentWorkingDirectory: string;
|
|
3268
|
-
fileTree: import("../util/file").FileTreeNode[];
|
|
3269
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
3270
|
-
knowledgeFiles: Record<string, string>;
|
|
3271
|
-
gitChanges: {
|
|
3272
|
-
status: string;
|
|
3273
|
-
diff: string;
|
|
3274
|
-
diffCached: string;
|
|
3275
|
-
lastCommitMessages: string;
|
|
3276
|
-
};
|
|
3277
|
-
changesSinceLastChat: Record<string, string>;
|
|
3278
|
-
shellConfigFiles: Record<string, string>;
|
|
3279
|
-
systemInfo: {
|
|
3280
|
-
platform: string;
|
|
3281
|
-
shell: string;
|
|
3282
|
-
nodeVersion: string;
|
|
3283
|
-
arch: string;
|
|
3284
|
-
homedir: string;
|
|
3285
|
-
cpus: number;
|
|
3286
|
-
};
|
|
3287
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
3288
|
-
fileVersions?: {
|
|
3289
|
-
path: string;
|
|
3290
|
-
content: string;
|
|
3291
|
-
}[][] | undefined;
|
|
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: {
|
|
2100
|
+
agentContext: string;
|
|
3305
2101
|
fileContext: {
|
|
3306
2102
|
currentWorkingDirectory: string;
|
|
3307
2103
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -3329,7 +2125,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3329
2125
|
content: string;
|
|
3330
2126
|
}[][] | undefined;
|
|
3331
2127
|
};
|
|
3332
|
-
agentContext: string;
|
|
3333
2128
|
messageHistory: {
|
|
3334
2129
|
content: string | ({
|
|
3335
2130
|
type: "text";
|
|
@@ -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,15 +2160,16 @@ 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>;
|
|
@@ -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: "file" | "patch";
|
|
3462
2259
|
path: string;
|
|
3463
2260
|
content: string;
|
|
3464
|
-
type: "file" | "patch";
|
|
3465
2261
|
}, {
|
|
2262
|
+
type: "file" | "patch";
|
|
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: "file" | "patch";
|
|
3475
2272
|
path: string;
|
|
3476
2273
|
content: string;
|
|
3477
|
-
type: "file" | "patch";
|
|
3478
2274
|
}, {
|
|
2275
|
+
type: "file" | "patch";
|
|
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
|
-
changesAlreadyApplied: {
|
|
3505
|
-
path: string;
|
|
3506
|
-
content: string;
|
|
3507
|
-
type: "file" | "patch";
|
|
3508
|
-
}[];
|
|
3509
2300
|
response: string;
|
|
3510
2301
|
changes: {
|
|
2302
|
+
type: "file" | "patch";
|
|
3511
2303
|
path: string;
|
|
3512
2304
|
content: string;
|
|
2305
|
+
}[];
|
|
2306
|
+
changesAlreadyApplied: {
|
|
3513
2307
|
type: "file" | "patch";
|
|
2308
|
+
path: string;
|
|
2309
|
+
content: string;
|
|
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
|
-
changesAlreadyApplied: {
|
|
3530
|
-
path: string;
|
|
3531
|
-
content: string;
|
|
3532
|
-
type: "file" | "patch";
|
|
3533
|
-
}[];
|
|
3534
2325
|
response: string;
|
|
3535
2326
|
changes: {
|
|
2327
|
+
type: "file" | "patch";
|
|
3536
2328
|
path: string;
|
|
3537
2329
|
content: string;
|
|
2330
|
+
}[];
|
|
2331
|
+
changesAlreadyApplied: {
|
|
3538
2332
|
type: "file" | "patch";
|
|
2333
|
+
path: string;
|
|
2334
|
+
content: string;
|
|
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,7 +2647,9 @@ 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, {
|
|
2652
|
+
agentContext: string;
|
|
3855
2653
|
fileContext: {
|
|
3856
2654
|
currentWorkingDirectory: string;
|
|
3857
2655
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -3879,7 +2677,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3879
2677
|
content: string;
|
|
3880
2678
|
}[][] | undefined;
|
|
3881
2679
|
};
|
|
3882
|
-
agentContext: string;
|
|
3883
2680
|
messageHistory: {
|
|
3884
2681
|
content: string | ({
|
|
3885
2682
|
type: "text";
|
|
@@ -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,7 +2712,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3915
2712
|
})[];
|
|
3916
2713
|
role: "user" | "assistant";
|
|
3917
2714
|
}[];
|
|
2715
|
+
lastUserPromptIndex?: number | undefined;
|
|
3918
2716
|
}, {
|
|
2717
|
+
agentContext: string;
|
|
3919
2718
|
fileContext: {
|
|
3920
2719
|
currentWorkingDirectory: string;
|
|
3921
2720
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -3943,7 +2742,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3943
2742
|
content: string;
|
|
3944
2743
|
}[][] | undefined;
|
|
3945
2744
|
};
|
|
3946
|
-
agentContext: string;
|
|
3947
2745
|
messageHistory: {
|
|
3948
2746
|
content: string | ({
|
|
3949
2747
|
type: "text";
|
|
@@ -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;
|
|
@@ -4010,6 +2809,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4010
2809
|
type: "prompt-response";
|
|
4011
2810
|
promptId: string;
|
|
4012
2811
|
agentState: {
|
|
2812
|
+
agentContext: string;
|
|
4013
2813
|
fileContext: {
|
|
4014
2814
|
currentWorkingDirectory: string;
|
|
4015
2815
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -4037,7 +2837,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4037
2837
|
content: string;
|
|
4038
2838
|
}[][] | undefined;
|
|
4039
2839
|
};
|
|
4040
|
-
agentContext: string;
|
|
4041
2840
|
messageHistory: {
|
|
4042
2841
|
content: string | ({
|
|
4043
2842
|
type: "text";
|
|
@@ -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;
|
|
@@ -4088,6 +2888,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4088
2888
|
type: "prompt-response";
|
|
4089
2889
|
promptId: string;
|
|
4090
2890
|
agentState: {
|
|
2891
|
+
agentContext: string;
|
|
4091
2892
|
fileContext: {
|
|
4092
2893
|
currentWorkingDirectory: string;
|
|
4093
2894
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -4115,7 +2916,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4115
2916
|
content: string;
|
|
4116
2917
|
}[][] | undefined;
|
|
4117
2918
|
};
|
|
4118
|
-
agentContext: string;
|
|
4119
2919
|
messageHistory: {
|
|
4120
2920
|
content: string | ({
|
|
4121
2921
|
type: "text";
|
|
@@ -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;
|
|
@@ -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: "file" | "patch";
|
|
4199
3001
|
path: string;
|
|
4200
3002
|
content: string;
|
|
4201
|
-
type: "file" | "patch";
|
|
4202
3003
|
}, {
|
|
3004
|
+
type: "file" | "patch";
|
|
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: "file" | "patch";
|
|
4212
3014
|
path: string;
|
|
4213
3015
|
content: string;
|
|
4214
|
-
type: "file" | "patch";
|
|
4215
3016
|
}, {
|
|
3017
|
+
type: "file" | "patch";
|
|
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
|
-
changesAlreadyApplied: {
|
|
4240
|
-
path: string;
|
|
4241
|
-
content: string;
|
|
4242
|
-
type: "file" | "patch";
|
|
4243
|
-
}[];
|
|
4244
3040
|
response: string;
|
|
4245
3041
|
changes: {
|
|
3042
|
+
type: "file" | "patch";
|
|
4246
3043
|
path: string;
|
|
4247
3044
|
content: string;
|
|
3045
|
+
}[];
|
|
3046
|
+
changesAlreadyApplied: {
|
|
4248
3047
|
type: "file" | "patch";
|
|
3048
|
+
path: string;
|
|
3049
|
+
content: string;
|
|
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
|
-
changesAlreadyApplied: {
|
|
4264
|
-
path: string;
|
|
4265
|
-
content: string;
|
|
4266
|
-
type: "file" | "patch";
|
|
4267
|
-
}[];
|
|
4268
3064
|
response: string;
|
|
4269
3065
|
changes: {
|
|
3066
|
+
type: "file" | "patch";
|
|
4270
3067
|
path: string;
|
|
4271
3068
|
content: string;
|
|
3069
|
+
}[];
|
|
3070
|
+
changesAlreadyApplied: {
|
|
4272
3071
|
type: "file" | "patch";
|
|
3072
|
+
path: string;
|
|
3073
|
+
content: string;
|
|
4273
3074
|
}[];
|
|
4274
3075
|
addedFileVersions: {
|
|
4275
3076
|
path: string;
|
|
@@ -4282,12 +3083,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4282
3083
|
result: z.ZodString;
|
|
4283
3084
|
}, "strip", z.ZodTypeAny, {
|
|
4284
3085
|
type: "terminal-command-result";
|
|
4285
|
-
userInputId: string;
|
|
4286
3086
|
result: string;
|
|
3087
|
+
userInputId: string;
|
|
4287
3088
|
}, {
|
|
4288
3089
|
type: "terminal-command-result";
|
|
4289
|
-
userInputId: string;
|
|
4290
3090
|
result: string;
|
|
3091
|
+
userInputId: string;
|
|
4291
3092
|
}>, z.ZodObject<{
|
|
4292
3093
|
type: z.ZodLiteral<"npm-version-status">;
|
|
4293
3094
|
isUpToDate: z.ZodBoolean;
|
|
@@ -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;
|
|
@@ -4384,10 +3185,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4384
3185
|
}, "strip", z.ZodTypeAny, {
|
|
4385
3186
|
type: "action";
|
|
4386
3187
|
data: {
|
|
4387
|
-
type: "response-chunk";
|
|
4388
|
-
userInputId: string;
|
|
4389
|
-
chunk: string;
|
|
4390
|
-
} | {
|
|
4391
3188
|
type: "usage-response";
|
|
4392
3189
|
usage: number;
|
|
4393
3190
|
limit: number;
|
|
@@ -4395,19 +3192,27 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4395
3192
|
next_quota_reset: Date;
|
|
4396
3193
|
session_credits_used: number;
|
|
4397
3194
|
referralLink?: string | undefined;
|
|
3195
|
+
} | {
|
|
3196
|
+
type: "init-response";
|
|
3197
|
+
usage: number;
|
|
3198
|
+
limit: number;
|
|
3199
|
+
subscription_active: boolean;
|
|
3200
|
+
next_quota_reset: Date;
|
|
3201
|
+
session_credits_used: number;
|
|
3202
|
+
referralLink?: string | undefined;
|
|
4398
3203
|
} | {
|
|
4399
3204
|
type: "response-complete";
|
|
4400
3205
|
userInputId: string;
|
|
4401
|
-
changesAlreadyApplied: {
|
|
4402
|
-
path: string;
|
|
4403
|
-
content: string;
|
|
4404
|
-
type: "file" | "patch";
|
|
4405
|
-
}[];
|
|
4406
3206
|
response: string;
|
|
4407
3207
|
changes: {
|
|
3208
|
+
type: "file" | "patch";
|
|
4408
3209
|
path: string;
|
|
4409
3210
|
content: string;
|
|
3211
|
+
}[];
|
|
3212
|
+
changesAlreadyApplied: {
|
|
4410
3213
|
type: "file" | "patch";
|
|
3214
|
+
path: string;
|
|
3215
|
+
content: string;
|
|
4411
3216
|
}[];
|
|
4412
3217
|
addedFileVersions: {
|
|
4413
3218
|
path: string;
|
|
@@ -4420,10 +3225,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4420
3225
|
subscription_active?: boolean | undefined;
|
|
4421
3226
|
next_quota_reset?: Date | undefined;
|
|
4422
3227
|
session_credits_used?: number | undefined;
|
|
3228
|
+
} | {
|
|
3229
|
+
type: "message-cost-response";
|
|
3230
|
+
promptId: string;
|
|
3231
|
+
credits: number;
|
|
4423
3232
|
} | {
|
|
4424
3233
|
type: "prompt-response";
|
|
4425
3234
|
promptId: string;
|
|
4426
3235
|
agentState: {
|
|
3236
|
+
agentContext: string;
|
|
4427
3237
|
fileContext: {
|
|
4428
3238
|
currentWorkingDirectory: string;
|
|
4429
3239
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -4451,7 +3261,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4451
3261
|
content: string;
|
|
4452
3262
|
}[][] | undefined;
|
|
4453
3263
|
};
|
|
4454
|
-
agentContext: string;
|
|
4455
3264
|
messageHistory: {
|
|
4456
3265
|
content: string | ({
|
|
4457
3266
|
type: "text";
|
|
@@ -4468,8 +3277,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4468
3277
|
type: "ephemeral";
|
|
4469
3278
|
} | undefined;
|
|
4470
3279
|
} | {
|
|
4471
|
-
content: string;
|
|
4472
3280
|
type: "tool_result";
|
|
3281
|
+
content: string;
|
|
4473
3282
|
tool_use_id: string;
|
|
4474
3283
|
cache_control?: {
|
|
4475
3284
|
type: "ephemeral";
|
|
@@ -4487,6 +3296,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4487
3296
|
})[];
|
|
4488
3297
|
role: "user" | "assistant";
|
|
4489
3298
|
}[];
|
|
3299
|
+
lastUserPromptIndex?: number | undefined;
|
|
4490
3300
|
};
|
|
4491
3301
|
toolResults: {
|
|
4492
3302
|
name: string;
|
|
@@ -4498,6 +3308,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4498
3308
|
id: string;
|
|
4499
3309
|
parameters: Record<string, string>;
|
|
4500
3310
|
}[];
|
|
3311
|
+
} | {
|
|
3312
|
+
type: "response-chunk";
|
|
3313
|
+
userInputId: string;
|
|
3314
|
+
chunk: string;
|
|
4501
3315
|
} | {
|
|
4502
3316
|
type: "read-files";
|
|
4503
3317
|
requestId: string;
|
|
@@ -4510,16 +3324,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4510
3324
|
input: Record<string, any>;
|
|
4511
3325
|
};
|
|
4512
3326
|
userInputId: string;
|
|
4513
|
-
changesAlreadyApplied: {
|
|
4514
|
-
path: string;
|
|
4515
|
-
content: string;
|
|
4516
|
-
type: "file" | "patch";
|
|
4517
|
-
}[];
|
|
4518
3327
|
response: string;
|
|
4519
3328
|
changes: {
|
|
3329
|
+
type: "file" | "patch";
|
|
4520
3330
|
path: string;
|
|
4521
3331
|
content: string;
|
|
3332
|
+
}[];
|
|
3333
|
+
changesAlreadyApplied: {
|
|
4522
3334
|
type: "file" | "patch";
|
|
3335
|
+
path: string;
|
|
3336
|
+
content: string;
|
|
4523
3337
|
}[];
|
|
4524
3338
|
addedFileVersions: {
|
|
4525
3339
|
path: string;
|
|
@@ -4528,27 +3342,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4528
3342
|
resetFileVersions: boolean;
|
|
4529
3343
|
} | {
|
|
4530
3344
|
type: "terminal-command-result";
|
|
4531
|
-
userInputId: string;
|
|
4532
3345
|
result: string;
|
|
3346
|
+
userInputId: string;
|
|
4533
3347
|
} | {
|
|
4534
3348
|
type: "npm-version-status";
|
|
4535
3349
|
isUpToDate: boolean;
|
|
4536
3350
|
latestVersion: string;
|
|
4537
3351
|
} | {
|
|
4538
|
-
type: "init-response";
|
|
4539
|
-
usage: number;
|
|
4540
|
-
limit: number;
|
|
4541
|
-
subscription_active: boolean;
|
|
4542
|
-
next_quota_reset: Date;
|
|
4543
|
-
session_credits_used: number;
|
|
4544
|
-
referralLink?: string | undefined;
|
|
4545
|
-
} | {
|
|
4546
|
-
type: "message-cost-response";
|
|
4547
|
-
promptId: string;
|
|
4548
|
-
credits: number;
|
|
4549
|
-
} | {
|
|
4550
|
-
message: string;
|
|
4551
3352
|
type: "action-error";
|
|
3353
|
+
message: string;
|
|
4552
3354
|
} | {
|
|
4553
3355
|
type: "commit-message-response";
|
|
4554
3356
|
commitMessage: string;
|
|
@@ -4556,10 +3358,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4556
3358
|
}, {
|
|
4557
3359
|
type: "action";
|
|
4558
3360
|
data: {
|
|
4559
|
-
type: "response-chunk";
|
|
4560
|
-
userInputId: string;
|
|
4561
|
-
chunk: string;
|
|
4562
|
-
} | {
|
|
4563
3361
|
type: "usage-response";
|
|
4564
3362
|
usage: number;
|
|
4565
3363
|
limit: number;
|
|
@@ -4567,19 +3365,27 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4567
3365
|
next_quota_reset: Date;
|
|
4568
3366
|
session_credits_used: number;
|
|
4569
3367
|
referralLink?: string | undefined;
|
|
3368
|
+
} | {
|
|
3369
|
+
type: "init-response";
|
|
3370
|
+
usage: number;
|
|
3371
|
+
limit: number;
|
|
3372
|
+
subscription_active: boolean;
|
|
3373
|
+
next_quota_reset: Date;
|
|
3374
|
+
session_credits_used: number;
|
|
3375
|
+
referralLink?: string | undefined;
|
|
4570
3376
|
} | {
|
|
4571
3377
|
type: "response-complete";
|
|
4572
3378
|
userInputId: string;
|
|
4573
|
-
changesAlreadyApplied: {
|
|
4574
|
-
path: string;
|
|
4575
|
-
content: string;
|
|
4576
|
-
type: "file" | "patch";
|
|
4577
|
-
}[];
|
|
4578
3379
|
response: string;
|
|
4579
3380
|
changes: {
|
|
3381
|
+
type: "file" | "patch";
|
|
4580
3382
|
path: string;
|
|
4581
3383
|
content: string;
|
|
3384
|
+
}[];
|
|
3385
|
+
changesAlreadyApplied: {
|
|
4582
3386
|
type: "file" | "patch";
|
|
3387
|
+
path: string;
|
|
3388
|
+
content: string;
|
|
4583
3389
|
}[];
|
|
4584
3390
|
addedFileVersions: {
|
|
4585
3391
|
path: string;
|
|
@@ -4592,10 +3398,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4592
3398
|
subscription_active?: boolean | undefined;
|
|
4593
3399
|
next_quota_reset?: Date | undefined;
|
|
4594
3400
|
session_credits_used?: number | undefined;
|
|
3401
|
+
} | {
|
|
3402
|
+
type: "message-cost-response";
|
|
3403
|
+
promptId: string;
|
|
3404
|
+
credits: number;
|
|
4595
3405
|
} | {
|
|
4596
3406
|
type: "prompt-response";
|
|
4597
3407
|
promptId: string;
|
|
4598
3408
|
agentState: {
|
|
3409
|
+
agentContext: string;
|
|
4599
3410
|
fileContext: {
|
|
4600
3411
|
currentWorkingDirectory: string;
|
|
4601
3412
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -4623,7 +3434,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4623
3434
|
content: string;
|
|
4624
3435
|
}[][] | undefined;
|
|
4625
3436
|
};
|
|
4626
|
-
agentContext: string;
|
|
4627
3437
|
messageHistory: {
|
|
4628
3438
|
content: string | ({
|
|
4629
3439
|
type: "text";
|
|
@@ -4640,8 +3450,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4640
3450
|
type: "ephemeral";
|
|
4641
3451
|
} | undefined;
|
|
4642
3452
|
} | {
|
|
4643
|
-
content: string;
|
|
4644
3453
|
type: "tool_result";
|
|
3454
|
+
content: string;
|
|
4645
3455
|
tool_use_id: string;
|
|
4646
3456
|
cache_control?: {
|
|
4647
3457
|
type: "ephemeral";
|
|
@@ -4659,6 +3469,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4659
3469
|
})[];
|
|
4660
3470
|
role: "user" | "assistant";
|
|
4661
3471
|
}[];
|
|
3472
|
+
lastUserPromptIndex?: number | undefined;
|
|
4662
3473
|
};
|
|
4663
3474
|
toolResults: {
|
|
4664
3475
|
name: string;
|
|
@@ -4670,6 +3481,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4670
3481
|
id: string;
|
|
4671
3482
|
parameters: Record<string, string>;
|
|
4672
3483
|
}[];
|
|
3484
|
+
} | {
|
|
3485
|
+
type: "response-chunk";
|
|
3486
|
+
userInputId: string;
|
|
3487
|
+
chunk: string;
|
|
4673
3488
|
} | {
|
|
4674
3489
|
type: "read-files";
|
|
4675
3490
|
requestId: string;
|
|
@@ -4682,16 +3497,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4682
3497
|
input: Record<string, any>;
|
|
4683
3498
|
};
|
|
4684
3499
|
userInputId: string;
|
|
4685
|
-
changesAlreadyApplied: {
|
|
4686
|
-
path: string;
|
|
4687
|
-
content: string;
|
|
4688
|
-
type: "file" | "patch";
|
|
4689
|
-
}[];
|
|
4690
3500
|
response: string;
|
|
4691
3501
|
changes: {
|
|
3502
|
+
type: "file" | "patch";
|
|
4692
3503
|
path: string;
|
|
4693
3504
|
content: string;
|
|
3505
|
+
}[];
|
|
3506
|
+
changesAlreadyApplied: {
|
|
4694
3507
|
type: "file" | "patch";
|
|
3508
|
+
path: string;
|
|
3509
|
+
content: string;
|
|
4695
3510
|
}[];
|
|
4696
3511
|
addedFileVersions: {
|
|
4697
3512
|
path: string;
|
|
@@ -4700,27 +3515,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
4700
3515
|
resetFileVersions: boolean;
|
|
4701
3516
|
} | {
|
|
4702
3517
|
type: "terminal-command-result";
|
|
4703
|
-
userInputId: string;
|
|
4704
3518
|
result: string;
|
|
3519
|
+
userInputId: string;
|
|
4705
3520
|
} | {
|
|
4706
3521
|
type: "npm-version-status";
|
|
4707
3522
|
isUpToDate: boolean;
|
|
4708
3523
|
latestVersion: string;
|
|
4709
3524
|
} | {
|
|
4710
|
-
type: "init-response";
|
|
4711
|
-
usage: number;
|
|
4712
|
-
limit: number;
|
|
4713
|
-
subscription_active: boolean;
|
|
4714
|
-
next_quota_reset: Date;
|
|
4715
|
-
session_credits_used: number;
|
|
4716
|
-
referralLink?: string | undefined;
|
|
4717
|
-
} | {
|
|
4718
|
-
type: "message-cost-response";
|
|
4719
|
-
promptId: string;
|
|
4720
|
-
credits: number;
|
|
4721
|
-
} | {
|
|
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: "file" | "patch";
|
|
4768
3572
|
path: string;
|
|
4769
3573
|
content: string;
|
|
4770
|
-
type: "file" | "patch";
|
|
4771
3574
|
}, {
|
|
3575
|
+
type: "file" | "patch";
|
|
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: "file" | "patch";
|
|
4781
3585
|
path: string;
|
|
4782
3586
|
content: string;
|
|
4783
|
-
type: "file" | "patch";
|
|
4784
3587
|
}, {
|
|
3588
|
+
type: "file" | "patch";
|
|
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
|
-
changesAlreadyApplied: {
|
|
4811
|
-
path: string;
|
|
4812
|
-
content: string;
|
|
4813
|
-
type: "file" | "patch";
|
|
4814
|
-
}[];
|
|
4815
3613
|
response: string;
|
|
4816
3614
|
changes: {
|
|
3615
|
+
type: "file" | "patch";
|
|
4817
3616
|
path: string;
|
|
4818
3617
|
content: string;
|
|
3618
|
+
}[];
|
|
3619
|
+
changesAlreadyApplied: {
|
|
4819
3620
|
type: "file" | "patch";
|
|
3621
|
+
path: string;
|
|
3622
|
+
content: string;
|
|
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
|
-
changesAlreadyApplied: {
|
|
4836
|
-
path: string;
|
|
4837
|
-
content: string;
|
|
4838
|
-
type: "file" | "patch";
|
|
4839
|
-
}[];
|
|
4840
3638
|
response: string;
|
|
4841
3639
|
changes: {
|
|
3640
|
+
type: "file" | "patch";
|
|
4842
3641
|
path: string;
|
|
4843
3642
|
content: string;
|
|
3643
|
+
}[];
|
|
3644
|
+
changesAlreadyApplied: {
|
|
4844
3645
|
type: "file" | "patch";
|
|
3646
|
+
path: string;
|
|
3647
|
+
content: string;
|
|
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,7 +3960,9 @@ 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, {
|
|
3965
|
+
agentContext: string;
|
|
5161
3966
|
fileContext: {
|
|
5162
3967
|
currentWorkingDirectory: string;
|
|
5163
3968
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -5185,7 +3990,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5185
3990
|
content: string;
|
|
5186
3991
|
}[][] | undefined;
|
|
5187
3992
|
};
|
|
5188
|
-
agentContext: string;
|
|
5189
3993
|
messageHistory: {
|
|
5190
3994
|
content: string | ({
|
|
5191
3995
|
type: "text";
|
|
@@ -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,7 +4025,9 @@ 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
|
}, {
|
|
4030
|
+
agentContext: string;
|
|
5225
4031
|
fileContext: {
|
|
5226
4032
|
currentWorkingDirectory: string;
|
|
5227
4033
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -5249,7 +4055,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5249
4055
|
content: string;
|
|
5250
4056
|
}[][] | undefined;
|
|
5251
4057
|
};
|
|
5252
|
-
agentContext: string;
|
|
5253
4058
|
messageHistory: {
|
|
5254
4059
|
content: string | ({
|
|
5255
4060
|
type: "text";
|
|
@@ -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;
|
|
@@ -5316,6 +4122,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5316
4122
|
type: "prompt-response";
|
|
5317
4123
|
promptId: string;
|
|
5318
4124
|
agentState: {
|
|
4125
|
+
agentContext: string;
|
|
5319
4126
|
fileContext: {
|
|
5320
4127
|
currentWorkingDirectory: string;
|
|
5321
4128
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -5343,7 +4150,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5343
4150
|
content: string;
|
|
5344
4151
|
}[][] | undefined;
|
|
5345
4152
|
};
|
|
5346
|
-
agentContext: string;
|
|
5347
4153
|
messageHistory: {
|
|
5348
4154
|
content: string | ({
|
|
5349
4155
|
type: "text";
|
|
@@ -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;
|
|
@@ -5394,6 +4201,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5394
4201
|
type: "prompt-response";
|
|
5395
4202
|
promptId: string;
|
|
5396
4203
|
agentState: {
|
|
4204
|
+
agentContext: string;
|
|
5397
4205
|
fileContext: {
|
|
5398
4206
|
currentWorkingDirectory: string;
|
|
5399
4207
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -5421,7 +4229,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5421
4229
|
content: string;
|
|
5422
4230
|
}[][] | undefined;
|
|
5423
4231
|
};
|
|
5424
|
-
agentContext: string;
|
|
5425
4232
|
messageHistory: {
|
|
5426
4233
|
content: string | ({
|
|
5427
4234
|
type: "text";
|
|
@@ -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;
|
|
@@ -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: "file" | "patch";
|
|
5505
4314
|
path: string;
|
|
5506
4315
|
content: string;
|
|
5507
|
-
type: "file" | "patch";
|
|
5508
4316
|
}, {
|
|
4317
|
+
type: "file" | "patch";
|
|
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: "file" | "patch";
|
|
5518
4327
|
path: string;
|
|
5519
4328
|
content: string;
|
|
5520
|
-
type: "file" | "patch";
|
|
5521
4329
|
}, {
|
|
4330
|
+
type: "file" | "patch";
|
|
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
|
-
changesAlreadyApplied: {
|
|
5546
|
-
path: string;
|
|
5547
|
-
content: string;
|
|
5548
|
-
type: "file" | "patch";
|
|
5549
|
-
}[];
|
|
5550
4353
|
response: string;
|
|
5551
4354
|
changes: {
|
|
4355
|
+
type: "file" | "patch";
|
|
5552
4356
|
path: string;
|
|
5553
4357
|
content: string;
|
|
4358
|
+
}[];
|
|
4359
|
+
changesAlreadyApplied: {
|
|
5554
4360
|
type: "file" | "patch";
|
|
4361
|
+
path: string;
|
|
4362
|
+
content: string;
|
|
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
|
-
changesAlreadyApplied: {
|
|
5570
|
-
path: string;
|
|
5571
|
-
content: string;
|
|
5572
|
-
type: "file" | "patch";
|
|
5573
|
-
}[];
|
|
5574
4377
|
response: string;
|
|
5575
4378
|
changes: {
|
|
4379
|
+
type: "file" | "patch";
|
|
5576
4380
|
path: string;
|
|
5577
4381
|
content: string;
|
|
4382
|
+
}[];
|
|
4383
|
+
changesAlreadyApplied: {
|
|
5578
4384
|
type: "file" | "patch";
|
|
4385
|
+
path: string;
|
|
4386
|
+
content: string;
|
|
5579
4387
|
}[];
|
|
5580
4388
|
addedFileVersions: {
|
|
5581
4389
|
path: string;
|
|
@@ -5588,12 +4396,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5588
4396
|
result: z.ZodString;
|
|
5589
4397
|
}, "strip", z.ZodTypeAny, {
|
|
5590
4398
|
type: "terminal-command-result";
|
|
5591
|
-
userInputId: string;
|
|
5592
4399
|
result: string;
|
|
4400
|
+
userInputId: string;
|
|
5593
4401
|
}, {
|
|
5594
4402
|
type: "terminal-command-result";
|
|
5595
|
-
userInputId: string;
|
|
5596
4403
|
result: string;
|
|
4404
|
+
userInputId: string;
|
|
5597
4405
|
}>, z.ZodObject<{
|
|
5598
4406
|
type: z.ZodLiteral<"npm-version-status">;
|
|
5599
4407
|
isUpToDate: z.ZodBoolean;
|
|
@@ -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;
|
|
@@ -5690,10 +4498,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5690
4498
|
}, "strip", z.ZodTypeAny, {
|
|
5691
4499
|
type: "action";
|
|
5692
4500
|
data: {
|
|
5693
|
-
type: "response-chunk";
|
|
5694
|
-
userInputId: string;
|
|
5695
|
-
chunk: string;
|
|
5696
|
-
} | {
|
|
5697
4501
|
type: "usage-response";
|
|
5698
4502
|
usage: number;
|
|
5699
4503
|
limit: number;
|
|
@@ -5701,19 +4505,27 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5701
4505
|
next_quota_reset: Date;
|
|
5702
4506
|
session_credits_used: number;
|
|
5703
4507
|
referralLink?: string | undefined;
|
|
4508
|
+
} | {
|
|
4509
|
+
type: "init-response";
|
|
4510
|
+
usage: number;
|
|
4511
|
+
limit: number;
|
|
4512
|
+
subscription_active: boolean;
|
|
4513
|
+
next_quota_reset: Date;
|
|
4514
|
+
session_credits_used: number;
|
|
4515
|
+
referralLink?: string | undefined;
|
|
5704
4516
|
} | {
|
|
5705
4517
|
type: "response-complete";
|
|
5706
4518
|
userInputId: string;
|
|
5707
|
-
changesAlreadyApplied: {
|
|
5708
|
-
path: string;
|
|
5709
|
-
content: string;
|
|
5710
|
-
type: "file" | "patch";
|
|
5711
|
-
}[];
|
|
5712
4519
|
response: string;
|
|
5713
4520
|
changes: {
|
|
4521
|
+
type: "file" | "patch";
|
|
5714
4522
|
path: string;
|
|
5715
4523
|
content: string;
|
|
4524
|
+
}[];
|
|
4525
|
+
changesAlreadyApplied: {
|
|
5716
4526
|
type: "file" | "patch";
|
|
4527
|
+
path: string;
|
|
4528
|
+
content: string;
|
|
5717
4529
|
}[];
|
|
5718
4530
|
addedFileVersions: {
|
|
5719
4531
|
path: string;
|
|
@@ -5726,10 +4538,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5726
4538
|
subscription_active?: boolean | undefined;
|
|
5727
4539
|
next_quota_reset?: Date | undefined;
|
|
5728
4540
|
session_credits_used?: number | undefined;
|
|
4541
|
+
} | {
|
|
4542
|
+
type: "message-cost-response";
|
|
4543
|
+
promptId: string;
|
|
4544
|
+
credits: number;
|
|
5729
4545
|
} | {
|
|
5730
4546
|
type: "prompt-response";
|
|
5731
4547
|
promptId: string;
|
|
5732
4548
|
agentState: {
|
|
4549
|
+
agentContext: string;
|
|
5733
4550
|
fileContext: {
|
|
5734
4551
|
currentWorkingDirectory: string;
|
|
5735
4552
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -5757,7 +4574,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5757
4574
|
content: string;
|
|
5758
4575
|
}[][] | undefined;
|
|
5759
4576
|
};
|
|
5760
|
-
agentContext: string;
|
|
5761
4577
|
messageHistory: {
|
|
5762
4578
|
content: string | ({
|
|
5763
4579
|
type: "text";
|
|
@@ -5774,8 +4590,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5774
4590
|
type: "ephemeral";
|
|
5775
4591
|
} | undefined;
|
|
5776
4592
|
} | {
|
|
5777
|
-
content: string;
|
|
5778
4593
|
type: "tool_result";
|
|
4594
|
+
content: string;
|
|
5779
4595
|
tool_use_id: string;
|
|
5780
4596
|
cache_control?: {
|
|
5781
4597
|
type: "ephemeral";
|
|
@@ -5793,6 +4609,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5793
4609
|
})[];
|
|
5794
4610
|
role: "user" | "assistant";
|
|
5795
4611
|
}[];
|
|
4612
|
+
lastUserPromptIndex?: number | undefined;
|
|
5796
4613
|
};
|
|
5797
4614
|
toolResults: {
|
|
5798
4615
|
name: string;
|
|
@@ -5804,6 +4621,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5804
4621
|
id: string;
|
|
5805
4622
|
parameters: Record<string, string>;
|
|
5806
4623
|
}[];
|
|
4624
|
+
} | {
|
|
4625
|
+
type: "response-chunk";
|
|
4626
|
+
userInputId: string;
|
|
4627
|
+
chunk: string;
|
|
5807
4628
|
} | {
|
|
5808
4629
|
type: "read-files";
|
|
5809
4630
|
requestId: string;
|
|
@@ -5816,16 +4637,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5816
4637
|
input: Record<string, any>;
|
|
5817
4638
|
};
|
|
5818
4639
|
userInputId: string;
|
|
5819
|
-
changesAlreadyApplied: {
|
|
5820
|
-
path: string;
|
|
5821
|
-
content: string;
|
|
5822
|
-
type: "file" | "patch";
|
|
5823
|
-
}[];
|
|
5824
4640
|
response: string;
|
|
5825
4641
|
changes: {
|
|
4642
|
+
type: "file" | "patch";
|
|
5826
4643
|
path: string;
|
|
5827
4644
|
content: string;
|
|
4645
|
+
}[];
|
|
4646
|
+
changesAlreadyApplied: {
|
|
5828
4647
|
type: "file" | "patch";
|
|
4648
|
+
path: string;
|
|
4649
|
+
content: string;
|
|
5829
4650
|
}[];
|
|
5830
4651
|
addedFileVersions: {
|
|
5831
4652
|
path: string;
|
|
@@ -5834,27 +4655,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5834
4655
|
resetFileVersions: boolean;
|
|
5835
4656
|
} | {
|
|
5836
4657
|
type: "terminal-command-result";
|
|
5837
|
-
userInputId: string;
|
|
5838
4658
|
result: string;
|
|
4659
|
+
userInputId: string;
|
|
5839
4660
|
} | {
|
|
5840
4661
|
type: "npm-version-status";
|
|
5841
4662
|
isUpToDate: boolean;
|
|
5842
4663
|
latestVersion: string;
|
|
5843
4664
|
} | {
|
|
5844
|
-
type: "init-response";
|
|
5845
|
-
usage: number;
|
|
5846
|
-
limit: number;
|
|
5847
|
-
subscription_active: boolean;
|
|
5848
|
-
next_quota_reset: Date;
|
|
5849
|
-
session_credits_used: number;
|
|
5850
|
-
referralLink?: string | undefined;
|
|
5851
|
-
} | {
|
|
5852
|
-
type: "message-cost-response";
|
|
5853
|
-
promptId: string;
|
|
5854
|
-
credits: number;
|
|
5855
|
-
} | {
|
|
5856
|
-
message: string;
|
|
5857
4665
|
type: "action-error";
|
|
4666
|
+
message: string;
|
|
5858
4667
|
} | {
|
|
5859
4668
|
type: "commit-message-response";
|
|
5860
4669
|
commitMessage: string;
|
|
@@ -5862,10 +4671,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5862
4671
|
}, {
|
|
5863
4672
|
type: "action";
|
|
5864
4673
|
data: {
|
|
5865
|
-
type: "response-chunk";
|
|
5866
|
-
userInputId: string;
|
|
5867
|
-
chunk: string;
|
|
5868
|
-
} | {
|
|
5869
4674
|
type: "usage-response";
|
|
5870
4675
|
usage: number;
|
|
5871
4676
|
limit: number;
|
|
@@ -5873,19 +4678,27 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5873
4678
|
next_quota_reset: Date;
|
|
5874
4679
|
session_credits_used: number;
|
|
5875
4680
|
referralLink?: string | undefined;
|
|
4681
|
+
} | {
|
|
4682
|
+
type: "init-response";
|
|
4683
|
+
usage: number;
|
|
4684
|
+
limit: number;
|
|
4685
|
+
subscription_active: boolean;
|
|
4686
|
+
next_quota_reset: Date;
|
|
4687
|
+
session_credits_used: number;
|
|
4688
|
+
referralLink?: string | undefined;
|
|
5876
4689
|
} | {
|
|
5877
4690
|
type: "response-complete";
|
|
5878
4691
|
userInputId: string;
|
|
5879
|
-
changesAlreadyApplied: {
|
|
5880
|
-
path: string;
|
|
5881
|
-
content: string;
|
|
5882
|
-
type: "file" | "patch";
|
|
5883
|
-
}[];
|
|
5884
4692
|
response: string;
|
|
5885
4693
|
changes: {
|
|
4694
|
+
type: "file" | "patch";
|
|
5886
4695
|
path: string;
|
|
5887
4696
|
content: string;
|
|
4697
|
+
}[];
|
|
4698
|
+
changesAlreadyApplied: {
|
|
5888
4699
|
type: "file" | "patch";
|
|
4700
|
+
path: string;
|
|
4701
|
+
content: string;
|
|
5889
4702
|
}[];
|
|
5890
4703
|
addedFileVersions: {
|
|
5891
4704
|
path: string;
|
|
@@ -5898,10 +4711,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5898
4711
|
subscription_active?: boolean | undefined;
|
|
5899
4712
|
next_quota_reset?: Date | undefined;
|
|
5900
4713
|
session_credits_used?: number | undefined;
|
|
4714
|
+
} | {
|
|
4715
|
+
type: "message-cost-response";
|
|
4716
|
+
promptId: string;
|
|
4717
|
+
credits: number;
|
|
5901
4718
|
} | {
|
|
5902
4719
|
type: "prompt-response";
|
|
5903
4720
|
promptId: string;
|
|
5904
4721
|
agentState: {
|
|
4722
|
+
agentContext: string;
|
|
5905
4723
|
fileContext: {
|
|
5906
4724
|
currentWorkingDirectory: string;
|
|
5907
4725
|
fileTree: import("../util/file").FileTreeNode[];
|
|
@@ -5929,7 +4747,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5929
4747
|
content: string;
|
|
5930
4748
|
}[][] | undefined;
|
|
5931
4749
|
};
|
|
5932
|
-
agentContext: string;
|
|
5933
4750
|
messageHistory: {
|
|
5934
4751
|
content: string | ({
|
|
5935
4752
|
type: "text";
|
|
@@ -5946,8 +4763,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5946
4763
|
type: "ephemeral";
|
|
5947
4764
|
} | undefined;
|
|
5948
4765
|
} | {
|
|
5949
|
-
content: string;
|
|
5950
4766
|
type: "tool_result";
|
|
4767
|
+
content: string;
|
|
5951
4768
|
tool_use_id: string;
|
|
5952
4769
|
cache_control?: {
|
|
5953
4770
|
type: "ephemeral";
|
|
@@ -5965,6 +4782,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5965
4782
|
})[];
|
|
5966
4783
|
role: "user" | "assistant";
|
|
5967
4784
|
}[];
|
|
4785
|
+
lastUserPromptIndex?: number | undefined;
|
|
5968
4786
|
};
|
|
5969
4787
|
toolResults: {
|
|
5970
4788
|
name: string;
|
|
@@ -5976,6 +4794,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5976
4794
|
id: string;
|
|
5977
4795
|
parameters: Record<string, string>;
|
|
5978
4796
|
}[];
|
|
4797
|
+
} | {
|
|
4798
|
+
type: "response-chunk";
|
|
4799
|
+
userInputId: string;
|
|
4800
|
+
chunk: string;
|
|
5979
4801
|
} | {
|
|
5980
4802
|
type: "read-files";
|
|
5981
4803
|
requestId: string;
|
|
@@ -5988,16 +4810,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5988
4810
|
input: Record<string, any>;
|
|
5989
4811
|
};
|
|
5990
4812
|
userInputId: string;
|
|
5991
|
-
changesAlreadyApplied: {
|
|
5992
|
-
path: string;
|
|
5993
|
-
content: string;
|
|
5994
|
-
type: "file" | "patch";
|
|
5995
|
-
}[];
|
|
5996
4813
|
response: string;
|
|
5997
4814
|
changes: {
|
|
4815
|
+
type: "file" | "patch";
|
|
5998
4816
|
path: string;
|
|
5999
4817
|
content: string;
|
|
4818
|
+
}[];
|
|
4819
|
+
changesAlreadyApplied: {
|
|
6000
4820
|
type: "file" | "patch";
|
|
4821
|
+
path: string;
|
|
4822
|
+
content: string;
|
|
6001
4823
|
}[];
|
|
6002
4824
|
addedFileVersions: {
|
|
6003
4825
|
path: string;
|
|
@@ -6006,27 +4828,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
6006
4828
|
resetFileVersions: boolean;
|
|
6007
4829
|
} | {
|
|
6008
4830
|
type: "terminal-command-result";
|
|
6009
|
-
userInputId: string;
|
|
6010
4831
|
result: string;
|
|
4832
|
+
userInputId: string;
|
|
6011
4833
|
} | {
|
|
6012
4834
|
type: "npm-version-status";
|
|
6013
4835
|
isUpToDate: boolean;
|
|
6014
4836
|
latestVersion: string;
|
|
6015
4837
|
} | {
|
|
6016
|
-
type: "init-response";
|
|
6017
|
-
usage: number;
|
|
6018
|
-
limit: number;
|
|
6019
|
-
subscription_active: boolean;
|
|
6020
|
-
next_quota_reset: Date;
|
|
6021
|
-
session_credits_used: number;
|
|
6022
|
-
referralLink?: string | undefined;
|
|
6023
|
-
} | {
|
|
6024
|
-
type: "message-cost-response";
|
|
6025
|
-
promptId: string;
|
|
6026
|
-
credits: number;
|
|
6027
|
-
} | {
|
|
6028
|
-
message: string;
|
|
6029
4838
|
type: "action-error";
|
|
4839
|
+
message: string;
|
|
6030
4840
|
} | {
|
|
6031
4841
|
type: "commit-message-response";
|
|
6032
4842
|
commitMessage: string;
|