@primitive.ai/prim 0.1.0-alpha.93 → 0.1.0-alpha.96

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 (41) hide show
  1. package/README.md +57 -12
  2. package/SKILL.md +5 -2
  3. package/dist/{chunk-UKUAAAXE.js → chunk-27ADT6FQ.js} +2 -2
  4. package/dist/{chunk-OTHKG76J.js → chunk-35FMRWJH.js} +1 -1
  5. package/dist/{chunk-DXJQR4QI.js → chunk-4GHANPWQ.js} +2 -2
  6. package/dist/{chunk-DCJN6LZH.js → chunk-7KABYYWG.js} +747 -430
  7. package/dist/{chunk-LFFLHSQO.js → chunk-CU7RW7XU.js} +63 -6
  8. package/dist/{chunk-H4UNYFUC.js → chunk-DHOQGHKQ.js} +184 -1
  9. package/dist/{chunk-2GP5UFV7.js → chunk-DWRSEC34.js} +5 -3
  10. package/dist/{chunk-36TWVNBE.js → chunk-FVDBULGZ.js} +9 -11
  11. package/dist/{chunk-G2VMA2QO.js → chunk-LY6NJ7KL.js} +6 -4
  12. package/dist/{chunk-ZB4F75SZ.js → chunk-MXVCP33E.js} +5 -1
  13. package/dist/{chunk-TYAHC25F.js → chunk-QCBB5HFX.js} +1 -1
  14. package/dist/{chunk-C3VAA5CG.js → chunk-RK4ZS3HG.js} +2 -2
  15. package/dist/{chunk-ZU563PQI.js → chunk-ROLYLXJS.js} +2 -2
  16. package/dist/{chunk-OH3EZXYX.js → chunk-UO2U6IKF.js} +1 -1
  17. package/dist/{chunk-K7D2EYBS.js → chunk-URLLSALP.js} +2 -2
  18. package/dist/chunk-XEDJ5N3M.js +177 -0
  19. package/dist/{chunk-X64HTHUF.js → chunk-Y5W4TZM7.js} +202 -10
  20. package/dist/{chunk-ICM2XCXS.js → chunk-YYE2NLWX.js} +2 -2
  21. package/dist/{chunk-DSWT6BCC.js → chunk-Z6NPNLOT.js} +825 -665
  22. package/dist/daemon/server.js +836 -540
  23. package/dist/hook-runtime/daemon/server.js +836 -540
  24. package/dist/hook-runtime/hooks/post-commit.js +978 -566
  25. package/dist/hook-runtime/hooks/post-rewrite.js +836 -540
  26. package/dist/hook-runtime/hooks/post-tool-use.js +1215 -796
  27. package/dist/hook-runtime/hooks/pre-tool-use.js +2100 -1741
  28. package/dist/hook-runtime/hooks/prim-hook.js +1312 -861
  29. package/dist/hook-runtime/hooks/session-end.js +232 -134
  30. package/dist/hook-runtime/hooks/session-start.js +1799 -935
  31. package/dist/hook-runtime/index.js +3628 -2461
  32. package/dist/hooks/post-commit.js +14 -10
  33. package/dist/hooks/post-rewrite.js +10 -10
  34. package/dist/hooks/post-tool-use.js +20 -20
  35. package/dist/hooks/pre-commit.js +4 -4
  36. package/dist/hooks/pre-tool-use.js +29 -17
  37. package/dist/hooks/prim-hook.js +22 -18
  38. package/dist/hooks/session-end.js +11 -5
  39. package/dist/hooks/session-start.js +46 -28
  40. package/dist/index.js +623 -390
  41. package/package.json +1 -1
@@ -52,9 +52,9 @@ var require_ucs2length = __commonJS({
52
52
  });
53
53
 
54
54
  // src/hooks/post-commit.ts
55
- import { execFileSync as execFileSync4, spawn } from "child_process";
56
- import { lstatSync as lstatSync3, readFileSync as readFileSync10 } from "fs";
57
- import { basename as basename3, dirname as dirname9, isAbsolute as isAbsolute4, join as join11 } from "path";
55
+ import { execFileSync as execFileSync5, spawn } from "child_process";
56
+ import { lstatSync as lstatSync3, readFileSync as readFileSync11 } from "fs";
57
+ import { basename as basename3, dirname as dirname10, isAbsolute as isAbsolute4, join as join12 } from "path";
58
58
  import { fileURLToPath } from "url";
59
59
 
60
60
  // src/binding.ts
@@ -401,6 +401,69 @@ import {
401
401
  writeFileSync
402
402
  } from "fs";
403
403
  import { dirname as dirname2 } from "path";
404
+ var DEFAULT_FILE_MODE = 438;
405
+ function syncDirectory(path) {
406
+ const fd = openSync(path, constants.O_RDONLY);
407
+ try {
408
+ fsyncSync(fd);
409
+ } finally {
410
+ closeSync(fd);
411
+ }
412
+ }
413
+ function syncCreatedParentChain(firstCreatedParent, parent) {
414
+ const createdDirectories = [];
415
+ let current = parent;
416
+ while (current !== firstCreatedParent) {
417
+ createdDirectories.push(current);
418
+ const next = dirname2(current);
419
+ if (next === current) {
420
+ throw new Error("recursive mkdir returned a path outside the target parent chain");
421
+ }
422
+ current = next;
423
+ }
424
+ createdDirectories.push(firstCreatedParent);
425
+ syncDirectory(dirname2(firstCreatedParent));
426
+ for (const directory of createdDirectories.reverse().slice(0, -1)) {
427
+ syncDirectory(directory);
428
+ }
429
+ }
430
+ function ensureDurableDirectory(path, mode) {
431
+ const firstCreatedParent = mkdirSync(path, { recursive: true, mode });
432
+ if (firstCreatedParent) {
433
+ syncCreatedParentChain(firstCreatedParent, path);
434
+ }
435
+ }
436
+ function atomicWriteFile(target, content, options = {}) {
437
+ const parent = dirname2(target);
438
+ if (options.ensureParent) {
439
+ ensureDurableDirectory(parent);
440
+ }
441
+ const temporaryPath = `${target}.${randomUUID()}.tmp`;
442
+ let temporaryCreated = false;
443
+ try {
444
+ const flags = constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW;
445
+ const fd = openSync(temporaryPath, flags, options.mode ?? DEFAULT_FILE_MODE);
446
+ temporaryCreated = true;
447
+ try {
448
+ if (options.mode !== void 0) fchmodSync(fd, options.mode);
449
+ writeFileSync(fd, content);
450
+ fsyncSync(fd);
451
+ } finally {
452
+ closeSync(fd);
453
+ }
454
+ options.validate?.(temporaryPath);
455
+ renameSync(temporaryPath, target);
456
+ syncDirectory(parent);
457
+ } catch (error) {
458
+ if (temporaryCreated) {
459
+ try {
460
+ rmSync(temporaryPath, { force: true });
461
+ } catch {
462
+ }
463
+ }
464
+ throw error;
465
+ }
466
+ }
404
467
 
405
468
  // src/lib/file-lock.ts
406
469
  import { randomBytes } from "crypto";
@@ -11723,7 +11786,6 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
11723
11786
  return errors === 0;
11724
11787
  }
11725
11788
  validate45.evaluated = { "dynamicProps": true, "dynamicItems": false };
11726
- var schema83 = { "anyOf": [{ "type": "object", "properties": { "error": { "type": "string", "const": "Unauthorized" } }, "required": ["error"], "additionalProperties": false }, { "type": "object", "properties": { "error": { "type": "string", "const": "interactive_workos_authority_required" } }, "required": ["error"], "additionalProperties": false }, { "type": "object", "properties": { "error": { "type": "string", "const": "feature_disabled" }, "feature": { "type": "string", "const": "github-connect" } }, "required": ["error", "feature"], "additionalProperties": false }, { "type": "object", "properties": { "error": { "type": "string", "enum": ["github_connect_unavailable", "feature_check_unavailable"] }, "feature": { "type": "string", "const": "github-connect" } }, "required": ["error", "feature"], "additionalProperties": false }, { "type": "object", "properties": { "error": { "type": "string", "const": "WorkOS identity authority is temporarily unavailable" } }, "required": ["error"], "additionalProperties": false }, { "type": "object", "properties": { "error": { "type": "string", "const": "github_install_intent_conflict" } }, "required": ["error"], "additionalProperties": false }, { "type": "object", "properties": { "error": { "type": "string", "const": "github_install_intent_rate_limited" }, "retryAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["error", "retryAt"], "additionalProperties": false }] };
11727
11789
  function validate46(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
11728
11790
  ;
11729
11791
  let vErrors = null;
@@ -11873,7 +11935,7 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11873
11935
  if (errors === _errs12) {
11874
11936
  if (data && typeof data == "object" && !Array.isArray(data)) {
11875
11937
  let missing2;
11876
- if (data.error === void 0 && (missing2 = "error") || data.feature === void 0 && (missing2 = "feature")) {
11938
+ if (data.error === void 0 && (missing2 = "error")) {
11877
11939
  const err10 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/2/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" };
11878
11940
  if (vErrors === null) {
11879
11941
  vErrors = [err10];
@@ -11884,7 +11946,7 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11884
11946
  } else {
11885
11947
  const _errs14 = errors;
11886
11948
  for (const key2 in data) {
11887
- if (!(key2 === "error" || key2 === "feature")) {
11949
+ if (!(key2 === "error")) {
11888
11950
  const err11 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/2/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
11889
11951
  if (vErrors === null) {
11890
11952
  vErrors = [err11];
@@ -11898,7 +11960,6 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11898
11960
  if (_errs14 === errors) {
11899
11961
  if (data.error !== void 0) {
11900
11962
  let data2 = data.error;
11901
- const _errs15 = errors;
11902
11963
  if (typeof data2 !== "string") {
11903
11964
  const err12 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/2/properties/error/type", keyword: "type", params: { type: "string" }, message: "must be string" };
11904
11965
  if (vErrors === null) {
@@ -11908,8 +11969,8 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11908
11969
  }
11909
11970
  errors++;
11910
11971
  }
11911
- if ("feature_disabled" !== data2) {
11912
- const err13 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/2/properties/error/const", keyword: "const", params: { allowedValue: "feature_disabled" }, message: "must be equal to constant" };
11972
+ if ("github_connect_unavailable" !== data2) {
11973
+ const err13 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/2/properties/error/const", keyword: "const", params: { allowedValue: "github_connect_unavailable" }, message: "must be equal to constant" };
11913
11974
  if (vErrors === null) {
11914
11975
  vErrors = [err13];
11915
11976
  } else {
@@ -11917,45 +11978,15 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11917
11978
  }
11918
11979
  errors++;
11919
11980
  }
11920
- var valid4 = _errs15 === errors;
11921
- } else {
11922
- var valid4 = true;
11923
- }
11924
- if (valid4) {
11925
- if (data.feature !== void 0) {
11926
- let data3 = data.feature;
11927
- const _errs17 = errors;
11928
- if (typeof data3 !== "string") {
11929
- const err14 = { instancePath: instancePath + "/feature", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/2/properties/feature/type", keyword: "type", params: { type: "string" }, message: "must be string" };
11930
- if (vErrors === null) {
11931
- vErrors = [err14];
11932
- } else {
11933
- vErrors.push(err14);
11934
- }
11935
- errors++;
11936
- }
11937
- if ("github-connect" !== data3) {
11938
- const err15 = { instancePath: instancePath + "/feature", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/2/properties/feature/const", keyword: "const", params: { allowedValue: "github-connect" }, message: "must be equal to constant" };
11939
- if (vErrors === null) {
11940
- vErrors = [err15];
11941
- } else {
11942
- vErrors.push(err15);
11943
- }
11944
- errors++;
11945
- }
11946
- var valid4 = _errs17 === errors;
11947
- } else {
11948
- var valid4 = true;
11949
- }
11950
11981
  }
11951
11982
  }
11952
11983
  }
11953
11984
  } else {
11954
- const err16 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
11985
+ const err14 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
11955
11986
  if (vErrors === null) {
11956
- vErrors = [err16];
11987
+ vErrors = [err14];
11957
11988
  } else {
11958
- vErrors.push(err16);
11989
+ vErrors.push(err14);
11959
11990
  }
11960
11991
  errors++;
11961
11992
  }
@@ -11967,148 +11998,117 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11967
11998
  props0 = true;
11968
11999
  }
11969
12000
  }
11970
- const _errs19 = errors;
11971
- if (errors === _errs19) {
12001
+ const _errs17 = errors;
12002
+ if (errors === _errs17) {
11972
12003
  if (data && typeof data == "object" && !Array.isArray(data)) {
11973
12004
  let missing3;
11974
- if (data.error === void 0 && (missing3 = "error") || data.feature === void 0 && (missing3 = "feature")) {
11975
- const err17 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/3/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
12005
+ if (data.error === void 0 && (missing3 = "error")) {
12006
+ const err15 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/3/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
11976
12007
  if (vErrors === null) {
11977
- vErrors = [err17];
12008
+ vErrors = [err15];
11978
12009
  } else {
11979
- vErrors.push(err17);
12010
+ vErrors.push(err15);
11980
12011
  }
11981
12012
  errors++;
11982
12013
  } else {
11983
- const _errs21 = errors;
12014
+ const _errs19 = errors;
11984
12015
  for (const key3 in data) {
11985
- if (!(key3 === "error" || key3 === "feature")) {
11986
- const err18 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/3/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
12016
+ if (!(key3 === "error")) {
12017
+ const err16 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/3/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
11987
12018
  if (vErrors === null) {
11988
- vErrors = [err18];
12019
+ vErrors = [err16];
11989
12020
  } else {
11990
- vErrors.push(err18);
12021
+ vErrors.push(err16);
11991
12022
  }
11992
12023
  errors++;
11993
12024
  break;
11994
12025
  }
11995
12026
  }
11996
- if (_errs21 === errors) {
12027
+ if (_errs19 === errors) {
11997
12028
  if (data.error !== void 0) {
11998
- let data4 = data.error;
11999
- const _errs22 = errors;
12000
- if (typeof data4 !== "string") {
12001
- const err19 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/3/properties/error/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12029
+ let data3 = data.error;
12030
+ if (typeof data3 !== "string") {
12031
+ const err17 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/3/properties/error/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12002
12032
  if (vErrors === null) {
12003
- vErrors = [err19];
12033
+ vErrors = [err17];
12004
12034
  } else {
12005
- vErrors.push(err19);
12035
+ vErrors.push(err17);
12006
12036
  }
12007
12037
  errors++;
12008
12038
  }
12009
- if (!(data4 === "github_connect_unavailable" || data4 === "feature_check_unavailable")) {
12010
- const err20 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/3/properties/error/enum", keyword: "enum", params: { allowedValues: schema83.anyOf[3].properties.error.enum }, message: "must be equal to one of the allowed values" };
12039
+ if ("WorkOS identity authority is temporarily unavailable" !== data3) {
12040
+ const err18 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/3/properties/error/const", keyword: "const", params: { allowedValue: "WorkOS identity authority is temporarily unavailable" }, message: "must be equal to constant" };
12011
12041
  if (vErrors === null) {
12012
- vErrors = [err20];
12042
+ vErrors = [err18];
12013
12043
  } else {
12014
- vErrors.push(err20);
12044
+ vErrors.push(err18);
12015
12045
  }
12016
12046
  errors++;
12017
12047
  }
12018
- var valid5 = _errs22 === errors;
12019
- } else {
12020
- var valid5 = true;
12021
- }
12022
- if (valid5) {
12023
- if (data.feature !== void 0) {
12024
- let data5 = data.feature;
12025
- const _errs24 = errors;
12026
- if (typeof data5 !== "string") {
12027
- const err21 = { instancePath: instancePath + "/feature", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/3/properties/feature/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12028
- if (vErrors === null) {
12029
- vErrors = [err21];
12030
- } else {
12031
- vErrors.push(err21);
12032
- }
12033
- errors++;
12034
- }
12035
- if ("github-connect" !== data5) {
12036
- const err22 = { instancePath: instancePath + "/feature", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/3/properties/feature/const", keyword: "const", params: { allowedValue: "github-connect" }, message: "must be equal to constant" };
12037
- if (vErrors === null) {
12038
- vErrors = [err22];
12039
- } else {
12040
- vErrors.push(err22);
12041
- }
12042
- errors++;
12043
- }
12044
- var valid5 = _errs24 === errors;
12045
- } else {
12046
- var valid5 = true;
12047
- }
12048
12048
  }
12049
12049
  }
12050
12050
  }
12051
12051
  } else {
12052
- const err23 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/3/type", keyword: "type", params: { type: "object" }, message: "must be object" };
12052
+ const err19 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/3/type", keyword: "type", params: { type: "object" }, message: "must be object" };
12053
12053
  if (vErrors === null) {
12054
- vErrors = [err23];
12054
+ vErrors = [err19];
12055
12055
  } else {
12056
- vErrors.push(err23);
12056
+ vErrors.push(err19);
12057
12057
  }
12058
12058
  errors++;
12059
12059
  }
12060
12060
  }
12061
- var _valid0 = _errs19 === errors;
12061
+ var _valid0 = _errs17 === errors;
12062
12062
  valid1 = valid1 || _valid0;
12063
12063
  if (_valid0) {
12064
12064
  if (props0 !== true) {
12065
12065
  props0 = true;
12066
12066
  }
12067
12067
  }
12068
- const _errs26 = errors;
12069
- if (errors === _errs26) {
12068
+ const _errs22 = errors;
12069
+ if (errors === _errs22) {
12070
12070
  if (data && typeof data == "object" && !Array.isArray(data)) {
12071
12071
  let missing4;
12072
12072
  if (data.error === void 0 && (missing4 = "error")) {
12073
- const err24 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/4/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" };
12073
+ const err20 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/4/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" };
12074
12074
  if (vErrors === null) {
12075
- vErrors = [err24];
12075
+ vErrors = [err20];
12076
12076
  } else {
12077
- vErrors.push(err24);
12077
+ vErrors.push(err20);
12078
12078
  }
12079
12079
  errors++;
12080
12080
  } else {
12081
- const _errs28 = errors;
12081
+ const _errs24 = errors;
12082
12082
  for (const key4 in data) {
12083
12083
  if (!(key4 === "error")) {
12084
- const err25 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/4/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
12084
+ const err21 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/4/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
12085
12085
  if (vErrors === null) {
12086
- vErrors = [err25];
12086
+ vErrors = [err21];
12087
12087
  } else {
12088
- vErrors.push(err25);
12088
+ vErrors.push(err21);
12089
12089
  }
12090
12090
  errors++;
12091
12091
  break;
12092
12092
  }
12093
12093
  }
12094
- if (_errs28 === errors) {
12094
+ if (_errs24 === errors) {
12095
12095
  if (data.error !== void 0) {
12096
- let data6 = data.error;
12097
- if (typeof data6 !== "string") {
12098
- const err26 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/4/properties/error/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12096
+ let data4 = data.error;
12097
+ if (typeof data4 !== "string") {
12098
+ const err22 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/4/properties/error/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12099
12099
  if (vErrors === null) {
12100
- vErrors = [err26];
12100
+ vErrors = [err22];
12101
12101
  } else {
12102
- vErrors.push(err26);
12102
+ vErrors.push(err22);
12103
12103
  }
12104
12104
  errors++;
12105
12105
  }
12106
- if ("WorkOS identity authority is temporarily unavailable" !== data6) {
12107
- const err27 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/4/properties/error/const", keyword: "const", params: { allowedValue: "WorkOS identity authority is temporarily unavailable" }, message: "must be equal to constant" };
12106
+ if ("github_install_intent_conflict" !== data4) {
12107
+ const err23 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/4/properties/error/const", keyword: "const", params: { allowedValue: "github_install_intent_conflict" }, message: "must be equal to constant" };
12108
12108
  if (vErrors === null) {
12109
- vErrors = [err27];
12109
+ vErrors = [err23];
12110
12110
  } else {
12111
- vErrors.push(err27);
12111
+ vErrors.push(err23);
12112
12112
  }
12113
12113
  errors++;
12114
12114
  }
@@ -12116,195 +12116,128 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
12116
12116
  }
12117
12117
  }
12118
12118
  } else {
12119
- const err28 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/4/type", keyword: "type", params: { type: "object" }, message: "must be object" };
12119
+ const err24 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/4/type", keyword: "type", params: { type: "object" }, message: "must be object" };
12120
12120
  if (vErrors === null) {
12121
- vErrors = [err28];
12121
+ vErrors = [err24];
12122
12122
  } else {
12123
- vErrors.push(err28);
12123
+ vErrors.push(err24);
12124
12124
  }
12125
12125
  errors++;
12126
12126
  }
12127
12127
  }
12128
- var _valid0 = _errs26 === errors;
12128
+ var _valid0 = _errs22 === errors;
12129
12129
  valid1 = valid1 || _valid0;
12130
12130
  if (_valid0) {
12131
12131
  if (props0 !== true) {
12132
12132
  props0 = true;
12133
12133
  }
12134
12134
  }
12135
- const _errs31 = errors;
12136
- if (errors === _errs31) {
12135
+ const _errs27 = errors;
12136
+ if (errors === _errs27) {
12137
12137
  if (data && typeof data == "object" && !Array.isArray(data)) {
12138
12138
  let missing5;
12139
- if (data.error === void 0 && (missing5 = "error")) {
12140
- const err29 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/required", keyword: "required", params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'" };
12139
+ if (data.error === void 0 && (missing5 = "error") || data.retryAt === void 0 && (missing5 = "retryAt")) {
12140
+ const err25 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/required", keyword: "required", params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'" };
12141
12141
  if (vErrors === null) {
12142
- vErrors = [err29];
12142
+ vErrors = [err25];
12143
12143
  } else {
12144
- vErrors.push(err29);
12144
+ vErrors.push(err25);
12145
12145
  }
12146
12146
  errors++;
12147
12147
  } else {
12148
- const _errs33 = errors;
12148
+ const _errs29 = errors;
12149
12149
  for (const key5 in data) {
12150
- if (!(key5 === "error")) {
12151
- const err30 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" };
12152
- if (vErrors === null) {
12153
- vErrors = [err30];
12154
- } else {
12155
- vErrors.push(err30);
12156
- }
12157
- errors++;
12158
- break;
12159
- }
12160
- }
12161
- if (_errs33 === errors) {
12162
- if (data.error !== void 0) {
12163
- let data7 = data.error;
12164
- if (typeof data7 !== "string") {
12165
- const err31 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/properties/error/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12166
- if (vErrors === null) {
12167
- vErrors = [err31];
12168
- } else {
12169
- vErrors.push(err31);
12170
- }
12171
- errors++;
12172
- }
12173
- if ("github_install_intent_conflict" !== data7) {
12174
- const err32 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/properties/error/const", keyword: "const", params: { allowedValue: "github_install_intent_conflict" }, message: "must be equal to constant" };
12175
- if (vErrors === null) {
12176
- vErrors = [err32];
12177
- } else {
12178
- vErrors.push(err32);
12179
- }
12180
- errors++;
12181
- }
12182
- }
12183
- }
12184
- }
12185
- } else {
12186
- const err33 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/type", keyword: "type", params: { type: "object" }, message: "must be object" };
12187
- if (vErrors === null) {
12188
- vErrors = [err33];
12189
- } else {
12190
- vErrors.push(err33);
12191
- }
12192
- errors++;
12193
- }
12194
- }
12195
- var _valid0 = _errs31 === errors;
12196
- valid1 = valid1 || _valid0;
12197
- if (_valid0) {
12198
- if (props0 !== true) {
12199
- props0 = true;
12200
- }
12201
- }
12202
- const _errs36 = errors;
12203
- if (errors === _errs36) {
12204
- if (data && typeof data == "object" && !Array.isArray(data)) {
12205
- let missing6;
12206
- if (data.error === void 0 && (missing6 = "error") || data.retryAt === void 0 && (missing6 = "retryAt")) {
12207
- const err34 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/6/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" };
12208
- if (vErrors === null) {
12209
- vErrors = [err34];
12210
- } else {
12211
- vErrors.push(err34);
12212
- }
12213
- errors++;
12214
- } else {
12215
- const _errs38 = errors;
12216
- for (const key6 in data) {
12217
- if (!(key6 === "error" || key6 === "retryAt")) {
12218
- const err35 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/6/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key6 }, message: "must NOT have additional properties" };
12150
+ if (!(key5 === "error" || key5 === "retryAt")) {
12151
+ const err26 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" };
12219
12152
  if (vErrors === null) {
12220
- vErrors = [err35];
12153
+ vErrors = [err26];
12221
12154
  } else {
12222
- vErrors.push(err35);
12155
+ vErrors.push(err26);
12223
12156
  }
12224
12157
  errors++;
12225
12158
  break;
12226
12159
  }
12227
12160
  }
12228
- if (_errs38 === errors) {
12161
+ if (_errs29 === errors) {
12229
12162
  if (data.error !== void 0) {
12230
- let data8 = data.error;
12231
- const _errs39 = errors;
12232
- if (typeof data8 !== "string") {
12233
- const err36 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/6/properties/error/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12163
+ let data5 = data.error;
12164
+ const _errs30 = errors;
12165
+ if (typeof data5 !== "string") {
12166
+ const err27 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/properties/error/type", keyword: "type", params: { type: "string" }, message: "must be string" };
12234
12167
  if (vErrors === null) {
12235
- vErrors = [err36];
12168
+ vErrors = [err27];
12236
12169
  } else {
12237
- vErrors.push(err36);
12170
+ vErrors.push(err27);
12238
12171
  }
12239
12172
  errors++;
12240
12173
  }
12241
- if ("github_install_intent_rate_limited" !== data8) {
12242
- const err37 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/6/properties/error/const", keyword: "const", params: { allowedValue: "github_install_intent_rate_limited" }, message: "must be equal to constant" };
12174
+ if ("github_install_intent_rate_limited" !== data5) {
12175
+ const err28 = { instancePath: instancePath + "/error", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/properties/error/const", keyword: "const", params: { allowedValue: "github_install_intent_rate_limited" }, message: "must be equal to constant" };
12243
12176
  if (vErrors === null) {
12244
- vErrors = [err37];
12177
+ vErrors = [err28];
12245
12178
  } else {
12246
- vErrors.push(err37);
12179
+ vErrors.push(err28);
12247
12180
  }
12248
12181
  errors++;
12249
12182
  }
12250
- var valid8 = _errs39 === errors;
12183
+ var valid7 = _errs30 === errors;
12251
12184
  } else {
12252
- var valid8 = true;
12185
+ var valid7 = true;
12253
12186
  }
12254
- if (valid8) {
12187
+ if (valid7) {
12255
12188
  if (data.retryAt !== void 0) {
12256
- let data9 = data.retryAt;
12257
- const _errs41 = errors;
12258
- if (!(typeof data9 == "number" && (!(data9 % 1) && !isNaN(data9)) && isFinite(data9))) {
12259
- const err38 = { instancePath: instancePath + "/retryAt", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/6/properties/retryAt/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
12189
+ let data6 = data.retryAt;
12190
+ const _errs32 = errors;
12191
+ if (!(typeof data6 == "number" && (!(data6 % 1) && !isNaN(data6)) && isFinite(data6))) {
12192
+ const err29 = { instancePath: instancePath + "/retryAt", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/properties/retryAt/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
12260
12193
  if (vErrors === null) {
12261
- vErrors = [err38];
12194
+ vErrors = [err29];
12262
12195
  } else {
12263
- vErrors.push(err38);
12196
+ vErrors.push(err29);
12264
12197
  }
12265
12198
  errors++;
12266
12199
  }
12267
- if (errors === _errs41) {
12268
- if (typeof data9 == "number" && isFinite(data9)) {
12269
- if (data9 > 9007199254740991 || isNaN(data9)) {
12270
- const err39 = { instancePath: instancePath + "/retryAt", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/6/properties/retryAt/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
12200
+ if (errors === _errs32) {
12201
+ if (typeof data6 == "number" && isFinite(data6)) {
12202
+ if (data6 > 9007199254740991 || isNaN(data6)) {
12203
+ const err30 = { instancePath: instancePath + "/retryAt", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/properties/retryAt/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
12271
12204
  if (vErrors === null) {
12272
- vErrors = [err39];
12205
+ vErrors = [err30];
12273
12206
  } else {
12274
- vErrors.push(err39);
12207
+ vErrors.push(err30);
12275
12208
  }
12276
12209
  errors++;
12277
12210
  } else {
12278
- if (data9 < 0 || isNaN(data9)) {
12279
- const err40 = { instancePath: instancePath + "/retryAt", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/6/properties/retryAt/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
12211
+ if (data6 < 0 || isNaN(data6)) {
12212
+ const err31 = { instancePath: instancePath + "/retryAt", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/properties/retryAt/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
12280
12213
  if (vErrors === null) {
12281
- vErrors = [err40];
12214
+ vErrors = [err31];
12282
12215
  } else {
12283
- vErrors.push(err40);
12216
+ vErrors.push(err31);
12284
12217
  }
12285
12218
  errors++;
12286
12219
  }
12287
12220
  }
12288
12221
  }
12289
12222
  }
12290
- var valid8 = _errs41 === errors;
12223
+ var valid7 = _errs32 === errors;
12291
12224
  } else {
12292
- var valid8 = true;
12225
+ var valid7 = true;
12293
12226
  }
12294
12227
  }
12295
12228
  }
12296
12229
  }
12297
12230
  } else {
12298
- const err41 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/6/type", keyword: "type", params: { type: "object" }, message: "must be object" };
12231
+ const err32 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf/5/type", keyword: "type", params: { type: "object" }, message: "must be object" };
12299
12232
  if (vErrors === null) {
12300
- vErrors = [err41];
12233
+ vErrors = [err32];
12301
12234
  } else {
12302
- vErrors.push(err41);
12235
+ vErrors.push(err32);
12303
12236
  }
12304
12237
  errors++;
12305
12238
  }
12306
12239
  }
12307
- var _valid0 = _errs36 === errors;
12240
+ var _valid0 = _errs27 === errors;
12308
12241
  valid1 = valid1 || _valid0;
12309
12242
  if (_valid0) {
12310
12243
  if (props0 !== true) {
@@ -12312,11 +12245,11 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
12312
12245
  }
12313
12246
  }
12314
12247
  if (!valid1) {
12315
- const err42 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
12248
+ const err33 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartErrorResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
12316
12249
  if (vErrors === null) {
12317
- vErrors = [err42];
12250
+ vErrors = [err33];
12318
12251
  } else {
12319
- vErrors.push(err42);
12252
+ vErrors.push(err33);
12320
12253
  }
12321
12254
  errors++;
12322
12255
  validate46.errors = vErrors;
@@ -14418,7 +14351,7 @@ function validate50(data, { instancePath = "", parentData, parentDataProperty, r
14418
14351
  return errors === 0;
14419
14352
  }
14420
14353
  validate50.evaluated = { "dynamicProps": true, "dynamicItems": false };
14421
- var schema93 = { "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": {}, "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": {}, "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": {} };
14354
+ var schema93 = { "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": {} };
14422
14355
  var pattern8 = new RegExp("^[A-Za-z0-9_-]+$", "u");
14423
14356
  function validate51(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
14424
14357
  ;
@@ -14545,13 +14478,18 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
14545
14478
  var valid4 = true;
14546
14479
  }
14547
14480
  if (valid4) {
14548
- if (data1.capturedOrganizationId !== void 0) {
14549
- let data7 = data1.capturedOrganizationId;
14481
+ if (data1.repositoryContext !== void 0) {
14482
+ let data7 = data1.repositoryContext;
14550
14483
  const _errs20 = errors;
14551
- if (errors === _errs20) {
14552
- if (typeof data7 === "string") {
14553
- if (func1(data7) > 128) {
14554
- const err6 = { 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/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
14484
+ const _errs21 = errors;
14485
+ let valid5 = false;
14486
+ let passing0 = null;
14487
+ const _errs22 = errors;
14488
+ if (errors === _errs22) {
14489
+ if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
14490
+ let missing2;
14491
+ if (data7.kind === void 0 && (missing2 = "kind") || data7.repoSyncId === void 0 && (missing2 = "repoSyncId")) {
14492
+ const err6 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/0/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" };
14555
14493
  if (vErrors === null) {
14556
14494
  vErrors = [err6];
14557
14495
  } else {
@@ -14559,184 +14497,392 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
14559
14497
  }
14560
14498
  errors++;
14561
14499
  } else {
14562
- if (func1(data7) < 1) {
14563
- const err7 = { 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/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
14564
- if (vErrors === null) {
14565
- vErrors = [err7];
14566
- } else {
14567
- vErrors.push(err7);
14568
- }
14569
- errors++;
14570
- } else {
14571
- if (!pattern8.test(data7)) {
14572
- const err8 = { 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_-]+$"' };
14500
+ const _errs24 = errors;
14501
+ for (const key0 in data7) {
14502
+ if (!(key0 === "kind" || key0 === "repoSyncId")) {
14503
+ const err7 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/0/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
14573
14504
  if (vErrors === null) {
14574
- vErrors = [err8];
14505
+ vErrors = [err7];
14575
14506
  } else {
14576
- vErrors.push(err8);
14507
+ vErrors.push(err7);
14577
14508
  }
14578
14509
  errors++;
14510
+ break;
14511
+ }
14512
+ }
14513
+ if (_errs24 === errors) {
14514
+ if (data7.kind !== void 0) {
14515
+ let data8 = data7.kind;
14516
+ const _errs25 = errors;
14517
+ if (typeof data8 !== "string") {
14518
+ const err8 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/0/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14519
+ if (vErrors === null) {
14520
+ vErrors = [err8];
14521
+ } else {
14522
+ vErrors.push(err8);
14523
+ }
14524
+ errors++;
14525
+ }
14526
+ if ("repository_bound" !== data8) {
14527
+ const err9 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/0/properties/kind/const", keyword: "const", params: { allowedValue: "repository_bound" }, message: "must be equal to constant" };
14528
+ if (vErrors === null) {
14529
+ vErrors = [err9];
14530
+ } else {
14531
+ vErrors.push(err9);
14532
+ }
14533
+ errors++;
14534
+ }
14535
+ var valid6 = _errs25 === errors;
14536
+ } else {
14537
+ var valid6 = true;
14538
+ }
14539
+ if (valid6) {
14540
+ if (data7.repoSyncId !== void 0) {
14541
+ let data9 = data7.repoSyncId;
14542
+ const _errs27 = errors;
14543
+ if (errors === _errs27) {
14544
+ if (typeof data9 === "string") {
14545
+ if (func1(data9) > 128) {
14546
+ const err10 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/repoSyncId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/0/properties/repoSyncId/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
14547
+ if (vErrors === null) {
14548
+ vErrors = [err10];
14549
+ } else {
14550
+ vErrors.push(err10);
14551
+ }
14552
+ errors++;
14553
+ } else {
14554
+ if (func1(data9) < 1) {
14555
+ const err11 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/repoSyncId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/0/properties/repoSyncId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
14556
+ if (vErrors === null) {
14557
+ vErrors = [err11];
14558
+ } else {
14559
+ vErrors.push(err11);
14560
+ }
14561
+ errors++;
14562
+ }
14563
+ }
14564
+ } else {
14565
+ const err12 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/repoSyncId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/0/properties/repoSyncId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14566
+ if (vErrors === null) {
14567
+ vErrors = [err12];
14568
+ } else {
14569
+ vErrors.push(err12);
14570
+ }
14571
+ errors++;
14572
+ }
14573
+ }
14574
+ var valid6 = _errs27 === errors;
14575
+ } else {
14576
+ var valid6 = true;
14577
+ }
14579
14578
  }
14580
14579
  }
14581
14580
  }
14582
14581
  } else {
14583
- const err9 = { 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/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14582
+ const err13 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
14584
14583
  if (vErrors === null) {
14585
- vErrors = [err9];
14584
+ vErrors = [err13];
14586
14585
  } else {
14587
- vErrors.push(err9);
14586
+ vErrors.push(err13);
14588
14587
  }
14589
14588
  errors++;
14590
14589
  }
14591
14590
  }
14592
- var valid4 = _errs20 === errors;
14593
- } else {
14594
- var valid4 = true;
14595
- }
14596
- if (valid4) {
14597
- if (data1.captureAuthorityKind !== void 0) {
14598
- let data8 = data1.captureAuthorityKind;
14599
- const _errs22 = errors;
14600
- if (typeof data8 !== "string") {
14601
- const err10 = { instancePath: instancePath + "/batch/" + i0 + "/captureAuthorityKind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/captureAuthorityKind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14602
- if (vErrors === null) {
14603
- vErrors = [err10];
14604
- } else {
14605
- vErrors.push(err10);
14606
- }
14607
- errors++;
14608
- }
14609
- if (!(data8 === "workos" || data8 === "service_token")) {
14610
- const err11 = { instancePath: instancePath + "/batch/" + i0 + "/captureAuthorityKind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/captureAuthorityKind/enum", keyword: "enum", params: { allowedValues: schema93.properties.batch.items.anyOf[0].properties.captureAuthorityKind.enum }, message: "must be equal to one of the allowed values" };
14611
- if (vErrors === null) {
14612
- vErrors = [err11];
14613
- } else {
14614
- vErrors.push(err11);
14615
- }
14616
- errors++;
14617
- }
14618
- var valid4 = _errs22 === errors;
14619
- } else {
14620
- var valid4 = true;
14591
+ var _valid1 = _errs22 === errors;
14592
+ if (_valid1) {
14593
+ valid5 = true;
14594
+ passing0 = 0;
14595
+ var props0 = true;
14621
14596
  }
14622
- if (valid4) {
14623
- if (data1.decisionLifecycleProtocolVersion !== void 0) {
14624
- let data9 = data1.decisionLifecycleProtocolVersion;
14625
- const _errs24 = errors;
14626
- if (!(typeof data9 == "number" && (!(data9 % 1) && !isNaN(data9)) && isFinite(data9))) {
14627
- const err12 = { instancePath: instancePath + "/batch/" + i0 + "/decisionLifecycleProtocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/decisionLifecycleProtocolVersion/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
14597
+ const _errs29 = errors;
14598
+ if (errors === _errs29) {
14599
+ if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
14600
+ let missing3;
14601
+ if (data7.kind === void 0 && (missing3 = "kind")) {
14602
+ const err14 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/1/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
14628
14603
  if (vErrors === null) {
14629
- vErrors = [err12];
14604
+ vErrors = [err14];
14630
14605
  } else {
14631
- vErrors.push(err12);
14606
+ vErrors.push(err14);
14632
14607
  }
14633
14608
  errors++;
14634
- }
14635
- if (errors === _errs24) {
14636
- if (typeof data9 == "number" && isFinite(data9)) {
14637
- if (data9 > 9007199254740991 || isNaN(data9)) {
14638
- const err13 = { instancePath: instancePath + "/batch/" + i0 + "/decisionLifecycleProtocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/decisionLifecycleProtocolVersion/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
14609
+ } else {
14610
+ const _errs31 = errors;
14611
+ for (const key1 in data7) {
14612
+ if (!(key1 === "kind")) {
14613
+ const err15 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/1/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
14639
14614
  if (vErrors === null) {
14640
- vErrors = [err13];
14615
+ vErrors = [err15];
14641
14616
  } else {
14642
- vErrors.push(err13);
14617
+ vErrors.push(err15);
14643
14618
  }
14644
14619
  errors++;
14645
- } else {
14646
- if (data9 < 1 || isNaN(data9)) {
14647
- const err14 = { instancePath: instancePath + "/batch/" + i0 + "/decisionLifecycleProtocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/decisionLifecycleProtocolVersion/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
14620
+ break;
14621
+ }
14622
+ }
14623
+ if (_errs31 === errors) {
14624
+ if (data7.kind !== void 0) {
14625
+ let data10 = data7.kind;
14626
+ if (typeof data10 !== "string") {
14627
+ const err16 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/1/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14648
14628
  if (vErrors === null) {
14649
- vErrors = [err14];
14629
+ vErrors = [err16];
14650
14630
  } else {
14651
- vErrors.push(err14);
14631
+ vErrors.push(err16);
14652
14632
  }
14653
14633
  errors++;
14654
14634
  }
14655
- }
14656
- }
14657
- }
14658
- var valid4 = _errs24 === errors;
14635
+ if ("non_repository" !== data10) {
14636
+ const err17 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/1/properties/kind/const", keyword: "const", params: { allowedValue: "non_repository" }, message: "must be equal to constant" };
14637
+ if (vErrors === null) {
14638
+ vErrors = [err17];
14639
+ } else {
14640
+ vErrors.push(err17);
14641
+ }
14642
+ errors++;
14643
+ }
14644
+ }
14645
+ }
14646
+ }
14659
14647
  } else {
14660
- var valid4 = true;
14648
+ const err18 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
14649
+ if (vErrors === null) {
14650
+ vErrors = [err18];
14651
+ } else {
14652
+ vErrors.push(err18);
14653
+ }
14654
+ errors++;
14661
14655
  }
14662
- if (valid4) {
14663
- if (data1.producer !== void 0) {
14664
- let data10 = data1.producer;
14665
- const _errs26 = errors;
14666
- if (typeof data10 !== "string") {
14667
- const err15 = { instancePath: instancePath + "/batch/" + i0 + "/producer", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/producer/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14656
+ }
14657
+ var _valid1 = _errs29 === errors;
14658
+ if (_valid1 && valid5) {
14659
+ valid5 = false;
14660
+ passing0 = [passing0, 1];
14661
+ } else {
14662
+ if (_valid1) {
14663
+ valid5 = true;
14664
+ passing0 = 1;
14665
+ if (props0 !== true) {
14666
+ props0 = true;
14667
+ }
14668
+ }
14669
+ }
14670
+ if (!valid5) {
14671
+ const err19 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/repositoryContext/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
14672
+ if (vErrors === null) {
14673
+ vErrors = [err19];
14674
+ } else {
14675
+ vErrors.push(err19);
14676
+ }
14677
+ errors++;
14678
+ } else {
14679
+ errors = _errs21;
14680
+ if (vErrors !== null) {
14681
+ if (_errs21) {
14682
+ vErrors.length = _errs21;
14683
+ } else {
14684
+ vErrors = null;
14685
+ }
14686
+ }
14687
+ }
14688
+ var valid4 = _errs20 === errors;
14689
+ } else {
14690
+ var valid4 = true;
14691
+ }
14692
+ if (valid4) {
14693
+ if (data1.capturedOrganizationId !== void 0) {
14694
+ let data11 = data1.capturedOrganizationId;
14695
+ const _errs34 = errors;
14696
+ if (errors === _errs34) {
14697
+ if (typeof data11 === "string") {
14698
+ if (func1(data11) > 128) {
14699
+ const err20 = { 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/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
14668
14700
  if (vErrors === null) {
14669
- vErrors = [err15];
14701
+ vErrors = [err20];
14670
14702
  } else {
14671
- vErrors.push(err15);
14703
+ vErrors.push(err20);
14672
14704
  }
14673
14705
  errors++;
14706
+ } else {
14707
+ if (func1(data11) < 1) {
14708
+ const err21 = { 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/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
14709
+ if (vErrors === null) {
14710
+ vErrors = [err21];
14711
+ } else {
14712
+ vErrors.push(err21);
14713
+ }
14714
+ errors++;
14715
+ } else {
14716
+ if (!pattern8.test(data11)) {
14717
+ 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_-]+$"' };
14718
+ if (vErrors === null) {
14719
+ vErrors = [err22];
14720
+ } else {
14721
+ vErrors.push(err22);
14722
+ }
14723
+ errors++;
14724
+ }
14725
+ }
14726
+ }
14727
+ } else {
14728
+ const err23 = { 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/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14729
+ if (vErrors === null) {
14730
+ vErrors = [err23];
14731
+ } else {
14732
+ vErrors.push(err23);
14733
+ }
14734
+ errors++;
14735
+ }
14736
+ }
14737
+ var valid4 = _errs34 === errors;
14738
+ } else {
14739
+ var valid4 = true;
14740
+ }
14741
+ if (valid4) {
14742
+ if (data1.captureAuthorityKind !== void 0) {
14743
+ let data12 = data1.captureAuthorityKind;
14744
+ const _errs36 = errors;
14745
+ if (typeof data12 !== "string") {
14746
+ const err24 = { instancePath: instancePath + "/batch/" + i0 + "/captureAuthorityKind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/captureAuthorityKind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14747
+ if (vErrors === null) {
14748
+ vErrors = [err24];
14749
+ } else {
14750
+ vErrors.push(err24);
14751
+ }
14752
+ errors++;
14753
+ }
14754
+ if (!(data12 === "workos" || data12 === "service_token")) {
14755
+ const err25 = { instancePath: instancePath + "/batch/" + i0 + "/captureAuthorityKind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/captureAuthorityKind/enum", keyword: "enum", params: { allowedValues: schema93.properties.batch.items.anyOf[0].properties.captureAuthorityKind.enum }, message: "must be equal to one of the allowed values" };
14756
+ if (vErrors === null) {
14757
+ vErrors = [err25];
14758
+ } else {
14759
+ vErrors.push(err25);
14674
14760
  }
14675
- if (!(data10 === "claude_code" || data10 === "codex" || data10 === "cursor" || data10 === "hermes")) {
14676
- const err16 = { instancePath: instancePath + "/batch/" + i0 + "/producer", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/producer/enum", keyword: "enum", params: { allowedValues: schema93.properties.batch.items.anyOf[0].properties.producer.enum }, message: "must be equal to one of the allowed values" };
14761
+ errors++;
14762
+ }
14763
+ var valid4 = _errs36 === errors;
14764
+ } else {
14765
+ var valid4 = true;
14766
+ }
14767
+ if (valid4) {
14768
+ if (data1.decisionLifecycleProtocolVersion !== void 0) {
14769
+ let data13 = data1.decisionLifecycleProtocolVersion;
14770
+ const _errs38 = errors;
14771
+ if (!(typeof data13 == "number" && (!(data13 % 1) && !isNaN(data13)) && isFinite(data13))) {
14772
+ const err26 = { instancePath: instancePath + "/batch/" + i0 + "/decisionLifecycleProtocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/decisionLifecycleProtocolVersion/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
14677
14773
  if (vErrors === null) {
14678
- vErrors = [err16];
14774
+ vErrors = [err26];
14679
14775
  } else {
14680
- vErrors.push(err16);
14776
+ vErrors.push(err26);
14681
14777
  }
14682
14778
  errors++;
14683
14779
  }
14684
- var valid4 = _errs26 === errors;
14780
+ if (errors === _errs38) {
14781
+ if (typeof data13 == "number" && isFinite(data13)) {
14782
+ if (data13 > 9007199254740991 || isNaN(data13)) {
14783
+ const err27 = { instancePath: instancePath + "/batch/" + i0 + "/decisionLifecycleProtocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/decisionLifecycleProtocolVersion/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
14784
+ if (vErrors === null) {
14785
+ vErrors = [err27];
14786
+ } else {
14787
+ vErrors.push(err27);
14788
+ }
14789
+ errors++;
14790
+ } else {
14791
+ if (data13 < 1 || isNaN(data13)) {
14792
+ const err28 = { instancePath: instancePath + "/batch/" + i0 + "/decisionLifecycleProtocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/decisionLifecycleProtocolVersion/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
14793
+ if (vErrors === null) {
14794
+ vErrors = [err28];
14795
+ } else {
14796
+ vErrors.push(err28);
14797
+ }
14798
+ errors++;
14799
+ }
14800
+ }
14801
+ }
14802
+ }
14803
+ var valid4 = _errs38 === errors;
14685
14804
  } else {
14686
14805
  var valid4 = true;
14687
14806
  }
14688
14807
  if (valid4) {
14689
- if (data1.toolOutcome !== void 0) {
14690
- let data11 = data1.toolOutcome;
14691
- const _errs28 = errors;
14692
- if (typeof data11 !== "string") {
14693
- const err17 = { instancePath: instancePath + "/batch/" + i0 + "/toolOutcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/toolOutcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14808
+ if (data1.producer !== void 0) {
14809
+ let data14 = data1.producer;
14810
+ const _errs40 = errors;
14811
+ if (typeof data14 !== "string") {
14812
+ const err29 = { instancePath: instancePath + "/batch/" + i0 + "/producer", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/producer/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14694
14813
  if (vErrors === null) {
14695
- vErrors = [err17];
14814
+ vErrors = [err29];
14696
14815
  } else {
14697
- vErrors.push(err17);
14816
+ vErrors.push(err29);
14698
14817
  }
14699
14818
  errors++;
14700
14819
  }
14701
- if (!(data11 === "succeeded" || data11 === "returned" || data11 === "failed" || data11 === "interrupted" || data11 === "prevented" || data11 === "unknown")) {
14702
- const err18 = { instancePath: instancePath + "/batch/" + i0 + "/toolOutcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/toolOutcome/enum", keyword: "enum", params: { allowedValues: schema93.properties.batch.items.anyOf[0].properties.toolOutcome.enum }, message: "must be equal to one of the allowed values" };
14820
+ if (!(data14 === "claude_code" || data14 === "codex" || data14 === "cursor" || data14 === "hermes")) {
14821
+ const err30 = { instancePath: instancePath + "/batch/" + i0 + "/producer", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/producer/enum", keyword: "enum", params: { allowedValues: schema93.properties.batch.items.anyOf[0].properties.producer.enum }, message: "must be equal to one of the allowed values" };
14703
14822
  if (vErrors === null) {
14704
- vErrors = [err18];
14823
+ vErrors = [err30];
14705
14824
  } else {
14706
- vErrors.push(err18);
14825
+ vErrors.push(err30);
14707
14826
  }
14708
14827
  errors++;
14709
14828
  }
14710
- var valid4 = _errs28 === errors;
14829
+ var valid4 = _errs40 === errors;
14711
14830
  } else {
14712
14831
  var valid4 = true;
14713
14832
  }
14714
14833
  if (valid4) {
14715
- if (data1.envelopeVersion !== void 0) {
14716
- let data12 = data1.envelopeVersion;
14717
- const _errs30 = errors;
14718
- if (!(typeof data12 == "number" && isFinite(data12))) {
14719
- const err19 = { instancePath: instancePath + "/batch/" + i0 + "/envelopeVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/envelopeVersion/type", keyword: "type", params: { type: "number" }, message: "must be number" };
14834
+ if (data1.toolOutcome !== void 0) {
14835
+ let data15 = data1.toolOutcome;
14836
+ const _errs42 = errors;
14837
+ if (typeof data15 !== "string") {
14838
+ const err31 = { instancePath: instancePath + "/batch/" + i0 + "/toolOutcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/toolOutcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14720
14839
  if (vErrors === null) {
14721
- vErrors = [err19];
14840
+ vErrors = [err31];
14722
14841
  } else {
14723
- vErrors.push(err19);
14842
+ vErrors.push(err31);
14724
14843
  }
14725
14844
  errors++;
14726
14845
  }
14727
- if (4 !== data12) {
14728
- const err20 = { instancePath: instancePath + "/batch/" + i0 + "/envelopeVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/envelopeVersion/const", keyword: "const", params: { allowedValue: 4 }, message: "must be equal to constant" };
14846
+ if (!(data15 === "succeeded" || data15 === "returned" || data15 === "failed" || data15 === "interrupted" || data15 === "prevented" || data15 === "unknown")) {
14847
+ const err32 = { instancePath: instancePath + "/batch/" + i0 + "/toolOutcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/toolOutcome/enum", keyword: "enum", params: { allowedValues: schema93.properties.batch.items.anyOf[0].properties.toolOutcome.enum }, message: "must be equal to one of the allowed values" };
14729
14848
  if (vErrors === null) {
14730
- vErrors = [err20];
14849
+ vErrors = [err32];
14731
14850
  } else {
14732
- vErrors.push(err20);
14851
+ vErrors.push(err32);
14733
14852
  }
14734
14853
  errors++;
14735
14854
  }
14736
- var valid4 = _errs30 === errors;
14855
+ var valid4 = _errs42 === errors;
14737
14856
  } else {
14738
14857
  var valid4 = true;
14739
14858
  }
14859
+ if (valid4) {
14860
+ if (data1.envelopeVersion !== void 0) {
14861
+ let data16 = data1.envelopeVersion;
14862
+ const _errs44 = errors;
14863
+ if (!(typeof data16 == "number" && isFinite(data16))) {
14864
+ const err33 = { instancePath: instancePath + "/batch/" + i0 + "/envelopeVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/envelopeVersion/type", keyword: "type", params: { type: "number" }, message: "must be number" };
14865
+ if (vErrors === null) {
14866
+ vErrors = [err33];
14867
+ } else {
14868
+ vErrors.push(err33);
14869
+ }
14870
+ errors++;
14871
+ }
14872
+ if (4 !== data16) {
14873
+ const err34 = { instancePath: instancePath + "/batch/" + i0 + "/envelopeVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/envelopeVersion/const", keyword: "const", params: { allowedValue: 4 }, message: "must be equal to constant" };
14874
+ if (vErrors === null) {
14875
+ vErrors = [err34];
14876
+ } else {
14877
+ vErrors.push(err34);
14878
+ }
14879
+ errors++;
14880
+ }
14881
+ var valid4 = _errs44 === errors;
14882
+ } else {
14883
+ var valid4 = true;
14884
+ }
14885
+ }
14740
14886
  }
14741
14887
  }
14742
14888
  }
@@ -14749,11 +14895,11 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
14749
14895
  }
14750
14896
  }
14751
14897
  } else {
14752
- const err21 = { instancePath: instancePath + "/batch/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
14898
+ const err35 = { instancePath: instancePath + "/batch/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
14753
14899
  if (vErrors === null) {
14754
- vErrors = [err21];
14900
+ vErrors = [err35];
14755
14901
  } else {
14756
- vErrors.push(err21);
14902
+ vErrors.push(err35);
14757
14903
  }
14758
14904
  errors++;
14759
14905
  }
@@ -14761,296 +14907,509 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
14761
14907
  var _valid0 = _errs7 === errors;
14762
14908
  valid3 = valid3 || _valid0;
14763
14909
  if (_valid0) {
14764
- var props0 = true;
14910
+ var props1 = true;
14765
14911
  }
14766
- const _errs32 = errors;
14767
- if (errors === _errs32) {
14912
+ const _errs46 = errors;
14913
+ if (errors === _errs46) {
14768
14914
  if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
14769
- let missing2;
14770
- if (data1.moveId === void 0 && (missing2 = "moveId") || data1.capturedAt === void 0 && (missing2 = "capturedAt") || data1.sessionId === void 0 && (missing2 = "sessionId") || data1.eventType === void 0 && (missing2 = "eventType")) {
14771
- const err22 = { instancePath: instancePath + "/batch/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" };
14915
+ let missing4;
14916
+ if (data1.moveId === void 0 && (missing4 = "moveId") || data1.capturedAt === void 0 && (missing4 = "capturedAt") || data1.sessionId === void 0 && (missing4 = "sessionId") || data1.eventType === void 0 && (missing4 = "eventType")) {
14917
+ const err36 = { instancePath: instancePath + "/batch/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" };
14772
14918
  if (vErrors === null) {
14773
- vErrors = [err22];
14919
+ vErrors = [err36];
14774
14920
  } else {
14775
- vErrors.push(err22);
14921
+ vErrors.push(err36);
14776
14922
  }
14777
14923
  errors++;
14778
14924
  } else {
14779
14925
  if (data1.moveId !== void 0) {
14780
- const _errs35 = errors;
14926
+ const _errs49 = errors;
14781
14927
  if (typeof data1.moveId !== "string") {
14782
- const err23 = { instancePath: instancePath + "/batch/" + i0 + "/moveId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/moveId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14928
+ const err37 = { instancePath: instancePath + "/batch/" + i0 + "/moveId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/moveId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14783
14929
  if (vErrors === null) {
14784
- vErrors = [err23];
14930
+ vErrors = [err37];
14785
14931
  } else {
14786
- vErrors.push(err23);
14932
+ vErrors.push(err37);
14787
14933
  }
14788
14934
  errors++;
14789
14935
  }
14790
- var valid5 = _errs35 === errors;
14936
+ var valid8 = _errs49 === errors;
14791
14937
  } else {
14792
- var valid5 = true;
14938
+ var valid8 = true;
14793
14939
  }
14794
- if (valid5) {
14940
+ if (valid8) {
14795
14941
  if (data1.capturedAt !== void 0) {
14796
- let data14 = data1.capturedAt;
14797
- const _errs37 = errors;
14798
- if (!(typeof data14 == "number" && isFinite(data14))) {
14799
- const err24 = { instancePath: instancePath + "/batch/" + i0 + "/capturedAt", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/capturedAt/type", keyword: "type", params: { type: "number" }, message: "must be number" };
14942
+ let data18 = data1.capturedAt;
14943
+ const _errs51 = errors;
14944
+ if (!(typeof data18 == "number" && isFinite(data18))) {
14945
+ const err38 = { instancePath: instancePath + "/batch/" + i0 + "/capturedAt", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/capturedAt/type", keyword: "type", params: { type: "number" }, message: "must be number" };
14800
14946
  if (vErrors === null) {
14801
- vErrors = [err24];
14947
+ vErrors = [err38];
14802
14948
  } else {
14803
- vErrors.push(err24);
14949
+ vErrors.push(err38);
14804
14950
  }
14805
14951
  errors++;
14806
14952
  }
14807
- var valid5 = _errs37 === errors;
14953
+ var valid8 = _errs51 === errors;
14808
14954
  } else {
14809
- var valid5 = true;
14955
+ var valid8 = true;
14810
14956
  }
14811
- if (valid5) {
14957
+ if (valid8) {
14812
14958
  if (data1.sessionId !== void 0) {
14813
- const _errs39 = errors;
14959
+ const _errs53 = errors;
14814
14960
  if (typeof data1.sessionId !== "string") {
14815
- const err25 = { instancePath: instancePath + "/batch/" + i0 + "/sessionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/sessionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14961
+ const err39 = { instancePath: instancePath + "/batch/" + i0 + "/sessionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/sessionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14816
14962
  if (vErrors === null) {
14817
- vErrors = [err25];
14963
+ vErrors = [err39];
14818
14964
  } else {
14819
- vErrors.push(err25);
14965
+ vErrors.push(err39);
14820
14966
  }
14821
14967
  errors++;
14822
14968
  }
14823
- var valid5 = _errs39 === errors;
14969
+ var valid8 = _errs53 === errors;
14824
14970
  } else {
14825
- var valid5 = true;
14971
+ var valid8 = true;
14826
14972
  }
14827
- if (valid5) {
14973
+ if (valid8) {
14828
14974
  if (data1.invocationId !== void 0) {
14829
- const _errs41 = errors;
14975
+ const _errs55 = errors;
14830
14976
  if (typeof data1.invocationId !== "string") {
14831
- const err26 = { instancePath: instancePath + "/batch/" + i0 + "/invocationId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/invocationId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14977
+ const err40 = { instancePath: instancePath + "/batch/" + i0 + "/invocationId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/invocationId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14832
14978
  if (vErrors === null) {
14833
- vErrors = [err26];
14979
+ vErrors = [err40];
14834
14980
  } else {
14835
- vErrors.push(err26);
14981
+ vErrors.push(err40);
14836
14982
  }
14837
14983
  errors++;
14838
14984
  }
14839
- var valid5 = _errs41 === errors;
14985
+ var valid8 = _errs55 === errors;
14840
14986
  } else {
14841
- var valid5 = true;
14987
+ var valid8 = true;
14842
14988
  }
14843
- if (valid5) {
14989
+ if (valid8) {
14844
14990
  if (data1.eventType !== void 0) {
14845
- const _errs43 = errors;
14991
+ const _errs57 = errors;
14846
14992
  if (typeof data1.eventType !== "string") {
14847
- const err27 = { instancePath: instancePath + "/batch/" + i0 + "/eventType", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/eventType/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14993
+ const err41 = { instancePath: instancePath + "/batch/" + i0 + "/eventType", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/eventType/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14848
14994
  if (vErrors === null) {
14849
- vErrors = [err27];
14995
+ vErrors = [err41];
14850
14996
  } else {
14851
- vErrors.push(err27);
14997
+ vErrors.push(err41);
14852
14998
  }
14853
14999
  errors++;
14854
15000
  }
14855
- var valid5 = _errs43 === errors;
15001
+ var valid8 = _errs57 === errors;
14856
15002
  } else {
14857
- var valid5 = true;
15003
+ var valid8 = true;
14858
15004
  }
14859
- if (valid5) {
14860
- if (data1.capturedOrganizationId !== void 0) {
14861
- let data18 = data1.capturedOrganizationId;
14862
- const _errs45 = errors;
14863
- if (errors === _errs45) {
14864
- if (typeof data18 === "string") {
14865
- if (func1(data18) > 128) {
14866
- const err28 = { 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/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
15005
+ if (valid8) {
15006
+ if (data1.repositoryContext !== void 0) {
15007
+ let data22 = data1.repositoryContext;
15008
+ const _errs59 = errors;
15009
+ const _errs60 = errors;
15010
+ let valid9 = false;
15011
+ let passing1 = null;
15012
+ const _errs61 = errors;
15013
+ if (errors === _errs61) {
15014
+ if (data22 && typeof data22 == "object" && !Array.isArray(data22)) {
15015
+ let missing5;
15016
+ if (data22.kind === void 0 && (missing5 = "kind") || data22.repoSyncId === void 0 && (missing5 = "repoSyncId")) {
15017
+ const err42 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/0/required", keyword: "required", params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'" };
14867
15018
  if (vErrors === null) {
14868
- vErrors = [err28];
15019
+ vErrors = [err42];
14869
15020
  } else {
14870
- vErrors.push(err28);
15021
+ vErrors.push(err42);
14871
15022
  }
14872
15023
  errors++;
14873
15024
  } else {
14874
- if (func1(data18) < 1) {
14875
- const err29 = { 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/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
14876
- if (vErrors === null) {
14877
- vErrors = [err29];
14878
- } else {
14879
- vErrors.push(err29);
14880
- }
14881
- errors++;
14882
- } else {
14883
- if (!pattern8.test(data18)) {
14884
- const err30 = { 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_-]+$"' };
15025
+ const _errs63 = errors;
15026
+ for (const key2 in data22) {
15027
+ if (!(key2 === "kind" || key2 === "repoSyncId")) {
15028
+ const err43 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/0/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
14885
15029
  if (vErrors === null) {
14886
- vErrors = [err30];
15030
+ vErrors = [err43];
14887
15031
  } else {
14888
- vErrors.push(err30);
15032
+ vErrors.push(err43);
14889
15033
  }
14890
15034
  errors++;
15035
+ break;
15036
+ }
15037
+ }
15038
+ if (_errs63 === errors) {
15039
+ if (data22.kind !== void 0) {
15040
+ let data23 = data22.kind;
15041
+ const _errs64 = errors;
15042
+ if (typeof data23 !== "string") {
15043
+ const err44 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/0/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
15044
+ if (vErrors === null) {
15045
+ vErrors = [err44];
15046
+ } else {
15047
+ vErrors.push(err44);
15048
+ }
15049
+ errors++;
15050
+ }
15051
+ if ("repository_bound" !== data23) {
15052
+ const err45 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/0/properties/kind/const", keyword: "const", params: { allowedValue: "repository_bound" }, message: "must be equal to constant" };
15053
+ if (vErrors === null) {
15054
+ vErrors = [err45];
15055
+ } else {
15056
+ vErrors.push(err45);
15057
+ }
15058
+ errors++;
15059
+ }
15060
+ var valid10 = _errs64 === errors;
15061
+ } else {
15062
+ var valid10 = true;
15063
+ }
15064
+ if (valid10) {
15065
+ if (data22.repoSyncId !== void 0) {
15066
+ let data24 = data22.repoSyncId;
15067
+ const _errs66 = errors;
15068
+ if (errors === _errs66) {
15069
+ if (typeof data24 === "string") {
15070
+ if (func1(data24) > 128) {
15071
+ const err46 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/repoSyncId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/0/properties/repoSyncId/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
15072
+ if (vErrors === null) {
15073
+ vErrors = [err46];
15074
+ } else {
15075
+ vErrors.push(err46);
15076
+ }
15077
+ errors++;
15078
+ } else {
15079
+ if (func1(data24) < 1) {
15080
+ const err47 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/repoSyncId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/0/properties/repoSyncId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
15081
+ if (vErrors === null) {
15082
+ vErrors = [err47];
15083
+ } else {
15084
+ vErrors.push(err47);
15085
+ }
15086
+ errors++;
15087
+ }
15088
+ }
15089
+ } else {
15090
+ const err48 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/repoSyncId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/0/properties/repoSyncId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
15091
+ if (vErrors === null) {
15092
+ vErrors = [err48];
15093
+ } else {
15094
+ vErrors.push(err48);
15095
+ }
15096
+ errors++;
15097
+ }
15098
+ }
15099
+ var valid10 = _errs66 === errors;
15100
+ } else {
15101
+ var valid10 = true;
15102
+ }
14891
15103
  }
14892
15104
  }
14893
15105
  }
14894
15106
  } else {
14895
- const err31 = { 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/type", keyword: "type", params: { type: "string" }, message: "must be string" };
15107
+ const err49 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
14896
15108
  if (vErrors === null) {
14897
- vErrors = [err31];
15109
+ vErrors = [err49];
14898
15110
  } else {
14899
- vErrors.push(err31);
15111
+ vErrors.push(err49);
14900
15112
  }
14901
15113
  errors++;
14902
15114
  }
14903
15115
  }
14904
- var valid5 = _errs45 === errors;
14905
- } else {
14906
- var valid5 = true;
14907
- }
14908
- if (valid5) {
14909
- if (data1.captureAuthorityKind !== void 0) {
14910
- let data19 = data1.captureAuthorityKind;
14911
- const _errs47 = errors;
14912
- if (typeof data19 !== "string") {
14913
- const err32 = { instancePath: instancePath + "/batch/" + i0 + "/captureAuthorityKind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/captureAuthorityKind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
14914
- if (vErrors === null) {
14915
- vErrors = [err32];
15116
+ var _valid2 = _errs61 === errors;
15117
+ if (_valid2) {
15118
+ valid9 = true;
15119
+ passing1 = 0;
15120
+ var props2 = true;
15121
+ }
15122
+ const _errs68 = errors;
15123
+ if (errors === _errs68) {
15124
+ if (data22 && typeof data22 == "object" && !Array.isArray(data22)) {
15125
+ let missing6;
15126
+ if (data22.kind === void 0 && (missing6 = "kind")) {
15127
+ const err50 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/1/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" };
15128
+ if (vErrors === null) {
15129
+ vErrors = [err50];
15130
+ } else {
15131
+ vErrors.push(err50);
15132
+ }
15133
+ errors++;
14916
15134
  } else {
14917
- vErrors.push(err32);
15135
+ const _errs70 = errors;
15136
+ for (const key3 in data22) {
15137
+ if (!(key3 === "kind")) {
15138
+ const err51 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/1/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
15139
+ if (vErrors === null) {
15140
+ vErrors = [err51];
15141
+ } else {
15142
+ vErrors.push(err51);
15143
+ }
15144
+ errors++;
15145
+ break;
15146
+ }
15147
+ }
15148
+ if (_errs70 === errors) {
15149
+ if (data22.kind !== void 0) {
15150
+ let data25 = data22.kind;
15151
+ if (typeof data25 !== "string") {
15152
+ const err52 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/1/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
15153
+ if (vErrors === null) {
15154
+ vErrors = [err52];
15155
+ } else {
15156
+ vErrors.push(err52);
15157
+ }
15158
+ errors++;
15159
+ }
15160
+ if ("non_repository" !== data25) {
15161
+ const err53 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/1/properties/kind/const", keyword: "const", params: { allowedValue: "non_repository" }, message: "must be equal to constant" };
15162
+ if (vErrors === null) {
15163
+ vErrors = [err53];
15164
+ } else {
15165
+ vErrors.push(err53);
15166
+ }
15167
+ errors++;
15168
+ }
15169
+ }
15170
+ }
14918
15171
  }
14919
- errors++;
14920
- }
14921
- if (!(data19 === "workos" || data19 === "service_token")) {
14922
- const err33 = { instancePath: instancePath + "/batch/" + i0 + "/captureAuthorityKind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/captureAuthorityKind/enum", keyword: "enum", params: { allowedValues: schema93.properties.batch.items.anyOf[1].properties.captureAuthorityKind.enum }, message: "must be equal to one of the allowed values" };
15172
+ } else {
15173
+ const err54 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
14923
15174
  if (vErrors === null) {
14924
- vErrors = [err33];
15175
+ vErrors = [err54];
14925
15176
  } else {
14926
- vErrors.push(err33);
15177
+ vErrors.push(err54);
14927
15178
  }
14928
15179
  errors++;
14929
15180
  }
14930
- var valid5 = _errs47 === errors;
15181
+ }
15182
+ var _valid2 = _errs68 === errors;
15183
+ if (_valid2 && valid9) {
15184
+ valid9 = false;
15185
+ passing1 = [passing1, 1];
14931
15186
  } else {
14932
- var valid5 = true;
15187
+ if (_valid2) {
15188
+ valid9 = true;
15189
+ passing1 = 1;
15190
+ if (props2 !== true) {
15191
+ props2 = true;
15192
+ }
15193
+ }
14933
15194
  }
14934
- if (valid5) {
14935
- if (data1.decisionLifecycleProtocolVersion !== void 0) {
14936
- let data20 = data1.decisionLifecycleProtocolVersion;
14937
- const _errs49 = errors;
14938
- if (!(typeof data20 == "number" && (!(data20 % 1) && !isNaN(data20)) && isFinite(data20))) {
14939
- const err34 = { instancePath: instancePath + "/batch/" + i0 + "/decisionLifecycleProtocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/decisionLifecycleProtocolVersion/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
14940
- if (vErrors === null) {
14941
- vErrors = [err34];
14942
- } else {
14943
- vErrors.push(err34);
14944
- }
14945
- errors++;
15195
+ if (!valid9) {
15196
+ const err55 = { instancePath: instancePath + "/batch/" + i0 + "/repositoryContext", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/repositoryContext/oneOf", keyword: "oneOf", params: { passingSchemas: passing1 }, message: "must match exactly one schema in oneOf" };
15197
+ if (vErrors === null) {
15198
+ vErrors = [err55];
15199
+ } else {
15200
+ vErrors.push(err55);
15201
+ }
15202
+ errors++;
15203
+ } else {
15204
+ errors = _errs60;
15205
+ if (vErrors !== null) {
15206
+ if (_errs60) {
15207
+ vErrors.length = _errs60;
15208
+ } else {
15209
+ vErrors = null;
14946
15210
  }
14947
- if (errors === _errs49) {
14948
- if (typeof data20 == "number" && isFinite(data20)) {
14949
- if (data20 > 9007199254740991 || isNaN(data20)) {
14950
- const err35 = { instancePath: instancePath + "/batch/" + i0 + "/decisionLifecycleProtocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/decisionLifecycleProtocolVersion/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
15211
+ }
15212
+ }
15213
+ var valid8 = _errs59 === errors;
15214
+ } else {
15215
+ var valid8 = true;
15216
+ }
15217
+ if (valid8) {
15218
+ if (data1.capturedOrganizationId !== void 0) {
15219
+ let data26 = data1.capturedOrganizationId;
15220
+ const _errs73 = errors;
15221
+ if (errors === _errs73) {
15222
+ if (typeof data26 === "string") {
15223
+ if (func1(data26) > 128) {
15224
+ const err56 = { 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/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
15225
+ if (vErrors === null) {
15226
+ vErrors = [err56];
15227
+ } else {
15228
+ vErrors.push(err56);
15229
+ }
15230
+ errors++;
15231
+ } else {
15232
+ if (func1(data26) < 1) {
15233
+ const err57 = { 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/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
14951
15234
  if (vErrors === null) {
14952
- vErrors = [err35];
15235
+ vErrors = [err57];
14953
15236
  } else {
14954
- vErrors.push(err35);
15237
+ vErrors.push(err57);
14955
15238
  }
14956
15239
  errors++;
14957
15240
  } else {
14958
- if (data20 < 1 || isNaN(data20)) {
14959
- const err36 = { instancePath: instancePath + "/batch/" + i0 + "/decisionLifecycleProtocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/decisionLifecycleProtocolVersion/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
15241
+ if (!pattern8.test(data26)) {
15242
+ 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_-]+$"' };
14960
15243
  if (vErrors === null) {
14961
- vErrors = [err36];
15244
+ vErrors = [err58];
14962
15245
  } else {
14963
- vErrors.push(err36);
15246
+ vErrors.push(err58);
14964
15247
  }
14965
15248
  errors++;
14966
15249
  }
14967
15250
  }
14968
15251
  }
15252
+ } else {
15253
+ const err59 = { 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/type", keyword: "type", params: { type: "string" }, message: "must be string" };
15254
+ if (vErrors === null) {
15255
+ vErrors = [err59];
15256
+ } else {
15257
+ vErrors.push(err59);
15258
+ }
15259
+ errors++;
15260
+ }
15261
+ }
15262
+ var valid8 = _errs73 === errors;
15263
+ } else {
15264
+ var valid8 = true;
15265
+ }
15266
+ if (valid8) {
15267
+ if (data1.captureAuthorityKind !== void 0) {
15268
+ let data27 = data1.captureAuthorityKind;
15269
+ const _errs75 = errors;
15270
+ if (typeof data27 !== "string") {
15271
+ const err60 = { instancePath: instancePath + "/batch/" + i0 + "/captureAuthorityKind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/captureAuthorityKind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
15272
+ if (vErrors === null) {
15273
+ vErrors = [err60];
15274
+ } else {
15275
+ vErrors.push(err60);
15276
+ }
15277
+ errors++;
14969
15278
  }
14970
- var valid5 = _errs49 === errors;
15279
+ if (!(data27 === "workos" || data27 === "service_token")) {
15280
+ const err61 = { instancePath: instancePath + "/batch/" + i0 + "/captureAuthorityKind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/captureAuthorityKind/enum", keyword: "enum", params: { allowedValues: schema93.properties.batch.items.anyOf[1].properties.captureAuthorityKind.enum }, message: "must be equal to one of the allowed values" };
15281
+ if (vErrors === null) {
15282
+ vErrors = [err61];
15283
+ } else {
15284
+ vErrors.push(err61);
15285
+ }
15286
+ errors++;
15287
+ }
15288
+ var valid8 = _errs75 === errors;
14971
15289
  } else {
14972
- var valid5 = true;
15290
+ var valid8 = true;
14973
15291
  }
14974
- if (valid5) {
14975
- if (data1.producer !== void 0) {
14976
- let data21 = data1.producer;
14977
- const _errs51 = errors;
14978
- if (typeof data21 !== "string") {
14979
- const err37 = { instancePath: instancePath + "/batch/" + i0 + "/producer", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/producer/type", keyword: "type", params: { type: "string" }, message: "must be string" };
15292
+ if (valid8) {
15293
+ if (data1.decisionLifecycleProtocolVersion !== void 0) {
15294
+ let data28 = data1.decisionLifecycleProtocolVersion;
15295
+ const _errs77 = errors;
15296
+ if (!(typeof data28 == "number" && (!(data28 % 1) && !isNaN(data28)) && isFinite(data28))) {
15297
+ const err62 = { instancePath: instancePath + "/batch/" + i0 + "/decisionLifecycleProtocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/decisionLifecycleProtocolVersion/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
14980
15298
  if (vErrors === null) {
14981
- vErrors = [err37];
15299
+ vErrors = [err62];
14982
15300
  } else {
14983
- vErrors.push(err37);
15301
+ vErrors.push(err62);
14984
15302
  }
14985
15303
  errors++;
14986
15304
  }
14987
- if (!(data21 === "claude_code" || data21 === "codex" || data21 === "cursor" || data21 === "hermes")) {
14988
- const err38 = { instancePath: instancePath + "/batch/" + i0 + "/producer", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/producer/enum", keyword: "enum", params: { allowedValues: schema93.properties.batch.items.anyOf[1].properties.producer.enum }, message: "must be equal to one of the allowed values" };
14989
- if (vErrors === null) {
14990
- vErrors = [err38];
14991
- } else {
14992
- vErrors.push(err38);
15305
+ if (errors === _errs77) {
15306
+ if (typeof data28 == "number" && isFinite(data28)) {
15307
+ if (data28 > 9007199254740991 || isNaN(data28)) {
15308
+ const err63 = { instancePath: instancePath + "/batch/" + i0 + "/decisionLifecycleProtocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/decisionLifecycleProtocolVersion/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
15309
+ if (vErrors === null) {
15310
+ vErrors = [err63];
15311
+ } else {
15312
+ vErrors.push(err63);
15313
+ }
15314
+ errors++;
15315
+ } else {
15316
+ if (data28 < 1 || isNaN(data28)) {
15317
+ const err64 = { instancePath: instancePath + "/batch/" + i0 + "/decisionLifecycleProtocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/decisionLifecycleProtocolVersion/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
15318
+ if (vErrors === null) {
15319
+ vErrors = [err64];
15320
+ } else {
15321
+ vErrors.push(err64);
15322
+ }
15323
+ errors++;
15324
+ }
15325
+ }
14993
15326
  }
14994
- errors++;
14995
15327
  }
14996
- var valid5 = _errs51 === errors;
15328
+ var valid8 = _errs77 === errors;
14997
15329
  } else {
14998
- var valid5 = true;
15330
+ var valid8 = true;
14999
15331
  }
15000
- if (valid5) {
15001
- if (data1.toolOutcome !== void 0) {
15002
- let data22 = data1.toolOutcome;
15003
- const _errs53 = errors;
15004
- if (typeof data22 !== "string") {
15005
- const err39 = { instancePath: instancePath + "/batch/" + i0 + "/toolOutcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/toolOutcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
15332
+ if (valid8) {
15333
+ if (data1.producer !== void 0) {
15334
+ let data29 = data1.producer;
15335
+ const _errs79 = errors;
15336
+ if (typeof data29 !== "string") {
15337
+ const err65 = { instancePath: instancePath + "/batch/" + i0 + "/producer", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/producer/type", keyword: "type", params: { type: "string" }, message: "must be string" };
15006
15338
  if (vErrors === null) {
15007
- vErrors = [err39];
15339
+ vErrors = [err65];
15008
15340
  } else {
15009
- vErrors.push(err39);
15341
+ vErrors.push(err65);
15010
15342
  }
15011
15343
  errors++;
15012
15344
  }
15013
- if (!(data22 === "succeeded" || data22 === "returned" || data22 === "failed" || data22 === "interrupted" || data22 === "prevented" || data22 === "unknown")) {
15014
- const err40 = { instancePath: instancePath + "/batch/" + i0 + "/toolOutcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/toolOutcome/enum", keyword: "enum", params: { allowedValues: schema93.properties.batch.items.anyOf[1].properties.toolOutcome.enum }, message: "must be equal to one of the allowed values" };
15345
+ if (!(data29 === "claude_code" || data29 === "codex" || data29 === "cursor" || data29 === "hermes")) {
15346
+ const err66 = { instancePath: instancePath + "/batch/" + i0 + "/producer", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/producer/enum", keyword: "enum", params: { allowedValues: schema93.properties.batch.items.anyOf[1].properties.producer.enum }, message: "must be equal to one of the allowed values" };
15015
15347
  if (vErrors === null) {
15016
- vErrors = [err40];
15348
+ vErrors = [err66];
15017
15349
  } else {
15018
- vErrors.push(err40);
15350
+ vErrors.push(err66);
15019
15351
  }
15020
15352
  errors++;
15021
15353
  }
15022
- var valid5 = _errs53 === errors;
15354
+ var valid8 = _errs79 === errors;
15023
15355
  } else {
15024
- var valid5 = true;
15356
+ var valid8 = true;
15025
15357
  }
15026
- if (valid5) {
15027
- if (data1.envelopeVersion !== void 0) {
15028
- let data23 = data1.envelopeVersion;
15029
- const _errs55 = errors;
15030
- if (errors === _errs55) {
15031
- if (typeof data23 == "number" && isFinite(data23)) {
15032
- if (data23 >= 4 || isNaN(data23)) {
15033
- const err41 = { instancePath: instancePath + "/batch/" + i0 + "/envelopeVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/envelopeVersion/exclusiveMaximum", keyword: "exclusiveMaximum", params: { comparison: "<", limit: 4 }, message: "must be < 4" };
15358
+ if (valid8) {
15359
+ if (data1.toolOutcome !== void 0) {
15360
+ let data30 = data1.toolOutcome;
15361
+ const _errs81 = errors;
15362
+ if (typeof data30 !== "string") {
15363
+ const err67 = { instancePath: instancePath + "/batch/" + i0 + "/toolOutcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/toolOutcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
15364
+ if (vErrors === null) {
15365
+ vErrors = [err67];
15366
+ } else {
15367
+ vErrors.push(err67);
15368
+ }
15369
+ errors++;
15370
+ }
15371
+ if (!(data30 === "succeeded" || data30 === "returned" || data30 === "failed" || data30 === "interrupted" || data30 === "prevented" || data30 === "unknown")) {
15372
+ const err68 = { instancePath: instancePath + "/batch/" + i0 + "/toolOutcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/toolOutcome/enum", keyword: "enum", params: { allowedValues: schema93.properties.batch.items.anyOf[1].properties.toolOutcome.enum }, message: "must be equal to one of the allowed values" };
15373
+ if (vErrors === null) {
15374
+ vErrors = [err68];
15375
+ } else {
15376
+ vErrors.push(err68);
15377
+ }
15378
+ errors++;
15379
+ }
15380
+ var valid8 = _errs81 === errors;
15381
+ } else {
15382
+ var valid8 = true;
15383
+ }
15384
+ if (valid8) {
15385
+ if (data1.envelopeVersion !== void 0) {
15386
+ let data31 = data1.envelopeVersion;
15387
+ const _errs83 = errors;
15388
+ if (errors === _errs83) {
15389
+ if (typeof data31 == "number" && isFinite(data31)) {
15390
+ if (data31 >= 4 || isNaN(data31)) {
15391
+ const err69 = { instancePath: instancePath + "/batch/" + i0 + "/envelopeVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/envelopeVersion/exclusiveMaximum", keyword: "exclusiveMaximum", params: { comparison: "<", limit: 4 }, message: "must be < 4" };
15392
+ if (vErrors === null) {
15393
+ vErrors = [err69];
15394
+ } else {
15395
+ vErrors.push(err69);
15396
+ }
15397
+ errors++;
15398
+ }
15399
+ } else {
15400
+ const err70 = { instancePath: instancePath + "/batch/" + i0 + "/envelopeVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/envelopeVersion/type", keyword: "type", params: { type: "number" }, message: "must be number" };
15034
15401
  if (vErrors === null) {
15035
- vErrors = [err41];
15402
+ vErrors = [err70];
15036
15403
  } else {
15037
- vErrors.push(err41);
15404
+ vErrors.push(err70);
15038
15405
  }
15039
15406
  errors++;
15040
15407
  }
15041
- } else {
15042
- const err42 = { instancePath: instancePath + "/batch/" + i0 + "/envelopeVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/envelopeVersion/type", keyword: "type", params: { type: "number" }, message: "must be number" };
15043
- if (vErrors === null) {
15044
- vErrors = [err42];
15045
- } else {
15046
- vErrors.push(err42);
15047
- }
15048
- errors++;
15049
15408
  }
15409
+ var valid8 = _errs83 === errors;
15410
+ } else {
15411
+ var valid8 = true;
15050
15412
  }
15051
- var valid5 = _errs55 === errors;
15052
- } else {
15053
- var valid5 = true;
15054
15413
  }
15055
15414
  }
15056
15415
  }
@@ -15064,28 +15423,28 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
15064
15423
  }
15065
15424
  }
15066
15425
  } else {
15067
- const err43 = { instancePath: instancePath + "/batch/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
15426
+ const err71 = { instancePath: instancePath + "/batch/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
15068
15427
  if (vErrors === null) {
15069
- vErrors = [err43];
15428
+ vErrors = [err71];
15070
15429
  } else {
15071
- vErrors.push(err43);
15430
+ vErrors.push(err71);
15072
15431
  }
15073
15432
  errors++;
15074
15433
  }
15075
15434
  }
15076
- var _valid0 = _errs32 === errors;
15435
+ var _valid0 = _errs46 === errors;
15077
15436
  valid3 = valid3 || _valid0;
15078
15437
  if (_valid0) {
15079
- if (props0 !== true) {
15080
- props0 = true;
15438
+ if (props1 !== true) {
15439
+ props1 = true;
15081
15440
  }
15082
15441
  }
15083
15442
  if (!valid3) {
15084
- const err44 = { instancePath: instancePath + "/batch/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
15443
+ const err72 = { instancePath: instancePath + "/batch/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
15085
15444
  if (vErrors === null) {
15086
- vErrors = [err44];
15445
+ vErrors = [err72];
15087
15446
  } else {
15088
- vErrors.push(err44);
15447
+ vErrors.push(err72);
15089
15448
  }
15090
15449
  errors++;
15091
15450
  validate51.errors = vErrors;
@@ -18715,6 +19074,58 @@ function cachedCollectScopeAdmits(cwd, facts) {
18715
19074
  );
18716
19075
  }
18717
19076
 
19077
+ // src/lib/commit-heartbeat.ts
19078
+ import { execFileSync as execFileSync3 } from "child_process";
19079
+ import { mkdirSync as mkdirSync5, readFileSync as readFileSync8, readdirSync as readdirSync3, unlinkSync } from "fs";
19080
+ import { dirname as dirname8, join as join9, resolve as resolve3 } from "path";
19081
+ var FIRED_DIR = "prim/post-commit-fired";
19082
+ var GIT_TIMEOUT_MS3 = 1e3;
19083
+ var MAX_STAMP_BYTES = 1024;
19084
+ var MAX_FIRED_STAMPS = 256;
19085
+ var PRUNE_SLACK = 64;
19086
+ var FULL_SHA_RE = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/u;
19087
+ function gitPath(cwd, relative2) {
19088
+ const value = execFileSync3("git", ["rev-parse", "--git-path", relative2], {
19089
+ cwd,
19090
+ encoding: "utf8",
19091
+ stdio: ["ignore", "pipe", "ignore"],
19092
+ timeout: GIT_TIMEOUT_MS3
19093
+ }).replace(/\r?\n$/u, "");
19094
+ if (value === "" || /[\0\r\n]/u.test(value)) throw new Error("Git returned an unsafe path");
19095
+ return resolve3(cwd, value);
19096
+ }
19097
+ function ensurePrivateParent(path) {
19098
+ mkdirSync5(dirname8(dirname8(path)), { recursive: true, mode: 448 });
19099
+ mkdirSync5(dirname8(path), { recursive: true, mode: 448 });
19100
+ }
19101
+ function writeStamp(path, at) {
19102
+ ensurePrivateParent(path);
19103
+ atomicWriteFile(path, `${JSON.stringify({ at })}
19104
+ `, { mode: 384 });
19105
+ }
19106
+ function readStampAt(path) {
19107
+ try {
19108
+ const raw = readFileSync8(path, "utf8");
19109
+ if (raw.length > MAX_STAMP_BYTES) return void 0;
19110
+ const parsed = JSON.parse(raw);
19111
+ return typeof parsed.at === "number" && Number.isSafeInteger(parsed.at) && parsed.at > 0 ? parsed.at : void 0;
19112
+ } catch {
19113
+ return void 0;
19114
+ }
19115
+ }
19116
+ function recordPostCommitFired(cwd, sha, now = Date.now()) {
19117
+ if (!sha || !FULL_SHA_RE.test(sha)) return;
19118
+ try {
19119
+ const dir = gitPath(cwd, FIRED_DIR);
19120
+ writeStamp(join9(dir, sha), now);
19121
+ const names = readdirSync3(dir).filter((name) => FULL_SHA_RE.test(name));
19122
+ if (names.length <= MAX_FIRED_STAMPS + PRUNE_SLACK) return;
19123
+ const stale = names.map((name) => ({ name, at: readStampAt(join9(dir, name)) ?? 0 })).sort((left, right) => right.at - left.at || left.name.localeCompare(right.name)).slice(MAX_FIRED_STAMPS);
19124
+ for (const { name } of stale) unlinkSync(join9(dir, name));
19125
+ } catch {
19126
+ }
19127
+ }
19128
+
18718
19129
  // src/lib/unattended.ts
18719
19130
  var UNATTENDED_ENV = "PRIM_UNATTENDED";
18720
19131
  function unattendedEnv(env = process.env) {
@@ -18722,7 +19133,7 @@ function unattendedEnv(env = process.env) {
18722
19133
  }
18723
19134
 
18724
19135
  // src/lib/workspace-id.ts
18725
- import { execFileSync as execFileSync3 } from "child_process";
19136
+ import { execFileSync as execFileSync4 } from "child_process";
18726
19137
  import { randomUUID as randomUUID2 } from "crypto";
18727
19138
  import {
18728
19139
  constants as constants2,
@@ -18732,15 +19143,15 @@ import {
18732
19143
  fsyncSync as fsyncSync2,
18733
19144
  linkSync,
18734
19145
  lstatSync as lstatSync2,
18735
- mkdirSync as mkdirSync5,
19146
+ mkdirSync as mkdirSync6,
18736
19147
  openSync as openSync3,
18737
- readFileSync as readFileSync8,
19148
+ readFileSync as readFileSync9,
18738
19149
  statSync as statSync2,
18739
- unlinkSync,
19150
+ unlinkSync as unlinkSync2,
18740
19151
  writeFileSync as writeFileSync3
18741
19152
  } from "fs";
18742
- import { dirname as dirname8, isAbsolute as isAbsolute3, join as join9, resolve as resolve3 } from "path";
18743
- var WORKSPACE_ID_RELATIVE_PATH = join9("prim", "workspace-id");
19153
+ import { dirname as dirname9, isAbsolute as isAbsolute3, join as join10, resolve as resolve4 } from "path";
19154
+ var WORKSPACE_ID_RELATIVE_PATH = join10("prim", "workspace-id");
18744
19155
  var MAX_ANCESTORS = 64;
18745
19156
  var MAX_GIT_FILE_BYTES = 4096;
18746
19157
  var MAX_ID_FILE_BYTES = 128;
@@ -18768,7 +19179,7 @@ function resolveWorkspaceIdPath(cwd) {
18768
19179
  if (fromFilesystem) return { status: "resolved", path: fromFilesystem };
18769
19180
  }
18770
19181
  try {
18771
- const output = execFileSync3(
19182
+ const output = execFileSync4(
18772
19183
  "git",
18773
19184
  ["rev-parse", "--is-inside-work-tree", "--git-path", WORKSPACE_ID_RELATIVE_PATH],
18774
19185
  {
@@ -18780,13 +19191,13 @@ function resolveWorkspaceIdPath(cwd) {
18780
19191
  windowsHide: true
18781
19192
  }
18782
19193
  );
18783
- const [insideWorktree, gitPath, ...extra] = output.trim().split(/\r?\n/);
18784
- if (insideWorktree !== "true" || !gitPath || extra.length > 0 || gitPath.includes("\0")) {
19194
+ const [insideWorktree, gitPath2, ...extra] = output.trim().split(/\r?\n/);
19195
+ if (insideWorktree !== "true" || !gitPath2 || extra.length > 0 || gitPath2.includes("\0")) {
18785
19196
  return { status: "not_git" };
18786
19197
  }
18787
19198
  return {
18788
19199
  status: "resolved",
18789
- path: isAbsolute3(gitPath) ? resolve3(gitPath) : resolve3(cwd, gitPath)
19200
+ path: isAbsolute3(gitPath2) ? resolve4(gitPath2) : resolve4(cwd, gitPath2)
18790
19201
  };
18791
19202
  } catch (error) {
18792
19203
  const code = errorCode(error);
@@ -18797,21 +19208,21 @@ function resolveWorkspaceIdPath(cwd) {
18797
19208
  }
18798
19209
  }
18799
19210
  function resolveFromFilesystem(cwd) {
18800
- let current = resolve3(cwd);
19211
+ let current = resolve4(cwd);
18801
19212
  for (let depth = 0; depth < MAX_ANCESTORS; depth += 1) {
18802
- const dotGit = join9(current, ".git");
19213
+ const dotGit = join10(current, ".git");
18803
19214
  try {
18804
19215
  const stat = lstatSync2(dotGit);
18805
19216
  if (stat.isDirectory() && isGitDirectory(dotGit)) {
18806
- return join9(dotGit, WORKSPACE_ID_RELATIVE_PATH);
19217
+ return join10(dotGit, WORKSPACE_ID_RELATIVE_PATH);
18807
19218
  }
18808
19219
  if (stat.isFile() && stat.size <= MAX_GIT_FILE_BYTES) {
18809
- const contents = readFileSync8(dotGit, "utf8");
19220
+ const contents = readFileSync9(dotGit, "utf8");
18810
19221
  const match = /^gitdir: (.+?)(?:\r?\n)?$/.exec(contents);
18811
19222
  if (match?.[1]) {
18812
- const gitDirectory = isAbsolute3(match[1]) ? resolve3(match[1]) : resolve3(current, match[1]);
19223
+ const gitDirectory = isAbsolute3(match[1]) ? resolve4(match[1]) : resolve4(current, match[1]);
18813
19224
  if (isGitDirectory(gitDirectory)) {
18814
- return join9(gitDirectory, WORKSPACE_ID_RELATIVE_PATH);
19225
+ return join10(gitDirectory, WORKSPACE_ID_RELATIVE_PATH);
18815
19226
  }
18816
19227
  }
18817
19228
  }
@@ -18822,7 +19233,7 @@ function resolveFromFilesystem(cwd) {
18822
19233
  return null;
18823
19234
  }
18824
19235
  }
18825
- const parent = dirname8(current);
19236
+ const parent = dirname9(current);
18826
19237
  if (parent === current) break;
18827
19238
  current = parent;
18828
19239
  }
@@ -18830,7 +19241,7 @@ function resolveFromFilesystem(cwd) {
18830
19241
  }
18831
19242
  function isGitDirectory(path) {
18832
19243
  try {
18833
- return statSync2(join9(path, "HEAD")).isFile();
19244
+ return statSync2(join10(path, "HEAD")).isFile();
18834
19245
  } catch {
18835
19246
  return false;
18836
19247
  }
@@ -18849,7 +19260,7 @@ function inspectPath(path) {
18849
19260
  return { status: "corrupt", path, reason: "invalid_content" };
18850
19261
  }
18851
19262
  try {
18852
- const contents = readFileSync8(path, "utf8");
19263
+ const contents = readFileSync9(path, "utf8");
18853
19264
  const workspaceId = contents.endsWith("\n") ? contents.slice(0, -1) : contents;
18854
19265
  if ((contents === workspaceId || contents === `${workspaceId}
18855
19266
  `) && isCanonicalWorkspaceId(workspaceId)) {
@@ -18866,13 +19277,13 @@ function inspectPath(path) {
18866
19277
  }
18867
19278
  }
18868
19279
  function createWorkspaceId(path) {
18869
- const parent = dirname8(path);
19280
+ const parent = dirname9(path);
18870
19281
  const workspaceId = randomUUID2();
18871
- const temporaryPath = join9(parent, `.workspace-id-${process.pid}-${randomUUID2()}.tmp`);
19282
+ const temporaryPath = join10(parent, `.workspace-id-${process.pid}-${randomUUID2()}.tmp`);
18872
19283
  let temporaryCreated = false;
18873
19284
  let publishing = false;
18874
19285
  try {
18875
- mkdirSync5(parent, { recursive: true, mode: 448 });
19286
+ mkdirSync6(parent, { recursive: true, mode: 448 });
18876
19287
  chmodSync3(parent, 448);
18877
19288
  const fd = openSync3(
18878
19289
  temporaryPath,
@@ -18902,7 +19313,7 @@ function createWorkspaceId(path) {
18902
19313
  } finally {
18903
19314
  if (temporaryCreated) {
18904
19315
  try {
18905
- unlinkSync(temporaryPath);
19316
+ unlinkSync2(temporaryPath);
18906
19317
  } catch {
18907
19318
  }
18908
19319
  }
@@ -18937,8 +19348,8 @@ var AGENT_ENVELOPE_VERSION = 3;
18937
19348
  var ENVELOPE_VERSION = LEGACY_ENVELOPE_VERSION;
18938
19349
 
18939
19350
  // src/hooks/redact.ts
18940
- import { existsSync as existsSync7, readFileSync as readFileSync9, statSync as statSync3 } from "fs";
18941
- import { join as join10 } from "path";
19351
+ import { existsSync as existsSync7, readFileSync as readFileSync10, statSync as statSync3 } from "fs";
19352
+ import { join as join11 } from "path";
18942
19353
  import { Worker } from "worker_threads";
18943
19354
  var USER_HOME_RULES = [
18944
19355
  {
@@ -19114,9 +19525,9 @@ function toCommitMove(commit, cliVersion, cwd, context = {}) {
19114
19525
  }
19115
19526
 
19116
19527
  // src/hooks/post-commit.ts
19117
- var here = dirname9(fileURLToPath(import.meta.url));
19118
- var GIT_TIMEOUT_MS3 = 1e3;
19119
- var FULL_SHA_RE = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/u;
19528
+ var here = dirname10(fileURLToPath(import.meta.url));
19529
+ var GIT_TIMEOUT_MS4 = 1e3;
19530
+ var FULL_SHA_RE2 = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/u;
19120
19531
  var OBSERVATION_MARKER_RE = /^prim-post-commit-observed\.[A-Za-z0-9]+$/u;
19121
19532
  var MAX_OBSERVATION_MARKER_AGE_MS = 10 * 60 * 1e3;
19122
19533
  var MAX_OBSERVATION_MARKER_FUTURE_SKEW_MS = 5e3;
@@ -19137,10 +19548,10 @@ function capturedAtFromLauncher(env = process.env, now = Date.now()) {
19137
19548
  }
19138
19549
  function gitText(args) {
19139
19550
  try {
19140
- return execFileSync4("git", args, {
19551
+ return execFileSync5("git", args, {
19141
19552
  encoding: "utf-8",
19142
19553
  stdio: ["ignore", "pipe", "ignore"],
19143
- timeout: GIT_TIMEOUT_MS3
19554
+ timeout: GIT_TIMEOUT_MS4
19144
19555
  }).trim();
19145
19556
  } catch {
19146
19557
  return;
@@ -19148,10 +19559,10 @@ function gitText(args) {
19148
19559
  }
19149
19560
  function gitBytes(args) {
19150
19561
  try {
19151
- return execFileSync4("git", args, {
19562
+ return execFileSync5("git", args, {
19152
19563
  encoding: "buffer",
19153
19564
  stdio: ["ignore", "pipe", "ignore"],
19154
- timeout: GIT_TIMEOUT_MS3
19565
+ timeout: GIT_TIMEOUT_MS4
19155
19566
  });
19156
19567
  } catch {
19157
19568
  return;
@@ -19182,7 +19593,7 @@ function parseNulPaths(value) {
19182
19593
  function readCommit() {
19183
19594
  const snapshotProvided = process.env.PRIM_COMMIT_SHA !== void 0;
19184
19595
  const sha = snapshotProvided ? process.env.PRIM_COMMIT_SHA : gitText(["rev-parse", "HEAD"]);
19185
- if (!sha || !FULL_SHA_RE.test(sha)) {
19596
+ if (!sha || !FULL_SHA_RE2.test(sha)) {
19186
19597
  return null;
19187
19598
  }
19188
19599
  const rawBranch = process.env.PRIM_COMMIT_BRANCH !== void 0 ? process.env.PRIM_COMMIT_BRANCH : gitText(["rev-parse", "--abbrev-ref", "HEAD"]);
@@ -19208,14 +19619,14 @@ function readCommit() {
19208
19619
  }
19209
19620
  function resolveCliVersion() {
19210
19621
  try {
19211
- const pkg = JSON.parse(readFileSync10(join11(here, "..", "..", "package.json"), "utf-8"));
19622
+ const pkg = JSON.parse(readFileSync11(join12(here, "..", "..", "package.json"), "utf-8"));
19212
19623
  return pkg.version ?? "unknown";
19213
19624
  } catch {
19214
19625
  return "unknown";
19215
19626
  }
19216
19627
  }
19217
19628
  function spawnBackgroundFlush() {
19218
- const entry = join11(here, "..", "index.js");
19629
+ const entry = join12(here, "..", "index.js");
19219
19630
  spawn(process.execPath, [entry, "moves", "flush"], {
19220
19631
  detached: true,
19221
19632
  stdio: "ignore",
@@ -19224,6 +19635,7 @@ function spawnBackgroundFlush() {
19224
19635
  }
19225
19636
  function runPostCommit() {
19226
19637
  const cwd = gitText(["rev-parse", "--show-toplevel"]) ?? process.cwd();
19638
+ recordPostCommitFired(cwd, process.env.PRIM_COMMIT_SHA);
19227
19639
  if (!isRepoActiveForCapture(cwd)) {
19228
19640
  return;
19229
19641
  }