@primitive.ai/prim 0.1.0-alpha.111 → 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 +1017 -591
  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 +10 -11
  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
@@ -51,6 +51,83 @@ var require_ucs2length = __commonJS({
51
51
  }
52
52
  });
53
53
 
54
+ // src/decisions/identity.ts
55
+ var PUBLIC_ID = /^dec_[0-9a-f]{8}$/u;
56
+ var BARE_ID = /^[0-9a-f]{8}$/u;
57
+ var OPAQUE_FIELDS = /* @__PURE__ */ new Set([
58
+ "cursor",
59
+ "continueCursor",
60
+ "nextCursor",
61
+ "reviewToken",
62
+ "bypassToken"
63
+ ]);
64
+ function decisionIdentifier(id, shortId) {
65
+ if (typeof id === "string" && PUBLIC_ID.test(id)) return id;
66
+ if (typeof shortId === "string" && BARE_ID.test(shortId)) return `dec_${shortId}`;
67
+ if (typeof id === "string" && BARE_ID.test(id)) return `dec_${id}`;
68
+ return void 0;
69
+ }
70
+ function publicDecisionResponse(value) {
71
+ const replacements = /* @__PURE__ */ new Map();
72
+ const referenceKeys = /* @__PURE__ */ new Set([
73
+ "decisionId",
74
+ "childId",
75
+ "parentId",
76
+ "supersededBy",
77
+ "activationDecisionId"
78
+ ]);
79
+ function visit(input, field = "") {
80
+ if (OPAQUE_FIELDS.has(field) || input === null || input === void 0) return input;
81
+ if (Array.isArray(input)) return input.map((item) => visit(item, field));
82
+ if (typeof input === "string" && (referenceKeys.has(field) || /DecisionIds$/u.test(field))) {
83
+ const id = decisionIdentifier(input);
84
+ if (!id) throw new Error("Decision identity unavailable; update Primitive and retry");
85
+ return id;
86
+ }
87
+ if (typeof input !== "object") return input;
88
+ const row = { ...input };
89
+ for (const [idKey, shortKey] of [
90
+ ["id", "shortId"],
91
+ ["_id", "shortId"],
92
+ ["decisionId", "shortId"],
93
+ ["childId", "childShortId"],
94
+ ["parentId", "parentShortId"]
95
+ ]) {
96
+ if (!(idKey in row) || (idKey === "id" || idKey === "_id") && !("intent" in row || "shortId" in row))
97
+ continue;
98
+ const id = decisionIdentifier(
99
+ row[idKey],
100
+ row[shortKey] ?? (idKey === "decisionId" ? row.decisionShortId : void 0)
101
+ );
102
+ if (!id) throw new Error("Decision identity unavailable; update Primitive and retry");
103
+ const previous = row[idKey];
104
+ if (typeof previous === "string" && !PUBLIC_ID.test(previous) && !BARE_ID.test(previous)) {
105
+ replacements.set(previous, id);
106
+ }
107
+ if (shortKey in row) row[shortKey] = id.slice(4);
108
+ if (idKey === "decisionId" && "decisionShortId" in row) row.decisionShortId = id.slice(4);
109
+ row[idKey] = id;
110
+ }
111
+ return Object.fromEntries(Object.entries(row).map(([key, item]) => [key, visit(item, key)]));
112
+ }
113
+ const projected = visit(value);
114
+ function replace(input, field = "") {
115
+ if (OPAQUE_FIELDS.has(field)) return input;
116
+ if (typeof input === "string") {
117
+ let output = input;
118
+ for (const [raw, id] of replacements) if (raw !== id) output = output.replaceAll(raw, id);
119
+ return output;
120
+ }
121
+ if (Array.isArray(input)) return input.map((item) => replace(item, field));
122
+ if (input && typeof input === "object")
123
+ return Object.fromEntries(
124
+ Object.entries(input).map(([key, item]) => [key, replace(item, key)])
125
+ );
126
+ return input;
127
+ }
128
+ return replace(projected);
129
+ }
130
+
54
131
  // src/client.ts
55
132
  import { createHash as createHash2 } from "crypto";
56
133
  import { chmodSync as chmodSync2, existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync5, rmSync as rmSync3 } from "fs";
@@ -1235,7 +1312,7 @@ async function responseValue(response) {
1235
1312
  const message = typeof errorRecord?.error === "string" ? errorRecord.error : `HTTP ${response.status}`;
1236
1313
  throw new HttpError(response.status, message, errorBody);
1237
1314
  }
1238
- return response.json();
1315
+ return publicDecisionResponse(await response.json());
1239
1316
  }
1240
1317
  async function request(method, path, body, options) {
1241
1318
  const siteUrl = getSiteUrl();
@@ -1666,7 +1743,9 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
1666
1743
  return errors === 0;
1667
1744
  }
1668
1745
  validate22.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
1669
- 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": {} };
1746
+ 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": {} };
1747
+ var pattern4 = new RegExp("^dec_[0-9a-f]{8}$", "u");
1748
+ var pattern5 = new RegExp("^[0-9a-f]{8}$", "u");
1670
1749
  function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
1671
1750
  ;
1672
1751
  let vErrors = null;
@@ -1704,6 +1783,11 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
1704
1783
  if (func1(data1) < 1) {
1705
1784
  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" }];
1706
1785
  return false;
1786
+ } else {
1787
+ if (!pattern4.test(data1)) {
1788
+ 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}$"' }];
1789
+ return false;
1790
+ }
1707
1791
  }
1708
1792
  } else {
1709
1793
  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" }];
@@ -1716,10 +1800,18 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
1716
1800
  }
1717
1801
  if (valid2) {
1718
1802
  if (data0.shortId !== void 0) {
1803
+ let data2 = data0.shortId;
1719
1804
  const _errs8 = errors;
1720
- if (typeof data0.shortId !== "string") {
1721
- 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" }];
1722
- return false;
1805
+ if (errors === _errs8) {
1806
+ if (typeof data2 === "string") {
1807
+ if (!pattern5.test(data2)) {
1808
+ 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}$"' }];
1809
+ return false;
1810
+ }
1811
+ } else {
1812
+ 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" }];
1813
+ return false;
1814
+ }
1723
1815
  }
1724
1816
  var valid2 = _errs8 === errors;
1725
1817
  } else {
@@ -1912,6 +2004,11 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
1912
2004
  if (func1(data16) < 1) {
1913
2005
  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" }];
1914
2006
  return false;
2007
+ } else {
2008
+ if (!pattern4.test(data16)) {
2009
+ 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}$"' }];
2010
+ return false;
2011
+ }
1915
2012
  }
1916
2013
  } else {
1917
2014
  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" }];
@@ -1924,10 +2021,18 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
1924
2021
  }
1925
2022
  if (valid6) {
1926
2023
  if (data15.shortId !== void 0) {
2024
+ let data17 = data15.shortId;
1927
2025
  const _errs40 = errors;
1928
- if (typeof data15.shortId !== "string") {
1929
- 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" }];
1930
- return false;
2026
+ if (errors === _errs40) {
2027
+ if (typeof data17 === "string") {
2028
+ if (!pattern5.test(data17)) {
2029
+ 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}$"' }];
2030
+ return false;
2031
+ }
2032
+ } else {
2033
+ 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" }];
2034
+ return false;
2035
+ }
1931
2036
  }
1932
2037
  var valid6 = _errs40 === errors;
1933
2038
  } else {
@@ -3166,7 +3271,7 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
3166
3271
  return errors === 0;
3167
3272
  }
3168
3273
  validate25.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
3169
- 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": {} }] };
3274
+ 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": {} }] };
3170
3275
  function validate26(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
3171
3276
  ;
3172
3277
  let vErrors = null;
@@ -3206,13 +3311,23 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3206
3311
  vErrors.push(err1);
3207
3312
  }
3208
3313
  errors++;
3314
+ } else {
3315
+ if (!pattern4.test(data0)) {
3316
+ 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}$"' };
3317
+ if (vErrors === null) {
3318
+ vErrors = [err2];
3319
+ } else {
3320
+ vErrors.push(err2);
3321
+ }
3322
+ errors++;
3323
+ }
3209
3324
  }
3210
3325
  } else {
3211
- 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" };
3326
+ 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" };
3212
3327
  if (vErrors === null) {
3213
- vErrors = [err2];
3328
+ vErrors = [err3];
3214
3329
  } else {
3215
- vErrors.push(err2);
3330
+ vErrors.push(err3);
3216
3331
  }
3217
3332
  errors++;
3218
3333
  }
@@ -3223,15 +3338,28 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3223
3338
  }
3224
3339
  if (valid2) {
3225
3340
  if (data.shortId !== void 0) {
3341
+ let data1 = data.shortId;
3226
3342
  const _errs7 = errors;
3227
- if (typeof data.shortId !== "string") {
3228
- 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" };
3229
- if (vErrors === null) {
3230
- vErrors = [err3];
3343
+ if (errors === _errs7) {
3344
+ if (typeof data1 === "string") {
3345
+ if (!pattern5.test(data1)) {
3346
+ 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}$"' };
3347
+ if (vErrors === null) {
3348
+ vErrors = [err4];
3349
+ } else {
3350
+ vErrors.push(err4);
3351
+ }
3352
+ errors++;
3353
+ }
3231
3354
  } else {
3232
- vErrors.push(err3);
3355
+ 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" };
3356
+ if (vErrors === null) {
3357
+ vErrors = [err5];
3358
+ } else {
3359
+ vErrors.push(err5);
3360
+ }
3361
+ errors++;
3233
3362
  }
3234
- errors++;
3235
3363
  }
3236
3364
  var valid2 = _errs7 === errors;
3237
3365
  } else {
@@ -3242,20 +3370,20 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3242
3370
  let data2 = data.outcome;
3243
3371
  const _errs9 = errors;
3244
3372
  if (typeof data2 !== "string") {
3245
- 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" };
3373
+ 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" };
3246
3374
  if (vErrors === null) {
3247
- vErrors = [err4];
3375
+ vErrors = [err6];
3248
3376
  } else {
3249
- vErrors.push(err4);
3377
+ vErrors.push(err6);
3250
3378
  }
3251
3379
  errors++;
3252
3380
  }
3253
3381
  if (!(data2 === "stale" || data2 === "confirmed" || data2 === "corrected")) {
3254
- 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" };
3382
+ 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" };
3255
3383
  if (vErrors === null) {
3256
- vErrors = [err5];
3384
+ vErrors = [err7];
3257
3385
  } else {
3258
- vErrors.push(err5);
3386
+ vErrors.push(err7);
3259
3387
  }
3260
3388
  errors++;
3261
3389
  }
@@ -3267,11 +3395,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3267
3395
  }
3268
3396
  }
3269
3397
  } else {
3270
- 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" };
3398
+ 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" };
3271
3399
  if (vErrors === null) {
3272
- vErrors = [err6];
3400
+ vErrors = [err8];
3273
3401
  } else {
3274
- vErrors.push(err6);
3402
+ vErrors.push(err8);
3275
3403
  }
3276
3404
  errors++;
3277
3405
  }
@@ -3286,11 +3414,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3286
3414
  if (data && typeof data == "object" && !Array.isArray(data)) {
3287
3415
  let missing1;
3288
3416
  if (data.decisionId === void 0 && (missing1 = "decisionId") || data.outcome === void 0 && (missing1 = "outcome") || data.respondedAt === void 0 && (missing1 = "respondedAt")) {
3289
- 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 + "'" };
3417
+ 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 + "'" };
3290
3418
  if (vErrors === null) {
3291
- vErrors = [err7];
3419
+ vErrors = [err9];
3292
3420
  } else {
3293
- vErrors.push(err7);
3421
+ vErrors.push(err9);
3294
3422
  }
3295
3423
  errors++;
3296
3424
  } else {
@@ -3300,20 +3428,30 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3300
3428
  if (errors === _errs14) {
3301
3429
  if (typeof data3 === "string") {
3302
3430
  if (func1(data3) < 1) {
3303
- 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" };
3431
+ 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" };
3304
3432
  if (vErrors === null) {
3305
- vErrors = [err8];
3433
+ vErrors = [err10];
3306
3434
  } else {
3307
- vErrors.push(err8);
3435
+ vErrors.push(err10);
3308
3436
  }
3309
3437
  errors++;
3438
+ } else {
3439
+ if (!pattern4.test(data3)) {
3440
+ 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}$"' };
3441
+ if (vErrors === null) {
3442
+ vErrors = [err11];
3443
+ } else {
3444
+ vErrors.push(err11);
3445
+ }
3446
+ errors++;
3447
+ }
3310
3448
  }
3311
3449
  } else {
3312
- 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" };
3450
+ 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" };
3313
3451
  if (vErrors === null) {
3314
- vErrors = [err9];
3452
+ vErrors = [err12];
3315
3453
  } else {
3316
- vErrors.push(err9);
3454
+ vErrors.push(err12);
3317
3455
  }
3318
3456
  errors++;
3319
3457
  }
@@ -3324,15 +3462,28 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3324
3462
  }
3325
3463
  if (valid3) {
3326
3464
  if (data.shortId !== void 0) {
3465
+ let data4 = data.shortId;
3327
3466
  const _errs16 = errors;
3328
- if (typeof data.shortId !== "string") {
3329
- 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" };
3330
- if (vErrors === null) {
3331
- vErrors = [err10];
3467
+ if (errors === _errs16) {
3468
+ if (typeof data4 === "string") {
3469
+ if (!pattern5.test(data4)) {
3470
+ 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}$"' };
3471
+ if (vErrors === null) {
3472
+ vErrors = [err13];
3473
+ } else {
3474
+ vErrors.push(err13);
3475
+ }
3476
+ errors++;
3477
+ }
3332
3478
  } else {
3333
- vErrors.push(err10);
3479
+ 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" };
3480
+ if (vErrors === null) {
3481
+ vErrors = [err14];
3482
+ } else {
3483
+ vErrors.push(err14);
3484
+ }
3485
+ errors++;
3334
3486
  }
3335
- errors++;
3336
3487
  }
3337
3488
  var valid3 = _errs16 === errors;
3338
3489
  } else {
@@ -3343,20 +3494,20 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3343
3494
  let data5 = data.outcome;
3344
3495
  const _errs18 = errors;
3345
3496
  if (typeof data5 !== "string") {
3346
- 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" };
3497
+ 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" };
3347
3498
  if (vErrors === null) {
3348
- vErrors = [err11];
3499
+ vErrors = [err15];
3349
3500
  } else {
3350
- vErrors.push(err11);
3501
+ vErrors.push(err15);
3351
3502
  }
3352
3503
  errors++;
3353
3504
  }
3354
3505
  if ("already_responded" !== data5) {
3355
- 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" };
3506
+ 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" };
3356
3507
  if (vErrors === null) {
3357
- vErrors = [err12];
3508
+ vErrors = [err16];
3358
3509
  } else {
3359
- vErrors.push(err12);
3510
+ vErrors.push(err16);
3360
3511
  }
3361
3512
  errors++;
3362
3513
  }
@@ -3368,11 +3519,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3368
3519
  if (data.confirmed !== void 0) {
3369
3520
  const _errs20 = errors;
3370
3521
  if (typeof data.confirmed !== "boolean") {
3371
- 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" };
3522
+ 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" };
3372
3523
  if (vErrors === null) {
3373
- vErrors = [err13];
3524
+ vErrors = [err17];
3374
3525
  } else {
3375
- vErrors.push(err13);
3526
+ vErrors.push(err17);
3376
3527
  }
3377
3528
  errors++;
3378
3529
  }
@@ -3385,11 +3536,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3385
3536
  let data7 = data.respondedAt;
3386
3537
  const _errs22 = errors;
3387
3538
  if (!(typeof data7 == "number" && isFinite(data7))) {
3388
- 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" };
3539
+ 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" };
3389
3540
  if (vErrors === null) {
3390
- vErrors = [err14];
3541
+ vErrors = [err18];
3391
3542
  } else {
3392
- vErrors.push(err14);
3543
+ vErrors.push(err18);
3393
3544
  }
3394
3545
  errors++;
3395
3546
  }
@@ -3403,11 +3554,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3403
3554
  }
3404
3555
  }
3405
3556
  } else {
3406
- 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" };
3557
+ 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" };
3407
3558
  if (vErrors === null) {
3408
- vErrors = [err15];
3559
+ vErrors = [err19];
3409
3560
  } else {
3410
- vErrors.push(err15);
3561
+ vErrors.push(err19);
3411
3562
  }
3412
3563
  errors++;
3413
3564
  }
@@ -3424,11 +3575,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3424
3575
  if (data && typeof data == "object" && !Array.isArray(data)) {
3425
3576
  let missing2;
3426
3577
  if (data.decisionId === void 0 && (missing2 = "decisionId") || data.outcome === void 0 && (missing2 = "outcome")) {
3427
- 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 + "'" };
3578
+ 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 + "'" };
3428
3579
  if (vErrors === null) {
3429
- vErrors = [err16];
3580
+ vErrors = [err20];
3430
3581
  } else {
3431
- vErrors.push(err16);
3582
+ vErrors.push(err20);
3432
3583
  }
3433
3584
  errors++;
3434
3585
  } else {
@@ -3438,20 +3589,30 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3438
3589
  if (errors === _errs27) {
3439
3590
  if (typeof data8 === "string") {
3440
3591
  if (func1(data8) < 1) {
3441
- 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" };
3592
+ 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" };
3442
3593
  if (vErrors === null) {
3443
- vErrors = [err17];
3594
+ vErrors = [err21];
3444
3595
  } else {
3445
- vErrors.push(err17);
3596
+ vErrors.push(err21);
3446
3597
  }
3447
3598
  errors++;
3599
+ } else {
3600
+ if (!pattern4.test(data8)) {
3601
+ 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}$"' };
3602
+ if (vErrors === null) {
3603
+ vErrors = [err22];
3604
+ } else {
3605
+ vErrors.push(err22);
3606
+ }
3607
+ errors++;
3608
+ }
3448
3609
  }
3449
3610
  } else {
3450
- 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" };
3611
+ 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" };
3451
3612
  if (vErrors === null) {
3452
- vErrors = [err18];
3613
+ vErrors = [err23];
3453
3614
  } else {
3454
- vErrors.push(err18);
3615
+ vErrors.push(err23);
3455
3616
  }
3456
3617
  errors++;
3457
3618
  }
@@ -3462,15 +3623,28 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3462
3623
  }
3463
3624
  if (valid4) {
3464
3625
  if (data.shortId !== void 0) {
3626
+ let data9 = data.shortId;
3465
3627
  const _errs29 = errors;
3466
- if (typeof data.shortId !== "string") {
3467
- 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" };
3468
- if (vErrors === null) {
3469
- vErrors = [err19];
3628
+ if (errors === _errs29) {
3629
+ if (typeof data9 === "string") {
3630
+ if (!pattern5.test(data9)) {
3631
+ 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}$"' };
3632
+ if (vErrors === null) {
3633
+ vErrors = [err24];
3634
+ } else {
3635
+ vErrors.push(err24);
3636
+ }
3637
+ errors++;
3638
+ }
3470
3639
  } else {
3471
- vErrors.push(err19);
3640
+ 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" };
3641
+ if (vErrors === null) {
3642
+ vErrors = [err25];
3643
+ } else {
3644
+ vErrors.push(err25);
3645
+ }
3646
+ errors++;
3472
3647
  }
3473
- errors++;
3474
3648
  }
3475
3649
  var valid4 = _errs29 === errors;
3476
3650
  } else {
@@ -3481,20 +3655,20 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3481
3655
  let data10 = data.outcome;
3482
3656
  const _errs31 = errors;
3483
3657
  if (typeof data10 !== "string") {
3484
- 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" };
3658
+ 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" };
3485
3659
  if (vErrors === null) {
3486
- vErrors = [err20];
3660
+ vErrors = [err26];
3487
3661
  } else {
3488
- vErrors.push(err20);
3662
+ vErrors.push(err26);
3489
3663
  }
3490
3664
  errors++;
3491
3665
  }
3492
3666
  if ("no_pending_prompt" !== data10) {
3493
- 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" };
3667
+ 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" };
3494
3668
  if (vErrors === null) {
3495
- vErrors = [err21];
3669
+ vErrors = [err27];
3496
3670
  } else {
3497
- vErrors.push(err21);
3671
+ vErrors.push(err27);
3498
3672
  }
3499
3673
  errors++;
3500
3674
  }
@@ -3506,11 +3680,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3506
3680
  }
3507
3681
  }
3508
3682
  } else {
3509
- 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" };
3683
+ 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" };
3510
3684
  if (vErrors === null) {
3511
- vErrors = [err22];
3685
+ vErrors = [err28];
3512
3686
  } else {
3513
- vErrors.push(err22);
3687
+ vErrors.push(err28);
3514
3688
  }
3515
3689
  errors++;
3516
3690
  }
@@ -3523,11 +3697,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3523
3697
  }
3524
3698
  }
3525
3699
  if (!valid1) {
3526
- 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" };
3700
+ 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" };
3527
3701
  if (vErrors === null) {
3528
- vErrors = [err23];
3702
+ vErrors = [err29];
3529
3703
  } else {
3530
- vErrors.push(err23);
3704
+ vErrors.push(err29);
3531
3705
  }
3532
3706
  errors++;
3533
3707
  validate26.errors = vErrors;
@@ -4496,7 +4670,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
4496
4670
  return errors === 0;
4497
4671
  }
4498
4672
  validate27.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
4499
- 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": {} };
4673
+ 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": {} };
4500
4674
  function validate28(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
4501
4675
  ;
4502
4676
  let vErrors = null;
@@ -4524,6 +4698,11 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
4524
4698
  if (func1(data0) < 1) {
4525
4699
  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" }];
4526
4700
  return false;
4701
+ } else {
4702
+ if (!pattern4.test(data0)) {
4703
+ 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}$"' }];
4704
+ return false;
4705
+ }
4527
4706
  }
4528
4707
  } else {
4529
4708
  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" }];
@@ -4536,10 +4715,18 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
4536
4715
  }
4537
4716
  if (valid1) {
4538
4717
  if (data.shortId !== void 0) {
4718
+ let data1 = data.shortId;
4539
4719
  const _errs5 = errors;
4540
- if (typeof data.shortId !== "string") {
4541
- 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" }];
4542
- return false;
4720
+ if (errors === _errs5) {
4721
+ if (typeof data1 === "string") {
4722
+ if (!pattern5.test(data1)) {
4723
+ 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}$"' }];
4724
+ return false;
4725
+ }
4726
+ } else {
4727
+ 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" }];
4728
+ return false;
4729
+ }
4543
4730
  }
4544
4731
  var valid1 = _errs5 === errors;
4545
4732
  } else {
@@ -5281,7 +5468,7 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
5281
5468
  return errors === 0;
5282
5469
  }
5283
5470
  validate28.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
5284
- 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": {} };
5471
+ 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": {} };
5285
5472
  function validate29(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
5286
5473
  ;
5287
5474
  let vErrors = null;
@@ -5319,6 +5506,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5319
5506
  if (func1(data1) < 1) {
5320
5507
  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" }];
5321
5508
  return false;
5509
+ } else {
5510
+ if (!pattern4.test(data1)) {
5511
+ 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}$"' }];
5512
+ return false;
5513
+ }
5322
5514
  }
5323
5515
  } else {
5324
5516
  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" }];
@@ -5331,10 +5523,18 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5331
5523
  }
5332
5524
  if (valid2) {
5333
5525
  if (data0.shortId !== void 0) {
5526
+ let data2 = data0.shortId;
5334
5527
  const _errs8 = errors;
5335
- if (typeof data0.shortId !== "string") {
5336
- 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" }];
5337
- return false;
5528
+ if (errors === _errs8) {
5529
+ if (typeof data2 === "string") {
5530
+ if (!pattern5.test(data2)) {
5531
+ 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}$"' }];
5532
+ return false;
5533
+ }
5534
+ } else {
5535
+ 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" }];
5536
+ return false;
5537
+ }
5338
5538
  }
5339
5539
  var valid2 = _errs8 === errors;
5340
5540
  } else {
@@ -5505,13 +5705,23 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5505
5705
  vErrors.push(err0);
5506
5706
  }
5507
5707
  errors++;
5708
+ } else {
5709
+ if (!pattern4.test(data14)) {
5710
+ 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}$"' };
5711
+ if (vErrors === null) {
5712
+ vErrors = [err1];
5713
+ } else {
5714
+ vErrors.push(err1);
5715
+ }
5716
+ errors++;
5717
+ }
5508
5718
  }
5509
5719
  } else {
5510
- 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" };
5720
+ 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" };
5511
5721
  if (vErrors === null) {
5512
- vErrors = [err1];
5722
+ vErrors = [err2];
5513
5723
  } else {
5514
- vErrors.push(err1);
5724
+ vErrors.push(err2);
5515
5725
  }
5516
5726
  errors++;
5517
5727
  }
@@ -5520,22 +5730,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5520
5730
  valid5 = valid5 || _valid0;
5521
5731
  const _errs36 = errors;
5522
5732
  if (data14 !== null) {
5523
- 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" };
5733
+ 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" };
5524
5734
  if (vErrors === null) {
5525
- vErrors = [err2];
5735
+ vErrors = [err3];
5526
5736
  } else {
5527
- vErrors.push(err2);
5737
+ vErrors.push(err3);
5528
5738
  }
5529
5739
  errors++;
5530
5740
  }
5531
5741
  var _valid0 = _errs36 === errors;
5532
5742
  valid5 = valid5 || _valid0;
5533
5743
  if (!valid5) {
5534
- 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" };
5744
+ 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" };
5535
5745
  if (vErrors === null) {
5536
- vErrors = [err3];
5746
+ vErrors = [err4];
5537
5747
  } else {
5538
- vErrors.push(err3);
5748
+ vErrors.push(err4);
5539
5749
  }
5540
5750
  errors++;
5541
5751
  validate29.errors = vErrors;
@@ -5841,6 +6051,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5841
6051
  if (func1(data34) < 1) {
5842
6052
  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" }];
5843
6053
  return false;
6054
+ } else {
6055
+ if (!pattern4.test(data34)) {
6056
+ 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}$"' }];
6057
+ return false;
6058
+ }
5844
6059
  }
5845
6060
  } else {
5846
6061
  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" }];
@@ -5853,10 +6068,18 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5853
6068
  }
5854
6069
  if (valid10) {
5855
6070
  if (data33.shortId !== void 0) {
6071
+ let data35 = data33.shortId;
5856
6072
  const _errs80 = errors;
5857
- if (typeof data33.shortId !== "string") {
5858
- 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" }];
5859
- return false;
6073
+ if (errors === _errs80) {
6074
+ if (typeof data35 === "string") {
6075
+ if (!pattern5.test(data35)) {
6076
+ 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}$"' }];
6077
+ return false;
6078
+ }
6079
+ } else {
6080
+ 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" }];
6081
+ return false;
6082
+ }
5860
6083
  }
5861
6084
  var valid10 = _errs80 === errors;
5862
6085
  } else {
@@ -5975,6 +6198,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5975
6198
  if (func1(data43) < 1) {
5976
6199
  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" }];
5977
6200
  return false;
6201
+ } else {
6202
+ if (!pattern4.test(data43)) {
6203
+ 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}$"' }];
6204
+ return false;
6205
+ }
5978
6206
  }
5979
6207
  } else {
5980
6208
  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" }];
@@ -5987,10 +6215,18 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
5987
6215
  }
5988
6216
  if (valid12) {
5989
6217
  if (data42.shortId !== void 0) {
6218
+ let data44 = data42.shortId;
5990
6219
  const _errs99 = errors;
5991
- if (typeof data42.shortId !== "string") {
5992
- 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" }];
5993
- return false;
6220
+ if (errors === _errs99) {
6221
+ if (typeof data44 === "string") {
6222
+ if (!pattern5.test(data44)) {
6223
+ 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}$"' }];
6224
+ return false;
6225
+ }
6226
+ } else {
6227
+ 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" }];
6228
+ return false;
6229
+ }
5994
6230
  }
5995
6231
  var valid12 = _errs99 === errors;
5996
6232
  } else {
@@ -6312,22 +6548,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6312
6548
  if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
6313
6549
  let missing7;
6314
6550
  if (data64.kind === void 0 && (missing7 = "kind") || data64.userId === void 0 && (missing7 = "userId") || data64.displayName === void 0 && (missing7 = "displayName")) {
6315
- 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 + "'" };
6551
+ 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 + "'" };
6316
6552
  if (vErrors === null) {
6317
- vErrors = [err4];
6553
+ vErrors = [err5];
6318
6554
  } else {
6319
- vErrors.push(err4);
6555
+ vErrors.push(err5);
6320
6556
  }
6321
6557
  errors++;
6322
6558
  } else {
6323
6559
  const _errs146 = errors;
6324
6560
  for (const key0 in data64) {
6325
6561
  if (!(key0 === "kind" || key0 === "userId" || key0 === "displayName")) {
6326
- 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" };
6562
+ 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" };
6327
6563
  if (vErrors === null) {
6328
- vErrors = [err5];
6564
+ vErrors = [err6];
6329
6565
  } else {
6330
- vErrors.push(err5);
6566
+ vErrors.push(err6);
6331
6567
  }
6332
6568
  errors++;
6333
6569
  break;
@@ -6338,20 +6574,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6338
6574
  let data65 = data64.kind;
6339
6575
  const _errs147 = errors;
6340
6576
  if (typeof data65 !== "string") {
6341
- 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" };
6577
+ 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" };
6342
6578
  if (vErrors === null) {
6343
- vErrors = [err6];
6579
+ vErrors = [err7];
6344
6580
  } else {
6345
- vErrors.push(err6);
6581
+ vErrors.push(err7);
6346
6582
  }
6347
6583
  errors++;
6348
6584
  }
6349
6585
  if ("user" !== data65) {
6350
- 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" };
6586
+ 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" };
6351
6587
  if (vErrors === null) {
6352
- vErrors = [err7];
6588
+ vErrors = [err8];
6353
6589
  } else {
6354
- vErrors.push(err7);
6590
+ vErrors.push(err8);
6355
6591
  }
6356
6592
  errors++;
6357
6593
  }
@@ -6366,20 +6602,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6366
6602
  if (errors === _errs149) {
6367
6603
  if (typeof data66 === "string") {
6368
6604
  if (func1(data66) < 1) {
6369
- 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" };
6605
+ 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" };
6370
6606
  if (vErrors === null) {
6371
- vErrors = [err8];
6607
+ vErrors = [err9];
6372
6608
  } else {
6373
- vErrors.push(err8);
6609
+ vErrors.push(err9);
6374
6610
  }
6375
6611
  errors++;
6376
6612
  }
6377
6613
  } else {
6378
- 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" };
6614
+ 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" };
6379
6615
  if (vErrors === null) {
6380
- vErrors = [err9];
6616
+ vErrors = [err10];
6381
6617
  } else {
6382
- vErrors.push(err9);
6618
+ vErrors.push(err10);
6383
6619
  }
6384
6620
  errors++;
6385
6621
  }
@@ -6392,11 +6628,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6392
6628
  if (data64.displayName !== void 0) {
6393
6629
  const _errs151 = errors;
6394
6630
  if (typeof data64.displayName !== "string") {
6395
- 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" };
6631
+ 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" };
6396
6632
  if (vErrors === null) {
6397
- vErrors = [err10];
6633
+ vErrors = [err11];
6398
6634
  } else {
6399
- vErrors.push(err10);
6635
+ vErrors.push(err11);
6400
6636
  }
6401
6637
  errors++;
6402
6638
  }
@@ -6409,11 +6645,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6409
6645
  }
6410
6646
  }
6411
6647
  } else {
6412
- 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" };
6648
+ 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" };
6413
6649
  if (vErrors === null) {
6414
- vErrors = [err11];
6650
+ vErrors = [err12];
6415
6651
  } else {
6416
- vErrors.push(err11);
6652
+ vErrors.push(err12);
6417
6653
  }
6418
6654
  errors++;
6419
6655
  }
@@ -6429,22 +6665,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6429
6665
  if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
6430
6666
  let missing8;
6431
6667
  if (data64.kind === void 0 && (missing8 = "kind") || data64.role === void 0 && (missing8 = "role")) {
6432
- 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 + "'" };
6668
+ 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 + "'" };
6433
6669
  if (vErrors === null) {
6434
- vErrors = [err12];
6670
+ vErrors = [err13];
6435
6671
  } else {
6436
- vErrors.push(err12);
6672
+ vErrors.push(err13);
6437
6673
  }
6438
6674
  errors++;
6439
6675
  } else {
6440
6676
  const _errs155 = errors;
6441
6677
  for (const key1 in data64) {
6442
6678
  if (!(key1 === "kind" || key1 === "role")) {
6443
- 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" };
6679
+ 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" };
6444
6680
  if (vErrors === null) {
6445
- vErrors = [err13];
6681
+ vErrors = [err14];
6446
6682
  } else {
6447
- vErrors.push(err13);
6683
+ vErrors.push(err14);
6448
6684
  }
6449
6685
  errors++;
6450
6686
  break;
@@ -6455,20 +6691,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6455
6691
  let data68 = data64.kind;
6456
6692
  const _errs156 = errors;
6457
6693
  if (typeof data68 !== "string") {
6458
- 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" };
6694
+ 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" };
6459
6695
  if (vErrors === null) {
6460
- vErrors = [err14];
6696
+ vErrors = [err15];
6461
6697
  } else {
6462
- vErrors.push(err14);
6698
+ vErrors.push(err15);
6463
6699
  }
6464
6700
  errors++;
6465
6701
  }
6466
6702
  if ("role" !== data68) {
6467
- 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" };
6703
+ 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" };
6468
6704
  if (vErrors === null) {
6469
- vErrors = [err15];
6705
+ vErrors = [err16];
6470
6706
  } else {
6471
- vErrors.push(err15);
6707
+ vErrors.push(err16);
6472
6708
  }
6473
6709
  errors++;
6474
6710
  }
@@ -6481,20 +6717,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6481
6717
  let data69 = data64.role;
6482
6718
  const _errs158 = errors;
6483
6719
  if (typeof data69 !== "string") {
6484
- 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" };
6720
+ 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" };
6485
6721
  if (vErrors === null) {
6486
- vErrors = [err16];
6722
+ vErrors = [err17];
6487
6723
  } else {
6488
- vErrors.push(err16);
6724
+ vErrors.push(err17);
6489
6725
  }
6490
6726
  errors++;
6491
6727
  }
6492
6728
  if (!(data69 === "owner" || data69 === "admin" || data69 === "member")) {
6493
- 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" };
6729
+ 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" };
6494
6730
  if (vErrors === null) {
6495
- vErrors = [err17];
6731
+ vErrors = [err18];
6496
6732
  } else {
6497
- vErrors.push(err17);
6733
+ vErrors.push(err18);
6498
6734
  }
6499
6735
  errors++;
6500
6736
  }
@@ -6506,11 +6742,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6506
6742
  }
6507
6743
  }
6508
6744
  } else {
6509
- 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" };
6745
+ 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" };
6510
6746
  if (vErrors === null) {
6511
- vErrors = [err18];
6747
+ vErrors = [err19];
6512
6748
  } else {
6513
- vErrors.push(err18);
6749
+ vErrors.push(err19);
6514
6750
  }
6515
6751
  errors++;
6516
6752
  }
@@ -6532,22 +6768,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6532
6768
  if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
6533
6769
  let missing9;
6534
6770
  if (data64.kind === void 0 && (missing9 = "kind") || data64.agent === void 0 && (missing9 = "agent")) {
6535
- 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 + "'" };
6771
+ 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 + "'" };
6536
6772
  if (vErrors === null) {
6537
- vErrors = [err19];
6773
+ vErrors = [err20];
6538
6774
  } else {
6539
- vErrors.push(err19);
6775
+ vErrors.push(err20);
6540
6776
  }
6541
6777
  errors++;
6542
6778
  } else {
6543
6779
  const _errs162 = errors;
6544
6780
  for (const key2 in data64) {
6545
6781
  if (!(key2 === "kind" || key2 === "agent")) {
6546
- 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" };
6782
+ 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" };
6547
6783
  if (vErrors === null) {
6548
- vErrors = [err20];
6784
+ vErrors = [err21];
6549
6785
  } else {
6550
- vErrors.push(err20);
6786
+ vErrors.push(err21);
6551
6787
  }
6552
6788
  errors++;
6553
6789
  break;
@@ -6558,20 +6794,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6558
6794
  let data70 = data64.kind;
6559
6795
  const _errs163 = errors;
6560
6796
  if (typeof data70 !== "string") {
6561
- 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" };
6797
+ 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" };
6562
6798
  if (vErrors === null) {
6563
- vErrors = [err21];
6799
+ vErrors = [err22];
6564
6800
  } else {
6565
- vErrors.push(err21);
6801
+ vErrors.push(err22);
6566
6802
  }
6567
6803
  errors++;
6568
6804
  }
6569
6805
  if ("agent" !== data70) {
6570
- 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" };
6806
+ 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" };
6571
6807
  if (vErrors === null) {
6572
- vErrors = [err22];
6808
+ vErrors = [err23];
6573
6809
  } else {
6574
- vErrors.push(err22);
6810
+ vErrors.push(err23);
6575
6811
  }
6576
6812
  errors++;
6577
6813
  }
@@ -6584,20 +6820,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6584
6820
  let data71 = data64.agent;
6585
6821
  const _errs165 = errors;
6586
6822
  if (typeof data71 !== "string") {
6587
- 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" };
6823
+ 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" };
6588
6824
  if (vErrors === null) {
6589
- vErrors = [err23];
6825
+ vErrors = [err24];
6590
6826
  } else {
6591
- vErrors.push(err23);
6827
+ vErrors.push(err24);
6592
6828
  }
6593
6829
  errors++;
6594
6830
  }
6595
6831
  if (!(data71 === "claude_code" || data71 === "codex" || data71 === "cursor" || data71 === "hermes")) {
6596
- 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" };
6832
+ 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" };
6597
6833
  if (vErrors === null) {
6598
- vErrors = [err24];
6834
+ vErrors = [err25];
6599
6835
  } else {
6600
- vErrors.push(err24);
6836
+ vErrors.push(err25);
6601
6837
  }
6602
6838
  errors++;
6603
6839
  }
@@ -6609,11 +6845,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6609
6845
  }
6610
6846
  }
6611
6847
  } else {
6612
- 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" };
6848
+ 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" };
6613
6849
  if (vErrors === null) {
6614
- vErrors = [err25];
6850
+ vErrors = [err26];
6615
6851
  } else {
6616
- vErrors.push(err25);
6852
+ vErrors.push(err26);
6617
6853
  }
6618
6854
  errors++;
6619
6855
  }
@@ -6635,22 +6871,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6635
6871
  if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
6636
6872
  let missing10;
6637
6873
  if (data64.kind === void 0 && (missing10 = "kind") || data64.credential === void 0 && (missing10 = "credential")) {
6638
- 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 + "'" };
6874
+ 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 + "'" };
6639
6875
  if (vErrors === null) {
6640
- vErrors = [err26];
6876
+ vErrors = [err27];
6641
6877
  } else {
6642
- vErrors.push(err26);
6878
+ vErrors.push(err27);
6643
6879
  }
6644
6880
  errors++;
6645
6881
  } else {
6646
6882
  const _errs169 = errors;
6647
6883
  for (const key3 in data64) {
6648
6884
  if (!(key3 === "kind" || key3 === "credential")) {
6649
- 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" };
6885
+ 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" };
6650
6886
  if (vErrors === null) {
6651
- vErrors = [err27];
6887
+ vErrors = [err28];
6652
6888
  } else {
6653
- vErrors.push(err27);
6889
+ vErrors.push(err28);
6654
6890
  }
6655
6891
  errors++;
6656
6892
  break;
@@ -6661,20 +6897,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6661
6897
  let data72 = data64.kind;
6662
6898
  const _errs170 = errors;
6663
6899
  if (typeof data72 !== "string") {
6664
- 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" };
6900
+ 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" };
6665
6901
  if (vErrors === null) {
6666
- vErrors = [err28];
6902
+ vErrors = [err29];
6667
6903
  } else {
6668
- vErrors.push(err28);
6904
+ vErrors.push(err29);
6669
6905
  }
6670
6906
  errors++;
6671
6907
  }
6672
6908
  if ("credential" !== data72) {
6673
- 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" };
6909
+ 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" };
6674
6910
  if (vErrors === null) {
6675
- vErrors = [err29];
6911
+ vErrors = [err30];
6676
6912
  } else {
6677
- vErrors.push(err29);
6913
+ vErrors.push(err30);
6678
6914
  }
6679
6915
  errors++;
6680
6916
  }
@@ -6687,20 +6923,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6687
6923
  let data73 = data64.credential;
6688
6924
  const _errs172 = errors;
6689
6925
  if (typeof data73 !== "string") {
6690
- 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" };
6926
+ 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" };
6691
6927
  if (vErrors === null) {
6692
- vErrors = [err30];
6928
+ vErrors = [err31];
6693
6929
  } else {
6694
- vErrors.push(err30);
6930
+ vErrors.push(err31);
6695
6931
  }
6696
6932
  errors++;
6697
6933
  }
6698
6934
  if (!(data73 === "workos_jwt" || data73 === "workos_api_key" || data73 === "service_token")) {
6699
- 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" };
6935
+ 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" };
6700
6936
  if (vErrors === null) {
6701
- vErrors = [err31];
6937
+ vErrors = [err32];
6702
6938
  } else {
6703
- vErrors.push(err31);
6939
+ vErrors.push(err32);
6704
6940
  }
6705
6941
  errors++;
6706
6942
  }
@@ -6712,11 +6948,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6712
6948
  }
6713
6949
  }
6714
6950
  } else {
6715
- 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" };
6951
+ 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" };
6716
6952
  if (vErrors === null) {
6717
- vErrors = [err32];
6953
+ vErrors = [err33];
6718
6954
  } else {
6719
- vErrors.push(err32);
6955
+ vErrors.push(err33);
6720
6956
  }
6721
6957
  errors++;
6722
6958
  }
@@ -6737,11 +6973,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
6737
6973
  }
6738
6974
  }
6739
6975
  if (!valid20) {
6740
- 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" };
6976
+ 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" };
6741
6977
  if (vErrors === null) {
6742
- vErrors = [err33];
6978
+ vErrors = [err34];
6743
6979
  } else {
6744
- vErrors.push(err33);
6980
+ vErrors.push(err34);
6745
6981
  }
6746
6982
  errors++;
6747
6983
  validate29.errors = vErrors;
@@ -7044,7 +7280,7 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
7044
7280
  return errors === 0;
7045
7281
  }
7046
7282
  validate32.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
7047
- 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": {} };
7283
+ 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": {} };
7048
7284
  function validate33(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
7049
7285
  ;
7050
7286
  let vErrors = null;
@@ -7088,6 +7324,11 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
7088
7324
  if (func1(data1) < 1) {
7089
7325
  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" }];
7090
7326
  return false;
7327
+ } else {
7328
+ if (!pattern4.test(data1)) {
7329
+ 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}$"' }];
7330
+ return false;
7331
+ }
7091
7332
  }
7092
7333
  } else {
7093
7334
  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" }];
@@ -7100,10 +7341,18 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
7100
7341
  }
7101
7342
  if (valid1) {
7102
7343
  if (data.childShortId !== void 0) {
7344
+ let data2 = data.childShortId;
7103
7345
  const _errs7 = errors;
7104
- if (typeof data.childShortId !== "string") {
7105
- 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" }];
7106
- return false;
7346
+ if (errors === _errs7) {
7347
+ if (typeof data2 === "string") {
7348
+ if (!pattern5.test(data2)) {
7349
+ 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}$"' }];
7350
+ return false;
7351
+ }
7352
+ } else {
7353
+ 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" }];
7354
+ return false;
7355
+ }
7107
7356
  }
7108
7357
  var valid1 = _errs7 === errors;
7109
7358
  } else {
@@ -7118,6 +7367,11 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
7118
7367
  if (func1(data3) < 1) {
7119
7368
  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" }];
7120
7369
  return false;
7370
+ } else {
7371
+ if (!pattern4.test(data3)) {
7372
+ 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}$"' }];
7373
+ return false;
7374
+ }
7121
7375
  }
7122
7376
  } else {
7123
7377
  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" }];
@@ -7130,10 +7384,18 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
7130
7384
  }
7131
7385
  if (valid1) {
7132
7386
  if (data.parentShortId !== void 0) {
7387
+ let data4 = data.parentShortId;
7133
7388
  const _errs11 = errors;
7134
- if (typeof data.parentShortId !== "string") {
7135
- 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" }];
7136
- return false;
7389
+ if (errors === _errs11) {
7390
+ if (typeof data4 === "string") {
7391
+ if (!pattern5.test(data4)) {
7392
+ 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}$"' }];
7393
+ return false;
7394
+ }
7395
+ } else {
7396
+ 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" }];
7397
+ return false;
7398
+ }
7137
7399
  }
7138
7400
  var valid1 = _errs11 === errors;
7139
7401
  } else {
@@ -8049,7 +8311,7 @@ function validate34(data, { instancePath = "", parentData, parentDataProperty, r
8049
8311
  return errors === 0;
8050
8312
  }
8051
8313
  validate34.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
8052
- 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": {} }] };
8314
+ 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": {} }] };
8053
8315
  function validate35(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
8054
8316
  ;
8055
8317
  let vErrors = null;
@@ -9021,13 +9283,23 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9021
9283
  vErrors.push(err61);
9022
9284
  }
9023
9285
  errors++;
9286
+ } else {
9287
+ if (!pattern4.test(data28)) {
9288
+ 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}$"' };
9289
+ if (vErrors === null) {
9290
+ vErrors = [err62];
9291
+ } else {
9292
+ vErrors.push(err62);
9293
+ }
9294
+ errors++;
9295
+ }
9024
9296
  }
9025
9297
  } else {
9026
- 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" };
9298
+ 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" };
9027
9299
  if (vErrors === null) {
9028
- vErrors = [err62];
9300
+ vErrors = [err63];
9029
9301
  } else {
9030
- vErrors.push(err62);
9302
+ vErrors.push(err63);
9031
9303
  }
9032
9304
  errors++;
9033
9305
  }
@@ -9038,15 +9310,28 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9038
9310
  }
9039
9311
  if (valid16) {
9040
9312
  if (data.shortId !== void 0) {
9313
+ let data29 = data.shortId;
9041
9314
  const _errs81 = errors;
9042
- if (typeof data.shortId !== "string") {
9043
- 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" };
9044
- if (vErrors === null) {
9045
- vErrors = [err63];
9315
+ if (errors === _errs81) {
9316
+ if (typeof data29 === "string") {
9317
+ if (!pattern5.test(data29)) {
9318
+ 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}$"' };
9319
+ if (vErrors === null) {
9320
+ vErrors = [err64];
9321
+ } else {
9322
+ vErrors.push(err64);
9323
+ }
9324
+ errors++;
9325
+ }
9046
9326
  } else {
9047
- vErrors.push(err63);
9327
+ 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" };
9328
+ if (vErrors === null) {
9329
+ vErrors = [err65];
9330
+ } else {
9331
+ vErrors.push(err65);
9332
+ }
9333
+ errors++;
9048
9334
  }
9049
- errors++;
9050
9335
  }
9051
9336
  var valid16 = _errs81 === errors;
9052
9337
  } else {
@@ -9057,20 +9342,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9057
9342
  let data30 = data.stage;
9058
9343
  const _errs83 = errors;
9059
9344
  if (typeof data30 !== "string") {
9060
- 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" };
9345
+ 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" };
9061
9346
  if (vErrors === null) {
9062
- vErrors = [err64];
9347
+ vErrors = [err66];
9063
9348
  } else {
9064
- vErrors.push(err64);
9349
+ vErrors.push(err66);
9065
9350
  }
9066
9351
  errors++;
9067
9352
  }
9068
9353
  if (!(data30 === "draft" || data30 === "provisional" || data30 === "adopted" || data30 === "superseded" || data30 === "abandoned")) {
9069
- 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" };
9354
+ 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" };
9070
9355
  if (vErrors === null) {
9071
- vErrors = [err65];
9356
+ vErrors = [err67];
9072
9357
  } else {
9073
- vErrors.push(err65);
9358
+ vErrors.push(err67);
9074
9359
  }
9075
9360
  errors++;
9076
9361
  }
@@ -9086,11 +9371,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9086
9371
  if (data31 && typeof data31 == "object" && !Array.isArray(data31)) {
9087
9372
  let missing8;
9088
9373
  if (data31.location === void 0 && (missing8 = "location") || data31.time === void 0 && (missing8 = "time") || data31.users === void 0 && (missing8 = "users")) {
9089
- 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 + "'" };
9374
+ 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 + "'" };
9090
9375
  if (vErrors === null) {
9091
- vErrors = [err66];
9376
+ vErrors = [err68];
9092
9377
  } else {
9093
- vErrors.push(err66);
9378
+ vErrors.push(err68);
9094
9379
  }
9095
9380
  errors++;
9096
9381
  } else {
@@ -9101,11 +9386,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9101
9386
  if (data32 && typeof data32 == "object" && !Array.isArray(data32)) {
9102
9387
  let missing9;
9103
9388
  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")) {
9104
- 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 + "'" };
9389
+ 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 + "'" };
9105
9390
  if (vErrors === null) {
9106
- vErrors = [err67];
9391
+ vErrors = [err69];
9107
9392
  } else {
9108
- vErrors.push(err67);
9393
+ vErrors.push(err69);
9109
9394
  }
9110
9395
  errors++;
9111
9396
  } else {
@@ -9113,20 +9398,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9113
9398
  let data33 = data32.mode;
9114
9399
  const _errs91 = errors;
9115
9400
  if (typeof data33 !== "string") {
9116
- 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" };
9401
+ 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" };
9117
9402
  if (vErrors === null) {
9118
- vErrors = [err68];
9403
+ vErrors = [err70];
9119
9404
  } else {
9120
- vErrors.push(err68);
9405
+ vErrors.push(err70);
9121
9406
  }
9122
9407
  errors++;
9123
9408
  }
9124
9409
  if (!(data33 === "inherited" || data33 === "explicit")) {
9125
- 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" };
9410
+ 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" };
9126
9411
  if (vErrors === null) {
9127
- vErrors = [err69];
9412
+ vErrors = [err71];
9128
9413
  } else {
9129
- vErrors.push(err69);
9414
+ vErrors.push(err71);
9130
9415
  }
9131
9416
  errors++;
9132
9417
  }
@@ -9138,11 +9423,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9138
9423
  if (data32.repository !== void 0) {
9139
9424
  const _errs93 = errors;
9140
9425
  if (typeof data32.repository !== "boolean") {
9141
- 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" };
9426
+ 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" };
9142
9427
  if (vErrors === null) {
9143
- vErrors = [err70];
9428
+ vErrors = [err72];
9144
9429
  } else {
9145
- vErrors.push(err70);
9430
+ vErrors.push(err72);
9146
9431
  }
9147
9432
  errors++;
9148
9433
  }
@@ -9161,11 +9446,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9161
9446
  for (let i5 = 0; i5 < len5; i5++) {
9162
9447
  const _errs97 = errors;
9163
9448
  if (typeof data35[i5] !== "string") {
9164
- 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" };
9449
+ 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" };
9165
9450
  if (vErrors === null) {
9166
- vErrors = [err71];
9451
+ vErrors = [err73];
9167
9452
  } else {
9168
- vErrors.push(err71);
9453
+ vErrors.push(err73);
9169
9454
  }
9170
9455
  errors++;
9171
9456
  }
@@ -9175,11 +9460,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9175
9460
  }
9176
9461
  }
9177
9462
  } else {
9178
- 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" };
9463
+ 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" };
9179
9464
  if (vErrors === null) {
9180
- vErrors = [err72];
9465
+ vErrors = [err74];
9181
9466
  } else {
9182
- vErrors.push(err72);
9467
+ vErrors.push(err74);
9183
9468
  }
9184
9469
  errors++;
9185
9470
  }
@@ -9199,11 +9484,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9199
9484
  for (let i6 = 0; i6 < len6; i6++) {
9200
9485
  const _errs101 = errors;
9201
9486
  if (typeof data37[i6] !== "string") {
9202
- 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" };
9487
+ 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" };
9203
9488
  if (vErrors === null) {
9204
- vErrors = [err73];
9489
+ vErrors = [err75];
9205
9490
  } else {
9206
- vErrors.push(err73);
9491
+ vErrors.push(err75);
9207
9492
  }
9208
9493
  errors++;
9209
9494
  }
@@ -9213,11 +9498,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9213
9498
  }
9214
9499
  }
9215
9500
  } else {
9216
- 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" };
9501
+ 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" };
9217
9502
  if (vErrors === null) {
9218
- vErrors = [err74];
9503
+ vErrors = [err76];
9219
9504
  } else {
9220
- vErrors.push(err74);
9505
+ vErrors.push(err76);
9221
9506
  }
9222
9507
  errors++;
9223
9508
  }
@@ -9237,11 +9522,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9237
9522
  for (let i7 = 0; i7 < len7; i7++) {
9238
9523
  const _errs105 = errors;
9239
9524
  if (typeof data39[i7] !== "string") {
9240
- 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" };
9525
+ 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" };
9241
9526
  if (vErrors === null) {
9242
- vErrors = [err75];
9527
+ vErrors = [err77];
9243
9528
  } else {
9244
- vErrors.push(err75);
9529
+ vErrors.push(err77);
9245
9530
  }
9246
9531
  errors++;
9247
9532
  }
@@ -9251,11 +9536,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9251
9536
  }
9252
9537
  }
9253
9538
  } else {
9254
- 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" };
9539
+ 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" };
9255
9540
  if (vErrors === null) {
9256
- vErrors = [err76];
9541
+ vErrors = [err78];
9257
9542
  } else {
9258
- vErrors.push(err76);
9543
+ vErrors.push(err78);
9259
9544
  }
9260
9545
  errors++;
9261
9546
  }
@@ -9270,11 +9555,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9270
9555
  }
9271
9556
  }
9272
9557
  } else {
9273
- 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" };
9558
+ 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" };
9274
9559
  if (vErrors === null) {
9275
- vErrors = [err77];
9560
+ vErrors = [err79];
9276
9561
  } else {
9277
- vErrors.push(err77);
9562
+ vErrors.push(err79);
9278
9563
  }
9279
9564
  errors++;
9280
9565
  }
@@ -9293,31 +9578,31 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9293
9578
  let data42 = data41.effectiveFrom;
9294
9579
  const _errs110 = errors;
9295
9580
  if (!(typeof data42 == "number" && (!(data42 % 1) && !isNaN(data42)) && isFinite(data42))) {
9296
- 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" };
9581
+ 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" };
9297
9582
  if (vErrors === null) {
9298
- vErrors = [err78];
9583
+ vErrors = [err80];
9299
9584
  } else {
9300
- vErrors.push(err78);
9585
+ vErrors.push(err80);
9301
9586
  }
9302
9587
  errors++;
9303
9588
  }
9304
9589
  if (errors === _errs110) {
9305
9590
  if (typeof data42 == "number" && isFinite(data42)) {
9306
9591
  if (data42 > 9007199254740991 || isNaN(data42)) {
9307
- 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" };
9592
+ 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" };
9308
9593
  if (vErrors === null) {
9309
- vErrors = [err79];
9594
+ vErrors = [err81];
9310
9595
  } else {
9311
- vErrors.push(err79);
9596
+ vErrors.push(err81);
9312
9597
  }
9313
9598
  errors++;
9314
9599
  } else {
9315
9600
  if (data42 < -9007199254740991 || isNaN(data42)) {
9316
- 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" };
9601
+ 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" };
9317
9602
  if (vErrors === null) {
9318
- vErrors = [err80];
9603
+ vErrors = [err82];
9319
9604
  } else {
9320
- vErrors.push(err80);
9605
+ vErrors.push(err82);
9321
9606
  }
9322
9607
  errors++;
9323
9608
  }
@@ -9333,31 +9618,31 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9333
9618
  let data43 = data41.effectiveUntil;
9334
9619
  const _errs112 = errors;
9335
9620
  if (!(typeof data43 == "number" && (!(data43 % 1) && !isNaN(data43)) && isFinite(data43))) {
9336
- 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" };
9621
+ 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" };
9337
9622
  if (vErrors === null) {
9338
- vErrors = [err81];
9623
+ vErrors = [err83];
9339
9624
  } else {
9340
- vErrors.push(err81);
9625
+ vErrors.push(err83);
9341
9626
  }
9342
9627
  errors++;
9343
9628
  }
9344
9629
  if (errors === _errs112) {
9345
9630
  if (typeof data43 == "number" && isFinite(data43)) {
9346
9631
  if (data43 > 9007199254740991 || isNaN(data43)) {
9347
- 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" };
9632
+ 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" };
9348
9633
  if (vErrors === null) {
9349
- vErrors = [err82];
9634
+ vErrors = [err84];
9350
9635
  } else {
9351
- vErrors.push(err82);
9636
+ vErrors.push(err84);
9352
9637
  }
9353
9638
  errors++;
9354
9639
  } else {
9355
9640
  if (data43 < -9007199254740991 || isNaN(data43)) {
9356
- 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" };
9641
+ 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" };
9357
9642
  if (vErrors === null) {
9358
- vErrors = [err83];
9643
+ vErrors = [err85];
9359
9644
  } else {
9360
- vErrors.push(err83);
9645
+ vErrors.push(err85);
9361
9646
  }
9362
9647
  errors++;
9363
9648
  }
@@ -9370,11 +9655,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9370
9655
  }
9371
9656
  }
9372
9657
  } else {
9373
- 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" };
9658
+ 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" };
9374
9659
  if (vErrors === null) {
9375
- vErrors = [err84];
9660
+ vErrors = [err86];
9376
9661
  } else {
9377
- vErrors.push(err84);
9662
+ vErrors.push(err86);
9378
9663
  }
9379
9664
  errors++;
9380
9665
  }
@@ -9402,22 +9687,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9402
9687
  if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
9403
9688
  let missing10;
9404
9689
  if (data45.kind === void 0 && (missing10 = "kind") || data45.userId === void 0 && (missing10 = "userId")) {
9405
- 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 + "'" };
9690
+ 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 + "'" };
9406
9691
  if (vErrors === null) {
9407
- vErrors = [err85];
9692
+ vErrors = [err87];
9408
9693
  } else {
9409
- vErrors.push(err85);
9694
+ vErrors.push(err87);
9410
9695
  }
9411
9696
  errors++;
9412
9697
  } else {
9413
9698
  const _errs120 = errors;
9414
9699
  for (const key4 in data45) {
9415
9700
  if (!(key4 === "kind" || key4 === "userId")) {
9416
- 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" };
9701
+ 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" };
9417
9702
  if (vErrors === null) {
9418
- vErrors = [err86];
9703
+ vErrors = [err88];
9419
9704
  } else {
9420
- vErrors.push(err86);
9705
+ vErrors.push(err88);
9421
9706
  }
9422
9707
  errors++;
9423
9708
  break;
@@ -9428,20 +9713,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9428
9713
  let data46 = data45.kind;
9429
9714
  const _errs121 = errors;
9430
9715
  if (typeof data46 !== "string") {
9431
- 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" };
9716
+ 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" };
9432
9717
  if (vErrors === null) {
9433
- vErrors = [err87];
9718
+ vErrors = [err89];
9434
9719
  } else {
9435
- vErrors.push(err87);
9720
+ vErrors.push(err89);
9436
9721
  }
9437
9722
  errors++;
9438
9723
  }
9439
9724
  if ("user" !== data46) {
9440
- 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" };
9725
+ 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" };
9441
9726
  if (vErrors === null) {
9442
- vErrors = [err88];
9727
+ vErrors = [err90];
9443
9728
  } else {
9444
- vErrors.push(err88);
9729
+ vErrors.push(err90);
9445
9730
  }
9446
9731
  errors++;
9447
9732
  }
@@ -9456,20 +9741,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9456
9741
  if (errors === _errs123) {
9457
9742
  if (typeof data47 === "string") {
9458
9743
  if (func1(data47) < 1) {
9459
- 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" };
9744
+ 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" };
9460
9745
  if (vErrors === null) {
9461
- vErrors = [err89];
9746
+ vErrors = [err91];
9462
9747
  } else {
9463
- vErrors.push(err89);
9748
+ vErrors.push(err91);
9464
9749
  }
9465
9750
  errors++;
9466
9751
  }
9467
9752
  } else {
9468
- 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" };
9753
+ 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" };
9469
9754
  if (vErrors === null) {
9470
- vErrors = [err90];
9755
+ vErrors = [err92];
9471
9756
  } else {
9472
- vErrors.push(err90);
9757
+ vErrors.push(err92);
9473
9758
  }
9474
9759
  errors++;
9475
9760
  }
@@ -9482,11 +9767,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9482
9767
  }
9483
9768
  }
9484
9769
  } else {
9485
- 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" };
9770
+ 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" };
9486
9771
  if (vErrors === null) {
9487
- vErrors = [err91];
9772
+ vErrors = [err93];
9488
9773
  } else {
9489
- vErrors.push(err91);
9774
+ vErrors.push(err93);
9490
9775
  }
9491
9776
  errors++;
9492
9777
  }
@@ -9502,22 +9787,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9502
9787
  if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
9503
9788
  let missing11;
9504
9789
  if (data45.kind === void 0 && (missing11 = "kind") || data45.role === void 0 && (missing11 = "role")) {
9505
- 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 + "'" };
9790
+ 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 + "'" };
9506
9791
  if (vErrors === null) {
9507
- vErrors = [err92];
9792
+ vErrors = [err94];
9508
9793
  } else {
9509
- vErrors.push(err92);
9794
+ vErrors.push(err94);
9510
9795
  }
9511
9796
  errors++;
9512
9797
  } else {
9513
9798
  const _errs127 = errors;
9514
9799
  for (const key5 in data45) {
9515
9800
  if (!(key5 === "kind" || key5 === "role")) {
9516
- 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" };
9801
+ 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" };
9517
9802
  if (vErrors === null) {
9518
- vErrors = [err93];
9803
+ vErrors = [err95];
9519
9804
  } else {
9520
- vErrors.push(err93);
9805
+ vErrors.push(err95);
9521
9806
  }
9522
9807
  errors++;
9523
9808
  break;
@@ -9528,20 +9813,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9528
9813
  let data48 = data45.kind;
9529
9814
  const _errs128 = errors;
9530
9815
  if (typeof data48 !== "string") {
9531
- 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" };
9816
+ 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" };
9532
9817
  if (vErrors === null) {
9533
- vErrors = [err94];
9818
+ vErrors = [err96];
9534
9819
  } else {
9535
- vErrors.push(err94);
9820
+ vErrors.push(err96);
9536
9821
  }
9537
9822
  errors++;
9538
9823
  }
9539
9824
  if ("role" !== data48) {
9540
- 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" };
9825
+ 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" };
9541
9826
  if (vErrors === null) {
9542
- vErrors = [err95];
9827
+ vErrors = [err97];
9543
9828
  } else {
9544
- vErrors.push(err95);
9829
+ vErrors.push(err97);
9545
9830
  }
9546
9831
  errors++;
9547
9832
  }
@@ -9554,20 +9839,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9554
9839
  let data49 = data45.role;
9555
9840
  const _errs130 = errors;
9556
9841
  if (typeof data49 !== "string") {
9557
- 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" };
9842
+ 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" };
9558
9843
  if (vErrors === null) {
9559
- vErrors = [err96];
9844
+ vErrors = [err98];
9560
9845
  } else {
9561
- vErrors.push(err96);
9846
+ vErrors.push(err98);
9562
9847
  }
9563
9848
  errors++;
9564
9849
  }
9565
9850
  if (!(data49 === "owner" || data49 === "admin" || data49 === "member")) {
9566
- 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" };
9851
+ 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" };
9567
9852
  if (vErrors === null) {
9568
- vErrors = [err97];
9853
+ vErrors = [err99];
9569
9854
  } else {
9570
- vErrors.push(err97);
9855
+ vErrors.push(err99);
9571
9856
  }
9572
9857
  errors++;
9573
9858
  }
@@ -9579,11 +9864,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9579
9864
  }
9580
9865
  }
9581
9866
  } else {
9582
- 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" };
9867
+ 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" };
9583
9868
  if (vErrors === null) {
9584
- vErrors = [err98];
9869
+ vErrors = [err100];
9585
9870
  } else {
9586
- vErrors.push(err98);
9871
+ vErrors.push(err100);
9587
9872
  }
9588
9873
  errors++;
9589
9874
  }
@@ -9605,22 +9890,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9605
9890
  if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
9606
9891
  let missing12;
9607
9892
  if (data45.kind === void 0 && (missing12 = "kind") || data45.agent === void 0 && (missing12 = "agent")) {
9608
- 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 + "'" };
9893
+ 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 + "'" };
9609
9894
  if (vErrors === null) {
9610
- vErrors = [err99];
9895
+ vErrors = [err101];
9611
9896
  } else {
9612
- vErrors.push(err99);
9897
+ vErrors.push(err101);
9613
9898
  }
9614
9899
  errors++;
9615
9900
  } else {
9616
9901
  const _errs134 = errors;
9617
9902
  for (const key6 in data45) {
9618
9903
  if (!(key6 === "kind" || key6 === "agent")) {
9619
- 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" };
9904
+ 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" };
9620
9905
  if (vErrors === null) {
9621
- vErrors = [err100];
9906
+ vErrors = [err102];
9622
9907
  } else {
9623
- vErrors.push(err100);
9908
+ vErrors.push(err102);
9624
9909
  }
9625
9910
  errors++;
9626
9911
  break;
@@ -9631,20 +9916,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9631
9916
  let data50 = data45.kind;
9632
9917
  const _errs135 = errors;
9633
9918
  if (typeof data50 !== "string") {
9634
- 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" };
9919
+ 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" };
9635
9920
  if (vErrors === null) {
9636
- vErrors = [err101];
9921
+ vErrors = [err103];
9637
9922
  } else {
9638
- vErrors.push(err101);
9923
+ vErrors.push(err103);
9639
9924
  }
9640
9925
  errors++;
9641
9926
  }
9642
9927
  if ("agent" !== data50) {
9643
- 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" };
9928
+ 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" };
9644
9929
  if (vErrors === null) {
9645
- vErrors = [err102];
9930
+ vErrors = [err104];
9646
9931
  } else {
9647
- vErrors.push(err102);
9932
+ vErrors.push(err104);
9648
9933
  }
9649
9934
  errors++;
9650
9935
  }
@@ -9657,20 +9942,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9657
9942
  let data51 = data45.agent;
9658
9943
  const _errs137 = errors;
9659
9944
  if (typeof data51 !== "string") {
9660
- 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" };
9945
+ 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" };
9661
9946
  if (vErrors === null) {
9662
- vErrors = [err103];
9947
+ vErrors = [err105];
9663
9948
  } else {
9664
- vErrors.push(err103);
9949
+ vErrors.push(err105);
9665
9950
  }
9666
9951
  errors++;
9667
9952
  }
9668
9953
  if (!(data51 === "claude_code" || data51 === "codex" || data51 === "cursor" || data51 === "hermes")) {
9669
- 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" };
9954
+ 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" };
9670
9955
  if (vErrors === null) {
9671
- vErrors = [err104];
9956
+ vErrors = [err106];
9672
9957
  } else {
9673
- vErrors.push(err104);
9958
+ vErrors.push(err106);
9674
9959
  }
9675
9960
  errors++;
9676
9961
  }
@@ -9682,11 +9967,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9682
9967
  }
9683
9968
  }
9684
9969
  } else {
9685
- 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" };
9970
+ 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" };
9686
9971
  if (vErrors === null) {
9687
- vErrors = [err105];
9972
+ vErrors = [err107];
9688
9973
  } else {
9689
- vErrors.push(err105);
9974
+ vErrors.push(err107);
9690
9975
  }
9691
9976
  errors++;
9692
9977
  }
@@ -9708,22 +9993,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9708
9993
  if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
9709
9994
  let missing13;
9710
9995
  if (data45.kind === void 0 && (missing13 = "kind") || data45.credential === void 0 && (missing13 = "credential")) {
9711
- 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 + "'" };
9996
+ 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 + "'" };
9712
9997
  if (vErrors === null) {
9713
- vErrors = [err106];
9998
+ vErrors = [err108];
9714
9999
  } else {
9715
- vErrors.push(err106);
10000
+ vErrors.push(err108);
9716
10001
  }
9717
10002
  errors++;
9718
10003
  } else {
9719
10004
  const _errs141 = errors;
9720
10005
  for (const key7 in data45) {
9721
10006
  if (!(key7 === "kind" || key7 === "credential")) {
9722
- 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" };
10007
+ 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" };
9723
10008
  if (vErrors === null) {
9724
- vErrors = [err107];
10009
+ vErrors = [err109];
9725
10010
  } else {
9726
- vErrors.push(err107);
10011
+ vErrors.push(err109);
9727
10012
  }
9728
10013
  errors++;
9729
10014
  break;
@@ -9734,20 +10019,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9734
10019
  let data52 = data45.kind;
9735
10020
  const _errs142 = errors;
9736
10021
  if (typeof data52 !== "string") {
9737
- 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" };
10022
+ 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" };
9738
10023
  if (vErrors === null) {
9739
- vErrors = [err108];
10024
+ vErrors = [err110];
9740
10025
  } else {
9741
- vErrors.push(err108);
10026
+ vErrors.push(err110);
9742
10027
  }
9743
10028
  errors++;
9744
10029
  }
9745
10030
  if ("credential" !== data52) {
9746
- 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" };
10031
+ 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" };
9747
10032
  if (vErrors === null) {
9748
- vErrors = [err109];
10033
+ vErrors = [err111];
9749
10034
  } else {
9750
- vErrors.push(err109);
10035
+ vErrors.push(err111);
9751
10036
  }
9752
10037
  errors++;
9753
10038
  }
@@ -9760,20 +10045,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9760
10045
  let data53 = data45.credential;
9761
10046
  const _errs144 = errors;
9762
10047
  if (typeof data53 !== "string") {
9763
- 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" };
10048
+ 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" };
9764
10049
  if (vErrors === null) {
9765
- vErrors = [err110];
10050
+ vErrors = [err112];
9766
10051
  } else {
9767
- vErrors.push(err110);
10052
+ vErrors.push(err112);
9768
10053
  }
9769
10054
  errors++;
9770
10055
  }
9771
10056
  if (!(data53 === "workos_jwt" || data53 === "workos_api_key" || data53 === "service_token")) {
9772
- 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" };
10057
+ 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" };
9773
10058
  if (vErrors === null) {
9774
- vErrors = [err111];
10059
+ vErrors = [err113];
9775
10060
  } else {
9776
- vErrors.push(err111);
10061
+ vErrors.push(err113);
9777
10062
  }
9778
10063
  errors++;
9779
10064
  }
@@ -9785,11 +10070,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9785
10070
  }
9786
10071
  }
9787
10072
  } else {
9788
- 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" };
10073
+ 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" };
9789
10074
  if (vErrors === null) {
9790
- vErrors = [err112];
10075
+ vErrors = [err114];
9791
10076
  } else {
9792
- vErrors.push(err112);
10077
+ vErrors.push(err114);
9793
10078
  }
9794
10079
  errors++;
9795
10080
  }
@@ -9810,11 +10095,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9810
10095
  }
9811
10096
  }
9812
10097
  if (!valid24) {
9813
- 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" };
10098
+ 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" };
9814
10099
  if (vErrors === null) {
9815
- vErrors = [err113];
10100
+ vErrors = [err115];
9816
10101
  } else {
9817
- vErrors.push(err113);
10102
+ vErrors.push(err115);
9818
10103
  }
9819
10104
  errors++;
9820
10105
  } else {
@@ -9833,11 +10118,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9833
10118
  }
9834
10119
  }
9835
10120
  } else {
9836
- 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" };
10121
+ 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" };
9837
10122
  if (vErrors === null) {
9838
- vErrors = [err114];
10123
+ vErrors = [err116];
9839
10124
  } else {
9840
- vErrors.push(err114);
10125
+ vErrors.push(err116);
9841
10126
  }
9842
10127
  errors++;
9843
10128
  }
@@ -9850,11 +10135,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9850
10135
  }
9851
10136
  }
9852
10137
  } else {
9853
- 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" };
10138
+ 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" };
9854
10139
  if (vErrors === null) {
9855
- vErrors = [err115];
10140
+ vErrors = [err117];
9856
10141
  } else {
9857
- vErrors.push(err115);
10142
+ vErrors.push(err117);
9858
10143
  }
9859
10144
  errors++;
9860
10145
  }
@@ -9874,11 +10159,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9874
10159
  for (let i9 = 0; i9 < len9; i9++) {
9875
10160
  const _errs148 = errors;
9876
10161
  if (typeof data54[i9] !== "string") {
9877
- 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" };
10162
+ 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" };
9878
10163
  if (vErrors === null) {
9879
- vErrors = [err116];
10164
+ vErrors = [err118];
9880
10165
  } else {
9881
- vErrors.push(err116);
10166
+ vErrors.push(err118);
9882
10167
  }
9883
10168
  errors++;
9884
10169
  }
@@ -9888,11 +10173,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9888
10173
  }
9889
10174
  }
9890
10175
  } else {
9891
- 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" };
10176
+ 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" };
9892
10177
  if (vErrors === null) {
9893
- vErrors = [err117];
10178
+ vErrors = [err119];
9894
10179
  } else {
9895
- vErrors.push(err117);
10180
+ vErrors.push(err119);
9896
10181
  }
9897
10182
  errors++;
9898
10183
  }
@@ -9908,11 +10193,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9908
10193
  }
9909
10194
  }
9910
10195
  } else {
9911
- 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" };
10196
+ 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" };
9912
10197
  if (vErrors === null) {
9913
- vErrors = [err118];
10198
+ vErrors = [err120];
9914
10199
  } else {
9915
- vErrors.push(err118);
10200
+ vErrors.push(err120);
9916
10201
  }
9917
10202
  errors++;
9918
10203
  }
@@ -9925,11 +10210,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9925
10210
  }
9926
10211
  }
9927
10212
  if (!valid1) {
9928
- 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" };
10213
+ 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" };
9929
10214
  if (vErrors === null) {
9930
- vErrors = [err119];
10215
+ vErrors = [err121];
9931
10216
  } else {
9932
- vErrors.push(err119);
10217
+ vErrors.push(err121);
9933
10218
  }
9934
10219
  errors++;
9935
10220
  validate35.errors = vErrors;
@@ -9949,7 +10234,7 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
9949
10234
  return errors === 0;
9950
10235
  }
9951
10236
  validate35.evaluated = { "dynamicProps": true, "dynamicItems": false };
9952
- 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": {} }] };
10237
+ 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": {} }] };
9953
10238
  function validate36(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
9954
10239
  ;
9955
10240
  let vErrors = null;
@@ -10096,13 +10381,23 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
10096
10381
  vErrors.push(err9);
10097
10382
  }
10098
10383
  errors++;
10384
+ } else {
10385
+ if (!pattern4.test(data3)) {
10386
+ 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}$"' };
10387
+ if (vErrors === null) {
10388
+ vErrors = [err10];
10389
+ } else {
10390
+ vErrors.push(err10);
10391
+ }
10392
+ errors++;
10393
+ }
10099
10394
  }
10100
10395
  } else {
10101
- 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" };
10396
+ 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" };
10102
10397
  if (vErrors === null) {
10103
- vErrors = [err10];
10398
+ vErrors = [err11];
10104
10399
  } else {
10105
- vErrors.push(err10);
10400
+ vErrors.push(err11);
10106
10401
  }
10107
10402
  errors++;
10108
10403
  }
@@ -10113,15 +10408,28 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
10113
10408
  }
10114
10409
  if (valid3) {
10115
10410
  if (data.shortId !== void 0) {
10411
+ let data4 = data.shortId;
10116
10412
  const _errs16 = errors;
10117
- if (typeof data.shortId !== "string") {
10118
- 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" };
10119
- if (vErrors === null) {
10120
- vErrors = [err11];
10413
+ if (errors === _errs16) {
10414
+ if (typeof data4 === "string") {
10415
+ if (!pattern5.test(data4)) {
10416
+ 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}$"' };
10417
+ if (vErrors === null) {
10418
+ vErrors = [err12];
10419
+ } else {
10420
+ vErrors.push(err12);
10421
+ }
10422
+ errors++;
10423
+ }
10121
10424
  } else {
10122
- vErrors.push(err11);
10425
+ 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" };
10426
+ if (vErrors === null) {
10427
+ vErrors = [err13];
10428
+ } else {
10429
+ vErrors.push(err13);
10430
+ }
10431
+ errors++;
10123
10432
  }
10124
- errors++;
10125
10433
  }
10126
10434
  var valid3 = _errs16 === errors;
10127
10435
  } else {
@@ -10132,20 +10440,20 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
10132
10440
  let data5 = data.stage;
10133
10441
  const _errs18 = errors;
10134
10442
  if (typeof data5 !== "string") {
10135
- 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" };
10443
+ 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" };
10136
10444
  if (vErrors === null) {
10137
- vErrors = [err12];
10445
+ vErrors = [err14];
10138
10446
  } else {
10139
- vErrors.push(err12);
10447
+ vErrors.push(err14);
10140
10448
  }
10141
10449
  errors++;
10142
10450
  }
10143
10451
  if (!(data5 === "draft" || data5 === "provisional" || data5 === "adopted" || data5 === "superseded" || data5 === "abandoned")) {
10144
- 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" };
10452
+ 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" };
10145
10453
  if (vErrors === null) {
10146
- vErrors = [err13];
10454
+ vErrors = [err15];
10147
10455
  } else {
10148
- vErrors.push(err13);
10456
+ vErrors.push(err15);
10149
10457
  }
10150
10458
  errors++;
10151
10459
  }
@@ -10158,11 +10466,11 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
10158
10466
  }
10159
10467
  }
10160
10468
  } else {
10161
- 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" };
10469
+ 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" };
10162
10470
  if (vErrors === null) {
10163
- vErrors = [err14];
10471
+ vErrors = [err16];
10164
10472
  } else {
10165
- vErrors.push(err14);
10473
+ vErrors.push(err16);
10166
10474
  }
10167
10475
  errors++;
10168
10476
  }
@@ -10175,11 +10483,11 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
10175
10483
  }
10176
10484
  }
10177
10485
  if (!valid1) {
10178
- 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" };
10486
+ 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" };
10179
10487
  if (vErrors === null) {
10180
- vErrors = [err15];
10488
+ vErrors = [err17];
10181
10489
  } else {
10182
- vErrors.push(err15);
10490
+ vErrors.push(err17);
10183
10491
  }
10184
10492
  errors++;
10185
10493
  validate36.errors = vErrors;
@@ -10250,7 +10558,7 @@ function validate37(data, { instancePath = "", parentData, parentDataProperty, r
10250
10558
  return errors === 0;
10251
10559
  }
10252
10560
  validate37.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
10253
- 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": {} };
10561
+ 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": {} };
10254
10562
  function validate38(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
10255
10563
  ;
10256
10564
  let vErrors = null;
@@ -10295,6 +10603,11 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
10295
10603
  if (func1(data2) < 1) {
10296
10604
  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" }];
10297
10605
  return false;
10606
+ } else {
10607
+ if (!pattern4.test(data2)) {
10608
+ 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}$"' }];
10609
+ return false;
10610
+ }
10298
10611
  }
10299
10612
  } else {
10300
10613
  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" }];
@@ -10454,7 +10767,7 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
10454
10767
  return errors === 0;
10455
10768
  }
10456
10769
  validate38.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
10457
- 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"] };
10770
+ 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"] };
10458
10771
  function validate39(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
10459
10772
  ;
10460
10773
  let vErrors = null;
@@ -10499,6 +10812,11 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
10499
10812
  if (func1(data2) < 1) {
10500
10813
  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" }];
10501
10814
  return false;
10815
+ } else {
10816
+ if (!pattern4.test(data2)) {
10817
+ 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}$"' }];
10818
+ return false;
10819
+ }
10502
10820
  }
10503
10821
  } else {
10504
10822
  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" }];
@@ -10511,10 +10829,18 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
10511
10829
  }
10512
10830
  if (valid3) {
10513
10831
  if (data1.shortId !== void 0) {
10832
+ let data3 = data1.shortId;
10514
10833
  const _errs11 = errors;
10515
- if (typeof data1.shortId !== "string") {
10516
- 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" }];
10517
- return false;
10834
+ if (errors === _errs11) {
10835
+ if (typeof data3 === "string") {
10836
+ if (!pattern5.test(data3)) {
10837
+ 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}$"' }];
10838
+ return false;
10839
+ }
10840
+ } else {
10841
+ 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" }];
10842
+ return false;
10843
+ }
10518
10844
  }
10519
10845
  var valid3 = _errs11 === errors;
10520
10846
  } else {
@@ -10849,8 +11175,8 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
10849
11175
  return errors === 0;
10850
11176
  }
10851
11177
  validate39.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
10852
- var pattern4 = new RegExp("^[a-zA-Z0-9]{1,64}$", "u");
10853
- var pattern5 = new RegExp("^[a-f0-9]{64}$", "u");
11178
+ var pattern34 = new RegExp("^[a-zA-Z0-9]{1,64}$", "u");
11179
+ var pattern35 = new RegExp("^[a-f0-9]{64}$", "u");
10854
11180
  function validate40(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
10855
11181
  ;
10856
11182
  let vErrors = null;
@@ -10884,7 +11210,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
10884
11210
  const _errs3 = errors;
10885
11211
  if (errors === _errs3) {
10886
11212
  if (typeof data0 === "string") {
10887
- if (!pattern4.test(data0)) {
11213
+ if (!pattern34.test(data0)) {
10888
11214
  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}$"' }];
10889
11215
  return false;
10890
11216
  }
@@ -10928,7 +11254,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
10928
11254
  const _errs7 = errors;
10929
11255
  if (errors === _errs7) {
10930
11256
  if (typeof data2 === "string") {
10931
- if (!pattern5.test(data2)) {
11257
+ if (!pattern35.test(data2)) {
10932
11258
  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}$"' }];
10933
11259
  return false;
10934
11260
  }
@@ -10954,7 +11280,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
10954
11280
  return errors === 0;
10955
11281
  }
10956
11282
  validate40.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
10957
- var pattern8 = new RegExp("\\S", "u");
11283
+ var pattern38 = new RegExp("\\S", "u");
10958
11284
  function validate41(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
10959
11285
  ;
10960
11286
  let vErrors = null;
@@ -11001,7 +11327,7 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
11001
11327
  const _errs5 = errors;
11002
11328
  if (errors === _errs5) {
11003
11329
  if (typeof data0 === "string") {
11004
- if (!pattern4.test(data0)) {
11330
+ if (!pattern34.test(data0)) {
11005
11331
  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}$"' };
11006
11332
  if (vErrors === null) {
11007
11333
  vErrors = [err2];
@@ -11142,7 +11468,7 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
11142
11468
  const _errs14 = errors;
11143
11469
  if (errors === _errs14) {
11144
11470
  if (typeof data3 === "string") {
11145
- if (!pattern4.test(data3)) {
11471
+ if (!pattern34.test(data3)) {
11146
11472
  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}$"' };
11147
11473
  if (vErrors === null) {
11148
11474
  vErrors = [err12];
@@ -11255,7 +11581,7 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
11255
11581
  }
11256
11582
  errors++;
11257
11583
  } else {
11258
- if (!pattern8.test(data6)) {
11584
+ if (!pattern38.test(data6)) {
11259
11585
  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"' };
11260
11586
  if (vErrors === null) {
11261
11587
  vErrors = [err21];
@@ -11366,7 +11692,7 @@ function validate42(data, { instancePath = "", parentData, parentDataProperty, r
11366
11692
  const _errs3 = errors;
11367
11693
  if (errors === _errs3) {
11368
11694
  if (typeof data0 === "string") {
11369
- if (!pattern4.test(data0)) {
11695
+ if (!pattern34.test(data0)) {
11370
11696
  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}$"' }];
11371
11697
  return false;
11372
11698
  }
@@ -11416,7 +11742,7 @@ function validate42(data, { instancePath = "", parentData, parentDataProperty, r
11416
11742
  return errors === 0;
11417
11743
  }
11418
11744
  validate42.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
11419
- 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");
11745
+ 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");
11420
11746
  function validate43(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
11421
11747
  ;
11422
11748
  let vErrors = null;
@@ -11467,7 +11793,7 @@ function validate43(data, { instancePath = "", parentData, parentDataProperty, r
11467
11793
  if (errors === _errs5) {
11468
11794
  if (errors === _errs5) {
11469
11795
  if (typeof data1 === "string") {
11470
- if (!pattern10.test(data1)) {
11796
+ if (!pattern40.test(data1)) {
11471
11797
  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)$"' }];
11472
11798
  return false;
11473
11799
  }
@@ -11496,7 +11822,7 @@ validate43.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": f
11496
11822
  var isDemoStatusResponse = validate44;
11497
11823
  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 };
11498
11824
  var func34 = Object.prototype.hasOwnProperty;
11499
- 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");
11825
+ 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");
11500
11826
  function validate44(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
11501
11827
  ;
11502
11828
  let vErrors = null;
@@ -11578,7 +11904,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
11578
11904
  const _errs9 = errors;
11579
11905
  if (errors === _errs9) {
11580
11906
  if (typeof data3 === "string") {
11581
- if (!pattern4.test(data3)) {
11907
+ if (!pattern34.test(data3)) {
11582
11908
  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}$"' }];
11583
11909
  return false;
11584
11910
  }
@@ -11696,7 +12022,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
11696
12022
  if (errors === _errs22) {
11697
12023
  if (errors === _errs22) {
11698
12024
  if (typeof data9 === "string") {
11699
- if (!pattern12.test(data9)) {
12025
+ if (!pattern42.test(data9)) {
11700
12026
  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,}$"` }];
11701
12027
  return false;
11702
12028
  }
@@ -11834,7 +12160,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
11834
12160
  const _errs36 = errors;
11835
12161
  if (errors === _errs36) {
11836
12162
  if (typeof data16 === "string") {
11837
- if (!pattern5.test(data16)) {
12163
+ if (!pattern35.test(data16)) {
11838
12164
  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}$"' }];
11839
12165
  return false;
11840
12166
  }
@@ -12037,15 +12363,28 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
12037
12363
  }
12038
12364
  if (valid3) {
12039
12365
  if (data3.decisionId !== void 0) {
12366
+ let data8 = data3.decisionId;
12040
12367
  const _errs22 = errors;
12041
- if (typeof data3.decisionId !== "string") {
12042
- 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" };
12043
- if (vErrors === null) {
12044
- vErrors = [err6];
12368
+ if (errors === _errs22) {
12369
+ if (typeof data8 === "string") {
12370
+ if (!pattern4.test(data8)) {
12371
+ 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}$"' };
12372
+ if (vErrors === null) {
12373
+ vErrors = [err6];
12374
+ } else {
12375
+ vErrors.push(err6);
12376
+ }
12377
+ errors++;
12378
+ }
12045
12379
  } else {
12046
- vErrors.push(err6);
12380
+ 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" };
12381
+ if (vErrors === null) {
12382
+ vErrors = [err7];
12383
+ } else {
12384
+ vErrors.push(err7);
12385
+ }
12386
+ errors++;
12047
12387
  }
12048
- errors++;
12049
12388
  }
12050
12389
  var valid3 = _errs22 === errors;
12051
12390
  } else {
@@ -12053,15 +12392,28 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
12053
12392
  }
12054
12393
  if (valid3) {
12055
12394
  if (data3.decisionShortId !== void 0) {
12395
+ let data9 = data3.decisionShortId;
12056
12396
  const _errs24 = errors;
12057
- if (typeof data3.decisionShortId !== "string") {
12058
- 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" };
12059
- if (vErrors === null) {
12060
- vErrors = [err7];
12397
+ if (errors === _errs24) {
12398
+ if (typeof data9 === "string") {
12399
+ if (!pattern5.test(data9)) {
12400
+ 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}$"' };
12401
+ if (vErrors === null) {
12402
+ vErrors = [err8];
12403
+ } else {
12404
+ vErrors.push(err8);
12405
+ }
12406
+ errors++;
12407
+ }
12061
12408
  } else {
12062
- vErrors.push(err7);
12409
+ 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" };
12410
+ if (vErrors === null) {
12411
+ vErrors = [err9];
12412
+ } else {
12413
+ vErrors.push(err9);
12414
+ }
12415
+ errors++;
12063
12416
  }
12064
- errors++;
12065
12417
  }
12066
12418
  var valid3 = _errs24 === errors;
12067
12419
  } else {
@@ -12075,11 +12427,11 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
12075
12427
  }
12076
12428
  }
12077
12429
  } else {
12078
- 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" };
12430
+ 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" };
12079
12431
  if (vErrors === null) {
12080
- vErrors = [err8];
12432
+ vErrors = [err10];
12081
12433
  } else {
12082
- vErrors.push(err8);
12434
+ vErrors.push(err10);
12083
12435
  }
12084
12436
  errors++;
12085
12437
  }
@@ -12088,22 +12440,22 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
12088
12440
  valid2 = valid2 || _valid0;
12089
12441
  const _errs26 = errors;
12090
12442
  if (data3 !== null) {
12091
- 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" };
12443
+ 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" };
12092
12444
  if (vErrors === null) {
12093
- vErrors = [err9];
12445
+ vErrors = [err11];
12094
12446
  } else {
12095
- vErrors.push(err9);
12447
+ vErrors.push(err11);
12096
12448
  }
12097
12449
  errors++;
12098
12450
  }
12099
12451
  var _valid0 = _errs26 === errors;
12100
12452
  valid2 = valid2 || _valid0;
12101
12453
  if (!valid2) {
12102
- 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" };
12454
+ 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" };
12103
12455
  if (vErrors === null) {
12104
- vErrors = [err10];
12456
+ vErrors = [err12];
12105
12457
  } else {
12106
- vErrors.push(err10);
12458
+ vErrors.push(err12);
12107
12459
  }
12108
12460
  errors++;
12109
12461
  validate45.errors = vErrors;
@@ -12737,8 +13089,7 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
12737
13089
  return errors === 0;
12738
13090
  }
12739
13091
  validate48.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
12740
- 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"] };
12741
- var pattern14 = new RegExp("^[0-9a-f]{8}$", "u");
13092
+ 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"] };
12742
13093
  function validate49(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
12743
13094
  ;
12744
13095
  let vErrors = null;
@@ -13077,7 +13428,7 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13077
13428
  const _errs27 = errors;
13078
13429
  if (errors === _errs27) {
13079
13430
  if (typeof data9 === "string") {
13080
- if (!pattern14.test(data9)) {
13431
+ if (!pattern5.test(data9)) {
13081
13432
  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}$"' };
13082
13433
  if (vErrors === null) {
13083
13434
  vErrors = [err24];
@@ -13123,14 +13474,24 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13123
13474
  vErrors.push(err27);
13124
13475
  }
13125
13476
  errors++;
13477
+ } else {
13478
+ if (!pattern4.test(data10)) {
13479
+ 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}$"' };
13480
+ if (vErrors === null) {
13481
+ vErrors = [err28];
13482
+ } else {
13483
+ vErrors.push(err28);
13484
+ }
13485
+ errors++;
13486
+ }
13126
13487
  }
13127
13488
  }
13128
13489
  } else {
13129
- 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" };
13490
+ 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" };
13130
13491
  if (vErrors === null) {
13131
- vErrors = [err28];
13492
+ vErrors = [err29];
13132
13493
  } else {
13133
- vErrors.push(err28);
13494
+ vErrors.push(err29);
13134
13495
  }
13135
13496
  errors++;
13136
13497
  }
@@ -13143,11 +13504,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13143
13504
  if (data6.intent !== void 0) {
13144
13505
  const _errs31 = errors;
13145
13506
  if (typeof data6.intent !== "string") {
13146
- 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" };
13507
+ 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" };
13147
13508
  if (vErrors === null) {
13148
- vErrors = [err29];
13509
+ vErrors = [err30];
13149
13510
  } else {
13150
- vErrors.push(err29);
13511
+ vErrors.push(err30);
13151
13512
  }
13152
13513
  errors++;
13153
13514
  }
@@ -13159,11 +13520,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13159
13520
  if (data6.webUrl !== void 0) {
13160
13521
  const _errs33 = errors;
13161
13522
  if (typeof data6.webUrl !== "string") {
13162
- 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" };
13523
+ 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" };
13163
13524
  if (vErrors === null) {
13164
- vErrors = [err30];
13525
+ vErrors = [err31];
13165
13526
  } else {
13166
- vErrors.push(err30);
13527
+ vErrors.push(err31);
13167
13528
  }
13168
13529
  errors++;
13169
13530
  }
@@ -13176,20 +13537,20 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13176
13537
  let data13 = data6.kind;
13177
13538
  const _errs35 = errors;
13178
13539
  if (typeof data13 !== "string") {
13179
- 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" };
13540
+ 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" };
13180
13541
  if (vErrors === null) {
13181
- vErrors = [err31];
13542
+ vErrors = [err32];
13182
13543
  } else {
13183
- vErrors.push(err31);
13544
+ vErrors.push(err32);
13184
13545
  }
13185
13546
  errors++;
13186
13547
  }
13187
13548
  if (!(data13 === "confirm_prompt" || data13 === "publish_prompt")) {
13188
- 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" };
13549
+ 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" };
13189
13550
  if (vErrors === null) {
13190
- vErrors = [err32];
13551
+ vErrors = [err33];
13191
13552
  } else {
13192
- vErrors.push(err32);
13553
+ vErrors.push(err33);
13193
13554
  }
13194
13555
  errors++;
13195
13556
  }
@@ -13205,11 +13566,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13205
13566
  }
13206
13567
  }
13207
13568
  } else {
13208
- 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" };
13569
+ 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" };
13209
13570
  if (vErrors === null) {
13210
- vErrors = [err33];
13571
+ vErrors = [err34];
13211
13572
  } else {
13212
- vErrors.push(err33);
13573
+ vErrors.push(err34);
13213
13574
  }
13214
13575
  errors++;
13215
13576
  }
@@ -13222,11 +13583,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13222
13583
  }
13223
13584
  }
13224
13585
  } else {
13225
- 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" };
13586
+ 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" };
13226
13587
  if (vErrors === null) {
13227
- vErrors = [err34];
13588
+ vErrors = [err35];
13228
13589
  } else {
13229
- vErrors.push(err34);
13590
+ vErrors.push(err35);
13230
13591
  }
13231
13592
  errors++;
13232
13593
  }
@@ -13239,11 +13600,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13239
13600
  if (data.hasMore !== void 0) {
13240
13601
  const _errs37 = errors;
13241
13602
  if (typeof data.hasMore !== "boolean") {
13242
- 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" };
13603
+ 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" };
13243
13604
  if (vErrors === null) {
13244
- vErrors = [err35];
13605
+ vErrors = [err36];
13245
13606
  } else {
13246
- vErrors.push(err35);
13607
+ vErrors.push(err36);
13247
13608
  }
13248
13609
  errors++;
13249
13610
  }
@@ -13256,11 +13617,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13256
13617
  }
13257
13618
  }
13258
13619
  } else {
13259
- 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" };
13620
+ 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" };
13260
13621
  if (vErrors === null) {
13261
- vErrors = [err36];
13622
+ vErrors = [err37];
13262
13623
  } else {
13263
- vErrors.push(err36);
13624
+ vErrors.push(err37);
13264
13625
  }
13265
13626
  errors++;
13266
13627
  }
@@ -13277,11 +13638,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13277
13638
  if (data && typeof data == "object" && !Array.isArray(data)) {
13278
13639
  let missing3;
13279
13640
  if (data.protocolVersion === void 0 && (missing3 = "protocolVersion") || data.status === void 0 && (missing3 = "status") || data.reason === void 0 && (missing3 = "reason")) {
13280
- 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 + "'" };
13641
+ 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 + "'" };
13281
13642
  if (vErrors === null) {
13282
- vErrors = [err37];
13643
+ vErrors = [err38];
13283
13644
  } else {
13284
- vErrors.push(err37);
13645
+ vErrors.push(err38);
13285
13646
  }
13286
13647
  errors++;
13287
13648
  } else {
@@ -13289,31 +13650,31 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13289
13650
  let data15 = data.protocolVersion;
13290
13651
  const _errs42 = errors;
13291
13652
  if (!(typeof data15 == "number" && (!(data15 % 1) && !isNaN(data15)) && isFinite(data15))) {
13292
- 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" };
13653
+ 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" };
13293
13654
  if (vErrors === null) {
13294
- vErrors = [err38];
13655
+ vErrors = [err39];
13295
13656
  } else {
13296
- vErrors.push(err38);
13657
+ vErrors.push(err39);
13297
13658
  }
13298
13659
  errors++;
13299
13660
  }
13300
13661
  if (errors === _errs42) {
13301
13662
  if (typeof data15 == "number" && isFinite(data15)) {
13302
13663
  if (data15 > 2 || isNaN(data15)) {
13303
- 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" };
13664
+ 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" };
13304
13665
  if (vErrors === null) {
13305
- vErrors = [err39];
13666
+ vErrors = [err40];
13306
13667
  } else {
13307
- vErrors.push(err39);
13668
+ vErrors.push(err40);
13308
13669
  }
13309
13670
  errors++;
13310
13671
  } else {
13311
13672
  if (data15 < 1 || isNaN(data15)) {
13312
- 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" };
13673
+ 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" };
13313
13674
  if (vErrors === null) {
13314
- vErrors = [err40];
13675
+ vErrors = [err41];
13315
13676
  } else {
13316
- vErrors.push(err40);
13677
+ vErrors.push(err41);
13317
13678
  }
13318
13679
  errors++;
13319
13680
  }
@@ -13329,20 +13690,20 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13329
13690
  let data16 = data.status;
13330
13691
  const _errs44 = errors;
13331
13692
  if (typeof data16 !== "string") {
13332
- 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" };
13693
+ 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" };
13333
13694
  if (vErrors === null) {
13334
- vErrors = [err41];
13695
+ vErrors = [err42];
13335
13696
  } else {
13336
- vErrors.push(err41);
13697
+ vErrors.push(err42);
13337
13698
  }
13338
13699
  errors++;
13339
13700
  }
13340
13701
  if ("unavailable" !== data16) {
13341
- 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" };
13702
+ 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" };
13342
13703
  if (vErrors === null) {
13343
- vErrors = [err42];
13704
+ vErrors = [err43];
13344
13705
  } else {
13345
- vErrors.push(err42);
13706
+ vErrors.push(err43);
13346
13707
  }
13347
13708
  errors++;
13348
13709
  }
@@ -13355,20 +13716,20 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13355
13716
  let data17 = data.reason;
13356
13717
  const _errs46 = errors;
13357
13718
  if (typeof data17 !== "string") {
13358
- 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" };
13719
+ 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" };
13359
13720
  if (vErrors === null) {
13360
- vErrors = [err43];
13721
+ vErrors = [err44];
13361
13722
  } else {
13362
- vErrors.push(err43);
13723
+ vErrors.push(err44);
13363
13724
  }
13364
13725
  errors++;
13365
13726
  }
13366
13727
  if ("organization_unbound" !== data17) {
13367
- 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" };
13728
+ 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" };
13368
13729
  if (vErrors === null) {
13369
- vErrors = [err44];
13730
+ vErrors = [err45];
13370
13731
  } else {
13371
- vErrors.push(err44);
13732
+ vErrors.push(err45);
13372
13733
  }
13373
13734
  errors++;
13374
13735
  }
@@ -13380,11 +13741,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13380
13741
  }
13381
13742
  }
13382
13743
  } else {
13383
- 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" };
13744
+ 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" };
13384
13745
  if (vErrors === null) {
13385
- vErrors = [err45];
13746
+ vErrors = [err46];
13386
13747
  } else {
13387
- vErrors.push(err45);
13748
+ vErrors.push(err46);
13388
13749
  }
13389
13750
  errors++;
13390
13751
  }
@@ -13397,11 +13758,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
13397
13758
  }
13398
13759
  }
13399
13760
  if (!valid1) {
13400
- 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" };
13761
+ 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" };
13401
13762
  if (vErrors === null) {
13402
- vErrors = [err46];
13763
+ vErrors = [err47];
13403
13764
  } else {
13404
- vErrors.push(err46);
13765
+ vErrors.push(err47);
13405
13766
  }
13406
13767
  errors++;
13407
13768
  validate49.errors = vErrors;
@@ -14133,8 +14494,8 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
14133
14494
  return errors === 0;
14134
14495
  }
14135
14496
  validate51.evaluated = { "dynamicProps": true, "dynamicItems": false };
14136
- var pattern15 = new RegExp("^[A-Za-z0-9]{1,128}$", "u");
14137
- var pattern16 = new RegExp("^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$", "u");
14497
+ var pattern48 = new RegExp("^[A-Za-z0-9]{1,128}$", "u");
14498
+ var pattern49 = new RegExp("^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$", "u");
14138
14499
  function validate52(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
14139
14500
  ;
14140
14501
  let vErrors = null;
@@ -14216,7 +14577,7 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
14216
14577
  const _errs9 = errors;
14217
14578
  if (errors === _errs9) {
14218
14579
  if (typeof data3 === "string") {
14219
- if (!pattern15.test(data3)) {
14580
+ if (!pattern48.test(data3)) {
14220
14581
  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}$"' }];
14221
14582
  return false;
14222
14583
  }
@@ -14235,7 +14596,7 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
14235
14596
  const _errs11 = errors;
14236
14597
  if (errors === _errs11) {
14237
14598
  if (typeof data4 === "string") {
14238
- if (!pattern16.test(data4)) {
14599
+ if (!pattern49.test(data4)) {
14239
14600
  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}$"' }];
14240
14601
  return false;
14241
14602
  }
@@ -14643,7 +15004,7 @@ function validate54(data, { instancePath = "", parentData, parentDataProperty, r
14643
15004
  const _errs3 = errors;
14644
15005
  if (errors === _errs3) {
14645
15006
  if (typeof data0 === "string") {
14646
- if (!pattern15.test(data0)) {
15007
+ if (!pattern48.test(data0)) {
14647
15008
  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}$"' }];
14648
15009
  return false;
14649
15010
  }
@@ -16215,7 +16576,7 @@ function validate55(data, { instancePath = "", parentData, parentDataProperty, r
16215
16576
  }
16216
16577
  validate55.evaluated = { "dynamicProps": true, "dynamicItems": false };
16217
16578
  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": {} };
16218
- var pattern18 = new RegExp("^[A-Za-z0-9_-]+$", "u");
16579
+ var pattern51 = new RegExp("^[A-Za-z0-9_-]+$", "u");
16219
16580
  function validate56(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
16220
16581
  ;
16221
16582
  let vErrors = null;
@@ -16576,7 +16937,7 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
16576
16937
  }
16577
16938
  errors++;
16578
16939
  } else {
16579
- if (!pattern18.test(data11)) {
16940
+ if (!pattern51.test(data11)) {
16580
16941
  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_-]+$"' };
16581
16942
  if (vErrors === null) {
16582
16943
  vErrors = [err22];
@@ -17101,7 +17462,7 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
17101
17462
  }
17102
17463
  errors++;
17103
17464
  } else {
17104
- if (!pattern18.test(data26)) {
17465
+ if (!pattern51.test(data26)) {
17105
17466
  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_-]+$"' };
17106
17467
  if (vErrors === null) {
17107
17468
  vErrors = [err58];
@@ -17344,10 +17705,10 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
17344
17705
  }
17345
17706
  validate56.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
17346
17707
  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"] };
17347
- var pattern20 = new RegExp("^[A-Za-z0-9._:-]{1,128}$", "u");
17348
- var pattern22 = new RegExp("^[A-Za-z0-9]{1,64}$", "u");
17349
- var pattern23 = new RegExp("^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$", "u");
17350
- var pattern24 = new RegExp("^[A-Za-z0-9][A-Za-z0-9._+-]*$", "u");
17708
+ var pattern53 = new RegExp("^[A-Za-z0-9._:-]{1,128}$", "u");
17709
+ var pattern55 = new RegExp("^[A-Za-z0-9]{1,64}$", "u");
17710
+ var pattern56 = new RegExp("^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$", "u");
17711
+ var pattern57 = new RegExp("^[A-Za-z0-9][A-Za-z0-9._+-]*$", "u");
17351
17712
  function validate57(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
17352
17713
  ;
17353
17714
  let vErrors = null;
@@ -17413,7 +17774,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
17413
17774
  const _errs8 = errors;
17414
17775
  if (errors === _errs8) {
17415
17776
  if (typeof data2 === "string") {
17416
- if (!pattern20.test(data2)) {
17777
+ if (!pattern53.test(data2)) {
17417
17778
  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}$"' }];
17418
17779
  return false;
17419
17780
  }
@@ -17432,7 +17793,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
17432
17793
  const _errs10 = errors;
17433
17794
  if (errors === _errs10) {
17434
17795
  if (typeof data3 === "string") {
17435
- if (!pattern20.test(data3)) {
17796
+ if (!pattern53.test(data3)) {
17436
17797
  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}$"' }];
17437
17798
  return false;
17438
17799
  }
@@ -17451,7 +17812,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
17451
17812
  const _errs12 = errors;
17452
17813
  if (errors === _errs12) {
17453
17814
  if (typeof data4 === "string") {
17454
- if (!pattern22.test(data4)) {
17815
+ if (!pattern55.test(data4)) {
17455
17816
  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}$"' }];
17456
17817
  return false;
17457
17818
  }
@@ -17523,7 +17884,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
17523
17884
  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" }];
17524
17885
  return false;
17525
17886
  } else {
17526
- if (!pattern23.test(data8)) {
17887
+ if (!pattern56.test(data8)) {
17527
17888
  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(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$"' }];
17528
17889
  return false;
17529
17890
  }
@@ -17563,7 +17924,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
17563
17924
  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" }];
17564
17925
  return false;
17565
17926
  } else {
17566
- if (!pattern24.test(data10)) {
17927
+ if (!pattern57.test(data10)) {
17567
17928
  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._+-]*$"' }];
17568
17929
  return false;
17569
17930
  }
@@ -17609,7 +17970,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
17609
17970
  return errors === 0;
17610
17971
  }
17611
17972
  validate57.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
17612
- 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": {} };
17973
+ 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": {} };
17613
17974
  function validate58(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
17614
17975
  ;
17615
17976
  let vErrors = null;
@@ -17650,7 +18011,7 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17650
18011
  const _errs5 = errors;
17651
18012
  if (errors === _errs5) {
17652
18013
  if (typeof data1 === "string") {
17653
- if (!pattern20.test(data1)) {
18014
+ if (!pattern53.test(data1)) {
17654
18015
  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}$"' }];
17655
18016
  return false;
17656
18017
  }
@@ -17720,10 +18081,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17720
18081
  return false;
17721
18082
  } else {
17722
18083
  if (data6.decisionId !== void 0) {
18084
+ let data7 = data6.decisionId;
17723
18085
  const _errs18 = errors;
17724
- if (typeof data6.decisionId !== "string") {
17725
- 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" }];
17726
- return false;
18086
+ if (errors === _errs18) {
18087
+ if (typeof data7 === "string") {
18088
+ if (!pattern4.test(data7)) {
18089
+ 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}$"' }];
18090
+ return false;
18091
+ }
18092
+ } else {
18093
+ 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" }];
18094
+ return false;
18095
+ }
17727
18096
  }
17728
18097
  var valid3 = _errs18 === errors;
17729
18098
  } else {
@@ -17731,10 +18100,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17731
18100
  }
17732
18101
  if (valid3) {
17733
18102
  if (data6.shortId !== void 0) {
18103
+ let data8 = data6.shortId;
17734
18104
  const _errs20 = errors;
17735
- if (typeof data6.shortId !== "string") {
17736
- 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" }];
17737
- return false;
18105
+ if (errors === _errs20) {
18106
+ if (typeof data8 === "string") {
18107
+ if (!pattern5.test(data8)) {
18108
+ 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}$"' }];
18109
+ return false;
18110
+ }
18111
+ } else {
18112
+ 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" }];
18113
+ return false;
18114
+ }
17738
18115
  }
17739
18116
  var valid3 = _errs20 === errors;
17740
18117
  } else {
@@ -17792,10 +18169,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17792
18169
  return false;
17793
18170
  } else {
17794
18171
  if (data11.decisionId !== void 0) {
18172
+ let data12 = data11.decisionId;
17795
18173
  const _errs29 = errors;
17796
- if (typeof data11.decisionId !== "string") {
17797
- 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" }];
17798
- return false;
18174
+ if (errors === _errs29) {
18175
+ if (typeof data12 === "string") {
18176
+ if (!pattern4.test(data12)) {
18177
+ 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}$"' }];
18178
+ return false;
18179
+ }
18180
+ } else {
18181
+ 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" }];
18182
+ return false;
18183
+ }
17799
18184
  }
17800
18185
  var valid5 = _errs29 === errors;
17801
18186
  } else {
@@ -17814,10 +18199,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
17814
18199
  }
17815
18200
  if (valid5) {
17816
18201
  if (data11.shortId !== void 0) {
18202
+ let data14 = data11.shortId;
17817
18203
  const _errs33 = errors;
17818
- if (typeof data11.shortId !== "string") {
17819
- 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" }];
17820
- return false;
18204
+ if (errors === _errs33) {
18205
+ if (typeof data14 === "string") {
18206
+ if (!pattern5.test(data14)) {
18207
+ 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}$"' }];
18208
+ return false;
18209
+ }
18210
+ } else {
18211
+ 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" }];
18212
+ return false;
18213
+ }
17821
18214
  }
17822
18215
  var valid5 = _errs33 === errors;
17823
18216
  } else {
@@ -18139,10 +18532,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
18139
18532
  }
18140
18533
  if (_errs65 === errors) {
18141
18534
  if (data28.decisionId !== void 0) {
18535
+ let data29 = data28.decisionId;
18142
18536
  const _errs66 = errors;
18143
- if (typeof data28.decisionId !== "string") {
18144
- 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" }];
18145
- return false;
18537
+ if (errors === _errs66) {
18538
+ if (typeof data29 === "string") {
18539
+ if (!pattern4.test(data29)) {
18540
+ 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}$"' }];
18541
+ return false;
18542
+ }
18543
+ } else {
18544
+ 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" }];
18545
+ return false;
18546
+ }
18146
18547
  }
18147
18548
  var valid10 = _errs66 === errors;
18148
18549
  } else {
@@ -18240,10 +18641,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
18240
18641
  }
18241
18642
  if (_errs74 === errors) {
18242
18643
  if (data32.decisionId !== void 0) {
18644
+ let data33 = data32.decisionId;
18243
18645
  const _errs75 = errors;
18244
- if (typeof data32.decisionId !== "string") {
18245
- 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" }];
18246
- return false;
18646
+ if (errors === _errs75) {
18647
+ if (typeof data33 === "string") {
18648
+ if (!pattern4.test(data33)) {
18649
+ 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}$"' }];
18650
+ return false;
18651
+ }
18652
+ } else {
18653
+ 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" }];
18654
+ return false;
18655
+ }
18247
18656
  }
18248
18657
  var valid12 = _errs75 === errors;
18249
18658
  } else {
@@ -18251,10 +18660,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
18251
18660
  }
18252
18661
  if (valid12) {
18253
18662
  if (data32.shortId !== void 0) {
18663
+ let data34 = data32.shortId;
18254
18664
  const _errs77 = errors;
18255
- if (typeof data32.shortId !== "string") {
18256
- 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" }];
18257
- return false;
18665
+ if (errors === _errs77) {
18666
+ if (typeof data34 === "string") {
18667
+ if (!pattern5.test(data34)) {
18668
+ 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}$"' }];
18669
+ return false;
18670
+ }
18671
+ } else {
18672
+ 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" }];
18673
+ return false;
18674
+ }
18258
18675
  }
18259
18676
  var valid12 = _errs77 === errors;
18260
18677
  } else {
@@ -18319,8 +18736,8 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
18319
18736
  return errors === 0;
18320
18737
  }
18321
18738
  validate58.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
18322
- var pattern26 = new RegExp("^[A-Za-z0-9._-]{1,128}$", "u");
18323
- var pattern27 = new RegExp("^pci_[A-Za-z0-9_-]{43}$", "u");
18739
+ var pattern66 = new RegExp("^[A-Za-z0-9._-]{1,128}$", "u");
18740
+ var pattern67 = new RegExp("^pci_[A-Za-z0-9_-]{43}$", "u");
18324
18741
  function validate59(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
18325
18742
  ;
18326
18743
  let vErrors = null;
@@ -18345,7 +18762,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
18345
18762
  const _errs3 = errors;
18346
18763
  if (errors === _errs3) {
18347
18764
  if (typeof data0 === "string") {
18348
- if (!pattern26.test(data0)) {
18765
+ if (!pattern66.test(data0)) {
18349
18766
  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}$"' }];
18350
18767
  return false;
18351
18768
  }
@@ -18364,7 +18781,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
18364
18781
  const _errs5 = errors;
18365
18782
  if (errors === _errs5) {
18366
18783
  if (typeof data1 === "string") {
18367
- if (!pattern27.test(data1)) {
18784
+ if (!pattern67.test(data1)) {
18368
18785
  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}$"' }];
18369
18786
  return false;
18370
18787
  }
@@ -18906,7 +19323,7 @@ function validate61(data, { instancePath = "", parentData, parentDataProperty, r
18906
19323
  return errors === 0;
18907
19324
  }
18908
19325
  validate61.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
18909
- 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 };
19326
+ 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 };
18910
19327
  function validate62(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
18911
19328
  ;
18912
19329
  let vErrors = null;
@@ -18963,10 +19380,18 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
18963
19380
  }
18964
19381
  if (valid1) {
18965
19382
  if (data.decisionId !== void 0) {
19383
+ let data2 = data.decisionId;
18966
19384
  const _errs7 = errors;
18967
- if (typeof data.decisionId !== "string") {
18968
- 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" }];
18969
- return false;
19385
+ if (errors === _errs7) {
19386
+ if (typeof data2 === "string") {
19387
+ if (!pattern4.test(data2)) {
19388
+ 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}$"' }];
19389
+ return false;
19390
+ }
19391
+ } else {
19392
+ 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" }];
19393
+ return false;
19394
+ }
18970
19395
  }
18971
19396
  var valid1 = _errs7 === errors;
18972
19397
  } else {
@@ -19027,7 +19452,7 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
19027
19452
  return errors === 0;
19028
19453
  }
19029
19454
  validate62.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
19030
- 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");
19455
+ 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");
19031
19456
  function validate63(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
19032
19457
  ;
19033
19458
  let vErrors = null;
@@ -19061,7 +19486,7 @@ function validate63(data, { instancePath = "", parentData, parentDataProperty, r
19061
19486
  const _errs3 = errors;
19062
19487
  if (errors === _errs3) {
19063
19488
  if (typeof data0 === "string") {
19064
- if (!pattern28.test(data0)) {
19489
+ if (!pattern69.test(data0)) {
19065
19490
  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}$"' }];
19066
19491
  return false;
19067
19492
  }
@@ -19126,7 +19551,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
19126
19551
  return errors === 0;
19127
19552
  }
19128
19553
  validate64.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
19129
- var pattern30 = new RegExp("^api_key_[A-Za-z0-9_-]+$", "u");
19554
+ var pattern71 = new RegExp("^api_key_[A-Za-z0-9_-]+$", "u");
19130
19555
  function validate65(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
19131
19556
  ;
19132
19557
  let vErrors = null;
@@ -19160,7 +19585,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
19160
19585
  const _errs3 = errors;
19161
19586
  if (errors === _errs3) {
19162
19587
  if (typeof data0 === "string") {
19163
- if (!pattern5.test(data0)) {
19588
+ if (!pattern35.test(data0)) {
19164
19589
  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}$"' }];
19165
19590
  return false;
19166
19591
  }
@@ -19212,7 +19637,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
19212
19637
  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" }];
19213
19638
  return false;
19214
19639
  } else {
19215
- if (!pattern30.test(data2)) {
19640
+ if (!pattern71.test(data2)) {
19216
19641
  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_-]+$"' }];
19217
19642
  return false;
19218
19643
  }
@@ -19240,9 +19665,9 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
19240
19665
  return errors === 0;
19241
19666
  }
19242
19667
  validate65.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
19243
- var pattern32 = new RegExp("^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$", "u");
19244
- var pattern33 = new RegExp("^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$", "u");
19245
- var pattern34 = new RegExp("^[\\x21-\\x7e]+$", "u");
19668
+ var pattern73 = new RegExp("^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$", "u");
19669
+ var pattern74 = new RegExp("^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$", "u");
19670
+ var pattern75 = new RegExp("^[\\x21-\\x7e]+$", "u");
19246
19671
  function validate66(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
19247
19672
  ;
19248
19673
  let vErrors = null;
@@ -19314,7 +19739,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
19314
19739
  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" }];
19315
19740
  return false;
19316
19741
  } else {
19317
- if (!pattern30.test(data2)) {
19742
+ if (!pattern71.test(data2)) {
19318
19743
  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_-]+$"' }];
19319
19744
  return false;
19320
19745
  }
@@ -19343,7 +19768,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
19343
19768
  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" }];
19344
19769
  return false;
19345
19770
  } else {
19346
- if (!pattern32.test(data3)) {
19771
+ if (!pattern73.test(data3)) {
19347
19772
  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])?$"' }];
19348
19773
  return false;
19349
19774
  }
@@ -19372,7 +19797,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
19372
19797
  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" }];
19373
19798
  return false;
19374
19799
  } else {
19375
- if (!pattern33.test(data4)) {
19800
+ if (!pattern74.test(data4)) {
19376
19801
  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]+$"' }];
19377
19802
  return false;
19378
19803
  }
@@ -19412,7 +19837,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
19412
19837
  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" }];
19413
19838
  return false;
19414
19839
  } else {
19415
- if (!pattern34.test(data6)) {
19840
+ if (!pattern75.test(data6)) {
19416
19841
  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]+$"' }];
19417
19842
  return false;
19418
19843
  }
@@ -19698,7 +20123,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
19698
20123
  }
19699
20124
  errors++;
19700
20125
  } else {
19701
- if (!pattern30.test(data11)) {
20126
+ if (!pattern71.test(data11)) {
19702
20127
  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_-]+$"' };
19703
20128
  if (vErrors === null) {
19704
20129
  vErrors = [err12];
@@ -19810,7 +20235,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
19810
20235
  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" }];
19811
20236
  return false;
19812
20237
  } else {
19813
- if (!pattern30.test(data0)) {
20238
+ if (!pattern71.test(data0)) {
19814
20239
  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_-]+$"' }];
19815
20240
  return false;
19816
20241
  }
@@ -19839,7 +20264,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
19839
20264
  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" }];
19840
20265
  return false;
19841
20266
  } else {
19842
- if (!pattern32.test(data1)) {
20267
+ if (!pattern73.test(data1)) {
19843
20268
  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])?$"' }];
19844
20269
  return false;
19845
20270
  }
@@ -19868,7 +20293,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
19868
20293
  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" }];
19869
20294
  return false;
19870
20295
  } else {
19871
- if (!pattern33.test(data2)) {
20296
+ if (!pattern74.test(data2)) {
19872
20297
  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]+$"' }];
19873
20298
  return false;
19874
20299
  }
@@ -19908,7 +20333,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
19908
20333
  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" }];
19909
20334
  return false;
19910
20335
  } else {
19911
- if (!pattern34.test(data4)) {
20336
+ if (!pattern75.test(data4)) {
19912
20337
  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]+$"' }];
19913
20338
  return false;
19914
20339
  }
@@ -20189,7 +20614,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
20189
20614
  const _errs3 = errors;
20190
20615
  if (errors === _errs3) {
20191
20616
  if (typeof data0 === "string") {
20192
- if (!pattern5.test(data0)) {
20617
+ if (!pattern35.test(data0)) {
20193
20618
  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}$"' }];
20194
20619
  return false;
20195
20620
  }
@@ -20216,7 +20641,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
20216
20641
  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" }];
20217
20642
  return false;
20218
20643
  } else {
20219
- if (!pattern32.test(data1)) {
20644
+ if (!pattern73.test(data1)) {
20220
20645
  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])?$"' }];
20221
20646
  return false;
20222
20647
  }
@@ -20269,7 +20694,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
20269
20694
  return errors === 0;
20270
20695
  }
20271
20696
  validate68.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
20272
- var pattern46 = new RegExp("^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$", "u");
20697
+ var pattern87 = new RegExp("^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$", "u");
20273
20698
  function validate69(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
20274
20699
  ;
20275
20700
  let vErrors = null;
@@ -20330,7 +20755,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
20330
20755
  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" }];
20331
20756
  return false;
20332
20757
  } else {
20333
- if (!pattern30.test(data1)) {
20758
+ if (!pattern71.test(data1)) {
20334
20759
  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_-]+$"' }];
20335
20760
  return false;
20336
20761
  }
@@ -20359,7 +20784,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
20359
20784
  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" }];
20360
20785
  return false;
20361
20786
  } else {
20362
- if (!pattern32.test(data2)) {
20787
+ if (!pattern73.test(data2)) {
20363
20788
  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])?$"' }];
20364
20789
  return false;
20365
20790
  }
@@ -20388,7 +20813,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
20388
20813
  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" }];
20389
20814
  return false;
20390
20815
  } else {
20391
- if (!pattern33.test(data3)) {
20816
+ if (!pattern74.test(data3)) {
20392
20817
  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]+$"' }];
20393
20818
  return false;
20394
20819
  }
@@ -20428,7 +20853,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
20428
20853
  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" }];
20429
20854
  return false;
20430
20855
  } else {
20431
- if (!pattern34.test(data5)) {
20856
+ if (!pattern75.test(data5)) {
20432
20857
  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]+$"' }];
20433
20858
  return false;
20434
20859
  }
@@ -20690,7 +21115,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
20690
21115
  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" }];
20691
21116
  return false;
20692
21117
  } else {
20693
- if (!pattern46.test(data10)) {
21118
+ if (!pattern87.test(data10)) {
20694
21119
  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]+)*$"' }];
20695
21120
  return false;
20696
21121
  }
@@ -20750,7 +21175,7 @@ function validate70(data, { instancePath = "", parentData, parentDataProperty, r
20750
21175
  const _errs3 = errors;
20751
21176
  if (errors === _errs3) {
20752
21177
  if (typeof data0 === "string") {
20753
- if (!pattern5.test(data0)) {
21178
+ if (!pattern35.test(data0)) {
20754
21179
  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}$"' }];
20755
21180
  return false;
20756
21181
  }
@@ -20812,7 +21237,7 @@ function validate71(data, { instancePath = "", parentData, parentDataProperty, r
20812
21237
  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" }];
20813
21238
  return false;
20814
21239
  } else {
20815
- if (!pattern30.test(data0)) {
21240
+ if (!pattern71.test(data0)) {
20816
21241
  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_-]+$"' }];
20817
21242
  return false;
20818
21243
  }
@@ -21076,7 +21501,7 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
21076
21501
  }
21077
21502
  validate73.evaluated = { "dynamicProps": true, "dynamicItems": false };
21078
21503
  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"] };
21079
- var pattern49 = new RegExp("^client_[A-Za-z0-9_-]+$", "u");
21504
+ var pattern90 = new RegExp("^client_[A-Za-z0-9_-]+$", "u");
21080
21505
  function validate74(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
21081
21506
  ;
21082
21507
  let vErrors = null;
@@ -21145,7 +21570,7 @@ function validate74(data, { instancePath = "", parentData, parentDataProperty, r
21145
21570
  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" }];
21146
21571
  return false;
21147
21572
  } else {
21148
- if (!pattern49.test(data2)) {
21573
+ if (!pattern90.test(data2)) {
21149
21574
  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_-]+$"' }];
21150
21575
  return false;
21151
21576
  }
@@ -22166,7 +22591,6 @@ var MAX_EXCERPT_CHARS = 80;
22166
22591
  var MAX_TITLE_CHARS = 140;
22167
22592
  var MAX_PATH_CHARS = 120;
22168
22593
  var MAX_VISIBLE_CONFLICTS = 3;
22169
- var SAFE_ID = /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/u;
22170
22594
  function displayText(value, maxChars) {
22171
22595
  const redacted = scrub(value, DEFAULT_RULES);
22172
22596
  const clean = terminalSafeLine(typeof redacted === "string" ? redacted : "");
@@ -22194,7 +22618,7 @@ Proposed replacement: \u201C${after}\u201D` : `Edit ${targets}.`;
22194
22618
  return `Change ${targets}.`;
22195
22619
  }
22196
22620
  function decisionLabel(conflict) {
22197
- const id = typeof conflict.shortId === "string" && SAFE_ID.test(conflict.shortId) ? `dec_${conflict.shortId}` : typeof conflict.decisionId === "string" && SAFE_ID.test(conflict.decisionId) ? conflict.decisionId : "unknown";
22621
+ const id = typeof conflict.shortId === "string" && /^[0-9a-f]{8}$/u.test(conflict.shortId) ? `dec_${conflict.shortId}` : typeof conflict.decisionId === "string" && /^dec_[0-9a-f]{8}$/u.test(conflict.decisionId) ? conflict.decisionId : "unknown";
22198
22622
  const title = typeof conflict.title === "string" ? displayText(conflict.title, MAX_TITLE_CHARS) : "";
22199
22623
  return title ? `Decision ${id}: \u201C${title}\u201D.` : `Decision ${id}: details unavailable; inspect it before approving.`;
22200
22624
  }
@@ -22238,10 +22662,6 @@ import {
22238
22662
  } from "fs";
22239
22663
  import { join as join13 } from "path";
22240
22664
 
22241
- // src/daemon/client.ts
22242
- import { createConnection } from "net";
22243
- import { join as join12 } from "path";
22244
-
22245
22665
  // src/daemon/principal.ts
22246
22666
  import { createHash as createHash6 } from "crypto";
22247
22667
  var PRINCIPAL_COMPONENT_MAX_LENGTH = 512;
@@ -22271,6 +22691,7 @@ function daemonPrincipalsMatch(caller, daemon) {
22271
22691
  // src/daemon/protocol.ts
22272
22692
  var DAEMON_JSON_REQUEST_MAX_BYTES = 64 * 1024;
22273
22693
  var DAEMON_JSON_RESPONSE_MAX_BYTES = 8 * 1024 * 1024;
22694
+ var DECISION_IDENTITY_VERSION = 7;
22274
22695
  function isRecord(value) {
22275
22696
  return typeof value === "object" && value !== null && !Array.isArray(value);
22276
22697
  }
@@ -22283,6 +22704,7 @@ function parseDaemonResponseEnvelope(value) {
22283
22704
  if (value.error !== void 0 && typeof value.error !== "string") return void 0;
22284
22705
  return {
22285
22706
  id: value.id,
22707
+ ...typeof value.decisionIdentityVersion === "number" ? { decisionIdentityVersion: value.decisionIdentityVersion } : {},
22286
22708
  ok: value.ok,
22287
22709
  ...value.result === void 0 ? {} : { result: value.result },
22288
22710
  ...value.error === void 0 ? {} : { error: value.error }
@@ -22290,6 +22712,8 @@ function parseDaemonResponseEnvelope(value) {
22290
22712
  }
22291
22713
 
22292
22714
  // src/daemon/client.ts
22715
+ import { createConnection } from "net";
22716
+ import { join as join12 } from "path";
22293
22717
  var SOCK_PATH = join12(primConfigDirectory(), "sock");
22294
22718
  var DEFAULT_TIMEOUT_MS2 = 250;
22295
22719
  var nextRequestId = 1;
@@ -22362,7 +22786,9 @@ function daemonRequest(method, params = {}, opts = {}) {
22362
22786
  return;
22363
22787
  }
22364
22788
  clearTimeout(timer);
22365
- settle(res.ok && res.result !== void 0 ? res.result : null);
22789
+ settle(
22790
+ (!(method.startsWith("decisions_") || method.startsWith("decision_")) || res.decisionIdentityVersion === DECISION_IDENTITY_VERSION) && res.ok && res.result !== void 0 ? res.result : null
22791
+ );
22366
22792
  } catch {
22367
22793
  clearTimeout(timer);
22368
22794
  settle(null);
@@ -22383,7 +22809,7 @@ var DECISION_DIGEST_CACHE_LIMIT = 100;
22383
22809
  var DECISION_DIGEST_CACHE_WINDOW = "24h";
22384
22810
  var DECISION_DIGEST_CACHE_PATH = `/api/cli/decisions/recent?limit=${String(DECISION_DIGEST_CACHE_LIMIT)}&since=${DECISION_DIGEST_CACHE_WINDOW}`;
22385
22811
  var DECISION_DRAFT_DIGEST_CACHE_PATH = `${DECISION_DIGEST_CACHE_PATH}&drafts=true`;
22386
- var SAFE_PRIVATE_DRAFT_ID = /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/u;
22812
+ var SAFE_PRIVATE_DRAFT_ID = /^dec_[0-9a-f]{8}$/u;
22387
22813
  function isActionablePrivateDraft(row) {
22388
22814
  if (typeof row !== "object" || row === null || Array.isArray(row)) return false;
22389
22815
  const candidate = row;
@@ -28174,7 +28600,7 @@ function resultForPreflight(response, preview = "Review the requested change.")
28174
28600
  const directives = response.conflicts.flatMap((value) => {
28175
28601
  if (!value || typeof value !== "object") return [];
28176
28602
  const { decisionId, shortId } = value;
28177
- const id = typeof shortId === "string" && safe.test(shortId) ? `dec_${shortId}` : typeof decisionId === "string" && safe.test(decisionId) ? decisionId : void 0;
28603
+ const id = typeof shortId === "string" && /^[0-9a-f]{8}$/u.test(shortId) ? `dec_${shortId}` : typeof decisionId === "string" && /^dec_[0-9a-f]{8}$/u.test(decisionId) ? decisionId : void 0;
28178
28604
  if (!id) return [];
28179
28605
  return [
28180
28606
  `To reconcile, run: prim reconcile ${id}`,