@polka-codes/core 0.9.27 → 0.9.29
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 +85 -233
- package/dist/index.d.ts +3 -2
- package/dist/index.js +276 -478
- package/package.json +3 -3
|
@@ -36,11 +36,11 @@ declare abstract class AgentBase {
|
|
|
36
36
|
protected abstract onBeforeInvokeTool(name: string, args: Record<string, string>): Promise<ToolResponse | undefined>;
|
|
37
37
|
get model(): string;
|
|
38
38
|
get usage(): {
|
|
39
|
-
messageCount: number;
|
|
40
39
|
input: number;
|
|
41
40
|
output: number;
|
|
42
41
|
cachedRead: number;
|
|
43
42
|
cost: number;
|
|
43
|
+
messageCount: number;
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
export { AgentBase }
|
|
@@ -52,7 +52,6 @@ declare type AgentBaseConfig = {
|
|
|
52
52
|
tools: FullToolInfoV2[];
|
|
53
53
|
toolNamePrefix: string;
|
|
54
54
|
provider: ToolProvider;
|
|
55
|
-
interactive: boolean;
|
|
56
55
|
agents?: Readonly<AgentInfo[]>;
|
|
57
56
|
scripts?: Record<string, string | {
|
|
58
57
|
command: string;
|
|
@@ -123,21 +122,19 @@ export { agentsPrompt as agentsPrompt_alias_2 }
|
|
|
123
122
|
|
|
124
123
|
declare type AgentStepSpec<TInput extends Record<string, Json> = Record<string, Json>, TOutput extends Record<string, Json> = Record<string, Json>> = BaseStepSpec<TInput, TOutput> & {
|
|
125
124
|
type: 'agent';
|
|
126
|
-
messages: (UserContent_2 | TemplatedString)[];
|
|
127
|
-
outputSchema
|
|
125
|
+
messages: (UserContent_2 | TemplatedString<TInput>)[];
|
|
126
|
+
outputSchema?: z.ZodType<TOutput>;
|
|
127
|
+
parseOutput?: (raw: string) => TOutput;
|
|
128
128
|
provider?: string;
|
|
129
129
|
model?: string;
|
|
130
130
|
budget?: number;
|
|
131
131
|
maxMessages?: number;
|
|
132
132
|
modelParameters?: Record<string, any>;
|
|
133
133
|
toolFormat?: ToolFormat;
|
|
134
|
-
|
|
135
|
-
agent: AgentNameType;
|
|
134
|
+
agent?: AgentNameType;
|
|
136
135
|
tools?: FullToolInfoV2[];
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
tools: FullToolInfoV2[];
|
|
140
|
-
});
|
|
136
|
+
systemPrompt?: string | TemplatedString<TInput>;
|
|
137
|
+
};
|
|
141
138
|
export { AgentStepSpec }
|
|
142
139
|
export { AgentStepSpec as AgentStepSpec_alias_1 }
|
|
143
140
|
export { AgentStepSpec as AgentStepSpec_alias_2 }
|
|
@@ -177,25 +174,6 @@ declare const allAgents: readonly [{
|
|
|
177
174
|
export { allAgents }
|
|
178
175
|
export { allAgents as allAgents_alias_1 }
|
|
179
176
|
|
|
180
|
-
export declare namespace allTools {
|
|
181
|
-
export {
|
|
182
|
-
_default as askFollowupQuestion,
|
|
183
|
-
_default_2 as attemptCompletion,
|
|
184
|
-
_default_3 as delegate,
|
|
185
|
-
_default_4 as executeCommand,
|
|
186
|
-
_default_5 as fetchUrl,
|
|
187
|
-
_default_6 as handOver,
|
|
188
|
-
_default_7 as listFiles,
|
|
189
|
-
_default_8 as readBinaryFile,
|
|
190
|
-
_default_9 as readFile,
|
|
191
|
-
_default_10 as removeFile,
|
|
192
|
-
_default_11 as renameFile,
|
|
193
|
-
_default_12 as replaceInFile,
|
|
194
|
-
_default_13 as searchFiles,
|
|
195
|
-
_default_14 as writeToFile
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
177
|
declare class AnalyzerAgent extends AgentBase {
|
|
200
178
|
constructor(options: AnalyzerAgentOptions);
|
|
201
179
|
onBeforeInvokeTool(): Promise<undefined>;
|
|
@@ -217,12 +195,6 @@ export { AnalyzerAgentOptions }
|
|
|
217
195
|
export { AnalyzerAgentOptions as AnalyzerAgentOptions_alias_1 }
|
|
218
196
|
export { AnalyzerAgentOptions as AnalyzerAgentOptions_alias_2 }
|
|
219
197
|
|
|
220
|
-
/**
|
|
221
|
-
* Annotate a diff with line numbers for additions and deletions
|
|
222
|
-
* Adds [Line N] for additions and [Line N removed] for deletions
|
|
223
|
-
*/
|
|
224
|
-
export declare function annotateDiffWithLineNumbers(diff: string): string;
|
|
225
|
-
|
|
226
198
|
declare class ArchitectAgent extends AgentBase {
|
|
227
199
|
constructor(options: ArchitectAgentOptions);
|
|
228
200
|
onBeforeInvokeTool(): Promise<undefined>;
|
|
@@ -334,6 +306,11 @@ export { combineHandlers }
|
|
|
334
306
|
export { combineHandlers as combineHandlers_alias_1 }
|
|
335
307
|
export { combineHandlers as combineHandlers_alias_2 }
|
|
336
308
|
|
|
309
|
+
declare const command: (id: string, ...command: (string | TemplatedString)[]) => CommandStepSpec;
|
|
310
|
+
export { command }
|
|
311
|
+
export { command as command_alias_1 }
|
|
312
|
+
export { command as command_alias_2 }
|
|
313
|
+
|
|
337
314
|
declare type CommandOutput = {
|
|
338
315
|
stdout?: string;
|
|
339
316
|
stderr?: string;
|
|
@@ -498,8 +475,7 @@ declare const _default: {
|
|
|
498
475
|
};
|
|
499
476
|
export { _default as askFollowupQuestion }
|
|
500
477
|
export { _default as askFollowupQuestion_alias_1 }
|
|
501
|
-
export { _default as
|
|
502
|
-
export { _default as default_alias_6 }
|
|
478
|
+
export { _default as default_alias_4 }
|
|
503
479
|
|
|
504
480
|
declare const _default_10: {
|
|
505
481
|
handler: ToolHandler<{
|
|
@@ -516,10 +492,9 @@ declare const _default_10: {
|
|
|
516
492
|
path: z.ZodString;
|
|
517
493
|
}, z.core.$strip>;
|
|
518
494
|
};
|
|
519
|
-
export { _default_10 as
|
|
495
|
+
export { _default_10 as default_alias_13 }
|
|
520
496
|
export { _default_10 as removeFile }
|
|
521
497
|
export { _default_10 as removeFile_alias_1 }
|
|
522
|
-
export { _default_10 as removeFile_alias_2 }
|
|
523
498
|
|
|
524
499
|
declare const _default_11: {
|
|
525
500
|
handler: ToolHandler<{
|
|
@@ -538,10 +513,9 @@ declare const _default_11: {
|
|
|
538
513
|
target_path: z.ZodString;
|
|
539
514
|
}, z.core.$strip>;
|
|
540
515
|
};
|
|
541
|
-
export { _default_11 as
|
|
516
|
+
export { _default_11 as default_alias_14 }
|
|
542
517
|
export { _default_11 as renameFile }
|
|
543
518
|
export { _default_11 as renameFile_alias_1 }
|
|
544
|
-
export { _default_11 as renameFile_alias_2 }
|
|
545
519
|
|
|
546
520
|
declare const _default_12: {
|
|
547
521
|
handler: ToolHandler<{
|
|
@@ -560,10 +534,9 @@ declare const _default_12: {
|
|
|
560
534
|
diff: z.ZodString;
|
|
561
535
|
}, z.core.$strip>;
|
|
562
536
|
};
|
|
563
|
-
export { _default_12 as
|
|
537
|
+
export { _default_12 as default_alias_15 }
|
|
564
538
|
export { _default_12 as replaceInFile }
|
|
565
539
|
export { _default_12 as replaceInFile_alias_1 }
|
|
566
|
-
export { _default_12 as replaceInFile_alias_2 }
|
|
567
540
|
|
|
568
541
|
declare const _default_13: {
|
|
569
542
|
handler: ToolHandler<{
|
|
@@ -584,10 +557,9 @@ declare const _default_13: {
|
|
|
584
557
|
filePattern: z.ZodOptional<z.ZodString>;
|
|
585
558
|
}, z.core.$strip>;
|
|
586
559
|
};
|
|
587
|
-
export { _default_13 as
|
|
560
|
+
export { _default_13 as default_alias_16 }
|
|
588
561
|
export { _default_13 as searchFiles }
|
|
589
562
|
export { _default_13 as searchFiles_alias_1 }
|
|
590
|
-
export { _default_13 as searchFiles_alias_2 }
|
|
591
563
|
|
|
592
564
|
declare const _default_14: {
|
|
593
565
|
handler: ToolHandler<{
|
|
@@ -606,10 +578,9 @@ declare const _default_14: {
|
|
|
606
578
|
content: z.ZodString;
|
|
607
579
|
}, z.core.$strip>;
|
|
608
580
|
};
|
|
609
|
-
export { _default_14 as
|
|
581
|
+
export { _default_14 as default_alias_17 }
|
|
610
582
|
export { _default_14 as writeToFile }
|
|
611
583
|
export { _default_14 as writeToFile_alias_1 }
|
|
612
|
-
export { _default_14 as writeToFile_alias_2 }
|
|
613
584
|
|
|
614
585
|
declare const _default_2: {
|
|
615
586
|
handler: ToolHandler<{
|
|
@@ -628,8 +599,7 @@ declare const _default_2: {
|
|
|
628
599
|
};
|
|
629
600
|
export { _default_2 as attemptCompletion }
|
|
630
601
|
export { _default_2 as attemptCompletion_alias_1 }
|
|
631
|
-
export { _default_2 as
|
|
632
|
-
export { _default_2 as default_alias_7 }
|
|
602
|
+
export { _default_2 as default_alias_5 }
|
|
633
603
|
|
|
634
604
|
declare const _default_3: {
|
|
635
605
|
handler: ToolHandler<{
|
|
@@ -652,10 +622,9 @@ declare const _default_3: {
|
|
|
652
622
|
files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
|
|
653
623
|
}, z.core.$strip>;
|
|
654
624
|
};
|
|
655
|
-
export { _default_3 as
|
|
625
|
+
export { _default_3 as default_alias_6 }
|
|
656
626
|
export { _default_3 as delegate }
|
|
657
627
|
export { _default_3 as delegate_alias_1 }
|
|
658
|
-
export { _default_3 as delegate_alias_2 }
|
|
659
628
|
|
|
660
629
|
declare const _default_4: {
|
|
661
630
|
handler: ToolHandler<{
|
|
@@ -674,10 +643,9 @@ declare const _default_4: {
|
|
|
674
643
|
requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
675
644
|
}, z.core.$strip>;
|
|
676
645
|
};
|
|
677
|
-
export { _default_4 as
|
|
646
|
+
export { _default_4 as default_alias_7 }
|
|
678
647
|
export { _default_4 as executeCommand }
|
|
679
648
|
export { _default_4 as executeCommand_alias_1 }
|
|
680
|
-
export { _default_4 as executeCommand_alias_2 }
|
|
681
649
|
|
|
682
650
|
declare const _default_5: {
|
|
683
651
|
handler: ToolHandler<{
|
|
@@ -694,10 +662,9 @@ declare const _default_5: {
|
|
|
694
662
|
url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
|
|
695
663
|
}, z.core.$strip>;
|
|
696
664
|
};
|
|
697
|
-
export { _default_5 as
|
|
665
|
+
export { _default_5 as default_alias_8 }
|
|
698
666
|
export { _default_5 as fetchUrl }
|
|
699
667
|
export { _default_5 as fetchUrl_alias_1 }
|
|
700
|
-
export { _default_5 as fetchUrl_alias_2 }
|
|
701
668
|
|
|
702
669
|
declare const _default_6: {
|
|
703
670
|
handler: ToolHandler<{
|
|
@@ -720,10 +687,9 @@ declare const _default_6: {
|
|
|
720
687
|
files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
|
|
721
688
|
}, z.core.$strip>;
|
|
722
689
|
};
|
|
723
|
-
export { _default_6 as
|
|
690
|
+
export { _default_6 as default_alias_9 }
|
|
724
691
|
export { _default_6 as handOver }
|
|
725
692
|
export { _default_6 as handOver_alias_1 }
|
|
726
|
-
export { _default_6 as handOver_alias_2 }
|
|
727
693
|
|
|
728
694
|
declare const _default_7: {
|
|
729
695
|
handler: ToolHandler<{
|
|
@@ -746,10 +712,9 @@ declare const _default_7: {
|
|
|
746
712
|
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
747
713
|
}, z.core.$strip>;
|
|
748
714
|
};
|
|
749
|
-
export { _default_7 as
|
|
715
|
+
export { _default_7 as default_alias_10 }
|
|
750
716
|
export { _default_7 as listFiles }
|
|
751
717
|
export { _default_7 as listFiles_alias_1 }
|
|
752
|
-
export { _default_7 as listFiles_alias_2 }
|
|
753
718
|
|
|
754
719
|
declare const _default_8: {
|
|
755
720
|
handler: ToolHandler<{
|
|
@@ -766,10 +731,9 @@ declare const _default_8: {
|
|
|
766
731
|
url: z.ZodString;
|
|
767
732
|
}, z.core.$strip>;
|
|
768
733
|
};
|
|
769
|
-
export { _default_8 as
|
|
734
|
+
export { _default_8 as default_alias_11 }
|
|
770
735
|
export { _default_8 as readBinaryFile }
|
|
771
736
|
export { _default_8 as readBinaryFile_alias_1 }
|
|
772
|
-
export { _default_8 as readBinaryFile_alias_2 }
|
|
773
737
|
|
|
774
738
|
declare const _default_9: {
|
|
775
739
|
handler: ToolHandler<{
|
|
@@ -788,10 +752,9 @@ declare const _default_9: {
|
|
|
788
752
|
includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
789
753
|
}, z.core.$strip>;
|
|
790
754
|
};
|
|
791
|
-
export { _default_9 as
|
|
755
|
+
export { _default_9 as default_alias_12 }
|
|
792
756
|
export { _default_9 as readFile }
|
|
793
757
|
export { _default_9 as readFile_alias_1 }
|
|
794
|
-
export { _default_9 as readFile_alias_2 }
|
|
795
758
|
|
|
796
759
|
/**
|
|
797
760
|
* AI tool for creating new projects based on user specifications.
|
|
@@ -838,47 +801,6 @@ export declare const default_alias_3: {
|
|
|
838
801
|
readonly agent: "analyzer";
|
|
839
802
|
};
|
|
840
803
|
|
|
841
|
-
export declare const default_alias_4: {
|
|
842
|
-
readonly name: "reviewDiff";
|
|
843
|
-
readonly description: "Reviews a git diff";
|
|
844
|
-
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- **ONLY run git_diff on files that are reviewable source/config files** per the \"File Selection for git_diff\" rules below. Do not pass excluded files to git_diff.\n\n## File Selection for git_diff\nUse <file_status> to decide which files to diff. Include only files likely to contain human-authored source or meaningful configuration.\n\nInclude (run git_diff):\n- Application/source code\n- UI/templates/assets code\n- Infra/config that affects behavior\n\nExclude (do NOT run git_diff; do not review):\n- Lockfiles\n- Generated/build artifacts & deps\n- Test artifacts/snapshots\n- Data and fixtures\n- Binary/media/minified/maps\n\n## Viewing Changes\n- For each included file, **use git_diff** to inspect the actual code changes:\n - **Pull request:** use the provided commit range for the git_diff tool with contextLines: 5 and includeLineNumbers: true, but only surface and review the included files.\n - **Local changes:** diff staged or unstaged included files using git_diff with contextLines: 5 and includeLineNumbers: true.\n- The diff will include line number annotations: [Line N] for additions and [Line N removed] for deletions.\n- 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- Use <file_status> to understand which files were modified, added, deleted, or renamed and to apply the inclusion/exclusion rules above.\n\n## Line Number Reporting\n- Use the line numbers from the annotations in the diff output.\n- For additions: use the number from the [Line N] annotation after the + line.\n- For deletions: use the number from the [Line N removed] annotation after the - line.\n- For modifications: report the line number of the new/current code (from [Line N]).\n- Report single lines as \"N\" and ranges as \"N-M\".\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 accurate line references from the annotations.\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** unless directly tied to a specific problem visible in the diff.\n\n## What NOT to review\n- Files excluded by the \"File Selection for git_diff\" rules (do not diff or comment on them).\n- Existing unchanged code.\n- Overall project structure/architecture unless directly impacted by the changes.\n- Missing features or functionality not part of this diff.\n\n## Output Format\nDo not include praise or positive feedback.\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```json\n{\n \"overview\": \"Summary of specific issues found in the diff changes, 'No issues found', or 'No reviewable changes' if all modified files were excluded.\",\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";
|
|
845
|
-
readonly formatInput: (params: Input_2) => string;
|
|
846
|
-
readonly parseOutput: (output: string) => Output_2;
|
|
847
|
-
readonly agent: (options: SharedAgentOptions) => AnalyzerAgent;
|
|
848
|
-
};
|
|
849
|
-
|
|
850
|
-
export declare const default_alias_5: {
|
|
851
|
-
handler: ToolHandler<{
|
|
852
|
-
readonly name: "git_diff";
|
|
853
|
-
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.";
|
|
854
|
-
readonly parameters: z.ZodObject<{
|
|
855
|
-
staged: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
856
|
-
commitRange: z.ZodOptional<z.ZodString>;
|
|
857
|
-
file: z.ZodString;
|
|
858
|
-
contextLines: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
859
|
-
includeLineNumbers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
860
|
-
}, z.core.$strip>;
|
|
861
|
-
}, CommandProvider>;
|
|
862
|
-
isAvailable: (provider: CommandProvider) => boolean;
|
|
863
|
-
name: "git_diff";
|
|
864
|
-
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.";
|
|
865
|
-
parameters: z.ZodObject<{
|
|
866
|
-
staged: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
867
|
-
commitRange: z.ZodOptional<z.ZodString>;
|
|
868
|
-
file: z.ZodString;
|
|
869
|
-
contextLines: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
870
|
-
includeLineNumbers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
871
|
-
}, z.core.$strip>;
|
|
872
|
-
};
|
|
873
|
-
|
|
874
|
-
export declare interface DiffHunk {
|
|
875
|
-
oldStart: number;
|
|
876
|
-
oldCount: number;
|
|
877
|
-
newStart: number;
|
|
878
|
-
newCount: number;
|
|
879
|
-
header: string;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
804
|
/**
|
|
883
805
|
* Returns the directory portion of a path string.
|
|
884
806
|
* Strips trailing slashes, then takes everything up to the last slash.
|
|
@@ -919,16 +841,6 @@ export { ExitReason }
|
|
|
919
841
|
export { ExitReason as ExitReason_alias_1 }
|
|
920
842
|
export { ExitReason as ExitReason_alias_2 }
|
|
921
843
|
|
|
922
|
-
/**
|
|
923
|
-
* Extract line ranges from a diff for a specific file
|
|
924
|
-
* Returns an array of line ranges that were modified
|
|
925
|
-
*/
|
|
926
|
-
export declare function extractModifiedLineRanges(diff: string, filePath?: string): Array<{
|
|
927
|
-
start: number;
|
|
928
|
-
end: number;
|
|
929
|
-
type: 'added' | 'removed' | 'modified';
|
|
930
|
-
}>;
|
|
931
|
-
|
|
932
844
|
declare type FilesystemProvider = {
|
|
933
845
|
readFile?: (path: string, includeIgnored: boolean) => Promise<string | undefined>;
|
|
934
846
|
writeFile?: (path: string, content: string) => Promise<void>;
|
|
@@ -964,7 +876,7 @@ export declare const fullSystemPrompt_alias_2: (info: {
|
|
|
964
876
|
}, tools: FullToolInfoV2[], toolNamePrefix: string, instructions: string[], scripts: Record<string, string | {
|
|
965
877
|
command: string;
|
|
966
878
|
description: string;
|
|
967
|
-
}>,
|
|
879
|
+
}>, useNativeTool: boolean) => string;
|
|
968
880
|
|
|
969
881
|
export declare const fullSystemPrompt_alias_3: (info: {
|
|
970
882
|
os: string;
|
|
@@ -1017,14 +929,12 @@ export declare const getArray: <T extends string>(args: Partial<Record<T, ToolPa
|
|
|
1017
929
|
* @param provider The provider to use.
|
|
1018
930
|
* @param allTools All possible tools.
|
|
1019
931
|
* @param hasAgent Whether the agent has agents.
|
|
1020
|
-
* @param interactive Determines whether the `askFollowupQuestion` tool is available.
|
|
1021
932
|
* @returns The available tools
|
|
1022
933
|
*/
|
|
1023
|
-
declare const getAvailableTools: <T extends FullToolInfoV2 | FullToolInfo>({ provider, allTools, hasAgent,
|
|
934
|
+
declare const getAvailableTools: <T extends FullToolInfoV2 | FullToolInfo>({ provider, allTools, hasAgent, }: {
|
|
1024
935
|
provider: any;
|
|
1025
936
|
allTools: T[];
|
|
1026
937
|
hasAgent: boolean;
|
|
1027
|
-
interactive: boolean;
|
|
1028
938
|
}) => T[];
|
|
1029
939
|
export { getAvailableTools }
|
|
1030
940
|
export { getAvailableTools as getAvailableTools_alias_1 }
|
|
@@ -1047,7 +957,7 @@ export declare const getString: <T extends string>(args: Partial<Record<T, strin
|
|
|
1047
957
|
|
|
1048
958
|
export declare const getStringArray: <T extends string>(args: Partial<Record<T, ToolParameterValue>>, name: T, defaultValue?: string[]) => string[];
|
|
1049
959
|
|
|
1050
|
-
export declare const handler: ToolHandler<typeof toolInfo,
|
|
960
|
+
export declare const handler: ToolHandler<typeof toolInfo, InteractionProvider>;
|
|
1051
961
|
|
|
1052
962
|
export declare const handler_alias_1: ToolHandler<typeof toolInfo_alias_1, InteractionProvider>;
|
|
1053
963
|
|
|
@@ -1059,17 +969,15 @@ export declare const handler_alias_12: ToolHandler<typeof toolInfo_alias_12, Fil
|
|
|
1059
969
|
|
|
1060
970
|
export declare const handler_alias_13: ToolHandler<typeof toolInfo_alias_13, FilesystemProvider>;
|
|
1061
971
|
|
|
1062
|
-
export declare const
|
|
1063
|
-
|
|
1064
|
-
export declare const handler_alias_2: ToolHandler<typeof toolInfo_alias_2, InteractionProvider>;
|
|
972
|
+
export declare const handler_alias_2: ToolHandler<typeof toolInfo_alias_2, any>;
|
|
1065
973
|
|
|
1066
|
-
export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3,
|
|
974
|
+
export declare const handler_alias_3: ToolHandler<typeof toolInfo_alias_3, CommandProvider>;
|
|
1067
975
|
|
|
1068
|
-
export declare const handler_alias_4: ToolHandler<typeof toolInfo_alias_4,
|
|
976
|
+
export declare const handler_alias_4: ToolHandler<typeof toolInfo_alias_4, WebProvider>;
|
|
1069
977
|
|
|
1070
|
-
export declare const handler_alias_5: ToolHandler<typeof toolInfo_alias_5,
|
|
978
|
+
export declare const handler_alias_5: ToolHandler<typeof toolInfo_alias_5, any>;
|
|
1071
979
|
|
|
1072
|
-
export declare const handler_alias_6: ToolHandler<typeof toolInfo_alias_6,
|
|
980
|
+
export declare const handler_alias_6: ToolHandler<typeof toolInfo_alias_6, FilesystemProvider>;
|
|
1073
981
|
|
|
1074
982
|
export declare const handler_alias_7: ToolHandler<typeof toolInfo_alias_7, FilesystemProvider>;
|
|
1075
983
|
|
|
@@ -1084,18 +992,6 @@ declare type Input = {
|
|
|
1084
992
|
branchName: string;
|
|
1085
993
|
};
|
|
1086
994
|
|
|
1087
|
-
declare type Input_2 = {
|
|
1088
|
-
pullRequestTitle?: string;
|
|
1089
|
-
pullRequestDescription?: string;
|
|
1090
|
-
commitMessages?: string;
|
|
1091
|
-
commitRange?: string;
|
|
1092
|
-
staged?: boolean;
|
|
1093
|
-
changedFiles?: Array<{
|
|
1094
|
-
path: string;
|
|
1095
|
-
status: string;
|
|
1096
|
-
}>;
|
|
1097
|
-
};
|
|
1098
|
-
|
|
1099
995
|
declare type InputType = {
|
|
1100
996
|
$: Record<string, Record<string, Json>>;
|
|
1101
997
|
[key: string]: Json;
|
|
@@ -1109,9 +1005,9 @@ export { InteractionProvider }
|
|
|
1109
1005
|
export { InteractionProvider as InteractionProvider_alias_1 }
|
|
1110
1006
|
export { InteractionProvider as InteractionProvider_alias_2 }
|
|
1111
1007
|
|
|
1112
|
-
export declare const isAvailable: (provider:
|
|
1008
|
+
export declare const isAvailable: (provider: InteractionProvider) => boolean;
|
|
1113
1009
|
|
|
1114
|
-
export declare const isAvailable_alias_1: (
|
|
1010
|
+
export declare const isAvailable_alias_1: (_provider: InteractionProvider) => boolean;
|
|
1115
1011
|
|
|
1116
1012
|
export declare const isAvailable_alias_10: (provider: FilesystemProvider) => boolean;
|
|
1117
1013
|
|
|
@@ -1121,17 +1017,15 @@ export declare const isAvailable_alias_12: (provider: FilesystemProvider) => boo
|
|
|
1121
1017
|
|
|
1122
1018
|
export declare const isAvailable_alias_13: (provider: FilesystemProvider) => boolean;
|
|
1123
1019
|
|
|
1124
|
-
export declare const
|
|
1125
|
-
|
|
1126
|
-
export declare const isAvailable_alias_2: (_provider: InteractionProvider) => boolean;
|
|
1020
|
+
export declare const isAvailable_alias_2: (_provider: any) => boolean;
|
|
1127
1021
|
|
|
1128
|
-
export declare const isAvailable_alias_3: (
|
|
1022
|
+
export declare const isAvailable_alias_3: (provider: CommandProvider) => boolean;
|
|
1129
1023
|
|
|
1130
|
-
export declare const isAvailable_alias_4: (provider:
|
|
1024
|
+
export declare const isAvailable_alias_4: (provider: WebProvider) => boolean;
|
|
1131
1025
|
|
|
1132
|
-
export declare const isAvailable_alias_5: (
|
|
1026
|
+
export declare const isAvailable_alias_5: (_provider: any) => boolean;
|
|
1133
1027
|
|
|
1134
|
-
export declare const isAvailable_alias_6: (
|
|
1028
|
+
export declare const isAvailable_alias_6: (provider: FilesystemProvider) => boolean;
|
|
1135
1029
|
|
|
1136
1030
|
export declare const isAvailable_alias_7: (provider: FilesystemProvider) => boolean;
|
|
1137
1031
|
|
|
@@ -1229,11 +1123,6 @@ declare type Output = {
|
|
|
1229
1123
|
description: string;
|
|
1230
1124
|
};
|
|
1231
1125
|
|
|
1232
|
-
declare type Output_2 = {
|
|
1233
|
-
overview: string;
|
|
1234
|
-
specificReviews: SpecificReview[];
|
|
1235
|
-
};
|
|
1236
|
-
|
|
1237
1126
|
declare interface ParallelStepSpec<TInput extends Record<string, Json> = Record<string, Json>, TOutput extends Record<string, Json> = Record<string, Json>> extends BaseStepSpec<Record<string, Json>, Record<string, Json>> {
|
|
1238
1127
|
type: 'parallel';
|
|
1239
1128
|
step: BaseStepSpec<TInput, TOutput>;
|
|
@@ -1314,11 +1203,10 @@ export { parseAssistantMessage }
|
|
|
1314
1203
|
export { parseAssistantMessage as parseAssistantMessage_alias_1 }
|
|
1315
1204
|
export { parseAssistantMessage as parseAssistantMessage_alias_2 }
|
|
1316
1205
|
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
export declare function parseHunkHeader(header: string): DiffHunk | null;
|
|
1206
|
+
declare const parseJsonFromMarkdown: (markdown: string) => any;
|
|
1207
|
+
export { parseJsonFromMarkdown }
|
|
1208
|
+
export { parseJsonFromMarkdown as parseJsonFromMarkdown_alias_1 }
|
|
1209
|
+
export { parseJsonFromMarkdown as parseJsonFromMarkdown_alias_2 }
|
|
1322
1210
|
|
|
1323
1211
|
declare enum Policies {
|
|
1324
1212
|
TruncateContext = "truncatecontext",
|
|
@@ -1329,8 +1217,8 @@ export { Policies as Policies_alias_1 }
|
|
|
1329
1217
|
|
|
1330
1218
|
declare const replaceInFile_2: (fileContent: string, diff: string) => ReplaceResult;
|
|
1331
1219
|
export { replaceInFile_2 as replaceInFileHelper }
|
|
1220
|
+
export { replaceInFile_2 as replaceInFile_alias_2 }
|
|
1332
1221
|
export { replaceInFile_2 as replaceInFile_alias_3 }
|
|
1333
|
-
export { replaceInFile_2 as replaceInFile_alias_4 }
|
|
1334
1222
|
|
|
1335
1223
|
declare type ReplaceResult = {
|
|
1336
1224
|
content: string;
|
|
@@ -1358,37 +1246,16 @@ export { responsePrompts }
|
|
|
1358
1246
|
export { responsePrompts as responsePrompts_alias_1 }
|
|
1359
1247
|
export { responsePrompts as responsePrompts_alias_2 }
|
|
1360
1248
|
|
|
1361
|
-
declare const resume: <TInput extends Record<string, Json>, TOutput extends Record<string, Json>>(workflow: WorkflowSpec<TInput, TOutput
|
|
1249
|
+
declare const resume: <TInput extends Record<string, Json>, TOutput extends Record<string, Json>>(workflow: WorkflowSpec<TInput, TOutput>, context: WorkflowContext, handler: StepSpecHandlerFn<any, any>, state: any, input: TInput) => Promise<WorkflowRunResult<TOutput>>;
|
|
1362
1250
|
export { resume }
|
|
1363
1251
|
export { resume as resume_alias_1 }
|
|
1364
1252
|
export { resume as resume_alias_2 }
|
|
1365
1253
|
|
|
1366
1254
|
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";
|
|
1367
1255
|
|
|
1368
|
-
declare const reviewDiff: (options: SharedAgentOptions, params: {
|
|
1369
|
-
pullRequestTitle?: string;
|
|
1370
|
-
pullRequestDescription?: string;
|
|
1371
|
-
commitMessages?: string;
|
|
1372
|
-
commitRange?: string;
|
|
1373
|
-
staged?: boolean;
|
|
1374
|
-
changedFiles?: Array<{
|
|
1375
|
-
path: string;
|
|
1376
|
-
status: string;
|
|
1377
|
-
}>;
|
|
1378
|
-
}) => Promise<{
|
|
1379
|
-
overview: string;
|
|
1380
|
-
specificReviews: {
|
|
1381
|
-
file: string;
|
|
1382
|
-
lines: string;
|
|
1383
|
-
review: string;
|
|
1384
|
-
}[];
|
|
1385
|
-
}>;
|
|
1386
|
-
export { reviewDiff }
|
|
1387
|
-
export { reviewDiff as reviewDiff_alias_1 }
|
|
1388
|
-
|
|
1389
1256
|
export declare const rules: (toolNamePrefix: string) => string;
|
|
1390
1257
|
|
|
1391
|
-
declare const run: <TInput extends Record<string, Json>, TOutput extends Record<string, Json>>(workflow: WorkflowSpec<TInput, TOutput
|
|
1258
|
+
declare const run: <TInput extends Record<string, Json>, TOutput extends Record<string, Json>>(workflow: WorkflowSpec<TInput, TOutput>, context: WorkflowContext, handler: StepSpecHandlerFn<any, any>, input: TInput) => Promise<WorkflowRunResult<TOutput>>;
|
|
1392
1259
|
export { run }
|
|
1393
1260
|
export { run as run_alias_1 }
|
|
1394
1261
|
export { run as run_alias_2 }
|
|
@@ -1413,7 +1280,6 @@ declare type SharedAgentOptions = {
|
|
|
1413
1280
|
ai: LanguageModelV2;
|
|
1414
1281
|
os: string;
|
|
1415
1282
|
provider: ToolProvider;
|
|
1416
|
-
interactive: boolean;
|
|
1417
1283
|
additionalTools?: FullToolInfoV2[];
|
|
1418
1284
|
customInstructions?: string[];
|
|
1419
1285
|
scripts?: Record<string, string | {
|
|
@@ -1434,11 +1300,10 @@ export { SharedAgentOptions }
|
|
|
1434
1300
|
export { SharedAgentOptions as SharedAgentOptions_alias_1 }
|
|
1435
1301
|
export { SharedAgentOptions as SharedAgentOptions_alias_2 }
|
|
1436
1302
|
|
|
1437
|
-
declare
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
};
|
|
1303
|
+
declare function step<TInput extends Record<string, Json>, TOutput extends Record<string, Json>>(id: string, run: CustomStepSpec<TInput, TOutput>['run']): CustomStepSpec<TInput, TOutput>;
|
|
1304
|
+
export { step }
|
|
1305
|
+
export { step as step_alias_1 }
|
|
1306
|
+
export { step as step_alias_2 }
|
|
1442
1307
|
|
|
1443
1308
|
declare type StepRunResult<T extends Record<string, Json>> = StepRunResultSuccess<T> | StepRunResultPaused | StepRunResultError;
|
|
1444
1309
|
export { StepRunResult }
|
|
@@ -1471,13 +1336,10 @@ export { StepRunResultSuccess as StepRunResultSuccess_alias_2 }
|
|
|
1471
1336
|
|
|
1472
1337
|
declare class StepsBuilder<TInput extends Record<string, Json> = Record<string, Json>, TOutput extends Record<string, Json> = Record<string, Json>> {
|
|
1473
1338
|
#private;
|
|
1474
|
-
build(): BaseStepSpec
|
|
1475
|
-
id: string;
|
|
1476
|
-
type: string;
|
|
1477
|
-
steps: BaseStepSpec[];
|
|
1478
|
-
};
|
|
1339
|
+
build(): BaseStepSpec<TInput, TOutput>;
|
|
1479
1340
|
step<TStepOutput extends Record<string, Json>, TStepSpec extends BaseStepSpec<TOutput, TStepOutput>>(step: TStepSpec): StepsBuilder<TInput, TStepOutput>;
|
|
1480
1341
|
parallel<TStepOutput extends Record<string, Json>>(id: string, step: BaseStepSpec<TOutput, TStepOutput>): StepsBuilder<TInput, TStepOutput>;
|
|
1342
|
+
custom<TStepOutput extends Record<string, Json>>(spec: CustomStepSpec<TOutput, TStepOutput>): StepsBuilder<TInput, TStepOutput>;
|
|
1481
1343
|
custom<TStepOutput extends Record<string, Json>>(id: string, run: CustomStepSpec<TOutput, TStepOutput>['run']): StepsBuilder<TInput, TStepOutput>;
|
|
1482
1344
|
agent<TStepOutput extends Record<string, Json>>(id: string, spec: Omit<AgentStepSpec<TOutput, TStepOutput>, 'id' | 'type'>): StepsBuilder<TInput, TStepOutput>;
|
|
1483
1345
|
}
|
|
@@ -1737,18 +1599,6 @@ export { ToolInfo }
|
|
|
1737
1599
|
export { ToolInfo as ToolInfo_alias_1 }
|
|
1738
1600
|
|
|
1739
1601
|
export declare const toolInfo: {
|
|
1740
|
-
readonly name: "git_diff";
|
|
1741
|
-
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.";
|
|
1742
|
-
readonly parameters: z.ZodObject<{
|
|
1743
|
-
staged: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1744
|
-
commitRange: z.ZodOptional<z.ZodString>;
|
|
1745
|
-
file: z.ZodString;
|
|
1746
|
-
contextLines: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
1747
|
-
includeLineNumbers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1748
|
-
}, z.core.$strip>;
|
|
1749
|
-
};
|
|
1750
|
-
|
|
1751
|
-
export declare const toolInfo_alias_1: {
|
|
1752
1602
|
readonly name: "ask_followup_question";
|
|
1753
1603
|
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.";
|
|
1754
1604
|
readonly parameters: z.ZodObject<{
|
|
@@ -1759,15 +1609,15 @@ export declare const toolInfo_alias_1: {
|
|
|
1759
1609
|
}, z.core.$strip>;
|
|
1760
1610
|
};
|
|
1761
1611
|
|
|
1762
|
-
export declare const
|
|
1763
|
-
readonly name: "
|
|
1764
|
-
readonly description: "
|
|
1612
|
+
export declare const toolInfo_alias_1: {
|
|
1613
|
+
readonly name: "attempt_completion";
|
|
1614
|
+
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.";
|
|
1765
1615
|
readonly parameters: z.ZodObject<{
|
|
1766
|
-
|
|
1616
|
+
result: z.ZodString;
|
|
1767
1617
|
}, z.core.$strip>;
|
|
1768
1618
|
};
|
|
1769
1619
|
|
|
1770
|
-
export declare const
|
|
1620
|
+
export declare const toolInfo_alias_10: {
|
|
1771
1621
|
readonly name: "rename_file";
|
|
1772
1622
|
readonly description: "Request to rename a file from source path to target path.";
|
|
1773
1623
|
readonly parameters: z.ZodObject<{
|
|
@@ -1776,7 +1626,7 @@ export declare const toolInfo_alias_11: {
|
|
|
1776
1626
|
}, z.core.$strip>;
|
|
1777
1627
|
};
|
|
1778
1628
|
|
|
1779
|
-
export declare const
|
|
1629
|
+
export declare const toolInfo_alias_11: {
|
|
1780
1630
|
readonly name: "replace_in_file";
|
|
1781
1631
|
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.";
|
|
1782
1632
|
readonly parameters: z.ZodObject<{
|
|
@@ -1785,7 +1635,7 @@ export declare const toolInfo_alias_12: {
|
|
|
1785
1635
|
}, z.core.$strip>;
|
|
1786
1636
|
};
|
|
1787
1637
|
|
|
1788
|
-
export declare const
|
|
1638
|
+
export declare const toolInfo_alias_12: {
|
|
1789
1639
|
readonly name: "search_files";
|
|
1790
1640
|
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.";
|
|
1791
1641
|
readonly parameters: z.ZodObject<{
|
|
@@ -1795,7 +1645,7 @@ export declare const toolInfo_alias_13: {
|
|
|
1795
1645
|
}, z.core.$strip>;
|
|
1796
1646
|
};
|
|
1797
1647
|
|
|
1798
|
-
export declare const
|
|
1648
|
+
export declare const toolInfo_alias_13: {
|
|
1799
1649
|
readonly name: "write_to_file";
|
|
1800
1650
|
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 `<`, `>`, or `&`. Also ensure there is no unwanted CDATA tags in the content.";
|
|
1801
1651
|
readonly parameters: z.ZodObject<{
|
|
@@ -1805,14 +1655,6 @@ export declare const toolInfo_alias_14: {
|
|
|
1805
1655
|
};
|
|
1806
1656
|
|
|
1807
1657
|
export declare const toolInfo_alias_2: {
|
|
1808
|
-
readonly name: "attempt_completion";
|
|
1809
|
-
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.";
|
|
1810
|
-
readonly parameters: z.ZodObject<{
|
|
1811
|
-
result: z.ZodString;
|
|
1812
|
-
}, z.core.$strip>;
|
|
1813
|
-
};
|
|
1814
|
-
|
|
1815
|
-
export declare const toolInfo_alias_3: {
|
|
1816
1658
|
readonly name: "delegate";
|
|
1817
1659
|
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.";
|
|
1818
1660
|
readonly parameters: z.ZodObject<{
|
|
@@ -1823,7 +1665,7 @@ export declare const toolInfo_alias_3: {
|
|
|
1823
1665
|
}, z.core.$strip>;
|
|
1824
1666
|
};
|
|
1825
1667
|
|
|
1826
|
-
export declare const
|
|
1668
|
+
export declare const toolInfo_alias_3: {
|
|
1827
1669
|
readonly name: "execute_command";
|
|
1828
1670
|
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.";
|
|
1829
1671
|
readonly parameters: z.ZodObject<{
|
|
@@ -1832,7 +1674,7 @@ export declare const toolInfo_alias_4: {
|
|
|
1832
1674
|
}, z.core.$strip>;
|
|
1833
1675
|
};
|
|
1834
1676
|
|
|
1835
|
-
export declare const
|
|
1677
|
+
export declare const toolInfo_alias_4: {
|
|
1836
1678
|
readonly name: "fetch_url";
|
|
1837
1679
|
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.";
|
|
1838
1680
|
readonly parameters: z.ZodObject<{
|
|
@@ -1840,7 +1682,7 @@ export declare const toolInfo_alias_5: {
|
|
|
1840
1682
|
}, z.core.$strip>;
|
|
1841
1683
|
};
|
|
1842
1684
|
|
|
1843
|
-
export declare const
|
|
1685
|
+
export declare const toolInfo_alias_5: {
|
|
1844
1686
|
readonly name: "hand_over";
|
|
1845
1687
|
readonly description: "Hand over the current task to another agent to complete. This tool MUST NOT to be used with any other tool.";
|
|
1846
1688
|
readonly parameters: z.ZodObject<{
|
|
@@ -1851,7 +1693,7 @@ export declare const toolInfo_alias_6: {
|
|
|
1851
1693
|
}, z.core.$strip>;
|
|
1852
1694
|
};
|
|
1853
1695
|
|
|
1854
|
-
export declare const
|
|
1696
|
+
export declare const toolInfo_alias_6: {
|
|
1855
1697
|
readonly name: "list_files";
|
|
1856
1698
|
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.";
|
|
1857
1699
|
readonly parameters: z.ZodObject<{
|
|
@@ -1862,7 +1704,7 @@ export declare const toolInfo_alias_7: {
|
|
|
1862
1704
|
}, z.core.$strip>;
|
|
1863
1705
|
};
|
|
1864
1706
|
|
|
1865
|
-
export declare const
|
|
1707
|
+
export declare const toolInfo_alias_7: {
|
|
1866
1708
|
readonly name: "read_binary_file";
|
|
1867
1709
|
readonly description: "Read a binary file from a URL or local path. Use file:// prefix to access local files. This can be used to access non-text files such as PDFs or images.";
|
|
1868
1710
|
readonly parameters: z.ZodObject<{
|
|
@@ -1870,7 +1712,7 @@ export declare const toolInfo_alias_8: {
|
|
|
1870
1712
|
}, z.core.$strip>;
|
|
1871
1713
|
};
|
|
1872
1714
|
|
|
1873
|
-
export declare const
|
|
1715
|
+
export declare const toolInfo_alias_8: {
|
|
1874
1716
|
readonly name: "read_file";
|
|
1875
1717
|
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.";
|
|
1876
1718
|
readonly parameters: z.ZodObject<{
|
|
@@ -1879,6 +1721,14 @@ export declare const toolInfo_alias_9: {
|
|
|
1879
1721
|
}, z.core.$strip>;
|
|
1880
1722
|
};
|
|
1881
1723
|
|
|
1724
|
+
export declare const toolInfo_alias_9: {
|
|
1725
|
+
readonly name: "remove_file";
|
|
1726
|
+
readonly description: "Request to remove a file at the specified path.";
|
|
1727
|
+
readonly parameters: z.ZodObject<{
|
|
1728
|
+
path: z.ZodString;
|
|
1729
|
+
}, z.core.$strip>;
|
|
1730
|
+
};
|
|
1731
|
+
|
|
1882
1732
|
declare type ToolInfoV2 = {
|
|
1883
1733
|
name: string;
|
|
1884
1734
|
description: string;
|
|
@@ -2056,6 +1906,7 @@ declare type Totals = {
|
|
|
2056
1906
|
output: number;
|
|
2057
1907
|
cachedRead: number;
|
|
2058
1908
|
cost: number;
|
|
1909
|
+
messageCount: number;
|
|
2059
1910
|
};
|
|
2060
1911
|
|
|
2061
1912
|
export declare function toToolInfoV1(tool: FullToolInfoV2): FullToolInfo;
|
|
@@ -2089,10 +1940,8 @@ declare class UsageMeter {
|
|
|
2089
1940
|
modelInfo?: ModelInfo;
|
|
2090
1941
|
}): void;
|
|
2091
1942
|
/** Override the running totals (e.g., restore from saved state). */
|
|
2092
|
-
setUsage(newUsage: Partial<Totals
|
|
2093
|
-
|
|
2094
|
-
}>): void;
|
|
2095
|
-
/** Manually bump the message count (useful if you record some calls without token info). */
|
|
1943
|
+
setUsage(newUsage: Partial<Totals>): void;
|
|
1944
|
+
/** Manually bump the message count (useful if you record some messages without token info). */
|
|
2096
1945
|
incrementMessageCount(n?: number): void;
|
|
2097
1946
|
/** Reset the running totals. */
|
|
2098
1947
|
resetUsage(): void;
|
|
@@ -2108,11 +1957,11 @@ declare class UsageMeter {
|
|
|
2108
1957
|
checkLimit(): void;
|
|
2109
1958
|
/** Getter for the aggregated totals (immutable copy). */
|
|
2110
1959
|
get usage(): {
|
|
2111
|
-
messageCount: number;
|
|
2112
1960
|
input: number;
|
|
2113
1961
|
output: number;
|
|
2114
1962
|
cachedRead: number;
|
|
2115
1963
|
cost: number;
|
|
1964
|
+
messageCount: number;
|
|
2116
1965
|
};
|
|
2117
1966
|
/** Print a concise usage summary to console. */
|
|
2118
1967
|
printUsage(customConsole?: Console): void;
|
|
@@ -2134,6 +1983,9 @@ export { WebProvider as WebProvider_alias_2 }
|
|
|
2134
1983
|
declare type WorkflowContext = {
|
|
2135
1984
|
provider: ToolProvider;
|
|
2136
1985
|
parameters: Record<string, any>;
|
|
1986
|
+
verbose?: number;
|
|
1987
|
+
agentCallback?: TaskEventCallback;
|
|
1988
|
+
logger?: Console;
|
|
2137
1989
|
};
|
|
2138
1990
|
export { WorkflowContext }
|
|
2139
1991
|
export { WorkflowContext as WorkflowContext_alias_1 }
|
|
@@ -2168,10 +2020,10 @@ export { WorkflowRunResultSuccess }
|
|
|
2168
2020
|
export { WorkflowRunResultSuccess as WorkflowRunResultSuccess_alias_1 }
|
|
2169
2021
|
export { WorkflowRunResultSuccess as WorkflowRunResultSuccess_alias_2 }
|
|
2170
2022
|
|
|
2171
|
-
declare interface WorkflowSpec<TInput extends Record<string, Json> = Record<string, Json>, TOutput extends Record<string, Json> = Record<string, Json
|
|
2023
|
+
declare interface WorkflowSpec<TInput extends Record<string, Json> = Record<string, Json>, TOutput extends Record<string, Json> = Record<string, Json>> {
|
|
2172
2024
|
name: string;
|
|
2173
2025
|
description?: string;
|
|
2174
|
-
step:
|
|
2026
|
+
step: BaseStepSpec<TInput, TOutput>;
|
|
2175
2027
|
}
|
|
2176
2028
|
export { WorkflowSpec }
|
|
2177
2029
|
export { WorkflowSpec as WorkflowSpec_alias_1 }
|