@exaudeus/workrail 1.0.0 → 1.2.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/application/services/output-normalizer.d.ts +9 -0
- package/dist/application/services/output-normalizer.js +38 -0
- package/dist/application/services/validation-engine.d.ts +15 -1
- package/dist/application/services/validation-engine.js +81 -51
- package/dist/application/services/workflow-compiler.d.ts +3 -0
- package/dist/application/services/workflow-compiler.js +26 -0
- package/dist/application/services/workflow-interpreter.d.ts +4 -1
- package/dist/application/services/workflow-interpreter.js +85 -24
- package/dist/application/services/workflow-service.js +19 -2
- package/dist/manifest.json +379 -75
- package/dist/mcp/handler-factory.d.ts +7 -0
- package/dist/mcp/handler-factory.js +70 -0
- package/dist/mcp/handlers/shared/with-timeout.d.ts +1 -0
- package/dist/mcp/handlers/shared/with-timeout.js +9 -0
- package/dist/mcp/handlers/v2-advance-core.d.ts +45 -0
- package/dist/mcp/handlers/v2-advance-core.js +433 -0
- package/dist/mcp/handlers/v2-context-budget.d.ts +17 -0
- package/dist/mcp/handlers/v2-context-budget.js +169 -0
- package/dist/mcp/handlers/v2-error-mapping.d.ts +34 -0
- package/dist/mcp/handlers/v2-error-mapping.js +125 -0
- package/dist/mcp/handlers/v2-execution-helpers.js +4 -1
- package/dist/mcp/handlers/v2-execution.d.ts +19 -0
- package/dist/mcp/handlers/v2-execution.js +366 -589
- package/dist/mcp/handlers/v2-state-conversion.d.ts +40 -0
- package/dist/mcp/handlers/v2-state-conversion.js +132 -0
- package/dist/mcp/handlers/v2-token-ops.d.ts +33 -0
- package/dist/mcp/handlers/v2-token-ops.js +62 -0
- package/dist/mcp/handlers/v2-workflow.js +3 -8
- package/dist/mcp/handlers/workflow.js +4 -11
- package/dist/mcp/output-schemas.d.ts +514 -38
- package/dist/mcp/output-schemas.js +102 -7
- package/dist/mcp/server.js +23 -127
- package/dist/mcp/tool-descriptions.js +142 -18
- package/dist/mcp/types/workflow-tool-edition.d.ts +28 -0
- package/dist/mcp/types/workflow-tool-edition.js +10 -0
- package/dist/mcp/types.d.ts +2 -0
- package/dist/mcp/v1/tool-registry.d.ts +8 -0
- package/dist/mcp/v1/tool-registry.js +49 -0
- package/dist/mcp/v2/tool-registry.d.ts +2 -5
- package/dist/mcp/v2/tool-registry.js +33 -32
- package/dist/mcp/v2/tools.d.ts +23 -2
- package/dist/mcp/v2/tools.js +38 -7
- package/dist/mcp/workflow-tool-edition-selector.d.ts +4 -0
- package/dist/mcp/workflow-tool-edition-selector.js +13 -0
- package/dist/types/workflow-definition.d.ts +19 -0
- package/dist/v2/durable-core/constants.d.ts +3 -0
- package/dist/v2/durable-core/constants.js +4 -1
- package/dist/v2/durable-core/domain/ack-advance-append-plan.d.ts +15 -7
- package/dist/v2/durable-core/domain/ack-advance-append-plan.js +89 -24
- package/dist/v2/durable-core/domain/artifact-contract-validator.d.ts +31 -0
- package/dist/v2/durable-core/domain/artifact-contract-validator.js +98 -0
- package/dist/v2/durable-core/domain/blocked-node-builder.d.ts +20 -0
- package/dist/v2/durable-core/domain/blocked-node-builder.js +94 -0
- package/dist/v2/durable-core/domain/blocking-decision.d.ts +32 -0
- package/dist/v2/durable-core/domain/blocking-decision.js +41 -0
- package/dist/v2/durable-core/domain/context-merge.d.ts +8 -0
- package/dist/v2/durable-core/domain/context-merge.js +40 -0
- package/dist/v2/durable-core/domain/decision-trace-builder.d.ts +33 -0
- package/dist/v2/durable-core/domain/decision-trace-builder.js +92 -0
- package/dist/v2/durable-core/domain/function-definition-expander.d.ts +14 -0
- package/dist/v2/durable-core/domain/function-definition-expander.js +66 -0
- package/dist/v2/durable-core/domain/gap-builder.d.ts +19 -0
- package/dist/v2/durable-core/domain/gap-builder.js +24 -0
- package/dist/v2/durable-core/domain/loop-control-evaluator.d.ts +13 -0
- package/dist/v2/durable-core/domain/loop-control-evaluator.js +24 -0
- package/dist/v2/durable-core/domain/observation-builder.d.ts +16 -0
- package/dist/v2/durable-core/domain/observation-builder.js +42 -0
- package/dist/v2/durable-core/domain/outputs.js +2 -2
- package/dist/v2/durable-core/domain/prompt-renderer.d.ts +24 -0
- package/dist/v2/durable-core/domain/prompt-renderer.js +200 -0
- package/dist/v2/durable-core/domain/reason-model.d.ts +96 -0
- package/dist/v2/durable-core/domain/reason-model.js +241 -0
- package/dist/v2/durable-core/domain/recap-recovery.d.ts +24 -0
- package/dist/v2/durable-core/domain/recap-recovery.js +71 -0
- package/dist/v2/durable-core/domain/recommendation-warnings.d.ts +20 -0
- package/dist/v2/durable-core/domain/recommendation-warnings.js +35 -0
- package/dist/v2/durable-core/domain/risk-policy-guardrails.d.ts +15 -0
- package/dist/v2/durable-core/domain/risk-policy-guardrails.js +78 -0
- package/dist/v2/durable-core/domain/validation-criteria-validator.d.ts +16 -0
- package/dist/v2/durable-core/domain/validation-criteria-validator.js +46 -0
- package/dist/v2/durable-core/domain/validation-event-builder.d.ts +26 -0
- package/dist/v2/durable-core/domain/validation-event-builder.js +100 -0
- package/dist/v2/durable-core/domain/validation-loader.d.ts +11 -0
- package/dist/v2/durable-core/domain/validation-loader.js +21 -0
- package/dist/v2/durable-core/domain/validation-requirements-extractor.d.ts +2 -0
- package/dist/v2/durable-core/domain/validation-requirements-extractor.js +58 -0
- package/dist/v2/durable-core/projections/snapshot-state.js +1 -1
- package/dist/v2/durable-core/schemas/artifacts/index.d.ts +4 -0
- package/dist/v2/durable-core/schemas/artifacts/index.js +18 -0
- package/dist/v2/durable-core/schemas/artifacts/loop-control.d.ts +66 -0
- package/dist/v2/durable-core/schemas/artifacts/loop-control.js +47 -0
- package/dist/v2/durable-core/schemas/execution-snapshot/blocked-snapshot.d.ts +598 -0
- package/dist/v2/durable-core/schemas/execution-snapshot/blocked-snapshot.js +89 -0
- package/dist/v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.d.ts +3801 -57
- package/dist/v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.js +12 -2
- package/dist/v2/durable-core/schemas/execution-snapshot/index.d.ts +2 -0
- package/dist/v2/durable-core/schemas/execution-snapshot/index.js +3 -1
- package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +6201 -2071
- package/dist/v2/durable-core/schemas/session/events.d.ts +216 -45
- package/dist/v2/durable-core/schemas/session/events.js +17 -1
- package/dist/v2/durable-core/schemas/session/validation-event.d.ts +68 -0
- package/dist/v2/durable-core/schemas/session/validation-event.js +52 -0
- package/dist/v2/durable-core/tokens/payloads.d.ts +16 -16
- package/dist/v2/infra/local/workspace-anchor/index.d.ts +9 -0
- package/dist/v2/infra/local/workspace-anchor/index.js +44 -0
- package/dist/v2/ports/workspace-anchor.port.d.ts +18 -0
- package/dist/v2/ports/workspace-anchor.port.js +2 -0
- package/dist/v2/projections/artifacts.d.ts +22 -0
- package/dist/v2/projections/artifacts.js +53 -0
- package/dist/v2/projections/projection-timing.d.ts +13 -0
- package/dist/v2/projections/projection-timing.js +23 -0
- package/dist/v2/projections/run-context.d.ts +22 -0
- package/dist/v2/projections/run-context.js +33 -0
- package/dist/v2/projections/run-dag.d.ts +1 -1
- package/dist/v2/projections/run-status-signals.js +3 -8
- package/package.json +1 -1
- package/spec/workflow.schema.json +60 -0
- package/spec/workflow.schema.v0.0.1.json +38 -0
- package/workflows/coding-task-workflow-agentic.json +11 -18
- package/workflows/test-artifact-loop-control.json +59 -0
|
@@ -65,13 +65,30 @@ let DefaultWorkflowService = class DefaultWorkflowService {
|
|
|
65
65
|
if (!step) {
|
|
66
66
|
return { valid: false, issues: [`Step '${stepId}' not found in workflow '${workflowId}'`], suggestions: [], warnings: undefined };
|
|
67
67
|
}
|
|
68
|
+
const outputContract = step.outputContract;
|
|
69
|
+
if (outputContract) {
|
|
70
|
+
return {
|
|
71
|
+
valid: false,
|
|
72
|
+
issues: [`Step '${stepId}' uses outputContract (artifact validation); validate via v2 continue_workflow path, not v1 validateStepOutput`],
|
|
73
|
+
suggestions: ['Use the v2 continue_workflow tool with output.artifacts[] to validate against the artifact contract.'],
|
|
74
|
+
warnings: undefined,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
68
77
|
const criteria = step.validationCriteria;
|
|
69
78
|
if (!criteria)
|
|
70
79
|
return { valid: true, issues: [], suggestions: [], warnings: undefined };
|
|
71
80
|
const result = await this.validationEngine.validate(output, criteria);
|
|
72
|
-
|
|
81
|
+
if (result.isErr()) {
|
|
82
|
+
return {
|
|
83
|
+
valid: false,
|
|
84
|
+
issues: [`Validation engine error: ${result.error.kind} (${result.error.message})`],
|
|
85
|
+
suggestions: ['Check validationCriteria for invalid schema/format, and retry.'],
|
|
86
|
+
warnings: undefined,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
const contextualizedWarnings = result.value.warnings?.map((w) => `Step '${workflowId}/${stepId}': ${w}`);
|
|
73
90
|
return {
|
|
74
|
-
...result,
|
|
91
|
+
...result.value,
|
|
75
92
|
warnings: contextualizedWarnings,
|
|
76
93
|
};
|
|
77
94
|
}
|