@polka-codes/core 0.9.25 → 0.9.27

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.
@@ -65,11 +65,28 @@ declare type AgentBaseConfig = {
65
65
  toolFormat: ToolFormat;
66
66
  parameters: Record<string, any>;
67
67
  usageMeter: UsageMeter;
68
+ requireToolUse: boolean;
68
69
  };
69
70
  export { AgentBaseConfig }
70
71
  export { AgentBaseConfig as AgentBaseConfig_alias_1 }
71
72
  export { AgentBaseConfig as AgentBaseConfig_alias_2 }
72
73
 
74
+ declare type AgentContextParameters = {
75
+ budget?: number;
76
+ maxMessages?: number;
77
+ toolFormat?: ToolFormat;
78
+ os?: string;
79
+ policies?: AgentPolicy[];
80
+ modelParameters?: Record<string, any>;
81
+ scripts?: Record<string, string | {
82
+ command: string;
83
+ description: string;
84
+ }>;
85
+ };
86
+ export { AgentContextParameters }
87
+ export { AgentContextParameters as AgentContextParameters_alias_1 }
88
+ export { AgentContextParameters as AgentContextParameters_alias_2 }
89
+
73
90
  declare type AgentInfo = {
74
91
  name: string;
75
92
  responsibilities: string[];
@@ -104,6 +121,27 @@ export { agentsPrompt }
104
121
  export { agentsPrompt as agentsPrompt_alias_1 }
105
122
  export { agentsPrompt as agentsPrompt_alias_2 }
106
123
 
124
+ declare type AgentStepSpec<TInput extends Record<string, Json> = Record<string, Json>, TOutput extends Record<string, Json> = Record<string, Json>> = BaseStepSpec<TInput, TOutput> & {
125
+ type: 'agent';
126
+ messages: (UserContent_2 | TemplatedString)[];
127
+ outputSchema: z.ZodType;
128
+ provider?: string;
129
+ model?: string;
130
+ budget?: number;
131
+ maxMessages?: number;
132
+ modelParameters?: Record<string, any>;
133
+ toolFormat?: ToolFormat;
134
+ } & ({
135
+ agent: AgentNameType;
136
+ tools?: FullToolInfoV2[];
137
+ } | {
138
+ systemPrompt: string | TemplatedString;
139
+ tools: FullToolInfoV2[];
140
+ });
141
+ export { AgentStepSpec }
142
+ export { AgentStepSpec as AgentStepSpec_alias_1 }
143
+ export { AgentStepSpec as AgentStepSpec_alias_2 }
144
+
107
145
  declare type AiToolDefinition<Input, Output = string> = {
108
146
  name: string;
109
147
  description: string;
@@ -215,6 +253,21 @@ export declare const basePrompt = "You are a highly skilled software engineer sp
215
253
 
216
254
  export declare const basePrompt_alias_1 = "You are a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.";
217
255
 
256
+ declare type BaseStepSpec<TInput extends Record<string, Json> = Record<string, Json>, TOutput extends Record<string, Json> = Record<string, Json>> = {
257
+ id: string;
258
+ type: string;
259
+ inputSchema?: z.ZodType<TInput>;
260
+ outputSchema?: z.ZodType<TOutput>;
261
+ };
262
+ export { BaseStepSpec }
263
+ export { BaseStepSpec as BaseStepSpec_alias_1 }
264
+ export { BaseStepSpec as BaseStepSpec_alias_2 }
265
+
266
+ declare const builder: <TInput extends Record<string, Json>>() => StepsBuilder<TInput, TInput>;
267
+ export { builder }
268
+ export { builder as builder_alias_1 }
269
+ export { builder as builder_alias_2 }
270
+
218
271
  declare const capabilities: (_toolNamePrefix: string) => string;
219
272
  export { capabilities }
220
273
  export { capabilities as capabilities_alias_1 }
@@ -276,6 +329,17 @@ export { CoderAgentOptions }
276
329
  export { CoderAgentOptions as CoderAgentOptions_alias_1 }
277
330
  export { CoderAgentOptions as CoderAgentOptions_alias_2 }
278
331
 
332
+ declare const combineHandlers: <THandlers extends StepSpecHandler[]>(...handlers: THandlers) => (step: BaseStepSpec, rootHandler: StepSpecHandlerFn<any, any>) => StepSpecRaw;
333
+ export { combineHandlers }
334
+ export { combineHandlers as combineHandlers_alias_1 }
335
+ export { combineHandlers as combineHandlers_alias_2 }
336
+
337
+ declare type CommandOutput = {
338
+ stdout?: string;
339
+ stderr?: string;
340
+ exitCode?: number;
341
+ };
342
+
279
343
  declare type CommandProvider = {
280
344
  executeCommand?: (command: string, needApprove: boolean) => Promise<{
281
345
  stdout: string;
@@ -287,6 +351,21 @@ export { CommandProvider }
287
351
  export { CommandProvider as CommandProvider_alias_1 }
288
352
  export { CommandProvider as CommandProvider_alias_2 }
289
353
 
354
+ declare interface CommandStepSpec extends BaseStepSpec<Record<string, string>, CommandOutput> {
355
+ type: 'command';
356
+ command: (string | TemplatedString)[];
357
+ outputs?: ('stdout' | 'stderr' | 'exitCode')[];
358
+ }
359
+ export { CommandStepSpec }
360
+ export { CommandStepSpec as CommandStepSpec_alias_1 }
361
+ export { CommandStepSpec as CommandStepSpec_alias_2 }
362
+
363
+ declare const commandStepSpecHandler: StepSpecHandler;
364
+ export { commandStepSpecHandler }
365
+ export { commandStepSpecHandler as commandStepSpecHandler_alias_1 }
366
+ export { commandStepSpecHandler as commandStepSpecHandler_alias_2 }
367
+ export { commandStepSpecHandler as commandStepSpecHandler_alias_3 }
368
+
290
369
  declare type Config = z.infer<typeof configSchema>;
291
370
  export { Config }
292
371
  export { Config as Config_alias_1 }
@@ -380,6 +459,22 @@ export { customScripts }
380
459
  export { customScripts as customScripts_alias_1 }
381
460
  export { customScripts as customScripts_alias_2 }
382
461
 
462
+ declare interface CustomStepSpec<TInput extends Record<string, Json> = Record<string, Json>, TOutput extends Record<string, Json> = Record<string, Json>> extends BaseStepSpec<TInput, TOutput> {
463
+ type: 'custom';
464
+ run: (input: TInput & {
465
+ $: Record<string, Record<string, Json>>;
466
+ }, context: WorkflowContext, resumedState?: any) => Promise<StepRunResult<TOutput>>;
467
+ }
468
+ export { CustomStepSpec }
469
+ export { CustomStepSpec as CustomStepSpec_alias_1 }
470
+ export { CustomStepSpec as CustomStepSpec_alias_2 }
471
+
472
+ declare const customStepSpecHandler: StepSpecHandler;
473
+ export { customStepSpecHandler }
474
+ export { customStepSpecHandler as customStepSpecHandler_alias_1 }
475
+ export { customStepSpecHandler as customStepSpecHandler_alias_2 }
476
+ export { customStepSpecHandler as customStepSpecHandler_alias_3 }
477
+
383
478
  declare const _default: {
384
479
  handler: ToolHandler<{
385
480
  readonly name: "ask_followup_question";
@@ -390,7 +485,6 @@ declare const _default: {
390
485
  options: z.ZodDefault<z.ZodArray<z.ZodString>>;
391
486
  }, z.core.$strip>>;
392
487
  }, z.core.$strip>;
393
- readonly permissionLevel: PermissionLevel.None;
394
488
  }, InteractionProvider>;
395
489
  isAvailable: (provider: InteractionProvider) => boolean;
396
490
  name: "ask_followup_question";
@@ -401,7 +495,6 @@ declare const _default: {
401
495
  options: z.ZodDefault<z.ZodArray<z.ZodString>>;
402
496
  }, z.core.$strip>>;
403
497
  }, z.core.$strip>;
404
- permissionLevel: PermissionLevel.None;
405
498
  };
406
499
  export { _default as askFollowupQuestion }
407
500
  export { _default as askFollowupQuestion_alias_1 }
@@ -415,7 +508,6 @@ declare const _default_10: {
415
508
  readonly parameters: z.ZodObject<{
416
509
  path: z.ZodString;
417
510
  }, z.core.$strip>;
418
- readonly permissionLevel: PermissionLevel.Write;
419
511
  }, FilesystemProvider>;
420
512
  isAvailable: (provider: FilesystemProvider) => boolean;
421
513
  name: "remove_file";
@@ -423,7 +515,6 @@ declare const _default_10: {
423
515
  parameters: z.ZodObject<{
424
516
  path: z.ZodString;
425
517
  }, z.core.$strip>;
426
- permissionLevel: PermissionLevel.Write;
427
518
  };
428
519
  export { _default_10 as default_alias_15 }
429
520
  export { _default_10 as removeFile }
@@ -438,7 +529,6 @@ declare const _default_11: {
438
529
  source_path: z.ZodString;
439
530
  target_path: z.ZodString;
440
531
  }, z.core.$strip>;
441
- readonly permissionLevel: PermissionLevel.Write;
442
532
  }, FilesystemProvider>;
443
533
  isAvailable: (provider: FilesystemProvider) => boolean;
444
534
  name: "rename_file";
@@ -447,7 +537,6 @@ declare const _default_11: {
447
537
  source_path: z.ZodString;
448
538
  target_path: z.ZodString;
449
539
  }, z.core.$strip>;
450
- permissionLevel: PermissionLevel.Write;
451
540
  };
452
541
  export { _default_11 as default_alias_16 }
453
542
  export { _default_11 as renameFile }
@@ -462,7 +551,6 @@ declare const _default_12: {
462
551
  path: z.ZodString;
463
552
  diff: z.ZodString;
464
553
  }, z.core.$strip>;
465
- readonly permissionLevel: PermissionLevel.Write;
466
554
  }, FilesystemProvider>;
467
555
  isAvailable: (provider: FilesystemProvider) => boolean;
468
556
  name: "replace_in_file";
@@ -471,7 +559,6 @@ declare const _default_12: {
471
559
  path: z.ZodString;
472
560
  diff: z.ZodString;
473
561
  }, z.core.$strip>;
474
- permissionLevel: PermissionLevel.Write;
475
562
  };
476
563
  export { _default_12 as default_alias_17 }
477
564
  export { _default_12 as replaceInFile }
@@ -487,7 +574,6 @@ declare const _default_13: {
487
574
  regex: z.ZodString;
488
575
  filePattern: z.ZodOptional<z.ZodString>;
489
576
  }, z.core.$strip>;
490
- readonly permissionLevel: PermissionLevel.Read;
491
577
  }, FilesystemProvider>;
492
578
  isAvailable: (provider: FilesystemProvider) => boolean;
493
579
  name: "search_files";
@@ -497,7 +583,6 @@ declare const _default_13: {
497
583
  regex: z.ZodString;
498
584
  filePattern: z.ZodOptional<z.ZodString>;
499
585
  }, z.core.$strip>;
500
- permissionLevel: PermissionLevel.Read;
501
586
  };
502
587
  export { _default_13 as default_alias_18 }
503
588
  export { _default_13 as searchFiles }
@@ -512,7 +597,6 @@ declare const _default_14: {
512
597
  path: z.ZodString;
513
598
  content: z.ZodString;
514
599
  }, z.core.$strip>;
515
- readonly permissionLevel: PermissionLevel.Write;
516
600
  }, FilesystemProvider>;
517
601
  isAvailable: (provider: FilesystemProvider) => boolean;
518
602
  name: "write_to_file";
@@ -521,7 +605,6 @@ declare const _default_14: {
521
605
  path: z.ZodString;
522
606
  content: z.ZodString;
523
607
  }, z.core.$strip>;
524
- permissionLevel: PermissionLevel.Write;
525
608
  };
526
609
  export { _default_14 as default_alias_19 }
527
610
  export { _default_14 as writeToFile }
@@ -535,7 +618,6 @@ declare const _default_2: {
535
618
  readonly parameters: z.ZodObject<{
536
619
  result: z.ZodString;
537
620
  }, z.core.$strip>;
538
- readonly permissionLevel: PermissionLevel.None;
539
621
  }, InteractionProvider>;
540
622
  isAvailable: (_provider: InteractionProvider) => boolean;
541
623
  name: "attempt_completion";
@@ -543,7 +625,6 @@ declare const _default_2: {
543
625
  parameters: z.ZodObject<{
544
626
  result: z.ZodString;
545
627
  }, z.core.$strip>;
546
- permissionLevel: PermissionLevel.None;
547
628
  };
548
629
  export { _default_2 as attemptCompletion }
549
630
  export { _default_2 as attemptCompletion_alias_1 }
@@ -560,7 +641,6 @@ declare const _default_3: {
560
641
  context: z.ZodString;
561
642
  files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
562
643
  }, z.core.$strip>;
563
- readonly permissionLevel: PermissionLevel.None;
564
644
  }, any>;
565
645
  isAvailable: (_provider: any) => boolean;
566
646
  name: "delegate";
@@ -571,7 +651,6 @@ declare const _default_3: {
571
651
  context: z.ZodString;
572
652
  files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
573
653
  }, z.core.$strip>;
574
- permissionLevel: PermissionLevel.None;
575
654
  };
576
655
  export { _default_3 as default_alias_8 }
577
656
  export { _default_3 as delegate }
@@ -586,7 +665,6 @@ declare const _default_4: {
586
665
  command: z.ZodString;
587
666
  requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
588
667
  }, z.core.$strip>;
589
- readonly permissionLevel: PermissionLevel.Arbitrary;
590
668
  }, CommandProvider>;
591
669
  isAvailable: (provider: CommandProvider) => boolean;
592
670
  name: "execute_command";
@@ -595,7 +673,6 @@ declare const _default_4: {
595
673
  command: z.ZodString;
596
674
  requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
597
675
  }, z.core.$strip>;
598
- permissionLevel: PermissionLevel.Arbitrary;
599
676
  };
600
677
  export { _default_4 as default_alias_9 }
601
678
  export { _default_4 as executeCommand }
@@ -609,7 +686,6 @@ declare const _default_5: {
609
686
  readonly parameters: z.ZodObject<{
610
687
  url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
611
688
  }, z.core.$strip>;
612
- readonly permissionLevel: PermissionLevel.Read;
613
689
  }, WebProvider>;
614
690
  isAvailable: (provider: WebProvider) => boolean;
615
691
  name: "fetch_url";
@@ -617,7 +693,6 @@ declare const _default_5: {
617
693
  parameters: z.ZodObject<{
618
694
  url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
619
695
  }, z.core.$strip>;
620
- permissionLevel: PermissionLevel.Read;
621
696
  };
622
697
  export { _default_5 as default_alias_10 }
623
698
  export { _default_5 as fetchUrl }
@@ -634,7 +709,6 @@ declare const _default_6: {
634
709
  context: z.ZodString;
635
710
  files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
636
711
  }, z.core.$strip>;
637
- readonly permissionLevel: PermissionLevel.None;
638
712
  }, any>;
639
713
  isAvailable: (_provider: any) => boolean;
640
714
  name: "hand_over";
@@ -645,7 +719,6 @@ declare const _default_6: {
645
719
  context: z.ZodString;
646
720
  files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
647
721
  }, z.core.$strip>;
648
- permissionLevel: PermissionLevel.None;
649
722
  };
650
723
  export { _default_6 as default_alias_11 }
651
724
  export { _default_6 as handOver }
@@ -662,7 +735,6 @@ declare const _default_7: {
662
735
  recursive: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
663
736
  includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
664
737
  }, z.core.$strip>;
665
- readonly permissionLevel: PermissionLevel.Read;
666
738
  }, FilesystemProvider>;
667
739
  isAvailable: (provider: FilesystemProvider) => boolean;
668
740
  name: "list_files";
@@ -673,7 +745,6 @@ declare const _default_7: {
673
745
  recursive: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
674
746
  includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
675
747
  }, z.core.$strip>;
676
- permissionLevel: PermissionLevel.Read;
677
748
  };
678
749
  export { _default_7 as default_alias_12 }
679
750
  export { _default_7 as listFiles }
@@ -687,7 +758,6 @@ declare const _default_8: {
687
758
  readonly parameters: z.ZodObject<{
688
759
  url: z.ZodString;
689
760
  }, z.core.$strip>;
690
- readonly permissionLevel: PermissionLevel.Read;
691
761
  }, FilesystemProvider>;
692
762
  isAvailable: (provider: FilesystemProvider) => boolean;
693
763
  name: "read_binary_file";
@@ -695,7 +765,6 @@ declare const _default_8: {
695
765
  parameters: z.ZodObject<{
696
766
  url: z.ZodString;
697
767
  }, z.core.$strip>;
698
- permissionLevel: PermissionLevel.Read;
699
768
  };
700
769
  export { _default_8 as default_alias_13 }
701
770
  export { _default_8 as readBinaryFile }
@@ -710,7 +779,6 @@ declare const _default_9: {
710
779
  path: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
711
780
  includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
712
781
  }, z.core.$strip>;
713
- readonly permissionLevel: PermissionLevel.Read;
714
782
  }, FilesystemProvider>;
715
783
  isAvailable: (provider: FilesystemProvider) => boolean;
716
784
  name: "read_file";
@@ -719,7 +787,6 @@ declare const _default_9: {
719
787
  path: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
720
788
  includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
721
789
  }, z.core.$strip>;
722
- permissionLevel: PermissionLevel.Read;
723
790
  };
724
791
  export { _default_9 as default_alias_14 }
725
792
  export { _default_9 as readFile }
@@ -774,7 +841,7 @@ export declare const default_alias_3: {
774
841
  export declare const default_alias_4: {
775
842
  readonly name: "reviewDiff";
776
843
  readonly description: "Reviews a git diff";
777
- 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<tool_attempt_completion>\n<tool_parameter_result>\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</tool_parameter_result>\n</tool_attempt_completion>\n";
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";
778
845
  readonly formatInput: (params: Input_2) => string;
779
846
  readonly parseOutput: (output: string) => Output_2;
780
847
  readonly agent: (options: SharedAgentOptions) => AnalyzerAgent;
@@ -791,7 +858,6 @@ export declare const default_alias_5: {
791
858
  contextLines: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
792
859
  includeLineNumbers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
793
860
  }, z.core.$strip>;
794
- readonly permissionLevel: PermissionLevel.Read;
795
861
  }, CommandProvider>;
796
862
  isAvailable: (provider: CommandProvider) => boolean;
797
863
  name: "git_diff";
@@ -803,7 +869,6 @@ export declare const default_alias_5: {
803
869
  contextLines: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
804
870
  includeLineNumbers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
805
871
  }, z.core.$strip>;
806
- permissionLevel: PermissionLevel.Read;
807
872
  };
808
873
 
809
874
  export declare interface DiffHunk {
@@ -952,15 +1017,13 @@ export declare const getArray: <T extends string>(args: Partial<Record<T, ToolPa
952
1017
  * @param provider The provider to use.
953
1018
  * @param allTools All possible tools.
954
1019
  * @param hasAgent Whether the agent has agents.
955
- * @param permissionLevel Determines which tools are available based on the agent's assigned level.
956
1020
  * @param interactive Determines whether the `askFollowupQuestion` tool is available.
957
1021
  * @returns The available tools
958
1022
  */
959
- declare const getAvailableTools: <T extends FullToolInfoV2 | FullToolInfo>({ provider, allTools, hasAgent, permissionLevel, interactive, }: {
1023
+ declare const getAvailableTools: <T extends FullToolInfoV2 | FullToolInfo>({ provider, allTools, hasAgent, interactive, }: {
960
1024
  provider: any;
961
1025
  allTools: T[];
962
1026
  hasAgent: boolean;
963
- permissionLevel: PermissionLevel;
964
1027
  interactive: boolean;
965
1028
  }) => T[];
966
1029
  export { getAvailableTools }
@@ -1033,6 +1096,11 @@ declare type Input_2 = {
1033
1096
  }>;
1034
1097
  };
1035
1098
 
1099
+ declare type InputType = {
1100
+ $: Record<string, Record<string, Json>>;
1101
+ [key: string]: Json;
1102
+ };
1103
+
1036
1104
  declare type InteractionProvider = {
1037
1105
  askFollowupQuestion?: (question: string, options: string[]) => Promise<string>;
1038
1106
  attemptCompletion?: (result: string) => Promise<string | undefined>;
@@ -1076,6 +1144,19 @@ export declare const isAvailable_alias_9: (provider: FilesystemProvider) => bool
1076
1144
  */
1077
1145
  export declare function join(...parts: string[]): string;
1078
1146
 
1147
+ declare type Json = boolean | number | string | Json[] | {
1148
+ [k: string]: Json;
1149
+ };
1150
+ export { Json }
1151
+ export { Json as Json_alias_1 }
1152
+ export { Json as Json_alias_2 }
1153
+
1154
+ declare const makeAgentStepSpecHandler: (getModelFn: (step: AgentStepSpec, context: WorkflowContext) => Promise<LanguageModelV2>) => StepSpecHandler;
1155
+ export { makeAgentStepSpecHandler }
1156
+ export { makeAgentStepSpecHandler as makeAgentStepSpecHandler_alias_1 }
1157
+ export { makeAgentStepSpecHandler as makeAgentStepSpecHandler_alias_2 }
1158
+ export { makeAgentStepSpecHandler as makeAgentStepSpecHandler_alias_3 }
1159
+
1079
1160
  declare const makeAgentTool: <T extends AiToolDefinitionWithAgent<any, any>>(definition: T) => (options: SharedAgentOptions, params: GetInput<T>) => Promise<GetOutput<T>>;
1080
1161
  export { makeAgentTool }
1081
1162
  export { makeAgentTool as makeAgentTool_alias_1 }
@@ -1153,6 +1234,20 @@ declare type Output_2 = {
1153
1234
  specificReviews: SpecificReview[];
1154
1235
  };
1155
1236
 
1237
+ 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
+ type: 'parallel';
1239
+ step: BaseStepSpec<TInput, TOutput>;
1240
+ }
1241
+ export { ParallelStepSpec }
1242
+ export { ParallelStepSpec as ParallelStepSpec_alias_1 }
1243
+ export { ParallelStepSpec as ParallelStepSpec_alias_2 }
1244
+
1245
+ declare const parallelStepSpecHandler: StepSpecHandler;
1246
+ export { parallelStepSpecHandler }
1247
+ export { parallelStepSpecHandler as parallelStepSpecHandler_alias_1 }
1248
+ export { parallelStepSpecHandler as parallelStepSpecHandler_alias_2 }
1249
+ export { parallelStepSpecHandler as parallelStepSpecHandler_alias_3 }
1250
+
1156
1251
  /**
1157
1252
  * Parse an assistant's message into an array of text content and tool use content.
1158
1253
  *
@@ -1225,15 +1320,6 @@ export { parseAssistantMessage as parseAssistantMessage_alias_2 }
1225
1320
  */
1226
1321
  export declare function parseHunkHeader(header: string): DiffHunk | null;
1227
1322
 
1228
- declare enum PermissionLevel {
1229
- None = 0,
1230
- Read = 1,
1231
- Write = 2,
1232
- Arbitrary = 3
1233
- }
1234
- export { PermissionLevel }
1235
- export { PermissionLevel as PermissionLevel_alias_1 }
1236
-
1237
1323
  declare enum Policies {
1238
1324
  TruncateContext = "truncatecontext",
1239
1325
  EnableCache = "enablecache"
@@ -1255,6 +1341,12 @@ declare type ReplaceResult = {
1255
1341
  export { ReplaceResult }
1256
1342
  export { ReplaceResult as ReplaceResult_alias_1 }
1257
1343
 
1344
+ export declare const resolveTemplatedString: (templatedString: string | TemplatedString<{
1345
+ [k: string]: Json;
1346
+ }>, input: {
1347
+ [k: string]: Json;
1348
+ }) => string;
1349
+
1258
1350
  declare const responsePrompts: {
1259
1351
  readonly errorInvokeTool: (tool: string, error: unknown) => string;
1260
1352
  readonly requireUseTool: "Error: No tool use detected. You MUST use a tool before proceeding.\ne.g. <tool_tool_name>tool_name</tool_tool_name>\n\nEnsure the opening and closing tags are correctly nested and closed, and that you are using the correct tool name.\nAvoid unnecessary text or symbols before or after the tool use.\nAvoid unnecessary escape characters or special characters.\n";
@@ -1266,6 +1358,11 @@ export { responsePrompts }
1266
1358
  export { responsePrompts as responsePrompts_alias_1 }
1267
1359
  export { responsePrompts as responsePrompts_alias_2 }
1268
1360
 
1361
+ declare const resume: <TInput extends Record<string, Json>, TOutput extends Record<string, Json>>(workflow: WorkflowSpec<TInput, TOutput, any>, context: WorkflowContext, handler: StepSpecHandlerFn<any, any>, state: any, input: TInput) => Promise<WorkflowRunResult<TOutput>>;
1362
+ export { resume }
1363
+ export { resume as resume_alias_1 }
1364
+ export { resume as resume_alias_2 }
1365
+
1269
1366
  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";
1270
1367
 
1271
1368
  declare const reviewDiff: (options: SharedAgentOptions, params: {
@@ -1291,6 +1388,27 @@ export { reviewDiff as reviewDiff_alias_1 }
1291
1388
 
1292
1389
  export declare const rules: (toolNamePrefix: string) => string;
1293
1390
 
1391
+ declare const run: <TInput extends Record<string, Json>, TOutput extends Record<string, Json>>(workflow: WorkflowSpec<TInput, TOutput, any>, context: WorkflowContext, handler: StepSpecHandlerFn<any, any>, input: TInput) => Promise<WorkflowRunResult<TOutput>>;
1392
+ export { run }
1393
+ export { run as run_alias_1 }
1394
+ export { run as run_alias_2 }
1395
+
1396
+ export declare const runStep: (step: StepSpecRaw, input: Record<string, Json>, context: WorkflowContext, resumedState: any | undefined, allOutputs: Record<string, Record<string, Json>>) => Promise<StepRunResult<Record<string, Json>>>;
1397
+
1398
+ declare interface SequentialStepSpec<TInput extends Record<string, Json> = Record<string, Json>, TOutput extends Record<string, Json> = Record<string, Json>, TStepSpec extends BaseStepSpec = BaseStepSpec> extends BaseStepSpec<TInput, TOutput> {
1399
+ type: 'sequential';
1400
+ steps: TStepSpec[];
1401
+ }
1402
+ export { SequentialStepSpec }
1403
+ export { SequentialStepSpec as SequentialStepSpec_alias_1 }
1404
+ export { SequentialStepSpec as SequentialStepSpec_alias_2 }
1405
+
1406
+ declare const sequentialStepSpecHandler: StepSpecHandler;
1407
+ export { sequentialStepSpecHandler }
1408
+ export { sequentialStepSpecHandler as sequentialStepSpecHandler_alias_1 }
1409
+ export { sequentialStepSpecHandler as sequentialStepSpecHandler_alias_2 }
1410
+ export { sequentialStepSpecHandler as sequentialStepSpecHandler_alias_3 }
1411
+
1294
1412
  declare type SharedAgentOptions = {
1295
1413
  ai: LanguageModelV2;
1296
1414
  os: string;
@@ -1310,6 +1428,7 @@ declare type SharedAgentOptions = {
1310
1428
  toolFormat: ToolFormat;
1311
1429
  parameters?: Record<string, any>;
1312
1430
  usageMeter?: UsageMeter;
1431
+ requireToolUse?: boolean;
1313
1432
  };
1314
1433
  export { SharedAgentOptions }
1315
1434
  export { SharedAgentOptions as SharedAgentOptions_alias_1 }
@@ -1321,6 +1440,72 @@ declare type SpecificReview = {
1321
1440
  review: string;
1322
1441
  };
1323
1442
 
1443
+ declare type StepRunResult<T extends Record<string, Json>> = StepRunResultSuccess<T> | StepRunResultPaused | StepRunResultError;
1444
+ export { StepRunResult }
1445
+ export { StepRunResult as StepRunResult_alias_1 }
1446
+ export { StepRunResult as StepRunResult_alias_2 }
1447
+
1448
+ declare type StepRunResultError = {
1449
+ type: 'error';
1450
+ error: any;
1451
+ };
1452
+ export { StepRunResultError }
1453
+ export { StepRunResultError as StepRunResultError_alias_1 }
1454
+ export { StepRunResultError as StepRunResultError_alias_2 }
1455
+
1456
+ declare type StepRunResultPaused = {
1457
+ type: 'paused';
1458
+ state: any;
1459
+ };
1460
+ export { StepRunResultPaused }
1461
+ export { StepRunResultPaused as StepRunResultPaused_alias_1 }
1462
+ export { StepRunResultPaused as StepRunResultPaused_alias_2 }
1463
+
1464
+ declare type StepRunResultSuccess<T extends Record<string, Json>> = {
1465
+ type: 'success';
1466
+ output: T;
1467
+ };
1468
+ export { StepRunResultSuccess }
1469
+ export { StepRunResultSuccess as StepRunResultSuccess_alias_1 }
1470
+ export { StepRunResultSuccess as StepRunResultSuccess_alias_2 }
1471
+
1472
+ declare class StepsBuilder<TInput extends Record<string, Json> = Record<string, Json>, TOutput extends Record<string, Json> = Record<string, Json>> {
1473
+ #private;
1474
+ build(): BaseStepSpec | {
1475
+ id: string;
1476
+ type: string;
1477
+ steps: BaseStepSpec[];
1478
+ };
1479
+ step<TStepOutput extends Record<string, Json>, TStepSpec extends BaseStepSpec<TOutput, TStepOutput>>(step: TStepSpec): StepsBuilder<TInput, TStepOutput>;
1480
+ parallel<TStepOutput extends Record<string, Json>>(id: string, step: BaseStepSpec<TOutput, TStepOutput>): StepsBuilder<TInput, TStepOutput>;
1481
+ custom<TStepOutput extends Record<string, Json>>(id: string, run: CustomStepSpec<TOutput, TStepOutput>['run']): StepsBuilder<TInput, TStepOutput>;
1482
+ agent<TStepOutput extends Record<string, Json>>(id: string, spec: Omit<AgentStepSpec<TOutput, TStepOutput>, 'id' | 'type'>): StepsBuilder<TInput, TStepOutput>;
1483
+ }
1484
+
1485
+ declare type StepSpecHandler = {
1486
+ type: string;
1487
+ handler: StepSpecHandlerFn<any, any>;
1488
+ };
1489
+ export { StepSpecHandler }
1490
+ export { StepSpecHandler as StepSpecHandler_alias_1 }
1491
+ export { StepSpecHandler as StepSpecHandler_alias_2 }
1492
+
1493
+ declare type StepSpecHandlerFn<TStepSpec extends BaseStepSpec, TRootStepSpec extends BaseStepSpec> = (step: TStepSpec, rootHandler: StepSpecHandlerFn<TRootStepSpec, TRootStepSpec>) => StepSpecRaw;
1494
+ export { StepSpecHandlerFn }
1495
+ export { StepSpecHandlerFn as StepSpecHandlerFn_alias_1 }
1496
+ export { StepSpecHandlerFn as StepSpecHandlerFn_alias_2 }
1497
+
1498
+ declare type StepSpecRaw = {
1499
+ id: string;
1500
+ type: string;
1501
+ inputSchema?: z.ZodType<any>;
1502
+ outputSchema?: z.ZodType<any>;
1503
+ run: (input: InputType, context: WorkflowContext, resumedState?: any) => Promise<StepRunResult<Record<string, Json>>>;
1504
+ };
1505
+ export { StepSpecRaw }
1506
+ export { StepSpecRaw as StepSpecRaw_alias_1 }
1507
+ export { StepSpecRaw as StepSpecRaw_alias_2 }
1508
+
1324
1509
  declare const systemInformation: (info: {
1325
1510
  os: string;
1326
1511
  }) => string;
@@ -1506,6 +1691,19 @@ export { TaskEventUsageExceeded }
1506
1691
  export { TaskEventUsageExceeded as TaskEventUsageExceeded_alias_1 }
1507
1692
  export { TaskEventUsageExceeded as TaskEventUsageExceeded_alias_2 }
1508
1693
 
1694
+ declare type TemplatedString<T = {
1695
+ [k: string]: Json;
1696
+ }> = {
1697
+ type: 'template';
1698
+ template: string;
1699
+ } | {
1700
+ type: 'function';
1701
+ fn: (input: T) => string;
1702
+ };
1703
+ export { TemplatedString }
1704
+ export { TemplatedString as TemplatedString_alias_1 }
1705
+ export { TemplatedString as TemplatedString_alias_2 }
1706
+
1509
1707
  declare interface TextContent {
1510
1708
  type: 'text';
1511
1709
  content: string;
@@ -1534,7 +1732,6 @@ declare type ToolInfo = {
1534
1732
  description: string;
1535
1733
  parameters: ToolParameter[];
1536
1734
  examples?: ToolExample[];
1537
- permissionLevel: PermissionLevel;
1538
1735
  };
1539
1736
  export { ToolInfo }
1540
1737
  export { ToolInfo as ToolInfo_alias_1 }
@@ -1549,7 +1746,6 @@ export declare const toolInfo: {
1549
1746
  contextLines: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
1550
1747
  includeLineNumbers: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1551
1748
  }, z.core.$strip>;
1552
- readonly permissionLevel: PermissionLevel.Read;
1553
1749
  };
1554
1750
 
1555
1751
  export declare const toolInfo_alias_1: {
@@ -1561,7 +1757,6 @@ export declare const toolInfo_alias_1: {
1561
1757
  options: z.ZodDefault<z.ZodArray<z.ZodString>>;
1562
1758
  }, z.core.$strip>>;
1563
1759
  }, z.core.$strip>;
1564
- readonly permissionLevel: PermissionLevel.None;
1565
1760
  };
1566
1761
 
1567
1762
  export declare const toolInfo_alias_10: {
@@ -1570,7 +1765,6 @@ export declare const toolInfo_alias_10: {
1570
1765
  readonly parameters: z.ZodObject<{
1571
1766
  path: z.ZodString;
1572
1767
  }, z.core.$strip>;
1573
- readonly permissionLevel: PermissionLevel.Write;
1574
1768
  };
1575
1769
 
1576
1770
  export declare const toolInfo_alias_11: {
@@ -1580,7 +1774,6 @@ export declare const toolInfo_alias_11: {
1580
1774
  source_path: z.ZodString;
1581
1775
  target_path: z.ZodString;
1582
1776
  }, z.core.$strip>;
1583
- readonly permissionLevel: PermissionLevel.Write;
1584
1777
  };
1585
1778
 
1586
1779
  export declare const toolInfo_alias_12: {
@@ -1590,7 +1783,6 @@ export declare const toolInfo_alias_12: {
1590
1783
  path: z.ZodString;
1591
1784
  diff: z.ZodString;
1592
1785
  }, z.core.$strip>;
1593
- readonly permissionLevel: PermissionLevel.Write;
1594
1786
  };
1595
1787
 
1596
1788
  export declare const toolInfo_alias_13: {
@@ -1601,7 +1793,6 @@ export declare const toolInfo_alias_13: {
1601
1793
  regex: z.ZodString;
1602
1794
  filePattern: z.ZodOptional<z.ZodString>;
1603
1795
  }, z.core.$strip>;
1604
- readonly permissionLevel: PermissionLevel.Read;
1605
1796
  };
1606
1797
 
1607
1798
  export declare const toolInfo_alias_14: {
@@ -1611,7 +1802,6 @@ export declare const toolInfo_alias_14: {
1611
1802
  path: z.ZodString;
1612
1803
  content: z.ZodString;
1613
1804
  }, z.core.$strip>;
1614
- readonly permissionLevel: PermissionLevel.Write;
1615
1805
  };
1616
1806
 
1617
1807
  export declare const toolInfo_alias_2: {
@@ -1620,7 +1810,6 @@ export declare const toolInfo_alias_2: {
1620
1810
  readonly parameters: z.ZodObject<{
1621
1811
  result: z.ZodString;
1622
1812
  }, z.core.$strip>;
1623
- readonly permissionLevel: PermissionLevel.None;
1624
1813
  };
1625
1814
 
1626
1815
  export declare const toolInfo_alias_3: {
@@ -1632,7 +1821,6 @@ export declare const toolInfo_alias_3: {
1632
1821
  context: z.ZodString;
1633
1822
  files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
1634
1823
  }, z.core.$strip>;
1635
- readonly permissionLevel: PermissionLevel.None;
1636
1824
  };
1637
1825
 
1638
1826
  export declare const toolInfo_alias_4: {
@@ -1642,7 +1830,6 @@ export declare const toolInfo_alias_4: {
1642
1830
  command: z.ZodString;
1643
1831
  requiresApproval: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1644
1832
  }, z.core.$strip>;
1645
- readonly permissionLevel: PermissionLevel.Arbitrary;
1646
1833
  };
1647
1834
 
1648
1835
  export declare const toolInfo_alias_5: {
@@ -1651,7 +1838,6 @@ export declare const toolInfo_alias_5: {
1651
1838
  readonly parameters: z.ZodObject<{
1652
1839
  url: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
1653
1840
  }, z.core.$strip>;
1654
- readonly permissionLevel: PermissionLevel.Read;
1655
1841
  };
1656
1842
 
1657
1843
  export declare const toolInfo_alias_6: {
@@ -1663,7 +1849,6 @@ export declare const toolInfo_alias_6: {
1663
1849
  context: z.ZodString;
1664
1850
  files: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>>;
1665
1851
  }, z.core.$strip>;
1666
- readonly permissionLevel: PermissionLevel.None;
1667
1852
  };
1668
1853
 
1669
1854
  export declare const toolInfo_alias_7: {
@@ -1675,7 +1860,6 @@ export declare const toolInfo_alias_7: {
1675
1860
  recursive: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1676
1861
  includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1677
1862
  }, z.core.$strip>;
1678
- readonly permissionLevel: PermissionLevel.Read;
1679
1863
  };
1680
1864
 
1681
1865
  export declare const toolInfo_alias_8: {
@@ -1684,7 +1868,6 @@ export declare const toolInfo_alias_8: {
1684
1868
  readonly parameters: z.ZodObject<{
1685
1869
  url: z.ZodString;
1686
1870
  }, z.core.$strip>;
1687
- readonly permissionLevel: PermissionLevel.Read;
1688
1871
  };
1689
1872
 
1690
1873
  export declare const toolInfo_alias_9: {
@@ -1694,14 +1877,12 @@ export declare const toolInfo_alias_9: {
1694
1877
  path: z.ZodPipe<z.ZodTransform<string[], unknown>, z.ZodArray<z.ZodString>>;
1695
1878
  includeIgnored: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1696
1879
  }, z.core.$strip>;
1697
- readonly permissionLevel: PermissionLevel.Read;
1698
1880
  };
1699
1881
 
1700
1882
  declare type ToolInfoV2 = {
1701
1883
  name: string;
1702
1884
  description: string;
1703
1885
  parameters: z.ZodObject<any>;
1704
- permissionLevel: PermissionLevel;
1705
1886
  };
1706
1887
  export { ToolInfoV2 }
1707
1888
  export { ToolInfoV2 as ToolInfoV2_alias_1 }
@@ -1950,4 +2131,59 @@ export { WebProvider }
1950
2131
  export { WebProvider as WebProvider_alias_1 }
1951
2132
  export { WebProvider as WebProvider_alias_2 }
1952
2133
 
2134
+ declare type WorkflowContext = {
2135
+ provider: ToolProvider;
2136
+ parameters: Record<string, any>;
2137
+ };
2138
+ export { WorkflowContext }
2139
+ export { WorkflowContext as WorkflowContext_alias_1 }
2140
+ export { WorkflowContext as WorkflowContext_alias_2 }
2141
+
2142
+ declare type WorkflowRunResult<T extends Record<string, Json>> = WorkflowRunResultSuccess<T> | WorkflowRunResultError | WorkflowRunResultPaused;
2143
+ export { WorkflowRunResult }
2144
+ export { WorkflowRunResult as WorkflowRunResult_alias_1 }
2145
+ export { WorkflowRunResult as WorkflowRunResult_alias_2 }
2146
+
2147
+ declare type WorkflowRunResultError = {
2148
+ type: 'error';
2149
+ error: any;
2150
+ };
2151
+ export { WorkflowRunResultError }
2152
+ export { WorkflowRunResultError as WorkflowRunResultError_alias_1 }
2153
+ export { WorkflowRunResultError as WorkflowRunResultError_alias_2 }
2154
+
2155
+ declare type WorkflowRunResultPaused = {
2156
+ type: 'paused';
2157
+ state: any;
2158
+ };
2159
+ export { WorkflowRunResultPaused }
2160
+ export { WorkflowRunResultPaused as WorkflowRunResultPaused_alias_1 }
2161
+ export { WorkflowRunResultPaused as WorkflowRunResultPaused_alias_2 }
2162
+
2163
+ declare type WorkflowRunResultSuccess<T extends Record<string, Json>> = {
2164
+ type: 'success';
2165
+ output: T;
2166
+ };
2167
+ export { WorkflowRunResultSuccess }
2168
+ export { WorkflowRunResultSuccess as WorkflowRunResultSuccess_alias_1 }
2169
+ export { WorkflowRunResultSuccess as WorkflowRunResultSuccess_alias_2 }
2170
+
2171
+ declare interface WorkflowSpec<TInput extends Record<string, Json> = Record<string, Json>, TOutput extends Record<string, Json> = Record<string, Json>, TStepSpec extends BaseStepSpec<TInput, TOutput> = BaseStepSpec<TInput, TOutput>> {
2172
+ name: string;
2173
+ description?: string;
2174
+ step: TStepSpec;
2175
+ }
2176
+ export { WorkflowSpec }
2177
+ export { WorkflowSpec as WorkflowSpec_alias_1 }
2178
+ export { WorkflowSpec as WorkflowSpec_alias_2 }
2179
+
2180
+ declare interface WorkflowSpecRaw {
2181
+ name: string;
2182
+ description?: string;
2183
+ step: StepSpecRaw;
2184
+ }
2185
+ export { WorkflowSpecRaw }
2186
+ export { WorkflowSpecRaw as WorkflowSpecRaw_alias_1 }
2187
+ export { WorkflowSpecRaw as WorkflowSpecRaw_alias_2 }
2188
+
1953
2189
  export { }