@exaudeus/workrail 1.7.1 → 1.7.2

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.
Files changed (26) hide show
  1. package/dist/application/services/validation-engine.js +3 -0
  2. package/dist/manifest.json +46 -46
  3. package/dist/mcp/handlers/v2-advance-core/index.js +4 -1
  4. package/dist/mcp/handlers/v2-advance-core/input-validation.d.ts +1 -0
  5. package/dist/mcp/handlers/v2-advance-core/input-validation.js +3 -0
  6. package/dist/mcp/output-schemas.d.ts +18 -18
  7. package/dist/mcp/output-schemas.js +3 -0
  8. package/dist/types/workflow-definition.d.ts +1 -0
  9. package/dist/v2/durable-core/domain/blocked-node-builder.js +2 -0
  10. package/dist/v2/durable-core/domain/blocking-decision.d.ts +3 -0
  11. package/dist/v2/durable-core/domain/blocking-decision.js +9 -0
  12. package/dist/v2/durable-core/domain/prompt-renderer.js +6 -1
  13. package/dist/v2/durable-core/domain/reason-model.d.ts +5 -2
  14. package/dist/v2/durable-core/domain/reason-model.js +17 -2
  15. package/dist/v2/durable-core/domain/risk-policy-guardrails.js +1 -0
  16. package/dist/v2/durable-core/schemas/execution-snapshot/blocked-snapshot.d.ts +38 -14
  17. package/dist/v2/durable-core/schemas/execution-snapshot/blocked-snapshot.js +4 -0
  18. package/dist/v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.d.ts +177 -78
  19. package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +240 -144
  20. package/dist/v2/durable-core/schemas/session/blockers.d.ts +11 -11
  21. package/dist/v2/durable-core/schemas/session/blockers.js +3 -0
  22. package/dist/v2/durable-core/schemas/session/events.d.ts +27 -27
  23. package/dist/v2/durable-core/schemas/session/gaps.d.ts +16 -16
  24. package/dist/v2/durable-core/schemas/session/gaps.js +2 -2
  25. package/package.json +1 -1
  26. package/spec/workflow.schema.json +5 -0
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const BlockerCodeSchema: z.ZodEnum<["USER_ONLY_DEPENDENCY", "MISSING_REQUIRED_OUTPUT", "INVALID_REQUIRED_OUTPUT", "REQUIRED_CAPABILITY_UNKNOWN", "REQUIRED_CAPABILITY_UNAVAILABLE", "INVARIANT_VIOLATION", "STORAGE_CORRUPTION_DETECTED"]>;
2
+ export declare const BlockerCodeSchema: z.ZodEnum<["USER_ONLY_DEPENDENCY", "MISSING_REQUIRED_OUTPUT", "INVALID_REQUIRED_OUTPUT", "MISSING_REQUIRED_NOTES", "MISSING_CONTEXT_KEY", "CONTEXT_BUDGET_EXCEEDED", "REQUIRED_CAPABILITY_UNKNOWN", "REQUIRED_CAPABILITY_UNAVAILABLE", "INVARIANT_VIOLATION", "STORAGE_CORRUPTION_DETECTED"]>;
3
3
  export declare const BlockerPointerSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
4
4
  kind: z.ZodLiteral<"context_key">;
5
5
  key: z.ZodString;
@@ -44,7 +44,7 @@ export declare const BlockerPointerSchema: z.ZodDiscriminatedUnion<"kind", [z.Zo
44
44
  stepId: string;
45
45
  }>]>;
46
46
  export declare const BlockerSchema: z.ZodObject<{
47
- code: z.ZodEnum<["USER_ONLY_DEPENDENCY", "MISSING_REQUIRED_OUTPUT", "INVALID_REQUIRED_OUTPUT", "REQUIRED_CAPABILITY_UNKNOWN", "REQUIRED_CAPABILITY_UNAVAILABLE", "INVARIANT_VIOLATION", "STORAGE_CORRUPTION_DETECTED"]>;
47
+ code: z.ZodEnum<["USER_ONLY_DEPENDENCY", "MISSING_REQUIRED_OUTPUT", "INVALID_REQUIRED_OUTPUT", "MISSING_REQUIRED_NOTES", "MISSING_CONTEXT_KEY", "CONTEXT_BUDGET_EXCEEDED", "REQUIRED_CAPABILITY_UNKNOWN", "REQUIRED_CAPABILITY_UNAVAILABLE", "INVARIANT_VIOLATION", "STORAGE_CORRUPTION_DETECTED"]>;
48
48
  pointer: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
49
49
  kind: z.ZodLiteral<"context_key">;
50
50
  key: z.ZodString;
@@ -92,7 +92,7 @@ export declare const BlockerSchema: z.ZodObject<{
92
92
  suggestedFix: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
93
93
  }, "strip", z.ZodTypeAny, {
94
94
  message: string;
95
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
95
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
96
96
  pointer: {
97
97
  key: string;
98
98
  kind: "context_key";
@@ -111,7 +111,7 @@ export declare const BlockerSchema: z.ZodObject<{
111
111
  suggestedFix?: string | undefined;
112
112
  }, {
113
113
  message: string;
114
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
114
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
115
115
  pointer: {
116
116
  key: string;
117
117
  kind: "context_key";
@@ -131,7 +131,7 @@ export declare const BlockerSchema: z.ZodObject<{
131
131
  }>;
132
132
  export declare const BlockerReportV1Schema: z.ZodEffects<z.ZodObject<{
133
133
  blockers: z.ZodReadonly<z.ZodArray<z.ZodObject<{
134
- code: z.ZodEnum<["USER_ONLY_DEPENDENCY", "MISSING_REQUIRED_OUTPUT", "INVALID_REQUIRED_OUTPUT", "REQUIRED_CAPABILITY_UNKNOWN", "REQUIRED_CAPABILITY_UNAVAILABLE", "INVARIANT_VIOLATION", "STORAGE_CORRUPTION_DETECTED"]>;
134
+ code: z.ZodEnum<["USER_ONLY_DEPENDENCY", "MISSING_REQUIRED_OUTPUT", "INVALID_REQUIRED_OUTPUT", "MISSING_REQUIRED_NOTES", "MISSING_CONTEXT_KEY", "CONTEXT_BUDGET_EXCEEDED", "REQUIRED_CAPABILITY_UNKNOWN", "REQUIRED_CAPABILITY_UNAVAILABLE", "INVARIANT_VIOLATION", "STORAGE_CORRUPTION_DETECTED"]>;
135
135
  pointer: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
136
136
  kind: z.ZodLiteral<"context_key">;
137
137
  key: z.ZodString;
@@ -179,7 +179,7 @@ export declare const BlockerReportV1Schema: z.ZodEffects<z.ZodObject<{
179
179
  suggestedFix: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
180
180
  }, "strip", z.ZodTypeAny, {
181
181
  message: string;
182
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
182
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
183
183
  pointer: {
184
184
  key: string;
185
185
  kind: "context_key";
@@ -198,7 +198,7 @@ export declare const BlockerReportV1Schema: z.ZodEffects<z.ZodObject<{
198
198
  suggestedFix?: string | undefined;
199
199
  }, {
200
200
  message: string;
201
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
201
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
202
202
  pointer: {
203
203
  key: string;
204
204
  kind: "context_key";
@@ -219,7 +219,7 @@ export declare const BlockerReportV1Schema: z.ZodEffects<z.ZodObject<{
219
219
  }, "strip", z.ZodTypeAny, {
220
220
  blockers: readonly {
221
221
  message: string;
222
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
222
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
223
223
  pointer: {
224
224
  key: string;
225
225
  kind: "context_key";
@@ -240,7 +240,7 @@ export declare const BlockerReportV1Schema: z.ZodEffects<z.ZodObject<{
240
240
  }, {
241
241
  blockers: readonly {
242
242
  message: string;
243
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
243
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
244
244
  pointer: {
245
245
  key: string;
246
246
  kind: "context_key";
@@ -261,7 +261,7 @@ export declare const BlockerReportV1Schema: z.ZodEffects<z.ZodObject<{
261
261
  }>, {
262
262
  blockers: readonly {
263
263
  message: string;
264
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
264
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
265
265
  pointer: {
266
266
  key: string;
267
267
  kind: "context_key";
@@ -282,7 +282,7 @@ export declare const BlockerReportV1Schema: z.ZodEffects<z.ZodObject<{
282
282
  }, {
283
283
  blockers: readonly {
284
284
  message: string;
285
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
285
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
286
286
  pointer: {
287
287
  key: string;
288
288
  kind: "context_key";
@@ -8,6 +8,9 @@ exports.BlockerCodeSchema = zod_1.z.enum([
8
8
  'USER_ONLY_DEPENDENCY',
9
9
  'MISSING_REQUIRED_OUTPUT',
10
10
  'INVALID_REQUIRED_OUTPUT',
11
+ 'MISSING_REQUIRED_NOTES',
12
+ 'MISSING_CONTEXT_KEY',
13
+ 'CONTEXT_BUDGET_EXCEEDED',
11
14
  'REQUIRED_CAPABILITY_UNKNOWN',
12
15
  'REQUIRED_CAPABILITY_UNAVAILABLE',
13
16
  'INVARIANT_VIOLATION',
@@ -452,7 +452,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
452
452
  kind: z.ZodLiteral<"blocked">;
453
453
  blockers: z.ZodEffects<z.ZodObject<{
454
454
  blockers: z.ZodReadonly<z.ZodArray<z.ZodObject<{
455
- code: z.ZodEnum<["USER_ONLY_DEPENDENCY", "MISSING_REQUIRED_OUTPUT", "INVALID_REQUIRED_OUTPUT", "REQUIRED_CAPABILITY_UNKNOWN", "REQUIRED_CAPABILITY_UNAVAILABLE", "INVARIANT_VIOLATION", "STORAGE_CORRUPTION_DETECTED"]>;
455
+ code: z.ZodEnum<["USER_ONLY_DEPENDENCY", "MISSING_REQUIRED_OUTPUT", "INVALID_REQUIRED_OUTPUT", "MISSING_REQUIRED_NOTES", "MISSING_CONTEXT_KEY", "CONTEXT_BUDGET_EXCEEDED", "REQUIRED_CAPABILITY_UNKNOWN", "REQUIRED_CAPABILITY_UNAVAILABLE", "INVARIANT_VIOLATION", "STORAGE_CORRUPTION_DETECTED"]>;
456
456
  pointer: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
457
457
  kind: z.ZodLiteral<"context_key">;
458
458
  key: z.ZodString;
@@ -500,7 +500,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
500
500
  suggestedFix: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
501
501
  }, "strip", z.ZodTypeAny, {
502
502
  message: string;
503
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
503
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
504
504
  pointer: {
505
505
  key: string;
506
506
  kind: "context_key";
@@ -519,7 +519,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
519
519
  suggestedFix?: string | undefined;
520
520
  }, {
521
521
  message: string;
522
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
522
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
523
523
  pointer: {
524
524
  key: string;
525
525
  kind: "context_key";
@@ -540,7 +540,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
540
540
  }, "strip", z.ZodTypeAny, {
541
541
  blockers: readonly {
542
542
  message: string;
543
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
543
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
544
544
  pointer: {
545
545
  key: string;
546
546
  kind: "context_key";
@@ -561,7 +561,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
561
561
  }, {
562
562
  blockers: readonly {
563
563
  message: string;
564
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
564
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
565
565
  pointer: {
566
566
  key: string;
567
567
  kind: "context_key";
@@ -582,7 +582,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
582
582
  }>, {
583
583
  blockers: readonly {
584
584
  message: string;
585
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
585
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
586
586
  pointer: {
587
587
  key: string;
588
588
  kind: "context_key";
@@ -603,7 +603,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
603
603
  }, {
604
604
  blockers: readonly {
605
605
  message: string;
606
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
606
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
607
607
  pointer: {
608
608
  key: string;
609
609
  kind: "context_key";
@@ -627,7 +627,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
627
627
  blockers: {
628
628
  blockers: readonly {
629
629
  message: string;
630
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
630
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
631
631
  pointer: {
632
632
  key: string;
633
633
  kind: "context_key";
@@ -651,7 +651,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
651
651
  blockers: {
652
652
  blockers: readonly {
653
653
  message: string;
654
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
654
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
655
655
  pointer: {
656
656
  key: string;
657
657
  kind: "context_key";
@@ -688,7 +688,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
688
688
  blockers: {
689
689
  blockers: readonly {
690
690
  message: string;
691
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
691
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
692
692
  pointer: {
693
693
  key: string;
694
694
  kind: "context_key";
@@ -719,7 +719,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
719
719
  blockers: {
720
720
  blockers: readonly {
721
721
  message: string;
722
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
722
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
723
723
  pointer: {
724
724
  key: string;
725
725
  kind: "context_key";
@@ -754,7 +754,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
754
754
  blockers: {
755
755
  blockers: readonly {
756
756
  message: string;
757
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
757
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
758
758
  pointer: {
759
759
  key: string;
760
760
  kind: "context_key";
@@ -797,7 +797,7 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
797
797
  blockers: {
798
798
  blockers: readonly {
799
799
  message: string;
800
- code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
800
+ code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "MISSING_REQUIRED_NOTES" | "MISSING_CONTEXT_KEY" | "CONTEXT_BUDGET_EXCEEDED" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
801
801
  pointer: {
802
802
  key: string;
803
803
  kind: "context_key";
@@ -1590,12 +1590,12 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1590
1590
  category: "user_only_dependency";
1591
1591
  }>, z.ZodObject<{
1592
1592
  category: z.ZodLiteral<"contract_violation">;
1593
- detail: z.ZodEnum<["missing_required_output", "invalid_required_output"]>;
1593
+ detail: z.ZodEnum<["missing_required_output", "invalid_required_output", "missing_required_notes"]>;
1594
1594
  }, "strip", z.ZodTypeAny, {
1595
- detail: "invalid_required_output" | "missing_required_output";
1595
+ detail: "invalid_required_output" | "missing_required_output" | "missing_required_notes";
1596
1596
  category: "contract_violation";
1597
1597
  }, {
1598
- detail: "invalid_required_output" | "missing_required_output";
1598
+ detail: "invalid_required_output" | "missing_required_output" | "missing_required_notes";
1599
1599
  category: "contract_violation";
1600
1600
  }>, z.ZodObject<{
1601
1601
  category: z.ZodLiteral<"capability_missing">;
@@ -1608,12 +1608,12 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1608
1608
  category: "capability_missing";
1609
1609
  }>, z.ZodObject<{
1610
1610
  category: z.ZodLiteral<"unexpected">;
1611
- detail: z.ZodEnum<["invariant_violation", "storage_corruption_detected"]>;
1611
+ detail: z.ZodEnum<["invariant_violation", "storage_corruption_detected", "evaluation_error"]>;
1612
1612
  }, "strip", z.ZodTypeAny, {
1613
- detail: "invariant_violation" | "storage_corruption_detected";
1613
+ detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
1614
1614
  category: "unexpected";
1615
1615
  }, {
1616
- detail: "invariant_violation" | "storage_corruption_detected";
1616
+ detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
1617
1617
  category: "unexpected";
1618
1618
  }>]>;
1619
1619
  summary: z.ZodString;
@@ -1657,13 +1657,13 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1657
1657
  detail: "needs_user_secret_or_token" | "needs_user_account_access" | "needs_user_artifact" | "needs_user_choice" | "needs_user_approval" | "needs_user_environment_action";
1658
1658
  category: "user_only_dependency";
1659
1659
  } | {
1660
- detail: "invalid_required_output" | "missing_required_output";
1660
+ detail: "invalid_required_output" | "missing_required_output" | "missing_required_notes";
1661
1661
  category: "contract_violation";
1662
1662
  } | {
1663
1663
  detail: "required_capability_unknown" | "required_capability_unavailable";
1664
1664
  category: "capability_missing";
1665
1665
  } | {
1666
- detail: "invariant_violation" | "storage_corruption_detected";
1666
+ detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
1667
1667
  category: "unexpected";
1668
1668
  };
1669
1669
  gapId: string;
@@ -1687,13 +1687,13 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1687
1687
  detail: "needs_user_secret_or_token" | "needs_user_account_access" | "needs_user_artifact" | "needs_user_choice" | "needs_user_approval" | "needs_user_environment_action";
1688
1688
  category: "user_only_dependency";
1689
1689
  } | {
1690
- detail: "invalid_required_output" | "missing_required_output";
1690
+ detail: "invalid_required_output" | "missing_required_output" | "missing_required_notes";
1691
1691
  category: "contract_violation";
1692
1692
  } | {
1693
1693
  detail: "required_capability_unknown" | "required_capability_unavailable";
1694
1694
  category: "capability_missing";
1695
1695
  } | {
1696
- detail: "invariant_violation" | "storage_corruption_detected";
1696
+ detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
1697
1697
  category: "unexpected";
1698
1698
  };
1699
1699
  gapId: string;
@@ -1721,13 +1721,13 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1721
1721
  detail: "needs_user_secret_or_token" | "needs_user_account_access" | "needs_user_artifact" | "needs_user_choice" | "needs_user_approval" | "needs_user_environment_action";
1722
1722
  category: "user_only_dependency";
1723
1723
  } | {
1724
- detail: "invalid_required_output" | "missing_required_output";
1724
+ detail: "invalid_required_output" | "missing_required_output" | "missing_required_notes";
1725
1725
  category: "contract_violation";
1726
1726
  } | {
1727
1727
  detail: "required_capability_unknown" | "required_capability_unavailable";
1728
1728
  category: "capability_missing";
1729
1729
  } | {
1730
- detail: "invariant_violation" | "storage_corruption_detected";
1730
+ detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
1731
1731
  category: "unexpected";
1732
1732
  };
1733
1733
  gapId: string;
@@ -1763,13 +1763,13 @@ export declare const DomainEventV1Schema: z.ZodDiscriminatedUnion<"kind", [z.Zod
1763
1763
  detail: "needs_user_secret_or_token" | "needs_user_account_access" | "needs_user_artifact" | "needs_user_choice" | "needs_user_approval" | "needs_user_environment_action";
1764
1764
  category: "user_only_dependency";
1765
1765
  } | {
1766
- detail: "invalid_required_output" | "missing_required_output";
1766
+ detail: "invalid_required_output" | "missing_required_output" | "missing_required_notes";
1767
1767
  category: "contract_violation";
1768
1768
  } | {
1769
1769
  detail: "required_capability_unknown" | "required_capability_unavailable";
1770
1770
  category: "capability_missing";
1771
1771
  } | {
1772
- detail: "invariant_violation" | "storage_corruption_detected";
1772
+ detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
1773
1773
  category: "unexpected";
1774
1774
  };
1775
1775
  gapId: string;
@@ -11,12 +11,12 @@ export declare const GapReasonSchema: z.ZodDiscriminatedUnion<"category", [z.Zod
11
11
  category: "user_only_dependency";
12
12
  }>, z.ZodObject<{
13
13
  category: z.ZodLiteral<"contract_violation">;
14
- detail: z.ZodEnum<["missing_required_output", "invalid_required_output"]>;
14
+ detail: z.ZodEnum<["missing_required_output", "invalid_required_output", "missing_required_notes"]>;
15
15
  }, "strip", z.ZodTypeAny, {
16
- detail: "invalid_required_output" | "missing_required_output";
16
+ detail: "invalid_required_output" | "missing_required_output" | "missing_required_notes";
17
17
  category: "contract_violation";
18
18
  }, {
19
- detail: "invalid_required_output" | "missing_required_output";
19
+ detail: "invalid_required_output" | "missing_required_output" | "missing_required_notes";
20
20
  category: "contract_violation";
21
21
  }>, z.ZodObject<{
22
22
  category: z.ZodLiteral<"capability_missing">;
@@ -29,12 +29,12 @@ export declare const GapReasonSchema: z.ZodDiscriminatedUnion<"category", [z.Zod
29
29
  category: "capability_missing";
30
30
  }>, z.ZodObject<{
31
31
  category: z.ZodLiteral<"unexpected">;
32
- detail: z.ZodEnum<["invariant_violation", "storage_corruption_detected"]>;
32
+ detail: z.ZodEnum<["invariant_violation", "storage_corruption_detected", "evaluation_error"]>;
33
33
  }, "strip", z.ZodTypeAny, {
34
- detail: "invariant_violation" | "storage_corruption_detected";
34
+ detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
35
35
  category: "unexpected";
36
36
  }, {
37
- detail: "invariant_violation" | "storage_corruption_detected";
37
+ detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
38
38
  category: "unexpected";
39
39
  }>]>;
40
40
  export declare const GapResolutionSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -86,12 +86,12 @@ export declare const GapRecordedDataV1Schema: z.ZodObject<{
86
86
  category: "user_only_dependency";
87
87
  }>, z.ZodObject<{
88
88
  category: z.ZodLiteral<"contract_violation">;
89
- detail: z.ZodEnum<["missing_required_output", "invalid_required_output"]>;
89
+ detail: z.ZodEnum<["missing_required_output", "invalid_required_output", "missing_required_notes"]>;
90
90
  }, "strip", z.ZodTypeAny, {
91
- detail: "invalid_required_output" | "missing_required_output";
91
+ detail: "invalid_required_output" | "missing_required_output" | "missing_required_notes";
92
92
  category: "contract_violation";
93
93
  }, {
94
- detail: "invalid_required_output" | "missing_required_output";
94
+ detail: "invalid_required_output" | "missing_required_output" | "missing_required_notes";
95
95
  category: "contract_violation";
96
96
  }>, z.ZodObject<{
97
97
  category: z.ZodLiteral<"capability_missing">;
@@ -104,12 +104,12 @@ export declare const GapRecordedDataV1Schema: z.ZodObject<{
104
104
  category: "capability_missing";
105
105
  }>, z.ZodObject<{
106
106
  category: z.ZodLiteral<"unexpected">;
107
- detail: z.ZodEnum<["invariant_violation", "storage_corruption_detected"]>;
107
+ detail: z.ZodEnum<["invariant_violation", "storage_corruption_detected", "evaluation_error"]>;
108
108
  }, "strip", z.ZodTypeAny, {
109
- detail: "invariant_violation" | "storage_corruption_detected";
109
+ detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
110
110
  category: "unexpected";
111
111
  }, {
112
- detail: "invariant_violation" | "storage_corruption_detected";
112
+ detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
113
113
  category: "unexpected";
114
114
  }>]>;
115
115
  summary: z.ZodString;
@@ -153,13 +153,13 @@ export declare const GapRecordedDataV1Schema: z.ZodObject<{
153
153
  detail: "needs_user_secret_or_token" | "needs_user_account_access" | "needs_user_artifact" | "needs_user_choice" | "needs_user_approval" | "needs_user_environment_action";
154
154
  category: "user_only_dependency";
155
155
  } | {
156
- detail: "invalid_required_output" | "missing_required_output";
156
+ detail: "invalid_required_output" | "missing_required_output" | "missing_required_notes";
157
157
  category: "contract_violation";
158
158
  } | {
159
159
  detail: "required_capability_unknown" | "required_capability_unavailable";
160
160
  category: "capability_missing";
161
161
  } | {
162
- detail: "invariant_violation" | "storage_corruption_detected";
162
+ detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
163
163
  category: "unexpected";
164
164
  };
165
165
  gapId: string;
@@ -183,13 +183,13 @@ export declare const GapRecordedDataV1Schema: z.ZodObject<{
183
183
  detail: "needs_user_secret_or_token" | "needs_user_account_access" | "needs_user_artifact" | "needs_user_choice" | "needs_user_approval" | "needs_user_environment_action";
184
184
  category: "user_only_dependency";
185
185
  } | {
186
- detail: "invalid_required_output" | "missing_required_output";
186
+ detail: "invalid_required_output" | "missing_required_output" | "missing_required_notes";
187
187
  category: "contract_violation";
188
188
  } | {
189
189
  detail: "required_capability_unknown" | "required_capability_unavailable";
190
190
  category: "capability_missing";
191
191
  } | {
192
- detail: "invariant_violation" | "storage_corruption_detected";
192
+ detail: "invariant_violation" | "storage_corruption_detected" | "evaluation_error";
193
193
  category: "unexpected";
194
194
  };
195
195
  gapId: string;
@@ -12,12 +12,12 @@ exports.UserOnlyDependencyReasonSchema = zod_1.z.enum([
12
12
  ]);
13
13
  exports.GapReasonSchema = zod_1.z.discriminatedUnion('category', [
14
14
  zod_1.z.object({ category: zod_1.z.literal('user_only_dependency'), detail: exports.UserOnlyDependencyReasonSchema }),
15
- zod_1.z.object({ category: zod_1.z.literal('contract_violation'), detail: zod_1.z.enum(['missing_required_output', 'invalid_required_output']) }),
15
+ zod_1.z.object({ category: zod_1.z.literal('contract_violation'), detail: zod_1.z.enum(['missing_required_output', 'invalid_required_output', 'missing_required_notes']) }),
16
16
  zod_1.z.object({
17
17
  category: zod_1.z.literal('capability_missing'),
18
18
  detail: zod_1.z.enum(['required_capability_unavailable', 'required_capability_unknown']),
19
19
  }),
20
- zod_1.z.object({ category: zod_1.z.literal('unexpected'), detail: zod_1.z.enum(['invariant_violation', 'storage_corruption_detected']) }),
20
+ zod_1.z.object({ category: zod_1.z.literal('unexpected'), detail: zod_1.z.enum(['invariant_violation', 'storage_corruption_detected', 'evaluation_error']) }),
21
21
  ]);
22
22
  exports.GapResolutionSchema = zod_1.z.discriminatedUnion('kind', [
23
23
  zod_1.z.object({ kind: zod_1.z.literal('unresolved') }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exaudeus/workrail",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Step-by-step workflow enforcement for AI agents via MCP",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -187,6 +187,7 @@
187
187
  "runCondition": { "$ref": "#/$defs/condition" },
188
188
  "validationCriteria": { "oneOf": [ { "type": "array", "items": { "$ref": "#/$defs/validationRule" } }, { "$ref": "#/$defs/validationComposition" } ] },
189
189
  "outputContract": { "$ref": "#/$defs/outputContract" },
190
+ "notesOptional": { "type": "boolean", "description": "When true, output.notesMarkdown is not required for this step. Steps with outputContract are automatically exempt. Use sparingly for mechanical steps with no substantive work to document." },
190
191
  "functionDefinitions": { "type": "array", "items": { "$ref": "#/$defs/functionDefinition" } },
191
192
  "functionCalls": { "type": "array", "items": { "$ref": "#/$defs/functionCall" } },
192
193
  "functionReferences": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*\\(\\)$" } }
@@ -242,6 +243,10 @@
242
243
  },
243
244
  "runCondition": {
244
245
  "$ref": "#/$defs/condition"
246
+ },
247
+ "notesOptional": {
248
+ "type": "boolean",
249
+ "description": "When true, output.notesMarkdown is not required for this step. Steps with outputContract are automatically exempt."
245
250
  }
246
251
  },
247
252
  "required": [