codebuff 1.0.177 → 1.0.179

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 (36) hide show
  1. package/dist/checkpoints/checkpoint-manager.js +1 -1
  2. package/dist/checkpoints/checkpoint-manager.js.map +1 -1
  3. package/dist/client.d.ts +4 -4
  4. package/dist/client.js +9 -10
  5. package/dist/client.js.map +1 -1
  6. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  7. package/dist/common/actions.d.ts +120 -120
  8. package/dist/common/browser-actions.d.ts +44 -44
  9. package/dist/common/logger.d.ts +1 -0
  10. package/dist/common/logger.js +7 -0
  11. package/dist/common/logger.js.map +1 -0
  12. package/dist/common/types/agent-state.d.ts +26 -26
  13. package/dist/common/types/message.d.ts +14 -14
  14. package/dist/common/types/usage.d.ts +2 -2
  15. package/dist/common/util/constants.d.ts +1 -0
  16. package/dist/common/util/constants.js +7 -0
  17. package/dist/common/util/constants.js.map +1 -0
  18. package/dist/common/util/credentials.d.ts +2 -2
  19. package/dist/common/util/helpers.d.ts +1 -0
  20. package/dist/common/util/helpers.js +6 -0
  21. package/dist/common/util/helpers.js.map +1 -0
  22. package/dist/common/util/token-counter.d.ts +3 -0
  23. package/dist/common/util/token-counter.js +27 -0
  24. package/dist/common/util/token-counter.js.map +1 -0
  25. package/dist/common/websockets/websocket-schema.d.ts +368 -368
  26. package/dist/index.js +1 -1
  27. package/package.json +1 -1
  28. package/dist/common/advanced-analyzer.d.ts +0 -19
  29. package/dist/common/advanced-analyzer.js +0 -140
  30. package/dist/common/advanced-analyzer.js.map +0 -1
  31. package/dist/common/message-image-handling.d.ts +0 -41
  32. package/dist/common/message-image-handling.js +0 -57
  33. package/dist/common/message-image-handling.js.map +0 -1
  34. package/dist/common/util/process-stream.d.ts +0 -8
  35. package/dist/common/util/process-stream.js +0 -102
  36. package/dist/common/util/process-stream.js.map +0 -1
@@ -250,13 +250,13 @@ export declare const BrowserResponseChunkSchema: z.ZodObject<{
250
250
  index: z.ZodNumber;
251
251
  data: z.ZodString;
252
252
  }, "strip", z.ZodTypeAny, {
253
- data: string;
254
253
  id: string;
254
+ data: string;
255
255
  total: number;
256
256
  index: number;
257
257
  }, {
258
- data: string;
259
258
  id: string;
259
+ data: string;
260
260
  total: number;
261
261
  index: number;
262
262
  }>;
@@ -267,27 +267,27 @@ export declare const ImageContentSchema: z.ZodObject<{
267
267
  media_type: z.ZodLiteral<"image/jpeg">;
268
268
  data: z.ZodString;
269
269
  }, "strip", z.ZodTypeAny, {
270
- data: string;
271
270
  type: "base64";
272
271
  media_type: "image/jpeg";
273
- }, {
274
272
  data: string;
273
+ }, {
275
274
  type: "base64";
276
275
  media_type: "image/jpeg";
276
+ data: string;
277
277
  }>;
278
278
  }, "strip", z.ZodTypeAny, {
279
279
  type: "image";
280
280
  source: {
281
- data: string;
282
281
  type: "base64";
283
282
  media_type: "image/jpeg";
283
+ data: string;
284
284
  };
285
285
  }, {
286
286
  type: "image";
287
287
  source: {
288
- data: string;
289
288
  type: "base64";
290
289
  media_type: "image/jpeg";
290
+ data: string;
291
291
  };
292
292
  }>;
293
293
  export type ImageContent = z.infer<typeof ImageContentSchema>;
@@ -393,27 +393,27 @@ export declare const BrowserResponseSchema: z.ZodObject<{
393
393
  media_type: z.ZodLiteral<"image/jpeg">;
394
394
  data: z.ZodString;
395
395
  }, "strip", z.ZodTypeAny, {
396
- data: string;
397
396
  type: "base64";
398
397
  media_type: "image/jpeg";
399
- }, {
400
398
  data: string;
399
+ }, {
401
400
  type: "base64";
402
401
  media_type: "image/jpeg";
402
+ data: string;
403
403
  }>;
404
404
  }, "strip", z.ZodTypeAny, {
405
405
  type: "image";
406
406
  source: {
407
- data: string;
408
407
  type: "base64";
409
408
  media_type: "image/jpeg";
409
+ data: string;
410
410
  };
411
411
  }, {
412
412
  type: "image";
413
413
  source: {
414
- data: string;
415
414
  type: "base64";
416
415
  media_type: "image/jpeg";
416
+ data: string;
417
417
  };
418
418
  }>>;
419
419
  post: z.ZodObject<{
@@ -423,61 +423,61 @@ export declare const BrowserResponseSchema: z.ZodObject<{
423
423
  media_type: z.ZodLiteral<"image/jpeg">;
424
424
  data: z.ZodString;
425
425
  }, "strip", z.ZodTypeAny, {
426
- data: string;
427
426
  type: "base64";
428
427
  media_type: "image/jpeg";
429
- }, {
430
428
  data: string;
429
+ }, {
431
430
  type: "base64";
432
431
  media_type: "image/jpeg";
432
+ data: string;
433
433
  }>;
434
434
  }, "strip", z.ZodTypeAny, {
435
435
  type: "image";
436
436
  source: {
437
- data: string;
438
437
  type: "base64";
439
438
  media_type: "image/jpeg";
439
+ data: string;
440
440
  };
441
441
  }, {
442
442
  type: "image";
443
443
  source: {
444
- data: string;
445
444
  type: "base64";
446
445
  media_type: "image/jpeg";
446
+ data: string;
447
447
  };
448
448
  }>;
449
449
  }, "strip", z.ZodTypeAny, {
450
450
  post: {
451
451
  type: "image";
452
452
  source: {
453
- data: string;
454
453
  type: "base64";
455
454
  media_type: "image/jpeg";
455
+ data: string;
456
456
  };
457
457
  };
458
458
  pre?: {
459
459
  type: "image";
460
460
  source: {
461
- data: string;
462
461
  type: "base64";
463
462
  media_type: "image/jpeg";
463
+ data: string;
464
464
  };
465
465
  } | undefined;
466
466
  }, {
467
467
  post: {
468
468
  type: "image";
469
469
  source: {
470
- data: string;
471
470
  type: "base64";
472
471
  media_type: "image/jpeg";
472
+ data: string;
473
473
  };
474
474
  };
475
475
  pre?: {
476
476
  type: "image";
477
477
  source: {
478
- data: string;
479
478
  type: "base64";
480
479
  media_type: "image/jpeg";
480
+ data: string;
481
481
  };
482
482
  } | undefined;
483
483
  }>>;
@@ -521,17 +521,17 @@ export declare const BrowserResponseSchema: z.ZodObject<{
521
521
  post: {
522
522
  type: "image";
523
523
  source: {
524
- data: string;
525
524
  type: "base64";
526
525
  media_type: "image/jpeg";
526
+ data: string;
527
527
  };
528
528
  };
529
529
  pre?: {
530
530
  type: "image";
531
531
  source: {
532
- data: string;
533
532
  type: "base64";
534
533
  media_type: "image/jpeg";
534
+ data: string;
535
535
  };
536
536
  } | undefined;
537
537
  } | undefined;
@@ -575,17 +575,17 @@ export declare const BrowserResponseSchema: z.ZodObject<{
575
575
  post: {
576
576
  type: "image";
577
577
  source: {
578
- data: string;
579
578
  type: "base64";
580
579
  media_type: "image/jpeg";
580
+ data: string;
581
581
  };
582
582
  };
583
583
  pre?: {
584
584
  type: "image";
585
585
  source: {
586
- data: string;
587
586
  type: "base64";
588
587
  media_type: "image/jpeg";
588
+ data: string;
589
589
  };
590
590
  } | undefined;
591
591
  } | undefined;
@@ -832,12 +832,12 @@ export declare const RequiredBrowserTypeActionSchema: z.ZodObject<{
832
832
  selector: z.ZodString;
833
833
  text: z.ZodString;
834
834
  }, "strip", z.ZodTypeAny, {
835
- text: string;
836
835
  type: "type";
836
+ text: string;
837
837
  selector: string;
838
838
  }, {
839
- text: string;
840
839
  type: "type";
840
+ text: string;
841
841
  selector: string;
842
842
  }>;
843
843
  export declare const BrowserTypeActionSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
@@ -876,8 +876,8 @@ export declare const BrowserTypeActionSchema: z.ZodObject<z.objectUtil.extendSha
876
876
  }>, {
877
877
  delay: z.ZodOptional<z.ZodNumber>;
878
878
  }>, "strip", z.ZodTypeAny, {
879
- text: string;
880
879
  type: "type";
880
+ text: string;
881
881
  selector: string;
882
882
  debug?: boolean | undefined;
883
883
  timeout?: number | undefined;
@@ -893,8 +893,8 @@ export declare const BrowserTypeActionSchema: z.ZodObject<z.objectUtil.extendSha
893
893
  } | undefined;
894
894
  delay?: number | undefined;
895
895
  }, {
896
- text: string;
897
896
  type: "type";
897
+ text: string;
898
898
  selector: string;
899
899
  debug?: boolean | undefined;
900
900
  timeout?: number | undefined;
@@ -1380,8 +1380,8 @@ export declare const DiagnosticStepSchema: z.ZodObject<{
1380
1380
  }>, {
1381
1381
  delay: z.ZodOptional<z.ZodNumber>;
1382
1382
  }>, "strip", z.ZodTypeAny, {
1383
- text: string;
1384
1383
  type: "type";
1384
+ text: string;
1385
1385
  selector: string;
1386
1386
  debug?: boolean | undefined;
1387
1387
  timeout?: number | undefined;
@@ -1397,8 +1397,8 @@ export declare const DiagnosticStepSchema: z.ZodObject<{
1397
1397
  } | undefined;
1398
1398
  delay?: number | undefined;
1399
1399
  }, {
1400
- text: string;
1401
1400
  type: "type";
1401
+ text: string;
1402
1402
  selector: string;
1403
1403
  debug?: boolean | undefined;
1404
1404
  timeout?: number | undefined;
@@ -1665,8 +1665,8 @@ export declare const DiagnosticStepSchema: z.ZodObject<{
1665
1665
  visualVerify?: boolean | undefined;
1666
1666
  visualThreshold?: number | undefined;
1667
1667
  } | {
1668
- text: string;
1669
1668
  type: "type";
1669
+ text: string;
1670
1670
  selector: string;
1671
1671
  debug?: boolean | undefined;
1672
1672
  timeout?: number | undefined;
@@ -1787,8 +1787,8 @@ export declare const DiagnosticStepSchema: z.ZodObject<{
1787
1787
  visualVerify?: boolean | undefined;
1788
1788
  visualThreshold?: number | undefined;
1789
1789
  } | {
1790
- text: string;
1791
1790
  type: "type";
1791
+ text: string;
1792
1792
  selector: string;
1793
1793
  debug?: boolean | undefined;
1794
1794
  timeout?: number | undefined;
@@ -2132,8 +2132,8 @@ export declare const BrowserDiagnoseActionSchema: z.ZodObject<{
2132
2132
  }>, {
2133
2133
  delay: z.ZodOptional<z.ZodNumber>;
2134
2134
  }>, "strip", z.ZodTypeAny, {
2135
- text: string;
2136
2135
  type: "type";
2136
+ text: string;
2137
2137
  selector: string;
2138
2138
  debug?: boolean | undefined;
2139
2139
  timeout?: number | undefined;
@@ -2149,8 +2149,8 @@ export declare const BrowserDiagnoseActionSchema: z.ZodObject<{
2149
2149
  } | undefined;
2150
2150
  delay?: number | undefined;
2151
2151
  }, {
2152
- text: string;
2153
2152
  type: "type";
2153
+ text: string;
2154
2154
  selector: string;
2155
2155
  debug?: boolean | undefined;
2156
2156
  timeout?: number | undefined;
@@ -2417,8 +2417,8 @@ export declare const BrowserDiagnoseActionSchema: z.ZodObject<{
2417
2417
  visualVerify?: boolean | undefined;
2418
2418
  visualThreshold?: number | undefined;
2419
2419
  } | {
2420
- text: string;
2421
2420
  type: "type";
2421
+ text: string;
2422
2422
  selector: string;
2423
2423
  debug?: boolean | undefined;
2424
2424
  timeout?: number | undefined;
@@ -2539,8 +2539,8 @@ export declare const BrowserDiagnoseActionSchema: z.ZodObject<{
2539
2539
  visualVerify?: boolean | undefined;
2540
2540
  visualThreshold?: number | undefined;
2541
2541
  } | {
2542
- text: string;
2543
2542
  type: "type";
2543
+ text: string;
2544
2544
  selector: string;
2545
2545
  debug?: boolean | undefined;
2546
2546
  timeout?: number | undefined;
@@ -2667,8 +2667,8 @@ export declare const BrowserDiagnoseActionSchema: z.ZodObject<{
2667
2667
  visualVerify?: boolean | undefined;
2668
2668
  visualThreshold?: number | undefined;
2669
2669
  } | {
2670
- text: string;
2671
2670
  type: "type";
2671
+ text: string;
2672
2672
  selector: string;
2673
2673
  debug?: boolean | undefined;
2674
2674
  timeout?: number | undefined;
@@ -2807,8 +2807,8 @@ export declare const BrowserDiagnoseActionSchema: z.ZodObject<{
2807
2807
  visualVerify?: boolean | undefined;
2808
2808
  visualThreshold?: number | undefined;
2809
2809
  } | {
2810
- text: string;
2811
2810
  type: "type";
2811
+ text: string;
2812
2812
  selector: string;
2813
2813
  debug?: boolean | undefined;
2814
2814
  timeout?: number | undefined;
@@ -3136,8 +3136,8 @@ export declare const BrowserActionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
3136
3136
  }>, {
3137
3137
  delay: z.ZodOptional<z.ZodNumber>;
3138
3138
  }>, "strip", z.ZodTypeAny, {
3139
- text: string;
3140
3139
  type: "type";
3140
+ text: string;
3141
3141
  selector: string;
3142
3142
  debug?: boolean | undefined;
3143
3143
  timeout?: number | undefined;
@@ -3153,8 +3153,8 @@ export declare const BrowserActionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
3153
3153
  } | undefined;
3154
3154
  delay?: number | undefined;
3155
3155
  }, {
3156
- text: string;
3157
3156
  type: "type";
3157
+ text: string;
3158
3158
  selector: string;
3159
3159
  debug?: boolean | undefined;
3160
3160
  timeout?: number | undefined;
@@ -3638,8 +3638,8 @@ export declare const BrowserActionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
3638
3638
  }>, {
3639
3639
  delay: z.ZodOptional<z.ZodNumber>;
3640
3640
  }>, "strip", z.ZodTypeAny, {
3641
- text: string;
3642
3641
  type: "type";
3642
+ text: string;
3643
3643
  selector: string;
3644
3644
  debug?: boolean | undefined;
3645
3645
  timeout?: number | undefined;
@@ -3655,8 +3655,8 @@ export declare const BrowserActionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
3655
3655
  } | undefined;
3656
3656
  delay?: number | undefined;
3657
3657
  }, {
3658
- text: string;
3659
3658
  type: "type";
3659
+ text: string;
3660
3660
  selector: string;
3661
3661
  debug?: boolean | undefined;
3662
3662
  timeout?: number | undefined;
@@ -3923,8 +3923,8 @@ export declare const BrowserActionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
3923
3923
  visualVerify?: boolean | undefined;
3924
3924
  visualThreshold?: number | undefined;
3925
3925
  } | {
3926
- text: string;
3927
3926
  type: "type";
3927
+ text: string;
3928
3928
  selector: string;
3929
3929
  debug?: boolean | undefined;
3930
3930
  timeout?: number | undefined;
@@ -4045,8 +4045,8 @@ export declare const BrowserActionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
4045
4045
  visualVerify?: boolean | undefined;
4046
4046
  visualThreshold?: number | undefined;
4047
4047
  } | {
4048
- text: string;
4049
4048
  type: "type";
4049
+ text: string;
4050
4050
  selector: string;
4051
4051
  debug?: boolean | undefined;
4052
4052
  timeout?: number | undefined;
@@ -4173,8 +4173,8 @@ export declare const BrowserActionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
4173
4173
  visualVerify?: boolean | undefined;
4174
4174
  visualThreshold?: number | undefined;
4175
4175
  } | {
4176
- text: string;
4177
4176
  type: "type";
4177
+ text: string;
4178
4178
  selector: string;
4179
4179
  debug?: boolean | undefined;
4180
4180
  timeout?: number | undefined;
@@ -4313,8 +4313,8 @@ export declare const BrowserActionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
4313
4313
  visualVerify?: boolean | undefined;
4314
4314
  visualThreshold?: number | undefined;
4315
4315
  } | {
4316
- text: string;
4317
4316
  type: "type";
4317
+ text: string;
4318
4318
  selector: string;
4319
4319
  debug?: boolean | undefined;
4320
4320
  timeout?: number | undefined;
@@ -0,0 +1 @@
1
+ export declare function withLoggerContext(context: any, logger: any, callback: () => Promise<any>): Promise<any>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withLoggerContext = withLoggerContext;
4
+ function withLoggerContext(context, logger, callback) {
5
+ return callback();
6
+ }
7
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";;AAAA,8CAEC;AAFD,SAAgB,iBAAiB,CAAC,OAAY,EAAE,MAAW,EAAE,QAA4B;IACvF,OAAO,QAAQ,EAAE,CAAA;AACnB,CAAC"}
@@ -5,12 +5,12 @@ export declare const ToolCallSchema: z.ZodObject<{
5
5
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
6
6
  id: z.ZodString;
7
7
  }, "strip", z.ZodTypeAny, {
8
- id: string;
9
8
  name: string;
9
+ id: string;
10
10
  parameters: Record<string, string>;
11
11
  }, {
12
- id: string;
13
12
  name: string;
13
+ id: string;
14
14
  parameters: Record<string, string>;
15
15
  }>;
16
16
  export type ToolCall = z.infer<typeof ToolCallSchema>;
@@ -19,12 +19,12 @@ export declare const ToolResultSchema: z.ZodObject<{
19
19
  result: z.ZodString;
20
20
  id: z.ZodString;
21
21
  }, "strip", z.ZodTypeAny, {
22
- id: string;
23
22
  name: string;
23
+ id: string;
24
24
  result: string;
25
25
  }, {
26
- id: string;
27
26
  name: string;
27
+ id: string;
28
28
  result: string;
29
29
  }>;
30
30
  export type ToolResult = z.infer<typeof ToolResultSchema>;
@@ -42,13 +42,13 @@ export declare const AgentStateSchema: z.ZodObject<{
42
42
  diffCached: z.ZodString;
43
43
  lastCommitMessages: z.ZodString;
44
44
  }, "strip", z.ZodTypeAny, {
45
- diff: string;
46
45
  status: string;
46
+ diff: string;
47
47
  diffCached: string;
48
48
  lastCommitMessages: string;
49
49
  }, {
50
- diff: string;
51
50
  status: string;
51
+ diff: string;
52
52
  diffCached: string;
53
53
  lastCommitMessages: string;
54
54
  }>;
@@ -92,8 +92,8 @@ export declare const AgentStateSchema: z.ZodObject<{
92
92
  fileTokenScores: Record<string, Record<string, number>>;
93
93
  knowledgeFiles: Record<string, string>;
94
94
  gitChanges: {
95
- diff: string;
96
95
  status: string;
96
+ diff: string;
97
97
  diffCached: string;
98
98
  lastCommitMessages: string;
99
99
  };
@@ -118,8 +118,8 @@ export declare const AgentStateSchema: z.ZodObject<{
118
118
  fileTokenScores: Record<string, Record<string, number>>;
119
119
  knowledgeFiles: Record<string, string>;
120
120
  gitChanges: {
121
- diff: string;
122
121
  status: string;
122
+ diff: string;
123
123
  diffCached: string;
124
124
  lastCommitMessages: string;
125
125
  };
@@ -177,16 +177,16 @@ export declare const AgentStateSchema: z.ZodObject<{
177
177
  }>>;
178
178
  }, "strip", z.ZodTypeAny, {
179
179
  type: "tool_use";
180
- id: string;
181
180
  name: string;
181
+ id: string;
182
182
  input: Record<string, any>;
183
183
  cache_control?: {
184
184
  type: "ephemeral";
185
185
  } | undefined;
186
186
  }, {
187
187
  type: "tool_use";
188
- id: string;
189
188
  name: string;
189
+ id: string;
190
190
  input: Record<string, any>;
191
191
  cache_control?: {
192
192
  type: "ephemeral";
@@ -203,15 +203,15 @@ export declare const AgentStateSchema: z.ZodObject<{
203
203
  type: "ephemeral";
204
204
  }>>;
205
205
  }, "strip", z.ZodTypeAny, {
206
- type: "tool_result";
207
206
  content: string;
207
+ type: "tool_result";
208
208
  tool_use_id: string;
209
209
  cache_control?: {
210
210
  type: "ephemeral";
211
211
  } | undefined;
212
212
  }, {
213
- type: "tool_result";
214
213
  content: string;
214
+ type: "tool_result";
215
215
  tool_use_id: string;
216
216
  cache_control?: {
217
217
  type: "ephemeral";
@@ -260,7 +260,6 @@ export declare const AgentStateSchema: z.ZodObject<{
260
260
  } | undefined;
261
261
  }>]>, "many">]>;
262
262
  }, "strip", z.ZodTypeAny, {
263
- role: "user" | "assistant";
264
263
  content: string | ({
265
264
  type: "text";
266
265
  text: string;
@@ -269,15 +268,15 @@ export declare const AgentStateSchema: z.ZodObject<{
269
268
  } | undefined;
270
269
  } | {
271
270
  type: "tool_use";
272
- id: string;
273
271
  name: string;
272
+ id: string;
274
273
  input: Record<string, any>;
275
274
  cache_control?: {
276
275
  type: "ephemeral";
277
276
  } | undefined;
278
277
  } | {
279
- type: "tool_result";
280
278
  content: string;
279
+ type: "tool_result";
281
280
  tool_use_id: string;
282
281
  cache_control?: {
283
282
  type: "ephemeral";
@@ -293,8 +292,8 @@ export declare const AgentStateSchema: z.ZodObject<{
293
292
  type: "ephemeral";
294
293
  } | undefined;
295
294
  })[];
296
- }, {
297
295
  role: "user" | "assistant";
296
+ }, {
298
297
  content: string | ({
299
298
  type: "text";
300
299
  text: string;
@@ -303,15 +302,15 @@ export declare const AgentStateSchema: z.ZodObject<{
303
302
  } | undefined;
304
303
  } | {
305
304
  type: "tool_use";
306
- id: string;
307
305
  name: string;
306
+ id: string;
308
307
  input: Record<string, any>;
309
308
  cache_control?: {
310
309
  type: "ephemeral";
311
310
  } | undefined;
312
311
  } | {
313
- type: "tool_result";
314
312
  content: string;
313
+ type: "tool_result";
315
314
  tool_use_id: string;
316
315
  cache_control?: {
317
316
  type: "ephemeral";
@@ -327,6 +326,7 @@ export declare const AgentStateSchema: z.ZodObject<{
327
326
  type: "ephemeral";
328
327
  } | undefined;
329
328
  })[];
329
+ role: "user" | "assistant";
330
330
  }>, "many">;
331
331
  }, "strip", z.ZodTypeAny, {
332
332
  agentContext: string;
@@ -336,8 +336,8 @@ export declare const AgentStateSchema: z.ZodObject<{
336
336
  fileTokenScores: Record<string, Record<string, number>>;
337
337
  knowledgeFiles: Record<string, string>;
338
338
  gitChanges: {
339
- diff: string;
340
339
  status: string;
340
+ diff: string;
341
341
  diffCached: string;
342
342
  lastCommitMessages: string;
343
343
  };
@@ -358,7 +358,6 @@ export declare const AgentStateSchema: z.ZodObject<{
358
358
  userKnowledgeFiles?: Record<string, string> | undefined;
359
359
  };
360
360
  messageHistory: {
361
- role: "user" | "assistant";
362
361
  content: string | ({
363
362
  type: "text";
364
363
  text: string;
@@ -367,15 +366,15 @@ export declare const AgentStateSchema: z.ZodObject<{
367
366
  } | undefined;
368
367
  } | {
369
368
  type: "tool_use";
370
- id: string;
371
369
  name: string;
370
+ id: string;
372
371
  input: Record<string, any>;
373
372
  cache_control?: {
374
373
  type: "ephemeral";
375
374
  } | undefined;
376
375
  } | {
377
- type: "tool_result";
378
376
  content: string;
377
+ type: "tool_result";
379
378
  tool_use_id: string;
380
379
  cache_control?: {
381
380
  type: "ephemeral";
@@ -391,6 +390,7 @@ export declare const AgentStateSchema: z.ZodObject<{
391
390
  type: "ephemeral";
392
391
  } | undefined;
393
392
  })[];
393
+ role: "user" | "assistant";
394
394
  }[];
395
395
  }, {
396
396
  agentContext: string;
@@ -400,8 +400,8 @@ export declare const AgentStateSchema: z.ZodObject<{
400
400
  fileTokenScores: Record<string, Record<string, number>>;
401
401
  knowledgeFiles: Record<string, string>;
402
402
  gitChanges: {
403
- diff: string;
404
403
  status: string;
404
+ diff: string;
405
405
  diffCached: string;
406
406
  lastCommitMessages: string;
407
407
  };
@@ -422,7 +422,6 @@ export declare const AgentStateSchema: z.ZodObject<{
422
422
  userKnowledgeFiles?: Record<string, string> | undefined;
423
423
  };
424
424
  messageHistory: {
425
- role: "user" | "assistant";
426
425
  content: string | ({
427
426
  type: "text";
428
427
  text: string;
@@ -431,15 +430,15 @@ export declare const AgentStateSchema: z.ZodObject<{
431
430
  } | undefined;
432
431
  } | {
433
432
  type: "tool_use";
434
- id: string;
435
433
  name: string;
434
+ id: string;
436
435
  input: Record<string, any>;
437
436
  cache_control?: {
438
437
  type: "ephemeral";
439
438
  } | undefined;
440
439
  } | {
441
- type: "tool_result";
442
440
  content: string;
441
+ type: "tool_result";
443
442
  tool_use_id: string;
444
443
  cache_control?: {
445
444
  type: "ephemeral";
@@ -455,6 +454,7 @@ export declare const AgentStateSchema: z.ZodObject<{
455
454
  type: "ephemeral";
456
455
  } | undefined;
457
456
  })[];
457
+ role: "user" | "assistant";
458
458
  }[];
459
459
  }>;
460
460
  export type AgentState = z.infer<typeof AgentStateSchema>;