@primitive.ai/prim 0.1.0-alpha.94 → 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 (40) hide show
  1. package/README.md +7 -4
  2. package/dist/{chunk-UKUAAAXE.js → chunk-27ADT6FQ.js} +2 -2
  3. package/dist/{chunk-OTHKG76J.js → chunk-35FMRWJH.js} +1 -1
  4. package/dist/{chunk-DXJQR4QI.js → chunk-4GHANPWQ.js} +2 -2
  5. package/dist/{chunk-WUXFLE7X.js → chunk-7KABYYWG.js} +64 -66
  6. package/dist/{chunk-LFFLHSQO.js → chunk-CU7RW7XU.js} +63 -6
  7. package/dist/{chunk-H4UNYFUC.js → chunk-DHOQGHKQ.js} +184 -1
  8. package/dist/{chunk-2GP5UFV7.js → chunk-DWRSEC34.js} +5 -3
  9. package/dist/{chunk-O7YAW7G6.js → chunk-FVDBULGZ.js} +9 -11
  10. package/dist/{chunk-G2VMA2QO.js → chunk-LY6NJ7KL.js} +6 -4
  11. package/dist/{chunk-ZB4F75SZ.js → chunk-MXVCP33E.js} +5 -1
  12. package/dist/{chunk-TYAHC25F.js → chunk-QCBB5HFX.js} +1 -1
  13. package/dist/{chunk-IMK4JKTA.js → chunk-RK4ZS3HG.js} +2 -2
  14. package/dist/{chunk-ZU563PQI.js → chunk-ROLYLXJS.js} +2 -2
  15. package/dist/{chunk-OH3EZXYX.js → chunk-UO2U6IKF.js} +1 -1
  16. package/dist/{chunk-K7D2EYBS.js → chunk-URLLSALP.js} +2 -2
  17. package/dist/{chunk-FXF4JWK2.js → chunk-XEDJ5N3M.js} +17 -2
  18. package/dist/{chunk-AXQQMX2U.js → chunk-Y5W4TZM7.js} +2 -2
  19. package/dist/{chunk-ICM2XCXS.js → chunk-YYE2NLWX.js} +2 -2
  20. package/dist/{chunk-DSWT6BCC.js → chunk-Z6NPNLOT.js} +825 -665
  21. package/dist/daemon/server.js +836 -540
  22. package/dist/hook-runtime/daemon/server.js +836 -540
  23. package/dist/hook-runtime/hooks/post-commit.js +836 -540
  24. package/dist/hook-runtime/hooks/post-rewrite.js +836 -540
  25. package/dist/hook-runtime/hooks/post-tool-use.js +1160 -791
  26. package/dist/hook-runtime/hooks/pre-tool-use.js +2060 -1751
  27. package/dist/hook-runtime/hooks/prim-hook.js +1257 -856
  28. package/dist/hook-runtime/hooks/session-end.js +179 -129
  29. package/dist/hook-runtime/hooks/session-start.js +938 -640
  30. package/dist/hook-runtime/index.js +892 -554
  31. package/dist/hooks/post-commit.js +11 -11
  32. package/dist/hooks/post-rewrite.js +10 -10
  33. package/dist/hooks/post-tool-use.js +20 -20
  34. package/dist/hooks/pre-commit.js +4 -4
  35. package/dist/hooks/pre-tool-use.js +29 -17
  36. package/dist/hooks/prim-hook.js +22 -18
  37. package/dist/hooks/session-end.js +11 -5
  38. package/dist/hooks/session-start.js +26 -22
  39. package/dist/index.js +79 -60
  40. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  getClient,
3
3
  terminalSafeLine
4
- } from "./chunk-G2VMA2QO.js";
4
+ } from "./chunk-LY6NJ7KL.js";
5
5
  import {
6
- gitToplevel,
7
- githubRepositoryFullName
8
- } from "./chunk-H4UNYFUC.js";
6
+ localGitConfigValue,
7
+ setLocalGitConfigValue
8
+ } from "./chunk-DHOQGHKQ.js";
9
9
  import {
10
10
  __commonJS,
11
11
  __toESM
12
- } from "./chunk-2GP5UFV7.js";
12
+ } from "./chunk-DWRSEC34.js";
13
13
 
14
14
  // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js
15
15
  var require_ucs2length = __commonJS({
@@ -37,132 +37,6 @@ var require_ucs2length = __commonJS({
37
37
  }
38
38
  });
39
39
 
40
- // src/lib/activation.ts
41
- import { execFileSync } from "child_process";
42
- import { existsSync, readFileSync } from "fs";
43
- import { homedir } from "os";
44
- import { join } from "path";
45
- var PRIM_ACTIVE_KEY = "prim.active";
46
- var PRIM_REPO_SYNC_ID_KEY = "prim.repoSyncId";
47
- var PRIM_REPO_SYNC_REPOSITORY_KEY = "prim.repoSyncRepository";
48
- var PRIM_REPO_BINDING_STATE_KEY = "prim.repoBindingState";
49
- var GIT_TIMEOUT_MS = 1e3;
50
- var REPO_SYNC_ID_RE = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
51
- var PROJECT_INSTALL_FILES = [".claude/settings.json", ".codex/hooks.json", ".cursor/hooks.json"];
52
- var PRIM_HOOK_BINS = ["prim-hook", "prim-pre-tool-use", "prim-post-tool-use"];
53
- function repoActiveFlag(cwd) {
54
- try {
55
- const value = execFileSync("git", ["config", "--get", PRIM_ACTIVE_KEY], {
56
- cwd,
57
- encoding: "utf-8",
58
- stdio: ["ignore", "pipe", "ignore"],
59
- timeout: GIT_TIMEOUT_MS
60
- }).trim();
61
- if (value === "true") return "true";
62
- if (value === "false") return "false";
63
- return void 0;
64
- } catch {
65
- return void 0;
66
- }
67
- }
68
- function isRepoActive(cwd) {
69
- return repoActiveFlag(cwd) === "true";
70
- }
71
- function setRepoActive(cwd, active) {
72
- execFileSync("git", ["config", "--local", PRIM_ACTIVE_KEY, active ? "true" : "false"], {
73
- cwd,
74
- stdio: ["ignore", "ignore", "pipe"],
75
- timeout: GIT_TIMEOUT_MS
76
- });
77
- }
78
- function isValidRepoSyncId(value) {
79
- return typeof value === "string" && REPO_SYNC_ID_RE.test(value);
80
- }
81
- function localGitConfigValue(cwd, key) {
82
- try {
83
- const value = execFileSync("git", ["config", "--local", "--get", key], {
84
- cwd,
85
- encoding: "utf-8",
86
- stdio: ["ignore", "pipe", "ignore"],
87
- timeout: GIT_TIMEOUT_MS
88
- }).trim();
89
- return value || void 0;
90
- } catch {
91
- return void 0;
92
- }
93
- }
94
- function setLocalGitConfigValue(cwd, key, value) {
95
- execFileSync("git", ["config", "--local", key, value], {
96
- cwd,
97
- stdio: ["ignore", "ignore", "pipe"],
98
- timeout: GIT_TIMEOUT_MS
99
- });
100
- }
101
- function repoSyncId(cwd) {
102
- const value = localGitConfigValue(cwd, PRIM_REPO_SYNC_ID_KEY);
103
- if (!isValidRepoSyncId(value)) return void 0;
104
- const repositoryFullName = localGitConfigValue(cwd, PRIM_REPO_SYNC_REPOSITORY_KEY);
105
- return repositoryFullName === githubRepositoryFullName(cwd) ? value : void 0;
106
- }
107
- function setRepoSyncId(cwd, value, repositoryFullName) {
108
- if (!isValidRepoSyncId(value)) {
109
- throw new Error("invalid repository binding returned by server");
110
- }
111
- execFileSync("git", ["config", "--local", PRIM_REPO_SYNC_ID_KEY, value], {
112
- cwd,
113
- stdio: ["ignore", "ignore", "pipe"],
114
- timeout: GIT_TIMEOUT_MS
115
- });
116
- execFileSync("git", ["config", "--local", PRIM_REPO_SYNC_REPOSITORY_KEY, repositoryFullName], {
117
- cwd,
118
- stdio: ["ignore", "ignore", "pipe"],
119
- timeout: GIT_TIMEOUT_MS
120
- });
121
- }
122
- function setRepositoryBindingState(cwd, state) {
123
- if (state !== "connected" && state !== "unbound" && state !== "invalid") {
124
- throw new Error("invalid repository binding state");
125
- }
126
- execFileSync("git", ["config", "--local", PRIM_REPO_BINDING_STATE_KEY, state], {
127
- cwd,
128
- stdio: ["ignore", "ignore", "pipe"],
129
- timeout: GIT_TIMEOUT_MS
130
- });
131
- }
132
- function repositoryBindingState(cwd) {
133
- const rawId = localGitConfigValue(cwd, PRIM_REPO_SYNC_ID_KEY);
134
- const marker = localGitConfigValue(cwd, PRIM_REPO_BINDING_STATE_KEY);
135
- if (rawId !== void 0 && !isValidRepoSyncId(rawId)) return "invalid";
136
- if (marker === "unbound" || marker === "invalid") return marker;
137
- if (marker === "connected") return repoSyncId(cwd) ? "connected" : "invalid";
138
- if (marker !== void 0) return "invalid";
139
- return rawId === void 0 ? "unbound" : repoSyncId(cwd) ? void 0 : "unbound";
140
- }
141
- function hasProjectPrimInstall(cwd) {
142
- const root = gitToplevel(cwd);
143
- if (root === null || root === homedir()) return false;
144
- for (const rel of PROJECT_INSTALL_FILES) {
145
- const path = join(root, rel);
146
- if (existsSync(path)) {
147
- try {
148
- const content = readFileSync(path, "utf-8");
149
- if (PRIM_HOOK_BINS.some((bin) => content.includes(bin))) return true;
150
- } catch {
151
- }
152
- }
153
- }
154
- return false;
155
- }
156
- function isRepoActiveForCapture(cwd) {
157
- const flag = repoActiveFlag(cwd);
158
- if (flag === "true") return true;
159
- if (flag === "false") return false;
160
- return hasProjectPrimInstall(cwd);
161
- }
162
- function decisionIngestionStatus(cwd) {
163
- return isRepoActiveForCapture(cwd) ? "enabled" : "disabled";
164
- }
165
-
166
40
  // src/generated/cli-http-v1.validators.js
167
41
  var import_ucs2length = __toESM(require_ucs2length(), 1);
168
42
  var schema33 = { "type": "object", "properties": { "authenticated": { "type": "boolean", "const": true }, "organizationBindingVersion": { "type": "number", "const": 1 }, "captureAuthorityKind": { "type": "string", "enum": ["workos", "service_token"] }, "organizationId": { "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] }, "workosOrganizationId": { "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] } }, "required": ["authenticated", "organizationBindingVersion", "captureAuthorityKind", "organizationId", "workosOrganizationId"], "additionalProperties": false };
@@ -11250,7 +11124,6 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
11250
11124
  }
11251
11125
  validate45.evaluated = { "dynamicProps": true, "dynamicItems": false };
11252
11126
  var isGitHubInstallIntentStartErrorResponse = validate46;
11253
- 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 }] };
11254
11127
  function validate46(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
11255
11128
  ;
11256
11129
  let vErrors = null;
@@ -11400,7 +11273,7 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11400
11273
  if (errors === _errs12) {
11401
11274
  if (data && typeof data == "object" && !Array.isArray(data)) {
11402
11275
  let missing2;
11403
- if (data.error === void 0 && (missing2 = "error") || data.feature === void 0 && (missing2 = "feature")) {
11276
+ if (data.error === void 0 && (missing2 = "error")) {
11404
11277
  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 + "'" };
11405
11278
  if (vErrors === null) {
11406
11279
  vErrors = [err10];
@@ -11411,7 +11284,7 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11411
11284
  } else {
11412
11285
  const _errs14 = errors;
11413
11286
  for (const key2 in data) {
11414
- if (!(key2 === "error" || key2 === "feature")) {
11287
+ if (!(key2 === "error")) {
11415
11288
  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" };
11416
11289
  if (vErrors === null) {
11417
11290
  vErrors = [err11];
@@ -11425,7 +11298,6 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11425
11298
  if (_errs14 === errors) {
11426
11299
  if (data.error !== void 0) {
11427
11300
  let data2 = data.error;
11428
- const _errs15 = errors;
11429
11301
  if (typeof data2 !== "string") {
11430
11302
  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" };
11431
11303
  if (vErrors === null) {
@@ -11435,8 +11307,8 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11435
11307
  }
11436
11308
  errors++;
11437
11309
  }
11438
- if ("feature_disabled" !== data2) {
11439
- 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" };
11310
+ if ("github_connect_unavailable" !== data2) {
11311
+ 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" };
11440
11312
  if (vErrors === null) {
11441
11313
  vErrors = [err13];
11442
11314
  } else {
@@ -11444,45 +11316,15 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11444
11316
  }
11445
11317
  errors++;
11446
11318
  }
11447
- var valid4 = _errs15 === errors;
11448
- } else {
11449
- var valid4 = true;
11450
- }
11451
- if (valid4) {
11452
- if (data.feature !== void 0) {
11453
- let data3 = data.feature;
11454
- const _errs17 = errors;
11455
- if (typeof data3 !== "string") {
11456
- 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" };
11457
- if (vErrors === null) {
11458
- vErrors = [err14];
11459
- } else {
11460
- vErrors.push(err14);
11461
- }
11462
- errors++;
11463
- }
11464
- if ("github-connect" !== data3) {
11465
- 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" };
11466
- if (vErrors === null) {
11467
- vErrors = [err15];
11468
- } else {
11469
- vErrors.push(err15);
11470
- }
11471
- errors++;
11472
- }
11473
- var valid4 = _errs17 === errors;
11474
- } else {
11475
- var valid4 = true;
11476
- }
11477
11319
  }
11478
11320
  }
11479
11321
  }
11480
11322
  } else {
11481
- 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" };
11323
+ 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" };
11482
11324
  if (vErrors === null) {
11483
- vErrors = [err16];
11325
+ vErrors = [err14];
11484
11326
  } else {
11485
- vErrors.push(err16);
11327
+ vErrors.push(err14);
11486
11328
  }
11487
11329
  errors++;
11488
11330
  }
@@ -11494,148 +11336,117 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11494
11336
  props0 = true;
11495
11337
  }
11496
11338
  }
11497
- const _errs19 = errors;
11498
- if (errors === _errs19) {
11339
+ const _errs17 = errors;
11340
+ if (errors === _errs17) {
11499
11341
  if (data && typeof data == "object" && !Array.isArray(data)) {
11500
11342
  let missing3;
11501
- if (data.error === void 0 && (missing3 = "error") || data.feature === void 0 && (missing3 = "feature")) {
11502
- 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 + "'" };
11343
+ if (data.error === void 0 && (missing3 = "error")) {
11344
+ 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 + "'" };
11503
11345
  if (vErrors === null) {
11504
- vErrors = [err17];
11346
+ vErrors = [err15];
11505
11347
  } else {
11506
- vErrors.push(err17);
11348
+ vErrors.push(err15);
11507
11349
  }
11508
11350
  errors++;
11509
11351
  } else {
11510
- const _errs21 = errors;
11352
+ const _errs19 = errors;
11511
11353
  for (const key3 in data) {
11512
- if (!(key3 === "error" || key3 === "feature")) {
11513
- 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" };
11354
+ if (!(key3 === "error")) {
11355
+ 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" };
11514
11356
  if (vErrors === null) {
11515
- vErrors = [err18];
11357
+ vErrors = [err16];
11516
11358
  } else {
11517
- vErrors.push(err18);
11359
+ vErrors.push(err16);
11518
11360
  }
11519
11361
  errors++;
11520
11362
  break;
11521
11363
  }
11522
11364
  }
11523
- if (_errs21 === errors) {
11365
+ if (_errs19 === errors) {
11524
11366
  if (data.error !== void 0) {
11525
- let data4 = data.error;
11526
- const _errs22 = errors;
11527
- if (typeof data4 !== "string") {
11528
- 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" };
11367
+ let data3 = data.error;
11368
+ if (typeof data3 !== "string") {
11369
+ 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" };
11529
11370
  if (vErrors === null) {
11530
- vErrors = [err19];
11371
+ vErrors = [err17];
11531
11372
  } else {
11532
- vErrors.push(err19);
11373
+ vErrors.push(err17);
11533
11374
  }
11534
11375
  errors++;
11535
11376
  }
11536
- if (!(data4 === "github_connect_unavailable" || data4 === "feature_check_unavailable")) {
11537
- 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" };
11377
+ if ("WorkOS identity authority is temporarily unavailable" !== data3) {
11378
+ 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" };
11538
11379
  if (vErrors === null) {
11539
- vErrors = [err20];
11380
+ vErrors = [err18];
11540
11381
  } else {
11541
- vErrors.push(err20);
11382
+ vErrors.push(err18);
11542
11383
  }
11543
11384
  errors++;
11544
11385
  }
11545
- var valid5 = _errs22 === errors;
11546
- } else {
11547
- var valid5 = true;
11548
- }
11549
- if (valid5) {
11550
- if (data.feature !== void 0) {
11551
- let data5 = data.feature;
11552
- const _errs24 = errors;
11553
- if (typeof data5 !== "string") {
11554
- 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" };
11555
- if (vErrors === null) {
11556
- vErrors = [err21];
11557
- } else {
11558
- vErrors.push(err21);
11559
- }
11560
- errors++;
11561
- }
11562
- if ("github-connect" !== data5) {
11563
- 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" };
11564
- if (vErrors === null) {
11565
- vErrors = [err22];
11566
- } else {
11567
- vErrors.push(err22);
11568
- }
11569
- errors++;
11570
- }
11571
- var valid5 = _errs24 === errors;
11572
- } else {
11573
- var valid5 = true;
11574
- }
11575
11386
  }
11576
11387
  }
11577
11388
  }
11578
11389
  } else {
11579
- 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" };
11390
+ 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" };
11580
11391
  if (vErrors === null) {
11581
- vErrors = [err23];
11392
+ vErrors = [err19];
11582
11393
  } else {
11583
- vErrors.push(err23);
11394
+ vErrors.push(err19);
11584
11395
  }
11585
11396
  errors++;
11586
11397
  }
11587
11398
  }
11588
- var _valid0 = _errs19 === errors;
11399
+ var _valid0 = _errs17 === errors;
11589
11400
  valid1 = valid1 || _valid0;
11590
11401
  if (_valid0) {
11591
11402
  if (props0 !== true) {
11592
11403
  props0 = true;
11593
11404
  }
11594
11405
  }
11595
- const _errs26 = errors;
11596
- if (errors === _errs26) {
11406
+ const _errs22 = errors;
11407
+ if (errors === _errs22) {
11597
11408
  if (data && typeof data == "object" && !Array.isArray(data)) {
11598
11409
  let missing4;
11599
11410
  if (data.error === void 0 && (missing4 = "error")) {
11600
- 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 + "'" };
11411
+ 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 + "'" };
11601
11412
  if (vErrors === null) {
11602
- vErrors = [err24];
11413
+ vErrors = [err20];
11603
11414
  } else {
11604
- vErrors.push(err24);
11415
+ vErrors.push(err20);
11605
11416
  }
11606
11417
  errors++;
11607
11418
  } else {
11608
- const _errs28 = errors;
11419
+ const _errs24 = errors;
11609
11420
  for (const key4 in data) {
11610
11421
  if (!(key4 === "error")) {
11611
- 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" };
11422
+ 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" };
11612
11423
  if (vErrors === null) {
11613
- vErrors = [err25];
11424
+ vErrors = [err21];
11614
11425
  } else {
11615
- vErrors.push(err25);
11426
+ vErrors.push(err21);
11616
11427
  }
11617
11428
  errors++;
11618
11429
  break;
11619
11430
  }
11620
11431
  }
11621
- if (_errs28 === errors) {
11432
+ if (_errs24 === errors) {
11622
11433
  if (data.error !== void 0) {
11623
- let data6 = data.error;
11624
- if (typeof data6 !== "string") {
11625
- 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" };
11434
+ let data4 = data.error;
11435
+ if (typeof data4 !== "string") {
11436
+ 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" };
11626
11437
  if (vErrors === null) {
11627
- vErrors = [err26];
11438
+ vErrors = [err22];
11628
11439
  } else {
11629
- vErrors.push(err26);
11440
+ vErrors.push(err22);
11630
11441
  }
11631
11442
  errors++;
11632
11443
  }
11633
- if ("WorkOS identity authority is temporarily unavailable" !== data6) {
11634
- 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" };
11444
+ if ("github_install_intent_conflict" !== data4) {
11445
+ 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" };
11635
11446
  if (vErrors === null) {
11636
- vErrors = [err27];
11447
+ vErrors = [err23];
11637
11448
  } else {
11638
- vErrors.push(err27);
11449
+ vErrors.push(err23);
11639
11450
  }
11640
11451
  errors++;
11641
11452
  }
@@ -11643,195 +11454,128 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11643
11454
  }
11644
11455
  }
11645
11456
  } else {
11646
- 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" };
11457
+ 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" };
11647
11458
  if (vErrors === null) {
11648
- vErrors = [err28];
11459
+ vErrors = [err24];
11649
11460
  } else {
11650
- vErrors.push(err28);
11461
+ vErrors.push(err24);
11651
11462
  }
11652
11463
  errors++;
11653
11464
  }
11654
11465
  }
11655
- var _valid0 = _errs26 === errors;
11466
+ var _valid0 = _errs22 === errors;
11656
11467
  valid1 = valid1 || _valid0;
11657
11468
  if (_valid0) {
11658
11469
  if (props0 !== true) {
11659
11470
  props0 = true;
11660
11471
  }
11661
11472
  }
11662
- const _errs31 = errors;
11663
- if (errors === _errs31) {
11473
+ const _errs27 = errors;
11474
+ if (errors === _errs27) {
11664
11475
  if (data && typeof data == "object" && !Array.isArray(data)) {
11665
11476
  let missing5;
11666
- if (data.error === void 0 && (missing5 = "error")) {
11667
- 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 + "'" };
11477
+ if (data.error === void 0 && (missing5 = "error") || data.retryAt === void 0 && (missing5 = "retryAt")) {
11478
+ 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 + "'" };
11668
11479
  if (vErrors === null) {
11669
- vErrors = [err29];
11480
+ vErrors = [err25];
11670
11481
  } else {
11671
- vErrors.push(err29);
11482
+ vErrors.push(err25);
11672
11483
  }
11673
11484
  errors++;
11674
11485
  } else {
11675
- const _errs33 = errors;
11486
+ const _errs29 = errors;
11676
11487
  for (const key5 in data) {
11677
- if (!(key5 === "error")) {
11678
- 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" };
11679
- if (vErrors === null) {
11680
- vErrors = [err30];
11681
- } else {
11682
- vErrors.push(err30);
11683
- }
11684
- errors++;
11685
- break;
11686
- }
11687
- }
11688
- if (_errs33 === errors) {
11689
- if (data.error !== void 0) {
11690
- let data7 = data.error;
11691
- if (typeof data7 !== "string") {
11692
- 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" };
11693
- if (vErrors === null) {
11694
- vErrors = [err31];
11695
- } else {
11696
- vErrors.push(err31);
11697
- }
11698
- errors++;
11699
- }
11700
- if ("github_install_intent_conflict" !== data7) {
11701
- 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" };
11702
- if (vErrors === null) {
11703
- vErrors = [err32];
11704
- } else {
11705
- vErrors.push(err32);
11706
- }
11707
- errors++;
11708
- }
11709
- }
11710
- }
11711
- }
11712
- } else {
11713
- 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" };
11714
- if (vErrors === null) {
11715
- vErrors = [err33];
11716
- } else {
11717
- vErrors.push(err33);
11718
- }
11719
- errors++;
11720
- }
11721
- }
11722
- var _valid0 = _errs31 === errors;
11723
- valid1 = valid1 || _valid0;
11724
- if (_valid0) {
11725
- if (props0 !== true) {
11726
- props0 = true;
11727
- }
11728
- }
11729
- const _errs36 = errors;
11730
- if (errors === _errs36) {
11731
- if (data && typeof data == "object" && !Array.isArray(data)) {
11732
- let missing6;
11733
- if (data.error === void 0 && (missing6 = "error") || data.retryAt === void 0 && (missing6 = "retryAt")) {
11734
- 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 + "'" };
11735
- if (vErrors === null) {
11736
- vErrors = [err34];
11737
- } else {
11738
- vErrors.push(err34);
11739
- }
11740
- errors++;
11741
- } else {
11742
- const _errs38 = errors;
11743
- for (const key6 in data) {
11744
- if (!(key6 === "error" || key6 === "retryAt")) {
11745
- 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" };
11488
+ if (!(key5 === "error" || key5 === "retryAt")) {
11489
+ 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" };
11746
11490
  if (vErrors === null) {
11747
- vErrors = [err35];
11491
+ vErrors = [err26];
11748
11492
  } else {
11749
- vErrors.push(err35);
11493
+ vErrors.push(err26);
11750
11494
  }
11751
11495
  errors++;
11752
11496
  break;
11753
11497
  }
11754
11498
  }
11755
- if (_errs38 === errors) {
11499
+ if (_errs29 === errors) {
11756
11500
  if (data.error !== void 0) {
11757
- let data8 = data.error;
11758
- const _errs39 = errors;
11759
- if (typeof data8 !== "string") {
11760
- 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" };
11501
+ let data5 = data.error;
11502
+ const _errs30 = errors;
11503
+ if (typeof data5 !== "string") {
11504
+ 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" };
11761
11505
  if (vErrors === null) {
11762
- vErrors = [err36];
11506
+ vErrors = [err27];
11763
11507
  } else {
11764
- vErrors.push(err36);
11508
+ vErrors.push(err27);
11765
11509
  }
11766
11510
  errors++;
11767
11511
  }
11768
- if ("github_install_intent_rate_limited" !== data8) {
11769
- 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" };
11512
+ if ("github_install_intent_rate_limited" !== data5) {
11513
+ 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" };
11770
11514
  if (vErrors === null) {
11771
- vErrors = [err37];
11515
+ vErrors = [err28];
11772
11516
  } else {
11773
- vErrors.push(err37);
11517
+ vErrors.push(err28);
11774
11518
  }
11775
11519
  errors++;
11776
11520
  }
11777
- var valid8 = _errs39 === errors;
11521
+ var valid7 = _errs30 === errors;
11778
11522
  } else {
11779
- var valid8 = true;
11523
+ var valid7 = true;
11780
11524
  }
11781
- if (valid8) {
11525
+ if (valid7) {
11782
11526
  if (data.retryAt !== void 0) {
11783
- let data9 = data.retryAt;
11784
- const _errs41 = errors;
11785
- if (!(typeof data9 == "number" && (!(data9 % 1) && !isNaN(data9)) && isFinite(data9))) {
11786
- 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" };
11527
+ let data6 = data.retryAt;
11528
+ const _errs32 = errors;
11529
+ if (!(typeof data6 == "number" && (!(data6 % 1) && !isNaN(data6)) && isFinite(data6))) {
11530
+ 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" };
11787
11531
  if (vErrors === null) {
11788
- vErrors = [err38];
11532
+ vErrors = [err29];
11789
11533
  } else {
11790
- vErrors.push(err38);
11534
+ vErrors.push(err29);
11791
11535
  }
11792
11536
  errors++;
11793
11537
  }
11794
- if (errors === _errs41) {
11795
- if (typeof data9 == "number" && isFinite(data9)) {
11796
- if (data9 > 9007199254740991 || isNaN(data9)) {
11797
- 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" };
11538
+ if (errors === _errs32) {
11539
+ if (typeof data6 == "number" && isFinite(data6)) {
11540
+ if (data6 > 9007199254740991 || isNaN(data6)) {
11541
+ 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" };
11798
11542
  if (vErrors === null) {
11799
- vErrors = [err39];
11543
+ vErrors = [err30];
11800
11544
  } else {
11801
- vErrors.push(err39);
11545
+ vErrors.push(err30);
11802
11546
  }
11803
11547
  errors++;
11804
11548
  } else {
11805
- if (data9 < 0 || isNaN(data9)) {
11806
- 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" };
11549
+ if (data6 < 0 || isNaN(data6)) {
11550
+ 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" };
11807
11551
  if (vErrors === null) {
11808
- vErrors = [err40];
11552
+ vErrors = [err31];
11809
11553
  } else {
11810
- vErrors.push(err40);
11554
+ vErrors.push(err31);
11811
11555
  }
11812
11556
  errors++;
11813
11557
  }
11814
11558
  }
11815
11559
  }
11816
11560
  }
11817
- var valid8 = _errs41 === errors;
11561
+ var valid7 = _errs32 === errors;
11818
11562
  } else {
11819
- var valid8 = true;
11563
+ var valid7 = true;
11820
11564
  }
11821
11565
  }
11822
11566
  }
11823
11567
  }
11824
11568
  } else {
11825
- 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" };
11569
+ 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" };
11826
11570
  if (vErrors === null) {
11827
- vErrors = [err41];
11571
+ vErrors = [err32];
11828
11572
  } else {
11829
- vErrors.push(err41);
11573
+ vErrors.push(err32);
11830
11574
  }
11831
11575
  errors++;
11832
11576
  }
11833
11577
  }
11834
- var _valid0 = _errs36 === errors;
11578
+ var _valid0 = _errs27 === errors;
11835
11579
  valid1 = valid1 || _valid0;
11836
11580
  if (_valid0) {
11837
11581
  if (props0 !== true) {
@@ -11839,11 +11583,11 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
11839
11583
  }
11840
11584
  }
11841
11585
  if (!valid1) {
11842
- 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" };
11586
+ 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" };
11843
11587
  if (vErrors === null) {
11844
- vErrors = [err42];
11588
+ vErrors = [err33];
11845
11589
  } else {
11846
- vErrors.push(err42);
11590
+ vErrors.push(err33);
11847
11591
  }
11848
11592
  errors++;
11849
11593
  validate46.errors = vErrors;
@@ -13948,7 +13692,7 @@ function validate50(data, { instancePath = "", parentData, parentDataProperty, r
13948
13692
  }
13949
13693
  validate50.evaluated = { "dynamicProps": true, "dynamicItems": false };
13950
13694
  var isMoveIngestRequest = validate51;
13951
- 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": {} };
13695
+ 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": {} };
13952
13696
  var pattern8 = new RegExp("^[A-Za-z0-9_-]+$", "u");
13953
13697
  function validate51(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
13954
13698
  ;
@@ -14075,13 +13819,18 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
14075
13819
  var valid4 = true;
14076
13820
  }
14077
13821
  if (valid4) {
14078
- if (data1.capturedOrganizationId !== void 0) {
14079
- let data7 = data1.capturedOrganizationId;
13822
+ if (data1.repositoryContext !== void 0) {
13823
+ let data7 = data1.repositoryContext;
14080
13824
  const _errs20 = errors;
14081
- if (errors === _errs20) {
14082
- if (typeof data7 === "string") {
14083
- if (func1(data7) > 128) {
14084
- 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" };
13825
+ const _errs21 = errors;
13826
+ let valid5 = false;
13827
+ let passing0 = null;
13828
+ const _errs22 = errors;
13829
+ if (errors === _errs22) {
13830
+ if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
13831
+ let missing2;
13832
+ if (data7.kind === void 0 && (missing2 = "kind") || data7.repoSyncId === void 0 && (missing2 = "repoSyncId")) {
13833
+ 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 + "'" };
14085
13834
  if (vErrors === null) {
14086
13835
  vErrors = [err6];
14087
13836
  } else {
@@ -14089,184 +13838,392 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
14089
13838
  }
14090
13839
  errors++;
14091
13840
  } else {
14092
- if (func1(data7) < 1) {
14093
- 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" };
14094
- if (vErrors === null) {
14095
- vErrors = [err7];
14096
- } else {
14097
- vErrors.push(err7);
14098
- }
14099
- errors++;
14100
- } else {
14101
- if (!pattern8.test(data7)) {
14102
- 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_-]+$"' };
13841
+ const _errs24 = errors;
13842
+ for (const key0 in data7) {
13843
+ if (!(key0 === "kind" || key0 === "repoSyncId")) {
13844
+ 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" };
14103
13845
  if (vErrors === null) {
14104
- vErrors = [err8];
13846
+ vErrors = [err7];
14105
13847
  } else {
14106
- vErrors.push(err8);
13848
+ vErrors.push(err7);
14107
13849
  }
14108
13850
  errors++;
13851
+ break;
13852
+ }
13853
+ }
13854
+ if (_errs24 === errors) {
13855
+ if (data7.kind !== void 0) {
13856
+ let data8 = data7.kind;
13857
+ const _errs25 = errors;
13858
+ if (typeof data8 !== "string") {
13859
+ 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" };
13860
+ if (vErrors === null) {
13861
+ vErrors = [err8];
13862
+ } else {
13863
+ vErrors.push(err8);
13864
+ }
13865
+ errors++;
13866
+ }
13867
+ if ("repository_bound" !== data8) {
13868
+ 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" };
13869
+ if (vErrors === null) {
13870
+ vErrors = [err9];
13871
+ } else {
13872
+ vErrors.push(err9);
13873
+ }
13874
+ errors++;
13875
+ }
13876
+ var valid6 = _errs25 === errors;
13877
+ } else {
13878
+ var valid6 = true;
13879
+ }
13880
+ if (valid6) {
13881
+ if (data7.repoSyncId !== void 0) {
13882
+ let data9 = data7.repoSyncId;
13883
+ const _errs27 = errors;
13884
+ if (errors === _errs27) {
13885
+ if (typeof data9 === "string") {
13886
+ if (func1(data9) > 128) {
13887
+ 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" };
13888
+ if (vErrors === null) {
13889
+ vErrors = [err10];
13890
+ } else {
13891
+ vErrors.push(err10);
13892
+ }
13893
+ errors++;
13894
+ } else {
13895
+ if (func1(data9) < 1) {
13896
+ 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" };
13897
+ if (vErrors === null) {
13898
+ vErrors = [err11];
13899
+ } else {
13900
+ vErrors.push(err11);
13901
+ }
13902
+ errors++;
13903
+ }
13904
+ }
13905
+ } else {
13906
+ 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" };
13907
+ if (vErrors === null) {
13908
+ vErrors = [err12];
13909
+ } else {
13910
+ vErrors.push(err12);
13911
+ }
13912
+ errors++;
13913
+ }
13914
+ }
13915
+ var valid6 = _errs27 === errors;
13916
+ } else {
13917
+ var valid6 = true;
13918
+ }
14109
13919
  }
14110
13920
  }
14111
13921
  }
14112
13922
  } else {
14113
- 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" };
13923
+ 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" };
14114
13924
  if (vErrors === null) {
14115
- vErrors = [err9];
13925
+ vErrors = [err13];
14116
13926
  } else {
14117
- vErrors.push(err9);
13927
+ vErrors.push(err13);
14118
13928
  }
14119
13929
  errors++;
14120
13930
  }
14121
13931
  }
14122
- var valid4 = _errs20 === errors;
14123
- } else {
14124
- var valid4 = true;
14125
- }
14126
- if (valid4) {
14127
- if (data1.captureAuthorityKind !== void 0) {
14128
- let data8 = data1.captureAuthorityKind;
14129
- const _errs22 = errors;
14130
- if (typeof data8 !== "string") {
14131
- 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" };
14132
- if (vErrors === null) {
14133
- vErrors = [err10];
14134
- } else {
14135
- vErrors.push(err10);
14136
- }
14137
- errors++;
14138
- }
14139
- if (!(data8 === "workos" || data8 === "service_token")) {
14140
- 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" };
14141
- if (vErrors === null) {
14142
- vErrors = [err11];
14143
- } else {
14144
- vErrors.push(err11);
14145
- }
14146
- errors++;
14147
- }
14148
- var valid4 = _errs22 === errors;
14149
- } else {
14150
- var valid4 = true;
13932
+ var _valid1 = _errs22 === errors;
13933
+ if (_valid1) {
13934
+ valid5 = true;
13935
+ passing0 = 0;
13936
+ var props0 = true;
14151
13937
  }
14152
- if (valid4) {
14153
- if (data1.decisionLifecycleProtocolVersion !== void 0) {
14154
- let data9 = data1.decisionLifecycleProtocolVersion;
14155
- const _errs24 = errors;
14156
- if (!(typeof data9 == "number" && (!(data9 % 1) && !isNaN(data9)) && isFinite(data9))) {
14157
- 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" };
13938
+ const _errs29 = errors;
13939
+ if (errors === _errs29) {
13940
+ if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
13941
+ let missing3;
13942
+ if (data7.kind === void 0 && (missing3 = "kind")) {
13943
+ 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 + "'" };
14158
13944
  if (vErrors === null) {
14159
- vErrors = [err12];
13945
+ vErrors = [err14];
14160
13946
  } else {
14161
- vErrors.push(err12);
13947
+ vErrors.push(err14);
14162
13948
  }
14163
13949
  errors++;
13950
+ } else {
13951
+ const _errs31 = errors;
13952
+ for (const key1 in data7) {
13953
+ if (!(key1 === "kind")) {
13954
+ 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" };
13955
+ if (vErrors === null) {
13956
+ vErrors = [err15];
13957
+ } else {
13958
+ vErrors.push(err15);
13959
+ }
13960
+ errors++;
13961
+ break;
13962
+ }
13963
+ }
13964
+ if (_errs31 === errors) {
13965
+ if (data7.kind !== void 0) {
13966
+ let data10 = data7.kind;
13967
+ if (typeof data10 !== "string") {
13968
+ 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" };
13969
+ if (vErrors === null) {
13970
+ vErrors = [err16];
13971
+ } else {
13972
+ vErrors.push(err16);
13973
+ }
13974
+ errors++;
13975
+ }
13976
+ if ("non_repository" !== data10) {
13977
+ 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" };
13978
+ if (vErrors === null) {
13979
+ vErrors = [err17];
13980
+ } else {
13981
+ vErrors.push(err17);
13982
+ }
13983
+ errors++;
13984
+ }
13985
+ }
13986
+ }
13987
+ }
13988
+ } else {
13989
+ 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" };
13990
+ if (vErrors === null) {
13991
+ vErrors = [err18];
13992
+ } else {
13993
+ vErrors.push(err18);
13994
+ }
13995
+ errors++;
13996
+ }
13997
+ }
13998
+ var _valid1 = _errs29 === errors;
13999
+ if (_valid1 && valid5) {
14000
+ valid5 = false;
14001
+ passing0 = [passing0, 1];
14002
+ } else {
14003
+ if (_valid1) {
14004
+ valid5 = true;
14005
+ passing0 = 1;
14006
+ if (props0 !== true) {
14007
+ props0 = true;
14008
+ }
14009
+ }
14010
+ }
14011
+ if (!valid5) {
14012
+ 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" };
14013
+ if (vErrors === null) {
14014
+ vErrors = [err19];
14015
+ } else {
14016
+ vErrors.push(err19);
14017
+ }
14018
+ errors++;
14019
+ } else {
14020
+ errors = _errs21;
14021
+ if (vErrors !== null) {
14022
+ if (_errs21) {
14023
+ vErrors.length = _errs21;
14024
+ } else {
14025
+ vErrors = null;
14164
14026
  }
14165
- if (errors === _errs24) {
14166
- if (typeof data9 == "number" && isFinite(data9)) {
14167
- if (data9 > 9007199254740991 || isNaN(data9)) {
14168
- 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" };
14027
+ }
14028
+ }
14029
+ var valid4 = _errs20 === errors;
14030
+ } else {
14031
+ var valid4 = true;
14032
+ }
14033
+ if (valid4) {
14034
+ if (data1.capturedOrganizationId !== void 0) {
14035
+ let data11 = data1.capturedOrganizationId;
14036
+ const _errs34 = errors;
14037
+ if (errors === _errs34) {
14038
+ if (typeof data11 === "string") {
14039
+ if (func1(data11) > 128) {
14040
+ 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" };
14041
+ if (vErrors === null) {
14042
+ vErrors = [err20];
14043
+ } else {
14044
+ vErrors.push(err20);
14045
+ }
14046
+ errors++;
14047
+ } else {
14048
+ if (func1(data11) < 1) {
14049
+ 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" };
14169
14050
  if (vErrors === null) {
14170
- vErrors = [err13];
14051
+ vErrors = [err21];
14171
14052
  } else {
14172
- vErrors.push(err13);
14053
+ vErrors.push(err21);
14173
14054
  }
14174
14055
  errors++;
14175
14056
  } else {
14176
- if (data9 < 1 || isNaN(data9)) {
14177
- 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" };
14057
+ if (!pattern8.test(data11)) {
14058
+ 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_-]+$"' };
14178
14059
  if (vErrors === null) {
14179
- vErrors = [err14];
14060
+ vErrors = [err22];
14180
14061
  } else {
14181
- vErrors.push(err14);
14062
+ vErrors.push(err22);
14182
14063
  }
14183
14064
  errors++;
14184
14065
  }
14185
14066
  }
14186
14067
  }
14068
+ } else {
14069
+ 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" };
14070
+ if (vErrors === null) {
14071
+ vErrors = [err23];
14072
+ } else {
14073
+ vErrors.push(err23);
14074
+ }
14075
+ errors++;
14187
14076
  }
14188
- var valid4 = _errs24 === errors;
14077
+ }
14078
+ var valid4 = _errs34 === errors;
14079
+ } else {
14080
+ var valid4 = true;
14081
+ }
14082
+ if (valid4) {
14083
+ if (data1.captureAuthorityKind !== void 0) {
14084
+ let data12 = data1.captureAuthorityKind;
14085
+ const _errs36 = errors;
14086
+ if (typeof data12 !== "string") {
14087
+ 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" };
14088
+ if (vErrors === null) {
14089
+ vErrors = [err24];
14090
+ } else {
14091
+ vErrors.push(err24);
14092
+ }
14093
+ errors++;
14094
+ }
14095
+ if (!(data12 === "workos" || data12 === "service_token")) {
14096
+ 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" };
14097
+ if (vErrors === null) {
14098
+ vErrors = [err25];
14099
+ } else {
14100
+ vErrors.push(err25);
14101
+ }
14102
+ errors++;
14103
+ }
14104
+ var valid4 = _errs36 === errors;
14189
14105
  } else {
14190
14106
  var valid4 = true;
14191
14107
  }
14192
14108
  if (valid4) {
14193
- if (data1.producer !== void 0) {
14194
- let data10 = data1.producer;
14195
- const _errs26 = errors;
14196
- if (typeof data10 !== "string") {
14197
- 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" };
14109
+ if (data1.decisionLifecycleProtocolVersion !== void 0) {
14110
+ let data13 = data1.decisionLifecycleProtocolVersion;
14111
+ const _errs38 = errors;
14112
+ if (!(typeof data13 == "number" && (!(data13 % 1) && !isNaN(data13)) && isFinite(data13))) {
14113
+ 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" };
14198
14114
  if (vErrors === null) {
14199
- vErrors = [err15];
14115
+ vErrors = [err26];
14200
14116
  } else {
14201
- vErrors.push(err15);
14117
+ vErrors.push(err26);
14202
14118
  }
14203
14119
  errors++;
14204
14120
  }
14205
- if (!(data10 === "claude_code" || data10 === "codex" || data10 === "cursor" || data10 === "hermes")) {
14206
- 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" };
14207
- if (vErrors === null) {
14208
- vErrors = [err16];
14209
- } else {
14210
- vErrors.push(err16);
14121
+ if (errors === _errs38) {
14122
+ if (typeof data13 == "number" && isFinite(data13)) {
14123
+ if (data13 > 9007199254740991 || isNaN(data13)) {
14124
+ 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" };
14125
+ if (vErrors === null) {
14126
+ vErrors = [err27];
14127
+ } else {
14128
+ vErrors.push(err27);
14129
+ }
14130
+ errors++;
14131
+ } else {
14132
+ if (data13 < 1 || isNaN(data13)) {
14133
+ 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" };
14134
+ if (vErrors === null) {
14135
+ vErrors = [err28];
14136
+ } else {
14137
+ vErrors.push(err28);
14138
+ }
14139
+ errors++;
14140
+ }
14141
+ }
14211
14142
  }
14212
- errors++;
14213
14143
  }
14214
- var valid4 = _errs26 === errors;
14144
+ var valid4 = _errs38 === errors;
14215
14145
  } else {
14216
14146
  var valid4 = true;
14217
14147
  }
14218
14148
  if (valid4) {
14219
- if (data1.toolOutcome !== void 0) {
14220
- let data11 = data1.toolOutcome;
14221
- const _errs28 = errors;
14222
- if (typeof data11 !== "string") {
14223
- 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" };
14149
+ if (data1.producer !== void 0) {
14150
+ let data14 = data1.producer;
14151
+ const _errs40 = errors;
14152
+ if (typeof data14 !== "string") {
14153
+ 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" };
14224
14154
  if (vErrors === null) {
14225
- vErrors = [err17];
14155
+ vErrors = [err29];
14226
14156
  } else {
14227
- vErrors.push(err17);
14157
+ vErrors.push(err29);
14228
14158
  }
14229
14159
  errors++;
14230
14160
  }
14231
- if (!(data11 === "succeeded" || data11 === "returned" || data11 === "failed" || data11 === "interrupted" || data11 === "prevented" || data11 === "unknown")) {
14232
- 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" };
14161
+ if (!(data14 === "claude_code" || data14 === "codex" || data14 === "cursor" || data14 === "hermes")) {
14162
+ 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" };
14233
14163
  if (vErrors === null) {
14234
- vErrors = [err18];
14164
+ vErrors = [err30];
14235
14165
  } else {
14236
- vErrors.push(err18);
14166
+ vErrors.push(err30);
14237
14167
  }
14238
14168
  errors++;
14239
14169
  }
14240
- var valid4 = _errs28 === errors;
14170
+ var valid4 = _errs40 === errors;
14241
14171
  } else {
14242
14172
  var valid4 = true;
14243
14173
  }
14244
14174
  if (valid4) {
14245
- if (data1.envelopeVersion !== void 0) {
14246
- let data12 = data1.envelopeVersion;
14247
- const _errs30 = errors;
14248
- if (!(typeof data12 == "number" && isFinite(data12))) {
14249
- 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" };
14175
+ if (data1.toolOutcome !== void 0) {
14176
+ let data15 = data1.toolOutcome;
14177
+ const _errs42 = errors;
14178
+ if (typeof data15 !== "string") {
14179
+ 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" };
14250
14180
  if (vErrors === null) {
14251
- vErrors = [err19];
14181
+ vErrors = [err31];
14252
14182
  } else {
14253
- vErrors.push(err19);
14183
+ vErrors.push(err31);
14254
14184
  }
14255
14185
  errors++;
14256
14186
  }
14257
- if (4 !== data12) {
14258
- 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" };
14187
+ if (!(data15 === "succeeded" || data15 === "returned" || data15 === "failed" || data15 === "interrupted" || data15 === "prevented" || data15 === "unknown")) {
14188
+ 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" };
14259
14189
  if (vErrors === null) {
14260
- vErrors = [err20];
14190
+ vErrors = [err32];
14261
14191
  } else {
14262
- vErrors.push(err20);
14192
+ vErrors.push(err32);
14263
14193
  }
14264
14194
  errors++;
14265
14195
  }
14266
- var valid4 = _errs30 === errors;
14196
+ var valid4 = _errs42 === errors;
14267
14197
  } else {
14268
14198
  var valid4 = true;
14269
14199
  }
14200
+ if (valid4) {
14201
+ if (data1.envelopeVersion !== void 0) {
14202
+ let data16 = data1.envelopeVersion;
14203
+ const _errs44 = errors;
14204
+ if (!(typeof data16 == "number" && isFinite(data16))) {
14205
+ 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" };
14206
+ if (vErrors === null) {
14207
+ vErrors = [err33];
14208
+ } else {
14209
+ vErrors.push(err33);
14210
+ }
14211
+ errors++;
14212
+ }
14213
+ if (4 !== data16) {
14214
+ 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" };
14215
+ if (vErrors === null) {
14216
+ vErrors = [err34];
14217
+ } else {
14218
+ vErrors.push(err34);
14219
+ }
14220
+ errors++;
14221
+ }
14222
+ var valid4 = _errs44 === errors;
14223
+ } else {
14224
+ var valid4 = true;
14225
+ }
14226
+ }
14270
14227
  }
14271
14228
  }
14272
14229
  }
@@ -14279,11 +14236,11 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
14279
14236
  }
14280
14237
  }
14281
14238
  } else {
14282
- 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" };
14239
+ 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" };
14283
14240
  if (vErrors === null) {
14284
- vErrors = [err21];
14241
+ vErrors = [err35];
14285
14242
  } else {
14286
- vErrors.push(err21);
14243
+ vErrors.push(err35);
14287
14244
  }
14288
14245
  errors++;
14289
14246
  }
@@ -14291,296 +14248,509 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
14291
14248
  var _valid0 = _errs7 === errors;
14292
14249
  valid3 = valid3 || _valid0;
14293
14250
  if (_valid0) {
14294
- var props0 = true;
14251
+ var props1 = true;
14295
14252
  }
14296
- const _errs32 = errors;
14297
- if (errors === _errs32) {
14253
+ const _errs46 = errors;
14254
+ if (errors === _errs46) {
14298
14255
  if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
14299
- let missing2;
14300
- 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")) {
14301
- 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 + "'" };
14256
+ let missing4;
14257
+ 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")) {
14258
+ 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 + "'" };
14302
14259
  if (vErrors === null) {
14303
- vErrors = [err22];
14260
+ vErrors = [err36];
14304
14261
  } else {
14305
- vErrors.push(err22);
14262
+ vErrors.push(err36);
14306
14263
  }
14307
14264
  errors++;
14308
14265
  } else {
14309
14266
  if (data1.moveId !== void 0) {
14310
- const _errs35 = errors;
14267
+ const _errs49 = errors;
14311
14268
  if (typeof data1.moveId !== "string") {
14312
- 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" };
14269
+ 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" };
14313
14270
  if (vErrors === null) {
14314
- vErrors = [err23];
14271
+ vErrors = [err37];
14315
14272
  } else {
14316
- vErrors.push(err23);
14273
+ vErrors.push(err37);
14317
14274
  }
14318
14275
  errors++;
14319
14276
  }
14320
- var valid5 = _errs35 === errors;
14277
+ var valid8 = _errs49 === errors;
14321
14278
  } else {
14322
- var valid5 = true;
14279
+ var valid8 = true;
14323
14280
  }
14324
- if (valid5) {
14281
+ if (valid8) {
14325
14282
  if (data1.capturedAt !== void 0) {
14326
- let data14 = data1.capturedAt;
14327
- const _errs37 = errors;
14328
- if (!(typeof data14 == "number" && isFinite(data14))) {
14329
- 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" };
14283
+ let data18 = data1.capturedAt;
14284
+ const _errs51 = errors;
14285
+ if (!(typeof data18 == "number" && isFinite(data18))) {
14286
+ 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" };
14330
14287
  if (vErrors === null) {
14331
- vErrors = [err24];
14288
+ vErrors = [err38];
14332
14289
  } else {
14333
- vErrors.push(err24);
14290
+ vErrors.push(err38);
14334
14291
  }
14335
14292
  errors++;
14336
14293
  }
14337
- var valid5 = _errs37 === errors;
14294
+ var valid8 = _errs51 === errors;
14338
14295
  } else {
14339
- var valid5 = true;
14296
+ var valid8 = true;
14340
14297
  }
14341
- if (valid5) {
14298
+ if (valid8) {
14342
14299
  if (data1.sessionId !== void 0) {
14343
- const _errs39 = errors;
14300
+ const _errs53 = errors;
14344
14301
  if (typeof data1.sessionId !== "string") {
14345
- 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" };
14302
+ 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" };
14346
14303
  if (vErrors === null) {
14347
- vErrors = [err25];
14304
+ vErrors = [err39];
14348
14305
  } else {
14349
- vErrors.push(err25);
14306
+ vErrors.push(err39);
14350
14307
  }
14351
14308
  errors++;
14352
14309
  }
14353
- var valid5 = _errs39 === errors;
14310
+ var valid8 = _errs53 === errors;
14354
14311
  } else {
14355
- var valid5 = true;
14312
+ var valid8 = true;
14356
14313
  }
14357
- if (valid5) {
14314
+ if (valid8) {
14358
14315
  if (data1.invocationId !== void 0) {
14359
- const _errs41 = errors;
14316
+ const _errs55 = errors;
14360
14317
  if (typeof data1.invocationId !== "string") {
14361
- 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" };
14318
+ 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" };
14362
14319
  if (vErrors === null) {
14363
- vErrors = [err26];
14320
+ vErrors = [err40];
14364
14321
  } else {
14365
- vErrors.push(err26);
14322
+ vErrors.push(err40);
14366
14323
  }
14367
14324
  errors++;
14368
14325
  }
14369
- var valid5 = _errs41 === errors;
14326
+ var valid8 = _errs55 === errors;
14370
14327
  } else {
14371
- var valid5 = true;
14328
+ var valid8 = true;
14372
14329
  }
14373
- if (valid5) {
14330
+ if (valid8) {
14374
14331
  if (data1.eventType !== void 0) {
14375
- const _errs43 = errors;
14332
+ const _errs57 = errors;
14376
14333
  if (typeof data1.eventType !== "string") {
14377
- 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" };
14334
+ 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" };
14378
14335
  if (vErrors === null) {
14379
- vErrors = [err27];
14336
+ vErrors = [err41];
14380
14337
  } else {
14381
- vErrors.push(err27);
14338
+ vErrors.push(err41);
14382
14339
  }
14383
14340
  errors++;
14384
14341
  }
14385
- var valid5 = _errs43 === errors;
14342
+ var valid8 = _errs57 === errors;
14386
14343
  } else {
14387
- var valid5 = true;
14344
+ var valid8 = true;
14388
14345
  }
14389
- if (valid5) {
14390
- if (data1.capturedOrganizationId !== void 0) {
14391
- let data18 = data1.capturedOrganizationId;
14392
- const _errs45 = errors;
14393
- if (errors === _errs45) {
14394
- if (typeof data18 === "string") {
14395
- if (func1(data18) > 128) {
14396
- 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" };
14346
+ if (valid8) {
14347
+ if (data1.repositoryContext !== void 0) {
14348
+ let data22 = data1.repositoryContext;
14349
+ const _errs59 = errors;
14350
+ const _errs60 = errors;
14351
+ let valid9 = false;
14352
+ let passing1 = null;
14353
+ const _errs61 = errors;
14354
+ if (errors === _errs61) {
14355
+ if (data22 && typeof data22 == "object" && !Array.isArray(data22)) {
14356
+ let missing5;
14357
+ if (data22.kind === void 0 && (missing5 = "kind") || data22.repoSyncId === void 0 && (missing5 = "repoSyncId")) {
14358
+ 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 + "'" };
14397
14359
  if (vErrors === null) {
14398
- vErrors = [err28];
14360
+ vErrors = [err42];
14399
14361
  } else {
14400
- vErrors.push(err28);
14362
+ vErrors.push(err42);
14401
14363
  }
14402
14364
  errors++;
14403
14365
  } else {
14404
- if (func1(data18) < 1) {
14405
- 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" };
14406
- if (vErrors === null) {
14407
- vErrors = [err29];
14408
- } else {
14409
- vErrors.push(err29);
14410
- }
14411
- errors++;
14412
- } else {
14413
- if (!pattern8.test(data18)) {
14414
- 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_-]+$"' };
14366
+ const _errs63 = errors;
14367
+ for (const key2 in data22) {
14368
+ if (!(key2 === "kind" || key2 === "repoSyncId")) {
14369
+ 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" };
14415
14370
  if (vErrors === null) {
14416
- vErrors = [err30];
14371
+ vErrors = [err43];
14417
14372
  } else {
14418
- vErrors.push(err30);
14373
+ vErrors.push(err43);
14419
14374
  }
14420
14375
  errors++;
14376
+ break;
14377
+ }
14378
+ }
14379
+ if (_errs63 === errors) {
14380
+ if (data22.kind !== void 0) {
14381
+ let data23 = data22.kind;
14382
+ const _errs64 = errors;
14383
+ if (typeof data23 !== "string") {
14384
+ 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" };
14385
+ if (vErrors === null) {
14386
+ vErrors = [err44];
14387
+ } else {
14388
+ vErrors.push(err44);
14389
+ }
14390
+ errors++;
14391
+ }
14392
+ if ("repository_bound" !== data23) {
14393
+ 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" };
14394
+ if (vErrors === null) {
14395
+ vErrors = [err45];
14396
+ } else {
14397
+ vErrors.push(err45);
14398
+ }
14399
+ errors++;
14400
+ }
14401
+ var valid10 = _errs64 === errors;
14402
+ } else {
14403
+ var valid10 = true;
14404
+ }
14405
+ if (valid10) {
14406
+ if (data22.repoSyncId !== void 0) {
14407
+ let data24 = data22.repoSyncId;
14408
+ const _errs66 = errors;
14409
+ if (errors === _errs66) {
14410
+ if (typeof data24 === "string") {
14411
+ if (func1(data24) > 128) {
14412
+ 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" };
14413
+ if (vErrors === null) {
14414
+ vErrors = [err46];
14415
+ } else {
14416
+ vErrors.push(err46);
14417
+ }
14418
+ errors++;
14419
+ } else {
14420
+ if (func1(data24) < 1) {
14421
+ 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" };
14422
+ if (vErrors === null) {
14423
+ vErrors = [err47];
14424
+ } else {
14425
+ vErrors.push(err47);
14426
+ }
14427
+ errors++;
14428
+ }
14429
+ }
14430
+ } else {
14431
+ 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" };
14432
+ if (vErrors === null) {
14433
+ vErrors = [err48];
14434
+ } else {
14435
+ vErrors.push(err48);
14436
+ }
14437
+ errors++;
14438
+ }
14439
+ }
14440
+ var valid10 = _errs66 === errors;
14441
+ } else {
14442
+ var valid10 = true;
14443
+ }
14421
14444
  }
14422
14445
  }
14423
14446
  }
14424
14447
  } else {
14425
- 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" };
14448
+ 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" };
14426
14449
  if (vErrors === null) {
14427
- vErrors = [err31];
14450
+ vErrors = [err49];
14428
14451
  } else {
14429
- vErrors.push(err31);
14452
+ vErrors.push(err49);
14430
14453
  }
14431
14454
  errors++;
14432
14455
  }
14433
14456
  }
14434
- var valid5 = _errs45 === errors;
14435
- } else {
14436
- var valid5 = true;
14437
- }
14438
- if (valid5) {
14439
- if (data1.captureAuthorityKind !== void 0) {
14440
- let data19 = data1.captureAuthorityKind;
14441
- const _errs47 = errors;
14442
- if (typeof data19 !== "string") {
14443
- 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" };
14444
- if (vErrors === null) {
14445
- vErrors = [err32];
14457
+ var _valid2 = _errs61 === errors;
14458
+ if (_valid2) {
14459
+ valid9 = true;
14460
+ passing1 = 0;
14461
+ var props2 = true;
14462
+ }
14463
+ const _errs68 = errors;
14464
+ if (errors === _errs68) {
14465
+ if (data22 && typeof data22 == "object" && !Array.isArray(data22)) {
14466
+ let missing6;
14467
+ if (data22.kind === void 0 && (missing6 = "kind")) {
14468
+ 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 + "'" };
14469
+ if (vErrors === null) {
14470
+ vErrors = [err50];
14471
+ } else {
14472
+ vErrors.push(err50);
14473
+ }
14474
+ errors++;
14446
14475
  } else {
14447
- vErrors.push(err32);
14476
+ const _errs70 = errors;
14477
+ for (const key3 in data22) {
14478
+ if (!(key3 === "kind")) {
14479
+ 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" };
14480
+ if (vErrors === null) {
14481
+ vErrors = [err51];
14482
+ } else {
14483
+ vErrors.push(err51);
14484
+ }
14485
+ errors++;
14486
+ break;
14487
+ }
14488
+ }
14489
+ if (_errs70 === errors) {
14490
+ if (data22.kind !== void 0) {
14491
+ let data25 = data22.kind;
14492
+ if (typeof data25 !== "string") {
14493
+ 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" };
14494
+ if (vErrors === null) {
14495
+ vErrors = [err52];
14496
+ } else {
14497
+ vErrors.push(err52);
14498
+ }
14499
+ errors++;
14500
+ }
14501
+ if ("non_repository" !== data25) {
14502
+ 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" };
14503
+ if (vErrors === null) {
14504
+ vErrors = [err53];
14505
+ } else {
14506
+ vErrors.push(err53);
14507
+ }
14508
+ errors++;
14509
+ }
14510
+ }
14511
+ }
14448
14512
  }
14449
- errors++;
14450
- }
14451
- if (!(data19 === "workos" || data19 === "service_token")) {
14452
- 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" };
14513
+ } else {
14514
+ 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" };
14453
14515
  if (vErrors === null) {
14454
- vErrors = [err33];
14516
+ vErrors = [err54];
14455
14517
  } else {
14456
- vErrors.push(err33);
14518
+ vErrors.push(err54);
14457
14519
  }
14458
14520
  errors++;
14459
14521
  }
14460
- var valid5 = _errs47 === errors;
14522
+ }
14523
+ var _valid2 = _errs68 === errors;
14524
+ if (_valid2 && valid9) {
14525
+ valid9 = false;
14526
+ passing1 = [passing1, 1];
14461
14527
  } else {
14462
- var valid5 = true;
14528
+ if (_valid2) {
14529
+ valid9 = true;
14530
+ passing1 = 1;
14531
+ if (props2 !== true) {
14532
+ props2 = true;
14533
+ }
14534
+ }
14463
14535
  }
14464
- if (valid5) {
14465
- if (data1.decisionLifecycleProtocolVersion !== void 0) {
14466
- let data20 = data1.decisionLifecycleProtocolVersion;
14467
- const _errs49 = errors;
14468
- if (!(typeof data20 == "number" && (!(data20 % 1) && !isNaN(data20)) && isFinite(data20))) {
14469
- 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" };
14470
- if (vErrors === null) {
14471
- vErrors = [err34];
14472
- } else {
14473
- vErrors.push(err34);
14474
- }
14475
- errors++;
14536
+ if (!valid9) {
14537
+ 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" };
14538
+ if (vErrors === null) {
14539
+ vErrors = [err55];
14540
+ } else {
14541
+ vErrors.push(err55);
14542
+ }
14543
+ errors++;
14544
+ } else {
14545
+ errors = _errs60;
14546
+ if (vErrors !== null) {
14547
+ if (_errs60) {
14548
+ vErrors.length = _errs60;
14549
+ } else {
14550
+ vErrors = null;
14476
14551
  }
14477
- if (errors === _errs49) {
14478
- if (typeof data20 == "number" && isFinite(data20)) {
14479
- if (data20 > 9007199254740991 || isNaN(data20)) {
14480
- 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" };
14552
+ }
14553
+ }
14554
+ var valid8 = _errs59 === errors;
14555
+ } else {
14556
+ var valid8 = true;
14557
+ }
14558
+ if (valid8) {
14559
+ if (data1.capturedOrganizationId !== void 0) {
14560
+ let data26 = data1.capturedOrganizationId;
14561
+ const _errs73 = errors;
14562
+ if (errors === _errs73) {
14563
+ if (typeof data26 === "string") {
14564
+ if (func1(data26) > 128) {
14565
+ 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" };
14566
+ if (vErrors === null) {
14567
+ vErrors = [err56];
14568
+ } else {
14569
+ vErrors.push(err56);
14570
+ }
14571
+ errors++;
14572
+ } else {
14573
+ if (func1(data26) < 1) {
14574
+ 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" };
14481
14575
  if (vErrors === null) {
14482
- vErrors = [err35];
14576
+ vErrors = [err57];
14483
14577
  } else {
14484
- vErrors.push(err35);
14578
+ vErrors.push(err57);
14485
14579
  }
14486
14580
  errors++;
14487
14581
  } else {
14488
- if (data20 < 1 || isNaN(data20)) {
14489
- 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" };
14582
+ if (!pattern8.test(data26)) {
14583
+ 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_-]+$"' };
14490
14584
  if (vErrors === null) {
14491
- vErrors = [err36];
14585
+ vErrors = [err58];
14492
14586
  } else {
14493
- vErrors.push(err36);
14587
+ vErrors.push(err58);
14494
14588
  }
14495
14589
  errors++;
14496
14590
  }
14497
14591
  }
14498
14592
  }
14593
+ } else {
14594
+ 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" };
14595
+ if (vErrors === null) {
14596
+ vErrors = [err59];
14597
+ } else {
14598
+ vErrors.push(err59);
14599
+ }
14600
+ errors++;
14499
14601
  }
14500
- var valid5 = _errs49 === errors;
14602
+ }
14603
+ var valid8 = _errs73 === errors;
14604
+ } else {
14605
+ var valid8 = true;
14606
+ }
14607
+ if (valid8) {
14608
+ if (data1.captureAuthorityKind !== void 0) {
14609
+ let data27 = data1.captureAuthorityKind;
14610
+ const _errs75 = errors;
14611
+ if (typeof data27 !== "string") {
14612
+ 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" };
14613
+ if (vErrors === null) {
14614
+ vErrors = [err60];
14615
+ } else {
14616
+ vErrors.push(err60);
14617
+ }
14618
+ errors++;
14619
+ }
14620
+ if (!(data27 === "workos" || data27 === "service_token")) {
14621
+ 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" };
14622
+ if (vErrors === null) {
14623
+ vErrors = [err61];
14624
+ } else {
14625
+ vErrors.push(err61);
14626
+ }
14627
+ errors++;
14628
+ }
14629
+ var valid8 = _errs75 === errors;
14501
14630
  } else {
14502
- var valid5 = true;
14631
+ var valid8 = true;
14503
14632
  }
14504
- if (valid5) {
14505
- if (data1.producer !== void 0) {
14506
- let data21 = data1.producer;
14507
- const _errs51 = errors;
14508
- if (typeof data21 !== "string") {
14509
- 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" };
14633
+ if (valid8) {
14634
+ if (data1.decisionLifecycleProtocolVersion !== void 0) {
14635
+ let data28 = data1.decisionLifecycleProtocolVersion;
14636
+ const _errs77 = errors;
14637
+ if (!(typeof data28 == "number" && (!(data28 % 1) && !isNaN(data28)) && isFinite(data28))) {
14638
+ 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" };
14510
14639
  if (vErrors === null) {
14511
- vErrors = [err37];
14640
+ vErrors = [err62];
14512
14641
  } else {
14513
- vErrors.push(err37);
14642
+ vErrors.push(err62);
14514
14643
  }
14515
14644
  errors++;
14516
14645
  }
14517
- if (!(data21 === "claude_code" || data21 === "codex" || data21 === "cursor" || data21 === "hermes")) {
14518
- 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" };
14519
- if (vErrors === null) {
14520
- vErrors = [err38];
14521
- } else {
14522
- vErrors.push(err38);
14646
+ if (errors === _errs77) {
14647
+ if (typeof data28 == "number" && isFinite(data28)) {
14648
+ if (data28 > 9007199254740991 || isNaN(data28)) {
14649
+ 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" };
14650
+ if (vErrors === null) {
14651
+ vErrors = [err63];
14652
+ } else {
14653
+ vErrors.push(err63);
14654
+ }
14655
+ errors++;
14656
+ } else {
14657
+ if (data28 < 1 || isNaN(data28)) {
14658
+ 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" };
14659
+ if (vErrors === null) {
14660
+ vErrors = [err64];
14661
+ } else {
14662
+ vErrors.push(err64);
14663
+ }
14664
+ errors++;
14665
+ }
14666
+ }
14523
14667
  }
14524
- errors++;
14525
14668
  }
14526
- var valid5 = _errs51 === errors;
14669
+ var valid8 = _errs77 === errors;
14527
14670
  } else {
14528
- var valid5 = true;
14671
+ var valid8 = true;
14529
14672
  }
14530
- if (valid5) {
14531
- if (data1.toolOutcome !== void 0) {
14532
- let data22 = data1.toolOutcome;
14533
- const _errs53 = errors;
14534
- if (typeof data22 !== "string") {
14535
- 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" };
14673
+ if (valid8) {
14674
+ if (data1.producer !== void 0) {
14675
+ let data29 = data1.producer;
14676
+ const _errs79 = errors;
14677
+ if (typeof data29 !== "string") {
14678
+ 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" };
14536
14679
  if (vErrors === null) {
14537
- vErrors = [err39];
14680
+ vErrors = [err65];
14538
14681
  } else {
14539
- vErrors.push(err39);
14682
+ vErrors.push(err65);
14540
14683
  }
14541
14684
  errors++;
14542
14685
  }
14543
- if (!(data22 === "succeeded" || data22 === "returned" || data22 === "failed" || data22 === "interrupted" || data22 === "prevented" || data22 === "unknown")) {
14544
- 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" };
14686
+ if (!(data29 === "claude_code" || data29 === "codex" || data29 === "cursor" || data29 === "hermes")) {
14687
+ 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" };
14545
14688
  if (vErrors === null) {
14546
- vErrors = [err40];
14689
+ vErrors = [err66];
14547
14690
  } else {
14548
- vErrors.push(err40);
14691
+ vErrors.push(err66);
14549
14692
  }
14550
14693
  errors++;
14551
14694
  }
14552
- var valid5 = _errs53 === errors;
14695
+ var valid8 = _errs79 === errors;
14553
14696
  } else {
14554
- var valid5 = true;
14697
+ var valid8 = true;
14555
14698
  }
14556
- if (valid5) {
14557
- if (data1.envelopeVersion !== void 0) {
14558
- let data23 = data1.envelopeVersion;
14559
- const _errs55 = errors;
14560
- if (errors === _errs55) {
14561
- if (typeof data23 == "number" && isFinite(data23)) {
14562
- if (data23 >= 4 || isNaN(data23)) {
14563
- 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" };
14699
+ if (valid8) {
14700
+ if (data1.toolOutcome !== void 0) {
14701
+ let data30 = data1.toolOutcome;
14702
+ const _errs81 = errors;
14703
+ if (typeof data30 !== "string") {
14704
+ 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" };
14705
+ if (vErrors === null) {
14706
+ vErrors = [err67];
14707
+ } else {
14708
+ vErrors.push(err67);
14709
+ }
14710
+ errors++;
14711
+ }
14712
+ if (!(data30 === "succeeded" || data30 === "returned" || data30 === "failed" || data30 === "interrupted" || data30 === "prevented" || data30 === "unknown")) {
14713
+ 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" };
14714
+ if (vErrors === null) {
14715
+ vErrors = [err68];
14716
+ } else {
14717
+ vErrors.push(err68);
14718
+ }
14719
+ errors++;
14720
+ }
14721
+ var valid8 = _errs81 === errors;
14722
+ } else {
14723
+ var valid8 = true;
14724
+ }
14725
+ if (valid8) {
14726
+ if (data1.envelopeVersion !== void 0) {
14727
+ let data31 = data1.envelopeVersion;
14728
+ const _errs83 = errors;
14729
+ if (errors === _errs83) {
14730
+ if (typeof data31 == "number" && isFinite(data31)) {
14731
+ if (data31 >= 4 || isNaN(data31)) {
14732
+ 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" };
14733
+ if (vErrors === null) {
14734
+ vErrors = [err69];
14735
+ } else {
14736
+ vErrors.push(err69);
14737
+ }
14738
+ errors++;
14739
+ }
14740
+ } else {
14741
+ 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" };
14564
14742
  if (vErrors === null) {
14565
- vErrors = [err41];
14743
+ vErrors = [err70];
14566
14744
  } else {
14567
- vErrors.push(err41);
14745
+ vErrors.push(err70);
14568
14746
  }
14569
14747
  errors++;
14570
14748
  }
14571
- } else {
14572
- 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" };
14573
- if (vErrors === null) {
14574
- vErrors = [err42];
14575
- } else {
14576
- vErrors.push(err42);
14577
- }
14578
- errors++;
14579
14749
  }
14750
+ var valid8 = _errs83 === errors;
14751
+ } else {
14752
+ var valid8 = true;
14580
14753
  }
14581
- var valid5 = _errs55 === errors;
14582
- } else {
14583
- var valid5 = true;
14584
14754
  }
14585
14755
  }
14586
14756
  }
@@ -14594,28 +14764,28 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
14594
14764
  }
14595
14765
  }
14596
14766
  } else {
14597
- 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" };
14767
+ 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" };
14598
14768
  if (vErrors === null) {
14599
- vErrors = [err43];
14769
+ vErrors = [err71];
14600
14770
  } else {
14601
- vErrors.push(err43);
14771
+ vErrors.push(err71);
14602
14772
  }
14603
14773
  errors++;
14604
14774
  }
14605
14775
  }
14606
- var _valid0 = _errs32 === errors;
14776
+ var _valid0 = _errs46 === errors;
14607
14777
  valid3 = valid3 || _valid0;
14608
14778
  if (_valid0) {
14609
- if (props0 !== true) {
14610
- props0 = true;
14779
+ if (props1 !== true) {
14780
+ props1 = true;
14611
14781
  }
14612
14782
  }
14613
14783
  if (!valid3) {
14614
- 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" };
14784
+ 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" };
14615
14785
  if (vErrors === null) {
14616
- vErrors = [err44];
14786
+ vErrors = [err72];
14617
14787
  } else {
14618
- vErrors.push(err44);
14788
+ vErrors.push(err72);
14619
14789
  }
14620
14790
  errors++;
14621
14791
  validate51.errors = vErrors;
@@ -18400,16 +18570,6 @@ function stripAnsi(text) {
18400
18570
  }
18401
18571
 
18402
18572
  export {
18403
- repoActiveFlag,
18404
- isRepoActive,
18405
- setRepoActive,
18406
- isValidRepoSyncId,
18407
- repoSyncId,
18408
- setRepoSyncId,
18409
- setRepositoryBindingState,
18410
- repositoryBindingState,
18411
- isRepoActiveForCapture,
18412
- decisionIngestionStatus,
18413
18573
  isCliErrorResponse,
18414
18574
  isDecisionIdRequest,
18415
18575
  isDecisionRescopeRequest,