@exaudeus/workrail 3.1.0 → 3.2.1

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.
@@ -814,8 +814,8 @@
814
814
  "bytes": 3036
815
815
  },
816
816
  "mcp/handlers/v2-execution/start.js": {
817
- "sha256": "5a7a811a40f70f82feb7c158dfb1dc613c138c746f37ae3bd257c010a89041e0",
818
- "bytes": 15842
817
+ "sha256": "4f52d3b4dea3e1bdfcdb1057cb925de6293d938a4f1bddc396dc982bebab5ff6",
818
+ "bytes": 15841
819
819
  },
820
820
  "mcp/handlers/v2-resume.d.ts": {
821
821
  "sha256": "d88f6c35bcaf946666c837b72fda3702a2ebab5e478eb90f7b4b672a0e5fa24f",
@@ -830,8 +830,8 @@
830
830
  "bytes": 1733
831
831
  },
832
832
  "mcp/handlers/v2-state-conversion.js": {
833
- "sha256": "93110d8a27ca03c0f0936f5d817db4930323ada0ecaaa9cc1154e2c9f552f0fd",
834
- "bytes": 4335
833
+ "sha256": "d5f4203c340fe8b49c99322e864623db097db5e610cf86e2cc0c53aa7480b625",
834
+ "bytes": 4333
835
835
  },
836
836
  "mcp/handlers/v2-token-ops.d.ts": {
837
837
  "sha256": "bfbc6ab9ed413838cab8ee76fcf24cb7200bb1d257c08205b0eb5a8e48657b27",
@@ -1682,12 +1682,12 @@
1682
1682
  "bytes": 4556
1683
1683
  },
1684
1684
  "v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.d.ts": {
1685
- "sha256": "a7f455d0bef1dce88b712ee9a29066d97033f31e180dc8de6c0733713a484936",
1686
- "bytes": 195786
1685
+ "sha256": "d198ecbe4adde9cc3a7d0764d6720926b8e032dd4ee580aaacdcf15c6233e8e9",
1686
+ "bytes": 196009
1687
1687
  },
1688
1688
  "v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.js": {
1689
- "sha256": "ec330ed72b7d5cc13ed4e000fd398f4c3c0f14e4d3e02ee4f59f10383377be94",
1690
- "bytes": 5616
1689
+ "sha256": "485a8bfbb864a6dbac82559a968e903e8456469248772fc5f58826f669b06adf",
1690
+ "bytes": 5615
1691
1691
  },
1692
1692
  "v2/durable-core/schemas/execution-snapshot/index.d.ts": {
1693
1693
  "sha256": "8b61108a487b7ed225785ffefd3cb51669f008cd3cfadd2c05df439d20f4df88",
@@ -1698,16 +1698,16 @@
1698
1698
  "bytes": 2747
1699
1699
  },
1700
1700
  "v2/durable-core/schemas/execution-snapshot/step-instance-key.d.ts": {
1701
- "sha256": "183bf693b36827a93882732269ef0dab8380eb7e2426f0fd72fbc7407647ee04",
1702
- "bytes": 1147
1701
+ "sha256": "2f4da8c2f1f1c19d202d190d7ff096c50950a050db030d91f8938aa4ab2b64b4",
1702
+ "bytes": 1390
1703
1703
  },
1704
1704
  "v2/durable-core/schemas/execution-snapshot/step-instance-key.js": {
1705
- "sha256": "600b896c6a23e064478f600ae82923317ce343d9a79e7fe919a8fe8d3354bd4e",
1706
- "bytes": 2983
1705
+ "sha256": "044235e54b5ede5f86c7847d2e4e9f481d48cb0f781d9c88804eecc97acbc8b9",
1706
+ "bytes": 3397
1707
1707
  },
1708
1708
  "v2/durable-core/schemas/export-bundle/index.d.ts": {
1709
- "sha256": "3106396993ba9d99bdb557b3b273b74a4c5efaa5c2084b2b56d5ca1824532e3f",
1710
- "bytes": 479882
1709
+ "sha256": "f9726d4f6794f2a0b90505dee4ab3d3f1af2bd4d0e4a376c11506fdcd45eb6f5",
1710
+ "bytes": 479848
1711
1711
  },
1712
1712
  "v2/durable-core/schemas/export-bundle/index.js": {
1713
1713
  "sha256": "6e3566b2d05ea6302bbf4d311b8ec3e94725a8523834efe7670a79e7bd7dc40d",
@@ -1718,8 +1718,8 @@
1718
1718
  "bytes": 2248
1719
1719
  },
1720
1720
  "v2/durable-core/schemas/lib/decision-trace-ref.js": {
1721
- "sha256": "f32533369a34e14237e70a2bcbba44a1bf98cbc34497369c26bd188c35be41e7",
1722
- "bytes": 1632
1721
+ "sha256": "411d1997701274211115307e3bb9c43099ef7fbf070b84f916f231fc84ea504a",
1722
+ "bytes": 1727
1723
1723
  },
1724
1724
  "v2/durable-core/schemas/lib/dedupe-key.d.ts": {
1725
1725
  "sha256": "990634582387e57bd6e24306c7c4d01da1c904ea23b9fb88b75b635dea2c8799",
@@ -232,7 +232,7 @@ function executeStartWorkflow(input, ctx) {
232
232
  kind: 'running',
233
233
  completed: { kind: 'set', values: [] },
234
234
  loopStack: [],
235
- pending: { kind: 'some', step: { stepId: (0, step_instance_key_js_1.asDelimiterSafeIdV1)(firstStep.id), loopPath: [] } },
235
+ pending: { kind: 'some', step: { stepId: (0, step_instance_key_js_1.asExpandedStepIdV1)(firstStep.id), loopPath: [] } },
236
236
  },
237
237
  },
238
238
  };
@@ -37,7 +37,7 @@ function toV1ExecutionState(engineState) {
37
37
  }
38
38
  function convertRunningExecutionStateToEngineState(state) {
39
39
  const completedArray = [...state.completed].sort((a, b) => a.localeCompare(b));
40
- const completed = completedArray.map(s => (0, step_instance_key_js_1.stepInstanceKeyFromParts)((0, step_instance_key_js_1.asDelimiterSafeIdV1)(s), []));
40
+ const completed = completedArray.map(s => (0, step_instance_key_js_1.stepInstanceKeyFromParts)((0, step_instance_key_js_1.asExpandedStepIdV1)(s), []));
41
41
  const loopStack = state.loopStack.map((f) => ({
42
42
  loopId: (0, step_instance_key_js_1.asDelimiterSafeIdV1)(f.loopId),
43
43
  iteration: f.iteration,
@@ -47,7 +47,7 @@ function convertRunningExecutionStateToEngineState(state) {
47
47
  ? {
48
48
  kind: 'some',
49
49
  step: {
50
- stepId: (0, step_instance_key_js_1.asDelimiterSafeIdV1)(state.pendingStep.stepId),
50
+ stepId: (0, step_instance_key_js_1.asExpandedStepIdV1)(state.pendingStep.stepId),
51
51
  loopPath: state.pendingStep.loopPath.map((p) => ({
52
52
  loopId: (0, step_instance_key_js_1.asDelimiterSafeIdV1)(p.loopId),
53
53
  iteration: p.iteration,
@@ -54,7 +54,7 @@ export declare const LoopPathFrameV1Schema: z.ZodObject<{
54
54
  }>;
55
55
  export type PendingStepV1 = z.infer<typeof PendingStepV1Schema>;
56
56
  export declare const PendingStepV1Schema: z.ZodObject<{
57
- stepId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
57
+ stepId: z.ZodEffects<z.ZodString, import("./step-instance-key.js").ExpandedStepIdV1, string>;
58
58
  loopPath: z.ZodArray<z.ZodObject<{
59
59
  loopId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
60
60
  iteration: z.ZodNumber;
@@ -69,7 +69,7 @@ export declare const PendingStepV1Schema: z.ZodObject<{
69
69
  }>, "many">;
70
70
  }, "strict", z.ZodTypeAny, {
71
71
  stepId: string & {
72
- readonly __brand: "v2.DelimiterSafeIdV1";
72
+ readonly __brand: "v2.ExpandedStepIdV1";
73
73
  };
74
74
  loopPath: {
75
75
  loopId: string & {
@@ -93,7 +93,7 @@ export declare const PendingV1Schema: z.ZodDiscriminatedUnion<"kind", [z.ZodObje
93
93
  }>, z.ZodObject<{
94
94
  kind: z.ZodLiteral<"some">;
95
95
  step: z.ZodObject<{
96
- stepId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
96
+ stepId: z.ZodEffects<z.ZodString, import("./step-instance-key.js").ExpandedStepIdV1, string>;
97
97
  loopPath: z.ZodArray<z.ZodObject<{
98
98
  loopId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
99
99
  iteration: z.ZodNumber;
@@ -108,7 +108,7 @@ export declare const PendingV1Schema: z.ZodDiscriminatedUnion<"kind", [z.ZodObje
108
108
  }>, "many">;
109
109
  }, "strict", z.ZodTypeAny, {
110
110
  stepId: string & {
111
- readonly __brand: "v2.DelimiterSafeIdV1";
111
+ readonly __brand: "v2.ExpandedStepIdV1";
112
112
  };
113
113
  loopPath: {
114
114
  loopId: string & {
@@ -127,7 +127,7 @@ export declare const PendingV1Schema: z.ZodDiscriminatedUnion<"kind", [z.ZodObje
127
127
  kind: "some";
128
128
  step: {
129
129
  stepId: string & {
130
- readonly __brand: "v2.DelimiterSafeIdV1";
130
+ readonly __brand: "v2.ExpandedStepIdV1";
131
131
  };
132
132
  loopPath: {
133
133
  loopId: string & {
@@ -196,7 +196,7 @@ export declare const EngineStateV1Schema: z.ZodEffects<z.ZodDiscriminatedUnion<"
196
196
  }>, z.ZodObject<{
197
197
  kind: z.ZodLiteral<"some">;
198
198
  step: z.ZodObject<{
199
- stepId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
199
+ stepId: z.ZodEffects<z.ZodString, import("./step-instance-key.js").ExpandedStepIdV1, string>;
200
200
  loopPath: z.ZodArray<z.ZodObject<{
201
201
  loopId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
202
202
  iteration: z.ZodNumber;
@@ -211,7 +211,7 @@ export declare const EngineStateV1Schema: z.ZodEffects<z.ZodDiscriminatedUnion<"
211
211
  }>, "many">;
212
212
  }, "strict", z.ZodTypeAny, {
213
213
  stepId: string & {
214
- readonly __brand: "v2.DelimiterSafeIdV1";
214
+ readonly __brand: "v2.ExpandedStepIdV1";
215
215
  };
216
216
  loopPath: {
217
217
  loopId: string & {
@@ -230,7 +230,7 @@ export declare const EngineStateV1Schema: z.ZodEffects<z.ZodDiscriminatedUnion<"
230
230
  kind: "some";
231
231
  step: {
232
232
  stepId: string & {
233
- readonly __brand: "v2.DelimiterSafeIdV1";
233
+ readonly __brand: "v2.ExpandedStepIdV1";
234
234
  };
235
235
  loopPath: {
236
236
  loopId: string & {
@@ -268,7 +268,7 @@ export declare const EngineStateV1Schema: z.ZodEffects<z.ZodDiscriminatedUnion<"
268
268
  kind: "some";
269
269
  step: {
270
270
  stepId: string & {
271
- readonly __brand: "v2.DelimiterSafeIdV1";
271
+ readonly __brand: "v2.ExpandedStepIdV1";
272
272
  };
273
273
  loopPath: {
274
274
  loopId: string & {
@@ -343,7 +343,7 @@ export declare const EngineStateV1Schema: z.ZodEffects<z.ZodDiscriminatedUnion<"
343
343
  }>, z.ZodObject<{
344
344
  kind: z.ZodLiteral<"some">;
345
345
  step: z.ZodObject<{
346
- stepId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
346
+ stepId: z.ZodEffects<z.ZodString, import("./step-instance-key.js").ExpandedStepIdV1, string>;
347
347
  loopPath: z.ZodArray<z.ZodObject<{
348
348
  loopId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
349
349
  iteration: z.ZodNumber;
@@ -358,7 +358,7 @@ export declare const EngineStateV1Schema: z.ZodEffects<z.ZodDiscriminatedUnion<"
358
358
  }>, "many">;
359
359
  }, "strict", z.ZodTypeAny, {
360
360
  stepId: string & {
361
- readonly __brand: "v2.DelimiterSafeIdV1";
361
+ readonly __brand: "v2.ExpandedStepIdV1";
362
362
  };
363
363
  loopPath: {
364
364
  loopId: string & {
@@ -377,7 +377,7 @@ export declare const EngineStateV1Schema: z.ZodEffects<z.ZodDiscriminatedUnion<"
377
377
  kind: "some";
378
378
  step: {
379
379
  stepId: string & {
380
- readonly __brand: "v2.DelimiterSafeIdV1";
380
+ readonly __brand: "v2.ExpandedStepIdV1";
381
381
  };
382
382
  loopPath: {
383
383
  loopId: string & {
@@ -1025,7 +1025,7 @@ export declare const EngineStateV1Schema: z.ZodEffects<z.ZodDiscriminatedUnion<"
1025
1025
  kind: "some";
1026
1026
  step: {
1027
1027
  stepId: string & {
1028
- readonly __brand: "v2.DelimiterSafeIdV1";
1028
+ readonly __brand: "v2.ExpandedStepIdV1";
1029
1029
  };
1030
1030
  loopPath: {
1031
1031
  loopId: string & {
@@ -1169,7 +1169,7 @@ export declare const EngineStateV1Schema: z.ZodEffects<z.ZodDiscriminatedUnion<"
1169
1169
  kind: "some";
1170
1170
  step: {
1171
1171
  stepId: string & {
1172
- readonly __brand: "v2.DelimiterSafeIdV1";
1172
+ readonly __brand: "v2.ExpandedStepIdV1";
1173
1173
  };
1174
1174
  loopPath: {
1175
1175
  loopId: string & {
@@ -1282,7 +1282,7 @@ export declare const EngineStateV1Schema: z.ZodEffects<z.ZodDiscriminatedUnion<"
1282
1282
  kind: "some";
1283
1283
  step: {
1284
1284
  stepId: string & {
1285
- readonly __brand: "v2.DelimiterSafeIdV1";
1285
+ readonly __brand: "v2.ExpandedStepIdV1";
1286
1286
  };
1287
1287
  loopPath: {
1288
1288
  loopId: string & {
@@ -1480,7 +1480,7 @@ export declare const EnginePayloadV1Schema: z.ZodObject<{
1480
1480
  }>, z.ZodObject<{
1481
1481
  kind: z.ZodLiteral<"some">;
1482
1482
  step: z.ZodObject<{
1483
- stepId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
1483
+ stepId: z.ZodEffects<z.ZodString, import("./step-instance-key.js").ExpandedStepIdV1, string>;
1484
1484
  loopPath: z.ZodArray<z.ZodObject<{
1485
1485
  loopId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
1486
1486
  iteration: z.ZodNumber;
@@ -1495,7 +1495,7 @@ export declare const EnginePayloadV1Schema: z.ZodObject<{
1495
1495
  }>, "many">;
1496
1496
  }, "strict", z.ZodTypeAny, {
1497
1497
  stepId: string & {
1498
- readonly __brand: "v2.DelimiterSafeIdV1";
1498
+ readonly __brand: "v2.ExpandedStepIdV1";
1499
1499
  };
1500
1500
  loopPath: {
1501
1501
  loopId: string & {
@@ -1514,7 +1514,7 @@ export declare const EnginePayloadV1Schema: z.ZodObject<{
1514
1514
  kind: "some";
1515
1515
  step: {
1516
1516
  stepId: string & {
1517
- readonly __brand: "v2.DelimiterSafeIdV1";
1517
+ readonly __brand: "v2.ExpandedStepIdV1";
1518
1518
  };
1519
1519
  loopPath: {
1520
1520
  loopId: string & {
@@ -1552,7 +1552,7 @@ export declare const EnginePayloadV1Schema: z.ZodObject<{
1552
1552
  kind: "some";
1553
1553
  step: {
1554
1554
  stepId: string & {
1555
- readonly __brand: "v2.DelimiterSafeIdV1";
1555
+ readonly __brand: "v2.ExpandedStepIdV1";
1556
1556
  };
1557
1557
  loopPath: {
1558
1558
  loopId: string & {
@@ -1627,7 +1627,7 @@ export declare const EnginePayloadV1Schema: z.ZodObject<{
1627
1627
  }>, z.ZodObject<{
1628
1628
  kind: z.ZodLiteral<"some">;
1629
1629
  step: z.ZodObject<{
1630
- stepId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
1630
+ stepId: z.ZodEffects<z.ZodString, import("./step-instance-key.js").ExpandedStepIdV1, string>;
1631
1631
  loopPath: z.ZodArray<z.ZodObject<{
1632
1632
  loopId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
1633
1633
  iteration: z.ZodNumber;
@@ -1642,7 +1642,7 @@ export declare const EnginePayloadV1Schema: z.ZodObject<{
1642
1642
  }>, "many">;
1643
1643
  }, "strict", z.ZodTypeAny, {
1644
1644
  stepId: string & {
1645
- readonly __brand: "v2.DelimiterSafeIdV1";
1645
+ readonly __brand: "v2.ExpandedStepIdV1";
1646
1646
  };
1647
1647
  loopPath: {
1648
1648
  loopId: string & {
@@ -1661,7 +1661,7 @@ export declare const EnginePayloadV1Schema: z.ZodObject<{
1661
1661
  kind: "some";
1662
1662
  step: {
1663
1663
  stepId: string & {
1664
- readonly __brand: "v2.DelimiterSafeIdV1";
1664
+ readonly __brand: "v2.ExpandedStepIdV1";
1665
1665
  };
1666
1666
  loopPath: {
1667
1667
  loopId: string & {
@@ -2309,7 +2309,7 @@ export declare const EnginePayloadV1Schema: z.ZodObject<{
2309
2309
  kind: "some";
2310
2310
  step: {
2311
2311
  stepId: string & {
2312
- readonly __brand: "v2.DelimiterSafeIdV1";
2312
+ readonly __brand: "v2.ExpandedStepIdV1";
2313
2313
  };
2314
2314
  loopPath: {
2315
2315
  loopId: string & {
@@ -2453,7 +2453,7 @@ export declare const EnginePayloadV1Schema: z.ZodObject<{
2453
2453
  kind: "some";
2454
2454
  step: {
2455
2455
  stepId: string & {
2456
- readonly __brand: "v2.DelimiterSafeIdV1";
2456
+ readonly __brand: "v2.ExpandedStepIdV1";
2457
2457
  };
2458
2458
  loopPath: {
2459
2459
  loopId: string & {
@@ -2566,7 +2566,7 @@ export declare const EnginePayloadV1Schema: z.ZodObject<{
2566
2566
  kind: "some";
2567
2567
  step: {
2568
2568
  stepId: string & {
2569
- readonly __brand: "v2.DelimiterSafeIdV1";
2569
+ readonly __brand: "v2.ExpandedStepIdV1";
2570
2570
  };
2571
2571
  loopPath: {
2572
2572
  loopId: string & {
@@ -2736,7 +2736,7 @@ export declare const EnginePayloadV1Schema: z.ZodObject<{
2736
2736
  kind: "some";
2737
2737
  step: {
2738
2738
  stepId: string & {
2739
- readonly __brand: "v2.DelimiterSafeIdV1";
2739
+ readonly __brand: "v2.ExpandedStepIdV1";
2740
2740
  };
2741
2741
  loopPath: {
2742
2742
  loopId: string & {
@@ -2849,7 +2849,7 @@ export declare const EnginePayloadV1Schema: z.ZodObject<{
2849
2849
  kind: "some";
2850
2850
  step: {
2851
2851
  stepId: string & {
2852
- readonly __brand: "v2.DelimiterSafeIdV1";
2852
+ readonly __brand: "v2.ExpandedStepIdV1";
2853
2853
  };
2854
2854
  loopPath: {
2855
2855
  loopId: string & {
@@ -3053,7 +3053,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
3053
3053
  }>, z.ZodObject<{
3054
3054
  kind: z.ZodLiteral<"some">;
3055
3055
  step: z.ZodObject<{
3056
- stepId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
3056
+ stepId: z.ZodEffects<z.ZodString, import("./step-instance-key.js").ExpandedStepIdV1, string>;
3057
3057
  loopPath: z.ZodArray<z.ZodObject<{
3058
3058
  loopId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
3059
3059
  iteration: z.ZodNumber;
@@ -3068,7 +3068,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
3068
3068
  }>, "many">;
3069
3069
  }, "strict", z.ZodTypeAny, {
3070
3070
  stepId: string & {
3071
- readonly __brand: "v2.DelimiterSafeIdV1";
3071
+ readonly __brand: "v2.ExpandedStepIdV1";
3072
3072
  };
3073
3073
  loopPath: {
3074
3074
  loopId: string & {
@@ -3087,7 +3087,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
3087
3087
  kind: "some";
3088
3088
  step: {
3089
3089
  stepId: string & {
3090
- readonly __brand: "v2.DelimiterSafeIdV1";
3090
+ readonly __brand: "v2.ExpandedStepIdV1";
3091
3091
  };
3092
3092
  loopPath: {
3093
3093
  loopId: string & {
@@ -3125,7 +3125,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
3125
3125
  kind: "some";
3126
3126
  step: {
3127
3127
  stepId: string & {
3128
- readonly __brand: "v2.DelimiterSafeIdV1";
3128
+ readonly __brand: "v2.ExpandedStepIdV1";
3129
3129
  };
3130
3130
  loopPath: {
3131
3131
  loopId: string & {
@@ -3200,7 +3200,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
3200
3200
  }>, z.ZodObject<{
3201
3201
  kind: z.ZodLiteral<"some">;
3202
3202
  step: z.ZodObject<{
3203
- stepId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
3203
+ stepId: z.ZodEffects<z.ZodString, import("./step-instance-key.js").ExpandedStepIdV1, string>;
3204
3204
  loopPath: z.ZodArray<z.ZodObject<{
3205
3205
  loopId: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
3206
3206
  iteration: z.ZodNumber;
@@ -3215,7 +3215,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
3215
3215
  }>, "many">;
3216
3216
  }, "strict", z.ZodTypeAny, {
3217
3217
  stepId: string & {
3218
- readonly __brand: "v2.DelimiterSafeIdV1";
3218
+ readonly __brand: "v2.ExpandedStepIdV1";
3219
3219
  };
3220
3220
  loopPath: {
3221
3221
  loopId: string & {
@@ -3234,7 +3234,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
3234
3234
  kind: "some";
3235
3235
  step: {
3236
3236
  stepId: string & {
3237
- readonly __brand: "v2.DelimiterSafeIdV1";
3237
+ readonly __brand: "v2.ExpandedStepIdV1";
3238
3238
  };
3239
3239
  loopPath: {
3240
3240
  loopId: string & {
@@ -3882,7 +3882,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
3882
3882
  kind: "some";
3883
3883
  step: {
3884
3884
  stepId: string & {
3885
- readonly __brand: "v2.DelimiterSafeIdV1";
3885
+ readonly __brand: "v2.ExpandedStepIdV1";
3886
3886
  };
3887
3887
  loopPath: {
3888
3888
  loopId: string & {
@@ -4026,7 +4026,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
4026
4026
  kind: "some";
4027
4027
  step: {
4028
4028
  stepId: string & {
4029
- readonly __brand: "v2.DelimiterSafeIdV1";
4029
+ readonly __brand: "v2.ExpandedStepIdV1";
4030
4030
  };
4031
4031
  loopPath: {
4032
4032
  loopId: string & {
@@ -4139,7 +4139,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
4139
4139
  kind: "some";
4140
4140
  step: {
4141
4141
  stepId: string & {
4142
- readonly __brand: "v2.DelimiterSafeIdV1";
4142
+ readonly __brand: "v2.ExpandedStepIdV1";
4143
4143
  };
4144
4144
  loopPath: {
4145
4145
  loopId: string & {
@@ -4309,7 +4309,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
4309
4309
  kind: "some";
4310
4310
  step: {
4311
4311
  stepId: string & {
4312
- readonly __brand: "v2.DelimiterSafeIdV1";
4312
+ readonly __brand: "v2.ExpandedStepIdV1";
4313
4313
  };
4314
4314
  loopPath: {
4315
4315
  loopId: string & {
@@ -4422,7 +4422,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
4422
4422
  kind: "some";
4423
4423
  step: {
4424
4424
  stepId: string & {
4425
- readonly __brand: "v2.DelimiterSafeIdV1";
4425
+ readonly __brand: "v2.ExpandedStepIdV1";
4426
4426
  };
4427
4427
  loopPath: {
4428
4428
  loopId: string & {
@@ -4599,7 +4599,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
4599
4599
  kind: "some";
4600
4600
  step: {
4601
4601
  stepId: string & {
4602
- readonly __brand: "v2.DelimiterSafeIdV1";
4602
+ readonly __brand: "v2.ExpandedStepIdV1";
4603
4603
  };
4604
4604
  loopPath: {
4605
4605
  loopId: string & {
@@ -4712,7 +4712,7 @@ export declare const ExecutionSnapshotFileV1Schema: z.ZodObject<{
4712
4712
  kind: "some";
4713
4713
  step: {
4714
4714
  stepId: string & {
4715
- readonly __brand: "v2.DelimiterSafeIdV1";
4715
+ readonly __brand: "v2.ExpandedStepIdV1";
4716
4716
  };
4717
4717
  loopPath: {
4718
4718
  loopId: string & {
@@ -39,7 +39,7 @@ exports.LoopPathFrameV1Schema = zod_1.z.object({
39
39
  iteration: zod_1.z.number().int().nonnegative(),
40
40
  }).strict();
41
41
  exports.PendingStepV1Schema = zod_1.z.object({
42
- stepId: step_instance_key_js_1.DelimiterSafeIdV1Schema,
42
+ stepId: step_instance_key_js_1.ExpandedStepIdV1Schema,
43
43
  loopPath: zod_1.z.array(exports.LoopPathFrameV1Schema),
44
44
  }).strict();
45
45
  exports.PendingV1Schema = zod_1.z.discriminatedUnion('kind', [
@@ -4,6 +4,9 @@ import type { Result } from 'neverthrow';
4
4
  export type DelimiterSafeIdV1 = Brand<string, 'v2.DelimiterSafeIdV1'>;
5
5
  export declare function asDelimiterSafeIdV1(value: string): DelimiterSafeIdV1;
6
6
  export declare const DelimiterSafeIdV1Schema: z.ZodEffects<z.ZodString, DelimiterSafeIdV1, string>;
7
+ export type ExpandedStepIdV1 = Brand<string, 'v2.ExpandedStepIdV1'>;
8
+ export declare function asExpandedStepIdV1(value: string): ExpandedStepIdV1;
9
+ export declare const ExpandedStepIdV1Schema: z.ZodEffects<z.ZodString, ExpandedStepIdV1, string>;
7
10
  export type StepInstanceKeyV1 = Brand<string, 'v2.StepInstanceKeyV1'>;
8
11
  export interface LoopPathFrameV1 {
9
12
  readonly loopId: DelimiterSafeIdV1;
@@ -16,6 +19,6 @@ export type StepInstanceKeyParseErrorV1 = {
16
19
  readonly code: 'STEP_INSTANCE_KEY_BAD_FORMAT';
17
20
  readonly message: string;
18
21
  };
19
- export declare function stepInstanceKeyFromParts(stepId: DelimiterSafeIdV1, loopPath: readonly LoopPathFrameV1[]): StepInstanceKeyV1;
22
+ export declare function stepInstanceKeyFromParts(stepId: ExpandedStepIdV1, loopPath: readonly LoopPathFrameV1[]): StepInstanceKeyV1;
20
23
  export declare function parseStepInstanceKeyV1(raw: string): Result<StepInstanceKeyV1, StepInstanceKeyParseErrorV1>;
21
24
  export declare const StepInstanceKeyV1Schema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, StepInstanceKeyV1, string>;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StepInstanceKeyV1Schema = exports.DelimiterSafeIdV1Schema = void 0;
3
+ exports.StepInstanceKeyV1Schema = exports.ExpandedStepIdV1Schema = exports.DelimiterSafeIdV1Schema = void 0;
4
4
  exports.asDelimiterSafeIdV1 = asDelimiterSafeIdV1;
5
+ exports.asExpandedStepIdV1 = asExpandedStepIdV1;
5
6
  exports.stepInstanceKeyFromParts = stepInstanceKeyFromParts;
6
7
  exports.parseStepInstanceKeyV1 = parseStepInstanceKeyV1;
7
8
  const zod_1 = require("zod");
@@ -13,6 +14,14 @@ exports.DelimiterSafeIdV1Schema = zod_1.z
13
14
  .string()
14
15
  .regex(/^[a-z0-9_-]+$/, 'Expected delimiter-safe id: [a-z0-9_-]+')
15
16
  .transform(asDelimiterSafeIdV1);
17
+ function asExpandedStepIdV1(value) {
18
+ return value;
19
+ }
20
+ const EXPANDED_STEP_ID_PATTERN = /^[a-z0-9_-]+(?:\.[a-z0-9_-]+)*$/;
21
+ exports.ExpandedStepIdV1Schema = zod_1.z
22
+ .string()
23
+ .regex(EXPANDED_STEP_ID_PATTERN, 'Expected expanded step id: [a-z0-9_-]+(?:\\.[a-z0-9_-]+)*')
24
+ .transform(asExpandedStepIdV1);
16
25
  function asStepInstanceKeyV1(value) {
17
26
  return value;
18
27
  }
@@ -28,7 +37,7 @@ function parseStepInstanceKeyV1(raw) {
28
37
  const parts = raw.split('::');
29
38
  if (parts.length === 1) {
30
39
  const stepId = parts[0];
31
- if (!/^[a-z0-9_-]+$/.test(stepId)) {
40
+ if (!EXPANDED_STEP_ID_PATTERN.test(stepId)) {
32
41
  return (0, neverthrow_1.err)({ code: 'STEP_INSTANCE_KEY_BAD_FORMAT', message: 'Invalid stepId segment' });
33
42
  }
34
43
  return (0, neverthrow_1.ok)(asStepInstanceKeyV1(stepId));
@@ -37,7 +46,7 @@ function parseStepInstanceKeyV1(raw) {
37
46
  return (0, neverthrow_1.err)({ code: 'STEP_INSTANCE_KEY_BAD_FORMAT', message: 'Expected at most one "::" separator' });
38
47
  }
39
48
  const [loopPathRaw, stepId] = parts;
40
- if (!/^[a-z0-9_-]+$/.test(stepId)) {
49
+ if (!EXPANDED_STEP_ID_PATTERN.test(stepId)) {
41
50
  return (0, neverthrow_1.err)({ code: 'STEP_INSTANCE_KEY_BAD_FORMAT', message: 'Invalid stepId segment' });
42
51
  }
43
52
  const frames = loopPathRaw.split('/');
@@ -2279,7 +2279,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
2279
2279
  }>, z.ZodObject<{
2280
2280
  kind: z.ZodLiteral<"some">;
2281
2281
  step: z.ZodObject<{
2282
- stepId: z.ZodEffects<z.ZodString, import("../execution-snapshot/step-instance-key.js").DelimiterSafeIdV1, string>;
2282
+ stepId: z.ZodEffects<z.ZodString, import("../execution-snapshot/step-instance-key.js").ExpandedStepIdV1, string>;
2283
2283
  loopPath: z.ZodArray<z.ZodObject<{
2284
2284
  loopId: z.ZodEffects<z.ZodString, import("../execution-snapshot/step-instance-key.js").DelimiterSafeIdV1, string>;
2285
2285
  iteration: z.ZodNumber;
@@ -2294,7 +2294,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
2294
2294
  }>, "many">;
2295
2295
  }, "strict", z.ZodTypeAny, {
2296
2296
  stepId: string & {
2297
- readonly __brand: "v2.DelimiterSafeIdV1";
2297
+ readonly __brand: "v2.ExpandedStepIdV1";
2298
2298
  };
2299
2299
  loopPath: {
2300
2300
  loopId: string & {
@@ -2313,7 +2313,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
2313
2313
  kind: "some";
2314
2314
  step: {
2315
2315
  stepId: string & {
2316
- readonly __brand: "v2.DelimiterSafeIdV1";
2316
+ readonly __brand: "v2.ExpandedStepIdV1";
2317
2317
  };
2318
2318
  loopPath: {
2319
2319
  loopId: string & {
@@ -2351,7 +2351,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
2351
2351
  kind: "some";
2352
2352
  step: {
2353
2353
  stepId: string & {
2354
- readonly __brand: "v2.DelimiterSafeIdV1";
2354
+ readonly __brand: "v2.ExpandedStepIdV1";
2355
2355
  };
2356
2356
  loopPath: {
2357
2357
  loopId: string & {
@@ -2426,7 +2426,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
2426
2426
  }>, z.ZodObject<{
2427
2427
  kind: z.ZodLiteral<"some">;
2428
2428
  step: z.ZodObject<{
2429
- stepId: z.ZodEffects<z.ZodString, import("../execution-snapshot/step-instance-key.js").DelimiterSafeIdV1, string>;
2429
+ stepId: z.ZodEffects<z.ZodString, import("../execution-snapshot/step-instance-key.js").ExpandedStepIdV1, string>;
2430
2430
  loopPath: z.ZodArray<z.ZodObject<{
2431
2431
  loopId: z.ZodEffects<z.ZodString, import("../execution-snapshot/step-instance-key.js").DelimiterSafeIdV1, string>;
2432
2432
  iteration: z.ZodNumber;
@@ -2441,7 +2441,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
2441
2441
  }>, "many">;
2442
2442
  }, "strict", z.ZodTypeAny, {
2443
2443
  stepId: string & {
2444
- readonly __brand: "v2.DelimiterSafeIdV1";
2444
+ readonly __brand: "v2.ExpandedStepIdV1";
2445
2445
  };
2446
2446
  loopPath: {
2447
2447
  loopId: string & {
@@ -2460,7 +2460,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
2460
2460
  kind: "some";
2461
2461
  step: {
2462
2462
  stepId: string & {
2463
- readonly __brand: "v2.DelimiterSafeIdV1";
2463
+ readonly __brand: "v2.ExpandedStepIdV1";
2464
2464
  };
2465
2465
  loopPath: {
2466
2466
  loopId: string & {
@@ -3108,7 +3108,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
3108
3108
  kind: "some";
3109
3109
  step: {
3110
3110
  stepId: string & {
3111
- readonly __brand: "v2.DelimiterSafeIdV1";
3111
+ readonly __brand: "v2.ExpandedStepIdV1";
3112
3112
  };
3113
3113
  loopPath: {
3114
3114
  loopId: string & {
@@ -3252,7 +3252,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
3252
3252
  kind: "some";
3253
3253
  step: {
3254
3254
  stepId: string & {
3255
- readonly __brand: "v2.DelimiterSafeIdV1";
3255
+ readonly __brand: "v2.ExpandedStepIdV1";
3256
3256
  };
3257
3257
  loopPath: {
3258
3258
  loopId: string & {
@@ -3365,7 +3365,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
3365
3365
  kind: "some";
3366
3366
  step: {
3367
3367
  stepId: string & {
3368
- readonly __brand: "v2.DelimiterSafeIdV1";
3368
+ readonly __brand: "v2.ExpandedStepIdV1";
3369
3369
  };
3370
3370
  loopPath: {
3371
3371
  loopId: string & {
@@ -3535,7 +3535,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
3535
3535
  kind: "some";
3536
3536
  step: {
3537
3537
  stepId: string & {
3538
- readonly __brand: "v2.DelimiterSafeIdV1";
3538
+ readonly __brand: "v2.ExpandedStepIdV1";
3539
3539
  };
3540
3540
  loopPath: {
3541
3541
  loopId: string & {
@@ -3648,7 +3648,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
3648
3648
  kind: "some";
3649
3649
  step: {
3650
3650
  stepId: string & {
3651
- readonly __brand: "v2.DelimiterSafeIdV1";
3651
+ readonly __brand: "v2.ExpandedStepIdV1";
3652
3652
  };
3653
3653
  loopPath: {
3654
3654
  loopId: string & {
@@ -3825,7 +3825,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
3825
3825
  kind: "some";
3826
3826
  step: {
3827
3827
  stepId: string & {
3828
- readonly __brand: "v2.DelimiterSafeIdV1";
3828
+ readonly __brand: "v2.ExpandedStepIdV1";
3829
3829
  };
3830
3830
  loopPath: {
3831
3831
  loopId: string & {
@@ -3938,7 +3938,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
3938
3938
  kind: "some";
3939
3939
  step: {
3940
3940
  stepId: string & {
3941
- readonly __brand: "v2.DelimiterSafeIdV1";
3941
+ readonly __brand: "v2.ExpandedStepIdV1";
3942
3942
  };
3943
3943
  loopPath: {
3944
3944
  loopId: string & {
@@ -4123,7 +4123,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
4123
4123
  kind: "some";
4124
4124
  step: {
4125
4125
  stepId: string & {
4126
- readonly __brand: "v2.DelimiterSafeIdV1";
4126
+ readonly __brand: "v2.ExpandedStepIdV1";
4127
4127
  };
4128
4128
  loopPath: {
4129
4129
  loopId: string & {
@@ -4236,7 +4236,7 @@ export declare const SessionContentsV1Schema: z.ZodObject<{
4236
4236
  kind: "some";
4237
4237
  step: {
4238
4238
  stepId: string & {
4239
- readonly __brand: "v2.DelimiterSafeIdV1";
4239
+ readonly __brand: "v2.ExpandedStepIdV1";
4240
4240
  };
4241
4241
  loopPath: {
4242
4242
  loopId: string & {
@@ -7401,7 +7401,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
7401
7401
  }>, z.ZodObject<{
7402
7402
  kind: z.ZodLiteral<"some">;
7403
7403
  step: z.ZodObject<{
7404
- stepId: z.ZodEffects<z.ZodString, import("../execution-snapshot/step-instance-key.js").DelimiterSafeIdV1, string>;
7404
+ stepId: z.ZodEffects<z.ZodString, import("../execution-snapshot/step-instance-key.js").ExpandedStepIdV1, string>;
7405
7405
  loopPath: z.ZodArray<z.ZodObject<{
7406
7406
  loopId: z.ZodEffects<z.ZodString, import("../execution-snapshot/step-instance-key.js").DelimiterSafeIdV1, string>;
7407
7407
  iteration: z.ZodNumber;
@@ -7416,7 +7416,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
7416
7416
  }>, "many">;
7417
7417
  }, "strict", z.ZodTypeAny, {
7418
7418
  stepId: string & {
7419
- readonly __brand: "v2.DelimiterSafeIdV1";
7419
+ readonly __brand: "v2.ExpandedStepIdV1";
7420
7420
  };
7421
7421
  loopPath: {
7422
7422
  loopId: string & {
@@ -7435,7 +7435,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
7435
7435
  kind: "some";
7436
7436
  step: {
7437
7437
  stepId: string & {
7438
- readonly __brand: "v2.DelimiterSafeIdV1";
7438
+ readonly __brand: "v2.ExpandedStepIdV1";
7439
7439
  };
7440
7440
  loopPath: {
7441
7441
  loopId: string & {
@@ -7473,7 +7473,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
7473
7473
  kind: "some";
7474
7474
  step: {
7475
7475
  stepId: string & {
7476
- readonly __brand: "v2.DelimiterSafeIdV1";
7476
+ readonly __brand: "v2.ExpandedStepIdV1";
7477
7477
  };
7478
7478
  loopPath: {
7479
7479
  loopId: string & {
@@ -7548,7 +7548,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
7548
7548
  }>, z.ZodObject<{
7549
7549
  kind: z.ZodLiteral<"some">;
7550
7550
  step: z.ZodObject<{
7551
- stepId: z.ZodEffects<z.ZodString, import("../execution-snapshot/step-instance-key.js").DelimiterSafeIdV1, string>;
7551
+ stepId: z.ZodEffects<z.ZodString, import("../execution-snapshot/step-instance-key.js").ExpandedStepIdV1, string>;
7552
7552
  loopPath: z.ZodArray<z.ZodObject<{
7553
7553
  loopId: z.ZodEffects<z.ZodString, import("../execution-snapshot/step-instance-key.js").DelimiterSafeIdV1, string>;
7554
7554
  iteration: z.ZodNumber;
@@ -7563,7 +7563,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
7563
7563
  }>, "many">;
7564
7564
  }, "strict", z.ZodTypeAny, {
7565
7565
  stepId: string & {
7566
- readonly __brand: "v2.DelimiterSafeIdV1";
7566
+ readonly __brand: "v2.ExpandedStepIdV1";
7567
7567
  };
7568
7568
  loopPath: {
7569
7569
  loopId: string & {
@@ -7582,7 +7582,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
7582
7582
  kind: "some";
7583
7583
  step: {
7584
7584
  stepId: string & {
7585
- readonly __brand: "v2.DelimiterSafeIdV1";
7585
+ readonly __brand: "v2.ExpandedStepIdV1";
7586
7586
  };
7587
7587
  loopPath: {
7588
7588
  loopId: string & {
@@ -8230,7 +8230,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
8230
8230
  kind: "some";
8231
8231
  step: {
8232
8232
  stepId: string & {
8233
- readonly __brand: "v2.DelimiterSafeIdV1";
8233
+ readonly __brand: "v2.ExpandedStepIdV1";
8234
8234
  };
8235
8235
  loopPath: {
8236
8236
  loopId: string & {
@@ -8374,7 +8374,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
8374
8374
  kind: "some";
8375
8375
  step: {
8376
8376
  stepId: string & {
8377
- readonly __brand: "v2.DelimiterSafeIdV1";
8377
+ readonly __brand: "v2.ExpandedStepIdV1";
8378
8378
  };
8379
8379
  loopPath: {
8380
8380
  loopId: string & {
@@ -8487,7 +8487,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
8487
8487
  kind: "some";
8488
8488
  step: {
8489
8489
  stepId: string & {
8490
- readonly __brand: "v2.DelimiterSafeIdV1";
8490
+ readonly __brand: "v2.ExpandedStepIdV1";
8491
8491
  };
8492
8492
  loopPath: {
8493
8493
  loopId: string & {
@@ -8657,7 +8657,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
8657
8657
  kind: "some";
8658
8658
  step: {
8659
8659
  stepId: string & {
8660
- readonly __brand: "v2.DelimiterSafeIdV1";
8660
+ readonly __brand: "v2.ExpandedStepIdV1";
8661
8661
  };
8662
8662
  loopPath: {
8663
8663
  loopId: string & {
@@ -8770,7 +8770,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
8770
8770
  kind: "some";
8771
8771
  step: {
8772
8772
  stepId: string & {
8773
- readonly __brand: "v2.DelimiterSafeIdV1";
8773
+ readonly __brand: "v2.ExpandedStepIdV1";
8774
8774
  };
8775
8775
  loopPath: {
8776
8776
  loopId: string & {
@@ -8947,7 +8947,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
8947
8947
  kind: "some";
8948
8948
  step: {
8949
8949
  stepId: string & {
8950
- readonly __brand: "v2.DelimiterSafeIdV1";
8950
+ readonly __brand: "v2.ExpandedStepIdV1";
8951
8951
  };
8952
8952
  loopPath: {
8953
8953
  loopId: string & {
@@ -9060,7 +9060,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
9060
9060
  kind: "some";
9061
9061
  step: {
9062
9062
  stepId: string & {
9063
- readonly __brand: "v2.DelimiterSafeIdV1";
9063
+ readonly __brand: "v2.ExpandedStepIdV1";
9064
9064
  };
9065
9065
  loopPath: {
9066
9066
  loopId: string & {
@@ -9245,7 +9245,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
9245
9245
  kind: "some";
9246
9246
  step: {
9247
9247
  stepId: string & {
9248
- readonly __brand: "v2.DelimiterSafeIdV1";
9248
+ readonly __brand: "v2.ExpandedStepIdV1";
9249
9249
  };
9250
9250
  loopPath: {
9251
9251
  loopId: string & {
@@ -9358,7 +9358,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
9358
9358
  kind: "some";
9359
9359
  step: {
9360
9360
  stepId: string & {
9361
- readonly __brand: "v2.DelimiterSafeIdV1";
9361
+ readonly __brand: "v2.ExpandedStepIdV1";
9362
9362
  };
9363
9363
  loopPath: {
9364
9364
  loopId: string & {
@@ -10298,7 +10298,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
10298
10298
  kind: "some";
10299
10299
  step: {
10300
10300
  stepId: string & {
10301
- readonly __brand: "v2.DelimiterSafeIdV1";
10301
+ readonly __brand: "v2.ExpandedStepIdV1";
10302
10302
  };
10303
10303
  loopPath: {
10304
10304
  loopId: string & {
@@ -10411,7 +10411,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
10411
10411
  kind: "some";
10412
10412
  step: {
10413
10413
  stepId: string & {
10414
- readonly __brand: "v2.DelimiterSafeIdV1";
10414
+ readonly __brand: "v2.ExpandedStepIdV1";
10415
10415
  };
10416
10416
  loopPath: {
10417
10417
  loopId: string & {
@@ -9,9 +9,10 @@ exports.DecisionTraceRefKindSchema = zod_1.z.enum([
9
9
  'condition_id',
10
10
  'iteration',
11
11
  ]);
12
+ const EXPANDED_STEP_ID_PATTERN = /^[a-z0-9_-]+(?:\.[a-z0-9_-]+)*$/;
12
13
  const StepIdRefSchema = zod_1.z.object({
13
14
  kind: zod_1.z.literal('step_id'),
14
- stepId: zod_1.z.string().regex(constants_js_1.DELIMITER_SAFE_ID_PATTERN, 'stepId must be delimiter-safe: [a-z0-9_-]+'),
15
+ stepId: zod_1.z.string().regex(EXPANDED_STEP_ID_PATTERN, 'stepId must be delimiter-safe segments joined by dots: [a-z0-9_-]+(?:\\.[a-z0-9_-]+)*'),
15
16
  }).strict();
16
17
  const LoopIdRefSchema = zod_1.z.object({
17
18
  kind: zod_1.z.literal('loop_id'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exaudeus/workrail",
3
- "version": "3.1.0",
3
+ "version": "3.2.1",
4
4
  "description": "Step-by-step workflow enforcement for AI agents via MCP",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "coding-task-workflow-agentic",
3
3
  "name": "Agentic Task Dev Workflow (Lean • Notes-First • WorkRail Executor)",
4
- "version": "2.1.0",
4
+ "version": "1.0.0",
5
5
  "description": "Lean variant of the agentic coding workflow. Merges triage, inputs gate, context gathering, and re-triage into a single Understand & Classify phase. Reduces context variable count and removes top-level clarificationPrompts. Same quality guarantees with fewer tokens.",
6
6
  "recommendedPreferences": {
7
7
  "recommendedAutonomy": "guided",
@@ -58,7 +58,7 @@
58
58
  { "var": "rigorMode", "equals": "QUICK" }
59
59
  ]
60
60
  },
61
- "prompt": "Generate a lightweight design inline. QUICK rigor means the path is clear and risk is low.\n\nProduce two mandatory candidates:\n1. The simplest possible change that satisfies acceptance criteria\n2. Follow the existing repo pattern for this kind of change\n\nFor each candidate:\n- One-sentence summary\n- Key tradeoff\n- Failure mode to watch\n- Philosophy fit (name specific principles)\n\nCompare and recommend. If both converge on the same approach, say so honestly.\n\nWrite the output to `design-candidates.md` using the same structure as the deep design path:\n- Problem Understanding\n- Candidates (each with: summary, tradeoff, failure mode, philosophy fit)\n- Comparison and Recommendation\n\nSet context variable:\n- `designSummary` one-paragraph summary of the recommendation and why",
61
+ "prompt": "Generate a lightweight design inline. QUICK rigor means the path is clear and risk is low.\n\nProduce two mandatory candidates:\n1. The simplest possible change that satisfies acceptance criteria\n2. Follow the existing repo pattern for this kind of change\n\nFor each candidate:\n- One-sentence summary\n- Which tensions it resolves and which it accepts\n- How it relates to existing repo patterns (follows / adapts / departs)\n- Failure mode to watch\n- Philosophy fit (name specific principles)\n\nCompare and recommend. If both converge on the same approach, say so honestly.\n\nWrite the output to `design-candidates.md` with this structure:\n- Problem Understanding (core tensions, what makes it hard)\n- Philosophy Constraints (which principles matter for this problem)\n- Candidates (each with: summary, tensions resolved/accepted, failure mode, philosophy fit)\n- Comparison and Recommendation\n- Open Questions (if any remain)",
62
62
  "requireConfirmation": false
63
63
  },
64
64
  {
@@ -112,13 +112,30 @@
112
112
  },
113
113
  "body": [
114
114
  {
115
- "id": "phase-2a-review-design",
116
- "title": "Review Design for Gaps, Issues, and Improvements",
117
- "prompt": "Review the selected architecture using the explicit tradeoffs and failure modes from Phase 1 as your review criteria — not a generic gaps checklist.\n\nTargeted review (derived from Phase 1 outputs):\n1. Are the `acceptedTradeoffs` actually acceptable? For each accepted tradeoff, verify it won't violate acceptance criteria or invariants under realistic conditions.\n2. Are the `identifiedFailureModes` actually handled? For each failure mode, trace through the design and confirm there's a mitigation path. If not, flag it.\n3. Does the selected approach's relationship to existing repo patterns hold up? If it 'adapts' an existing pattern, verify the adaptation doesn't break the invariants the original pattern protects.\n4. Is there a simpler version of the selected approach that still satisfies acceptance criteria? (Complexity must continue to justify itself.)\n\nCompare against the runner-up:\n- Are there elements from the runner-up that would strengthen the selected approach without adding complexity?\n- Would a hybrid resolve an accepted tradeoff that's bothering you?\n\nPhilosophy alignment: does the architecture respect the user's active coding rules?\n\nBefore delegating, state your current assessment: what do you think the strongest and weakest parts of the design are right now?\n\nMode-adaptive delegation:\n- QUICK: self-review only\n- STANDARD: optionally spawn ONE WorkRail Executor running `routine-hypothesis-challenge` focused specifically on the accepted tradeoffs and failure modes\n- THOROUGH: spawn TWO WorkRail Executors — `routine-hypothesis-challenge` on tradeoffs + `routine-execution-simulation` on failure modes\n\nAfter receiving subagent output (if used), interrogate it against your pre-assessment. Do not adopt their framing wholesale. State what changed your thinking and what didn't.\n\nIf issues are found, fix the design (update `selectedApproach`, `architectureRationale`, `pivotTriggers`, `acceptedTradeoffs`, `identifiedFailureModes`) before continuing.\n\nSet context variables:\n- `designFindings`\n- `designRevised`",
115
+ "id": "phase-2a-pre-assess-design-review",
116
+ "title": "Pre-Assess Design Review",
117
+ "prompt": "Before the detailed design review, state your current assessment in 2-4 sentences.\n\nSay:\n- what you think the strongest part of the selected design is right now\n- what you think the weakest part is right now\n- which tradeoff or failure mode worries you most\n\nThis is your reference point for interpreting the review findings.\n\nSet context variable:\n- `designReviewAssessment`",
118
118
  "requireConfirmation": false
119
119
  },
120
120
  {
121
- "id": "phase-2b-loop-decision",
121
+ "id": "phase-2b-design-review-core",
122
+ "title": "Design Review Core",
123
+ "templateCall": {
124
+ "templateId": "wr.templates.routine.design-review",
125
+ "args": {
126
+ "deliverableName": "design-review-findings.md"
127
+ }
128
+ },
129
+ "requireConfirmation": false
130
+ },
131
+ {
132
+ "id": "phase-2c-synthesize-design-review",
133
+ "title": "Synthesize Design Review Findings",
134
+ "prompt": "Read `design-review-findings.md` and synthesize the review into workflow-owned decisions.\n\nPart A — Compare against your pre-assessment:\nRevisit `designReviewAssessment`.\n- What did the review confirm?\n- What did it surface that you missed?\n- What changed your mind and what held firm?\n\nPart B — Optional mode-adaptive challenge around the review findings:\n- QUICK: self-synthesize only\n- STANDARD: optionally spawn ONE WorkRail Executor running `routine-hypothesis-challenge` focused on the most serious review finding\n- THOROUGH: optionally spawn TWO WorkRail Executors — `routine-hypothesis-challenge` on the most serious finding + `routine-execution-simulation` on the most dangerous failure mode\n\nPart C — Decide:\nInterpret the findings yourself. Do not adopt the review artifact or any subagent framing wholesale.\n\nIf issues are found, fix the design (update `selectedApproach`, `architectureRationale`, `pivotTriggers`, `acceptedTradeoffs`, `identifiedFailureModes`) before continuing.\n\nSet context variables:\n- `designFindings`\n- `designRevised`",
135
+ "requireConfirmation": false
136
+ },
137
+ {
138
+ "id": "phase-2d-loop-decision",
122
139
  "title": "Design Review Loop Decision",
123
140
  "prompt": "Provide a loop control artifact.\n\nDecision rules:\n- if `designFindings` is non-empty and design was revised -> continue (verify the revision)\n- if `designFindings` is empty -> stop\n- if max iterations reached -> stop and document remaining concerns\n\nOutput exactly:\n```json\n{\n \"artifacts\": [{\n \"kind\": \"wr.loop_control\",\n \"decision\": \"continue\"\n }]\n}\n```",
124
141
  "requireConfirmation": false,
@@ -242,13 +259,24 @@
242
259
  },
243
260
  "body": [
244
261
  {
245
- "id": "phase-7a-verify-and-fix",
246
- "title": "Verify Integration and Fix Issues",
247
- "prompt": "Perform integration verification across all implemented slices.\n\nRequired:\n- verify acceptance criteria\n- map invariants to concrete proof (tests, build results, explicit reasoning)\n- run whole-task validation commands\n- identify any invariant violations or regressions\n- confirm the implemented result aligns with the user's coding philosophy, naming any tensions explicitly\n- review cumulative drift across all slices\n- check whether repeated small compromises added up to a larger pattern problem\n\nIf issues are found, fix them immediately:\n- apply code fixes\n- re-run affected tests\n- update `implementation_plan.md` if the fix changed boundaries or approach\n\nSet context variables:\n- `integrationFindings`\n- `integrationPassed`\n- `regressionDetected`",
262
+ "id": "phase-7a-final-verification-core",
263
+ "title": "Final Verification Core",
264
+ "templateCall": {
265
+ "templateId": "wr.templates.routine.final-verification",
266
+ "args": {
267
+ "deliverableName": "final-verification-findings.md"
268
+ }
269
+ },
270
+ "requireConfirmation": false
271
+ },
272
+ {
273
+ "id": "phase-7b-fix-and-summarize",
274
+ "title": "Fix Issues and Summarize Verification",
275
+ "prompt": "Read `final-verification-findings.md` and turn it into workflow-owned decisions and fixes.\n\nRequired:\n- interpret the findings yourself rather than rubber-stamping them\n- identify any invariant violations or regressions that must be fixed now\n- if issues are found, fix them immediately\n- re-run affected tests\n- update `implementation_plan.md` if the fix changed boundaries or approach\n\nSet context variables:\n- `integrationFindings`\n- `integrationPassed`\n- `regressionDetected`",
248
276
  "requireConfirmation": false
249
277
  },
250
278
  {
251
- "id": "phase-7b-loop-decision",
279
+ "id": "phase-7c-loop-decision",
252
280
  "title": "Final Verification Loop Decision",
253
281
  "prompt": "Provide a loop control artifact.\n\nDecision rules:\n- if `integrationFindings` is non-empty and fixes were applied -> continue (re-verify the fixes)\n- if `integrationFindings` is empty or all issues resolved -> stop and produce handoff\n- if max iterations reached -> stop and document remaining concerns\n\nWhen stopping, include the handoff summary:\n- acceptance criteria status\n- invariant status\n- test/build summary\n- concise PR/MR description draft (why, test plan, rollout notes)\n- follow-up tickets\n- any philosophy tensions accepted intentionally and why\n\nKeep the handoff concise and executive-level. Do not auto-merge or push unless the user explicitly asks.\n\nOutput exactly:\n```json\n{\n \"artifacts\": [{\n \"kind\": \"wr.loop_control\",\n \"decision\": \"continue\"\n }]\n}\n```",
254
282
  "requireConfirmation": true,
@@ -0,0 +1,60 @@
1
+ {
2
+ "id": "routine-design-review",
3
+ "name": "Design Review Routine",
4
+ "version": "1.0.0",
5
+ "description": "Reviews a selected design using explicit tradeoffs, failure modes, simpler-alternative checks, runner-up comparison, and philosophy alignment. Produces a reusable design-review findings artifact.",
6
+ "clarificationPrompts": [
7
+ "What design artifact or summary should I review?",
8
+ "What tradeoffs, failure modes, and runner-up option are available?",
9
+ "What artifact name should I produce?"
10
+ ],
11
+ "preconditions": [
12
+ "A selected design or design summary is available",
13
+ "Accepted tradeoffs and failure modes are available",
14
+ "A runner-up or alternative approach is available",
15
+ "The dev's philosophy or rules are available"
16
+ ],
17
+ "metaGuidance": [
18
+ "PURPOSE: review the quality of a selected design, not generate a fresh design from scratch.",
19
+ "ROLE: you are a reviewer looking for real gaps, not generic criticism.",
20
+ "PHILOSOPHY: name tensions by principle when they matter.",
21
+ "SIMPLICITY: always ask whether a simpler version would still satisfy acceptance criteria."
22
+ ],
23
+ "steps": [
24
+ {
25
+ "id": "step-review-tradeoffs",
26
+ "title": "Step 1: Review Accepted Tradeoffs",
27
+ "prompt": "Review the selected design by walking through the accepted tradeoffs explicitly.\n\nFor each accepted tradeoff:\n- Verify it will not violate acceptance criteria or invariants under realistic conditions\n- Identify what would make the tradeoff no longer acceptable\n- Note any hidden assumptions\n\nWorking notes:\n- Tradeoff review\n- Hidden assumptions\n- Conditions under which the tradeoff fails",
28
+ "agentRole": "You are a reviewer validating whether accepted tradeoffs are actually acceptable.",
29
+ "requireConfirmation": false
30
+ },
31
+ {
32
+ "id": "step-review-failure-modes",
33
+ "title": "Step 2: Review Failure Modes",
34
+ "prompt": "Review the identified failure modes for the selected design.\n\nFor each failure mode:\n- Trace whether the design handles it adequately\n- Identify missing mitigations\n- Note which failure mode is most dangerous if it occurs\n\nWorking notes:\n- Failure mode coverage\n- Missing mitigations\n- Highest-risk failure mode",
35
+ "agentRole": "You are a failure analyst checking whether the design can survive realistic problems.",
36
+ "requireConfirmation": false
37
+ },
38
+ {
39
+ "id": "step-compare-runner-up",
40
+ "title": "Step 3: Compare Against Runner-Up and Simpler Alternatives",
41
+ "prompt": "Compare the selected design against the runner-up and a simpler possible variant.\n\nReview:\n- Whether the runner-up has elements worth pulling into the selected design\n- Whether a hybrid would resolve an uncomfortable tradeoff without adding much complexity\n- Whether a simpler version of the selected design would still satisfy acceptance criteria\n\nWorking notes:\n- Runner-up strengths worth borrowing\n- Simpler alternative analysis\n- Hybrid opportunities",
42
+ "agentRole": "You are comparing options honestly rather than defending the current favorite.",
43
+ "requireConfirmation": false
44
+ },
45
+ {
46
+ "id": "step-review-philosophy",
47
+ "title": "Step 4: Review Philosophy Alignment",
48
+ "prompt": "Review the selected design against the dev's philosophy.\n\nName the principles that matter for this design and assess:\n- Which principles are satisfied clearly\n- Which principles are under tension\n- Which tensions are acceptable versus risky\n\nWorking notes:\n- Relevant principles\n- Satisfied principles\n- Tensions and why they matter",
49
+ "agentRole": "You are checking whether the design respects what the dev actually values.",
50
+ "requireConfirmation": false
51
+ },
52
+ {
53
+ "id": "step-deliver",
54
+ "title": "Step 5: Deliver Design Review Findings",
55
+ "prompt": "Create `{deliverableName}`.\n\nRequired structure:\n- Tradeoff Review\n- Failure Mode Review\n- Runner-Up / Simpler Alternative Review\n- Philosophy Alignment\n- Findings (Red / Orange / Yellow or equivalent severity)\n- Recommended Revisions\n- Residual Concerns\n\nOptimize for concise, actionable findings that the main workflow can interpret and decide on.",
56
+ "agentRole": "You are delivering a review artifact for the main workflow to synthesize and act on.",
57
+ "requireConfirmation": false
58
+ }
59
+ ]
60
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "id": "routine-final-verification",
3
+ "name": "Final Verification Routine",
4
+ "version": "1.0.0",
5
+ "description": "Performs reusable final verification over acceptance criteria, invariants, validation evidence, regressions, cumulative drift, and philosophy alignment. Produces a proof-oriented verification artifact built around claim -> evidence -> gap -> severity -> readiness verdict.",
6
+ "clarificationPrompts": [
7
+ "What implementation or slices should I verify?",
8
+ "What acceptance criteria and invariants must hold?",
9
+ "What validation commands or evidence are available?",
10
+ "What artifact name should I produce?"
11
+ ],
12
+ "preconditions": [
13
+ "Implementation is available for review",
14
+ "Acceptance criteria are available",
15
+ "Invariants are available",
16
+ "A deterministic validation path exists"
17
+ ],
18
+ "metaGuidance": [
19
+ "PURPOSE: verify whether the whole task is truly done, not just locally green.",
20
+ "ROLE: you are a verifier proving or disproving readiness using evidence.",
21
+ "PROOF: map every readiness claim to tests, build output, artifacts, or explicit reasoning.",
22
+ "SEVERITY: every gap should be classified clearly so the caller knows what blocks shipping.",
23
+ "DRIFT: look for cumulative compromise, not just isolated defects."
24
+ ],
25
+ "steps": [
26
+ {
27
+ "id": "step-map-claims-to-proof",
28
+ "title": "Step 1: Map Acceptance Criteria and Invariants to Proof",
29
+ "prompt": "Map the implementation's readiness claims to concrete proof.\n\nFor each acceptance criterion and invariant:\n- state the claim clearly\n- identify the strongest supporting evidence (test, build output, artifact, code reasoning)\n- note whether the proof is strong, partial, or missing\n- record any gap that prevents the claim from being fully proven\n\nWorking notes:\n- Claim -> proof matrix\n- Strong / partial / missing proof\n- Gaps that weaken readiness",
30
+ "agentRole": "You are a verifier mapping claims to concrete proof.",
31
+ "requireConfirmation": false
32
+ },
33
+ {
34
+ "id": "step-review-validation-evidence",
35
+ "title": "Step 2: Review Validation Evidence Quality",
36
+ "prompt": "Review the overall validation evidence quality.\n\nCheck:\n- whether the right validation commands were run\n- whether the evidence is trustworthy and sufficient for readiness\n- whether any critical area has only weak or indirect proof\n- whether additional validation would materially change confidence\n\nWorking notes:\n- Validation commands reviewed\n- Evidence strength assessment\n- Missing or weak proof",
37
+ "agentRole": "You are checking whether the validation story is actually strong enough to trust.",
38
+ "requireConfirmation": false
39
+ },
40
+ {
41
+ "id": "step-classify-gaps-and-regressions",
42
+ "title": "Step 3: Classify Gaps, Regressions, and Drift by Severity",
43
+ "prompt": "Review the implementation for regressions, drift, and unresolved gaps.\n\nCheck:\n- invariant violations or regressions\n- whether repeated small compromises added up to a larger pattern problem\n- whether the implementation still matches intended plan boundaries\n- whether any proof gaps should block shipping versus merely lower confidence\n\nClassify each issue by severity:\n- Red: blocks readiness\n- Orange: should be fixed before shipping if possible\n- Yellow: acceptable tension or bounded follow-up\n\nWorking notes:\n- Regressions found\n- Drift assessment\n- Severity-classified gaps",
44
+ "agentRole": "You are looking for the subtle ways a task can go wrong even when individual slices seemed fine.",
45
+ "requireConfirmation": false
46
+ },
47
+ {
48
+ "id": "step-review-philosophy",
49
+ "title": "Step 4: Review Philosophy Alignment",
50
+ "prompt": "Review the final result against the dev's philosophy.\n\nAssess:\n- which principles are clearly satisfied\n- which tensions remain intentionally accepted\n- which philosophy violations should be severity Red, Orange, or Yellow\n- whether any philosophy concern changes the readiness verdict\n\nWorking notes:\n- Satisfied principles\n- Accepted tensions\n- Severity-classified philosophy concerns",
51
+ "agentRole": "You are checking whether the finished result still reflects the dev's standards.",
52
+ "requireConfirmation": false
53
+ },
54
+ {
55
+ "id": "step-deliver",
56
+ "title": "Step 5: Deliver Final Verification Findings",
57
+ "prompt": "Create `{deliverableName}`.\n\nRequired structure:\n- Readiness Claims and Proof Matrix\n - claim\n - supporting evidence\n - proof strength (strong / partial / missing)\n - proof gap\n- Validation Evidence Summary\n- Severity-Classified Gaps\n - Red (blocking)\n - Orange (should fix)\n - Yellow (accepted tension / follow-up)\n- Regression / Drift Review\n- Philosophy Alignment\n- Recommended Fixes\n- Readiness Verdict\n - Ready\n - Ready with Accepted Tensions\n - Not Ready\n\nOptimize for a compact artifact the main workflow can use to decide whether to fix, re-verify, or hand off.",
58
+ "agentRole": "You are delivering a verification artifact the main workflow can interpret and act on.",
59
+ "requireConfirmation": false
60
+ }
61
+ ]
62
+ }
@@ -1,113 +1,69 @@
1
1
  {
2
2
  "id": "routine-hypothesis-challenge",
3
3
  "name": "Hypothesis Challenge Routine",
4
- "version": "1.1.0",
5
- "description": "Adversarial testing of hypotheses using an Ideate -> Plan -> Execute strategy. Configurable rigor levels (1-5) allow for progressively deeper skepticism and stress testing.",
4
+ "version": "1.0.0",
5
+ "description": "Lean adversarial review of a hypothesis, recommendation, or diagnosis. Produces the strongest counter-argument, exposes weak assumptions and evidence gaps, identifies likely failure modes, and defines the critical tests needed to keep, revise, or reject the current claim.",
6
6
  "clarificationPrompts": [
7
- "What hypotheses or assumptions should I challenge?",
8
- "What rigor level do you need? (1=Surface, 3=Deep, 5=Maximum)",
9
- "What evidence supports these hypotheses?",
10
- "What context should I consider? (bug description, findings, constraints)"
7
+ "What hypothesis, recommendation, or diagnosis should I challenge?",
8
+ "What evidence currently supports it?",
9
+ "What depth do you need? (QUICK / STANDARD / THOROUGH; legacy rigor=1/3/5 is still accepted for compatibility)",
10
+ "What artifact name should I produce?"
11
11
  ],
12
12
  "preconditions": [
13
- "Hypotheses or assumptions are clearly stated",
14
- "Rigor level (1-5) is specified",
15
- "Supporting evidence is available",
16
- "Agent has read access to relevant context"
13
+ "A target hypothesis, recommendation, or diagnosis is available",
14
+ "Supporting evidence or reasoning is available",
15
+ "Relevant context is available for challenge"
17
16
  ],
18
17
  "metaGuidance": [
19
- "**ROUTINE PURPOSE:**",
20
- "This routine performs adversarial testing. It separates strategy (Ideating attack vectors) from execution (Challenging/Stress Testing).",
21
- "**PHASES:**",
22
- "1. IDEATE: Brainstorm attack vectors and common flaws",
23
- "2. STRATEGIZE: Define the challenge plan for the requested rigor",
24
- "3. EXECUTE: Run the challenge (Surface/Deep/Max)",
25
- "4. SYNTHESIZE: Deliver verdicts and alternative explanations",
26
- "**CORE PRINCIPLES:**",
27
- "- ADVERSARIAL: Actively try to disprove, don't confirm",
28
- "- SYSTEMATIC: Challenge assumptions, logic, and evidence",
29
- "- CONSTRUCTIVE: Goal is to strengthen truth, not just destroy"
18
+ "PURPOSE: strengthen truth by trying to break the current story.",
19
+ "ROLE: you are an adversarial reviewer, not a neutral summarizer.",
20
+ "SCOPE: challenge assumptions, evidence quality, and likely failure modes.",
21
+ "DISCIPLINE: produce concrete counter-arguments and critical tests, not vague skepticism.",
22
+ "DEPTH: QUICK = strongest counter only; STANDARD = counter + failure-mode review; THOROUGH = add alternative explanations and sharper discrimination tests.",
23
+ "COMPATIBILITY: prefer depth language (QUICK / STANDARD / THOROUGH). Treat legacy rigor values as adapter input, not the primary model."
30
24
  ],
31
25
  "steps": [
32
26
  {
33
- "id": "step-0-ideate-vectors",
34
- "title": "Step 0: Ideate Challenge Strategy",
35
- "prompt": "**IDEATE ATTACK VECTORS**\n\nBefore diving into specific hypotheses, step back and look at the whole picture.\n\n**YOUR MISSION:** Brainstorm ways to break these hypotheses.\n\n**EXECUTE:**\n1. Review all hypotheses together\n2. Identify shared assumptions (do they all assume X?)\n3. Brainstorm classes of failure (Concurrency? State? Logic?)\n4. Identify weak points in the evidence provided\n\n**REFLECT:**\n- Are these hypotheses too similar?\n- Are they missing a whole category of explanation?\n- What is the most likely \"unknown unknown\"?\n\n**WORKING NOTES:**\n- Common Assumptions\n- Potential Attack Vectors (e.g., Race Conditions, Edge Cases)\n- Evidence Weaknesses",
36
- "agentRole": "You are a red-team strategist planning your attack.",
37
- "requireConfirmation": false,
38
- "guidance": [
39
- "BRAINSTORM: Look for systemic issues first",
40
- "CATEGORIES: Think in categories (Logic, Data, Timing, Environment)",
41
- "SKEPTICISM: Assume the hypotheses are wrong. Why?"
42
- ]
27
+ "id": "step-load-target",
28
+ "title": "Step 1: Load the Target Claim and Evidence",
29
+ "prompt": "Load the current claim you are challenging.\n\nCapture:\n- the target claim in one sentence\n- the main assumptions it depends on\n- the strongest supporting evidence currently available\n- what result would count as meaningful disproof\n\nKeep this step compact and precise. The goal is to define exactly what is under challenge and what would falsify it.",
30
+ "agentRole": "You are defining exactly what claim is on trial and what would falsify it.",
31
+ "requireConfirmation": false
43
32
  },
44
33
  {
45
- "id": "step-1-plan-challenge",
46
- "title": "Step 1: Plan Challenge Tactics",
47
- "prompt": "**DEFINE CHALLENGE PLAN**\n\nNow define your specific tactics for the requested rigor level.\n\n**YOUR MISSION:** Create a concrete plan to test these hypotheses.\n\n**EXECUTE:**\n1. Map attack vectors to specific hypotheses\n2. Define **Key Questions** to answer\n3. Select **Stress Tests** or **Counter-Examples** to search for\n4. Define criteria for \"disproof\"\n\n**DELIVERABLE:**\nCreate `challenge-strategy.md`:\n- Attack Plan for each Hypothesis\n- Key Assumptions to Probe\n- Required Evidence check",
48
- "agentRole": "You are a lead auditor defining the scope of the audit.",
49
- "requireConfirmation": false,
50
- "guidance": [
51
- "TACTICS: Be specific (e.g., \"Check for null user in auth flow\")",
52
- "CRITERIA: What would convince you the hypothesis is false?"
53
- ]
34
+ "id": "step-break-claim",
35
+ "title": "Step 2: Find the Strongest Counter-Argument",
36
+ "prompt": "Find the strongest case against the current claim.\n\nChallenge it by asking:\n- What is the strongest counter-argument or competing explanation?\n- What evidence could be interpreted differently?\n- What hidden assumption is carrying too much weight?\n- What would a sharp skeptic say first?\n\nOptimize for the single strongest attack, not a long list of weak objections.",
37
+ "agentRole": "You are a sharp skeptic trying to overturn the current favorite with the strongest available attack.",
38
+ "requireConfirmation": false
54
39
  },
55
40
  {
56
- "id": "step-execute-rigor-1",
57
- "title": "Execution: Rigor 1 (Surface)",
58
- "runCondition": {
59
- "var": "rigor",
60
- "gte": 1
61
- },
62
- "prompt": "**EXECUTE RIGOR 1: SURFACE CHALLENGE**\n\nExecute your challenge plan at Rigor 1 (Surface).\n\n**MISSION:** Identify obvious flaws and simple counter-examples.\n\n**EXECUTE:**\n1. Follow `challenge-strategy.md`\n2. Check for obvious logical gaps\n3. Identify simple counter-examples\n4. Check for Occam's Razor alternatives\n\n**WORKING NOTES:**\n- Obvious Flaws\n- Simple Counter-Examples\n- Better Alternatives",
63
- "agentRole": "You are a skeptical reviewer looking for quick wins.",
64
- "requireConfirmation": false,
65
- "guidance": [
66
- "FOCUS: Obvious errors, simple logic gaps",
67
- "SPEED: Don't dig deep yet, look for low-hanging fruit"
68
- ]
69
- },
70
- {
71
- "id": "step-execute-rigor-3",
72
- "title": "Execution: Rigor 3 (Deep)",
73
- "runCondition": {
74
- "var": "rigor",
75
- "gte": 3
76
- },
77
- "prompt": "**EXECUTE RIGOR 3: DEEP CHALLENGE**\n\nExecute your challenge plan at Rigor 3 (Deep Analysis).\n\n**MISSION:** Deeply challenge with edge cases and hidden assumptions.\n\n**EXECUTE:**\n1. Follow `challenge-strategy.md`\n2. Expose hidden assumptions\n3. Generate systematic edge cases\n4. Analyze timing and environment factors\n\n**WORKING NOTES:**\n- Hidden Assumptions Exposed\n- Edge Case Analysis\n- Environmental Factors",
78
- "agentRole": "You are a rigorous auditor digging for structural flaws.",
79
- "requireConfirmation": false,
80
- "guidance": [
81
- "FOCUS: Unstated assumptions, boundary conditions",
82
- "DEPTH: trace logic chains to find breaks"
83
- ]
41
+ "id": "step-review-failure-modes",
42
+ "title": "Step 3: Review Weak Evidence and Likely Failure Modes",
43
+ "prompt": "Probe where the current claim could fail under realistic pressure.\n\nReview:\n- the weakest part of the evidence chain\n- the most likely failure modes if the claim is wrong\n- edge cases or environmental factors that could invalidate the conclusion\n- contradictions, unexplained facts, or missing proof\n\nFocus on the few things most likely to flip the conclusion rather than exhaustive enumeration.",
44
+ "agentRole": "You are testing whether the current story survives realistic pressure and real evidence quality.",
45
+ "requireConfirmation": false
84
46
  },
85
47
  {
86
- "id": "step-execute-rigor-5",
87
- "title": "Execution: Rigor 5 (Maximum)",
48
+ "id": "step-thorough-alternatives",
49
+ "title": "Step 4: Generate Alternative Explanations and Critical Tests",
88
50
  "runCondition": {
89
- "var": "rigor",
90
- "gte": 5
51
+ "or": [
52
+ { "var": "depth", "equals": "THOROUGH" },
53
+ { "var": "rigorMode", "equals": "THOROUGH" },
54
+ { "var": "rigor", "gte": 5 }
55
+ ]
91
56
  },
92
- "prompt": "**EXECUTE RIGOR 5: MAX CHALLENGE**\n\nExecute your challenge plan at Rigor 5 (Maximum Skepticism).\n\n**MISSION:** Try to break it completely.\n\n**EXECUTE:**\n1. Follow `challenge-strategy.md`\n2. Exhaustive assumption enumeration\n3. Extreme edge cases and adversarial inputs\n4. Second-order effects and chaos scenarios\n\n**WORKING NOTES:**\n- Exhaustive Challenges\n- Extreme Scenarios\n- Disproof Attempts",
93
- "agentRole": "You are a relentless adversary trying to prove it wrong.",
94
- "requireConfirmation": false,
95
- "guidance": [
96
- "FOCUS: Breaking the system, extreme edge cases",
97
- "MINDSET: Trust nothing, verify everything"
98
- ]
57
+ "prompt": "For THOROUGH review, go beyond the primary counter-argument into alternatives and discrimination strategy.\n\nProduce:\n- the 1-2 strongest alternative explanations or competing hypotheses\n- why each might beat the current claim\n- the critical tests, observations, or traces that would discriminate between them\n- what result would cause you to keep, revise, or reject the current claim\n\nThis step exists to make THOROUGH meaningfully deeper than STANDARD, not just wordier.",
58
+ "agentRole": "You are building the shortest path to proving which explanation survives.",
59
+ "requireConfirmation": false
99
60
  },
100
61
  {
101
- "id": "step-synthesize",
102
- "title": "Step 5: Synthesize Verdicts",
103
- "prompt": "**SYNTHESIZE VERDICTS**\n\nSynthesize all challenges into final verdicts.\n\n**MISSION:** Deliver clear judgments on each hypothesis.\n\n**EXECUTE:**\n1. Review all Working Notes\n2. Assign Verdicts (Keep/Revise/Reject)\n3. Prioritize Alternatives\n4. Define Critical Tests\n\n**DELIVERABLE:**\nCreate `{deliverableName}`:\n- Executive Summary\n- Hypothesis Analysis & Verdicts\n- Critical Tests Needed\n- Recommendations",
104
- "agentRole": "You are a judge delivering the final verdict.",
105
- "requireConfirmation": false,
106
- "guidance": [
107
- "VERDICTS: Be decisive based on evidence",
108
- "ALTERNATIVES: Propose concrete, better explanations",
109
- "ACTION: What specifically needs to be tested?"
110
- ]
62
+ "id": "step-deliver",
63
+ "title": "Step 5: Deliver the Challenge Verdict",
64
+ "prompt": "Create `{deliverableName}`.\n\nRequired structure:\n- Target Claim\n- Strongest Counter-Argument\n- Weak Assumptions / Evidence Gaps\n- Likely Failure Modes\n- Alternative Explanations (if explored)\n- Critical Tests\n- Verdict: Keep / Revise / Reject\n- Next Action\n\nOptimize for a compact artifact that a main workflow can interrogate and act on immediately. Prefer decisive arguments over exhaustive ceremony.",
65
+ "agentRole": "You are delivering a decisive challenge artifact for the main workflow or caller to synthesize.",
66
+ "requireConfirmation": false
111
67
  }
112
68
  ]
113
- }
69
+ }