@polka-codes/core 0.9.2 → 0.9.4

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.
@@ -2,11 +2,13 @@ import type { FilePart } from 'ai';
2
2
  import type { ImagePart } from 'ai';
3
3
  import type { LanguageModelV2 } from '@ai-sdk/provider';
4
4
  import type { LanguageModelV2Usage } from '@ai-sdk/provider';
5
- import type { ModelMessage } from 'ai';
6
- import type { ModelMessage as ModelMessage_2 } from '@ai-sdk/provider-utils';
5
+ import type { ModelMessage } from '@ai-sdk/provider-utils';
6
+ import type { ModelMessage as ModelMessage_2 } from 'ai';
7
7
  import type { TextPart } from 'ai';
8
+ import type { ToolModelMessage } from '@ai-sdk/provider-utils';
8
9
  import type { UserContent } from '@ai-sdk/provider-utils';
9
10
  import type { UserContent as UserContent_2 } from 'ai';
11
+ import type { UserModelMessage } from '@ai-sdk/provider-utils';
10
12
  import { z } from 'zod';
11
13
 
12
14
  declare abstract class AgentBase {
@@ -17,13 +19,13 @@ declare abstract class AgentBase {
17
19
  constructor(name: string, ai: LanguageModelV2, config: AgentBaseConfig);
18
20
  abort(): void;
19
21
  get parameters(): Readonly<Record<string, any>>;
20
- get messages(): Readonly<ModelMessage_2[]>;
21
- setMessages(messages: Readonly<ModelMessage_2[]>): void;
22
+ get messages(): Readonly<ModelMessage[]>;
23
+ setMessages(messages: Readonly<ModelMessage[]>): void;
22
24
  start(prompt: UserContent): Promise<ExitReason>;
23
25
  step(prompt: UserContent): Promise<AssistantMessageContent[]>;
24
26
  handleStepResponse(response: AssistantMessageContent[]): Promise<{
25
27
  type: "reply";
26
- message: UserContent;
28
+ message: UserModelMessage | ToolModelMessage;
27
29
  } | {
28
30
  type: "exit";
29
31
  reason: ExitReason;
@@ -89,7 +91,7 @@ declare type AgentPolicyInstance = {
89
91
  prompt?: string;
90
92
  onBeforeInvokeTool?: (name: string, args: Record<string, string>) => Promise<ToolResponse | undefined>;
91
93
  onBeforeRequest?: (agent: AgentBase) => Promise<void>;
92
- prepareMessages?: (agent: AgentBase, messages: ModelMessage[]) => Promise<ModelMessage[]>;
94
+ prepareMessages?: (agent: AgentBase, messages: ModelMessage_2[]) => Promise<ModelMessage_2[]>;
93
95
  };
94
96
  export { AgentPolicyInstance }
95
97
  export { AgentPolicyInstance as AgentPolicyInstance_alias_1 }
@@ -106,12 +108,19 @@ declare type AiToolDefinition<Input, Output = string> = {
106
108
  prompt: string;
107
109
  formatInput: (params: Input) => string;
108
110
  parseOutput: (output: string) => Output;
109
- agent?: AgentNameType;
110
111
  };
111
112
  export { AiToolDefinition }
112
113
  export { AiToolDefinition as AiToolDefinition_alias_1 }
113
114
  export { AiToolDefinition as AiToolDefinition_alias_2 }
114
115
 
116
+ export declare type AiToolDefinitionWithAgent<Input, Output = string> = AiToolDefinition<Input, Output> & {
117
+ agent: (options: SharedAgentOptions) => AgentBase;
118
+ };
119
+
120
+ export declare type AiToolDefinitionWithMultiAgent<Input, Output = string> = AiToolDefinition<Input, Output> & {
121
+ agent: AgentNameType;
122
+ };
123
+
115
124
  declare const allAgents: readonly [{
116
125
  readonly name: "architect";
117
126
  readonly responsibilities: ["Analyzing the user’s overall task and requirements.", "Creating plans and making higher-level decisions about system structure and design.", "Reviewing and analyzing existing code or components for maintainability and scalability.", "Laying out the roadmap for implementation."];
@@ -371,44 +380,6 @@ declare const _default: {
371
380
  options: z.ZodDefault<z.ZodArray<z.ZodString>>;
372
381
  }, z.core.$strip>>;
373
382
  }, z.core.$strip>;
374
- readonly examples: [{
375
- readonly description: "Single clarifying question (no options)";
376
- readonly parameters: [{
377
- readonly name: "questions";
378
- readonly value: {
379
- readonly prompt: "What is the target deployment environment?";
380
- };
381
- }];
382
- }, {
383
- readonly description: "Single question with multiple-choice options";
384
- readonly parameters: [{
385
- readonly name: "questions";
386
- readonly value: {
387
- readonly prompt: "Which frontend framework are you using?";
388
- readonly options: ["React", "Angular", "Vue", "Svelte"];
389
- };
390
- }];
391
- }, {
392
- readonly description: "Two related questions in one call";
393
- readonly parameters: [{
394
- readonly name: "questions";
395
- readonly value: [{
396
- readonly prompt: "What type of application are you building?";
397
- }, {
398
- readonly prompt: "Preferred programming language?";
399
- readonly options: ["JavaScript", "TypeScript", "Python", "Java"];
400
- }];
401
- }];
402
- }, {
403
- readonly description: "Binary (yes/no) confirmation";
404
- readonly parameters: [{
405
- readonly name: "questions";
406
- readonly value: {
407
- readonly prompt: "Is it acceptable to refactor existing tests to improve performance?";
408
- readonly options: ["Yes", "No"];
409
- };
410
- }];
411
- }];
412
383
  readonly permissionLevel: PermissionLevel.None;
413
384
  }, InteractionProvider>;
414
385
  isAvailable: (provider: InteractionProvider) => boolean;
@@ -420,50 +391,12 @@ declare const _default: {
420
391
  options: z.ZodDefault<z.ZodArray<z.ZodString>>;
421
392
  }, z.core.$strip>>;
422
393
  }, z.core.$strip>;
423
- examples: [{
424
- readonly description: "Single clarifying question (no options)";
425
- readonly parameters: [{
426
- readonly name: "questions";
427
- readonly value: {
428
- readonly prompt: "What is the target deployment environment?";
429
- };
430
- }];
431
- }, {
432
- readonly description: "Single question with multiple-choice options";
433
- readonly parameters: [{
434
- readonly name: "questions";
435
- readonly value: {
436
- readonly prompt: "Which frontend framework are you using?";
437
- readonly options: ["React", "Angular", "Vue", "Svelte"];
438
- };
439
- }];
440
- }, {
441
- readonly description: "Two related questions in one call";
442
- readonly parameters: [{
443
- readonly name: "questions";
444
- readonly value: [{
445
- readonly prompt: "What type of application are you building?";
446
- }, {
447
- readonly prompt: "Preferred programming language?";
448
- readonly options: ["JavaScript", "TypeScript", "Python", "Java"];
449
- }];
450
- }];
451
- }, {
452
- readonly description: "Binary (yes/no) confirmation";
453
- readonly parameters: [{
454
- readonly name: "questions";
455
- readonly value: {
456
- readonly prompt: "Is it acceptable to refactor existing tests to improve performance?";
457
- readonly options: ["Yes", "No"];
458
- };
459
- }];
460
- }];
461
394
  permissionLevel: PermissionLevel.None;
462
395
  };
463
396
  export { _default as askFollowupQuestion }
464
397
  export { _default as askFollowupQuestion_alias_1 }
465
398
  export { _default as askFollowupQuestion_alias_2 }
466
- export { _default as default_alias_4 }
399
+ export { _default as default_alias_6 }
467
400
 
468
401
  declare const _default_10: {
469
402
  handler: ToolHandler<{
@@ -473,16 +406,6 @@ declare const _default_10: {
473
406
  source_path: z.ZodString;
474
407
  target_path: z.ZodString;
475
408
  }, z.core.$strip>;
476
- readonly examples: [{
477
- readonly description: "Request to rename a file";
478
- readonly parameters: [{
479
- readonly name: "source_path";
480
- readonly value: "src/old-name.js";
481
- }, {
482
- readonly name: "target_path";
483
- readonly value: "src/new-name.js";
484
- }];
485
- }];
486
409
  readonly permissionLevel: PermissionLevel.Write;
487
410
  }, FilesystemProvider>;
488
411
  isAvailable: (provider: FilesystemProvider) => boolean;
@@ -492,19 +415,9 @@ declare const _default_10: {
492
415
  source_path: z.ZodString;
493
416
  target_path: z.ZodString;
494
417
  }, z.core.$strip>;
495
- examples: [{
496
- readonly description: "Request to rename a file";
497
- readonly parameters: [{
498
- readonly name: "source_path";
499
- readonly value: "src/old-name.js";
500
- }, {
501
- readonly name: "target_path";
502
- readonly value: "src/new-name.js";
503
- }];
504
- }];
505
418
  permissionLevel: PermissionLevel.Write;
506
419
  };
507
- export { _default_10 as default_alias_13 }
420
+ export { _default_10 as default_alias_15 }
508
421
  export { _default_10 as renameFile }
509
422
  export { _default_10 as renameFile_alias_1 }
510
423
  export { _default_10 as renameFile_alias_2 }
@@ -517,43 +430,6 @@ declare const _default_11: {
517
430
  path: z.ZodString;
518
431
  diff: z.ZodString;
519
432
  }, z.core.$strip>;
520
- readonly examples: [{
521
- readonly description: "Request to replace sections of content in a file";
522
- readonly parameters: [{
523
- readonly name: "path";
524
- readonly value: "src/main.js";
525
- }, {
526
- readonly name: "diff";
527
- readonly value: "<<<<<<< SEARCH\nimport React from 'react';\n=======\nimport React, { useState } from 'react';\n>>>>>>> REPLACE\n\n<<<<<<< SEARCH\nfunction handleSubmit() {\n saveData();\n setLoading(false);\n}\n\n=======\n>>>>>>> REPLACE\n\n<<<<<<< SEARCH\nreturn (\n <div>\n=======\nfunction handleSubmit() {\n saveData();\n setLoading(false);\n}\n\nreturn (\n <div>\n>>>>>>> REPLACE";
528
- }];
529
- }, {
530
- readonly description: "Request to perform a simple, single-line replacement";
531
- readonly parameters: [{
532
- readonly name: "path";
533
- readonly value: "src/config.js";
534
- }, {
535
- readonly name: "diff";
536
- readonly value: "<<<<<<< SEARCH\nconst API_URL = 'https://api.example.com';\n=======\nconst API_URL = 'https://api.staging.example.com';\n>>>>>>> REPLACE";
537
- }];
538
- }, {
539
- readonly description: "Request to add a new function to a file";
540
- readonly parameters: [{
541
- readonly name: "path";
542
- readonly value: "src/utils.js";
543
- }, {
544
- readonly name: "diff";
545
- readonly value: "<<<<<<< SEARCH\nfunction helperA() {\n // ...\n}\n=======\nfunction helperA() {\n // ...\n}\n\nfunction newHelper() {\n // implementation\n}\n>>>>>>> REPLACE";
546
- }];
547
- }, {
548
- readonly description: "Request to delete a block of code from a file";
549
- readonly parameters: [{
550
- readonly name: "path";
551
- readonly value: "src/app.js";
552
- }, {
553
- readonly name: "diff";
554
- readonly value: "<<<<<<< SEARCH\nfunction oldFeature() {\n // This is no longer needed\n}\n\n=======\n>>>>>>> REPLACE";
555
- }];
556
- }];
557
433
  readonly permissionLevel: PermissionLevel.Write;
558
434
  }, FilesystemProvider>;
559
435
  isAvailable: (provider: FilesystemProvider) => boolean;
@@ -563,46 +439,9 @@ declare const _default_11: {
563
439
  path: z.ZodString;
564
440
  diff: z.ZodString;
565
441
  }, z.core.$strip>;
566
- examples: [{
567
- readonly description: "Request to replace sections of content in a file";
568
- readonly parameters: [{
569
- readonly name: "path";
570
- readonly value: "src/main.js";
571
- }, {
572
- readonly name: "diff";
573
- readonly value: "<<<<<<< SEARCH\nimport React from 'react';\n=======\nimport React, { useState } from 'react';\n>>>>>>> REPLACE\n\n<<<<<<< SEARCH\nfunction handleSubmit() {\n saveData();\n setLoading(false);\n}\n\n=======\n>>>>>>> REPLACE\n\n<<<<<<< SEARCH\nreturn (\n <div>\n=======\nfunction handleSubmit() {\n saveData();\n setLoading(false);\n}\n\nreturn (\n <div>\n>>>>>>> REPLACE";
574
- }];
575
- }, {
576
- readonly description: "Request to perform a simple, single-line replacement";
577
- readonly parameters: [{
578
- readonly name: "path";
579
- readonly value: "src/config.js";
580
- }, {
581
- readonly name: "diff";
582
- readonly value: "<<<<<<< SEARCH\nconst API_URL = 'https://api.example.com';\n=======\nconst API_URL = 'https://api.staging.example.com';\n>>>>>>> REPLACE";
583
- }];
584
- }, {
585
- readonly description: "Request to add a new function to a file";
586
- readonly parameters: [{
587
- readonly name: "path";
588
- readonly value: "src/utils.js";
589
- }, {
590
- readonly name: "diff";
591
- readonly value: "<<<<<<< SEARCH\nfunction helperA() {\n // ...\n}\n=======\nfunction helperA() {\n // ...\n}\n\nfunction newHelper() {\n // implementation\n}\n>>>>>>> REPLACE";
592
- }];
593
- }, {
594
- readonly description: "Request to delete a block of code from a file";
595
- readonly parameters: [{
596
- readonly name: "path";
597
- readonly value: "src/app.js";
598
- }, {
599
- readonly name: "diff";
600
- readonly value: "<<<<<<< SEARCH\nfunction oldFeature() {\n // This is no longer needed\n}\n\n=======\n>>>>>>> REPLACE";
601
- }];
602
- }];
603
442
  permissionLevel: PermissionLevel.Write;
604
443
  };
605
- export { _default_11 as default_alias_14 }
444
+ export { _default_11 as default_alias_16 }
606
445
  export { _default_11 as replaceInFile }
607
446
  export { _default_11 as replaceInFile_alias_1 }
608
447
  export { _default_11 as replaceInFile_alias_2 }
@@ -616,19 +455,6 @@ declare const _default_12: {
616
455
  regex: z.ZodString;
617
456
  filePattern: z.ZodOptional<z.ZodString>;
618
457
  }, z.core.$strip>;
619
- readonly examples: [{
620
- readonly description: "Request to perform a regex search across files";
621
- readonly parameters: [{
622
- readonly name: "path";
623
- readonly value: "src";
624
- }, {
625
- readonly name: "regex";
626
- readonly value: "^components/";
627
- }, {
628
- readonly name: "filePattern";
629
- readonly value: "*.ts,*.tsx";
630
- }];
631
- }];
632
458
  readonly permissionLevel: PermissionLevel.Read;
633
459
  }, FilesystemProvider>;
634
460
  isAvailable: (provider: FilesystemProvider) => boolean;
@@ -639,22 +465,9 @@ declare const _default_12: {
639
465
  regex: z.ZodString;
640
466
  filePattern: z.ZodOptional<z.ZodString>;
641
467
  }, z.core.$strip>;
642
- examples: [{
643
- readonly description: "Request to perform a regex search across files";
644
- readonly parameters: [{
645
- readonly name: "path";
646
- readonly value: "src";
647
- }, {
648
- readonly name: "regex";
649
- readonly value: "^components/";
650
- }, {
651
- readonly name: "filePattern";
652
- readonly value: "*.ts,*.tsx";
653
- }];
654
- }];
655
468
  permissionLevel: PermissionLevel.Read;
656
469
  };
657
- export { _default_12 as default_alias_15 }
470
+ export { _default_12 as default_alias_17 }
658
471
  export { _default_12 as searchFiles }
659
472
  export { _default_12 as searchFiles_alias_1 }
660
473
  export { _default_12 as searchFiles_alias_2 }
@@ -667,16 +480,6 @@ declare const _default_13: {
667
480
  path: z.ZodString;
668
481
  content: z.ZodString;
669
482
  }, z.core.$strip>;
670
- readonly examples: [{
671
- readonly description: "Request to write content to a file";
672
- readonly parameters: [{
673
- readonly name: "path";
674
- readonly value: "src/main.js";
675
- }, {
676
- readonly name: "content";
677
- readonly value: "import React from 'react';\n\nfunction App() {\n return (\n <div>\n <h1>Hello, World!</h1>\n </div>\n );\n}\n\nexport default App;\n";
678
- }];
679
- }];
680
483
  readonly permissionLevel: PermissionLevel.Write;
681
484
  }, FilesystemProvider>;
682
485
  isAvailable: (provider: FilesystemProvider) => boolean;
@@ -686,19 +489,9 @@ declare const _default_13: {
686
489
  path: z.ZodString;
687
490
  content: z.ZodString;
688
491
  }, z.core.$strip>;
689
- examples: [{
690
- readonly description: "Request to write content to a file";
691
- readonly parameters: [{
692
- readonly name: "path";
693
- readonly value: "src/main.js";
694
- }, {
695
- readonly name: "content";
696
- readonly value: "import React from 'react';\n\nfunction App() {\n return (\n <div>\n <h1>Hello, World!</h1>\n </div>\n );\n}\n\nexport default App;\n";
697
- }];
698
- }];
699
492
  permissionLevel: PermissionLevel.Write;
700
493
  };
701
- export { _default_13 as default_alias_16 }
494
+ export { _default_13 as default_alias_18 }
702
495
  export { _default_13 as writeToFile }
703
496
  export { _default_13 as writeToFile_alias_1 }
704
497
  export { _default_13 as writeToFile_alias_2 }
@@ -710,13 +503,6 @@ declare const _default_2: {
710
503
  readonly parameters: z.ZodObject<{
711
504
  result: z.ZodString;
712
505
  }, z.core.$strip>;
713
- readonly examples: [{
714
- readonly description: "Request to present the result of the task";
715
- readonly parameters: [{
716
- readonly name: "result";
717
- readonly value: "Your final result description here";
718
- }];
719
- }];
720
506
  readonly permissionLevel: PermissionLevel.None;
721
507
  }, InteractionProvider>;
722
508
  isAvailable: (_provider: InteractionProvider) => boolean;
@@ -725,19 +511,12 @@ declare const _default_2: {
725
511
  parameters: z.ZodObject<{
726
512
  result: z.ZodString;
727
513
  }, z.core.$strip>;
728
- examples: [{
729
- readonly description: "Request to present the result of the task";
730
- readonly parameters: [{
731
- readonly name: "result";
732
- readonly value: "Your final result description here";
733
- }];
734
- }];
735
514
  permissionLevel: PermissionLevel.None;
736
515
  };
737
516
  export { _default_2 as attemptCompletion }
738
517
  export { _default_2 as attemptCompletion_alias_1 }
739
518
  export { _default_2 as attemptCompletion_alias_2 }
740
- export { _default_2 as default_alias_5 }
519
+ export { _default_2 as default_alias_7 }
741
520
 
742
521
  declare const _default_3: {
743
522
  handler: ToolHandler<{
@@ -749,22 +528,6 @@ declare const _default_3: {
749
528
  context: z.ZodString;
750
529
  files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
751
530
  }, z.core.$strip>;
752
- readonly examples: [{
753
- readonly description: "Delegate a code analysis task to the analyzer agent";
754
- readonly parameters: [{
755
- readonly name: "agentName";
756
- readonly value: "analyzer";
757
- }, {
758
- readonly name: "task";
759
- readonly value: "Analyze the authentication implementation";
760
- }, {
761
- readonly name: "context";
762
- readonly value: "Need to understand the security implications of the current auth system";
763
- }, {
764
- readonly name: "files";
765
- readonly value: "src/auth/login.ts,src/auth/types.ts";
766
- }];
767
- }];
768
531
  readonly permissionLevel: PermissionLevel.None;
769
532
  }, any>;
770
533
  isAvailable: (_provider: any) => boolean;
@@ -776,25 +539,9 @@ declare const _default_3: {
776
539
  context: z.ZodString;
777
540
  files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
778
541
  }, z.core.$strip>;
779
- examples: [{
780
- readonly description: "Delegate a code analysis task to the analyzer agent";
781
- readonly parameters: [{
782
- readonly name: "agentName";
783
- readonly value: "analyzer";
784
- }, {
785
- readonly name: "task";
786
- readonly value: "Analyze the authentication implementation";
787
- }, {
788
- readonly name: "context";
789
- readonly value: "Need to understand the security implications of the current auth system";
790
- }, {
791
- readonly name: "files";
792
- readonly value: "src/auth/login.ts,src/auth/types.ts";
793
- }];
794
- }];
795
542
  permissionLevel: PermissionLevel.None;
796
543
  };
797
- export { _default_3 as default_alias_6 }
544
+ export { _default_3 as default_alias_8 }
798
545
  export { _default_3 as delegate }
799
546
  export { _default_3 as delegate_alias_1 }
800
547
  export { _default_3 as delegate_alias_2 }
@@ -807,16 +554,6 @@ declare const _default_4: {
807
554
  command: z.ZodString;
808
555
  requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
809
556
  }, z.core.$strip>;
810
- readonly examples: [{
811
- readonly description: "Make a build";
812
- readonly parameters: [{
813
- readonly name: "command";
814
- readonly value: "npm run build";
815
- }, {
816
- readonly name: "requiresApproval";
817
- readonly value: "false";
818
- }];
819
- }];
820
557
  readonly permissionLevel: PermissionLevel.Arbitrary;
821
558
  }, CommandProvider>;
822
559
  isAvailable: (provider: CommandProvider) => boolean;
@@ -826,19 +563,9 @@ declare const _default_4: {
826
563
  command: z.ZodString;
827
564
  requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
828
565
  }, z.core.$strip>;
829
- examples: [{
830
- readonly description: "Make a build";
831
- readonly parameters: [{
832
- readonly name: "command";
833
- readonly value: "npm run build";
834
- }, {
835
- readonly name: "requiresApproval";
836
- readonly value: "false";
837
- }];
838
- }];
839
566
  permissionLevel: PermissionLevel.Arbitrary;
840
567
  };
841
- export { _default_4 as default_alias_7 }
568
+ export { _default_4 as default_alias_9 }
842
569
  export { _default_4 as executeCommand }
843
570
  export { _default_4 as executeCommand_alias_1 }
844
571
  export { _default_4 as executeCommand_alias_2 }
@@ -850,25 +577,6 @@ declare const _default_5: {
850
577
  readonly parameters: z.ZodObject<{
851
578
  url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
852
579
  }, z.core.$strip>;
853
- readonly examples: [{
854
- readonly description: "Fetch a single webpage";
855
- readonly parameters: [{
856
- readonly name: "url";
857
- readonly value: "https://example.com";
858
- }];
859
- }, {
860
- readonly description: "Fetch multiple webpages";
861
- readonly parameters: [{
862
- readonly name: "url";
863
- readonly value: "https://example.com,https://developer.mozilla.org/en-US/docs/Web/HTTP";
864
- }];
865
- }, {
866
- readonly description: "Fetch a raw file from GitHub";
867
- readonly parameters: [{
868
- readonly name: "url";
869
- readonly value: "https://raw.githubusercontent.com/user/repo/main/README.md";
870
- }];
871
- }];
872
580
  readonly permissionLevel: PermissionLevel.Read;
873
581
  }, WebProvider>;
874
582
  isAvailable: (provider: WebProvider) => boolean;
@@ -877,28 +585,9 @@ declare const _default_5: {
877
585
  parameters: z.ZodObject<{
878
586
  url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
879
587
  }, z.core.$strip>;
880
- examples: [{
881
- readonly description: "Fetch a single webpage";
882
- readonly parameters: [{
883
- readonly name: "url";
884
- readonly value: "https://example.com";
885
- }];
886
- }, {
887
- readonly description: "Fetch multiple webpages";
888
- readonly parameters: [{
889
- readonly name: "url";
890
- readonly value: "https://example.com,https://developer.mozilla.org/en-US/docs/Web/HTTP";
891
- }];
892
- }, {
893
- readonly description: "Fetch a raw file from GitHub";
894
- readonly parameters: [{
895
- readonly name: "url";
896
- readonly value: "https://raw.githubusercontent.com/user/repo/main/README.md";
897
- }];
898
- }];
899
588
  permissionLevel: PermissionLevel.Read;
900
589
  };
901
- export { _default_5 as default_alias_8 }
590
+ export { _default_5 as default_alias_10 }
902
591
  export { _default_5 as fetchUrl }
903
592
  export { _default_5 as fetchUrl_alias_1 }
904
593
  export { _default_5 as fetchUrl_alias_2 }
@@ -913,22 +602,6 @@ declare const _default_6: {
913
602
  context: z.ZodString;
914
603
  files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
915
604
  }, z.core.$strip>;
916
- readonly examples: [{
917
- readonly description: "Hand over a coding task to the coder agent";
918
- readonly parameters: [{
919
- readonly name: "agentName";
920
- readonly value: "coder";
921
- }, {
922
- readonly name: "task";
923
- readonly value: "Implement the login feature";
924
- }, {
925
- readonly name: "context";
926
- readonly value: "We need a secure login system with email and password";
927
- }, {
928
- readonly name: "files";
929
- readonly value: "src/auth/login.ts,src/auth/types.ts";
930
- }];
931
- }];
932
605
  readonly permissionLevel: PermissionLevel.None;
933
606
  }, any>;
934
607
  isAvailable: (_provider: any) => boolean;
@@ -940,25 +613,9 @@ declare const _default_6: {
940
613
  context: z.ZodString;
941
614
  files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
942
615
  }, z.core.$strip>;
943
- examples: [{
944
- readonly description: "Hand over a coding task to the coder agent";
945
- readonly parameters: [{
946
- readonly name: "agentName";
947
- readonly value: "coder";
948
- }, {
949
- readonly name: "task";
950
- readonly value: "Implement the login feature";
951
- }, {
952
- readonly name: "context";
953
- readonly value: "We need a secure login system with email and password";
954
- }, {
955
- readonly name: "files";
956
- readonly value: "src/auth/login.ts,src/auth/types.ts";
957
- }];
958
- }];
959
616
  permissionLevel: PermissionLevel.None;
960
617
  };
961
- export { _default_6 as default_alias_9 }
618
+ export { _default_6 as default_alias_11 }
962
619
  export { _default_6 as handOver }
963
620
  export { _default_6 as handOver_alias_1 }
964
621
  export { _default_6 as handOver_alias_2 }
@@ -972,16 +629,6 @@ declare const _default_7: {
972
629
  maxCount: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
973
630
  recursive: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
974
631
  }, z.core.$strip>;
975
- readonly examples: [{
976
- readonly description: "Request to list files";
977
- readonly parameters: [{
978
- readonly name: "path";
979
- readonly value: "src";
980
- }, {
981
- readonly name: "maxCount";
982
- readonly value: "100";
983
- }];
984
- }];
985
632
  readonly permissionLevel: PermissionLevel.Read;
986
633
  }, FilesystemProvider>;
987
634
  isAvailable: (provider: FilesystemProvider) => boolean;
@@ -992,19 +639,9 @@ declare const _default_7: {
992
639
  maxCount: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
993
640
  recursive: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
994
641
  }, z.core.$strip>;
995
- examples: [{
996
- readonly description: "Request to list files";
997
- readonly parameters: [{
998
- readonly name: "path";
999
- readonly value: "src";
1000
- }, {
1001
- readonly name: "maxCount";
1002
- readonly value: "100";
1003
- }];
1004
- }];
1005
642
  permissionLevel: PermissionLevel.Read;
1006
643
  };
1007
- export { _default_7 as default_alias_10 }
644
+ export { _default_7 as default_alias_12 }
1008
645
  export { _default_7 as listFiles }
1009
646
  export { _default_7 as listFiles_alias_1 }
1010
647
  export { _default_7 as listFiles_alias_2 }
@@ -1016,19 +653,6 @@ declare const _default_8: {
1016
653
  readonly parameters: z.ZodObject<{
1017
654
  path: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
1018
655
  }, z.core.$strip>;
1019
- readonly examples: [{
1020
- readonly description: "Request to read the contents of a file";
1021
- readonly parameters: [{
1022
- readonly name: "path";
1023
- readonly value: "src/main.js";
1024
- }];
1025
- }, {
1026
- readonly description: "Request to read multiple files";
1027
- readonly parameters: [{
1028
- readonly name: "path";
1029
- readonly value: "src/main.js,src/index.js";
1030
- }];
1031
- }];
1032
656
  readonly permissionLevel: PermissionLevel.Read;
1033
657
  }, FilesystemProvider>;
1034
658
  isAvailable: (provider: FilesystemProvider) => boolean;
@@ -1037,22 +661,9 @@ declare const _default_8: {
1037
661
  parameters: z.ZodObject<{
1038
662
  path: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
1039
663
  }, z.core.$strip>;
1040
- examples: [{
1041
- readonly description: "Request to read the contents of a file";
1042
- readonly parameters: [{
1043
- readonly name: "path";
1044
- readonly value: "src/main.js";
1045
- }];
1046
- }, {
1047
- readonly description: "Request to read multiple files";
1048
- readonly parameters: [{
1049
- readonly name: "path";
1050
- readonly value: "src/main.js,src/index.js";
1051
- }];
1052
- }];
1053
664
  permissionLevel: PermissionLevel.Read;
1054
665
  };
1055
- export { _default_8 as default_alias_11 }
666
+ export { _default_8 as default_alias_13 }
1056
667
  export { _default_8 as readFile }
1057
668
  export { _default_8 as readFile_alias_1 }
1058
669
  export { _default_8 as readFile_alias_2 }
@@ -1064,13 +675,6 @@ declare const _default_9: {
1064
675
  readonly parameters: z.ZodObject<{
1065
676
  path: z.ZodString;
1066
677
  }, z.core.$strip>;
1067
- readonly examples: [{
1068
- readonly description: "Request to remove a file";
1069
- readonly parameters: [{
1070
- readonly name: "path";
1071
- readonly value: "src/main.js";
1072
- }];
1073
- }];
1074
678
  readonly permissionLevel: PermissionLevel.Write;
1075
679
  }, FilesystemProvider>;
1076
680
  isAvailable: (provider: FilesystemProvider) => boolean;
@@ -1079,16 +683,9 @@ declare const _default_9: {
1079
683
  parameters: z.ZodObject<{
1080
684
  path: z.ZodString;
1081
685
  }, z.core.$strip>;
1082
- examples: [{
1083
- readonly description: "Request to remove a file";
1084
- readonly parameters: [{
1085
- readonly name: "path";
1086
- readonly value: "src/main.js";
1087
- }];
1088
- }];
1089
686
  permissionLevel: PermissionLevel.Write;
1090
687
  };
1091
- export { _default_9 as default_alias_12 }
688
+ export { _default_9 as default_alias_14 }
1092
689
  export { _default_9 as removeFile }
1093
690
  export { _default_9 as removeFile_alias_1 }
1094
691
  export { _default_9 as removeFile_alias_2 }
@@ -1100,7 +697,7 @@ export { _default_9 as removeFile_alias_2 }
1100
697
  export declare const default_alias: {
1101
698
  readonly name: "createNewProject";
1102
699
  readonly description: "Creates a new project";
1103
- readonly prompt: "You are an AiTool designed to assist users in creating new projects. Follow these guidelines:\n\n1. **Gather Information:**\n - Begin by asking the user for essential project details, including:\n - Project type (e.g., web, mobile, desktop, etc.)\n - Desired programming languages\n - Preferred frameworks or libraries\n - Build tools and package manager preferences\n - Testing frameworks and patterns\n - Code style and linting preferences\n - Any additional specifications or requirements\n\n2. **Clarification & Confirmation:**\n - Do not make any decisions or assumptions on behalf of the user.\n - Ask clarifying questions if any detail is ambiguous.\n - Confirm each piece of information with the user before proceeding to the next step.\n\n3. **Avoid Redundancy:**\n - Do not repeat questions or details that have already been confirmed.\n - Keep interactions concise and focused on gathering complete and accurate details.\n\n4. **Generate Configuration:**\n - Based on the collected information, generate a .polkacodes.yml configuration file that includes:\n - scripts section with common development commands (test, format, check, etc.)\n - rules section reflecting project conventions and tools\n - excludeFiles section for sensitive files only\n - Example structure:\n ```yaml\n scripts:\n test:\n command: \"[test-command]\"\n description: \"Run tests\"\n format:\n command: \"[format-command]\"\n description: \"Format code\"\n check:\n command: \"[check-command]\"\n description: \"Check code\"\n\n rules:\n - \"[package-manager-rule]\"\n - \"[testing-framework-rule]\"\n - \"[code-style-rule]\"\n - \"[other-rule]\"\n\n excludeFiles:\n - \".env\"\n - \".env.*\"\n ```\n\n5. **Generate Essential Project Files:**\n - Create a .gitattributes file with appropriate configurations:\n - Mark lock files as generated and exclude them from diffs\n - Example for different package managers:\n \n # For Bun\n bun.lock linguist-generated=true\n bun.lock -diff\n \n # For npm\n package-lock.json linguist-generated=true\n package-lock.json -diff\n \n # For Yarn\n yarn.lock linguist-generated=true\n yarn.lock -diff\n \n # For pnpm\n pnpm-lock.yaml linguist-generated=true\n pnpm-lock.yaml -diff\n \n - Include other common configurations as needed based on project type\n\n6. **Handover to Coder Agent:**\n - Once all required information is collected and validated by the user, compile:\n 1. The final project specifications\n 2. The .polkacodes.yml configuration content\n - Clearly hand over these details to the coder agent, instructing them to:\n 1. Create the new project based on the confirmed specifications\n 2. Include the .polkacodes.yml file in the project root\n 3. Include the .gitattributes file with appropriate configurations\n 4. Ensure all specified tools and configurations are properly set up";
700
+ readonly prompt: "You are an AiTool designed to assist users in creating new projects. Follow these guidelines:\n\n1. **Gather Information:**\n - Begin by asking the user for essential project details, including:\n - Project type (e.g., web, mobile, desktop, etc.)\n - Desired programming languages\n - Preferred frameworks or libraries\n - Build tools and package manager preferences\n - Testing frameworks and patterns\n - Code style and linting preferences\n - Any additional specifications or requirements\n\n2. **Clarification & Confirmation:**\n - Do not make any decisions or assumptions on behalf of the user.\n - Ask clarifying questions if any detail is ambiguous.\n - Confirm each piece of information with the user before proceeding to the next step.\n\n3. **Avoid Redundancy:**\n - Do not repeat questions or details that have already been confirmed.\n - Keep interactions concise and focused on gathering complete and accurate details.\n\n4. **Generate Configuration:**\n - Based on the collected information, generate a .polkacodes.yml configuration file that includes:\n - scripts section with common development commands (test, format, check, etc.)\n - rules section reflecting project conventions and tools\n - excludeFiles section for sensitive files only\n - Example structure:\n ```yaml\n scripts:\n test:\n command: \"[test-command]\"\n description: \"Run tests\"\n format:\n command: \"[format-command]\"\n description: \"Format code\"\n check:\n command: \"[check-command]\"\n description: \"Check code\"\n\n rules:\n - \"[package-manager-rule]\"\n - \"[testing-framework-rule]\"\n - \"[code-style-rule]\"\n - \"[other-rule]\"\n\n excludeFiles:\n - \".env\"\n - \".env.*\"\n ```\n\n5. **Generate Essential Project Files:**\n - Create a .gitattributes file with appropriate configurations:\n - Mark lock files as generated and exclude them from diffs\n - Example for different package managers:\n\n # For Bun\n bun.lock linguist-generated=true\n bun.lock -diff\n\n # For npm\n package-lock.json linguist-generated=true\n package-lock.json -diff\n\n # For Yarn\n yarn.lock linguist-generated=true\n yarn.lock -diff\n\n # For pnpm\n pnpm-lock.yaml linguist-generated=true\n pnpm-lock.yaml -diff\n\n - Include other common configurations as needed based on project type\n\n6. **Handover to Coder Agent:**\n - Once all required information is collected and validated by the user, compile:\n 1. The final project specifications\n 2. The .polkacodes.yml configuration content\n - Clearly hand over these details to the coder agent, instructing them to:\n 1. Create the new project based on the confirmed specifications\n 2. Include the .polkacodes.yml file in the project root\n 3. Include the .gitattributes file with appropriate configurations\n 4. Ensure all specified tools and configurations are properly set up";
1104
701
  readonly formatInput: (params: string) => string;
1105
702
  readonly parseOutput: (output: string) => string;
1106
703
  readonly agent: "architect";
@@ -1138,6 +735,37 @@ export declare const default_alias_3: {
1138
735
  readonly agent: "analyzer";
1139
736
  };
1140
737
 
738
+ export declare const default_alias_4: {
739
+ readonly name: "reviewDiff";
740
+ readonly description: "Reviews a git diff";
741
+ readonly prompt: "\n# Code Review Prompt\n\nYou are a senior software engineer reviewing code changes.\n\n## Critical Instructions\n**ONLY review the actual changes shown in the diff.** Do not comment on existing code that wasn't modified.\n\n## Viewing Changes\n- **Use git_diff** to inspect the actual code changes for each relevant file.\n - **Pull request**: use the provided commit range for the git_diff tool.\n - **Local changes**: diff staged or unstaged files using the git_diff tool.\n- If a pull request is present you may receive:\n - <pr_title>\n - <pr_description>\n - <commit_messages>\n- A <review_instructions> tag tells you the focus of the review.\n- File status information is provided in <file_status> - use this to understand which files were modified, added, deleted, or renamed.\n\n## Review Guidelines\nFocus exclusively on the changed lines (+ additions, - deletions, modified lines):\n- **Specific issues**: Point to exact problems in the changed code with line references\n- **Actionable fixes**: Provide concrete solutions, not vague suggestions\n- **Clear reasoning**: Explain why each issue matters and how to fix it\n- **Avoid generic advice**: No generic suggestions like \"add more tests\", \"improve documentation\", or \"follow best practices\" unless directly related to a specific problem in the diff\n\n## What NOT to review\n- Existing unchanged code\n- Overall project structure or architecture (unless directly impacted by changes)\n- Generic best practices unrelated to the specific changes\n- Missing features or functionality not part of this diff\n\n## Output Format\nDo **not** include praise or positive feedback. Ignore generated files such as lock files.\nOnly include reviews for actual issues found in the changed code.\n\nReturn your review as a JSON object inside a ```json block, wrapped like:\n<tool_attempt_completion>\n<tool_parameter_result>\n```json\n{\n \"overview\": \"Summary of specific issues found in the diff changes, or 'No issues found' if the changes look good.\",\n \"specificReviews\": [\n {\n \"file\": \"path/filename.ext\",\n \"lines\": \"N or N-M\",\n \"review\": \"Specific issue with the changed code and exact actionable fix.\"\n }\n ]\n}\n```\n</tool_parameter_result>\n</tool_attempt_completion>\n";
742
+ readonly formatInput: (params: Input_2) => string;
743
+ readonly parseOutput: (output: string) => Output_2;
744
+ readonly agent: (options: SharedAgentOptions) => AnalyzerAgent;
745
+ };
746
+
747
+ export declare const default_alias_5: {
748
+ handler: ToolHandler<{
749
+ readonly name: "git_diff";
750
+ readonly description: "Get the git diff for the current repository. Can be used to get staged changes, unstaged changes, or changes between commits. By default, it returns unstaged changes.";
751
+ readonly parameters: z.ZodObject<{
752
+ staged: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
753
+ commitRange: z.ZodOptional<z.ZodString>;
754
+ file: z.ZodOptional<z.ZodString>;
755
+ }, z.core.$strip>;
756
+ readonly permissionLevel: PermissionLevel.Read;
757
+ }, CommandProvider>;
758
+ isAvailable: (provider: CommandProvider) => boolean;
759
+ name: "git_diff";
760
+ description: "Get the git diff for the current repository. Can be used to get staged changes, unstaged changes, or changes between commits. By default, it returns unstaged changes.";
761
+ parameters: z.ZodObject<{
762
+ staged: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
763
+ commitRange: z.ZodOptional<z.ZodString>;
764
+ file: z.ZodOptional<z.ZodString>;
765
+ }, z.core.$strip>;
766
+ permissionLevel: PermissionLevel.Read;
767
+ };
768
+
1141
769
  /**
1142
770
  * Returns the directory portion of a path string.
1143
771
  * Strips trailing slashes, then takes everything up to the last slash.
@@ -1152,10 +780,14 @@ export { EnableCachePolicy as EnableCachePolicy_alias_1 }
1152
780
  export { EnableCachePolicy as EnableCachePolicy_alias_2 }
1153
781
  export { EnableCachePolicy as EnableCachePolicy_alias_3 }
1154
782
 
1155
- declare const executeAgentTool: <T extends AiToolDefinition<any, any>>(definition: T, agent: MultiAgent, params: GetInput<T>) => Promise<GetOutput<T>>;
783
+ declare const executeAgentTool: <T extends AiToolDefinitionWithAgent<any, any>>(definition: T, options: SharedAgentOptions, params: GetInput<T>) => Promise<GetOutput<T>>;
1156
784
  export { executeAgentTool }
1157
785
  export { executeAgentTool as executeAgentTool_alias_1 }
1158
786
 
787
+ declare const executeMultiAgentTool: <T extends AiToolDefinitionWithMultiAgent<any, any>>(definition: T, agent: MultiAgent, params: GetInput<T>) => Promise<GetOutput<T>>;
788
+ export { executeMultiAgentTool }
789
+ export { executeMultiAgentTool as executeMultiAgentTool_alias_1 }
790
+
1159
791
  declare const executeTool: <T extends AiToolDefinition<any, any>>(definition: T, ai: LanguageModelV2, params: GetInput<T>, usageMeter: UsageMeter) => Promise<GetOutput<T>>;
1160
792
  export { executeTool }
1161
793
  export { executeTool as executeTool_alias_1 }
@@ -1188,28 +820,28 @@ export { FilesystemProvider as FilesystemProvider_alias_2 }
1188
820
 
1189
821
  export declare const fullSystemPrompt: (info: {
1190
822
  os: string;
1191
- }, tools: ToolInfo[], toolNamePrefix: string, instructions: string[], scripts: Record<string, string | {
823
+ }, tools: FullToolInfoV2[], toolNamePrefix: string, instructions: string[], scripts: Record<string, string | {
1192
824
  command: string;
1193
825
  description: string;
1194
826
  }>, useNativeTool: boolean) => string;
1195
827
 
1196
828
  export declare const fullSystemPrompt_alias_1: (info: {
1197
829
  os: string;
1198
- }, tools: ToolInfo[], toolNamePrefix: string, instructions: string[], scripts: Record<string, string | {
830
+ }, tools: FullToolInfoV2[], toolNamePrefix: string, instructions: string[], scripts: Record<string, string | {
1199
831
  command: string;
1200
832
  description: string;
1201
833
  }>, useNativeTool: boolean) => string;
1202
834
 
1203
835
  export declare const fullSystemPrompt_alias_2: (info: {
1204
836
  os: string;
1205
- }, tools: ToolInfo[], toolNamePrefix: string, instructions: string[], scripts: Record<string, string | {
837
+ }, tools: FullToolInfoV2[], toolNamePrefix: string, instructions: string[], scripts: Record<string, string | {
1206
838
  command: string;
1207
839
  description: string;
1208
840
  }>, _interactive: boolean, useNativeTool: boolean) => string;
1209
841
 
1210
842
  export declare const fullSystemPrompt_alias_3: (info: {
1211
843
  os: string;
1212
- }, tools: ToolInfo[], toolNamePrefix: string, instructions: string[], scripts: Record<string, string | {
844
+ }, tools: FullToolInfoV2[], toolNamePrefix: string, instructions: string[], scripts: Record<string, string | {
1213
845
  command: string;
1214
846
  description: string;
1215
847
  }>, useNativeTool: boolean) => string;
@@ -1290,7 +922,7 @@ export declare const getString: <T extends string>(args: Partial<Record<T, strin
1290
922
 
1291
923
  export declare const getStringArray: <T extends string>(args: Partial<Record<T, ToolParameterValue>>, name: T, defaultValue?: string[]) => string[];
1292
924
 
1293
- export declare const handler: ToolHandler<typeof toolInfo, InteractionProvider>;
925
+ export declare const handler: ToolHandler<typeof toolInfo, CommandProvider>;
1294
926
 
1295
927
  export declare const handler_alias_1: ToolHandler<typeof toolInfo_alias_1, InteractionProvider>;
1296
928
 
@@ -1300,15 +932,17 @@ export declare const handler_alias_11: ToolHandler<typeof toolInfo_alias_11, Fil
1300
932
 
1301
933
  export declare const handler_alias_12: ToolHandler<typeof toolInfo_alias_12, FilesystemProvider>;
1302
934
 
1303
- export declare const handler_alias_2: ToolHandler<typeof toolInfo_alias_2, any>;
935
+ export declare const handler_alias_13: ToolHandler<typeof toolInfo_alias_13, FilesystemProvider>;
936
+
937
+ export declare const handler_alias_2: ToolHandler<typeof toolInfo_alias_2, InteractionProvider>;
1304
938
 
1305
- export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3, CommandProvider>;
939
+ export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3, any>;
1306
940
 
1307
- export declare const handler_alias_4: ToolHandler<typeof toolInfo_alias_4, WebProvider>;
941
+ export declare const handler_alias_4: ToolHandler<typeof toolInfo_alias_4, CommandProvider>;
1308
942
 
1309
- export declare const handler_alias_5: ToolHandler<typeof toolInfo_alias_5, any>;
943
+ export declare const handler_alias_5: ToolHandler<typeof toolInfo_alias_5, WebProvider>;
1310
944
 
1311
- export declare const handler_alias_6: ToolHandler<typeof toolInfo_alias_6, FilesystemProvider>;
945
+ export declare const handler_alias_6: ToolHandler<typeof toolInfo_alias_6, any>;
1312
946
 
1313
947
  export declare const handler_alias_7: ToolHandler<typeof toolInfo_alias_7, FilesystemProvider>;
1314
948
 
@@ -1323,6 +957,18 @@ declare type Input = {
1323
957
  branchName: string;
1324
958
  };
1325
959
 
960
+ declare type Input_2 = {
961
+ pullRequestTitle?: string;
962
+ pullRequestDescription?: string;
963
+ commitMessages?: string;
964
+ commitRange?: string;
965
+ staged?: boolean;
966
+ changedFiles?: Array<{
967
+ path: string;
968
+ status: string;
969
+ }>;
970
+ };
971
+
1326
972
  declare type InteractionProvider = {
1327
973
  askFollowupQuestion?: (question: string, options: string[]) => Promise<string>;
1328
974
  attemptCompletion?: (result: string) => Promise<string | undefined>;
@@ -1331,9 +977,9 @@ export { InteractionProvider }
1331
977
  export { InteractionProvider as InteractionProvider_alias_1 }
1332
978
  export { InteractionProvider as InteractionProvider_alias_2 }
1333
979
 
1334
- export declare const isAvailable: (provider: InteractionProvider) => boolean;
980
+ export declare const isAvailable: (provider: CommandProvider) => boolean;
1335
981
 
1336
- export declare const isAvailable_alias_1: (_provider: InteractionProvider) => boolean;
982
+ export declare const isAvailable_alias_1: (provider: InteractionProvider) => boolean;
1337
983
 
1338
984
  export declare const isAvailable_alias_10: (provider: FilesystemProvider) => boolean;
1339
985
 
@@ -1341,15 +987,17 @@ export declare const isAvailable_alias_11: (provider: FilesystemProvider) => boo
1341
987
 
1342
988
  export declare const isAvailable_alias_12: (provider: FilesystemProvider) => boolean;
1343
989
 
1344
- export declare const isAvailable_alias_2: (_provider: any) => boolean;
990
+ export declare const isAvailable_alias_13: (provider: FilesystemProvider) => boolean;
1345
991
 
1346
- export declare const isAvailable_alias_3: (provider: CommandProvider) => boolean;
992
+ export declare const isAvailable_alias_2: (_provider: InteractionProvider) => boolean;
1347
993
 
1348
- export declare const isAvailable_alias_4: (provider: WebProvider) => boolean;
994
+ export declare const isAvailable_alias_3: (_provider: any) => boolean;
1349
995
 
1350
- export declare const isAvailable_alias_5: (_provider: any) => boolean;
996
+ export declare const isAvailable_alias_4: (provider: CommandProvider) => boolean;
1351
997
 
1352
- export declare const isAvailable_alias_6: (provider: FilesystemProvider) => boolean;
998
+ export declare const isAvailable_alias_5: (provider: WebProvider) => boolean;
999
+
1000
+ export declare const isAvailable_alias_6: (_provider: any) => boolean;
1353
1001
 
1354
1002
  export declare const isAvailable_alias_7: (provider: FilesystemProvider) => boolean;
1355
1003
 
@@ -1362,10 +1010,14 @@ export declare const isAvailable_alias_9: (provider: FilesystemProvider) => bool
1362
1010
  */
1363
1011
  export declare function join(...parts: string[]): string;
1364
1012
 
1365
- declare const makeAgentTool: <T extends AiToolDefinition<any, any>>(definition: T) => (agent: MultiAgent, params: GetInput<T>) => Promise<GetOutput<T>>;
1013
+ declare const makeAgentTool: <T extends AiToolDefinitionWithAgent<any, any>>(definition: T) => (options: SharedAgentOptions, params: GetInput<T>) => Promise<GetOutput<T>>;
1366
1014
  export { makeAgentTool }
1367
1015
  export { makeAgentTool as makeAgentTool_alias_1 }
1368
1016
 
1017
+ declare const makeMultiAgentTool: <T extends AiToolDefinitionWithMultiAgent<any, any>>(definition: T) => (agent: MultiAgent, params: GetInput<T>) => Promise<GetOutput<T>>;
1018
+ export { makeMultiAgentTool }
1019
+ export { makeMultiAgentTool as makeMultiAgentTool_alias_1 }
1020
+
1369
1021
  declare const makeTool: <T extends AiToolDefinition<any, any>>(definition: T) => (ai: LanguageModelV2, params: GetInput<T>, usageMeter: UsageMeter) => Promise<GetOutput<T>>;
1370
1022
  export { makeTool }
1371
1023
  export { makeTool as makeTool_alias_1 }
@@ -1429,6 +1081,11 @@ declare type Output = {
1429
1081
  description: string;
1430
1082
  };
1431
1083
 
1084
+ declare type Output_2 = {
1085
+ overview: string;
1086
+ specificReviews: SpecificReview[];
1087
+ };
1088
+
1432
1089
  /**
1433
1090
  * Parse an assistant's message into an array of text content and tool use content.
1434
1091
  *
@@ -1528,6 +1185,7 @@ export { ReplaceResult as ReplaceResult_alias_1 }
1528
1185
  declare const responsePrompts: {
1529
1186
  readonly errorInvokeTool: (tool: string, error: unknown) => string;
1530
1187
  readonly requireUseTool: "Error: No tool use detected. You MUST use a tool before proceeding.\ne.g. <tool_tool_name>tool_name</tool_tool_name>\n\nEnsure the opening and closing tags are correctly nested and closed, and that you are using the correct tool name.\nAvoid unnecessary text or symbols before or after the tool use.\nAvoid unnecessary escape characters or special characters.\n";
1188
+ readonly requireUseToolNative: "Error: No tool use detected. You MUST use a tool before proceeding.\n";
1531
1189
  readonly toolResults: (tool: string, result: UserContent_2) => Array<TextPart | ImagePart | FilePart>;
1532
1190
  readonly commandResult: (command: string, exitCode: number, stdout: string, stderr: string) => string;
1533
1191
  };
@@ -1537,6 +1195,27 @@ export { responsePrompts as responsePrompts_alias_2 }
1537
1195
 
1538
1196
  export declare const retryGuidelines = "\n====\n\nRETRY GUIDELINES\n\n1. Before Retrying\n - Analyze previous attempt's failure\n - Consider alternative approaches\n - Check if similar issues were fixed\n - Verify no new issues were introduced\n\n2. When to Retry\n - Error message changed but issue persists\n - New information available about the root cause\n - Different fixing strategy available\n - Previous attempt partially successful\n\n3. When to Stop\n - Maximum retry limit reached\n - Same error occurs repeatedly\n - Fix would require major refactoring\n - Issue requires human intervention\n\n4. After Maximum Retries\n - Document attempted solutions\n - Explain why the issue remains\n - Suggest manual intervention steps\n - Report any partial improvements";
1539
1197
 
1198
+ declare const reviewDiff: (options: SharedAgentOptions, params: {
1199
+ pullRequestTitle?: string;
1200
+ pullRequestDescription?: string;
1201
+ commitMessages?: string;
1202
+ commitRange?: string;
1203
+ staged?: boolean;
1204
+ changedFiles?: Array<{
1205
+ path: string;
1206
+ status: string;
1207
+ }>;
1208
+ }) => Promise<{
1209
+ overview: string;
1210
+ specificReviews: {
1211
+ file: string;
1212
+ lines: string;
1213
+ review: string;
1214
+ }[];
1215
+ }>;
1216
+ export { reviewDiff }
1217
+ export { reviewDiff as reviewDiff_alias_1 }
1218
+
1540
1219
  export declare const rules: (toolNamePrefix: string) => string;
1541
1220
 
1542
1221
  declare type SharedAgentOptions = {
@@ -1563,6 +1242,12 @@ export { SharedAgentOptions }
1563
1242
  export { SharedAgentOptions as SharedAgentOptions_alias_1 }
1564
1243
  export { SharedAgentOptions as SharedAgentOptions_alias_2 }
1565
1244
 
1245
+ declare type SpecificReview = {
1246
+ file: string;
1247
+ lines: string;
1248
+ review: string;
1249
+ };
1250
+
1566
1251
  declare const systemInformation: (info: {
1567
1252
  os: string;
1568
1253
  }) => string;
@@ -1646,7 +1331,7 @@ export { TaskEventKind as TaskEventKind_alias_2 }
1646
1331
  */
1647
1332
  declare interface TaskEventStartRequest extends TaskEventBase {
1648
1333
  kind: TaskEventKind.StartRequest;
1649
- userMessage: UserContent;
1334
+ userMessage: ModelMessage;
1650
1335
  }
1651
1336
  export { TaskEventStartRequest }
1652
1337
  export { TaskEventStartRequest as TaskEventStartRequest_alias_1 }
@@ -1680,6 +1365,7 @@ export { TaskEventText as TaskEventText_alias_2 }
1680
1365
  declare interface TaskEventTool extends TaskEventBase {
1681
1366
  kind: TaskEventKind.ToolUse | TaskEventKind.ToolReply | TaskEventKind.ToolInvalid | TaskEventKind.ToolError | TaskEventKind.ToolInterrupted;
1682
1367
  tool: string;
1368
+ content: any;
1683
1369
  }
1684
1370
  export { TaskEventTool }
1685
1371
  export { TaskEventTool as TaskEventTool_alias_1 }
@@ -1739,10 +1425,7 @@ export { TextContent as TextContent_alias_2 }
1739
1425
 
1740
1426
  declare type ToolExample = {
1741
1427
  description: string;
1742
- parameters: {
1743
- name: string;
1744
- value: ToolParameterValue;
1745
- }[];
1428
+ input: Record<string, ToolParameterValue>;
1746
1429
  };
1747
1430
  export { ToolExample }
1748
1431
  export { ToolExample as ToolExample_alias_1 }
@@ -1766,6 +1449,17 @@ export { ToolInfo }
1766
1449
  export { ToolInfo as ToolInfo_alias_1 }
1767
1450
 
1768
1451
  export declare const toolInfo: {
1452
+ readonly name: "git_diff";
1453
+ readonly description: "Get the git diff for the current repository. Can be used to get staged changes, unstaged changes, or changes between commits. By default, it returns unstaged changes.";
1454
+ readonly parameters: z.ZodObject<{
1455
+ staged: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1456
+ commitRange: z.ZodOptional<z.ZodString>;
1457
+ file: z.ZodOptional<z.ZodString>;
1458
+ }, z.core.$strip>;
1459
+ readonly permissionLevel: PermissionLevel.Read;
1460
+ };
1461
+
1462
+ export declare const toolInfo_alias_1: {
1769
1463
  readonly name: "ask_followup_question";
1770
1464
  readonly description: "Call this when vital details are missing. Pose each follow-up as one direct, unambiguous question. If it speeds the reply, add up to five short, mutually-exclusive answer options. Group any related questions in the same call to avoid a back-and-forth chain.";
1771
1465
  readonly parameters: z.ZodObject<{
@@ -1774,111 +1468,30 @@ export declare const toolInfo: {
1774
1468
  options: z.ZodDefault<z.ZodArray<z.ZodString>>;
1775
1469
  }, z.core.$strip>>;
1776
1470
  }, z.core.$strip>;
1777
- readonly examples: [{
1778
- readonly description: "Single clarifying question (no options)";
1779
- readonly parameters: [{
1780
- readonly name: "questions";
1781
- readonly value: {
1782
- readonly prompt: "What is the target deployment environment?";
1783
- };
1784
- }];
1785
- }, {
1786
- readonly description: "Single question with multiple-choice options";
1787
- readonly parameters: [{
1788
- readonly name: "questions";
1789
- readonly value: {
1790
- readonly prompt: "Which frontend framework are you using?";
1791
- readonly options: ["React", "Angular", "Vue", "Svelte"];
1792
- };
1793
- }];
1794
- }, {
1795
- readonly description: "Two related questions in one call";
1796
- readonly parameters: [{
1797
- readonly name: "questions";
1798
- readonly value: [{
1799
- readonly prompt: "What type of application are you building?";
1800
- }, {
1801
- readonly prompt: "Preferred programming language?";
1802
- readonly options: ["JavaScript", "TypeScript", "Python", "Java"];
1803
- }];
1804
- }];
1805
- }, {
1806
- readonly description: "Binary (yes/no) confirmation";
1807
- readonly parameters: [{
1808
- readonly name: "questions";
1809
- readonly value: {
1810
- readonly prompt: "Is it acceptable to refactor existing tests to improve performance?";
1811
- readonly options: ["Yes", "No"];
1812
- };
1813
- }];
1814
- }];
1815
1471
  readonly permissionLevel: PermissionLevel.None;
1816
1472
  };
1817
1473
 
1818
- export declare const toolInfo_alias_1: {
1819
- readonly name: "attempt_completion";
1820
- readonly description: "Use this tool when you believe the user’s requested task is complete. Indicate that your work is finished, but acknowledge the user may still provide additional instructions or questions if they want to continue. This tool MUST NOT to be used with any other tool.";
1474
+ export declare const toolInfo_alias_10: {
1475
+ readonly name: "rename_file";
1476
+ readonly description: "Request to rename a file from source path to target path.";
1821
1477
  readonly parameters: z.ZodObject<{
1822
- result: z.ZodString;
1478
+ source_path: z.ZodString;
1479
+ target_path: z.ZodString;
1823
1480
  }, z.core.$strip>;
1824
- readonly examples: [{
1825
- readonly description: "Request to present the result of the task";
1826
- readonly parameters: [{
1827
- readonly name: "result";
1828
- readonly value: "Your final result description here";
1829
- }];
1830
- }];
1831
- readonly permissionLevel: PermissionLevel.None;
1481
+ readonly permissionLevel: PermissionLevel.Write;
1832
1482
  };
1833
1483
 
1834
- export declare const toolInfo_alias_10: {
1484
+ export declare const toolInfo_alias_11: {
1835
1485
  readonly name: "replace_in_file";
1836
1486
  readonly description: "Request to replace sections of content in an existing file using SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file.";
1837
1487
  readonly parameters: z.ZodObject<{
1838
1488
  path: z.ZodString;
1839
1489
  diff: z.ZodString;
1840
1490
  }, z.core.$strip>;
1841
- readonly examples: [{
1842
- readonly description: "Request to replace sections of content in a file";
1843
- readonly parameters: [{
1844
- readonly name: "path";
1845
- readonly value: "src/main.js";
1846
- }, {
1847
- readonly name: "diff";
1848
- readonly value: "<<<<<<< SEARCH\nimport React from 'react';\n=======\nimport React, { useState } from 'react';\n>>>>>>> REPLACE\n\n<<<<<<< SEARCH\nfunction handleSubmit() {\n saveData();\n setLoading(false);\n}\n\n=======\n>>>>>>> REPLACE\n\n<<<<<<< SEARCH\nreturn (\n <div>\n=======\nfunction handleSubmit() {\n saveData();\n setLoading(false);\n}\n\nreturn (\n <div>\n>>>>>>> REPLACE";
1849
- }];
1850
- }, {
1851
- readonly description: "Request to perform a simple, single-line replacement";
1852
- readonly parameters: [{
1853
- readonly name: "path";
1854
- readonly value: "src/config.js";
1855
- }, {
1856
- readonly name: "diff";
1857
- readonly value: "<<<<<<< SEARCH\nconst API_URL = 'https://api.example.com';\n=======\nconst API_URL = 'https://api.staging.example.com';\n>>>>>>> REPLACE";
1858
- }];
1859
- }, {
1860
- readonly description: "Request to add a new function to a file";
1861
- readonly parameters: [{
1862
- readonly name: "path";
1863
- readonly value: "src/utils.js";
1864
- }, {
1865
- readonly name: "diff";
1866
- readonly value: "<<<<<<< SEARCH\nfunction helperA() {\n // ...\n}\n=======\nfunction helperA() {\n // ...\n}\n\nfunction newHelper() {\n // implementation\n}\n>>>>>>> REPLACE";
1867
- }];
1868
- }, {
1869
- readonly description: "Request to delete a block of code from a file";
1870
- readonly parameters: [{
1871
- readonly name: "path";
1872
- readonly value: "src/app.js";
1873
- }, {
1874
- readonly name: "diff";
1875
- readonly value: "<<<<<<< SEARCH\nfunction oldFeature() {\n // This is no longer needed\n}\n\n=======\n>>>>>>> REPLACE";
1876
- }];
1877
- }];
1878
1491
  readonly permissionLevel: PermissionLevel.Write;
1879
1492
  };
1880
1493
 
1881
- export declare const toolInfo_alias_11: {
1494
+ export declare const toolInfo_alias_12: {
1882
1495
  readonly name: "search_files";
1883
1496
  readonly description: "Request to perform a regex search across files in a specified directory, outputting context-rich results that include surrounding lines. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context.";
1884
1497
  readonly parameters: z.ZodObject<{
@@ -1886,43 +1499,29 @@ export declare const toolInfo_alias_11: {
1886
1499
  regex: z.ZodString;
1887
1500
  filePattern: z.ZodOptional<z.ZodString>;
1888
1501
  }, z.core.$strip>;
1889
- readonly examples: [{
1890
- readonly description: "Request to perform a regex search across files";
1891
- readonly parameters: [{
1892
- readonly name: "path";
1893
- readonly value: "src";
1894
- }, {
1895
- readonly name: "regex";
1896
- readonly value: "^components/";
1897
- }, {
1898
- readonly name: "filePattern";
1899
- readonly value: "*.ts,*.tsx";
1900
- }];
1901
- }];
1902
1502
  readonly permissionLevel: PermissionLevel.Read;
1903
1503
  };
1904
1504
 
1905
- export declare const toolInfo_alias_12: {
1505
+ export declare const toolInfo_alias_13: {
1906
1506
  readonly name: "write_to_file";
1907
1507
  readonly description: "Request to write content to a file at the specified path. If the file exists, it will be overwritten with the provided content. If the file doesn't exist, it will be created. This tool will automatically create any directories needed to write the file. Ensure that the output content does not include incorrect escaped character patterns such as `&lt;`, `&gt;`, or `&amp;`. Also ensure there is no unwanted CDATA tags in the content.";
1908
1508
  readonly parameters: z.ZodObject<{
1909
1509
  path: z.ZodString;
1910
1510
  content: z.ZodString;
1911
1511
  }, z.core.$strip>;
1912
- readonly examples: [{
1913
- readonly description: "Request to write content to a file";
1914
- readonly parameters: [{
1915
- readonly name: "path";
1916
- readonly value: "src/main.js";
1917
- }, {
1918
- readonly name: "content";
1919
- readonly value: "import React from 'react';\n\nfunction App() {\n return (\n <div>\n <h1>Hello, World!</h1>\n </div>\n );\n}\n\nexport default App;\n";
1920
- }];
1921
- }];
1922
1512
  readonly permissionLevel: PermissionLevel.Write;
1923
1513
  };
1924
1514
 
1925
1515
  export declare const toolInfo_alias_2: {
1516
+ readonly name: "attempt_completion";
1517
+ readonly description: "Use this tool when you believe the user’s requested task is complete. Indicate that your work is finished, but acknowledge the user may still provide additional instructions or questions if they want to continue. This tool MUST NOT to be used with any other tool.";
1518
+ readonly parameters: z.ZodObject<{
1519
+ result: z.ZodString;
1520
+ }, z.core.$strip>;
1521
+ readonly permissionLevel: PermissionLevel.None;
1522
+ };
1523
+
1524
+ export declare const toolInfo_alias_3: {
1926
1525
  readonly name: "delegate";
1927
1526
  readonly description: "Temporarily delegate a task to another agent and receive the result back. This tool MUST NOT to be used with any other tool.";
1928
1527
  readonly parameters: z.ZodObject<{
@@ -1931,74 +1530,29 @@ export declare const toolInfo_alias_2: {
1931
1530
  context: z.ZodString;
1932
1531
  files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
1933
1532
  }, z.core.$strip>;
1934
- readonly examples: [{
1935
- readonly description: "Delegate a code analysis task to the analyzer agent";
1936
- readonly parameters: [{
1937
- readonly name: "agentName";
1938
- readonly value: "analyzer";
1939
- }, {
1940
- readonly name: "task";
1941
- readonly value: "Analyze the authentication implementation";
1942
- }, {
1943
- readonly name: "context";
1944
- readonly value: "Need to understand the security implications of the current auth system";
1945
- }, {
1946
- readonly name: "files";
1947
- readonly value: "src/auth/login.ts,src/auth/types.ts";
1948
- }];
1949
- }];
1950
1533
  readonly permissionLevel: PermissionLevel.None;
1951
1534
  };
1952
1535
 
1953
- export declare const toolInfo_alias_3: {
1536
+ export declare const toolInfo_alias_4: {
1954
1537
  readonly name: "execute_command";
1955
1538
  readonly description: "Run a single CLI command. The command is always executed in the project-root working directory (regardless of earlier commands). Prefer one-off shell commands over wrapper scripts for flexibility. **IMPORTANT**: After an `execute_command` call, you MUST stop and NOT allowed to make further tool calls in the same message.";
1956
1539
  readonly parameters: z.ZodObject<{
1957
1540
  command: z.ZodString;
1958
1541
  requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1959
1542
  }, z.core.$strip>;
1960
- readonly examples: [{
1961
- readonly description: "Make a build";
1962
- readonly parameters: [{
1963
- readonly name: "command";
1964
- readonly value: "npm run build";
1965
- }, {
1966
- readonly name: "requiresApproval";
1967
- readonly value: "false";
1968
- }];
1969
- }];
1970
1543
  readonly permissionLevel: PermissionLevel.Arbitrary;
1971
1544
  };
1972
1545
 
1973
- export declare const toolInfo_alias_4: {
1546
+ export declare const toolInfo_alias_5: {
1974
1547
  readonly name: "fetch_url";
1975
1548
  readonly description: "Fetch the content located at one or more HTTP(S) URLs and return it in Markdown format. This works for standard web pages as well as raw files (e.g. README.md, source code) hosted on platforms like GitHub.";
1976
1549
  readonly parameters: z.ZodObject<{
1977
1550
  url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
1978
1551
  }, z.core.$strip>;
1979
- readonly examples: [{
1980
- readonly description: "Fetch a single webpage";
1981
- readonly parameters: [{
1982
- readonly name: "url";
1983
- readonly value: "https://example.com";
1984
- }];
1985
- }, {
1986
- readonly description: "Fetch multiple webpages";
1987
- readonly parameters: [{
1988
- readonly name: "url";
1989
- readonly value: "https://example.com,https://developer.mozilla.org/en-US/docs/Web/HTTP";
1990
- }];
1991
- }, {
1992
- readonly description: "Fetch a raw file from GitHub";
1993
- readonly parameters: [{
1994
- readonly name: "url";
1995
- readonly value: "https://raw.githubusercontent.com/user/repo/main/README.md";
1996
- }];
1997
- }];
1998
1552
  readonly permissionLevel: PermissionLevel.Read;
1999
1553
  };
2000
1554
 
2001
- export declare const toolInfo_alias_5: {
1555
+ export declare const toolInfo_alias_6: {
2002
1556
  readonly name: "hand_over";
2003
1557
  readonly description: "Hand over the current task to another agent to complete. This tool MUST NOT to be used with any other tool.";
2004
1558
  readonly parameters: z.ZodObject<{
@@ -2007,26 +1561,10 @@ export declare const toolInfo_alias_5: {
2007
1561
  context: z.ZodString;
2008
1562
  files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
2009
1563
  }, z.core.$strip>;
2010
- readonly examples: [{
2011
- readonly description: "Hand over a coding task to the coder agent";
2012
- readonly parameters: [{
2013
- readonly name: "agentName";
2014
- readonly value: "coder";
2015
- }, {
2016
- readonly name: "task";
2017
- readonly value: "Implement the login feature";
2018
- }, {
2019
- readonly name: "context";
2020
- readonly value: "We need a secure login system with email and password";
2021
- }, {
2022
- readonly name: "files";
2023
- readonly value: "src/auth/login.ts,src/auth/types.ts";
2024
- }];
2025
- }];
2026
1564
  readonly permissionLevel: PermissionLevel.None;
2027
1565
  };
2028
1566
 
2029
- export declare const toolInfo_alias_6: {
1567
+ export declare const toolInfo_alias_7: {
2030
1568
  readonly name: "list_files";
2031
1569
  readonly description: "Request to list files and directories within the specified directory. If recursive is true, it will list all files and directories recursively. If recursive is false or not provided, it will only list the top-level contents. Do not use this tool to confirm the existence of files you may have created, as the user will let you know if the files were created successfully or not.";
2032
1570
  readonly parameters: z.ZodObject<{
@@ -2034,74 +1572,24 @@ export declare const toolInfo_alias_6: {
2034
1572
  maxCount: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
2035
1573
  recursive: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
2036
1574
  }, z.core.$strip>;
2037
- readonly examples: [{
2038
- readonly description: "Request to list files";
2039
- readonly parameters: [{
2040
- readonly name: "path";
2041
- readonly value: "src";
2042
- }, {
2043
- readonly name: "maxCount";
2044
- readonly value: "100";
2045
- }];
2046
- }];
2047
1575
  readonly permissionLevel: PermissionLevel.Read;
2048
1576
  };
2049
1577
 
2050
- export declare const toolInfo_alias_7: {
1578
+ export declare const toolInfo_alias_8: {
2051
1579
  readonly name: "read_file";
2052
1580
  readonly description: "Request to read the contents of one or multiple files at the specified paths. Use comma separated paths to read multiple files. Use this when you need to examine the contents of an existing file you do not know the contents of, for example to analyze code, review text files, or extract information from configuration files. May not be suitable for other types of binary files, as it returns the raw content as a string. Try to list all the potential files are relevent to the task, and then use this tool to read all the relevant files.";
2053
1581
  readonly parameters: z.ZodObject<{
2054
1582
  path: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
2055
1583
  }, z.core.$strip>;
2056
- readonly examples: [{
2057
- readonly description: "Request to read the contents of a file";
2058
- readonly parameters: [{
2059
- readonly name: "path";
2060
- readonly value: "src/main.js";
2061
- }];
2062
- }, {
2063
- readonly description: "Request to read multiple files";
2064
- readonly parameters: [{
2065
- readonly name: "path";
2066
- readonly value: "src/main.js,src/index.js";
2067
- }];
2068
- }];
2069
1584
  readonly permissionLevel: PermissionLevel.Read;
2070
1585
  };
2071
1586
 
2072
- export declare const toolInfo_alias_8: {
1587
+ export declare const toolInfo_alias_9: {
2073
1588
  readonly name: "remove_file";
2074
1589
  readonly description: "Request to remove a file at the specified path.";
2075
1590
  readonly parameters: z.ZodObject<{
2076
1591
  path: z.ZodString;
2077
1592
  }, z.core.$strip>;
2078
- readonly examples: [{
2079
- readonly description: "Request to remove a file";
2080
- readonly parameters: [{
2081
- readonly name: "path";
2082
- readonly value: "src/main.js";
2083
- }];
2084
- }];
2085
- readonly permissionLevel: PermissionLevel.Write;
2086
- };
2087
-
2088
- export declare const toolInfo_alias_9: {
2089
- readonly name: "rename_file";
2090
- readonly description: "Request to rename a file from source path to target path.";
2091
- readonly parameters: z.ZodObject<{
2092
- source_path: z.ZodString;
2093
- target_path: z.ZodString;
2094
- }, z.core.$strip>;
2095
- readonly examples: [{
2096
- readonly description: "Request to rename a file";
2097
- readonly parameters: [{
2098
- readonly name: "source_path";
2099
- readonly value: "src/old-name.js";
2100
- }, {
2101
- readonly name: "target_path";
2102
- readonly value: "src/new-name.js";
2103
- }];
2104
- }];
2105
1593
  readonly permissionLevel: PermissionLevel.Write;
2106
1594
  };
2107
1595
 
@@ -2109,7 +1597,6 @@ declare type ToolInfoV2 = {
2109
1597
  name: string;
2110
1598
  description: string;
2111
1599
  parameters: z.ZodObject<any>;
2112
- examples?: ToolExample[];
2113
1600
  permissionLevel: PermissionLevel;
2114
1601
  };
2115
1602
  export { ToolInfoV2 }
@@ -2195,10 +1682,12 @@ declare type ToolResponseOrToolPause = {
2195
1682
  type: 'response';
2196
1683
  tool: string;
2197
1684
  response: UserContent;
1685
+ id?: string;
2198
1686
  } | {
2199
1687
  type: 'pause';
2200
1688
  tool: string;
2201
1689
  object: any;
1690
+ id?: string;
2202
1691
  };
2203
1692
  export { ToolResponseOrToolPause }
2204
1693
  export { ToolResponseOrToolPause as ToolResponseOrToolPause_alias_1 }
@@ -2232,6 +1721,7 @@ export { ToolResponseType }
2232
1721
  export { ToolResponseType as ToolResponseType_alias_1 }
2233
1722
 
2234
1723
  declare interface ToolUse {
1724
+ id?: string;
2235
1725
  type: 'tool_use';
2236
1726
  name: string;
2237
1727
  params: Record<string, any>;
@@ -2240,7 +1730,7 @@ export { ToolUse }
2240
1730
  export { ToolUse as ToolUse_alias_1 }
2241
1731
  export { ToolUse as ToolUse_alias_2 }
2242
1732
 
2243
- declare const toolUsePrompt: (tools: ToolInfo[], toolNamePrefix: string) => string;
1733
+ declare const toolUsePrompt: (tools: FullToolInfoV2[], toolNamePrefix: string) => string;
2244
1734
  export { toolUsePrompt }
2245
1735
  export { toolUsePrompt as toolUsePrompt_alias_1 }
2246
1736
  export { toolUsePrompt as toolUsePrompt_alias_2 }