@sensigo/realm 0.28.0 → 0.30.0
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/engine/eligibility.d.ts +50 -0
- package/dist/engine/eligibility.d.ts.map +1 -1
- package/dist/engine/eligibility.js +72 -0
- package/dist/engine/eligibility.js.map +1 -1
- package/dist/engine/execution-loop.d.ts +10 -0
- package/dist/engine/execution-loop.d.ts.map +1 -1
- package/dist/engine/execution-loop.js +595 -228
- package/dist/engine/execution-loop.js.map +1 -1
- package/dist/engine/reclaim-step.d.ts +19 -2
- package/dist/engine/reclaim-step.d.ts.map +1 -1
- package/dist/engine/reclaim-step.js +41 -4
- package/dist/engine/reclaim-step.js.map +1 -1
- package/dist/engine/run-health.d.ts +49 -0
- package/dist/engine/run-health.d.ts.map +1 -0
- package/dist/engine/run-health.js +68 -0
- package/dist/engine/run-health.js.map +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/observability/failed-attempt-record.d.ts +12 -0
- package/dist/observability/failed-attempt-record.d.ts.map +1 -1
- package/dist/observability/failed-attempt-record.js +24 -4
- package/dist/observability/failed-attempt-record.js.map +1 -1
- package/dist/store/json-file-store.d.ts.map +1 -1
- package/dist/store/json-file-store.js +2 -0
- package/dist/store/json-file-store.js.map +1 -1
- package/dist/store/store-interface.d.ts +21 -6
- package/dist/store/store-interface.d.ts.map +1 -1
- package/dist/types/response-envelope.d.ts +20 -0
- package/dist/types/response-envelope.d.ts.map +1 -1
- package/dist/types/run-record.d.ts +42 -0
- package/dist/types/run-record.d.ts.map +1 -1
- package/dist/types/workflow-definition.d.ts +29 -1
- package/dist/types/workflow-definition.d.ts.map +1 -1
- package/dist/types/workflow-definition.js +1 -0
- package/dist/types/workflow-definition.js.map +1 -1
- package/dist/types/workflow-error.d.ts +1 -1
- package/dist/types/workflow-error.d.ts.map +1 -1
- package/dist/types/workflow-error.js.map +1 -1
- package/dist/workflow/diagnostics.d.ts +15 -13
- package/dist/workflow/diagnostics.d.ts.map +1 -1
- package/dist/workflow/diagnostics.js +13 -7
- package/dist/workflow/diagnostics.js.map +1 -1
- package/dist/workflow/yaml-loader.d.ts.map +1 -1
- package/dist/workflow/yaml-loader.js +203 -10
- package/dist/workflow/yaml-loader.js.map +1 -1
- package/package.json +1 -1
|
@@ -256,6 +256,34 @@ export interface StepDefinition {
|
|
|
256
256
|
trust?: TrustLevel;
|
|
257
257
|
timeout_seconds?: number;
|
|
258
258
|
retry?: RetryConfig;
|
|
259
|
+
/**
|
|
260
|
+
* Issue #220 (PR-1 counting/terminalization + PR-2 declared fail-open): bounds the run of
|
|
261
|
+
* persistent schema-rejections on this step. Only valid on `execution: 'agent'` steps (the
|
|
262
|
+
* countable set — VALIDATION_INPUT_SCHEMA/VALIDATION_OUTPUT_SCHEMA — is agent-only).
|
|
263
|
+
* `threshold` overrides `DEFAULT_VALIDATION_EXHAUSTION_THRESHOLD` (6) for THIS step; must be a
|
|
264
|
+
* positive integer (`1` is legal and documented as disabling in-drive schema-repair, since the
|
|
265
|
+
* very first rejection then already meets the threshold). Absent ⇒ every countable agent step
|
|
266
|
+
* is auto-enrolled at the default threshold — there is no reachable per-step opt-out.
|
|
267
|
+
*
|
|
268
|
+
* `mode` (PR-2): `'fail'` (default when absent) terminalizes the step with `VALIDATION_EXHAUSTED`
|
|
269
|
+
* on exhaustion, byte-unchanged from PR-1. `'default'` instead SETTLES the step successfully with
|
|
270
|
+
* `default_output` once the threshold is reached — bounded, declared, and disclosed (never a
|
|
271
|
+
* silent fallback): the run proceeds as if the agent had submitted `default_output` itself.
|
|
272
|
+
*
|
|
273
|
+
* `default_output` (PR-2): REQUIRED when `mode: 'default'`; ignored (and warned as dead config)
|
|
274
|
+
* otherwise. Only legal when the step also declares `output_schema` (an undeclared schema makes
|
|
275
|
+
* the substitute unvalidatable — refused at load) — `default_output` is then AJV-validated
|
|
276
|
+
* against that `output_schema` AT LOAD TIME, so a fallback that would itself fail runtime
|
|
277
|
+
* validation is refused before the workflow ever registers. Typed `unknown` here; every runtime
|
|
278
|
+
* sink narrows it via `default_output as Record<string, unknown>` — provably safe because the
|
|
279
|
+
* load-time proof already rejected any value that doesn't validate against the (object-typed)
|
|
280
|
+
* `output_schema`.
|
|
281
|
+
*/
|
|
282
|
+
validation_exhaustion?: {
|
|
283
|
+
threshold?: number;
|
|
284
|
+
mode?: 'fail' | 'default';
|
|
285
|
+
default_output?: unknown;
|
|
286
|
+
};
|
|
259
287
|
/** Plain-English instructions for the agent at this step. */
|
|
260
288
|
instructions?: string;
|
|
261
289
|
/**
|
|
@@ -341,7 +369,7 @@ export interface StepDefinition {
|
|
|
341
369
|
* `allowed_from_states`/`produces_state` scalar state-machine fields) is otherwise silently
|
|
342
370
|
* dropped with no signal to the author.
|
|
343
371
|
*/
|
|
344
|
-
export declare const KNOWN_STEP_KEYS: readonly ["description", "execution", "depends_on", "trigger_rule", "when", "abort_unless", "abort_message", "on_outcome", "idempotent", "uses_service", "service_method", "operation", "input_map", "handler", "config", "input_schema", "output_schema", "trace_schema", "trace_validation_mode", "preconditions", "trust", "timeout_seconds", "retry", "instructions", "prompt", "display", "use_template", "gate", "agent_profile", "tools", "max_tool_calls", "max_fan_out", "tool_timeout"];
|
|
372
|
+
export declare const KNOWN_STEP_KEYS: readonly ["description", "execution", "depends_on", "trigger_rule", "when", "abort_unless", "abort_message", "on_outcome", "idempotent", "uses_service", "service_method", "operation", "input_map", "handler", "config", "input_schema", "output_schema", "trace_schema", "trace_validation_mode", "preconditions", "trust", "timeout_seconds", "retry", "validation_exhaustion", "instructions", "prompt", "display", "use_template", "gate", "agent_profile", "tools", "max_tool_calls", "max_fan_out", "tool_timeout"];
|
|
345
373
|
export interface WorkflowDefinition {
|
|
346
374
|
id: string;
|
|
347
375
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-definition.d.ts","sourceRoot":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ACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,IAAI,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB;;;;;WAKG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;;;;;;WAOG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB;;;;;;;;WAQG;QACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAC9C,CAAC;IACF,uFAAuF;IACvF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"workflow-definition.d.ts","sourceRoot":"","sources":["../../src/types/workflow-definition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAExE,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,MAAM,UAAU,GAAG,MAAM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;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,WAAW,CAAC;IAClB,+FAA+F;IAC/F,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,sCAAsC;IACtC,KAAK,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC;IAC5B,mGAAmG;IACnG,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-definition.js","sourceRoot":"","sources":["../../src/types/workflow-definition.ts"],"names":[],"mappings":"AAkHA;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,cAAc;IACd,SAAS;IACT,eAAe;IACf,cAAc;IACd,YAAY;IACZ,uBAAuB;CACf,CAAC;AAMX,MAAM,sBAAsB,GAE+C,IAAI,CAAC;AAChF,MAAM,oBAAoB,GAEyD,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-definition.js","sourceRoot":"","sources":["../../src/types/workflow-definition.ts"],"names":[],"mappings":"AAkHA;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,cAAc;IACd,SAAS;IACT,eAAe;IACf,cAAc;IACd,YAAY;IACZ,uBAAuB;CACf,CAAC;AAMX,MAAM,sBAAsB,GAE+C,IAAI,CAAC;AAChF,MAAM,oBAAoB,GAEyD,IAAI,CAAC;AAwQxF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,aAAa;IACb,WAAW;IACX,YAAY;IACZ,cAAc;IACd,MAAM;IACN,cAAc;IACd,eAAe;IACf,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,WAAW;IACX,SAAS;IACT,QAAQ;IACR,cAAc;IACd,eAAe;IACf,cAAc;IACd,uBAAuB;IACvB,eAAe;IACf,OAAO;IACP,iBAAiB;IACjB,OAAO;IACP,uBAAuB;IACvB,cAAc;IACd,QAAQ;IACR,SAAS;IACT,cAAc;IACd,MAAM;IACN,eAAe;IACf,OAAO;IACP,gBAAgB;IAChB,aAAa;IACb,cAAc;CACN,CAAC;AAQX,MAAM,qBAAqB,GAEiD,IAAI,CAAC;AACjF,MAAM,mBAAmB,GAE2D,IAAI,CAAC;AAoGzF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI;IACJ,MAAM;IACN,aAAa;IACb,SAAS;IACT,eAAe;IACf,UAAU;IACV,UAAU;IACV,aAAa;IACb,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;IACZ,kBAAkB;IAClB,iBAAiB;IACjB,SAAS;CACD,CAAC;AAEX;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,YAAY;IACZ,YAAY;IACZ,mBAAmB;IACnB,gBAAgB;IAChB,QAAQ;IACR,OAAO;IACP,OAAO;CACC,CAAC;AAYX,MAAM,yBAAyB,GAKvB,IAAI,CAAC;AACb,MAAM,uBAAuB,GAKrB,IAAI,CAAC;AACb,MAAM,yBAAyB,GAE4D,IAAI,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type ErrorCategory = 'NETWORK' | 'SERVICE' | 'STATE' | 'VALIDATION' | 'ENGINE' | 'RESOURCE';
|
|
2
2
|
export type AgentAction = 'report_to_user' | 'provide_input' | 'resolve_precondition' | 'stop' | 'wait_for_human' | 'wait_and_proceed';
|
|
3
|
-
export type ErrorCode = 'NETWORK_TIMEOUT' | 'NETWORK_UNREACHABLE' | 'NETWORK_DNS_FAILED' | 'NETWORK_CONNECTION_RESET' | 'SERVICE_HTTP_4XX' | 'SERVICE_HTTP_5XX' | 'SERVICE_RATE_LIMITED' | 'SERVICE_AUTH_FAILED' | 'SERVICE_NOT_FOUND' | 'SERVICE_RESPONSE_INVALID' | 'SERVICE_UNEXPECTED_REDIRECT' | 'STATE_BLOCKED' | 'STATE_PRECONDITION_FAILED' | 'STATE_RUN_NOT_FOUND' | 'STATE_WORKFLOW_NOT_FOUND' | 'STATE_RUN_TERMINAL' | 'STATE_SNAPSHOT_MISMATCH' | 'STATE_RUN_LOCKED' | 'STATE_RUN_BUSY' | 'STATE_TRANSITION_DENIED' | 'STATE_RUN_RESURRECTED' | 'STATE_LEGACY_FORMAT' | 'STATE_STEP_ALREADY_CLAIMED' | 'STATE_STEP_NOT_ELIGIBLE' | 'STATE_RUN_DIVERGED' | 'STATE_RUN_ALREADY_ACTIVE' | 'STATE_IDEMPOTENCY_KEY_USED' | 'RUN_ABORTING' | 'VALIDATION_INPUT_SCHEMA' | 'VALIDATION_OUTPUT_SCHEMA' | 'VALIDATION_TRACE_SCHEMA' | 'VALIDATION_WORKFLOW_SCHEMA' | 'VALIDATION_HASH_MISMATCH' | 'VALIDATION_QUOTE_NOT_FOUND' | 'VALIDATION_FIELD_UNKNOWN' | 'VALIDATION_FIELD_EXCLUDED' | 'VALIDATION_EMPTY_VALUE' | 'VALIDATION_BATCH_TOO_LARGE' | 'VALIDATION_BATCH_ITEMS' | 'STEP_HANDLER_ERROR' | 'ENGINE_INTERNAL' | 'ENGINE_STORE_FAILED' | 'ENGINE_ARTIFACT_DELETE_FAILED' | 'ENGINE_ADAPTER_FAILED' | 'ENGINE_ADAPTER_NOT_REGISTERED' | 'ENGINE_PROCESSOR_FAILED' | 'ENGINE_HANDLER_FAILED' | 'ENGINE_HANDLER_NOT_REGISTERED' | 'ENGINE_STEP_FAILED' | 'ENGINE_GATE_OPEN_FAILED' | 'GATE_MESSAGE_UNRESOLVABLE' | 'FILTER_UNKNOWN' | 'ADAPTER_OP_UNSUPPORTED' | 'ADAPTER_VALIDATION_FAILED' | 'ADAPTER_REQUEST_FAILED' | 'STEP_TIMEOUT' | 'STEP_ABORTED' | 'STEP_RETRY_EXHAUSTED' | 'STATE_STEP_PENDING' | 'STEP_NOT_FOUND' | 'GUARD_RESOLUTION_ERROR' | 'INPUT_MAP_DEPTH_EXCEEDED' | 'RESOURCE_FETCH_FAILED' | 'RESOURCE_TOO_LARGE' | 'RESOURCE_FORMAT_INVALID' | 'RESOURCE_NOT_ACCESSIBLE' | 'BUFFER_FULL' | 'TRACE_CAPABILITY_INCONSISTENT' | 'MCP_CONNECTION_FAILED' | 'MCP_TOOL_NOT_FOUND' | 'MCP_TOOL_NAME_COLLISION';
|
|
3
|
+
export type ErrorCode = 'NETWORK_TIMEOUT' | 'NETWORK_UNREACHABLE' | 'NETWORK_DNS_FAILED' | 'NETWORK_CONNECTION_RESET' | 'SERVICE_HTTP_4XX' | 'SERVICE_HTTP_5XX' | 'SERVICE_RATE_LIMITED' | 'SERVICE_AUTH_FAILED' | 'SERVICE_NOT_FOUND' | 'SERVICE_RESPONSE_INVALID' | 'SERVICE_UNEXPECTED_REDIRECT' | 'STATE_BLOCKED' | 'STATE_PRECONDITION_FAILED' | 'STATE_RUN_NOT_FOUND' | 'STATE_WORKFLOW_NOT_FOUND' | 'STATE_RUN_TERMINAL' | 'STATE_SNAPSHOT_MISMATCH' | 'STATE_RUN_LOCKED' | 'STATE_RUN_BUSY' | 'STATE_TRANSITION_DENIED' | 'STATE_RUN_RESURRECTED' | 'STATE_LEGACY_FORMAT' | 'STATE_STEP_ALREADY_CLAIMED' | 'STATE_STEP_NOT_ELIGIBLE' | 'STATE_RUN_DIVERGED' | 'STATE_RUN_ALREADY_ACTIVE' | 'STATE_IDEMPOTENCY_KEY_USED' | 'RUN_ABORTING' | 'VALIDATION_INPUT_SCHEMA' | 'VALIDATION_OUTPUT_SCHEMA' | 'VALIDATION_TRACE_SCHEMA' | 'VALIDATION_EXHAUSTED' | 'VALIDATION_WORKFLOW_SCHEMA' | 'VALIDATION_HASH_MISMATCH' | 'VALIDATION_QUOTE_NOT_FOUND' | 'VALIDATION_FIELD_UNKNOWN' | 'VALIDATION_FIELD_EXCLUDED' | 'VALIDATION_EMPTY_VALUE' | 'VALIDATION_BATCH_TOO_LARGE' | 'VALIDATION_BATCH_ITEMS' | 'STEP_HANDLER_ERROR' | 'ENGINE_INTERNAL' | 'ENGINE_STORE_FAILED' | 'ENGINE_ARTIFACT_DELETE_FAILED' | 'ENGINE_ADAPTER_FAILED' | 'ENGINE_ADAPTER_NOT_REGISTERED' | 'ENGINE_PROCESSOR_FAILED' | 'ENGINE_HANDLER_FAILED' | 'ENGINE_HANDLER_NOT_REGISTERED' | 'ENGINE_STEP_FAILED' | 'ENGINE_GATE_OPEN_FAILED' | 'GATE_MESSAGE_UNRESOLVABLE' | 'FILTER_UNKNOWN' | 'ADAPTER_OP_UNSUPPORTED' | 'ADAPTER_VALIDATION_FAILED' | 'ADAPTER_REQUEST_FAILED' | 'STEP_TIMEOUT' | 'STEP_ABORTED' | 'STEP_RETRY_EXHAUSTED' | 'STATE_STEP_PENDING' | 'STEP_NOT_FOUND' | 'GUARD_RESOLUTION_ERROR' | 'INPUT_MAP_DEPTH_EXCEEDED' | 'RESOURCE_FETCH_FAILED' | 'RESOURCE_TOO_LARGE' | 'RESOURCE_FORMAT_INVALID' | 'RESOURCE_NOT_ACCESSIBLE' | 'BUFFER_FULL' | 'TRACE_CAPABILITY_INCONSISTENT' | 'MCP_CONNECTION_FAILED' | 'MCP_TOOL_NOT_FOUND' | 'MCP_TOOL_NAME_COLLISION';
|
|
4
4
|
export interface WorkflowErrorOptions {
|
|
5
5
|
code: ErrorCode;
|
|
6
6
|
category: ErrorCategory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-error.d.ts","sourceRoot":"","sources":["../../src/types/workflow-error.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnG,MAAM,MAAM,WAAW,GACnB,gBAAgB,GAChB,eAAe,GACf,sBAAsB,GACtB,MAAM,GACN,gBAAgB,GAChB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,SAAS,GAEjB,iBAAiB,GACjB,qBAAqB,GACrB,oBAAoB,GACpB,0BAA0B,GAE1B,kBAAkB,GAClB,kBAAkB,GAClB,sBAAsB,GACtB,qBAAqB,GACrB,mBAAmB,GACnB,0BAA0B,GAE1B,6BAA6B,GAE7B,eAAe,GACf,2BAA2B,GAC3B,qBAAqB,GACrB,0BAA0B,GAC1B,oBAAoB,GACpB,yBAAyB,GACzB,kBAAkB,GAIlB,gBAAgB,GAChB,yBAAyB,GAMzB,uBAAuB,GACvB,qBAAqB,GACrB,4BAA4B,GAC5B,yBAAyB,GACzB,oBAAoB,GACpB,0BAA0B,GAC1B,4BAA4B,GAC5B,cAAc,GAEd,yBAAyB,GACzB,0BAA0B,GAC1B,yBAAyB,
|
|
1
|
+
{"version":3,"file":"workflow-error.d.ts","sourceRoot":"","sources":["../../src/types/workflow-error.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnG,MAAM,MAAM,WAAW,GACnB,gBAAgB,GAChB,eAAe,GACf,sBAAsB,GACtB,MAAM,GACN,gBAAgB,GAChB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,SAAS,GAEjB,iBAAiB,GACjB,qBAAqB,GACrB,oBAAoB,GACpB,0BAA0B,GAE1B,kBAAkB,GAClB,kBAAkB,GAClB,sBAAsB,GACtB,qBAAqB,GACrB,mBAAmB,GACnB,0BAA0B,GAE1B,6BAA6B,GAE7B,eAAe,GACf,2BAA2B,GAC3B,qBAAqB,GACrB,0BAA0B,GAC1B,oBAAoB,GACpB,yBAAyB,GACzB,kBAAkB,GAIlB,gBAAgB,GAChB,yBAAyB,GAMzB,uBAAuB,GACvB,qBAAqB,GACrB,4BAA4B,GAC5B,yBA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,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;gBAElB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB;CAa3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-error.js","sourceRoot":"","sources":["../../src/types/workflow-error.ts"],"names":[],"mappings":"AAAA,kEAAkE;
|
|
1
|
+
{"version":3,"file":"workflow-error.js","sourceRoot":"","sources":["../../src/types/workflow-error.ts"],"names":[],"mappings":"AAAA,kEAAkE;AA6HlE,MAAM,OAAO,aAAc,SAAQ,KAAK;IAC7B,IAAI,CAAY;IAChB,QAAQ,CAAgB;IACxB,WAAW,CAAc;IACzB,SAAS,CAAU;IACnB,OAAO,CAA0B;IACjC,MAAM,CAAU;IAChB,SAAS,CAAS;IAClB,OAAO,CAAS;IAChB,WAAW,CAAU;IAE9B,YAAY,OAAe,EAAE,OAA6B;QACxD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;QACrC,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS;YAAE,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC/D,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC1C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,CAAC;QACpC,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS;YAAE,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAChF,CAAC;CACF"}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* emit. Deliberately excludes ORPHANED_MANIFEST — that condition already throws a WorkflowError
|
|
4
4
|
* (`Invalid:` + exit 1) at the CLI layer; it is a hard error, never a warning.
|
|
5
5
|
*/
|
|
6
|
-
export type WarningCode = 'UNKNOWN_WORKFLOW_KEY' | 'UNKNOWN_STEP_KEY' | 'UNKNOWN_CREATE_WORKFLOW_KEY' | 'IDEMPOTENT_INERT_IN_FINALIZER' | 'DUAL_SCHEMA_DECLARED' | 'RETRY_NO_TIMEOUT' | 'EXTENSION_SENTINEL' | 'UNKNOWN_RETRY_KEY' | 'ON_TIMEOUT_SINGLE_ATTEMPT' | 'TOTAL_TIMEOUT_BELOW_ATTEMPT' | 'TOTAL_TIMEOUT_NON_AUTO';
|
|
6
|
+
export type WarningCode = 'UNKNOWN_WORKFLOW_KEY' | 'UNKNOWN_STEP_KEY' | 'UNKNOWN_CREATE_WORKFLOW_KEY' | 'IDEMPOTENT_INERT_IN_FINALIZER' | 'DUAL_SCHEMA_DECLARED' | 'RETRY_NO_TIMEOUT' | 'EXTENSION_SENTINEL' | 'UNKNOWN_RETRY_KEY' | 'ON_TIMEOUT_SINGLE_ATTEMPT' | 'TOTAL_TIMEOUT_BELOW_ATTEMPT' | 'TOTAL_TIMEOUT_NON_AUTO' | 'RETRY_INERT_NON_AUTO' | 'UNKNOWN_VALIDATION_EXHAUSTION_KEY' | 'DEAD_VALIDATION_EXHAUSTION_CONFIG';
|
|
7
7
|
/**
|
|
8
|
-
* A single structured diagnostic. `message` is the full human-readable text (matching, for
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* A single structured diagnostic. `message` is the full human-readable text (matching, for every
|
|
9
|
+
* unknown-key code, exactly what `renderLoaderWarning` would independently reconstruct from the
|
|
10
|
+
* structured fields — kept in sync by construction, not by convention: see `findUnknownKeys`
|
|
11
|
+
* below). `scope`/`id`/`step`/`key`/`did_you_mean` are populated only by the unknown-key family;
|
|
12
|
+
* other codes carry just `code`/`severity`/`message`.
|
|
13
13
|
*/
|
|
14
14
|
export interface LoaderWarning {
|
|
15
15
|
code: WarningCode;
|
|
@@ -59,14 +59,16 @@ export declare function findUnknownKeys(obj: Record<string, unknown>, allowList:
|
|
|
59
59
|
* yaml-loader.ts, and the CLI's `printLoaderWarnings` helper) renders through this, never by
|
|
60
60
|
* hand-rolling a `⚠ ` string itself.
|
|
61
61
|
*
|
|
62
|
-
*
|
|
63
|
-
* `did_you_mean` suggestion is appended only when present) and always
|
|
64
|
-
* byte-identical to the pre-#169 console.warn text (UNKNOWN_RETRY_KEY, issue #140,
|
|
65
|
-
*
|
|
62
|
+
* Every code in `UNKNOWN_KEY_CODES` is templated fresh from the structured fields (so the
|
|
63
|
+
* `did_you_mean` suggestion is appended only when present) and always carries the `⚠ ` prefix —
|
|
64
|
+
* byte-identical to the pre-#169 console.warn text (UNKNOWN_RETRY_KEY, issue #140, and
|
|
65
|
+
* UNKNOWN_VALIDATION_EXHAUSTION_KEY, issue #220, both follow the same rendering exactly, just with
|
|
66
|
+
* a different noun instead of 'step'/'workflow'). Every other code
|
|
66
67
|
* (IDEMPOTENT_INERT_IN_FINALIZER, DUAL_SCHEMA_DECLARED, RETRY_NO_TIMEOUT, EXTENSION_SENTINEL,
|
|
67
|
-
* ON_TIMEOUT_SINGLE_ATTEMPT, TOTAL_TIMEOUT_BELOW_ATTEMPT, TOTAL_TIMEOUT_NON_AUTO
|
|
68
|
-
* `message` verbatim: these are
|
|
69
|
-
* preserved byte-for-byte by
|
|
68
|
+
* ON_TIMEOUT_SINGLE_ATTEMPT, TOTAL_TIMEOUT_BELOW_ATTEMPT, TOTAL_TIMEOUT_NON_AUTO,
|
|
69
|
+
* RETRY_INERT_NON_AUTO, DEAD_VALIDATION_EXHAUSTION_CONFIG) returns `message` verbatim: these are
|
|
70
|
+
* free-text warnings whose exact current prefix (or lack of one) is preserved byte-for-byte by
|
|
71
|
+
* whatever constructed them, not re-derived here.
|
|
70
72
|
*/
|
|
71
73
|
export declare function renderLoaderWarning(w: LoaderWarning): string;
|
|
72
74
|
//# sourceMappingURL=diagnostics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/workflow/diagnostics.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,MAAM,MAAM,WAAW,GACnB,sBAAsB,GACtB,kBAAkB,GAClB,6BAA6B,GAC7B,+BAA+B,GAC/B,sBAAsB,GACtB,kBAAkB,GAClB,oBAAoB,GAEpB,mBAAmB,GACnB,2BAA2B,GAC3B,6BAA6B,GAC7B,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/workflow/diagnostics.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,MAAM,MAAM,WAAW,GACnB,sBAAsB,GACtB,kBAAkB,GAClB,6BAA6B,GAC7B,+BAA+B,GAC/B,sBAAsB,GACtB,kBAAkB,GAClB,oBAAoB,GAEpB,mBAAmB,GACnB,2BAA2B,GAC3B,6BAA6B,GAC7B,wBAAwB,GAGxB,sBAAsB,GAEtB,mCAAmC,GACnC,mCAAmC,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,G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|
|
27
30
|
};
|
|
28
31
|
/**
|
|
29
32
|
* Pure lookup: resolves a warning code's severity against a policy table. `--strict` passes an
|
|
@@ -123,20 +126,23 @@ const UNKNOWN_KEY_CODES = new Set([
|
|
|
123
126
|
'UNKNOWN_STEP_KEY',
|
|
124
127
|
'UNKNOWN_CREATE_WORKFLOW_KEY',
|
|
125
128
|
'UNKNOWN_RETRY_KEY',
|
|
129
|
+
'UNKNOWN_VALIDATION_EXHAUSTION_KEY',
|
|
126
130
|
]);
|
|
127
131
|
/**
|
|
128
132
|
* The SINGLE source of the `⚠ ` line format — every printer (the core plain wrappers in
|
|
129
133
|
* yaml-loader.ts, and the CLI's `printLoaderWarnings` helper) renders through this, never by
|
|
130
134
|
* hand-rolling a `⚠ ` string itself.
|
|
131
135
|
*
|
|
132
|
-
*
|
|
133
|
-
* `did_you_mean` suggestion is appended only when present) and always
|
|
134
|
-
* byte-identical to the pre-#169 console.warn text (UNKNOWN_RETRY_KEY, issue #140,
|
|
135
|
-
*
|
|
136
|
+
* Every code in `UNKNOWN_KEY_CODES` is templated fresh from the structured fields (so the
|
|
137
|
+
* `did_you_mean` suggestion is appended only when present) and always carries the `⚠ ` prefix —
|
|
138
|
+
* byte-identical to the pre-#169 console.warn text (UNKNOWN_RETRY_KEY, issue #140, and
|
|
139
|
+
* UNKNOWN_VALIDATION_EXHAUSTION_KEY, issue #220, both follow the same rendering exactly, just with
|
|
140
|
+
* a different noun instead of 'step'/'workflow'). Every other code
|
|
136
141
|
* (IDEMPOTENT_INERT_IN_FINALIZER, DUAL_SCHEMA_DECLARED, RETRY_NO_TIMEOUT, EXTENSION_SENTINEL,
|
|
137
|
-
* ON_TIMEOUT_SINGLE_ATTEMPT, TOTAL_TIMEOUT_BELOW_ATTEMPT, TOTAL_TIMEOUT_NON_AUTO
|
|
138
|
-
* `message` verbatim: these are
|
|
139
|
-
* preserved byte-for-byte by
|
|
142
|
+
* ON_TIMEOUT_SINGLE_ATTEMPT, TOTAL_TIMEOUT_BELOW_ATTEMPT, TOTAL_TIMEOUT_NON_AUTO,
|
|
143
|
+
* RETRY_INERT_NON_AUTO, DEAD_VALIDATION_EXHAUSTION_CONFIG) returns `message` verbatim: these are
|
|
144
|
+
* free-text warnings whose exact current prefix (or lack of one) is preserved byte-for-byte by
|
|
145
|
+
* whatever constructed them, not re-derived here.
|
|
140
146
|
*/
|
|
141
147
|
export function renderLoaderWarning(w) {
|
|
142
148
|
if (UNKNOWN_KEY_CODES.has(w.code)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/workflow/diagnostics.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,4FAA4F;AAC5F,8FAA8F;AAC9F,gGAAgG;AAChG,gGAAgG;AAChG,+FAA+F;
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/workflow/diagnostics.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,4FAA4F;AAC5F,8FAA8F;AAC9F,gGAAgG;AAChG,gGAAgG;AAChG,+FAA+F;AA6C/F;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAA0C;IACnE,oBAAoB,EAAE,MAAM;IAC5B,gBAAgB,EAAE,MAAM;IACxB,2BAA2B,EAAE,MAAM;IACnC,6BAA6B,EAAE,MAAM;IACrC,oBAAoB,EAAE,MAAM;IAC5B,gBAAgB,EAAE,MAAM;IACxB,kBAAkB,EAAE,MAAM;IAC1B,iBAAiB,EAAE,MAAM;IACzB,yBAAyB,EAAE,MAAM;IACjC,2BAA2B,EAAE,MAAM;IACnC,sBAAsB,EAAE,MAAM;IAC9B,oBAAoB,EAAE,MAAM;IAC5B,iCAAiC,EAAE,MAAM;IACzC,iCAAiC,EAAE,MAAM;CAC1C,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC7B,IAAiB,EACjB,SAAgD,cAAc;IAE9D,OAAO,MAAM,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IAC1B,CAAC;IACD,OAAO,CAAC,CAAC,OAAO,CAAC;AACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml-loader.d.ts","sourceRoot":"","sources":["../../src/workflow/yaml-loader.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,kBAAkB,
|
|
1
|
+
{"version":3,"file":"yaml-loader.d.ts","sourceRoot":"","sources":["../../src/workflow/yaml-loader.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,kBAAkB,EAInB,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAqKnE,iFAAiF;AACjF,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAyEjD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAUjD;AA4JD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,kBAAkB,CAIpB;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,iBAAiB,GAC3B;IAAE,UAAU,EAAE,kBAAkB,CAAC;IAAC,QAAQ,EAAE,aAAa,EAAE,CAAA;CAAE,CAE/D;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,kBAAkB,CAMpB;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,CACnD,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,iBAAiB,GAC3B;IAAE,UAAU,EAAE,kBAAkB,CAAC;IAAC,QAAQ,EAAE,aAAa,EAAE,CAAA;CAAE,CAE/D"}
|
|
@@ -11,6 +11,7 @@ import { resolveTemplates } from './template-resolver.js';
|
|
|
11
11
|
import { normalizeTriggerFilter, validateTriggerStructure } from './trigger-schema.js';
|
|
12
12
|
import { splitComparison, isPathShaped } from '../engine/comparison-expr.js';
|
|
13
13
|
import { DEFAULT_EXECUTION_TIMEOUT_SECONDS } from '../engine/claim-liveness.js';
|
|
14
|
+
import { validateOutputSchema } from '../validation/input-schema.js';
|
|
14
15
|
/**
|
|
15
16
|
* Validate one condition leaf at load time using the shared quote-aware splitter (the SAME split
|
|
16
17
|
* used at runtime). Rejects compound `and`/`or`, multiple operators, and non-path LHS. For `when`,
|
|
@@ -34,11 +35,25 @@ function validateConditionLeaf(surface, leaf, stepName, dependsOn, errors) {
|
|
|
34
35
|
return;
|
|
35
36
|
}
|
|
36
37
|
if (split.kind === 'path') {
|
|
37
|
-
// A precondition is always a comparison; a bare path is not a valid precondition.
|
|
38
|
+
// A precondition is always a comparison; a bare path is not a valid precondition. This check
|
|
39
|
+
// stays FIRST (before the `$settlement` branch below) — a bare `$settlement.<dep>.<field>` on
|
|
40
|
+
// `preconditions` is refused HERE, for the pre-existing "must be a comparison" reason, not the
|
|
41
|
+
// $settlement one-hop reason (issue #220 §4c pin kk: the precondition witness for a
|
|
42
|
+
// $settlement leaf must use the comparison spelling).
|
|
38
43
|
if (surface === 'preconditions') {
|
|
39
44
|
errors.push(`Step '${stepName}': precondition '${leaf}' must be a comparison (e.g. "step.field >= 1").`);
|
|
40
45
|
return;
|
|
41
46
|
}
|
|
47
|
+
// issue #220 §4c (PR-3): `$settlement.<dep>.<field>` handling lives HERE, in
|
|
48
|
+
// validateConditionLeaf, branching on the LHS first segment — NOT in isPathShaped (a
|
|
49
|
+
// documented generic zero-dependency splitter; embedding `$settlement` there would widen its
|
|
50
|
+
// contract for every caller) and NOT as an arm on validateWhenReference (invoked only under
|
|
51
|
+
// `surface === 'when'` — an arm there would never fire for abort_unless/preconditions). This
|
|
52
|
+
// fires on ALL THREE surfaces since it runs BEFORE the generic isPathShaped check below.
|
|
53
|
+
if (split.path.split('.')[0] === '$settlement') {
|
|
54
|
+
validateSettlementReference(split.path, surface, leaf, stepName, dependsOn, errors);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
42
57
|
if (!isPathShaped(split.path)) {
|
|
43
58
|
errors.push(`Step '${stepName}': '${surface}' leaf '${leaf}' is not a valid path or comparison.`);
|
|
44
59
|
return;
|
|
@@ -48,6 +63,10 @@ function validateConditionLeaf(surface, leaf, stepName, dependsOn, errors) {
|
|
|
48
63
|
return;
|
|
49
64
|
}
|
|
50
65
|
// comparison
|
|
66
|
+
if (split.lhsPath.split('.')[0] === '$settlement') {
|
|
67
|
+
validateSettlementReference(split.lhsPath, surface, leaf, stepName, dependsOn, errors);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
51
70
|
if (!isPathShaped(split.lhsPath)) {
|
|
52
71
|
errors.push(`Step '${stepName}': '${surface}' leaf '${leaf}' must have a path on the left-hand side (got '${split.lhsPath}').`);
|
|
53
72
|
return;
|
|
@@ -55,6 +74,44 @@ function validateConditionLeaf(surface, leaf, stepName, dependsOn, errors) {
|
|
|
55
74
|
if (surface === 'when')
|
|
56
75
|
validateWhenReference(split.lhsPath, stepName, dependsOn, errors);
|
|
57
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* issue #220 §4c (PR-3): validates a `$settlement.<dep>.<field>` reference reached from ANY of
|
|
79
|
+
* the three condition surfaces (when/abort_unless/preconditions) — unlike the legacy
|
|
80
|
+
* depends_on/run.params check ({@link validateWhenReference}, `when`-only), this fires on all
|
|
81
|
+
* three because it is invoked directly from {@link validateConditionLeaf}, before the
|
|
82
|
+
* `surface === 'when'` gate. The caller must NOT fall through to the generic `isPathShaped` check
|
|
83
|
+
* afterward (which rejects `$` outright) — this function's callers always `return` immediately.
|
|
84
|
+
*/
|
|
85
|
+
function validateSettlementReference(path, surface, leaf, stepName, dependsOn, errors) {
|
|
86
|
+
// Path-shape: a NARROWING for this ONE prefix only (never a general `$` allowance) — the
|
|
87
|
+
// remainder after `$settlement` must itself be path-shaped. Rejects `$foo`, a bare `$`, and
|
|
88
|
+
// garbage remainders like `$settlement.a b`.
|
|
89
|
+
//
|
|
90
|
+
// issue #220 PR-3 ReDoS correction (CodeQL HIGH, CWE-1333): the inner character class must NOT
|
|
91
|
+
// include `.` — `[A-Za-z0-9_.-]` let a `.` be consumed either by the inner `*` or by the next
|
|
92
|
+
// outer-group iteration's leading `\.`, an ambiguous nested quantifier causing catastrophic
|
|
93
|
+
// backtracking on inputs like `$settlement.a.a.a…!`. With `.` removed from the inner class
|
|
94
|
+
// (`[A-Za-z0-9_-]`), each `.` can ONLY start a new group — the parse is unambiguous, linear-time,
|
|
95
|
+
// no backtracking. Accepts every valid `$settlement.<dep>.<field>` path identically; stricter
|
|
96
|
+
// only on pathological consecutive dots (`$settlement.dep..field`), which is more correct.
|
|
97
|
+
if (!/^\$settlement(\.[A-Za-z_][A-Za-z0-9_-]*)*$/.test(path)) {
|
|
98
|
+
errors.push(`Step '${stepName}': '${surface}' leaf '${leaf}' has an invalid '$settlement' reference ` +
|
|
99
|
+
`'${path}' — expected '$settlement.<dep>.<field>'.`);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
// One-hop (§4c-S4): the SECOND segment must be a DIRECT dependency of this step.
|
|
103
|
+
const dep = path.split('.')[1];
|
|
104
|
+
if (dep === undefined) {
|
|
105
|
+
errors.push(`Step '${stepName}': '${surface}' leaf '${leaf}' references '$settlement' with no ` +
|
|
106
|
+
`dependency segment — expected '$settlement.<dep>.<field>' where '<dep>' is a direct dependency.`);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (!dependsOn.includes(dep)) {
|
|
110
|
+
errors.push(`Step '${stepName}': '${surface}' references '$settlement.${dep}' — '${dep}' is not in ` +
|
|
111
|
+
`its depends_on [${dependsOn.join(', ')}]. '$settlement' paths must reference a direct ` +
|
|
112
|
+
`dependency (one-hop rule).`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
58
115
|
/**
|
|
59
116
|
* Change 2 (when-only): a `when` leaf's `step.field` reference must resolve to `run.params.*` or to a
|
|
60
117
|
* step in this step's DIRECT `depends_on` (one-hop membership — no graph traversal). Field names are
|
|
@@ -92,6 +149,8 @@ const SERVICE_ENTRY_JSON_SCHEMA = {
|
|
|
92
149
|
};
|
|
93
150
|
const VALID_EXECUTIONS = new Set(['auto', 'agent', 'guard', 'finalizer']);
|
|
94
151
|
const VALID_FINALIZER_TRIGGERS = new Set(['complete', 'fail', 'abort', 'always']);
|
|
152
|
+
// issue #220 (PR-2): the full set of recognized validation_exhaustion sub-keys.
|
|
153
|
+
const KNOWN_VALIDATION_EXHAUSTION_KEYS = ['threshold', 'mode', 'default_output'];
|
|
95
154
|
const VALID_SERVICE_METHODS = new Set(['fetch', 'create', 'update', 'delete']);
|
|
96
155
|
const VALID_TRIGGER_RULES = new Set([
|
|
97
156
|
'all_success',
|
|
@@ -502,6 +561,16 @@ function parseWorkflowString(content, registry, opts) {
|
|
|
502
561
|
continue;
|
|
503
562
|
}
|
|
504
563
|
const step = stepRaw;
|
|
564
|
+
// issue #220 §4c (PR-3): HOISTED out of the `when`-only block below (was block-local there) so
|
|
565
|
+
// ALL THREE condition surfaces (when/abort_unless/preconditions) can thread the real
|
|
566
|
+
// depends_on list into validateConditionLeaf's `$settlement` one-hop check. Previously
|
|
567
|
+
// abort_unless/preconditions passed a literal `[]` (no reference validation existed for them
|
|
568
|
+
// at all); the legacy when-only depends_on/run.params check (validateWhenReference) is
|
|
569
|
+
// UNCHANGED — it still fires ONLY for `surface === 'when'`. This is a LIFT, not a new
|
|
570
|
+
// computation — byte-identical to the previous block-local `dependsOn` for `when`'s own use.
|
|
571
|
+
const dependsOn = Array.isArray(step['depends_on'])
|
|
572
|
+
? step['depends_on'].filter((d) => typeof d === 'string')
|
|
573
|
+
: [];
|
|
505
574
|
// WARN (do not reject) on an unknown step key — runs after template resolution above, so a
|
|
506
575
|
// template-expanded step's keys are checked too. Same non-breaking posture as the
|
|
507
576
|
// workflow-level check (issue #144).
|
|
@@ -510,7 +579,10 @@ function parseWorkflowString(content, registry, opts) {
|
|
|
510
579
|
code: 'UNKNOWN_STEP_KEY',
|
|
511
580
|
step: stepName,
|
|
512
581
|
}));
|
|
513
|
-
|
|
582
|
+
// issue #220 §4c PR ordering interlock: `$settlement` is reserved NOW (PR-1) even though the
|
|
583
|
+
// namespace it names is not minted until a later PR — else the inter-PR gap could register a
|
|
584
|
+
// `$settlement`-named step that becomes a load-refused fossil the instant the mint ships.
|
|
585
|
+
if (stepName === 'run' || stepName === 'context' || stepName === '$settlement') {
|
|
514
586
|
errors.push(`Step name '${stepName}' is reserved and cannot be used as a step identifier`);
|
|
515
587
|
}
|
|
516
588
|
// Reject integer-like step names: JS object iteration reorders integer-like keys ahead
|
|
@@ -654,6 +726,97 @@ function parseWorkflowString(content, registry, opts) {
|
|
|
654
726
|
if (step['output_schema'] !== undefined && step['execution'] !== 'agent') {
|
|
655
727
|
errors.push(`Step '${stepName}': 'output_schema' is only valid on execution: agent steps`);
|
|
656
728
|
}
|
|
729
|
+
// issue #220 (PR-2): validation_exhaustion is only valid on execution: agent steps — the
|
|
730
|
+
// countable rejection set (VALIDATION_INPUT_SCHEMA/VALIDATION_OUTPUT_SCHEMA) is agent-only by
|
|
731
|
+
// construction (execution-loop.ts's countRejection). Full rule table: `mode` value validated
|
|
732
|
+
// (REFUSE on an unrecognized value — unvalidatable posture, fail-closed); `mode: 'default'`
|
|
733
|
+
// requires `default_output` (REFUSE — nothing to substitute) which in turn requires the step's
|
|
734
|
+
// own `output_schema` (REFUSE — B5, an unvalidatable default) against which `default_output` is
|
|
735
|
+
// then AJV-proven AT LOAD TIME (REFUSE — B10, reusing the runtime validator so load-time and
|
|
736
|
+
// runtime verdicts can never diverge); `default_output` present without `mode: 'default'` WARNS
|
|
737
|
+
// as dead config (never rejects — it's simply inert); an unknown sub-key WARNS.
|
|
738
|
+
if (step['validation_exhaustion'] !== undefined) {
|
|
739
|
+
if (step['execution'] !== 'agent') {
|
|
740
|
+
errors.push(`Step '${stepName}': 'validation_exhaustion' is only valid on execution: agent steps`);
|
|
741
|
+
}
|
|
742
|
+
else if (typeof step['validation_exhaustion'] !== 'object' ||
|
|
743
|
+
step['validation_exhaustion'] === null) {
|
|
744
|
+
errors.push(`Step '${stepName}': 'validation_exhaustion' must be an object`);
|
|
745
|
+
}
|
|
746
|
+
else {
|
|
747
|
+
const exhaustionBlock = step['validation_exhaustion'];
|
|
748
|
+
// WARN (do not reject) on an unknown validation_exhaustion sub-key — the retry-block-style
|
|
749
|
+
// pattern (issue #140's UNKNOWN_RETRY_KEY), its OWN code (issue #220 PR-2 mints
|
|
750
|
+
// UNKNOWN_VALIDATION_EXHAUSTION_KEY, replacing PR-1's UNKNOWN_STEP_KEY noun-override —
|
|
751
|
+
// closes the #170-flip incoherence against the structurally identical retry-key family).
|
|
752
|
+
warnings.push(...findUnknownKeys(exhaustionBlock, KNOWN_VALIDATION_EXHAUSTION_KEYS, {
|
|
753
|
+
scope: 'step',
|
|
754
|
+
code: 'UNKNOWN_VALIDATION_EXHAUSTION_KEY',
|
|
755
|
+
step: stepName,
|
|
756
|
+
noun: 'validation_exhaustion',
|
|
757
|
+
}));
|
|
758
|
+
if ('threshold' in exhaustionBlock &&
|
|
759
|
+
(!Number.isInteger(exhaustionBlock['threshold']) ||
|
|
760
|
+
exhaustionBlock['threshold'] < 1)) {
|
|
761
|
+
errors.push(`Step '${stepName}': 'validation_exhaustion.threshold' must be a positive integer ` +
|
|
762
|
+
`(1 is legal — it disables in-drive schema-repair, since the first rejection ` +
|
|
763
|
+
`already meets it)`);
|
|
764
|
+
}
|
|
765
|
+
const modeValue = exhaustionBlock['mode'];
|
|
766
|
+
if (modeValue !== undefined && modeValue !== 'fail' && modeValue !== 'default') {
|
|
767
|
+
errors.push(`Step '${stepName}': 'validation_exhaustion.mode' must be 'fail' or 'default' ` +
|
|
768
|
+
`(got: ${JSON.stringify(modeValue)})`);
|
|
769
|
+
}
|
|
770
|
+
const hasDefaultOutput = 'default_output' in exhaustionBlock;
|
|
771
|
+
if (modeValue === 'default') {
|
|
772
|
+
if (!hasDefaultOutput) {
|
|
773
|
+
errors.push(`Step '${stepName}': 'validation_exhaustion.mode: default' requires ` +
|
|
774
|
+
`'default_output' (nothing to substitute on exhaustion)`);
|
|
775
|
+
}
|
|
776
|
+
else if (step['output_schema'] === undefined) {
|
|
777
|
+
errors.push(`Step '${stepName}': 'validation_exhaustion.default_output' requires the step to ` +
|
|
778
|
+
`declare 'output_schema' (an undeclared schema makes the default unvalidatable)`);
|
|
779
|
+
}
|
|
780
|
+
else {
|
|
781
|
+
// B10 — load-time AJV proof: REUSE the runtime validator so the load-time verdict can
|
|
782
|
+
// never diverge from the runtime verdict for the exact same (default_output,
|
|
783
|
+
// output_schema) pair. This is the loader's first load-time Ajv compile of an
|
|
784
|
+
// output_schema (today output_schema is only compiled at runtime), so the catch below
|
|
785
|
+
// legitimately sees TWO different populations: a VALIDATION_OUTPUT_SCHEMA
|
|
786
|
+
// WorkflowError (default_output fails the schema) and a raw Ajv schema-compilation
|
|
787
|
+
// Error (a structurally malformed output_schema) — both fail-closed to a load refusal,
|
|
788
|
+
// but they carry their detail DIFFERENTLY: a WorkflowError has `.details.errors`; a raw
|
|
789
|
+
// Error has NO `.details` at all (reading `.details.errors` on it throws a TypeError
|
|
790
|
+
// that would escape the loader mid-walk — verified empirically). Discriminate.
|
|
791
|
+
try {
|
|
792
|
+
validateOutputSchema(exhaustionBlock['default_output'], step['output_schema'], stepName);
|
|
793
|
+
}
|
|
794
|
+
catch (err) {
|
|
795
|
+
const detail = err instanceof WorkflowError
|
|
796
|
+
? JSON.stringify(err.details['errors'])
|
|
797
|
+
: err instanceof Error
|
|
798
|
+
? err.message
|
|
799
|
+
: String(err);
|
|
800
|
+
errors.push(`Step '${stepName}': 'validation_exhaustion.default_output' does not validate ` +
|
|
801
|
+
`against the step's own 'output_schema': ${detail}`);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
else if (hasDefaultOutput) {
|
|
806
|
+
// default_output present without mode: 'default' (mode: 'fail' or absent) — inert, not
|
|
807
|
+
// an error: WARN as dead config rather than silently ignoring it.
|
|
808
|
+
warnings.push({
|
|
809
|
+
code: 'DEAD_VALIDATION_EXHAUSTION_CONFIG',
|
|
810
|
+
severity: resolveSeverity('DEAD_VALIDATION_EXHAUSTION_CONFIG'),
|
|
811
|
+
scope: 'step',
|
|
812
|
+
step: stepName,
|
|
813
|
+
message: `Step '${stepName}': 'validation_exhaustion.default_output' is ignored without ` +
|
|
814
|
+
`'mode: default' — set 'validation_exhaustion.mode: default' to enable it, or ` +
|
|
815
|
+
`remove 'default_output'.`,
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
657
820
|
// WARN (do not reject): an agent step declaring BOTH input_schema and output_schema has its
|
|
658
821
|
// submitted output validated against BOTH (execution-loop.ts validateInputSchema AND
|
|
659
822
|
// validateOutputSchema) — a divergence between the two degrades to a confusing recoverable
|
|
@@ -762,6 +925,35 @@ function parseWorkflowString(content, registry, opts) {
|
|
|
762
925
|
`dispatch, which is the only dispatch ever wrapped in a timeout.`,
|
|
763
926
|
});
|
|
764
927
|
}
|
|
928
|
+
// issue #218 (extends the W5 family): the BARE-KEYS advisory — no explicit
|
|
929
|
+
// total_timeout_seconds (that shape is W5's, above), but retry: is present on a step the
|
|
930
|
+
// built-in dispatch path never wraps in a throwing retry loop at all. Complementary to
|
|
931
|
+
// W5's own `!== undefined` conjunct on the SAME `execution !== 'auto'` gate, so for any
|
|
932
|
+
// non-auto retry block that reaches this point (finalizer+retry and invalid-cap shapes
|
|
933
|
+
// already hard-errored above; on_timeout: true already hard-errored via E1 unless
|
|
934
|
+
// idempotent is also declared, which is itself rejected by the pre-existing
|
|
935
|
+
// idempotent-non-auto check) exactly ONE of {W5, RETRY_INERT_NON_AUTO} ever fires — never
|
|
936
|
+
// both, never neither.
|
|
937
|
+
if (step['execution'] !== 'auto' && retry['total_timeout_seconds'] === undefined) {
|
|
938
|
+
const isAgent = step['execution'] === 'agent';
|
|
939
|
+
const message = isAgent
|
|
940
|
+
? `Step '${stepName}': 'retry' is inert on execution: 'agent' steps — the built-in ` +
|
|
941
|
+
`dispatch path never throws for agent steps, so this block can never mint a second ` +
|
|
942
|
+
`attempt here (for schema-repair budgets, use the CLI drive's '--schema-retries' ` +
|
|
943
|
+
`flag instead). An embedder-supplied throwing dispatcher may still consume this ` +
|
|
944
|
+
`config — a deliberate public-API capability, not an invalid one.`
|
|
945
|
+
: `Step '${stepName}': 'retry' is inert on execution: '${String(step['execution'])}' ` +
|
|
946
|
+
`steps — the built-in dispatch path never throws for these steps, so this block can ` +
|
|
947
|
+
`never mint a second attempt here. An embedder-supplied throwing dispatcher may ` +
|
|
948
|
+
`still consume this config — a deliberate public-API capability, not an invalid one.`;
|
|
949
|
+
warnings.push({
|
|
950
|
+
code: 'RETRY_INERT_NON_AUTO',
|
|
951
|
+
severity: resolveSeverity('RETRY_INERT_NON_AUTO'),
|
|
952
|
+
scope: 'step',
|
|
953
|
+
step: stepName,
|
|
954
|
+
message,
|
|
955
|
+
});
|
|
956
|
+
}
|
|
765
957
|
// W1: on_timeout with an effective max_attempts of 1 (explicit OR absent, since the
|
|
766
958
|
// loader admits an absent max_attempts and the engine then defaults it to 1) — there is
|
|
767
959
|
// no second attempt for the opt-in to retry into.
|
|
@@ -888,9 +1080,6 @@ function parseWorkflowString(content, registry, opts) {
|
|
|
888
1080
|
// Validate when: string | string[] of single-comparison/bare-path leaves (implicit AND).
|
|
889
1081
|
if ('when' in step && step['when'] !== undefined) {
|
|
890
1082
|
const rawWhen = step['when'];
|
|
891
|
-
const dependsOn = Array.isArray(step['depends_on'])
|
|
892
|
-
? step['depends_on'].filter((d) => typeof d === 'string')
|
|
893
|
-
: [];
|
|
894
1083
|
if (typeof rawWhen === 'string') {
|
|
895
1084
|
if (rawWhen.trim() === '') {
|
|
896
1085
|
errors.push(`Step '${stepName}': 'when' must be a non-empty string`);
|
|
@@ -918,7 +1107,9 @@ function parseWorkflowString(content, registry, opts) {
|
|
|
918
1107
|
errors.push(`Step '${stepName}': 'when' must be a string or an array of strings`);
|
|
919
1108
|
}
|
|
920
1109
|
}
|
|
921
|
-
// Validate abort_unless leaf shape (guard steps only;
|
|
1110
|
+
// Validate abort_unless leaf shape (guard steps only; the LEGACY depends_on/run.params
|
|
1111
|
+
// reference check is when-only — but issue #220 §4c's `$settlement` one-hop check fires here
|
|
1112
|
+
// too, via the hoisted `dependsOn`, SCOPED to `$settlement.`-prefixed paths only).
|
|
922
1113
|
if (step['abort_unless'] !== undefined && step['execution'] === 'guard') {
|
|
923
1114
|
const rawAbort = step['abort_unless'];
|
|
924
1115
|
if (typeof rawAbort === 'string') {
|
|
@@ -926,7 +1117,7 @@ function parseWorkflowString(content, registry, opts) {
|
|
|
926
1117
|
errors.push(`Step '${stepName}': 'abort_unless' must be a non-empty string`);
|
|
927
1118
|
}
|
|
928
1119
|
else {
|
|
929
|
-
validateConditionLeaf('abort_unless', rawAbort, stepName,
|
|
1120
|
+
validateConditionLeaf('abort_unless', rawAbort, stepName, dependsOn, errors);
|
|
930
1121
|
}
|
|
931
1122
|
}
|
|
932
1123
|
else if (Array.isArray(rawAbort)) {
|
|
@@ -939,7 +1130,7 @@ function parseWorkflowString(content, registry, opts) {
|
|
|
939
1130
|
errors.push(`Step '${stepName}': 'abort_unless' array entries must be non-empty strings`);
|
|
940
1131
|
}
|
|
941
1132
|
else {
|
|
942
|
-
validateConditionLeaf('abort_unless', leaf, stepName,
|
|
1133
|
+
validateConditionLeaf('abort_unless', leaf, stepName, dependsOn, errors);
|
|
943
1134
|
}
|
|
944
1135
|
}
|
|
945
1136
|
}
|
|
@@ -948,7 +1139,9 @@ function parseWorkflowString(content, registry, opts) {
|
|
|
948
1139
|
errors.push(`Step '${stepName}': 'abort_unless' must be a string or an array of strings`);
|
|
949
1140
|
}
|
|
950
1141
|
}
|
|
951
|
-
// Validate preconditions leaf shape (each must be a single comparison).
|
|
1142
|
+
// Validate preconditions leaf shape (each must be a single comparison). Reference check is
|
|
1143
|
+
// `$settlement`-scoped only (issue #220 §4c) — a non-`$settlement` precondition has no
|
|
1144
|
+
// depends_on/run.params check (unchanged from before this PR).
|
|
952
1145
|
if (step['preconditions'] !== undefined) {
|
|
953
1146
|
const rawPre = step['preconditions'];
|
|
954
1147
|
if (!Array.isArray(rawPre)) {
|
|
@@ -960,7 +1153,7 @@ function parseWorkflowString(content, registry, opts) {
|
|
|
960
1153
|
errors.push(`Step '${stepName}': 'preconditions' entries must be non-empty strings`);
|
|
961
1154
|
}
|
|
962
1155
|
else {
|
|
963
|
-
validateConditionLeaf('preconditions', leaf, stepName,
|
|
1156
|
+
validateConditionLeaf('preconditions', leaf, stepName, dependsOn, errors);
|
|
964
1157
|
}
|
|
965
1158
|
}
|
|
966
1159
|
}
|