codebuff 1.0.309 → 1.0.310

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 (50) hide show
  1. package/dist/cli-definitions.js +6 -0
  2. package/dist/cli-definitions.js.map +1 -1
  3. package/dist/cli.d.ts +1 -0
  4. package/dist/cli.js +6 -2
  5. package/dist/cli.js.map +1 -1
  6. package/dist/client.d.ts +2 -1
  7. package/dist/client.js +225 -5
  8. package/dist/client.js.map +1 -1
  9. package/dist/code-map/__mocks__/tree-sitter-typescript.d.ts +12 -0
  10. package/dist/code-map/__mocks__/tree-sitter-typescript.d.ts.map +1 -0
  11. package/dist/code-map/__mocks__/tree-sitter-typescript.js +14 -0
  12. package/dist/code-map/__mocks__/tree-sitter-typescript.js.map +1 -0
  13. package/dist/code-map/jest.config.d.ts +4 -0
  14. package/dist/code-map/jest.config.d.ts.map +1 -0
  15. package/dist/code-map/jest.config.js +18 -0
  16. package/dist/code-map/jest.config.js.map +1 -0
  17. package/dist/code-map/scripts/tree-sitter-test.cjs +27 -0
  18. package/dist/code-map/scripts/tree-sitter-test.cjs.map +1 -0
  19. package/dist/code-map/scripts/tree-sitter-test.d.cts +2 -0
  20. package/dist/code-map/scripts/tree-sitter-test.d.cts.map +1 -0
  21. package/dist/code-map/scripts/tree-sitter-test.d.ts +2 -0
  22. package/dist/code-map/scripts/tree-sitter-test.d.ts.map +1 -0
  23. package/dist/code-map/scripts/tree-sitter-test.js +54 -0
  24. package/dist/code-map/scripts/tree-sitter-test.js.map +1 -0
  25. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  26. package/dist/common/actions.d.ts +1327 -364
  27. package/dist/common/actions.js +22 -1
  28. package/dist/common/actions.js.map +1 -1
  29. package/dist/common/constants/tools.d.ts +2 -0
  30. package/dist/common/constants/tools.js +3 -0
  31. package/dist/common/constants/tools.js.map +1 -1
  32. package/dist/common/constants.d.ts +4 -0
  33. package/dist/common/constants.js +4 -0
  34. package/dist/common/constants.js.map +1 -1
  35. package/dist/common/websockets/websocket-schema.d.ts +2014 -334
  36. package/dist/index.js +9 -10
  37. package/dist/index.js.map +1 -1
  38. package/dist/menu.js.map +1 -1
  39. package/dist/tool-handlers.d.ts +5 -1
  40. package/dist/tool-handlers.js +29 -1
  41. package/dist/tool-handlers.js.map +1 -1
  42. package/dist/types.d.ts +1 -0
  43. package/dist/utils/terminal.d.ts +17 -3
  44. package/dist/utils/terminal.js +165 -4
  45. package/dist/utils/terminal.js.map +1 -1
  46. package/dist/utils/tool-renderers.js +6 -0
  47. package/dist/utils/tool-renderers.js.map +1 -1
  48. package/dist/workers/checkpoint-worker.js +2 -0
  49. package/dist/workers/checkpoint-worker.js.map +1 -1
  50. package/package.json +2 -1
@@ -371,6 +371,325 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
371
371
  model?: string | undefined;
372
372
  cwd?: string | undefined;
373
373
  repoName?: string | undefined;
374
+ }>, z.ZodObject<{
375
+ type: z.ZodLiteral<"manager-prompt">;
376
+ promptId: z.ZodString;
377
+ prompt: z.ZodOptional<z.ZodString>;
378
+ agentState: z.ZodObject<{
379
+ agentContext: z.ZodString;
380
+ fileContext: z.ZodObject<{
381
+ currentWorkingDirectory: z.ZodString;
382
+ fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
383
+ fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
384
+ tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
385
+ knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
386
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
387
+ gitChanges: z.ZodObject<{
388
+ status: z.ZodString;
389
+ diff: z.ZodString;
390
+ diffCached: z.ZodString;
391
+ lastCommitMessages: z.ZodString;
392
+ }, "strip", z.ZodTypeAny, {
393
+ status: string;
394
+ diff: string;
395
+ diffCached: string;
396
+ lastCommitMessages: string;
397
+ }, {
398
+ status: string;
399
+ diff: string;
400
+ diffCached: string;
401
+ lastCommitMessages: string;
402
+ }>;
403
+ changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
404
+ shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
405
+ systemInfo: z.ZodObject<{
406
+ platform: z.ZodString;
407
+ shell: z.ZodString;
408
+ nodeVersion: z.ZodString;
409
+ arch: z.ZodString;
410
+ homedir: z.ZodString;
411
+ cpus: z.ZodNumber;
412
+ }, "strip", z.ZodTypeAny, {
413
+ platform: string;
414
+ shell: string;
415
+ nodeVersion: string;
416
+ arch: string;
417
+ homedir: string;
418
+ cpus: number;
419
+ }, {
420
+ platform: string;
421
+ shell: string;
422
+ nodeVersion: string;
423
+ arch: string;
424
+ homedir: string;
425
+ cpus: number;
426
+ }>;
427
+ fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
428
+ path: z.ZodString;
429
+ content: z.ZodString;
430
+ }, "strip", z.ZodTypeAny, {
431
+ path: string;
432
+ content: string;
433
+ }, {
434
+ path: string;
435
+ content: string;
436
+ }>, "many">, "many">>;
437
+ }, "strip", z.ZodTypeAny, {
438
+ currentWorkingDirectory: string;
439
+ fileTree: import("../util/file").FileTreeNode[];
440
+ fileTokenScores: Record<string, Record<string, number>>;
441
+ knowledgeFiles: Record<string, string>;
442
+ gitChanges: {
443
+ status: string;
444
+ diff: string;
445
+ diffCached: string;
446
+ lastCommitMessages: string;
447
+ };
448
+ changesSinceLastChat: Record<string, string>;
449
+ shellConfigFiles: Record<string, string>;
450
+ systemInfo: {
451
+ platform: string;
452
+ shell: string;
453
+ nodeVersion: string;
454
+ arch: string;
455
+ homedir: string;
456
+ cpus: number;
457
+ };
458
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
459
+ userKnowledgeFiles?: Record<string, string> | undefined;
460
+ fileVersions?: {
461
+ path: string;
462
+ content: string;
463
+ }[][] | undefined;
464
+ }, {
465
+ currentWorkingDirectory: string;
466
+ fileTree: import("../util/file").FileTreeNode[];
467
+ fileTokenScores: Record<string, Record<string, number>>;
468
+ knowledgeFiles: Record<string, string>;
469
+ gitChanges: {
470
+ status: string;
471
+ diff: string;
472
+ diffCached: string;
473
+ lastCommitMessages: string;
474
+ };
475
+ changesSinceLastChat: Record<string, string>;
476
+ shellConfigFiles: Record<string, string>;
477
+ systemInfo: {
478
+ platform: string;
479
+ shell: string;
480
+ nodeVersion: string;
481
+ arch: string;
482
+ homedir: string;
483
+ cpus: number;
484
+ };
485
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
486
+ userKnowledgeFiles?: Record<string, string> | undefined;
487
+ fileVersions?: {
488
+ path: string;
489
+ content: string;
490
+ }[][] | undefined;
491
+ }>;
492
+ messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
493
+ timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
494
+ }, "strip", z.ZodTypeAny, {
495
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
496
+ }, {
497
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
498
+ }>>, "many">;
499
+ consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
500
+ agentStepsRemaining: z.ZodOptional<z.ZodNumber>;
501
+ }, "strip", z.ZodTypeAny, {
502
+ agentContext: string;
503
+ fileContext: {
504
+ currentWorkingDirectory: string;
505
+ fileTree: import("../util/file").FileTreeNode[];
506
+ fileTokenScores: Record<string, Record<string, number>>;
507
+ knowledgeFiles: Record<string, string>;
508
+ gitChanges: {
509
+ status: string;
510
+ diff: string;
511
+ diffCached: string;
512
+ lastCommitMessages: string;
513
+ };
514
+ changesSinceLastChat: Record<string, string>;
515
+ shellConfigFiles: Record<string, string>;
516
+ systemInfo: {
517
+ platform: string;
518
+ shell: string;
519
+ nodeVersion: string;
520
+ arch: string;
521
+ homedir: string;
522
+ cpus: number;
523
+ };
524
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
525
+ userKnowledgeFiles?: Record<string, string> | undefined;
526
+ fileVersions?: {
527
+ path: string;
528
+ content: string;
529
+ }[][] | undefined;
530
+ };
531
+ messageHistory: (import("ai").CoreMessage & {
532
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
533
+ })[];
534
+ consecutiveAssistantMessages?: number | undefined;
535
+ agentStepsRemaining?: number | undefined;
536
+ }, {
537
+ agentContext: string;
538
+ fileContext: {
539
+ currentWorkingDirectory: string;
540
+ fileTree: import("../util/file").FileTreeNode[];
541
+ fileTokenScores: Record<string, Record<string, number>>;
542
+ knowledgeFiles: Record<string, string>;
543
+ gitChanges: {
544
+ status: string;
545
+ diff: string;
546
+ diffCached: string;
547
+ lastCommitMessages: string;
548
+ };
549
+ changesSinceLastChat: Record<string, string>;
550
+ shellConfigFiles: Record<string, string>;
551
+ systemInfo: {
552
+ platform: string;
553
+ shell: string;
554
+ nodeVersion: string;
555
+ arch: string;
556
+ homedir: string;
557
+ cpus: number;
558
+ };
559
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
560
+ userKnowledgeFiles?: Record<string, string> | undefined;
561
+ fileVersions?: {
562
+ path: string;
563
+ content: string;
564
+ }[][] | undefined;
565
+ };
566
+ messageHistory: (import("ai").CoreMessage & {
567
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
568
+ })[];
569
+ consecutiveAssistantMessages?: number | undefined;
570
+ agentStepsRemaining?: number | undefined;
571
+ }>;
572
+ toolResults: z.ZodArray<z.ZodObject<{
573
+ name: z.ZodString;
574
+ result: z.ZodString;
575
+ id: z.ZodString;
576
+ }, "strip", z.ZodTypeAny, {
577
+ name: string;
578
+ id: string;
579
+ result: string;
580
+ }, {
581
+ name: string;
582
+ id: string;
583
+ result: string;
584
+ }>, "many">;
585
+ fingerprintId: z.ZodString;
586
+ authToken: z.ZodOptional<z.ZodString>;
587
+ costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max", "experimental", "ask"]>>>;
588
+ model: z.ZodOptional<z.ZodString>;
589
+ cwd: z.ZodOptional<z.ZodString>;
590
+ repoName: z.ZodOptional<z.ZodString>;
591
+ }, "strip", z.ZodTypeAny, {
592
+ type: "manager-prompt";
593
+ promptId: string;
594
+ fingerprintId: string;
595
+ costMode: "lite" | "normal" | "max" | "experimental" | "ask";
596
+ agentState: {
597
+ agentContext: string;
598
+ fileContext: {
599
+ currentWorkingDirectory: string;
600
+ fileTree: import("../util/file").FileTreeNode[];
601
+ fileTokenScores: Record<string, Record<string, number>>;
602
+ knowledgeFiles: Record<string, string>;
603
+ gitChanges: {
604
+ status: string;
605
+ diff: string;
606
+ diffCached: string;
607
+ lastCommitMessages: string;
608
+ };
609
+ changesSinceLastChat: Record<string, string>;
610
+ shellConfigFiles: Record<string, string>;
611
+ systemInfo: {
612
+ platform: string;
613
+ shell: string;
614
+ nodeVersion: string;
615
+ arch: string;
616
+ homedir: string;
617
+ cpus: number;
618
+ };
619
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
620
+ userKnowledgeFiles?: Record<string, string> | undefined;
621
+ fileVersions?: {
622
+ path: string;
623
+ content: string;
624
+ }[][] | undefined;
625
+ };
626
+ messageHistory: (import("ai").CoreMessage & {
627
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
628
+ })[];
629
+ consecutiveAssistantMessages?: number | undefined;
630
+ agentStepsRemaining?: number | undefined;
631
+ };
632
+ toolResults: {
633
+ name: string;
634
+ id: string;
635
+ result: string;
636
+ }[];
637
+ prompt?: string | undefined;
638
+ authToken?: string | undefined;
639
+ model?: string | undefined;
640
+ cwd?: string | undefined;
641
+ repoName?: string | undefined;
642
+ }, {
643
+ type: "manager-prompt";
644
+ promptId: string;
645
+ fingerprintId: string;
646
+ agentState: {
647
+ agentContext: string;
648
+ fileContext: {
649
+ currentWorkingDirectory: string;
650
+ fileTree: import("../util/file").FileTreeNode[];
651
+ fileTokenScores: Record<string, Record<string, number>>;
652
+ knowledgeFiles: Record<string, string>;
653
+ gitChanges: {
654
+ status: string;
655
+ diff: string;
656
+ diffCached: string;
657
+ lastCommitMessages: string;
658
+ };
659
+ changesSinceLastChat: Record<string, string>;
660
+ shellConfigFiles: Record<string, string>;
661
+ systemInfo: {
662
+ platform: string;
663
+ shell: string;
664
+ nodeVersion: string;
665
+ arch: string;
666
+ homedir: string;
667
+ cpus: number;
668
+ };
669
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
670
+ userKnowledgeFiles?: Record<string, string> | undefined;
671
+ fileVersions?: {
672
+ path: string;
673
+ content: string;
674
+ }[][] | undefined;
675
+ };
676
+ messageHistory: (import("ai").CoreMessage & {
677
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
678
+ })[];
679
+ consecutiveAssistantMessages?: number | undefined;
680
+ agentStepsRemaining?: number | undefined;
681
+ };
682
+ toolResults: {
683
+ name: string;
684
+ id: string;
685
+ result: string;
686
+ }[];
687
+ prompt?: string | undefined;
688
+ authToken?: string | undefined;
689
+ costMode?: "lite" | "normal" | "max" | "experimental" | "ask" | undefined;
690
+ model?: string | undefined;
691
+ cwd?: string | undefined;
692
+ repoName?: string | undefined;
374
693
  }>, z.ZodObject<{
375
694
  type: z.ZodLiteral<"read-files-response">;
376
695
  files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -379,14 +698,559 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
379
698
  type: "read-files-response";
380
699
  files: Record<string, string | null>;
381
700
  requestId?: string | undefined;
382
- }, {
701
+ }, {
702
+ type: "read-files-response";
703
+ files: Record<string, string | null>;
704
+ requestId?: string | undefined;
705
+ }>, z.ZodObject<{
706
+ type: z.ZodLiteral<"init">;
707
+ fingerprintId: z.ZodString;
708
+ authToken: z.ZodOptional<z.ZodString>;
709
+ fileContext: z.ZodObject<{
710
+ currentWorkingDirectory: z.ZodString;
711
+ fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
712
+ fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
713
+ tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
714
+ knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
715
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
716
+ gitChanges: z.ZodObject<{
717
+ status: z.ZodString;
718
+ diff: z.ZodString;
719
+ diffCached: z.ZodString;
720
+ lastCommitMessages: z.ZodString;
721
+ }, "strip", z.ZodTypeAny, {
722
+ status: string;
723
+ diff: string;
724
+ diffCached: string;
725
+ lastCommitMessages: string;
726
+ }, {
727
+ status: string;
728
+ diff: string;
729
+ diffCached: string;
730
+ lastCommitMessages: string;
731
+ }>;
732
+ changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
733
+ shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
734
+ systemInfo: z.ZodObject<{
735
+ platform: z.ZodString;
736
+ shell: z.ZodString;
737
+ nodeVersion: z.ZodString;
738
+ arch: z.ZodString;
739
+ homedir: z.ZodString;
740
+ cpus: z.ZodNumber;
741
+ }, "strip", z.ZodTypeAny, {
742
+ platform: string;
743
+ shell: string;
744
+ nodeVersion: string;
745
+ arch: string;
746
+ homedir: string;
747
+ cpus: number;
748
+ }, {
749
+ platform: string;
750
+ shell: string;
751
+ nodeVersion: string;
752
+ arch: string;
753
+ homedir: string;
754
+ cpus: number;
755
+ }>;
756
+ fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
757
+ path: z.ZodString;
758
+ content: z.ZodString;
759
+ }, "strip", z.ZodTypeAny, {
760
+ path: string;
761
+ content: string;
762
+ }, {
763
+ path: string;
764
+ content: string;
765
+ }>, "many">, "many">>;
766
+ }, "strip", z.ZodTypeAny, {
767
+ currentWorkingDirectory: string;
768
+ fileTree: import("../util/file").FileTreeNode[];
769
+ fileTokenScores: Record<string, Record<string, number>>;
770
+ knowledgeFiles: Record<string, string>;
771
+ gitChanges: {
772
+ status: string;
773
+ diff: string;
774
+ diffCached: string;
775
+ lastCommitMessages: string;
776
+ };
777
+ changesSinceLastChat: Record<string, string>;
778
+ shellConfigFiles: Record<string, string>;
779
+ systemInfo: {
780
+ platform: string;
781
+ shell: string;
782
+ nodeVersion: string;
783
+ arch: string;
784
+ homedir: string;
785
+ cpus: number;
786
+ };
787
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
788
+ userKnowledgeFiles?: Record<string, string> | undefined;
789
+ fileVersions?: {
790
+ path: string;
791
+ content: string;
792
+ }[][] | undefined;
793
+ }, {
794
+ currentWorkingDirectory: string;
795
+ fileTree: import("../util/file").FileTreeNode[];
796
+ fileTokenScores: Record<string, Record<string, number>>;
797
+ knowledgeFiles: Record<string, string>;
798
+ gitChanges: {
799
+ status: string;
800
+ diff: string;
801
+ diffCached: string;
802
+ lastCommitMessages: string;
803
+ };
804
+ changesSinceLastChat: Record<string, string>;
805
+ shellConfigFiles: Record<string, string>;
806
+ systemInfo: {
807
+ platform: string;
808
+ shell: string;
809
+ nodeVersion: string;
810
+ arch: string;
811
+ homedir: string;
812
+ cpus: number;
813
+ };
814
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
815
+ userKnowledgeFiles?: Record<string, string> | undefined;
816
+ fileVersions?: {
817
+ path: string;
818
+ content: string;
819
+ }[][] | undefined;
820
+ }>;
821
+ }, "strip", z.ZodTypeAny, {
822
+ type: "init";
823
+ fileContext: {
824
+ currentWorkingDirectory: string;
825
+ fileTree: import("../util/file").FileTreeNode[];
826
+ fileTokenScores: Record<string, Record<string, number>>;
827
+ knowledgeFiles: Record<string, string>;
828
+ gitChanges: {
829
+ status: string;
830
+ diff: string;
831
+ diffCached: string;
832
+ lastCommitMessages: string;
833
+ };
834
+ changesSinceLastChat: Record<string, string>;
835
+ shellConfigFiles: Record<string, string>;
836
+ systemInfo: {
837
+ platform: string;
838
+ shell: string;
839
+ nodeVersion: string;
840
+ arch: string;
841
+ homedir: string;
842
+ cpus: number;
843
+ };
844
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
845
+ userKnowledgeFiles?: Record<string, string> | undefined;
846
+ fileVersions?: {
847
+ path: string;
848
+ content: string;
849
+ }[][] | undefined;
850
+ };
851
+ fingerprintId: string;
852
+ authToken?: string | undefined;
853
+ }, {
854
+ type: "init";
855
+ fileContext: {
856
+ currentWorkingDirectory: string;
857
+ fileTree: import("../util/file").FileTreeNode[];
858
+ fileTokenScores: Record<string, Record<string, number>>;
859
+ knowledgeFiles: Record<string, string>;
860
+ gitChanges: {
861
+ status: string;
862
+ diff: string;
863
+ diffCached: string;
864
+ lastCommitMessages: string;
865
+ };
866
+ changesSinceLastChat: Record<string, string>;
867
+ shellConfigFiles: Record<string, string>;
868
+ systemInfo: {
869
+ platform: string;
870
+ shell: string;
871
+ nodeVersion: string;
872
+ arch: string;
873
+ homedir: string;
874
+ cpus: number;
875
+ };
876
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
877
+ userKnowledgeFiles?: Record<string, string> | undefined;
878
+ fileVersions?: {
879
+ path: string;
880
+ content: string;
881
+ }[][] | undefined;
882
+ };
883
+ fingerprintId: string;
884
+ authToken?: string | undefined;
885
+ }>, z.ZodObject<{
886
+ type: z.ZodLiteral<"generate-commit-message">;
887
+ fingerprintId: z.ZodString;
888
+ authToken: z.ZodOptional<z.ZodString>;
889
+ stagedChanges: z.ZodString;
890
+ }, "strip", z.ZodTypeAny, {
891
+ type: "generate-commit-message";
892
+ fingerprintId: string;
893
+ stagedChanges: string;
894
+ authToken?: string | undefined;
895
+ }, {
896
+ type: "generate-commit-message";
897
+ fingerprintId: string;
898
+ stagedChanges: string;
899
+ authToken?: string | undefined;
900
+ }>]>;
901
+ }, "strip", z.ZodTypeAny, {
902
+ type: "action";
903
+ data: {
904
+ type: "prompt";
905
+ promptId: string;
906
+ fingerprintId: string;
907
+ costMode: "lite" | "normal" | "max" | "experimental" | "ask";
908
+ agentState: {
909
+ agentContext: string;
910
+ fileContext: {
911
+ currentWorkingDirectory: string;
912
+ fileTree: import("../util/file").FileTreeNode[];
913
+ fileTokenScores: Record<string, Record<string, number>>;
914
+ knowledgeFiles: Record<string, string>;
915
+ gitChanges: {
916
+ status: string;
917
+ diff: string;
918
+ diffCached: string;
919
+ lastCommitMessages: string;
920
+ };
921
+ changesSinceLastChat: Record<string, string>;
922
+ shellConfigFiles: Record<string, string>;
923
+ systemInfo: {
924
+ platform: string;
925
+ shell: string;
926
+ nodeVersion: string;
927
+ arch: string;
928
+ homedir: string;
929
+ cpus: number;
930
+ };
931
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
932
+ userKnowledgeFiles?: Record<string, string> | undefined;
933
+ fileVersions?: {
934
+ path: string;
935
+ content: string;
936
+ }[][] | undefined;
937
+ };
938
+ messageHistory: (import("ai").CoreMessage & {
939
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
940
+ })[];
941
+ consecutiveAssistantMessages?: number | undefined;
942
+ agentStepsRemaining?: number | undefined;
943
+ };
944
+ toolResults: {
945
+ name: string;
946
+ id: string;
947
+ result: string;
948
+ }[];
949
+ prompt?: string | undefined;
950
+ authToken?: string | undefined;
951
+ model?: string | undefined;
952
+ cwd?: string | undefined;
953
+ repoName?: string | undefined;
954
+ } | {
955
+ type: "manager-prompt";
956
+ promptId: string;
957
+ fingerprintId: string;
958
+ costMode: "lite" | "normal" | "max" | "experimental" | "ask";
959
+ agentState: {
960
+ agentContext: string;
961
+ fileContext: {
962
+ currentWorkingDirectory: string;
963
+ fileTree: import("../util/file").FileTreeNode[];
964
+ fileTokenScores: Record<string, Record<string, number>>;
965
+ knowledgeFiles: Record<string, string>;
966
+ gitChanges: {
967
+ status: string;
968
+ diff: string;
969
+ diffCached: string;
970
+ lastCommitMessages: string;
971
+ };
972
+ changesSinceLastChat: Record<string, string>;
973
+ shellConfigFiles: Record<string, string>;
974
+ systemInfo: {
975
+ platform: string;
976
+ shell: string;
977
+ nodeVersion: string;
978
+ arch: string;
979
+ homedir: string;
980
+ cpus: number;
981
+ };
982
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
983
+ userKnowledgeFiles?: Record<string, string> | undefined;
984
+ fileVersions?: {
985
+ path: string;
986
+ content: string;
987
+ }[][] | undefined;
988
+ };
989
+ messageHistory: (import("ai").CoreMessage & {
990
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
991
+ })[];
992
+ consecutiveAssistantMessages?: number | undefined;
993
+ agentStepsRemaining?: number | undefined;
994
+ };
995
+ toolResults: {
996
+ name: string;
997
+ id: string;
998
+ result: string;
999
+ }[];
1000
+ prompt?: string | undefined;
1001
+ authToken?: string | undefined;
1002
+ model?: string | undefined;
1003
+ cwd?: string | undefined;
1004
+ repoName?: string | undefined;
1005
+ } | {
1006
+ type: "read-files-response";
1007
+ files: Record<string, string | null>;
1008
+ requestId?: string | undefined;
1009
+ } | {
1010
+ type: "init";
1011
+ fileContext: {
1012
+ currentWorkingDirectory: string;
1013
+ fileTree: import("../util/file").FileTreeNode[];
1014
+ fileTokenScores: Record<string, Record<string, number>>;
1015
+ knowledgeFiles: Record<string, string>;
1016
+ gitChanges: {
1017
+ status: string;
1018
+ diff: string;
1019
+ diffCached: string;
1020
+ lastCommitMessages: string;
1021
+ };
1022
+ changesSinceLastChat: Record<string, string>;
1023
+ shellConfigFiles: Record<string, string>;
1024
+ systemInfo: {
1025
+ platform: string;
1026
+ shell: string;
1027
+ nodeVersion: string;
1028
+ arch: string;
1029
+ homedir: string;
1030
+ cpus: number;
1031
+ };
1032
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1033
+ userKnowledgeFiles?: Record<string, string> | undefined;
1034
+ fileVersions?: {
1035
+ path: string;
1036
+ content: string;
1037
+ }[][] | undefined;
1038
+ };
1039
+ fingerprintId: string;
1040
+ authToken?: string | undefined;
1041
+ } | {
1042
+ type: "generate-commit-message";
1043
+ fingerprintId: string;
1044
+ stagedChanges: string;
1045
+ authToken?: string | undefined;
1046
+ };
1047
+ txid: number;
1048
+ }, {
1049
+ type: "action";
1050
+ data: {
1051
+ type: "prompt";
1052
+ promptId: string;
1053
+ fingerprintId: string;
1054
+ agentState: {
1055
+ agentContext: string;
1056
+ fileContext: {
1057
+ currentWorkingDirectory: string;
1058
+ fileTree: import("../util/file").FileTreeNode[];
1059
+ fileTokenScores: Record<string, Record<string, number>>;
1060
+ knowledgeFiles: Record<string, string>;
1061
+ gitChanges: {
1062
+ status: string;
1063
+ diff: string;
1064
+ diffCached: string;
1065
+ lastCommitMessages: string;
1066
+ };
1067
+ changesSinceLastChat: Record<string, string>;
1068
+ shellConfigFiles: Record<string, string>;
1069
+ systemInfo: {
1070
+ platform: string;
1071
+ shell: string;
1072
+ nodeVersion: string;
1073
+ arch: string;
1074
+ homedir: string;
1075
+ cpus: number;
1076
+ };
1077
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1078
+ userKnowledgeFiles?: Record<string, string> | undefined;
1079
+ fileVersions?: {
1080
+ path: string;
1081
+ content: string;
1082
+ }[][] | undefined;
1083
+ };
1084
+ messageHistory: (import("ai").CoreMessage & {
1085
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1086
+ })[];
1087
+ consecutiveAssistantMessages?: number | undefined;
1088
+ agentStepsRemaining?: number | undefined;
1089
+ };
1090
+ toolResults: {
1091
+ name: string;
1092
+ id: string;
1093
+ result: string;
1094
+ }[];
1095
+ prompt?: string | undefined;
1096
+ authToken?: string | undefined;
1097
+ costMode?: "lite" | "normal" | "max" | "experimental" | "ask" | undefined;
1098
+ model?: string | undefined;
1099
+ cwd?: string | undefined;
1100
+ repoName?: string | undefined;
1101
+ } | {
1102
+ type: "manager-prompt";
1103
+ promptId: string;
1104
+ fingerprintId: string;
1105
+ agentState: {
1106
+ agentContext: string;
1107
+ fileContext: {
1108
+ currentWorkingDirectory: string;
1109
+ fileTree: import("../util/file").FileTreeNode[];
1110
+ fileTokenScores: Record<string, Record<string, number>>;
1111
+ knowledgeFiles: Record<string, string>;
1112
+ gitChanges: {
1113
+ status: string;
1114
+ diff: string;
1115
+ diffCached: string;
1116
+ lastCommitMessages: string;
1117
+ };
1118
+ changesSinceLastChat: Record<string, string>;
1119
+ shellConfigFiles: Record<string, string>;
1120
+ systemInfo: {
1121
+ platform: string;
1122
+ shell: string;
1123
+ nodeVersion: string;
1124
+ arch: string;
1125
+ homedir: string;
1126
+ cpus: number;
1127
+ };
1128
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1129
+ userKnowledgeFiles?: Record<string, string> | undefined;
1130
+ fileVersions?: {
1131
+ path: string;
1132
+ content: string;
1133
+ }[][] | undefined;
1134
+ };
1135
+ messageHistory: (import("ai").CoreMessage & {
1136
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1137
+ })[];
1138
+ consecutiveAssistantMessages?: number | undefined;
1139
+ agentStepsRemaining?: number | undefined;
1140
+ };
1141
+ toolResults: {
1142
+ name: string;
1143
+ id: string;
1144
+ result: string;
1145
+ }[];
1146
+ prompt?: string | undefined;
1147
+ authToken?: string | undefined;
1148
+ costMode?: "lite" | "normal" | "max" | "experimental" | "ask" | undefined;
1149
+ model?: string | undefined;
1150
+ cwd?: string | undefined;
1151
+ repoName?: string | undefined;
1152
+ } | {
383
1153
  type: "read-files-response";
384
1154
  files: Record<string, string | null>;
385
1155
  requestId?: string | undefined;
386
- }>, z.ZodObject<{
387
- type: z.ZodLiteral<"init">;
388
- fingerprintId: z.ZodString;
389
- authToken: z.ZodOptional<z.ZodString>;
1156
+ } | {
1157
+ type: "init";
1158
+ fileContext: {
1159
+ currentWorkingDirectory: string;
1160
+ fileTree: import("../util/file").FileTreeNode[];
1161
+ fileTokenScores: Record<string, Record<string, number>>;
1162
+ knowledgeFiles: Record<string, string>;
1163
+ gitChanges: {
1164
+ status: string;
1165
+ diff: string;
1166
+ diffCached: string;
1167
+ lastCommitMessages: string;
1168
+ };
1169
+ changesSinceLastChat: Record<string, string>;
1170
+ shellConfigFiles: Record<string, string>;
1171
+ systemInfo: {
1172
+ platform: string;
1173
+ shell: string;
1174
+ nodeVersion: string;
1175
+ arch: string;
1176
+ homedir: string;
1177
+ cpus: number;
1178
+ };
1179
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1180
+ userKnowledgeFiles?: Record<string, string> | undefined;
1181
+ fileVersions?: {
1182
+ path: string;
1183
+ content: string;
1184
+ }[][] | undefined;
1185
+ };
1186
+ fingerprintId: string;
1187
+ authToken?: string | undefined;
1188
+ } | {
1189
+ type: "generate-commit-message";
1190
+ fingerprintId: string;
1191
+ stagedChanges: string;
1192
+ authToken?: string | undefined;
1193
+ };
1194
+ txid: number;
1195
+ }>;
1196
+ };
1197
+ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1198
+ type: z.ZodLiteral<"identify">;
1199
+ txid: z.ZodNumber;
1200
+ clientSessionId: z.ZodString;
1201
+ }, "strip", z.ZodTypeAny, {
1202
+ type: "identify";
1203
+ clientSessionId: string;
1204
+ txid: number;
1205
+ }, {
1206
+ type: "identify";
1207
+ clientSessionId: string;
1208
+ txid: number;
1209
+ }>, z.ZodObject<{
1210
+ type: z.ZodLiteral<"subscribe">;
1211
+ txid: z.ZodNumber;
1212
+ topics: z.ZodArray<z.ZodString, "many">;
1213
+ }, "strip", z.ZodTypeAny, {
1214
+ type: "subscribe";
1215
+ txid: number;
1216
+ topics: string[];
1217
+ }, {
1218
+ type: "subscribe";
1219
+ txid: number;
1220
+ topics: string[];
1221
+ }>, z.ZodObject<{
1222
+ type: z.ZodLiteral<"unsubscribe">;
1223
+ txid: z.ZodNumber;
1224
+ topics: z.ZodArray<z.ZodString, "many">;
1225
+ }, "strip", z.ZodTypeAny, {
1226
+ type: "unsubscribe";
1227
+ txid: number;
1228
+ topics: string[];
1229
+ }, {
1230
+ type: "unsubscribe";
1231
+ txid: number;
1232
+ topics: string[];
1233
+ }>, z.ZodObject<{
1234
+ type: z.ZodLiteral<"ping">;
1235
+ txid: z.ZodNumber;
1236
+ }, "strip", z.ZodTypeAny, {
1237
+ type: "ping";
1238
+ txid: number;
1239
+ }, {
1240
+ type: "ping";
1241
+ txid: number;
1242
+ }>, z.ZodObject<{
1243
+ type: z.ZodLiteral<"action">;
1244
+ txid: z.ZodNumber;
1245
+ data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1246
+ type: z.ZodLiteral<"prompt">;
1247
+ promptId: z.ZodString;
1248
+ prompt: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
1249
+ fingerprintId: z.ZodString;
1250
+ authToken: z.ZodOptional<z.ZodString>;
1251
+ costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max", "experimental", "ask"]>>>;
1252
+ agentState: z.ZodObject<{
1253
+ agentContext: z.ZodString;
390
1254
  fileContext: z.ZodObject<{
391
1255
  currentWorkingDirectory: z.ZodString;
392
1256
  fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
@@ -499,8 +1363,17 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
499
1363
  content: string;
500
1364
  }[][] | undefined;
501
1365
  }>;
1366
+ messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
1367
+ timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
1368
+ }, "strip", z.ZodTypeAny, {
1369
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1370
+ }, {
1371
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1372
+ }>>, "many">;
1373
+ consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
1374
+ agentStepsRemaining: z.ZodOptional<z.ZodNumber>;
502
1375
  }, "strip", z.ZodTypeAny, {
503
- type: "init";
1376
+ agentContext: string;
504
1377
  fileContext: {
505
1378
  currentWorkingDirectory: string;
506
1379
  fileTree: import("../util/file").FileTreeNode[];
@@ -529,10 +1402,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
529
1402
  content: string;
530
1403
  }[][] | undefined;
531
1404
  };
532
- fingerprintId: string;
533
- authToken?: string | undefined;
1405
+ messageHistory: (import("ai").CoreMessage & {
1406
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1407
+ })[];
1408
+ consecutiveAssistantMessages?: number | undefined;
1409
+ agentStepsRemaining?: number | undefined;
534
1410
  }, {
535
- type: "init";
1411
+ agentContext: string;
536
1412
  fileContext: {
537
1413
  currentWorkingDirectory: string;
538
1414
  fileTree: import("../util/file").FileTreeNode[];
@@ -561,83 +1437,35 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
561
1437
  content: string;
562
1438
  }[][] | undefined;
563
1439
  };
564
- fingerprintId: string;
565
- authToken?: string | undefined;
566
- }>, z.ZodObject<{
567
- type: z.ZodLiteral<"generate-commit-message">;
568
- fingerprintId: z.ZodString;
569
- authToken: z.ZodOptional<z.ZodString>;
570
- stagedChanges: z.ZodString;
1440
+ messageHistory: (import("ai").CoreMessage & {
1441
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1442
+ })[];
1443
+ consecutiveAssistantMessages?: number | undefined;
1444
+ agentStepsRemaining?: number | undefined;
1445
+ }>;
1446
+ toolResults: z.ZodArray<z.ZodObject<{
1447
+ name: z.ZodString;
1448
+ result: z.ZodString;
1449
+ id: z.ZodString;
571
1450
  }, "strip", z.ZodTypeAny, {
572
- type: "generate-commit-message";
573
- fingerprintId: string;
574
- stagedChanges: string;
575
- authToken?: string | undefined;
1451
+ name: string;
1452
+ id: string;
1453
+ result: string;
576
1454
  }, {
577
- type: "generate-commit-message";
578
- fingerprintId: string;
579
- stagedChanges: string;
580
- authToken?: string | undefined;
581
- }>]>;
1455
+ name: string;
1456
+ id: string;
1457
+ result: string;
1458
+ }>, "many">;
1459
+ model: z.ZodOptional<z.ZodString>;
1460
+ cwd: z.ZodOptional<z.ZodString>;
1461
+ repoName: z.ZodOptional<z.ZodString>;
582
1462
  }, "strip", z.ZodTypeAny, {
583
- type: "action";
584
- data: {
585
- type: "prompt";
586
- promptId: string;
587
- fingerprintId: string;
588
- costMode: "lite" | "normal" | "max" | "experimental" | "ask";
589
- agentState: {
590
- agentContext: string;
591
- fileContext: {
592
- currentWorkingDirectory: string;
593
- fileTree: import("../util/file").FileTreeNode[];
594
- fileTokenScores: Record<string, Record<string, number>>;
595
- knowledgeFiles: Record<string, string>;
596
- gitChanges: {
597
- status: string;
598
- diff: string;
599
- diffCached: string;
600
- lastCommitMessages: string;
601
- };
602
- changesSinceLastChat: Record<string, string>;
603
- shellConfigFiles: Record<string, string>;
604
- systemInfo: {
605
- platform: string;
606
- shell: string;
607
- nodeVersion: string;
608
- arch: string;
609
- homedir: string;
610
- cpus: number;
611
- };
612
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
613
- userKnowledgeFiles?: Record<string, string> | undefined;
614
- fileVersions?: {
615
- path: string;
616
- content: string;
617
- }[][] | undefined;
618
- };
619
- messageHistory: (import("ai").CoreMessage & {
620
- timeToLive?: "agentStep" | "userPrompt" | undefined;
621
- })[];
622
- consecutiveAssistantMessages?: number | undefined;
623
- agentStepsRemaining?: number | undefined;
624
- };
625
- toolResults: {
626
- name: string;
627
- id: string;
628
- result: string;
629
- }[];
630
- prompt?: string | undefined;
631
- authToken?: string | undefined;
632
- model?: string | undefined;
633
- cwd?: string | undefined;
634
- repoName?: string | undefined;
635
- } | {
636
- type: "read-files-response";
637
- files: Record<string, string | null>;
638
- requestId?: string | undefined;
639
- } | {
640
- type: "init";
1463
+ type: "prompt";
1464
+ promptId: string;
1465
+ fingerprintId: string;
1466
+ costMode: "lite" | "normal" | "max" | "experimental" | "ask";
1467
+ agentState: {
1468
+ agentContext: string;
641
1469
  fileContext: {
642
1470
  currentWorkingDirectory: string;
643
1471
  fileTree: import("../util/file").FileTreeNode[];
@@ -658,82 +1486,36 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
658
1486
  arch: string;
659
1487
  homedir: string;
660
1488
  cpus: number;
661
- };
662
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
663
- userKnowledgeFiles?: Record<string, string> | undefined;
664
- fileVersions?: {
665
- path: string;
666
- content: string;
667
- }[][] | undefined;
668
- };
669
- fingerprintId: string;
670
- authToken?: string | undefined;
671
- } | {
672
- type: "generate-commit-message";
673
- fingerprintId: string;
674
- stagedChanges: string;
675
- authToken?: string | undefined;
676
- };
677
- txid: number;
678
- }, {
679
- type: "action";
680
- data: {
681
- type: "prompt";
682
- promptId: string;
683
- fingerprintId: string;
684
- agentState: {
685
- agentContext: string;
686
- fileContext: {
687
- currentWorkingDirectory: string;
688
- fileTree: import("../util/file").FileTreeNode[];
689
- fileTokenScores: Record<string, Record<string, number>>;
690
- knowledgeFiles: Record<string, string>;
691
- gitChanges: {
692
- status: string;
693
- diff: string;
694
- diffCached: string;
695
- lastCommitMessages: string;
696
- };
697
- changesSinceLastChat: Record<string, string>;
698
- shellConfigFiles: Record<string, string>;
699
- systemInfo: {
700
- platform: string;
701
- shell: string;
702
- nodeVersion: string;
703
- arch: string;
704
- homedir: string;
705
- cpus: number;
706
- };
707
- tokenCallers?: Record<string, Record<string, string[]>> | undefined;
708
- userKnowledgeFiles?: Record<string, string> | undefined;
709
- fileVersions?: {
710
- path: string;
711
- content: string;
712
- }[][] | undefined;
713
- };
714
- messageHistory: (import("ai").CoreMessage & {
715
- timeToLive?: "agentStep" | "userPrompt" | undefined;
716
- })[];
717
- consecutiveAssistantMessages?: number | undefined;
718
- agentStepsRemaining?: number | undefined;
1489
+ };
1490
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1491
+ userKnowledgeFiles?: Record<string, string> | undefined;
1492
+ fileVersions?: {
1493
+ path: string;
1494
+ content: string;
1495
+ }[][] | undefined;
719
1496
  };
720
- toolResults: {
721
- name: string;
722
- id: string;
723
- result: string;
724
- }[];
725
- prompt?: string | undefined;
726
- authToken?: string | undefined;
727
- costMode?: "lite" | "normal" | "max" | "experimental" | "ask" | undefined;
728
- model?: string | undefined;
729
- cwd?: string | undefined;
730
- repoName?: string | undefined;
731
- } | {
732
- type: "read-files-response";
733
- files: Record<string, string | null>;
734
- requestId?: string | undefined;
735
- } | {
736
- type: "init";
1497
+ messageHistory: (import("ai").CoreMessage & {
1498
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1499
+ })[];
1500
+ consecutiveAssistantMessages?: number | undefined;
1501
+ agentStepsRemaining?: number | undefined;
1502
+ };
1503
+ toolResults: {
1504
+ name: string;
1505
+ id: string;
1506
+ result: string;
1507
+ }[];
1508
+ prompt?: string | undefined;
1509
+ authToken?: string | undefined;
1510
+ model?: string | undefined;
1511
+ cwd?: string | undefined;
1512
+ repoName?: string | undefined;
1513
+ }, {
1514
+ type: "prompt";
1515
+ promptId: string;
1516
+ fingerprintId: string;
1517
+ agentState: {
1518
+ agentContext: string;
737
1519
  fileContext: {
738
1520
  currentWorkingDirectory: string;
739
1521
  fileTree: import("../util/file").FileTreeNode[];
@@ -762,72 +1544,27 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
762
1544
  content: string;
763
1545
  }[][] | undefined;
764
1546
  };
765
- fingerprintId: string;
766
- authToken?: string | undefined;
767
- } | {
768
- type: "generate-commit-message";
769
- fingerprintId: string;
770
- stagedChanges: string;
771
- authToken?: string | undefined;
1547
+ messageHistory: (import("ai").CoreMessage & {
1548
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1549
+ })[];
1550
+ consecutiveAssistantMessages?: number | undefined;
1551
+ agentStepsRemaining?: number | undefined;
772
1552
  };
773
- txid: number;
774
- }>;
775
- };
776
- export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
777
- type: z.ZodLiteral<"identify">;
778
- txid: z.ZodNumber;
779
- clientSessionId: z.ZodString;
780
- }, "strip", z.ZodTypeAny, {
781
- type: "identify";
782
- clientSessionId: string;
783
- txid: number;
784
- }, {
785
- type: "identify";
786
- clientSessionId: string;
787
- txid: number;
788
- }>, z.ZodObject<{
789
- type: z.ZodLiteral<"subscribe">;
790
- txid: z.ZodNumber;
791
- topics: z.ZodArray<z.ZodString, "many">;
792
- }, "strip", z.ZodTypeAny, {
793
- type: "subscribe";
794
- txid: number;
795
- topics: string[];
796
- }, {
797
- type: "subscribe";
798
- txid: number;
799
- topics: string[];
800
- }>, z.ZodObject<{
801
- type: z.ZodLiteral<"unsubscribe">;
802
- txid: z.ZodNumber;
803
- topics: z.ZodArray<z.ZodString, "many">;
804
- }, "strip", z.ZodTypeAny, {
805
- type: "unsubscribe";
806
- txid: number;
807
- topics: string[];
808
- }, {
809
- type: "unsubscribe";
810
- txid: number;
811
- topics: string[];
812
- }>, z.ZodObject<{
813
- type: z.ZodLiteral<"ping">;
814
- txid: z.ZodNumber;
815
- }, "strip", z.ZodTypeAny, {
816
- type: "ping";
817
- txid: number;
818
- }, {
819
- type: "ping";
820
- txid: number;
821
- }>, z.ZodObject<{
822
- type: z.ZodLiteral<"action">;
823
- txid: z.ZodNumber;
824
- data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
825
- type: z.ZodLiteral<"prompt">;
1553
+ toolResults: {
1554
+ name: string;
1555
+ id: string;
1556
+ result: string;
1557
+ }[];
1558
+ prompt?: string | undefined;
1559
+ authToken?: string | undefined;
1560
+ costMode?: "lite" | "normal" | "max" | "experimental" | "ask" | undefined;
1561
+ model?: string | undefined;
1562
+ cwd?: string | undefined;
1563
+ repoName?: string | undefined;
1564
+ }>, z.ZodObject<{
1565
+ type: z.ZodLiteral<"manager-prompt">;
826
1566
  promptId: z.ZodString;
827
- prompt: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
828
- fingerprintId: z.ZodString;
829
- authToken: z.ZodOptional<z.ZodString>;
830
- costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max", "experimental", "ask"]>>>;
1567
+ prompt: z.ZodOptional<z.ZodString>;
831
1568
  agentState: z.ZodObject<{
832
1569
  agentContext: z.ZodString;
833
1570
  fileContext: z.ZodObject<{
@@ -1035,11 +1772,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1035
1772
  id: string;
1036
1773
  result: string;
1037
1774
  }>, "many">;
1775
+ fingerprintId: z.ZodString;
1776
+ authToken: z.ZodOptional<z.ZodString>;
1777
+ costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max", "experimental", "ask"]>>>;
1038
1778
  model: z.ZodOptional<z.ZodString>;
1039
1779
  cwd: z.ZodOptional<z.ZodString>;
1040
1780
  repoName: z.ZodOptional<z.ZodString>;
1041
1781
  }, "strip", z.ZodTypeAny, {
1042
- type: "prompt";
1782
+ type: "manager-prompt";
1043
1783
  promptId: string;
1044
1784
  fingerprintId: string;
1045
1785
  costMode: "lite" | "normal" | "max" | "experimental" | "ask";
@@ -1090,7 +1830,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1090
1830
  cwd?: string | undefined;
1091
1831
  repoName?: string | undefined;
1092
1832
  }, {
1093
- type: "prompt";
1833
+ type: "manager-prompt";
1094
1834
  promptId: string;
1095
1835
  fingerprintId: string;
1096
1836
  agentState: {
@@ -1401,6 +2141,57 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1401
2141
  model?: string | undefined;
1402
2142
  cwd?: string | undefined;
1403
2143
  repoName?: string | undefined;
2144
+ } | {
2145
+ type: "manager-prompt";
2146
+ promptId: string;
2147
+ fingerprintId: string;
2148
+ costMode: "lite" | "normal" | "max" | "experimental" | "ask";
2149
+ agentState: {
2150
+ agentContext: string;
2151
+ fileContext: {
2152
+ currentWorkingDirectory: string;
2153
+ fileTree: import("../util/file").FileTreeNode[];
2154
+ fileTokenScores: Record<string, Record<string, number>>;
2155
+ knowledgeFiles: Record<string, string>;
2156
+ gitChanges: {
2157
+ status: string;
2158
+ diff: string;
2159
+ diffCached: string;
2160
+ lastCommitMessages: string;
2161
+ };
2162
+ changesSinceLastChat: Record<string, string>;
2163
+ shellConfigFiles: Record<string, string>;
2164
+ systemInfo: {
2165
+ platform: string;
2166
+ shell: string;
2167
+ nodeVersion: string;
2168
+ arch: string;
2169
+ homedir: string;
2170
+ cpus: number;
2171
+ };
2172
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2173
+ userKnowledgeFiles?: Record<string, string> | undefined;
2174
+ fileVersions?: {
2175
+ path: string;
2176
+ content: string;
2177
+ }[][] | undefined;
2178
+ };
2179
+ messageHistory: (import("ai").CoreMessage & {
2180
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2181
+ })[];
2182
+ consecutiveAssistantMessages?: number | undefined;
2183
+ agentStepsRemaining?: number | undefined;
2184
+ };
2185
+ toolResults: {
2186
+ name: string;
2187
+ id: string;
2188
+ result: string;
2189
+ }[];
2190
+ prompt?: string | undefined;
2191
+ authToken?: string | undefined;
2192
+ model?: string | undefined;
2193
+ cwd?: string | undefined;
2194
+ repoName?: string | undefined;
1404
2195
  } | {
1405
2196
  type: "read-files-response";
1406
2197
  files: Record<string, string | null>;
@@ -1497,6 +2288,57 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1497
2288
  model?: string | undefined;
1498
2289
  cwd?: string | undefined;
1499
2290
  repoName?: string | undefined;
2291
+ } | {
2292
+ type: "manager-prompt";
2293
+ promptId: string;
2294
+ fingerprintId: string;
2295
+ agentState: {
2296
+ agentContext: string;
2297
+ fileContext: {
2298
+ currentWorkingDirectory: string;
2299
+ fileTree: import("../util/file").FileTreeNode[];
2300
+ fileTokenScores: Record<string, Record<string, number>>;
2301
+ knowledgeFiles: Record<string, string>;
2302
+ gitChanges: {
2303
+ status: string;
2304
+ diff: string;
2305
+ diffCached: string;
2306
+ lastCommitMessages: string;
2307
+ };
2308
+ changesSinceLastChat: Record<string, string>;
2309
+ shellConfigFiles: Record<string, string>;
2310
+ systemInfo: {
2311
+ platform: string;
2312
+ shell: string;
2313
+ nodeVersion: string;
2314
+ arch: string;
2315
+ homedir: string;
2316
+ cpus: number;
2317
+ };
2318
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2319
+ userKnowledgeFiles?: Record<string, string> | undefined;
2320
+ fileVersions?: {
2321
+ path: string;
2322
+ content: string;
2323
+ }[][] | undefined;
2324
+ };
2325
+ messageHistory: (import("ai").CoreMessage & {
2326
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2327
+ })[];
2328
+ consecutiveAssistantMessages?: number | undefined;
2329
+ agentStepsRemaining?: number | undefined;
2330
+ };
2331
+ toolResults: {
2332
+ name: string;
2333
+ id: string;
2334
+ result: string;
2335
+ }[];
2336
+ prompt?: string | undefined;
2337
+ authToken?: string | undefined;
2338
+ costMode?: "lite" | "normal" | "max" | "experimental" | "ask" | undefined;
2339
+ model?: string | undefined;
2340
+ cwd?: string | undefined;
2341
+ repoName?: string | undefined;
1500
2342
  } | {
1501
2343
  type: "read-files-response";
1502
2344
  files: Record<string, string | null>;
@@ -1610,18 +2452,42 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1610
2452
  }, "strip", z.ZodTypeAny, {
1611
2453
  path: string;
1612
2454
  content: string;
1613
- }, {
2455
+ }, {
2456
+ path: string;
2457
+ content: string;
2458
+ }>, "many">;
2459
+ resetFileVersions: z.ZodBoolean;
2460
+ }, {
2461
+ usage: z.ZodOptional<z.ZodNumber>;
2462
+ remainingBalance: z.ZodOptional<z.ZodNumber>;
2463
+ balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin")[]]>, z.ZodNumber>>>;
2464
+ next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2465
+ autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
2466
+ }>, "strip", z.ZodTypeAny, {
2467
+ type: "response-complete";
2468
+ userInputId: string;
2469
+ response: string;
2470
+ changes: {
2471
+ path: string;
2472
+ type: "file" | "patch";
2473
+ content: string;
2474
+ }[];
2475
+ changesAlreadyApplied: {
2476
+ path: string;
2477
+ type: "file" | "patch";
2478
+ content: string;
2479
+ }[];
2480
+ addedFileVersions: {
1614
2481
  path: string;
1615
2482
  content: string;
1616
- }>, "many">;
1617
- resetFileVersions: z.ZodBoolean;
2483
+ }[];
2484
+ resetFileVersions: boolean;
2485
+ usage?: number | undefined;
2486
+ remainingBalance?: number | undefined;
2487
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
2488
+ next_quota_reset?: Date | null | undefined;
2489
+ autoTopupAdded?: number | undefined;
1618
2490
  }, {
1619
- usage: z.ZodOptional<z.ZodNumber>;
1620
- remainingBalance: z.ZodOptional<z.ZodNumber>;
1621
- balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin")[]]>, z.ZodNumber>>>;
1622
- next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1623
- autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
1624
- }>, "strip", z.ZodTypeAny, {
1625
2491
  type: "response-complete";
1626
2492
  userInputId: string;
1627
2493
  response: string;
@@ -1635,42 +2501,339 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1635
2501
  type: "file" | "patch";
1636
2502
  content: string;
1637
2503
  }[];
1638
- addedFileVersions: {
1639
- path: string;
1640
- content: string;
2504
+ addedFileVersions: {
2505
+ path: string;
2506
+ content: string;
2507
+ }[];
2508
+ resetFileVersions: boolean;
2509
+ usage?: number | undefined;
2510
+ remainingBalance?: number | undefined;
2511
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
2512
+ next_quota_reset?: Date | null | undefined;
2513
+ autoTopupAdded?: number | undefined;
2514
+ }>, z.ZodObject<{
2515
+ type: z.ZodLiteral<"prompt-response">;
2516
+ promptId: z.ZodString;
2517
+ agentState: z.ZodObject<{
2518
+ agentContext: z.ZodString;
2519
+ fileContext: z.ZodObject<{
2520
+ currentWorkingDirectory: z.ZodString;
2521
+ fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
2522
+ fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
2523
+ tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
2524
+ knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
2525
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2526
+ gitChanges: z.ZodObject<{
2527
+ status: z.ZodString;
2528
+ diff: z.ZodString;
2529
+ diffCached: z.ZodString;
2530
+ lastCommitMessages: z.ZodString;
2531
+ }, "strip", z.ZodTypeAny, {
2532
+ status: string;
2533
+ diff: string;
2534
+ diffCached: string;
2535
+ lastCommitMessages: string;
2536
+ }, {
2537
+ status: string;
2538
+ diff: string;
2539
+ diffCached: string;
2540
+ lastCommitMessages: string;
2541
+ }>;
2542
+ changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
2543
+ shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
2544
+ systemInfo: z.ZodObject<{
2545
+ platform: z.ZodString;
2546
+ shell: z.ZodString;
2547
+ nodeVersion: z.ZodString;
2548
+ arch: z.ZodString;
2549
+ homedir: z.ZodString;
2550
+ cpus: z.ZodNumber;
2551
+ }, "strip", z.ZodTypeAny, {
2552
+ platform: string;
2553
+ shell: string;
2554
+ nodeVersion: string;
2555
+ arch: string;
2556
+ homedir: string;
2557
+ cpus: number;
2558
+ }, {
2559
+ platform: string;
2560
+ shell: string;
2561
+ nodeVersion: string;
2562
+ arch: string;
2563
+ homedir: string;
2564
+ cpus: number;
2565
+ }>;
2566
+ fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
2567
+ path: z.ZodString;
2568
+ content: z.ZodString;
2569
+ }, "strip", z.ZodTypeAny, {
2570
+ path: string;
2571
+ content: string;
2572
+ }, {
2573
+ path: string;
2574
+ content: string;
2575
+ }>, "many">, "many">>;
2576
+ }, "strip", z.ZodTypeAny, {
2577
+ currentWorkingDirectory: string;
2578
+ fileTree: import("../util/file").FileTreeNode[];
2579
+ fileTokenScores: Record<string, Record<string, number>>;
2580
+ knowledgeFiles: Record<string, string>;
2581
+ gitChanges: {
2582
+ status: string;
2583
+ diff: string;
2584
+ diffCached: string;
2585
+ lastCommitMessages: string;
2586
+ };
2587
+ changesSinceLastChat: Record<string, string>;
2588
+ shellConfigFiles: Record<string, string>;
2589
+ systemInfo: {
2590
+ platform: string;
2591
+ shell: string;
2592
+ nodeVersion: string;
2593
+ arch: string;
2594
+ homedir: string;
2595
+ cpus: number;
2596
+ };
2597
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2598
+ userKnowledgeFiles?: Record<string, string> | undefined;
2599
+ fileVersions?: {
2600
+ path: string;
2601
+ content: string;
2602
+ }[][] | undefined;
2603
+ }, {
2604
+ currentWorkingDirectory: string;
2605
+ fileTree: import("../util/file").FileTreeNode[];
2606
+ fileTokenScores: Record<string, Record<string, number>>;
2607
+ knowledgeFiles: Record<string, string>;
2608
+ gitChanges: {
2609
+ status: string;
2610
+ diff: string;
2611
+ diffCached: string;
2612
+ lastCommitMessages: string;
2613
+ };
2614
+ changesSinceLastChat: Record<string, string>;
2615
+ shellConfigFiles: Record<string, string>;
2616
+ systemInfo: {
2617
+ platform: string;
2618
+ shell: string;
2619
+ nodeVersion: string;
2620
+ arch: string;
2621
+ homedir: string;
2622
+ cpus: number;
2623
+ };
2624
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2625
+ userKnowledgeFiles?: Record<string, string> | undefined;
2626
+ fileVersions?: {
2627
+ path: string;
2628
+ content: string;
2629
+ }[][] | undefined;
2630
+ }>;
2631
+ messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
2632
+ timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
2633
+ }, "strip", z.ZodTypeAny, {
2634
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2635
+ }, {
2636
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2637
+ }>>, "many">;
2638
+ consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
2639
+ agentStepsRemaining: z.ZodOptional<z.ZodNumber>;
2640
+ }, "strip", z.ZodTypeAny, {
2641
+ agentContext: string;
2642
+ fileContext: {
2643
+ currentWorkingDirectory: string;
2644
+ fileTree: import("../util/file").FileTreeNode[];
2645
+ fileTokenScores: Record<string, Record<string, number>>;
2646
+ knowledgeFiles: Record<string, string>;
2647
+ gitChanges: {
2648
+ status: string;
2649
+ diff: string;
2650
+ diffCached: string;
2651
+ lastCommitMessages: string;
2652
+ };
2653
+ changesSinceLastChat: Record<string, string>;
2654
+ shellConfigFiles: Record<string, string>;
2655
+ systemInfo: {
2656
+ platform: string;
2657
+ shell: string;
2658
+ nodeVersion: string;
2659
+ arch: string;
2660
+ homedir: string;
2661
+ cpus: number;
2662
+ };
2663
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2664
+ userKnowledgeFiles?: Record<string, string> | undefined;
2665
+ fileVersions?: {
2666
+ path: string;
2667
+ content: string;
2668
+ }[][] | undefined;
2669
+ };
2670
+ messageHistory: (import("ai").CoreMessage & {
2671
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2672
+ })[];
2673
+ consecutiveAssistantMessages?: number | undefined;
2674
+ agentStepsRemaining?: number | undefined;
2675
+ }, {
2676
+ agentContext: string;
2677
+ fileContext: {
2678
+ currentWorkingDirectory: string;
2679
+ fileTree: import("../util/file").FileTreeNode[];
2680
+ fileTokenScores: Record<string, Record<string, number>>;
2681
+ knowledgeFiles: Record<string, string>;
2682
+ gitChanges: {
2683
+ status: string;
2684
+ diff: string;
2685
+ diffCached: string;
2686
+ lastCommitMessages: string;
2687
+ };
2688
+ changesSinceLastChat: Record<string, string>;
2689
+ shellConfigFiles: Record<string, string>;
2690
+ systemInfo: {
2691
+ platform: string;
2692
+ shell: string;
2693
+ nodeVersion: string;
2694
+ arch: string;
2695
+ homedir: string;
2696
+ cpus: number;
2697
+ };
2698
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2699
+ userKnowledgeFiles?: Record<string, string> | undefined;
2700
+ fileVersions?: {
2701
+ path: string;
2702
+ content: string;
2703
+ }[][] | undefined;
2704
+ };
2705
+ messageHistory: (import("ai").CoreMessage & {
2706
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2707
+ })[];
2708
+ consecutiveAssistantMessages?: number | undefined;
2709
+ agentStepsRemaining?: number | undefined;
2710
+ }>;
2711
+ toolCalls: z.ZodArray<z.ZodObject<{
2712
+ name: z.ZodString;
2713
+ parameters: z.ZodRecord<z.ZodString, z.ZodString>;
2714
+ id: z.ZodString;
2715
+ }, "strip", z.ZodTypeAny, {
2716
+ name: string;
2717
+ id: string;
2718
+ parameters: Record<string, string>;
2719
+ }, {
2720
+ name: string;
2721
+ id: string;
2722
+ parameters: Record<string, string>;
2723
+ }>, "many">;
2724
+ toolResults: z.ZodArray<z.ZodObject<{
2725
+ name: z.ZodString;
2726
+ result: z.ZodString;
2727
+ id: z.ZodString;
2728
+ }, "strip", z.ZodTypeAny, {
2729
+ name: string;
2730
+ id: string;
2731
+ result: string;
2732
+ }, {
2733
+ name: string;
2734
+ id: string;
2735
+ result: string;
2736
+ }>, "many">;
2737
+ }, "strip", z.ZodTypeAny, {
2738
+ type: "prompt-response";
2739
+ promptId: string;
2740
+ agentState: {
2741
+ agentContext: string;
2742
+ fileContext: {
2743
+ currentWorkingDirectory: string;
2744
+ fileTree: import("../util/file").FileTreeNode[];
2745
+ fileTokenScores: Record<string, Record<string, number>>;
2746
+ knowledgeFiles: Record<string, string>;
2747
+ gitChanges: {
2748
+ status: string;
2749
+ diff: string;
2750
+ diffCached: string;
2751
+ lastCommitMessages: string;
2752
+ };
2753
+ changesSinceLastChat: Record<string, string>;
2754
+ shellConfigFiles: Record<string, string>;
2755
+ systemInfo: {
2756
+ platform: string;
2757
+ shell: string;
2758
+ nodeVersion: string;
2759
+ arch: string;
2760
+ homedir: string;
2761
+ cpus: number;
2762
+ };
2763
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2764
+ userKnowledgeFiles?: Record<string, string> | undefined;
2765
+ fileVersions?: {
2766
+ path: string;
2767
+ content: string;
2768
+ }[][] | undefined;
2769
+ };
2770
+ messageHistory: (import("ai").CoreMessage & {
2771
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2772
+ })[];
2773
+ consecutiveAssistantMessages?: number | undefined;
2774
+ agentStepsRemaining?: number | undefined;
2775
+ };
2776
+ toolResults: {
2777
+ name: string;
2778
+ id: string;
2779
+ result: string;
2780
+ }[];
2781
+ toolCalls: {
2782
+ name: string;
2783
+ id: string;
2784
+ parameters: Record<string, string>;
1641
2785
  }[];
1642
- resetFileVersions: boolean;
1643
- usage?: number | undefined;
1644
- remainingBalance?: number | undefined;
1645
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
1646
- next_quota_reset?: Date | null | undefined;
1647
- autoTopupAdded?: number | undefined;
1648
2786
  }, {
1649
- type: "response-complete";
1650
- userInputId: string;
1651
- response: string;
1652
- changes: {
1653
- path: string;
1654
- type: "file" | "patch";
1655
- content: string;
1656
- }[];
1657
- changesAlreadyApplied: {
1658
- path: string;
1659
- type: "file" | "patch";
1660
- content: string;
2787
+ type: "prompt-response";
2788
+ promptId: string;
2789
+ agentState: {
2790
+ agentContext: string;
2791
+ fileContext: {
2792
+ currentWorkingDirectory: string;
2793
+ fileTree: import("../util/file").FileTreeNode[];
2794
+ fileTokenScores: Record<string, Record<string, number>>;
2795
+ knowledgeFiles: Record<string, string>;
2796
+ gitChanges: {
2797
+ status: string;
2798
+ diff: string;
2799
+ diffCached: string;
2800
+ lastCommitMessages: string;
2801
+ };
2802
+ changesSinceLastChat: Record<string, string>;
2803
+ shellConfigFiles: Record<string, string>;
2804
+ systemInfo: {
2805
+ platform: string;
2806
+ shell: string;
2807
+ nodeVersion: string;
2808
+ arch: string;
2809
+ homedir: string;
2810
+ cpus: number;
2811
+ };
2812
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2813
+ userKnowledgeFiles?: Record<string, string> | undefined;
2814
+ fileVersions?: {
2815
+ path: string;
2816
+ content: string;
2817
+ }[][] | undefined;
2818
+ };
2819
+ messageHistory: (import("ai").CoreMessage & {
2820
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2821
+ })[];
2822
+ consecutiveAssistantMessages?: number | undefined;
2823
+ agentStepsRemaining?: number | undefined;
2824
+ };
2825
+ toolResults: {
2826
+ name: string;
2827
+ id: string;
2828
+ result: string;
1661
2829
  }[];
1662
- addedFileVersions: {
1663
- path: string;
1664
- content: string;
2830
+ toolCalls: {
2831
+ name: string;
2832
+ id: string;
2833
+ parameters: Record<string, string>;
1665
2834
  }[];
1666
- resetFileVersions: boolean;
1667
- usage?: number | undefined;
1668
- remainingBalance?: number | undefined;
1669
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
1670
- next_quota_reset?: Date | null | undefined;
1671
- autoTopupAdded?: number | undefined;
1672
2835
  }>, z.ZodObject<{
1673
- type: z.ZodLiteral<"prompt-response">;
2836
+ type: z.ZodLiteral<"manager-prompt-response">;
1674
2837
  promptId: z.ZodString;
1675
2838
  agentState: z.ZodObject<{
1676
2839
  agentContext: z.ZodString;
@@ -1893,7 +3056,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1893
3056
  result: string;
1894
3057
  }>, "many">;
1895
3058
  }, "strip", z.ZodTypeAny, {
1896
- type: "prompt-response";
3059
+ type: "manager-prompt-response";
1897
3060
  promptId: string;
1898
3061
  agentState: {
1899
3062
  agentContext: string;
@@ -1942,7 +3105,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1942
3105
  parameters: Record<string, string>;
1943
3106
  }[];
1944
3107
  }, {
1945
- type: "prompt-response";
3108
+ type: "manager-prompt-response";
1946
3109
  promptId: string;
1947
3110
  agentState: {
1948
3111
  agentContext: string;
@@ -2308,6 +3471,55 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2308
3471
  id: string;
2309
3472
  parameters: Record<string, string>;
2310
3473
  }[];
3474
+ } | {
3475
+ type: "manager-prompt-response";
3476
+ promptId: string;
3477
+ agentState: {
3478
+ agentContext: string;
3479
+ fileContext: {
3480
+ currentWorkingDirectory: string;
3481
+ fileTree: import("../util/file").FileTreeNode[];
3482
+ fileTokenScores: Record<string, Record<string, number>>;
3483
+ knowledgeFiles: Record<string, string>;
3484
+ gitChanges: {
3485
+ status: string;
3486
+ diff: string;
3487
+ diffCached: string;
3488
+ lastCommitMessages: string;
3489
+ };
3490
+ changesSinceLastChat: Record<string, string>;
3491
+ shellConfigFiles: Record<string, string>;
3492
+ systemInfo: {
3493
+ platform: string;
3494
+ shell: string;
3495
+ nodeVersion: string;
3496
+ arch: string;
3497
+ homedir: string;
3498
+ cpus: number;
3499
+ };
3500
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
3501
+ userKnowledgeFiles?: Record<string, string> | undefined;
3502
+ fileVersions?: {
3503
+ path: string;
3504
+ content: string;
3505
+ }[][] | undefined;
3506
+ };
3507
+ messageHistory: (import("ai").CoreMessage & {
3508
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
3509
+ })[];
3510
+ consecutiveAssistantMessages?: number | undefined;
3511
+ agentStepsRemaining?: number | undefined;
3512
+ };
3513
+ toolResults: {
3514
+ name: string;
3515
+ id: string;
3516
+ result: string;
3517
+ }[];
3518
+ toolCalls: {
3519
+ name: string;
3520
+ id: string;
3521
+ parameters: Record<string, string>;
3522
+ }[];
2311
3523
  } | {
2312
3524
  type: "response-chunk";
2313
3525
  userInputId: string;
@@ -2452,6 +3664,55 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2452
3664
  id: string;
2453
3665
  parameters: Record<string, string>;
2454
3666
  }[];
3667
+ } | {
3668
+ type: "manager-prompt-response";
3669
+ promptId: string;
3670
+ agentState: {
3671
+ agentContext: string;
3672
+ fileContext: {
3673
+ currentWorkingDirectory: string;
3674
+ fileTree: import("../util/file").FileTreeNode[];
3675
+ fileTokenScores: Record<string, Record<string, number>>;
3676
+ knowledgeFiles: Record<string, string>;
3677
+ gitChanges: {
3678
+ status: string;
3679
+ diff: string;
3680
+ diffCached: string;
3681
+ lastCommitMessages: string;
3682
+ };
3683
+ changesSinceLastChat: Record<string, string>;
3684
+ shellConfigFiles: Record<string, string>;
3685
+ systemInfo: {
3686
+ platform: string;
3687
+ shell: string;
3688
+ nodeVersion: string;
3689
+ arch: string;
3690
+ homedir: string;
3691
+ cpus: number;
3692
+ };
3693
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
3694
+ userKnowledgeFiles?: Record<string, string> | undefined;
3695
+ fileVersions?: {
3696
+ path: string;
3697
+ content: string;
3698
+ }[][] | undefined;
3699
+ };
3700
+ messageHistory: (import("ai").CoreMessage & {
3701
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
3702
+ })[];
3703
+ consecutiveAssistantMessages?: number | undefined;
3704
+ agentStepsRemaining?: number | undefined;
3705
+ };
3706
+ toolResults: {
3707
+ name: string;
3708
+ id: string;
3709
+ result: string;
3710
+ }[];
3711
+ toolCalls: {
3712
+ name: string;
3713
+ id: string;
3714
+ parameters: Record<string, string>;
3715
+ }[];
2455
3716
  } | {
2456
3717
  type: "response-chunk";
2457
3718
  userInputId: string;
@@ -2546,91 +3807,412 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2546
3807
  path: string;
2547
3808
  type: "file" | "patch";
2548
3809
  content: string;
2549
- }, {
3810
+ }, {
3811
+ path: string;
3812
+ type: "file" | "patch";
3813
+ content: string;
3814
+ }>, "many">;
3815
+ changesAlreadyApplied: z.ZodArray<z.ZodObject<{
3816
+ type: z.ZodEnum<["patch", "file"]>;
3817
+ path: z.ZodString;
3818
+ content: z.ZodString;
3819
+ }, "strip", z.ZodTypeAny, {
3820
+ path: string;
3821
+ type: "file" | "patch";
3822
+ content: string;
3823
+ }, {
3824
+ path: string;
3825
+ type: "file" | "patch";
3826
+ content: string;
3827
+ }>, "many">;
3828
+ addedFileVersions: z.ZodArray<z.ZodObject<{
3829
+ path: z.ZodString;
3830
+ content: z.ZodString;
3831
+ }, "strip", z.ZodTypeAny, {
3832
+ path: string;
3833
+ content: string;
3834
+ }, {
3835
+ path: string;
3836
+ content: string;
3837
+ }>, "many">;
3838
+ resetFileVersions: z.ZodBoolean;
3839
+ }, {
3840
+ usage: z.ZodOptional<z.ZodNumber>;
3841
+ remainingBalance: z.ZodOptional<z.ZodNumber>;
3842
+ balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin")[]]>, z.ZodNumber>>>;
3843
+ next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
3844
+ autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
3845
+ }>, "strip", z.ZodTypeAny, {
3846
+ type: "response-complete";
3847
+ userInputId: string;
3848
+ response: string;
3849
+ changes: {
3850
+ path: string;
3851
+ type: "file" | "patch";
3852
+ content: string;
3853
+ }[];
3854
+ changesAlreadyApplied: {
2550
3855
  path: string;
2551
3856
  type: "file" | "patch";
2552
3857
  content: string;
2553
- }>, "many">;
2554
- changesAlreadyApplied: z.ZodArray<z.ZodObject<{
2555
- type: z.ZodEnum<["patch", "file"]>;
2556
- path: z.ZodString;
2557
- content: z.ZodString;
2558
- }, "strip", z.ZodTypeAny, {
3858
+ }[];
3859
+ addedFileVersions: {
3860
+ path: string;
3861
+ content: string;
3862
+ }[];
3863
+ resetFileVersions: boolean;
3864
+ usage?: number | undefined;
3865
+ remainingBalance?: number | undefined;
3866
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3867
+ next_quota_reset?: Date | null | undefined;
3868
+ autoTopupAdded?: number | undefined;
3869
+ }, {
3870
+ type: "response-complete";
3871
+ userInputId: string;
3872
+ response: string;
3873
+ changes: {
2559
3874
  path: string;
2560
3875
  type: "file" | "patch";
2561
3876
  content: string;
2562
- }, {
3877
+ }[];
3878
+ changesAlreadyApplied: {
2563
3879
  path: string;
2564
3880
  type: "file" | "patch";
2565
3881
  content: string;
3882
+ }[];
3883
+ addedFileVersions: {
3884
+ path: string;
3885
+ content: string;
3886
+ }[];
3887
+ resetFileVersions: boolean;
3888
+ usage?: number | undefined;
3889
+ remainingBalance?: number | undefined;
3890
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3891
+ next_quota_reset?: Date | null | undefined;
3892
+ autoTopupAdded?: number | undefined;
3893
+ }>, z.ZodObject<{
3894
+ type: z.ZodLiteral<"prompt-response">;
3895
+ promptId: z.ZodString;
3896
+ agentState: z.ZodObject<{
3897
+ agentContext: z.ZodString;
3898
+ fileContext: z.ZodObject<{
3899
+ currentWorkingDirectory: z.ZodString;
3900
+ fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
3901
+ fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
3902
+ tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
3903
+ knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
3904
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3905
+ gitChanges: z.ZodObject<{
3906
+ status: z.ZodString;
3907
+ diff: z.ZodString;
3908
+ diffCached: z.ZodString;
3909
+ lastCommitMessages: z.ZodString;
3910
+ }, "strip", z.ZodTypeAny, {
3911
+ status: string;
3912
+ diff: string;
3913
+ diffCached: string;
3914
+ lastCommitMessages: string;
3915
+ }, {
3916
+ status: string;
3917
+ diff: string;
3918
+ diffCached: string;
3919
+ lastCommitMessages: string;
3920
+ }>;
3921
+ changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
3922
+ shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
3923
+ systemInfo: z.ZodObject<{
3924
+ platform: z.ZodString;
3925
+ shell: z.ZodString;
3926
+ nodeVersion: z.ZodString;
3927
+ arch: z.ZodString;
3928
+ homedir: z.ZodString;
3929
+ cpus: z.ZodNumber;
3930
+ }, "strip", z.ZodTypeAny, {
3931
+ platform: string;
3932
+ shell: string;
3933
+ nodeVersion: string;
3934
+ arch: string;
3935
+ homedir: string;
3936
+ cpus: number;
3937
+ }, {
3938
+ platform: string;
3939
+ shell: string;
3940
+ nodeVersion: string;
3941
+ arch: string;
3942
+ homedir: string;
3943
+ cpus: number;
3944
+ }>;
3945
+ fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
3946
+ path: z.ZodString;
3947
+ content: z.ZodString;
3948
+ }, "strip", z.ZodTypeAny, {
3949
+ path: string;
3950
+ content: string;
3951
+ }, {
3952
+ path: string;
3953
+ content: string;
3954
+ }>, "many">, "many">>;
3955
+ }, "strip", z.ZodTypeAny, {
3956
+ currentWorkingDirectory: string;
3957
+ fileTree: import("../util/file").FileTreeNode[];
3958
+ fileTokenScores: Record<string, Record<string, number>>;
3959
+ knowledgeFiles: Record<string, string>;
3960
+ gitChanges: {
3961
+ status: string;
3962
+ diff: string;
3963
+ diffCached: string;
3964
+ lastCommitMessages: string;
3965
+ };
3966
+ changesSinceLastChat: Record<string, string>;
3967
+ shellConfigFiles: Record<string, string>;
3968
+ systemInfo: {
3969
+ platform: string;
3970
+ shell: string;
3971
+ nodeVersion: string;
3972
+ arch: string;
3973
+ homedir: string;
3974
+ cpus: number;
3975
+ };
3976
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
3977
+ userKnowledgeFiles?: Record<string, string> | undefined;
3978
+ fileVersions?: {
3979
+ path: string;
3980
+ content: string;
3981
+ }[][] | undefined;
3982
+ }, {
3983
+ currentWorkingDirectory: string;
3984
+ fileTree: import("../util/file").FileTreeNode[];
3985
+ fileTokenScores: Record<string, Record<string, number>>;
3986
+ knowledgeFiles: Record<string, string>;
3987
+ gitChanges: {
3988
+ status: string;
3989
+ diff: string;
3990
+ diffCached: string;
3991
+ lastCommitMessages: string;
3992
+ };
3993
+ changesSinceLastChat: Record<string, string>;
3994
+ shellConfigFiles: Record<string, string>;
3995
+ systemInfo: {
3996
+ platform: string;
3997
+ shell: string;
3998
+ nodeVersion: string;
3999
+ arch: string;
4000
+ homedir: string;
4001
+ cpus: number;
4002
+ };
4003
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
4004
+ userKnowledgeFiles?: Record<string, string> | undefined;
4005
+ fileVersions?: {
4006
+ path: string;
4007
+ content: string;
4008
+ }[][] | undefined;
4009
+ }>;
4010
+ messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
4011
+ timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
4012
+ }, "strip", z.ZodTypeAny, {
4013
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
4014
+ }, {
4015
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
4016
+ }>>, "many">;
4017
+ consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
4018
+ agentStepsRemaining: z.ZodOptional<z.ZodNumber>;
4019
+ }, "strip", z.ZodTypeAny, {
4020
+ agentContext: string;
4021
+ fileContext: {
4022
+ currentWorkingDirectory: string;
4023
+ fileTree: import("../util/file").FileTreeNode[];
4024
+ fileTokenScores: Record<string, Record<string, number>>;
4025
+ knowledgeFiles: Record<string, string>;
4026
+ gitChanges: {
4027
+ status: string;
4028
+ diff: string;
4029
+ diffCached: string;
4030
+ lastCommitMessages: string;
4031
+ };
4032
+ changesSinceLastChat: Record<string, string>;
4033
+ shellConfigFiles: Record<string, string>;
4034
+ systemInfo: {
4035
+ platform: string;
4036
+ shell: string;
4037
+ nodeVersion: string;
4038
+ arch: string;
4039
+ homedir: string;
4040
+ cpus: number;
4041
+ };
4042
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
4043
+ userKnowledgeFiles?: Record<string, string> | undefined;
4044
+ fileVersions?: {
4045
+ path: string;
4046
+ content: string;
4047
+ }[][] | undefined;
4048
+ };
4049
+ messageHistory: (import("ai").CoreMessage & {
4050
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
4051
+ })[];
4052
+ consecutiveAssistantMessages?: number | undefined;
4053
+ agentStepsRemaining?: number | undefined;
4054
+ }, {
4055
+ agentContext: string;
4056
+ fileContext: {
4057
+ currentWorkingDirectory: string;
4058
+ fileTree: import("../util/file").FileTreeNode[];
4059
+ fileTokenScores: Record<string, Record<string, number>>;
4060
+ knowledgeFiles: Record<string, string>;
4061
+ gitChanges: {
4062
+ status: string;
4063
+ diff: string;
4064
+ diffCached: string;
4065
+ lastCommitMessages: string;
4066
+ };
4067
+ changesSinceLastChat: Record<string, string>;
4068
+ shellConfigFiles: Record<string, string>;
4069
+ systemInfo: {
4070
+ platform: string;
4071
+ shell: string;
4072
+ nodeVersion: string;
4073
+ arch: string;
4074
+ homedir: string;
4075
+ cpus: number;
4076
+ };
4077
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
4078
+ userKnowledgeFiles?: Record<string, string> | undefined;
4079
+ fileVersions?: {
4080
+ path: string;
4081
+ content: string;
4082
+ }[][] | undefined;
4083
+ };
4084
+ messageHistory: (import("ai").CoreMessage & {
4085
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
4086
+ })[];
4087
+ consecutiveAssistantMessages?: number | undefined;
4088
+ agentStepsRemaining?: number | undefined;
4089
+ }>;
4090
+ toolCalls: z.ZodArray<z.ZodObject<{
4091
+ name: z.ZodString;
4092
+ parameters: z.ZodRecord<z.ZodString, z.ZodString>;
4093
+ id: z.ZodString;
4094
+ }, "strip", z.ZodTypeAny, {
4095
+ name: string;
4096
+ id: string;
4097
+ parameters: Record<string, string>;
4098
+ }, {
4099
+ name: string;
4100
+ id: string;
4101
+ parameters: Record<string, string>;
2566
4102
  }>, "many">;
2567
- addedFileVersions: z.ZodArray<z.ZodObject<{
2568
- path: z.ZodString;
2569
- content: z.ZodString;
4103
+ toolResults: z.ZodArray<z.ZodObject<{
4104
+ name: z.ZodString;
4105
+ result: z.ZodString;
4106
+ id: z.ZodString;
2570
4107
  }, "strip", z.ZodTypeAny, {
2571
- path: string;
2572
- content: string;
4108
+ name: string;
4109
+ id: string;
4110
+ result: string;
2573
4111
  }, {
2574
- path: string;
2575
- content: string;
4112
+ name: string;
4113
+ id: string;
4114
+ result: string;
2576
4115
  }>, "many">;
2577
- resetFileVersions: z.ZodBoolean;
2578
- }, {
2579
- usage: z.ZodOptional<z.ZodNumber>;
2580
- remainingBalance: z.ZodOptional<z.ZodNumber>;
2581
- balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin")[]]>, z.ZodNumber>>>;
2582
- next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2583
- autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
2584
- }>, "strip", z.ZodTypeAny, {
2585
- type: "response-complete";
2586
- userInputId: string;
2587
- response: string;
2588
- changes: {
2589
- path: string;
2590
- type: "file" | "patch";
2591
- content: string;
2592
- }[];
2593
- changesAlreadyApplied: {
2594
- path: string;
2595
- type: "file" | "patch";
2596
- content: string;
4116
+ }, "strip", z.ZodTypeAny, {
4117
+ type: "prompt-response";
4118
+ promptId: string;
4119
+ agentState: {
4120
+ agentContext: string;
4121
+ fileContext: {
4122
+ currentWorkingDirectory: string;
4123
+ fileTree: import("../util/file").FileTreeNode[];
4124
+ fileTokenScores: Record<string, Record<string, number>>;
4125
+ knowledgeFiles: Record<string, string>;
4126
+ gitChanges: {
4127
+ status: string;
4128
+ diff: string;
4129
+ diffCached: string;
4130
+ lastCommitMessages: string;
4131
+ };
4132
+ changesSinceLastChat: Record<string, string>;
4133
+ shellConfigFiles: Record<string, string>;
4134
+ systemInfo: {
4135
+ platform: string;
4136
+ shell: string;
4137
+ nodeVersion: string;
4138
+ arch: string;
4139
+ homedir: string;
4140
+ cpus: number;
4141
+ };
4142
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
4143
+ userKnowledgeFiles?: Record<string, string> | undefined;
4144
+ fileVersions?: {
4145
+ path: string;
4146
+ content: string;
4147
+ }[][] | undefined;
4148
+ };
4149
+ messageHistory: (import("ai").CoreMessage & {
4150
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
4151
+ })[];
4152
+ consecutiveAssistantMessages?: number | undefined;
4153
+ agentStepsRemaining?: number | undefined;
4154
+ };
4155
+ toolResults: {
4156
+ name: string;
4157
+ id: string;
4158
+ result: string;
2597
4159
  }[];
2598
- addedFileVersions: {
2599
- path: string;
2600
- content: string;
4160
+ toolCalls: {
4161
+ name: string;
4162
+ id: string;
4163
+ parameters: Record<string, string>;
2601
4164
  }[];
2602
- resetFileVersions: boolean;
2603
- usage?: number | undefined;
2604
- remainingBalance?: number | undefined;
2605
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
2606
- next_quota_reset?: Date | null | undefined;
2607
- autoTopupAdded?: number | undefined;
2608
4165
  }, {
2609
- type: "response-complete";
2610
- userInputId: string;
2611
- response: string;
2612
- changes: {
2613
- path: string;
2614
- type: "file" | "patch";
2615
- content: string;
2616
- }[];
2617
- changesAlreadyApplied: {
2618
- path: string;
2619
- type: "file" | "patch";
2620
- content: string;
4166
+ type: "prompt-response";
4167
+ promptId: string;
4168
+ agentState: {
4169
+ agentContext: string;
4170
+ fileContext: {
4171
+ currentWorkingDirectory: string;
4172
+ fileTree: import("../util/file").FileTreeNode[];
4173
+ fileTokenScores: Record<string, Record<string, number>>;
4174
+ knowledgeFiles: Record<string, string>;
4175
+ gitChanges: {
4176
+ status: string;
4177
+ diff: string;
4178
+ diffCached: string;
4179
+ lastCommitMessages: string;
4180
+ };
4181
+ changesSinceLastChat: Record<string, string>;
4182
+ shellConfigFiles: Record<string, string>;
4183
+ systemInfo: {
4184
+ platform: string;
4185
+ shell: string;
4186
+ nodeVersion: string;
4187
+ arch: string;
4188
+ homedir: string;
4189
+ cpus: number;
4190
+ };
4191
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
4192
+ userKnowledgeFiles?: Record<string, string> | undefined;
4193
+ fileVersions?: {
4194
+ path: string;
4195
+ content: string;
4196
+ }[][] | undefined;
4197
+ };
4198
+ messageHistory: (import("ai").CoreMessage & {
4199
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
4200
+ })[];
4201
+ consecutiveAssistantMessages?: number | undefined;
4202
+ agentStepsRemaining?: number | undefined;
4203
+ };
4204
+ toolResults: {
4205
+ name: string;
4206
+ id: string;
4207
+ result: string;
2621
4208
  }[];
2622
- addedFileVersions: {
2623
- path: string;
2624
- content: string;
4209
+ toolCalls: {
4210
+ name: string;
4211
+ id: string;
4212
+ parameters: Record<string, string>;
2625
4213
  }[];
2626
- resetFileVersions: boolean;
2627
- usage?: number | undefined;
2628
- remainingBalance?: number | undefined;
2629
- balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
2630
- next_quota_reset?: Date | null | undefined;
2631
- autoTopupAdded?: number | undefined;
2632
4214
  }>, z.ZodObject<{
2633
- type: z.ZodLiteral<"prompt-response">;
4215
+ type: z.ZodLiteral<"manager-prompt-response">;
2634
4216
  promptId: z.ZodString;
2635
4217
  agentState: z.ZodObject<{
2636
4218
  agentContext: z.ZodString;
@@ -2853,7 +4435,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2853
4435
  result: string;
2854
4436
  }>, "many">;
2855
4437
  }, "strip", z.ZodTypeAny, {
2856
- type: "prompt-response";
4438
+ type: "manager-prompt-response";
2857
4439
  promptId: string;
2858
4440
  agentState: {
2859
4441
  agentContext: string;
@@ -2902,7 +4484,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2902
4484
  parameters: Record<string, string>;
2903
4485
  }[];
2904
4486
  }, {
2905
- type: "prompt-response";
4487
+ type: "manager-prompt-response";
2906
4488
  promptId: string;
2907
4489
  agentState: {
2908
4490
  agentContext: string;
@@ -3268,6 +4850,55 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3268
4850
  id: string;
3269
4851
  parameters: Record<string, string>;
3270
4852
  }[];
4853
+ } | {
4854
+ type: "manager-prompt-response";
4855
+ promptId: string;
4856
+ agentState: {
4857
+ agentContext: string;
4858
+ fileContext: {
4859
+ currentWorkingDirectory: string;
4860
+ fileTree: import("../util/file").FileTreeNode[];
4861
+ fileTokenScores: Record<string, Record<string, number>>;
4862
+ knowledgeFiles: Record<string, string>;
4863
+ gitChanges: {
4864
+ status: string;
4865
+ diff: string;
4866
+ diffCached: string;
4867
+ lastCommitMessages: string;
4868
+ };
4869
+ changesSinceLastChat: Record<string, string>;
4870
+ shellConfigFiles: Record<string, string>;
4871
+ systemInfo: {
4872
+ platform: string;
4873
+ shell: string;
4874
+ nodeVersion: string;
4875
+ arch: string;
4876
+ homedir: string;
4877
+ cpus: number;
4878
+ };
4879
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
4880
+ userKnowledgeFiles?: Record<string, string> | undefined;
4881
+ fileVersions?: {
4882
+ path: string;
4883
+ content: string;
4884
+ }[][] | undefined;
4885
+ };
4886
+ messageHistory: (import("ai").CoreMessage & {
4887
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
4888
+ })[];
4889
+ consecutiveAssistantMessages?: number | undefined;
4890
+ agentStepsRemaining?: number | undefined;
4891
+ };
4892
+ toolResults: {
4893
+ name: string;
4894
+ id: string;
4895
+ result: string;
4896
+ }[];
4897
+ toolCalls: {
4898
+ name: string;
4899
+ id: string;
4900
+ parameters: Record<string, string>;
4901
+ }[];
3271
4902
  } | {
3272
4903
  type: "response-chunk";
3273
4904
  userInputId: string;
@@ -3412,6 +5043,55 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3412
5043
  id: string;
3413
5044
  parameters: Record<string, string>;
3414
5045
  }[];
5046
+ } | {
5047
+ type: "manager-prompt-response";
5048
+ promptId: string;
5049
+ agentState: {
5050
+ agentContext: string;
5051
+ fileContext: {
5052
+ currentWorkingDirectory: string;
5053
+ fileTree: import("../util/file").FileTreeNode[];
5054
+ fileTokenScores: Record<string, Record<string, number>>;
5055
+ knowledgeFiles: Record<string, string>;
5056
+ gitChanges: {
5057
+ status: string;
5058
+ diff: string;
5059
+ diffCached: string;
5060
+ lastCommitMessages: string;
5061
+ };
5062
+ changesSinceLastChat: Record<string, string>;
5063
+ shellConfigFiles: Record<string, string>;
5064
+ systemInfo: {
5065
+ platform: string;
5066
+ shell: string;
5067
+ nodeVersion: string;
5068
+ arch: string;
5069
+ homedir: string;
5070
+ cpus: number;
5071
+ };
5072
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
5073
+ userKnowledgeFiles?: Record<string, string> | undefined;
5074
+ fileVersions?: {
5075
+ path: string;
5076
+ content: string;
5077
+ }[][] | undefined;
5078
+ };
5079
+ messageHistory: (import("ai").CoreMessage & {
5080
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
5081
+ })[];
5082
+ consecutiveAssistantMessages?: number | undefined;
5083
+ agentStepsRemaining?: number | undefined;
5084
+ };
5085
+ toolResults: {
5086
+ name: string;
5087
+ id: string;
5088
+ result: string;
5089
+ }[];
5090
+ toolCalls: {
5091
+ name: string;
5092
+ id: string;
5093
+ parameters: Record<string, string>;
5094
+ }[];
3415
5095
  } | {
3416
5096
  type: "response-chunk";
3417
5097
  userInputId: string;