@primitive.ai/prim 0.1.0-alpha.110 → 0.1.0-alpha.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +11 -1
  2. package/SKILL.md +12 -2
  3. package/dist/{chunk-KQ4WBK5R.js → chunk-3KKEV7VI.js} +2 -2
  4. package/dist/{chunk-2IRLFOEL.js → chunk-6JHKKLA2.js} +79 -1
  5. package/dist/{chunk-IQZA65NV.js → chunk-7DVEH7FO.js} +1 -1
  6. package/dist/{chunk-W4ZEPZLK.js → chunk-BXLH4LDU.js} +1 -1
  7. package/dist/{chunk-GA2RXPJL.js → chunk-DWAXFXDG.js} +2 -2
  8. package/dist/{chunk-7VIMU2HR.js → chunk-FTW4ZCBA.js} +2 -2
  9. package/dist/{chunk-JJI7FU24.js → chunk-HMD5K6W7.js} +1 -1
  10. package/dist/{chunk-HTRFPXMD.js → chunk-IW5HCCOW.js} +3 -3
  11. package/dist/{chunk-UDBBJWQH.js → chunk-IZXLH3R5.js} +930 -582
  12. package/dist/{chunk-5LRKJTLA.js → chunk-J5HBSRAV.js} +7 -5
  13. package/dist/{chunk-5BLGBSDM.js → chunk-JDIAPBY7.js} +1 -1
  14. package/dist/{chunk-2Q3OGSTV.js → chunk-NEQI2VLM.js} +2 -2
  15. package/dist/{chunk-AOJ254C2.js → chunk-PJW6JZMH.js} +4 -4
  16. package/dist/{chunk-43ZKL27W.js → chunk-RTULPLS7.js} +1 -1
  17. package/dist/{chunk-CTRAJCPN.js → chunk-XV6C5ZV2.js} +1 -1
  18. package/dist/daemon/server.js +1184 -754
  19. package/dist/hook-runtime/daemon/server.js +1184 -754
  20. package/dist/hook-runtime/hooks/post-commit.js +929 -581
  21. package/dist/hook-runtime/hooks/post-rewrite.js +929 -581
  22. package/dist/hook-runtime/hooks/post-tool-use.js +1015 -588
  23. package/dist/hook-runtime/hooks/pre-commit.js +85 -6
  24. package/dist/hook-runtime/hooks/pre-tool-use.js +1018 -592
  25. package/dist/hook-runtime/hooks/prim-hook.js +1016 -589
  26. package/dist/hook-runtime/hooks/session-end.js +14 -12
  27. package/dist/hook-runtime/hooks/session-start.js +1016 -589
  28. package/dist/hook-runtime/index.js +1211 -791
  29. package/dist/hook-runtime/statusline-main.js +7 -5
  30. package/dist/hooks/post-commit.js +5 -5
  31. package/dist/hooks/post-rewrite.js +5 -5
  32. package/dist/hooks/post-tool-use.js +12 -12
  33. package/dist/hooks/pre-commit.js +3 -3
  34. package/dist/hooks/pre-tool-use.js +11 -12
  35. package/dist/hooks/prim-hook.js +12 -12
  36. package/dist/hooks/session-end.js +1 -1
  37. package/dist/hooks/session-start.js +7 -7
  38. package/dist/index.js +177 -183
  39. package/dist/statusline-main.js +7 -5
  40. package/package.json +2 -1
@@ -1137,7 +1137,9 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
1137
1137
  return errors === 0;
1138
1138
  }
1139
1139
  validate22.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
1140
- var schema37 = { "type": "object", "properties": { "decision": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} }, "rationale": { "type": "string" }, "reversibility": { "type": "string", "enum": ["high", "low"] }, "fanOut": { "type": "number" }, "upstream": { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "string" } } }, "required": ["files"], "additionalProperties": {} }, "downstream": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} } }, "trigger": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "enum": ["file_edit", "supersession", "invalidation", "confirmation_request"] }, "file": { "type": "string" }, "contextName": { "type": "string" }, "flaggedAt": { "type": "number" }, "authorName": { "type": "string" }, "reason": { "type": "string" } }, "required": ["type", "flaggedAt"], "additionalProperties": {} }, { "type": "null" }] }, "truncated": { "type": "boolean" } }, "required": ["decision", "fanOut", "upstream", "downstream", "trigger", "truncated"], "additionalProperties": {} };
1140
+ var schema37 = { "type": "object", "properties": { "decision": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} }, "rationale": { "type": "string" }, "reversibility": { "type": "string", "enum": ["high", "low"] }, "fanOut": { "type": "number" }, "upstream": { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "string" } } }, "required": ["files"], "additionalProperties": {} }, "downstream": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} } }, "trigger": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "enum": ["file_edit", "supersession", "invalidation", "confirmation_request"] }, "file": { "type": "string" }, "contextName": { "type": "string" }, "flaggedAt": { "type": "number" }, "authorName": { "type": "string" }, "reason": { "type": "string" } }, "required": ["type", "flaggedAt"], "additionalProperties": {} }, { "type": "null" }] }, "truncated": { "type": "boolean" } }, "required": ["decision", "fanOut", "upstream", "downstream", "trigger", "truncated"], "additionalProperties": {} };
1141
+ var pattern4 = new RegExp("^dec_[0-9a-f]{8}$", "u");
1142
+ var pattern5 = new RegExp("^[0-9a-f]{8}$", "u");
1141
1143
  function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
1142
1144
  ;
1143
1145
  let vErrors = null;
@@ -1175,6 +1177,11 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
1175
1177
  if (func1(data1) < 1) {
1176
1178
  validate23.errors = [{ instancePath: instancePath + "/decision/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/decision/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
1177
1179
  return false;
1180
+ } else {
1181
+ if (!pattern4.test(data1)) {
1182
+ validate23.errors = [{ instancePath: instancePath + "/decision/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/decision/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
1183
+ return false;
1184
+ }
1178
1185
  }
1179
1186
  } else {
1180
1187
  validate23.errors = [{ instancePath: instancePath + "/decision/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/decision/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
@@ -1187,10 +1194,18 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
1187
1194
  }
1188
1195
  if (valid2) {
1189
1196
  if (data0.shortId !== void 0) {
1197
+ let data2 = data0.shortId;
1190
1198
  const _errs8 = errors;
1191
- if (typeof data0.shortId !== "string") {
1192
- validate23.errors = [{ instancePath: instancePath + "/decision/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/decision/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1193
- return false;
1199
+ if (errors === _errs8) {
1200
+ if (typeof data2 === "string") {
1201
+ if (!pattern5.test(data2)) {
1202
+ validate23.errors = [{ instancePath: instancePath + "/decision/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/decision/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
1203
+ return false;
1204
+ }
1205
+ } else {
1206
+ validate23.errors = [{ instancePath: instancePath + "/decision/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/decision/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1207
+ return false;
1208
+ }
1194
1209
  }
1195
1210
  var valid2 = _errs8 === errors;
1196
1211
  } else {
@@ -1383,6 +1398,11 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
1383
1398
  if (func1(data16) < 1) {
1384
1399
  validate23.errors = [{ instancePath: instancePath + "/downstream/" + i1 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/downstream/items/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
1385
1400
  return false;
1401
+ } else {
1402
+ if (!pattern4.test(data16)) {
1403
+ validate23.errors = [{ instancePath: instancePath + "/downstream/" + i1 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/downstream/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
1404
+ return false;
1405
+ }
1386
1406
  }
1387
1407
  } else {
1388
1408
  validate23.errors = [{ instancePath: instancePath + "/downstream/" + i1 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/downstream/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
@@ -1395,10 +1415,18 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
1395
1415
  }
1396
1416
  if (valid6) {
1397
1417
  if (data15.shortId !== void 0) {
1418
+ let data17 = data15.shortId;
1398
1419
  const _errs40 = errors;
1399
- if (typeof data15.shortId !== "string") {
1400
- validate23.errors = [{ instancePath: instancePath + "/downstream/" + i1 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/downstream/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1401
- return false;
1420
+ if (errors === _errs40) {
1421
+ if (typeof data17 === "string") {
1422
+ if (!pattern5.test(data17)) {
1423
+ validate23.errors = [{ instancePath: instancePath + "/downstream/" + i1 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/downstream/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
1424
+ return false;
1425
+ }
1426
+ } else {
1427
+ validate23.errors = [{ instancePath: instancePath + "/downstream/" + i1 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/downstream/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1428
+ return false;
1429
+ }
1402
1430
  }
1403
1431
  var valid6 = _errs40 === errors;
1404
1432
  } else {
@@ -2638,7 +2666,7 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
2638
2666
  return errors === 0;
2639
2667
  }
2640
2668
  validate25.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
2641
- var schema43 = { "anyOf": [{ "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "outcome": { "type": "string", "enum": ["stale", "confirmed", "corrected"] } }, "required": ["decisionId", "outcome"], "additionalProperties": {} }, { "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "outcome": { "type": "string", "const": "already_responded" }, "confirmed": { "type": "boolean" }, "respondedAt": { "type": "number" } }, "required": ["decisionId", "outcome", "respondedAt"], "additionalProperties": {} }, { "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "outcome": { "type": "string", "const": "no_pending_prompt" } }, "required": ["decisionId", "outcome"], "additionalProperties": {} }] };
2669
+ var schema43 = { "anyOf": [{ "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "outcome": { "type": "string", "enum": ["stale", "confirmed", "corrected"] } }, "required": ["decisionId", "outcome"], "additionalProperties": {} }, { "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "outcome": { "type": "string", "const": "already_responded" }, "confirmed": { "type": "boolean" }, "respondedAt": { "type": "number" } }, "required": ["decisionId", "outcome", "respondedAt"], "additionalProperties": {} }, { "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "outcome": { "type": "string", "const": "no_pending_prompt" } }, "required": ["decisionId", "outcome"], "additionalProperties": {} }] };
2642
2670
  function validate26(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
2643
2671
  ;
2644
2672
  let vErrors = null;
@@ -2678,13 +2706,23 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2678
2706
  vErrors.push(err1);
2679
2707
  }
2680
2708
  errors++;
2709
+ } else {
2710
+ if (!pattern4.test(data0)) {
2711
+ const err2 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
2712
+ if (vErrors === null) {
2713
+ vErrors = [err2];
2714
+ } else {
2715
+ vErrors.push(err2);
2716
+ }
2717
+ errors++;
2718
+ }
2681
2719
  }
2682
2720
  } else {
2683
- const err2 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2721
+ const err3 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2684
2722
  if (vErrors === null) {
2685
- vErrors = [err2];
2723
+ vErrors = [err3];
2686
2724
  } else {
2687
- vErrors.push(err2);
2725
+ vErrors.push(err3);
2688
2726
  }
2689
2727
  errors++;
2690
2728
  }
@@ -2695,15 +2733,28 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2695
2733
  }
2696
2734
  if (valid2) {
2697
2735
  if (data.shortId !== void 0) {
2736
+ let data1 = data.shortId;
2698
2737
  const _errs7 = errors;
2699
- if (typeof data.shortId !== "string") {
2700
- const err3 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2701
- if (vErrors === null) {
2702
- vErrors = [err3];
2738
+ if (errors === _errs7) {
2739
+ if (typeof data1 === "string") {
2740
+ if (!pattern5.test(data1)) {
2741
+ const err4 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
2742
+ if (vErrors === null) {
2743
+ vErrors = [err4];
2744
+ } else {
2745
+ vErrors.push(err4);
2746
+ }
2747
+ errors++;
2748
+ }
2703
2749
  } else {
2704
- vErrors.push(err3);
2750
+ const err5 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2751
+ if (vErrors === null) {
2752
+ vErrors = [err5];
2753
+ } else {
2754
+ vErrors.push(err5);
2755
+ }
2756
+ errors++;
2705
2757
  }
2706
- errors++;
2707
2758
  }
2708
2759
  var valid2 = _errs7 === errors;
2709
2760
  } else {
@@ -2714,20 +2765,20 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2714
2765
  let data2 = data.outcome;
2715
2766
  const _errs9 = errors;
2716
2767
  if (typeof data2 !== "string") {
2717
- const err4 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/outcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2768
+ const err6 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/outcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2718
2769
  if (vErrors === null) {
2719
- vErrors = [err4];
2770
+ vErrors = [err6];
2720
2771
  } else {
2721
- vErrors.push(err4);
2772
+ vErrors.push(err6);
2722
2773
  }
2723
2774
  errors++;
2724
2775
  }
2725
2776
  if (!(data2 === "stale" || data2 === "confirmed" || data2 === "corrected")) {
2726
- const err5 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/outcome/enum", keyword: "enum", params: { allowedValues: schema43.anyOf[0].properties.outcome.enum }, message: "must be equal to one of the allowed values" };
2777
+ const err7 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/outcome/enum", keyword: "enum", params: { allowedValues: schema43.anyOf[0].properties.outcome.enum }, message: "must be equal to one of the allowed values" };
2727
2778
  if (vErrors === null) {
2728
- vErrors = [err5];
2779
+ vErrors = [err7];
2729
2780
  } else {
2730
- vErrors.push(err5);
2781
+ vErrors.push(err7);
2731
2782
  }
2732
2783
  errors++;
2733
2784
  }
@@ -2739,11 +2790,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2739
2790
  }
2740
2791
  }
2741
2792
  } else {
2742
- const err6 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2793
+ const err8 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2743
2794
  if (vErrors === null) {
2744
- vErrors = [err6];
2795
+ vErrors = [err8];
2745
2796
  } else {
2746
- vErrors.push(err6);
2797
+ vErrors.push(err8);
2747
2798
  }
2748
2799
  errors++;
2749
2800
  }
@@ -2758,11 +2809,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2758
2809
  if (data && typeof data == "object" && !Array.isArray(data)) {
2759
2810
  let missing1;
2760
2811
  if (data.decisionId === void 0 && (missing1 = "decisionId") || data.outcome === void 0 && (missing1 = "outcome") || data.respondedAt === void 0 && (missing1 = "respondedAt")) {
2761
- const err7 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
2812
+ const err9 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
2762
2813
  if (vErrors === null) {
2763
- vErrors = [err7];
2814
+ vErrors = [err9];
2764
2815
  } else {
2765
- vErrors.push(err7);
2816
+ vErrors.push(err9);
2766
2817
  }
2767
2818
  errors++;
2768
2819
  } else {
@@ -2772,20 +2823,30 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2772
2823
  if (errors === _errs14) {
2773
2824
  if (typeof data3 === "string") {
2774
2825
  if (func1(data3) < 1) {
2775
- const err8 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/decisionId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
2826
+ const err10 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/decisionId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
2776
2827
  if (vErrors === null) {
2777
- vErrors = [err8];
2828
+ vErrors = [err10];
2778
2829
  } else {
2779
- vErrors.push(err8);
2830
+ vErrors.push(err10);
2780
2831
  }
2781
2832
  errors++;
2833
+ } else {
2834
+ if (!pattern4.test(data3)) {
2835
+ const err11 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
2836
+ if (vErrors === null) {
2837
+ vErrors = [err11];
2838
+ } else {
2839
+ vErrors.push(err11);
2840
+ }
2841
+ errors++;
2842
+ }
2782
2843
  }
2783
2844
  } else {
2784
- const err9 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2845
+ const err12 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2785
2846
  if (vErrors === null) {
2786
- vErrors = [err9];
2847
+ vErrors = [err12];
2787
2848
  } else {
2788
- vErrors.push(err9);
2849
+ vErrors.push(err12);
2789
2850
  }
2790
2851
  errors++;
2791
2852
  }
@@ -2796,15 +2857,28 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2796
2857
  }
2797
2858
  if (valid3) {
2798
2859
  if (data.shortId !== void 0) {
2860
+ let data4 = data.shortId;
2799
2861
  const _errs16 = errors;
2800
- if (typeof data.shortId !== "string") {
2801
- const err10 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2802
- if (vErrors === null) {
2803
- vErrors = [err10];
2862
+ if (errors === _errs16) {
2863
+ if (typeof data4 === "string") {
2864
+ if (!pattern5.test(data4)) {
2865
+ const err13 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
2866
+ if (vErrors === null) {
2867
+ vErrors = [err13];
2868
+ } else {
2869
+ vErrors.push(err13);
2870
+ }
2871
+ errors++;
2872
+ }
2804
2873
  } else {
2805
- vErrors.push(err10);
2874
+ const err14 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2875
+ if (vErrors === null) {
2876
+ vErrors = [err14];
2877
+ } else {
2878
+ vErrors.push(err14);
2879
+ }
2880
+ errors++;
2806
2881
  }
2807
- errors++;
2808
2882
  }
2809
2883
  var valid3 = _errs16 === errors;
2810
2884
  } else {
@@ -2815,20 +2889,20 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2815
2889
  let data5 = data.outcome;
2816
2890
  const _errs18 = errors;
2817
2891
  if (typeof data5 !== "string") {
2818
- const err11 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/outcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2892
+ const err15 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/outcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2819
2893
  if (vErrors === null) {
2820
- vErrors = [err11];
2894
+ vErrors = [err15];
2821
2895
  } else {
2822
- vErrors.push(err11);
2896
+ vErrors.push(err15);
2823
2897
  }
2824
2898
  errors++;
2825
2899
  }
2826
2900
  if ("already_responded" !== data5) {
2827
- const err12 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/outcome/const", keyword: "const", params: { allowedValue: "already_responded" }, message: "must be equal to constant" };
2901
+ const err16 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/outcome/const", keyword: "const", params: { allowedValue: "already_responded" }, message: "must be equal to constant" };
2828
2902
  if (vErrors === null) {
2829
- vErrors = [err12];
2903
+ vErrors = [err16];
2830
2904
  } else {
2831
- vErrors.push(err12);
2905
+ vErrors.push(err16);
2832
2906
  }
2833
2907
  errors++;
2834
2908
  }
@@ -2840,11 +2914,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2840
2914
  if (data.confirmed !== void 0) {
2841
2915
  const _errs20 = errors;
2842
2916
  if (typeof data.confirmed !== "boolean") {
2843
- const err13 = { instancePath: instancePath + "/confirmed", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/confirmed/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
2917
+ const err17 = { instancePath: instancePath + "/confirmed", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/confirmed/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
2844
2918
  if (vErrors === null) {
2845
- vErrors = [err13];
2919
+ vErrors = [err17];
2846
2920
  } else {
2847
- vErrors.push(err13);
2921
+ vErrors.push(err17);
2848
2922
  }
2849
2923
  errors++;
2850
2924
  }
@@ -2857,11 +2931,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2857
2931
  let data7 = data.respondedAt;
2858
2932
  const _errs22 = errors;
2859
2933
  if (!(typeof data7 == "number" && isFinite(data7))) {
2860
- const err14 = { instancePath: instancePath + "/respondedAt", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/respondedAt/type", keyword: "type", params: { type: "number" }, message: "must be number" };
2934
+ const err18 = { instancePath: instancePath + "/respondedAt", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/respondedAt/type", keyword: "type", params: { type: "number" }, message: "must be number" };
2861
2935
  if (vErrors === null) {
2862
- vErrors = [err14];
2936
+ vErrors = [err18];
2863
2937
  } else {
2864
- vErrors.push(err14);
2938
+ vErrors.push(err18);
2865
2939
  }
2866
2940
  errors++;
2867
2941
  }
@@ -2875,11 +2949,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2875
2949
  }
2876
2950
  }
2877
2951
  } else {
2878
- const err15 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2952
+ const err19 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2879
2953
  if (vErrors === null) {
2880
- vErrors = [err15];
2954
+ vErrors = [err19];
2881
2955
  } else {
2882
- vErrors.push(err15);
2956
+ vErrors.push(err19);
2883
2957
  }
2884
2958
  errors++;
2885
2959
  }
@@ -2896,11 +2970,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2896
2970
  if (data && typeof data == "object" && !Array.isArray(data)) {
2897
2971
  let missing2;
2898
2972
  if (data.decisionId === void 0 && (missing2 = "decisionId") || data.outcome === void 0 && (missing2 = "outcome")) {
2899
- const err16 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" };
2973
+ const err20 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" };
2900
2974
  if (vErrors === null) {
2901
- vErrors = [err16];
2975
+ vErrors = [err20];
2902
2976
  } else {
2903
- vErrors.push(err16);
2977
+ vErrors.push(err20);
2904
2978
  }
2905
2979
  errors++;
2906
2980
  } else {
@@ -2910,20 +2984,30 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2910
2984
  if (errors === _errs27) {
2911
2985
  if (typeof data8 === "string") {
2912
2986
  if (func1(data8) < 1) {
2913
- const err17 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/decisionId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
2987
+ const err21 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/decisionId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
2914
2988
  if (vErrors === null) {
2915
- vErrors = [err17];
2989
+ vErrors = [err21];
2916
2990
  } else {
2917
- vErrors.push(err17);
2991
+ vErrors.push(err21);
2918
2992
  }
2919
2993
  errors++;
2994
+ } else {
2995
+ if (!pattern4.test(data8)) {
2996
+ const err22 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
2997
+ if (vErrors === null) {
2998
+ vErrors = [err22];
2999
+ } else {
3000
+ vErrors.push(err22);
3001
+ }
3002
+ errors++;
3003
+ }
2920
3004
  }
2921
3005
  } else {
2922
- const err18 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3006
+ const err23 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2923
3007
  if (vErrors === null) {
2924
- vErrors = [err18];
3008
+ vErrors = [err23];
2925
3009
  } else {
2926
- vErrors.push(err18);
3010
+ vErrors.push(err23);
2927
3011
  }
2928
3012
  errors++;
2929
3013
  }
@@ -2934,15 +3018,28 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2934
3018
  }
2935
3019
  if (valid4) {
2936
3020
  if (data.shortId !== void 0) {
3021
+ let data9 = data.shortId;
2937
3022
  const _errs29 = errors;
2938
- if (typeof data.shortId !== "string") {
2939
- const err19 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2940
- if (vErrors === null) {
2941
- vErrors = [err19];
3023
+ if (errors === _errs29) {
3024
+ if (typeof data9 === "string") {
3025
+ if (!pattern5.test(data9)) {
3026
+ const err24 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
3027
+ if (vErrors === null) {
3028
+ vErrors = [err24];
3029
+ } else {
3030
+ vErrors.push(err24);
3031
+ }
3032
+ errors++;
3033
+ }
2942
3034
  } else {
2943
- vErrors.push(err19);
3035
+ const err25 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3036
+ if (vErrors === null) {
3037
+ vErrors = [err25];
3038
+ } else {
3039
+ vErrors.push(err25);
3040
+ }
3041
+ errors++;
2944
3042
  }
2945
- errors++;
2946
3043
  }
2947
3044
  var valid4 = _errs29 === errors;
2948
3045
  } else {
@@ -2953,20 +3050,20 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2953
3050
  let data10 = data.outcome;
2954
3051
  const _errs31 = errors;
2955
3052
  if (typeof data10 !== "string") {
2956
- const err20 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/outcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3053
+ const err26 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/outcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2957
3054
  if (vErrors === null) {
2958
- vErrors = [err20];
3055
+ vErrors = [err26];
2959
3056
  } else {
2960
- vErrors.push(err20);
3057
+ vErrors.push(err26);
2961
3058
  }
2962
3059
  errors++;
2963
3060
  }
2964
3061
  if ("no_pending_prompt" !== data10) {
2965
- const err21 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/outcome/const", keyword: "const", params: { allowedValue: "no_pending_prompt" }, message: "must be equal to constant" };
3062
+ const err27 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/outcome/const", keyword: "const", params: { allowedValue: "no_pending_prompt" }, message: "must be equal to constant" };
2966
3063
  if (vErrors === null) {
2967
- vErrors = [err21];
3064
+ vErrors = [err27];
2968
3065
  } else {
2969
- vErrors.push(err21);
3066
+ vErrors.push(err27);
2970
3067
  }
2971
3068
  errors++;
2972
3069
  }
@@ -2978,11 +3075,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2978
3075
  }
2979
3076
  }
2980
3077
  } else {
2981
- const err22 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3078
+ const err28 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2982
3079
  if (vErrors === null) {
2983
- vErrors = [err22];
3080
+ vErrors = [err28];
2984
3081
  } else {
2985
- vErrors.push(err22);
3082
+ vErrors.push(err28);
2986
3083
  }
2987
3084
  errors++;
2988
3085
  }
@@ -2995,11 +3092,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
2995
3092
  }
2996
3093
  }
2997
3094
  if (!valid1) {
2998
- const err23 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
3095
+ const err29 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
2999
3096
  if (vErrors === null) {
3000
- vErrors = [err23];
3097
+ vErrors = [err29];
3001
3098
  } else {
3002
- vErrors.push(err23);
3099
+ vErrors.push(err29);
3003
3100
  }
3004
3101
  errors++;
3005
3102
  validate26.errors = vErrors;
@@ -3968,7 +4065,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
3968
4065
  return errors === 0;
3969
4066
  }
3970
4067
  validate27.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
3971
- var schema47 = { "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "createdAt": { "type": "number" }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 } }, "required": ["kind", "userId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "scopeWarnings": { "type": "array", "items": { "type": "string" } } }, "required": ["decisionId", "shortId", "createdAt"], "additionalProperties": {} };
4068
+ var schema47 = { "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "createdAt": { "type": "number" }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 } }, "required": ["kind", "userId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "scopeWarnings": { "type": "array", "items": { "type": "string" } } }, "required": ["decisionId", "shortId", "createdAt"], "additionalProperties": {} };
3972
4069
  function validate28(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
3973
4070
  ;
3974
4071
  let vErrors = null;
@@ -3996,6 +4093,11 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
3996
4093
  if (func1(data0) < 1) {
3997
4094
  validate28.errors = [{ instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCreateResponse/properties/decisionId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
3998
4095
  return false;
4096
+ } else {
4097
+ if (!pattern4.test(data0)) {
4098
+ validate28.errors = [{ instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCreateResponse/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
4099
+ return false;
4100
+ }
3999
4101
  }
4000
4102
  } else {
4001
4103
  validate28.errors = [{ instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCreateResponse/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
@@ -4008,10 +4110,18 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
4008
4110
  }
4009
4111
  if (valid1) {
4010
4112
  if (data.shortId !== void 0) {
4113
+ let data1 = data.shortId;
4011
4114
  const _errs5 = errors;
4012
- if (typeof data.shortId !== "string") {
4013
- validate28.errors = [{ instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCreateResponse/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
4014
- return false;
4115
+ if (errors === _errs5) {
4116
+ if (typeof data1 === "string") {
4117
+ if (!pattern5.test(data1)) {
4118
+ validate28.errors = [{ instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCreateResponse/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
4119
+ return false;
4120
+ }
4121
+ } else {
4122
+ validate28.errors = [{ instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCreateResponse/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
4123
+ return false;
4124
+ }
4015
4125
  }
4016
4126
  var valid1 = _errs5 === errors;
4017
4127
  } else {
@@ -4753,7 +4863,7 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
4753
4863
  return errors === 0;
4754
4864
  }
4755
4865
  validate28.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
4756
- var schema49 = { "type": "object", "properties": { "decision": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "intent": { "type": "string" }, "intentKind": { "type": "string", "enum": ["change", "exploration", "task_execution", "unclear"] }, "rationale": { "type": "string" }, "decided": { "type": "array", "items": { "type": "string" } }, "alternatives": { "type": "array", "items": { "type": "string" } }, "area": { "type": "string" }, "producerKind": { "type": "string" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] }, "supersededBy": { "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] }, "confidence": { "type": "string", "enum": ["high", "medium", "low"] }, "reversibility": { "type": "string", "enum": ["high", "low"] }, "confirmed": { "type": "boolean" }, "respondedAt": { "type": "number" }, "fanOut": { "type": "number" }, "classifiedAt": { "type": "number" }, "authorName": { "type": "string" } }, "required": ["id", "intent", "intentKind", "alternatives", "stage", "status", "supersededBy", "confidence", "classifiedAt", "authorName"], "additionalProperties": {} }, "files": { "type": "array", "items": { "type": "string" } }, "flags": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["file_edit", "supersession", "invalidation", "confirmation_request"] }, "file": { "type": "string" }, "flaggedAt": { "type": "number" }, "acknowledgedAt": { "type": "number" }, "gateVerdict": { "type": "string" }, "reason": { "type": "string" } }, "required": ["type", "flaggedAt"], "additionalProperties": {} } }, "dependsOn": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} } }, "dependents": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} } }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 }, "displayName": { "type": "string" } }, "required": ["kind", "userId", "displayName"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "truncated": { "type": "boolean" } }, "required": ["decision", "files", "flags", "dependsOn", "dependents", "scope", "truncated"], "additionalProperties": {} };
4866
+ var schema49 = { "type": "object", "properties": { "decision": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "intent": { "type": "string" }, "intentKind": { "type": "string", "enum": ["change", "exploration", "task_execution", "unclear"] }, "rationale": { "type": "string" }, "decided": { "type": "array", "items": { "type": "string" } }, "alternatives": { "type": "array", "items": { "type": "string" } }, "area": { "type": "string" }, "producerKind": { "type": "string" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] }, "supersededBy": { "anyOf": [{ "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$" }, { "type": "null" }], "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "confidence": { "type": "string", "enum": ["high", "medium", "low"] }, "reversibility": { "type": "string", "enum": ["high", "low"] }, "confirmed": { "type": "boolean" }, "respondedAt": { "type": "number" }, "fanOut": { "type": "number" }, "classifiedAt": { "type": "number" }, "authorName": { "type": "string" } }, "required": ["id", "intent", "intentKind", "alternatives", "stage", "status", "supersededBy", "confidence", "classifiedAt", "authorName"], "additionalProperties": {} }, "files": { "type": "array", "items": { "type": "string" } }, "flags": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["file_edit", "supersession", "invalidation", "confirmation_request"] }, "file": { "type": "string" }, "flaggedAt": { "type": "number" }, "acknowledgedAt": { "type": "number" }, "gateVerdict": { "type": "string" }, "reason": { "type": "string" } }, "required": ["type", "flaggedAt"], "additionalProperties": {} } }, "dependsOn": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} } }, "dependents": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} } }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 }, "displayName": { "type": "string" } }, "required": ["kind", "userId", "displayName"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "truncated": { "type": "boolean" } }, "required": ["decision", "files", "flags", "dependsOn", "dependents", "scope", "truncated"], "additionalProperties": {} };
4757
4867
  function validate29(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
4758
4868
  ;
4759
4869
  let vErrors = null;
@@ -4791,6 +4901,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
4791
4901
  if (func1(data1) < 1) {
4792
4902
  validate29.errors = [{ instancePath: instancePath + "/decision/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
4793
4903
  return false;
4904
+ } else {
4905
+ if (!pattern4.test(data1)) {
4906
+ validate29.errors = [{ instancePath: instancePath + "/decision/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
4907
+ return false;
4908
+ }
4794
4909
  }
4795
4910
  } else {
4796
4911
  validate29.errors = [{ instancePath: instancePath + "/decision/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
@@ -4803,10 +4918,18 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
4803
4918
  }
4804
4919
  if (valid2) {
4805
4920
  if (data0.shortId !== void 0) {
4921
+ let data2 = data0.shortId;
4806
4922
  const _errs8 = errors;
4807
- if (typeof data0.shortId !== "string") {
4808
- validate29.errors = [{ instancePath: instancePath + "/decision/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
4809
- return false;
4923
+ if (errors === _errs8) {
4924
+ if (typeof data2 === "string") {
4925
+ if (!pattern5.test(data2)) {
4926
+ validate29.errors = [{ instancePath: instancePath + "/decision/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
4927
+ return false;
4928
+ }
4929
+ } else {
4930
+ validate29.errors = [{ instancePath: instancePath + "/decision/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
4931
+ return false;
4932
+ }
4810
4933
  }
4811
4934
  var valid2 = _errs8 === errors;
4812
4935
  } else {
@@ -4977,13 +5100,23 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
4977
5100
  vErrors.push(err0);
4978
5101
  }
4979
5102
  errors++;
5103
+ } else {
5104
+ if (!pattern4.test(data14)) {
5105
+ const err1 = { instancePath: instancePath + "/decision/supersededBy", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/supersededBy/anyOf/0/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
5106
+ if (vErrors === null) {
5107
+ vErrors = [err1];
5108
+ } else {
5109
+ vErrors.push(err1);
5110
+ }
5111
+ errors++;
5112
+ }
4980
5113
  }
4981
5114
  } else {
4982
- const err1 = { instancePath: instancePath + "/decision/supersededBy", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/supersededBy/anyOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5115
+ const err2 = { instancePath: instancePath + "/decision/supersededBy", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/supersededBy/anyOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
4983
5116
  if (vErrors === null) {
4984
- vErrors = [err1];
5117
+ vErrors = [err2];
4985
5118
  } else {
4986
- vErrors.push(err1);
5119
+ vErrors.push(err2);
4987
5120
  }
4988
5121
  errors++;
4989
5122
  }
@@ -4992,22 +5125,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
4992
5125
  valid5 = valid5 || _valid0;
4993
5126
  const _errs36 = errors;
4994
5127
  if (data14 !== null) {
4995
- const err2 = { instancePath: instancePath + "/decision/supersededBy", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/supersededBy/anyOf/1/type", keyword: "type", params: { type: "null" }, message: "must be null" };
5128
+ const err3 = { instancePath: instancePath + "/decision/supersededBy", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/supersededBy/anyOf/1/type", keyword: "type", params: { type: "null" }, message: "must be null" };
4996
5129
  if (vErrors === null) {
4997
- vErrors = [err2];
5130
+ vErrors = [err3];
4998
5131
  } else {
4999
- vErrors.push(err2);
5132
+ vErrors.push(err3);
5000
5133
  }
5001
5134
  errors++;
5002
5135
  }
5003
5136
  var _valid0 = _errs36 === errors;
5004
5137
  valid5 = valid5 || _valid0;
5005
5138
  if (!valid5) {
5006
- const err3 = { instancePath: instancePath + "/decision/supersededBy", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/supersededBy/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
5139
+ const err4 = { instancePath: instancePath + "/decision/supersededBy", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/supersededBy/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
5007
5140
  if (vErrors === null) {
5008
- vErrors = [err3];
5141
+ vErrors = [err4];
5009
5142
  } else {
5010
- vErrors.push(err3);
5143
+ vErrors.push(err4);
5011
5144
  }
5012
5145
  errors++;
5013
5146
  validate29.errors = vErrors;
@@ -5313,6 +5446,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5313
5446
  if (func1(data34) < 1) {
5314
5447
  validate29.errors = [{ instancePath: instancePath + "/dependsOn/" + i4 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependsOn/items/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
5315
5448
  return false;
5449
+ } else {
5450
+ if (!pattern4.test(data34)) {
5451
+ validate29.errors = [{ instancePath: instancePath + "/dependsOn/" + i4 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependsOn/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
5452
+ return false;
5453
+ }
5316
5454
  }
5317
5455
  } else {
5318
5456
  validate29.errors = [{ instancePath: instancePath + "/dependsOn/" + i4 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependsOn/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
@@ -5325,10 +5463,18 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5325
5463
  }
5326
5464
  if (valid10) {
5327
5465
  if (data33.shortId !== void 0) {
5466
+ let data35 = data33.shortId;
5328
5467
  const _errs80 = errors;
5329
- if (typeof data33.shortId !== "string") {
5330
- validate29.errors = [{ instancePath: instancePath + "/dependsOn/" + i4 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependsOn/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
5331
- return false;
5468
+ if (errors === _errs80) {
5469
+ if (typeof data35 === "string") {
5470
+ if (!pattern5.test(data35)) {
5471
+ validate29.errors = [{ instancePath: instancePath + "/dependsOn/" + i4 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependsOn/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
5472
+ return false;
5473
+ }
5474
+ } else {
5475
+ validate29.errors = [{ instancePath: instancePath + "/dependsOn/" + i4 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependsOn/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
5476
+ return false;
5477
+ }
5332
5478
  }
5333
5479
  var valid10 = _errs80 === errors;
5334
5480
  } else {
@@ -5447,6 +5593,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5447
5593
  if (func1(data43) < 1) {
5448
5594
  validate29.errors = [{ instancePath: instancePath + "/dependents/" + i5 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependents/items/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
5449
5595
  return false;
5596
+ } else {
5597
+ if (!pattern4.test(data43)) {
5598
+ validate29.errors = [{ instancePath: instancePath + "/dependents/" + i5 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependents/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
5599
+ return false;
5600
+ }
5450
5601
  }
5451
5602
  } else {
5452
5603
  validate29.errors = [{ instancePath: instancePath + "/dependents/" + i5 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependents/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
@@ -5459,10 +5610,18 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5459
5610
  }
5460
5611
  if (valid12) {
5461
5612
  if (data42.shortId !== void 0) {
5613
+ let data44 = data42.shortId;
5462
5614
  const _errs99 = errors;
5463
- if (typeof data42.shortId !== "string") {
5464
- validate29.errors = [{ instancePath: instancePath + "/dependents/" + i5 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependents/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
5465
- return false;
5615
+ if (errors === _errs99) {
5616
+ if (typeof data44 === "string") {
5617
+ if (!pattern5.test(data44)) {
5618
+ validate29.errors = [{ instancePath: instancePath + "/dependents/" + i5 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependents/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
5619
+ return false;
5620
+ }
5621
+ } else {
5622
+ validate29.errors = [{ instancePath: instancePath + "/dependents/" + i5 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependents/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
5623
+ return false;
5624
+ }
5466
5625
  }
5467
5626
  var valid12 = _errs99 === errors;
5468
5627
  } else {
@@ -5784,22 +5943,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5784
5943
  if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
5785
5944
  let missing7;
5786
5945
  if (data64.kind === void 0 && (missing7 = "kind") || data64.userId === void 0 && (missing7 = "userId") || data64.displayName === void 0 && (missing7 = "displayName")) {
5787
- const err4 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" };
5946
+ const err5 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" };
5788
5947
  if (vErrors === null) {
5789
- vErrors = [err4];
5948
+ vErrors = [err5];
5790
5949
  } else {
5791
- vErrors.push(err4);
5950
+ vErrors.push(err5);
5792
5951
  }
5793
5952
  errors++;
5794
5953
  } else {
5795
5954
  const _errs146 = errors;
5796
5955
  for (const key0 in data64) {
5797
5956
  if (!(key0 === "kind" || key0 === "userId" || key0 === "displayName")) {
5798
- const err5 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
5957
+ const err6 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
5799
5958
  if (vErrors === null) {
5800
- vErrors = [err5];
5959
+ vErrors = [err6];
5801
5960
  } else {
5802
- vErrors.push(err5);
5961
+ vErrors.push(err6);
5803
5962
  }
5804
5963
  errors++;
5805
5964
  break;
@@ -5810,20 +5969,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5810
5969
  let data65 = data64.kind;
5811
5970
  const _errs147 = errors;
5812
5971
  if (typeof data65 !== "string") {
5813
- const err6 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5972
+ const err7 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5814
5973
  if (vErrors === null) {
5815
- vErrors = [err6];
5974
+ vErrors = [err7];
5816
5975
  } else {
5817
- vErrors.push(err6);
5976
+ vErrors.push(err7);
5818
5977
  }
5819
5978
  errors++;
5820
5979
  }
5821
5980
  if ("user" !== data65) {
5822
- const err7 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/kind/const", keyword: "const", params: { allowedValue: "user" }, message: "must be equal to constant" };
5981
+ const err8 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/kind/const", keyword: "const", params: { allowedValue: "user" }, message: "must be equal to constant" };
5823
5982
  if (vErrors === null) {
5824
- vErrors = [err7];
5983
+ vErrors = [err8];
5825
5984
  } else {
5826
- vErrors.push(err7);
5985
+ vErrors.push(err8);
5827
5986
  }
5828
5987
  errors++;
5829
5988
  }
@@ -5838,20 +5997,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5838
5997
  if (errors === _errs149) {
5839
5998
  if (typeof data66 === "string") {
5840
5999
  if (func1(data66) < 1) {
5841
- const err8 = { instancePath: instancePath + "/scope/users/" + i9 + "/userId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/userId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
6000
+ const err9 = { instancePath: instancePath + "/scope/users/" + i9 + "/userId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/userId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
5842
6001
  if (vErrors === null) {
5843
- vErrors = [err8];
6002
+ vErrors = [err9];
5844
6003
  } else {
5845
- vErrors.push(err8);
6004
+ vErrors.push(err9);
5846
6005
  }
5847
6006
  errors++;
5848
6007
  }
5849
6008
  } else {
5850
- const err9 = { instancePath: instancePath + "/scope/users/" + i9 + "/userId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/userId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6009
+ const err10 = { instancePath: instancePath + "/scope/users/" + i9 + "/userId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/userId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5851
6010
  if (vErrors === null) {
5852
- vErrors = [err9];
6011
+ vErrors = [err10];
5853
6012
  } else {
5854
- vErrors.push(err9);
6013
+ vErrors.push(err10);
5855
6014
  }
5856
6015
  errors++;
5857
6016
  }
@@ -5864,11 +6023,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5864
6023
  if (data64.displayName !== void 0) {
5865
6024
  const _errs151 = errors;
5866
6025
  if (typeof data64.displayName !== "string") {
5867
- const err10 = { instancePath: instancePath + "/scope/users/" + i9 + "/displayName", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/displayName/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6026
+ const err11 = { instancePath: instancePath + "/scope/users/" + i9 + "/displayName", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/displayName/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5868
6027
  if (vErrors === null) {
5869
- vErrors = [err10];
6028
+ vErrors = [err11];
5870
6029
  } else {
5871
- vErrors.push(err10);
6030
+ vErrors.push(err11);
5872
6031
  }
5873
6032
  errors++;
5874
6033
  }
@@ -5881,11 +6040,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5881
6040
  }
5882
6041
  }
5883
6042
  } else {
5884
- const err11 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
6043
+ const err12 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5885
6044
  if (vErrors === null) {
5886
- vErrors = [err11];
6045
+ vErrors = [err12];
5887
6046
  } else {
5888
- vErrors.push(err11);
6047
+ vErrors.push(err12);
5889
6048
  }
5890
6049
  errors++;
5891
6050
  }
@@ -5901,22 +6060,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5901
6060
  if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
5902
6061
  let missing8;
5903
6062
  if (data64.kind === void 0 && (missing8 = "kind") || data64.role === void 0 && (missing8 = "role")) {
5904
- const err12 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
6063
+ const err13 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
5905
6064
  if (vErrors === null) {
5906
- vErrors = [err12];
6065
+ vErrors = [err13];
5907
6066
  } else {
5908
- vErrors.push(err12);
6067
+ vErrors.push(err13);
5909
6068
  }
5910
6069
  errors++;
5911
6070
  } else {
5912
6071
  const _errs155 = errors;
5913
6072
  for (const key1 in data64) {
5914
6073
  if (!(key1 === "kind" || key1 === "role")) {
5915
- const err13 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
6074
+ const err14 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
5916
6075
  if (vErrors === null) {
5917
- vErrors = [err13];
6076
+ vErrors = [err14];
5918
6077
  } else {
5919
- vErrors.push(err13);
6078
+ vErrors.push(err14);
5920
6079
  }
5921
6080
  errors++;
5922
6081
  break;
@@ -5927,20 +6086,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5927
6086
  let data68 = data64.kind;
5928
6087
  const _errs156 = errors;
5929
6088
  if (typeof data68 !== "string") {
5930
- const err14 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6089
+ const err15 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5931
6090
  if (vErrors === null) {
5932
- vErrors = [err14];
6091
+ vErrors = [err15];
5933
6092
  } else {
5934
- vErrors.push(err14);
6093
+ vErrors.push(err15);
5935
6094
  }
5936
6095
  errors++;
5937
6096
  }
5938
6097
  if ("role" !== data68) {
5939
- const err15 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/properties/kind/const", keyword: "const", params: { allowedValue: "role" }, message: "must be equal to constant" };
6098
+ const err16 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/properties/kind/const", keyword: "const", params: { allowedValue: "role" }, message: "must be equal to constant" };
5940
6099
  if (vErrors === null) {
5941
- vErrors = [err15];
6100
+ vErrors = [err16];
5942
6101
  } else {
5943
- vErrors.push(err15);
6102
+ vErrors.push(err16);
5944
6103
  }
5945
6104
  errors++;
5946
6105
  }
@@ -5953,20 +6112,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5953
6112
  let data69 = data64.role;
5954
6113
  const _errs158 = errors;
5955
6114
  if (typeof data69 !== "string") {
5956
- const err16 = { instancePath: instancePath + "/scope/users/" + i9 + "/role", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/properties/role/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6115
+ const err17 = { instancePath: instancePath + "/scope/users/" + i9 + "/role", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/properties/role/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5957
6116
  if (vErrors === null) {
5958
- vErrors = [err16];
6117
+ vErrors = [err17];
5959
6118
  } else {
5960
- vErrors.push(err16);
6119
+ vErrors.push(err17);
5961
6120
  }
5962
6121
  errors++;
5963
6122
  }
5964
6123
  if (!(data69 === "owner" || data69 === "admin" || data69 === "member")) {
5965
- const err17 = { instancePath: instancePath + "/scope/users/" + i9 + "/role", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/properties/role/enum", keyword: "enum", params: { allowedValues: schema49.properties.scope.properties.users.items.oneOf[1].properties.role.enum }, message: "must be equal to one of the allowed values" };
6124
+ const err18 = { instancePath: instancePath + "/scope/users/" + i9 + "/role", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/properties/role/enum", keyword: "enum", params: { allowedValues: schema49.properties.scope.properties.users.items.oneOf[1].properties.role.enum }, message: "must be equal to one of the allowed values" };
5966
6125
  if (vErrors === null) {
5967
- vErrors = [err17];
6126
+ vErrors = [err18];
5968
6127
  } else {
5969
- vErrors.push(err17);
6128
+ vErrors.push(err18);
5970
6129
  }
5971
6130
  errors++;
5972
6131
  }
@@ -5978,11 +6137,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5978
6137
  }
5979
6138
  }
5980
6139
  } else {
5981
- const err18 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
6140
+ const err19 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5982
6141
  if (vErrors === null) {
5983
- vErrors = [err18];
6142
+ vErrors = [err19];
5984
6143
  } else {
5985
- vErrors.push(err18);
6144
+ vErrors.push(err19);
5986
6145
  }
5987
6146
  errors++;
5988
6147
  }
@@ -6004,22 +6163,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6004
6163
  if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
6005
6164
  let missing9;
6006
6165
  if (data64.kind === void 0 && (missing9 = "kind") || data64.agent === void 0 && (missing9 = "agent")) {
6007
- const err19 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
6166
+ const err20 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
6008
6167
  if (vErrors === null) {
6009
- vErrors = [err19];
6168
+ vErrors = [err20];
6010
6169
  } else {
6011
- vErrors.push(err19);
6170
+ vErrors.push(err20);
6012
6171
  }
6013
6172
  errors++;
6014
6173
  } else {
6015
6174
  const _errs162 = errors;
6016
6175
  for (const key2 in data64) {
6017
6176
  if (!(key2 === "kind" || key2 === "agent")) {
6018
- const err20 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
6177
+ const err21 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
6019
6178
  if (vErrors === null) {
6020
- vErrors = [err20];
6179
+ vErrors = [err21];
6021
6180
  } else {
6022
- vErrors.push(err20);
6181
+ vErrors.push(err21);
6023
6182
  }
6024
6183
  errors++;
6025
6184
  break;
@@ -6030,20 +6189,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6030
6189
  let data70 = data64.kind;
6031
6190
  const _errs163 = errors;
6032
6191
  if (typeof data70 !== "string") {
6033
- const err21 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6192
+ const err22 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6034
6193
  if (vErrors === null) {
6035
- vErrors = [err21];
6194
+ vErrors = [err22];
6036
6195
  } else {
6037
- vErrors.push(err21);
6196
+ vErrors.push(err22);
6038
6197
  }
6039
6198
  errors++;
6040
6199
  }
6041
6200
  if ("agent" !== data70) {
6042
- const err22 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/properties/kind/const", keyword: "const", params: { allowedValue: "agent" }, message: "must be equal to constant" };
6201
+ const err23 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/properties/kind/const", keyword: "const", params: { allowedValue: "agent" }, message: "must be equal to constant" };
6043
6202
  if (vErrors === null) {
6044
- vErrors = [err22];
6203
+ vErrors = [err23];
6045
6204
  } else {
6046
- vErrors.push(err22);
6205
+ vErrors.push(err23);
6047
6206
  }
6048
6207
  errors++;
6049
6208
  }
@@ -6056,20 +6215,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6056
6215
  let data71 = data64.agent;
6057
6216
  const _errs165 = errors;
6058
6217
  if (typeof data71 !== "string") {
6059
- const err23 = { instancePath: instancePath + "/scope/users/" + i9 + "/agent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/properties/agent/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6218
+ const err24 = { instancePath: instancePath + "/scope/users/" + i9 + "/agent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/properties/agent/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6060
6219
  if (vErrors === null) {
6061
- vErrors = [err23];
6220
+ vErrors = [err24];
6062
6221
  } else {
6063
- vErrors.push(err23);
6222
+ vErrors.push(err24);
6064
6223
  }
6065
6224
  errors++;
6066
6225
  }
6067
6226
  if (!(data71 === "claude_code" || data71 === "codex" || data71 === "cursor" || data71 === "hermes")) {
6068
- const err24 = { instancePath: instancePath + "/scope/users/" + i9 + "/agent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/properties/agent/enum", keyword: "enum", params: { allowedValues: schema49.properties.scope.properties.users.items.oneOf[2].properties.agent.enum }, message: "must be equal to one of the allowed values" };
6227
+ const err25 = { instancePath: instancePath + "/scope/users/" + i9 + "/agent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/properties/agent/enum", keyword: "enum", params: { allowedValues: schema49.properties.scope.properties.users.items.oneOf[2].properties.agent.enum }, message: "must be equal to one of the allowed values" };
6069
6228
  if (vErrors === null) {
6070
- vErrors = [err24];
6229
+ vErrors = [err25];
6071
6230
  } else {
6072
- vErrors.push(err24);
6231
+ vErrors.push(err25);
6073
6232
  }
6074
6233
  errors++;
6075
6234
  }
@@ -6081,11 +6240,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6081
6240
  }
6082
6241
  }
6083
6242
  } else {
6084
- const err25 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
6243
+ const err26 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
6085
6244
  if (vErrors === null) {
6086
- vErrors = [err25];
6245
+ vErrors = [err26];
6087
6246
  } else {
6088
- vErrors.push(err25);
6247
+ vErrors.push(err26);
6089
6248
  }
6090
6249
  errors++;
6091
6250
  }
@@ -6107,22 +6266,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6107
6266
  if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
6108
6267
  let missing10;
6109
6268
  if (data64.kind === void 0 && (missing10 = "kind") || data64.credential === void 0 && (missing10 = "credential")) {
6110
- const err26 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/required", keyword: "required", params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'" };
6269
+ const err27 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/required", keyword: "required", params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'" };
6111
6270
  if (vErrors === null) {
6112
- vErrors = [err26];
6271
+ vErrors = [err27];
6113
6272
  } else {
6114
- vErrors.push(err26);
6273
+ vErrors.push(err27);
6115
6274
  }
6116
6275
  errors++;
6117
6276
  } else {
6118
6277
  const _errs169 = errors;
6119
6278
  for (const key3 in data64) {
6120
6279
  if (!(key3 === "kind" || key3 === "credential")) {
6121
- const err27 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
6280
+ const err28 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
6122
6281
  if (vErrors === null) {
6123
- vErrors = [err27];
6282
+ vErrors = [err28];
6124
6283
  } else {
6125
- vErrors.push(err27);
6284
+ vErrors.push(err28);
6126
6285
  }
6127
6286
  errors++;
6128
6287
  break;
@@ -6133,20 +6292,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6133
6292
  let data72 = data64.kind;
6134
6293
  const _errs170 = errors;
6135
6294
  if (typeof data72 !== "string") {
6136
- const err28 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6295
+ const err29 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6137
6296
  if (vErrors === null) {
6138
- vErrors = [err28];
6297
+ vErrors = [err29];
6139
6298
  } else {
6140
- vErrors.push(err28);
6299
+ vErrors.push(err29);
6141
6300
  }
6142
6301
  errors++;
6143
6302
  }
6144
6303
  if ("credential" !== data72) {
6145
- const err29 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/properties/kind/const", keyword: "const", params: { allowedValue: "credential" }, message: "must be equal to constant" };
6304
+ const err30 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/properties/kind/const", keyword: "const", params: { allowedValue: "credential" }, message: "must be equal to constant" };
6146
6305
  if (vErrors === null) {
6147
- vErrors = [err29];
6306
+ vErrors = [err30];
6148
6307
  } else {
6149
- vErrors.push(err29);
6308
+ vErrors.push(err30);
6150
6309
  }
6151
6310
  errors++;
6152
6311
  }
@@ -6159,20 +6318,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6159
6318
  let data73 = data64.credential;
6160
6319
  const _errs172 = errors;
6161
6320
  if (typeof data73 !== "string") {
6162
- const err30 = { instancePath: instancePath + "/scope/users/" + i9 + "/credential", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/properties/credential/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6321
+ const err31 = { instancePath: instancePath + "/scope/users/" + i9 + "/credential", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/properties/credential/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6163
6322
  if (vErrors === null) {
6164
- vErrors = [err30];
6323
+ vErrors = [err31];
6165
6324
  } else {
6166
- vErrors.push(err30);
6325
+ vErrors.push(err31);
6167
6326
  }
6168
6327
  errors++;
6169
6328
  }
6170
6329
  if (!(data73 === "workos_jwt" || data73 === "workos_api_key" || data73 === "service_token")) {
6171
- const err31 = { instancePath: instancePath + "/scope/users/" + i9 + "/credential", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/properties/credential/enum", keyword: "enum", params: { allowedValues: schema49.properties.scope.properties.users.items.oneOf[3].properties.credential.enum }, message: "must be equal to one of the allowed values" };
6330
+ const err32 = { instancePath: instancePath + "/scope/users/" + i9 + "/credential", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/properties/credential/enum", keyword: "enum", params: { allowedValues: schema49.properties.scope.properties.users.items.oneOf[3].properties.credential.enum }, message: "must be equal to one of the allowed values" };
6172
6331
  if (vErrors === null) {
6173
- vErrors = [err31];
6332
+ vErrors = [err32];
6174
6333
  } else {
6175
- vErrors.push(err31);
6334
+ vErrors.push(err32);
6176
6335
  }
6177
6336
  errors++;
6178
6337
  }
@@ -6184,11 +6343,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6184
6343
  }
6185
6344
  }
6186
6345
  } else {
6187
- const err32 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/type", keyword: "type", params: { type: "object" }, message: "must be object" };
6346
+ const err33 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/type", keyword: "type", params: { type: "object" }, message: "must be object" };
6188
6347
  if (vErrors === null) {
6189
- vErrors = [err32];
6348
+ vErrors = [err33];
6190
6349
  } else {
6191
- vErrors.push(err32);
6350
+ vErrors.push(err33);
6192
6351
  }
6193
6352
  errors++;
6194
6353
  }
@@ -6209,11 +6368,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6209
6368
  }
6210
6369
  }
6211
6370
  if (!valid20) {
6212
- const err33 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
6371
+ const err34 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
6213
6372
  if (vErrors === null) {
6214
- vErrors = [err33];
6373
+ vErrors = [err34];
6215
6374
  } else {
6216
- vErrors.push(err33);
6375
+ vErrors.push(err34);
6217
6376
  }
6218
6377
  errors++;
6219
6378
  validate29.errors = vErrors;
@@ -6516,7 +6675,7 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
6516
6675
  return errors === 0;
6517
6676
  }
6518
6677
  validate32.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
6519
- var schema57 = { "type": "object", "properties": { "outcome": { "type": "string", "enum": ["linked", "already_linked", "unlinked", "not_linked"] }, "childId": { "type": "string", "minLength": 1 }, "childShortId": { "type": "string" }, "parentId": { "type": "string", "minLength": 1 }, "parentShortId": { "type": "string" } }, "required": ["outcome", "childId", "parentId"], "additionalProperties": {} };
6678
+ var schema57 = { "type": "object", "properties": { "outcome": { "type": "string", "enum": ["linked", "already_linked", "unlinked", "not_linked"] }, "childId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "childShortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "parentId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "parentShortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" } }, "required": ["outcome", "childId", "parentId"], "additionalProperties": {} };
6520
6679
  function validate33(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
6521
6680
  ;
6522
6681
  let vErrors = null;
@@ -6560,6 +6719,11 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
6560
6719
  if (func1(data1) < 1) {
6561
6720
  validate33.errors = [{ instancePath: instancePath + "/childId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/childId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
6562
6721
  return false;
6722
+ } else {
6723
+ if (!pattern4.test(data1)) {
6724
+ validate33.errors = [{ instancePath: instancePath + "/childId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/childId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
6725
+ return false;
6726
+ }
6563
6727
  }
6564
6728
  } else {
6565
6729
  validate33.errors = [{ instancePath: instancePath + "/childId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/childId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
@@ -6572,10 +6736,18 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
6572
6736
  }
6573
6737
  if (valid1) {
6574
6738
  if (data.childShortId !== void 0) {
6739
+ let data2 = data.childShortId;
6575
6740
  const _errs7 = errors;
6576
- if (typeof data.childShortId !== "string") {
6577
- validate33.errors = [{ instancePath: instancePath + "/childShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/childShortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
6578
- return false;
6741
+ if (errors === _errs7) {
6742
+ if (typeof data2 === "string") {
6743
+ if (!pattern5.test(data2)) {
6744
+ validate33.errors = [{ instancePath: instancePath + "/childShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/childShortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
6745
+ return false;
6746
+ }
6747
+ } else {
6748
+ validate33.errors = [{ instancePath: instancePath + "/childShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/childShortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
6749
+ return false;
6750
+ }
6579
6751
  }
6580
6752
  var valid1 = _errs7 === errors;
6581
6753
  } else {
@@ -6590,6 +6762,11 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
6590
6762
  if (func1(data3) < 1) {
6591
6763
  validate33.errors = [{ instancePath: instancePath + "/parentId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/parentId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
6592
6764
  return false;
6765
+ } else {
6766
+ if (!pattern4.test(data3)) {
6767
+ validate33.errors = [{ instancePath: instancePath + "/parentId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/parentId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
6768
+ return false;
6769
+ }
6593
6770
  }
6594
6771
  } else {
6595
6772
  validate33.errors = [{ instancePath: instancePath + "/parentId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/parentId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
@@ -6602,10 +6779,18 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
6602
6779
  }
6603
6780
  if (valid1) {
6604
6781
  if (data.parentShortId !== void 0) {
6782
+ let data4 = data.parentShortId;
6605
6783
  const _errs11 = errors;
6606
- if (typeof data.parentShortId !== "string") {
6607
- validate33.errors = [{ instancePath: instancePath + "/parentShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/parentShortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
6608
- return false;
6784
+ if (errors === _errs11) {
6785
+ if (typeof data4 === "string") {
6786
+ if (!pattern5.test(data4)) {
6787
+ validate33.errors = [{ instancePath: instancePath + "/parentShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/parentShortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
6788
+ return false;
6789
+ }
6790
+ } else {
6791
+ validate33.errors = [{ instancePath: instancePath + "/parentShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/parentShortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
6792
+ return false;
6793
+ }
6609
6794
  }
6610
6795
  var valid1 = _errs11 === errors;
6611
6796
  } else {
@@ -7521,7 +7706,7 @@ function validate34(data, { instancePath = "", parentData, parentDataProperty, r
7521
7706
  return errors === 0;
7522
7707
  }
7523
7708
  validate34.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
7524
- var schema61 = { "anyOf": [{ "type": "object", "properties": { "outcome": { "type": "string", "const": "no_op" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 } }, "required": ["kind", "userId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "scopeWarnings": { "type": "array", "items": { "type": "string" } } }, "required": ["outcome", "stage", "scope"], "additionalProperties": {} }, { "type": "object", "properties": { "outcome": { "type": "string", "const": "ok" }, "decisionId": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 } }, "required": ["kind", "userId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "scopeWarnings": { "type": "array", "items": { "type": "string" } } }, "required": ["outcome", "decisionId", "stage", "scope"], "additionalProperties": {} }] };
7709
+ var schema61 = { "anyOf": [{ "type": "object", "properties": { "outcome": { "type": "string", "const": "no_op" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 } }, "required": ["kind", "userId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "scopeWarnings": { "type": "array", "items": { "type": "string" } } }, "required": ["outcome", "stage", "scope"], "additionalProperties": {} }, { "type": "object", "properties": { "outcome": { "type": "string", "const": "ok" }, "decisionId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 } }, "required": ["kind", "userId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "scopeWarnings": { "type": "array", "items": { "type": "string" } } }, "required": ["outcome", "decisionId", "stage", "scope"], "additionalProperties": {} }] };
7525
7710
  function validate35(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
7526
7711
  ;
7527
7712
  let vErrors = null;
@@ -8493,13 +8678,23 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8493
8678
  vErrors.push(err61);
8494
8679
  }
8495
8680
  errors++;
8681
+ } else {
8682
+ if (!pattern4.test(data28)) {
8683
+ const err62 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
8684
+ if (vErrors === null) {
8685
+ vErrors = [err62];
8686
+ } else {
8687
+ vErrors.push(err62);
8688
+ }
8689
+ errors++;
8690
+ }
8496
8691
  }
8497
8692
  } else {
8498
- const err62 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8693
+ const err63 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8499
8694
  if (vErrors === null) {
8500
- vErrors = [err62];
8695
+ vErrors = [err63];
8501
8696
  } else {
8502
- vErrors.push(err62);
8697
+ vErrors.push(err63);
8503
8698
  }
8504
8699
  errors++;
8505
8700
  }
@@ -8510,15 +8705,28 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8510
8705
  }
8511
8706
  if (valid16) {
8512
8707
  if (data.shortId !== void 0) {
8708
+ let data29 = data.shortId;
8513
8709
  const _errs81 = errors;
8514
- if (typeof data.shortId !== "string") {
8515
- const err63 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8516
- if (vErrors === null) {
8517
- vErrors = [err63];
8710
+ if (errors === _errs81) {
8711
+ if (typeof data29 === "string") {
8712
+ if (!pattern5.test(data29)) {
8713
+ const err64 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
8714
+ if (vErrors === null) {
8715
+ vErrors = [err64];
8716
+ } else {
8717
+ vErrors.push(err64);
8718
+ }
8719
+ errors++;
8720
+ }
8518
8721
  } else {
8519
- vErrors.push(err63);
8722
+ const err65 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8723
+ if (vErrors === null) {
8724
+ vErrors = [err65];
8725
+ } else {
8726
+ vErrors.push(err65);
8727
+ }
8728
+ errors++;
8520
8729
  }
8521
- errors++;
8522
8730
  }
8523
8731
  var valid16 = _errs81 === errors;
8524
8732
  } else {
@@ -8529,20 +8737,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8529
8737
  let data30 = data.stage;
8530
8738
  const _errs83 = errors;
8531
8739
  if (typeof data30 !== "string") {
8532
- const err64 = { instancePath: instancePath + "/stage", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/stage/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8740
+ const err66 = { instancePath: instancePath + "/stage", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/stage/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8533
8741
  if (vErrors === null) {
8534
- vErrors = [err64];
8742
+ vErrors = [err66];
8535
8743
  } else {
8536
- vErrors.push(err64);
8744
+ vErrors.push(err66);
8537
8745
  }
8538
8746
  errors++;
8539
8747
  }
8540
8748
  if (!(data30 === "draft" || data30 === "provisional" || data30 === "adopted" || data30 === "superseded" || data30 === "abandoned")) {
8541
- const err65 = { instancePath: instancePath + "/stage", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/stage/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.stage.enum }, message: "must be equal to one of the allowed values" };
8749
+ const err67 = { instancePath: instancePath + "/stage", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/stage/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.stage.enum }, message: "must be equal to one of the allowed values" };
8542
8750
  if (vErrors === null) {
8543
- vErrors = [err65];
8751
+ vErrors = [err67];
8544
8752
  } else {
8545
- vErrors.push(err65);
8753
+ vErrors.push(err67);
8546
8754
  }
8547
8755
  errors++;
8548
8756
  }
@@ -8558,11 +8766,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8558
8766
  if (data31 && typeof data31 == "object" && !Array.isArray(data31)) {
8559
8767
  let missing8;
8560
8768
  if (data31.location === void 0 && (missing8 = "location") || data31.time === void 0 && (missing8 = "time") || data31.users === void 0 && (missing8 = "users")) {
8561
- const err66 = { instancePath: instancePath + "/scope", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
8769
+ const err68 = { instancePath: instancePath + "/scope", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
8562
8770
  if (vErrors === null) {
8563
- vErrors = [err66];
8771
+ vErrors = [err68];
8564
8772
  } else {
8565
- vErrors.push(err66);
8773
+ vErrors.push(err68);
8566
8774
  }
8567
8775
  errors++;
8568
8776
  } else {
@@ -8573,11 +8781,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8573
8781
  if (data32 && typeof data32 == "object" && !Array.isArray(data32)) {
8574
8782
  let missing9;
8575
8783
  if (data32.repository === void 0 && (missing9 = "repository") || data32.directories === void 0 && (missing9 = "directories") || data32.globs === void 0 && (missing9 = "globs") || data32.branches === void 0 && (missing9 = "branches")) {
8576
- const err67 = { instancePath: instancePath + "/scope/location", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
8784
+ const err69 = { instancePath: instancePath + "/scope/location", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
8577
8785
  if (vErrors === null) {
8578
- vErrors = [err67];
8786
+ vErrors = [err69];
8579
8787
  } else {
8580
- vErrors.push(err67);
8788
+ vErrors.push(err69);
8581
8789
  }
8582
8790
  errors++;
8583
8791
  } else {
@@ -8585,20 +8793,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8585
8793
  let data33 = data32.mode;
8586
8794
  const _errs91 = errors;
8587
8795
  if (typeof data33 !== "string") {
8588
- const err68 = { instancePath: instancePath + "/scope/location/mode", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/mode/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8796
+ const err70 = { instancePath: instancePath + "/scope/location/mode", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/mode/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8589
8797
  if (vErrors === null) {
8590
- vErrors = [err68];
8798
+ vErrors = [err70];
8591
8799
  } else {
8592
- vErrors.push(err68);
8800
+ vErrors.push(err70);
8593
8801
  }
8594
8802
  errors++;
8595
8803
  }
8596
8804
  if (!(data33 === "inherited" || data33 === "explicit")) {
8597
- const err69 = { instancePath: instancePath + "/scope/location/mode", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/mode/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.scope.properties.location.properties.mode.enum }, message: "must be equal to one of the allowed values" };
8805
+ const err71 = { instancePath: instancePath + "/scope/location/mode", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/mode/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.scope.properties.location.properties.mode.enum }, message: "must be equal to one of the allowed values" };
8598
8806
  if (vErrors === null) {
8599
- vErrors = [err69];
8807
+ vErrors = [err71];
8600
8808
  } else {
8601
- vErrors.push(err69);
8809
+ vErrors.push(err71);
8602
8810
  }
8603
8811
  errors++;
8604
8812
  }
@@ -8610,11 +8818,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8610
8818
  if (data32.repository !== void 0) {
8611
8819
  const _errs93 = errors;
8612
8820
  if (typeof data32.repository !== "boolean") {
8613
- const err70 = { instancePath: instancePath + "/scope/location/repository", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/repository/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
8821
+ const err72 = { instancePath: instancePath + "/scope/location/repository", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/repository/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
8614
8822
  if (vErrors === null) {
8615
- vErrors = [err70];
8823
+ vErrors = [err72];
8616
8824
  } else {
8617
- vErrors.push(err70);
8825
+ vErrors.push(err72);
8618
8826
  }
8619
8827
  errors++;
8620
8828
  }
@@ -8633,11 +8841,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8633
8841
  for (let i5 = 0; i5 < len5; i5++) {
8634
8842
  const _errs97 = errors;
8635
8843
  if (typeof data35[i5] !== "string") {
8636
- const err71 = { instancePath: instancePath + "/scope/location/directories/" + i5, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/directories/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8844
+ const err73 = { instancePath: instancePath + "/scope/location/directories/" + i5, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/directories/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8637
8845
  if (vErrors === null) {
8638
- vErrors = [err71];
8846
+ vErrors = [err73];
8639
8847
  } else {
8640
- vErrors.push(err71);
8848
+ vErrors.push(err73);
8641
8849
  }
8642
8850
  errors++;
8643
8851
  }
@@ -8647,11 +8855,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8647
8855
  }
8648
8856
  }
8649
8857
  } else {
8650
- const err72 = { instancePath: instancePath + "/scope/location/directories", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/directories/type", keyword: "type", params: { type: "array" }, message: "must be array" };
8858
+ const err74 = { instancePath: instancePath + "/scope/location/directories", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/directories/type", keyword: "type", params: { type: "array" }, message: "must be array" };
8651
8859
  if (vErrors === null) {
8652
- vErrors = [err72];
8860
+ vErrors = [err74];
8653
8861
  } else {
8654
- vErrors.push(err72);
8862
+ vErrors.push(err74);
8655
8863
  }
8656
8864
  errors++;
8657
8865
  }
@@ -8671,11 +8879,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8671
8879
  for (let i6 = 0; i6 < len6; i6++) {
8672
8880
  const _errs101 = errors;
8673
8881
  if (typeof data37[i6] !== "string") {
8674
- const err73 = { instancePath: instancePath + "/scope/location/globs/" + i6, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/globs/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8882
+ const err75 = { instancePath: instancePath + "/scope/location/globs/" + i6, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/globs/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8675
8883
  if (vErrors === null) {
8676
- vErrors = [err73];
8884
+ vErrors = [err75];
8677
8885
  } else {
8678
- vErrors.push(err73);
8886
+ vErrors.push(err75);
8679
8887
  }
8680
8888
  errors++;
8681
8889
  }
@@ -8685,11 +8893,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8685
8893
  }
8686
8894
  }
8687
8895
  } else {
8688
- const err74 = { instancePath: instancePath + "/scope/location/globs", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/globs/type", keyword: "type", params: { type: "array" }, message: "must be array" };
8896
+ const err76 = { instancePath: instancePath + "/scope/location/globs", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/globs/type", keyword: "type", params: { type: "array" }, message: "must be array" };
8689
8897
  if (vErrors === null) {
8690
- vErrors = [err74];
8898
+ vErrors = [err76];
8691
8899
  } else {
8692
- vErrors.push(err74);
8900
+ vErrors.push(err76);
8693
8901
  }
8694
8902
  errors++;
8695
8903
  }
@@ -8709,11 +8917,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8709
8917
  for (let i7 = 0; i7 < len7; i7++) {
8710
8918
  const _errs105 = errors;
8711
8919
  if (typeof data39[i7] !== "string") {
8712
- const err75 = { instancePath: instancePath + "/scope/location/branches/" + i7, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/branches/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8920
+ const err77 = { instancePath: instancePath + "/scope/location/branches/" + i7, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/branches/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8713
8921
  if (vErrors === null) {
8714
- vErrors = [err75];
8922
+ vErrors = [err77];
8715
8923
  } else {
8716
- vErrors.push(err75);
8924
+ vErrors.push(err77);
8717
8925
  }
8718
8926
  errors++;
8719
8927
  }
@@ -8723,11 +8931,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8723
8931
  }
8724
8932
  }
8725
8933
  } else {
8726
- const err76 = { instancePath: instancePath + "/scope/location/branches", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/branches/type", keyword: "type", params: { type: "array" }, message: "must be array" };
8934
+ const err78 = { instancePath: instancePath + "/scope/location/branches", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/branches/type", keyword: "type", params: { type: "array" }, message: "must be array" };
8727
8935
  if (vErrors === null) {
8728
- vErrors = [err76];
8936
+ vErrors = [err78];
8729
8937
  } else {
8730
- vErrors.push(err76);
8938
+ vErrors.push(err78);
8731
8939
  }
8732
8940
  errors++;
8733
8941
  }
@@ -8742,11 +8950,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8742
8950
  }
8743
8951
  }
8744
8952
  } else {
8745
- const err77 = { instancePath: instancePath + "/scope/location", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/type", keyword: "type", params: { type: "object" }, message: "must be object" };
8953
+ const err79 = { instancePath: instancePath + "/scope/location", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/type", keyword: "type", params: { type: "object" }, message: "must be object" };
8746
8954
  if (vErrors === null) {
8747
- vErrors = [err77];
8955
+ vErrors = [err79];
8748
8956
  } else {
8749
- vErrors.push(err77);
8957
+ vErrors.push(err79);
8750
8958
  }
8751
8959
  errors++;
8752
8960
  }
@@ -8765,31 +8973,31 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8765
8973
  let data42 = data41.effectiveFrom;
8766
8974
  const _errs110 = errors;
8767
8975
  if (!(typeof data42 == "number" && (!(data42 % 1) && !isNaN(data42)) && isFinite(data42))) {
8768
- const err78 = { instancePath: instancePath + "/scope/time/effectiveFrom", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveFrom/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
8976
+ const err80 = { instancePath: instancePath + "/scope/time/effectiveFrom", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveFrom/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
8769
8977
  if (vErrors === null) {
8770
- vErrors = [err78];
8978
+ vErrors = [err80];
8771
8979
  } else {
8772
- vErrors.push(err78);
8980
+ vErrors.push(err80);
8773
8981
  }
8774
8982
  errors++;
8775
8983
  }
8776
8984
  if (errors === _errs110) {
8777
8985
  if (typeof data42 == "number" && isFinite(data42)) {
8778
8986
  if (data42 > 9007199254740991 || isNaN(data42)) {
8779
- const err79 = { instancePath: instancePath + "/scope/time/effectiveFrom", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveFrom/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
8987
+ const err81 = { instancePath: instancePath + "/scope/time/effectiveFrom", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveFrom/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
8780
8988
  if (vErrors === null) {
8781
- vErrors = [err79];
8989
+ vErrors = [err81];
8782
8990
  } else {
8783
- vErrors.push(err79);
8991
+ vErrors.push(err81);
8784
8992
  }
8785
8993
  errors++;
8786
8994
  } else {
8787
8995
  if (data42 < -9007199254740991 || isNaN(data42)) {
8788
- const err80 = { instancePath: instancePath + "/scope/time/effectiveFrom", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveFrom/minimum", keyword: "minimum", params: { comparison: ">=", limit: -9007199254740991 }, message: "must be >= -9007199254740991" };
8996
+ const err82 = { instancePath: instancePath + "/scope/time/effectiveFrom", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveFrom/minimum", keyword: "minimum", params: { comparison: ">=", limit: -9007199254740991 }, message: "must be >= -9007199254740991" };
8789
8997
  if (vErrors === null) {
8790
- vErrors = [err80];
8998
+ vErrors = [err82];
8791
8999
  } else {
8792
- vErrors.push(err80);
9000
+ vErrors.push(err82);
8793
9001
  }
8794
9002
  errors++;
8795
9003
  }
@@ -8805,31 +9013,31 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8805
9013
  let data43 = data41.effectiveUntil;
8806
9014
  const _errs112 = errors;
8807
9015
  if (!(typeof data43 == "number" && (!(data43 % 1) && !isNaN(data43)) && isFinite(data43))) {
8808
- const err81 = { instancePath: instancePath + "/scope/time/effectiveUntil", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveUntil/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
9016
+ const err83 = { instancePath: instancePath + "/scope/time/effectiveUntil", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveUntil/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
8809
9017
  if (vErrors === null) {
8810
- vErrors = [err81];
9018
+ vErrors = [err83];
8811
9019
  } else {
8812
- vErrors.push(err81);
9020
+ vErrors.push(err83);
8813
9021
  }
8814
9022
  errors++;
8815
9023
  }
8816
9024
  if (errors === _errs112) {
8817
9025
  if (typeof data43 == "number" && isFinite(data43)) {
8818
9026
  if (data43 > 9007199254740991 || isNaN(data43)) {
8819
- const err82 = { instancePath: instancePath + "/scope/time/effectiveUntil", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveUntil/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
9027
+ const err84 = { instancePath: instancePath + "/scope/time/effectiveUntil", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveUntil/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
8820
9028
  if (vErrors === null) {
8821
- vErrors = [err82];
9029
+ vErrors = [err84];
8822
9030
  } else {
8823
- vErrors.push(err82);
9031
+ vErrors.push(err84);
8824
9032
  }
8825
9033
  errors++;
8826
9034
  } else {
8827
9035
  if (data43 < -9007199254740991 || isNaN(data43)) {
8828
- const err83 = { instancePath: instancePath + "/scope/time/effectiveUntil", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveUntil/minimum", keyword: "minimum", params: { comparison: ">=", limit: -9007199254740991 }, message: "must be >= -9007199254740991" };
9036
+ const err85 = { instancePath: instancePath + "/scope/time/effectiveUntil", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveUntil/minimum", keyword: "minimum", params: { comparison: ">=", limit: -9007199254740991 }, message: "must be >= -9007199254740991" };
8829
9037
  if (vErrors === null) {
8830
- vErrors = [err83];
9038
+ vErrors = [err85];
8831
9039
  } else {
8832
- vErrors.push(err83);
9040
+ vErrors.push(err85);
8833
9041
  }
8834
9042
  errors++;
8835
9043
  }
@@ -8842,11 +9050,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8842
9050
  }
8843
9051
  }
8844
9052
  } else {
8845
- const err84 = { instancePath: instancePath + "/scope/time", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9053
+ const err86 = { instancePath: instancePath + "/scope/time", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/type", keyword: "type", params: { type: "object" }, message: "must be object" };
8846
9054
  if (vErrors === null) {
8847
- vErrors = [err84];
9055
+ vErrors = [err86];
8848
9056
  } else {
8849
- vErrors.push(err84);
9057
+ vErrors.push(err86);
8850
9058
  }
8851
9059
  errors++;
8852
9060
  }
@@ -8874,22 +9082,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8874
9082
  if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
8875
9083
  let missing10;
8876
9084
  if (data45.kind === void 0 && (missing10 = "kind") || data45.userId === void 0 && (missing10 = "userId")) {
8877
- const err85 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/required", keyword: "required", params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'" };
9085
+ const err87 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/required", keyword: "required", params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'" };
8878
9086
  if (vErrors === null) {
8879
- vErrors = [err85];
9087
+ vErrors = [err87];
8880
9088
  } else {
8881
- vErrors.push(err85);
9089
+ vErrors.push(err87);
8882
9090
  }
8883
9091
  errors++;
8884
9092
  } else {
8885
9093
  const _errs120 = errors;
8886
9094
  for (const key4 in data45) {
8887
9095
  if (!(key4 === "kind" || key4 === "userId")) {
8888
- const err86 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
9096
+ const err88 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
8889
9097
  if (vErrors === null) {
8890
- vErrors = [err86];
9098
+ vErrors = [err88];
8891
9099
  } else {
8892
- vErrors.push(err86);
9100
+ vErrors.push(err88);
8893
9101
  }
8894
9102
  errors++;
8895
9103
  break;
@@ -8900,20 +9108,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8900
9108
  let data46 = data45.kind;
8901
9109
  const _errs121 = errors;
8902
9110
  if (typeof data46 !== "string") {
8903
- const err87 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9111
+ const err89 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8904
9112
  if (vErrors === null) {
8905
- vErrors = [err87];
9113
+ vErrors = [err89];
8906
9114
  } else {
8907
- vErrors.push(err87);
9115
+ vErrors.push(err89);
8908
9116
  }
8909
9117
  errors++;
8910
9118
  }
8911
9119
  if ("user" !== data46) {
8912
- const err88 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/properties/kind/const", keyword: "const", params: { allowedValue: "user" }, message: "must be equal to constant" };
9120
+ const err90 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/properties/kind/const", keyword: "const", params: { allowedValue: "user" }, message: "must be equal to constant" };
8913
9121
  if (vErrors === null) {
8914
- vErrors = [err88];
9122
+ vErrors = [err90];
8915
9123
  } else {
8916
- vErrors.push(err88);
9124
+ vErrors.push(err90);
8917
9125
  }
8918
9126
  errors++;
8919
9127
  }
@@ -8928,20 +9136,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8928
9136
  if (errors === _errs123) {
8929
9137
  if (typeof data47 === "string") {
8930
9138
  if (func1(data47) < 1) {
8931
- const err89 = { instancePath: instancePath + "/scope/users/" + i8 + "/userId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/properties/userId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
9139
+ const err91 = { instancePath: instancePath + "/scope/users/" + i8 + "/userId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/properties/userId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
8932
9140
  if (vErrors === null) {
8933
- vErrors = [err89];
9141
+ vErrors = [err91];
8934
9142
  } else {
8935
- vErrors.push(err89);
9143
+ vErrors.push(err91);
8936
9144
  }
8937
9145
  errors++;
8938
9146
  }
8939
9147
  } else {
8940
- const err90 = { instancePath: instancePath + "/scope/users/" + i8 + "/userId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/properties/userId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9148
+ const err92 = { instancePath: instancePath + "/scope/users/" + i8 + "/userId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/properties/userId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8941
9149
  if (vErrors === null) {
8942
- vErrors = [err90];
9150
+ vErrors = [err92];
8943
9151
  } else {
8944
- vErrors.push(err90);
9152
+ vErrors.push(err92);
8945
9153
  }
8946
9154
  errors++;
8947
9155
  }
@@ -8954,11 +9162,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8954
9162
  }
8955
9163
  }
8956
9164
  } else {
8957
- const err91 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9165
+ const err93 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
8958
9166
  if (vErrors === null) {
8959
- vErrors = [err91];
9167
+ vErrors = [err93];
8960
9168
  } else {
8961
- vErrors.push(err91);
9169
+ vErrors.push(err93);
8962
9170
  }
8963
9171
  errors++;
8964
9172
  }
@@ -8974,22 +9182,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
8974
9182
  if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
8975
9183
  let missing11;
8976
9184
  if (data45.kind === void 0 && (missing11 = "kind") || data45.role === void 0 && (missing11 = "role")) {
8977
- const err92 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/required", keyword: "required", params: { missingProperty: missing11 }, message: "must have required property '" + missing11 + "'" };
9185
+ const err94 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/required", keyword: "required", params: { missingProperty: missing11 }, message: "must have required property '" + missing11 + "'" };
8978
9186
  if (vErrors === null) {
8979
- vErrors = [err92];
9187
+ vErrors = [err94];
8980
9188
  } else {
8981
- vErrors.push(err92);
9189
+ vErrors.push(err94);
8982
9190
  }
8983
9191
  errors++;
8984
9192
  } else {
8985
9193
  const _errs127 = errors;
8986
9194
  for (const key5 in data45) {
8987
9195
  if (!(key5 === "kind" || key5 === "role")) {
8988
- const err93 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" };
9196
+ const err95 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" };
8989
9197
  if (vErrors === null) {
8990
- vErrors = [err93];
9198
+ vErrors = [err95];
8991
9199
  } else {
8992
- vErrors.push(err93);
9200
+ vErrors.push(err95);
8993
9201
  }
8994
9202
  errors++;
8995
9203
  break;
@@ -9000,20 +9208,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9000
9208
  let data48 = data45.kind;
9001
9209
  const _errs128 = errors;
9002
9210
  if (typeof data48 !== "string") {
9003
- const err94 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9211
+ const err96 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9004
9212
  if (vErrors === null) {
9005
- vErrors = [err94];
9213
+ vErrors = [err96];
9006
9214
  } else {
9007
- vErrors.push(err94);
9215
+ vErrors.push(err96);
9008
9216
  }
9009
9217
  errors++;
9010
9218
  }
9011
9219
  if ("role" !== data48) {
9012
- const err95 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/properties/kind/const", keyword: "const", params: { allowedValue: "role" }, message: "must be equal to constant" };
9220
+ const err97 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/properties/kind/const", keyword: "const", params: { allowedValue: "role" }, message: "must be equal to constant" };
9013
9221
  if (vErrors === null) {
9014
- vErrors = [err95];
9222
+ vErrors = [err97];
9015
9223
  } else {
9016
- vErrors.push(err95);
9224
+ vErrors.push(err97);
9017
9225
  }
9018
9226
  errors++;
9019
9227
  }
@@ -9026,20 +9234,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9026
9234
  let data49 = data45.role;
9027
9235
  const _errs130 = errors;
9028
9236
  if (typeof data49 !== "string") {
9029
- const err96 = { instancePath: instancePath + "/scope/users/" + i8 + "/role", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/properties/role/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9237
+ const err98 = { instancePath: instancePath + "/scope/users/" + i8 + "/role", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/properties/role/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9030
9238
  if (vErrors === null) {
9031
- vErrors = [err96];
9239
+ vErrors = [err98];
9032
9240
  } else {
9033
- vErrors.push(err96);
9241
+ vErrors.push(err98);
9034
9242
  }
9035
9243
  errors++;
9036
9244
  }
9037
9245
  if (!(data49 === "owner" || data49 === "admin" || data49 === "member")) {
9038
- const err97 = { instancePath: instancePath + "/scope/users/" + i8 + "/role", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/properties/role/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.scope.properties.users.items.oneOf[1].properties.role.enum }, message: "must be equal to one of the allowed values" };
9246
+ const err99 = { instancePath: instancePath + "/scope/users/" + i8 + "/role", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/properties/role/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.scope.properties.users.items.oneOf[1].properties.role.enum }, message: "must be equal to one of the allowed values" };
9039
9247
  if (vErrors === null) {
9040
- vErrors = [err97];
9248
+ vErrors = [err99];
9041
9249
  } else {
9042
- vErrors.push(err97);
9250
+ vErrors.push(err99);
9043
9251
  }
9044
9252
  errors++;
9045
9253
  }
@@ -9051,11 +9259,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9051
9259
  }
9052
9260
  }
9053
9261
  } else {
9054
- const err98 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9262
+ const err100 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9055
9263
  if (vErrors === null) {
9056
- vErrors = [err98];
9264
+ vErrors = [err100];
9057
9265
  } else {
9058
- vErrors.push(err98);
9266
+ vErrors.push(err100);
9059
9267
  }
9060
9268
  errors++;
9061
9269
  }
@@ -9077,22 +9285,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9077
9285
  if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
9078
9286
  let missing12;
9079
9287
  if (data45.kind === void 0 && (missing12 = "kind") || data45.agent === void 0 && (missing12 = "agent")) {
9080
- const err99 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/required", keyword: "required", params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'" };
9288
+ const err101 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/required", keyword: "required", params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'" };
9081
9289
  if (vErrors === null) {
9082
- vErrors = [err99];
9290
+ vErrors = [err101];
9083
9291
  } else {
9084
- vErrors.push(err99);
9292
+ vErrors.push(err101);
9085
9293
  }
9086
9294
  errors++;
9087
9295
  } else {
9088
9296
  const _errs134 = errors;
9089
9297
  for (const key6 in data45) {
9090
9298
  if (!(key6 === "kind" || key6 === "agent")) {
9091
- const err100 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key6 }, message: "must NOT have additional properties" };
9299
+ const err102 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key6 }, message: "must NOT have additional properties" };
9092
9300
  if (vErrors === null) {
9093
- vErrors = [err100];
9301
+ vErrors = [err102];
9094
9302
  } else {
9095
- vErrors.push(err100);
9303
+ vErrors.push(err102);
9096
9304
  }
9097
9305
  errors++;
9098
9306
  break;
@@ -9103,20 +9311,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9103
9311
  let data50 = data45.kind;
9104
9312
  const _errs135 = errors;
9105
9313
  if (typeof data50 !== "string") {
9106
- const err101 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9314
+ const err103 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9107
9315
  if (vErrors === null) {
9108
- vErrors = [err101];
9316
+ vErrors = [err103];
9109
9317
  } else {
9110
- vErrors.push(err101);
9318
+ vErrors.push(err103);
9111
9319
  }
9112
9320
  errors++;
9113
9321
  }
9114
9322
  if ("agent" !== data50) {
9115
- const err102 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/properties/kind/const", keyword: "const", params: { allowedValue: "agent" }, message: "must be equal to constant" };
9323
+ const err104 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/properties/kind/const", keyword: "const", params: { allowedValue: "agent" }, message: "must be equal to constant" };
9116
9324
  if (vErrors === null) {
9117
- vErrors = [err102];
9325
+ vErrors = [err104];
9118
9326
  } else {
9119
- vErrors.push(err102);
9327
+ vErrors.push(err104);
9120
9328
  }
9121
9329
  errors++;
9122
9330
  }
@@ -9129,20 +9337,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9129
9337
  let data51 = data45.agent;
9130
9338
  const _errs137 = errors;
9131
9339
  if (typeof data51 !== "string") {
9132
- const err103 = { instancePath: instancePath + "/scope/users/" + i8 + "/agent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/properties/agent/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9340
+ const err105 = { instancePath: instancePath + "/scope/users/" + i8 + "/agent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/properties/agent/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9133
9341
  if (vErrors === null) {
9134
- vErrors = [err103];
9342
+ vErrors = [err105];
9135
9343
  } else {
9136
- vErrors.push(err103);
9344
+ vErrors.push(err105);
9137
9345
  }
9138
9346
  errors++;
9139
9347
  }
9140
9348
  if (!(data51 === "claude_code" || data51 === "codex" || data51 === "cursor" || data51 === "hermes")) {
9141
- const err104 = { instancePath: instancePath + "/scope/users/" + i8 + "/agent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/properties/agent/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.scope.properties.users.items.oneOf[2].properties.agent.enum }, message: "must be equal to one of the allowed values" };
9349
+ const err106 = { instancePath: instancePath + "/scope/users/" + i8 + "/agent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/properties/agent/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.scope.properties.users.items.oneOf[2].properties.agent.enum }, message: "must be equal to one of the allowed values" };
9142
9350
  if (vErrors === null) {
9143
- vErrors = [err104];
9351
+ vErrors = [err106];
9144
9352
  } else {
9145
- vErrors.push(err104);
9353
+ vErrors.push(err106);
9146
9354
  }
9147
9355
  errors++;
9148
9356
  }
@@ -9154,11 +9362,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9154
9362
  }
9155
9363
  }
9156
9364
  } else {
9157
- const err105 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9365
+ const err107 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9158
9366
  if (vErrors === null) {
9159
- vErrors = [err105];
9367
+ vErrors = [err107];
9160
9368
  } else {
9161
- vErrors.push(err105);
9369
+ vErrors.push(err107);
9162
9370
  }
9163
9371
  errors++;
9164
9372
  }
@@ -9180,22 +9388,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9180
9388
  if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
9181
9389
  let missing13;
9182
9390
  if (data45.kind === void 0 && (missing13 = "kind") || data45.credential === void 0 && (missing13 = "credential")) {
9183
- const err106 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/required", keyword: "required", params: { missingProperty: missing13 }, message: "must have required property '" + missing13 + "'" };
9391
+ const err108 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/required", keyword: "required", params: { missingProperty: missing13 }, message: "must have required property '" + missing13 + "'" };
9184
9392
  if (vErrors === null) {
9185
- vErrors = [err106];
9393
+ vErrors = [err108];
9186
9394
  } else {
9187
- vErrors.push(err106);
9395
+ vErrors.push(err108);
9188
9396
  }
9189
9397
  errors++;
9190
9398
  } else {
9191
9399
  const _errs141 = errors;
9192
9400
  for (const key7 in data45) {
9193
9401
  if (!(key7 === "kind" || key7 === "credential")) {
9194
- const err107 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" };
9402
+ const err109 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" };
9195
9403
  if (vErrors === null) {
9196
- vErrors = [err107];
9404
+ vErrors = [err109];
9197
9405
  } else {
9198
- vErrors.push(err107);
9406
+ vErrors.push(err109);
9199
9407
  }
9200
9408
  errors++;
9201
9409
  break;
@@ -9206,20 +9414,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9206
9414
  let data52 = data45.kind;
9207
9415
  const _errs142 = errors;
9208
9416
  if (typeof data52 !== "string") {
9209
- const err108 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9417
+ const err110 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9210
9418
  if (vErrors === null) {
9211
- vErrors = [err108];
9419
+ vErrors = [err110];
9212
9420
  } else {
9213
- vErrors.push(err108);
9421
+ vErrors.push(err110);
9214
9422
  }
9215
9423
  errors++;
9216
9424
  }
9217
9425
  if ("credential" !== data52) {
9218
- const err109 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/properties/kind/const", keyword: "const", params: { allowedValue: "credential" }, message: "must be equal to constant" };
9426
+ const err111 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/properties/kind/const", keyword: "const", params: { allowedValue: "credential" }, message: "must be equal to constant" };
9219
9427
  if (vErrors === null) {
9220
- vErrors = [err109];
9428
+ vErrors = [err111];
9221
9429
  } else {
9222
- vErrors.push(err109);
9430
+ vErrors.push(err111);
9223
9431
  }
9224
9432
  errors++;
9225
9433
  }
@@ -9232,20 +9440,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9232
9440
  let data53 = data45.credential;
9233
9441
  const _errs144 = errors;
9234
9442
  if (typeof data53 !== "string") {
9235
- const err110 = { instancePath: instancePath + "/scope/users/" + i8 + "/credential", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/properties/credential/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9443
+ const err112 = { instancePath: instancePath + "/scope/users/" + i8 + "/credential", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/properties/credential/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9236
9444
  if (vErrors === null) {
9237
- vErrors = [err110];
9445
+ vErrors = [err112];
9238
9446
  } else {
9239
- vErrors.push(err110);
9447
+ vErrors.push(err112);
9240
9448
  }
9241
9449
  errors++;
9242
9450
  }
9243
9451
  if (!(data53 === "workos_jwt" || data53 === "workos_api_key" || data53 === "service_token")) {
9244
- const err111 = { instancePath: instancePath + "/scope/users/" + i8 + "/credential", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/properties/credential/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.scope.properties.users.items.oneOf[3].properties.credential.enum }, message: "must be equal to one of the allowed values" };
9452
+ const err113 = { instancePath: instancePath + "/scope/users/" + i8 + "/credential", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/properties/credential/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.scope.properties.users.items.oneOf[3].properties.credential.enum }, message: "must be equal to one of the allowed values" };
9245
9453
  if (vErrors === null) {
9246
- vErrors = [err111];
9454
+ vErrors = [err113];
9247
9455
  } else {
9248
- vErrors.push(err111);
9456
+ vErrors.push(err113);
9249
9457
  }
9250
9458
  errors++;
9251
9459
  }
@@ -9257,11 +9465,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9257
9465
  }
9258
9466
  }
9259
9467
  } else {
9260
- const err112 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9468
+ const err114 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9261
9469
  if (vErrors === null) {
9262
- vErrors = [err112];
9470
+ vErrors = [err114];
9263
9471
  } else {
9264
- vErrors.push(err112);
9472
+ vErrors.push(err114);
9265
9473
  }
9266
9474
  errors++;
9267
9475
  }
@@ -9282,11 +9490,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9282
9490
  }
9283
9491
  }
9284
9492
  if (!valid24) {
9285
- const err113 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf", keyword: "oneOf", params: { passingSchemas: passing1 }, message: "must match exactly one schema in oneOf" };
9493
+ const err115 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf", keyword: "oneOf", params: { passingSchemas: passing1 }, message: "must match exactly one schema in oneOf" };
9286
9494
  if (vErrors === null) {
9287
- vErrors = [err113];
9495
+ vErrors = [err115];
9288
9496
  } else {
9289
- vErrors.push(err113);
9497
+ vErrors.push(err115);
9290
9498
  }
9291
9499
  errors++;
9292
9500
  } else {
@@ -9305,11 +9513,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9305
9513
  }
9306
9514
  }
9307
9515
  } else {
9308
- const err114 = { instancePath: instancePath + "/scope/users", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/type", keyword: "type", params: { type: "array" }, message: "must be array" };
9516
+ const err116 = { instancePath: instancePath + "/scope/users", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/type", keyword: "type", params: { type: "array" }, message: "must be array" };
9309
9517
  if (vErrors === null) {
9310
- vErrors = [err114];
9518
+ vErrors = [err116];
9311
9519
  } else {
9312
- vErrors.push(err114);
9520
+ vErrors.push(err116);
9313
9521
  }
9314
9522
  errors++;
9315
9523
  }
@@ -9322,11 +9530,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9322
9530
  }
9323
9531
  }
9324
9532
  } else {
9325
- const err115 = { instancePath: instancePath + "/scope", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9533
+ const err117 = { instancePath: instancePath + "/scope", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9326
9534
  if (vErrors === null) {
9327
- vErrors = [err115];
9535
+ vErrors = [err117];
9328
9536
  } else {
9329
- vErrors.push(err115);
9537
+ vErrors.push(err117);
9330
9538
  }
9331
9539
  errors++;
9332
9540
  }
@@ -9346,11 +9554,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9346
9554
  for (let i9 = 0; i9 < len9; i9++) {
9347
9555
  const _errs148 = errors;
9348
9556
  if (typeof data54[i9] !== "string") {
9349
- const err116 = { instancePath: instancePath + "/scopeWarnings/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scopeWarnings/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9557
+ const err118 = { instancePath: instancePath + "/scopeWarnings/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scopeWarnings/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9350
9558
  if (vErrors === null) {
9351
- vErrors = [err116];
9559
+ vErrors = [err118];
9352
9560
  } else {
9353
- vErrors.push(err116);
9561
+ vErrors.push(err118);
9354
9562
  }
9355
9563
  errors++;
9356
9564
  }
@@ -9360,11 +9568,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9360
9568
  }
9361
9569
  }
9362
9570
  } else {
9363
- const err117 = { instancePath: instancePath + "/scopeWarnings", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scopeWarnings/type", keyword: "type", params: { type: "array" }, message: "must be array" };
9571
+ const err119 = { instancePath: instancePath + "/scopeWarnings", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scopeWarnings/type", keyword: "type", params: { type: "array" }, message: "must be array" };
9364
9572
  if (vErrors === null) {
9365
- vErrors = [err117];
9573
+ vErrors = [err119];
9366
9574
  } else {
9367
- vErrors.push(err117);
9575
+ vErrors.push(err119);
9368
9576
  }
9369
9577
  errors++;
9370
9578
  }
@@ -9380,11 +9588,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9380
9588
  }
9381
9589
  }
9382
9590
  } else {
9383
- const err118 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9591
+ const err120 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9384
9592
  if (vErrors === null) {
9385
- vErrors = [err118];
9593
+ vErrors = [err120];
9386
9594
  } else {
9387
- vErrors.push(err118);
9595
+ vErrors.push(err120);
9388
9596
  }
9389
9597
  errors++;
9390
9598
  }
@@ -9397,11 +9605,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9397
9605
  }
9398
9606
  }
9399
9607
  if (!valid1) {
9400
- const err119 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
9608
+ const err121 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
9401
9609
  if (vErrors === null) {
9402
- vErrors = [err119];
9610
+ vErrors = [err121];
9403
9611
  } else {
9404
- vErrors.push(err119);
9612
+ vErrors.push(err121);
9405
9613
  }
9406
9614
  errors++;
9407
9615
  validate35.errors = vErrors;
@@ -9421,7 +9629,7 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9421
9629
  return errors === 0;
9422
9630
  }
9423
9631
  validate35.evaluated = { "dynamicProps": true, "dynamicItems": false };
9424
- var schema63 = { "anyOf": [{ "type": "object", "properties": { "outcome": { "type": "string", "const": "no_op" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] } }, "required": ["outcome", "stage"], "additionalProperties": {} }, { "type": "object", "properties": { "outcome": { "type": "string", "const": "ok" }, "decisionId": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] } }, "required": ["outcome", "decisionId", "stage"], "additionalProperties": {} }] };
9632
+ var schema63 = { "anyOf": [{ "type": "object", "properties": { "outcome": { "type": "string", "const": "no_op" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] } }, "required": ["outcome", "stage"], "additionalProperties": {} }, { "type": "object", "properties": { "outcome": { "type": "string", "const": "ok" }, "decisionId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] } }, "required": ["outcome", "decisionId", "stage"], "additionalProperties": {} }] };
9425
9633
  function validate36(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
9426
9634
  ;
9427
9635
  let vErrors = null;
@@ -9568,13 +9776,23 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
9568
9776
  vErrors.push(err9);
9569
9777
  }
9570
9778
  errors++;
9779
+ } else {
9780
+ if (!pattern4.test(data3)) {
9781
+ const err10 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
9782
+ if (vErrors === null) {
9783
+ vErrors = [err10];
9784
+ } else {
9785
+ vErrors.push(err10);
9786
+ }
9787
+ errors++;
9788
+ }
9571
9789
  }
9572
9790
  } else {
9573
- const err10 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9791
+ const err11 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9574
9792
  if (vErrors === null) {
9575
- vErrors = [err10];
9793
+ vErrors = [err11];
9576
9794
  } else {
9577
- vErrors.push(err10);
9795
+ vErrors.push(err11);
9578
9796
  }
9579
9797
  errors++;
9580
9798
  }
@@ -9585,15 +9803,28 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
9585
9803
  }
9586
9804
  if (valid3) {
9587
9805
  if (data.shortId !== void 0) {
9806
+ let data4 = data.shortId;
9588
9807
  const _errs16 = errors;
9589
- if (typeof data.shortId !== "string") {
9590
- const err11 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9591
- if (vErrors === null) {
9592
- vErrors = [err11];
9808
+ if (errors === _errs16) {
9809
+ if (typeof data4 === "string") {
9810
+ if (!pattern5.test(data4)) {
9811
+ const err12 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
9812
+ if (vErrors === null) {
9813
+ vErrors = [err12];
9814
+ } else {
9815
+ vErrors.push(err12);
9816
+ }
9817
+ errors++;
9818
+ }
9593
9819
  } else {
9594
- vErrors.push(err11);
9820
+ const err13 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9821
+ if (vErrors === null) {
9822
+ vErrors = [err13];
9823
+ } else {
9824
+ vErrors.push(err13);
9825
+ }
9826
+ errors++;
9595
9827
  }
9596
- errors++;
9597
9828
  }
9598
9829
  var valid3 = _errs16 === errors;
9599
9830
  } else {
@@ -9604,20 +9835,20 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
9604
9835
  let data5 = data.stage;
9605
9836
  const _errs18 = errors;
9606
9837
  if (typeof data5 !== "string") {
9607
- const err12 = { instancePath: instancePath + "/stage", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/stage/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9838
+ const err14 = { instancePath: instancePath + "/stage", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/stage/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9608
9839
  if (vErrors === null) {
9609
- vErrors = [err12];
9840
+ vErrors = [err14];
9610
9841
  } else {
9611
- vErrors.push(err12);
9842
+ vErrors.push(err14);
9612
9843
  }
9613
9844
  errors++;
9614
9845
  }
9615
9846
  if (!(data5 === "draft" || data5 === "provisional" || data5 === "adopted" || data5 === "superseded" || data5 === "abandoned")) {
9616
- const err13 = { instancePath: instancePath + "/stage", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/stage/enum", keyword: "enum", params: { allowedValues: schema63.anyOf[1].properties.stage.enum }, message: "must be equal to one of the allowed values" };
9847
+ const err15 = { instancePath: instancePath + "/stage", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/stage/enum", keyword: "enum", params: { allowedValues: schema63.anyOf[1].properties.stage.enum }, message: "must be equal to one of the allowed values" };
9617
9848
  if (vErrors === null) {
9618
- vErrors = [err13];
9849
+ vErrors = [err15];
9619
9850
  } else {
9620
- vErrors.push(err13);
9851
+ vErrors.push(err15);
9621
9852
  }
9622
9853
  errors++;
9623
9854
  }
@@ -9630,11 +9861,11 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
9630
9861
  }
9631
9862
  }
9632
9863
  } else {
9633
- const err14 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9864
+ const err16 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9634
9865
  if (vErrors === null) {
9635
- vErrors = [err14];
9866
+ vErrors = [err16];
9636
9867
  } else {
9637
- vErrors.push(err14);
9868
+ vErrors.push(err16);
9638
9869
  }
9639
9870
  errors++;
9640
9871
  }
@@ -9647,11 +9878,11 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
9647
9878
  }
9648
9879
  }
9649
9880
  if (!valid1) {
9650
- const err15 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
9881
+ const err17 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
9651
9882
  if (vErrors === null) {
9652
- vErrors = [err15];
9883
+ vErrors = [err17];
9653
9884
  } else {
9654
- vErrors.push(err15);
9885
+ vErrors.push(err17);
9655
9886
  }
9656
9887
  errors++;
9657
9888
  validate36.errors = vErrors;
@@ -9722,7 +9953,7 @@ function validate37(data, { instancePath = "", parentData, parentDataProperty, r
9722
9953
  return errors === 0;
9723
9954
  }
9724
9955
  validate37.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
9725
- var schema67 = { "type": "object", "properties": { "decisions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "intent": { "type": "string" }, "rationale": { "type": "string" }, "status": { "type": "string", "enum": ["active", "under_review"] }, "classifiedAt": { "type": "number" }, "matchedFiles": { "type": "array", "items": { "type": "string" } } }, "required": ["id", "intent", "status", "classifiedAt", "matchedFiles"], "additionalProperties": {} } }, "truncated": { "type": "boolean" }, "repoSyncId": { "type": "string" }, "unavailable": { "type": "string" } }, "required": ["decisions", "truncated"], "additionalProperties": {} };
9956
+ var schema67 = { "type": "object", "properties": { "decisions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "intent": { "type": "string" }, "rationale": { "type": "string" }, "status": { "type": "string", "enum": ["active", "under_review"] }, "classifiedAt": { "type": "number" }, "matchedFiles": { "type": "array", "items": { "type": "string" } } }, "required": ["id", "intent", "status", "classifiedAt", "matchedFiles"], "additionalProperties": {} } }, "truncated": { "type": "boolean" }, "repoSyncId": { "type": "string" }, "unavailable": { "type": "string" } }, "required": ["decisions", "truncated"], "additionalProperties": {} };
9726
9957
  function validate38(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
9727
9958
  ;
9728
9959
  let vErrors = null;
@@ -9767,6 +9998,11 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
9767
9998
  if (func1(data2) < 1) {
9768
9999
  validate38.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsAffectingResponse/properties/decisions/items/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
9769
10000
  return false;
10001
+ } else {
10002
+ if (!pattern4.test(data2)) {
10003
+ validate38.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsAffectingResponse/properties/decisions/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
10004
+ return false;
10005
+ }
9770
10006
  }
9771
10007
  } else {
9772
10008
  validate38.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsAffectingResponse/properties/decisions/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
@@ -9926,7 +10162,7 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
9926
10162
  return errors === 0;
9927
10163
  }
9928
10164
  validate38.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
9929
- var schema69 = { "type": "object", "properties": { "decisions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "intent": { "type": "string" }, "rationale": { "type": "string" }, "area": { "type": "string" }, "producerKind": { "type": "string" }, "isDecision": { "type": "boolean" }, "userId": { "type": "string" }, "authorName": { "type": "string" }, "authorIsSelf": { "type": "boolean" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] } }, "required": ["id", "intent", "userId", "authorName", "authorIsSelf", "classifiedAt", "status", "stage"], "additionalProperties": {} } }, "viewerHasDecisions": { "type": "boolean" }, "author": { "type": "object", "properties": { "userId": { "type": "string" }, "name": { "type": "string" } }, "required": ["userId", "name"], "additionalProperties": {} }, "authorHasDecisions": { "type": "boolean" }, "windowTotal": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "windowTotalCapped": { "type": "boolean" }, "continueCursor": { "type": "string", "minLength": 1, "maxLength": 4096 }, "isDone": { "type": "boolean" }, "unavailable": { "type": "string" } }, "required": ["decisions"], "additionalProperties": {}, "x-primitive-runtime-refinements": ["recent_response_variant"] };
10165
+ var schema69 = { "type": "object", "properties": { "decisions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "intent": { "type": "string" }, "rationale": { "type": "string" }, "area": { "type": "string" }, "producerKind": { "type": "string" }, "isDecision": { "type": "boolean" }, "userId": { "type": "string" }, "authorName": { "type": "string" }, "authorIsSelf": { "type": "boolean" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] } }, "required": ["id", "intent", "userId", "authorName", "authorIsSelf", "classifiedAt", "status", "stage"], "additionalProperties": {} } }, "viewerHasDecisions": { "type": "boolean" }, "author": { "type": "object", "properties": { "userId": { "type": "string" }, "name": { "type": "string" } }, "required": ["userId", "name"], "additionalProperties": {} }, "authorHasDecisions": { "type": "boolean" }, "windowTotal": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "windowTotalCapped": { "type": "boolean" }, "continueCursor": { "type": "string", "minLength": 1, "maxLength": 4096 }, "isDone": { "type": "boolean" }, "unavailable": { "type": "string" } }, "required": ["decisions"], "additionalProperties": {}, "x-primitive-runtime-refinements": ["recent_response_variant"] };
9930
10166
  function validate39(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
9931
10167
  ;
9932
10168
  let vErrors = null;
@@ -9971,6 +10207,11 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
9971
10207
  if (func1(data2) < 1) {
9972
10208
  validate39.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsRecentResponse/properties/decisions/items/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
9973
10209
  return false;
10210
+ } else {
10211
+ if (!pattern4.test(data2)) {
10212
+ validate39.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsRecentResponse/properties/decisions/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
10213
+ return false;
10214
+ }
9974
10215
  }
9975
10216
  } else {
9976
10217
  validate39.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsRecentResponse/properties/decisions/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
@@ -9983,10 +10224,18 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
9983
10224
  }
9984
10225
  if (valid3) {
9985
10226
  if (data1.shortId !== void 0) {
10227
+ let data3 = data1.shortId;
9986
10228
  const _errs11 = errors;
9987
- if (typeof data1.shortId !== "string") {
9988
- validate39.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsRecentResponse/properties/decisions/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
9989
- return false;
10229
+ if (errors === _errs11) {
10230
+ if (typeof data3 === "string") {
10231
+ if (!pattern5.test(data3)) {
10232
+ validate39.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsRecentResponse/properties/decisions/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
10233
+ return false;
10234
+ }
10235
+ } else {
10236
+ validate39.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsRecentResponse/properties/decisions/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
10237
+ return false;
10238
+ }
9990
10239
  }
9991
10240
  var valid3 = _errs11 === errors;
9992
10241
  } else {
@@ -10321,8 +10570,8 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
10321
10570
  return errors === 0;
10322
10571
  }
10323
10572
  validate39.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
10324
- var pattern4 = new RegExp("^[a-zA-Z0-9]{1,64}$", "u");
10325
- var pattern5 = new RegExp("^[a-f0-9]{64}$", "u");
10573
+ var pattern34 = new RegExp("^[a-zA-Z0-9]{1,64}$", "u");
10574
+ var pattern35 = new RegExp("^[a-f0-9]{64}$", "u");
10326
10575
  function validate40(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
10327
10576
  ;
10328
10577
  let vErrors = null;
@@ -10356,7 +10605,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
10356
10605
  const _errs3 = errors;
10357
10606
  if (errors === _errs3) {
10358
10607
  if (typeof data0 === "string") {
10359
- if (!pattern4.test(data0)) {
10608
+ if (!pattern34.test(data0)) {
10360
10609
  validate40.errors = [{ instancePath: instancePath + "/runId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoCompleteRequest/properties/runId/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9]{1,64}$" }, message: 'must match pattern "^[a-zA-Z0-9]{1,64}$"' }];
10361
10610
  return false;
10362
10611
  }
@@ -10400,7 +10649,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
10400
10649
  const _errs7 = errors;
10401
10650
  if (errors === _errs7) {
10402
10651
  if (typeof data2 === "string") {
10403
- if (!pattern5.test(data2)) {
10652
+ if (!pattern35.test(data2)) {
10404
10653
  validate40.errors = [{ instancePath: instancePath + "/appliedDigest", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoCompleteRequest/properties/appliedDigest/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "^[a-f0-9]{64}$"' }];
10405
10654
  return false;
10406
10655
  }
@@ -10426,7 +10675,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
10426
10675
  return errors === 0;
10427
10676
  }
10428
10677
  validate40.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
10429
- var pattern8 = new RegExp("\\S", "u");
10678
+ var pattern38 = new RegExp("\\S", "u");
10430
10679
  function validate41(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
10431
10680
  ;
10432
10681
  let vErrors = null;
@@ -10473,7 +10722,7 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
10473
10722
  const _errs5 = errors;
10474
10723
  if (errors === _errs5) {
10475
10724
  if (typeof data0 === "string") {
10476
- if (!pattern4.test(data0)) {
10725
+ if (!pattern34.test(data0)) {
10477
10726
  const err2 = { instancePath: instancePath + "/runId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoResolveRequest/oneOf/0/properties/runId/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9]{1,64}$" }, message: 'must match pattern "^[a-zA-Z0-9]{1,64}$"' };
10478
10727
  if (vErrors === null) {
10479
10728
  vErrors = [err2];
@@ -10614,7 +10863,7 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
10614
10863
  const _errs14 = errors;
10615
10864
  if (errors === _errs14) {
10616
10865
  if (typeof data3 === "string") {
10617
- if (!pattern4.test(data3)) {
10866
+ if (!pattern34.test(data3)) {
10618
10867
  const err12 = { instancePath: instancePath + "/runId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoResolveRequest/oneOf/1/properties/runId/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9]{1,64}$" }, message: 'must match pattern "^[a-zA-Z0-9]{1,64}$"' };
10619
10868
  if (vErrors === null) {
10620
10869
  vErrors = [err12];
@@ -10727,7 +10976,7 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
10727
10976
  }
10728
10977
  errors++;
10729
10978
  } else {
10730
- if (!pattern8.test(data6)) {
10979
+ if (!pattern38.test(data6)) {
10731
10980
  const err21 = { instancePath: instancePath + "/reason", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoResolveRequest/oneOf/1/properties/reason/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: 'must match pattern "\\S"' };
10732
10981
  if (vErrors === null) {
10733
10982
  vErrors = [err21];
@@ -10838,7 +11087,7 @@ function validate42(data, { instancePath = "", parentData, parentDataProperty, r
10838
11087
  const _errs3 = errors;
10839
11088
  if (errors === _errs3) {
10840
11089
  if (typeof data0 === "string") {
10841
- if (!pattern4.test(data0)) {
11090
+ if (!pattern34.test(data0)) {
10842
11091
  validate42.errors = [{ instancePath: instancePath + "/runId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoRunRequest/properties/runId/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9]{1,64}$" }, message: 'must match pattern "^[a-zA-Z0-9]{1,64}$"' }];
10843
11092
  return false;
10844
11093
  }
@@ -10888,7 +11137,7 @@ function validate42(data, { instancePath = "", parentData, parentDataProperty, r
10888
11137
  return errors === 0;
10889
11138
  }
10890
11139
  validate42.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
10891
- var pattern10 = new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "u");
11140
+ var pattern40 = new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "u");
10892
11141
  function validate43(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
10893
11142
  ;
10894
11143
  let vErrors = null;
@@ -10939,7 +11188,7 @@ function validate43(data, { instancePath = "", parentData, parentDataProperty, r
10939
11188
  if (errors === _errs5) {
10940
11189
  if (errors === _errs5) {
10941
11190
  if (typeof data1 === "string") {
10942
- if (!pattern10.test(data1)) {
11191
+ if (!pattern40.test(data1)) {
10943
11192
  validate43.errors = [{ instancePath: instancePath + "/localRunId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStartRequest/properties/localRunId/pattern", keyword: "pattern", params: { pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, message: 'must match pattern "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"' }];
10944
11193
  return false;
10945
11194
  }
@@ -10968,7 +11217,7 @@ validate43.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": f
10968
11217
  var isDemoStatusResponse = validate44;
10969
11218
  var schema79 = { "type": "object", "properties": { "scenarioVersion": { "type": "number", "const": 1 }, "fictional": { "type": "boolean", "const": true }, "evaluation": { "type": "string", "const": "live" }, "runId": { "type": "string", "pattern": "^[a-zA-Z0-9]{1,64}$" }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "stage": { "type": "string", "enum": ["ready", "checking", "blocked", "approved", "completed", "skipped", "expired"] }, "authorName": { "type": "string", "maxLength": 200 }, "story": { "type": "object", "properties": { "orgName": { "type": "string", "maxLength": 200 }, "recipient": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "decisionDate": { "type": "string", "maxLength": 100 } }, "required": ["orgName", "recipient", "decisionDate"], "additionalProperties": false }, "email": { "type": "string", "enum": ["not_queued", "queued", "accepted", "failed", "suppressed"] }, "verdict": { "type": "string", "enum": ["block", "pass", "pending"] }, "reasonCode": { "type": "string", "maxLength": 100 }, "choice": { "type": "string", "enum": ["adhere", "supersede"] }, "reason": { "type": "string", "maxLength": 500 }, "approvedDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": ["scenarioVersion", "fictional", "evaluation", "runId", "revision", "stage", "authorName", "story", "email"], "additionalProperties": false };
10970
11219
  var func34 = Object.prototype.hasOwnProperty;
10971
- var pattern12 = new RegExp("^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "u");
11220
+ var pattern42 = new RegExp("^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "u");
10972
11221
  function validate44(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
10973
11222
  ;
10974
11223
  let vErrors = null;
@@ -11050,7 +11299,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
11050
11299
  const _errs9 = errors;
11051
11300
  if (errors === _errs9) {
11052
11301
  if (typeof data3 === "string") {
11053
- if (!pattern4.test(data3)) {
11302
+ if (!pattern34.test(data3)) {
11054
11303
  validate44.errors = [{ instancePath: instancePath + "/runId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/runId/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9]{1,64}$" }, message: 'must match pattern "^[a-zA-Z0-9]{1,64}$"' }];
11055
11304
  return false;
11056
11305
  }
@@ -11168,7 +11417,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
11168
11417
  if (errors === _errs22) {
11169
11418
  if (errors === _errs22) {
11170
11419
  if (typeof data9 === "string") {
11171
- if (!pattern12.test(data9)) {
11420
+ if (!pattern42.test(data9)) {
11172
11421
  validate44.errors = [{ instancePath: instancePath + "/story/recipient", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/story/properties/recipient/pattern", keyword: "pattern", params: { pattern: "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, message: `must match pattern "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"` }];
11173
11422
  return false;
11174
11423
  }
@@ -11306,7 +11555,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
11306
11555
  const _errs36 = errors;
11307
11556
  if (errors === _errs36) {
11308
11557
  if (typeof data16 === "string") {
11309
- if (!pattern5.test(data16)) {
11558
+ if (!pattern35.test(data16)) {
11310
11559
  validate44.errors = [{ instancePath: instancePath + "/approvedDigest", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/approvedDigest/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "^[a-f0-9]{64}$"' }];
11311
11560
  return false;
11312
11561
  }
@@ -11509,15 +11758,28 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
11509
11758
  }
11510
11759
  if (valid3) {
11511
11760
  if (data3.decisionId !== void 0) {
11761
+ let data8 = data3.decisionId;
11512
11762
  const _errs22 = errors;
11513
- if (typeof data3.decisionId !== "string") {
11514
- const err6 = { instancePath: instancePath + "/verdictFooter/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
11515
- if (vErrors === null) {
11516
- vErrors = [err6];
11763
+ if (errors === _errs22) {
11764
+ if (typeof data8 === "string") {
11765
+ if (!pattern4.test(data8)) {
11766
+ const err6 = { instancePath: instancePath + "/verdictFooter/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
11767
+ if (vErrors === null) {
11768
+ vErrors = [err6];
11769
+ } else {
11770
+ vErrors.push(err6);
11771
+ }
11772
+ errors++;
11773
+ }
11517
11774
  } else {
11518
- vErrors.push(err6);
11775
+ const err7 = { instancePath: instancePath + "/verdictFooter/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
11776
+ if (vErrors === null) {
11777
+ vErrors = [err7];
11778
+ } else {
11779
+ vErrors.push(err7);
11780
+ }
11781
+ errors++;
11519
11782
  }
11520
- errors++;
11521
11783
  }
11522
11784
  var valid3 = _errs22 === errors;
11523
11785
  } else {
@@ -11525,15 +11787,28 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
11525
11787
  }
11526
11788
  if (valid3) {
11527
11789
  if (data3.decisionShortId !== void 0) {
11790
+ let data9 = data3.decisionShortId;
11528
11791
  const _errs24 = errors;
11529
- if (typeof data3.decisionShortId !== "string") {
11530
- const err7 = { instancePath: instancePath + "/verdictFooter/decisionShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/properties/decisionShortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
11531
- if (vErrors === null) {
11532
- vErrors = [err7];
11792
+ if (errors === _errs24) {
11793
+ if (typeof data9 === "string") {
11794
+ if (!pattern5.test(data9)) {
11795
+ const err8 = { instancePath: instancePath + "/verdictFooter/decisionShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/properties/decisionShortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
11796
+ if (vErrors === null) {
11797
+ vErrors = [err8];
11798
+ } else {
11799
+ vErrors.push(err8);
11800
+ }
11801
+ errors++;
11802
+ }
11533
11803
  } else {
11534
- vErrors.push(err7);
11804
+ const err9 = { instancePath: instancePath + "/verdictFooter/decisionShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/properties/decisionShortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
11805
+ if (vErrors === null) {
11806
+ vErrors = [err9];
11807
+ } else {
11808
+ vErrors.push(err9);
11809
+ }
11810
+ errors++;
11535
11811
  }
11536
- errors++;
11537
11812
  }
11538
11813
  var valid3 = _errs24 === errors;
11539
11814
  } else {
@@ -11547,11 +11822,11 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
11547
11822
  }
11548
11823
  }
11549
11824
  } else {
11550
- const err8 = { instancePath: instancePath + "/verdictFooter", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
11825
+ const err10 = { instancePath: instancePath + "/verdictFooter", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
11551
11826
  if (vErrors === null) {
11552
- vErrors = [err8];
11827
+ vErrors = [err10];
11553
11828
  } else {
11554
- vErrors.push(err8);
11829
+ vErrors.push(err10);
11555
11830
  }
11556
11831
  errors++;
11557
11832
  }
@@ -11560,22 +11835,22 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
11560
11835
  valid2 = valid2 || _valid0;
11561
11836
  const _errs26 = errors;
11562
11837
  if (data3 !== null) {
11563
- const err9 = { instancePath: instancePath + "/verdictFooter", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/1/type", keyword: "type", params: { type: "null" }, message: "must be null" };
11838
+ const err11 = { instancePath: instancePath + "/verdictFooter", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/1/type", keyword: "type", params: { type: "null" }, message: "must be null" };
11564
11839
  if (vErrors === null) {
11565
- vErrors = [err9];
11840
+ vErrors = [err11];
11566
11841
  } else {
11567
- vErrors.push(err9);
11842
+ vErrors.push(err11);
11568
11843
  }
11569
11844
  errors++;
11570
11845
  }
11571
11846
  var _valid0 = _errs26 === errors;
11572
11847
  valid2 = valid2 || _valid0;
11573
11848
  if (!valid2) {
11574
- const err10 = { instancePath: instancePath + "/verdictFooter", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
11849
+ const err12 = { instancePath: instancePath + "/verdictFooter", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
11575
11850
  if (vErrors === null) {
11576
- vErrors = [err10];
11851
+ vErrors = [err12];
11577
11852
  } else {
11578
- vErrors.push(err10);
11853
+ vErrors.push(err12);
11579
11854
  }
11580
11855
  errors++;
11581
11856
  validate45.errors = vErrors;
@@ -12209,8 +12484,7 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
12209
12484
  return errors === 0;
12210
12485
  }
12211
12486
  validate48.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
12212
- var schema89 = { "anyOf": [{ "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "empty" }, "hasMore": { "type": "boolean", "const": false } }, "required": ["protocolVersion", "status", "hasMore"], "additionalProperties": {} }, { "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "leased" }, "events": { "minItems": 1, "maxItems": 40, "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "minLength": 1, "maxLength": 128 }, "leaseVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "decisionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "intent": { "type": "string" }, "webUrl": { "type": "string" }, "kind": { "type": "string", "enum": ["confirm_prompt", "publish_prompt"] } }, "required": ["eventId", "leaseVersion", "shortId", "intent", "webUrl"], "additionalProperties": {} } }, "hasMore": { "type": "boolean" } }, "required": ["protocolVersion", "status", "events", "hasMore"], "additionalProperties": {} }, { "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "unavailable" }, "reason": { "type": "string", "const": "organization_unbound" } }, "required": ["protocolVersion", "status", "reason"], "additionalProperties": {} }], "x-primitive-runtime-refinements": ["feedback_response_version_negotiation", "feedback_publish_prompt_decision_id", "unique_feedback_event_ids"] };
12213
- var pattern14 = new RegExp("^[0-9a-f]{8}$", "u");
12487
+ var schema89 = { "anyOf": [{ "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "empty" }, "hasMore": { "type": "boolean", "const": false } }, "required": ["protocolVersion", "status", "hasMore"], "additionalProperties": {} }, { "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "leased" }, "events": { "minItems": 1, "maxItems": 40, "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "minLength": 1, "maxLength": 128 }, "leaseVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "decisionId": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "intent": { "type": "string" }, "webUrl": { "type": "string" }, "kind": { "type": "string", "enum": ["confirm_prompt", "publish_prompt"] } }, "required": ["eventId", "leaseVersion", "shortId", "intent", "webUrl"], "additionalProperties": {} } }, "hasMore": { "type": "boolean" } }, "required": ["protocolVersion", "status", "events", "hasMore"], "additionalProperties": {} }, { "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "unavailable" }, "reason": { "type": "string", "const": "organization_unbound" } }, "required": ["protocolVersion", "status", "reason"], "additionalProperties": {} }], "x-primitive-runtime-refinements": ["feedback_response_version_negotiation", "feedback_publish_prompt_decision_id", "unique_feedback_event_ids"] };
12214
12488
  function validate49(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
12215
12489
  ;
12216
12490
  let vErrors = null;
@@ -12549,7 +12823,7 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12549
12823
  const _errs27 = errors;
12550
12824
  if (errors === _errs27) {
12551
12825
  if (typeof data9 === "string") {
12552
- if (!pattern14.test(data9)) {
12826
+ if (!pattern5.test(data9)) {
12553
12827
  const err24 = { instancePath: instancePath + "/events/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
12554
12828
  if (vErrors === null) {
12555
12829
  vErrors = [err24];
@@ -12595,14 +12869,24 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12595
12869
  vErrors.push(err27);
12596
12870
  }
12597
12871
  errors++;
12872
+ } else {
12873
+ if (!pattern4.test(data10)) {
12874
+ const err28 = { instancePath: instancePath + "/events/" + i0 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
12875
+ if (vErrors === null) {
12876
+ vErrors = [err28];
12877
+ } else {
12878
+ vErrors.push(err28);
12879
+ }
12880
+ errors++;
12881
+ }
12598
12882
  }
12599
12883
  }
12600
12884
  } else {
12601
- const err28 = { instancePath: instancePath + "/events/" + i0 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12885
+ const err29 = { instancePath: instancePath + "/events/" + i0 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12602
12886
  if (vErrors === null) {
12603
- vErrors = [err28];
12887
+ vErrors = [err29];
12604
12888
  } else {
12605
- vErrors.push(err28);
12889
+ vErrors.push(err29);
12606
12890
  }
12607
12891
  errors++;
12608
12892
  }
@@ -12615,11 +12899,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12615
12899
  if (data6.intent !== void 0) {
12616
12900
  const _errs31 = errors;
12617
12901
  if (typeof data6.intent !== "string") {
12618
- const err29 = { instancePath: instancePath + "/events/" + i0 + "/intent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/intent/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12902
+ const err30 = { instancePath: instancePath + "/events/" + i0 + "/intent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/intent/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12619
12903
  if (vErrors === null) {
12620
- vErrors = [err29];
12904
+ vErrors = [err30];
12621
12905
  } else {
12622
- vErrors.push(err29);
12906
+ vErrors.push(err30);
12623
12907
  }
12624
12908
  errors++;
12625
12909
  }
@@ -12631,11 +12915,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12631
12915
  if (data6.webUrl !== void 0) {
12632
12916
  const _errs33 = errors;
12633
12917
  if (typeof data6.webUrl !== "string") {
12634
- const err30 = { instancePath: instancePath + "/events/" + i0 + "/webUrl", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/webUrl/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12918
+ const err31 = { instancePath: instancePath + "/events/" + i0 + "/webUrl", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/webUrl/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12635
12919
  if (vErrors === null) {
12636
- vErrors = [err30];
12920
+ vErrors = [err31];
12637
12921
  } else {
12638
- vErrors.push(err30);
12922
+ vErrors.push(err31);
12639
12923
  }
12640
12924
  errors++;
12641
12925
  }
@@ -12648,20 +12932,20 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12648
12932
  let data13 = data6.kind;
12649
12933
  const _errs35 = errors;
12650
12934
  if (typeof data13 !== "string") {
12651
- const err31 = { instancePath: instancePath + "/events/" + i0 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12935
+ const err32 = { instancePath: instancePath + "/events/" + i0 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12652
12936
  if (vErrors === null) {
12653
- vErrors = [err31];
12937
+ vErrors = [err32];
12654
12938
  } else {
12655
- vErrors.push(err31);
12939
+ vErrors.push(err32);
12656
12940
  }
12657
12941
  errors++;
12658
12942
  }
12659
12943
  if (!(data13 === "confirm_prompt" || data13 === "publish_prompt")) {
12660
- const err32 = { instancePath: instancePath + "/events/" + i0 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/kind/enum", keyword: "enum", params: { allowedValues: schema89.anyOf[1].properties.events.items.properties.kind.enum }, message: "must be equal to one of the allowed values" };
12944
+ const err33 = { instancePath: instancePath + "/events/" + i0 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/kind/enum", keyword: "enum", params: { allowedValues: schema89.anyOf[1].properties.events.items.properties.kind.enum }, message: "must be equal to one of the allowed values" };
12661
12945
  if (vErrors === null) {
12662
- vErrors = [err32];
12946
+ vErrors = [err33];
12663
12947
  } else {
12664
- vErrors.push(err32);
12948
+ vErrors.push(err33);
12665
12949
  }
12666
12950
  errors++;
12667
12951
  }
@@ -12677,11 +12961,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12677
12961
  }
12678
12962
  }
12679
12963
  } else {
12680
- const err33 = { instancePath: instancePath + "/events/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
12964
+ const err34 = { instancePath: instancePath + "/events/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
12681
12965
  if (vErrors === null) {
12682
- vErrors = [err33];
12966
+ vErrors = [err34];
12683
12967
  } else {
12684
- vErrors.push(err33);
12968
+ vErrors.push(err34);
12685
12969
  }
12686
12970
  errors++;
12687
12971
  }
@@ -12694,11 +12978,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12694
12978
  }
12695
12979
  }
12696
12980
  } else {
12697
- const err34 = { instancePath: instancePath + "/events", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/type", keyword: "type", params: { type: "array" }, message: "must be array" };
12981
+ const err35 = { instancePath: instancePath + "/events", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/type", keyword: "type", params: { type: "array" }, message: "must be array" };
12698
12982
  if (vErrors === null) {
12699
- vErrors = [err34];
12983
+ vErrors = [err35];
12700
12984
  } else {
12701
- vErrors.push(err34);
12985
+ vErrors.push(err35);
12702
12986
  }
12703
12987
  errors++;
12704
12988
  }
@@ -12711,11 +12995,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12711
12995
  if (data.hasMore !== void 0) {
12712
12996
  const _errs37 = errors;
12713
12997
  if (typeof data.hasMore !== "boolean") {
12714
- const err35 = { instancePath: instancePath + "/hasMore", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/hasMore/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
12998
+ const err36 = { instancePath: instancePath + "/hasMore", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/hasMore/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
12715
12999
  if (vErrors === null) {
12716
- vErrors = [err35];
13000
+ vErrors = [err36];
12717
13001
  } else {
12718
- vErrors.push(err35);
13002
+ vErrors.push(err36);
12719
13003
  }
12720
13004
  errors++;
12721
13005
  }
@@ -12728,11 +13012,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12728
13012
  }
12729
13013
  }
12730
13014
  } else {
12731
- const err36 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
13015
+ const err37 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
12732
13016
  if (vErrors === null) {
12733
- vErrors = [err36];
13017
+ vErrors = [err37];
12734
13018
  } else {
12735
- vErrors.push(err36);
13019
+ vErrors.push(err37);
12736
13020
  }
12737
13021
  errors++;
12738
13022
  }
@@ -12749,11 +13033,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12749
13033
  if (data && typeof data == "object" && !Array.isArray(data)) {
12750
13034
  let missing3;
12751
13035
  if (data.protocolVersion === void 0 && (missing3 = "protocolVersion") || data.status === void 0 && (missing3 = "status") || data.reason === void 0 && (missing3 = "reason")) {
12752
- const err37 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
13036
+ const err38 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
12753
13037
  if (vErrors === null) {
12754
- vErrors = [err37];
13038
+ vErrors = [err38];
12755
13039
  } else {
12756
- vErrors.push(err37);
13040
+ vErrors.push(err38);
12757
13041
  }
12758
13042
  errors++;
12759
13043
  } else {
@@ -12761,31 +13045,31 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12761
13045
  let data15 = data.protocolVersion;
12762
13046
  const _errs42 = errors;
12763
13047
  if (!(typeof data15 == "number" && (!(data15 % 1) && !isNaN(data15)) && isFinite(data15))) {
12764
- const err38 = { instancePath: instancePath + "/protocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/protocolVersion/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
13048
+ const err39 = { instancePath: instancePath + "/protocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/protocolVersion/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
12765
13049
  if (vErrors === null) {
12766
- vErrors = [err38];
13050
+ vErrors = [err39];
12767
13051
  } else {
12768
- vErrors.push(err38);
13052
+ vErrors.push(err39);
12769
13053
  }
12770
13054
  errors++;
12771
13055
  }
12772
13056
  if (errors === _errs42) {
12773
13057
  if (typeof data15 == "number" && isFinite(data15)) {
12774
13058
  if (data15 > 2 || isNaN(data15)) {
12775
- const err39 = { instancePath: instancePath + "/protocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/protocolVersion/maximum", keyword: "maximum", params: { comparison: "<=", limit: 2 }, message: "must be <= 2" };
13059
+ const err40 = { instancePath: instancePath + "/protocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/protocolVersion/maximum", keyword: "maximum", params: { comparison: "<=", limit: 2 }, message: "must be <= 2" };
12776
13060
  if (vErrors === null) {
12777
- vErrors = [err39];
13061
+ vErrors = [err40];
12778
13062
  } else {
12779
- vErrors.push(err39);
13063
+ vErrors.push(err40);
12780
13064
  }
12781
13065
  errors++;
12782
13066
  } else {
12783
13067
  if (data15 < 1 || isNaN(data15)) {
12784
- const err40 = { instancePath: instancePath + "/protocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/protocolVersion/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
13068
+ const err41 = { instancePath: instancePath + "/protocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/protocolVersion/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
12785
13069
  if (vErrors === null) {
12786
- vErrors = [err40];
13070
+ vErrors = [err41];
12787
13071
  } else {
12788
- vErrors.push(err40);
13072
+ vErrors.push(err41);
12789
13073
  }
12790
13074
  errors++;
12791
13075
  }
@@ -12801,20 +13085,20 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12801
13085
  let data16 = data.status;
12802
13086
  const _errs44 = errors;
12803
13087
  if (typeof data16 !== "string") {
12804
- const err41 = { instancePath: instancePath + "/status", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/status/type", keyword: "type", params: { type: "string" }, message: "must be string" };
13088
+ const err42 = { instancePath: instancePath + "/status", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/status/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12805
13089
  if (vErrors === null) {
12806
- vErrors = [err41];
13090
+ vErrors = [err42];
12807
13091
  } else {
12808
- vErrors.push(err41);
13092
+ vErrors.push(err42);
12809
13093
  }
12810
13094
  errors++;
12811
13095
  }
12812
13096
  if ("unavailable" !== data16) {
12813
- const err42 = { instancePath: instancePath + "/status", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/status/const", keyword: "const", params: { allowedValue: "unavailable" }, message: "must be equal to constant" };
13097
+ const err43 = { instancePath: instancePath + "/status", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/status/const", keyword: "const", params: { allowedValue: "unavailable" }, message: "must be equal to constant" };
12814
13098
  if (vErrors === null) {
12815
- vErrors = [err42];
13099
+ vErrors = [err43];
12816
13100
  } else {
12817
- vErrors.push(err42);
13101
+ vErrors.push(err43);
12818
13102
  }
12819
13103
  errors++;
12820
13104
  }
@@ -12827,20 +13111,20 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12827
13111
  let data17 = data.reason;
12828
13112
  const _errs46 = errors;
12829
13113
  if (typeof data17 !== "string") {
12830
- const err43 = { instancePath: instancePath + "/reason", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/reason/type", keyword: "type", params: { type: "string" }, message: "must be string" };
13114
+ const err44 = { instancePath: instancePath + "/reason", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/reason/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12831
13115
  if (vErrors === null) {
12832
- vErrors = [err43];
13116
+ vErrors = [err44];
12833
13117
  } else {
12834
- vErrors.push(err43);
13118
+ vErrors.push(err44);
12835
13119
  }
12836
13120
  errors++;
12837
13121
  }
12838
13122
  if ("organization_unbound" !== data17) {
12839
- const err44 = { instancePath: instancePath + "/reason", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/reason/const", keyword: "const", params: { allowedValue: "organization_unbound" }, message: "must be equal to constant" };
13123
+ const err45 = { instancePath: instancePath + "/reason", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/reason/const", keyword: "const", params: { allowedValue: "organization_unbound" }, message: "must be equal to constant" };
12840
13124
  if (vErrors === null) {
12841
- vErrors = [err44];
13125
+ vErrors = [err45];
12842
13126
  } else {
12843
- vErrors.push(err44);
13127
+ vErrors.push(err45);
12844
13128
  }
12845
13129
  errors++;
12846
13130
  }
@@ -12852,11 +13136,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12852
13136
  }
12853
13137
  }
12854
13138
  } else {
12855
- const err45 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
13139
+ const err46 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
12856
13140
  if (vErrors === null) {
12857
- vErrors = [err45];
13141
+ vErrors = [err46];
12858
13142
  } else {
12859
- vErrors.push(err45);
13143
+ vErrors.push(err46);
12860
13144
  }
12861
13145
  errors++;
12862
13146
  }
@@ -12869,11 +13153,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
12869
13153
  }
12870
13154
  }
12871
13155
  if (!valid1) {
12872
- const err46 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
13156
+ const err47 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
12873
13157
  if (vErrors === null) {
12874
- vErrors = [err46];
13158
+ vErrors = [err47];
12875
13159
  } else {
12876
- vErrors.push(err46);
13160
+ vErrors.push(err47);
12877
13161
  }
12878
13162
  errors++;
12879
13163
  validate49.errors = vErrors;
@@ -13605,8 +13889,8 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
13605
13889
  return errors === 0;
13606
13890
  }
13607
13891
  validate51.evaluated = { "dynamicProps": true, "dynamicItems": false };
13608
- var pattern15 = new RegExp("^[A-Za-z0-9]{1,128}$", "u");
13609
- var pattern16 = new RegExp("^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$", "u");
13892
+ var pattern48 = new RegExp("^[A-Za-z0-9]{1,128}$", "u");
13893
+ var pattern49 = new RegExp("^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$", "u");
13610
13894
  function validate52(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
13611
13895
  ;
13612
13896
  let vErrors = null;
@@ -13688,7 +13972,7 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
13688
13972
  const _errs9 = errors;
13689
13973
  if (errors === _errs9) {
13690
13974
  if (typeof data3 === "string") {
13691
- if (!pattern15.test(data3)) {
13975
+ if (!pattern48.test(data3)) {
13692
13976
  validate52.errors = [{ instancePath: instancePath + "/intentId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartResponse/properties/intentId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9]{1,128}$"' }];
13693
13977
  return false;
13694
13978
  }
@@ -13707,7 +13991,7 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
13707
13991
  const _errs11 = errors;
13708
13992
  if (errors === _errs11) {
13709
13993
  if (typeof data4 === "string") {
13710
- if (!pattern16.test(data4)) {
13994
+ if (!pattern49.test(data4)) {
13711
13995
  validate52.errors = [{ instancePath: instancePath + "/browserUrl", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartResponse/properties/browserUrl/pattern", keyword: "pattern", params: { pattern: "^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$" }, message: 'must match pattern "^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$"' }];
13712
13996
  return false;
13713
13997
  }
@@ -14115,7 +14399,7 @@ function validate54(data, { instancePath = "", parentData, parentDataProperty, r
14115
14399
  const _errs3 = errors;
14116
14400
  if (errors === _errs3) {
14117
14401
  if (typeof data0 === "string") {
14118
- if (!pattern15.test(data0)) {
14402
+ if (!pattern48.test(data0)) {
14119
14403
  validate54.errors = [{ instancePath: instancePath + "/intentId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStatusRequest/properties/intentId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9]{1,128}$"' }];
14120
14404
  return false;
14121
14405
  }
@@ -15687,7 +15971,7 @@ function validate55(data, { instancePath = "", parentData, parentDataProperty, r
15687
15971
  }
15688
15972
  validate55.evaluated = { "dynamicProps": true, "dynamicItems": false };
15689
15973
  var schema103 = { "type": "object", "properties": { "batch": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "moveId": { "type": "string" }, "capturedAt": { "type": "number" }, "sessionId": { "type": "string" }, "invocationId": { "type": "string" }, "eventType": { "type": "string" }, "payload": {}, "env": {}, "repositoryContext": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "repository_bound" }, "repoSyncId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["kind", "repoSyncId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "non_repository" } }, "required": ["kind"], "additionalProperties": false }] }, "capturedOrganizationId": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9_-]+$" }, "captureAuthorityKind": { "type": "string", "enum": ["workos", "service_token"] }, "decisionLifecycleProtocolVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "producer": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] }, "toolOutcome": { "type": "string", "enum": ["succeeded", "returned", "failed", "interrupted", "prevented", "unknown"] }, "envelopeVersion": { "type": "number", "const": 4 } }, "required": ["moveId", "capturedAt", "sessionId", "eventType", "capturedOrganizationId", "captureAuthorityKind", "decisionLifecycleProtocolVersion", "envelopeVersion"], "additionalProperties": {} }, { "type": "object", "properties": { "moveId": { "type": "string" }, "capturedAt": { "type": "number" }, "sessionId": { "type": "string" }, "invocationId": { "type": "string" }, "eventType": { "type": "string" }, "payload": {}, "env": {}, "repositoryContext": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "repository_bound" }, "repoSyncId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["kind", "repoSyncId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "non_repository" } }, "required": ["kind"], "additionalProperties": false }] }, "capturedOrganizationId": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9_-]+$" }, "captureAuthorityKind": { "type": "string", "enum": ["workos", "service_token"] }, "decisionLifecycleProtocolVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "producer": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] }, "toolOutcome": { "type": "string", "enum": ["succeeded", "returned", "failed", "interrupted", "prevented", "unknown"] }, "envelopeVersion": { "type": "number", "exclusiveMaximum": 4 } }, "required": ["moveId", "capturedAt", "sessionId", "eventType"], "additionalProperties": {} }] } } }, "required": ["batch"], "additionalProperties": {} };
15690
- var pattern18 = new RegExp("^[A-Za-z0-9_-]+$", "u");
15974
+ var pattern51 = new RegExp("^[A-Za-z0-9_-]+$", "u");
15691
15975
  function validate56(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
15692
15976
  ;
15693
15977
  let vErrors = null;
@@ -16048,7 +16332,7 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
16048
16332
  }
16049
16333
  errors++;
16050
16334
  } else {
16051
- if (!pattern18.test(data11)) {
16335
+ if (!pattern51.test(data11)) {
16052
16336
  const err22 = { instancePath: instancePath + "/batch/" + i0 + "/capturedOrganizationId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/capturedOrganizationId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: 'must match pattern "^[A-Za-z0-9_-]+$"' };
16053
16337
  if (vErrors === null) {
16054
16338
  vErrors = [err22];
@@ -16573,7 +16857,7 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
16573
16857
  }
16574
16858
  errors++;
16575
16859
  } else {
16576
- if (!pattern18.test(data26)) {
16860
+ if (!pattern51.test(data26)) {
16577
16861
  const err58 = { instancePath: instancePath + "/batch/" + i0 + "/capturedOrganizationId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/capturedOrganizationId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: 'must match pattern "^[A-Za-z0-9_-]+$"' };
16578
16862
  if (vErrors === null) {
16579
16863
  vErrors = [err58];
@@ -16816,10 +17100,10 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
16816
17100
  }
16817
17101
  validate56.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
16818
17102
  var schema105 = { "type": "object", "properties": { "protocolVersion": { "type": "number", "const": 3 }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] }, "sessionId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "invocationId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "repoSyncId": { "type": "string", "pattern": "^[A-Za-z0-9]{1,64}$" }, "paths": { "maxItems": 32, "type": "array", "items": { "type": "string" } }, "coverage": { "type": "string", "enum": ["complete", "unverified"] }, "branch": { "type": "string", "maxLength": 255, "pattern": "^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$" }, "clientMode": { "type": "string", "enum": ["block", "warn"] }, "clientVersion": { "type": "string", "maxLength": 32, "pattern": "^[A-Za-z0-9][A-Za-z0-9._+-]*$" }, "proposal": { "type": "string" } }, "required": ["protocolVersion", "agent", "sessionId", "invocationId", "repoSyncId", "paths", "coverage", "proposal"], "additionalProperties": false, "x-primitive-runtime-refinements": ["canonical_repository_paths", "unique_repository_paths", "complete_coverage_requires_path", "proposal_utf8_max_6144", "degrade_invalid_rollout_fields", "degrade_invalid_branch"] };
16819
- var pattern20 = new RegExp("^[A-Za-z0-9._:-]{1,128}$", "u");
16820
- var pattern22 = new RegExp("^[A-Za-z0-9]{1,64}$", "u");
16821
- var pattern23 = new RegExp("^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$", "u");
16822
- var pattern24 = new RegExp("^[A-Za-z0-9][A-Za-z0-9._+-]*$", "u");
17103
+ var pattern53 = new RegExp("^[A-Za-z0-9._:-]{1,128}$", "u");
17104
+ var pattern55 = new RegExp("^[A-Za-z0-9]{1,64}$", "u");
17105
+ var pattern56 = new RegExp("^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$", "u");
17106
+ var pattern57 = new RegExp("^[A-Za-z0-9][A-Za-z0-9._+-]*$", "u");
16823
17107
  function validate57(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
16824
17108
  ;
16825
17109
  let vErrors = null;
@@ -16885,7 +17169,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
16885
17169
  const _errs8 = errors;
16886
17170
  if (errors === _errs8) {
16887
17171
  if (typeof data2 === "string") {
16888
- if (!pattern20.test(data2)) {
17172
+ if (!pattern53.test(data2)) {
16889
17173
  validate57.errors = [{ instancePath: instancePath + "/sessionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/sessionId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9._:-]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9._:-]{1,128}$"' }];
16890
17174
  return false;
16891
17175
  }
@@ -16904,7 +17188,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
16904
17188
  const _errs10 = errors;
16905
17189
  if (errors === _errs10) {
16906
17190
  if (typeof data3 === "string") {
16907
- if (!pattern20.test(data3)) {
17191
+ if (!pattern53.test(data3)) {
16908
17192
  validate57.errors = [{ instancePath: instancePath + "/invocationId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/invocationId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9._:-]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9._:-]{1,128}$"' }];
16909
17193
  return false;
16910
17194
  }
@@ -16923,7 +17207,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
16923
17207
  const _errs12 = errors;
16924
17208
  if (errors === _errs12) {
16925
17209
  if (typeof data4 === "string") {
16926
- if (!pattern22.test(data4)) {
17210
+ if (!pattern55.test(data4)) {
16927
17211
  validate57.errors = [{ instancePath: instancePath + "/repoSyncId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/repoSyncId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9]{1,64}$" }, message: 'must match pattern "^[A-Za-z0-9]{1,64}$"' }];
16928
17212
  return false;
16929
17213
  }
@@ -16995,7 +17279,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
16995
17279
  validate57.errors = [{ instancePath: instancePath + "/branch", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/branch/maxLength", keyword: "maxLength", params: { limit: 255 }, message: "must NOT have more than 255 characters" }];
16996
17280
  return false;
16997
17281
  } else {
16998
- if (!pattern23.test(data8)) {
17282
+ if (!pattern56.test(data8)) {
16999
17283
  validate57.errors = [{ instancePath: instancePath + "/branch", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/branch/pattern", keyword: "pattern", params: { pattern: "^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$" }, message: 'must match pattern "^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$"' }];
17000
17284
  return false;
17001
17285
  }
@@ -17035,7 +17319,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
17035
17319
  validate57.errors = [{ instancePath: instancePath + "/clientVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/clientVersion/maxLength", keyword: "maxLength", params: { limit: 32 }, message: "must NOT have more than 32 characters" }];
17036
17320
  return false;
17037
17321
  } else {
17038
- if (!pattern24.test(data10)) {
17322
+ if (!pattern57.test(data10)) {
17039
17323
  validate57.errors = [{ instancePath: instancePath + "/clientVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/clientVersion/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9][A-Za-z0-9._+-]*$" }, message: 'must match pattern "^[A-Za-z0-9][A-Za-z0-9._+-]*$"' }];
17040
17324
  return false;
17041
17325
  }
@@ -17081,7 +17365,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
17081
17365
  return errors === 0;
17082
17366
  }
17083
17367
  validate57.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
17084
- var schema107 = { "type": "object", "properties": { "protocolVersion": { "type": "number", "const": 3 }, "checkId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "verdict": { "type": "string", "enum": ["allow", "warn", "ask", "block", "unavailable"] }, "reasonCode": { "type": "string" }, "message": { "type": "string" }, "conflicts": { "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string" }, "shortId": { "type": "string" }, "title": { "type": "string" } }, "required": ["decisionId"], "additionalProperties": {} } }, "bypassed": { "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string" }, "bypassId": { "type": "string" }, "shortId": { "type": "string" } }, "required": ["decisionId"], "additionalProperties": {} } }, "evaluationCoverage": { "type": "object", "properties": { "candidateCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "submittedCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "evaluatedCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": ["completed", "partial", "unavailable", "not_run", "unknown"] }, "semanticBatchCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "completedSemanticBatchCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "selectionOmissions": { "type": "array", "items": { "type": "object", "properties": { "source": { "type": "string", "enum": ["exact_scope", "location_scope", "organization_scope", "candidate_scan", "candidate_limit", "bypass_scan"] }, "reason": { "type": "string", "enum": ["scan_limit", "candidate_limit", "bucket_limit"] }, "omittedCountLowerBound": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["source", "reason", "omittedCountLowerBound"], "additionalProperties": false } }, "evidenceOmissions": { "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string" }, "reason": { "type": "string", "enum": ["prompt_budget", "batch_limit", "evaluation_failed", "evaluation_deadline"] } }, "required": ["decisionId", "reason"], "additionalProperties": false } } }, "required": ["candidateCount", "submittedCount", "evaluatedCount", "status", "semanticBatchCount", "completedSemanticBatchCount", "selectionOmissions", "evidenceOmissions"], "additionalProperties": false }, "decisionDisclosures": { "minItems": 1, "maxItems": 16, "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string" }, "shortId": { "type": "string" }, "participation": { "type": "string", "enum": ["candidate", "reconcile_bypass"] } }, "required": ["decisionId", "shortId", "participation"], "additionalProperties": false } } }, "required": ["protocolVersion", "verdict", "reasonCode", "message", "conflicts", "bypassed"], "additionalProperties": {} };
17368
+ var schema107 = { "type": "object", "properties": { "protocolVersion": { "type": "number", "const": 3 }, "checkId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "verdict": { "type": "string", "enum": ["allow", "warn", "ask", "block", "unavailable"] }, "reasonCode": { "type": "string" }, "message": { "type": "string" }, "conflicts": { "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string", "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "title": { "type": "string" } }, "required": ["decisionId"], "additionalProperties": {} } }, "bypassed": { "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string", "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "bypassId": { "type": "string" }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" } }, "required": ["decisionId"], "additionalProperties": {} } }, "evaluationCoverage": { "type": "object", "properties": { "candidateCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "submittedCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "evaluatedCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": ["completed", "partial", "unavailable", "not_run", "unknown"] }, "semanticBatchCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "completedSemanticBatchCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "selectionOmissions": { "type": "array", "items": { "type": "object", "properties": { "source": { "type": "string", "enum": ["exact_scope", "location_scope", "organization_scope", "candidate_scan", "candidate_limit", "bypass_scan"] }, "reason": { "type": "string", "enum": ["scan_limit", "candidate_limit", "bucket_limit"] }, "omittedCountLowerBound": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["source", "reason", "omittedCountLowerBound"], "additionalProperties": false } }, "evidenceOmissions": { "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string", "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "reason": { "type": "string", "enum": ["prompt_budget", "batch_limit", "evaluation_failed", "evaluation_deadline"] } }, "required": ["decisionId", "reason"], "additionalProperties": false } } }, "required": ["candidateCount", "submittedCount", "evaluatedCount", "status", "semanticBatchCount", "completedSemanticBatchCount", "selectionOmissions", "evidenceOmissions"], "additionalProperties": false }, "decisionDisclosures": { "minItems": 1, "maxItems": 16, "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string", "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "participation": { "type": "string", "enum": ["candidate", "reconcile_bypass"] } }, "required": ["decisionId", "shortId", "participation"], "additionalProperties": false } } }, "required": ["protocolVersion", "verdict", "reasonCode", "message", "conflicts", "bypassed"], "additionalProperties": {} };
17085
17369
  function validate58(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
17086
17370
  ;
17087
17371
  let vErrors = null;
@@ -17122,7 +17406,7 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17122
17406
  const _errs5 = errors;
17123
17407
  if (errors === _errs5) {
17124
17408
  if (typeof data1 === "string") {
17125
- if (!pattern20.test(data1)) {
17409
+ if (!pattern53.test(data1)) {
17126
17410
  validate58.errors = [{ instancePath: instancePath + "/checkId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/checkId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9._:-]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9._:-]{1,128}$"' }];
17127
17411
  return false;
17128
17412
  }
@@ -17192,10 +17476,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17192
17476
  return false;
17193
17477
  } else {
17194
17478
  if (data6.decisionId !== void 0) {
17479
+ let data7 = data6.decisionId;
17195
17480
  const _errs18 = errors;
17196
- if (typeof data6.decisionId !== "string") {
17197
- validate58.errors = [{ instancePath: instancePath + "/conflicts/" + i0 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/conflicts/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
17198
- return false;
17481
+ if (errors === _errs18) {
17482
+ if (typeof data7 === "string") {
17483
+ if (!pattern4.test(data7)) {
17484
+ validate58.errors = [{ instancePath: instancePath + "/conflicts/" + i0 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/conflicts/items/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
17485
+ return false;
17486
+ }
17487
+ } else {
17488
+ validate58.errors = [{ instancePath: instancePath + "/conflicts/" + i0 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/conflicts/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
17489
+ return false;
17490
+ }
17199
17491
  }
17200
17492
  var valid3 = _errs18 === errors;
17201
17493
  } else {
@@ -17203,10 +17495,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17203
17495
  }
17204
17496
  if (valid3) {
17205
17497
  if (data6.shortId !== void 0) {
17498
+ let data8 = data6.shortId;
17206
17499
  const _errs20 = errors;
17207
- if (typeof data6.shortId !== "string") {
17208
- validate58.errors = [{ instancePath: instancePath + "/conflicts/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/conflicts/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
17209
- return false;
17500
+ if (errors === _errs20) {
17501
+ if (typeof data8 === "string") {
17502
+ if (!pattern5.test(data8)) {
17503
+ validate58.errors = [{ instancePath: instancePath + "/conflicts/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/conflicts/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
17504
+ return false;
17505
+ }
17506
+ } else {
17507
+ validate58.errors = [{ instancePath: instancePath + "/conflicts/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/conflicts/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
17508
+ return false;
17509
+ }
17210
17510
  }
17211
17511
  var valid3 = _errs20 === errors;
17212
17512
  } else {
@@ -17264,10 +17564,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17264
17564
  return false;
17265
17565
  } else {
17266
17566
  if (data11.decisionId !== void 0) {
17567
+ let data12 = data11.decisionId;
17267
17568
  const _errs29 = errors;
17268
- if (typeof data11.decisionId !== "string") {
17269
- validate58.errors = [{ instancePath: instancePath + "/bypassed/" + i1 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/bypassed/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
17270
- return false;
17569
+ if (errors === _errs29) {
17570
+ if (typeof data12 === "string") {
17571
+ if (!pattern4.test(data12)) {
17572
+ validate58.errors = [{ instancePath: instancePath + "/bypassed/" + i1 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/bypassed/items/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
17573
+ return false;
17574
+ }
17575
+ } else {
17576
+ validate58.errors = [{ instancePath: instancePath + "/bypassed/" + i1 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/bypassed/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
17577
+ return false;
17578
+ }
17271
17579
  }
17272
17580
  var valid5 = _errs29 === errors;
17273
17581
  } else {
@@ -17286,10 +17594,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17286
17594
  }
17287
17595
  if (valid5) {
17288
17596
  if (data11.shortId !== void 0) {
17597
+ let data14 = data11.shortId;
17289
17598
  const _errs33 = errors;
17290
- if (typeof data11.shortId !== "string") {
17291
- validate58.errors = [{ instancePath: instancePath + "/bypassed/" + i1 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/bypassed/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
17292
- return false;
17599
+ if (errors === _errs33) {
17600
+ if (typeof data14 === "string") {
17601
+ if (!pattern5.test(data14)) {
17602
+ validate58.errors = [{ instancePath: instancePath + "/bypassed/" + i1 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/bypassed/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
17603
+ return false;
17604
+ }
17605
+ } else {
17606
+ validate58.errors = [{ instancePath: instancePath + "/bypassed/" + i1 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/bypassed/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
17607
+ return false;
17608
+ }
17293
17609
  }
17294
17610
  var valid5 = _errs33 === errors;
17295
17611
  } else {
@@ -17611,10 +17927,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17611
17927
  }
17612
17928
  if (_errs65 === errors) {
17613
17929
  if (data28.decisionId !== void 0) {
17930
+ let data29 = data28.decisionId;
17614
17931
  const _errs66 = errors;
17615
- if (typeof data28.decisionId !== "string") {
17616
- validate58.errors = [{ instancePath: instancePath + "/evaluationCoverage/evidenceOmissions/" + i3 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/evaluationCoverage/properties/evidenceOmissions/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
17617
- return false;
17932
+ if (errors === _errs66) {
17933
+ if (typeof data29 === "string") {
17934
+ if (!pattern4.test(data29)) {
17935
+ validate58.errors = [{ instancePath: instancePath + "/evaluationCoverage/evidenceOmissions/" + i3 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/evaluationCoverage/properties/evidenceOmissions/items/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
17936
+ return false;
17937
+ }
17938
+ } else {
17939
+ validate58.errors = [{ instancePath: instancePath + "/evaluationCoverage/evidenceOmissions/" + i3 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/evaluationCoverage/properties/evidenceOmissions/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
17940
+ return false;
17941
+ }
17618
17942
  }
17619
17943
  var valid10 = _errs66 === errors;
17620
17944
  } else {
@@ -17712,10 +18036,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17712
18036
  }
17713
18037
  if (_errs74 === errors) {
17714
18038
  if (data32.decisionId !== void 0) {
18039
+ let data33 = data32.decisionId;
17715
18040
  const _errs75 = errors;
17716
- if (typeof data32.decisionId !== "string") {
17717
- validate58.errors = [{ instancePath: instancePath + "/decisionDisclosures/" + i4 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/decisionDisclosures/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
17718
- return false;
18041
+ if (errors === _errs75) {
18042
+ if (typeof data33 === "string") {
18043
+ if (!pattern4.test(data33)) {
18044
+ validate58.errors = [{ instancePath: instancePath + "/decisionDisclosures/" + i4 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/decisionDisclosures/items/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
18045
+ return false;
18046
+ }
18047
+ } else {
18048
+ validate58.errors = [{ instancePath: instancePath + "/decisionDisclosures/" + i4 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/decisionDisclosures/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
18049
+ return false;
18050
+ }
17719
18051
  }
17720
18052
  var valid12 = _errs75 === errors;
17721
18053
  } else {
@@ -17723,10 +18055,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17723
18055
  }
17724
18056
  if (valid12) {
17725
18057
  if (data32.shortId !== void 0) {
18058
+ let data34 = data32.shortId;
17726
18059
  const _errs77 = errors;
17727
- if (typeof data32.shortId !== "string") {
17728
- validate58.errors = [{ instancePath: instancePath + "/decisionDisclosures/" + i4 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/decisionDisclosures/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
17729
- return false;
18060
+ if (errors === _errs77) {
18061
+ if (typeof data34 === "string") {
18062
+ if (!pattern5.test(data34)) {
18063
+ validate58.errors = [{ instancePath: instancePath + "/decisionDisclosures/" + i4 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/decisionDisclosures/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
18064
+ return false;
18065
+ }
18066
+ } else {
18067
+ validate58.errors = [{ instancePath: instancePath + "/decisionDisclosures/" + i4 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/decisionDisclosures/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
18068
+ return false;
18069
+ }
17730
18070
  }
17731
18071
  var valid12 = _errs77 === errors;
17732
18072
  } else {
@@ -17791,8 +18131,8 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17791
18131
  return errors === 0;
17792
18132
  }
17793
18133
  validate58.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
17794
- var pattern26 = new RegExp("^[A-Za-z0-9._-]{1,128}$", "u");
17795
- var pattern27 = new RegExp("^pci_[A-Za-z0-9_-]{43}$", "u");
18134
+ var pattern66 = new RegExp("^[A-Za-z0-9._-]{1,128}$", "u");
18135
+ var pattern67 = new RegExp("^pci_[A-Za-z0-9_-]{43}$", "u");
17796
18136
  function validate59(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
17797
18137
  ;
17798
18138
  let vErrors = null;
@@ -17817,7 +18157,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
17817
18157
  const _errs3 = errors;
17818
18158
  if (errors === _errs3) {
17819
18159
  if (typeof data0 === "string") {
17820
- if (!pattern26.test(data0)) {
18160
+ if (!pattern66.test(data0)) {
17821
18161
  validate59.errors = [{ instancePath: instancePath + "/sessionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PresenceHeartbeatRequest/properties/sessionId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9._-]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9._-]{1,128}$"' }];
17822
18162
  return false;
17823
18163
  }
@@ -17836,7 +18176,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
17836
18176
  const _errs5 = errors;
17837
18177
  if (errors === _errs5) {
17838
18178
  if (typeof data1 === "string") {
17839
- if (!pattern27.test(data1)) {
18179
+ if (!pattern67.test(data1)) {
17840
18180
  validate59.errors = [{ instancePath: instancePath + "/clientInstanceId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PresenceHeartbeatRequest/properties/clientInstanceId/pattern", keyword: "pattern", params: { pattern: "^pci_[A-Za-z0-9_-]{43}$" }, message: 'must match pattern "^pci_[A-Za-z0-9_-]{43}$"' }];
17841
18181
  return false;
17842
18182
  }
@@ -18378,7 +18718,7 @@ function validate61(data, { instancePath = "", parentData, parentDataProperty, r
18378
18718
  return errors === 0;
18379
18719
  }
18380
18720
  validate61.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
18381
- var schema115 = { "type": "object", "properties": { "ok": { "type": "boolean", "const": true }, "checkId": { "type": "string" }, "decisionId": { "type": "string" }, "outcome": { "type": "string", "enum": ["followed", "superseded"] }, "recordedAt": { "type": "number" }, "duplicate": { "type": "boolean" } }, "required": ["ok", "checkId", "decisionId", "outcome", "recordedAt", "duplicate"], "additionalProperties": false };
18721
+ var schema115 = { "type": "object", "properties": { "ok": { "type": "boolean", "const": true }, "checkId": { "type": "string" }, "decisionId": { "type": "string", "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "outcome": { "type": "string", "enum": ["followed", "superseded"] }, "recordedAt": { "type": "number" }, "duplicate": { "type": "boolean" } }, "required": ["ok", "checkId", "decisionId", "outcome", "recordedAt", "duplicate"], "additionalProperties": false };
18382
18722
  function validate62(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
18383
18723
  ;
18384
18724
  let vErrors = null;
@@ -18435,10 +18775,18 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
18435
18775
  }
18436
18776
  if (valid1) {
18437
18777
  if (data.decisionId !== void 0) {
18778
+ let data2 = data.decisionId;
18438
18779
  const _errs7 = errors;
18439
- if (typeof data.decisionId !== "string") {
18440
- validate62.errors = [{ instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/ReconcileResolutionResponse/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
18441
- return false;
18780
+ if (errors === _errs7) {
18781
+ if (typeof data2 === "string") {
18782
+ if (!pattern4.test(data2)) {
18783
+ validate62.errors = [{ instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/ReconcileResolutionResponse/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
18784
+ return false;
18785
+ }
18786
+ } else {
18787
+ validate62.errors = [{ instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/ReconcileResolutionResponse/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
18788
+ return false;
18789
+ }
18442
18790
  }
18443
18791
  var valid1 = _errs7 === errors;
18444
18792
  } else {
@@ -18499,7 +18847,7 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
18499
18847
  return errors === 0;
18500
18848
  }
18501
18849
  validate62.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
18502
- var pattern28 = new RegExp("^(?![A-Za-z0-9-]*--)[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?\\/[A-Za-z0-9._-]{1,100}$", "u");
18850
+ var pattern69 = new RegExp("^(?![A-Za-z0-9-]*--)[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?\\/[A-Za-z0-9._-]{1,100}$", "u");
18503
18851
  function validate63(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
18504
18852
  ;
18505
18853
  let vErrors = null;
@@ -18533,7 +18881,7 @@ function validate63(data, { instancePath = "", parentData, parentDataProperty, r
18533
18881
  const _errs3 = errors;
18534
18882
  if (errors === _errs3) {
18535
18883
  if (typeof data0 === "string") {
18536
- if (!pattern28.test(data0)) {
18884
+ if (!pattern69.test(data0)) {
18537
18885
  validate63.errors = [{ instancePath: instancePath + "/repositoryFullName", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/RepositoryBindRequest/properties/repositoryFullName/pattern", keyword: "pattern", params: { pattern: "^(?![A-Za-z0-9-]*--)[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?\\/[A-Za-z0-9._-]{1,100}$" }, message: 'must match pattern "^(?![A-Za-z0-9-]*--)[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?\\/[A-Za-z0-9._-]{1,100}$"' }];
18538
18886
  return false;
18539
18887
  }
@@ -18598,7 +18946,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
18598
18946
  return errors === 0;
18599
18947
  }
18600
18948
  validate64.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
18601
- var pattern30 = new RegExp("^api_key_[A-Za-z0-9_-]+$", "u");
18949
+ var pattern71 = new RegExp("^api_key_[A-Za-z0-9_-]+$", "u");
18602
18950
  function validate65(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
18603
18951
  ;
18604
18952
  let vErrors = null;
@@ -18632,7 +18980,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
18632
18980
  const _errs3 = errors;
18633
18981
  if (errors === _errs3) {
18634
18982
  if (typeof data0 === "string") {
18635
- if (!pattern5.test(data0)) {
18983
+ if (!pattern35.test(data0)) {
18636
18984
  validate65.errors = [{ instancePath: instancePath + "/requestId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListRequest/properties/requestId/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "^[a-f0-9]{64}$"' }];
18637
18985
  return false;
18638
18986
  }
@@ -18684,7 +19032,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
18684
19032
  validate65.errors = [{ instancePath: instancePath + "/after", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListRequest/properties/after/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
18685
19033
  return false;
18686
19034
  } else {
18687
- if (!pattern30.test(data2)) {
19035
+ if (!pattern71.test(data2)) {
18688
19036
  validate65.errors = [{ instancePath: instancePath + "/after", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListRequest/properties/after/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
18689
19037
  return false;
18690
19038
  }
@@ -18712,9 +19060,9 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
18712
19060
  return errors === 0;
18713
19061
  }
18714
19062
  validate65.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
18715
- var pattern32 = new RegExp("^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$", "u");
18716
- var pattern33 = new RegExp("^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$", "u");
18717
- var pattern34 = new RegExp("^[\\x21-\\x7e]+$", "u");
19063
+ var pattern73 = new RegExp("^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$", "u");
19064
+ var pattern74 = new RegExp("^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$", "u");
19065
+ var pattern75 = new RegExp("^[\\x21-\\x7e]+$", "u");
18718
19066
  function validate66(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
18719
19067
  ;
18720
19068
  let vErrors = null;
@@ -18786,7 +19134,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
18786
19134
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/id/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
18787
19135
  return false;
18788
19136
  } else {
18789
- if (!pattern30.test(data2)) {
19137
+ if (!pattern71.test(data2)) {
18790
19138
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
18791
19139
  return false;
18792
19140
  }
@@ -18815,7 +19163,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
18815
19163
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
18816
19164
  return false;
18817
19165
  } else {
18818
- if (!pattern32.test(data3)) {
19166
+ if (!pattern73.test(data3)) {
18819
19167
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/name/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$" }, message: 'must match pattern "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$"' }];
18820
19168
  return false;
18821
19169
  }
@@ -18844,7 +19192,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
18844
19192
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/obfuscatedValue/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
18845
19193
  return false;
18846
19194
  } else {
18847
- if (!pattern33.test(data4)) {
19195
+ if (!pattern74.test(data4)) {
18848
19196
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/obfuscatedValue/pattern", keyword: "pattern", params: { pattern: "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$" }, message: 'must match pattern "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$"' }];
18849
19197
  return false;
18850
19198
  }
@@ -18884,7 +19232,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
18884
19232
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/permissions/" + i1, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/permissions/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
18885
19233
  return false;
18886
19234
  } else {
18887
- if (!pattern34.test(data6)) {
19235
+ if (!pattern75.test(data6)) {
18888
19236
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/permissions/" + i1, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/permissions/items/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e]+$" }, message: 'must match pattern "^[\\x21-\\x7e]+$"' }];
18889
19237
  return false;
18890
19238
  }
@@ -19170,7 +19518,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
19170
19518
  }
19171
19519
  errors++;
19172
19520
  } else {
19173
- if (!pattern30.test(data11)) {
19521
+ if (!pattern71.test(data11)) {
19174
19522
  const err12 = { instancePath: instancePath + "/nextCursor", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/nextCursor/anyOf/0/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' };
19175
19523
  if (vErrors === null) {
19176
19524
  vErrors = [err12];
@@ -19282,7 +19630,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
19282
19630
  validate67.errors = [{ instancePath: instancePath + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/id/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
19283
19631
  return false;
19284
19632
  } else {
19285
- if (!pattern30.test(data0)) {
19633
+ if (!pattern71.test(data0)) {
19286
19634
  validate67.errors = [{ instancePath: instancePath + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/id/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
19287
19635
  return false;
19288
19636
  }
@@ -19311,7 +19659,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
19311
19659
  validate67.errors = [{ instancePath: instancePath + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
19312
19660
  return false;
19313
19661
  } else {
19314
- if (!pattern32.test(data1)) {
19662
+ if (!pattern73.test(data1)) {
19315
19663
  validate67.errors = [{ instancePath: instancePath + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/name/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$" }, message: 'must match pattern "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$"' }];
19316
19664
  return false;
19317
19665
  }
@@ -19340,7 +19688,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
19340
19688
  validate67.errors = [{ instancePath: instancePath + "/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/obfuscatedValue/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
19341
19689
  return false;
19342
19690
  } else {
19343
- if (!pattern33.test(data2)) {
19691
+ if (!pattern74.test(data2)) {
19344
19692
  validate67.errors = [{ instancePath: instancePath + "/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/obfuscatedValue/pattern", keyword: "pattern", params: { pattern: "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$" }, message: 'must match pattern "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$"' }];
19345
19693
  return false;
19346
19694
  }
@@ -19380,7 +19728,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
19380
19728
  validate67.errors = [{ instancePath: instancePath + "/permissions/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/permissions/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
19381
19729
  return false;
19382
19730
  } else {
19383
- if (!pattern34.test(data4)) {
19731
+ if (!pattern75.test(data4)) {
19384
19732
  validate67.errors = [{ instancePath: instancePath + "/permissions/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/permissions/items/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e]+$" }, message: 'must match pattern "^[\\x21-\\x7e]+$"' }];
19385
19733
  return false;
19386
19734
  }
@@ -19661,7 +20009,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
19661
20009
  const _errs3 = errors;
19662
20010
  if (errors === _errs3) {
19663
20011
  if (typeof data0 === "string") {
19664
- if (!pattern5.test(data0)) {
20012
+ if (!pattern35.test(data0)) {
19665
20013
  validate68.errors = [{ instancePath: instancePath + "/requestId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintRequest/properties/requestId/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "^[a-f0-9]{64}$"' }];
19666
20014
  return false;
19667
20015
  }
@@ -19688,7 +20036,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
19688
20036
  validate68.errors = [{ instancePath: instancePath + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintRequest/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
19689
20037
  return false;
19690
20038
  } else {
19691
- if (!pattern32.test(data1)) {
20039
+ if (!pattern73.test(data1)) {
19692
20040
  validate68.errors = [{ instancePath: instancePath + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintRequest/properties/name/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$" }, message: 'must match pattern "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$"' }];
19693
20041
  return false;
19694
20042
  }
@@ -19741,7 +20089,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
19741
20089
  return errors === 0;
19742
20090
  }
19743
20091
  validate68.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
19744
- var pattern46 = new RegExp("^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$", "u");
20092
+ var pattern87 = new RegExp("^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$", "u");
19745
20093
  function validate69(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
19746
20094
  ;
19747
20095
  let vErrors = null;
@@ -19802,7 +20150,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
19802
20150
  validate69.errors = [{ instancePath: instancePath + "/apiKey/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/id/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
19803
20151
  return false;
19804
20152
  } else {
19805
- if (!pattern30.test(data1)) {
20153
+ if (!pattern71.test(data1)) {
19806
20154
  validate69.errors = [{ instancePath: instancePath + "/apiKey/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/id/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
19807
20155
  return false;
19808
20156
  }
@@ -19831,7 +20179,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
19831
20179
  validate69.errors = [{ instancePath: instancePath + "/apiKey/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
19832
20180
  return false;
19833
20181
  } else {
19834
- if (!pattern32.test(data2)) {
20182
+ if (!pattern73.test(data2)) {
19835
20183
  validate69.errors = [{ instancePath: instancePath + "/apiKey/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/name/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$" }, message: 'must match pattern "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$"' }];
19836
20184
  return false;
19837
20185
  }
@@ -19860,7 +20208,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
19860
20208
  validate69.errors = [{ instancePath: instancePath + "/apiKey/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/obfuscatedValue/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
19861
20209
  return false;
19862
20210
  } else {
19863
- if (!pattern33.test(data3)) {
20211
+ if (!pattern74.test(data3)) {
19864
20212
  validate69.errors = [{ instancePath: instancePath + "/apiKey/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/obfuscatedValue/pattern", keyword: "pattern", params: { pattern: "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$" }, message: 'must match pattern "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$"' }];
19865
20213
  return false;
19866
20214
  }
@@ -19900,7 +20248,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
19900
20248
  validate69.errors = [{ instancePath: instancePath + "/apiKey/permissions/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/permissions/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
19901
20249
  return false;
19902
20250
  } else {
19903
- if (!pattern34.test(data5)) {
20251
+ if (!pattern75.test(data5)) {
19904
20252
  validate69.errors = [{ instancePath: instancePath + "/apiKey/permissions/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/permissions/items/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e]+$" }, message: 'must match pattern "^[\\x21-\\x7e]+$"' }];
19905
20253
  return false;
19906
20254
  }
@@ -20162,7 +20510,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
20162
20510
  validate69.errors = [{ instancePath: instancePath + "/secret", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/secret/minLength", keyword: "minLength", params: { limit: 4 }, message: "must NOT have fewer than 4 characters" }];
20163
20511
  return false;
20164
20512
  } else {
20165
- if (!pattern46.test(data10)) {
20513
+ if (!pattern87.test(data10)) {
20166
20514
  validate69.errors = [{ instancePath: instancePath + "/secret", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/secret/pattern", keyword: "pattern", params: { pattern: "^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$" }, message: 'must match pattern "^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$"' }];
20167
20515
  return false;
20168
20516
  }
@@ -20222,7 +20570,7 @@ function validate70(data, { instancePath = "", parentData, parentDataProperty, r
20222
20570
  const _errs3 = errors;
20223
20571
  if (errors === _errs3) {
20224
20572
  if (typeof data0 === "string") {
20225
- if (!pattern5.test(data0)) {
20573
+ if (!pattern35.test(data0)) {
20226
20574
  validate70.errors = [{ instancePath: instancePath + "/requestId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyRevokeRequest/properties/requestId/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "^[a-f0-9]{64}$"' }];
20227
20575
  return false;
20228
20576
  }
@@ -20284,7 +20632,7 @@ function validate71(data, { instancePath = "", parentData, parentDataProperty, r
20284
20632
  validate71.errors = [{ instancePath: instancePath + "/apiKeyId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyRevokeResponse/properties/apiKeyId/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
20285
20633
  return false;
20286
20634
  } else {
20287
- if (!pattern30.test(data0)) {
20635
+ if (!pattern71.test(data0)) {
20288
20636
  validate71.errors = [{ instancePath: instancePath + "/apiKeyId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyRevokeResponse/properties/apiKeyId/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
20289
20637
  return false;
20290
20638
  }
@@ -20548,7 +20896,7 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
20548
20896
  }
20549
20897
  validate73.evaluated = { "dynamicProps": true, "dynamicItems": false };
20550
20898
  var schema139 = { "type": "object", "properties": { "protocol_version": { "type": "number", "const": 1 }, "issuer": { "type": "string", "format": "uri" }, "client_id": { "type": "string", "maxLength": 256, "pattern": "^client_[A-Za-z0-9_-]+$" }, "default_scopes": { "minItems": 4, "maxItems": 4, "type": "array", "items": { "type": "string", "enum": ["openid", "profile", "email", "offline_access"] } } }, "required": ["protocol_version", "issuer", "client_id", "default_scopes"], "additionalProperties": false, "x-primitive-runtime-refinements": ["canonical_https_origin", "exact_workos_connect_device_scopes"] };
20551
- var pattern49 = new RegExp("^client_[A-Za-z0-9_-]+$", "u");
20899
+ var pattern90 = new RegExp("^client_[A-Za-z0-9_-]+$", "u");
20552
20900
  function validate74(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
20553
20901
  ;
20554
20902
  let vErrors = null;
@@ -20617,7 +20965,7 @@ function validate74(data, { instancePath = "", parentData, parentDataProperty, r
20617
20965
  validate74.errors = [{ instancePath: instancePath + "/client_id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/WorkosConnectDeviceConfigurationSuccess/properties/client_id/maxLength", keyword: "maxLength", params: { limit: 256 }, message: "must NOT have more than 256 characters" }];
20618
20966
  return false;
20619
20967
  } else {
20620
- if (!pattern49.test(data2)) {
20968
+ if (!pattern90.test(data2)) {
20621
20969
  validate74.errors = [{ instancePath: instancePath + "/client_id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/WorkosConnectDeviceConfigurationSuccess/properties/client_id/pattern", keyword: "pattern", params: { pattern: "^client_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^client_[A-Za-z0-9_-]+$"' }];
20622
20970
  return false;
20623
20971
  }
@@ -21220,6 +21568,83 @@ function decisionIngestionStatus(cwd) {
21220
21568
  return isRepoActiveForCapture(cwd) ? "enabled" : "disabled";
21221
21569
  }
21222
21570
 
21571
+ // src/decisions/identity.ts
21572
+ var PUBLIC_ID = /^dec_[0-9a-f]{8}$/u;
21573
+ var BARE_ID = /^[0-9a-f]{8}$/u;
21574
+ var OPAQUE_FIELDS = /* @__PURE__ */ new Set([
21575
+ "cursor",
21576
+ "continueCursor",
21577
+ "nextCursor",
21578
+ "reviewToken",
21579
+ "bypassToken"
21580
+ ]);
21581
+ function decisionIdentifier(id, shortId) {
21582
+ if (typeof id === "string" && PUBLIC_ID.test(id)) return id;
21583
+ if (typeof shortId === "string" && BARE_ID.test(shortId)) return `dec_${shortId}`;
21584
+ if (typeof id === "string" && BARE_ID.test(id)) return `dec_${id}`;
21585
+ return void 0;
21586
+ }
21587
+ function publicDecisionResponse(value) {
21588
+ const replacements = /* @__PURE__ */ new Map();
21589
+ const referenceKeys = /* @__PURE__ */ new Set([
21590
+ "decisionId",
21591
+ "childId",
21592
+ "parentId",
21593
+ "supersededBy",
21594
+ "activationDecisionId"
21595
+ ]);
21596
+ function visit(input, field = "") {
21597
+ if (OPAQUE_FIELDS.has(field) || input === null || input === void 0) return input;
21598
+ if (Array.isArray(input)) return input.map((item) => visit(item, field));
21599
+ if (typeof input === "string" && (referenceKeys.has(field) || /DecisionIds$/u.test(field))) {
21600
+ const id = decisionIdentifier(input);
21601
+ if (!id) throw new Error("Decision identity unavailable; update Primitive and retry");
21602
+ return id;
21603
+ }
21604
+ if (typeof input !== "object") return input;
21605
+ const row = { ...input };
21606
+ for (const [idKey, shortKey] of [
21607
+ ["id", "shortId"],
21608
+ ["_id", "shortId"],
21609
+ ["decisionId", "shortId"],
21610
+ ["childId", "childShortId"],
21611
+ ["parentId", "parentShortId"]
21612
+ ]) {
21613
+ if (!(idKey in row) || (idKey === "id" || idKey === "_id") && !("intent" in row || "shortId" in row))
21614
+ continue;
21615
+ const id = decisionIdentifier(
21616
+ row[idKey],
21617
+ row[shortKey] ?? (idKey === "decisionId" ? row.decisionShortId : void 0)
21618
+ );
21619
+ if (!id) throw new Error("Decision identity unavailable; update Primitive and retry");
21620
+ const previous = row[idKey];
21621
+ if (typeof previous === "string" && !PUBLIC_ID.test(previous) && !BARE_ID.test(previous)) {
21622
+ replacements.set(previous, id);
21623
+ }
21624
+ if (shortKey in row) row[shortKey] = id.slice(4);
21625
+ if (idKey === "decisionId" && "decisionShortId" in row) row.decisionShortId = id.slice(4);
21626
+ row[idKey] = id;
21627
+ }
21628
+ return Object.fromEntries(Object.entries(row).map(([key, item]) => [key, visit(item, key)]));
21629
+ }
21630
+ const projected = visit(value);
21631
+ function replace(input, field = "") {
21632
+ if (OPAQUE_FIELDS.has(field)) return input;
21633
+ if (typeof input === "string") {
21634
+ let output = input;
21635
+ for (const [raw, id] of replacements) if (raw !== id) output = output.replaceAll(raw, id);
21636
+ return output;
21637
+ }
21638
+ if (Array.isArray(input)) return input.map((item) => replace(item, field));
21639
+ if (input && typeof input === "object")
21640
+ return Object.fromEntries(
21641
+ Object.entries(input).map(([key, item]) => [key, replace(item, key)])
21642
+ );
21643
+ return input;
21644
+ }
21645
+ return replace(projected);
21646
+ }
21647
+
21223
21648
  // src/client.ts
21224
21649
  import { createHash as createHash5 } from "crypto";
21225
21650
  import { chmodSync as chmodSync3, existsSync as existsSync9, mkdirSync as mkdirSync4, readFileSync as readFileSync9, rmSync as rmSync4 } from "fs";
@@ -21771,7 +22196,7 @@ async function responseValue(response) {
21771
22196
  const message = typeof errorRecord?.error === "string" ? errorRecord.error : `HTTP ${response.status}`;
21772
22197
  throw new HttpError(response.status, message, errorBody);
21773
22198
  }
21774
- return response.json();
22199
+ return publicDecisionResponse(await response.json());
21775
22200
  }
21776
22201
  async function request(method, path, body, options) {
21777
22202
  const siteUrl = getSiteUrl();
@@ -22402,10 +22827,6 @@ import {
22402
22827
  } from "fs";
22403
22828
  import { join as join14 } from "path";
22404
22829
 
22405
- // src/daemon/client.ts
22406
- import { createConnection } from "net";
22407
- import { join as join13 } from "path";
22408
-
22409
22830
  // src/daemon/principal.ts
22410
22831
  import { createHash as createHash6 } from "crypto";
22411
22832
  var PRINCIPAL_COMPONENT_MAX_LENGTH = 512;
@@ -22435,6 +22856,7 @@ function daemonPrincipalsMatch(caller, daemon) {
22435
22856
  // src/daemon/protocol.ts
22436
22857
  var DAEMON_JSON_REQUEST_MAX_BYTES = 64 * 1024;
22437
22858
  var DAEMON_JSON_RESPONSE_MAX_BYTES = 8 * 1024 * 1024;
22859
+ var DECISION_IDENTITY_VERSION = 7;
22438
22860
  function isRecord(value) {
22439
22861
  return typeof value === "object" && value !== null && !Array.isArray(value);
22440
22862
  }
@@ -22447,6 +22869,7 @@ function parseDaemonResponseEnvelope(value) {
22447
22869
  if (value.error !== void 0 && typeof value.error !== "string") return void 0;
22448
22870
  return {
22449
22871
  id: value.id,
22872
+ ...typeof value.decisionIdentityVersion === "number" ? { decisionIdentityVersion: value.decisionIdentityVersion } : {},
22450
22873
  ok: value.ok,
22451
22874
  ...value.result === void 0 ? {} : { result: value.result },
22452
22875
  ...value.error === void 0 ? {} : { error: value.error }
@@ -22454,6 +22877,8 @@ function parseDaemonResponseEnvelope(value) {
22454
22877
  }
22455
22878
 
22456
22879
  // src/daemon/client.ts
22880
+ import { createConnection } from "net";
22881
+ import { join as join13 } from "path";
22457
22882
  var SOCK_PATH = join13(primConfigDirectory(), "sock");
22458
22883
  var DEFAULT_TIMEOUT_MS2 = 250;
22459
22884
  var nextRequestId = 1;
@@ -22526,7 +22951,9 @@ function daemonRequest(method, params = {}, opts = {}) {
22526
22951
  return;
22527
22952
  }
22528
22953
  clearTimeout(timer);
22529
- settle(res.ok && res.result !== void 0 ? res.result : null);
22954
+ settle(
22955
+ (!(method.startsWith("decisions_") || method.startsWith("decision_")) || res.decisionIdentityVersion === DECISION_IDENTITY_VERSION) && res.ok && res.result !== void 0 ? res.result : null
22956
+ );
22530
22957
  } catch {
22531
22958
  clearTimeout(timer);
22532
22959
  settle(null);
@@ -22547,7 +22974,7 @@ var DECISION_DIGEST_CACHE_LIMIT = 100;
22547
22974
  var DECISION_DIGEST_CACHE_WINDOW = "24h";
22548
22975
  var DECISION_DIGEST_CACHE_PATH = `/api/cli/decisions/recent?limit=${String(DECISION_DIGEST_CACHE_LIMIT)}&since=${DECISION_DIGEST_CACHE_WINDOW}`;
22549
22976
  var DECISION_DRAFT_DIGEST_CACHE_PATH = `${DECISION_DIGEST_CACHE_PATH}&drafts=true`;
22550
- var SAFE_PRIVATE_DRAFT_ID = /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/u;
22977
+ var SAFE_PRIVATE_DRAFT_ID = /^dec_[0-9a-f]{8}$/u;
22551
22978
  function isActionablePrivateDraft(row) {
22552
22979
  if (typeof row !== "object" || row === null || Array.isArray(row)) return false;
22553
22980
  const candidate = row;