@exaudeus/workrail 3.17.0 → 3.18.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/validation-engine.js +7 -11
- package/dist/application/services/workflow-compiler.js +9 -11
- package/dist/manifest.json +27 -27
- package/dist/mcp/handlers/v2-advance-core/assessment-consequences.d.ts +1 -1
- package/dist/mcp/handlers/v2-advance-core/assessment-consequences.js +14 -11
- package/dist/mcp/handlers/v2-advance-core/assessment-validation.d.ts +5 -3
- package/dist/mcp/handlers/v2-advance-core/assessment-validation.js +109 -87
- package/dist/mcp/handlers/v2-advance-core/input-validation.d.ts +0 -4
- package/dist/mcp/handlers/v2-advance-core/input-validation.js +1 -3
- package/dist/mcp/handlers/v2-advance-core/outcome-blocked.js +8 -3
- package/dist/mcp/handlers/v2-advance-core/outcome-success.js +8 -3
- package/dist/mcp/handlers/v2-execution/replay.js +4 -4
- package/dist/mcp/output-schemas.d.ts +12 -12
- package/dist/mcp/output-schemas.js +10 -11
- package/dist/v2/durable-core/domain/prompt-renderer.js +4 -0
- package/package.json +1 -1
- package/spec/authoring-spec.json +3 -3
- package/spec/workflow.schema.json +1 -2
- package/workflows/workflow-for-workflows.json +558 -448
|
@@ -1368,7 +1368,7 @@ export declare const V2BindingDriftWarningSchema: z.ZodObject<{
|
|
|
1368
1368
|
currentValue: string;
|
|
1369
1369
|
}>;
|
|
1370
1370
|
export declare const V2StepContextSchema: z.ZodObject<{
|
|
1371
|
-
assessments: z.ZodOptional<z.ZodObject<{
|
|
1371
|
+
assessments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1372
1372
|
assessmentId: z.ZodString;
|
|
1373
1373
|
dimensions: z.ZodArray<z.ZodObject<{
|
|
1374
1374
|
dimensionId: z.ZodString;
|
|
@@ -1400,7 +1400,7 @@ export declare const V2StepContextSchema: z.ZodObject<{
|
|
|
1400
1400
|
rationale?: string | undefined;
|
|
1401
1401
|
}[];
|
|
1402
1402
|
normalizationNotes: readonly string[];
|
|
1403
|
-
}>>;
|
|
1403
|
+
}>, "many">>;
|
|
1404
1404
|
}, "strip", z.ZodTypeAny, {
|
|
1405
1405
|
assessments?: {
|
|
1406
1406
|
assessmentId: string;
|
|
@@ -1410,7 +1410,7 @@ export declare const V2StepContextSchema: z.ZodObject<{
|
|
|
1410
1410
|
rationale?: string | undefined;
|
|
1411
1411
|
}[];
|
|
1412
1412
|
normalizationNotes: readonly string[];
|
|
1413
|
-
} | undefined;
|
|
1413
|
+
}[] | undefined;
|
|
1414
1414
|
}, {
|
|
1415
1415
|
assessments?: {
|
|
1416
1416
|
assessmentId: string;
|
|
@@ -1420,7 +1420,7 @@ export declare const V2StepContextSchema: z.ZodObject<{
|
|
|
1420
1420
|
rationale?: string | undefined;
|
|
1421
1421
|
}[];
|
|
1422
1422
|
normalizationNotes: readonly string[];
|
|
1423
|
-
} | undefined;
|
|
1423
|
+
}[] | undefined;
|
|
1424
1424
|
}>;
|
|
1425
1425
|
export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
1426
1426
|
kind: z.ZodLiteral<"ok">;
|
|
@@ -1491,7 +1491,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
1491
1491
|
currentValue: string;
|
|
1492
1492
|
}>, "many">>;
|
|
1493
1493
|
stepContext: z.ZodOptional<z.ZodObject<{
|
|
1494
|
-
assessments: z.ZodOptional<z.ZodObject<{
|
|
1494
|
+
assessments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1495
1495
|
assessmentId: z.ZodString;
|
|
1496
1496
|
dimensions: z.ZodArray<z.ZodObject<{
|
|
1497
1497
|
dimensionId: z.ZodString;
|
|
@@ -1523,7 +1523,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
1523
1523
|
rationale?: string | undefined;
|
|
1524
1524
|
}[];
|
|
1525
1525
|
normalizationNotes: readonly string[];
|
|
1526
|
-
}>>;
|
|
1526
|
+
}>, "many">>;
|
|
1527
1527
|
}, "strip", z.ZodTypeAny, {
|
|
1528
1528
|
assessments?: {
|
|
1529
1529
|
assessmentId: string;
|
|
@@ -1533,7 +1533,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
1533
1533
|
rationale?: string | undefined;
|
|
1534
1534
|
}[];
|
|
1535
1535
|
normalizationNotes: readonly string[];
|
|
1536
|
-
} | undefined;
|
|
1536
|
+
}[] | undefined;
|
|
1537
1537
|
}, {
|
|
1538
1538
|
assessments?: {
|
|
1539
1539
|
assessmentId: string;
|
|
@@ -1543,7 +1543,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
1543
1543
|
rationale?: string | undefined;
|
|
1544
1544
|
}[];
|
|
1545
1545
|
normalizationNotes: readonly string[];
|
|
1546
|
-
} | undefined;
|
|
1546
|
+
}[] | undefined;
|
|
1547
1547
|
}>>;
|
|
1548
1548
|
}, "strip", z.ZodTypeAny, {
|
|
1549
1549
|
kind: "ok";
|
|
@@ -1582,7 +1582,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
1582
1582
|
rationale?: string | undefined;
|
|
1583
1583
|
}[];
|
|
1584
1584
|
normalizationNotes: readonly string[];
|
|
1585
|
-
} | undefined;
|
|
1585
|
+
}[] | undefined;
|
|
1586
1586
|
} | undefined;
|
|
1587
1587
|
}, {
|
|
1588
1588
|
kind: "ok";
|
|
@@ -1621,7 +1621,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
1621
1621
|
rationale?: string | undefined;
|
|
1622
1622
|
}[];
|
|
1623
1623
|
normalizationNotes: readonly string[];
|
|
1624
|
-
} | undefined;
|
|
1624
|
+
}[] | undefined;
|
|
1625
1625
|
} | undefined;
|
|
1626
1626
|
}>, z.ZodObject<{
|
|
1627
1627
|
kind: z.ZodLiteral<"blocked">;
|
|
@@ -2058,7 +2058,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
2058
2058
|
rationale?: string | undefined;
|
|
2059
2059
|
}[];
|
|
2060
2060
|
normalizationNotes: readonly string[];
|
|
2061
|
-
} | undefined;
|
|
2061
|
+
}[] | undefined;
|
|
2062
2062
|
} | undefined;
|
|
2063
2063
|
} | {
|
|
2064
2064
|
kind: "blocked";
|
|
@@ -2155,7 +2155,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
2155
2155
|
rationale?: string | undefined;
|
|
2156
2156
|
}[];
|
|
2157
2157
|
normalizationNotes: readonly string[];
|
|
2158
|
-
} | undefined;
|
|
2158
|
+
}[] | undefined;
|
|
2159
2159
|
} | undefined;
|
|
2160
2160
|
} | {
|
|
2161
2161
|
kind: "blocked";
|
|
@@ -288,18 +288,17 @@ exports.V2BindingDriftWarningSchema = zod_1.z.object({
|
|
|
288
288
|
pinnedValue: zod_1.z.string().min(1),
|
|
289
289
|
currentValue: zod_1.z.string().min(1),
|
|
290
290
|
});
|
|
291
|
+
const V2StepContextAssessmentSchema = zod_1.z.object({
|
|
292
|
+
assessmentId: zod_1.z.string().min(1),
|
|
293
|
+
dimensions: zod_1.z.array(zod_1.z.object({
|
|
294
|
+
dimensionId: zod_1.z.string().min(1),
|
|
295
|
+
level: zod_1.z.string().min(1),
|
|
296
|
+
rationale: zod_1.z.string().optional(),
|
|
297
|
+
})),
|
|
298
|
+
normalizationNotes: zod_1.z.array(zod_1.z.string()).readonly(),
|
|
299
|
+
});
|
|
291
300
|
exports.V2StepContextSchema = zod_1.z.object({
|
|
292
|
-
assessments: zod_1.z
|
|
293
|
-
.object({
|
|
294
|
-
assessmentId: zod_1.z.string().min(1),
|
|
295
|
-
dimensions: zod_1.z.array(zod_1.z.object({
|
|
296
|
-
dimensionId: zod_1.z.string().min(1),
|
|
297
|
-
level: zod_1.z.string().min(1),
|
|
298
|
-
rationale: zod_1.z.string().optional(),
|
|
299
|
-
})),
|
|
300
|
-
normalizationNotes: zod_1.z.array(zod_1.z.string()).readonly(),
|
|
301
|
-
})
|
|
302
|
-
.optional(),
|
|
301
|
+
assessments: zod_1.z.array(V2StepContextAssessmentSchema).optional(),
|
|
303
302
|
});
|
|
304
303
|
const V2ContinueWorkflowOkSchema = zod_1.z.object({
|
|
305
304
|
kind: zod_1.z.literal('ok'),
|
|
@@ -177,9 +177,13 @@ function formatOutputContractRequirements(outputContract) {
|
|
|
177
177
|
function formatAssessmentRequirements(assessments) {
|
|
178
178
|
if (assessments.length === 0)
|
|
179
179
|
return [];
|
|
180
|
+
const multiRef = assessments.length > 1;
|
|
180
181
|
const requirements = [];
|
|
181
182
|
for (const assessment of assessments) {
|
|
182
183
|
requirements.push('Provide an artifact with kind: "wr.assessment"');
|
|
184
|
+
if (multiRef) {
|
|
185
|
+
requirements.push(`Set assessmentId: "${assessment.id}" on the artifact so the engine can match it to the correct assessment.`);
|
|
186
|
+
}
|
|
183
187
|
requirements.push(`Assessment target: "${assessment.id}"`);
|
|
184
188
|
requirements.push(`Dimensions: ${assessment.dimensions.map((dimension) => `${dimension.id} (${dimension.levels.join(' | ')})`).join(', ')}`);
|
|
185
189
|
requirements.push('Use only canonical dimension levels. If the engine rejects the artifact, correct the submitted levels instead of inventing new ones.');
|
package/package.json
CHANGED
package/spec/authoring-spec.json
CHANGED
|
@@ -998,11 +998,11 @@
|
|
|
998
998
|
"step.assessmentRefs",
|
|
999
999
|
"step.assessmentConsequences"
|
|
1000
1000
|
],
|
|
1001
|
-
"rule": "
|
|
1002
|
-
"why": "
|
|
1001
|
+
"rule": "A step may declare one or more assessmentRefs and at most one assessmentConsequences entry. When assessmentConsequences is present, at least one ref is required. Use anyEqualsLevel as the trigger -- the engine checks all submitted dimensions across all referenced assessments and fires if any equals that level.",
|
|
1002
|
+
"why": "Multiple refs allow composing separate orthogonal assessment definitions (e.g. quality-gate + coverage-gate) behind a single blocking consequence, without forcing unrelated dimensions into one monolithic definition.",
|
|
1003
1003
|
"enforcement": ["schema"],
|
|
1004
1004
|
"checks": [
|
|
1005
|
-
"
|
|
1005
|
+
"At least one assessmentRefs entry when assessmentConsequences is present.",
|
|
1006
1006
|
"No more than one assessmentConsequences entry per step.",
|
|
1007
1007
|
"The consequence uses anyEqualsLevel to declare which level blocks -- not a named dimension."
|
|
1008
1008
|
],
|
|
@@ -456,14 +456,13 @@
|
|
|
456
456
|
},
|
|
457
457
|
"assessmentRefs": {
|
|
458
458
|
"type": "array",
|
|
459
|
-
"description": "References to workflow-level assessment definitions expected for this step.
|
|
459
|
+
"description": "References to workflow-level assessment definitions expected for this step. When assessmentConsequences is present, at least one ref is required; multiple refs are supported and the consequence fires if any dimension across any referenced assessment equals the trigger level.",
|
|
460
460
|
"items": {
|
|
461
461
|
"type": "string",
|
|
462
462
|
"minLength": 1,
|
|
463
463
|
"maxLength": 64
|
|
464
464
|
},
|
|
465
465
|
"minItems": 1,
|
|
466
|
-
"maxItems": 1,
|
|
467
466
|
"uniqueItems": true
|
|
468
467
|
},
|
|
469
468
|
"assessmentConsequences": {
|