@polka-codes/core 0.8.10 → 0.8.12
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.
- package/dist/_tsup-dts-rollup.d.ts +668 -423
- package/dist/index.d.ts +4 -2
- package/dist/index.js +600 -342
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ declare abstract class AgentBase {
|
|
|
8
8
|
protected readonly config: Readonly<AgentBaseConfig>;
|
|
9
9
|
protected readonly handlers: Record<string, FullToolInfo>;
|
|
10
10
|
constructor(name: string, ai: AiServiceBase, config: AgentBaseConfig);
|
|
11
|
+
get parameters(): Readonly<any>;
|
|
11
12
|
get messages(): Readonly<MessageParam[]>;
|
|
12
13
|
setMessages(messages: Readonly<MessageParam[]>): void;
|
|
13
14
|
start(prompt: string): Promise<ExitReason>;
|
|
@@ -80,6 +81,7 @@ declare type AgentPolicyInstance = {
|
|
|
80
81
|
prompt?: string;
|
|
81
82
|
updateResponse?: (response: AssistantMessageContent[]) => Promise<AssistantMessageContent[]>;
|
|
82
83
|
onBeforeInvokeTool?: (name: string, args: Record<string, string>) => Promise<ToolResponse | undefined>;
|
|
84
|
+
onBeforeRequest?: (agent: AgentBase) => Promise<void>;
|
|
83
85
|
};
|
|
84
86
|
export { AgentPolicyInstance }
|
|
85
87
|
export { AgentPolicyInstance as AgentPolicyInstance_alias_1 }
|
|
@@ -92,7 +94,8 @@ export { agentsPrompt as agentsPrompt_alias_2 }
|
|
|
92
94
|
|
|
93
95
|
declare abstract class AiServiceBase {
|
|
94
96
|
readonly usageMeter: UsageMeter;
|
|
95
|
-
|
|
97
|
+
readonly options: AiServiceOptions;
|
|
98
|
+
constructor(options: AiServiceOptions);
|
|
96
99
|
abstract get model(): {
|
|
97
100
|
provider: string;
|
|
98
101
|
id: string;
|
|
@@ -161,20 +164,19 @@ export { allAgents as allAgents_alias_1 }
|
|
|
161
164
|
|
|
162
165
|
export declare namespace allTools {
|
|
163
166
|
export {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
_default_5 as listCodeDefinitionNames,
|
|
167
|
+
_default_2 as askFollowupQuestion,
|
|
168
|
+
_default_3 as attemptCompletion,
|
|
169
|
+
_default_4 as delegate,
|
|
170
|
+
_default_5 as executeCommand,
|
|
169
171
|
_default_6 as listFiles,
|
|
170
172
|
_default_7 as readFile,
|
|
171
|
-
_default_8 as
|
|
172
|
-
_default_9 as
|
|
173
|
-
_default_10 as
|
|
174
|
-
_default_11 as
|
|
175
|
-
_default_12 as
|
|
176
|
-
_default_13 as
|
|
177
|
-
_default_14 as
|
|
173
|
+
_default_8 as searchFiles,
|
|
174
|
+
_default_9 as updateKnowledge,
|
|
175
|
+
_default_10 as writeToFile,
|
|
176
|
+
_default_11 as handOver,
|
|
177
|
+
_default_12 as removeFile,
|
|
178
|
+
_default_13 as renameFile,
|
|
179
|
+
_default_14 as editFile
|
|
178
180
|
}
|
|
179
181
|
}
|
|
180
182
|
|
|
@@ -773,265 +775,62 @@ export declare class DeepSeekService extends AiServiceBase {
|
|
|
773
775
|
|
|
774
776
|
declare const _default: {
|
|
775
777
|
handler: ToolHandler<{
|
|
776
|
-
readonly name: "
|
|
777
|
-
readonly description: "
|
|
778
|
-
readonly parameters: [{
|
|
779
|
-
readonly name: "questions";
|
|
780
|
-
readonly description: "One or more follow-up questions you need answered before you can continue.";
|
|
781
|
-
readonly required: true;
|
|
782
|
-
readonly allowMultiple: true;
|
|
783
|
-
readonly usageValue: "questions here";
|
|
784
|
-
readonly children: [{
|
|
785
|
-
readonly name: "prompt";
|
|
786
|
-
readonly description: "The text of the question.";
|
|
787
|
-
readonly required: true;
|
|
788
|
-
readonly usageValue: "question text here";
|
|
789
|
-
}, {
|
|
790
|
-
readonly name: "options";
|
|
791
|
-
readonly description: "Ordered list of suggested answers (omit if none).";
|
|
792
|
-
readonly required: false;
|
|
793
|
-
readonly allowMultiple: true;
|
|
794
|
-
readonly usageValue: "suggested answer here";
|
|
795
|
-
}];
|
|
796
|
-
}];
|
|
797
|
-
readonly examples: [{
|
|
798
|
-
readonly description: "Single clarifying question (no options)";
|
|
799
|
-
readonly parameters: [{
|
|
800
|
-
readonly name: "questions";
|
|
801
|
-
readonly value: {
|
|
802
|
-
readonly prompt: "What is the target deployment environment?";
|
|
803
|
-
};
|
|
804
|
-
}];
|
|
805
|
-
}, {
|
|
806
|
-
readonly description: "Single question with multiple-choice options";
|
|
807
|
-
readonly parameters: [{
|
|
808
|
-
readonly name: "questions";
|
|
809
|
-
readonly value: {
|
|
810
|
-
readonly prompt: "Which frontend framework are you using?";
|
|
811
|
-
readonly options: ["React", "Angular", "Vue", "Svelte"];
|
|
812
|
-
};
|
|
813
|
-
}];
|
|
814
|
-
}, {
|
|
815
|
-
readonly description: "Two related questions in one call";
|
|
816
|
-
readonly parameters: [{
|
|
817
|
-
readonly name: "questions";
|
|
818
|
-
readonly value: [{
|
|
819
|
-
readonly prompt: "What type of application are you building?";
|
|
820
|
-
}, {
|
|
821
|
-
readonly prompt: "Preferred programming language?";
|
|
822
|
-
readonly options: ["JavaScript", "TypeScript", "Python", "Java"];
|
|
823
|
-
}];
|
|
824
|
-
}];
|
|
825
|
-
}, {
|
|
826
|
-
readonly description: "Binary (yes/no) confirmation";
|
|
827
|
-
readonly parameters: [{
|
|
828
|
-
readonly name: "questions";
|
|
829
|
-
readonly value: {
|
|
830
|
-
readonly prompt: "Is it acceptable to refactor existing tests to improve performance?";
|
|
831
|
-
readonly options: ["Yes", "No"];
|
|
832
|
-
};
|
|
833
|
-
}];
|
|
834
|
-
}];
|
|
835
|
-
readonly permissionLevel: PermissionLevel.None;
|
|
836
|
-
}, InteractionProvider>;
|
|
837
|
-
isAvailable: (provider: InteractionProvider) => boolean;
|
|
838
|
-
name: "ask_followup_question";
|
|
839
|
-
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.";
|
|
840
|
-
parameters: [{
|
|
841
|
-
readonly name: "questions";
|
|
842
|
-
readonly description: "One or more follow-up questions you need answered before you can continue.";
|
|
843
|
-
readonly required: true;
|
|
844
|
-
readonly allowMultiple: true;
|
|
845
|
-
readonly usageValue: "questions here";
|
|
846
|
-
readonly children: [{
|
|
847
|
-
readonly name: "prompt";
|
|
848
|
-
readonly description: "The text of the question.";
|
|
849
|
-
readonly required: true;
|
|
850
|
-
readonly usageValue: "question text here";
|
|
851
|
-
}, {
|
|
852
|
-
readonly name: "options";
|
|
853
|
-
readonly description: "Ordered list of suggested answers (omit if none).";
|
|
854
|
-
readonly required: false;
|
|
855
|
-
readonly allowMultiple: true;
|
|
856
|
-
readonly usageValue: "suggested answer here";
|
|
857
|
-
}];
|
|
858
|
-
}];
|
|
859
|
-
examples: [{
|
|
860
|
-
readonly description: "Single clarifying question (no options)";
|
|
861
|
-
readonly parameters: [{
|
|
862
|
-
readonly name: "questions";
|
|
863
|
-
readonly value: {
|
|
864
|
-
readonly prompt: "What is the target deployment environment?";
|
|
865
|
-
};
|
|
866
|
-
}];
|
|
867
|
-
}, {
|
|
868
|
-
readonly description: "Single question with multiple-choice options";
|
|
869
|
-
readonly parameters: [{
|
|
870
|
-
readonly name: "questions";
|
|
871
|
-
readonly value: {
|
|
872
|
-
readonly prompt: "Which frontend framework are you using?";
|
|
873
|
-
readonly options: ["React", "Angular", "Vue", "Svelte"];
|
|
874
|
-
};
|
|
875
|
-
}];
|
|
876
|
-
}, {
|
|
877
|
-
readonly description: "Two related questions in one call";
|
|
878
|
-
readonly parameters: [{
|
|
879
|
-
readonly name: "questions";
|
|
880
|
-
readonly value: [{
|
|
881
|
-
readonly prompt: "What type of application are you building?";
|
|
882
|
-
}, {
|
|
883
|
-
readonly prompt: "Preferred programming language?";
|
|
884
|
-
readonly options: ["JavaScript", "TypeScript", "Python", "Java"];
|
|
885
|
-
}];
|
|
886
|
-
}];
|
|
887
|
-
}, {
|
|
888
|
-
readonly description: "Binary (yes/no) confirmation";
|
|
889
|
-
readonly parameters: [{
|
|
890
|
-
readonly name: "questions";
|
|
891
|
-
readonly value: {
|
|
892
|
-
readonly prompt: "Is it acceptable to refactor existing tests to improve performance?";
|
|
893
|
-
readonly options: ["Yes", "No"];
|
|
894
|
-
};
|
|
895
|
-
}];
|
|
896
|
-
}];
|
|
897
|
-
permissionLevel: PermissionLevel.None;
|
|
898
|
-
};
|
|
899
|
-
export { _default as askFollowupQuestion }
|
|
900
|
-
export { _default as askFollowupQuestion_alias_1 }
|
|
901
|
-
export { _default as askFollowupQuestion_alias_2 }
|
|
902
|
-
export { _default as default_alias_4 }
|
|
903
|
-
|
|
904
|
-
declare const _default_10: {
|
|
905
|
-
handler: ToolHandler<{
|
|
906
|
-
readonly name: "update_knowledge";
|
|
907
|
-
readonly description: "Update knowledge in a knowledge.ai.yml file with smart merging capabilities. This tool lets you add, update, or remove information using path-based updates and special directives.";
|
|
778
|
+
readonly name: "replace_in_file";
|
|
779
|
+
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.";
|
|
908
780
|
readonly parameters: [{
|
|
909
781
|
readonly name: "path";
|
|
910
|
-
readonly description: "
|
|
782
|
+
readonly description: "The path of the file to modify";
|
|
911
783
|
readonly required: true;
|
|
912
|
-
readonly usageValue: "
|
|
784
|
+
readonly usageValue: "File path here";
|
|
913
785
|
}, {
|
|
914
|
-
readonly name: "
|
|
915
|
-
readonly description: "
|
|
786
|
+
readonly name: "diff";
|
|
787
|
+
readonly description: "One or more SEARCH/REPLACE blocks following this exact format:\n ```\n <<<<<<< SEARCH\n [exact content to find]\n =======\n [new content to replace with]\n >>>>>>> REPLACE\n ```\n Critical rules:\n 1. SEARCH content must match the associated file section to find EXACTLY:\n * Match character-for-character including whitespace, indentation, line endings\n * Include all comments, docstrings, etc.\n 2. SEARCH/REPLACE blocks will ONLY replace the first match occurrence.\n * Including multiple unique SEARCH/REPLACE blocks if you need to make multiple changes.\n * Include *just* enough lines in each SEARCH section to uniquely match each set of lines that need to change.\n * When using multiple SEARCH/REPLACE blocks, list them in the order they appear in the file.\n 3. Keep SEARCH/REPLACE blocks concise:\n * Break large SEARCH/REPLACE blocks into a series of smaller blocks that each change a small portion of the file.\n * Include just the changing lines, and a few surrounding lines if needed for uniqueness.\n * Do not include long runs of unchanging lines in SEARCH/REPLACE blocks.\n * Each line must be complete. Never truncate lines mid-way through as this can cause matching failures.\n 4. Special operations:\n * To move code: Use two SEARCH/REPLACE blocks (one to delete from original + one to insert at new location)\n * To delete code: Use empty REPLACE section";
|
|
916
788
|
readonly required: true;
|
|
917
|
-
readonly usageValue: "
|
|
789
|
+
readonly usageValue: "Search and replace blocks here";
|
|
918
790
|
}];
|
|
919
791
|
readonly examples: [{
|
|
920
|
-
readonly description: "
|
|
921
|
-
readonly parameters: [{
|
|
922
|
-
readonly name: "path";
|
|
923
|
-
readonly value: "src/utils";
|
|
924
|
-
}, {
|
|
925
|
-
readonly name: "knowledge";
|
|
926
|
-
readonly value: "files:\n \"newFile.ts\":\n description: \"A new utility file\"\n api:\n functions:\n 1:\n name: \"processData\"\n params:\n 1: { name: \"data\", type: \"object\" }\n returns: \"object\"";
|
|
927
|
-
}];
|
|
928
|
-
}, {
|
|
929
|
-
readonly description: "Update an existing file description";
|
|
930
|
-
readonly parameters: [{
|
|
931
|
-
readonly name: "path";
|
|
932
|
-
readonly value: "src/utils";
|
|
933
|
-
}, {
|
|
934
|
-
readonly name: "knowledge";
|
|
935
|
-
readonly value: "files:\n \"existingFile.ts\":\n description: \"Updated description for the file\"";
|
|
936
|
-
}];
|
|
937
|
-
}, {
|
|
938
|
-
readonly description: "Add a new rule";
|
|
939
|
-
readonly parameters: [{
|
|
940
|
-
readonly name: "path";
|
|
941
|
-
readonly value: "src";
|
|
942
|
-
}, {
|
|
943
|
-
readonly name: "knowledge";
|
|
944
|
-
readonly value: "rules:\n 10: \"New rule to follow\"";
|
|
945
|
-
}];
|
|
946
|
-
}, {
|
|
947
|
-
readonly description: "Remove a rule";
|
|
948
|
-
readonly parameters: [{
|
|
949
|
-
readonly name: "path";
|
|
950
|
-
readonly value: "src";
|
|
951
|
-
}, {
|
|
952
|
-
readonly name: "knowledge";
|
|
953
|
-
readonly value: "rules:\n 5: null";
|
|
954
|
-
}];
|
|
955
|
-
}, {
|
|
956
|
-
readonly description: "Update nested properties using dot notation";
|
|
792
|
+
readonly description: "Request to replace sections of content in a file";
|
|
957
793
|
readonly parameters: [{
|
|
958
794
|
readonly name: "path";
|
|
959
|
-
readonly value: "src/
|
|
795
|
+
readonly value: "src/main.js";
|
|
960
796
|
}, {
|
|
961
|
-
readonly name: "
|
|
962
|
-
readonly value: "
|
|
797
|
+
readonly name: "diff";
|
|
798
|
+
readonly value: "\n<<<<<<< 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\n";
|
|
963
799
|
}];
|
|
964
800
|
}];
|
|
965
801
|
readonly permissionLevel: PermissionLevel.Write;
|
|
966
802
|
}, FilesystemProvider>;
|
|
967
803
|
isAvailable: (provider: FilesystemProvider) => boolean;
|
|
968
|
-
name: "
|
|
969
|
-
description: "
|
|
804
|
+
name: "replace_in_file";
|
|
805
|
+
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.";
|
|
970
806
|
parameters: [{
|
|
971
807
|
readonly name: "path";
|
|
972
|
-
readonly description: "
|
|
808
|
+
readonly description: "The path of the file to modify";
|
|
973
809
|
readonly required: true;
|
|
974
|
-
readonly usageValue: "
|
|
810
|
+
readonly usageValue: "File path here";
|
|
975
811
|
}, {
|
|
976
|
-
readonly name: "
|
|
977
|
-
readonly description: "
|
|
812
|
+
readonly name: "diff";
|
|
813
|
+
readonly description: "One or more SEARCH/REPLACE blocks following this exact format:\n ```\n <<<<<<< SEARCH\n [exact content to find]\n =======\n [new content to replace with]\n >>>>>>> REPLACE\n ```\n Critical rules:\n 1. SEARCH content must match the associated file section to find EXACTLY:\n * Match character-for-character including whitespace, indentation, line endings\n * Include all comments, docstrings, etc.\n 2. SEARCH/REPLACE blocks will ONLY replace the first match occurrence.\n * Including multiple unique SEARCH/REPLACE blocks if you need to make multiple changes.\n * Include *just* enough lines in each SEARCH section to uniquely match each set of lines that need to change.\n * When using multiple SEARCH/REPLACE blocks, list them in the order they appear in the file.\n 3. Keep SEARCH/REPLACE blocks concise:\n * Break large SEARCH/REPLACE blocks into a series of smaller blocks that each change a small portion of the file.\n * Include just the changing lines, and a few surrounding lines if needed for uniqueness.\n * Do not include long runs of unchanging lines in SEARCH/REPLACE blocks.\n * Each line must be complete. Never truncate lines mid-way through as this can cause matching failures.\n 4. Special operations:\n * To move code: Use two SEARCH/REPLACE blocks (one to delete from original + one to insert at new location)\n * To delete code: Use empty REPLACE section";
|
|
978
814
|
readonly required: true;
|
|
979
|
-
readonly usageValue: "
|
|
815
|
+
readonly usageValue: "Search and replace blocks here";
|
|
980
816
|
}];
|
|
981
817
|
examples: [{
|
|
982
|
-
readonly description: "
|
|
983
|
-
readonly parameters: [{
|
|
984
|
-
readonly name: "path";
|
|
985
|
-
readonly value: "src/utils";
|
|
986
|
-
}, {
|
|
987
|
-
readonly name: "knowledge";
|
|
988
|
-
readonly value: "files:\n \"newFile.ts\":\n description: \"A new utility file\"\n api:\n functions:\n 1:\n name: \"processData\"\n params:\n 1: { name: \"data\", type: \"object\" }\n returns: \"object\"";
|
|
989
|
-
}];
|
|
990
|
-
}, {
|
|
991
|
-
readonly description: "Update an existing file description";
|
|
992
|
-
readonly parameters: [{
|
|
993
|
-
readonly name: "path";
|
|
994
|
-
readonly value: "src/utils";
|
|
995
|
-
}, {
|
|
996
|
-
readonly name: "knowledge";
|
|
997
|
-
readonly value: "files:\n \"existingFile.ts\":\n description: \"Updated description for the file\"";
|
|
998
|
-
}];
|
|
999
|
-
}, {
|
|
1000
|
-
readonly description: "Add a new rule";
|
|
1001
|
-
readonly parameters: [{
|
|
1002
|
-
readonly name: "path";
|
|
1003
|
-
readonly value: "src";
|
|
1004
|
-
}, {
|
|
1005
|
-
readonly name: "knowledge";
|
|
1006
|
-
readonly value: "rules:\n 10: \"New rule to follow\"";
|
|
1007
|
-
}];
|
|
1008
|
-
}, {
|
|
1009
|
-
readonly description: "Remove a rule";
|
|
1010
|
-
readonly parameters: [{
|
|
1011
|
-
readonly name: "path";
|
|
1012
|
-
readonly value: "src";
|
|
1013
|
-
}, {
|
|
1014
|
-
readonly name: "knowledge";
|
|
1015
|
-
readonly value: "rules:\n 5: null";
|
|
1016
|
-
}];
|
|
1017
|
-
}, {
|
|
1018
|
-
readonly description: "Update nested properties using dot notation";
|
|
818
|
+
readonly description: "Request to replace sections of content in a file";
|
|
1019
819
|
readonly parameters: [{
|
|
1020
820
|
readonly name: "path";
|
|
1021
|
-
readonly value: "src/
|
|
821
|
+
readonly value: "src/main.js";
|
|
1022
822
|
}, {
|
|
1023
|
-
readonly name: "
|
|
1024
|
-
readonly value: "
|
|
823
|
+
readonly name: "diff";
|
|
824
|
+
readonly value: "\n<<<<<<< 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\n";
|
|
1025
825
|
}];
|
|
1026
826
|
}];
|
|
1027
827
|
permissionLevel: PermissionLevel.Write;
|
|
1028
828
|
};
|
|
1029
|
-
export {
|
|
1030
|
-
export {
|
|
1031
|
-
export {
|
|
1032
|
-
export { _default_10 as updateKnowledge_alias_2 }
|
|
829
|
+
export { _default as default_alias_14 }
|
|
830
|
+
export { _default as replaceInFile }
|
|
831
|
+
export { _default as replaceInFile_alias_1 }
|
|
1033
832
|
|
|
1034
|
-
declare const
|
|
833
|
+
declare const _default_10: {
|
|
1035
834
|
handler: ToolHandler<{
|
|
1036
835
|
readonly name: "write_to_file";
|
|
1037
836
|
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 `<` and `>`.";
|
|
@@ -1084,12 +883,12 @@ declare const _default_11: {
|
|
|
1084
883
|
}];
|
|
1085
884
|
permissionLevel: PermissionLevel.Write;
|
|
1086
885
|
};
|
|
1087
|
-
export {
|
|
1088
|
-
export {
|
|
1089
|
-
export {
|
|
1090
|
-
export {
|
|
886
|
+
export { _default_10 as default_alias_17 }
|
|
887
|
+
export { _default_10 as writeToFile }
|
|
888
|
+
export { _default_10 as writeToFile_alias_1 }
|
|
889
|
+
export { _default_10 as writeToFile_alias_2 }
|
|
1091
890
|
|
|
1092
|
-
declare const
|
|
891
|
+
declare const _default_11: {
|
|
1093
892
|
handler: ToolHandler<{
|
|
1094
893
|
readonly name: "hand_over";
|
|
1095
894
|
readonly description: "Hand over the current task to another agent to complete. This tool MUST NOT to be used with any other tool.";
|
|
@@ -1174,12 +973,12 @@ declare const _default_12: {
|
|
|
1174
973
|
}];
|
|
1175
974
|
permissionLevel: PermissionLevel.None;
|
|
1176
975
|
};
|
|
1177
|
-
export {
|
|
1178
|
-
export {
|
|
1179
|
-
export {
|
|
1180
|
-
export {
|
|
976
|
+
export { _default_11 as default_alias_9 }
|
|
977
|
+
export { _default_11 as handOver }
|
|
978
|
+
export { _default_11 as handOver_alias_1 }
|
|
979
|
+
export { _default_11 as handOver_alias_2 }
|
|
1181
980
|
|
|
1182
|
-
declare const
|
|
981
|
+
declare const _default_12: {
|
|
1183
982
|
handler: ToolHandler<{
|
|
1184
983
|
readonly name: "remove_file";
|
|
1185
984
|
readonly description: "Request to remove a file at the specified path.";
|
|
@@ -1216,22 +1015,22 @@ declare const _default_13: {
|
|
|
1216
1015
|
}];
|
|
1217
1016
|
permissionLevel: PermissionLevel.Write;
|
|
1218
1017
|
};
|
|
1219
|
-
export {
|
|
1220
|
-
export {
|
|
1221
|
-
export {
|
|
1222
|
-
export {
|
|
1018
|
+
export { _default_12 as default_alias_12 }
|
|
1019
|
+
export { _default_12 as removeFile }
|
|
1020
|
+
export { _default_12 as removeFile_alias_1 }
|
|
1021
|
+
export { _default_12 as removeFile_alias_2 }
|
|
1223
1022
|
|
|
1224
|
-
declare const
|
|
1023
|
+
declare const _default_13: {
|
|
1225
1024
|
handler: ToolHandler<{
|
|
1226
1025
|
readonly name: "rename_file";
|
|
1227
1026
|
readonly description: "Request to rename a file from source path to target path.";
|
|
1228
1027
|
readonly parameters: [{
|
|
1229
|
-
readonly name: "
|
|
1028
|
+
readonly name: "source_path";
|
|
1230
1029
|
readonly description: "The current path of the file";
|
|
1231
1030
|
readonly required: true;
|
|
1232
1031
|
readonly usageValue: "Source file path here";
|
|
1233
1032
|
}, {
|
|
1234
|
-
readonly name: "
|
|
1033
|
+
readonly name: "target_path";
|
|
1235
1034
|
readonly description: "The new path for the file";
|
|
1236
1035
|
readonly required: true;
|
|
1237
1036
|
readonly usageValue: "Target file path here";
|
|
@@ -1239,10 +1038,10 @@ declare const _default_14: {
|
|
|
1239
1038
|
readonly examples: [{
|
|
1240
1039
|
readonly description: "Request to rename a file";
|
|
1241
1040
|
readonly parameters: [{
|
|
1242
|
-
readonly name: "
|
|
1041
|
+
readonly name: "source_path";
|
|
1243
1042
|
readonly value: "src/old-name.js";
|
|
1244
1043
|
}, {
|
|
1245
|
-
readonly name: "
|
|
1044
|
+
readonly name: "target_path";
|
|
1246
1045
|
readonly value: "src/new-name.js";
|
|
1247
1046
|
}];
|
|
1248
1047
|
}];
|
|
@@ -1252,12 +1051,12 @@ declare const _default_14: {
|
|
|
1252
1051
|
name: "rename_file";
|
|
1253
1052
|
description: "Request to rename a file from source path to target path.";
|
|
1254
1053
|
parameters: [{
|
|
1255
|
-
readonly name: "
|
|
1054
|
+
readonly name: "source_path";
|
|
1256
1055
|
readonly description: "The current path of the file";
|
|
1257
1056
|
readonly required: true;
|
|
1258
1057
|
readonly usageValue: "Source file path here";
|
|
1259
1058
|
}, {
|
|
1260
|
-
readonly name: "
|
|
1059
|
+
readonly name: "target_path";
|
|
1261
1060
|
readonly description: "The new path for the file";
|
|
1262
1061
|
readonly required: true;
|
|
1263
1062
|
readonly usageValue: "Target file path here";
|
|
@@ -1265,21 +1064,331 @@ declare const _default_14: {
|
|
|
1265
1064
|
examples: [{
|
|
1266
1065
|
readonly description: "Request to rename a file";
|
|
1267
1066
|
readonly parameters: [{
|
|
1268
|
-
readonly name: "
|
|
1067
|
+
readonly name: "source_path";
|
|
1269
1068
|
readonly value: "src/old-name.js";
|
|
1270
1069
|
}, {
|
|
1271
|
-
readonly name: "
|
|
1070
|
+
readonly name: "target_path";
|
|
1272
1071
|
readonly value: "src/new-name.js";
|
|
1273
1072
|
}];
|
|
1274
1073
|
}];
|
|
1275
1074
|
permissionLevel: PermissionLevel.Write;
|
|
1276
1075
|
};
|
|
1277
|
-
export {
|
|
1278
|
-
export {
|
|
1279
|
-
export {
|
|
1280
|
-
export {
|
|
1076
|
+
export { _default_13 as default_alias_13 }
|
|
1077
|
+
export { _default_13 as renameFile }
|
|
1078
|
+
export { _default_13 as renameFile_alias_1 }
|
|
1079
|
+
export { _default_13 as renameFile_alias_2 }
|
|
1080
|
+
|
|
1081
|
+
declare const _default_14: {
|
|
1082
|
+
handler: ToolHandler<{
|
|
1083
|
+
readonly name: "edit_file";
|
|
1084
|
+
readonly description: "Request to edit file contents using before/after text anchors with flexible operations. Supports multiple edit operations in a single call.";
|
|
1085
|
+
readonly parameters: [{
|
|
1086
|
+
readonly name: "path";
|
|
1087
|
+
readonly description: "The path of the file to edit";
|
|
1088
|
+
readonly required: true;
|
|
1089
|
+
readonly usageValue: "File path here";
|
|
1090
|
+
}, {
|
|
1091
|
+
readonly name: "operations";
|
|
1092
|
+
readonly description: "Edit operation with before_text, after_text, new_text, and optional line range hints";
|
|
1093
|
+
readonly required: true;
|
|
1094
|
+
readonly allowMultiple: true;
|
|
1095
|
+
readonly children: [{
|
|
1096
|
+
readonly name: "before_text";
|
|
1097
|
+
readonly description: "Text to find as the start anchor (use <<<START_OF_FILE>>> for file start)";
|
|
1098
|
+
readonly required: false;
|
|
1099
|
+
readonly usageValue: "Text before the edit location";
|
|
1100
|
+
}, {
|
|
1101
|
+
readonly name: "after_text";
|
|
1102
|
+
readonly description: "Text to find as the end anchor (use <<<END_OF_FILE>>> for file end)";
|
|
1103
|
+
readonly required: false;
|
|
1104
|
+
readonly usageValue: "Text after the edit location";
|
|
1105
|
+
}, {
|
|
1106
|
+
readonly name: "new_text";
|
|
1107
|
+
readonly description: "Text to replace the content between before_text and after_text";
|
|
1108
|
+
readonly required: true;
|
|
1109
|
+
readonly usageValue: "New text content";
|
|
1110
|
+
}, {
|
|
1111
|
+
readonly name: "before_text_line_start";
|
|
1112
|
+
readonly description: "Optional line number hint for before_text location (1-based)";
|
|
1113
|
+
readonly required: false;
|
|
1114
|
+
readonly usageValue: "10";
|
|
1115
|
+
}, {
|
|
1116
|
+
readonly name: "after_text_line_start";
|
|
1117
|
+
readonly description: "Optional line number hint for after_text location (1-based)";
|
|
1118
|
+
readonly required: false;
|
|
1119
|
+
readonly usageValue: "20";
|
|
1120
|
+
}];
|
|
1121
|
+
readonly usageValue: "operations here";
|
|
1122
|
+
}];
|
|
1123
|
+
readonly examples: [{
|
|
1124
|
+
readonly description: "Replace content between two text anchors";
|
|
1125
|
+
readonly parameters: [{
|
|
1126
|
+
readonly name: "path";
|
|
1127
|
+
readonly value: "src/main.ts";
|
|
1128
|
+
}, {
|
|
1129
|
+
readonly name: "operations";
|
|
1130
|
+
readonly value: {
|
|
1131
|
+
readonly before_text: "function oldFunction() {";
|
|
1132
|
+
readonly after_text: "}";
|
|
1133
|
+
readonly new_text: "\n return \"new implementation\";\n";
|
|
1134
|
+
};
|
|
1135
|
+
}];
|
|
1136
|
+
}, {
|
|
1137
|
+
readonly description: "Insert at start of file";
|
|
1138
|
+
readonly parameters: [{
|
|
1139
|
+
readonly name: "path";
|
|
1140
|
+
readonly value: "src/header.ts";
|
|
1141
|
+
}, {
|
|
1142
|
+
readonly name: "operations";
|
|
1143
|
+
readonly value: {
|
|
1144
|
+
readonly before_text: "<<<START_OF_FILE>>>";
|
|
1145
|
+
readonly after_text: "export";
|
|
1146
|
+
readonly new_text: "// File header comment\n";
|
|
1147
|
+
};
|
|
1148
|
+
}];
|
|
1149
|
+
}, {
|
|
1150
|
+
readonly description: "Multiple operations in one call";
|
|
1151
|
+
readonly parameters: [{
|
|
1152
|
+
readonly name: "path";
|
|
1153
|
+
readonly value: "src/utils.ts";
|
|
1154
|
+
}, {
|
|
1155
|
+
readonly name: "operations";
|
|
1156
|
+
readonly value: [{
|
|
1157
|
+
readonly before_text: "import React";
|
|
1158
|
+
readonly after_text: "from \"react\"";
|
|
1159
|
+
readonly new_text: ", { useState }";
|
|
1160
|
+
}, {
|
|
1161
|
+
readonly before_text: "function Component() {";
|
|
1162
|
+
readonly after_text: "return (";
|
|
1163
|
+
readonly new_text: "\n const [state, setState] = useState(false);\n ";
|
|
1164
|
+
}];
|
|
1165
|
+
}];
|
|
1166
|
+
}];
|
|
1167
|
+
readonly permissionLevel: PermissionLevel.Write;
|
|
1168
|
+
}, FilesystemProvider>;
|
|
1169
|
+
isAvailable: (provider: FilesystemProvider) => boolean;
|
|
1170
|
+
name: "edit_file";
|
|
1171
|
+
description: "Request to edit file contents using before/after text anchors with flexible operations. Supports multiple edit operations in a single call.";
|
|
1172
|
+
parameters: [{
|
|
1173
|
+
readonly name: "path";
|
|
1174
|
+
readonly description: "The path of the file to edit";
|
|
1175
|
+
readonly required: true;
|
|
1176
|
+
readonly usageValue: "File path here";
|
|
1177
|
+
}, {
|
|
1178
|
+
readonly name: "operations";
|
|
1179
|
+
readonly description: "Edit operation with before_text, after_text, new_text, and optional line range hints";
|
|
1180
|
+
readonly required: true;
|
|
1181
|
+
readonly allowMultiple: true;
|
|
1182
|
+
readonly children: [{
|
|
1183
|
+
readonly name: "before_text";
|
|
1184
|
+
readonly description: "Text to find as the start anchor (use <<<START_OF_FILE>>> for file start)";
|
|
1185
|
+
readonly required: false;
|
|
1186
|
+
readonly usageValue: "Text before the edit location";
|
|
1187
|
+
}, {
|
|
1188
|
+
readonly name: "after_text";
|
|
1189
|
+
readonly description: "Text to find as the end anchor (use <<<END_OF_FILE>>> for file end)";
|
|
1190
|
+
readonly required: false;
|
|
1191
|
+
readonly usageValue: "Text after the edit location";
|
|
1192
|
+
}, {
|
|
1193
|
+
readonly name: "new_text";
|
|
1194
|
+
readonly description: "Text to replace the content between before_text and after_text";
|
|
1195
|
+
readonly required: true;
|
|
1196
|
+
readonly usageValue: "New text content";
|
|
1197
|
+
}, {
|
|
1198
|
+
readonly name: "before_text_line_start";
|
|
1199
|
+
readonly description: "Optional line number hint for before_text location (1-based)";
|
|
1200
|
+
readonly required: false;
|
|
1201
|
+
readonly usageValue: "10";
|
|
1202
|
+
}, {
|
|
1203
|
+
readonly name: "after_text_line_start";
|
|
1204
|
+
readonly description: "Optional line number hint for after_text location (1-based)";
|
|
1205
|
+
readonly required: false;
|
|
1206
|
+
readonly usageValue: "20";
|
|
1207
|
+
}];
|
|
1208
|
+
readonly usageValue: "operations here";
|
|
1209
|
+
}];
|
|
1210
|
+
examples: [{
|
|
1211
|
+
readonly description: "Replace content between two text anchors";
|
|
1212
|
+
readonly parameters: [{
|
|
1213
|
+
readonly name: "path";
|
|
1214
|
+
readonly value: "src/main.ts";
|
|
1215
|
+
}, {
|
|
1216
|
+
readonly name: "operations";
|
|
1217
|
+
readonly value: {
|
|
1218
|
+
readonly before_text: "function oldFunction() {";
|
|
1219
|
+
readonly after_text: "}";
|
|
1220
|
+
readonly new_text: "\n return \"new implementation\";\n";
|
|
1221
|
+
};
|
|
1222
|
+
}];
|
|
1223
|
+
}, {
|
|
1224
|
+
readonly description: "Insert at start of file";
|
|
1225
|
+
readonly parameters: [{
|
|
1226
|
+
readonly name: "path";
|
|
1227
|
+
readonly value: "src/header.ts";
|
|
1228
|
+
}, {
|
|
1229
|
+
readonly name: "operations";
|
|
1230
|
+
readonly value: {
|
|
1231
|
+
readonly before_text: "<<<START_OF_FILE>>>";
|
|
1232
|
+
readonly after_text: "export";
|
|
1233
|
+
readonly new_text: "// File header comment\n";
|
|
1234
|
+
};
|
|
1235
|
+
}];
|
|
1236
|
+
}, {
|
|
1237
|
+
readonly description: "Multiple operations in one call";
|
|
1238
|
+
readonly parameters: [{
|
|
1239
|
+
readonly name: "path";
|
|
1240
|
+
readonly value: "src/utils.ts";
|
|
1241
|
+
}, {
|
|
1242
|
+
readonly name: "operations";
|
|
1243
|
+
readonly value: [{
|
|
1244
|
+
readonly before_text: "import React";
|
|
1245
|
+
readonly after_text: "from \"react\"";
|
|
1246
|
+
readonly new_text: ", { useState }";
|
|
1247
|
+
}, {
|
|
1248
|
+
readonly before_text: "function Component() {";
|
|
1249
|
+
readonly after_text: "return (";
|
|
1250
|
+
readonly new_text: "\n const [state, setState] = useState(false);\n ";
|
|
1251
|
+
}];
|
|
1252
|
+
}];
|
|
1253
|
+
}];
|
|
1254
|
+
permissionLevel: PermissionLevel.Write;
|
|
1255
|
+
};
|
|
1256
|
+
export { _default_14 as default_alias_7 }
|
|
1257
|
+
export { _default_14 as editFile }
|
|
1258
|
+
export { _default_14 as editFile_alias_1 }
|
|
1259
|
+
export { _default_14 as editFile_alias_2 }
|
|
1281
1260
|
|
|
1282
1261
|
declare const _default_2: {
|
|
1262
|
+
handler: ToolHandler<{
|
|
1263
|
+
readonly name: "ask_followup_question";
|
|
1264
|
+
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.";
|
|
1265
|
+
readonly parameters: [{
|
|
1266
|
+
readonly name: "questions";
|
|
1267
|
+
readonly description: "One or more follow-up questions you need answered before you can continue.";
|
|
1268
|
+
readonly required: true;
|
|
1269
|
+
readonly allowMultiple: true;
|
|
1270
|
+
readonly usageValue: "questions here";
|
|
1271
|
+
readonly children: [{
|
|
1272
|
+
readonly name: "prompt";
|
|
1273
|
+
readonly description: "The text of the question.";
|
|
1274
|
+
readonly required: true;
|
|
1275
|
+
readonly usageValue: "question text here";
|
|
1276
|
+
}, {
|
|
1277
|
+
readonly name: "options";
|
|
1278
|
+
readonly description: "Ordered list of suggested answers (omit if none).";
|
|
1279
|
+
readonly required: false;
|
|
1280
|
+
readonly allowMultiple: true;
|
|
1281
|
+
readonly usageValue: "suggested answer here";
|
|
1282
|
+
}];
|
|
1283
|
+
}];
|
|
1284
|
+
readonly examples: [{
|
|
1285
|
+
readonly description: "Single clarifying question (no options)";
|
|
1286
|
+
readonly parameters: [{
|
|
1287
|
+
readonly name: "questions";
|
|
1288
|
+
readonly value: {
|
|
1289
|
+
readonly prompt: "What is the target deployment environment?";
|
|
1290
|
+
};
|
|
1291
|
+
}];
|
|
1292
|
+
}, {
|
|
1293
|
+
readonly description: "Single question with multiple-choice options";
|
|
1294
|
+
readonly parameters: [{
|
|
1295
|
+
readonly name: "questions";
|
|
1296
|
+
readonly value: {
|
|
1297
|
+
readonly prompt: "Which frontend framework are you using?";
|
|
1298
|
+
readonly options: ["React", "Angular", "Vue", "Svelte"];
|
|
1299
|
+
};
|
|
1300
|
+
}];
|
|
1301
|
+
}, {
|
|
1302
|
+
readonly description: "Two related questions in one call";
|
|
1303
|
+
readonly parameters: [{
|
|
1304
|
+
readonly name: "questions";
|
|
1305
|
+
readonly value: [{
|
|
1306
|
+
readonly prompt: "What type of application are you building?";
|
|
1307
|
+
}, {
|
|
1308
|
+
readonly prompt: "Preferred programming language?";
|
|
1309
|
+
readonly options: ["JavaScript", "TypeScript", "Python", "Java"];
|
|
1310
|
+
}];
|
|
1311
|
+
}];
|
|
1312
|
+
}, {
|
|
1313
|
+
readonly description: "Binary (yes/no) confirmation";
|
|
1314
|
+
readonly parameters: [{
|
|
1315
|
+
readonly name: "questions";
|
|
1316
|
+
readonly value: {
|
|
1317
|
+
readonly prompt: "Is it acceptable to refactor existing tests to improve performance?";
|
|
1318
|
+
readonly options: ["Yes", "No"];
|
|
1319
|
+
};
|
|
1320
|
+
}];
|
|
1321
|
+
}];
|
|
1322
|
+
readonly permissionLevel: PermissionLevel.None;
|
|
1323
|
+
}, InteractionProvider>;
|
|
1324
|
+
isAvailable: (provider: InteractionProvider) => boolean;
|
|
1325
|
+
name: "ask_followup_question";
|
|
1326
|
+
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.";
|
|
1327
|
+
parameters: [{
|
|
1328
|
+
readonly name: "questions";
|
|
1329
|
+
readonly description: "One or more follow-up questions you need answered before you can continue.";
|
|
1330
|
+
readonly required: true;
|
|
1331
|
+
readonly allowMultiple: true;
|
|
1332
|
+
readonly usageValue: "questions here";
|
|
1333
|
+
readonly children: [{
|
|
1334
|
+
readonly name: "prompt";
|
|
1335
|
+
readonly description: "The text of the question.";
|
|
1336
|
+
readonly required: true;
|
|
1337
|
+
readonly usageValue: "question text here";
|
|
1338
|
+
}, {
|
|
1339
|
+
readonly name: "options";
|
|
1340
|
+
readonly description: "Ordered list of suggested answers (omit if none).";
|
|
1341
|
+
readonly required: false;
|
|
1342
|
+
readonly allowMultiple: true;
|
|
1343
|
+
readonly usageValue: "suggested answer here";
|
|
1344
|
+
}];
|
|
1345
|
+
}];
|
|
1346
|
+
examples: [{
|
|
1347
|
+
readonly description: "Single clarifying question (no options)";
|
|
1348
|
+
readonly parameters: [{
|
|
1349
|
+
readonly name: "questions";
|
|
1350
|
+
readonly value: {
|
|
1351
|
+
readonly prompt: "What is the target deployment environment?";
|
|
1352
|
+
};
|
|
1353
|
+
}];
|
|
1354
|
+
}, {
|
|
1355
|
+
readonly description: "Single question with multiple-choice options";
|
|
1356
|
+
readonly parameters: [{
|
|
1357
|
+
readonly name: "questions";
|
|
1358
|
+
readonly value: {
|
|
1359
|
+
readonly prompt: "Which frontend framework are you using?";
|
|
1360
|
+
readonly options: ["React", "Angular", "Vue", "Svelte"];
|
|
1361
|
+
};
|
|
1362
|
+
}];
|
|
1363
|
+
}, {
|
|
1364
|
+
readonly description: "Two related questions in one call";
|
|
1365
|
+
readonly parameters: [{
|
|
1366
|
+
readonly name: "questions";
|
|
1367
|
+
readonly value: [{
|
|
1368
|
+
readonly prompt: "What type of application are you building?";
|
|
1369
|
+
}, {
|
|
1370
|
+
readonly prompt: "Preferred programming language?";
|
|
1371
|
+
readonly options: ["JavaScript", "TypeScript", "Python", "Java"];
|
|
1372
|
+
}];
|
|
1373
|
+
}];
|
|
1374
|
+
}, {
|
|
1375
|
+
readonly description: "Binary (yes/no) confirmation";
|
|
1376
|
+
readonly parameters: [{
|
|
1377
|
+
readonly name: "questions";
|
|
1378
|
+
readonly value: {
|
|
1379
|
+
readonly prompt: "Is it acceptable to refactor existing tests to improve performance?";
|
|
1380
|
+
readonly options: ["Yes", "No"];
|
|
1381
|
+
};
|
|
1382
|
+
}];
|
|
1383
|
+
}];
|
|
1384
|
+
permissionLevel: PermissionLevel.None;
|
|
1385
|
+
};
|
|
1386
|
+
export { _default_2 as askFollowupQuestion }
|
|
1387
|
+
export { _default_2 as askFollowupQuestion_alias_1 }
|
|
1388
|
+
export { _default_2 as askFollowupQuestion_alias_2 }
|
|
1389
|
+
export { _default_2 as default_alias_4 }
|
|
1390
|
+
|
|
1391
|
+
declare const _default_3: {
|
|
1283
1392
|
handler: ToolHandler<{
|
|
1284
1393
|
readonly name: "attempt_completion";
|
|
1285
1394
|
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.";
|
|
@@ -1316,12 +1425,12 @@ declare const _default_2: {
|
|
|
1316
1425
|
}];
|
|
1317
1426
|
permissionLevel: PermissionLevel.None;
|
|
1318
1427
|
};
|
|
1319
|
-
export {
|
|
1320
|
-
export {
|
|
1321
|
-
export {
|
|
1322
|
-
export {
|
|
1428
|
+
export { _default_3 as attemptCompletion }
|
|
1429
|
+
export { _default_3 as attemptCompletion_alias_1 }
|
|
1430
|
+
export { _default_3 as attemptCompletion_alias_2 }
|
|
1431
|
+
export { _default_3 as default_alias_5 }
|
|
1323
1432
|
|
|
1324
|
-
declare const
|
|
1433
|
+
declare const _default_4: {
|
|
1325
1434
|
handler: ToolHandler<{
|
|
1326
1435
|
readonly name: "delegate";
|
|
1327
1436
|
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.";
|
|
@@ -1406,12 +1515,12 @@ declare const _default_3: {
|
|
|
1406
1515
|
}];
|
|
1407
1516
|
permissionLevel: PermissionLevel.None;
|
|
1408
1517
|
};
|
|
1409
|
-
export {
|
|
1410
|
-
export {
|
|
1411
|
-
export {
|
|
1412
|
-
export {
|
|
1518
|
+
export { _default_4 as default_alias_6 }
|
|
1519
|
+
export { _default_4 as delegate }
|
|
1520
|
+
export { _default_4 as delegate_alias_1 }
|
|
1521
|
+
export { _default_4 as delegate_alias_2 }
|
|
1413
1522
|
|
|
1414
|
-
declare const
|
|
1523
|
+
declare const _default_5: {
|
|
1415
1524
|
handler: ToolHandler<{
|
|
1416
1525
|
readonly name: "execute_command";
|
|
1417
1526
|
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. After an `execute_command` call, no other tool calls are allowed in the same assistant response.";
|
|
@@ -1459,57 +1568,15 @@ declare const _default_4: {
|
|
|
1459
1568
|
readonly value: "npm run build";
|
|
1460
1569
|
}, {
|
|
1461
1570
|
readonly name: "requires_approval";
|
|
1462
|
-
readonly value: "false";
|
|
1463
|
-
}];
|
|
1464
|
-
}];
|
|
1465
|
-
permissionLevel: PermissionLevel.Arbitrary;
|
|
1466
|
-
};
|
|
1467
|
-
export { _default_4 as default_alias_7 }
|
|
1468
|
-
export { _default_4 as executeCommand }
|
|
1469
|
-
export { _default_4 as executeCommand_alias_1 }
|
|
1470
|
-
export { _default_4 as executeCommand_alias_2 }
|
|
1471
|
-
|
|
1472
|
-
declare const _default_5: {
|
|
1473
|
-
handler: ToolHandler<{
|
|
1474
|
-
readonly name: "list_code_definition_names";
|
|
1475
|
-
readonly description: "Request to list definition names (classes, functions, methods, etc.) used for all files in a directory. This tool provides insights into the codebase structure and important constructs, encapsulating high-level concepts and relationships that are crucial for understanding the overall architecture.";
|
|
1476
|
-
readonly parameters: [{
|
|
1477
|
-
readonly name: "path";
|
|
1478
|
-
readonly description: "The path of a code file to list top level source code definitions for.";
|
|
1479
|
-
readonly required: true;
|
|
1480
|
-
readonly usageValue: "Directory path here";
|
|
1481
|
-
}];
|
|
1482
|
-
readonly examples: [{
|
|
1483
|
-
readonly description: "Request to list code definition names in a directory";
|
|
1484
|
-
readonly parameters: [{
|
|
1485
|
-
readonly name: "path";
|
|
1486
|
-
readonly value: "src/utils";
|
|
1487
|
-
}];
|
|
1488
|
-
}];
|
|
1489
|
-
readonly permissionLevel: PermissionLevel.Read;
|
|
1490
|
-
}, FilesystemProvider>;
|
|
1491
|
-
isAvailable: (provider: FilesystemProvider) => boolean;
|
|
1492
|
-
name: "list_code_definition_names";
|
|
1493
|
-
description: "Request to list definition names (classes, functions, methods, etc.) used for all files in a directory. This tool provides insights into the codebase structure and important constructs, encapsulating high-level concepts and relationships that are crucial for understanding the overall architecture.";
|
|
1494
|
-
parameters: [{
|
|
1495
|
-
readonly name: "path";
|
|
1496
|
-
readonly description: "The path of a code file to list top level source code definitions for.";
|
|
1497
|
-
readonly required: true;
|
|
1498
|
-
readonly usageValue: "Directory path here";
|
|
1499
|
-
}];
|
|
1500
|
-
examples: [{
|
|
1501
|
-
readonly description: "Request to list code definition names in a directory";
|
|
1502
|
-
readonly parameters: [{
|
|
1503
|
-
readonly name: "path";
|
|
1504
|
-
readonly value: "src/utils";
|
|
1571
|
+
readonly value: "false";
|
|
1505
1572
|
}];
|
|
1506
1573
|
}];
|
|
1507
|
-
permissionLevel: PermissionLevel.
|
|
1574
|
+
permissionLevel: PermissionLevel.Arbitrary;
|
|
1508
1575
|
};
|
|
1509
|
-
export { _default_5 as
|
|
1510
|
-
export { _default_5 as
|
|
1511
|
-
export { _default_5 as
|
|
1512
|
-
export { _default_5 as
|
|
1576
|
+
export { _default_5 as default_alias_8 }
|
|
1577
|
+
export { _default_5 as executeCommand }
|
|
1578
|
+
export { _default_5 as executeCommand_alias_1 }
|
|
1579
|
+
export { _default_5 as executeCommand_alias_2 }
|
|
1513
1580
|
|
|
1514
1581
|
declare const _default_6: {
|
|
1515
1582
|
handler: ToolHandler<{
|
|
@@ -1634,64 +1701,6 @@ export { _default_7 as readFile_alias_1 }
|
|
|
1634
1701
|
export { _default_7 as readFile_alias_2 }
|
|
1635
1702
|
|
|
1636
1703
|
declare const _default_8: {
|
|
1637
|
-
handler: ToolHandler<{
|
|
1638
|
-
readonly name: "replace_in_file";
|
|
1639
|
-
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.";
|
|
1640
|
-
readonly parameters: [{
|
|
1641
|
-
readonly name: "path";
|
|
1642
|
-
readonly description: "The path of the file to modify";
|
|
1643
|
-
readonly required: true;
|
|
1644
|
-
readonly usageValue: "File path here";
|
|
1645
|
-
}, {
|
|
1646
|
-
readonly name: "diff";
|
|
1647
|
-
readonly description: "One or more SEARCH/REPLACE blocks following this exact format:\n ```\n <<<<<<< SEARCH\n [exact content to find]\n =======\n [new content to replace with]\n >>>>>>> REPLACE\n ```\n Critical rules:\n 1. SEARCH content must match the associated file section to find EXACTLY:\n * Match character-for-character including whitespace, indentation, line endings\n * Include all comments, docstrings, etc.\n 2. SEARCH/REPLACE blocks will ONLY replace the first match occurrence.\n * Including multiple unique SEARCH/REPLACE blocks if you need to make multiple changes.\n * Include *just* enough lines in each SEARCH section to uniquely match each set of lines that need to change.\n * When using multiple SEARCH/REPLACE blocks, list them in the order they appear in the file.\n 3. Keep SEARCH/REPLACE blocks concise:\n * Break large SEARCH/REPLACE blocks into a series of smaller blocks that each change a small portion of the file.\n * Include just the changing lines, and a few surrounding lines if needed for uniqueness.\n * Do not include long runs of unchanging lines in SEARCH/REPLACE blocks.\n * Each line must be complete. Never truncate lines mid-way through as this can cause matching failures.\n 4. Special operations:\n * To move code: Use two SEARCH/REPLACE blocks (one to delete from original + one to insert at new location)\n * To delete code: Use empty REPLACE section";
|
|
1648
|
-
readonly required: true;
|
|
1649
|
-
readonly usageValue: "Search and replace blocks here";
|
|
1650
|
-
}];
|
|
1651
|
-
readonly examples: [{
|
|
1652
|
-
readonly description: "Request to replace sections of content in a file";
|
|
1653
|
-
readonly parameters: [{
|
|
1654
|
-
readonly name: "path";
|
|
1655
|
-
readonly value: "src/main.js";
|
|
1656
|
-
}, {
|
|
1657
|
-
readonly name: "diff";
|
|
1658
|
-
readonly value: "\n<<<<<<< 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\n";
|
|
1659
|
-
}];
|
|
1660
|
-
}];
|
|
1661
|
-
readonly permissionLevel: PermissionLevel.Write;
|
|
1662
|
-
}, FilesystemProvider>;
|
|
1663
|
-
isAvailable: (provider: FilesystemProvider) => boolean;
|
|
1664
|
-
name: "replace_in_file";
|
|
1665
|
-
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.";
|
|
1666
|
-
parameters: [{
|
|
1667
|
-
readonly name: "path";
|
|
1668
|
-
readonly description: "The path of the file to modify";
|
|
1669
|
-
readonly required: true;
|
|
1670
|
-
readonly usageValue: "File path here";
|
|
1671
|
-
}, {
|
|
1672
|
-
readonly name: "diff";
|
|
1673
|
-
readonly description: "One or more SEARCH/REPLACE blocks following this exact format:\n ```\n <<<<<<< SEARCH\n [exact content to find]\n =======\n [new content to replace with]\n >>>>>>> REPLACE\n ```\n Critical rules:\n 1. SEARCH content must match the associated file section to find EXACTLY:\n * Match character-for-character including whitespace, indentation, line endings\n * Include all comments, docstrings, etc.\n 2. SEARCH/REPLACE blocks will ONLY replace the first match occurrence.\n * Including multiple unique SEARCH/REPLACE blocks if you need to make multiple changes.\n * Include *just* enough lines in each SEARCH section to uniquely match each set of lines that need to change.\n * When using multiple SEARCH/REPLACE blocks, list them in the order they appear in the file.\n 3. Keep SEARCH/REPLACE blocks concise:\n * Break large SEARCH/REPLACE blocks into a series of smaller blocks that each change a small portion of the file.\n * Include just the changing lines, and a few surrounding lines if needed for uniqueness.\n * Do not include long runs of unchanging lines in SEARCH/REPLACE blocks.\n * Each line must be complete. Never truncate lines mid-way through as this can cause matching failures.\n 4. Special operations:\n * To move code: Use two SEARCH/REPLACE blocks (one to delete from original + one to insert at new location)\n * To delete code: Use empty REPLACE section";
|
|
1674
|
-
readonly required: true;
|
|
1675
|
-
readonly usageValue: "Search and replace blocks here";
|
|
1676
|
-
}];
|
|
1677
|
-
examples: [{
|
|
1678
|
-
readonly description: "Request to replace sections of content in a file";
|
|
1679
|
-
readonly parameters: [{
|
|
1680
|
-
readonly name: "path";
|
|
1681
|
-
readonly value: "src/main.js";
|
|
1682
|
-
}, {
|
|
1683
|
-
readonly name: "diff";
|
|
1684
|
-
readonly value: "\n<<<<<<< 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\n";
|
|
1685
|
-
}];
|
|
1686
|
-
}];
|
|
1687
|
-
permissionLevel: PermissionLevel.Write;
|
|
1688
|
-
};
|
|
1689
|
-
export { _default_8 as default_alias_14 }
|
|
1690
|
-
export { _default_8 as replaceInFile }
|
|
1691
|
-
export { _default_8 as replaceInFile_alias_1 }
|
|
1692
|
-
export { _default_8 as replaceInFile_alias_2 }
|
|
1693
|
-
|
|
1694
|
-
declare const _default_9: {
|
|
1695
1704
|
handler: ToolHandler<{
|
|
1696
1705
|
readonly name: "search_files";
|
|
1697
1706
|
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.";
|
|
@@ -1760,10 +1769,140 @@ declare const _default_9: {
|
|
|
1760
1769
|
}];
|
|
1761
1770
|
permissionLevel: PermissionLevel.Read;
|
|
1762
1771
|
};
|
|
1763
|
-
export {
|
|
1764
|
-
export {
|
|
1765
|
-
export {
|
|
1766
|
-
export {
|
|
1772
|
+
export { _default_8 as default_alias_15 }
|
|
1773
|
+
export { _default_8 as searchFiles }
|
|
1774
|
+
export { _default_8 as searchFiles_alias_1 }
|
|
1775
|
+
export { _default_8 as searchFiles_alias_2 }
|
|
1776
|
+
|
|
1777
|
+
declare const _default_9: {
|
|
1778
|
+
handler: ToolHandler<{
|
|
1779
|
+
readonly name: "update_knowledge";
|
|
1780
|
+
readonly description: "Update knowledge in a knowledge.ai.yml file with smart merging capabilities. This tool lets you add, update, or remove information using path-based updates and special directives.";
|
|
1781
|
+
readonly parameters: [{
|
|
1782
|
+
readonly name: "path";
|
|
1783
|
+
readonly description: "Directory containing (or where to create) the knowledge.ai.yml file";
|
|
1784
|
+
readonly required: true;
|
|
1785
|
+
readonly usageValue: "Directory path here";
|
|
1786
|
+
}, {
|
|
1787
|
+
readonly name: "knowledge";
|
|
1788
|
+
readonly description: "YAML content to merge into the knowledge file";
|
|
1789
|
+
readonly required: true;
|
|
1790
|
+
readonly usageValue: "YAML content with knowledge to update";
|
|
1791
|
+
}];
|
|
1792
|
+
readonly examples: [{
|
|
1793
|
+
readonly description: "Add a new file entry";
|
|
1794
|
+
readonly parameters: [{
|
|
1795
|
+
readonly name: "path";
|
|
1796
|
+
readonly value: "src/utils";
|
|
1797
|
+
}, {
|
|
1798
|
+
readonly name: "knowledge";
|
|
1799
|
+
readonly value: "files:\n \"newFile.ts\":\n description: \"A new utility file\"\n api:\n functions:\n 1:\n name: \"processData\"\n params:\n 1: { name: \"data\", type: \"object\" }\n returns: \"object\"";
|
|
1800
|
+
}];
|
|
1801
|
+
}, {
|
|
1802
|
+
readonly description: "Update an existing file description";
|
|
1803
|
+
readonly parameters: [{
|
|
1804
|
+
readonly name: "path";
|
|
1805
|
+
readonly value: "src/utils";
|
|
1806
|
+
}, {
|
|
1807
|
+
readonly name: "knowledge";
|
|
1808
|
+
readonly value: "files:\n \"existingFile.ts\":\n description: \"Updated description for the file\"";
|
|
1809
|
+
}];
|
|
1810
|
+
}, {
|
|
1811
|
+
readonly description: "Add a new rule";
|
|
1812
|
+
readonly parameters: [{
|
|
1813
|
+
readonly name: "path";
|
|
1814
|
+
readonly value: "src";
|
|
1815
|
+
}, {
|
|
1816
|
+
readonly name: "knowledge";
|
|
1817
|
+
readonly value: "rules:\n 10: \"New rule to follow\"";
|
|
1818
|
+
}];
|
|
1819
|
+
}, {
|
|
1820
|
+
readonly description: "Remove a rule";
|
|
1821
|
+
readonly parameters: [{
|
|
1822
|
+
readonly name: "path";
|
|
1823
|
+
readonly value: "src";
|
|
1824
|
+
}, {
|
|
1825
|
+
readonly name: "knowledge";
|
|
1826
|
+
readonly value: "rules:\n 5: null";
|
|
1827
|
+
}];
|
|
1828
|
+
}, {
|
|
1829
|
+
readonly description: "Update nested properties using dot notation";
|
|
1830
|
+
readonly parameters: [{
|
|
1831
|
+
readonly name: "path";
|
|
1832
|
+
readonly value: "src/components";
|
|
1833
|
+
}, {
|
|
1834
|
+
readonly name: "knowledge";
|
|
1835
|
+
readonly value: "files.Button.tsx.api.functions.1.description: \"Updated function description\"";
|
|
1836
|
+
}];
|
|
1837
|
+
}];
|
|
1838
|
+
readonly permissionLevel: PermissionLevel.Write;
|
|
1839
|
+
}, FilesystemProvider>;
|
|
1840
|
+
isAvailable: (provider: FilesystemProvider) => boolean;
|
|
1841
|
+
name: "update_knowledge";
|
|
1842
|
+
description: "Update knowledge in a knowledge.ai.yml file with smart merging capabilities. This tool lets you add, update, or remove information using path-based updates and special directives.";
|
|
1843
|
+
parameters: [{
|
|
1844
|
+
readonly name: "path";
|
|
1845
|
+
readonly description: "Directory containing (or where to create) the knowledge.ai.yml file";
|
|
1846
|
+
readonly required: true;
|
|
1847
|
+
readonly usageValue: "Directory path here";
|
|
1848
|
+
}, {
|
|
1849
|
+
readonly name: "knowledge";
|
|
1850
|
+
readonly description: "YAML content to merge into the knowledge file";
|
|
1851
|
+
readonly required: true;
|
|
1852
|
+
readonly usageValue: "YAML content with knowledge to update";
|
|
1853
|
+
}];
|
|
1854
|
+
examples: [{
|
|
1855
|
+
readonly description: "Add a new file entry";
|
|
1856
|
+
readonly parameters: [{
|
|
1857
|
+
readonly name: "path";
|
|
1858
|
+
readonly value: "src/utils";
|
|
1859
|
+
}, {
|
|
1860
|
+
readonly name: "knowledge";
|
|
1861
|
+
readonly value: "files:\n \"newFile.ts\":\n description: \"A new utility file\"\n api:\n functions:\n 1:\n name: \"processData\"\n params:\n 1: { name: \"data\", type: \"object\" }\n returns: \"object\"";
|
|
1862
|
+
}];
|
|
1863
|
+
}, {
|
|
1864
|
+
readonly description: "Update an existing file description";
|
|
1865
|
+
readonly parameters: [{
|
|
1866
|
+
readonly name: "path";
|
|
1867
|
+
readonly value: "src/utils";
|
|
1868
|
+
}, {
|
|
1869
|
+
readonly name: "knowledge";
|
|
1870
|
+
readonly value: "files:\n \"existingFile.ts\":\n description: \"Updated description for the file\"";
|
|
1871
|
+
}];
|
|
1872
|
+
}, {
|
|
1873
|
+
readonly description: "Add a new rule";
|
|
1874
|
+
readonly parameters: [{
|
|
1875
|
+
readonly name: "path";
|
|
1876
|
+
readonly value: "src";
|
|
1877
|
+
}, {
|
|
1878
|
+
readonly name: "knowledge";
|
|
1879
|
+
readonly value: "rules:\n 10: \"New rule to follow\"";
|
|
1880
|
+
}];
|
|
1881
|
+
}, {
|
|
1882
|
+
readonly description: "Remove a rule";
|
|
1883
|
+
readonly parameters: [{
|
|
1884
|
+
readonly name: "path";
|
|
1885
|
+
readonly value: "src";
|
|
1886
|
+
}, {
|
|
1887
|
+
readonly name: "knowledge";
|
|
1888
|
+
readonly value: "rules:\n 5: null";
|
|
1889
|
+
}];
|
|
1890
|
+
}, {
|
|
1891
|
+
readonly description: "Update nested properties using dot notation";
|
|
1892
|
+
readonly parameters: [{
|
|
1893
|
+
readonly name: "path";
|
|
1894
|
+
readonly value: "src/components";
|
|
1895
|
+
}, {
|
|
1896
|
+
readonly name: "knowledge";
|
|
1897
|
+
readonly value: "files.Button.tsx.api.functions.1.description: \"Updated function description\"";
|
|
1898
|
+
}];
|
|
1899
|
+
}];
|
|
1900
|
+
permissionLevel: PermissionLevel.Write;
|
|
1901
|
+
};
|
|
1902
|
+
export { _default_9 as default_alias_16 }
|
|
1903
|
+
export { _default_9 as updateKnowledge }
|
|
1904
|
+
export { _default_9 as updateKnowledge_alias_1 }
|
|
1905
|
+
export { _default_9 as updateKnowledge_alias_2 }
|
|
1767
1906
|
|
|
1768
1907
|
/**
|
|
1769
1908
|
* AI tool for creating new projects based on user specifications.
|
|
@@ -1819,8 +1958,33 @@ declare const defaultModels: {
|
|
|
1819
1958
|
export { defaultModels }
|
|
1820
1959
|
export { defaultModels as defaultModels_alias_1 }
|
|
1821
1960
|
|
|
1961
|
+
/**
|
|
1962
|
+
* Apply multiple edit operations to file content using before/after text anchors
|
|
1963
|
+
* @param fileContent - The original file content
|
|
1964
|
+
* @param operations - Array of edit operations to apply
|
|
1965
|
+
* @returns The modified file content
|
|
1966
|
+
*/
|
|
1967
|
+
declare const editFile_2: (fileContent: string, operations: EditOperation[]) => Promise<string>;
|
|
1968
|
+
export { editFile_2 as editFileHelper }
|
|
1969
|
+
export { editFile_2 as editFile_alias_3 }
|
|
1970
|
+
export { editFile_2 as editFile_alias_4 }
|
|
1971
|
+
|
|
1822
1972
|
export declare const editingFilesPrompt: (toolNamePrefix: string) => string;
|
|
1823
1973
|
|
|
1974
|
+
declare interface EditOperation {
|
|
1975
|
+
before_text?: string;
|
|
1976
|
+
after_text?: string;
|
|
1977
|
+
new_text: string;
|
|
1978
|
+
before_text_line_start?: number;
|
|
1979
|
+
after_text_line_start?: number;
|
|
1980
|
+
}
|
|
1981
|
+
export { EditOperation }
|
|
1982
|
+
export { EditOperation as EditOperation_alias_1 }
|
|
1983
|
+
|
|
1984
|
+
declare const END_OF_FILE = "<<<END_OF_FILE>>>";
|
|
1985
|
+
export { END_OF_FILE }
|
|
1986
|
+
export { END_OF_FILE as END_OF_FILE_alias_1 }
|
|
1987
|
+
|
|
1824
1988
|
declare const executeAgentTool: <T extends AiToolDefinition<any, any>>(definition: T, agent: MultiAgent, params: GetInput<T>) => Promise<GetOutput<T>>;
|
|
1825
1989
|
export { executeAgentTool }
|
|
1826
1990
|
export { executeAgentTool as executeAgentTool_alias_1 }
|
|
@@ -1851,7 +2015,6 @@ declare type FilesystemProvider = {
|
|
|
1851
2015
|
renameFile?: (sourcePath: string, targetPath: string) => Promise<void>;
|
|
1852
2016
|
listFiles?: (path: string, recursive: boolean, maxCount: number) => Promise<[string[], boolean]>;
|
|
1853
2017
|
searchFiles?: (path: string, regex: string, filePattern: string) => Promise<string[]>;
|
|
1854
|
-
listCodeDefinitionNames?: (path: string) => Promise<string>;
|
|
1855
2018
|
};
|
|
1856
2019
|
export { FilesystemProvider }
|
|
1857
2020
|
export { FilesystemProvider as FilesystemProvider_alias_1 }
|
|
@@ -1989,11 +2152,11 @@ export declare const handler_alias_13: ToolHandler<typeof toolInfo_alias_13, Fil
|
|
|
1989
2152
|
|
|
1990
2153
|
export declare const handler_alias_2: ToolHandler<typeof toolInfo_alias_2, any>;
|
|
1991
2154
|
|
|
1992
|
-
export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3,
|
|
2155
|
+
export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3, FilesystemProvider>;
|
|
1993
2156
|
|
|
1994
|
-
export declare const handler_alias_4: ToolHandler<typeof toolInfo_alias_4,
|
|
2157
|
+
export declare const handler_alias_4: ToolHandler<typeof toolInfo_alias_4, CommandProvider>;
|
|
1995
2158
|
|
|
1996
|
-
export declare const handler_alias_5: ToolHandler<typeof toolInfo_alias_5,
|
|
2159
|
+
export declare const handler_alias_5: ToolHandler<typeof toolInfo_alias_5, any>;
|
|
1997
2160
|
|
|
1998
2161
|
export declare const handler_alias_6: ToolHandler<typeof toolInfo_alias_6, FilesystemProvider>;
|
|
1999
2162
|
|
|
@@ -2032,11 +2195,11 @@ export declare const isAvailable_alias_13: (provider: FilesystemProvider) => boo
|
|
|
2032
2195
|
|
|
2033
2196
|
export declare const isAvailable_alias_2: (_provider: any) => boolean;
|
|
2034
2197
|
|
|
2035
|
-
export declare const isAvailable_alias_3: (provider:
|
|
2198
|
+
export declare const isAvailable_alias_3: (provider: FilesystemProvider) => boolean;
|
|
2036
2199
|
|
|
2037
|
-
export declare const isAvailable_alias_4: (
|
|
2200
|
+
export declare const isAvailable_alias_4: (provider: CommandProvider) => boolean;
|
|
2038
2201
|
|
|
2039
|
-
export declare const isAvailable_alias_5: (
|
|
2202
|
+
export declare const isAvailable_alias_5: (_provider: any) => boolean;
|
|
2040
2203
|
|
|
2041
2204
|
export declare const isAvailable_alias_6: (provider: FilesystemProvider) => boolean;
|
|
2042
2205
|
|
|
@@ -2213,7 +2376,6 @@ declare class MockProvider implements ToolProvider {
|
|
|
2213
2376
|
renameFile(sourcePath: string, targetPath: string): Promise<void>;
|
|
2214
2377
|
listFiles(path: string, recursive: boolean, maxCount: number): Promise<[string[], boolean]>;
|
|
2215
2378
|
searchFiles(path: string, regex: string, filePattern: string): Promise<string[]>;
|
|
2216
|
-
listCodeDefinitionNames(path: string): Promise<string>;
|
|
2217
2379
|
executeCommand(command: string, needApprove: boolean): Promise<{
|
|
2218
2380
|
stdout: string;
|
|
2219
2381
|
stderr: string;
|
|
@@ -2462,15 +2624,16 @@ export { PermissionLevel }
|
|
|
2462
2624
|
export { PermissionLevel as PermissionLevel_alias_1 }
|
|
2463
2625
|
|
|
2464
2626
|
declare enum Policies {
|
|
2465
|
-
KnowledgeManagement = "knowledgemanagement"
|
|
2627
|
+
KnowledgeManagement = "knowledgemanagement",
|
|
2628
|
+
TruncateContext = "truncatecontext"
|
|
2466
2629
|
}
|
|
2467
2630
|
export { Policies }
|
|
2468
2631
|
export { Policies as Policies_alias_1 }
|
|
2469
2632
|
|
|
2470
2633
|
declare const replaceInFile_2: (fileContent: string, diff: string) => Promise<string>;
|
|
2471
2634
|
export { replaceInFile_2 as replaceInFileHelper }
|
|
2635
|
+
export { replaceInFile_2 as replaceInFile_alias_2 }
|
|
2472
2636
|
export { replaceInFile_2 as replaceInFile_alias_3 }
|
|
2473
|
-
export { replaceInFile_2 as replaceInFile_alias_4 }
|
|
2474
2637
|
|
|
2475
2638
|
declare const responsePrompts: {
|
|
2476
2639
|
readonly errorInvokeTool: (tool: string, error: unknown) => string;
|
|
@@ -2505,6 +2668,10 @@ export { SharedAgentOptions }
|
|
|
2505
2668
|
export { SharedAgentOptions as SharedAgentOptions_alias_1 }
|
|
2506
2669
|
export { SharedAgentOptions as SharedAgentOptions_alias_2 }
|
|
2507
2670
|
|
|
2671
|
+
declare const START_OF_FILE = "<<<START_OF_FILE>>>";
|
|
2672
|
+
export { START_OF_FILE }
|
|
2673
|
+
export { START_OF_FILE as START_OF_FILE_alias_1 }
|
|
2674
|
+
|
|
2508
2675
|
declare const systemInformation: (info: {
|
|
2509
2676
|
os: string;
|
|
2510
2677
|
}) => string;
|
|
@@ -2982,6 +3149,94 @@ export declare const toolInfo_alias_2: {
|
|
|
2982
3149
|
};
|
|
2983
3150
|
|
|
2984
3151
|
export declare const toolInfo_alias_3: {
|
|
3152
|
+
readonly name: "edit_file";
|
|
3153
|
+
readonly description: "Request to edit file contents using before/after text anchors with flexible operations. Supports multiple edit operations in a single call.";
|
|
3154
|
+
readonly parameters: [{
|
|
3155
|
+
readonly name: "path";
|
|
3156
|
+
readonly description: "The path of the file to edit";
|
|
3157
|
+
readonly required: true;
|
|
3158
|
+
readonly usageValue: "File path here";
|
|
3159
|
+
}, {
|
|
3160
|
+
readonly name: "operations";
|
|
3161
|
+
readonly description: "Edit operation with before_text, after_text, new_text, and optional line range hints";
|
|
3162
|
+
readonly required: true;
|
|
3163
|
+
readonly allowMultiple: true;
|
|
3164
|
+
readonly children: [{
|
|
3165
|
+
readonly name: "before_text";
|
|
3166
|
+
readonly description: "Text to find as the start anchor (use <<<START_OF_FILE>>> for file start)";
|
|
3167
|
+
readonly required: false;
|
|
3168
|
+
readonly usageValue: "Text before the edit location";
|
|
3169
|
+
}, {
|
|
3170
|
+
readonly name: "after_text";
|
|
3171
|
+
readonly description: "Text to find as the end anchor (use <<<END_OF_FILE>>> for file end)";
|
|
3172
|
+
readonly required: false;
|
|
3173
|
+
readonly usageValue: "Text after the edit location";
|
|
3174
|
+
}, {
|
|
3175
|
+
readonly name: "new_text";
|
|
3176
|
+
readonly description: "Text to replace the content between before_text and after_text";
|
|
3177
|
+
readonly required: true;
|
|
3178
|
+
readonly usageValue: "New text content";
|
|
3179
|
+
}, {
|
|
3180
|
+
readonly name: "before_text_line_start";
|
|
3181
|
+
readonly description: "Optional line number hint for before_text location (1-based)";
|
|
3182
|
+
readonly required: false;
|
|
3183
|
+
readonly usageValue: "10";
|
|
3184
|
+
}, {
|
|
3185
|
+
readonly name: "after_text_line_start";
|
|
3186
|
+
readonly description: "Optional line number hint for after_text location (1-based)";
|
|
3187
|
+
readonly required: false;
|
|
3188
|
+
readonly usageValue: "20";
|
|
3189
|
+
}];
|
|
3190
|
+
readonly usageValue: "operations here";
|
|
3191
|
+
}];
|
|
3192
|
+
readonly examples: [{
|
|
3193
|
+
readonly description: "Replace content between two text anchors";
|
|
3194
|
+
readonly parameters: [{
|
|
3195
|
+
readonly name: "path";
|
|
3196
|
+
readonly value: "src/main.ts";
|
|
3197
|
+
}, {
|
|
3198
|
+
readonly name: "operations";
|
|
3199
|
+
readonly value: {
|
|
3200
|
+
readonly before_text: "function oldFunction() {";
|
|
3201
|
+
readonly after_text: "}";
|
|
3202
|
+
readonly new_text: "\n return \"new implementation\";\n";
|
|
3203
|
+
};
|
|
3204
|
+
}];
|
|
3205
|
+
}, {
|
|
3206
|
+
readonly description: "Insert at start of file";
|
|
3207
|
+
readonly parameters: [{
|
|
3208
|
+
readonly name: "path";
|
|
3209
|
+
readonly value: "src/header.ts";
|
|
3210
|
+
}, {
|
|
3211
|
+
readonly name: "operations";
|
|
3212
|
+
readonly value: {
|
|
3213
|
+
readonly before_text: "<<<START_OF_FILE>>>";
|
|
3214
|
+
readonly after_text: "export";
|
|
3215
|
+
readonly new_text: "// File header comment\n";
|
|
3216
|
+
};
|
|
3217
|
+
}];
|
|
3218
|
+
}, {
|
|
3219
|
+
readonly description: "Multiple operations in one call";
|
|
3220
|
+
readonly parameters: [{
|
|
3221
|
+
readonly name: "path";
|
|
3222
|
+
readonly value: "src/utils.ts";
|
|
3223
|
+
}, {
|
|
3224
|
+
readonly name: "operations";
|
|
3225
|
+
readonly value: [{
|
|
3226
|
+
readonly before_text: "import React";
|
|
3227
|
+
readonly after_text: "from \"react\"";
|
|
3228
|
+
readonly new_text: ", { useState }";
|
|
3229
|
+
}, {
|
|
3230
|
+
readonly before_text: "function Component() {";
|
|
3231
|
+
readonly after_text: "return (";
|
|
3232
|
+
readonly new_text: "\n const [state, setState] = useState(false);\n ";
|
|
3233
|
+
}];
|
|
3234
|
+
}];
|
|
3235
|
+
}];
|
|
3236
|
+
readonly permissionLevel: PermissionLevel.Write;
|
|
3237
|
+
};
|
|
3238
|
+
|
|
3239
|
+
export declare const toolInfo_alias_4: {
|
|
2985
3240
|
readonly name: "execute_command";
|
|
2986
3241
|
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. After an `execute_command` call, no other tool calls are allowed in the same assistant response.";
|
|
2987
3242
|
readonly parameters: [{
|
|
@@ -3008,7 +3263,7 @@ export declare const toolInfo_alias_3: {
|
|
|
3008
3263
|
readonly permissionLevel: PermissionLevel.Arbitrary;
|
|
3009
3264
|
};
|
|
3010
3265
|
|
|
3011
|
-
export declare const
|
|
3266
|
+
export declare const toolInfo_alias_5: {
|
|
3012
3267
|
readonly name: "hand_over";
|
|
3013
3268
|
readonly description: "Hand over the current task to another agent to complete. This tool MUST NOT to be used with any other tool.";
|
|
3014
3269
|
readonly parameters: [{
|
|
@@ -3051,25 +3306,6 @@ export declare const toolInfo_alias_4: {
|
|
|
3051
3306
|
readonly permissionLevel: PermissionLevel.None;
|
|
3052
3307
|
};
|
|
3053
3308
|
|
|
3054
|
-
export declare const toolInfo_alias_5: {
|
|
3055
|
-
readonly name: "list_code_definition_names";
|
|
3056
|
-
readonly description: "Request to list definition names (classes, functions, methods, etc.) used for all files in a directory. This tool provides insights into the codebase structure and important constructs, encapsulating high-level concepts and relationships that are crucial for understanding the overall architecture.";
|
|
3057
|
-
readonly parameters: [{
|
|
3058
|
-
readonly name: "path";
|
|
3059
|
-
readonly description: "The path of a code file to list top level source code definitions for.";
|
|
3060
|
-
readonly required: true;
|
|
3061
|
-
readonly usageValue: "Directory path here";
|
|
3062
|
-
}];
|
|
3063
|
-
readonly examples: [{
|
|
3064
|
-
readonly description: "Request to list code definition names in a directory";
|
|
3065
|
-
readonly parameters: [{
|
|
3066
|
-
readonly name: "path";
|
|
3067
|
-
readonly value: "src/utils";
|
|
3068
|
-
}];
|
|
3069
|
-
}];
|
|
3070
|
-
readonly permissionLevel: PermissionLevel.Read;
|
|
3071
|
-
};
|
|
3072
|
-
|
|
3073
3309
|
export declare const toolInfo_alias_6: {
|
|
3074
3310
|
readonly name: "list_files";
|
|
3075
3311
|
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.";
|
|
@@ -3150,12 +3386,12 @@ export declare const toolInfo_alias_9: {
|
|
|
3150
3386
|
readonly name: "rename_file";
|
|
3151
3387
|
readonly description: "Request to rename a file from source path to target path.";
|
|
3152
3388
|
readonly parameters: [{
|
|
3153
|
-
readonly name: "
|
|
3389
|
+
readonly name: "source_path";
|
|
3154
3390
|
readonly description: "The current path of the file";
|
|
3155
3391
|
readonly required: true;
|
|
3156
3392
|
readonly usageValue: "Source file path here";
|
|
3157
3393
|
}, {
|
|
3158
|
-
readonly name: "
|
|
3394
|
+
readonly name: "target_path";
|
|
3159
3395
|
readonly description: "The new path for the file";
|
|
3160
3396
|
readonly required: true;
|
|
3161
3397
|
readonly usageValue: "Target file path here";
|
|
@@ -3163,10 +3399,10 @@ export declare const toolInfo_alias_9: {
|
|
|
3163
3399
|
readonly examples: [{
|
|
3164
3400
|
readonly description: "Request to rename a file";
|
|
3165
3401
|
readonly parameters: [{
|
|
3166
|
-
readonly name: "
|
|
3402
|
+
readonly name: "source_path";
|
|
3167
3403
|
readonly value: "src/old-name.js";
|
|
3168
3404
|
}, {
|
|
3169
|
-
readonly name: "
|
|
3405
|
+
readonly name: "target_path";
|
|
3170
3406
|
readonly value: "src/new-name.js";
|
|
3171
3407
|
}];
|
|
3172
3408
|
}];
|
|
@@ -3305,6 +3541,15 @@ export { toolUsePrompt }
|
|
|
3305
3541
|
export { toolUsePrompt as toolUsePrompt_alias_1 }
|
|
3306
3542
|
export { toolUsePrompt as toolUsePrompt_alias_2 }
|
|
3307
3543
|
|
|
3544
|
+
declare const TruncateContextPolicy: (tools: Parameters<AgentPolicy>[0]) => {
|
|
3545
|
+
name: Policies;
|
|
3546
|
+
onBeforeRequest(agent: AgentBase): Promise<void>;
|
|
3547
|
+
};
|
|
3548
|
+
export { TruncateContextPolicy }
|
|
3549
|
+
export { TruncateContextPolicy as TruncateContextPolicy_alias_1 }
|
|
3550
|
+
export { TruncateContextPolicy as TruncateContextPolicy_alias_2 }
|
|
3551
|
+
export { TruncateContextPolicy as TruncateContextPolicy_alias_3 }
|
|
3552
|
+
|
|
3308
3553
|
declare class UsageMeter {
|
|
3309
3554
|
#private;
|
|
3310
3555
|
readonly maxCost: number;
|