@renseiai/agentfactory 0.8.12 → 0.8.13
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/src/config/repository-config.d.ts +24 -0
- package/dist/src/config/repository-config.d.ts.map +1 -1
- package/dist/src/config/repository-config.js +21 -0
- package/dist/src/config/repository-config.test.js +202 -0
- package/dist/src/governor/decision-engine.d.ts +2 -0
- package/dist/src/governor/decision-engine.d.ts.map +1 -1
- package/dist/src/governor/decision-engine.js +7 -0
- package/dist/src/governor/decision-engine.test.js +63 -0
- package/dist/src/governor/governor-types.d.ts +2 -1
- package/dist/src/governor/governor-types.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/merge-queue/conflict-resolver.d.ts +62 -0
- package/dist/src/merge-queue/conflict-resolver.d.ts.map +1 -0
- package/dist/src/merge-queue/conflict-resolver.js +168 -0
- package/dist/src/merge-queue/conflict-resolver.test.d.ts +2 -0
- package/dist/src/merge-queue/conflict-resolver.test.d.ts.map +1 -0
- package/dist/src/merge-queue/conflict-resolver.test.js +405 -0
- package/dist/src/merge-queue/lock-file-regeneration.d.ts +14 -0
- package/dist/src/merge-queue/lock-file-regeneration.d.ts.map +1 -0
- package/dist/src/merge-queue/lock-file-regeneration.js +82 -0
- package/dist/src/merge-queue/lock-file-regeneration.test.d.ts +2 -0
- package/dist/src/merge-queue/lock-file-regeneration.test.d.ts.map +1 -0
- package/dist/src/merge-queue/lock-file-regeneration.test.js +236 -0
- package/dist/src/merge-queue/merge-worker.d.ts +79 -0
- package/dist/src/merge-queue/merge-worker.d.ts.map +1 -0
- package/dist/src/merge-queue/merge-worker.js +221 -0
- package/dist/src/merge-queue/merge-worker.test.d.ts +2 -0
- package/dist/src/merge-queue/merge-worker.test.d.ts.map +1 -0
- package/dist/src/merge-queue/merge-worker.test.js +883 -0
- package/dist/src/merge-queue/strategies/index.d.ts +19 -0
- package/dist/src/merge-queue/strategies/index.d.ts.map +1 -0
- package/dist/src/merge-queue/strategies/index.js +30 -0
- package/dist/src/merge-queue/strategies/merge-commit-strategy.d.ts +14 -0
- package/dist/src/merge-queue/strategies/merge-commit-strategy.d.ts.map +1 -0
- package/dist/src/merge-queue/strategies/merge-commit-strategy.js +58 -0
- package/dist/src/merge-queue/strategies/rebase-strategy.d.ts +14 -0
- package/dist/src/merge-queue/strategies/rebase-strategy.d.ts.map +1 -0
- package/dist/src/merge-queue/strategies/rebase-strategy.js +62 -0
- package/dist/src/merge-queue/strategies/squash-strategy.d.ts +14 -0
- package/dist/src/merge-queue/strategies/squash-strategy.d.ts.map +1 -0
- package/dist/src/merge-queue/strategies/squash-strategy.js +59 -0
- package/dist/src/merge-queue/strategies/strategies.test.d.ts +2 -0
- package/dist/src/merge-queue/strategies/strategies.test.d.ts.map +1 -0
- package/dist/src/merge-queue/strategies/strategies.test.js +354 -0
- package/dist/src/merge-queue/strategies/types.d.ts +62 -0
- package/dist/src/merge-queue/strategies/types.d.ts.map +1 -0
- package/dist/src/merge-queue/strategies/types.js +7 -0
- package/dist/src/orchestrator/parse-work-result.d.ts.map +1 -1
- package/dist/src/orchestrator/parse-work-result.js +22 -0
- package/dist/src/orchestrator/parse-work-result.test.js +49 -0
- package/dist/src/providers/index.d.ts +1 -0
- package/dist/src/providers/index.d.ts.map +1 -1
- package/dist/src/providers/plugin-types.d.ts +177 -0
- package/dist/src/providers/plugin-types.d.ts.map +1 -0
- package/dist/src/providers/plugin-types.js +10 -0
- package/dist/src/providers/plugin-types.test.d.ts +2 -0
- package/dist/src/providers/plugin-types.test.d.ts.map +1 -0
- package/dist/src/providers/plugin-types.test.js +810 -0
- package/dist/src/registry/index.d.ts +4 -0
- package/dist/src/registry/index.d.ts.map +1 -0
- package/dist/src/registry/index.js +2 -0
- package/dist/src/registry/loader.d.ts +25 -0
- package/dist/src/registry/loader.d.ts.map +1 -0
- package/dist/src/registry/loader.js +88 -0
- package/dist/src/registry/node-type-registry.d.ts +52 -0
- package/dist/src/registry/node-type-registry.d.ts.map +1 -0
- package/dist/src/registry/node-type-registry.js +130 -0
- package/dist/src/registry/types.d.ts +65 -0
- package/dist/src/registry/types.d.ts.map +1 -0
- package/dist/src/registry/types.js +10 -0
- package/dist/src/workflow/expression/ast.d.ts +1 -1
- package/dist/src/workflow/expression/ast.d.ts.map +1 -1
- package/dist/src/workflow/expression/context.d.ts +4 -0
- package/dist/src/workflow/expression/context.d.ts.map +1 -1
- package/dist/src/workflow/expression/context.js +5 -1
- package/dist/src/workflow/expression/evaluator.d.ts.map +1 -1
- package/dist/src/workflow/expression/evaluator.js +24 -1
- package/dist/src/workflow/expression/evaluator.test.js +174 -0
- package/dist/src/workflow/expression/expression.test.js +140 -1
- package/dist/src/workflow/expression/helpers.d.ts +4 -0
- package/dist/src/workflow/expression/helpers.d.ts.map +1 -1
- package/dist/src/workflow/expression/helpers.js +51 -0
- package/dist/src/workflow/expression/index.d.ts +14 -0
- package/dist/src/workflow/expression/index.d.ts.map +1 -1
- package/dist/src/workflow/expression/index.js +28 -1
- package/dist/src/workflow/expression/lexer.d.ts.map +1 -1
- package/dist/src/workflow/expression/lexer.js +43 -0
- package/dist/src/workflow/expression/parser.js +1 -1
- package/dist/src/workflow/index.d.ts +3 -3
- package/dist/src/workflow/index.d.ts.map +1 -1
- package/dist/src/workflow/index.js +4 -2
- package/dist/src/workflow/workflow-loader.d.ts +8 -2
- package/dist/src/workflow/workflow-loader.d.ts.map +1 -1
- package/dist/src/workflow/workflow-loader.js +21 -2
- package/dist/src/workflow/workflow-types.d.ts +781 -12
- package/dist/src/workflow/workflow-types.d.ts.map +1 -1
- package/dist/src/workflow/workflow-types.js +248 -3
- package/dist/src/workflow/workflow-types.test.js +621 -1
- package/package.json +3 -2
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
* escalation ladder, gates, and parallelism — in YAML rather than hard-coded
|
|
7
7
|
* TypeScript.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* Supports two schema versions:
|
|
10
|
+
* - **v1.1**: Phase-based workflow with template bindings, transitions, escalation
|
|
11
|
+
* - **v2**: Event-driven workflow with triggers, providers, config, and multi-step nodes
|
|
12
|
+
*
|
|
13
|
+
* Use {@link AnyWorkflowDefinition} for consumers that handle both versions.
|
|
11
14
|
*/
|
|
12
15
|
import { z } from 'zod';
|
|
13
16
|
/**
|
|
@@ -264,6 +267,127 @@ export interface BranchingDefinition {
|
|
|
264
267
|
timeout?: TemplateTimeoutConfig;
|
|
265
268
|
};
|
|
266
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* Declares an event that can initiate workflow execution.
|
|
272
|
+
* Triggers define the source, event type, and optional payload filter.
|
|
273
|
+
*/
|
|
274
|
+
export interface WorkflowTriggerDefinition {
|
|
275
|
+
/** Unique trigger name */
|
|
276
|
+
name: string;
|
|
277
|
+
/** Trigger type: webhook (external event), schedule (cron), manual (user-initiated) */
|
|
278
|
+
type: 'webhook' | 'schedule' | 'manual';
|
|
279
|
+
/** Provider name (e.g., 'linear') — identifies the event source */
|
|
280
|
+
source?: string;
|
|
281
|
+
/** Event type (e.g., 'issue.status_changed') */
|
|
282
|
+
event?: string;
|
|
283
|
+
/** Event payload filter — only fire when payload matches */
|
|
284
|
+
filter?: Record<string, unknown>;
|
|
285
|
+
/** Cron expression (for type: schedule) */
|
|
286
|
+
schedule?: string;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Declares an external service provider that nodes can reference.
|
|
290
|
+
* The name is used as a local reference in node.provider fields.
|
|
291
|
+
*/
|
|
292
|
+
export interface ProviderRequirement {
|
|
293
|
+
/** Local reference name (used in node.provider) */
|
|
294
|
+
name: string;
|
|
295
|
+
/** Provider type (e.g., 'claude', 'linear', 'github') */
|
|
296
|
+
type: string;
|
|
297
|
+
/** Provider-specific configuration */
|
|
298
|
+
config?: Record<string, unknown>;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Workspace-level configuration for v2 workflows.
|
|
302
|
+
* Extensible with arbitrary keys beyond the known fields.
|
|
303
|
+
*/
|
|
304
|
+
export interface WorkflowConfig {
|
|
305
|
+
/** Maps project names to repository paths */
|
|
306
|
+
projectMapping?: Record<string, string>;
|
|
307
|
+
/** Extensible configuration */
|
|
308
|
+
[key: string]: unknown;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* A single step within a v2 node's execution sequence.
|
|
312
|
+
* Steps execute in order and can reference outputs from earlier steps
|
|
313
|
+
* via {{ steps.<id>.output.<key> }} interpolation.
|
|
314
|
+
*/
|
|
315
|
+
export interface StepDefinition {
|
|
316
|
+
/** Unique step ID within the node */
|
|
317
|
+
id: string;
|
|
318
|
+
/** Provider action (e.g., 'spawn-session', 'tracker.create-comment') */
|
|
319
|
+
action: string;
|
|
320
|
+
/** Action parameters — supports {{ }} interpolation markers */
|
|
321
|
+
with?: Record<string, unknown>;
|
|
322
|
+
/** Optional condition for this step */
|
|
323
|
+
when?: string;
|
|
324
|
+
/** Declared outputs from this step */
|
|
325
|
+
output?: Record<string, PhaseOutputDeclaration>;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* An action-based node in a v2 workflow. Nodes reference a provider and
|
|
329
|
+
* contain ordered multi-step sequences with template expression interpolation.
|
|
330
|
+
*/
|
|
331
|
+
export interface NodeDefinition {
|
|
332
|
+
/** Unique node name */
|
|
333
|
+
name: string;
|
|
334
|
+
/** Human-readable description */
|
|
335
|
+
description?: string;
|
|
336
|
+
/** Provider reference (must match a name in the providers section) */
|
|
337
|
+
provider?: string;
|
|
338
|
+
/** v1-style template reference (backwards compat) */
|
|
339
|
+
template?: string;
|
|
340
|
+
/** Multi-step execution sequence */
|
|
341
|
+
steps?: StepDefinition[];
|
|
342
|
+
/** Condition expression — node only executes when this evaluates to true */
|
|
343
|
+
when?: string;
|
|
344
|
+
/** Retry configuration */
|
|
345
|
+
retry?: TemplateRetryConfig;
|
|
346
|
+
/** Timeout configuration */
|
|
347
|
+
timeout?: TemplateTimeoutConfig;
|
|
348
|
+
/** Input dependencies on upstream outputs */
|
|
349
|
+
inputs?: Record<string, PhaseInputDeclaration>;
|
|
350
|
+
/** Structured outputs this node produces */
|
|
351
|
+
outputs?: Record<string, PhaseOutputDeclaration>;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* v2 workflow definition with event-driven triggers, provider declarations,
|
|
355
|
+
* workspace config, and multi-step action nodes. Supports v1.1 phases and
|
|
356
|
+
* transitions alongside v2 nodes for backwards compatibility.
|
|
357
|
+
*/
|
|
358
|
+
export interface WorkflowDefinitionV2 {
|
|
359
|
+
apiVersion: 'v2';
|
|
360
|
+
kind: 'WorkflowDefinition';
|
|
361
|
+
metadata: {
|
|
362
|
+
name: string;
|
|
363
|
+
description?: string;
|
|
364
|
+
};
|
|
365
|
+
/** Event triggers that initiate workflow execution */
|
|
366
|
+
triggers?: WorkflowTriggerDefinition[];
|
|
367
|
+
/** External service providers that nodes can reference */
|
|
368
|
+
providers?: ProviderRequirement[];
|
|
369
|
+
/** Workspace-level configuration */
|
|
370
|
+
config?: WorkflowConfig;
|
|
371
|
+
/** v2 action-based nodes with multi-step sequences */
|
|
372
|
+
nodes?: NodeDefinition[];
|
|
373
|
+
/** v1.1 phase definitions (backwards compat) */
|
|
374
|
+
phases?: PhaseDefinition[];
|
|
375
|
+
/** Workflow graph edges: status-to-phase transitions */
|
|
376
|
+
transitions?: TransitionDefinition[];
|
|
377
|
+
/** Escalation ladder and circuit breaker configuration */
|
|
378
|
+
escalation?: EscalationConfig;
|
|
379
|
+
/** External gates that can pause workflow execution */
|
|
380
|
+
gates?: GateDefinition[];
|
|
381
|
+
/** Parallelism groups for concurrent phase execution */
|
|
382
|
+
parallelism?: ParallelismGroupDefinition[];
|
|
383
|
+
/** Branching blocks for conditional template selection */
|
|
384
|
+
branching?: BranchingDefinition[];
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Union type for consumers that handle both v1.1 and v2 workflow definitions.
|
|
388
|
+
* Discriminated on the `apiVersion` field.
|
|
389
|
+
*/
|
|
390
|
+
export type AnyWorkflowDefinition = WorkflowDefinition | WorkflowDefinitionV2;
|
|
267
391
|
/**
|
|
268
392
|
* A declarative workflow definition. This is the primary document kind
|
|
269
393
|
* introduced in schema v1.1, replacing the hard-coded workflow graph
|
|
@@ -574,14 +698,659 @@ export declare const WorkflowDefinitionSchema: z.ZodObject<{
|
|
|
574
698
|
}, z.core.$strip>>;
|
|
575
699
|
}, z.core.$strip>>>;
|
|
576
700
|
}, z.core.$strip>;
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
701
|
+
export declare const WorkflowTriggerDefinitionSchema: z.ZodObject<{
|
|
702
|
+
name: z.ZodString;
|
|
703
|
+
type: z.ZodEnum<{
|
|
704
|
+
webhook: "webhook";
|
|
705
|
+
schedule: "schedule";
|
|
706
|
+
manual: "manual";
|
|
707
|
+
}>;
|
|
708
|
+
source: z.ZodOptional<z.ZodString>;
|
|
709
|
+
event: z.ZodOptional<z.ZodString>;
|
|
710
|
+
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
711
|
+
schedule: z.ZodOptional<z.ZodString>;
|
|
712
|
+
}, z.core.$strip>;
|
|
713
|
+
export declare const ProviderRequirementSchema: z.ZodObject<{
|
|
714
|
+
name: z.ZodString;
|
|
715
|
+
type: z.ZodString;
|
|
716
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
717
|
+
}, z.core.$strip>;
|
|
718
|
+
export declare const WorkflowConfigSchema: z.ZodObject<{
|
|
719
|
+
projectMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
720
|
+
}, z.core.$loose>;
|
|
721
|
+
export declare const StepDefinitionSchema: z.ZodObject<{
|
|
722
|
+
id: z.ZodString;
|
|
723
|
+
action: z.ZodString;
|
|
724
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
725
|
+
when: z.ZodOptional<z.ZodString>;
|
|
726
|
+
output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
727
|
+
type: z.ZodEnum<{
|
|
728
|
+
string: "string";
|
|
729
|
+
boolean: "boolean";
|
|
730
|
+
url: "url";
|
|
731
|
+
json: "json";
|
|
732
|
+
}>;
|
|
733
|
+
description: z.ZodOptional<z.ZodString>;
|
|
734
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
735
|
+
}, z.core.$strip>>>;
|
|
736
|
+
}, z.core.$strip>;
|
|
737
|
+
export declare const NodeDefinitionSchema: z.ZodObject<{
|
|
738
|
+
name: z.ZodString;
|
|
739
|
+
description: z.ZodOptional<z.ZodString>;
|
|
740
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
741
|
+
template: z.ZodOptional<z.ZodString>;
|
|
742
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
743
|
+
id: z.ZodString;
|
|
744
|
+
action: z.ZodString;
|
|
745
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
746
|
+
when: z.ZodOptional<z.ZodString>;
|
|
747
|
+
output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
748
|
+
type: z.ZodEnum<{
|
|
749
|
+
string: "string";
|
|
750
|
+
boolean: "boolean";
|
|
751
|
+
url: "url";
|
|
752
|
+
json: "json";
|
|
753
|
+
}>;
|
|
754
|
+
description: z.ZodOptional<z.ZodString>;
|
|
755
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
756
|
+
}, z.core.$strip>>>;
|
|
757
|
+
}, z.core.$strip>>>;
|
|
758
|
+
when: z.ZodOptional<z.ZodString>;
|
|
759
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
760
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
761
|
+
ladder: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
762
|
+
cycle: z.ZodNumber;
|
|
763
|
+
strategy: z.ZodString;
|
|
764
|
+
}, z.core.$strip>>>;
|
|
765
|
+
}, z.core.$strip>>;
|
|
766
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
767
|
+
duration: z.ZodString;
|
|
768
|
+
action: z.ZodEnum<{
|
|
769
|
+
fail: "fail";
|
|
770
|
+
escalate: "escalate";
|
|
771
|
+
skip: "skip";
|
|
772
|
+
}>;
|
|
773
|
+
}, z.core.$strip>>;
|
|
774
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
775
|
+
from: z.ZodString;
|
|
776
|
+
description: z.ZodOptional<z.ZodString>;
|
|
777
|
+
}, z.core.$strip>>>;
|
|
778
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
779
|
+
type: z.ZodEnum<{
|
|
780
|
+
string: "string";
|
|
781
|
+
boolean: "boolean";
|
|
782
|
+
url: "url";
|
|
783
|
+
json: "json";
|
|
784
|
+
}>;
|
|
785
|
+
description: z.ZodOptional<z.ZodString>;
|
|
786
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
787
|
+
}, z.core.$strip>>>;
|
|
788
|
+
}, z.core.$strip>;
|
|
789
|
+
export declare const WorkflowDefinitionV2Schema: z.ZodObject<{
|
|
790
|
+
apiVersion: z.ZodLiteral<"v2">;
|
|
791
|
+
kind: z.ZodLiteral<"WorkflowDefinition">;
|
|
792
|
+
metadata: z.ZodObject<{
|
|
793
|
+
name: z.ZodString;
|
|
794
|
+
description: z.ZodOptional<z.ZodString>;
|
|
795
|
+
}, z.core.$strip>;
|
|
796
|
+
triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
797
|
+
name: z.ZodString;
|
|
798
|
+
type: z.ZodEnum<{
|
|
799
|
+
webhook: "webhook";
|
|
800
|
+
schedule: "schedule";
|
|
801
|
+
manual: "manual";
|
|
802
|
+
}>;
|
|
803
|
+
source: z.ZodOptional<z.ZodString>;
|
|
804
|
+
event: z.ZodOptional<z.ZodString>;
|
|
805
|
+
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
806
|
+
schedule: z.ZodOptional<z.ZodString>;
|
|
807
|
+
}, z.core.$strip>>>;
|
|
808
|
+
providers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
809
|
+
name: z.ZodString;
|
|
810
|
+
type: z.ZodString;
|
|
811
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
812
|
+
}, z.core.$strip>>>;
|
|
813
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
814
|
+
projectMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
815
|
+
}, z.core.$loose>>;
|
|
816
|
+
nodes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
817
|
+
name: z.ZodString;
|
|
818
|
+
description: z.ZodOptional<z.ZodString>;
|
|
819
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
820
|
+
template: z.ZodOptional<z.ZodString>;
|
|
821
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
822
|
+
id: z.ZodString;
|
|
823
|
+
action: z.ZodString;
|
|
824
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
825
|
+
when: z.ZodOptional<z.ZodString>;
|
|
826
|
+
output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
827
|
+
type: z.ZodEnum<{
|
|
828
|
+
string: "string";
|
|
829
|
+
boolean: "boolean";
|
|
830
|
+
url: "url";
|
|
831
|
+
json: "json";
|
|
832
|
+
}>;
|
|
833
|
+
description: z.ZodOptional<z.ZodString>;
|
|
834
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
835
|
+
}, z.core.$strip>>>;
|
|
836
|
+
}, z.core.$strip>>>;
|
|
837
|
+
when: z.ZodOptional<z.ZodString>;
|
|
838
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
839
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
840
|
+
ladder: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
841
|
+
cycle: z.ZodNumber;
|
|
842
|
+
strategy: z.ZodString;
|
|
843
|
+
}, z.core.$strip>>>;
|
|
844
|
+
}, z.core.$strip>>;
|
|
845
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
846
|
+
duration: z.ZodString;
|
|
847
|
+
action: z.ZodEnum<{
|
|
848
|
+
fail: "fail";
|
|
849
|
+
escalate: "escalate";
|
|
850
|
+
skip: "skip";
|
|
851
|
+
}>;
|
|
852
|
+
}, z.core.$strip>>;
|
|
853
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
854
|
+
from: z.ZodString;
|
|
855
|
+
description: z.ZodOptional<z.ZodString>;
|
|
856
|
+
}, z.core.$strip>>>;
|
|
857
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
858
|
+
type: z.ZodEnum<{
|
|
859
|
+
string: "string";
|
|
860
|
+
boolean: "boolean";
|
|
861
|
+
url: "url";
|
|
862
|
+
json: "json";
|
|
863
|
+
}>;
|
|
864
|
+
description: z.ZodOptional<z.ZodString>;
|
|
865
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
866
|
+
}, z.core.$strip>>>;
|
|
867
|
+
}, z.core.$strip>>>;
|
|
868
|
+
phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
869
|
+
name: z.ZodString;
|
|
870
|
+
description: z.ZodOptional<z.ZodString>;
|
|
871
|
+
template: z.ZodString;
|
|
872
|
+
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
873
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
874
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
875
|
+
ladder: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
876
|
+
cycle: z.ZodNumber;
|
|
877
|
+
strategy: z.ZodString;
|
|
878
|
+
}, z.core.$strip>>>;
|
|
879
|
+
}, z.core.$strip>>;
|
|
880
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
881
|
+
duration: z.ZodString;
|
|
882
|
+
action: z.ZodEnum<{
|
|
883
|
+
fail: "fail";
|
|
884
|
+
escalate: "escalate";
|
|
885
|
+
skip: "skip";
|
|
886
|
+
}>;
|
|
887
|
+
}, z.core.$strip>>;
|
|
888
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
889
|
+
type: z.ZodEnum<{
|
|
890
|
+
string: "string";
|
|
891
|
+
boolean: "boolean";
|
|
892
|
+
url: "url";
|
|
893
|
+
json: "json";
|
|
894
|
+
}>;
|
|
895
|
+
description: z.ZodOptional<z.ZodString>;
|
|
896
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
897
|
+
}, z.core.$strip>>>;
|
|
898
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
899
|
+
from: z.ZodString;
|
|
900
|
+
description: z.ZodOptional<z.ZodString>;
|
|
901
|
+
}, z.core.$strip>>>;
|
|
902
|
+
}, z.core.$strip>>>;
|
|
903
|
+
transitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
904
|
+
from: z.ZodString;
|
|
905
|
+
to: z.ZodString;
|
|
906
|
+
condition: z.ZodOptional<z.ZodString>;
|
|
907
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
908
|
+
}, z.core.$strip>>>;
|
|
909
|
+
escalation: z.ZodOptional<z.ZodObject<{
|
|
910
|
+
ladder: z.ZodArray<z.ZodObject<{
|
|
911
|
+
cycle: z.ZodNumber;
|
|
912
|
+
strategy: z.ZodString;
|
|
913
|
+
}, z.core.$strip>>;
|
|
914
|
+
circuitBreaker: z.ZodObject<{
|
|
915
|
+
maxSessionsPerIssue: z.ZodNumber;
|
|
916
|
+
maxSessionsPerPhase: z.ZodOptional<z.ZodNumber>;
|
|
917
|
+
}, z.core.$strip>;
|
|
918
|
+
}, z.core.$strip>>;
|
|
919
|
+
gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
920
|
+
name: z.ZodString;
|
|
921
|
+
description: z.ZodOptional<z.ZodString>;
|
|
922
|
+
type: z.ZodEnum<{
|
|
923
|
+
signal: "signal";
|
|
924
|
+
timer: "timer";
|
|
925
|
+
webhook: "webhook";
|
|
926
|
+
}>;
|
|
927
|
+
trigger: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
928
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
929
|
+
duration: z.ZodString;
|
|
930
|
+
action: z.ZodEnum<{
|
|
931
|
+
fail: "fail";
|
|
932
|
+
escalate: "escalate";
|
|
933
|
+
skip: "skip";
|
|
934
|
+
}>;
|
|
935
|
+
}, z.core.$strip>>;
|
|
936
|
+
appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
937
|
+
}, z.core.$strip>>>;
|
|
938
|
+
parallelism: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
939
|
+
name: z.ZodString;
|
|
940
|
+
description: z.ZodOptional<z.ZodString>;
|
|
941
|
+
phases: z.ZodArray<z.ZodString>;
|
|
942
|
+
strategy: z.ZodEnum<{
|
|
943
|
+
"fan-out": "fan-out";
|
|
944
|
+
"fan-in": "fan-in";
|
|
945
|
+
race: "race";
|
|
946
|
+
}>;
|
|
947
|
+
maxConcurrent: z.ZodOptional<z.ZodNumber>;
|
|
948
|
+
waitForAll: z.ZodOptional<z.ZodBoolean>;
|
|
949
|
+
}, z.core.$strip>>>;
|
|
950
|
+
branching: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
951
|
+
name: z.ZodString;
|
|
952
|
+
condition: z.ZodString;
|
|
953
|
+
then: z.ZodObject<{
|
|
954
|
+
template: z.ZodString;
|
|
955
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
956
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
957
|
+
ladder: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
958
|
+
cycle: z.ZodNumber;
|
|
959
|
+
strategy: z.ZodString;
|
|
960
|
+
}, z.core.$strip>>>;
|
|
961
|
+
}, z.core.$strip>>;
|
|
962
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
963
|
+
duration: z.ZodString;
|
|
964
|
+
action: z.ZodEnum<{
|
|
965
|
+
fail: "fail";
|
|
966
|
+
escalate: "escalate";
|
|
967
|
+
skip: "skip";
|
|
968
|
+
}>;
|
|
969
|
+
}, z.core.$strip>>;
|
|
970
|
+
}, z.core.$strip>;
|
|
971
|
+
else: z.ZodOptional<z.ZodObject<{
|
|
972
|
+
template: z.ZodString;
|
|
973
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
974
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
975
|
+
ladder: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
976
|
+
cycle: z.ZodNumber;
|
|
977
|
+
strategy: z.ZodString;
|
|
978
|
+
}, z.core.$strip>>>;
|
|
979
|
+
}, z.core.$strip>>;
|
|
980
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
981
|
+
duration: z.ZodString;
|
|
982
|
+
action: z.ZodEnum<{
|
|
983
|
+
fail: "fail";
|
|
984
|
+
escalate: "escalate";
|
|
985
|
+
skip: "skip";
|
|
986
|
+
}>;
|
|
987
|
+
}, z.core.$strip>>;
|
|
988
|
+
}, z.core.$strip>>;
|
|
989
|
+
}, z.core.$strip>>>;
|
|
990
|
+
}, z.core.$strip>;
|
|
991
|
+
/**
|
|
992
|
+
* Discriminated union schema that accepts both v1.1 and v2 workflow definitions.
|
|
993
|
+
* Dispatches to the correct schema based on the `apiVersion` field.
|
|
994
|
+
*/
|
|
995
|
+
export declare const AnyWorkflowDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
996
|
+
apiVersion: z.ZodLiteral<"v1.1">;
|
|
997
|
+
kind: z.ZodLiteral<"WorkflowDefinition">;
|
|
998
|
+
metadata: z.ZodObject<{
|
|
999
|
+
name: z.ZodString;
|
|
1000
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1001
|
+
}, z.core.$strip>;
|
|
1002
|
+
phases: z.ZodArray<z.ZodObject<{
|
|
1003
|
+
name: z.ZodString;
|
|
1004
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1005
|
+
template: z.ZodString;
|
|
1006
|
+
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1007
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
1008
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1009
|
+
ladder: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1010
|
+
cycle: z.ZodNumber;
|
|
1011
|
+
strategy: z.ZodString;
|
|
1012
|
+
}, z.core.$strip>>>;
|
|
1013
|
+
}, z.core.$strip>>;
|
|
1014
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
1015
|
+
duration: z.ZodString;
|
|
1016
|
+
action: z.ZodEnum<{
|
|
1017
|
+
fail: "fail";
|
|
1018
|
+
escalate: "escalate";
|
|
1019
|
+
skip: "skip";
|
|
1020
|
+
}>;
|
|
1021
|
+
}, z.core.$strip>>;
|
|
1022
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1023
|
+
type: z.ZodEnum<{
|
|
1024
|
+
string: "string";
|
|
1025
|
+
boolean: "boolean";
|
|
1026
|
+
url: "url";
|
|
1027
|
+
json: "json";
|
|
1028
|
+
}>;
|
|
1029
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1030
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1031
|
+
}, z.core.$strip>>>;
|
|
1032
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1033
|
+
from: z.ZodString;
|
|
1034
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1035
|
+
}, z.core.$strip>>>;
|
|
1036
|
+
}, z.core.$strip>>;
|
|
1037
|
+
transitions: z.ZodArray<z.ZodObject<{
|
|
1038
|
+
from: z.ZodString;
|
|
1039
|
+
to: z.ZodString;
|
|
1040
|
+
condition: z.ZodOptional<z.ZodString>;
|
|
1041
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
1042
|
+
}, z.core.$strip>>;
|
|
1043
|
+
escalation: z.ZodOptional<z.ZodObject<{
|
|
1044
|
+
ladder: z.ZodArray<z.ZodObject<{
|
|
1045
|
+
cycle: z.ZodNumber;
|
|
1046
|
+
strategy: z.ZodString;
|
|
1047
|
+
}, z.core.$strip>>;
|
|
1048
|
+
circuitBreaker: z.ZodObject<{
|
|
1049
|
+
maxSessionsPerIssue: z.ZodNumber;
|
|
1050
|
+
maxSessionsPerPhase: z.ZodOptional<z.ZodNumber>;
|
|
1051
|
+
}, z.core.$strip>;
|
|
1052
|
+
}, z.core.$strip>>;
|
|
1053
|
+
gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1054
|
+
name: z.ZodString;
|
|
1055
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1056
|
+
type: z.ZodEnum<{
|
|
1057
|
+
signal: "signal";
|
|
1058
|
+
timer: "timer";
|
|
1059
|
+
webhook: "webhook";
|
|
1060
|
+
}>;
|
|
1061
|
+
trigger: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1062
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
1063
|
+
duration: z.ZodString;
|
|
1064
|
+
action: z.ZodEnum<{
|
|
1065
|
+
fail: "fail";
|
|
1066
|
+
escalate: "escalate";
|
|
1067
|
+
skip: "skip";
|
|
1068
|
+
}>;
|
|
1069
|
+
}, z.core.$strip>>;
|
|
1070
|
+
appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1071
|
+
}, z.core.$strip>>>;
|
|
1072
|
+
parallelism: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1073
|
+
name: z.ZodString;
|
|
1074
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1075
|
+
phases: z.ZodArray<z.ZodString>;
|
|
1076
|
+
strategy: z.ZodEnum<{
|
|
1077
|
+
"fan-out": "fan-out";
|
|
1078
|
+
"fan-in": "fan-in";
|
|
1079
|
+
race: "race";
|
|
1080
|
+
}>;
|
|
1081
|
+
maxConcurrent: z.ZodOptional<z.ZodNumber>;
|
|
1082
|
+
waitForAll: z.ZodOptional<z.ZodBoolean>;
|
|
1083
|
+
}, z.core.$strip>>>;
|
|
1084
|
+
branching: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1085
|
+
name: z.ZodString;
|
|
1086
|
+
condition: z.ZodString;
|
|
1087
|
+
then: z.ZodObject<{
|
|
1088
|
+
template: z.ZodString;
|
|
1089
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
1090
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1091
|
+
ladder: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1092
|
+
cycle: z.ZodNumber;
|
|
1093
|
+
strategy: z.ZodString;
|
|
1094
|
+
}, z.core.$strip>>>;
|
|
1095
|
+
}, z.core.$strip>>;
|
|
1096
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
1097
|
+
duration: z.ZodString;
|
|
1098
|
+
action: z.ZodEnum<{
|
|
1099
|
+
fail: "fail";
|
|
1100
|
+
escalate: "escalate";
|
|
1101
|
+
skip: "skip";
|
|
1102
|
+
}>;
|
|
1103
|
+
}, z.core.$strip>>;
|
|
1104
|
+
}, z.core.$strip>;
|
|
1105
|
+
else: z.ZodOptional<z.ZodObject<{
|
|
1106
|
+
template: z.ZodString;
|
|
1107
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
1108
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1109
|
+
ladder: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1110
|
+
cycle: z.ZodNumber;
|
|
1111
|
+
strategy: z.ZodString;
|
|
1112
|
+
}, z.core.$strip>>>;
|
|
1113
|
+
}, z.core.$strip>>;
|
|
1114
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
1115
|
+
duration: z.ZodString;
|
|
1116
|
+
action: z.ZodEnum<{
|
|
1117
|
+
fail: "fail";
|
|
1118
|
+
escalate: "escalate";
|
|
1119
|
+
skip: "skip";
|
|
1120
|
+
}>;
|
|
1121
|
+
}, z.core.$strip>>;
|
|
1122
|
+
}, z.core.$strip>>;
|
|
1123
|
+
}, z.core.$strip>>>;
|
|
1124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1125
|
+
apiVersion: z.ZodLiteral<"v2">;
|
|
1126
|
+
kind: z.ZodLiteral<"WorkflowDefinition">;
|
|
1127
|
+
metadata: z.ZodObject<{
|
|
1128
|
+
name: z.ZodString;
|
|
1129
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1130
|
+
}, z.core.$strip>;
|
|
1131
|
+
triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1132
|
+
name: z.ZodString;
|
|
1133
|
+
type: z.ZodEnum<{
|
|
1134
|
+
webhook: "webhook";
|
|
1135
|
+
schedule: "schedule";
|
|
1136
|
+
manual: "manual";
|
|
1137
|
+
}>;
|
|
1138
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1139
|
+
event: z.ZodOptional<z.ZodString>;
|
|
1140
|
+
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1141
|
+
schedule: z.ZodOptional<z.ZodString>;
|
|
1142
|
+
}, z.core.$strip>>>;
|
|
1143
|
+
providers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1144
|
+
name: z.ZodString;
|
|
1145
|
+
type: z.ZodString;
|
|
1146
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1147
|
+
}, z.core.$strip>>>;
|
|
1148
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
1149
|
+
projectMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1150
|
+
}, z.core.$loose>>;
|
|
1151
|
+
nodes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1152
|
+
name: z.ZodString;
|
|
1153
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1154
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
1155
|
+
template: z.ZodOptional<z.ZodString>;
|
|
1156
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1157
|
+
id: z.ZodString;
|
|
1158
|
+
action: z.ZodString;
|
|
1159
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1160
|
+
when: z.ZodOptional<z.ZodString>;
|
|
1161
|
+
output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1162
|
+
type: z.ZodEnum<{
|
|
1163
|
+
string: "string";
|
|
1164
|
+
boolean: "boolean";
|
|
1165
|
+
url: "url";
|
|
1166
|
+
json: "json";
|
|
1167
|
+
}>;
|
|
1168
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1169
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1170
|
+
}, z.core.$strip>>>;
|
|
1171
|
+
}, z.core.$strip>>>;
|
|
1172
|
+
when: z.ZodOptional<z.ZodString>;
|
|
1173
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
1174
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1175
|
+
ladder: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1176
|
+
cycle: z.ZodNumber;
|
|
1177
|
+
strategy: z.ZodString;
|
|
1178
|
+
}, z.core.$strip>>>;
|
|
1179
|
+
}, z.core.$strip>>;
|
|
1180
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
1181
|
+
duration: z.ZodString;
|
|
1182
|
+
action: z.ZodEnum<{
|
|
1183
|
+
fail: "fail";
|
|
1184
|
+
escalate: "escalate";
|
|
1185
|
+
skip: "skip";
|
|
1186
|
+
}>;
|
|
1187
|
+
}, z.core.$strip>>;
|
|
1188
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1189
|
+
from: z.ZodString;
|
|
1190
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1191
|
+
}, z.core.$strip>>>;
|
|
1192
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1193
|
+
type: z.ZodEnum<{
|
|
1194
|
+
string: "string";
|
|
1195
|
+
boolean: "boolean";
|
|
1196
|
+
url: "url";
|
|
1197
|
+
json: "json";
|
|
1198
|
+
}>;
|
|
1199
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1200
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1201
|
+
}, z.core.$strip>>>;
|
|
1202
|
+
}, z.core.$strip>>>;
|
|
1203
|
+
phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1204
|
+
name: z.ZodString;
|
|
1205
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1206
|
+
template: z.ZodString;
|
|
1207
|
+
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1208
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
1209
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1210
|
+
ladder: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1211
|
+
cycle: z.ZodNumber;
|
|
1212
|
+
strategy: z.ZodString;
|
|
1213
|
+
}, z.core.$strip>>>;
|
|
1214
|
+
}, z.core.$strip>>;
|
|
1215
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
1216
|
+
duration: z.ZodString;
|
|
1217
|
+
action: z.ZodEnum<{
|
|
1218
|
+
fail: "fail";
|
|
1219
|
+
escalate: "escalate";
|
|
1220
|
+
skip: "skip";
|
|
1221
|
+
}>;
|
|
1222
|
+
}, z.core.$strip>>;
|
|
1223
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1224
|
+
type: z.ZodEnum<{
|
|
1225
|
+
string: "string";
|
|
1226
|
+
boolean: "boolean";
|
|
1227
|
+
url: "url";
|
|
1228
|
+
json: "json";
|
|
1229
|
+
}>;
|
|
1230
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1231
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1232
|
+
}, z.core.$strip>>>;
|
|
1233
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1234
|
+
from: z.ZodString;
|
|
1235
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1236
|
+
}, z.core.$strip>>>;
|
|
1237
|
+
}, z.core.$strip>>>;
|
|
1238
|
+
transitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1239
|
+
from: z.ZodString;
|
|
1240
|
+
to: z.ZodString;
|
|
1241
|
+
condition: z.ZodOptional<z.ZodString>;
|
|
1242
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
1243
|
+
}, z.core.$strip>>>;
|
|
1244
|
+
escalation: z.ZodOptional<z.ZodObject<{
|
|
1245
|
+
ladder: z.ZodArray<z.ZodObject<{
|
|
1246
|
+
cycle: z.ZodNumber;
|
|
1247
|
+
strategy: z.ZodString;
|
|
1248
|
+
}, z.core.$strip>>;
|
|
1249
|
+
circuitBreaker: z.ZodObject<{
|
|
1250
|
+
maxSessionsPerIssue: z.ZodNumber;
|
|
1251
|
+
maxSessionsPerPhase: z.ZodOptional<z.ZodNumber>;
|
|
1252
|
+
}, z.core.$strip>;
|
|
1253
|
+
}, z.core.$strip>>;
|
|
1254
|
+
gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1255
|
+
name: z.ZodString;
|
|
1256
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1257
|
+
type: z.ZodEnum<{
|
|
1258
|
+
signal: "signal";
|
|
1259
|
+
timer: "timer";
|
|
1260
|
+
webhook: "webhook";
|
|
1261
|
+
}>;
|
|
1262
|
+
trigger: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1263
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
1264
|
+
duration: z.ZodString;
|
|
1265
|
+
action: z.ZodEnum<{
|
|
1266
|
+
fail: "fail";
|
|
1267
|
+
escalate: "escalate";
|
|
1268
|
+
skip: "skip";
|
|
1269
|
+
}>;
|
|
1270
|
+
}, z.core.$strip>>;
|
|
1271
|
+
appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1272
|
+
}, z.core.$strip>>>;
|
|
1273
|
+
parallelism: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1274
|
+
name: z.ZodString;
|
|
1275
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1276
|
+
phases: z.ZodArray<z.ZodString>;
|
|
1277
|
+
strategy: z.ZodEnum<{
|
|
1278
|
+
"fan-out": "fan-out";
|
|
1279
|
+
"fan-in": "fan-in";
|
|
1280
|
+
race: "race";
|
|
1281
|
+
}>;
|
|
1282
|
+
maxConcurrent: z.ZodOptional<z.ZodNumber>;
|
|
1283
|
+
waitForAll: z.ZodOptional<z.ZodBoolean>;
|
|
1284
|
+
}, z.core.$strip>>>;
|
|
1285
|
+
branching: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1286
|
+
name: z.ZodString;
|
|
1287
|
+
condition: z.ZodString;
|
|
1288
|
+
then: z.ZodObject<{
|
|
1289
|
+
template: z.ZodString;
|
|
1290
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
1291
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1292
|
+
ladder: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1293
|
+
cycle: z.ZodNumber;
|
|
1294
|
+
strategy: z.ZodString;
|
|
1295
|
+
}, z.core.$strip>>>;
|
|
1296
|
+
}, z.core.$strip>>;
|
|
1297
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
1298
|
+
duration: z.ZodString;
|
|
1299
|
+
action: z.ZodEnum<{
|
|
1300
|
+
fail: "fail";
|
|
1301
|
+
escalate: "escalate";
|
|
1302
|
+
skip: "skip";
|
|
1303
|
+
}>;
|
|
1304
|
+
}, z.core.$strip>>;
|
|
1305
|
+
}, z.core.$strip>;
|
|
1306
|
+
else: z.ZodOptional<z.ZodObject<{
|
|
1307
|
+
template: z.ZodString;
|
|
1308
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
1309
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1310
|
+
ladder: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1311
|
+
cycle: z.ZodNumber;
|
|
1312
|
+
strategy: z.ZodString;
|
|
1313
|
+
}, z.core.$strip>>>;
|
|
1314
|
+
}, z.core.$strip>>;
|
|
1315
|
+
timeout: z.ZodOptional<z.ZodObject<{
|
|
1316
|
+
duration: z.ZodString;
|
|
1317
|
+
action: z.ZodEnum<{
|
|
1318
|
+
fail: "fail";
|
|
1319
|
+
escalate: "escalate";
|
|
1320
|
+
skip: "skip";
|
|
1321
|
+
}>;
|
|
1322
|
+
}, z.core.$strip>>;
|
|
1323
|
+
}, z.core.$strip>>;
|
|
1324
|
+
}, z.core.$strip>>>;
|
|
1325
|
+
}, z.core.$strip>], "apiVersion">;
|
|
1326
|
+
/**
|
|
1327
|
+
* Validate a parsed YAML object as a WorkflowDefinition (v1.1).
|
|
1328
|
+
* Throws ZodError with detailed messages on failure.
|
|
1329
|
+
*
|
|
1330
|
+
* After Zod schema validation succeeds, performs cross-validation to ensure:
|
|
1331
|
+
* - Parallelism group phase names reference defined phases
|
|
1332
|
+
* - Phase input `from` references point to valid phase.output declarations
|
|
1333
|
+
* - Warns (via console.warn) if maxConcurrent exceeds 10
|
|
1334
|
+
*/
|
|
1335
|
+
export declare function validateWorkflowDefinition(data: unknown, filePath?: string): WorkflowDefinition;
|
|
1336
|
+
/**
|
|
1337
|
+
* Validate a parsed YAML object as either a v1.1 or v2 WorkflowDefinition.
|
|
1338
|
+
* Uses the `apiVersion` field to dispatch to the correct schema.
|
|
1339
|
+
* Throws on invalid schema or cross-validation failure.
|
|
1340
|
+
*/
|
|
1341
|
+
export declare function validateAnyWorkflowDefinition(data: unknown, filePath?: string): AnyWorkflowDefinition;
|
|
1342
|
+
/**
|
|
1343
|
+
* Perform cross-validation for v2 workflow definitions.
|
|
1344
|
+
* Validates referential integrity for triggers, providers, nodes, and steps.
|
|
1345
|
+
*
|
|
1346
|
+
* Checks:
|
|
1347
|
+
* - Node names must be unique
|
|
1348
|
+
* - node.provider must reference a declared provider name
|
|
1349
|
+
* - Step IDs must be unique within a node
|
|
1350
|
+
* - {{ steps.<id>.output.<key> }} references must point to valid step IDs within the same node
|
|
1351
|
+
* - {{ trigger.* }} references require at least one trigger to be declared
|
|
1352
|
+
* - config.projectMapping values must be non-empty strings
|
|
1353
|
+
* - when expressions must have balanced {{ }} brackets
|
|
1354
|
+
*/
|
|
1355
|
+
export declare function crossValidateWorkflowV2(workflow: WorkflowDefinitionV2, filePath?: string): void;
|
|
587
1356
|
//# sourceMappingURL=workflow-types.d.ts.map
|