@exaudeus/workrail 1.7.0 → 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.
- package/dist/application/services/validation-engine.js +3 -0
- package/dist/manifest.json +58 -58
- package/dist/mcp/handler-factory.js +5 -1
- package/dist/mcp/handlers/v2-advance-core/index.js +4 -1
- package/dist/mcp/handlers/v2-advance-core/input-validation.d.ts +1 -0
- package/dist/mcp/handlers/v2-advance-core/input-validation.js +3 -0
- package/dist/mcp/output-schemas.d.ts +18 -18
- package/dist/mcp/output-schemas.js +3 -0
- package/dist/mcp/v2/tools.js +1 -1
- package/dist/mcp/validation/index.d.ts +2 -1
- package/dist/mcp/validation/index.js +2 -1
- package/dist/mcp/validation/suggestion-generator.d.ts +2 -0
- package/dist/mcp/validation/suggestion-generator.js +30 -0
- package/dist/types/workflow-definition.d.ts +1 -0
- package/dist/v2/durable-core/domain/blocked-node-builder.js +2 -0
- package/dist/v2/durable-core/domain/blocking-decision.d.ts +3 -0
- package/dist/v2/durable-core/domain/blocking-decision.js +9 -0
- package/dist/v2/durable-core/domain/prompt-renderer.js +6 -1
- package/dist/v2/durable-core/domain/reason-model.d.ts +5 -2
- package/dist/v2/durable-core/domain/reason-model.js +17 -2
- package/dist/v2/durable-core/domain/risk-policy-guardrails.js +1 -0
- package/dist/v2/durable-core/schemas/execution-snapshot/blocked-snapshot.d.ts +38 -14
- package/dist/v2/durable-core/schemas/execution-snapshot/blocked-snapshot.js +4 -0
- package/dist/v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.d.ts +177 -78
- package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +240 -144
- package/dist/v2/durable-core/schemas/session/blockers.d.ts +11 -11
- package/dist/v2/durable-core/schemas/session/blockers.js +3 -0
- package/dist/v2/durable-core/schemas/session/events.d.ts +27 -27
- package/dist/v2/durable-core/schemas/session/gaps.d.ts +16 -16
- package/dist/v2/durable-core/schemas/session/gaps.js +2 -2
- package/package.json +1 -1
- package/spec/workflow.schema.json +5 -0
|
@@ -62,6 +62,9 @@ let ValidationEngine = ValidationEngine_1 = class ValidationEngine {
|
|
|
62
62
|
warnings: undefined,
|
|
63
63
|
}));
|
|
64
64
|
}
|
|
65
|
+
if (this.isValidationRule(criteria)) {
|
|
66
|
+
return this.evaluateRuleArray(output, [criteria], context);
|
|
67
|
+
}
|
|
65
68
|
return (0, neverthrow_1.err)({ kind: 'invalid_criteria_format', message: 'Invalid validation criteria format' });
|
|
66
69
|
}
|
|
67
70
|
catch (error) {
|
package/dist/manifest.json
CHANGED
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"bytes": 2030
|
|
39
39
|
},
|
|
40
40
|
"application/services/validation-engine.js": {
|
|
41
|
-
"sha256": "
|
|
42
|
-
"bytes":
|
|
41
|
+
"sha256": "81592794bad1d77b0f8cdf6ed6486a17c6eebc3a4fe9e484693fbb6f8cdc5c96",
|
|
42
|
+
"bytes": 31038
|
|
43
43
|
},
|
|
44
44
|
"application/services/workflow-compiler.d.ts": {
|
|
45
45
|
"sha256": "dc7b1ed75ee4e90f90c35088d5c336a94d782012e5926fd7c939613e483b23fc",
|
|
@@ -526,8 +526,8 @@
|
|
|
526
526
|
"bytes": 796
|
|
527
527
|
},
|
|
528
528
|
"mcp/handler-factory.js": {
|
|
529
|
-
"sha256": "
|
|
530
|
-
"bytes":
|
|
529
|
+
"sha256": "711bdf8bd71eaf2ad2a6b6b1bf84db004030e06223ce52075e01470a3bffd88d",
|
|
530
|
+
"bytes": 3805
|
|
531
531
|
},
|
|
532
532
|
"mcp/handlers/session.d.ts": {
|
|
533
533
|
"sha256": "38926e69a0e4935d1dbcdc53848be9fff0e4d8f96827883da3216f217918fa82",
|
|
@@ -566,16 +566,16 @@
|
|
|
566
566
|
"bytes": 3500
|
|
567
567
|
},
|
|
568
568
|
"mcp/handlers/v2-advance-core/index.js": {
|
|
569
|
-
"sha256": "
|
|
570
|
-
"bytes":
|
|
569
|
+
"sha256": "f144bbf46678ff03dcdf3e76d6fe0375942469a9e45d40de748c80d4c49bb2c6",
|
|
570
|
+
"bytes": 7134
|
|
571
571
|
},
|
|
572
572
|
"mcp/handlers/v2-advance-core/input-validation.d.ts": {
|
|
573
|
-
"sha256": "
|
|
574
|
-
"bytes":
|
|
573
|
+
"sha256": "d736f163f6673b30f653c63336a287cdfe99c9f58b601c7220ce441590f802ba",
|
|
574
|
+
"bytes": 2081
|
|
575
575
|
},
|
|
576
576
|
"mcp/handlers/v2-advance-core/input-validation.js": {
|
|
577
|
-
"sha256": "
|
|
578
|
-
"bytes":
|
|
577
|
+
"sha256": "3ddc086926fbc2be02cf52115370c221883c542f89ab256ee52388d115b7ae83",
|
|
578
|
+
"bytes": 3316
|
|
579
579
|
},
|
|
580
580
|
"mcp/handlers/v2-advance-core/outcome-blocked.d.ts": {
|
|
581
581
|
"sha256": "4f49a588027929875a98c1212de40201512a023d4bf230f8d9e075cbdfa8421d",
|
|
@@ -746,12 +746,12 @@
|
|
|
746
746
|
"bytes": 7535
|
|
747
747
|
},
|
|
748
748
|
"mcp/output-schemas.d.ts": {
|
|
749
|
-
"sha256": "
|
|
750
|
-
"bytes":
|
|
749
|
+
"sha256": "5c8256c738cb2b3c193fa3fe955ca3aaf00ae9381e8ef162d1477824db18b137",
|
|
750
|
+
"bytes": 51242
|
|
751
751
|
},
|
|
752
752
|
"mcp/output-schemas.js": {
|
|
753
|
-
"sha256": "
|
|
754
|
-
"bytes":
|
|
753
|
+
"sha256": "fd43722d021afb0c64cfe4356fc7ba9e41e6e3e9f9506866e0be0159d1b6908b",
|
|
754
|
+
"bytes": 12115
|
|
755
755
|
},
|
|
756
756
|
"mcp/server.d.ts": {
|
|
757
757
|
"sha256": "bec49b8d07e189a53db7100d2f0e1e84ffe03150f04e1b06908ee3282982b4a2",
|
|
@@ -838,8 +838,8 @@
|
|
|
838
838
|
"bytes": 5486
|
|
839
839
|
},
|
|
840
840
|
"mcp/v2/tools.js": {
|
|
841
|
-
"sha256": "
|
|
842
|
-
"bytes":
|
|
841
|
+
"sha256": "5af4e1a5a3a6c43df6db4ea40eb6d12fd0757af94f4e3e80d9f875ecf0181544",
|
|
842
|
+
"bytes": 7812
|
|
843
843
|
},
|
|
844
844
|
"mcp/validation/bounded-json.d.ts": {
|
|
845
845
|
"sha256": "82203ac6123d5c6989606c3b5405aaea99ab829c8958835f9ae3ba45b8bc8fd5",
|
|
@@ -850,12 +850,12 @@
|
|
|
850
850
|
"bytes": 834
|
|
851
851
|
},
|
|
852
852
|
"mcp/validation/index.d.ts": {
|
|
853
|
-
"sha256": "
|
|
854
|
-
"bytes":
|
|
853
|
+
"sha256": "2e1bf908d402aa27f939aa1ee8dd78e38ccd6f0d6f5c19e6c18c93807e8fffce",
|
|
854
|
+
"bytes": 1036
|
|
855
855
|
},
|
|
856
856
|
"mcp/validation/index.js": {
|
|
857
|
-
"sha256": "
|
|
858
|
-
"bytes":
|
|
857
|
+
"sha256": "5ab761835388b0dd353293312899ded3433fe69121b38317f6ddf3ab2a6587dc",
|
|
858
|
+
"bytes": 4664
|
|
859
859
|
},
|
|
860
860
|
"mcp/validation/schema-introspection.d.ts": {
|
|
861
861
|
"sha256": "7e0262e76234dd37079156027e95a30987b8949351f3e9ec0fd7b2be093a159d",
|
|
@@ -882,12 +882,12 @@
|
|
|
882
882
|
"bytes": 592
|
|
883
883
|
},
|
|
884
884
|
"mcp/validation/suggestion-generator.d.ts": {
|
|
885
|
-
"sha256": "
|
|
886
|
-
"bytes":
|
|
885
|
+
"sha256": "159bde7596e7459f6025e152a24f1ab850d5cbd2bf55461036a05709dc5dbaa1",
|
|
886
|
+
"bytes": 731
|
|
887
887
|
},
|
|
888
888
|
"mcp/validation/suggestion-generator.js": {
|
|
889
|
-
"sha256": "
|
|
890
|
-
"bytes":
|
|
889
|
+
"sha256": "e4988260027f7c17398da69a7b1b8dcbb266f1b42100c63723a6d99426a0802e",
|
|
890
|
+
"bytes": 5250
|
|
891
891
|
},
|
|
892
892
|
"mcp/validation/suggestion-types.d.ts": {
|
|
893
893
|
"sha256": "b93ae2e42f4b24789dcbe19db31a41af9534ad0dca85635339c2a10db42e298b",
|
|
@@ -1058,8 +1058,8 @@
|
|
|
1058
1058
|
"bytes": 395
|
|
1059
1059
|
},
|
|
1060
1060
|
"types/workflow-definition.d.ts": {
|
|
1061
|
-
"sha256": "
|
|
1062
|
-
"bytes":
|
|
1061
|
+
"sha256": "350be64b9da13515fc717a3cd72ddf19b3544087a246c7b2e79da0ef5ed3ffef",
|
|
1062
|
+
"bytes": 3614
|
|
1063
1063
|
},
|
|
1064
1064
|
"types/workflow-definition.js": {
|
|
1065
1065
|
"sha256": "e269d62f27b7f37f870183d6b77800b7aa1e22dabc894374bab8f34db049a55b",
|
|
@@ -1198,16 +1198,16 @@
|
|
|
1198
1198
|
"bytes": 880
|
|
1199
1199
|
},
|
|
1200
1200
|
"v2/durable-core/domain/blocked-node-builder.js": {
|
|
1201
|
-
"sha256": "
|
|
1202
|
-
"bytes":
|
|
1201
|
+
"sha256": "a5c69a1a31ad4a04a0c7924141df00ad7d47bf0653f88465f4d985316de344d4",
|
|
1202
|
+
"bytes": 4107
|
|
1203
1203
|
},
|
|
1204
1204
|
"v2/durable-core/domain/blocking-decision.d.ts": {
|
|
1205
|
-
"sha256": "
|
|
1206
|
-
"bytes":
|
|
1205
|
+
"sha256": "4cac7d676931cebbf8d2a80a212b295716836596938973d16371beede62e9932",
|
|
1206
|
+
"bytes": 1256
|
|
1207
1207
|
},
|
|
1208
1208
|
"v2/durable-core/domain/blocking-decision.js": {
|
|
1209
|
-
"sha256": "
|
|
1210
|
-
"bytes":
|
|
1209
|
+
"sha256": "784983173f0b9741b0784e7aa8fdaef34c36c9715f8c9dcdcb22132f89be058e",
|
|
1210
|
+
"bytes": 2557
|
|
1211
1211
|
},
|
|
1212
1212
|
"v2/durable-core/domain/bundle-builder.d.ts": {
|
|
1213
1213
|
"sha256": "cb08b33f82f7cab8ef1b5f441a531886a4e1d0fdff69105b121089dc2e790357",
|
|
@@ -1302,16 +1302,16 @@
|
|
|
1302
1302
|
"bytes": 935
|
|
1303
1303
|
},
|
|
1304
1304
|
"v2/durable-core/domain/prompt-renderer.js": {
|
|
1305
|
-
"sha256": "
|
|
1306
|
-
"bytes":
|
|
1305
|
+
"sha256": "3dd32e6335bc1aabe24f2477312975af8ef548daf5c7aad5e7f6b4e7aa2f5a78",
|
|
1306
|
+
"bytes": 9074
|
|
1307
1307
|
},
|
|
1308
1308
|
"v2/durable-core/domain/reason-model.d.ts": {
|
|
1309
|
-
"sha256": "
|
|
1310
|
-
"bytes":
|
|
1309
|
+
"sha256": "650fcb2d9969a4e6123cccbd4913f4d57aeab21a19bb907aa1e11f95e5a95089",
|
|
1310
|
+
"bytes": 3762
|
|
1311
1311
|
},
|
|
1312
1312
|
"v2/durable-core/domain/reason-model.js": {
|
|
1313
|
-
"sha256": "
|
|
1314
|
-
"bytes":
|
|
1313
|
+
"sha256": "23421e96b87cc59fec1a9205979410d27b2607c5b5cb98302902d0bcf32dfe3d",
|
|
1314
|
+
"bytes": 11820
|
|
1315
1315
|
},
|
|
1316
1316
|
"v2/durable-core/domain/recap-recovery.d.ts": {
|
|
1317
1317
|
"sha256": "82e7b20a22d409f729ccf79d345c00a7e27f1898a465dfca4cd789ff7766a3d6",
|
|
@@ -1334,8 +1334,8 @@
|
|
|
1334
1334
|
"bytes": 637
|
|
1335
1335
|
},
|
|
1336
1336
|
"v2/durable-core/domain/risk-policy-guardrails.js": {
|
|
1337
|
-
"sha256": "
|
|
1338
|
-
"bytes":
|
|
1337
|
+
"sha256": "da5c71be307bff6e0c479dba09439020461854c3d27ffcc9e9cb737891dfd114",
|
|
1338
|
+
"bytes": 2719
|
|
1339
1339
|
},
|
|
1340
1340
|
"v2/durable-core/domain/validation-criteria-validator.d.ts": {
|
|
1341
1341
|
"sha256": "9d130b9a641857696d510cad691dcfb02d5ac54138e11fbb58ae9305a4cb1987",
|
|
@@ -1498,16 +1498,16 @@
|
|
|
1498
1498
|
"bytes": 1350
|
|
1499
1499
|
},
|
|
1500
1500
|
"v2/durable-core/schemas/execution-snapshot/blocked-snapshot.d.ts": {
|
|
1501
|
-
"sha256": "
|
|
1502
|
-
"bytes":
|
|
1501
|
+
"sha256": "278fa4bf5b42f7560382bd821ec706151bba0ab8fc7a17118dfcd02824757625",
|
|
1502
|
+
"bytes": 24869
|
|
1503
1503
|
},
|
|
1504
1504
|
"v2/durable-core/schemas/execution-snapshot/blocked-snapshot.js": {
|
|
1505
|
-
"sha256": "
|
|
1506
|
-
"bytes":
|
|
1505
|
+
"sha256": "f952ec8411dff13e63376a426a7a0a0fdd172b197f01fbf321ec69ec7c1076e1",
|
|
1506
|
+
"bytes": 4556
|
|
1507
1507
|
},
|
|
1508
1508
|
"v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.d.ts": {
|
|
1509
|
-
"sha256": "
|
|
1510
|
-
"bytes":
|
|
1509
|
+
"sha256": "a7f455d0bef1dce88b712ee9a29066d97033f31e180dc8de6c0733713a484936",
|
|
1510
|
+
"bytes": 195786
|
|
1511
1511
|
},
|
|
1512
1512
|
"v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.js": {
|
|
1513
1513
|
"sha256": "ec330ed72b7d5cc13ed4e000fd398f4c3c0f14e4d3e02ee4f59f10383377be94",
|
|
@@ -1530,8 +1530,8 @@
|
|
|
1530
1530
|
"bytes": 2983
|
|
1531
1531
|
},
|
|
1532
1532
|
"v2/durable-core/schemas/export-bundle/index.d.ts": {
|
|
1533
|
-
"sha256": "
|
|
1534
|
-
"bytes":
|
|
1533
|
+
"sha256": "3f9c52313003c77762c13e144e8084b07d6b235d4f2867c43808e141bf269f0f",
|
|
1534
|
+
"bytes": 479882
|
|
1535
1535
|
},
|
|
1536
1536
|
"v2/durable-core/schemas/export-bundle/index.js": {
|
|
1537
1537
|
"sha256": "6e3566b2d05ea6302bbf4d311b8ec3e94725a8523834efe7670a79e7bd7dc40d",
|
|
@@ -1570,12 +1570,12 @@
|
|
|
1570
1570
|
"bytes": 196
|
|
1571
1571
|
},
|
|
1572
1572
|
"v2/durable-core/schemas/session/blockers.d.ts": {
|
|
1573
|
-
"sha256": "
|
|
1574
|
-
"bytes":
|
|
1573
|
+
"sha256": "2d517c69c169f111d5bede7270ff3b1ccd5d916e94fc2bde197d90b3ddef1d9b",
|
|
1574
|
+
"bytes": 11692
|
|
1575
1575
|
},
|
|
1576
1576
|
"v2/durable-core/schemas/session/blockers.js": {
|
|
1577
|
-
"sha256": "
|
|
1578
|
-
"bytes":
|
|
1577
|
+
"sha256": "30a8dcdd58225bf20723d11286c3ec753b86653c59511e6f5869c898e1f52b9e",
|
|
1578
|
+
"bytes": 3484
|
|
1579
1579
|
},
|
|
1580
1580
|
"v2/durable-core/schemas/session/dag-topology.d.ts": {
|
|
1581
1581
|
"sha256": "67fc952e5af8f364764996c62a685bf9db8e7d73727f639cbf87cb1b4f5d8dd6",
|
|
@@ -1586,20 +1586,20 @@
|
|
|
1586
1586
|
"bytes": 2138
|
|
1587
1587
|
},
|
|
1588
1588
|
"v2/durable-core/schemas/session/events.d.ts": {
|
|
1589
|
-
"sha256": "
|
|
1590
|
-
"bytes":
|
|
1589
|
+
"sha256": "9bb0857364918ef47dd379eef819b20c3d060536cf2c62aa4bf21caebabc2a25",
|
|
1590
|
+
"bytes": 73576
|
|
1591
1591
|
},
|
|
1592
1592
|
"v2/durable-core/schemas/session/events.js": {
|
|
1593
1593
|
"sha256": "df053c99e92f16785864f7c91ce0de5eafd2a8d631e93cbb96a40cbfa4cdba14",
|
|
1594
1594
|
"bytes": 11149
|
|
1595
1595
|
},
|
|
1596
1596
|
"v2/durable-core/schemas/session/gaps.d.ts": {
|
|
1597
|
-
"sha256": "
|
|
1598
|
-
"bytes":
|
|
1597
|
+
"sha256": "b96bd682a85a4bd4b70bf45c7d649914ab39308d208a38b2e812e330562bd990",
|
|
1598
|
+
"bytes": 8721
|
|
1599
1599
|
},
|
|
1600
1600
|
"v2/durable-core/schemas/session/gaps.js": {
|
|
1601
|
-
"sha256": "
|
|
1602
|
-
"bytes":
|
|
1601
|
+
"sha256": "b57ac509c9cb6c13a5eb3ef7dd4d7bc97d072465613d31a0d24e5607525c2182",
|
|
1602
|
+
"bytes": 2069
|
|
1603
1603
|
},
|
|
1604
1604
|
"v2/durable-core/schemas/session/index.d.ts": {
|
|
1605
1605
|
"sha256": "f4f500d33d212760f480d91fafd4474f7b12f9239a6c5e9c2d80d0fe96207b65",
|
|
@@ -34,12 +34,16 @@ function createHandler(schema, handler) {
|
|
|
34
34
|
if (!parseResult.success) {
|
|
35
35
|
const suggestionResult = (0, index_js_1.generateSuggestions)(args, schema, index_js_1.DEFAULT_SUGGESTION_CONFIG);
|
|
36
36
|
const suggestionDetails = (0, index_js_1.formatSuggestionDetails)(suggestionResult);
|
|
37
|
+
const patchedTemplate = (0, index_js_1.patchTemplateForFailedOptionals)(suggestionDetails.correctTemplate ?? null, args, parseResult.error.errors, schema, index_js_1.DEFAULT_SUGGESTION_CONFIG.maxTemplateDepth);
|
|
38
|
+
const patchedDetails = patchedTemplate !== suggestionDetails.correctTemplate
|
|
39
|
+
? { ...suggestionDetails, correctTemplate: patchedTemplate }
|
|
40
|
+
: suggestionDetails;
|
|
37
41
|
return toMcpResult((0, types_js_1.errNotRetryable)('VALIDATION_ERROR', 'Invalid input', {
|
|
38
42
|
validationErrors: parseResult.error.errors.map(e => ({
|
|
39
43
|
path: e.path.join('.'),
|
|
40
44
|
message: e.message,
|
|
41
45
|
})),
|
|
42
|
-
...
|
|
46
|
+
...patchedDetails,
|
|
43
47
|
}));
|
|
44
48
|
}
|
|
45
49
|
try {
|
|
@@ -81,7 +81,10 @@ function executeAdvanceCore(args) {
|
|
|
81
81
|
notesMarkdown: v.notesMarkdown,
|
|
82
82
|
validation,
|
|
83
83
|
});
|
|
84
|
-
const
|
|
84
|
+
const missingNotes = !v.notesOptional && !v.notesMarkdown?.trim()
|
|
85
|
+
? { stepId: v.pendingStep.stepId }
|
|
86
|
+
: undefined;
|
|
87
|
+
const reasonsRes = (0, blocking_decision_js_1.detectBlockingReasonsV1)({ outputRequirement, missingNotes });
|
|
85
88
|
if (reasonsRes.isErr()) {
|
|
86
89
|
return errAsync({ kind: 'invariant_violation', message: reasonsRes.error.message });
|
|
87
90
|
}
|
|
@@ -21,6 +21,8 @@ function validateAdvanceInputs(args) {
|
|
|
21
21
|
const step = (0, workflow_js_1.getStepById)(pinnedWorkflow, pendingStep.stepId);
|
|
22
22
|
const validationCriteria = step?.validationCriteria;
|
|
23
23
|
const outputContract = step?.outputContract;
|
|
24
|
+
const notesOptional = outputContract !== undefined ||
|
|
25
|
+
(step !== null && step !== undefined && 'notesOptional' in step && step.notesOptional === true);
|
|
24
26
|
const parentByNodeId = {};
|
|
25
27
|
for (const e of truth.events) {
|
|
26
28
|
if (e.kind !== constants_js_1.EVENT_KIND.NODE_CREATED)
|
|
@@ -54,5 +56,6 @@ function validateAdvanceInputs(args) {
|
|
|
54
56
|
autonomy,
|
|
55
57
|
riskPolicy,
|
|
56
58
|
effectivePrefs,
|
|
59
|
+
notesOptional,
|
|
57
60
|
});
|
|
58
61
|
}
|
|
@@ -303,7 +303,7 @@ export declare const V2NextCallSchema: z.ZodNullable<z.ZodObject<{
|
|
|
303
303
|
}>>;
|
|
304
304
|
export declare const V2BlockerReportSchema: z.ZodEffects<z.ZodObject<{
|
|
305
305
|
blockers: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
306
|
-
code: z.ZodEnum<["USER_ONLY_DEPENDENCY", "MISSING_REQUIRED_OUTPUT", "INVALID_REQUIRED_OUTPUT", "REQUIRED_CAPABILITY_UNKNOWN", "REQUIRED_CAPABILITY_UNAVAILABLE", "INVARIANT_VIOLATION", "STORAGE_CORRUPTION_DETECTED"]>;
|
|
306
|
+
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"]>;
|
|
307
307
|
pointer: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
308
308
|
kind: z.ZodLiteral<"context_key">;
|
|
309
309
|
key: z.ZodString;
|
|
@@ -351,7 +351,7 @@ export declare const V2BlockerReportSchema: z.ZodEffects<z.ZodObject<{
|
|
|
351
351
|
suggestedFix: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
352
352
|
}, "strip", z.ZodTypeAny, {
|
|
353
353
|
message: string;
|
|
354
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
354
|
+
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";
|
|
355
355
|
pointer: {
|
|
356
356
|
key: string;
|
|
357
357
|
kind: "context_key";
|
|
@@ -370,7 +370,7 @@ export declare const V2BlockerReportSchema: z.ZodEffects<z.ZodObject<{
|
|
|
370
370
|
suggestedFix?: string | undefined;
|
|
371
371
|
}, {
|
|
372
372
|
message: string;
|
|
373
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
373
|
+
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";
|
|
374
374
|
pointer: {
|
|
375
375
|
key: string;
|
|
376
376
|
kind: "context_key";
|
|
@@ -391,7 +391,7 @@ export declare const V2BlockerReportSchema: z.ZodEffects<z.ZodObject<{
|
|
|
391
391
|
}, "strip", z.ZodTypeAny, {
|
|
392
392
|
blockers: readonly {
|
|
393
393
|
message: string;
|
|
394
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
394
|
+
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";
|
|
395
395
|
pointer: {
|
|
396
396
|
key: string;
|
|
397
397
|
kind: "context_key";
|
|
@@ -412,7 +412,7 @@ export declare const V2BlockerReportSchema: z.ZodEffects<z.ZodObject<{
|
|
|
412
412
|
}, {
|
|
413
413
|
blockers: readonly {
|
|
414
414
|
message: string;
|
|
415
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
415
|
+
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";
|
|
416
416
|
pointer: {
|
|
417
417
|
key: string;
|
|
418
418
|
kind: "context_key";
|
|
@@ -433,7 +433,7 @@ export declare const V2BlockerReportSchema: z.ZodEffects<z.ZodObject<{
|
|
|
433
433
|
}>, {
|
|
434
434
|
blockers: readonly {
|
|
435
435
|
message: string;
|
|
436
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
436
|
+
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";
|
|
437
437
|
pointer: {
|
|
438
438
|
key: string;
|
|
439
439
|
kind: "context_key";
|
|
@@ -454,7 +454,7 @@ export declare const V2BlockerReportSchema: z.ZodEffects<z.ZodObject<{
|
|
|
454
454
|
}, {
|
|
455
455
|
blockers: readonly {
|
|
456
456
|
message: string;
|
|
457
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
457
|
+
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";
|
|
458
458
|
pointer: {
|
|
459
459
|
key: string;
|
|
460
460
|
kind: "context_key";
|
|
@@ -679,7 +679,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
679
679
|
}>>;
|
|
680
680
|
blockers: z.ZodEffects<z.ZodObject<{
|
|
681
681
|
blockers: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
682
|
-
code: z.ZodEnum<["USER_ONLY_DEPENDENCY", "MISSING_REQUIRED_OUTPUT", "INVALID_REQUIRED_OUTPUT", "REQUIRED_CAPABILITY_UNKNOWN", "REQUIRED_CAPABILITY_UNAVAILABLE", "INVARIANT_VIOLATION", "STORAGE_CORRUPTION_DETECTED"]>;
|
|
682
|
+
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"]>;
|
|
683
683
|
pointer: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
684
684
|
kind: z.ZodLiteral<"context_key">;
|
|
685
685
|
key: z.ZodString;
|
|
@@ -727,7 +727,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
727
727
|
suggestedFix: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
728
728
|
}, "strip", z.ZodTypeAny, {
|
|
729
729
|
message: string;
|
|
730
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
730
|
+
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";
|
|
731
731
|
pointer: {
|
|
732
732
|
key: string;
|
|
733
733
|
kind: "context_key";
|
|
@@ -746,7 +746,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
746
746
|
suggestedFix?: string | undefined;
|
|
747
747
|
}, {
|
|
748
748
|
message: string;
|
|
749
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
749
|
+
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";
|
|
750
750
|
pointer: {
|
|
751
751
|
key: string;
|
|
752
752
|
kind: "context_key";
|
|
@@ -767,7 +767,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
767
767
|
}, "strip", z.ZodTypeAny, {
|
|
768
768
|
blockers: readonly {
|
|
769
769
|
message: string;
|
|
770
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
770
|
+
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";
|
|
771
771
|
pointer: {
|
|
772
772
|
key: string;
|
|
773
773
|
kind: "context_key";
|
|
@@ -788,7 +788,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
788
788
|
}, {
|
|
789
789
|
blockers: readonly {
|
|
790
790
|
message: string;
|
|
791
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
791
|
+
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";
|
|
792
792
|
pointer: {
|
|
793
793
|
key: string;
|
|
794
794
|
kind: "context_key";
|
|
@@ -809,7 +809,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
809
809
|
}>, {
|
|
810
810
|
blockers: readonly {
|
|
811
811
|
message: string;
|
|
812
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
812
|
+
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";
|
|
813
813
|
pointer: {
|
|
814
814
|
key: string;
|
|
815
815
|
kind: "context_key";
|
|
@@ -830,7 +830,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
830
830
|
}, {
|
|
831
831
|
blockers: readonly {
|
|
832
832
|
message: string;
|
|
833
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
833
|
+
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";
|
|
834
834
|
pointer: {
|
|
835
835
|
key: string;
|
|
836
836
|
kind: "context_key";
|
|
@@ -866,7 +866,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
866
866
|
blockers: {
|
|
867
867
|
blockers: readonly {
|
|
868
868
|
message: string;
|
|
869
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
869
|
+
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";
|
|
870
870
|
pointer: {
|
|
871
871
|
key: string;
|
|
872
872
|
kind: "context_key";
|
|
@@ -921,7 +921,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
921
921
|
blockers: {
|
|
922
922
|
blockers: readonly {
|
|
923
923
|
message: string;
|
|
924
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
924
|
+
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";
|
|
925
925
|
pointer: {
|
|
926
926
|
key: string;
|
|
927
927
|
kind: "context_key";
|
|
@@ -1003,7 +1003,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
1003
1003
|
blockers: {
|
|
1004
1004
|
blockers: readonly {
|
|
1005
1005
|
message: string;
|
|
1006
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
1006
|
+
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";
|
|
1007
1007
|
pointer: {
|
|
1008
1008
|
key: string;
|
|
1009
1009
|
kind: "context_key";
|
|
@@ -1085,7 +1085,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
|
|
|
1085
1085
|
blockers: {
|
|
1086
1086
|
blockers: readonly {
|
|
1087
1087
|
message: string;
|
|
1088
|
-
code: "USER_ONLY_DEPENDENCY" | "MISSING_REQUIRED_OUTPUT" | "INVALID_REQUIRED_OUTPUT" | "REQUIRED_CAPABILITY_UNKNOWN" | "REQUIRED_CAPABILITY_UNAVAILABLE" | "INVARIANT_VIOLATION" | "STORAGE_CORRUPTION_DETECTED";
|
|
1088
|
+
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";
|
|
1089
1089
|
pointer: {
|
|
1090
1090
|
key: string;
|
|
1091
1091
|
kind: "context_key";
|
|
@@ -115,6 +115,9 @@ const V2BlockerSchema = zod_1.z.object({
|
|
|
115
115
|
'USER_ONLY_DEPENDENCY',
|
|
116
116
|
'MISSING_REQUIRED_OUTPUT',
|
|
117
117
|
'INVALID_REQUIRED_OUTPUT',
|
|
118
|
+
'MISSING_REQUIRED_NOTES',
|
|
119
|
+
'MISSING_CONTEXT_KEY',
|
|
120
|
+
'CONTEXT_BUDGET_EXCEEDED',
|
|
118
121
|
'REQUIRED_CAPABILITY_UNKNOWN',
|
|
119
122
|
'REQUIRED_CAPABILITY_UNAVAILABLE',
|
|
120
123
|
'INVARIANT_VIOLATION',
|
package/dist/mcp/v2/tools.js
CHANGED
|
@@ -9,7 +9,7 @@ exports.V2InspectWorkflowInput = zod_1.z.object({
|
|
|
9
9
|
});
|
|
10
10
|
exports.V2StartWorkflowInput = zod_1.z.object({
|
|
11
11
|
workflowId: zod_1.z.string().min(1).regex(/^[A-Za-z0-9_-]+$/, 'Workflow ID must contain only letters, numbers, hyphens, and underscores').describe('The workflow ID to start'),
|
|
12
|
-
context: zod_1.z.record(zod_1.z.unknown()).optional().describe('
|
|
12
|
+
context: zod_1.z.record(zod_1.z.unknown()).optional().describe('Structured context for this workflow — must be a JSON OBJECT with string keys, NOT a string. For design/analysis workflows: {"problem":"describe the problem","constraints":"...","goals":"..."}. For coding workflows: {"ticketId":"ACEI-1234","branch":"main"}. WorkRail injects these into step prompts. Pass once at start; re-pass only values that have CHANGED.'),
|
|
13
13
|
workspacePath: zod_1.z.string()
|
|
14
14
|
.refine((p) => p.startsWith('/'), 'workspacePath must be an absolute path (starting with /)')
|
|
15
15
|
.optional()
|
|
@@ -4,4 +4,5 @@ export type { SuggestionConfig } from './suggestion-config.js';
|
|
|
4
4
|
export { DEFAULT_SUGGESTION_CONFIG, MINIMAL_SUGGESTION_CONFIG } from './suggestion-config.js';
|
|
5
5
|
export { levenshteinDistance, computeSimilarity, computeSimilarityIgnoreCase, findClosestMatch, findAllMatches, type ClosestMatch, } from './string-similarity.js';
|
|
6
6
|
export { extractExpectedKeys, extractRequiredKeys, findUnknownKeys, findMissingRequiredKeys, generateExampleValue, generateTemplate, extractEnumValues, } from './schema-introspection.js';
|
|
7
|
-
export { generateSuggestions, formatSuggestionDetails, hasSuggestions, } from './suggestion-generator.js';
|
|
7
|
+
export { generateSuggestions, formatSuggestionDetails, hasSuggestions, patchTemplateForFailedOptionals, } from './suggestion-generator.js';
|
|
8
|
+
export type { ZodIssue } from './suggestion-generator.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hasSuggestions = exports.formatSuggestionDetails = exports.generateSuggestions = exports.extractEnumValues = exports.generateTemplate = exports.generateExampleValue = exports.findMissingRequiredKeys = exports.findUnknownKeys = exports.extractRequiredKeys = exports.extractExpectedKeys = exports.findAllMatches = exports.findClosestMatch = exports.computeSimilarityIgnoreCase = exports.computeSimilarity = exports.levenshteinDistance = exports.MINIMAL_SUGGESTION_CONFIG = exports.DEFAULT_SUGGESTION_CONFIG = exports.isInvalidEnumSuggestion = exports.isMissingRequiredSuggestion = exports.isUnknownKeySuggestion = exports.EMPTY_SUGGESTION_RESULT = exports.similarity = void 0;
|
|
3
|
+
exports.patchTemplateForFailedOptionals = exports.hasSuggestions = exports.formatSuggestionDetails = exports.generateSuggestions = exports.extractEnumValues = exports.generateTemplate = exports.generateExampleValue = exports.findMissingRequiredKeys = exports.findUnknownKeys = exports.extractRequiredKeys = exports.extractExpectedKeys = exports.findAllMatches = exports.findClosestMatch = exports.computeSimilarityIgnoreCase = exports.computeSimilarity = exports.levenshteinDistance = exports.MINIMAL_SUGGESTION_CONFIG = exports.DEFAULT_SUGGESTION_CONFIG = exports.isInvalidEnumSuggestion = exports.isMissingRequiredSuggestion = exports.isUnknownKeySuggestion = exports.EMPTY_SUGGESTION_RESULT = exports.similarity = void 0;
|
|
4
4
|
var suggestion_types_js_1 = require("./suggestion-types.js");
|
|
5
5
|
Object.defineProperty(exports, "similarity", { enumerable: true, get: function () { return suggestion_types_js_1.similarity; } });
|
|
6
6
|
Object.defineProperty(exports, "EMPTY_SUGGESTION_RESULT", { enumerable: true, get: function () { return suggestion_types_js_1.EMPTY_SUGGESTION_RESULT; } });
|
|
@@ -28,3 +28,4 @@ var suggestion_generator_js_1 = require("./suggestion-generator.js");
|
|
|
28
28
|
Object.defineProperty(exports, "generateSuggestions", { enumerable: true, get: function () { return suggestion_generator_js_1.generateSuggestions; } });
|
|
29
29
|
Object.defineProperty(exports, "formatSuggestionDetails", { enumerable: true, get: function () { return suggestion_generator_js_1.formatSuggestionDetails; } });
|
|
30
30
|
Object.defineProperty(exports, "hasSuggestions", { enumerable: true, get: function () { return suggestion_generator_js_1.hasSuggestions; } });
|
|
31
|
+
Object.defineProperty(exports, "patchTemplateForFailedOptionals", { enumerable: true, get: function () { return suggestion_generator_js_1.patchTemplateForFailedOptionals; } });
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { SuggestionConfig } from './suggestion-config.js';
|
|
3
3
|
import type { SuggestionResult } from './suggestion-types.js';
|
|
4
|
+
export type { ZodIssue } from 'zod';
|
|
4
5
|
export declare function generateSuggestions(args: unknown, schema: z.ZodType, config: SuggestionConfig): SuggestionResult;
|
|
5
6
|
export declare function formatSuggestionDetails(result: SuggestionResult): Record<string, unknown>;
|
|
6
7
|
export declare function hasSuggestions(result: SuggestionResult): boolean;
|
|
8
|
+
export declare function patchTemplateForFailedOptionals(correctTemplate: Readonly<Record<string, unknown>> | null, args: unknown, zodErrors: readonly z.ZodIssue[], schema: z.ZodType, maxDepth: number): Readonly<Record<string, unknown>> | null;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generateSuggestions = generateSuggestions;
|
|
4
4
|
exports.formatSuggestionDetails = formatSuggestionDetails;
|
|
5
5
|
exports.hasSuggestions = hasSuggestions;
|
|
6
|
+
exports.patchTemplateForFailedOptionals = patchTemplateForFailedOptionals;
|
|
6
7
|
const zod_1 = require("zod");
|
|
7
8
|
const suggestion_types_js_1 = require("./suggestion-types.js");
|
|
8
9
|
const string_similarity_js_1 = require("./string-similarity.js");
|
|
@@ -99,3 +100,32 @@ function formatSuggestionDetails(result) {
|
|
|
99
100
|
function hasSuggestions(result) {
|
|
100
101
|
return result.suggestions.length > 0 || result.correctTemplate !== null;
|
|
101
102
|
}
|
|
103
|
+
function patchTemplateForFailedOptionals(correctTemplate, args, zodErrors, schema, maxDepth) {
|
|
104
|
+
if (correctTemplate === null)
|
|
105
|
+
return null;
|
|
106
|
+
if (!(schema instanceof zod_1.z.ZodObject))
|
|
107
|
+
return correctTemplate;
|
|
108
|
+
if (args === null || typeof args !== 'object' || Array.isArray(args))
|
|
109
|
+
return correctTemplate;
|
|
110
|
+
const argsObj = args;
|
|
111
|
+
const shape = schema._def.shape();
|
|
112
|
+
const patched = { ...correctTemplate };
|
|
113
|
+
let changed = false;
|
|
114
|
+
for (const error of zodErrors) {
|
|
115
|
+
if (error.path.length !== 1)
|
|
116
|
+
continue;
|
|
117
|
+
const field = error.path[0];
|
|
118
|
+
if (!(field in argsObj))
|
|
119
|
+
continue;
|
|
120
|
+
if (!(field in shape))
|
|
121
|
+
continue;
|
|
122
|
+
if (field in patched)
|
|
123
|
+
continue;
|
|
124
|
+
const fieldSchema = shape[field];
|
|
125
|
+
if (!(fieldSchema instanceof zod_1.z.ZodOptional))
|
|
126
|
+
continue;
|
|
127
|
+
patched[field] = (0, schema_introspection_js_1.generateExampleValue)(fieldSchema._def.innerType, 0, maxDepth);
|
|
128
|
+
changed = true;
|
|
129
|
+
}
|
|
130
|
+
return changed ? Object.freeze(patched) : correctTemplate;
|
|
131
|
+
}
|
|
@@ -15,6 +15,7 @@ export interface WorkflowStepDefinition {
|
|
|
15
15
|
readonly runCondition?: Readonly<Record<string, unknown>>;
|
|
16
16
|
readonly validationCriteria?: ValidationCriteria;
|
|
17
17
|
readonly outputContract?: OutputContract;
|
|
18
|
+
readonly notesOptional?: boolean;
|
|
18
19
|
readonly functionDefinitions?: readonly FunctionDefinition[];
|
|
19
20
|
readonly functionCalls?: readonly FunctionCall[];
|
|
20
21
|
readonly functionReferences?: readonly string[];
|
|
@@ -13,6 +13,8 @@ function toContractViolationReason(reason) {
|
|
|
13
13
|
return { kind: 'missing_context_key', key: reason.key };
|
|
14
14
|
case 'context_budget_exceeded':
|
|
15
15
|
return { kind: 'context_budget_exceeded' };
|
|
16
|
+
case 'missing_notes':
|
|
17
|
+
return { kind: 'missing_notes', stepId: reason.stepId };
|
|
16
18
|
default:
|
|
17
19
|
return null;
|
|
18
20
|
}
|
|
@@ -31,4 +31,7 @@ export declare function detectBlockingReasonsV1(args: {
|
|
|
31
31
|
readonly contextBudgetExceeded?: boolean;
|
|
32
32
|
readonly outputRequirement?: OutputRequirementStatus;
|
|
33
33
|
readonly capabilityRequirement?: CapabilityRequirementStatus;
|
|
34
|
+
readonly missingNotes?: {
|
|
35
|
+
readonly stepId: string;
|
|
36
|
+
};
|
|
34
37
|
}): Result<readonly ReasonV1[], BlockingDecisionError>;
|
|
@@ -54,5 +54,14 @@ function detectBlockingReasonsV1(args) {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
if (args.missingNotes) {
|
|
58
|
+
if (!constants_js_1.DELIMITER_SAFE_ID_PATTERN.test(args.missingNotes.stepId)) {
|
|
59
|
+
return (0, neverthrow_1.err)({
|
|
60
|
+
code: 'INVALID_DELIMITER_SAFE_ID',
|
|
61
|
+
message: `step ID must be delimiter-safe: [a-z0-9_-]+ (got: ${args.missingNotes.stepId})`,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
reasons.push({ kind: 'missing_notes', stepId: args.missingNotes.stepId });
|
|
65
|
+
}
|
|
57
66
|
return (0, neverthrow_1.ok)(reasons);
|
|
58
67
|
}
|