@eigenpal/cli 0.10.19 → 0.10.21
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/CHANGELOG.md +6 -0
- package/dist/cli.js +479 -13
- package/dist/skill/reference/step-types.md +53 -1
- package/dist/skill/reference/workflow-yaml.md +38 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -17159,6 +17159,10 @@ var init_common = __esm(() => {
|
|
|
17159
17159
|
AGENT_EMAIL_INVOCATION: "aei",
|
|
17160
17160
|
AUTOMATION_TRIGGER: "atr",
|
|
17161
17161
|
FILE_SOURCE_CONFIG: "fsc",
|
|
17162
|
+
WEBHOOK_ENDPOINT: "whep",
|
|
17163
|
+
WEBHOOK_EVENT: "whev",
|
|
17164
|
+
WEBHOOK_DELIVERY: "whdl",
|
|
17165
|
+
WEBHOOK_ATTEMPT: "what",
|
|
17162
17166
|
SANDBOX_WS_TOKEN: "sws"
|
|
17163
17167
|
};
|
|
17164
17168
|
TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
@@ -64455,6 +64459,123 @@ function script(${typedParams}): StepOutput {
|
|
|
64455
64459
|
}
|
|
64456
64460
|
var SCRIPT_FN_MAX_BYTES = 50000;
|
|
64457
64461
|
|
|
64462
|
+
// ../types/src/workflow/retry.ts
|
|
64463
|
+
function normalizePolicy(policy) {
|
|
64464
|
+
if (policy === undefined || policy === "inherit")
|
|
64465
|
+
return policy;
|
|
64466
|
+
if (policy === "automatic")
|
|
64467
|
+
return { mode: "automatic" };
|
|
64468
|
+
if (policy === "never")
|
|
64469
|
+
return { mode: "never" };
|
|
64470
|
+
return policy;
|
|
64471
|
+
}
|
|
64472
|
+
function resolveRetryPolicy(args) {
|
|
64473
|
+
const step = normalizePolicy(args.step);
|
|
64474
|
+
const workflow = normalizePolicy(args.workflow);
|
|
64475
|
+
let policy;
|
|
64476
|
+
let source;
|
|
64477
|
+
if (step && step !== "inherit") {
|
|
64478
|
+
policy = policyForCapability(step, args.capability);
|
|
64479
|
+
source = "step";
|
|
64480
|
+
} else if (workflow && workflow !== "inherit") {
|
|
64481
|
+
policy = policyForCapability(workflow, args.capability);
|
|
64482
|
+
source = "workflow";
|
|
64483
|
+
} else {
|
|
64484
|
+
policy = { mode: "never" };
|
|
64485
|
+
source = "step_type";
|
|
64486
|
+
}
|
|
64487
|
+
const ceilings = args.ceilings ?? { maxAttempts: 10, maxElapsedMs: 86400000 };
|
|
64488
|
+
if (policy.mode === "never")
|
|
64489
|
+
return { policy, source, capped: false };
|
|
64490
|
+
const maxAttempts = Math.min(policy.maxAttempts ?? 3, ceilings.maxAttempts);
|
|
64491
|
+
const capped = maxAttempts !== (policy.maxAttempts ?? 3);
|
|
64492
|
+
return {
|
|
64493
|
+
policy: { ...policy, maxAttempts },
|
|
64494
|
+
source: capped ? "tenant_ceiling" : source,
|
|
64495
|
+
capped
|
|
64496
|
+
};
|
|
64497
|
+
}
|
|
64498
|
+
function policyForCapability(policy, capability) {
|
|
64499
|
+
if (policy.mode === "never")
|
|
64500
|
+
return policy;
|
|
64501
|
+
if (capability.replaySafety === "never")
|
|
64502
|
+
return { mode: "never" };
|
|
64503
|
+
if (capability.hasProviderRequestRetries || capability.automaticCategories.length === 0 || capability.replaySafety === "requires-idempotency") {
|
|
64504
|
+
return { mode: "automatic", maxAttempts: 1 };
|
|
64505
|
+
}
|
|
64506
|
+
return policy;
|
|
64507
|
+
}
|
|
64508
|
+
var RetryCategorySchema, AutomaticRetryPolicySchema, NeverRetryPolicySchema, ResolvedRetryPolicySchema, StepRetryPolicySchema, WorkflowRetryPolicySchema, RetryPolicySourceSchema, RetryTerminalReasonSchema, ExecutionFailureSchema, RetryDecisionSchema, StepRetryCapabilitySchema;
|
|
64509
|
+
var init_retry = __esm(() => {
|
|
64510
|
+
init_zod();
|
|
64511
|
+
RetryCategorySchema = exports_external.enum([
|
|
64512
|
+
"timeout",
|
|
64513
|
+
"rate_limited",
|
|
64514
|
+
"temporarily_unavailable",
|
|
64515
|
+
"invalid_provider_output",
|
|
64516
|
+
"validation",
|
|
64517
|
+
"authentication",
|
|
64518
|
+
"authorization",
|
|
64519
|
+
"not_found",
|
|
64520
|
+
"business",
|
|
64521
|
+
"cancelled",
|
|
64522
|
+
"unknown"
|
|
64523
|
+
]);
|
|
64524
|
+
AutomaticRetryPolicySchema = exports_external.object({
|
|
64525
|
+
mode: exports_external.literal("automatic"),
|
|
64526
|
+
maxAttempts: exports_external.number().int().min(1).max(10).optional()
|
|
64527
|
+
});
|
|
64528
|
+
NeverRetryPolicySchema = exports_external.object({
|
|
64529
|
+
mode: exports_external.literal("never")
|
|
64530
|
+
});
|
|
64531
|
+
ResolvedRetryPolicySchema = exports_external.discriminatedUnion("mode", [
|
|
64532
|
+
AutomaticRetryPolicySchema,
|
|
64533
|
+
NeverRetryPolicySchema
|
|
64534
|
+
]);
|
|
64535
|
+
StepRetryPolicySchema = exports_external.union([
|
|
64536
|
+
exports_external.literal("inherit"),
|
|
64537
|
+
exports_external.literal("automatic"),
|
|
64538
|
+
exports_external.literal("never"),
|
|
64539
|
+
ResolvedRetryPolicySchema
|
|
64540
|
+
]);
|
|
64541
|
+
WorkflowRetryPolicySchema = exports_external.union([
|
|
64542
|
+
exports_external.literal("automatic"),
|
|
64543
|
+
exports_external.literal("never"),
|
|
64544
|
+
ResolvedRetryPolicySchema
|
|
64545
|
+
]);
|
|
64546
|
+
RetryPolicySourceSchema = exports_external.enum(["step", "workflow", "step_type", "tenant_ceiling"]);
|
|
64547
|
+
RetryTerminalReasonSchema = exports_external.enum([
|
|
64548
|
+
"non_retryable",
|
|
64549
|
+
"unsafe_to_replay",
|
|
64550
|
+
"cancelled",
|
|
64551
|
+
"attempts_exhausted",
|
|
64552
|
+
"elapsed_time_exhausted",
|
|
64553
|
+
"retry_after_exceeds_budget",
|
|
64554
|
+
"operator_ceiling"
|
|
64555
|
+
]);
|
|
64556
|
+
ExecutionFailureSchema = exports_external.object({
|
|
64557
|
+
code: exports_external.string().min(1),
|
|
64558
|
+
category: RetryCategorySchema,
|
|
64559
|
+
message: exports_external.string(),
|
|
64560
|
+
transient: exports_external.boolean(),
|
|
64561
|
+
retryAfterMs: exports_external.number().int().nonnegative().optional(),
|
|
64562
|
+
httpStatus: exports_external.number().int().min(100).max(599).optional(),
|
|
64563
|
+
provider: exports_external.string().optional()
|
|
64564
|
+
});
|
|
64565
|
+
RetryDecisionSchema = exports_external.object({
|
|
64566
|
+
retry: exports_external.boolean(),
|
|
64567
|
+
delayMs: exports_external.number().int().nonnegative().optional(),
|
|
64568
|
+
nextAttemptAt: exports_external.coerce.date().optional(),
|
|
64569
|
+
policySource: RetryPolicySourceSchema,
|
|
64570
|
+
terminalReason: RetryTerminalReasonSchema.optional()
|
|
64571
|
+
});
|
|
64572
|
+
StepRetryCapabilitySchema = exports_external.object({
|
|
64573
|
+
replaySafety: exports_external.enum(["safe", "requires-idempotency", "never"]),
|
|
64574
|
+
automaticCategories: exports_external.array(RetryCategorySchema),
|
|
64575
|
+
hasProviderRequestRetries: exports_external.boolean().optional()
|
|
64576
|
+
});
|
|
64577
|
+
});
|
|
64578
|
+
|
|
64458
64579
|
// ../types/src/workflow/steps.ts
|
|
64459
64580
|
function parseStepType(type) {
|
|
64460
64581
|
const [category, operation] = type.split(".");
|
|
@@ -64463,9 +64584,10 @@ function parseStepType(type) {
|
|
|
64463
64584
|
function isStepCategory(type, category) {
|
|
64464
64585
|
return type.startsWith(`${category}.`);
|
|
64465
64586
|
}
|
|
64466
|
-
var AI_STEP_TYPES, TRANSFORM_STEP_TYPES, ACTION_STEP_TYPES, CONTROL_STEP_TYPES, STEP_TYPES, StepTypeValue, StepTypeSchema, BaseStepSchema, AIStepSchema, TransformStepSchema, HttpMethodSchema, ActionStepSchema, WaitStepSchema, FailStepSchema, LegacyBlockStepSchemaInner, IfStepSchemaInner, SwitchCaseSchemaInner, SwitchStepSchemaInner, ParallelBranchSchemaInner, ParallelStepSchemaInner, ForeachStepSchemaInner, ParallelMapStepSchemaInner, StepSchema, LegacyBlockStepSchema, IfStepSchema, SwitchStepSchema, ParallelBranchSchema, ParallelStepSchema, ForeachStepSchema, ParallelMapStepSchema;
|
|
64587
|
+
var AI_STEP_TYPES, TRANSFORM_STEP_TYPES, ACTION_STEP_TYPES, CONTROL_STEP_TYPES, STEP_TYPES, StepTypeValue, StepTypeSchema, BaseStepSchema, ControlContainerBaseStepSchema, AIStepSchema, TransformStepSchema, HttpMethodSchema, ActionStepSchema, WaitStepSchema, FailStepSchema, LegacyBlockStepSchemaInner, IfStepSchemaInner, SwitchCaseSchemaInner, SwitchStepSchemaInner, ParallelBranchSchemaInner, ParallelStepSchemaInner, ForeachStepSchemaInner, ParallelMapStepSchemaInner, StepSchema, LegacyBlockStepSchema, IfStepSchema, SwitchStepSchema, ParallelBranchSchema, ParallelStepSchema, ForeachStepSchema, ParallelMapStepSchema;
|
|
64467
64588
|
var init_steps = __esm(() => {
|
|
64468
64589
|
init_zod();
|
|
64590
|
+
init_retry();
|
|
64469
64591
|
AI_STEP_TYPES = [
|
|
64470
64592
|
"ai.parse",
|
|
64471
64593
|
"ai.extract",
|
|
@@ -64541,17 +64663,19 @@ var init_steps = __esm(() => {
|
|
|
64541
64663
|
description: exports_external.string().optional(),
|
|
64542
64664
|
if: exports_external.string().optional(),
|
|
64543
64665
|
timeout: exports_external.number().positive().optional(),
|
|
64666
|
+
retry: StepRetryPolicySchema.optional(),
|
|
64544
64667
|
retries: exports_external.number().int().min(0).optional(),
|
|
64545
64668
|
retryDelay: exports_external.number().positive().optional(),
|
|
64546
64669
|
with: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
64547
|
-
});
|
|
64670
|
+
}).strict();
|
|
64671
|
+
ControlContainerBaseStepSchema = BaseStepSchema.omit({ retry: true });
|
|
64548
64672
|
AIStepSchema = BaseStepSchema.extend({
|
|
64549
64673
|
type: exports_external.enum(AI_STEP_TYPES)
|
|
64550
64674
|
});
|
|
64551
64675
|
TransformStepSchema = BaseStepSchema.extend({
|
|
64552
64676
|
type: exports_external.enum(TRANSFORM_STEP_TYPES)
|
|
64553
64677
|
});
|
|
64554
|
-
HttpMethodSchema = exports_external.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]);
|
|
64678
|
+
HttpMethodSchema = exports_external.enum(["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE"]);
|
|
64555
64679
|
ActionStepSchema = BaseStepSchema.extend({
|
|
64556
64680
|
type: exports_external.enum(ACTION_STEP_TYPES)
|
|
64557
64681
|
});
|
|
@@ -64567,10 +64691,12 @@ var init_steps = __esm(() => {
|
|
|
64567
64691
|
});
|
|
64568
64692
|
LegacyBlockStepSchemaInner = BaseStepSchema.extend({
|
|
64569
64693
|
type: exports_external.literal("control.block"),
|
|
64694
|
+
retries: exports_external.number().int().min(0).optional(),
|
|
64695
|
+
retryDelay: exports_external.number().positive().optional(),
|
|
64570
64696
|
blockName: exports_external.string().min(1),
|
|
64571
64697
|
inputs: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
64572
64698
|
});
|
|
64573
|
-
IfStepSchemaInner =
|
|
64699
|
+
IfStepSchemaInner = ControlContainerBaseStepSchema.extend({
|
|
64574
64700
|
type: exports_external.literal("control.if"),
|
|
64575
64701
|
condition: exports_external.string(),
|
|
64576
64702
|
then: exports_external.lazy(() => exports_external.array(StepSchema)),
|
|
@@ -64580,7 +64706,7 @@ var init_steps = __esm(() => {
|
|
|
64580
64706
|
when: exports_external.union([exports_external.string(), exports_external.number(), exports_external.boolean()]),
|
|
64581
64707
|
steps: exports_external.lazy(() => exports_external.array(StepSchema))
|
|
64582
64708
|
});
|
|
64583
|
-
SwitchStepSchemaInner =
|
|
64709
|
+
SwitchStepSchemaInner = ControlContainerBaseStepSchema.extend({
|
|
64584
64710
|
type: exports_external.literal("control.switch"),
|
|
64585
64711
|
on: exports_external.string(),
|
|
64586
64712
|
cases: exports_external.array(SwitchCaseSchemaInner),
|
|
@@ -64590,18 +64716,18 @@ var init_steps = __esm(() => {
|
|
|
64590
64716
|
name: exports_external.string().min(1),
|
|
64591
64717
|
steps: exports_external.lazy(() => exports_external.array(StepSchema))
|
|
64592
64718
|
});
|
|
64593
|
-
ParallelStepSchemaInner =
|
|
64719
|
+
ParallelStepSchemaInner = ControlContainerBaseStepSchema.extend({
|
|
64594
64720
|
type: exports_external.literal("control.parallel"),
|
|
64595
64721
|
branches: exports_external.array(ParallelBranchSchemaInner)
|
|
64596
64722
|
});
|
|
64597
|
-
ForeachStepSchemaInner =
|
|
64723
|
+
ForeachStepSchemaInner = ControlContainerBaseStepSchema.extend({
|
|
64598
64724
|
type: exports_external.literal("control.foreach"),
|
|
64599
64725
|
items: exports_external.string(),
|
|
64600
64726
|
as: exports_external.string(),
|
|
64601
64727
|
indexAs: exports_external.string().optional(),
|
|
64602
64728
|
steps: exports_external.lazy(() => exports_external.array(StepSchema))
|
|
64603
64729
|
});
|
|
64604
|
-
ParallelMapStepSchemaInner =
|
|
64730
|
+
ParallelMapStepSchemaInner = ControlContainerBaseStepSchema.extend({
|
|
64605
64731
|
type: exports_external.literal("control.parallel_map"),
|
|
64606
64732
|
items: exports_external.string(),
|
|
64607
64733
|
as: exports_external.string(),
|
|
@@ -64632,6 +64758,9 @@ var init_steps = __esm(() => {
|
|
|
64632
64758
|
});
|
|
64633
64759
|
|
|
64634
64760
|
// ../types/src/workflow/step-configs.ts
|
|
64761
|
+
function getStepRetryCapability(stepType) {
|
|
64762
|
+
return STEP_RETRY_CAPABILITIES[stepType];
|
|
64763
|
+
}
|
|
64635
64764
|
function getStepSchema(stepType) {
|
|
64636
64765
|
return STEP_SCHEMAS[stepType];
|
|
64637
64766
|
}
|
|
@@ -64704,7 +64833,7 @@ function isOutputSchemaUnknown(stepType) {
|
|
|
64704
64833
|
const def = schema._def;
|
|
64705
64834
|
return def?.typeName === "ZodUnknown";
|
|
64706
64835
|
}
|
|
64707
|
-
var AiParseConfigSchema, AiParseOutputSchema, AiExtractConfigSchema, AiExtractOutputSchema, AiSplitConfigSchema, AiSplitOutputSchema, AiSegmentConfigSchema, AiSegmentOutputSchema, AiClassifyConfigSchema, AiClassifyOutputSchema, TransformSetConfigSchema, TransformSetOutputSchema, TransformRemoveConfigSchema, TransformRemoveOutputSchema, TransformCombineConfigSchema, TransformCombineOutputSchema, TransformSplitConfigSchema, TransformSplitOutputSchema, TransformMergeConfigSchema, TransformMergeOutputSchema, TransformTemplateConfigSchema, TransformTemplateOutputSchema, TransformPdfEmbedConfigSchema, TransformPdfEmbedOutputSchema, TransformXlsxToJsonConfigSchema, TransformXlsxToJsonOutputSchema, TransformScriptConfigSchema, TransformScriptOutputSchema, ParsedDocPageSchema, TransformTextChunkerConfigSchema, TransformTextChunkerOutputSchema, RegexNormalizerSchema, RegexFormatSchema, REGEX_FLAGS, RegexFieldSchema, TransformRegexExtractConfigSchema, TransformRegexExtractOutputSchema, ActionHttpConfigSchema, ActionHttpOutputSchema, ActionInvokeWorkflowConfigSchema, ActionInvokeWorkflowOutputSchema, ActionWebsiteReaderConfigSchema, ActionWebsiteReaderOutputSchema, ControlIfConfigSchema, ControlIfOutputSchema, ControlSwitchConfigSchema, ControlSwitchOutputSchema, ControlForeachConfigSchema, ControlForeachOutputSchema, ControlParallelMapConfigSchema, ControlParallelMapOutputSchema, ControlParallelConfigSchema, ControlParallelOutputSchema, ControlWaitConfigSchema, ControlWaitOutputSchema, ControlFailConfigSchema, ControlFailOutputSchema, STEP_SCHEMAS;
|
|
64836
|
+
var AiParseConfigSchema, AiParseOutputSchema, AiExtractConfigSchema, AiExtractOutputSchema, AiSplitConfigSchema, AiSplitOutputSchema, AiSegmentConfigSchema, AiSegmentOutputSchema, AiClassifyConfigSchema, AiClassifyOutputSchema, TransformSetConfigSchema, TransformSetOutputSchema, TransformRemoveConfigSchema, TransformRemoveOutputSchema, TransformCombineConfigSchema, TransformCombineOutputSchema, TransformSplitConfigSchema, TransformSplitOutputSchema, TransformMergeConfigSchema, TransformMergeOutputSchema, TransformTemplateConfigSchema, TransformTemplateOutputSchema, TransformPdfEmbedConfigSchema, TransformPdfEmbedOutputSchema, TransformXlsxToJsonConfigSchema, TransformXlsxToJsonOutputSchema, TransformScriptConfigSchema, TransformScriptOutputSchema, ParsedDocPageSchema, TransformTextChunkerConfigSchema, TransformTextChunkerOutputSchema, RegexNormalizerSchema, RegexFormatSchema, REGEX_FLAGS, RegexFieldSchema, TransformRegexExtractConfigSchema, TransformRegexExtractOutputSchema, ActionHttpConfigSchema, ActionHttpOutputSchema, ActionInvokeWorkflowConfigSchema, ActionInvokeWorkflowOutputSchema, ActionWebsiteReaderConfigSchema, ActionWebsiteReaderOutputSchema, ControlIfConfigSchema, ControlIfOutputSchema, ControlSwitchConfigSchema, ControlSwitchOutputSchema, ControlForeachConfigSchema, ControlForeachOutputSchema, ControlParallelMapConfigSchema, ControlParallelMapOutputSchema, ControlParallelConfigSchema, ControlParallelOutputSchema, ControlWaitConfigSchema, ControlWaitOutputSchema, ControlFailConfigSchema, ControlFailOutputSchema, AI_RETRY_CAPABILITY, DETERMINISTIC_RETRY_CAPABILITY, CONTROL_RETRY_CAPABILITY, FILE_OUTPUT_RETRY_CAPABILITY, STEP_RETRY_CAPABILITIES, STEP_SCHEMAS;
|
|
64708
64837
|
var init_step_configs = __esm(() => {
|
|
64709
64838
|
init_zod();
|
|
64710
64839
|
init_common();
|
|
@@ -65030,7 +65159,7 @@ var init_step_configs = __esm(() => {
|
|
|
65030
65159
|
TransformRegexExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Field name → extracted value (or default), plus `_evidence: { [field]: { pageIndex, matchOffset, raw } }` and `_unmatched: string[]`.");
|
|
65031
65160
|
ActionHttpConfigSchema = exports_external.object({
|
|
65032
65161
|
url: exports_external.string().min(1, "URL is required").describe("Request URL (supports template expressions)"),
|
|
65033
|
-
method: exports_external.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).default("GET").optional(),
|
|
65162
|
+
method: exports_external.enum(["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE"]).default("GET").optional(),
|
|
65034
65163
|
headers: exports_external.record(exports_external.string(), exports_external.string()).optional().describe("HTTP headers"),
|
|
65035
65164
|
body: exports_external.unknown().optional().describe("Request body (JSON or string)"),
|
|
65036
65165
|
timeout: exports_external.number().positive().default(30000).optional().describe("Timeout in milliseconds"),
|
|
@@ -65162,6 +65291,65 @@ var init_step_configs = __esm(() => {
|
|
|
65162
65291
|
message: exports_external.string().min(1).describe('Human-readable failure message. Supports template expressions, e.g. "Document classified as {{ steps.classify.output.label }}".')
|
|
65163
65292
|
});
|
|
65164
65293
|
ControlFailOutputSchema = exports_external.never().describe("control.fail never produces output — it terminates the workflow when triggered.");
|
|
65294
|
+
AI_RETRY_CAPABILITY = {
|
|
65295
|
+
replaySafety: "safe",
|
|
65296
|
+
automaticCategories: [
|
|
65297
|
+
"timeout",
|
|
65298
|
+
"rate_limited",
|
|
65299
|
+
"temporarily_unavailable",
|
|
65300
|
+
"invalid_provider_output"
|
|
65301
|
+
],
|
|
65302
|
+
hasProviderRequestRetries: true
|
|
65303
|
+
};
|
|
65304
|
+
DETERMINISTIC_RETRY_CAPABILITY = {
|
|
65305
|
+
replaySafety: "safe",
|
|
65306
|
+
automaticCategories: []
|
|
65307
|
+
};
|
|
65308
|
+
CONTROL_RETRY_CAPABILITY = {
|
|
65309
|
+
replaySafety: "never",
|
|
65310
|
+
automaticCategories: []
|
|
65311
|
+
};
|
|
65312
|
+
FILE_OUTPUT_RETRY_CAPABILITY = {
|
|
65313
|
+
replaySafety: "never",
|
|
65314
|
+
automaticCategories: []
|
|
65315
|
+
};
|
|
65316
|
+
STEP_RETRY_CAPABILITIES = {
|
|
65317
|
+
"ai.parse": AI_RETRY_CAPABILITY,
|
|
65318
|
+
"ai.extract": AI_RETRY_CAPABILITY,
|
|
65319
|
+
"ai.split": AI_RETRY_CAPABILITY,
|
|
65320
|
+
"ai.segment": AI_RETRY_CAPABILITY,
|
|
65321
|
+
"ai.classify": AI_RETRY_CAPABILITY,
|
|
65322
|
+
"transform.set": DETERMINISTIC_RETRY_CAPABILITY,
|
|
65323
|
+
"transform.remove": DETERMINISTIC_RETRY_CAPABILITY,
|
|
65324
|
+
"transform.combine": DETERMINISTIC_RETRY_CAPABILITY,
|
|
65325
|
+
"transform.split": DETERMINISTIC_RETRY_CAPABILITY,
|
|
65326
|
+
"transform.merge": DETERMINISTIC_RETRY_CAPABILITY,
|
|
65327
|
+
"transform.template": FILE_OUTPUT_RETRY_CAPABILITY,
|
|
65328
|
+
"transform.pdf-embed": FILE_OUTPUT_RETRY_CAPABILITY,
|
|
65329
|
+
"transform.xlsx-to-json": FILE_OUTPUT_RETRY_CAPABILITY,
|
|
65330
|
+
"transform.script": DETERMINISTIC_RETRY_CAPABILITY,
|
|
65331
|
+
"transform.text-chunker": DETERMINISTIC_RETRY_CAPABILITY,
|
|
65332
|
+
"transform.regex-extract": DETERMINISTIC_RETRY_CAPABILITY,
|
|
65333
|
+
"action.http": {
|
|
65334
|
+
replaySafety: "requires-idempotency",
|
|
65335
|
+
automaticCategories: ["timeout", "rate_limited", "temporarily_unavailable"]
|
|
65336
|
+
},
|
|
65337
|
+
"action.invoke-workflow": {
|
|
65338
|
+
replaySafety: "requires-idempotency",
|
|
65339
|
+
automaticCategories: ["timeout", "temporarily_unavailable"]
|
|
65340
|
+
},
|
|
65341
|
+
"action.website-reader": {
|
|
65342
|
+
replaySafety: "safe",
|
|
65343
|
+
automaticCategories: ["timeout", "rate_limited", "temporarily_unavailable"]
|
|
65344
|
+
},
|
|
65345
|
+
"control.if": CONTROL_RETRY_CAPABILITY,
|
|
65346
|
+
"control.switch": CONTROL_RETRY_CAPABILITY,
|
|
65347
|
+
"control.foreach": CONTROL_RETRY_CAPABILITY,
|
|
65348
|
+
"control.parallel": CONTROL_RETRY_CAPABILITY,
|
|
65349
|
+
"control.parallel_map": CONTROL_RETRY_CAPABILITY,
|
|
65350
|
+
"control.wait": CONTROL_RETRY_CAPABILITY,
|
|
65351
|
+
"control.fail": CONTROL_RETRY_CAPABILITY
|
|
65352
|
+
};
|
|
65165
65353
|
STEP_SCHEMAS = {
|
|
65166
65354
|
"ai.parse": {
|
|
65167
65355
|
type: "ai.parse",
|
|
@@ -65435,6 +65623,7 @@ var WORKFLOW_NAME_PATTERN, WorkflowNameSchema, WorkflowInputDefSchema, ManualTri
|
|
|
65435
65623
|
var init_workflow = __esm(() => {
|
|
65436
65624
|
init_zod();
|
|
65437
65625
|
init_common();
|
|
65626
|
+
init_retry();
|
|
65438
65627
|
init_steps();
|
|
65439
65628
|
WORKFLOW_NAME_PATTERN = /^[a-z0-9][a-z0-9_-]*$/;
|
|
65440
65629
|
WorkflowNameSchema = exports_external.string().min(1).max(64).regex(WORKFLOW_NAME_PATTERN, 'Workflow name must start with a lowercase letter or digit and contain only lowercase letters, digits, "_" or "-".');
|
|
@@ -65514,9 +65703,10 @@ var init_workflow = __esm(() => {
|
|
|
65514
65703
|
TriggerMethodsSchema = exports_external.array(TriggerMethodSchema).default([{ type: "manual" }]);
|
|
65515
65704
|
WorkflowSettingsSchema = exports_external.object({
|
|
65516
65705
|
timeout: exports_external.number().positive().optional(),
|
|
65706
|
+
retry: WorkflowRetryPolicySchema.optional(),
|
|
65517
65707
|
retries: exports_external.number().int().min(0).optional(),
|
|
65518
65708
|
retryDelay: exports_external.number().positive().optional()
|
|
65519
|
-
});
|
|
65709
|
+
}).strict();
|
|
65520
65710
|
WorkflowDefinitionSchema = exports_external.object({
|
|
65521
65711
|
name: WorkflowNameSchema,
|
|
65522
65712
|
kind: exports_external.enum(["workflow"]).default("workflow").optional(),
|
|
@@ -65719,11 +65909,12 @@ function isFileOutput(value) {
|
|
|
65719
65909
|
function isWorkflowResult(value) {
|
|
65720
65910
|
return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
|
|
65721
65911
|
}
|
|
65722
|
-
var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
65912
|
+
var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, StepExecutionAttemptSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
65723
65913
|
var init_execution2 = __esm(() => {
|
|
65724
65914
|
init_zod();
|
|
65725
65915
|
init_common();
|
|
65726
65916
|
init_execution();
|
|
65917
|
+
init_retry();
|
|
65727
65918
|
init_workflow();
|
|
65728
65919
|
WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
|
|
65729
65920
|
StepExecutionStatusSchema2 = StepExecutionStatusSchema;
|
|
@@ -65784,6 +65975,7 @@ var init_execution2 = __esm(() => {
|
|
|
65784
65975
|
result: exports_external.unknown().nullable(),
|
|
65785
65976
|
error: exports_external.string().nullable(),
|
|
65786
65977
|
priority: exports_external.number().default(50),
|
|
65978
|
+
availableAt: TimestampSchema,
|
|
65787
65979
|
leaseId: exports_external.string().nullable(),
|
|
65788
65980
|
leaseExpiresAt: TimestampSchema.nullable(),
|
|
65789
65981
|
workerId: exports_external.string().nullable(),
|
|
@@ -65808,6 +66000,11 @@ var init_execution2 = __esm(() => {
|
|
|
65808
66000
|
scopeHash: exports_external.string(),
|
|
65809
66001
|
executionOrder: exports_external.number(),
|
|
65810
66002
|
stepAttempt: exports_external.number().default(0),
|
|
66003
|
+
stepPath: exports_external.string().nullable().optional(),
|
|
66004
|
+
effectiveRetryPolicy: ResolvedRetryPolicySchema.nullable().optional(),
|
|
66005
|
+
retryPolicySource: RetryPolicySourceSchema.nullable().optional(),
|
|
66006
|
+
latestAttempt: exports_external.number().default(0),
|
|
66007
|
+
nextAttemptAt: TimestampSchema.nullable().optional(),
|
|
65811
66008
|
inputData: exports_external.unknown().nullable(),
|
|
65812
66009
|
outputData: exports_external.unknown().nullable(),
|
|
65813
66010
|
status: StepExecutionStatusSchema2,
|
|
@@ -65817,6 +66014,21 @@ var init_execution2 = __esm(() => {
|
|
|
65817
66014
|
startedAt: TimestampSchema.nullable(),
|
|
65818
66015
|
completedAt: TimestampSchema.nullable()
|
|
65819
66016
|
});
|
|
66017
|
+
StepExecutionAttemptSchema = exports_external.object({
|
|
66018
|
+
id: exports_external.string(),
|
|
66019
|
+
stepExecutionId: exports_external.string(),
|
|
66020
|
+
executionId: exports_external.string(),
|
|
66021
|
+
tenantId: exports_external.string(),
|
|
66022
|
+
attemptNumber: exports_external.number().int().min(1),
|
|
66023
|
+
status: exports_external.enum(["running", "success", "failure", "cancelled"]),
|
|
66024
|
+
resolvedConfig: exports_external.unknown().nullable(),
|
|
66025
|
+
failure: ExecutionFailureSchema.nullable(),
|
|
66026
|
+
retryDecision: RetryDecisionSchema.nullable(),
|
|
66027
|
+
replaySafe: exports_external.boolean().nullable(),
|
|
66028
|
+
startedAt: TimestampSchema,
|
|
66029
|
+
completedAt: TimestampSchema.nullable(),
|
|
66030
|
+
durationMs: exports_external.number().nullable()
|
|
66031
|
+
});
|
|
65820
66032
|
ConnectorSchema = exports_external.object({
|
|
65821
66033
|
id: exports_external.string(),
|
|
65822
66034
|
tenantId: exports_external.string(),
|
|
@@ -66000,6 +66212,7 @@ var init_workflow2 = __esm(() => {
|
|
|
66000
66212
|
init_step_configs();
|
|
66001
66213
|
init_actions();
|
|
66002
66214
|
init_steps();
|
|
66215
|
+
init_retry();
|
|
66003
66216
|
init_workflow();
|
|
66004
66217
|
init_expected_output();
|
|
66005
66218
|
init_local_meta();
|
|
@@ -68274,6 +68487,216 @@ var init_sample_rank = __esm(() => {
|
|
|
68274
68487
|
UNIT_INTERVAL_DENOMINATOR = BigInt(1) << BigInt(53);
|
|
68275
68488
|
});
|
|
68276
68489
|
|
|
68490
|
+
// ../types/src/webhooks.ts
|
|
68491
|
+
function serializeWebhookEvent(event) {
|
|
68492
|
+
return JSON.stringify(WebhookEventEnvelopeSchema.parse(event));
|
|
68493
|
+
}
|
|
68494
|
+
function boundWebhookEventOutput(event, maxBytes) {
|
|
68495
|
+
const parsed = WebhookEventEnvelopeSchema.parse(event);
|
|
68496
|
+
if (new TextEncoder().encode(JSON.stringify(parsed)).byteLength <= maxBytes)
|
|
68497
|
+
return parsed;
|
|
68498
|
+
const run = { ...parsed.data.run };
|
|
68499
|
+
delete run.output;
|
|
68500
|
+
run.outputOmitted = true;
|
|
68501
|
+
const bounded = { ...parsed, data: { ...parsed.data, run } };
|
|
68502
|
+
const serialized = JSON.stringify(bounded);
|
|
68503
|
+
if (new TextEncoder().encode(serialized).byteLength > maxBytes) {
|
|
68504
|
+
throw new Error("Webhook envelope exceeds payload limit without output");
|
|
68505
|
+
}
|
|
68506
|
+
return WebhookEventEnvelopeSchema.parse(bounded);
|
|
68507
|
+
}
|
|
68508
|
+
function getWebhookDestinationUrlError(raw) {
|
|
68509
|
+
const trimmed = raw.trim();
|
|
68510
|
+
if (!trimmed)
|
|
68511
|
+
return "Enter a valid HTTPS URL.";
|
|
68512
|
+
const result = WebhookDestinationUrlSchema.safeParse(trimmed);
|
|
68513
|
+
if (result.success)
|
|
68514
|
+
return null;
|
|
68515
|
+
return result.error.issues[0]?.message ?? "Enter a valid HTTPS URL.";
|
|
68516
|
+
}
|
|
68517
|
+
function validateWebhookHeaderCollection(input, ctx) {
|
|
68518
|
+
if (input.customHeaders) {
|
|
68519
|
+
const seen = new Set;
|
|
68520
|
+
let bytes = 0;
|
|
68521
|
+
input.customHeaders.forEach((header, index) => {
|
|
68522
|
+
const normalized = header.name.toLowerCase();
|
|
68523
|
+
if (seen.has(normalized)) {
|
|
68524
|
+
ctx.addIssue({
|
|
68525
|
+
code: "custom",
|
|
68526
|
+
path: ["customHeaders", index, "name"],
|
|
68527
|
+
message: "Duplicate webhook header"
|
|
68528
|
+
});
|
|
68529
|
+
}
|
|
68530
|
+
seen.add(normalized);
|
|
68531
|
+
bytes += new TextEncoder().encode(header.name + ("value" in header ? header.value : "")).byteLength;
|
|
68532
|
+
});
|
|
68533
|
+
if (bytes > WEBHOOK_MAX_HEADER_BYTES) {
|
|
68534
|
+
ctx.addIssue({
|
|
68535
|
+
code: "custom",
|
|
68536
|
+
path: ["customHeaders"],
|
|
68537
|
+
message: "Custom webhook headers are too large"
|
|
68538
|
+
});
|
|
68539
|
+
}
|
|
68540
|
+
}
|
|
68541
|
+
}
|
|
68542
|
+
var WEBHOOK_API_VERSION = "2026-07-01", WEBHOOK_NOTIFY_CHANNEL = "eigenpal:webhooks", WEBHOOK_MAX_PAYLOAD_BYTES, WEBHOOK_MAX_HEADERS = 20, WEBHOOK_MAX_HEADER_BYTES, WEBHOOK_EVENT_TYPES, WEBHOOK_DELIVERY_STATES, WEBHOOK_RESERVED_HEADERS, RESERVED_HEADER_SET, WebhookEventTypeSchema, WebhookDeliveryStateSchema, WebhookEndpointIdSchema, WebhookEventIdSchema, WebhookDeliveryIdSchema, WebhookAttemptIdSchema, HeaderNameSchema, WebhookCustomHeaderSchema, RetainedWebhookCustomHeaderSchema, RedactedWebhookCustomHeaderSchema, PublicWebhookRunSchema, EnvelopeBaseSchema, RunCreatedWebhookEventSchema, RunStatusChangedWebhookEventSchema, WebhookEventEnvelopeSchema, WebhookEndpointSchema, WebhookDestinationUrlSchema, CreateWebhookEndpointSchema, UpdateWebhookEndpointSchema, CreateWebhookEndpointResponseSchema, WebhookDeliverySchema, WebhookDeliveryAttemptSchema;
|
|
68543
|
+
var init_webhooks = __esm(() => {
|
|
68544
|
+
init_zod();
|
|
68545
|
+
init_execution_row();
|
|
68546
|
+
WEBHOOK_MAX_PAYLOAD_BYTES = 1024 * 1024;
|
|
68547
|
+
WEBHOOK_MAX_HEADER_BYTES = 16 * 1024;
|
|
68548
|
+
WEBHOOK_EVENT_TYPES = ["run.created", "run.status_changed"];
|
|
68549
|
+
WEBHOOK_DELIVERY_STATES = [
|
|
68550
|
+
"pending",
|
|
68551
|
+
"processing",
|
|
68552
|
+
"succeeded",
|
|
68553
|
+
"failed",
|
|
68554
|
+
"cancelled"
|
|
68555
|
+
];
|
|
68556
|
+
WEBHOOK_RESERVED_HEADERS = [
|
|
68557
|
+
"connection",
|
|
68558
|
+
"content-length",
|
|
68559
|
+
"content-type",
|
|
68560
|
+
"host",
|
|
68561
|
+
"keep-alive",
|
|
68562
|
+
"proxy-authenticate",
|
|
68563
|
+
"proxy-authorization",
|
|
68564
|
+
"te",
|
|
68565
|
+
"trailer",
|
|
68566
|
+
"transfer-encoding",
|
|
68567
|
+
"upgrade",
|
|
68568
|
+
"user-agent",
|
|
68569
|
+
"webhook-id",
|
|
68570
|
+
"webhook-signature",
|
|
68571
|
+
"webhook-timestamp"
|
|
68572
|
+
];
|
|
68573
|
+
RESERVED_HEADER_SET = new Set(WEBHOOK_RESERVED_HEADERS);
|
|
68574
|
+
WebhookEventTypeSchema = exports_external.enum(WEBHOOK_EVENT_TYPES);
|
|
68575
|
+
WebhookDeliveryStateSchema = exports_external.enum(WEBHOOK_DELIVERY_STATES);
|
|
68576
|
+
WebhookEndpointIdSchema = exports_external.string().regex(/^whep_[A-Za-z0-9_-]+$/);
|
|
68577
|
+
WebhookEventIdSchema = exports_external.string().regex(/^whev_[A-Za-z0-9_-]+$/);
|
|
68578
|
+
WebhookDeliveryIdSchema = exports_external.string().regex(/^whdl_[A-Za-z0-9_-]+$/);
|
|
68579
|
+
WebhookAttemptIdSchema = exports_external.string().regex(/^what_[A-Za-z0-9_-]+$/);
|
|
68580
|
+
HeaderNameSchema = exports_external.string().min(1).max(128).regex(/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/);
|
|
68581
|
+
WebhookCustomHeaderSchema = exports_external.object({
|
|
68582
|
+
name: HeaderNameSchema.refine((name) => !RESERVED_HEADER_SET.has(name.toLowerCase()) && !name.toLowerCase().startsWith("webhook-"), { message: "Reserved webhook header" }),
|
|
68583
|
+
value: exports_external.string().min(1).max(8192).refine((value) => !/[\r\n]/.test(value), {
|
|
68584
|
+
message: "Header values cannot contain CR or LF"
|
|
68585
|
+
})
|
|
68586
|
+
});
|
|
68587
|
+
RetainedWebhookCustomHeaderSchema = exports_external.object({
|
|
68588
|
+
name: WebhookCustomHeaderSchema.shape.name,
|
|
68589
|
+
retained: exports_external.literal(true)
|
|
68590
|
+
});
|
|
68591
|
+
RedactedWebhookCustomHeaderSchema = exports_external.object({
|
|
68592
|
+
name: HeaderNameSchema,
|
|
68593
|
+
configured: exports_external.literal(true)
|
|
68594
|
+
});
|
|
68595
|
+
PublicWebhookRunSchema = exports_external.object({
|
|
68596
|
+
id: exports_external.string().min(1),
|
|
68597
|
+
automationId: exports_external.string().min(1),
|
|
68598
|
+
type: exports_external.enum(["workflow", "agent"]),
|
|
68599
|
+
status: exports_external.enum(EXECUTION_STATUSES),
|
|
68600
|
+
triggerType: exports_external.string(),
|
|
68601
|
+
createdAt: exports_external.string().datetime(),
|
|
68602
|
+
startedAt: exports_external.string().datetime().nullable(),
|
|
68603
|
+
completedAt: exports_external.string().datetime().nullable(),
|
|
68604
|
+
output: exports_external.unknown().optional(),
|
|
68605
|
+
outputOmitted: exports_external.boolean().optional()
|
|
68606
|
+
});
|
|
68607
|
+
EnvelopeBaseSchema = exports_external.object({
|
|
68608
|
+
id: WebhookEventIdSchema,
|
|
68609
|
+
apiVersion: exports_external.literal(WEBHOOK_API_VERSION),
|
|
68610
|
+
createdAt: exports_external.string().datetime(),
|
|
68611
|
+
test: exports_external.boolean().default(false)
|
|
68612
|
+
});
|
|
68613
|
+
RunCreatedWebhookEventSchema = EnvelopeBaseSchema.extend({
|
|
68614
|
+
type: exports_external.literal("run.created"),
|
|
68615
|
+
data: exports_external.object({ run: PublicWebhookRunSchema })
|
|
68616
|
+
});
|
|
68617
|
+
RunStatusChangedWebhookEventSchema = EnvelopeBaseSchema.extend({
|
|
68618
|
+
type: exports_external.literal("run.status_changed"),
|
|
68619
|
+
data: exports_external.object({
|
|
68620
|
+
run: PublicWebhookRunSchema,
|
|
68621
|
+
previousStatus: exports_external.enum(EXECUTION_STATUSES),
|
|
68622
|
+
currentStatus: exports_external.enum(EXECUTION_STATUSES)
|
|
68623
|
+
})
|
|
68624
|
+
});
|
|
68625
|
+
WebhookEventEnvelopeSchema = exports_external.discriminatedUnion("type", [
|
|
68626
|
+
RunCreatedWebhookEventSchema,
|
|
68627
|
+
RunStatusChangedWebhookEventSchema
|
|
68628
|
+
]);
|
|
68629
|
+
WebhookEndpointSchema = exports_external.object({
|
|
68630
|
+
id: WebhookEndpointIdSchema,
|
|
68631
|
+
tenantId: exports_external.string(),
|
|
68632
|
+
name: exports_external.string().min(1).max(200),
|
|
68633
|
+
url: exports_external.string().url(),
|
|
68634
|
+
eventTypes: exports_external.array(WebhookEventTypeSchema).min(1),
|
|
68635
|
+
enabled: exports_external.boolean(),
|
|
68636
|
+
signingConfigured: exports_external.literal(true),
|
|
68637
|
+
customHeaders: exports_external.array(RedactedWebhookCustomHeaderSchema),
|
|
68638
|
+
createdBy: exports_external.string().nullable(),
|
|
68639
|
+
createdAt: exports_external.coerce.date(),
|
|
68640
|
+
updatedAt: exports_external.coerce.date(),
|
|
68641
|
+
deletedAt: exports_external.coerce.date().nullable()
|
|
68642
|
+
});
|
|
68643
|
+
WebhookDestinationUrlSchema = exports_external.string().url().superRefine((raw, ctx) => {
|
|
68644
|
+
if (!URL.canParse(raw))
|
|
68645
|
+
return;
|
|
68646
|
+
const url2 = new URL(raw);
|
|
68647
|
+
if (url2.protocol !== "https:") {
|
|
68648
|
+
ctx.addIssue({ code: "custom", message: "Webhook URLs must use HTTPS" });
|
|
68649
|
+
}
|
|
68650
|
+
if (url2.username || url2.password) {
|
|
68651
|
+
ctx.addIssue({ code: "custom", message: "Webhook URLs cannot contain credentials" });
|
|
68652
|
+
}
|
|
68653
|
+
if (url2.hash) {
|
|
68654
|
+
ctx.addIssue({ code: "custom", message: "Webhook URLs cannot contain fragments" });
|
|
68655
|
+
}
|
|
68656
|
+
});
|
|
68657
|
+
CreateWebhookEndpointSchema = exports_external.object({
|
|
68658
|
+
name: exports_external.string().trim().min(1).max(200),
|
|
68659
|
+
url: WebhookDestinationUrlSchema,
|
|
68660
|
+
eventTypes: exports_external.array(WebhookEventTypeSchema).min(1),
|
|
68661
|
+
customHeaders: exports_external.array(WebhookCustomHeaderSchema).max(WEBHOOK_MAX_HEADERS).default([])
|
|
68662
|
+
}).superRefine(validateWebhookHeaderCollection);
|
|
68663
|
+
UpdateWebhookEndpointSchema = exports_external.object({
|
|
68664
|
+
name: exports_external.string().trim().min(1).max(200).optional(),
|
|
68665
|
+
url: WebhookDestinationUrlSchema.optional(),
|
|
68666
|
+
eventTypes: exports_external.array(WebhookEventTypeSchema).min(1).optional(),
|
|
68667
|
+
customHeaders: exports_external.array(exports_external.union([WebhookCustomHeaderSchema, RetainedWebhookCustomHeaderSchema])).max(WEBHOOK_MAX_HEADERS).optional(),
|
|
68668
|
+
enabled: exports_external.boolean().optional()
|
|
68669
|
+
}).superRefine(validateWebhookHeaderCollection);
|
|
68670
|
+
CreateWebhookEndpointResponseSchema = exports_external.object({
|
|
68671
|
+
endpoint: WebhookEndpointSchema,
|
|
68672
|
+
signingSecret: exports_external.string().regex(/^whsec_[A-Za-z0-9_-]+$/)
|
|
68673
|
+
});
|
|
68674
|
+
WebhookDeliverySchema = exports_external.object({
|
|
68675
|
+
id: WebhookDeliveryIdSchema,
|
|
68676
|
+
tenantId: exports_external.string(),
|
|
68677
|
+
endpointId: WebhookEndpointIdSchema,
|
|
68678
|
+
eventId: WebhookEventIdSchema,
|
|
68679
|
+
state: WebhookDeliveryStateSchema,
|
|
68680
|
+
attemptCount: exports_external.number().int().nonnegative(),
|
|
68681
|
+
nextAttemptAt: exports_external.coerce.date().nullable(),
|
|
68682
|
+
latestStatusCode: exports_external.number().int().nullable(),
|
|
68683
|
+
latestErrorCategory: exports_external.string().nullable(),
|
|
68684
|
+
createdAt: exports_external.coerce.date(),
|
|
68685
|
+
completedAt: exports_external.coerce.date().nullable()
|
|
68686
|
+
});
|
|
68687
|
+
WebhookDeliveryAttemptSchema = exports_external.object({
|
|
68688
|
+
id: WebhookAttemptIdSchema,
|
|
68689
|
+
deliveryId: WebhookDeliveryIdSchema,
|
|
68690
|
+
attemptNumber: exports_external.number().int().positive(),
|
|
68691
|
+
startedAt: exports_external.coerce.date(),
|
|
68692
|
+
completedAt: exports_external.coerce.date(),
|
|
68693
|
+
latencyMs: exports_external.number().int().nonnegative(),
|
|
68694
|
+
statusCode: exports_external.number().int().nullable(),
|
|
68695
|
+
errorCategory: exports_external.string().nullable(),
|
|
68696
|
+
responseExcerpt: exports_external.string().nullable()
|
|
68697
|
+
});
|
|
68698
|
+
});
|
|
68699
|
+
|
|
68277
68700
|
// ../types/src/storage/s3-paths.ts
|
|
68278
68701
|
function assertSegment(name, value) {
|
|
68279
68702
|
if (!value || !SEGMENT_RX.test(value)) {
|
|
@@ -68645,6 +69068,7 @@ __export(exports_src, {
|
|
|
68645
69068
|
stripTenantPrefix: () => stripTenantPrefix,
|
|
68646
69069
|
stringToUnitInterval: () => stringToUnitInterval,
|
|
68647
69070
|
sourceLockfileInputHash: () => sourceLockfileInputHash,
|
|
69071
|
+
serializeWebhookEvent: () => serializeWebhookEvent,
|
|
68648
69072
|
scriptParamTypeAlias: () => scriptParamTypeAlias,
|
|
68649
69073
|
schemaFileUploadMatchesField: () => schemaFileUploadMatchesField,
|
|
68650
69074
|
s3PathFilename: () => s3PathFilename,
|
|
@@ -68658,6 +69082,7 @@ __export(exports_src, {
|
|
|
68658
69082
|
runExpandErrorMessage: () => runExpandErrorMessage,
|
|
68659
69083
|
rootS3Path: () => rootS3Path,
|
|
68660
69084
|
resolveWorkflowPassThreshold: () => resolveWorkflowPassThreshold,
|
|
69085
|
+
resolveRetryPolicy: () => resolveRetryPolicy,
|
|
68661
69086
|
resolveEffectiveMimeType: () => resolveEffectiveMimeType,
|
|
68662
69087
|
resolveAgentOriginalSourceRef: () => resolveAgentOriginalSourceRef,
|
|
68663
69088
|
requiresSpecializedParser: () => requiresSpecializedParser,
|
|
@@ -68713,9 +69138,11 @@ __export(exports_src, {
|
|
|
68713
69138
|
hasTriggerMethod: () => hasTriggerMethod,
|
|
68714
69139
|
hasDeclaredOutput: () => hasDeclaredOutput,
|
|
68715
69140
|
goldenFileSatisfiedInResult: () => goldenFileSatisfiedInResult,
|
|
69141
|
+
getWebhookDestinationUrlError: () => getWebhookDestinationUrlError,
|
|
68716
69142
|
getTriggerMethods: () => getTriggerMethods,
|
|
68717
69143
|
getSupportedFormatsLabel: () => getSupportedFormatsLabel,
|
|
68718
69144
|
getStepSchema: () => getStepSchema,
|
|
69145
|
+
getStepRetryCapability: () => getStepRetryCapability,
|
|
68719
69146
|
getStepOutputSchema: () => getStepOutputSchema,
|
|
68720
69147
|
getStepConfigSchema: () => getStepConfigSchema,
|
|
68721
69148
|
getRequiredOutputKeys: () => getRequiredOutputKeys,
|
|
@@ -68769,6 +69196,7 @@ __export(exports_src, {
|
|
|
68769
69196
|
buildS3Path: () => buildS3Path,
|
|
68770
69197
|
buildDiscreteJudgeSystemPrompt: () => buildDiscreteJudgeSystemPrompt,
|
|
68771
69198
|
buildContinuousJudgeSystemPrompt: () => buildContinuousJudgeSystemPrompt,
|
|
69199
|
+
boundWebhookEventOutput: () => boundWebhookEventOutput,
|
|
68772
69200
|
assertS3PathSegment: () => assertS3PathSegment,
|
|
68773
69201
|
aliasReplyConfigSchema: () => aliasReplyConfigSchema,
|
|
68774
69202
|
aggregateEvaluatorCompositionScore: () => aggregateEvaluatorCompositionScore,
|
|
@@ -68780,6 +69208,7 @@ __export(exports_src, {
|
|
|
68780
69208
|
WorkspaceDependencySchema: () => WorkspaceDependencySchema,
|
|
68781
69209
|
WorkspaceDependencyNameSchema: () => WorkspaceDependencyNameSchema,
|
|
68782
69210
|
WorkflowSettingsSchema: () => WorkflowSettingsSchema,
|
|
69211
|
+
WorkflowRetryPolicySchema: () => WorkflowRetryPolicySchema,
|
|
68783
69212
|
WorkflowResultSchema: () => WorkflowResultSchema,
|
|
68784
69213
|
WorkflowPackageManifestSchema: () => WorkflowPackageManifestSchema,
|
|
68785
69214
|
WorkflowNameSchema: () => WorkflowNameSchema,
|
|
@@ -68790,11 +69219,31 @@ __export(exports_src, {
|
|
|
68790
69219
|
WorkflowExecutionStatusSchema: () => WorkflowExecutionStatusSchema,
|
|
68791
69220
|
WorkflowExecutionSchema: () => WorkflowExecutionSchema,
|
|
68792
69221
|
WorkflowDefinitionSchema: () => WorkflowDefinitionSchema,
|
|
69222
|
+
WebhookEventTypeSchema: () => WebhookEventTypeSchema,
|
|
69223
|
+
WebhookEventIdSchema: () => WebhookEventIdSchema,
|
|
69224
|
+
WebhookEventEnvelopeSchema: () => WebhookEventEnvelopeSchema,
|
|
69225
|
+
WebhookEndpointSchema: () => WebhookEndpointSchema,
|
|
69226
|
+
WebhookEndpointIdSchema: () => WebhookEndpointIdSchema,
|
|
69227
|
+
WebhookDeliveryStateSchema: () => WebhookDeliveryStateSchema,
|
|
69228
|
+
WebhookDeliverySchema: () => WebhookDeliverySchema,
|
|
69229
|
+
WebhookDeliveryIdSchema: () => WebhookDeliveryIdSchema,
|
|
69230
|
+
WebhookDeliveryAttemptSchema: () => WebhookDeliveryAttemptSchema,
|
|
69231
|
+
WebhookCustomHeaderSchema: () => WebhookCustomHeaderSchema,
|
|
69232
|
+
WebhookAttemptIdSchema: () => WebhookAttemptIdSchema,
|
|
68793
69233
|
WaitStepSchema: () => WaitStepSchema,
|
|
68794
69234
|
WORKFLOW_TOOL_METADATA: () => WORKFLOW_TOOL_METADATA,
|
|
68795
69235
|
WORKFLOW_NAME_PATTERN: () => WORKFLOW_NAME_PATTERN,
|
|
68796
69236
|
WORKFLOW_FILE_REF_JSON_SCHEMA: () => WORKFLOW_FILE_REF_JSON_SCHEMA,
|
|
68797
69237
|
WORKFLOW_EXECUTION_STATUSES: () => WORKFLOW_EXECUTION_STATUSES,
|
|
69238
|
+
WEBHOOK_RESERVED_HEADERS: () => WEBHOOK_RESERVED_HEADERS,
|
|
69239
|
+
WEBHOOK_NOTIFY_CHANNEL: () => WEBHOOK_NOTIFY_CHANNEL,
|
|
69240
|
+
WEBHOOK_MAX_PAYLOAD_BYTES: () => WEBHOOK_MAX_PAYLOAD_BYTES,
|
|
69241
|
+
WEBHOOK_MAX_HEADER_BYTES: () => WEBHOOK_MAX_HEADER_BYTES,
|
|
69242
|
+
WEBHOOK_MAX_HEADERS: () => WEBHOOK_MAX_HEADERS,
|
|
69243
|
+
WEBHOOK_EVENT_TYPES: () => WEBHOOK_EVENT_TYPES,
|
|
69244
|
+
WEBHOOK_DELIVERY_STATES: () => WEBHOOK_DELIVERY_STATES,
|
|
69245
|
+
WEBHOOK_API_VERSION: () => WEBHOOK_API_VERSION,
|
|
69246
|
+
UpdateWebhookEndpointSchema: () => UpdateWebhookEndpointSchema,
|
|
68798
69247
|
UNSUPPORTED_SOURCE_MANIFEST_FILENAME: () => UNSUPPORTED_SOURCE_MANIFEST_FILENAME,
|
|
68799
69248
|
TriggerTypeValue: () => TriggerTypeValue,
|
|
68800
69249
|
TriggerTypeSchema: () => TriggerTypeSchema,
|
|
@@ -68833,11 +69282,14 @@ __export(exports_src, {
|
|
|
68833
69282
|
StepTypeValue: () => StepTypeValue,
|
|
68834
69283
|
StepTypeSchema: () => StepTypeSchema,
|
|
68835
69284
|
StepSchema: () => StepSchema,
|
|
69285
|
+
StepRetryPolicySchema: () => StepRetryPolicySchema,
|
|
69286
|
+
StepRetryCapabilitySchema: () => StepRetryCapabilitySchema,
|
|
68836
69287
|
StepResultSchema: () => StepResultSchema,
|
|
68837
69288
|
StepInputReferenceSchema: () => StepInputReferenceSchema,
|
|
68838
69289
|
StepExecutionStatusValue: () => StepExecutionStatusValue,
|
|
68839
69290
|
StepExecutionStatusSchema: () => StepExecutionStatusSchema,
|
|
68840
69291
|
StepExecutionSchema: () => StepExecutionSchema,
|
|
69292
|
+
StepExecutionAttemptSchema: () => StepExecutionAttemptSchema,
|
|
68841
69293
|
SplitOutputSchema: () => SplitOutputSchema,
|
|
68842
69294
|
SplitInputSchema: () => SplitInputSchema,
|
|
68843
69295
|
SplitConfigSchema: () => SplitConfigSchema,
|
|
@@ -68867,6 +69319,7 @@ __export(exports_src, {
|
|
|
68867
69319
|
ScopeEntrySchema: () => ScopeEntrySchema,
|
|
68868
69320
|
STEP_TYPES: () => STEP_TYPES,
|
|
68869
69321
|
STEP_SCHEMAS: () => STEP_SCHEMAS,
|
|
69322
|
+
STEP_RETRY_CAPABILITIES: () => STEP_RETRY_CAPABILITIES,
|
|
68870
69323
|
STEP_EXECUTION_STATUSES: () => STEP_EXECUTION_STATUSES,
|
|
68871
69324
|
SOURCE_VERSION_RANGE_PATTERN: () => SOURCE_VERSION_RANGE_PATTERN,
|
|
68872
69325
|
SOURCE_SEMVER_PATTERN: () => SOURCE_SEMVER_PATTERN,
|
|
@@ -68883,14 +69336,23 @@ __export(exports_src, {
|
|
|
68883
69336
|
RunTargetStringSchema: () => RunTargetStringSchema,
|
|
68884
69337
|
RunTargetSchema: () => RunTargetSchema,
|
|
68885
69338
|
RunTargetObjectSchema: () => RunTargetObjectSchema,
|
|
69339
|
+
RunStatusChangedWebhookEventSchema: () => RunStatusChangedWebhookEventSchema,
|
|
69340
|
+
RunCreatedWebhookEventSchema: () => RunCreatedWebhookEventSchema,
|
|
68886
69341
|
RootSourceManifestSchema: () => RootSourceManifestSchema,
|
|
69342
|
+
RetryTerminalReasonSchema: () => RetryTerminalReasonSchema,
|
|
69343
|
+
RetryPolicySourceSchema: () => RetryPolicySourceSchema,
|
|
69344
|
+
RetryDecisionSchema: () => RetryDecisionSchema,
|
|
69345
|
+
RetryCategorySchema: () => RetryCategorySchema,
|
|
69346
|
+
ResolvedRetryPolicySchema: () => ResolvedRetryPolicySchema,
|
|
68887
69347
|
ResolvedProcessorFileSchema: () => ResolvedProcessorFileSchema,
|
|
68888
69348
|
ReleaseTagSchema: () => ReleaseTagSchema,
|
|
69349
|
+
RedactedWebhookCustomHeaderSchema: () => RedactedWebhookCustomHeaderSchema,
|
|
68889
69350
|
RUN_TARGET_SEGMENT_PATTERN: () => RUN_TARGET_SEGMENT_PATTERN,
|
|
68890
69351
|
RUN_EXPAND_SECTIONS: () => RUN_EXPAND_SECTIONS,
|
|
68891
69352
|
RUN_DETAIL_EXPAND_PRESET: () => RUN_DETAIL_EXPAND_PRESET,
|
|
68892
69353
|
RUNS_TRIGGERED_BY_SYSTEM: () => RUNS_TRIGGERED_BY_SYSTEM,
|
|
68893
69354
|
RERUN_ORIGINAL_VERSION: () => RERUN_ORIGINAL_VERSION,
|
|
69355
|
+
PublicWebhookRunSchema: () => PublicWebhookRunSchema,
|
|
68894
69356
|
ProcessorPortSchema: () => ProcessorPortSchema,
|
|
68895
69357
|
ProcessorExecutionContextSchema: () => ProcessorExecutionContextSchema,
|
|
68896
69358
|
ProcessorDefinitionSchema: () => ProcessorDefinitionSchema,
|
|
@@ -68967,6 +69429,7 @@ __export(exports_src, {
|
|
|
68967
69429
|
ExpectedDocumentRefSchema: () => ExpectedDocumentRefSchema,
|
|
68968
69430
|
ExecutionTypeValue: () => ExecutionTypeValue,
|
|
68969
69431
|
ExecutionTypeSchema: () => ExecutionTypeSchema,
|
|
69432
|
+
ExecutionFailureSchema: () => ExecutionFailureSchema,
|
|
68970
69433
|
ExecutionContextSchema: () => ExecutionContextSchema,
|
|
68971
69434
|
ExactDiffConfigSchema: () => ExactDiffConfigSchema,
|
|
68972
69435
|
EvaluatorsImportRequestSchema: () => EvaluatorsImportRequestSchema,
|
|
@@ -69022,6 +69485,8 @@ __export(exports_src, {
|
|
|
69022
69485
|
DATASET_NAME_PATTERN: () => DATASET_NAME_PATTERN,
|
|
69023
69486
|
CustomScriptConfigSchema: () => CustomScriptConfigSchema,
|
|
69024
69487
|
CreateWorkflowDefinitionSchema: () => CreateWorkflowDefinitionSchema,
|
|
69488
|
+
CreateWebhookEndpointSchema: () => CreateWebhookEndpointSchema,
|
|
69489
|
+
CreateWebhookEndpointResponseSchema: () => CreateWebhookEndpointResponseSchema,
|
|
69025
69490
|
CoordinateUnitSchema: () => CoordinateUnitSchema,
|
|
69026
69491
|
ControlWaitOutputSchema: () => ControlWaitOutputSchema,
|
|
69027
69492
|
ControlWaitConfigSchema: () => ControlWaitConfigSchema,
|
|
@@ -69083,6 +69548,7 @@ var init_src = __esm(() => {
|
|
|
69083
69548
|
init_eval();
|
|
69084
69549
|
init_git_source();
|
|
69085
69550
|
init_triggers();
|
|
69551
|
+
init_webhooks();
|
|
69086
69552
|
init_typed_script();
|
|
69087
69553
|
});
|
|
69088
69554
|
|
|
@@ -183799,7 +184265,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
|
|
|
183799
184265
|
// package.json
|
|
183800
184266
|
var package_default = {
|
|
183801
184267
|
name: "@eigenpal/cli",
|
|
183802
|
-
version: "0.10.
|
|
184268
|
+
version: "0.10.21",
|
|
183803
184269
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
183804
184270
|
keywords: [
|
|
183805
184271
|
"eigenpal",
|
|
@@ -358,6 +358,8 @@ _Generated from `STEP_SCHEMAS` in `@eigenpal/types/src/workflow/step-configs.ts`
|
|
|
358
358
|
|
|
359
359
|
Extract text from documents (PDF, DOCX, images) using OCR or vision models
|
|
360
360
|
|
|
361
|
+
**Durable retry:** Provider request retries are separate; the workflow engine does not durably retry this step.
|
|
362
|
+
|
|
361
363
|
**Config** (in `step.with`):
|
|
362
364
|
|
|
363
365
|
| Field | Type | Required | Default | Description |
|
|
@@ -386,6 +388,8 @@ Extract text from documents (PDF, DOCX, images) using OCR or vision models
|
|
|
386
388
|
|
|
387
389
|
Extract structured data from text using AI with a JSON schema
|
|
388
390
|
|
|
391
|
+
**Durable retry:** Provider request retries are separate; the workflow engine does not durably retry this step.
|
|
392
|
+
|
|
389
393
|
**Config** (in `step.with`):
|
|
390
394
|
|
|
391
395
|
| Field | Type | Required | Default | Description |
|
|
@@ -409,6 +413,8 @@ Extract structured data from text using AI with a JSON schema
|
|
|
409
413
|
|
|
410
414
|
Split a parsed document into named sections using an LLM. Consumes ai.parse output; emits per-section page ranges and text ready for downstream ai.extract via control.parallel_map.
|
|
411
415
|
|
|
416
|
+
**Durable retry:** Provider request retries are separate; the workflow engine does not durably retry this step.
|
|
417
|
+
|
|
412
418
|
**Config** (in `step.with`):
|
|
413
419
|
|
|
414
420
|
| Field | Type | Required | Default | Description |
|
|
@@ -429,6 +435,8 @@ Split a parsed document into named sections using an LLM. Consumes ai.parse outp
|
|
|
429
435
|
|
|
430
436
|
Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.
|
|
431
437
|
|
|
438
|
+
**Durable retry:** Provider request retries are separate; the workflow engine does not durably retry this step.
|
|
439
|
+
|
|
432
440
|
**Config** (in `step.with`):
|
|
433
441
|
|
|
434
442
|
| Field | Type | Required | Default | Description |
|
|
@@ -450,6 +458,8 @@ Separate a concatenated batch (one big scan) into typed document instances using
|
|
|
450
458
|
|
|
451
459
|
Classify a document or text into one of a fixed label set using an LLM. Output exposes the picked label (constrained to the configured names), a coarse confidence, and a short justification. Pair with control.fail to reject documents that match an undesired label.
|
|
452
460
|
|
|
461
|
+
**Durable retry:** Provider request retries are separate; the workflow engine does not durably retry this step.
|
|
462
|
+
|
|
453
463
|
**Config** (in `step.with`):
|
|
454
464
|
|
|
455
465
|
| Field | Type | Required | Default | Description |
|
|
@@ -475,6 +485,8 @@ Classify a document or text into one of a fixed label set using an LLM. Output e
|
|
|
475
485
|
|
|
476
486
|
Set key-value pairs in the output object
|
|
477
487
|
|
|
488
|
+
**Durable retry:** Transforms, including those that write files, are not durably retried.
|
|
489
|
+
|
|
478
490
|
**Config** (in `step.with`):
|
|
479
491
|
|
|
480
492
|
| Field | Type | Required | Default | Description |
|
|
@@ -490,6 +502,8 @@ Set key-value pairs in the output object
|
|
|
490
502
|
|
|
491
503
|
Remove specified fields from an object
|
|
492
504
|
|
|
505
|
+
**Durable retry:** Transforms, including those that write files, are not durably retried.
|
|
506
|
+
|
|
493
507
|
**Config** (in `step.with`):
|
|
494
508
|
|
|
495
509
|
| Field | Type | Required | Default | Description |
|
|
@@ -505,6 +519,8 @@ Remove specified fields from an object
|
|
|
505
519
|
|
|
506
520
|
Merge multiple objects or concatenate arrays
|
|
507
521
|
|
|
522
|
+
**Durable retry:** Transforms, including those that write files, are not durably retried.
|
|
523
|
+
|
|
508
524
|
**Config** (in `step.with`):
|
|
509
525
|
|
|
510
526
|
| Field | Type | Required | Default | Description |
|
|
@@ -521,6 +537,8 @@ Merge multiple objects or concatenate arrays
|
|
|
521
537
|
|
|
522
538
|
Split a string by delimiter or extract keys from an object
|
|
523
539
|
|
|
540
|
+
**Durable retry:** Transforms, including those that write files, are not durably retried.
|
|
541
|
+
|
|
524
542
|
**Config** (in `step.with`):
|
|
525
543
|
|
|
526
544
|
| Field | Type | Required | Default | Description |
|
|
@@ -540,6 +558,8 @@ Split a string by delimiter or extract keys from an object
|
|
|
540
558
|
|
|
541
559
|
Merge multiple named inputs into a single output
|
|
542
560
|
|
|
561
|
+
**Durable retry:** Transforms, including those that write files, are not durably retried.
|
|
562
|
+
|
|
543
563
|
**Config** (in `step.with`):
|
|
544
564
|
|
|
545
565
|
| Field | Type | Required | Default | Description |
|
|
@@ -559,6 +579,8 @@ Merge multiple named inputs into a single output
|
|
|
559
579
|
|
|
560
580
|
Fill a DOCX template with data from previous steps. Select a template in the workflow builder or provide a template ID from your workspace.
|
|
561
581
|
|
|
582
|
+
**Durable retry:** Transforms, including those that write files, are not durably retried.
|
|
583
|
+
|
|
562
584
|
**Config** (in `step.with`):
|
|
563
585
|
|
|
564
586
|
| Field | Type | Required | Default | Description |
|
|
@@ -579,6 +601,8 @@ Fill a DOCX template with data from previous steps. Select a template in the wor
|
|
|
579
601
|
|
|
580
602
|
Embed OCR text layer into scanned PDFs/images to make them searchable
|
|
581
603
|
|
|
604
|
+
**Durable retry:** Transforms, including those that write files, are not durably retried.
|
|
605
|
+
|
|
582
606
|
**Config** (in `step.with`):
|
|
583
607
|
|
|
584
608
|
| Field | Type | Required | Default | Description |
|
|
@@ -601,6 +625,8 @@ Embed OCR text layer into scanned PDFs/images to make them searchable
|
|
|
601
625
|
|
|
602
626
|
Convert XLSX spreadsheet to JSON array of row objects for use in scripts or downstream steps
|
|
603
627
|
|
|
628
|
+
**Durable retry:** Transforms, including those that write files, are not durably retried.
|
|
629
|
+
|
|
604
630
|
**Config** (in `step.with`):
|
|
605
631
|
|
|
606
632
|
| Field | Type | Required | Default | Description |
|
|
@@ -621,6 +647,8 @@ Convert XLSX spreadsheet to JSON array of row objects for use in scripts or down
|
|
|
621
647
|
|
|
622
648
|
Execute a TypeScript function in a QuickJS sandbox. Input keys become the function's parameter list, in declaration order, and the required `: R` return-type annotation IS this step's output schema: `inputs: { items, taxRate }` ⇒ `function script(items: …, taxRate: …): R { … }`.
|
|
623
649
|
|
|
650
|
+
**Durable retry:** Transforms, including those that write files, are not durably retried.
|
|
651
|
+
|
|
624
652
|
**Config** (in `step.with`):
|
|
625
653
|
|
|
626
654
|
| Field | Type | Required | Default | Description |
|
|
@@ -638,6 +666,8 @@ Execute a TypeScript function in a QuickJS sandbox. Input keys become the functi
|
|
|
638
666
|
|
|
639
667
|
Split long text into chunks with regex-anchored boundaries, overlap, and header preservation. Accepts raw text or a parsed-document object; chunks carry source page indexes when pages are provided.
|
|
640
668
|
|
|
669
|
+
**Durable retry:** Transforms, including those that write files, are not durably retried.
|
|
670
|
+
|
|
641
671
|
**Config** (in `step.with`):
|
|
642
672
|
|
|
643
673
|
| Field | Type | Required | Default | Description |
|
|
@@ -661,6 +691,8 @@ Split long text into chunks with regex-anchored boundaries, overlap, and header
|
|
|
661
691
|
|
|
662
692
|
Pull named fields from text via regex patterns (deterministic counterpart to ai.extract). Accepts raw text or a parsed-document object; matches carry `_evidence.pageIndex` when pages are provided.
|
|
663
693
|
|
|
694
|
+
**Durable retry:** Transforms, including those that write files, are not durably retried.
|
|
695
|
+
|
|
664
696
|
**Config** (in `step.with`):
|
|
665
697
|
|
|
666
698
|
| Field | Type | Required | Default | Description |
|
|
@@ -680,12 +712,14 @@ Pull named fields from text via regex patterns (deterministic counterpart to ai.
|
|
|
680
712
|
|
|
681
713
|
Make an HTTP request to an external API
|
|
682
714
|
|
|
715
|
+
**Durable retry:** HTTP `GET` and `HEAD` can durably retry transient timeout, rate limits, selected retryable server failures failures. Other methods are not replayed.
|
|
716
|
+
|
|
683
717
|
**Config** (in `step.with`):
|
|
684
718
|
|
|
685
719
|
| Field | Type | Required | Default | Description |
|
|
686
720
|
| --- | --- | --- | --- | --- |
|
|
687
721
|
| `url` | string | yes | | Request URL (supports template expressions) |
|
|
688
|
-
| `method` | `"GET"` \| `"POST"` \| `"PUT"` \| `"PATCH"` \| `"DELETE"` | no | `"GET"` | |
|
|
722
|
+
| `method` | `"GET"` \| `"HEAD"` \| `"POST"` \| `"PUT"` \| `"PATCH"` \| `"DELETE"` | no | `"GET"` | |
|
|
689
723
|
| `headers` | record<string, string> | no | | HTTP headers |
|
|
690
724
|
| `body` | unknown | no | | Request body (JSON or string) |
|
|
691
725
|
| `timeout` | number | no | `30000` | Timeout in milliseconds |
|
|
@@ -705,6 +739,8 @@ Make an HTTP request to an external API
|
|
|
705
739
|
|
|
706
740
|
Execute another workflow and return its output
|
|
707
741
|
|
|
742
|
+
**Durable retry:** Invoked workflows are not replayed as durable leaf attempts.
|
|
743
|
+
|
|
708
744
|
**Config** (in `step.with`):
|
|
709
745
|
|
|
710
746
|
| Field | Type | Required | Default | Description |
|
|
@@ -725,6 +761,8 @@ Execute another workflow and return its output
|
|
|
725
761
|
|
|
726
762
|
Fetch a webpage and convert content to markdown
|
|
727
763
|
|
|
764
|
+
**Durable retry:** Supported for transient timeout, rate limits, selected retryable server failures failures.
|
|
765
|
+
|
|
728
766
|
**Config** (in `step.with`):
|
|
729
767
|
|
|
730
768
|
| Field | Type | Required | Default | Description |
|
|
@@ -751,6 +789,8 @@ Fetch a webpage and convert content to markdown
|
|
|
751
789
|
|
|
752
790
|
Branch execution based on a condition expression
|
|
753
791
|
|
|
792
|
+
**Durable retry:** The control container itself is not retried, but eligible leaves inside its sequential scope may retry durably.
|
|
793
|
+
|
|
754
794
|
**Config** (at step level):
|
|
755
795
|
|
|
756
796
|
| Field | Type | Required | Default | Description |
|
|
@@ -769,6 +809,8 @@ Branch execution based on a condition expression
|
|
|
769
809
|
|
|
770
810
|
Multi-way routing: resolve an expression and run the first case whose value matches (else default). Cleaner than a nested control.if chain for routing an item to one of N pipelines by a discriminator field like a document type.
|
|
771
811
|
|
|
812
|
+
**Durable retry:** The control container itself is not retried, but eligible leaves inside its sequential scope may retry durably.
|
|
813
|
+
|
|
772
814
|
**Config** (at step level):
|
|
773
815
|
|
|
774
816
|
| Field | Type | Required | Default | Description |
|
|
@@ -788,6 +830,8 @@ Multi-way routing: resolve an expression and run the first case whose value matc
|
|
|
788
830
|
|
|
789
831
|
Loop over an array and execute steps for each item
|
|
790
832
|
|
|
833
|
+
**Durable retry:** The control container itself is not retried, but eligible leaves inside its sequential scope may retry durably.
|
|
834
|
+
|
|
791
835
|
**Config** (at step level):
|
|
792
836
|
|
|
793
837
|
| Field | Type | Required | Default | Description |
|
|
@@ -808,6 +852,8 @@ Loop over an array and execute steps for each item
|
|
|
808
852
|
|
|
809
853
|
Iterate over an array with concurrent execution up to a limit
|
|
810
854
|
|
|
855
|
+
**Durable retry:** The control container and leaves inside its concurrent branches do not retry durably.
|
|
856
|
+
|
|
811
857
|
**Config** (at step level):
|
|
812
858
|
|
|
813
859
|
| Field | Type | Required | Default | Description |
|
|
@@ -829,6 +875,8 @@ Iterate over an array with concurrent execution up to a limit
|
|
|
829
875
|
|
|
830
876
|
Execute multiple branches concurrently
|
|
831
877
|
|
|
878
|
+
**Durable retry:** The control container and leaves inside its concurrent branches do not retry durably.
|
|
879
|
+
|
|
832
880
|
**Config** (at step level):
|
|
833
881
|
|
|
834
882
|
_No fields._
|
|
@@ -841,6 +889,8 @@ _No fields._
|
|
|
841
889
|
|
|
842
890
|
Pause workflow execution for a specified duration
|
|
843
891
|
|
|
892
|
+
**Durable retry:** This control step is not retried durably.
|
|
893
|
+
|
|
844
894
|
**Config** (at step level):
|
|
845
895
|
|
|
846
896
|
| Field | Type | Required | Default | Description |
|
|
@@ -857,6 +907,8 @@ Pause workflow execution for a specified duration
|
|
|
857
907
|
|
|
858
908
|
Terminate the workflow with a typed status code + message. With an optional condition, only fails when the condition is truthy; otherwise always fails when reached. Pair with ai.classify or any prior step to fail fast on bad inputs.
|
|
859
909
|
|
|
910
|
+
**Durable retry:** This control step is not retried durably.
|
|
911
|
+
|
|
860
912
|
**Config** (at step level):
|
|
861
913
|
|
|
862
914
|
| Field | Type | Required | Default | Description |
|
|
@@ -127,6 +127,44 @@ Step references resolve via Liquid template expressions:
|
|
|
127
127
|
`steps[].name` is the only handle into the step from later steps. Use
|
|
128
128
|
short, descriptive names (`parse`, `extract`, `score`).
|
|
129
129
|
|
|
130
|
+
<!-- GENERATED:RETRY_REFERENCE START -->
|
|
131
|
+
## Durable retry policies
|
|
132
|
+
|
|
133
|
+
_Policy syntax is generated from `WorkflowRetryPolicySchema` and `StepRetryPolicySchema`; step capability notes are generated from `STEP_RETRY_CAPABILITIES` in `@eigenpal/types`._
|
|
134
|
+
|
|
135
|
+
- Workflow policy values: `automatic`, `never` or an object with `mode` and `maxAttempts`.
|
|
136
|
+
- Step policy values: `inherit`, `automatic`, `never`. `automatic` supports object form with `mode` and `maxAttempts`; `never` supports `{ mode: 'never' }`; `inherit` is string-only.
|
|
137
|
+
- The schema accepts `maxAttempts` from 1 through 10. Studio offers 2-3 total attempts, and the current worker ceiling is 3.
|
|
138
|
+
- `maxAttempts` includes the first attempt. If no policy is set, durable retries are off.
|
|
139
|
+
|
|
140
|
+
```yaml
|
|
141
|
+
settings:
|
|
142
|
+
retry:
|
|
143
|
+
mode: automatic
|
|
144
|
+
maxAttempts: 3
|
|
145
|
+
|
|
146
|
+
steps:
|
|
147
|
+
- name: fetch-catalog
|
|
148
|
+
type: action.http
|
|
149
|
+
retry: inherit
|
|
150
|
+
with:
|
|
151
|
+
method: GET
|
|
152
|
+
url: 'https://api.example.com/catalog'
|
|
153
|
+
|
|
154
|
+
- name: read-product-page
|
|
155
|
+
type: action.website-reader
|
|
156
|
+
retry: never
|
|
157
|
+
with:
|
|
158
|
+
url: '{{ input.url }}'
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
`automatic` retries transient timeouts, rate limits, and selected retryable server failures. Delays use bounded exponential backoff, honor `Retry-After`, and stop after a five-minute elapsed budget.
|
|
162
|
+
|
|
163
|
+
Durable leaf retries are supported for Website Reader and HTTP `GET`/`HEAD`. Unsafe HTTP methods, Invoke Workflow, AI steps (which may have separate provider request retries), and transforms or file outputs are not durably replayed. Control containers are not attempts themselves; eligible leaves inside sequential If, Switch, and For Each scopes may retry, while concurrent Parallel and Parallel Map branches do not. See each generated step entry for its capability.
|
|
164
|
+
|
|
165
|
+
Legacy whole-run retry counts are accepted for compatibility but no longer restart failed runs. Move retry intent to the workflow retry default or an eligible step.
|
|
166
|
+
<!-- GENERATED:RETRY_REFERENCE END -->
|
|
167
|
+
|
|
130
168
|
### `output`
|
|
131
169
|
|
|
132
170
|
```yaml
|