@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
@@ -15963,9 +15963,13 @@ function updateNotifier(options) {
15963
15963
  return updateNotifier2;
15964
15964
  }
15965
15965
 
15966
- // src/daemon/client.ts
15967
- import { createConnection } from "net";
15968
- import { join as join3 } from "path";
15966
+ // src/daemon/principal.ts
15967
+ import { createHash as createHash2 } from "crypto";
15968
+
15969
+ // src/lib/credentials.ts
15970
+ import { createHash } from "crypto";
15971
+ import { readFileSync } from "fs";
15972
+ import { join as join2 } from "path";
15969
15973
 
15970
15974
  // src/lib/paths.ts
15971
15975
  import { homedir } from "os";
@@ -15995,14 +15999,6 @@ function primConfigDirectory(options = {}) {
15995
15999
  return resolvePrimConfigDirectory(options).path;
15996
16000
  }
15997
16001
 
15998
- // src/daemon/principal.ts
15999
- import { createHash as createHash2 } from "crypto";
16000
-
16001
- // src/lib/credentials.ts
16002
- import { createHash } from "crypto";
16003
- import { readFileSync } from "fs";
16004
- import { join as join2 } from "path";
16005
-
16006
16002
  // src/lib/workos-connect.ts
16007
16003
  var DISCOVERY_PATH = "/api/cli/auth/connect/config";
16008
16004
  var DEVICE_AUTHORIZATION_PATH = "/oauth2/device_authorization";
@@ -16467,6 +16463,7 @@ function resolveDaemonPrincipal(token = resolveAuthCredential()?.token) {
16467
16463
  // src/daemon/protocol.ts
16468
16464
  var DAEMON_JSON_REQUEST_MAX_BYTES = 64 * 1024;
16469
16465
  var DAEMON_JSON_RESPONSE_MAX_BYTES = 8 * 1024 * 1024;
16466
+ var DECISION_IDENTITY_VERSION = 7;
16470
16467
  function isRecord(value) {
16471
16468
  return typeof value === "object" && value !== null && !Array.isArray(value);
16472
16469
  }
@@ -16479,6 +16476,7 @@ function parseDaemonResponseEnvelope(value) {
16479
16476
  if (value.error !== void 0 && typeof value.error !== "string") return void 0;
16480
16477
  return {
16481
16478
  id: value.id,
16479
+ ...typeof value.decisionIdentityVersion === "number" ? { decisionIdentityVersion: value.decisionIdentityVersion } : {},
16482
16480
  ok: value.ok,
16483
16481
  ...value.result === void 0 ? {} : { result: value.result },
16484
16482
  ...value.error === void 0 ? {} : { error: value.error }
@@ -16486,6 +16484,8 @@ function parseDaemonResponseEnvelope(value) {
16486
16484
  }
16487
16485
 
16488
16486
  // src/daemon/client.ts
16487
+ import { createConnection } from "net";
16488
+ import { join as join3 } from "path";
16489
16489
  var SOCK_PATH = join3(primConfigDirectory(), "sock");
16490
16490
  var DEFAULT_TIMEOUT_MS = 250;
16491
16491
  var nextRequestId = 1;
@@ -16558,7 +16558,9 @@ function daemonRequest(method, params = {}, opts = {}) {
16558
16558
  return;
16559
16559
  }
16560
16560
  clearTimeout(timer);
16561
- settle(res.ok && res.result !== void 0 ? res.result : null);
16561
+ settle(
16562
+ (!(method.startsWith("decisions_") || method.startsWith("decision_")) || res.decisionIdentityVersion === DECISION_IDENTITY_VERSION) && res.ok && res.result !== void 0 ? res.result : null
16563
+ );
16562
16564
  } catch {
16563
16565
  clearTimeout(timer);
16564
16566
  settle(null);
@@ -16853,6 +16855,83 @@ function decisionIngestionStatus(cwd) {
16853
16855
  return isRepoActiveForCapture(cwd) ? "enabled" : "disabled";
16854
16856
  }
16855
16857
 
16858
+ // src/decisions/identity.ts
16859
+ var PUBLIC_ID = /^dec_[0-9a-f]{8}$/u;
16860
+ var BARE_ID = /^[0-9a-f]{8}$/u;
16861
+ var OPAQUE_FIELDS = /* @__PURE__ */ new Set([
16862
+ "cursor",
16863
+ "continueCursor",
16864
+ "nextCursor",
16865
+ "reviewToken",
16866
+ "bypassToken"
16867
+ ]);
16868
+ function decisionIdentifier(id, shortId) {
16869
+ if (typeof id === "string" && PUBLIC_ID.test(id)) return id;
16870
+ if (typeof shortId === "string" && BARE_ID.test(shortId)) return `dec_${shortId}`;
16871
+ if (typeof id === "string" && BARE_ID.test(id)) return `dec_${id}`;
16872
+ return void 0;
16873
+ }
16874
+ function publicDecisionResponse(value) {
16875
+ const replacements = /* @__PURE__ */ new Map();
16876
+ const referenceKeys = /* @__PURE__ */ new Set([
16877
+ "decisionId",
16878
+ "childId",
16879
+ "parentId",
16880
+ "supersededBy",
16881
+ "activationDecisionId"
16882
+ ]);
16883
+ function visit3(input, field = "") {
16884
+ if (OPAQUE_FIELDS.has(field) || input === null || input === void 0) return input;
16885
+ if (Array.isArray(input)) return input.map((item) => visit3(item, field));
16886
+ if (typeof input === "string" && (referenceKeys.has(field) || /DecisionIds$/u.test(field))) {
16887
+ const id = decisionIdentifier(input);
16888
+ if (!id) throw new Error("Decision identity unavailable; update Primitive and retry");
16889
+ return id;
16890
+ }
16891
+ if (typeof input !== "object") return input;
16892
+ const row = { ...input };
16893
+ for (const [idKey, shortKey] of [
16894
+ ["id", "shortId"],
16895
+ ["_id", "shortId"],
16896
+ ["decisionId", "shortId"],
16897
+ ["childId", "childShortId"],
16898
+ ["parentId", "parentShortId"]
16899
+ ]) {
16900
+ if (!(idKey in row) || (idKey === "id" || idKey === "_id") && !("intent" in row || "shortId" in row))
16901
+ continue;
16902
+ const id = decisionIdentifier(
16903
+ row[idKey],
16904
+ row[shortKey] ?? (idKey === "decisionId" ? row.decisionShortId : void 0)
16905
+ );
16906
+ if (!id) throw new Error("Decision identity unavailable; update Primitive and retry");
16907
+ const previous = row[idKey];
16908
+ if (typeof previous === "string" && !PUBLIC_ID.test(previous) && !BARE_ID.test(previous)) {
16909
+ replacements.set(previous, id);
16910
+ }
16911
+ if (shortKey in row) row[shortKey] = id.slice(4);
16912
+ if (idKey === "decisionId" && "decisionShortId" in row) row.decisionShortId = id.slice(4);
16913
+ row[idKey] = id;
16914
+ }
16915
+ return Object.fromEntries(Object.entries(row).map(([key, item]) => [key, visit3(item, key)]));
16916
+ }
16917
+ const projected = visit3(value);
16918
+ function replace(input, field = "") {
16919
+ if (OPAQUE_FIELDS.has(field)) return input;
16920
+ if (typeof input === "string") {
16921
+ let output = input;
16922
+ for (const [raw, id] of replacements) if (raw !== id) output = output.replaceAll(raw, id);
16923
+ return output;
16924
+ }
16925
+ if (Array.isArray(input)) return input.map((item) => replace(item, field));
16926
+ if (input && typeof input === "object")
16927
+ return Object.fromEntries(
16928
+ Object.entries(input).map(([key, item]) => [key, replace(item, key)])
16929
+ );
16930
+ return input;
16931
+ }
16932
+ return replace(projected);
16933
+ }
16934
+
16856
16935
  // src/client.ts
16857
16936
  import { createHash as createHash4 } from "crypto";
16858
16937
  import { chmodSync as chmodSync2, existsSync as existsSync4, mkdirSync as mkdirSync3, readFileSync as readFileSync6, rmSync as rmSync3 } from "fs";
@@ -17925,7 +18004,7 @@ async function responseValue(response) {
17925
18004
  const message = typeof errorRecord?.error === "string" ? errorRecord.error : `HTTP ${response.status}`;
17926
18005
  throw new HttpError(response.status, message, errorBody);
17927
18006
  }
17928
- return response.json();
18007
+ return publicDecisionResponse(await response.json());
17929
18008
  }
17930
18009
  async function request(method, path9, body, options) {
17931
18010
  const siteUrl = getSiteUrl();
@@ -18276,7 +18355,9 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
18276
18355
  return errors === 0;
18277
18356
  }
18278
18357
  validate22.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
18279
- 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": {} };
18358
+ 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": {} };
18359
+ var pattern4 = new RegExp("^dec_[0-9a-f]{8}$", "u");
18360
+ var pattern5 = new RegExp("^[0-9a-f]{8}$", "u");
18280
18361
  function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
18281
18362
  ;
18282
18363
  let vErrors = null;
@@ -18314,6 +18395,11 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
18314
18395
  if (func1(data1) < 1) {
18315
18396
  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" }];
18316
18397
  return false;
18398
+ } else {
18399
+ if (!pattern4.test(data1)) {
18400
+ 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}$"' }];
18401
+ return false;
18402
+ }
18317
18403
  }
18318
18404
  } else {
18319
18405
  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" }];
@@ -18326,10 +18412,18 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
18326
18412
  }
18327
18413
  if (valid2) {
18328
18414
  if (data0.shortId !== void 0) {
18415
+ let data2 = data0.shortId;
18329
18416
  const _errs8 = errors;
18330
- if (typeof data0.shortId !== "string") {
18331
- 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" }];
18332
- return false;
18417
+ if (errors === _errs8) {
18418
+ if (typeof data2 === "string") {
18419
+ if (!pattern5.test(data2)) {
18420
+ 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}$"' }];
18421
+ return false;
18422
+ }
18423
+ } else {
18424
+ 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" }];
18425
+ return false;
18426
+ }
18333
18427
  }
18334
18428
  var valid2 = _errs8 === errors;
18335
18429
  } else {
@@ -18522,6 +18616,11 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
18522
18616
  if (func1(data16) < 1) {
18523
18617
  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" }];
18524
18618
  return false;
18619
+ } else {
18620
+ if (!pattern4.test(data16)) {
18621
+ 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}$"' }];
18622
+ return false;
18623
+ }
18525
18624
  }
18526
18625
  } else {
18527
18626
  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" }];
@@ -18534,10 +18633,18 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
18534
18633
  }
18535
18634
  if (valid6) {
18536
18635
  if (data15.shortId !== void 0) {
18636
+ let data17 = data15.shortId;
18537
18637
  const _errs40 = errors;
18538
- if (typeof data15.shortId !== "string") {
18539
- 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" }];
18540
- return false;
18638
+ if (errors === _errs40) {
18639
+ if (typeof data17 === "string") {
18640
+ if (!pattern5.test(data17)) {
18641
+ 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}$"' }];
18642
+ return false;
18643
+ }
18644
+ } else {
18645
+ 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" }];
18646
+ return false;
18647
+ }
18541
18648
  }
18542
18649
  var valid6 = _errs40 === errors;
18543
18650
  } else {
@@ -19777,7 +19884,7 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
19777
19884
  return errors === 0;
19778
19885
  }
19779
19886
  validate25.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
19780
- 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": {} }] };
19887
+ 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": {} }] };
19781
19888
  function validate26(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
19782
19889
  ;
19783
19890
  let vErrors = null;
@@ -19817,13 +19924,23 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
19817
19924
  vErrors.push(err1);
19818
19925
  }
19819
19926
  errors++;
19927
+ } else {
19928
+ if (!pattern4.test(data0)) {
19929
+ 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}$"' };
19930
+ if (vErrors === null) {
19931
+ vErrors = [err2];
19932
+ } else {
19933
+ vErrors.push(err2);
19934
+ }
19935
+ errors++;
19936
+ }
19820
19937
  }
19821
19938
  } else {
19822
- 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" };
19939
+ 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" };
19823
19940
  if (vErrors === null) {
19824
- vErrors = [err2];
19941
+ vErrors = [err3];
19825
19942
  } else {
19826
- vErrors.push(err2);
19943
+ vErrors.push(err3);
19827
19944
  }
19828
19945
  errors++;
19829
19946
  }
@@ -19834,15 +19951,28 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
19834
19951
  }
19835
19952
  if (valid2) {
19836
19953
  if (data.shortId !== void 0) {
19954
+ let data1 = data.shortId;
19837
19955
  const _errs7 = errors;
19838
- if (typeof data.shortId !== "string") {
19839
- 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" };
19840
- if (vErrors === null) {
19841
- vErrors = [err3];
19956
+ if (errors === _errs7) {
19957
+ if (typeof data1 === "string") {
19958
+ if (!pattern5.test(data1)) {
19959
+ 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}$"' };
19960
+ if (vErrors === null) {
19961
+ vErrors = [err4];
19962
+ } else {
19963
+ vErrors.push(err4);
19964
+ }
19965
+ errors++;
19966
+ }
19842
19967
  } else {
19843
- vErrors.push(err3);
19968
+ 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" };
19969
+ if (vErrors === null) {
19970
+ vErrors = [err5];
19971
+ } else {
19972
+ vErrors.push(err5);
19973
+ }
19974
+ errors++;
19844
19975
  }
19845
- errors++;
19846
19976
  }
19847
19977
  var valid2 = _errs7 === errors;
19848
19978
  } else {
@@ -19853,20 +19983,20 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
19853
19983
  let data2 = data.outcome;
19854
19984
  const _errs9 = errors;
19855
19985
  if (typeof data2 !== "string") {
19856
- 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" };
19986
+ 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" };
19857
19987
  if (vErrors === null) {
19858
- vErrors = [err4];
19988
+ vErrors = [err6];
19859
19989
  } else {
19860
- vErrors.push(err4);
19990
+ vErrors.push(err6);
19861
19991
  }
19862
19992
  errors++;
19863
19993
  }
19864
19994
  if (!(data2 === "stale" || data2 === "confirmed" || data2 === "corrected")) {
19865
- 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" };
19995
+ 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" };
19866
19996
  if (vErrors === null) {
19867
- vErrors = [err5];
19997
+ vErrors = [err7];
19868
19998
  } else {
19869
- vErrors.push(err5);
19999
+ vErrors.push(err7);
19870
20000
  }
19871
20001
  errors++;
19872
20002
  }
@@ -19878,11 +20008,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
19878
20008
  }
19879
20009
  }
19880
20010
  } else {
19881
- 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" };
20011
+ 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" };
19882
20012
  if (vErrors === null) {
19883
- vErrors = [err6];
20013
+ vErrors = [err8];
19884
20014
  } else {
19885
- vErrors.push(err6);
20015
+ vErrors.push(err8);
19886
20016
  }
19887
20017
  errors++;
19888
20018
  }
@@ -19897,11 +20027,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
19897
20027
  if (data && typeof data == "object" && !Array.isArray(data)) {
19898
20028
  let missing1;
19899
20029
  if (data.decisionId === void 0 && (missing1 = "decisionId") || data.outcome === void 0 && (missing1 = "outcome") || data.respondedAt === void 0 && (missing1 = "respondedAt")) {
19900
- 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 + "'" };
20030
+ 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 + "'" };
19901
20031
  if (vErrors === null) {
19902
- vErrors = [err7];
20032
+ vErrors = [err9];
19903
20033
  } else {
19904
- vErrors.push(err7);
20034
+ vErrors.push(err9);
19905
20035
  }
19906
20036
  errors++;
19907
20037
  } else {
@@ -19911,20 +20041,30 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
19911
20041
  if (errors === _errs14) {
19912
20042
  if (typeof data3 === "string") {
19913
20043
  if (func1(data3) < 1) {
19914
- 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" };
20044
+ 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" };
19915
20045
  if (vErrors === null) {
19916
- vErrors = [err8];
20046
+ vErrors = [err10];
19917
20047
  } else {
19918
- vErrors.push(err8);
20048
+ vErrors.push(err10);
19919
20049
  }
19920
20050
  errors++;
20051
+ } else {
20052
+ if (!pattern4.test(data3)) {
20053
+ 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}$"' };
20054
+ if (vErrors === null) {
20055
+ vErrors = [err11];
20056
+ } else {
20057
+ vErrors.push(err11);
20058
+ }
20059
+ errors++;
20060
+ }
19921
20061
  }
19922
20062
  } else {
19923
- 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" };
20063
+ 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" };
19924
20064
  if (vErrors === null) {
19925
- vErrors = [err9];
20065
+ vErrors = [err12];
19926
20066
  } else {
19927
- vErrors.push(err9);
20067
+ vErrors.push(err12);
19928
20068
  }
19929
20069
  errors++;
19930
20070
  }
@@ -19935,15 +20075,28 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
19935
20075
  }
19936
20076
  if (valid3) {
19937
20077
  if (data.shortId !== void 0) {
20078
+ let data4 = data.shortId;
19938
20079
  const _errs16 = errors;
19939
- if (typeof data.shortId !== "string") {
19940
- 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" };
19941
- if (vErrors === null) {
19942
- vErrors = [err10];
20080
+ if (errors === _errs16) {
20081
+ if (typeof data4 === "string") {
20082
+ if (!pattern5.test(data4)) {
20083
+ 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}$"' };
20084
+ if (vErrors === null) {
20085
+ vErrors = [err13];
20086
+ } else {
20087
+ vErrors.push(err13);
20088
+ }
20089
+ errors++;
20090
+ }
19943
20091
  } else {
19944
- vErrors.push(err10);
20092
+ 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" };
20093
+ if (vErrors === null) {
20094
+ vErrors = [err14];
20095
+ } else {
20096
+ vErrors.push(err14);
20097
+ }
20098
+ errors++;
19945
20099
  }
19946
- errors++;
19947
20100
  }
19948
20101
  var valid3 = _errs16 === errors;
19949
20102
  } else {
@@ -19954,20 +20107,20 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
19954
20107
  let data5 = data.outcome;
19955
20108
  const _errs18 = errors;
19956
20109
  if (typeof data5 !== "string") {
19957
- 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" };
20110
+ 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" };
19958
20111
  if (vErrors === null) {
19959
- vErrors = [err11];
20112
+ vErrors = [err15];
19960
20113
  } else {
19961
- vErrors.push(err11);
20114
+ vErrors.push(err15);
19962
20115
  }
19963
20116
  errors++;
19964
20117
  }
19965
20118
  if ("already_responded" !== data5) {
19966
- 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" };
20119
+ 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" };
19967
20120
  if (vErrors === null) {
19968
- vErrors = [err12];
20121
+ vErrors = [err16];
19969
20122
  } else {
19970
- vErrors.push(err12);
20123
+ vErrors.push(err16);
19971
20124
  }
19972
20125
  errors++;
19973
20126
  }
@@ -19979,11 +20132,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
19979
20132
  if (data.confirmed !== void 0) {
19980
20133
  const _errs20 = errors;
19981
20134
  if (typeof data.confirmed !== "boolean") {
19982
- 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" };
20135
+ 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" };
19983
20136
  if (vErrors === null) {
19984
- vErrors = [err13];
20137
+ vErrors = [err17];
19985
20138
  } else {
19986
- vErrors.push(err13);
20139
+ vErrors.push(err17);
19987
20140
  }
19988
20141
  errors++;
19989
20142
  }
@@ -19996,11 +20149,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
19996
20149
  let data7 = data.respondedAt;
19997
20150
  const _errs22 = errors;
19998
20151
  if (!(typeof data7 == "number" && isFinite(data7))) {
19999
- 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" };
20152
+ 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" };
20000
20153
  if (vErrors === null) {
20001
- vErrors = [err14];
20154
+ vErrors = [err18];
20002
20155
  } else {
20003
- vErrors.push(err14);
20156
+ vErrors.push(err18);
20004
20157
  }
20005
20158
  errors++;
20006
20159
  }
@@ -20014,11 +20167,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
20014
20167
  }
20015
20168
  }
20016
20169
  } else {
20017
- 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" };
20170
+ 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" };
20018
20171
  if (vErrors === null) {
20019
- vErrors = [err15];
20172
+ vErrors = [err19];
20020
20173
  } else {
20021
- vErrors.push(err15);
20174
+ vErrors.push(err19);
20022
20175
  }
20023
20176
  errors++;
20024
20177
  }
@@ -20035,11 +20188,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
20035
20188
  if (data && typeof data == "object" && !Array.isArray(data)) {
20036
20189
  let missing2;
20037
20190
  if (data.decisionId === void 0 && (missing2 = "decisionId") || data.outcome === void 0 && (missing2 = "outcome")) {
20038
- 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 + "'" };
20191
+ 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 + "'" };
20039
20192
  if (vErrors === null) {
20040
- vErrors = [err16];
20193
+ vErrors = [err20];
20041
20194
  } else {
20042
- vErrors.push(err16);
20195
+ vErrors.push(err20);
20043
20196
  }
20044
20197
  errors++;
20045
20198
  } else {
@@ -20049,20 +20202,30 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
20049
20202
  if (errors === _errs27) {
20050
20203
  if (typeof data8 === "string") {
20051
20204
  if (func1(data8) < 1) {
20052
- 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" };
20205
+ 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" };
20053
20206
  if (vErrors === null) {
20054
- vErrors = [err17];
20207
+ vErrors = [err21];
20055
20208
  } else {
20056
- vErrors.push(err17);
20209
+ vErrors.push(err21);
20057
20210
  }
20058
20211
  errors++;
20212
+ } else {
20213
+ if (!pattern4.test(data8)) {
20214
+ 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}$"' };
20215
+ if (vErrors === null) {
20216
+ vErrors = [err22];
20217
+ } else {
20218
+ vErrors.push(err22);
20219
+ }
20220
+ errors++;
20221
+ }
20059
20222
  }
20060
20223
  } else {
20061
- 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" };
20224
+ 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" };
20062
20225
  if (vErrors === null) {
20063
- vErrors = [err18];
20226
+ vErrors = [err23];
20064
20227
  } else {
20065
- vErrors.push(err18);
20228
+ vErrors.push(err23);
20066
20229
  }
20067
20230
  errors++;
20068
20231
  }
@@ -20073,15 +20236,28 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
20073
20236
  }
20074
20237
  if (valid4) {
20075
20238
  if (data.shortId !== void 0) {
20239
+ let data9 = data.shortId;
20076
20240
  const _errs29 = errors;
20077
- if (typeof data.shortId !== "string") {
20078
- 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" };
20079
- if (vErrors === null) {
20080
- vErrors = [err19];
20241
+ if (errors === _errs29) {
20242
+ if (typeof data9 === "string") {
20243
+ if (!pattern5.test(data9)) {
20244
+ 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}$"' };
20245
+ if (vErrors === null) {
20246
+ vErrors = [err24];
20247
+ } else {
20248
+ vErrors.push(err24);
20249
+ }
20250
+ errors++;
20251
+ }
20081
20252
  } else {
20082
- vErrors.push(err19);
20253
+ 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" };
20254
+ if (vErrors === null) {
20255
+ vErrors = [err25];
20256
+ } else {
20257
+ vErrors.push(err25);
20258
+ }
20259
+ errors++;
20083
20260
  }
20084
- errors++;
20085
20261
  }
20086
20262
  var valid4 = _errs29 === errors;
20087
20263
  } else {
@@ -20092,20 +20268,20 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
20092
20268
  let data10 = data.outcome;
20093
20269
  const _errs31 = errors;
20094
20270
  if (typeof data10 !== "string") {
20095
- 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" };
20271
+ 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" };
20096
20272
  if (vErrors === null) {
20097
- vErrors = [err20];
20273
+ vErrors = [err26];
20098
20274
  } else {
20099
- vErrors.push(err20);
20275
+ vErrors.push(err26);
20100
20276
  }
20101
20277
  errors++;
20102
20278
  }
20103
20279
  if ("no_pending_prompt" !== data10) {
20104
- 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" };
20280
+ 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" };
20105
20281
  if (vErrors === null) {
20106
- vErrors = [err21];
20282
+ vErrors = [err27];
20107
20283
  } else {
20108
- vErrors.push(err21);
20284
+ vErrors.push(err27);
20109
20285
  }
20110
20286
  errors++;
20111
20287
  }
@@ -20117,11 +20293,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
20117
20293
  }
20118
20294
  }
20119
20295
  } else {
20120
- 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" };
20296
+ 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" };
20121
20297
  if (vErrors === null) {
20122
- vErrors = [err22];
20298
+ vErrors = [err28];
20123
20299
  } else {
20124
- vErrors.push(err22);
20300
+ vErrors.push(err28);
20125
20301
  }
20126
20302
  errors++;
20127
20303
  }
@@ -20134,11 +20310,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
20134
20310
  }
20135
20311
  }
20136
20312
  if (!valid1) {
20137
- 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" };
20313
+ 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" };
20138
20314
  if (vErrors === null) {
20139
- vErrors = [err23];
20315
+ vErrors = [err29];
20140
20316
  } else {
20141
- vErrors.push(err23);
20317
+ vErrors.push(err29);
20142
20318
  }
20143
20319
  errors++;
20144
20320
  validate26.errors = vErrors;
@@ -21107,7 +21283,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
21107
21283
  return errors === 0;
21108
21284
  }
21109
21285
  validate27.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
21110
- 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": {} };
21286
+ 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": {} };
21111
21287
  function validate28(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
21112
21288
  ;
21113
21289
  let vErrors = null;
@@ -21135,6 +21311,11 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
21135
21311
  if (func1(data0) < 1) {
21136
21312
  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" }];
21137
21313
  return false;
21314
+ } else {
21315
+ if (!pattern4.test(data0)) {
21316
+ 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}$"' }];
21317
+ return false;
21318
+ }
21138
21319
  }
21139
21320
  } else {
21140
21321
  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" }];
@@ -21147,10 +21328,18 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
21147
21328
  }
21148
21329
  if (valid1) {
21149
21330
  if (data.shortId !== void 0) {
21331
+ let data1 = data.shortId;
21150
21332
  const _errs5 = errors;
21151
- if (typeof data.shortId !== "string") {
21152
- 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" }];
21153
- return false;
21333
+ if (errors === _errs5) {
21334
+ if (typeof data1 === "string") {
21335
+ if (!pattern5.test(data1)) {
21336
+ 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}$"' }];
21337
+ return false;
21338
+ }
21339
+ } else {
21340
+ 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" }];
21341
+ return false;
21342
+ }
21154
21343
  }
21155
21344
  var valid1 = _errs5 === errors;
21156
21345
  } else {
@@ -21892,7 +22081,7 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
21892
22081
  return errors === 0;
21893
22082
  }
21894
22083
  validate28.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
21895
- 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": {} };
22084
+ 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": {} };
21896
22085
  function validate29(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
21897
22086
  ;
21898
22087
  let vErrors = null;
@@ -21930,6 +22119,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
21930
22119
  if (func1(data1) < 1) {
21931
22120
  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" }];
21932
22121
  return false;
22122
+ } else {
22123
+ if (!pattern4.test(data1)) {
22124
+ 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}$"' }];
22125
+ return false;
22126
+ }
21933
22127
  }
21934
22128
  } else {
21935
22129
  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" }];
@@ -21942,10 +22136,18 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
21942
22136
  }
21943
22137
  if (valid2) {
21944
22138
  if (data0.shortId !== void 0) {
22139
+ let data2 = data0.shortId;
21945
22140
  const _errs8 = errors;
21946
- if (typeof data0.shortId !== "string") {
21947
- 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" }];
21948
- return false;
22141
+ if (errors === _errs8) {
22142
+ if (typeof data2 === "string") {
22143
+ if (!pattern5.test(data2)) {
22144
+ 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}$"' }];
22145
+ return false;
22146
+ }
22147
+ } else {
22148
+ 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" }];
22149
+ return false;
22150
+ }
21949
22151
  }
21950
22152
  var valid2 = _errs8 === errors;
21951
22153
  } else {
@@ -22116,13 +22318,23 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
22116
22318
  vErrors.push(err0);
22117
22319
  }
22118
22320
  errors++;
22321
+ } else {
22322
+ if (!pattern4.test(data14)) {
22323
+ 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}$"' };
22324
+ if (vErrors === null) {
22325
+ vErrors = [err1];
22326
+ } else {
22327
+ vErrors.push(err1);
22328
+ }
22329
+ errors++;
22330
+ }
22119
22331
  }
22120
22332
  } else {
22121
- 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" };
22333
+ 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" };
22122
22334
  if (vErrors === null) {
22123
- vErrors = [err1];
22335
+ vErrors = [err2];
22124
22336
  } else {
22125
- vErrors.push(err1);
22337
+ vErrors.push(err2);
22126
22338
  }
22127
22339
  errors++;
22128
22340
  }
@@ -22131,22 +22343,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
22131
22343
  valid5 = valid5 || _valid0;
22132
22344
  const _errs36 = errors;
22133
22345
  if (data14 !== null) {
22134
- 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" };
22346
+ 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" };
22135
22347
  if (vErrors === null) {
22136
- vErrors = [err2];
22348
+ vErrors = [err3];
22137
22349
  } else {
22138
- vErrors.push(err2);
22350
+ vErrors.push(err3);
22139
22351
  }
22140
22352
  errors++;
22141
22353
  }
22142
22354
  var _valid0 = _errs36 === errors;
22143
22355
  valid5 = valid5 || _valid0;
22144
22356
  if (!valid5) {
22145
- 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" };
22357
+ 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" };
22146
22358
  if (vErrors === null) {
22147
- vErrors = [err3];
22359
+ vErrors = [err4];
22148
22360
  } else {
22149
- vErrors.push(err3);
22361
+ vErrors.push(err4);
22150
22362
  }
22151
22363
  errors++;
22152
22364
  validate29.errors = vErrors;
@@ -22452,6 +22664,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
22452
22664
  if (func1(data34) < 1) {
22453
22665
  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" }];
22454
22666
  return false;
22667
+ } else {
22668
+ if (!pattern4.test(data34)) {
22669
+ 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}$"' }];
22670
+ return false;
22671
+ }
22455
22672
  }
22456
22673
  } else {
22457
22674
  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" }];
@@ -22464,10 +22681,18 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
22464
22681
  }
22465
22682
  if (valid10) {
22466
22683
  if (data33.shortId !== void 0) {
22684
+ let data35 = data33.shortId;
22467
22685
  const _errs80 = errors;
22468
- if (typeof data33.shortId !== "string") {
22469
- 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" }];
22470
- return false;
22686
+ if (errors === _errs80) {
22687
+ if (typeof data35 === "string") {
22688
+ if (!pattern5.test(data35)) {
22689
+ 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}$"' }];
22690
+ return false;
22691
+ }
22692
+ } else {
22693
+ 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" }];
22694
+ return false;
22695
+ }
22471
22696
  }
22472
22697
  var valid10 = _errs80 === errors;
22473
22698
  } else {
@@ -22586,6 +22811,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
22586
22811
  if (func1(data43) < 1) {
22587
22812
  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" }];
22588
22813
  return false;
22814
+ } else {
22815
+ if (!pattern4.test(data43)) {
22816
+ 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}$"' }];
22817
+ return false;
22818
+ }
22589
22819
  }
22590
22820
  } else {
22591
22821
  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" }];
@@ -22598,10 +22828,18 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
22598
22828
  }
22599
22829
  if (valid12) {
22600
22830
  if (data42.shortId !== void 0) {
22831
+ let data44 = data42.shortId;
22601
22832
  const _errs99 = errors;
22602
- if (typeof data42.shortId !== "string") {
22603
- 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" }];
22604
- return false;
22833
+ if (errors === _errs99) {
22834
+ if (typeof data44 === "string") {
22835
+ if (!pattern5.test(data44)) {
22836
+ 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}$"' }];
22837
+ return false;
22838
+ }
22839
+ } else {
22840
+ 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" }];
22841
+ return false;
22842
+ }
22605
22843
  }
22606
22844
  var valid12 = _errs99 === errors;
22607
22845
  } else {
@@ -22923,22 +23161,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
22923
23161
  if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
22924
23162
  let missing7;
22925
23163
  if (data64.kind === void 0 && (missing7 = "kind") || data64.userId === void 0 && (missing7 = "userId") || data64.displayName === void 0 && (missing7 = "displayName")) {
22926
- 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 + "'" };
23164
+ 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 + "'" };
22927
23165
  if (vErrors === null) {
22928
- vErrors = [err4];
23166
+ vErrors = [err5];
22929
23167
  } else {
22930
- vErrors.push(err4);
23168
+ vErrors.push(err5);
22931
23169
  }
22932
23170
  errors++;
22933
23171
  } else {
22934
23172
  const _errs146 = errors;
22935
23173
  for (const key0 in data64) {
22936
23174
  if (!(key0 === "kind" || key0 === "userId" || key0 === "displayName")) {
22937
- 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" };
23175
+ 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" };
22938
23176
  if (vErrors === null) {
22939
- vErrors = [err5];
23177
+ vErrors = [err6];
22940
23178
  } else {
22941
- vErrors.push(err5);
23179
+ vErrors.push(err6);
22942
23180
  }
22943
23181
  errors++;
22944
23182
  break;
@@ -22949,20 +23187,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
22949
23187
  let data65 = data64.kind;
22950
23188
  const _errs147 = errors;
22951
23189
  if (typeof data65 !== "string") {
22952
- 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" };
23190
+ 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" };
22953
23191
  if (vErrors === null) {
22954
- vErrors = [err6];
23192
+ vErrors = [err7];
22955
23193
  } else {
22956
- vErrors.push(err6);
23194
+ vErrors.push(err7);
22957
23195
  }
22958
23196
  errors++;
22959
23197
  }
22960
23198
  if ("user" !== data65) {
22961
- 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" };
23199
+ 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" };
22962
23200
  if (vErrors === null) {
22963
- vErrors = [err7];
23201
+ vErrors = [err8];
22964
23202
  } else {
22965
- vErrors.push(err7);
23203
+ vErrors.push(err8);
22966
23204
  }
22967
23205
  errors++;
22968
23206
  }
@@ -22977,20 +23215,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
22977
23215
  if (errors === _errs149) {
22978
23216
  if (typeof data66 === "string") {
22979
23217
  if (func1(data66) < 1) {
22980
- 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" };
23218
+ 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" };
22981
23219
  if (vErrors === null) {
22982
- vErrors = [err8];
23220
+ vErrors = [err9];
22983
23221
  } else {
22984
- vErrors.push(err8);
23222
+ vErrors.push(err9);
22985
23223
  }
22986
23224
  errors++;
22987
23225
  }
22988
23226
  } else {
22989
- 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" };
23227
+ 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" };
22990
23228
  if (vErrors === null) {
22991
- vErrors = [err9];
23229
+ vErrors = [err10];
22992
23230
  } else {
22993
- vErrors.push(err9);
23231
+ vErrors.push(err10);
22994
23232
  }
22995
23233
  errors++;
22996
23234
  }
@@ -23003,11 +23241,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23003
23241
  if (data64.displayName !== void 0) {
23004
23242
  const _errs151 = errors;
23005
23243
  if (typeof data64.displayName !== "string") {
23006
- 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" };
23244
+ 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" };
23007
23245
  if (vErrors === null) {
23008
- vErrors = [err10];
23246
+ vErrors = [err11];
23009
23247
  } else {
23010
- vErrors.push(err10);
23248
+ vErrors.push(err11);
23011
23249
  }
23012
23250
  errors++;
23013
23251
  }
@@ -23020,11 +23258,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23020
23258
  }
23021
23259
  }
23022
23260
  } else {
23023
- 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" };
23261
+ 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" };
23024
23262
  if (vErrors === null) {
23025
- vErrors = [err11];
23263
+ vErrors = [err12];
23026
23264
  } else {
23027
- vErrors.push(err11);
23265
+ vErrors.push(err12);
23028
23266
  }
23029
23267
  errors++;
23030
23268
  }
@@ -23040,22 +23278,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23040
23278
  if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
23041
23279
  let missing8;
23042
23280
  if (data64.kind === void 0 && (missing8 = "kind") || data64.role === void 0 && (missing8 = "role")) {
23043
- 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 + "'" };
23281
+ 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 + "'" };
23044
23282
  if (vErrors === null) {
23045
- vErrors = [err12];
23283
+ vErrors = [err13];
23046
23284
  } else {
23047
- vErrors.push(err12);
23285
+ vErrors.push(err13);
23048
23286
  }
23049
23287
  errors++;
23050
23288
  } else {
23051
23289
  const _errs155 = errors;
23052
23290
  for (const key1 in data64) {
23053
23291
  if (!(key1 === "kind" || key1 === "role")) {
23054
- 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" };
23292
+ 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" };
23055
23293
  if (vErrors === null) {
23056
- vErrors = [err13];
23294
+ vErrors = [err14];
23057
23295
  } else {
23058
- vErrors.push(err13);
23296
+ vErrors.push(err14);
23059
23297
  }
23060
23298
  errors++;
23061
23299
  break;
@@ -23066,20 +23304,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23066
23304
  let data68 = data64.kind;
23067
23305
  const _errs156 = errors;
23068
23306
  if (typeof data68 !== "string") {
23069
- 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" };
23307
+ 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" };
23070
23308
  if (vErrors === null) {
23071
- vErrors = [err14];
23309
+ vErrors = [err15];
23072
23310
  } else {
23073
- vErrors.push(err14);
23311
+ vErrors.push(err15);
23074
23312
  }
23075
23313
  errors++;
23076
23314
  }
23077
23315
  if ("role" !== data68) {
23078
- 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" };
23316
+ 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" };
23079
23317
  if (vErrors === null) {
23080
- vErrors = [err15];
23318
+ vErrors = [err16];
23081
23319
  } else {
23082
- vErrors.push(err15);
23320
+ vErrors.push(err16);
23083
23321
  }
23084
23322
  errors++;
23085
23323
  }
@@ -23092,20 +23330,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23092
23330
  let data69 = data64.role;
23093
23331
  const _errs158 = errors;
23094
23332
  if (typeof data69 !== "string") {
23095
- 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" };
23333
+ 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" };
23096
23334
  if (vErrors === null) {
23097
- vErrors = [err16];
23335
+ vErrors = [err17];
23098
23336
  } else {
23099
- vErrors.push(err16);
23337
+ vErrors.push(err17);
23100
23338
  }
23101
23339
  errors++;
23102
23340
  }
23103
23341
  if (!(data69 === "owner" || data69 === "admin" || data69 === "member")) {
23104
- 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" };
23342
+ 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" };
23105
23343
  if (vErrors === null) {
23106
- vErrors = [err17];
23344
+ vErrors = [err18];
23107
23345
  } else {
23108
- vErrors.push(err17);
23346
+ vErrors.push(err18);
23109
23347
  }
23110
23348
  errors++;
23111
23349
  }
@@ -23117,11 +23355,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23117
23355
  }
23118
23356
  }
23119
23357
  } else {
23120
- 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" };
23358
+ 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" };
23121
23359
  if (vErrors === null) {
23122
- vErrors = [err18];
23360
+ vErrors = [err19];
23123
23361
  } else {
23124
- vErrors.push(err18);
23362
+ vErrors.push(err19);
23125
23363
  }
23126
23364
  errors++;
23127
23365
  }
@@ -23143,22 +23381,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23143
23381
  if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
23144
23382
  let missing9;
23145
23383
  if (data64.kind === void 0 && (missing9 = "kind") || data64.agent === void 0 && (missing9 = "agent")) {
23146
- 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 + "'" };
23384
+ 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 + "'" };
23147
23385
  if (vErrors === null) {
23148
- vErrors = [err19];
23386
+ vErrors = [err20];
23149
23387
  } else {
23150
- vErrors.push(err19);
23388
+ vErrors.push(err20);
23151
23389
  }
23152
23390
  errors++;
23153
23391
  } else {
23154
23392
  const _errs162 = errors;
23155
23393
  for (const key2 in data64) {
23156
23394
  if (!(key2 === "kind" || key2 === "agent")) {
23157
- 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" };
23395
+ 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" };
23158
23396
  if (vErrors === null) {
23159
- vErrors = [err20];
23397
+ vErrors = [err21];
23160
23398
  } else {
23161
- vErrors.push(err20);
23399
+ vErrors.push(err21);
23162
23400
  }
23163
23401
  errors++;
23164
23402
  break;
@@ -23169,20 +23407,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23169
23407
  let data70 = data64.kind;
23170
23408
  const _errs163 = errors;
23171
23409
  if (typeof data70 !== "string") {
23172
- 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" };
23410
+ 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" };
23173
23411
  if (vErrors === null) {
23174
- vErrors = [err21];
23412
+ vErrors = [err22];
23175
23413
  } else {
23176
- vErrors.push(err21);
23414
+ vErrors.push(err22);
23177
23415
  }
23178
23416
  errors++;
23179
23417
  }
23180
23418
  if ("agent" !== data70) {
23181
- 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" };
23419
+ 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" };
23182
23420
  if (vErrors === null) {
23183
- vErrors = [err22];
23421
+ vErrors = [err23];
23184
23422
  } else {
23185
- vErrors.push(err22);
23423
+ vErrors.push(err23);
23186
23424
  }
23187
23425
  errors++;
23188
23426
  }
@@ -23195,20 +23433,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23195
23433
  let data71 = data64.agent;
23196
23434
  const _errs165 = errors;
23197
23435
  if (typeof data71 !== "string") {
23198
- 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" };
23436
+ 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" };
23199
23437
  if (vErrors === null) {
23200
- vErrors = [err23];
23438
+ vErrors = [err24];
23201
23439
  } else {
23202
- vErrors.push(err23);
23440
+ vErrors.push(err24);
23203
23441
  }
23204
23442
  errors++;
23205
23443
  }
23206
23444
  if (!(data71 === "claude_code" || data71 === "codex" || data71 === "cursor" || data71 === "hermes")) {
23207
- 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" };
23445
+ 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" };
23208
23446
  if (vErrors === null) {
23209
- vErrors = [err24];
23447
+ vErrors = [err25];
23210
23448
  } else {
23211
- vErrors.push(err24);
23449
+ vErrors.push(err25);
23212
23450
  }
23213
23451
  errors++;
23214
23452
  }
@@ -23220,11 +23458,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23220
23458
  }
23221
23459
  }
23222
23460
  } else {
23223
- 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" };
23461
+ 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" };
23224
23462
  if (vErrors === null) {
23225
- vErrors = [err25];
23463
+ vErrors = [err26];
23226
23464
  } else {
23227
- vErrors.push(err25);
23465
+ vErrors.push(err26);
23228
23466
  }
23229
23467
  errors++;
23230
23468
  }
@@ -23246,22 +23484,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23246
23484
  if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
23247
23485
  let missing10;
23248
23486
  if (data64.kind === void 0 && (missing10 = "kind") || data64.credential === void 0 && (missing10 = "credential")) {
23249
- 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 + "'" };
23487
+ 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 + "'" };
23250
23488
  if (vErrors === null) {
23251
- vErrors = [err26];
23489
+ vErrors = [err27];
23252
23490
  } else {
23253
- vErrors.push(err26);
23491
+ vErrors.push(err27);
23254
23492
  }
23255
23493
  errors++;
23256
23494
  } else {
23257
23495
  const _errs169 = errors;
23258
23496
  for (const key3 in data64) {
23259
23497
  if (!(key3 === "kind" || key3 === "credential")) {
23260
- 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" };
23498
+ 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" };
23261
23499
  if (vErrors === null) {
23262
- vErrors = [err27];
23500
+ vErrors = [err28];
23263
23501
  } else {
23264
- vErrors.push(err27);
23502
+ vErrors.push(err28);
23265
23503
  }
23266
23504
  errors++;
23267
23505
  break;
@@ -23272,20 +23510,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23272
23510
  let data72 = data64.kind;
23273
23511
  const _errs170 = errors;
23274
23512
  if (typeof data72 !== "string") {
23275
- 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" };
23513
+ 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" };
23276
23514
  if (vErrors === null) {
23277
- vErrors = [err28];
23515
+ vErrors = [err29];
23278
23516
  } else {
23279
- vErrors.push(err28);
23517
+ vErrors.push(err29);
23280
23518
  }
23281
23519
  errors++;
23282
23520
  }
23283
23521
  if ("credential" !== data72) {
23284
- 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" };
23522
+ 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" };
23285
23523
  if (vErrors === null) {
23286
- vErrors = [err29];
23524
+ vErrors = [err30];
23287
23525
  } else {
23288
- vErrors.push(err29);
23526
+ vErrors.push(err30);
23289
23527
  }
23290
23528
  errors++;
23291
23529
  }
@@ -23298,20 +23536,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23298
23536
  let data73 = data64.credential;
23299
23537
  const _errs172 = errors;
23300
23538
  if (typeof data73 !== "string") {
23301
- 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" };
23539
+ 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" };
23302
23540
  if (vErrors === null) {
23303
- vErrors = [err30];
23541
+ vErrors = [err31];
23304
23542
  } else {
23305
- vErrors.push(err30);
23543
+ vErrors.push(err31);
23306
23544
  }
23307
23545
  errors++;
23308
23546
  }
23309
23547
  if (!(data73 === "workos_jwt" || data73 === "workos_api_key" || data73 === "service_token")) {
23310
- 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" };
23548
+ 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" };
23311
23549
  if (vErrors === null) {
23312
- vErrors = [err31];
23550
+ vErrors = [err32];
23313
23551
  } else {
23314
- vErrors.push(err31);
23552
+ vErrors.push(err32);
23315
23553
  }
23316
23554
  errors++;
23317
23555
  }
@@ -23323,11 +23561,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23323
23561
  }
23324
23562
  }
23325
23563
  } else {
23326
- 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" };
23564
+ 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" };
23327
23565
  if (vErrors === null) {
23328
- vErrors = [err32];
23566
+ vErrors = [err33];
23329
23567
  } else {
23330
- vErrors.push(err32);
23568
+ vErrors.push(err33);
23331
23569
  }
23332
23570
  errors++;
23333
23571
  }
@@ -23348,11 +23586,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
23348
23586
  }
23349
23587
  }
23350
23588
  if (!valid20) {
23351
- 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" };
23589
+ 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" };
23352
23590
  if (vErrors === null) {
23353
- vErrors = [err33];
23591
+ vErrors = [err34];
23354
23592
  } else {
23355
- vErrors.push(err33);
23593
+ vErrors.push(err34);
23356
23594
  }
23357
23595
  errors++;
23358
23596
  validate29.errors = vErrors;
@@ -23656,7 +23894,7 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
23656
23894
  return errors === 0;
23657
23895
  }
23658
23896
  validate32.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
23659
- 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": {} };
23897
+ 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": {} };
23660
23898
  function validate33(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
23661
23899
  ;
23662
23900
  let vErrors = null;
@@ -23700,6 +23938,11 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
23700
23938
  if (func1(data1) < 1) {
23701
23939
  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" }];
23702
23940
  return false;
23941
+ } else {
23942
+ if (!pattern4.test(data1)) {
23943
+ 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}$"' }];
23944
+ return false;
23945
+ }
23703
23946
  }
23704
23947
  } else {
23705
23948
  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" }];
@@ -23712,10 +23955,18 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
23712
23955
  }
23713
23956
  if (valid1) {
23714
23957
  if (data.childShortId !== void 0) {
23958
+ let data2 = data.childShortId;
23715
23959
  const _errs7 = errors;
23716
- if (typeof data.childShortId !== "string") {
23717
- 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" }];
23718
- return false;
23960
+ if (errors === _errs7) {
23961
+ if (typeof data2 === "string") {
23962
+ if (!pattern5.test(data2)) {
23963
+ 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}$"' }];
23964
+ return false;
23965
+ }
23966
+ } else {
23967
+ 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" }];
23968
+ return false;
23969
+ }
23719
23970
  }
23720
23971
  var valid1 = _errs7 === errors;
23721
23972
  } else {
@@ -23730,6 +23981,11 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
23730
23981
  if (func1(data3) < 1) {
23731
23982
  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" }];
23732
23983
  return false;
23984
+ } else {
23985
+ if (!pattern4.test(data3)) {
23986
+ 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}$"' }];
23987
+ return false;
23988
+ }
23733
23989
  }
23734
23990
  } else {
23735
23991
  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" }];
@@ -23742,10 +23998,18 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
23742
23998
  }
23743
23999
  if (valid1) {
23744
24000
  if (data.parentShortId !== void 0) {
24001
+ let data4 = data.parentShortId;
23745
24002
  const _errs11 = errors;
23746
- if (typeof data.parentShortId !== "string") {
23747
- 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" }];
23748
- return false;
24003
+ if (errors === _errs11) {
24004
+ if (typeof data4 === "string") {
24005
+ if (!pattern5.test(data4)) {
24006
+ 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}$"' }];
24007
+ return false;
24008
+ }
24009
+ } else {
24010
+ 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" }];
24011
+ return false;
24012
+ }
23749
24013
  }
23750
24014
  var valid1 = _errs11 === errors;
23751
24015
  } else {
@@ -24663,7 +24927,7 @@ function validate34(data, { instancePath = "", parentData, parentDataProperty, r
24663
24927
  }
24664
24928
  validate34.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
24665
24929
  var isDecisionRescopeResponse = validate35;
24666
- 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": {} }] };
24930
+ 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": {} }] };
24667
24931
  function validate35(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
24668
24932
  ;
24669
24933
  let vErrors = null;
@@ -25635,13 +25899,23 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25635
25899
  vErrors.push(err61);
25636
25900
  }
25637
25901
  errors++;
25902
+ } else {
25903
+ if (!pattern4.test(data28)) {
25904
+ 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}$"' };
25905
+ if (vErrors === null) {
25906
+ vErrors = [err62];
25907
+ } else {
25908
+ vErrors.push(err62);
25909
+ }
25910
+ errors++;
25911
+ }
25638
25912
  }
25639
25913
  } else {
25640
- 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" };
25914
+ 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" };
25641
25915
  if (vErrors === null) {
25642
- vErrors = [err62];
25916
+ vErrors = [err63];
25643
25917
  } else {
25644
- vErrors.push(err62);
25918
+ vErrors.push(err63);
25645
25919
  }
25646
25920
  errors++;
25647
25921
  }
@@ -25652,15 +25926,28 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25652
25926
  }
25653
25927
  if (valid16) {
25654
25928
  if (data.shortId !== void 0) {
25929
+ let data29 = data.shortId;
25655
25930
  const _errs81 = errors;
25656
- if (typeof data.shortId !== "string") {
25657
- 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" };
25658
- if (vErrors === null) {
25659
- vErrors = [err63];
25931
+ if (errors === _errs81) {
25932
+ if (typeof data29 === "string") {
25933
+ if (!pattern5.test(data29)) {
25934
+ 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}$"' };
25935
+ if (vErrors === null) {
25936
+ vErrors = [err64];
25937
+ } else {
25938
+ vErrors.push(err64);
25939
+ }
25940
+ errors++;
25941
+ }
25660
25942
  } else {
25661
- vErrors.push(err63);
25943
+ 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" };
25944
+ if (vErrors === null) {
25945
+ vErrors = [err65];
25946
+ } else {
25947
+ vErrors.push(err65);
25948
+ }
25949
+ errors++;
25662
25950
  }
25663
- errors++;
25664
25951
  }
25665
25952
  var valid16 = _errs81 === errors;
25666
25953
  } else {
@@ -25671,20 +25958,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25671
25958
  let data30 = data.stage;
25672
25959
  const _errs83 = errors;
25673
25960
  if (typeof data30 !== "string") {
25674
- 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" };
25961
+ 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" };
25675
25962
  if (vErrors === null) {
25676
- vErrors = [err64];
25963
+ vErrors = [err66];
25677
25964
  } else {
25678
- vErrors.push(err64);
25965
+ vErrors.push(err66);
25679
25966
  }
25680
25967
  errors++;
25681
25968
  }
25682
25969
  if (!(data30 === "draft" || data30 === "provisional" || data30 === "adopted" || data30 === "superseded" || data30 === "abandoned")) {
25683
- 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" };
25970
+ 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" };
25684
25971
  if (vErrors === null) {
25685
- vErrors = [err65];
25972
+ vErrors = [err67];
25686
25973
  } else {
25687
- vErrors.push(err65);
25974
+ vErrors.push(err67);
25688
25975
  }
25689
25976
  errors++;
25690
25977
  }
@@ -25700,11 +25987,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25700
25987
  if (data31 && typeof data31 == "object" && !Array.isArray(data31)) {
25701
25988
  let missing8;
25702
25989
  if (data31.location === void 0 && (missing8 = "location") || data31.time === void 0 && (missing8 = "time") || data31.users === void 0 && (missing8 = "users")) {
25703
- 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 + "'" };
25990
+ 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 + "'" };
25704
25991
  if (vErrors === null) {
25705
- vErrors = [err66];
25992
+ vErrors = [err68];
25706
25993
  } else {
25707
- vErrors.push(err66);
25994
+ vErrors.push(err68);
25708
25995
  }
25709
25996
  errors++;
25710
25997
  } else {
@@ -25715,11 +26002,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25715
26002
  if (data32 && typeof data32 == "object" && !Array.isArray(data32)) {
25716
26003
  let missing9;
25717
26004
  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")) {
25718
- 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 + "'" };
26005
+ 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 + "'" };
25719
26006
  if (vErrors === null) {
25720
- vErrors = [err67];
26007
+ vErrors = [err69];
25721
26008
  } else {
25722
- vErrors.push(err67);
26009
+ vErrors.push(err69);
25723
26010
  }
25724
26011
  errors++;
25725
26012
  } else {
@@ -25727,20 +26014,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25727
26014
  let data33 = data32.mode;
25728
26015
  const _errs91 = errors;
25729
26016
  if (typeof data33 !== "string") {
25730
- 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" };
26017
+ 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" };
25731
26018
  if (vErrors === null) {
25732
- vErrors = [err68];
26019
+ vErrors = [err70];
25733
26020
  } else {
25734
- vErrors.push(err68);
26021
+ vErrors.push(err70);
25735
26022
  }
25736
26023
  errors++;
25737
26024
  }
25738
26025
  if (!(data33 === "inherited" || data33 === "explicit")) {
25739
- 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" };
26026
+ 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" };
25740
26027
  if (vErrors === null) {
25741
- vErrors = [err69];
26028
+ vErrors = [err71];
25742
26029
  } else {
25743
- vErrors.push(err69);
26030
+ vErrors.push(err71);
25744
26031
  }
25745
26032
  errors++;
25746
26033
  }
@@ -25752,11 +26039,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25752
26039
  if (data32.repository !== void 0) {
25753
26040
  const _errs93 = errors;
25754
26041
  if (typeof data32.repository !== "boolean") {
25755
- 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" };
26042
+ 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" };
25756
26043
  if (vErrors === null) {
25757
- vErrors = [err70];
26044
+ vErrors = [err72];
25758
26045
  } else {
25759
- vErrors.push(err70);
26046
+ vErrors.push(err72);
25760
26047
  }
25761
26048
  errors++;
25762
26049
  }
@@ -25775,11 +26062,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25775
26062
  for (let i5 = 0; i5 < len5; i5++) {
25776
26063
  const _errs97 = errors;
25777
26064
  if (typeof data35[i5] !== "string") {
25778
- 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" };
26065
+ 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" };
25779
26066
  if (vErrors === null) {
25780
- vErrors = [err71];
26067
+ vErrors = [err73];
25781
26068
  } else {
25782
- vErrors.push(err71);
26069
+ vErrors.push(err73);
25783
26070
  }
25784
26071
  errors++;
25785
26072
  }
@@ -25789,11 +26076,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25789
26076
  }
25790
26077
  }
25791
26078
  } else {
25792
- 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" };
26079
+ 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" };
25793
26080
  if (vErrors === null) {
25794
- vErrors = [err72];
26081
+ vErrors = [err74];
25795
26082
  } else {
25796
- vErrors.push(err72);
26083
+ vErrors.push(err74);
25797
26084
  }
25798
26085
  errors++;
25799
26086
  }
@@ -25813,11 +26100,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25813
26100
  for (let i6 = 0; i6 < len6; i6++) {
25814
26101
  const _errs101 = errors;
25815
26102
  if (typeof data37[i6] !== "string") {
25816
- 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" };
26103
+ 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" };
25817
26104
  if (vErrors === null) {
25818
- vErrors = [err73];
26105
+ vErrors = [err75];
25819
26106
  } else {
25820
- vErrors.push(err73);
26107
+ vErrors.push(err75);
25821
26108
  }
25822
26109
  errors++;
25823
26110
  }
@@ -25827,11 +26114,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25827
26114
  }
25828
26115
  }
25829
26116
  } else {
25830
- 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" };
26117
+ 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" };
25831
26118
  if (vErrors === null) {
25832
- vErrors = [err74];
26119
+ vErrors = [err76];
25833
26120
  } else {
25834
- vErrors.push(err74);
26121
+ vErrors.push(err76);
25835
26122
  }
25836
26123
  errors++;
25837
26124
  }
@@ -25851,11 +26138,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25851
26138
  for (let i7 = 0; i7 < len7; i7++) {
25852
26139
  const _errs105 = errors;
25853
26140
  if (typeof data39[i7] !== "string") {
25854
- 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" };
26141
+ 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" };
25855
26142
  if (vErrors === null) {
25856
- vErrors = [err75];
26143
+ vErrors = [err77];
25857
26144
  } else {
25858
- vErrors.push(err75);
26145
+ vErrors.push(err77);
25859
26146
  }
25860
26147
  errors++;
25861
26148
  }
@@ -25865,11 +26152,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25865
26152
  }
25866
26153
  }
25867
26154
  } else {
25868
- 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" };
26155
+ 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" };
25869
26156
  if (vErrors === null) {
25870
- vErrors = [err76];
26157
+ vErrors = [err78];
25871
26158
  } else {
25872
- vErrors.push(err76);
26159
+ vErrors.push(err78);
25873
26160
  }
25874
26161
  errors++;
25875
26162
  }
@@ -25884,11 +26171,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25884
26171
  }
25885
26172
  }
25886
26173
  } else {
25887
- 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" };
26174
+ 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" };
25888
26175
  if (vErrors === null) {
25889
- vErrors = [err77];
26176
+ vErrors = [err79];
25890
26177
  } else {
25891
- vErrors.push(err77);
26178
+ vErrors.push(err79);
25892
26179
  }
25893
26180
  errors++;
25894
26181
  }
@@ -25907,31 +26194,31 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25907
26194
  let data42 = data41.effectiveFrom;
25908
26195
  const _errs110 = errors;
25909
26196
  if (!(typeof data42 == "number" && (!(data42 % 1) && !isNaN(data42)) && isFinite(data42))) {
25910
- 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" };
26197
+ 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" };
25911
26198
  if (vErrors === null) {
25912
- vErrors = [err78];
26199
+ vErrors = [err80];
25913
26200
  } else {
25914
- vErrors.push(err78);
26201
+ vErrors.push(err80);
25915
26202
  }
25916
26203
  errors++;
25917
26204
  }
25918
26205
  if (errors === _errs110) {
25919
26206
  if (typeof data42 == "number" && isFinite(data42)) {
25920
26207
  if (data42 > 9007199254740991 || isNaN(data42)) {
25921
- 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" };
26208
+ 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" };
25922
26209
  if (vErrors === null) {
25923
- vErrors = [err79];
26210
+ vErrors = [err81];
25924
26211
  } else {
25925
- vErrors.push(err79);
26212
+ vErrors.push(err81);
25926
26213
  }
25927
26214
  errors++;
25928
26215
  } else {
25929
26216
  if (data42 < -9007199254740991 || isNaN(data42)) {
25930
- 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" };
26217
+ 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" };
25931
26218
  if (vErrors === null) {
25932
- vErrors = [err80];
26219
+ vErrors = [err82];
25933
26220
  } else {
25934
- vErrors.push(err80);
26221
+ vErrors.push(err82);
25935
26222
  }
25936
26223
  errors++;
25937
26224
  }
@@ -25947,31 +26234,31 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25947
26234
  let data43 = data41.effectiveUntil;
25948
26235
  const _errs112 = errors;
25949
26236
  if (!(typeof data43 == "number" && (!(data43 % 1) && !isNaN(data43)) && isFinite(data43))) {
25950
- 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" };
26237
+ 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" };
25951
26238
  if (vErrors === null) {
25952
- vErrors = [err81];
26239
+ vErrors = [err83];
25953
26240
  } else {
25954
- vErrors.push(err81);
26241
+ vErrors.push(err83);
25955
26242
  }
25956
26243
  errors++;
25957
26244
  }
25958
26245
  if (errors === _errs112) {
25959
26246
  if (typeof data43 == "number" && isFinite(data43)) {
25960
26247
  if (data43 > 9007199254740991 || isNaN(data43)) {
25961
- 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" };
26248
+ 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" };
25962
26249
  if (vErrors === null) {
25963
- vErrors = [err82];
26250
+ vErrors = [err84];
25964
26251
  } else {
25965
- vErrors.push(err82);
26252
+ vErrors.push(err84);
25966
26253
  }
25967
26254
  errors++;
25968
26255
  } else {
25969
26256
  if (data43 < -9007199254740991 || isNaN(data43)) {
25970
- 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" };
26257
+ 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" };
25971
26258
  if (vErrors === null) {
25972
- vErrors = [err83];
26259
+ vErrors = [err85];
25973
26260
  } else {
25974
- vErrors.push(err83);
26261
+ vErrors.push(err85);
25975
26262
  }
25976
26263
  errors++;
25977
26264
  }
@@ -25984,11 +26271,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
25984
26271
  }
25985
26272
  }
25986
26273
  } else {
25987
- 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" };
26274
+ 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" };
25988
26275
  if (vErrors === null) {
25989
- vErrors = [err84];
26276
+ vErrors = [err86];
25990
26277
  } else {
25991
- vErrors.push(err84);
26278
+ vErrors.push(err86);
25992
26279
  }
25993
26280
  errors++;
25994
26281
  }
@@ -26016,22 +26303,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26016
26303
  if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
26017
26304
  let missing10;
26018
26305
  if (data45.kind === void 0 && (missing10 = "kind") || data45.userId === void 0 && (missing10 = "userId")) {
26019
- 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 + "'" };
26306
+ 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 + "'" };
26020
26307
  if (vErrors === null) {
26021
- vErrors = [err85];
26308
+ vErrors = [err87];
26022
26309
  } else {
26023
- vErrors.push(err85);
26310
+ vErrors.push(err87);
26024
26311
  }
26025
26312
  errors++;
26026
26313
  } else {
26027
26314
  const _errs120 = errors;
26028
26315
  for (const key4 in data45) {
26029
26316
  if (!(key4 === "kind" || key4 === "userId")) {
26030
- 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" };
26317
+ 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" };
26031
26318
  if (vErrors === null) {
26032
- vErrors = [err86];
26319
+ vErrors = [err88];
26033
26320
  } else {
26034
- vErrors.push(err86);
26321
+ vErrors.push(err88);
26035
26322
  }
26036
26323
  errors++;
26037
26324
  break;
@@ -26042,20 +26329,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26042
26329
  let data46 = data45.kind;
26043
26330
  const _errs121 = errors;
26044
26331
  if (typeof data46 !== "string") {
26045
- 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" };
26332
+ 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" };
26046
26333
  if (vErrors === null) {
26047
- vErrors = [err87];
26334
+ vErrors = [err89];
26048
26335
  } else {
26049
- vErrors.push(err87);
26336
+ vErrors.push(err89);
26050
26337
  }
26051
26338
  errors++;
26052
26339
  }
26053
26340
  if ("user" !== data46) {
26054
- 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" };
26341
+ 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" };
26055
26342
  if (vErrors === null) {
26056
- vErrors = [err88];
26343
+ vErrors = [err90];
26057
26344
  } else {
26058
- vErrors.push(err88);
26345
+ vErrors.push(err90);
26059
26346
  }
26060
26347
  errors++;
26061
26348
  }
@@ -26070,20 +26357,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26070
26357
  if (errors === _errs123) {
26071
26358
  if (typeof data47 === "string") {
26072
26359
  if (func1(data47) < 1) {
26073
- 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" };
26360
+ 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" };
26074
26361
  if (vErrors === null) {
26075
- vErrors = [err89];
26362
+ vErrors = [err91];
26076
26363
  } else {
26077
- vErrors.push(err89);
26364
+ vErrors.push(err91);
26078
26365
  }
26079
26366
  errors++;
26080
26367
  }
26081
26368
  } else {
26082
- 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" };
26369
+ 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" };
26083
26370
  if (vErrors === null) {
26084
- vErrors = [err90];
26371
+ vErrors = [err92];
26085
26372
  } else {
26086
- vErrors.push(err90);
26373
+ vErrors.push(err92);
26087
26374
  }
26088
26375
  errors++;
26089
26376
  }
@@ -26096,11 +26383,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26096
26383
  }
26097
26384
  }
26098
26385
  } else {
26099
- 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" };
26386
+ 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" };
26100
26387
  if (vErrors === null) {
26101
- vErrors = [err91];
26388
+ vErrors = [err93];
26102
26389
  } else {
26103
- vErrors.push(err91);
26390
+ vErrors.push(err93);
26104
26391
  }
26105
26392
  errors++;
26106
26393
  }
@@ -26116,22 +26403,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26116
26403
  if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
26117
26404
  let missing11;
26118
26405
  if (data45.kind === void 0 && (missing11 = "kind") || data45.role === void 0 && (missing11 = "role")) {
26119
- 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 + "'" };
26406
+ 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 + "'" };
26120
26407
  if (vErrors === null) {
26121
- vErrors = [err92];
26408
+ vErrors = [err94];
26122
26409
  } else {
26123
- vErrors.push(err92);
26410
+ vErrors.push(err94);
26124
26411
  }
26125
26412
  errors++;
26126
26413
  } else {
26127
26414
  const _errs127 = errors;
26128
26415
  for (const key5 in data45) {
26129
26416
  if (!(key5 === "kind" || key5 === "role")) {
26130
- 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" };
26417
+ 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" };
26131
26418
  if (vErrors === null) {
26132
- vErrors = [err93];
26419
+ vErrors = [err95];
26133
26420
  } else {
26134
- vErrors.push(err93);
26421
+ vErrors.push(err95);
26135
26422
  }
26136
26423
  errors++;
26137
26424
  break;
@@ -26142,20 +26429,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26142
26429
  let data48 = data45.kind;
26143
26430
  const _errs128 = errors;
26144
26431
  if (typeof data48 !== "string") {
26145
- 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" };
26432
+ 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" };
26146
26433
  if (vErrors === null) {
26147
- vErrors = [err94];
26434
+ vErrors = [err96];
26148
26435
  } else {
26149
- vErrors.push(err94);
26436
+ vErrors.push(err96);
26150
26437
  }
26151
26438
  errors++;
26152
26439
  }
26153
26440
  if ("role" !== data48) {
26154
- 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" };
26441
+ 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" };
26155
26442
  if (vErrors === null) {
26156
- vErrors = [err95];
26443
+ vErrors = [err97];
26157
26444
  } else {
26158
- vErrors.push(err95);
26445
+ vErrors.push(err97);
26159
26446
  }
26160
26447
  errors++;
26161
26448
  }
@@ -26168,20 +26455,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26168
26455
  let data49 = data45.role;
26169
26456
  const _errs130 = errors;
26170
26457
  if (typeof data49 !== "string") {
26171
- 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" };
26458
+ 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" };
26172
26459
  if (vErrors === null) {
26173
- vErrors = [err96];
26460
+ vErrors = [err98];
26174
26461
  } else {
26175
- vErrors.push(err96);
26462
+ vErrors.push(err98);
26176
26463
  }
26177
26464
  errors++;
26178
26465
  }
26179
26466
  if (!(data49 === "owner" || data49 === "admin" || data49 === "member")) {
26180
- 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" };
26467
+ 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" };
26181
26468
  if (vErrors === null) {
26182
- vErrors = [err97];
26469
+ vErrors = [err99];
26183
26470
  } else {
26184
- vErrors.push(err97);
26471
+ vErrors.push(err99);
26185
26472
  }
26186
26473
  errors++;
26187
26474
  }
@@ -26193,11 +26480,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26193
26480
  }
26194
26481
  }
26195
26482
  } else {
26196
- 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" };
26483
+ 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" };
26197
26484
  if (vErrors === null) {
26198
- vErrors = [err98];
26485
+ vErrors = [err100];
26199
26486
  } else {
26200
- vErrors.push(err98);
26487
+ vErrors.push(err100);
26201
26488
  }
26202
26489
  errors++;
26203
26490
  }
@@ -26219,22 +26506,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26219
26506
  if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
26220
26507
  let missing12;
26221
26508
  if (data45.kind === void 0 && (missing12 = "kind") || data45.agent === void 0 && (missing12 = "agent")) {
26222
- 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 + "'" };
26509
+ 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 + "'" };
26223
26510
  if (vErrors === null) {
26224
- vErrors = [err99];
26511
+ vErrors = [err101];
26225
26512
  } else {
26226
- vErrors.push(err99);
26513
+ vErrors.push(err101);
26227
26514
  }
26228
26515
  errors++;
26229
26516
  } else {
26230
26517
  const _errs134 = errors;
26231
26518
  for (const key6 in data45) {
26232
26519
  if (!(key6 === "kind" || key6 === "agent")) {
26233
- 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" };
26520
+ 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" };
26234
26521
  if (vErrors === null) {
26235
- vErrors = [err100];
26522
+ vErrors = [err102];
26236
26523
  } else {
26237
- vErrors.push(err100);
26524
+ vErrors.push(err102);
26238
26525
  }
26239
26526
  errors++;
26240
26527
  break;
@@ -26245,20 +26532,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26245
26532
  let data50 = data45.kind;
26246
26533
  const _errs135 = errors;
26247
26534
  if (typeof data50 !== "string") {
26248
- 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" };
26535
+ 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" };
26249
26536
  if (vErrors === null) {
26250
- vErrors = [err101];
26537
+ vErrors = [err103];
26251
26538
  } else {
26252
- vErrors.push(err101);
26539
+ vErrors.push(err103);
26253
26540
  }
26254
26541
  errors++;
26255
26542
  }
26256
26543
  if ("agent" !== data50) {
26257
- 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" };
26544
+ 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" };
26258
26545
  if (vErrors === null) {
26259
- vErrors = [err102];
26546
+ vErrors = [err104];
26260
26547
  } else {
26261
- vErrors.push(err102);
26548
+ vErrors.push(err104);
26262
26549
  }
26263
26550
  errors++;
26264
26551
  }
@@ -26271,20 +26558,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26271
26558
  let data51 = data45.agent;
26272
26559
  const _errs137 = errors;
26273
26560
  if (typeof data51 !== "string") {
26274
- 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" };
26561
+ 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" };
26275
26562
  if (vErrors === null) {
26276
- vErrors = [err103];
26563
+ vErrors = [err105];
26277
26564
  } else {
26278
- vErrors.push(err103);
26565
+ vErrors.push(err105);
26279
26566
  }
26280
26567
  errors++;
26281
26568
  }
26282
26569
  if (!(data51 === "claude_code" || data51 === "codex" || data51 === "cursor" || data51 === "hermes")) {
26283
- 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" };
26570
+ 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" };
26284
26571
  if (vErrors === null) {
26285
- vErrors = [err104];
26572
+ vErrors = [err106];
26286
26573
  } else {
26287
- vErrors.push(err104);
26574
+ vErrors.push(err106);
26288
26575
  }
26289
26576
  errors++;
26290
26577
  }
@@ -26296,11 +26583,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26296
26583
  }
26297
26584
  }
26298
26585
  } else {
26299
- 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" };
26586
+ 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" };
26300
26587
  if (vErrors === null) {
26301
- vErrors = [err105];
26588
+ vErrors = [err107];
26302
26589
  } else {
26303
- vErrors.push(err105);
26590
+ vErrors.push(err107);
26304
26591
  }
26305
26592
  errors++;
26306
26593
  }
@@ -26322,22 +26609,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26322
26609
  if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
26323
26610
  let missing13;
26324
26611
  if (data45.kind === void 0 && (missing13 = "kind") || data45.credential === void 0 && (missing13 = "credential")) {
26325
- 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 + "'" };
26612
+ 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 + "'" };
26326
26613
  if (vErrors === null) {
26327
- vErrors = [err106];
26614
+ vErrors = [err108];
26328
26615
  } else {
26329
- vErrors.push(err106);
26616
+ vErrors.push(err108);
26330
26617
  }
26331
26618
  errors++;
26332
26619
  } else {
26333
26620
  const _errs141 = errors;
26334
26621
  for (const key7 in data45) {
26335
26622
  if (!(key7 === "kind" || key7 === "credential")) {
26336
- 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" };
26623
+ 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" };
26337
26624
  if (vErrors === null) {
26338
- vErrors = [err107];
26625
+ vErrors = [err109];
26339
26626
  } else {
26340
- vErrors.push(err107);
26627
+ vErrors.push(err109);
26341
26628
  }
26342
26629
  errors++;
26343
26630
  break;
@@ -26348,20 +26635,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26348
26635
  let data52 = data45.kind;
26349
26636
  const _errs142 = errors;
26350
26637
  if (typeof data52 !== "string") {
26351
- 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" };
26638
+ 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" };
26352
26639
  if (vErrors === null) {
26353
- vErrors = [err108];
26640
+ vErrors = [err110];
26354
26641
  } else {
26355
- vErrors.push(err108);
26642
+ vErrors.push(err110);
26356
26643
  }
26357
26644
  errors++;
26358
26645
  }
26359
26646
  if ("credential" !== data52) {
26360
- 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" };
26647
+ 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" };
26361
26648
  if (vErrors === null) {
26362
- vErrors = [err109];
26649
+ vErrors = [err111];
26363
26650
  } else {
26364
- vErrors.push(err109);
26651
+ vErrors.push(err111);
26365
26652
  }
26366
26653
  errors++;
26367
26654
  }
@@ -26374,20 +26661,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26374
26661
  let data53 = data45.credential;
26375
26662
  const _errs144 = errors;
26376
26663
  if (typeof data53 !== "string") {
26377
- 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" };
26664
+ 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" };
26378
26665
  if (vErrors === null) {
26379
- vErrors = [err110];
26666
+ vErrors = [err112];
26380
26667
  } else {
26381
- vErrors.push(err110);
26668
+ vErrors.push(err112);
26382
26669
  }
26383
26670
  errors++;
26384
26671
  }
26385
26672
  if (!(data53 === "workos_jwt" || data53 === "workos_api_key" || data53 === "service_token")) {
26386
- 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" };
26673
+ 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" };
26387
26674
  if (vErrors === null) {
26388
- vErrors = [err111];
26675
+ vErrors = [err113];
26389
26676
  } else {
26390
- vErrors.push(err111);
26677
+ vErrors.push(err113);
26391
26678
  }
26392
26679
  errors++;
26393
26680
  }
@@ -26399,11 +26686,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26399
26686
  }
26400
26687
  }
26401
26688
  } else {
26402
- 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" };
26689
+ 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" };
26403
26690
  if (vErrors === null) {
26404
- vErrors = [err112];
26691
+ vErrors = [err114];
26405
26692
  } else {
26406
- vErrors.push(err112);
26693
+ vErrors.push(err114);
26407
26694
  }
26408
26695
  errors++;
26409
26696
  }
@@ -26424,11 +26711,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26424
26711
  }
26425
26712
  }
26426
26713
  if (!valid24) {
26427
- 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" };
26714
+ 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" };
26428
26715
  if (vErrors === null) {
26429
- vErrors = [err113];
26716
+ vErrors = [err115];
26430
26717
  } else {
26431
- vErrors.push(err113);
26718
+ vErrors.push(err115);
26432
26719
  }
26433
26720
  errors++;
26434
26721
  } else {
@@ -26447,11 +26734,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26447
26734
  }
26448
26735
  }
26449
26736
  } else {
26450
- 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" };
26737
+ 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" };
26451
26738
  if (vErrors === null) {
26452
- vErrors = [err114];
26739
+ vErrors = [err116];
26453
26740
  } else {
26454
- vErrors.push(err114);
26741
+ vErrors.push(err116);
26455
26742
  }
26456
26743
  errors++;
26457
26744
  }
@@ -26464,11 +26751,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26464
26751
  }
26465
26752
  }
26466
26753
  } else {
26467
- 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" };
26754
+ 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" };
26468
26755
  if (vErrors === null) {
26469
- vErrors = [err115];
26756
+ vErrors = [err117];
26470
26757
  } else {
26471
- vErrors.push(err115);
26758
+ vErrors.push(err117);
26472
26759
  }
26473
26760
  errors++;
26474
26761
  }
@@ -26488,11 +26775,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26488
26775
  for (let i9 = 0; i9 < len9; i9++) {
26489
26776
  const _errs148 = errors;
26490
26777
  if (typeof data54[i9] !== "string") {
26491
- 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" };
26778
+ 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" };
26492
26779
  if (vErrors === null) {
26493
- vErrors = [err116];
26780
+ vErrors = [err118];
26494
26781
  } else {
26495
- vErrors.push(err116);
26782
+ vErrors.push(err118);
26496
26783
  }
26497
26784
  errors++;
26498
26785
  }
@@ -26502,11 +26789,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26502
26789
  }
26503
26790
  }
26504
26791
  } else {
26505
- 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" };
26792
+ 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" };
26506
26793
  if (vErrors === null) {
26507
- vErrors = [err117];
26794
+ vErrors = [err119];
26508
26795
  } else {
26509
- vErrors.push(err117);
26796
+ vErrors.push(err119);
26510
26797
  }
26511
26798
  errors++;
26512
26799
  }
@@ -26522,11 +26809,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26522
26809
  }
26523
26810
  }
26524
26811
  } else {
26525
- 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" };
26812
+ 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" };
26526
26813
  if (vErrors === null) {
26527
- vErrors = [err118];
26814
+ vErrors = [err120];
26528
26815
  } else {
26529
- vErrors.push(err118);
26816
+ vErrors.push(err120);
26530
26817
  }
26531
26818
  errors++;
26532
26819
  }
@@ -26539,11 +26826,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26539
26826
  }
26540
26827
  }
26541
26828
  if (!valid1) {
26542
- 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" };
26829
+ 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" };
26543
26830
  if (vErrors === null) {
26544
- vErrors = [err119];
26831
+ vErrors = [err121];
26545
26832
  } else {
26546
- vErrors.push(err119);
26833
+ vErrors.push(err121);
26547
26834
  }
26548
26835
  errors++;
26549
26836
  validate35.errors = vErrors;
@@ -26564,7 +26851,7 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
26564
26851
  }
26565
26852
  validate35.evaluated = { "dynamicProps": true, "dynamicItems": false };
26566
26853
  var isDecisionStageSuccessResponse = validate36;
26567
- 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": {} }] };
26854
+ 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": {} }] };
26568
26855
  function validate36(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
26569
26856
  ;
26570
26857
  let vErrors = null;
@@ -26711,13 +26998,23 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
26711
26998
  vErrors.push(err9);
26712
26999
  }
26713
27000
  errors++;
27001
+ } else {
27002
+ if (!pattern4.test(data3)) {
27003
+ 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}$"' };
27004
+ if (vErrors === null) {
27005
+ vErrors = [err10];
27006
+ } else {
27007
+ vErrors.push(err10);
27008
+ }
27009
+ errors++;
27010
+ }
26714
27011
  }
26715
27012
  } else {
26716
- 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" };
27013
+ 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" };
26717
27014
  if (vErrors === null) {
26718
- vErrors = [err10];
27015
+ vErrors = [err11];
26719
27016
  } else {
26720
- vErrors.push(err10);
27017
+ vErrors.push(err11);
26721
27018
  }
26722
27019
  errors++;
26723
27020
  }
@@ -26728,15 +27025,28 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
26728
27025
  }
26729
27026
  if (valid3) {
26730
27027
  if (data.shortId !== void 0) {
27028
+ let data4 = data.shortId;
26731
27029
  const _errs16 = errors;
26732
- if (typeof data.shortId !== "string") {
26733
- 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" };
26734
- if (vErrors === null) {
26735
- vErrors = [err11];
27030
+ if (errors === _errs16) {
27031
+ if (typeof data4 === "string") {
27032
+ if (!pattern5.test(data4)) {
27033
+ 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}$"' };
27034
+ if (vErrors === null) {
27035
+ vErrors = [err12];
27036
+ } else {
27037
+ vErrors.push(err12);
27038
+ }
27039
+ errors++;
27040
+ }
26736
27041
  } else {
26737
- vErrors.push(err11);
27042
+ 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" };
27043
+ if (vErrors === null) {
27044
+ vErrors = [err13];
27045
+ } else {
27046
+ vErrors.push(err13);
27047
+ }
27048
+ errors++;
26738
27049
  }
26739
- errors++;
26740
27050
  }
26741
27051
  var valid3 = _errs16 === errors;
26742
27052
  } else {
@@ -26747,20 +27057,20 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
26747
27057
  let data5 = data.stage;
26748
27058
  const _errs18 = errors;
26749
27059
  if (typeof data5 !== "string") {
26750
- 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" };
27060
+ 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" };
26751
27061
  if (vErrors === null) {
26752
- vErrors = [err12];
27062
+ vErrors = [err14];
26753
27063
  } else {
26754
- vErrors.push(err12);
27064
+ vErrors.push(err14);
26755
27065
  }
26756
27066
  errors++;
26757
27067
  }
26758
27068
  if (!(data5 === "draft" || data5 === "provisional" || data5 === "adopted" || data5 === "superseded" || data5 === "abandoned")) {
26759
- 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" };
27069
+ 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" };
26760
27070
  if (vErrors === null) {
26761
- vErrors = [err13];
27071
+ vErrors = [err15];
26762
27072
  } else {
26763
- vErrors.push(err13);
27073
+ vErrors.push(err15);
26764
27074
  }
26765
27075
  errors++;
26766
27076
  }
@@ -26773,11 +27083,11 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
26773
27083
  }
26774
27084
  }
26775
27085
  } else {
26776
- 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" };
27086
+ 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" };
26777
27087
  if (vErrors === null) {
26778
- vErrors = [err14];
27088
+ vErrors = [err16];
26779
27089
  } else {
26780
- vErrors.push(err14);
27090
+ vErrors.push(err16);
26781
27091
  }
26782
27092
  errors++;
26783
27093
  }
@@ -26790,11 +27100,11 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
26790
27100
  }
26791
27101
  }
26792
27102
  if (!valid1) {
26793
- 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" };
27103
+ 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" };
26794
27104
  if (vErrors === null) {
26795
- vErrors = [err15];
27105
+ vErrors = [err17];
26796
27106
  } else {
26797
- vErrors.push(err15);
27107
+ vErrors.push(err17);
26798
27108
  }
26799
27109
  errors++;
26800
27110
  validate36.errors = vErrors;
@@ -26866,7 +27176,7 @@ function validate37(data, { instancePath = "", parentData, parentDataProperty, r
26866
27176
  return errors === 0;
26867
27177
  }
26868
27178
  validate37.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
26869
- 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": {} };
27179
+ 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": {} };
26870
27180
  function validate38(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
26871
27181
  ;
26872
27182
  let vErrors = null;
@@ -26911,6 +27221,11 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
26911
27221
  if (func1(data2) < 1) {
26912
27222
  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" }];
26913
27223
  return false;
27224
+ } else {
27225
+ if (!pattern4.test(data2)) {
27226
+ 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}$"' }];
27227
+ return false;
27228
+ }
26914
27229
  }
26915
27230
  } else {
26916
27231
  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" }];
@@ -27070,7 +27385,7 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
27070
27385
  return errors === 0;
27071
27386
  }
27072
27387
  validate38.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
27073
- 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"] };
27388
+ 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"] };
27074
27389
  function validate39(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
27075
27390
  ;
27076
27391
  let vErrors = null;
@@ -27115,6 +27430,11 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
27115
27430
  if (func1(data2) < 1) {
27116
27431
  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" }];
27117
27432
  return false;
27433
+ } else {
27434
+ if (!pattern4.test(data2)) {
27435
+ 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}$"' }];
27436
+ return false;
27437
+ }
27118
27438
  }
27119
27439
  } else {
27120
27440
  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" }];
@@ -27127,10 +27447,18 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
27127
27447
  }
27128
27448
  if (valid3) {
27129
27449
  if (data1.shortId !== void 0) {
27450
+ let data3 = data1.shortId;
27130
27451
  const _errs11 = errors;
27131
- if (typeof data1.shortId !== "string") {
27132
- 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" }];
27133
- return false;
27452
+ if (errors === _errs11) {
27453
+ if (typeof data3 === "string") {
27454
+ if (!pattern5.test(data3)) {
27455
+ 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}$"' }];
27456
+ return false;
27457
+ }
27458
+ } else {
27459
+ 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" }];
27460
+ return false;
27461
+ }
27134
27462
  }
27135
27463
  var valid3 = _errs11 === errors;
27136
27464
  } else {
@@ -27466,8 +27794,8 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
27466
27794
  }
27467
27795
  validate39.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
27468
27796
  var isDemoCompleteRequest = validate40;
27469
- var pattern4 = new RegExp("^[a-zA-Z0-9]{1,64}$", "u");
27470
- var pattern5 = new RegExp("^[a-f0-9]{64}$", "u");
27797
+ var pattern34 = new RegExp("^[a-zA-Z0-9]{1,64}$", "u");
27798
+ var pattern35 = new RegExp("^[a-f0-9]{64}$", "u");
27471
27799
  function validate40(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
27472
27800
  ;
27473
27801
  let vErrors = null;
@@ -27501,7 +27829,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
27501
27829
  const _errs3 = errors;
27502
27830
  if (errors === _errs3) {
27503
27831
  if (typeof data0 === "string") {
27504
- if (!pattern4.test(data0)) {
27832
+ if (!pattern34.test(data0)) {
27505
27833
  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}$"' }];
27506
27834
  return false;
27507
27835
  }
@@ -27545,7 +27873,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
27545
27873
  const _errs7 = errors;
27546
27874
  if (errors === _errs7) {
27547
27875
  if (typeof data2 === "string") {
27548
- if (!pattern5.test(data2)) {
27876
+ if (!pattern35.test(data2)) {
27549
27877
  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}$"' }];
27550
27878
  return false;
27551
27879
  }
@@ -27572,7 +27900,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
27572
27900
  }
27573
27901
  validate40.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
27574
27902
  var isDemoResolveRequest = validate41;
27575
- var pattern8 = new RegExp("\\S", "u");
27903
+ var pattern38 = new RegExp("\\S", "u");
27576
27904
  function validate41(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
27577
27905
  ;
27578
27906
  let vErrors = null;
@@ -27619,7 +27947,7 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
27619
27947
  const _errs5 = errors;
27620
27948
  if (errors === _errs5) {
27621
27949
  if (typeof data0 === "string") {
27622
- if (!pattern4.test(data0)) {
27950
+ if (!pattern34.test(data0)) {
27623
27951
  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}$"' };
27624
27952
  if (vErrors === null) {
27625
27953
  vErrors = [err2];
@@ -27760,7 +28088,7 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
27760
28088
  const _errs14 = errors;
27761
28089
  if (errors === _errs14) {
27762
28090
  if (typeof data3 === "string") {
27763
- if (!pattern4.test(data3)) {
28091
+ if (!pattern34.test(data3)) {
27764
28092
  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}$"' };
27765
28093
  if (vErrors === null) {
27766
28094
  vErrors = [err12];
@@ -27873,7 +28201,7 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
27873
28201
  }
27874
28202
  errors++;
27875
28203
  } else {
27876
- if (!pattern8.test(data6)) {
28204
+ if (!pattern38.test(data6)) {
27877
28205
  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"' };
27878
28206
  if (vErrors === null) {
27879
28207
  vErrors = [err21];
@@ -27985,7 +28313,7 @@ function validate42(data, { instancePath = "", parentData, parentDataProperty, r
27985
28313
  const _errs3 = errors;
27986
28314
  if (errors === _errs3) {
27987
28315
  if (typeof data0 === "string") {
27988
- if (!pattern4.test(data0)) {
28316
+ if (!pattern34.test(data0)) {
27989
28317
  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}$"' }];
27990
28318
  return false;
27991
28319
  }
@@ -28036,7 +28364,7 @@ function validate42(data, { instancePath = "", parentData, parentDataProperty, r
28036
28364
  }
28037
28365
  validate42.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
28038
28366
  var isDemoStartRequest = validate43;
28039
- 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");
28367
+ 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");
28040
28368
  function validate43(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
28041
28369
  ;
28042
28370
  let vErrors = null;
@@ -28087,7 +28415,7 @@ function validate43(data, { instancePath = "", parentData, parentDataProperty, r
28087
28415
  if (errors === _errs5) {
28088
28416
  if (errors === _errs5) {
28089
28417
  if (typeof data1 === "string") {
28090
- if (!pattern10.test(data1)) {
28418
+ if (!pattern40.test(data1)) {
28091
28419
  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)$"' }];
28092
28420
  return false;
28093
28421
  }
@@ -28116,7 +28444,7 @@ validate43.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": f
28116
28444
  var isDemoStatusResponse = validate44;
28117
28445
  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 };
28118
28446
  var func34 = Object.prototype.hasOwnProperty;
28119
- 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");
28447
+ 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");
28120
28448
  function validate44(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
28121
28449
  ;
28122
28450
  let vErrors = null;
@@ -28198,7 +28526,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
28198
28526
  const _errs9 = errors;
28199
28527
  if (errors === _errs9) {
28200
28528
  if (typeof data3 === "string") {
28201
- if (!pattern4.test(data3)) {
28529
+ if (!pattern34.test(data3)) {
28202
28530
  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}$"' }];
28203
28531
  return false;
28204
28532
  }
@@ -28316,7 +28644,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
28316
28644
  if (errors === _errs22) {
28317
28645
  if (errors === _errs22) {
28318
28646
  if (typeof data9 === "string") {
28319
- if (!pattern12.test(data9)) {
28647
+ if (!pattern42.test(data9)) {
28320
28648
  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,}$"` }];
28321
28649
  return false;
28322
28650
  }
@@ -28454,7 +28782,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
28454
28782
  const _errs36 = errors;
28455
28783
  if (errors === _errs36) {
28456
28784
  if (typeof data16 === "string") {
28457
- if (!pattern5.test(data16)) {
28785
+ if (!pattern35.test(data16)) {
28458
28786
  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}$"' }];
28459
28787
  return false;
28460
28788
  }
@@ -28657,15 +28985,28 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
28657
28985
  }
28658
28986
  if (valid3) {
28659
28987
  if (data3.decisionId !== void 0) {
28988
+ let data8 = data3.decisionId;
28660
28989
  const _errs22 = errors;
28661
- if (typeof data3.decisionId !== "string") {
28662
- 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" };
28663
- if (vErrors === null) {
28664
- vErrors = [err6];
28990
+ if (errors === _errs22) {
28991
+ if (typeof data8 === "string") {
28992
+ if (!pattern4.test(data8)) {
28993
+ 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}$"' };
28994
+ if (vErrors === null) {
28995
+ vErrors = [err6];
28996
+ } else {
28997
+ vErrors.push(err6);
28998
+ }
28999
+ errors++;
29000
+ }
28665
29001
  } else {
28666
- vErrors.push(err6);
29002
+ 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" };
29003
+ if (vErrors === null) {
29004
+ vErrors = [err7];
29005
+ } else {
29006
+ vErrors.push(err7);
29007
+ }
29008
+ errors++;
28667
29009
  }
28668
- errors++;
28669
29010
  }
28670
29011
  var valid3 = _errs22 === errors;
28671
29012
  } else {
@@ -28673,15 +29014,28 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
28673
29014
  }
28674
29015
  if (valid3) {
28675
29016
  if (data3.decisionShortId !== void 0) {
29017
+ let data9 = data3.decisionShortId;
28676
29018
  const _errs24 = errors;
28677
- if (typeof data3.decisionShortId !== "string") {
28678
- 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" };
28679
- if (vErrors === null) {
28680
- vErrors = [err7];
29019
+ if (errors === _errs24) {
29020
+ if (typeof data9 === "string") {
29021
+ if (!pattern5.test(data9)) {
29022
+ 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}$"' };
29023
+ if (vErrors === null) {
29024
+ vErrors = [err8];
29025
+ } else {
29026
+ vErrors.push(err8);
29027
+ }
29028
+ errors++;
29029
+ }
28681
29030
  } else {
28682
- vErrors.push(err7);
29031
+ 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" };
29032
+ if (vErrors === null) {
29033
+ vErrors = [err9];
29034
+ } else {
29035
+ vErrors.push(err9);
29036
+ }
29037
+ errors++;
28683
29038
  }
28684
- errors++;
28685
29039
  }
28686
29040
  var valid3 = _errs24 === errors;
28687
29041
  } else {
@@ -28695,11 +29049,11 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
28695
29049
  }
28696
29050
  }
28697
29051
  } else {
28698
- 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" };
29052
+ 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" };
28699
29053
  if (vErrors === null) {
28700
- vErrors = [err8];
29054
+ vErrors = [err10];
28701
29055
  } else {
28702
- vErrors.push(err8);
29056
+ vErrors.push(err10);
28703
29057
  }
28704
29058
  errors++;
28705
29059
  }
@@ -28708,22 +29062,22 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
28708
29062
  valid2 = valid2 || _valid0;
28709
29063
  const _errs26 = errors;
28710
29064
  if (data3 !== null) {
28711
- 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" };
29065
+ 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" };
28712
29066
  if (vErrors === null) {
28713
- vErrors = [err9];
29067
+ vErrors = [err11];
28714
29068
  } else {
28715
- vErrors.push(err9);
29069
+ vErrors.push(err11);
28716
29070
  }
28717
29071
  errors++;
28718
29072
  }
28719
29073
  var _valid0 = _errs26 === errors;
28720
29074
  valid2 = valid2 || _valid0;
28721
29075
  if (!valid2) {
28722
- 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" };
29076
+ 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" };
28723
29077
  if (vErrors === null) {
28724
- vErrors = [err10];
29078
+ vErrors = [err12];
28725
29079
  } else {
28726
- vErrors.push(err10);
29080
+ vErrors.push(err12);
28727
29081
  }
28728
29082
  errors++;
28729
29083
  validate45.errors = vErrors;
@@ -29357,8 +29711,7 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
29357
29711
  return errors === 0;
29358
29712
  }
29359
29713
  validate48.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
29360
- 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"] };
29361
- var pattern14 = new RegExp("^[0-9a-f]{8}$", "u");
29714
+ 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"] };
29362
29715
  function validate49(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
29363
29716
  ;
29364
29717
  let vErrors = null;
@@ -29697,7 +30050,7 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29697
30050
  const _errs27 = errors;
29698
30051
  if (errors === _errs27) {
29699
30052
  if (typeof data9 === "string") {
29700
- if (!pattern14.test(data9)) {
30053
+ if (!pattern5.test(data9)) {
29701
30054
  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}$"' };
29702
30055
  if (vErrors === null) {
29703
30056
  vErrors = [err24];
@@ -29743,14 +30096,24 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29743
30096
  vErrors.push(err27);
29744
30097
  }
29745
30098
  errors++;
30099
+ } else {
30100
+ if (!pattern4.test(data10)) {
30101
+ 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}$"' };
30102
+ if (vErrors === null) {
30103
+ vErrors = [err28];
30104
+ } else {
30105
+ vErrors.push(err28);
30106
+ }
30107
+ errors++;
30108
+ }
29746
30109
  }
29747
30110
  }
29748
30111
  } else {
29749
- 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" };
30112
+ 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" };
29750
30113
  if (vErrors === null) {
29751
- vErrors = [err28];
30114
+ vErrors = [err29];
29752
30115
  } else {
29753
- vErrors.push(err28);
30116
+ vErrors.push(err29);
29754
30117
  }
29755
30118
  errors++;
29756
30119
  }
@@ -29763,11 +30126,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29763
30126
  if (data6.intent !== void 0) {
29764
30127
  const _errs31 = errors;
29765
30128
  if (typeof data6.intent !== "string") {
29766
- 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" };
30129
+ 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" };
29767
30130
  if (vErrors === null) {
29768
- vErrors = [err29];
30131
+ vErrors = [err30];
29769
30132
  } else {
29770
- vErrors.push(err29);
30133
+ vErrors.push(err30);
29771
30134
  }
29772
30135
  errors++;
29773
30136
  }
@@ -29779,11 +30142,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29779
30142
  if (data6.webUrl !== void 0) {
29780
30143
  const _errs33 = errors;
29781
30144
  if (typeof data6.webUrl !== "string") {
29782
- 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" };
30145
+ 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" };
29783
30146
  if (vErrors === null) {
29784
- vErrors = [err30];
30147
+ vErrors = [err31];
29785
30148
  } else {
29786
- vErrors.push(err30);
30149
+ vErrors.push(err31);
29787
30150
  }
29788
30151
  errors++;
29789
30152
  }
@@ -29796,20 +30159,20 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29796
30159
  let data13 = data6.kind;
29797
30160
  const _errs35 = errors;
29798
30161
  if (typeof data13 !== "string") {
29799
- 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" };
30162
+ 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" };
29800
30163
  if (vErrors === null) {
29801
- vErrors = [err31];
30164
+ vErrors = [err32];
29802
30165
  } else {
29803
- vErrors.push(err31);
30166
+ vErrors.push(err32);
29804
30167
  }
29805
30168
  errors++;
29806
30169
  }
29807
30170
  if (!(data13 === "confirm_prompt" || data13 === "publish_prompt")) {
29808
- 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" };
30171
+ 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" };
29809
30172
  if (vErrors === null) {
29810
- vErrors = [err32];
30173
+ vErrors = [err33];
29811
30174
  } else {
29812
- vErrors.push(err32);
30175
+ vErrors.push(err33);
29813
30176
  }
29814
30177
  errors++;
29815
30178
  }
@@ -29825,11 +30188,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29825
30188
  }
29826
30189
  }
29827
30190
  } else {
29828
- 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" };
30191
+ 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" };
29829
30192
  if (vErrors === null) {
29830
- vErrors = [err33];
30193
+ vErrors = [err34];
29831
30194
  } else {
29832
- vErrors.push(err33);
30195
+ vErrors.push(err34);
29833
30196
  }
29834
30197
  errors++;
29835
30198
  }
@@ -29842,11 +30205,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29842
30205
  }
29843
30206
  }
29844
30207
  } else {
29845
- 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" };
30208
+ 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" };
29846
30209
  if (vErrors === null) {
29847
- vErrors = [err34];
30210
+ vErrors = [err35];
29848
30211
  } else {
29849
- vErrors.push(err34);
30212
+ vErrors.push(err35);
29850
30213
  }
29851
30214
  errors++;
29852
30215
  }
@@ -29859,11 +30222,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29859
30222
  if (data.hasMore !== void 0) {
29860
30223
  const _errs37 = errors;
29861
30224
  if (typeof data.hasMore !== "boolean") {
29862
- 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" };
30225
+ 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" };
29863
30226
  if (vErrors === null) {
29864
- vErrors = [err35];
30227
+ vErrors = [err36];
29865
30228
  } else {
29866
- vErrors.push(err35);
30229
+ vErrors.push(err36);
29867
30230
  }
29868
30231
  errors++;
29869
30232
  }
@@ -29876,11 +30239,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29876
30239
  }
29877
30240
  }
29878
30241
  } else {
29879
- 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" };
30242
+ 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" };
29880
30243
  if (vErrors === null) {
29881
- vErrors = [err36];
30244
+ vErrors = [err37];
29882
30245
  } else {
29883
- vErrors.push(err36);
30246
+ vErrors.push(err37);
29884
30247
  }
29885
30248
  errors++;
29886
30249
  }
@@ -29897,11 +30260,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29897
30260
  if (data && typeof data == "object" && !Array.isArray(data)) {
29898
30261
  let missing3;
29899
30262
  if (data.protocolVersion === void 0 && (missing3 = "protocolVersion") || data.status === void 0 && (missing3 = "status") || data.reason === void 0 && (missing3 = "reason")) {
29900
- 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 + "'" };
30263
+ 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 + "'" };
29901
30264
  if (vErrors === null) {
29902
- vErrors = [err37];
30265
+ vErrors = [err38];
29903
30266
  } else {
29904
- vErrors.push(err37);
30267
+ vErrors.push(err38);
29905
30268
  }
29906
30269
  errors++;
29907
30270
  } else {
@@ -29909,31 +30272,31 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29909
30272
  let data15 = data.protocolVersion;
29910
30273
  const _errs42 = errors;
29911
30274
  if (!(typeof data15 == "number" && (!(data15 % 1) && !isNaN(data15)) && isFinite(data15))) {
29912
- 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" };
30275
+ 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" };
29913
30276
  if (vErrors === null) {
29914
- vErrors = [err38];
30277
+ vErrors = [err39];
29915
30278
  } else {
29916
- vErrors.push(err38);
30279
+ vErrors.push(err39);
29917
30280
  }
29918
30281
  errors++;
29919
30282
  }
29920
30283
  if (errors === _errs42) {
29921
30284
  if (typeof data15 == "number" && isFinite(data15)) {
29922
30285
  if (data15 > 2 || isNaN(data15)) {
29923
- 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" };
30286
+ 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" };
29924
30287
  if (vErrors === null) {
29925
- vErrors = [err39];
30288
+ vErrors = [err40];
29926
30289
  } else {
29927
- vErrors.push(err39);
30290
+ vErrors.push(err40);
29928
30291
  }
29929
30292
  errors++;
29930
30293
  } else {
29931
30294
  if (data15 < 1 || isNaN(data15)) {
29932
- 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" };
30295
+ 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" };
29933
30296
  if (vErrors === null) {
29934
- vErrors = [err40];
30297
+ vErrors = [err41];
29935
30298
  } else {
29936
- vErrors.push(err40);
30299
+ vErrors.push(err41);
29937
30300
  }
29938
30301
  errors++;
29939
30302
  }
@@ -29949,20 +30312,20 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29949
30312
  let data16 = data.status;
29950
30313
  const _errs44 = errors;
29951
30314
  if (typeof data16 !== "string") {
29952
- 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" };
30315
+ 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" };
29953
30316
  if (vErrors === null) {
29954
- vErrors = [err41];
30317
+ vErrors = [err42];
29955
30318
  } else {
29956
- vErrors.push(err41);
30319
+ vErrors.push(err42);
29957
30320
  }
29958
30321
  errors++;
29959
30322
  }
29960
30323
  if ("unavailable" !== data16) {
29961
- 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" };
30324
+ 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" };
29962
30325
  if (vErrors === null) {
29963
- vErrors = [err42];
30326
+ vErrors = [err43];
29964
30327
  } else {
29965
- vErrors.push(err42);
30328
+ vErrors.push(err43);
29966
30329
  }
29967
30330
  errors++;
29968
30331
  }
@@ -29975,20 +30338,20 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
29975
30338
  let data17 = data.reason;
29976
30339
  const _errs46 = errors;
29977
30340
  if (typeof data17 !== "string") {
29978
- 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" };
30341
+ 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" };
29979
30342
  if (vErrors === null) {
29980
- vErrors = [err43];
30343
+ vErrors = [err44];
29981
30344
  } else {
29982
- vErrors.push(err43);
30345
+ vErrors.push(err44);
29983
30346
  }
29984
30347
  errors++;
29985
30348
  }
29986
30349
  if ("organization_unbound" !== data17) {
29987
- 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" };
30350
+ 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" };
29988
30351
  if (vErrors === null) {
29989
- vErrors = [err44];
30352
+ vErrors = [err45];
29990
30353
  } else {
29991
- vErrors.push(err44);
30354
+ vErrors.push(err45);
29992
30355
  }
29993
30356
  errors++;
29994
30357
  }
@@ -30000,11 +30363,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
30000
30363
  }
30001
30364
  }
30002
30365
  } else {
30003
- 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" };
30366
+ 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" };
30004
30367
  if (vErrors === null) {
30005
- vErrors = [err45];
30368
+ vErrors = [err46];
30006
30369
  } else {
30007
- vErrors.push(err45);
30370
+ vErrors.push(err46);
30008
30371
  }
30009
30372
  errors++;
30010
30373
  }
@@ -30017,11 +30380,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
30017
30380
  }
30018
30381
  }
30019
30382
  if (!valid1) {
30020
- 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" };
30383
+ 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" };
30021
30384
  if (vErrors === null) {
30022
- vErrors = [err46];
30385
+ vErrors = [err47];
30023
30386
  } else {
30024
- vErrors.push(err46);
30387
+ vErrors.push(err47);
30025
30388
  }
30026
30389
  errors++;
30027
30390
  validate49.errors = vErrors;
@@ -30755,8 +31118,8 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
30755
31118
  }
30756
31119
  validate51.evaluated = { "dynamicProps": true, "dynamicItems": false };
30757
31120
  var isGitHubInstallIntentStartResponse = validate52;
30758
- var pattern15 = new RegExp("^[A-Za-z0-9]{1,128}$", "u");
30759
- var pattern16 = new RegExp("^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$", "u");
31121
+ var pattern48 = new RegExp("^[A-Za-z0-9]{1,128}$", "u");
31122
+ var pattern49 = new RegExp("^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$", "u");
30760
31123
  function validate52(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
30761
31124
  ;
30762
31125
  let vErrors = null;
@@ -30838,7 +31201,7 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
30838
31201
  const _errs9 = errors;
30839
31202
  if (errors === _errs9) {
30840
31203
  if (typeof data3 === "string") {
30841
- if (!pattern15.test(data3)) {
31204
+ if (!pattern48.test(data3)) {
30842
31205
  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}$"' }];
30843
31206
  return false;
30844
31207
  }
@@ -30857,7 +31220,7 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
30857
31220
  const _errs11 = errors;
30858
31221
  if (errors === _errs11) {
30859
31222
  if (typeof data4 === "string") {
30860
- if (!pattern16.test(data4)) {
31223
+ if (!pattern49.test(data4)) {
30861
31224
  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}$"' }];
30862
31225
  return false;
30863
31226
  }
@@ -31265,7 +31628,7 @@ function validate54(data, { instancePath = "", parentData, parentDataProperty, r
31265
31628
  const _errs3 = errors;
31266
31629
  if (errors === _errs3) {
31267
31630
  if (typeof data0 === "string") {
31268
- if (!pattern15.test(data0)) {
31631
+ if (!pattern48.test(data0)) {
31269
31632
  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}$"' }];
31270
31633
  return false;
31271
31634
  }
@@ -32839,7 +33202,7 @@ function validate55(data, { instancePath = "", parentData, parentDataProperty, r
32839
33202
  validate55.evaluated = { "dynamicProps": true, "dynamicItems": false };
32840
33203
  var isMoveIngestRequest = validate56;
32841
33204
  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": {} };
32842
- var pattern18 = new RegExp("^[A-Za-z0-9_-]+$", "u");
33205
+ var pattern51 = new RegExp("^[A-Za-z0-9_-]+$", "u");
32843
33206
  function validate56(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
32844
33207
  ;
32845
33208
  let vErrors = null;
@@ -33200,7 +33563,7 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
33200
33563
  }
33201
33564
  errors++;
33202
33565
  } else {
33203
- if (!pattern18.test(data11)) {
33566
+ if (!pattern51.test(data11)) {
33204
33567
  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_-]+$"' };
33205
33568
  if (vErrors === null) {
33206
33569
  vErrors = [err22];
@@ -33725,7 +34088,7 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
33725
34088
  }
33726
34089
  errors++;
33727
34090
  } else {
33728
- if (!pattern18.test(data26)) {
34091
+ if (!pattern51.test(data26)) {
33729
34092
  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_-]+$"' };
33730
34093
  if (vErrors === null) {
33731
34094
  vErrors = [err58];
@@ -33968,10 +34331,10 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
33968
34331
  }
33969
34332
  validate56.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
33970
34333
  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"] };
33971
- var pattern20 = new RegExp("^[A-Za-z0-9._:-]{1,128}$", "u");
33972
- var pattern22 = new RegExp("^[A-Za-z0-9]{1,64}$", "u");
33973
- var pattern23 = new RegExp("^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$", "u");
33974
- var pattern24 = new RegExp("^[A-Za-z0-9][A-Za-z0-9._+-]*$", "u");
34334
+ var pattern53 = new RegExp("^[A-Za-z0-9._:-]{1,128}$", "u");
34335
+ var pattern55 = new RegExp("^[A-Za-z0-9]{1,64}$", "u");
34336
+ var pattern56 = new RegExp("^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$", "u");
34337
+ var pattern57 = new RegExp("^[A-Za-z0-9][A-Za-z0-9._+-]*$", "u");
33975
34338
  function validate57(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
33976
34339
  ;
33977
34340
  let vErrors = null;
@@ -34037,7 +34400,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
34037
34400
  const _errs8 = errors;
34038
34401
  if (errors === _errs8) {
34039
34402
  if (typeof data2 === "string") {
34040
- if (!pattern20.test(data2)) {
34403
+ if (!pattern53.test(data2)) {
34041
34404
  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}$"' }];
34042
34405
  return false;
34043
34406
  }
@@ -34056,7 +34419,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
34056
34419
  const _errs10 = errors;
34057
34420
  if (errors === _errs10) {
34058
34421
  if (typeof data3 === "string") {
34059
- if (!pattern20.test(data3)) {
34422
+ if (!pattern53.test(data3)) {
34060
34423
  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}$"' }];
34061
34424
  return false;
34062
34425
  }
@@ -34075,7 +34438,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
34075
34438
  const _errs12 = errors;
34076
34439
  if (errors === _errs12) {
34077
34440
  if (typeof data4 === "string") {
34078
- if (!pattern22.test(data4)) {
34441
+ if (!pattern55.test(data4)) {
34079
34442
  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}$"' }];
34080
34443
  return false;
34081
34444
  }
@@ -34147,7 +34510,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
34147
34510
  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" }];
34148
34511
  return false;
34149
34512
  } else {
34150
- if (!pattern23.test(data8)) {
34513
+ if (!pattern56.test(data8)) {
34151
34514
  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(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$"' }];
34152
34515
  return false;
34153
34516
  }
@@ -34187,7 +34550,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
34187
34550
  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" }];
34188
34551
  return false;
34189
34552
  } else {
34190
- if (!pattern24.test(data10)) {
34553
+ if (!pattern57.test(data10)) {
34191
34554
  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._+-]*$"' }];
34192
34555
  return false;
34193
34556
  }
@@ -34233,7 +34596,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
34233
34596
  return errors === 0;
34234
34597
  }
34235
34598
  validate57.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
34236
- 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": {} };
34599
+ 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": {} };
34237
34600
  function validate58(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
34238
34601
  ;
34239
34602
  let vErrors = null;
@@ -34274,7 +34637,7 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
34274
34637
  const _errs5 = errors;
34275
34638
  if (errors === _errs5) {
34276
34639
  if (typeof data1 === "string") {
34277
- if (!pattern20.test(data1)) {
34640
+ if (!pattern53.test(data1)) {
34278
34641
  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}$"' }];
34279
34642
  return false;
34280
34643
  }
@@ -34344,10 +34707,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
34344
34707
  return false;
34345
34708
  } else {
34346
34709
  if (data6.decisionId !== void 0) {
34710
+ let data7 = data6.decisionId;
34347
34711
  const _errs18 = errors;
34348
- if (typeof data6.decisionId !== "string") {
34349
- 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" }];
34350
- return false;
34712
+ if (errors === _errs18) {
34713
+ if (typeof data7 === "string") {
34714
+ if (!pattern4.test(data7)) {
34715
+ 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}$"' }];
34716
+ return false;
34717
+ }
34718
+ } else {
34719
+ 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" }];
34720
+ return false;
34721
+ }
34351
34722
  }
34352
34723
  var valid3 = _errs18 === errors;
34353
34724
  } else {
@@ -34355,10 +34726,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
34355
34726
  }
34356
34727
  if (valid3) {
34357
34728
  if (data6.shortId !== void 0) {
34729
+ let data8 = data6.shortId;
34358
34730
  const _errs20 = errors;
34359
- if (typeof data6.shortId !== "string") {
34360
- 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" }];
34361
- return false;
34731
+ if (errors === _errs20) {
34732
+ if (typeof data8 === "string") {
34733
+ if (!pattern5.test(data8)) {
34734
+ 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}$"' }];
34735
+ return false;
34736
+ }
34737
+ } else {
34738
+ 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" }];
34739
+ return false;
34740
+ }
34362
34741
  }
34363
34742
  var valid3 = _errs20 === errors;
34364
34743
  } else {
@@ -34416,10 +34795,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
34416
34795
  return false;
34417
34796
  } else {
34418
34797
  if (data11.decisionId !== void 0) {
34798
+ let data12 = data11.decisionId;
34419
34799
  const _errs29 = errors;
34420
- if (typeof data11.decisionId !== "string") {
34421
- 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" }];
34422
- return false;
34800
+ if (errors === _errs29) {
34801
+ if (typeof data12 === "string") {
34802
+ if (!pattern4.test(data12)) {
34803
+ 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}$"' }];
34804
+ return false;
34805
+ }
34806
+ } else {
34807
+ 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" }];
34808
+ return false;
34809
+ }
34423
34810
  }
34424
34811
  var valid5 = _errs29 === errors;
34425
34812
  } else {
@@ -34438,10 +34825,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
34438
34825
  }
34439
34826
  if (valid5) {
34440
34827
  if (data11.shortId !== void 0) {
34828
+ let data14 = data11.shortId;
34441
34829
  const _errs33 = errors;
34442
- if (typeof data11.shortId !== "string") {
34443
- 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" }];
34444
- return false;
34830
+ if (errors === _errs33) {
34831
+ if (typeof data14 === "string") {
34832
+ if (!pattern5.test(data14)) {
34833
+ 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}$"' }];
34834
+ return false;
34835
+ }
34836
+ } else {
34837
+ 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" }];
34838
+ return false;
34839
+ }
34445
34840
  }
34446
34841
  var valid5 = _errs33 === errors;
34447
34842
  } else {
@@ -34763,10 +35158,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
34763
35158
  }
34764
35159
  if (_errs65 === errors) {
34765
35160
  if (data28.decisionId !== void 0) {
35161
+ let data29 = data28.decisionId;
34766
35162
  const _errs66 = errors;
34767
- if (typeof data28.decisionId !== "string") {
34768
- 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" }];
34769
- return false;
35163
+ if (errors === _errs66) {
35164
+ if (typeof data29 === "string") {
35165
+ if (!pattern4.test(data29)) {
35166
+ 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}$"' }];
35167
+ return false;
35168
+ }
35169
+ } else {
35170
+ 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" }];
35171
+ return false;
35172
+ }
34770
35173
  }
34771
35174
  var valid10 = _errs66 === errors;
34772
35175
  } else {
@@ -34864,10 +35267,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
34864
35267
  }
34865
35268
  if (_errs74 === errors) {
34866
35269
  if (data32.decisionId !== void 0) {
35270
+ let data33 = data32.decisionId;
34867
35271
  const _errs75 = errors;
34868
- if (typeof data32.decisionId !== "string") {
34869
- 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" }];
34870
- return false;
35272
+ if (errors === _errs75) {
35273
+ if (typeof data33 === "string") {
35274
+ if (!pattern4.test(data33)) {
35275
+ 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}$"' }];
35276
+ return false;
35277
+ }
35278
+ } else {
35279
+ 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" }];
35280
+ return false;
35281
+ }
34871
35282
  }
34872
35283
  var valid12 = _errs75 === errors;
34873
35284
  } else {
@@ -34875,10 +35286,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
34875
35286
  }
34876
35287
  if (valid12) {
34877
35288
  if (data32.shortId !== void 0) {
35289
+ let data34 = data32.shortId;
34878
35290
  const _errs77 = errors;
34879
- if (typeof data32.shortId !== "string") {
34880
- 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" }];
34881
- return false;
35291
+ if (errors === _errs77) {
35292
+ if (typeof data34 === "string") {
35293
+ if (!pattern5.test(data34)) {
35294
+ 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}$"' }];
35295
+ return false;
35296
+ }
35297
+ } else {
35298
+ 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" }];
35299
+ return false;
35300
+ }
34882
35301
  }
34883
35302
  var valid12 = _errs77 === errors;
34884
35303
  } else {
@@ -34943,8 +35362,8 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
34943
35362
  return errors === 0;
34944
35363
  }
34945
35364
  validate58.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
34946
- var pattern26 = new RegExp("^[A-Za-z0-9._-]{1,128}$", "u");
34947
- var pattern27 = new RegExp("^pci_[A-Za-z0-9_-]{43}$", "u");
35365
+ var pattern66 = new RegExp("^[A-Za-z0-9._-]{1,128}$", "u");
35366
+ var pattern67 = new RegExp("^pci_[A-Za-z0-9_-]{43}$", "u");
34948
35367
  function validate59(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
34949
35368
  ;
34950
35369
  let vErrors = null;
@@ -34969,7 +35388,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
34969
35388
  const _errs3 = errors;
34970
35389
  if (errors === _errs3) {
34971
35390
  if (typeof data0 === "string") {
34972
- if (!pattern26.test(data0)) {
35391
+ if (!pattern66.test(data0)) {
34973
35392
  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}$"' }];
34974
35393
  return false;
34975
35394
  }
@@ -34988,7 +35407,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
34988
35407
  const _errs5 = errors;
34989
35408
  if (errors === _errs5) {
34990
35409
  if (typeof data1 === "string") {
34991
- if (!pattern27.test(data1)) {
35410
+ if (!pattern67.test(data1)) {
34992
35411
  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}$"' }];
34993
35412
  return false;
34994
35413
  }
@@ -35531,7 +35950,7 @@ function validate61(data, { instancePath = "", parentData, parentDataProperty, r
35531
35950
  }
35532
35951
  validate61.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
35533
35952
  var isReconcileResolutionResponse = validate62;
35534
- 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 };
35953
+ 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 };
35535
35954
  function validate62(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
35536
35955
  ;
35537
35956
  let vErrors = null;
@@ -35588,10 +36007,18 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
35588
36007
  }
35589
36008
  if (valid1) {
35590
36009
  if (data.decisionId !== void 0) {
36010
+ let data2 = data.decisionId;
35591
36011
  const _errs7 = errors;
35592
- if (typeof data.decisionId !== "string") {
35593
- 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" }];
35594
- return false;
36012
+ if (errors === _errs7) {
36013
+ if (typeof data2 === "string") {
36014
+ if (!pattern4.test(data2)) {
36015
+ 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}$"' }];
36016
+ return false;
36017
+ }
36018
+ } else {
36019
+ 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" }];
36020
+ return false;
36021
+ }
35595
36022
  }
35596
36023
  var valid1 = _errs7 === errors;
35597
36024
  } else {
@@ -35652,7 +36079,7 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
35652
36079
  return errors === 0;
35653
36080
  }
35654
36081
  validate62.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
35655
- 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");
36082
+ 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");
35656
36083
  function validate63(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
35657
36084
  ;
35658
36085
  let vErrors = null;
@@ -35686,7 +36113,7 @@ function validate63(data, { instancePath = "", parentData, parentDataProperty, r
35686
36113
  const _errs3 = errors;
35687
36114
  if (errors === _errs3) {
35688
36115
  if (typeof data0 === "string") {
35689
- if (!pattern28.test(data0)) {
36116
+ if (!pattern69.test(data0)) {
35690
36117
  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}$"' }];
35691
36118
  return false;
35692
36119
  }
@@ -35751,7 +36178,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
35751
36178
  return errors === 0;
35752
36179
  }
35753
36180
  validate64.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
35754
- var pattern30 = new RegExp("^api_key_[A-Za-z0-9_-]+$", "u");
36181
+ var pattern71 = new RegExp("^api_key_[A-Za-z0-9_-]+$", "u");
35755
36182
  function validate65(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
35756
36183
  ;
35757
36184
  let vErrors = null;
@@ -35785,7 +36212,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
35785
36212
  const _errs3 = errors;
35786
36213
  if (errors === _errs3) {
35787
36214
  if (typeof data0 === "string") {
35788
- if (!pattern5.test(data0)) {
36215
+ if (!pattern35.test(data0)) {
35789
36216
  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}$"' }];
35790
36217
  return false;
35791
36218
  }
@@ -35837,7 +36264,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
35837
36264
  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" }];
35838
36265
  return false;
35839
36266
  } else {
35840
- if (!pattern30.test(data2)) {
36267
+ if (!pattern71.test(data2)) {
35841
36268
  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_-]+$"' }];
35842
36269
  return false;
35843
36270
  }
@@ -35865,9 +36292,9 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
35865
36292
  return errors === 0;
35866
36293
  }
35867
36294
  validate65.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
35868
- var pattern32 = new RegExp("^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$", "u");
35869
- var pattern33 = new RegExp("^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$", "u");
35870
- var pattern34 = new RegExp("^[\\x21-\\x7e]+$", "u");
36295
+ var pattern73 = new RegExp("^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$", "u");
36296
+ var pattern74 = new RegExp("^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$", "u");
36297
+ var pattern75 = new RegExp("^[\\x21-\\x7e]+$", "u");
35871
36298
  function validate66(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
35872
36299
  ;
35873
36300
  let vErrors = null;
@@ -35939,7 +36366,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
35939
36366
  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" }];
35940
36367
  return false;
35941
36368
  } else {
35942
- if (!pattern30.test(data2)) {
36369
+ if (!pattern71.test(data2)) {
35943
36370
  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_-]+$"' }];
35944
36371
  return false;
35945
36372
  }
@@ -35968,7 +36395,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
35968
36395
  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" }];
35969
36396
  return false;
35970
36397
  } else {
35971
- if (!pattern32.test(data3)) {
36398
+ if (!pattern73.test(data3)) {
35972
36399
  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])?$"' }];
35973
36400
  return false;
35974
36401
  }
@@ -35997,7 +36424,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
35997
36424
  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" }];
35998
36425
  return false;
35999
36426
  } else {
36000
- if (!pattern33.test(data4)) {
36427
+ if (!pattern74.test(data4)) {
36001
36428
  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]+$"' }];
36002
36429
  return false;
36003
36430
  }
@@ -36037,7 +36464,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
36037
36464
  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" }];
36038
36465
  return false;
36039
36466
  } else {
36040
- if (!pattern34.test(data6)) {
36467
+ if (!pattern75.test(data6)) {
36041
36468
  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]+$"' }];
36042
36469
  return false;
36043
36470
  }
@@ -36323,7 +36750,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
36323
36750
  }
36324
36751
  errors++;
36325
36752
  } else {
36326
- if (!pattern30.test(data11)) {
36753
+ if (!pattern71.test(data11)) {
36327
36754
  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_-]+$"' };
36328
36755
  if (vErrors === null) {
36329
36756
  vErrors = [err12];
@@ -36435,7 +36862,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
36435
36862
  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" }];
36436
36863
  return false;
36437
36864
  } else {
36438
- if (!pattern30.test(data0)) {
36865
+ if (!pattern71.test(data0)) {
36439
36866
  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_-]+$"' }];
36440
36867
  return false;
36441
36868
  }
@@ -36464,7 +36891,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
36464
36891
  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" }];
36465
36892
  return false;
36466
36893
  } else {
36467
- if (!pattern32.test(data1)) {
36894
+ if (!pattern73.test(data1)) {
36468
36895
  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])?$"' }];
36469
36896
  return false;
36470
36897
  }
@@ -36493,7 +36920,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
36493
36920
  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" }];
36494
36921
  return false;
36495
36922
  } else {
36496
- if (!pattern33.test(data2)) {
36923
+ if (!pattern74.test(data2)) {
36497
36924
  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]+$"' }];
36498
36925
  return false;
36499
36926
  }
@@ -36533,7 +36960,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
36533
36960
  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" }];
36534
36961
  return false;
36535
36962
  } else {
36536
- if (!pattern34.test(data4)) {
36963
+ if (!pattern75.test(data4)) {
36537
36964
  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]+$"' }];
36538
36965
  return false;
36539
36966
  }
@@ -36814,7 +37241,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
36814
37241
  const _errs3 = errors;
36815
37242
  if (errors === _errs3) {
36816
37243
  if (typeof data0 === "string") {
36817
- if (!pattern5.test(data0)) {
37244
+ if (!pattern35.test(data0)) {
36818
37245
  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}$"' }];
36819
37246
  return false;
36820
37247
  }
@@ -36841,7 +37268,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
36841
37268
  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" }];
36842
37269
  return false;
36843
37270
  } else {
36844
- if (!pattern32.test(data1)) {
37271
+ if (!pattern73.test(data1)) {
36845
37272
  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])?$"' }];
36846
37273
  return false;
36847
37274
  }
@@ -36894,7 +37321,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
36894
37321
  return errors === 0;
36895
37322
  }
36896
37323
  validate68.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
36897
- var pattern46 = new RegExp("^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$", "u");
37324
+ var pattern87 = new RegExp("^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$", "u");
36898
37325
  function validate69(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
36899
37326
  ;
36900
37327
  let vErrors = null;
@@ -36955,7 +37382,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
36955
37382
  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" }];
36956
37383
  return false;
36957
37384
  } else {
36958
- if (!pattern30.test(data1)) {
37385
+ if (!pattern71.test(data1)) {
36959
37386
  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_-]+$"' }];
36960
37387
  return false;
36961
37388
  }
@@ -36984,7 +37411,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
36984
37411
  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" }];
36985
37412
  return false;
36986
37413
  } else {
36987
- if (!pattern32.test(data2)) {
37414
+ if (!pattern73.test(data2)) {
36988
37415
  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])?$"' }];
36989
37416
  return false;
36990
37417
  }
@@ -37013,7 +37440,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
37013
37440
  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" }];
37014
37441
  return false;
37015
37442
  } else {
37016
- if (!pattern33.test(data3)) {
37443
+ if (!pattern74.test(data3)) {
37017
37444
  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]+$"' }];
37018
37445
  return false;
37019
37446
  }
@@ -37053,7 +37480,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
37053
37480
  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" }];
37054
37481
  return false;
37055
37482
  } else {
37056
- if (!pattern34.test(data5)) {
37483
+ if (!pattern75.test(data5)) {
37057
37484
  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]+$"' }];
37058
37485
  return false;
37059
37486
  }
@@ -37315,7 +37742,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
37315
37742
  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" }];
37316
37743
  return false;
37317
37744
  } else {
37318
- if (!pattern46.test(data10)) {
37745
+ if (!pattern87.test(data10)) {
37319
37746
  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]+)*$"' }];
37320
37747
  return false;
37321
37748
  }
@@ -37375,7 +37802,7 @@ function validate70(data, { instancePath = "", parentData, parentDataProperty, r
37375
37802
  const _errs3 = errors;
37376
37803
  if (errors === _errs3) {
37377
37804
  if (typeof data0 === "string") {
37378
- if (!pattern5.test(data0)) {
37805
+ if (!pattern35.test(data0)) {
37379
37806
  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}$"' }];
37380
37807
  return false;
37381
37808
  }
@@ -37437,7 +37864,7 @@ function validate71(data, { instancePath = "", parentData, parentDataProperty, r
37437
37864
  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" }];
37438
37865
  return false;
37439
37866
  } else {
37440
- if (!pattern30.test(data0)) {
37867
+ if (!pattern71.test(data0)) {
37441
37868
  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_-]+$"' }];
37442
37869
  return false;
37443
37870
  }
@@ -37701,7 +38128,7 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
37701
38128
  }
37702
38129
  validate73.evaluated = { "dynamicProps": true, "dynamicItems": false };
37703
38130
  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"] };
37704
- var pattern49 = new RegExp("^client_[A-Za-z0-9_-]+$", "u");
38131
+ var pattern90 = new RegExp("^client_[A-Za-z0-9_-]+$", "u");
37705
38132
  function validate74(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
37706
38133
  ;
37707
38134
  let vErrors = null;
@@ -37770,7 +38197,7 @@ function validate74(data, { instancePath = "", parentData, parentDataProperty, r
37770
38197
  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" }];
37771
38198
  return false;
37772
38199
  } else {
37773
- if (!pattern49.test(data2)) {
38200
+ if (!pattern90.test(data2)) {
37774
38201
  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_-]+$"' }];
37775
38202
  return false;
37776
38203
  }
@@ -45258,6 +45685,179 @@ function registerDaemonCommands(program3) {
45258
45685
  });
45259
45686
  }
45260
45687
 
45688
+ // src/daemon/proxy.ts
45689
+ var DAEMON_HTTP_TIMEOUT_MS = 1e4;
45690
+ var DAEMON_PROBE_TIMEOUT_MS = 250;
45691
+ async function daemonOrDirect(method, params, direct) {
45692
+ const fromDaemon = await daemonRequest(
45693
+ method,
45694
+ { ...params, callerEnv: getSiteUrl() },
45695
+ { timeoutMs: DAEMON_PROBE_TIMEOUT_MS }
45696
+ );
45697
+ if (fromDaemon !== null) {
45698
+ return fromDaemon;
45699
+ }
45700
+ return await direct();
45701
+ }
45702
+ async function daemonOrDirectGet(method, path9, client, timeoutMs2 = DAEMON_HTTP_TIMEOUT_MS) {
45703
+ return await daemonOrDirect(
45704
+ method,
45705
+ { path: path9 },
45706
+ async () => await client.get(path9, {
45707
+ signal: AbortSignal.timeout(timeoutMs2)
45708
+ })
45709
+ );
45710
+ }
45711
+
45712
+ // src/decisions/recent.ts
45713
+ var RECENT_TIMEOUT_MS = 1e4;
45714
+ var defaultDeps = { getClient };
45715
+ async function fetchRecent(args, deps = defaultDeps) {
45716
+ if (args.author !== void 0 && args.author.trim() === "") {
45717
+ return {
45718
+ decisions: [],
45719
+ unavailable: "--author must be a non-empty name"
45720
+ };
45721
+ }
45722
+ const params = new URLSearchParams();
45723
+ if (args.limit !== void 0) {
45724
+ params.set("limit", String(args.limit));
45725
+ }
45726
+ if (args.since !== void 0) {
45727
+ params.set("since", args.since);
45728
+ }
45729
+ if (args.author !== void 0) {
45730
+ params.set("author", args.author);
45731
+ }
45732
+ try {
45733
+ const client = deps.getClient();
45734
+ const res = await daemonOrDirectGet(
45735
+ "decisions_recent",
45736
+ `/api/cli/decisions/recent?${params.toString()}`,
45737
+ client,
45738
+ deps.timeoutMs ?? RECENT_TIMEOUT_MS
45739
+ );
45740
+ if (args.author !== void 0 && res.author === void 0 && res.unavailable === void 0) {
45741
+ return {
45742
+ decisions: [],
45743
+ unavailable: "--author requires a newer Primitive backend (no author echo in response); retry without --author for the team-wide feed"
45744
+ };
45745
+ }
45746
+ const result = { decisions: res.decisions };
45747
+ if (res.viewerHasDecisions !== void 0) {
45748
+ result.viewerHasDecisions = res.viewerHasDecisions;
45749
+ }
45750
+ if (res.author !== void 0) {
45751
+ result.author = res.author;
45752
+ }
45753
+ if (res.authorHasDecisions !== void 0) {
45754
+ result.authorHasDecisions = res.authorHasDecisions;
45755
+ }
45756
+ if (res.windowTotal !== void 0) {
45757
+ result.windowTotal = res.windowTotal;
45758
+ }
45759
+ if (res.windowTotalCapped !== void 0) {
45760
+ result.windowTotalCapped = res.windowTotalCapped;
45761
+ }
45762
+ if (res.unavailable !== void 0) {
45763
+ result.unavailable = res.unavailable;
45764
+ }
45765
+ return result;
45766
+ } catch (err) {
45767
+ const detail = err instanceof Error ? err.message : String(err);
45768
+ return { decisions: [], unavailable: `recent feed failed: ${detail}` };
45769
+ }
45770
+ }
45771
+ var ZERO_PAD_TWO = 2;
45772
+ function pad2(n) {
45773
+ return n.toString().padStart(ZERO_PAD_TWO, "0");
45774
+ }
45775
+ function formatClock(ms) {
45776
+ const d = new Date(ms);
45777
+ return `${pad2(d.getHours())}:${pad2(d.getMinutes())}`;
45778
+ }
45779
+ function authorLabel(row) {
45780
+ if (!row.authorIsSelf) {
45781
+ return terminalSafeLine(row.authorName);
45782
+ }
45783
+ switch (row.producerKind) {
45784
+ case "claude_code":
45785
+ return "Your Claude Code";
45786
+ case "codex":
45787
+ return "Your Codex";
45788
+ case "cursor":
45789
+ return "Your Cursor";
45790
+ case "hermes":
45791
+ return "Your Hermes";
45792
+ case "chat":
45793
+ return "Your chat";
45794
+ case "spec_edit":
45795
+ return "Your spec edit";
45796
+ case "cli":
45797
+ return "Your CLI";
45798
+ default:
45799
+ return `Your ${terminalSafeLine(row.authorName)}`;
45800
+ }
45801
+ }
45802
+ var AUTHOR_WIDTH = 18;
45803
+ var AREA_WIDTH = 12;
45804
+ function padRight(s, width) {
45805
+ return s.length >= width ? `${s.slice(0, width - 1)} ` : s.padEnd(width, " ");
45806
+ }
45807
+ function formatRecentRow(row) {
45808
+ const clock = formatClock(row.classifiedAt);
45809
+ const author = padRight(authorLabel(row), AUTHOR_WIDTH);
45810
+ const area = terminalSafeLine(row.area ?? "");
45811
+ const areaText = area ? `\u2022 ${area}` : "\u2022";
45812
+ const areaPlain = padRight(areaText, AREA_WIDTH);
45813
+ const areaCol = area ? areaPlain.replace("\u2022", color("\u2022", colorForArea(area))) : areaPlain;
45814
+ return ` ${clock} ${author}${areaCol}${terminalSafeLine(row.intent)}`;
45815
+ }
45816
+ var RECENT_LIMIT_CEILING = 100;
45817
+ function remainingHint(result) {
45818
+ const { windowTotal } = result;
45819
+ if (windowTotal === void 0 || windowTotal <= result.decisions.length) {
45820
+ return;
45821
+ }
45822
+ const remaining = windowTotal - result.decisions.length;
45823
+ const remainingText = result.windowTotalCapped === true ? `${remaining}+` : String(remaining);
45824
+ if (windowTotal <= RECENT_LIMIT_CEILING) {
45825
+ return `${remainingText} more not shown \u2014 re-run with --limit ${windowTotal} to see all`;
45826
+ }
45827
+ return `${remainingText} more not shown \u2014 re-run with --limit ${RECENT_LIMIT_CEILING} for the newest ${RECENT_LIMIT_CEILING} (the full set exceeds the feed cap)`;
45828
+ }
45829
+ function formatRecentHuman(result) {
45830
+ if (result.unavailable !== void 0) {
45831
+ return `[prim] recent \xB7 feed not verified \u2014 ${terminalSafeLine(result.unavailable)}`;
45832
+ }
45833
+ if (result.author !== void 0 && result.decisions.length === 0) {
45834
+ if (result.authorHasDecisions === true) {
45835
+ return `[prim] recent \xB7 ${terminalSafeLine(result.author.name)} \xB7 0 decisions in this window (older decisions exist \u2014 widen --since)`;
45836
+ }
45837
+ if (result.authorHasDecisions === false) {
45838
+ return `[prim] recent \xB7 ${terminalSafeLine(result.author.name)} \xB7 no feed-visible decisions yet (if unexpected, check prim setup/doctor on their machine and the repo they work in)`;
45839
+ }
45840
+ return `[prim] recent \xB7 ${terminalSafeLine(result.author.name)} \xB7 0 decisions`;
45841
+ }
45842
+ const label2 = result.author === void 0 ? "recent" : `recent \xB7 ${terminalSafeLine(result.author.name)}`;
45843
+ if (result.decisions.length === 0) {
45844
+ return "[prim] recent \xB7 0 decisions";
45845
+ }
45846
+ const header = `[prim] ${label2} \xB7 ${String(result.decisions.length)} decision(s)`;
45847
+ const hint = remainingHint(result);
45848
+ const lines = [hint === void 0 ? header : `${header} \xB7 ${hint}`];
45849
+ for (const row of result.decisions) {
45850
+ lines.push(formatRecentRow(row));
45851
+ }
45852
+ return lines.join("\n");
45853
+ }
45854
+ function formatRecentJson(result) {
45855
+ return JSON.stringify(result, null, 2);
45856
+ }
45857
+ function renderIdentifier(row) {
45858
+ return decisionIdentifier(row.id, row.shortId) ?? "Decision identity unavailable";
45859
+ }
45860
+
45261
45861
  // src/decisions/cascade-renderer.ts
45262
45862
  var DEPENDENTS_INLINE_LIMIT = 5;
45263
45863
  var KNOWLEDGE_INLINE_LIMIT = 4;
@@ -45408,8 +46008,7 @@ function triggerLine(result) {
45408
46008
  }
45409
46009
  function renderCascade(result) {
45410
46010
  const d = result.decision;
45411
- const shortId = terminalSafeLine(d.shortId ?? "");
45412
- const id = shortId ? `dec_${shortId}` : terminalSafeLine(d.id);
46011
+ const id = renderIdentifier(d);
45413
46012
  const idColored = color(id, "orange");
45414
46013
  const header = `what this would break \xB7 ${String(result.fanOut)} decision(s) \xB7 enforcing`;
45415
46014
  const lines = [header, "", "knowledge"];
@@ -45454,37 +46053,13 @@ function renderCascade(result) {
45454
46053
  return lines.join("\n");
45455
46054
  }
45456
46055
 
45457
- // src/daemon/proxy.ts
45458
- var DAEMON_HTTP_TIMEOUT_MS = 1e4;
45459
- var DAEMON_PROBE_TIMEOUT_MS = 250;
45460
- async function daemonOrDirect(method, params, direct) {
45461
- const fromDaemon = await daemonRequest(
45462
- method,
45463
- { ...params, callerEnv: getSiteUrl() },
45464
- { timeoutMs: DAEMON_PROBE_TIMEOUT_MS }
45465
- );
45466
- if (fromDaemon !== null) {
45467
- return fromDaemon;
45468
- }
45469
- return await direct();
45470
- }
45471
- async function daemonOrDirectGet(method, path9, client, timeoutMs2 = DAEMON_HTTP_TIMEOUT_MS) {
45472
- return await daemonOrDirect(
45473
- method,
45474
- { path: path9 },
45475
- async () => await client.get(path9, {
45476
- signal: AbortSignal.timeout(timeoutMs2)
45477
- })
45478
- );
45479
- }
45480
-
45481
46056
  // src/decisions/cascade.ts
45482
46057
  var NOT_FOUND_RE = /not found/i;
45483
46058
  var CASCADE_TIMEOUT_MS = 1e4;
45484
- var defaultDeps = { getClient };
46059
+ var defaultDeps2 = { getClient };
45485
46060
  var CascadeNotFoundError = class extends Error {
45486
- constructor(idOrShortId) {
45487
- super(`Decision not found: ${idOrShortId}`);
46061
+ constructor(_idOrShortId) {
46062
+ super("Decision not found");
45488
46063
  this.name = "CascadeNotFoundError";
45489
46064
  }
45490
46065
  };
@@ -45497,7 +46072,7 @@ function normalizeCascade(raw) {
45497
46072
  }
45498
46073
  };
45499
46074
  }
45500
- async function fetchCascade(idOrShortId, deps = defaultDeps) {
46075
+ async function fetchCascade(idOrShortId, deps = defaultDeps2) {
45501
46076
  const params = new URLSearchParams({ id: idOrShortId });
45502
46077
  const client = deps.getClient();
45503
46078
  try {
@@ -45519,169 +46094,15 @@ function formatCascadeJson(result) {
45519
46094
  return JSON.stringify(result, null, 2);
45520
46095
  }
45521
46096
 
45522
- // src/decisions/recent.ts
45523
- var RECENT_TIMEOUT_MS = 1e4;
45524
- var defaultDeps2 = { getClient };
45525
- async function fetchRecent(args, deps = defaultDeps2) {
45526
- if (args.author !== void 0 && args.author.trim() === "") {
45527
- return {
45528
- decisions: [],
45529
- unavailable: "--author must be a non-empty name"
45530
- };
45531
- }
45532
- const params = new URLSearchParams();
45533
- if (args.limit !== void 0) {
45534
- params.set("limit", String(args.limit));
45535
- }
45536
- if (args.since !== void 0) {
45537
- params.set("since", args.since);
45538
- }
45539
- if (args.author !== void 0) {
45540
- params.set("author", args.author);
45541
- }
45542
- try {
45543
- const client = deps.getClient();
45544
- const res = await daemonOrDirectGet(
45545
- "decisions_recent",
45546
- `/api/cli/decisions/recent?${params.toString()}`,
45547
- client,
45548
- deps.timeoutMs ?? RECENT_TIMEOUT_MS
45549
- );
45550
- if (args.author !== void 0 && res.author === void 0 && res.unavailable === void 0) {
45551
- return {
45552
- decisions: [],
45553
- unavailable: "--author requires a newer Primitive backend (no author echo in response); retry without --author for the team-wide feed"
45554
- };
45555
- }
45556
- const result = { decisions: res.decisions };
45557
- if (res.viewerHasDecisions !== void 0) {
45558
- result.viewerHasDecisions = res.viewerHasDecisions;
45559
- }
45560
- if (res.author !== void 0) {
45561
- result.author = res.author;
45562
- }
45563
- if (res.authorHasDecisions !== void 0) {
45564
- result.authorHasDecisions = res.authorHasDecisions;
45565
- }
45566
- if (res.windowTotal !== void 0) {
45567
- result.windowTotal = res.windowTotal;
45568
- }
45569
- if (res.windowTotalCapped !== void 0) {
45570
- result.windowTotalCapped = res.windowTotalCapped;
45571
- }
45572
- if (res.unavailable !== void 0) {
45573
- result.unavailable = res.unavailable;
45574
- }
45575
- return result;
45576
- } catch (err) {
45577
- const detail = err instanceof Error ? err.message : String(err);
45578
- return { decisions: [], unavailable: `recent feed failed: ${detail}` };
45579
- }
45580
- }
45581
- var SHORT_ID_PREFIX = "dec_";
45582
- var ZERO_PAD_TWO = 2;
45583
- function pad2(n) {
45584
- return n.toString().padStart(ZERO_PAD_TWO, "0");
45585
- }
45586
- function formatClock(ms) {
45587
- const d = new Date(ms);
45588
- return `${pad2(d.getHours())}:${pad2(d.getMinutes())}`;
45589
- }
45590
- function authorLabel(row) {
45591
- if (!row.authorIsSelf) {
45592
- return terminalSafeLine(row.authorName);
45593
- }
45594
- switch (row.producerKind) {
45595
- case "claude_code":
45596
- return "Your Claude Code";
45597
- case "codex":
45598
- return "Your Codex";
45599
- case "cursor":
45600
- return "Your Cursor";
45601
- case "hermes":
45602
- return "Your Hermes";
45603
- case "chat":
45604
- return "Your chat";
45605
- case "spec_edit":
45606
- return "Your spec edit";
45607
- case "cli":
45608
- return "Your CLI";
45609
- default:
45610
- return `Your ${terminalSafeLine(row.authorName)}`;
45611
- }
45612
- }
45613
- var AUTHOR_WIDTH = 18;
45614
- var AREA_WIDTH = 12;
45615
- function padRight(s, width) {
45616
- return s.length >= width ? `${s.slice(0, width - 1)} ` : s.padEnd(width, " ");
45617
- }
45618
- function formatRecentRow(row) {
45619
- const clock = formatClock(row.classifiedAt);
45620
- const author = padRight(authorLabel(row), AUTHOR_WIDTH);
45621
- const area = terminalSafeLine(row.area ?? "");
45622
- const areaText = area ? `\u2022 ${area}` : "\u2022";
45623
- const areaPlain = padRight(areaText, AREA_WIDTH);
45624
- const areaCol = area ? areaPlain.replace("\u2022", color("\u2022", colorForArea(area))) : areaPlain;
45625
- return ` ${clock} ${author}${areaCol}${terminalSafeLine(row.intent)}`;
45626
- }
45627
- var RECENT_LIMIT_CEILING = 100;
45628
- function remainingHint(result) {
45629
- const { windowTotal } = result;
45630
- if (windowTotal === void 0 || windowTotal <= result.decisions.length) {
45631
- return;
45632
- }
45633
- const remaining = windowTotal - result.decisions.length;
45634
- const remainingText = result.windowTotalCapped === true ? `${remaining}+` : String(remaining);
45635
- if (windowTotal <= RECENT_LIMIT_CEILING) {
45636
- return `${remainingText} more not shown \u2014 re-run with --limit ${windowTotal} to see all`;
45637
- }
45638
- return `${remainingText} more not shown \u2014 re-run with --limit ${RECENT_LIMIT_CEILING} for the newest ${RECENT_LIMIT_CEILING} (the full set exceeds the feed cap)`;
45639
- }
45640
- function formatRecentHuman(result) {
45641
- if (result.unavailable !== void 0) {
45642
- return `[prim] recent \xB7 feed not verified \u2014 ${terminalSafeLine(result.unavailable)}`;
45643
- }
45644
- if (result.author !== void 0 && result.decisions.length === 0) {
45645
- if (result.authorHasDecisions === true) {
45646
- return `[prim] recent \xB7 ${terminalSafeLine(result.author.name)} \xB7 0 decisions in this window (older decisions exist \u2014 widen --since)`;
45647
- }
45648
- if (result.authorHasDecisions === false) {
45649
- return `[prim] recent \xB7 ${terminalSafeLine(result.author.name)} \xB7 no feed-visible decisions yet (if unexpected, check prim setup/doctor on their machine and the repo they work in)`;
45650
- }
45651
- return `[prim] recent \xB7 ${terminalSafeLine(result.author.name)} \xB7 0 decisions`;
45652
- }
45653
- const label2 = result.author === void 0 ? "recent" : `recent \xB7 ${terminalSafeLine(result.author.name)}`;
45654
- if (result.decisions.length === 0) {
45655
- return "[prim] recent \xB7 0 decisions";
45656
- }
45657
- const header = `[prim] ${label2} \xB7 ${String(result.decisions.length)} decision(s)`;
45658
- const hint = remainingHint(result);
45659
- const lines = [hint === void 0 ? header : `${header} \xB7 ${hint}`];
45660
- for (const row of result.decisions) {
45661
- lines.push(formatRecentRow(row));
45662
- }
45663
- return lines.join("\n");
45664
- }
45665
- function formatRecentJson(result) {
45666
- return JSON.stringify(result, null, 2);
45667
- }
45668
- function renderIdentifier(row) {
45669
- const shortId = terminalSafeLine(row.shortId ?? "");
45670
- if (shortId) {
45671
- return `${SHORT_ID_PREFIX}${shortId}`;
45672
- }
45673
- return terminalSafeLine(row.id);
45674
- }
45675
-
45676
46097
  // src/decisions/confirm.ts
45677
46098
  var CONFIRM_TIMEOUT_MS = 1e4;
45678
46099
  var defaultDeps3 = { getClient };
45679
46100
  var NOT_FOUND_RE2 = /not found/i;
45680
- var AMBIGUOUS_RE = /ambiguous/i;
46101
+ var AMBIGUOUS_RE = /ambiguous|Decision identity unavailable; retry after identity repair/i;
45681
46102
  var NOT_AUTHOR_RE = /author/i;
45682
46103
  var ConfirmNotFoundError = class extends Error {
45683
- constructor(idOrShortId) {
45684
- super(`Decision not found: ${idOrShortId}`);
46104
+ constructor(_idOrShortId) {
46105
+ super("Decision not found");
45685
46106
  this.name = "ConfirmNotFoundError";
45686
46107
  }
45687
46108
  };
@@ -45739,7 +46160,7 @@ function formatConfirmHuman(result) {
45739
46160
  return `[prim] ${id} has no pending confirmation request \u2014 nothing to acknowledge.`;
45740
46161
  }
45741
46162
  case "ambiguous":
45742
- return `[prim] shortId "${request2.idOrShortId}" is ambiguous in this organization \u2014 retry with the full decision id.`;
46163
+ return "[prim] Decision identity unavailable; retry after identity repair.";
45743
46164
  default:
45744
46165
  return "[prim] only the decision's author can respond to its confirmation prompt.";
45745
46166
  }
@@ -45908,7 +46329,7 @@ var PAST_PARTICIPLE = {
45908
46329
  };
45909
46330
  var ORG_UNBOUND_MESSAGE = "CLI token is not bound to an organization";
45910
46331
  var NOT_AUTHOR_MESSAGE = "Only the decision's author can perform this action";
45911
- var AMBIGUOUS_MESSAGE = "shortId is ambiguous in this organization; retry with the full decision id";
46332
+ var AMBIGUOUS_MESSAGE = "Decision identity unavailable; retry after identity repair";
45912
46333
  var DECISION_NOT_FOUND_MESSAGE = "Decision not found";
45913
46334
  var REPLACEMENT_NOT_FOUND_MESSAGE = "Replacement decision not found";
45914
46335
  var SELF_REPLACEMENT_MESSAGE = "A decision cannot supersede itself";
@@ -45989,7 +46410,7 @@ function classifyHttpError2(error) {
45989
46410
  if (error.status === 403 && message === NOT_AUTHOR_MESSAGE) {
45990
46411
  return failure2("not_author", DECISION_LIFECYCLE_EXIT.rejected, error.status);
45991
46412
  }
45992
- if (error.status === 409 && message === AMBIGUOUS_MESSAGE) {
46413
+ if (error.status === 409 && (message === AMBIGUOUS_MESSAGE || message === "shortId is ambiguous in this organization; retry with the full decision id")) {
45993
46414
  return failure2("ambiguous_identifier", DECISION_LIFECYCLE_EXIT.rejected, error.status);
45994
46415
  }
45995
46416
  if (error.status === 409 && IMMUTABLE_MESSAGE.test(message)) {
@@ -46037,7 +46458,7 @@ function formatFailureHuman(operation, result) {
46037
46458
  case "not_author":
46038
46459
  return `[prim] ${verb} rejected: only the Decision's author can ${verb} it.`;
46039
46460
  case "ambiguous_identifier":
46040
- return `[prim] ${verb} rejected: a Decision identifier is ambiguous; retry with full Decision IDs.`;
46461
+ return `[prim] ${verb} rejected: Decision identity unavailable; retry after identity repair.`;
46041
46462
  case "immutable":
46042
46463
  return `[prim] ${verb} rejected: this Decision is immutable; supersede it to change it.`;
46043
46464
  case "illegal_transition":
@@ -46137,7 +46558,7 @@ function supersedeDecision(id, by, dependencies = defaultDependencies4) {
46137
46558
  var RELATE_TIMEOUT_MS = 1e4;
46138
46559
  var defaultDeps5 = { getClient };
46139
46560
  var NOT_FOUND_RE3 = /not found/i;
46140
- var AMBIGUOUS_RE2 = /ambiguous/i;
46561
+ var AMBIGUOUS_RE2 = /ambiguous|Decision identity unavailable; retry after identity repair/i;
46141
46562
  var CYCLE_RE = /cycle/i;
46142
46563
  var LinkNotFoundError = class extends Error {
46143
46564
  constructor(which) {
@@ -46201,8 +46622,7 @@ function formatRelateHuman(result) {
46201
46622
  case "would_cycle":
46202
46623
  return `[prim] refusing to link \u2014 ${outcome.detail}.`;
46203
46624
  default: {
46204
- const typed = outcome.which === "parent" ? request2.parent : request2.child;
46205
- return `[prim] the ${outcome.which} id "${typed}" is ambiguous in this organization \u2014 retry with the full decision id.`;
46625
+ return `[prim] the ${outcome.which} Decision identity is unavailable; retry after identity repair.`;
46206
46626
  }
46207
46627
  }
46208
46628
  }
@@ -46917,8 +47337,8 @@ function colorStatus(status) {
46917
47337
  var SHOW_TIMEOUT_MS = 1e4;
46918
47338
  var defaultDeps7 = { getClient };
46919
47339
  var DecisionNotFoundError = class extends Error {
46920
- constructor(idOrShortId) {
46921
- super(`Decision not found: ${idOrShortId}`);
47340
+ constructor(_idOrShortId) {
47341
+ super("Decision not found");
46922
47342
  this.name = "DecisionNotFoundError";
46923
47343
  }
46924
47344
  };
@@ -57845,7 +58265,7 @@ function formatExpiresIn(expiresAt) {
57845
58265
  return `${minutes}m${seconds.toString().padStart(2, "0")}s`;
57846
58266
  }
57847
58267
  function renderDecisionIdentifier(short, id) {
57848
- return short ? `dec_${short}` : id;
58268
+ return renderIdentifier({ id, shortId: short });
57849
58269
  }
57850
58270
  function isDomainRejection(err) {
57851
58271
  return err instanceof HttpError && err.status >= HTTP_CLIENT_ERROR_MIN && err.status < HTTP_SERVER_ERROR_MIN;