codebuff 1.0.176 → 1.0.177

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 (56) hide show
  1. package/dist/checkpoints/checkpoint-manager.d.ts +73 -0
  2. package/dist/checkpoints/checkpoint-manager.js +193 -0
  3. package/dist/checkpoints/checkpoint-manager.js.map +1 -0
  4. package/dist/{checkpoint-file-manager.d.ts → checkpoints/file-manager.d.ts} +10 -0
  5. package/dist/{checkpoint-file-manager.js → checkpoints/file-manager.js} +92 -35
  6. package/dist/checkpoints/file-manager.js.map +1 -0
  7. package/dist/cli.js +20 -18
  8. package/dist/cli.js.map +1 -1
  9. package/dist/client.d.ts +7 -6
  10. package/dist/client.js +20 -15
  11. package/dist/client.js.map +1 -1
  12. package/dist/common/actions.d.ts +120 -120
  13. package/dist/common/advanced-analyzer.d.ts +19 -0
  14. package/dist/common/advanced-analyzer.js +140 -0
  15. package/dist/common/advanced-analyzer.js.map +1 -0
  16. package/dist/common/browser-actions.d.ts +44 -44
  17. package/dist/common/message-image-handling.d.ts +41 -0
  18. package/dist/common/message-image-handling.js +57 -0
  19. package/dist/common/message-image-handling.js.map +1 -0
  20. package/dist/common/types/agent-state.d.ts +26 -26
  21. package/dist/common/types/message.d.ts +14 -14
  22. package/dist/common/types/usage.d.ts +2 -2
  23. package/dist/common/util/credentials.d.ts +2 -2
  24. package/dist/common/util/process-stream.d.ts +8 -0
  25. package/dist/common/util/process-stream.js +102 -0
  26. package/dist/common/util/process-stream.js.map +1 -0
  27. package/dist/common/websockets/websocket-schema.d.ts +368 -368
  28. package/dist/index.js +1 -1
  29. package/dist/menu.js +1 -1
  30. package/dist/menu.js.map +1 -1
  31. package/dist/project-files.js +2 -2
  32. package/dist/project-files.js.map +1 -1
  33. package/dist/workers/checkpoint-worker.js +47 -0
  34. package/dist/workers/checkpoint-worker.js.map +1 -0
  35. package/dist/workers/project-context.d.ts +1 -0
  36. package/dist/{worker-script-project-context.js → workers/project-context.js} +5 -5
  37. package/dist/workers/project-context.js.map +1 -0
  38. package/package.json +1 -1
  39. package/dist/checkpoint-file-manager.js.map +0 -1
  40. package/dist/checkpoints.d.ts +0 -64
  41. package/dist/checkpoints.js +0 -162
  42. package/dist/checkpoints.js.map +0 -1
  43. package/dist/common/logger.d.ts +0 -1
  44. package/dist/common/logger.js +0 -7
  45. package/dist/common/logger.js.map +0 -1
  46. package/dist/common/util/constants.d.ts +0 -1
  47. package/dist/common/util/constants.js +0 -7
  48. package/dist/common/util/constants.js.map +0 -1
  49. package/dist/common/util/helpers.d.ts +0 -1
  50. package/dist/common/util/helpers.js +0 -6
  51. package/dist/common/util/helpers.js.map +0 -1
  52. package/dist/common/util/token-counter.d.ts +0 -3
  53. package/dist/common/util/token-counter.js +0 -27
  54. package/dist/common/util/token-counter.js.map +0 -1
  55. package/dist/worker-script-project-context.js.map +0 -1
  56. /package/dist/{worker-script-project-context.d.ts → workers/checkpoint-worker.d.ts} +0 -0
@@ -121,15 +121,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
121
121
  type: "ephemeral";
122
122
  }>>;
123
123
  }, "strip", z.ZodTypeAny, {
124
- content: string;
125
124
  type: "tool_result";
125
+ content: string;
126
126
  tool_use_id: string;
127
127
  cache_control?: {
128
128
  type: "ephemeral";
129
129
  } | undefined;
130
130
  }, {
131
- content: string;
132
131
  type: "tool_result";
132
+ content: string;
133
133
  tool_use_id: string;
134
134
  cache_control?: {
135
135
  type: "ephemeral";
@@ -193,8 +193,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
193
193
  type: "ephemeral";
194
194
  } | undefined;
195
195
  } | {
196
- content: string;
197
196
  type: "tool_result";
197
+ content: string;
198
198
  tool_use_id: string;
199
199
  cache_control?: {
200
200
  type: "ephemeral";
@@ -227,8 +227,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
227
227
  type: "ephemeral";
228
228
  } | undefined;
229
229
  } | {
230
- content: string;
231
230
  type: "tool_result";
231
+ content: string;
232
232
  tool_use_id: string;
233
233
  cache_control?: {
234
234
  type: "ephemeral";
@@ -360,44 +360,17 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
360
360
  path: z.ZodString;
361
361
  content: z.ZodString;
362
362
  }, "strip", z.ZodTypeAny, {
363
+ type: "patch" | "file";
363
364
  path: string;
364
365
  content: string;
365
- type: "file" | "patch";
366
366
  }, {
367
+ type: "patch" | "file";
367
368
  path: string;
368
369
  content: string;
369
- type: "file" | "patch";
370
370
  }>, "many">;
371
371
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
372
372
  }, "strip", z.ZodTypeAny, {
373
373
  type: "user-input";
374
- fileContext: {
375
- currentWorkingDirectory: string;
376
- fileTree: import("../util/file").FileTreeNode[];
377
- fileTokenScores: Record<string, Record<string, number>>;
378
- knowledgeFiles: Record<string, string>;
379
- gitChanges: {
380
- status: string;
381
- diff: string;
382
- diffCached: string;
383
- lastCommitMessages: string;
384
- };
385
- changesSinceLastChat: Record<string, string>;
386
- shellConfigFiles: Record<string, string>;
387
- systemInfo: {
388
- platform: string;
389
- shell: string;
390
- nodeVersion: string;
391
- arch: string;
392
- homedir: string;
393
- cpus: number;
394
- };
395
- fileVersions: {
396
- path: string;
397
- content: string;
398
- }[][];
399
- userKnowledgeFiles?: Record<string, string> | undefined;
400
- };
401
374
  fingerprintId: string;
402
375
  userInputId: string;
403
376
  messages: {
@@ -416,8 +389,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
416
389
  type: "ephemeral";
417
390
  } | undefined;
418
391
  } | {
419
- content: string;
420
392
  type: "tool_result";
393
+ content: string;
421
394
  tool_use_id: string;
422
395
  cache_control?: {
423
396
  type: "ephemeral";
@@ -435,15 +408,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
435
408
  })[];
436
409
  role: "user" | "assistant";
437
410
  }[];
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
411
  fileContext: {
448
412
  currentWorkingDirectory: string;
449
413
  fileTree: import("../util/file").FileTreeNode[];
@@ -471,6 +435,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
471
435
  }[][];
472
436
  userKnowledgeFiles?: Record<string, string> | undefined;
473
437
  };
438
+ changesAlreadyApplied: {
439
+ type: "patch" | "file";
440
+ path: string;
441
+ content: string;
442
+ }[];
443
+ costMode: "lite" | "normal" | "max";
444
+ authToken?: string | undefined;
445
+ }, {
446
+ type: "user-input";
474
447
  fingerprintId: string;
475
448
  userInputId: string;
476
449
  messages: {
@@ -489,8 +462,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
489
462
  type: "ephemeral";
490
463
  } | undefined;
491
464
  } | {
492
- content: string;
493
465
  type: "tool_result";
466
+ content: string;
494
467
  tool_use_id: string;
495
468
  cache_control?: {
496
469
  type: "ephemeral";
@@ -508,13 +481,40 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
508
481
  })[];
509
482
  role: "user" | "assistant";
510
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
+ fileVersions: {
506
+ path: string;
507
+ content: string;
508
+ }[][];
509
+ userKnowledgeFiles?: Record<string, string> | undefined;
510
+ };
511
511
  changesAlreadyApplied: {
512
+ type: "patch" | "file";
512
513
  path: string;
513
514
  content: string;
514
- type: "file" | "patch";
515
515
  }[];
516
516
  authToken?: string | undefined;
517
- costMode?: "max" | "lite" | "normal" | undefined;
517
+ costMode?: "lite" | "normal" | "max" | undefined;
518
518
  }>, z.ZodObject<{
519
519
  type: z.ZodLiteral<"prompt">;
520
520
  promptId: z.ZodString;
@@ -697,15 +697,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
697
697
  type: "ephemeral";
698
698
  }>>;
699
699
  }, "strip", z.ZodTypeAny, {
700
- content: string;
701
700
  type: "tool_result";
701
+ content: string;
702
702
  tool_use_id: string;
703
703
  cache_control?: {
704
704
  type: "ephemeral";
705
705
  } | undefined;
706
706
  }, {
707
- content: string;
708
707
  type: "tool_result";
708
+ content: string;
709
709
  tool_use_id: string;
710
710
  cache_control?: {
711
711
  type: "ephemeral";
@@ -769,8 +769,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
769
769
  type: "ephemeral";
770
770
  } | undefined;
771
771
  } | {
772
- content: string;
773
772
  type: "tool_result";
773
+ content: string;
774
774
  tool_use_id: string;
775
775
  cache_control?: {
776
776
  type: "ephemeral";
@@ -803,8 +803,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
803
803
  type: "ephemeral";
804
804
  } | undefined;
805
805
  } | {
806
- content: string;
807
806
  type: "tool_result";
807
+ content: string;
808
808
  tool_use_id: string;
809
809
  cache_control?: {
810
810
  type: "ephemeral";
@@ -823,7 +823,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
823
823
  role: "user" | "assistant";
824
824
  }>, "many">;
825
825
  }, "strip", z.ZodTypeAny, {
826
- agentContext: string;
827
826
  fileContext: {
828
827
  currentWorkingDirectory: string;
829
828
  fileTree: import("../util/file").FileTreeNode[];
@@ -851,6 +850,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
851
850
  }[][];
852
851
  userKnowledgeFiles?: Record<string, string> | undefined;
853
852
  };
853
+ agentContext: string;
854
854
  messageHistory: {
855
855
  content: string | ({
856
856
  type: "text";
@@ -867,8 +867,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
867
867
  type: "ephemeral";
868
868
  } | undefined;
869
869
  } | {
870
- content: string;
871
870
  type: "tool_result";
871
+ content: string;
872
872
  tool_use_id: string;
873
873
  cache_control?: {
874
874
  type: "ephemeral";
@@ -887,7 +887,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
887
887
  role: "user" | "assistant";
888
888
  }[];
889
889
  }, {
890
- agentContext: string;
891
890
  fileContext: {
892
891
  currentWorkingDirectory: string;
893
892
  fileTree: import("../util/file").FileTreeNode[];
@@ -915,6 +914,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
915
914
  }[][];
916
915
  userKnowledgeFiles?: Record<string, string> | undefined;
917
916
  };
917
+ agentContext: string;
918
918
  messageHistory: {
919
919
  content: string | ({
920
920
  type: "text";
@@ -931,8 +931,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
931
931
  type: "ephemeral";
932
932
  } | undefined;
933
933
  } | {
934
- content: string;
935
934
  type: "tool_result";
935
+ content: string;
936
936
  tool_use_id: string;
937
937
  cache_control?: {
938
938
  type: "ephemeral";
@@ -967,10 +967,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
967
967
  }, "strip", z.ZodTypeAny, {
968
968
  type: "prompt";
969
969
  fingerprintId: string;
970
- costMode: "max" | "lite" | "normal";
970
+ costMode: "lite" | "normal" | "max";
971
971
  promptId: string;
972
972
  agentState: {
973
- agentContext: string;
974
973
  fileContext: {
975
974
  currentWorkingDirectory: string;
976
975
  fileTree: import("../util/file").FileTreeNode[];
@@ -998,6 +997,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
998
997
  }[][];
999
998
  userKnowledgeFiles?: Record<string, string> | undefined;
1000
999
  };
1000
+ agentContext: string;
1001
1001
  messageHistory: {
1002
1002
  content: string | ({
1003
1003
  type: "text";
@@ -1014,8 +1014,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1014
1014
  type: "ephemeral";
1015
1015
  } | undefined;
1016
1016
  } | {
1017
- content: string;
1018
1017
  type: "tool_result";
1018
+ content: string;
1019
1019
  tool_use_id: string;
1020
1020
  cache_control?: {
1021
1021
  type: "ephemeral";
@@ -1046,7 +1046,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1046
1046
  fingerprintId: string;
1047
1047
  promptId: string;
1048
1048
  agentState: {
1049
- agentContext: string;
1050
1049
  fileContext: {
1051
1050
  currentWorkingDirectory: string;
1052
1051
  fileTree: import("../util/file").FileTreeNode[];
@@ -1074,6 +1073,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1074
1073
  }[][];
1075
1074
  userKnowledgeFiles?: Record<string, string> | undefined;
1076
1075
  };
1076
+ agentContext: string;
1077
1077
  messageHistory: {
1078
1078
  content: string | ({
1079
1079
  type: "text";
@@ -1090,8 +1090,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1090
1090
  type: "ephemeral";
1091
1091
  } | undefined;
1092
1092
  } | {
1093
- content: string;
1094
1093
  type: "tool_result";
1094
+ content: string;
1095
1095
  tool_use_id: string;
1096
1096
  cache_control?: {
1097
1097
  type: "ephemeral";
@@ -1116,7 +1116,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1116
1116
  result: string;
1117
1117
  }[];
1118
1118
  authToken?: string | undefined;
1119
- costMode?: "max" | "lite" | "normal" | undefined;
1119
+ costMode?: "lite" | "normal" | "max" | undefined;
1120
1120
  prompt?: string | undefined;
1121
1121
  }>, z.ZodObject<{
1122
1122
  type: z.ZodLiteral<"read-files-response">;
@@ -1245,6 +1245,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1245
1245
  }>;
1246
1246
  }, "strip", z.ZodTypeAny, {
1247
1247
  type: "init";
1248
+ fingerprintId: string;
1248
1249
  fileContext: {
1249
1250
  currentWorkingDirectory: string;
1250
1251
  fileTree: import("../util/file").FileTreeNode[];
@@ -1272,10 +1273,10 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1272
1273
  }[][];
1273
1274
  userKnowledgeFiles?: Record<string, string> | undefined;
1274
1275
  };
1275
- fingerprintId: string;
1276
1276
  authToken?: string | undefined;
1277
1277
  }, {
1278
1278
  type: "init";
1279
+ fingerprintId: string;
1279
1280
  fileContext: {
1280
1281
  currentWorkingDirectory: string;
1281
1282
  fileTree: import("../util/file").FileTreeNode[];
@@ -1303,7 +1304,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1303
1304
  }[][];
1304
1305
  userKnowledgeFiles?: Record<string, string> | undefined;
1305
1306
  };
1306
- fingerprintId: string;
1307
1307
  authToken?: string | undefined;
1308
1308
  }>, z.ZodObject<{
1309
1309
  type: z.ZodLiteral<"usage">;
@@ -1337,33 +1337,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1337
1337
  type: "action";
1338
1338
  data: {
1339
1339
  type: "user-input";
1340
- fileContext: {
1341
- currentWorkingDirectory: string;
1342
- fileTree: import("../util/file").FileTreeNode[];
1343
- fileTokenScores: Record<string, Record<string, number>>;
1344
- knowledgeFiles: Record<string, string>;
1345
- gitChanges: {
1346
- status: string;
1347
- diff: string;
1348
- diffCached: string;
1349
- lastCommitMessages: string;
1350
- };
1351
- changesSinceLastChat: Record<string, string>;
1352
- shellConfigFiles: Record<string, string>;
1353
- systemInfo: {
1354
- platform: string;
1355
- shell: string;
1356
- nodeVersion: string;
1357
- arch: string;
1358
- homedir: string;
1359
- cpus: number;
1360
- };
1361
- fileVersions: {
1362
- path: string;
1363
- content: string;
1364
- }[][];
1365
- userKnowledgeFiles?: Record<string, string> | undefined;
1366
- };
1367
1340
  fingerprintId: string;
1368
1341
  userInputId: string;
1369
1342
  messages: {
@@ -1382,8 +1355,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1382
1355
  type: "ephemeral";
1383
1356
  } | undefined;
1384
1357
  } | {
1385
- content: string;
1386
1358
  type: "tool_result";
1359
+ content: string;
1387
1360
  tool_use_id: string;
1388
1361
  cache_control?: {
1389
1362
  type: "ephemeral";
@@ -1401,20 +1374,46 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1401
1374
  })[];
1402
1375
  role: "user" | "assistant";
1403
1376
  }[];
1377
+ fileContext: {
1378
+ currentWorkingDirectory: string;
1379
+ fileTree: import("../util/file").FileTreeNode[];
1380
+ fileTokenScores: Record<string, Record<string, number>>;
1381
+ knowledgeFiles: Record<string, string>;
1382
+ gitChanges: {
1383
+ status: string;
1384
+ diff: string;
1385
+ diffCached: string;
1386
+ lastCommitMessages: string;
1387
+ };
1388
+ changesSinceLastChat: Record<string, string>;
1389
+ shellConfigFiles: Record<string, string>;
1390
+ systemInfo: {
1391
+ platform: string;
1392
+ shell: string;
1393
+ nodeVersion: string;
1394
+ arch: string;
1395
+ homedir: string;
1396
+ cpus: number;
1397
+ };
1398
+ fileVersions: {
1399
+ path: string;
1400
+ content: string;
1401
+ }[][];
1402
+ userKnowledgeFiles?: Record<string, string> | undefined;
1403
+ };
1404
1404
  changesAlreadyApplied: {
1405
+ type: "patch" | "file";
1405
1406
  path: string;
1406
1407
  content: string;
1407
- type: "file" | "patch";
1408
1408
  }[];
1409
- costMode: "max" | "lite" | "normal";
1409
+ costMode: "lite" | "normal" | "max";
1410
1410
  authToken?: string | undefined;
1411
1411
  } | {
1412
1412
  type: "prompt";
1413
1413
  fingerprintId: string;
1414
- costMode: "max" | "lite" | "normal";
1414
+ costMode: "lite" | "normal" | "max";
1415
1415
  promptId: string;
1416
1416
  agentState: {
1417
- agentContext: string;
1418
1417
  fileContext: {
1419
1418
  currentWorkingDirectory: string;
1420
1419
  fileTree: import("../util/file").FileTreeNode[];
@@ -1442,6 +1441,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1442
1441
  }[][];
1443
1442
  userKnowledgeFiles?: Record<string, string> | undefined;
1444
1443
  };
1444
+ agentContext: string;
1445
1445
  messageHistory: {
1446
1446
  content: string | ({
1447
1447
  type: "text";
@@ -1458,8 +1458,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1458
1458
  type: "ephemeral";
1459
1459
  } | undefined;
1460
1460
  } | {
1461
- content: string;
1462
1461
  type: "tool_result";
1462
+ content: string;
1463
1463
  tool_use_id: string;
1464
1464
  cache_control?: {
1465
1465
  type: "ephemeral";
@@ -1491,6 +1491,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1491
1491
  requestId?: string | undefined;
1492
1492
  } | {
1493
1493
  type: "init";
1494
+ fingerprintId: string;
1494
1495
  fileContext: {
1495
1496
  currentWorkingDirectory: string;
1496
1497
  fileTree: import("../util/file").FileTreeNode[];
@@ -1518,7 +1519,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1518
1519
  }[][];
1519
1520
  userKnowledgeFiles?: Record<string, string> | undefined;
1520
1521
  };
1521
- fingerprintId: string;
1522
1522
  authToken?: string | undefined;
1523
1523
  } | {
1524
1524
  type: "usage";
@@ -1535,33 +1535,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1535
1535
  type: "action";
1536
1536
  data: {
1537
1537
  type: "user-input";
1538
- fileContext: {
1539
- currentWorkingDirectory: string;
1540
- fileTree: import("../util/file").FileTreeNode[];
1541
- fileTokenScores: Record<string, Record<string, number>>;
1542
- knowledgeFiles: Record<string, string>;
1543
- gitChanges: {
1544
- status: string;
1545
- diff: string;
1546
- diffCached: string;
1547
- lastCommitMessages: string;
1548
- };
1549
- changesSinceLastChat: Record<string, string>;
1550
- shellConfigFiles: Record<string, string>;
1551
- systemInfo: {
1552
- platform: string;
1553
- shell: string;
1554
- nodeVersion: string;
1555
- arch: string;
1556
- homedir: string;
1557
- cpus: number;
1558
- };
1559
- fileVersions: {
1560
- path: string;
1561
- content: string;
1562
- }[][];
1563
- userKnowledgeFiles?: Record<string, string> | undefined;
1564
- };
1565
1538
  fingerprintId: string;
1566
1539
  userInputId: string;
1567
1540
  messages: {
@@ -1580,8 +1553,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1580
1553
  type: "ephemeral";
1581
1554
  } | undefined;
1582
1555
  } | {
1583
- content: string;
1584
1556
  type: "tool_result";
1557
+ content: string;
1585
1558
  tool_use_id: string;
1586
1559
  cache_control?: {
1587
1560
  type: "ephemeral";
@@ -1599,19 +1572,45 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1599
1572
  })[];
1600
1573
  role: "user" | "assistant";
1601
1574
  }[];
1575
+ fileContext: {
1576
+ currentWorkingDirectory: string;
1577
+ fileTree: import("../util/file").FileTreeNode[];
1578
+ fileTokenScores: Record<string, Record<string, number>>;
1579
+ knowledgeFiles: Record<string, string>;
1580
+ gitChanges: {
1581
+ status: string;
1582
+ diff: string;
1583
+ diffCached: string;
1584
+ lastCommitMessages: string;
1585
+ };
1586
+ changesSinceLastChat: Record<string, string>;
1587
+ shellConfigFiles: Record<string, string>;
1588
+ systemInfo: {
1589
+ platform: string;
1590
+ shell: string;
1591
+ nodeVersion: string;
1592
+ arch: string;
1593
+ homedir: string;
1594
+ cpus: number;
1595
+ };
1596
+ fileVersions: {
1597
+ path: string;
1598
+ content: string;
1599
+ }[][];
1600
+ userKnowledgeFiles?: Record<string, string> | undefined;
1601
+ };
1602
1602
  changesAlreadyApplied: {
1603
+ type: "patch" | "file";
1603
1604
  path: string;
1604
1605
  content: string;
1605
- type: "file" | "patch";
1606
1606
  }[];
1607
1607
  authToken?: string | undefined;
1608
- costMode?: "max" | "lite" | "normal" | undefined;
1608
+ costMode?: "lite" | "normal" | "max" | undefined;
1609
1609
  } | {
1610
1610
  type: "prompt";
1611
1611
  fingerprintId: string;
1612
1612
  promptId: string;
1613
1613
  agentState: {
1614
- agentContext: string;
1615
1614
  fileContext: {
1616
1615
  currentWorkingDirectory: string;
1617
1616
  fileTree: import("../util/file").FileTreeNode[];
@@ -1639,6 +1638,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1639
1638
  }[][];
1640
1639
  userKnowledgeFiles?: Record<string, string> | undefined;
1641
1640
  };
1641
+ agentContext: string;
1642
1642
  messageHistory: {
1643
1643
  content: string | ({
1644
1644
  type: "text";
@@ -1655,8 +1655,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1655
1655
  type: "ephemeral";
1656
1656
  } | undefined;
1657
1657
  } | {
1658
- content: string;
1659
1658
  type: "tool_result";
1659
+ content: string;
1660
1660
  tool_use_id: string;
1661
1661
  cache_control?: {
1662
1662
  type: "ephemeral";
@@ -1681,7 +1681,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1681
1681
  result: string;
1682
1682
  }[];
1683
1683
  authToken?: string | undefined;
1684
- costMode?: "max" | "lite" | "normal" | undefined;
1684
+ costMode?: "lite" | "normal" | "max" | undefined;
1685
1685
  prompt?: string | undefined;
1686
1686
  } | {
1687
1687
  type: "read-files-response";
@@ -1689,6 +1689,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1689
1689
  requestId?: string | undefined;
1690
1690
  } | {
1691
1691
  type: "init";
1692
+ fingerprintId: string;
1692
1693
  fileContext: {
1693
1694
  currentWorkingDirectory: string;
1694
1695
  fileTree: import("../util/file").FileTreeNode[];
@@ -1716,7 +1717,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1716
1717
  }[][];
1717
1718
  userKnowledgeFiles?: Record<string, string> | undefined;
1718
1719
  };
1719
- fingerprintId: string;
1720
1720
  authToken?: string | undefined;
1721
1721
  } | {
1722
1722
  type: "usage";
@@ -1848,15 +1848,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1848
1848
  type: "ephemeral";
1849
1849
  }>>;
1850
1850
  }, "strip", z.ZodTypeAny, {
1851
- content: string;
1852
1851
  type: "tool_result";
1852
+ content: string;
1853
1853
  tool_use_id: string;
1854
1854
  cache_control?: {
1855
1855
  type: "ephemeral";
1856
1856
  } | undefined;
1857
1857
  }, {
1858
- content: string;
1859
1858
  type: "tool_result";
1859
+ content: string;
1860
1860
  tool_use_id: string;
1861
1861
  cache_control?: {
1862
1862
  type: "ephemeral";
@@ -1920,8 +1920,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1920
1920
  type: "ephemeral";
1921
1921
  } | undefined;
1922
1922
  } | {
1923
- content: string;
1924
1923
  type: "tool_result";
1924
+ content: string;
1925
1925
  tool_use_id: string;
1926
1926
  cache_control?: {
1927
1927
  type: "ephemeral";
@@ -1954,8 +1954,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1954
1954
  type: "ephemeral";
1955
1955
  } | undefined;
1956
1956
  } | {
1957
- content: string;
1958
1957
  type: "tool_result";
1958
+ content: string;
1959
1959
  tool_use_id: string;
1960
1960
  cache_control?: {
1961
1961
  type: "ephemeral";
@@ -2087,44 +2087,17 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2087
2087
  path: z.ZodString;
2088
2088
  content: z.ZodString;
2089
2089
  }, "strip", z.ZodTypeAny, {
2090
+ type: "patch" | "file";
2090
2091
  path: string;
2091
2092
  content: string;
2092
- type: "file" | "patch";
2093
2093
  }, {
2094
+ type: "patch" | "file";
2094
2095
  path: string;
2095
2096
  content: string;
2096
- type: "file" | "patch";
2097
2097
  }>, "many">;
2098
2098
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
2099
2099
  }, "strip", z.ZodTypeAny, {
2100
2100
  type: "user-input";
2101
- fileContext: {
2102
- currentWorkingDirectory: string;
2103
- fileTree: import("../util/file").FileTreeNode[];
2104
- fileTokenScores: Record<string, Record<string, number>>;
2105
- knowledgeFiles: Record<string, string>;
2106
- gitChanges: {
2107
- status: string;
2108
- diff: string;
2109
- diffCached: string;
2110
- lastCommitMessages: string;
2111
- };
2112
- changesSinceLastChat: Record<string, string>;
2113
- shellConfigFiles: Record<string, string>;
2114
- systemInfo: {
2115
- platform: string;
2116
- shell: string;
2117
- nodeVersion: string;
2118
- arch: string;
2119
- homedir: string;
2120
- cpus: number;
2121
- };
2122
- fileVersions: {
2123
- path: string;
2124
- content: string;
2125
- }[][];
2126
- userKnowledgeFiles?: Record<string, string> | undefined;
2127
- };
2128
2101
  fingerprintId: string;
2129
2102
  userInputId: string;
2130
2103
  messages: {
@@ -2143,8 +2116,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2143
2116
  type: "ephemeral";
2144
2117
  } | undefined;
2145
2118
  } | {
2146
- content: string;
2147
2119
  type: "tool_result";
2120
+ content: string;
2148
2121
  tool_use_id: string;
2149
2122
  cache_control?: {
2150
2123
  type: "ephemeral";
@@ -2162,15 +2135,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2162
2135
  })[];
2163
2136
  role: "user" | "assistant";
2164
2137
  }[];
2165
- changesAlreadyApplied: {
2166
- path: string;
2167
- content: string;
2168
- type: "file" | "patch";
2169
- }[];
2170
- costMode: "max" | "lite" | "normal";
2171
- authToken?: string | undefined;
2172
- }, {
2173
- type: "user-input";
2174
2138
  fileContext: {
2175
2139
  currentWorkingDirectory: string;
2176
2140
  fileTree: import("../util/file").FileTreeNode[];
@@ -2198,6 +2162,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2198
2162
  }[][];
2199
2163
  userKnowledgeFiles?: Record<string, string> | undefined;
2200
2164
  };
2165
+ changesAlreadyApplied: {
2166
+ type: "patch" | "file";
2167
+ path: string;
2168
+ content: string;
2169
+ }[];
2170
+ costMode: "lite" | "normal" | "max";
2171
+ authToken?: string | undefined;
2172
+ }, {
2173
+ type: "user-input";
2201
2174
  fingerprintId: string;
2202
2175
  userInputId: string;
2203
2176
  messages: {
@@ -2216,8 +2189,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2216
2189
  type: "ephemeral";
2217
2190
  } | undefined;
2218
2191
  } | {
2219
- content: string;
2220
2192
  type: "tool_result";
2193
+ content: string;
2221
2194
  tool_use_id: string;
2222
2195
  cache_control?: {
2223
2196
  type: "ephemeral";
@@ -2235,13 +2208,40 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2235
2208
  })[];
2236
2209
  role: "user" | "assistant";
2237
2210
  }[];
2211
+ fileContext: {
2212
+ currentWorkingDirectory: string;
2213
+ fileTree: import("../util/file").FileTreeNode[];
2214
+ fileTokenScores: Record<string, Record<string, number>>;
2215
+ knowledgeFiles: Record<string, string>;
2216
+ gitChanges: {
2217
+ status: string;
2218
+ diff: string;
2219
+ diffCached: string;
2220
+ lastCommitMessages: string;
2221
+ };
2222
+ changesSinceLastChat: Record<string, string>;
2223
+ shellConfigFiles: Record<string, string>;
2224
+ systemInfo: {
2225
+ platform: string;
2226
+ shell: string;
2227
+ nodeVersion: string;
2228
+ arch: string;
2229
+ homedir: string;
2230
+ cpus: number;
2231
+ };
2232
+ fileVersions: {
2233
+ path: string;
2234
+ content: string;
2235
+ }[][];
2236
+ userKnowledgeFiles?: Record<string, string> | undefined;
2237
+ };
2238
2238
  changesAlreadyApplied: {
2239
+ type: "patch" | "file";
2239
2240
  path: string;
2240
2241
  content: string;
2241
- type: "file" | "patch";
2242
2242
  }[];
2243
2243
  authToken?: string | undefined;
2244
- costMode?: "max" | "lite" | "normal" | undefined;
2244
+ costMode?: "lite" | "normal" | "max" | undefined;
2245
2245
  }>, z.ZodObject<{
2246
2246
  type: z.ZodLiteral<"prompt">;
2247
2247
  promptId: z.ZodString;
@@ -2424,15 +2424,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2424
2424
  type: "ephemeral";
2425
2425
  }>>;
2426
2426
  }, "strip", z.ZodTypeAny, {
2427
- content: string;
2428
2427
  type: "tool_result";
2428
+ content: string;
2429
2429
  tool_use_id: string;
2430
2430
  cache_control?: {
2431
2431
  type: "ephemeral";
2432
2432
  } | undefined;
2433
2433
  }, {
2434
- content: string;
2435
2434
  type: "tool_result";
2435
+ content: string;
2436
2436
  tool_use_id: string;
2437
2437
  cache_control?: {
2438
2438
  type: "ephemeral";
@@ -2496,8 +2496,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2496
2496
  type: "ephemeral";
2497
2497
  } | undefined;
2498
2498
  } | {
2499
- content: string;
2500
2499
  type: "tool_result";
2500
+ content: string;
2501
2501
  tool_use_id: string;
2502
2502
  cache_control?: {
2503
2503
  type: "ephemeral";
@@ -2530,8 +2530,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2530
2530
  type: "ephemeral";
2531
2531
  } | undefined;
2532
2532
  } | {
2533
- content: string;
2534
2533
  type: "tool_result";
2534
+ content: string;
2535
2535
  tool_use_id: string;
2536
2536
  cache_control?: {
2537
2537
  type: "ephemeral";
@@ -2550,7 +2550,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2550
2550
  role: "user" | "assistant";
2551
2551
  }>, "many">;
2552
2552
  }, "strip", z.ZodTypeAny, {
2553
- agentContext: string;
2554
2553
  fileContext: {
2555
2554
  currentWorkingDirectory: string;
2556
2555
  fileTree: import("../util/file").FileTreeNode[];
@@ -2578,6 +2577,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2578
2577
  }[][];
2579
2578
  userKnowledgeFiles?: Record<string, string> | undefined;
2580
2579
  };
2580
+ agentContext: string;
2581
2581
  messageHistory: {
2582
2582
  content: string | ({
2583
2583
  type: "text";
@@ -2594,8 +2594,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2594
2594
  type: "ephemeral";
2595
2595
  } | undefined;
2596
2596
  } | {
2597
- content: string;
2598
2597
  type: "tool_result";
2598
+ content: string;
2599
2599
  tool_use_id: string;
2600
2600
  cache_control?: {
2601
2601
  type: "ephemeral";
@@ -2614,7 +2614,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2614
2614
  role: "user" | "assistant";
2615
2615
  }[];
2616
2616
  }, {
2617
- agentContext: string;
2618
2617
  fileContext: {
2619
2618
  currentWorkingDirectory: string;
2620
2619
  fileTree: import("../util/file").FileTreeNode[];
@@ -2642,6 +2641,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2642
2641
  }[][];
2643
2642
  userKnowledgeFiles?: Record<string, string> | undefined;
2644
2643
  };
2644
+ agentContext: string;
2645
2645
  messageHistory: {
2646
2646
  content: string | ({
2647
2647
  type: "text";
@@ -2658,8 +2658,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2658
2658
  type: "ephemeral";
2659
2659
  } | undefined;
2660
2660
  } | {
2661
- content: string;
2662
2661
  type: "tool_result";
2662
+ content: string;
2663
2663
  tool_use_id: string;
2664
2664
  cache_control?: {
2665
2665
  type: "ephemeral";
@@ -2694,10 +2694,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2694
2694
  }, "strip", z.ZodTypeAny, {
2695
2695
  type: "prompt";
2696
2696
  fingerprintId: string;
2697
- costMode: "max" | "lite" | "normal";
2697
+ costMode: "lite" | "normal" | "max";
2698
2698
  promptId: string;
2699
2699
  agentState: {
2700
- agentContext: string;
2701
2700
  fileContext: {
2702
2701
  currentWorkingDirectory: string;
2703
2702
  fileTree: import("../util/file").FileTreeNode[];
@@ -2725,6 +2724,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2725
2724
  }[][];
2726
2725
  userKnowledgeFiles?: Record<string, string> | undefined;
2727
2726
  };
2727
+ agentContext: string;
2728
2728
  messageHistory: {
2729
2729
  content: string | ({
2730
2730
  type: "text";
@@ -2741,8 +2741,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2741
2741
  type: "ephemeral";
2742
2742
  } | undefined;
2743
2743
  } | {
2744
- content: string;
2745
2744
  type: "tool_result";
2745
+ content: string;
2746
2746
  tool_use_id: string;
2747
2747
  cache_control?: {
2748
2748
  type: "ephemeral";
@@ -2773,7 +2773,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2773
2773
  fingerprintId: string;
2774
2774
  promptId: string;
2775
2775
  agentState: {
2776
- agentContext: string;
2777
2776
  fileContext: {
2778
2777
  currentWorkingDirectory: string;
2779
2778
  fileTree: import("../util/file").FileTreeNode[];
@@ -2801,6 +2800,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2801
2800
  }[][];
2802
2801
  userKnowledgeFiles?: Record<string, string> | undefined;
2803
2802
  };
2803
+ agentContext: string;
2804
2804
  messageHistory: {
2805
2805
  content: string | ({
2806
2806
  type: "text";
@@ -2817,8 +2817,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2817
2817
  type: "ephemeral";
2818
2818
  } | undefined;
2819
2819
  } | {
2820
- content: string;
2821
2820
  type: "tool_result";
2821
+ content: string;
2822
2822
  tool_use_id: string;
2823
2823
  cache_control?: {
2824
2824
  type: "ephemeral";
@@ -2843,7 +2843,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2843
2843
  result: string;
2844
2844
  }[];
2845
2845
  authToken?: string | undefined;
2846
- costMode?: "max" | "lite" | "normal" | undefined;
2846
+ costMode?: "lite" | "normal" | "max" | undefined;
2847
2847
  prompt?: string | undefined;
2848
2848
  }>, z.ZodObject<{
2849
2849
  type: z.ZodLiteral<"read-files-response">;
@@ -2972,6 +2972,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2972
2972
  }>;
2973
2973
  }, "strip", z.ZodTypeAny, {
2974
2974
  type: "init";
2975
+ fingerprintId: string;
2975
2976
  fileContext: {
2976
2977
  currentWorkingDirectory: string;
2977
2978
  fileTree: import("../util/file").FileTreeNode[];
@@ -2999,10 +3000,10 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2999
3000
  }[][];
3000
3001
  userKnowledgeFiles?: Record<string, string> | undefined;
3001
3002
  };
3002
- fingerprintId: string;
3003
3003
  authToken?: string | undefined;
3004
3004
  }, {
3005
3005
  type: "init";
3006
+ fingerprintId: string;
3006
3007
  fileContext: {
3007
3008
  currentWorkingDirectory: string;
3008
3009
  fileTree: import("../util/file").FileTreeNode[];
@@ -3030,7 +3031,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3030
3031
  }[][];
3031
3032
  userKnowledgeFiles?: Record<string, string> | undefined;
3032
3033
  };
3033
- fingerprintId: string;
3034
3034
  authToken?: string | undefined;
3035
3035
  }>, z.ZodObject<{
3036
3036
  type: z.ZodLiteral<"usage">;
@@ -3064,33 +3064,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3064
3064
  type: "action";
3065
3065
  data: {
3066
3066
  type: "user-input";
3067
- fileContext: {
3068
- currentWorkingDirectory: string;
3069
- fileTree: import("../util/file").FileTreeNode[];
3070
- fileTokenScores: Record<string, Record<string, number>>;
3071
- knowledgeFiles: Record<string, string>;
3072
- gitChanges: {
3073
- status: string;
3074
- diff: string;
3075
- diffCached: string;
3076
- lastCommitMessages: string;
3077
- };
3078
- changesSinceLastChat: Record<string, string>;
3079
- shellConfigFiles: Record<string, string>;
3080
- systemInfo: {
3081
- platform: string;
3082
- shell: string;
3083
- nodeVersion: string;
3084
- arch: string;
3085
- homedir: string;
3086
- cpus: number;
3087
- };
3088
- fileVersions: {
3089
- path: string;
3090
- content: string;
3091
- }[][];
3092
- userKnowledgeFiles?: Record<string, string> | undefined;
3093
- };
3094
3067
  fingerprintId: string;
3095
3068
  userInputId: string;
3096
3069
  messages: {
@@ -3109,8 +3082,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3109
3082
  type: "ephemeral";
3110
3083
  } | undefined;
3111
3084
  } | {
3112
- content: string;
3113
3085
  type: "tool_result";
3086
+ content: string;
3114
3087
  tool_use_id: string;
3115
3088
  cache_control?: {
3116
3089
  type: "ephemeral";
@@ -3128,20 +3101,46 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3128
3101
  })[];
3129
3102
  role: "user" | "assistant";
3130
3103
  }[];
3104
+ fileContext: {
3105
+ currentWorkingDirectory: string;
3106
+ fileTree: import("../util/file").FileTreeNode[];
3107
+ fileTokenScores: Record<string, Record<string, number>>;
3108
+ knowledgeFiles: Record<string, string>;
3109
+ gitChanges: {
3110
+ status: string;
3111
+ diff: string;
3112
+ diffCached: string;
3113
+ lastCommitMessages: string;
3114
+ };
3115
+ changesSinceLastChat: Record<string, string>;
3116
+ shellConfigFiles: Record<string, string>;
3117
+ systemInfo: {
3118
+ platform: string;
3119
+ shell: string;
3120
+ nodeVersion: string;
3121
+ arch: string;
3122
+ homedir: string;
3123
+ cpus: number;
3124
+ };
3125
+ fileVersions: {
3126
+ path: string;
3127
+ content: string;
3128
+ }[][];
3129
+ userKnowledgeFiles?: Record<string, string> | undefined;
3130
+ };
3131
3131
  changesAlreadyApplied: {
3132
+ type: "patch" | "file";
3132
3133
  path: string;
3133
3134
  content: string;
3134
- type: "file" | "patch";
3135
3135
  }[];
3136
- costMode: "max" | "lite" | "normal";
3136
+ costMode: "lite" | "normal" | "max";
3137
3137
  authToken?: string | undefined;
3138
3138
  } | {
3139
3139
  type: "prompt";
3140
3140
  fingerprintId: string;
3141
- costMode: "max" | "lite" | "normal";
3141
+ costMode: "lite" | "normal" | "max";
3142
3142
  promptId: string;
3143
3143
  agentState: {
3144
- agentContext: string;
3145
3144
  fileContext: {
3146
3145
  currentWorkingDirectory: string;
3147
3146
  fileTree: import("../util/file").FileTreeNode[];
@@ -3169,6 +3168,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3169
3168
  }[][];
3170
3169
  userKnowledgeFiles?: Record<string, string> | undefined;
3171
3170
  };
3171
+ agentContext: string;
3172
3172
  messageHistory: {
3173
3173
  content: string | ({
3174
3174
  type: "text";
@@ -3185,8 +3185,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3185
3185
  type: "ephemeral";
3186
3186
  } | undefined;
3187
3187
  } | {
3188
- content: string;
3189
3188
  type: "tool_result";
3189
+ content: string;
3190
3190
  tool_use_id: string;
3191
3191
  cache_control?: {
3192
3192
  type: "ephemeral";
@@ -3218,6 +3218,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3218
3218
  requestId?: string | undefined;
3219
3219
  } | {
3220
3220
  type: "init";
3221
+ fingerprintId: string;
3221
3222
  fileContext: {
3222
3223
  currentWorkingDirectory: string;
3223
3224
  fileTree: import("../util/file").FileTreeNode[];
@@ -3245,7 +3246,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3245
3246
  }[][];
3246
3247
  userKnowledgeFiles?: Record<string, string> | undefined;
3247
3248
  };
3248
- fingerprintId: string;
3249
3249
  authToken?: string | undefined;
3250
3250
  } | {
3251
3251
  type: "usage";
@@ -3262,33 +3262,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3262
3262
  type: "action";
3263
3263
  data: {
3264
3264
  type: "user-input";
3265
- fileContext: {
3266
- currentWorkingDirectory: string;
3267
- fileTree: import("../util/file").FileTreeNode[];
3268
- fileTokenScores: Record<string, Record<string, number>>;
3269
- knowledgeFiles: Record<string, string>;
3270
- gitChanges: {
3271
- status: string;
3272
- diff: string;
3273
- diffCached: string;
3274
- lastCommitMessages: string;
3275
- };
3276
- changesSinceLastChat: Record<string, string>;
3277
- shellConfigFiles: Record<string, string>;
3278
- systemInfo: {
3279
- platform: string;
3280
- shell: string;
3281
- nodeVersion: string;
3282
- arch: string;
3283
- homedir: string;
3284
- cpus: number;
3285
- };
3286
- fileVersions: {
3287
- path: string;
3288
- content: string;
3289
- }[][];
3290
- userKnowledgeFiles?: Record<string, string> | undefined;
3291
- };
3292
3265
  fingerprintId: string;
3293
3266
  userInputId: string;
3294
3267
  messages: {
@@ -3307,8 +3280,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3307
3280
  type: "ephemeral";
3308
3281
  } | undefined;
3309
3282
  } | {
3310
- content: string;
3311
3283
  type: "tool_result";
3284
+ content: string;
3312
3285
  tool_use_id: string;
3313
3286
  cache_control?: {
3314
3287
  type: "ephemeral";
@@ -3326,19 +3299,45 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3326
3299
  })[];
3327
3300
  role: "user" | "assistant";
3328
3301
  }[];
3302
+ fileContext: {
3303
+ currentWorkingDirectory: string;
3304
+ fileTree: import("../util/file").FileTreeNode[];
3305
+ fileTokenScores: Record<string, Record<string, number>>;
3306
+ knowledgeFiles: Record<string, string>;
3307
+ gitChanges: {
3308
+ status: string;
3309
+ diff: string;
3310
+ diffCached: string;
3311
+ lastCommitMessages: string;
3312
+ };
3313
+ changesSinceLastChat: Record<string, string>;
3314
+ shellConfigFiles: Record<string, string>;
3315
+ systemInfo: {
3316
+ platform: string;
3317
+ shell: string;
3318
+ nodeVersion: string;
3319
+ arch: string;
3320
+ homedir: string;
3321
+ cpus: number;
3322
+ };
3323
+ fileVersions: {
3324
+ path: string;
3325
+ content: string;
3326
+ }[][];
3327
+ userKnowledgeFiles?: Record<string, string> | undefined;
3328
+ };
3329
3329
  changesAlreadyApplied: {
3330
+ type: "patch" | "file";
3330
3331
  path: string;
3331
3332
  content: string;
3332
- type: "file" | "patch";
3333
3333
  }[];
3334
3334
  authToken?: string | undefined;
3335
- costMode?: "max" | "lite" | "normal" | undefined;
3335
+ costMode?: "lite" | "normal" | "max" | undefined;
3336
3336
  } | {
3337
3337
  type: "prompt";
3338
3338
  fingerprintId: string;
3339
3339
  promptId: string;
3340
3340
  agentState: {
3341
- agentContext: string;
3342
3341
  fileContext: {
3343
3342
  currentWorkingDirectory: string;
3344
3343
  fileTree: import("../util/file").FileTreeNode[];
@@ -3366,6 +3365,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3366
3365
  }[][];
3367
3366
  userKnowledgeFiles?: Record<string, string> | undefined;
3368
3367
  };
3368
+ agentContext: string;
3369
3369
  messageHistory: {
3370
3370
  content: string | ({
3371
3371
  type: "text";
@@ -3382,8 +3382,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3382
3382
  type: "ephemeral";
3383
3383
  } | undefined;
3384
3384
  } | {
3385
- content: string;
3386
3385
  type: "tool_result";
3386
+ content: string;
3387
3387
  tool_use_id: string;
3388
3388
  cache_control?: {
3389
3389
  type: "ephemeral";
@@ -3408,7 +3408,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3408
3408
  result: string;
3409
3409
  }[];
3410
3410
  authToken?: string | undefined;
3411
- costMode?: "max" | "lite" | "normal" | undefined;
3411
+ costMode?: "lite" | "normal" | "max" | undefined;
3412
3412
  prompt?: string | undefined;
3413
3413
  } | {
3414
3414
  type: "read-files-response";
@@ -3416,6 +3416,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3416
3416
  requestId?: string | undefined;
3417
3417
  } | {
3418
3418
  type: "init";
3419
+ fingerprintId: string;
3419
3420
  fileContext: {
3420
3421
  currentWorkingDirectory: string;
3421
3422
  fileTree: import("../util/file").FileTreeNode[];
@@ -3443,7 +3444,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3443
3444
  }[][];
3444
3445
  userKnowledgeFiles?: Record<string, string> | undefined;
3445
3446
  };
3446
- fingerprintId: string;
3447
3447
  authToken?: string | undefined;
3448
3448
  } | {
3449
3449
  type: "usage";
@@ -3468,13 +3468,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3468
3468
  }, "strip", z.ZodTypeAny, {
3469
3469
  type: "ack";
3470
3470
  success: boolean;
3471
- error?: string | undefined;
3472
3471
  txid?: number | undefined;
3472
+ error?: string | undefined;
3473
3473
  }, {
3474
3474
  type: "ack";
3475
3475
  success: boolean;
3476
- error?: string | undefined;
3477
3476
  txid?: number | undefined;
3477
+ error?: string | undefined;
3478
3478
  }>;
3479
3479
  action: z.ZodObject<{
3480
3480
  type: z.ZodLiteral<"action">;
@@ -3499,26 +3499,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3499
3499
  path: z.ZodString;
3500
3500
  content: z.ZodString;
3501
3501
  }, "strip", z.ZodTypeAny, {
3502
+ type: "patch" | "file";
3502
3503
  path: string;
3503
3504
  content: string;
3504
- type: "file" | "patch";
3505
3505
  }, {
3506
+ type: "patch" | "file";
3506
3507
  path: string;
3507
3508
  content: string;
3508
- type: "file" | "patch";
3509
3509
  }>, "many">;
3510
3510
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
3511
3511
  type: z.ZodEnum<["patch", "file"]>;
3512
3512
  path: z.ZodString;
3513
3513
  content: z.ZodString;
3514
3514
  }, "strip", z.ZodTypeAny, {
3515
+ type: "patch" | "file";
3515
3516
  path: string;
3516
3517
  content: string;
3517
- type: "file" | "patch";
3518
3518
  }, {
3519
+ type: "patch" | "file";
3519
3520
  path: string;
3520
3521
  content: string;
3521
- type: "file" | "patch";
3522
3522
  }>, "many">;
3523
3523
  addedFileVersions: z.ZodArray<z.ZodObject<{
3524
3524
  path: z.ZodString;
@@ -3542,15 +3542,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3542
3542
  type: "response-complete";
3543
3543
  userInputId: string;
3544
3544
  changesAlreadyApplied: {
3545
+ type: "patch" | "file";
3545
3546
  path: string;
3546
3547
  content: string;
3547
- type: "file" | "patch";
3548
3548
  }[];
3549
3549
  response: string;
3550
3550
  changes: {
3551
+ type: "patch" | "file";
3551
3552
  path: string;
3552
3553
  content: string;
3553
- type: "file" | "patch";
3554
3554
  }[];
3555
3555
  addedFileVersions: {
3556
3556
  path: string;
@@ -3567,15 +3567,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3567
3567
  type: "response-complete";
3568
3568
  userInputId: string;
3569
3569
  changesAlreadyApplied: {
3570
+ type: "patch" | "file";
3570
3571
  path: string;
3571
3572
  content: string;
3572
- type: "file" | "patch";
3573
3573
  }[];
3574
3574
  response: string;
3575
3575
  changes: {
3576
+ type: "patch" | "file";
3576
3577
  path: string;
3577
3578
  content: string;
3578
- type: "file" | "patch";
3579
3579
  }[];
3580
3580
  addedFileVersions: {
3581
3581
  path: string;
@@ -3766,15 +3766,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3766
3766
  type: "ephemeral";
3767
3767
  }>>;
3768
3768
  }, "strip", z.ZodTypeAny, {
3769
- content: string;
3770
3769
  type: "tool_result";
3770
+ content: string;
3771
3771
  tool_use_id: string;
3772
3772
  cache_control?: {
3773
3773
  type: "ephemeral";
3774
3774
  } | undefined;
3775
3775
  }, {
3776
- content: string;
3777
3776
  type: "tool_result";
3777
+ content: string;
3778
3778
  tool_use_id: string;
3779
3779
  cache_control?: {
3780
3780
  type: "ephemeral";
@@ -3838,8 +3838,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3838
3838
  type: "ephemeral";
3839
3839
  } | undefined;
3840
3840
  } | {
3841
- content: string;
3842
3841
  type: "tool_result";
3842
+ content: string;
3843
3843
  tool_use_id: string;
3844
3844
  cache_control?: {
3845
3845
  type: "ephemeral";
@@ -3872,8 +3872,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3872
3872
  type: "ephemeral";
3873
3873
  } | undefined;
3874
3874
  } | {
3875
- content: string;
3876
3875
  type: "tool_result";
3876
+ content: string;
3877
3877
  tool_use_id: string;
3878
3878
  cache_control?: {
3879
3879
  type: "ephemeral";
@@ -3892,7 +3892,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3892
3892
  role: "user" | "assistant";
3893
3893
  }>, "many">;
3894
3894
  }, "strip", z.ZodTypeAny, {
3895
- agentContext: string;
3896
3895
  fileContext: {
3897
3896
  currentWorkingDirectory: string;
3898
3897
  fileTree: import("../util/file").FileTreeNode[];
@@ -3920,6 +3919,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3920
3919
  }[][];
3921
3920
  userKnowledgeFiles?: Record<string, string> | undefined;
3922
3921
  };
3922
+ agentContext: string;
3923
3923
  messageHistory: {
3924
3924
  content: string | ({
3925
3925
  type: "text";
@@ -3936,8 +3936,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3936
3936
  type: "ephemeral";
3937
3937
  } | undefined;
3938
3938
  } | {
3939
- content: string;
3940
3939
  type: "tool_result";
3940
+ content: string;
3941
3941
  tool_use_id: string;
3942
3942
  cache_control?: {
3943
3943
  type: "ephemeral";
@@ -3956,7 +3956,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3956
3956
  role: "user" | "assistant";
3957
3957
  }[];
3958
3958
  }, {
3959
- agentContext: string;
3960
3959
  fileContext: {
3961
3960
  currentWorkingDirectory: string;
3962
3961
  fileTree: import("../util/file").FileTreeNode[];
@@ -3984,6 +3983,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3984
3983
  }[][];
3985
3984
  userKnowledgeFiles?: Record<string, string> | undefined;
3986
3985
  };
3986
+ agentContext: string;
3987
3987
  messageHistory: {
3988
3988
  content: string | ({
3989
3989
  type: "text";
@@ -4000,8 +4000,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4000
4000
  type: "ephemeral";
4001
4001
  } | undefined;
4002
4002
  } | {
4003
- content: string;
4004
4003
  type: "tool_result";
4004
+ content: string;
4005
4005
  tool_use_id: string;
4006
4006
  cache_control?: {
4007
4007
  type: "ephemeral";
@@ -4057,7 +4057,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4057
4057
  type: "prompt-response";
4058
4058
  promptId: string;
4059
4059
  agentState: {
4060
- agentContext: string;
4061
4060
  fileContext: {
4062
4061
  currentWorkingDirectory: string;
4063
4062
  fileTree: import("../util/file").FileTreeNode[];
@@ -4085,6 +4084,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4085
4084
  }[][];
4086
4085
  userKnowledgeFiles?: Record<string, string> | undefined;
4087
4086
  };
4087
+ agentContext: string;
4088
4088
  messageHistory: {
4089
4089
  content: string | ({
4090
4090
  type: "text";
@@ -4101,8 +4101,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4101
4101
  type: "ephemeral";
4102
4102
  } | undefined;
4103
4103
  } | {
4104
- content: string;
4105
4104
  type: "tool_result";
4105
+ content: string;
4106
4106
  tool_use_id: string;
4107
4107
  cache_control?: {
4108
4108
  type: "ephemeral";
@@ -4141,7 +4141,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4141
4141
  type: "prompt-response";
4142
4142
  promptId: string;
4143
4143
  agentState: {
4144
- agentContext: string;
4145
4144
  fileContext: {
4146
4145
  currentWorkingDirectory: string;
4147
4146
  fileTree: import("../util/file").FileTreeNode[];
@@ -4169,6 +4168,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4169
4168
  }[][];
4170
4169
  userKnowledgeFiles?: Record<string, string> | undefined;
4171
4170
  };
4171
+ agentContext: string;
4172
4172
  messageHistory: {
4173
4173
  content: string | ({
4174
4174
  type: "text";
@@ -4185,8 +4185,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4185
4185
  type: "ephemeral";
4186
4186
  } | undefined;
4187
4187
  } | {
4188
- content: string;
4189
4188
  type: "tool_result";
4189
+ content: string;
4190
4190
  tool_use_id: string;
4191
4191
  cache_control?: {
4192
4192
  type: "ephemeral";
@@ -4255,26 +4255,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4255
4255
  path: z.ZodString;
4256
4256
  content: z.ZodString;
4257
4257
  }, "strip", z.ZodTypeAny, {
4258
+ type: "patch" | "file";
4258
4259
  path: string;
4259
4260
  content: string;
4260
- type: "file" | "patch";
4261
4261
  }, {
4262
+ type: "patch" | "file";
4262
4263
  path: string;
4263
4264
  content: string;
4264
- type: "file" | "patch";
4265
4265
  }>, "many">;
4266
4266
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
4267
4267
  type: z.ZodEnum<["patch", "file"]>;
4268
4268
  path: z.ZodString;
4269
4269
  content: z.ZodString;
4270
4270
  }, "strip", z.ZodTypeAny, {
4271
+ type: "patch" | "file";
4271
4272
  path: string;
4272
4273
  content: string;
4273
- type: "file" | "patch";
4274
4274
  }, {
4275
+ type: "patch" | "file";
4275
4276
  path: string;
4276
4277
  content: string;
4277
- type: "file" | "patch";
4278
4278
  }>, "many">;
4279
4279
  addedFileVersions: z.ZodArray<z.ZodObject<{
4280
4280
  path: z.ZodString;
@@ -4289,22 +4289,22 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4289
4289
  resetFileVersions: z.ZodBoolean;
4290
4290
  }, "strip", z.ZodTypeAny, {
4291
4291
  type: "tool-call";
4292
+ userInputId: string;
4292
4293
  data: {
4293
4294
  name: string;
4294
4295
  id: string;
4295
4296
  input: Record<string, any>;
4296
4297
  };
4297
- userInputId: string;
4298
4298
  changesAlreadyApplied: {
4299
+ type: "patch" | "file";
4299
4300
  path: string;
4300
4301
  content: string;
4301
- type: "file" | "patch";
4302
4302
  }[];
4303
4303
  response: string;
4304
4304
  changes: {
4305
+ type: "patch" | "file";
4305
4306
  path: string;
4306
4307
  content: string;
4307
- type: "file" | "patch";
4308
4308
  }[];
4309
4309
  addedFileVersions: {
4310
4310
  path: string;
@@ -4313,22 +4313,22 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4313
4313
  resetFileVersions: boolean;
4314
4314
  }, {
4315
4315
  type: "tool-call";
4316
+ userInputId: string;
4316
4317
  data: {
4317
4318
  name: string;
4318
4319
  id: string;
4319
4320
  input: Record<string, any>;
4320
4321
  };
4321
- userInputId: string;
4322
4322
  changesAlreadyApplied: {
4323
+ type: "patch" | "file";
4323
4324
  path: string;
4324
4325
  content: string;
4325
- type: "file" | "patch";
4326
4326
  }[];
4327
4327
  response: string;
4328
4328
  changes: {
4329
+ type: "patch" | "file";
4329
4330
  path: string;
4330
4331
  content: string;
4331
- type: "file" | "patch";
4332
4332
  }[];
4333
4333
  addedFileVersions: {
4334
4334
  path: string;
@@ -4341,12 +4341,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4341
4341
  result: z.ZodString;
4342
4342
  }, "strip", z.ZodTypeAny, {
4343
4343
  type: "terminal-command-result";
4344
- result: string;
4345
4344
  userInputId: string;
4345
+ result: string;
4346
4346
  }, {
4347
4347
  type: "terminal-command-result";
4348
- result: string;
4349
4348
  userInputId: string;
4349
+ result: string;
4350
4350
  }>, z.ZodObject<{
4351
4351
  type: z.ZodLiteral<"npm-version-status">;
4352
4352
  isUpToDate: z.ZodBoolean;
@@ -4413,11 +4413,11 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4413
4413
  type: z.ZodLiteral<"action-error">;
4414
4414
  message: z.ZodString;
4415
4415
  }, "strip", z.ZodTypeAny, {
4416
- message: string;
4417
4416
  type: "action-error";
4418
- }, {
4419
4417
  message: string;
4418
+ }, {
4420
4419
  type: "action-error";
4420
+ message: string;
4421
4421
  }>, z.ZodObject<{
4422
4422
  type: z.ZodLiteral<"commit-message-response">;
4423
4423
  commitMessage: z.ZodString;
@@ -4450,15 +4450,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4450
4450
  type: "response-complete";
4451
4451
  userInputId: string;
4452
4452
  changesAlreadyApplied: {
4453
+ type: "patch" | "file";
4453
4454
  path: string;
4454
4455
  content: string;
4455
- type: "file" | "patch";
4456
4456
  }[];
4457
4457
  response: string;
4458
4458
  changes: {
4459
+ type: "patch" | "file";
4459
4460
  path: string;
4460
4461
  content: string;
4461
- type: "file" | "patch";
4462
4462
  }[];
4463
4463
  addedFileVersions: {
4464
4464
  path: string;
@@ -4475,7 +4475,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4475
4475
  type: "prompt-response";
4476
4476
  promptId: string;
4477
4477
  agentState: {
4478
- agentContext: string;
4479
4478
  fileContext: {
4480
4479
  currentWorkingDirectory: string;
4481
4480
  fileTree: import("../util/file").FileTreeNode[];
@@ -4503,6 +4502,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4503
4502
  }[][];
4504
4503
  userKnowledgeFiles?: Record<string, string> | undefined;
4505
4504
  };
4505
+ agentContext: string;
4506
4506
  messageHistory: {
4507
4507
  content: string | ({
4508
4508
  type: "text";
@@ -4519,8 +4519,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4519
4519
  type: "ephemeral";
4520
4520
  } | undefined;
4521
4521
  } | {
4522
- content: string;
4523
4522
  type: "tool_result";
4523
+ content: string;
4524
4524
  tool_use_id: string;
4525
4525
  cache_control?: {
4526
4526
  type: "ephemeral";
@@ -4565,22 +4565,22 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4565
4565
  filePaths: string[];
4566
4566
  } | {
4567
4567
  type: "tool-call";
4568
+ userInputId: string;
4568
4569
  data: {
4569
4570
  name: string;
4570
4571
  id: string;
4571
4572
  input: Record<string, any>;
4572
4573
  };
4573
- userInputId: string;
4574
4574
  changesAlreadyApplied: {
4575
+ type: "patch" | "file";
4575
4576
  path: string;
4576
4577
  content: string;
4577
- type: "file" | "patch";
4578
4578
  }[];
4579
4579
  response: string;
4580
4580
  changes: {
4581
+ type: "patch" | "file";
4581
4582
  path: string;
4582
4583
  content: string;
4583
- type: "file" | "patch";
4584
4584
  }[];
4585
4585
  addedFileVersions: {
4586
4586
  path: string;
@@ -4589,15 +4589,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4589
4589
  resetFileVersions: boolean;
4590
4590
  } | {
4591
4591
  type: "terminal-command-result";
4592
- result: string;
4593
4592
  userInputId: string;
4593
+ result: string;
4594
4594
  } | {
4595
4595
  type: "npm-version-status";
4596
4596
  isUpToDate: boolean;
4597
4597
  latestVersion: string;
4598
4598
  } | {
4599
- message: string;
4600
4599
  type: "action-error";
4600
+ message: string;
4601
4601
  } | {
4602
4602
  type: "commit-message-response";
4603
4603
  commitMessage: string;
@@ -4624,15 +4624,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4624
4624
  type: "response-complete";
4625
4625
  userInputId: string;
4626
4626
  changesAlreadyApplied: {
4627
+ type: "patch" | "file";
4627
4628
  path: string;
4628
4629
  content: string;
4629
- type: "file" | "patch";
4630
4630
  }[];
4631
4631
  response: string;
4632
4632
  changes: {
4633
+ type: "patch" | "file";
4633
4634
  path: string;
4634
4635
  content: string;
4635
- type: "file" | "patch";
4636
4636
  }[];
4637
4637
  addedFileVersions: {
4638
4638
  path: string;
@@ -4649,7 +4649,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4649
4649
  type: "prompt-response";
4650
4650
  promptId: string;
4651
4651
  agentState: {
4652
- agentContext: string;
4653
4652
  fileContext: {
4654
4653
  currentWorkingDirectory: string;
4655
4654
  fileTree: import("../util/file").FileTreeNode[];
@@ -4677,6 +4676,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4677
4676
  }[][];
4678
4677
  userKnowledgeFiles?: Record<string, string> | undefined;
4679
4678
  };
4679
+ agentContext: string;
4680
4680
  messageHistory: {
4681
4681
  content: string | ({
4682
4682
  type: "text";
@@ -4693,8 +4693,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4693
4693
  type: "ephemeral";
4694
4694
  } | undefined;
4695
4695
  } | {
4696
- content: string;
4697
4696
  type: "tool_result";
4697
+ content: string;
4698
4698
  tool_use_id: string;
4699
4699
  cache_control?: {
4700
4700
  type: "ephemeral";
@@ -4739,22 +4739,22 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4739
4739
  filePaths: string[];
4740
4740
  } | {
4741
4741
  type: "tool-call";
4742
+ userInputId: string;
4742
4743
  data: {
4743
4744
  name: string;
4744
4745
  id: string;
4745
4746
  input: Record<string, any>;
4746
4747
  };
4747
- userInputId: string;
4748
4748
  changesAlreadyApplied: {
4749
+ type: "patch" | "file";
4749
4750
  path: string;
4750
4751
  content: string;
4751
- type: "file" | "patch";
4752
4752
  }[];
4753
4753
  response: string;
4754
4754
  changes: {
4755
+ type: "patch" | "file";
4755
4756
  path: string;
4756
4757
  content: string;
4757
- type: "file" | "patch";
4758
4758
  }[];
4759
4759
  addedFileVersions: {
4760
4760
  path: string;
@@ -4763,15 +4763,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4763
4763
  resetFileVersions: boolean;
4764
4764
  } | {
4765
4765
  type: "terminal-command-result";
4766
- result: string;
4767
4766
  userInputId: string;
4767
+ result: string;
4768
4768
  } | {
4769
4769
  type: "npm-version-status";
4770
4770
  isUpToDate: boolean;
4771
4771
  latestVersion: string;
4772
4772
  } | {
4773
- message: string;
4774
4773
  type: "action-error";
4774
+ message: string;
4775
4775
  } | {
4776
4776
  type: "commit-message-response";
4777
4777
  commitMessage: string;
@@ -4786,13 +4786,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4786
4786
  }, "strip", z.ZodTypeAny, {
4787
4787
  type: "ack";
4788
4788
  success: boolean;
4789
- error?: string | undefined;
4790
4789
  txid?: number | undefined;
4790
+ error?: string | undefined;
4791
4791
  }, {
4792
4792
  type: "ack";
4793
4793
  success: boolean;
4794
- error?: string | undefined;
4795
4794
  txid?: number | undefined;
4795
+ error?: string | undefined;
4796
4796
  }>, z.ZodObject<{
4797
4797
  type: z.ZodLiteral<"action">;
4798
4798
  data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -4816,26 +4816,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4816
4816
  path: z.ZodString;
4817
4817
  content: z.ZodString;
4818
4818
  }, "strip", z.ZodTypeAny, {
4819
+ type: "patch" | "file";
4819
4820
  path: string;
4820
4821
  content: string;
4821
- type: "file" | "patch";
4822
4822
  }, {
4823
+ type: "patch" | "file";
4823
4824
  path: string;
4824
4825
  content: string;
4825
- type: "file" | "patch";
4826
4826
  }>, "many">;
4827
4827
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
4828
4828
  type: z.ZodEnum<["patch", "file"]>;
4829
4829
  path: z.ZodString;
4830
4830
  content: z.ZodString;
4831
4831
  }, "strip", z.ZodTypeAny, {
4832
+ type: "patch" | "file";
4832
4833
  path: string;
4833
4834
  content: string;
4834
- type: "file" | "patch";
4835
4835
  }, {
4836
+ type: "patch" | "file";
4836
4837
  path: string;
4837
4838
  content: string;
4838
- type: "file" | "patch";
4839
4839
  }>, "many">;
4840
4840
  addedFileVersions: z.ZodArray<z.ZodObject<{
4841
4841
  path: z.ZodString;
@@ -4859,15 +4859,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4859
4859
  type: "response-complete";
4860
4860
  userInputId: string;
4861
4861
  changesAlreadyApplied: {
4862
+ type: "patch" | "file";
4862
4863
  path: string;
4863
4864
  content: string;
4864
- type: "file" | "patch";
4865
4865
  }[];
4866
4866
  response: string;
4867
4867
  changes: {
4868
+ type: "patch" | "file";
4868
4869
  path: string;
4869
4870
  content: string;
4870
- type: "file" | "patch";
4871
4871
  }[];
4872
4872
  addedFileVersions: {
4873
4873
  path: string;
@@ -4884,15 +4884,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4884
4884
  type: "response-complete";
4885
4885
  userInputId: string;
4886
4886
  changesAlreadyApplied: {
4887
+ type: "patch" | "file";
4887
4888
  path: string;
4888
4889
  content: string;
4889
- type: "file" | "patch";
4890
4890
  }[];
4891
4891
  response: string;
4892
4892
  changes: {
4893
+ type: "patch" | "file";
4893
4894
  path: string;
4894
4895
  content: string;
4895
- type: "file" | "patch";
4896
4896
  }[];
4897
4897
  addedFileVersions: {
4898
4898
  path: string;
@@ -5083,15 +5083,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5083
5083
  type: "ephemeral";
5084
5084
  }>>;
5085
5085
  }, "strip", z.ZodTypeAny, {
5086
- content: string;
5087
5086
  type: "tool_result";
5087
+ content: string;
5088
5088
  tool_use_id: string;
5089
5089
  cache_control?: {
5090
5090
  type: "ephemeral";
5091
5091
  } | undefined;
5092
5092
  }, {
5093
- content: string;
5094
5093
  type: "tool_result";
5094
+ content: string;
5095
5095
  tool_use_id: string;
5096
5096
  cache_control?: {
5097
5097
  type: "ephemeral";
@@ -5155,8 +5155,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5155
5155
  type: "ephemeral";
5156
5156
  } | undefined;
5157
5157
  } | {
5158
- content: string;
5159
5158
  type: "tool_result";
5159
+ content: string;
5160
5160
  tool_use_id: string;
5161
5161
  cache_control?: {
5162
5162
  type: "ephemeral";
@@ -5189,8 +5189,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5189
5189
  type: "ephemeral";
5190
5190
  } | undefined;
5191
5191
  } | {
5192
- content: string;
5193
5192
  type: "tool_result";
5193
+ content: string;
5194
5194
  tool_use_id: string;
5195
5195
  cache_control?: {
5196
5196
  type: "ephemeral";
@@ -5209,7 +5209,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5209
5209
  role: "user" | "assistant";
5210
5210
  }>, "many">;
5211
5211
  }, "strip", z.ZodTypeAny, {
5212
- agentContext: string;
5213
5212
  fileContext: {
5214
5213
  currentWorkingDirectory: string;
5215
5214
  fileTree: import("../util/file").FileTreeNode[];
@@ -5237,6 +5236,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5237
5236
  }[][];
5238
5237
  userKnowledgeFiles?: Record<string, string> | undefined;
5239
5238
  };
5239
+ agentContext: string;
5240
5240
  messageHistory: {
5241
5241
  content: string | ({
5242
5242
  type: "text";
@@ -5253,8 +5253,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5253
5253
  type: "ephemeral";
5254
5254
  } | undefined;
5255
5255
  } | {
5256
- content: string;
5257
5256
  type: "tool_result";
5257
+ content: string;
5258
5258
  tool_use_id: string;
5259
5259
  cache_control?: {
5260
5260
  type: "ephemeral";
@@ -5273,7 +5273,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5273
5273
  role: "user" | "assistant";
5274
5274
  }[];
5275
5275
  }, {
5276
- agentContext: string;
5277
5276
  fileContext: {
5278
5277
  currentWorkingDirectory: string;
5279
5278
  fileTree: import("../util/file").FileTreeNode[];
@@ -5301,6 +5300,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5301
5300
  }[][];
5302
5301
  userKnowledgeFiles?: Record<string, string> | undefined;
5303
5302
  };
5303
+ agentContext: string;
5304
5304
  messageHistory: {
5305
5305
  content: string | ({
5306
5306
  type: "text";
@@ -5317,8 +5317,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5317
5317
  type: "ephemeral";
5318
5318
  } | undefined;
5319
5319
  } | {
5320
- content: string;
5321
5320
  type: "tool_result";
5321
+ content: string;
5322
5322
  tool_use_id: string;
5323
5323
  cache_control?: {
5324
5324
  type: "ephemeral";
@@ -5374,7 +5374,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5374
5374
  type: "prompt-response";
5375
5375
  promptId: string;
5376
5376
  agentState: {
5377
- agentContext: string;
5378
5377
  fileContext: {
5379
5378
  currentWorkingDirectory: string;
5380
5379
  fileTree: import("../util/file").FileTreeNode[];
@@ -5402,6 +5401,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5402
5401
  }[][];
5403
5402
  userKnowledgeFiles?: Record<string, string> | undefined;
5404
5403
  };
5404
+ agentContext: string;
5405
5405
  messageHistory: {
5406
5406
  content: string | ({
5407
5407
  type: "text";
@@ -5418,8 +5418,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5418
5418
  type: "ephemeral";
5419
5419
  } | undefined;
5420
5420
  } | {
5421
- content: string;
5422
5421
  type: "tool_result";
5422
+ content: string;
5423
5423
  tool_use_id: string;
5424
5424
  cache_control?: {
5425
5425
  type: "ephemeral";
@@ -5458,7 +5458,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5458
5458
  type: "prompt-response";
5459
5459
  promptId: string;
5460
5460
  agentState: {
5461
- agentContext: string;
5462
5461
  fileContext: {
5463
5462
  currentWorkingDirectory: string;
5464
5463
  fileTree: import("../util/file").FileTreeNode[];
@@ -5486,6 +5485,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5486
5485
  }[][];
5487
5486
  userKnowledgeFiles?: Record<string, string> | undefined;
5488
5487
  };
5488
+ agentContext: string;
5489
5489
  messageHistory: {
5490
5490
  content: string | ({
5491
5491
  type: "text";
@@ -5502,8 +5502,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5502
5502
  type: "ephemeral";
5503
5503
  } | undefined;
5504
5504
  } | {
5505
- content: string;
5506
5505
  type: "tool_result";
5506
+ content: string;
5507
5507
  tool_use_id: string;
5508
5508
  cache_control?: {
5509
5509
  type: "ephemeral";
@@ -5572,26 +5572,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5572
5572
  path: z.ZodString;
5573
5573
  content: z.ZodString;
5574
5574
  }, "strip", z.ZodTypeAny, {
5575
+ type: "patch" | "file";
5575
5576
  path: string;
5576
5577
  content: string;
5577
- type: "file" | "patch";
5578
5578
  }, {
5579
+ type: "patch" | "file";
5579
5580
  path: string;
5580
5581
  content: string;
5581
- type: "file" | "patch";
5582
5582
  }>, "many">;
5583
5583
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
5584
5584
  type: z.ZodEnum<["patch", "file"]>;
5585
5585
  path: z.ZodString;
5586
5586
  content: z.ZodString;
5587
5587
  }, "strip", z.ZodTypeAny, {
5588
+ type: "patch" | "file";
5588
5589
  path: string;
5589
5590
  content: string;
5590
- type: "file" | "patch";
5591
5591
  }, {
5592
+ type: "patch" | "file";
5592
5593
  path: string;
5593
5594
  content: string;
5594
- type: "file" | "patch";
5595
5595
  }>, "many">;
5596
5596
  addedFileVersions: z.ZodArray<z.ZodObject<{
5597
5597
  path: z.ZodString;
@@ -5606,22 +5606,22 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5606
5606
  resetFileVersions: z.ZodBoolean;
5607
5607
  }, "strip", z.ZodTypeAny, {
5608
5608
  type: "tool-call";
5609
+ userInputId: string;
5609
5610
  data: {
5610
5611
  name: string;
5611
5612
  id: string;
5612
5613
  input: Record<string, any>;
5613
5614
  };
5614
- userInputId: string;
5615
5615
  changesAlreadyApplied: {
5616
+ type: "patch" | "file";
5616
5617
  path: string;
5617
5618
  content: string;
5618
- type: "file" | "patch";
5619
5619
  }[];
5620
5620
  response: string;
5621
5621
  changes: {
5622
+ type: "patch" | "file";
5622
5623
  path: string;
5623
5624
  content: string;
5624
- type: "file" | "patch";
5625
5625
  }[];
5626
5626
  addedFileVersions: {
5627
5627
  path: string;
@@ -5630,22 +5630,22 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5630
5630
  resetFileVersions: boolean;
5631
5631
  }, {
5632
5632
  type: "tool-call";
5633
+ userInputId: string;
5633
5634
  data: {
5634
5635
  name: string;
5635
5636
  id: string;
5636
5637
  input: Record<string, any>;
5637
5638
  };
5638
- userInputId: string;
5639
5639
  changesAlreadyApplied: {
5640
+ type: "patch" | "file";
5640
5641
  path: string;
5641
5642
  content: string;
5642
- type: "file" | "patch";
5643
5643
  }[];
5644
5644
  response: string;
5645
5645
  changes: {
5646
+ type: "patch" | "file";
5646
5647
  path: string;
5647
5648
  content: string;
5648
- type: "file" | "patch";
5649
5649
  }[];
5650
5650
  addedFileVersions: {
5651
5651
  path: string;
@@ -5658,12 +5658,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5658
5658
  result: z.ZodString;
5659
5659
  }, "strip", z.ZodTypeAny, {
5660
5660
  type: "terminal-command-result";
5661
- result: string;
5662
5661
  userInputId: string;
5662
+ result: string;
5663
5663
  }, {
5664
5664
  type: "terminal-command-result";
5665
- result: string;
5666
5665
  userInputId: string;
5666
+ result: string;
5667
5667
  }>, z.ZodObject<{
5668
5668
  type: z.ZodLiteral<"npm-version-status">;
5669
5669
  isUpToDate: z.ZodBoolean;
@@ -5730,11 +5730,11 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5730
5730
  type: z.ZodLiteral<"action-error">;
5731
5731
  message: z.ZodString;
5732
5732
  }, "strip", z.ZodTypeAny, {
5733
- message: string;
5734
5733
  type: "action-error";
5735
- }, {
5736
5734
  message: string;
5735
+ }, {
5737
5736
  type: "action-error";
5737
+ message: string;
5738
5738
  }>, z.ZodObject<{
5739
5739
  type: z.ZodLiteral<"commit-message-response">;
5740
5740
  commitMessage: z.ZodString;
@@ -5767,15 +5767,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5767
5767
  type: "response-complete";
5768
5768
  userInputId: string;
5769
5769
  changesAlreadyApplied: {
5770
+ type: "patch" | "file";
5770
5771
  path: string;
5771
5772
  content: string;
5772
- type: "file" | "patch";
5773
5773
  }[];
5774
5774
  response: string;
5775
5775
  changes: {
5776
+ type: "patch" | "file";
5776
5777
  path: string;
5777
5778
  content: string;
5778
- type: "file" | "patch";
5779
5779
  }[];
5780
5780
  addedFileVersions: {
5781
5781
  path: string;
@@ -5792,7 +5792,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5792
5792
  type: "prompt-response";
5793
5793
  promptId: string;
5794
5794
  agentState: {
5795
- agentContext: string;
5796
5795
  fileContext: {
5797
5796
  currentWorkingDirectory: string;
5798
5797
  fileTree: import("../util/file").FileTreeNode[];
@@ -5820,6 +5819,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5820
5819
  }[][];
5821
5820
  userKnowledgeFiles?: Record<string, string> | undefined;
5822
5821
  };
5822
+ agentContext: string;
5823
5823
  messageHistory: {
5824
5824
  content: string | ({
5825
5825
  type: "text";
@@ -5836,8 +5836,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5836
5836
  type: "ephemeral";
5837
5837
  } | undefined;
5838
5838
  } | {
5839
- content: string;
5840
5839
  type: "tool_result";
5840
+ content: string;
5841
5841
  tool_use_id: string;
5842
5842
  cache_control?: {
5843
5843
  type: "ephemeral";
@@ -5882,22 +5882,22 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5882
5882
  filePaths: string[];
5883
5883
  } | {
5884
5884
  type: "tool-call";
5885
+ userInputId: string;
5885
5886
  data: {
5886
5887
  name: string;
5887
5888
  id: string;
5888
5889
  input: Record<string, any>;
5889
5890
  };
5890
- userInputId: string;
5891
5891
  changesAlreadyApplied: {
5892
+ type: "patch" | "file";
5892
5893
  path: string;
5893
5894
  content: string;
5894
- type: "file" | "patch";
5895
5895
  }[];
5896
5896
  response: string;
5897
5897
  changes: {
5898
+ type: "patch" | "file";
5898
5899
  path: string;
5899
5900
  content: string;
5900
- type: "file" | "patch";
5901
5901
  }[];
5902
5902
  addedFileVersions: {
5903
5903
  path: string;
@@ -5906,15 +5906,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5906
5906
  resetFileVersions: boolean;
5907
5907
  } | {
5908
5908
  type: "terminal-command-result";
5909
- result: string;
5910
5909
  userInputId: string;
5910
+ result: string;
5911
5911
  } | {
5912
5912
  type: "npm-version-status";
5913
5913
  isUpToDate: boolean;
5914
5914
  latestVersion: string;
5915
5915
  } | {
5916
- message: string;
5917
5916
  type: "action-error";
5917
+ message: string;
5918
5918
  } | {
5919
5919
  type: "commit-message-response";
5920
5920
  commitMessage: string;
@@ -5941,15 +5941,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5941
5941
  type: "response-complete";
5942
5942
  userInputId: string;
5943
5943
  changesAlreadyApplied: {
5944
+ type: "patch" | "file";
5944
5945
  path: string;
5945
5946
  content: string;
5946
- type: "file" | "patch";
5947
5947
  }[];
5948
5948
  response: string;
5949
5949
  changes: {
5950
+ type: "patch" | "file";
5950
5951
  path: string;
5951
5952
  content: string;
5952
- type: "file" | "patch";
5953
5953
  }[];
5954
5954
  addedFileVersions: {
5955
5955
  path: string;
@@ -5966,7 +5966,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5966
5966
  type: "prompt-response";
5967
5967
  promptId: string;
5968
5968
  agentState: {
5969
- agentContext: string;
5970
5969
  fileContext: {
5971
5970
  currentWorkingDirectory: string;
5972
5971
  fileTree: import("../util/file").FileTreeNode[];
@@ -5994,6 +5993,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5994
5993
  }[][];
5995
5994
  userKnowledgeFiles?: Record<string, string> | undefined;
5996
5995
  };
5996
+ agentContext: string;
5997
5997
  messageHistory: {
5998
5998
  content: string | ({
5999
5999
  type: "text";
@@ -6010,8 +6010,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6010
6010
  type: "ephemeral";
6011
6011
  } | undefined;
6012
6012
  } | {
6013
- content: string;
6014
6013
  type: "tool_result";
6014
+ content: string;
6015
6015
  tool_use_id: string;
6016
6016
  cache_control?: {
6017
6017
  type: "ephemeral";
@@ -6056,22 +6056,22 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6056
6056
  filePaths: string[];
6057
6057
  } | {
6058
6058
  type: "tool-call";
6059
+ userInputId: string;
6059
6060
  data: {
6060
6061
  name: string;
6061
6062
  id: string;
6062
6063
  input: Record<string, any>;
6063
6064
  };
6064
- userInputId: string;
6065
6065
  changesAlreadyApplied: {
6066
+ type: "patch" | "file";
6066
6067
  path: string;
6067
6068
  content: string;
6068
- type: "file" | "patch";
6069
6069
  }[];
6070
6070
  response: string;
6071
6071
  changes: {
6072
+ type: "patch" | "file";
6072
6073
  path: string;
6073
6074
  content: string;
6074
- type: "file" | "patch";
6075
6075
  }[];
6076
6076
  addedFileVersions: {
6077
6077
  path: string;
@@ -6080,15 +6080,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6080
6080
  resetFileVersions: boolean;
6081
6081
  } | {
6082
6082
  type: "terminal-command-result";
6083
- result: string;
6084
6083
  userInputId: string;
6084
+ result: string;
6085
6085
  } | {
6086
6086
  type: "npm-version-status";
6087
6087
  isUpToDate: boolean;
6088
6088
  latestVersion: string;
6089
6089
  } | {
6090
- message: string;
6091
6090
  type: "action-error";
6091
+ message: string;
6092
6092
  } | {
6093
6093
  type: "commit-message-response";
6094
6094
  commitMessage: string;