codebuff 1.0.301 → 1.0.302

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.
Files changed (114) hide show
  1. package/dist/chat-storage.d.ts +2 -2
  2. package/dist/chat-storage.js +23 -29
  3. package/dist/chat-storage.js.map +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/cli.js.map +1 -1
  6. package/dist/client.d.ts +2 -36
  7. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  8. package/dist/common/actions.d.ts +30 -1002
  9. package/dist/common/browser-actions.d.ts +48 -48
  10. package/dist/common/types/agent-state.d.ts +5 -261
  11. package/dist/common/types/agent-state.js +2 -2
  12. package/dist/common/types/agent-state.js.map +1 -1
  13. package/dist/common/types/message.d.ts +10 -10
  14. package/dist/common/util/messages.d.ts +3 -1
  15. package/dist/common/util/messages.js +15 -3
  16. package/dist/common/util/messages.js.map +1 -1
  17. package/dist/common/websockets/websocket-schema.d.ts +74 -1642
  18. package/dist/index.js +2 -26
  19. package/dist/project-files.d.ts +1 -1
  20. package/dist/project-files.js +4 -1
  21. package/dist/project-files.js.map +1 -1
  22. package/dist/tool-handlers.js +5 -3
  23. package/dist/tool-handlers.js.map +1 -1
  24. package/package.json +1 -1
  25. package/dist/cli-handlers/initialization-flow.d.ts +0 -1
  26. package/dist/cli-handlers/initialization-flow.js +0 -24
  27. package/dist/cli-handlers/initialization-flow.js.map +0 -1
  28. package/dist/cli-modules/command-processor.d.ts +0 -2
  29. package/dist/cli-modules/command-processor.js +0 -112
  30. package/dist/cli-modules/command-processor.js.map +0 -1
  31. package/dist/cli-modules/input-handler.d.ts +0 -4
  32. package/dist/cli-modules/input-handler.js +0 -75
  33. package/dist/cli-modules/input-handler.js.map +0 -1
  34. package/dist/cli-modules/readline-handler.d.ts +0 -11
  35. package/dist/cli-modules/readline-handler.js +0 -158
  36. package/dist/cli-modules/readline-handler.js.map +0 -1
  37. package/dist/cli-modules/signal-handler.d.ts +0 -7
  38. package/dist/cli-modules/signal-handler.js +0 -128
  39. package/dist/cli-modules/signal-handler.js.map +0 -1
  40. package/dist/cli-modules/types.d.ts +0 -51
  41. package/dist/cli-modules/types.js +0 -3
  42. package/dist/cli-modules/types.js.map +0 -1
  43. package/dist/cli-modules/websocket-handler.d.ts +0 -16
  44. package/dist/cli-modules/websocket-handler.js +0 -53
  45. package/dist/cli-modules/websocket-handler.js.map +0 -1
  46. package/dist/code-map/__mocks__/tree-sitter-typescript.d.ts +0 -12
  47. package/dist/code-map/__mocks__/tree-sitter-typescript.d.ts.map +0 -1
  48. package/dist/code-map/__mocks__/tree-sitter-typescript.js +0 -14
  49. package/dist/code-map/__mocks__/tree-sitter-typescript.js.map +0 -1
  50. package/dist/code-map/__mocks__/wasm-mock.d.ts +0 -2
  51. package/dist/code-map/__mocks__/wasm-mock.d.ts.map +0 -1
  52. package/dist/code-map/__mocks__/wasm-mock.js +0 -3
  53. package/dist/code-map/__mocks__/wasm-mock.js.map +0 -1
  54. package/dist/code-map/__tests__/parse.test.d.ts +0 -2
  55. package/dist/code-map/__tests__/parse.test.d.ts.map +0 -1
  56. package/dist/code-map/__tests__/parse.test.js +0 -231
  57. package/dist/code-map/__tests__/parse.test.js.map +0 -1
  58. package/dist/code-map/__tests__/test-langs/consumer.d.ts +0 -2
  59. package/dist/code-map/__tests__/test-langs/consumer.d.ts.map +0 -1
  60. package/dist/code-map/__tests__/test-langs/consumer.js +0 -6
  61. package/dist/code-map/__tests__/test-langs/consumer.js.map +0 -1
  62. package/dist/code-map/__tests__/test-langs/empty.d.ts +0 -1
  63. package/dist/code-map/__tests__/test-langs/empty.d.ts.map +0 -1
  64. package/dist/code-map/__tests__/test-langs/empty.js +0 -2
  65. package/dist/code-map/__tests__/test-langs/empty.js.map +0 -1
  66. package/dist/code-map/__tests__/test-langs/test.d.ts +0 -12
  67. package/dist/code-map/__tests__/test-langs/test.d.ts.map +0 -1
  68. package/dist/code-map/__tests__/test-langs/test.js +0 -23
  69. package/dist/code-map/__tests__/test-langs/test.js.map +0 -1
  70. package/dist/code-map/__tests__/test-langs/unused.d.ts +0 -2
  71. package/dist/code-map/__tests__/test-langs/unused.d.ts.map +0 -1
  72. package/dist/code-map/__tests__/test-langs/unused.js +0 -7
  73. package/dist/code-map/__tests__/test-langs/unused.js.map +0 -1
  74. package/dist/code-map/__tests__/test-langs/utils1.d.ts +0 -2
  75. package/dist/code-map/__tests__/test-langs/utils1.d.ts.map +0 -1
  76. package/dist/code-map/__tests__/test-langs/utils1.js +0 -7
  77. package/dist/code-map/__tests__/test-langs/utils1.js.map +0 -1
  78. package/dist/code-map/__tests__/test-langs/utils2.d.ts +0 -2
  79. package/dist/code-map/__tests__/test-langs/utils2.d.ts.map +0 -1
  80. package/dist/code-map/__tests__/test-langs/utils2.js +0 -8
  81. package/dist/code-map/__tests__/test-langs/utils2.js.map +0 -1
  82. package/dist/code-map/__tests__/tree-sitter-minimal.test.d.ts +0 -2
  83. package/dist/code-map/__tests__/tree-sitter-minimal.test.d.ts.map +0 -1
  84. package/dist/code-map/__tests__/tree-sitter-minimal.test.js +0 -79
  85. package/dist/code-map/__tests__/tree-sitter-minimal.test.js.map +0 -1
  86. package/dist/code-map/jest.config.d.ts +0 -4
  87. package/dist/code-map/jest.config.d.ts.map +0 -1
  88. package/dist/code-map/jest.config.js +0 -18
  89. package/dist/code-map/jest.config.js.map +0 -1
  90. package/dist/code-map/parse.test.d.ts +0 -2
  91. package/dist/code-map/parse.test.d.ts.map +0 -1
  92. package/dist/code-map/parse.test.js +0 -218
  93. package/dist/code-map/parse.test.js.map +0 -1
  94. package/dist/code-map/scripts/tree-sitter-test.cjs +0 -27
  95. package/dist/code-map/scripts/tree-sitter-test.cjs.map +0 -1
  96. package/dist/code-map/scripts/tree-sitter-test.d.cts +0 -2
  97. package/dist/code-map/scripts/tree-sitter-test.d.cts.map +0 -1
  98. package/dist/code-map/scripts/tree-sitter-test.d.ts +0 -2
  99. package/dist/code-map/scripts/tree-sitter-test.d.ts.map +0 -1
  100. package/dist/code-map/scripts/tree-sitter-test.js +0 -54
  101. package/dist/code-map/scripts/tree-sitter-test.js.map +0 -1
  102. package/dist/code-map/test-parser.d.ts +0 -2
  103. package/dist/code-map/test-parser.d.ts.map +0 -1
  104. package/dist/code-map/test-parser.js +0 -42
  105. package/dist/code-map/test-parser.js.map +0 -1
  106. package/dist/common/bigquery/client.d.ts +0 -15
  107. package/dist/common/bigquery/client.js +0 -265
  108. package/dist/common/bigquery/client.js.map +0 -1
  109. package/dist/common/bigquery/schema.d.ts +0 -55
  110. package/dist/common/bigquery/schema.js +0 -24
  111. package/dist/common/bigquery/schema.js.map +0 -1
  112. package/dist/common/util/file-metadata.d.ts +0 -9
  113. package/dist/common/util/file-metadata.js +0 -24
  114. package/dist/common/util/file-metadata.js.map +0 -1
@@ -162,195 +162,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
162
162
  content: string;
163
163
  }[][] | undefined;
164
164
  }>;
165
- messageHistory: z.ZodArray<z.ZodObject<{
166
- role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
167
- content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
168
- type: z.ZodLiteral<"text">;
169
- text: z.ZodString;
170
- cache_control: z.ZodOptional<z.ZodObject<{
171
- type: z.ZodLiteral<"ephemeral">;
172
- }, "strip", z.ZodTypeAny, {
173
- type: "ephemeral";
174
- }, {
175
- type: "ephemeral";
176
- }>>;
177
- }, "strip", z.ZodTypeAny, {
178
- type: "text";
179
- text: string;
180
- cache_control?: {
181
- type: "ephemeral";
182
- } | undefined;
183
- }, {
184
- type: "text";
185
- text: string;
186
- cache_control?: {
187
- type: "ephemeral";
188
- } | undefined;
189
- }>, z.ZodObject<{
190
- type: z.ZodLiteral<"tool_use">;
191
- id: z.ZodString;
192
- name: z.ZodString;
193
- input: z.ZodRecord<z.ZodString, z.ZodAny>;
194
- cache_control: z.ZodOptional<z.ZodObject<{
195
- type: z.ZodLiteral<"ephemeral">;
196
- }, "strip", z.ZodTypeAny, {
197
- type: "ephemeral";
198
- }, {
199
- type: "ephemeral";
200
- }>>;
201
- }, "strip", z.ZodTypeAny, {
202
- type: "tool_use";
203
- name: string;
204
- id: string;
205
- input: Record<string, any>;
206
- cache_control?: {
207
- type: "ephemeral";
208
- } | undefined;
209
- }, {
210
- type: "tool_use";
211
- name: string;
212
- id: string;
213
- input: Record<string, any>;
214
- cache_control?: {
215
- type: "ephemeral";
216
- } | undefined;
217
- }>, z.ZodObject<{
218
- type: z.ZodLiteral<"tool_result">;
219
- tool_use_id: z.ZodString;
220
- content: z.ZodString;
221
- cache_control: z.ZodOptional<z.ZodObject<{
222
- type: z.ZodLiteral<"ephemeral">;
223
- }, "strip", z.ZodTypeAny, {
224
- type: "ephemeral";
225
- }, {
226
- type: "ephemeral";
227
- }>>;
228
- }, "strip", z.ZodTypeAny, {
229
- type: "tool_result";
230
- content: string;
231
- tool_use_id: string;
232
- cache_control?: {
233
- type: "ephemeral";
234
- } | undefined;
235
- }, {
236
- type: "tool_result";
237
- content: string;
238
- tool_use_id: string;
239
- cache_control?: {
240
- type: "ephemeral";
241
- } | undefined;
242
- }>, z.ZodObject<{
243
- type: z.ZodLiteral<"image">;
244
- source: z.ZodObject<{
245
- type: z.ZodLiteral<"base64">;
246
- media_type: z.ZodLiteral<"image/jpeg">;
247
- data: z.ZodString;
248
- }, "strip", z.ZodTypeAny, {
249
- type: "base64";
250
- media_type: "image/jpeg";
251
- data: string;
252
- }, {
253
- type: "base64";
254
- media_type: "image/jpeg";
255
- data: string;
256
- }>;
257
- cache_control: z.ZodOptional<z.ZodObject<{
258
- type: z.ZodLiteral<"ephemeral">;
259
- }, "strip", z.ZodTypeAny, {
260
- type: "ephemeral";
261
- }, {
262
- type: "ephemeral";
263
- }>>;
264
- }, "strip", z.ZodTypeAny, {
265
- type: "image";
266
- source: {
267
- type: "base64";
268
- media_type: "image/jpeg";
269
- data: string;
270
- };
271
- cache_control?: {
272
- type: "ephemeral";
273
- } | undefined;
274
- }, {
275
- type: "image";
276
- source: {
277
- type: "base64";
278
- media_type: "image/jpeg";
279
- data: string;
280
- };
281
- cache_control?: {
282
- type: "ephemeral";
283
- } | undefined;
284
- }>]>, "many">]>;
285
- }, "strip", z.ZodTypeAny, {
286
- content: string | ({
287
- type: "text";
288
- text: string;
289
- cache_control?: {
290
- type: "ephemeral";
291
- } | undefined;
292
- } | {
293
- type: "tool_use";
294
- name: string;
295
- id: string;
296
- input: Record<string, any>;
297
- cache_control?: {
298
- type: "ephemeral";
299
- } | undefined;
300
- } | {
301
- type: "tool_result";
302
- content: string;
303
- tool_use_id: string;
304
- cache_control?: {
305
- type: "ephemeral";
306
- } | undefined;
307
- } | {
308
- type: "image";
309
- source: {
310
- type: "base64";
311
- media_type: "image/jpeg";
312
- data: string;
313
- };
314
- cache_control?: {
315
- type: "ephemeral";
316
- } | undefined;
317
- })[];
318
- role: "user" | "assistant";
319
- }, {
320
- content: string | ({
321
- type: "text";
322
- text: string;
323
- cache_control?: {
324
- type: "ephemeral";
325
- } | undefined;
326
- } | {
327
- type: "tool_use";
328
- name: string;
329
- id: string;
330
- input: Record<string, any>;
331
- cache_control?: {
332
- type: "ephemeral";
333
- } | undefined;
334
- } | {
335
- type: "tool_result";
336
- content: string;
337
- tool_use_id: string;
338
- cache_control?: {
339
- type: "ephemeral";
340
- } | undefined;
341
- } | {
342
- type: "image";
343
- source: {
344
- type: "base64";
345
- media_type: "image/jpeg";
346
- data: string;
347
- };
348
- cache_control?: {
349
- type: "ephemeral";
350
- } | undefined;
351
- })[];
352
- role: "user" | "assistant";
353
- }>, "many">;
165
+ messageHistory: z.ZodArray<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, "many">;
354
166
  consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
355
167
  }, "strip", z.ZodTypeAny, {
356
168
  agentContext: string;
@@ -382,41 +194,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
382
194
  content: string;
383
195
  }[][] | undefined;
384
196
  };
385
- messageHistory: {
386
- content: string | ({
387
- type: "text";
388
- text: string;
389
- cache_control?: {
390
- type: "ephemeral";
391
- } | undefined;
392
- } | {
393
- type: "tool_use";
394
- name: string;
395
- id: string;
396
- input: Record<string, any>;
397
- cache_control?: {
398
- type: "ephemeral";
399
- } | undefined;
400
- } | {
401
- type: "tool_result";
402
- content: string;
403
- tool_use_id: string;
404
- cache_control?: {
405
- type: "ephemeral";
406
- } | undefined;
407
- } | {
408
- type: "image";
409
- source: {
410
- type: "base64";
411
- media_type: "image/jpeg";
412
- data: string;
413
- };
414
- cache_control?: {
415
- type: "ephemeral";
416
- } | undefined;
417
- })[];
418
- role: "user" | "assistant";
419
- }[];
197
+ messageHistory: import("ai").CoreMessage[];
420
198
  consecutiveAssistantMessages?: number | undefined;
421
199
  }, {
422
200
  agentContext: string;
@@ -448,41 +226,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
448
226
  content: string;
449
227
  }[][] | undefined;
450
228
  };
451
- messageHistory: {
452
- content: string | ({
453
- type: "text";
454
- text: string;
455
- cache_control?: {
456
- type: "ephemeral";
457
- } | undefined;
458
- } | {
459
- type: "tool_use";
460
- name: string;
461
- id: string;
462
- input: Record<string, any>;
463
- cache_control?: {
464
- type: "ephemeral";
465
- } | undefined;
466
- } | {
467
- type: "tool_result";
468
- content: string;
469
- tool_use_id: string;
470
- cache_control?: {
471
- type: "ephemeral";
472
- } | undefined;
473
- } | {
474
- type: "image";
475
- source: {
476
- type: "base64";
477
- media_type: "image/jpeg";
478
- data: string;
479
- };
480
- cache_control?: {
481
- type: "ephemeral";
482
- } | undefined;
483
- })[];
484
- role: "user" | "assistant";
485
- }[];
229
+ messageHistory: import("ai").CoreMessage[];
486
230
  consecutiveAssistantMessages?: number | undefined;
487
231
  }>;
488
232
  toolResults: z.ZodArray<z.ZodObject<{
@@ -536,41 +280,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
536
280
  content: string;
537
281
  }[][] | undefined;
538
282
  };
539
- messageHistory: {
540
- content: string | ({
541
- type: "text";
542
- text: string;
543
- cache_control?: {
544
- type: "ephemeral";
545
- } | undefined;
546
- } | {
547
- type: "tool_use";
548
- name: string;
549
- id: string;
550
- input: Record<string, any>;
551
- cache_control?: {
552
- type: "ephemeral";
553
- } | undefined;
554
- } | {
555
- type: "tool_result";
556
- content: string;
557
- tool_use_id: string;
558
- cache_control?: {
559
- type: "ephemeral";
560
- } | undefined;
561
- } | {
562
- type: "image";
563
- source: {
564
- type: "base64";
565
- media_type: "image/jpeg";
566
- data: string;
567
- };
568
- cache_control?: {
569
- type: "ephemeral";
570
- } | undefined;
571
- })[];
572
- role: "user" | "assistant";
573
- }[];
283
+ messageHistory: import("ai").CoreMessage[];
574
284
  consecutiveAssistantMessages?: number | undefined;
575
285
  };
576
286
  toolResults: {
@@ -617,41 +327,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
617
327
  content: string;
618
328
  }[][] | undefined;
619
329
  };
620
- messageHistory: {
621
- content: string | ({
622
- type: "text";
623
- text: string;
624
- cache_control?: {
625
- type: "ephemeral";
626
- } | undefined;
627
- } | {
628
- type: "tool_use";
629
- name: string;
630
- id: string;
631
- input: Record<string, any>;
632
- cache_control?: {
633
- type: "ephemeral";
634
- } | undefined;
635
- } | {
636
- type: "tool_result";
637
- content: string;
638
- tool_use_id: string;
639
- cache_control?: {
640
- type: "ephemeral";
641
- } | undefined;
642
- } | {
643
- type: "image";
644
- source: {
645
- type: "base64";
646
- media_type: "image/jpeg";
647
- data: string;
648
- };
649
- cache_control?: {
650
- type: "ephemeral";
651
- } | undefined;
652
- })[];
653
- role: "user" | "assistant";
654
- }[];
330
+ messageHistory: import("ai").CoreMessage[];
655
331
  consecutiveAssistantMessages?: number | undefined;
656
332
  };
657
333
  toolResults: {
@@ -1149,195 +825,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
1149
825
  content: string;
1150
826
  }[][] | undefined;
1151
827
  }>;
1152
- messageHistory: z.ZodArray<z.ZodObject<{
1153
- role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
1154
- content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
1155
- type: z.ZodLiteral<"text">;
1156
- text: z.ZodString;
1157
- cache_control: z.ZodOptional<z.ZodObject<{
1158
- type: z.ZodLiteral<"ephemeral">;
1159
- }, "strip", z.ZodTypeAny, {
1160
- type: "ephemeral";
1161
- }, {
1162
- type: "ephemeral";
1163
- }>>;
1164
- }, "strip", z.ZodTypeAny, {
1165
- type: "text";
1166
- text: string;
1167
- cache_control?: {
1168
- type: "ephemeral";
1169
- } | undefined;
1170
- }, {
1171
- type: "text";
1172
- text: string;
1173
- cache_control?: {
1174
- type: "ephemeral";
1175
- } | undefined;
1176
- }>, z.ZodObject<{
1177
- type: z.ZodLiteral<"tool_use">;
1178
- id: z.ZodString;
1179
- name: z.ZodString;
1180
- input: z.ZodRecord<z.ZodString, z.ZodAny>;
1181
- cache_control: z.ZodOptional<z.ZodObject<{
1182
- type: z.ZodLiteral<"ephemeral">;
1183
- }, "strip", z.ZodTypeAny, {
1184
- type: "ephemeral";
1185
- }, {
1186
- type: "ephemeral";
1187
- }>>;
1188
- }, "strip", z.ZodTypeAny, {
1189
- type: "tool_use";
1190
- name: string;
1191
- id: string;
1192
- input: Record<string, any>;
1193
- cache_control?: {
1194
- type: "ephemeral";
1195
- } | undefined;
1196
- }, {
1197
- type: "tool_use";
1198
- name: string;
1199
- id: string;
1200
- input: Record<string, any>;
1201
- cache_control?: {
1202
- type: "ephemeral";
1203
- } | undefined;
1204
- }>, z.ZodObject<{
1205
- type: z.ZodLiteral<"tool_result">;
1206
- tool_use_id: z.ZodString;
1207
- content: z.ZodString;
1208
- cache_control: z.ZodOptional<z.ZodObject<{
1209
- type: z.ZodLiteral<"ephemeral">;
1210
- }, "strip", z.ZodTypeAny, {
1211
- type: "ephemeral";
1212
- }, {
1213
- type: "ephemeral";
1214
- }>>;
1215
- }, "strip", z.ZodTypeAny, {
1216
- type: "tool_result";
1217
- content: string;
1218
- tool_use_id: string;
1219
- cache_control?: {
1220
- type: "ephemeral";
1221
- } | undefined;
1222
- }, {
1223
- type: "tool_result";
1224
- content: string;
1225
- tool_use_id: string;
1226
- cache_control?: {
1227
- type: "ephemeral";
1228
- } | undefined;
1229
- }>, z.ZodObject<{
1230
- type: z.ZodLiteral<"image">;
1231
- source: z.ZodObject<{
1232
- type: z.ZodLiteral<"base64">;
1233
- media_type: z.ZodLiteral<"image/jpeg">;
1234
- data: z.ZodString;
1235
- }, "strip", z.ZodTypeAny, {
1236
- type: "base64";
1237
- media_type: "image/jpeg";
1238
- data: string;
1239
- }, {
1240
- type: "base64";
1241
- media_type: "image/jpeg";
1242
- data: string;
1243
- }>;
1244
- cache_control: z.ZodOptional<z.ZodObject<{
1245
- type: z.ZodLiteral<"ephemeral">;
1246
- }, "strip", z.ZodTypeAny, {
1247
- type: "ephemeral";
1248
- }, {
1249
- type: "ephemeral";
1250
- }>>;
1251
- }, "strip", z.ZodTypeAny, {
1252
- type: "image";
1253
- source: {
1254
- type: "base64";
1255
- media_type: "image/jpeg";
1256
- data: string;
1257
- };
1258
- cache_control?: {
1259
- type: "ephemeral";
1260
- } | undefined;
1261
- }, {
1262
- type: "image";
1263
- source: {
1264
- type: "base64";
1265
- media_type: "image/jpeg";
1266
- data: string;
1267
- };
1268
- cache_control?: {
1269
- type: "ephemeral";
1270
- } | undefined;
1271
- }>]>, "many">]>;
1272
- }, "strip", z.ZodTypeAny, {
1273
- content: string | ({
1274
- type: "text";
1275
- text: string;
1276
- cache_control?: {
1277
- type: "ephemeral";
1278
- } | undefined;
1279
- } | {
1280
- type: "tool_use";
1281
- name: string;
1282
- id: string;
1283
- input: Record<string, any>;
1284
- cache_control?: {
1285
- type: "ephemeral";
1286
- } | undefined;
1287
- } | {
1288
- type: "tool_result";
1289
- content: string;
1290
- tool_use_id: string;
1291
- cache_control?: {
1292
- type: "ephemeral";
1293
- } | undefined;
1294
- } | {
1295
- type: "image";
1296
- source: {
1297
- type: "base64";
1298
- media_type: "image/jpeg";
1299
- data: string;
1300
- };
1301
- cache_control?: {
1302
- type: "ephemeral";
1303
- } | undefined;
1304
- })[];
1305
- role: "user" | "assistant";
1306
- }, {
1307
- content: string | ({
1308
- type: "text";
1309
- text: string;
1310
- cache_control?: {
1311
- type: "ephemeral";
1312
- } | undefined;
1313
- } | {
1314
- type: "tool_use";
1315
- name: string;
1316
- id: string;
1317
- input: Record<string, any>;
1318
- cache_control?: {
1319
- type: "ephemeral";
1320
- } | undefined;
1321
- } | {
1322
- type: "tool_result";
1323
- content: string;
1324
- tool_use_id: string;
1325
- cache_control?: {
1326
- type: "ephemeral";
1327
- } | undefined;
1328
- } | {
1329
- type: "image";
1330
- source: {
1331
- type: "base64";
1332
- media_type: "image/jpeg";
1333
- data: string;
1334
- };
1335
- cache_control?: {
1336
- type: "ephemeral";
1337
- } | undefined;
1338
- })[];
1339
- role: "user" | "assistant";
1340
- }>, "many">;
828
+ messageHistory: z.ZodArray<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, "many">;
1341
829
  consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
1342
830
  }, "strip", z.ZodTypeAny, {
1343
831
  agentContext: string;
@@ -1369,41 +857,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
1369
857
  content: string;
1370
858
  }[][] | undefined;
1371
859
  };
1372
- messageHistory: {
1373
- content: string | ({
1374
- type: "text";
1375
- text: string;
1376
- cache_control?: {
1377
- type: "ephemeral";
1378
- } | undefined;
1379
- } | {
1380
- type: "tool_use";
1381
- name: string;
1382
- id: string;
1383
- input: Record<string, any>;
1384
- cache_control?: {
1385
- type: "ephemeral";
1386
- } | undefined;
1387
- } | {
1388
- type: "tool_result";
1389
- content: string;
1390
- tool_use_id: string;
1391
- cache_control?: {
1392
- type: "ephemeral";
1393
- } | undefined;
1394
- } | {
1395
- type: "image";
1396
- source: {
1397
- type: "base64";
1398
- media_type: "image/jpeg";
1399
- data: string;
1400
- };
1401
- cache_control?: {
1402
- type: "ephemeral";
1403
- } | undefined;
1404
- })[];
1405
- role: "user" | "assistant";
1406
- }[];
860
+ messageHistory: import("ai").CoreMessage[];
1407
861
  consecutiveAssistantMessages?: number | undefined;
1408
862
  }, {
1409
863
  agentContext: string;
@@ -1435,41 +889,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
1435
889
  content: string;
1436
890
  }[][] | undefined;
1437
891
  };
1438
- messageHistory: {
1439
- content: string | ({
1440
- type: "text";
1441
- text: string;
1442
- cache_control?: {
1443
- type: "ephemeral";
1444
- } | undefined;
1445
- } | {
1446
- type: "tool_use";
1447
- name: string;
1448
- id: string;
1449
- input: Record<string, any>;
1450
- cache_control?: {
1451
- type: "ephemeral";
1452
- } | undefined;
1453
- } | {
1454
- type: "tool_result";
1455
- content: string;
1456
- tool_use_id: string;
1457
- cache_control?: {
1458
- type: "ephemeral";
1459
- } | undefined;
1460
- } | {
1461
- type: "image";
1462
- source: {
1463
- type: "base64";
1464
- media_type: "image/jpeg";
1465
- data: string;
1466
- };
1467
- cache_control?: {
1468
- type: "ephemeral";
1469
- } | undefined;
1470
- })[];
1471
- role: "user" | "assistant";
1472
- }[];
892
+ messageHistory: import("ai").CoreMessage[];
1473
893
  consecutiveAssistantMessages?: number | undefined;
1474
894
  }>;
1475
895
  toolCalls: z.ZodArray<z.ZodObject<{
@@ -1478,12 +898,12 @@ export declare const PromptResponseSchema: z.ZodObject<{
1478
898
  id: z.ZodString;
1479
899
  }, "strip", z.ZodTypeAny, {
1480
900
  name: string;
1481
- id: string;
1482
901
  parameters: Record<string, string>;
902
+ id: string;
1483
903
  }, {
1484
904
  name: string;
1485
- id: string;
1486
905
  parameters: Record<string, string>;
906
+ id: string;
1487
907
  }>, "many">;
1488
908
  toolResults: z.ZodArray<z.ZodObject<{
1489
909
  name: z.ZodString;
@@ -1531,41 +951,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
1531
951
  content: string;
1532
952
  }[][] | undefined;
1533
953
  };
1534
- messageHistory: {
1535
- content: string | ({
1536
- type: "text";
1537
- text: string;
1538
- cache_control?: {
1539
- type: "ephemeral";
1540
- } | undefined;
1541
- } | {
1542
- type: "tool_use";
1543
- name: string;
1544
- id: string;
1545
- input: Record<string, any>;
1546
- cache_control?: {
1547
- type: "ephemeral";
1548
- } | undefined;
1549
- } | {
1550
- type: "tool_result";
1551
- content: string;
1552
- tool_use_id: string;
1553
- cache_control?: {
1554
- type: "ephemeral";
1555
- } | undefined;
1556
- } | {
1557
- type: "image";
1558
- source: {
1559
- type: "base64";
1560
- media_type: "image/jpeg";
1561
- data: string;
1562
- };
1563
- cache_control?: {
1564
- type: "ephemeral";
1565
- } | undefined;
1566
- })[];
1567
- role: "user" | "assistant";
1568
- }[];
954
+ messageHistory: import("ai").CoreMessage[];
1569
955
  consecutiveAssistantMessages?: number | undefined;
1570
956
  };
1571
957
  toolResults: {
@@ -1575,8 +961,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
1575
961
  }[];
1576
962
  toolCalls: {
1577
963
  name: string;
1578
- id: string;
1579
964
  parameters: Record<string, string>;
965
+ id: string;
1580
966
  }[];
1581
967
  }, {
1582
968
  type: "prompt-response";
@@ -1611,41 +997,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
1611
997
  content: string;
1612
998
  }[][] | undefined;
1613
999
  };
1614
- messageHistory: {
1615
- content: string | ({
1616
- type: "text";
1617
- text: string;
1618
- cache_control?: {
1619
- type: "ephemeral";
1620
- } | undefined;
1621
- } | {
1622
- type: "tool_use";
1623
- name: string;
1624
- id: string;
1625
- input: Record<string, any>;
1626
- cache_control?: {
1627
- type: "ephemeral";
1628
- } | undefined;
1629
- } | {
1630
- type: "tool_result";
1631
- content: string;
1632
- tool_use_id: string;
1633
- cache_control?: {
1634
- type: "ephemeral";
1635
- } | undefined;
1636
- } | {
1637
- type: "image";
1638
- source: {
1639
- type: "base64";
1640
- media_type: "image/jpeg";
1641
- data: string;
1642
- };
1643
- cache_control?: {
1644
- type: "ephemeral";
1645
- } | undefined;
1646
- })[];
1647
- role: "user" | "assistant";
1648
- }[];
1000
+ messageHistory: import("ai").CoreMessage[];
1649
1001
  consecutiveAssistantMessages?: number | undefined;
1650
1002
  };
1651
1003
  toolResults: {
@@ -1655,8 +1007,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
1655
1007
  }[];
1656
1008
  toolCalls: {
1657
1009
  name: string;
1658
- id: string;
1659
1010
  parameters: Record<string, string>;
1011
+ id: string;
1660
1012
  }[];
1661
1013
  }>;
1662
1014
  export type PromptResponse = z.infer<typeof PromptResponseSchema>;
@@ -1884,195 +1236,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1884
1236
  content: string;
1885
1237
  }[][] | undefined;
1886
1238
  }>;
1887
- messageHistory: z.ZodArray<z.ZodObject<{
1888
- role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
1889
- content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
1890
- type: z.ZodLiteral<"text">;
1891
- text: z.ZodString;
1892
- cache_control: z.ZodOptional<z.ZodObject<{
1893
- type: z.ZodLiteral<"ephemeral">;
1894
- }, "strip", z.ZodTypeAny, {
1895
- type: "ephemeral";
1896
- }, {
1897
- type: "ephemeral";
1898
- }>>;
1899
- }, "strip", z.ZodTypeAny, {
1900
- type: "text";
1901
- text: string;
1902
- cache_control?: {
1903
- type: "ephemeral";
1904
- } | undefined;
1905
- }, {
1906
- type: "text";
1907
- text: string;
1908
- cache_control?: {
1909
- type: "ephemeral";
1910
- } | undefined;
1911
- }>, z.ZodObject<{
1912
- type: z.ZodLiteral<"tool_use">;
1913
- id: z.ZodString;
1914
- name: z.ZodString;
1915
- input: z.ZodRecord<z.ZodString, z.ZodAny>;
1916
- cache_control: z.ZodOptional<z.ZodObject<{
1917
- type: z.ZodLiteral<"ephemeral">;
1918
- }, "strip", z.ZodTypeAny, {
1919
- type: "ephemeral";
1920
- }, {
1921
- type: "ephemeral";
1922
- }>>;
1923
- }, "strip", z.ZodTypeAny, {
1924
- type: "tool_use";
1925
- name: string;
1926
- id: string;
1927
- input: Record<string, any>;
1928
- cache_control?: {
1929
- type: "ephemeral";
1930
- } | undefined;
1931
- }, {
1932
- type: "tool_use";
1933
- name: string;
1934
- id: string;
1935
- input: Record<string, any>;
1936
- cache_control?: {
1937
- type: "ephemeral";
1938
- } | undefined;
1939
- }>, z.ZodObject<{
1940
- type: z.ZodLiteral<"tool_result">;
1941
- tool_use_id: z.ZodString;
1942
- content: z.ZodString;
1943
- cache_control: z.ZodOptional<z.ZodObject<{
1944
- type: z.ZodLiteral<"ephemeral">;
1945
- }, "strip", z.ZodTypeAny, {
1946
- type: "ephemeral";
1947
- }, {
1948
- type: "ephemeral";
1949
- }>>;
1950
- }, "strip", z.ZodTypeAny, {
1951
- type: "tool_result";
1952
- content: string;
1953
- tool_use_id: string;
1954
- cache_control?: {
1955
- type: "ephemeral";
1956
- } | undefined;
1957
- }, {
1958
- type: "tool_result";
1959
- content: string;
1960
- tool_use_id: string;
1961
- cache_control?: {
1962
- type: "ephemeral";
1963
- } | undefined;
1964
- }>, z.ZodObject<{
1965
- type: z.ZodLiteral<"image">;
1966
- source: z.ZodObject<{
1967
- type: z.ZodLiteral<"base64">;
1968
- media_type: z.ZodLiteral<"image/jpeg">;
1969
- data: z.ZodString;
1970
- }, "strip", z.ZodTypeAny, {
1971
- type: "base64";
1972
- media_type: "image/jpeg";
1973
- data: string;
1974
- }, {
1975
- type: "base64";
1976
- media_type: "image/jpeg";
1977
- data: string;
1978
- }>;
1979
- cache_control: z.ZodOptional<z.ZodObject<{
1980
- type: z.ZodLiteral<"ephemeral">;
1981
- }, "strip", z.ZodTypeAny, {
1982
- type: "ephemeral";
1983
- }, {
1984
- type: "ephemeral";
1985
- }>>;
1986
- }, "strip", z.ZodTypeAny, {
1987
- type: "image";
1988
- source: {
1989
- type: "base64";
1990
- media_type: "image/jpeg";
1991
- data: string;
1992
- };
1993
- cache_control?: {
1994
- type: "ephemeral";
1995
- } | undefined;
1996
- }, {
1997
- type: "image";
1998
- source: {
1999
- type: "base64";
2000
- media_type: "image/jpeg";
2001
- data: string;
2002
- };
2003
- cache_control?: {
2004
- type: "ephemeral";
2005
- } | undefined;
2006
- }>]>, "many">]>;
2007
- }, "strip", z.ZodTypeAny, {
2008
- content: string | ({
2009
- type: "text";
2010
- text: string;
2011
- cache_control?: {
2012
- type: "ephemeral";
2013
- } | undefined;
2014
- } | {
2015
- type: "tool_use";
2016
- name: string;
2017
- id: string;
2018
- input: Record<string, any>;
2019
- cache_control?: {
2020
- type: "ephemeral";
2021
- } | undefined;
2022
- } | {
2023
- type: "tool_result";
2024
- content: string;
2025
- tool_use_id: string;
2026
- cache_control?: {
2027
- type: "ephemeral";
2028
- } | undefined;
2029
- } | {
2030
- type: "image";
2031
- source: {
2032
- type: "base64";
2033
- media_type: "image/jpeg";
2034
- data: string;
2035
- };
2036
- cache_control?: {
2037
- type: "ephemeral";
2038
- } | undefined;
2039
- })[];
2040
- role: "user" | "assistant";
2041
- }, {
2042
- content: string | ({
2043
- type: "text";
2044
- text: string;
2045
- cache_control?: {
2046
- type: "ephemeral";
2047
- } | undefined;
2048
- } | {
2049
- type: "tool_use";
2050
- name: string;
2051
- id: string;
2052
- input: Record<string, any>;
2053
- cache_control?: {
2054
- type: "ephemeral";
2055
- } | undefined;
2056
- } | {
2057
- type: "tool_result";
2058
- content: string;
2059
- tool_use_id: string;
2060
- cache_control?: {
2061
- type: "ephemeral";
2062
- } | undefined;
2063
- } | {
2064
- type: "image";
2065
- source: {
2066
- type: "base64";
2067
- media_type: "image/jpeg";
2068
- data: string;
2069
- };
2070
- cache_control?: {
2071
- type: "ephemeral";
2072
- } | undefined;
2073
- })[];
2074
- role: "user" | "assistant";
2075
- }>, "many">;
1239
+ messageHistory: z.ZodArray<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, "many">;
2076
1240
  consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
2077
1241
  }, "strip", z.ZodTypeAny, {
2078
1242
  agentContext: string;
@@ -2104,41 +1268,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2104
1268
  content: string;
2105
1269
  }[][] | undefined;
2106
1270
  };
2107
- messageHistory: {
2108
- content: string | ({
2109
- type: "text";
2110
- text: string;
2111
- cache_control?: {
2112
- type: "ephemeral";
2113
- } | undefined;
2114
- } | {
2115
- type: "tool_use";
2116
- name: string;
2117
- id: string;
2118
- input: Record<string, any>;
2119
- cache_control?: {
2120
- type: "ephemeral";
2121
- } | undefined;
2122
- } | {
2123
- type: "tool_result";
2124
- content: string;
2125
- tool_use_id: string;
2126
- cache_control?: {
2127
- type: "ephemeral";
2128
- } | undefined;
2129
- } | {
2130
- type: "image";
2131
- source: {
2132
- type: "base64";
2133
- media_type: "image/jpeg";
2134
- data: string;
2135
- };
2136
- cache_control?: {
2137
- type: "ephemeral";
2138
- } | undefined;
2139
- })[];
2140
- role: "user" | "assistant";
2141
- }[];
1271
+ messageHistory: import("ai").CoreMessage[];
2142
1272
  consecutiveAssistantMessages?: number | undefined;
2143
1273
  }, {
2144
1274
  agentContext: string;
@@ -2170,41 +1300,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2170
1300
  content: string;
2171
1301
  }[][] | undefined;
2172
1302
  };
2173
- messageHistory: {
2174
- content: string | ({
2175
- type: "text";
2176
- text: string;
2177
- cache_control?: {
2178
- type: "ephemeral";
2179
- } | undefined;
2180
- } | {
2181
- type: "tool_use";
2182
- name: string;
2183
- id: string;
2184
- input: Record<string, any>;
2185
- cache_control?: {
2186
- type: "ephemeral";
2187
- } | undefined;
2188
- } | {
2189
- type: "tool_result";
2190
- content: string;
2191
- tool_use_id: string;
2192
- cache_control?: {
2193
- type: "ephemeral";
2194
- } | undefined;
2195
- } | {
2196
- type: "image";
2197
- source: {
2198
- type: "base64";
2199
- media_type: "image/jpeg";
2200
- data: string;
2201
- };
2202
- cache_control?: {
2203
- type: "ephemeral";
2204
- } | undefined;
2205
- })[];
2206
- role: "user" | "assistant";
2207
- }[];
1303
+ messageHistory: import("ai").CoreMessage[];
2208
1304
  consecutiveAssistantMessages?: number | undefined;
2209
1305
  }>;
2210
1306
  toolCalls: z.ZodArray<z.ZodObject<{
@@ -2213,12 +1309,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2213
1309
  id: z.ZodString;
2214
1310
  }, "strip", z.ZodTypeAny, {
2215
1311
  name: string;
2216
- id: string;
2217
1312
  parameters: Record<string, string>;
1313
+ id: string;
2218
1314
  }, {
2219
1315
  name: string;
2220
- id: string;
2221
1316
  parameters: Record<string, string>;
1317
+ id: string;
2222
1318
  }>, "many">;
2223
1319
  toolResults: z.ZodArray<z.ZodObject<{
2224
1320
  name: z.ZodString;
@@ -2266,41 +1362,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2266
1362
  content: string;
2267
1363
  }[][] | undefined;
2268
1364
  };
2269
- messageHistory: {
2270
- content: string | ({
2271
- type: "text";
2272
- text: string;
2273
- cache_control?: {
2274
- type: "ephemeral";
2275
- } | undefined;
2276
- } | {
2277
- type: "tool_use";
2278
- name: string;
2279
- id: string;
2280
- input: Record<string, any>;
2281
- cache_control?: {
2282
- type: "ephemeral";
2283
- } | undefined;
2284
- } | {
2285
- type: "tool_result";
2286
- content: string;
2287
- tool_use_id: string;
2288
- cache_control?: {
2289
- type: "ephemeral";
2290
- } | undefined;
2291
- } | {
2292
- type: "image";
2293
- source: {
2294
- type: "base64";
2295
- media_type: "image/jpeg";
2296
- data: string;
2297
- };
2298
- cache_control?: {
2299
- type: "ephemeral";
2300
- } | undefined;
2301
- })[];
2302
- role: "user" | "assistant";
2303
- }[];
1365
+ messageHistory: import("ai").CoreMessage[];
2304
1366
  consecutiveAssistantMessages?: number | undefined;
2305
1367
  };
2306
1368
  toolResults: {
@@ -2310,8 +1372,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2310
1372
  }[];
2311
1373
  toolCalls: {
2312
1374
  name: string;
2313
- id: string;
2314
1375
  parameters: Record<string, string>;
1376
+ id: string;
2315
1377
  }[];
2316
1378
  }, {
2317
1379
  type: "prompt-response";
@@ -2346,41 +1408,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2346
1408
  content: string;
2347
1409
  }[][] | undefined;
2348
1410
  };
2349
- messageHistory: {
2350
- content: string | ({
2351
- type: "text";
2352
- text: string;
2353
- cache_control?: {
2354
- type: "ephemeral";
2355
- } | undefined;
2356
- } | {
2357
- type: "tool_use";
2358
- name: string;
2359
- id: string;
2360
- input: Record<string, any>;
2361
- cache_control?: {
2362
- type: "ephemeral";
2363
- } | undefined;
2364
- } | {
2365
- type: "tool_result";
2366
- content: string;
2367
- tool_use_id: string;
2368
- cache_control?: {
2369
- type: "ephemeral";
2370
- } | undefined;
2371
- } | {
2372
- type: "image";
2373
- source: {
2374
- type: "base64";
2375
- media_type: "image/jpeg";
2376
- data: string;
2377
- };
2378
- cache_control?: {
2379
- type: "ephemeral";
2380
- } | undefined;
2381
- })[];
2382
- role: "user" | "assistant";
2383
- }[];
1411
+ messageHistory: import("ai").CoreMessage[];
2384
1412
  consecutiveAssistantMessages?: number | undefined;
2385
1413
  };
2386
1414
  toolResults: {
@@ -2390,8 +1418,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2390
1418
  }[];
2391
1419
  toolCalls: {
2392
1420
  name: string;
2393
- id: string;
2394
1421
  parameters: Record<string, string>;
1422
+ id: string;
2395
1423
  }[];
2396
1424
  }>, z.ZodObject<{
2397
1425
  type: z.ZodLiteral<"read-files">;
@@ -2461,11 +1489,6 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2461
1489
  resetFileVersions: z.ZodBoolean;
2462
1490
  }, "strip", z.ZodTypeAny, {
2463
1491
  type: "tool-call";
2464
- data: {
2465
- name: string;
2466
- id: string;
2467
- input: Record<string, any>;
2468
- };
2469
1492
  userInputId: string;
2470
1493
  response: string;
2471
1494
  changes: {
@@ -2483,13 +1506,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2483
1506
  content: string;
2484
1507
  }[];
2485
1508
  resetFileVersions: boolean;
2486
- }, {
2487
- type: "tool-call";
2488
1509
  data: {
2489
1510
  name: string;
2490
1511
  id: string;
2491
1512
  input: Record<string, any>;
2492
1513
  };
1514
+ }, {
1515
+ type: "tool-call";
2493
1516
  userInputId: string;
2494
1517
  response: string;
2495
1518
  changes: {
@@ -2507,6 +1530,11 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2507
1530
  content: string;
2508
1531
  }[];
2509
1532
  resetFileVersions: boolean;
1533
+ data: {
1534
+ name: string;
1535
+ id: string;
1536
+ input: Record<string, any>;
1537
+ };
2510
1538
  }>, z.ZodObject<{
2511
1539
  type: z.ZodLiteral<"terminal-command-result">;
2512
1540
  userInputId: z.ZodString;