@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.
- package/README.md +7 -4
- package/dist/{chunk-UKUAAAXE.js → chunk-27ADT6FQ.js} +2 -2
- package/dist/{chunk-OTHKG76J.js → chunk-35FMRWJH.js} +1 -1
- package/dist/{chunk-DXJQR4QI.js → chunk-4GHANPWQ.js} +2 -2
- package/dist/{chunk-WUXFLE7X.js → chunk-7KABYYWG.js} +64 -66
- package/dist/{chunk-LFFLHSQO.js → chunk-CU7RW7XU.js} +63 -6
- package/dist/{chunk-H4UNYFUC.js → chunk-DHOQGHKQ.js} +184 -1
- package/dist/{chunk-2GP5UFV7.js → chunk-DWRSEC34.js} +5 -3
- package/dist/{chunk-O7YAW7G6.js → chunk-FVDBULGZ.js} +9 -11
- package/dist/{chunk-G2VMA2QO.js → chunk-LY6NJ7KL.js} +6 -4
- package/dist/{chunk-ZB4F75SZ.js → chunk-MXVCP33E.js} +5 -1
- package/dist/{chunk-TYAHC25F.js → chunk-QCBB5HFX.js} +1 -1
- package/dist/{chunk-IMK4JKTA.js → chunk-RK4ZS3HG.js} +2 -2
- package/dist/{chunk-ZU563PQI.js → chunk-ROLYLXJS.js} +2 -2
- package/dist/{chunk-OH3EZXYX.js → chunk-UO2U6IKF.js} +1 -1
- package/dist/{chunk-K7D2EYBS.js → chunk-URLLSALP.js} +2 -2
- package/dist/{chunk-FXF4JWK2.js → chunk-XEDJ5N3M.js} +17 -2
- package/dist/{chunk-AXQQMX2U.js → chunk-Y5W4TZM7.js} +2 -2
- package/dist/{chunk-ICM2XCXS.js → chunk-YYE2NLWX.js} +2 -2
- package/dist/{chunk-DSWT6BCC.js → chunk-Z6NPNLOT.js} +825 -665
- package/dist/daemon/server.js +836 -540
- package/dist/hook-runtime/daemon/server.js +836 -540
- package/dist/hook-runtime/hooks/post-commit.js +836 -540
- package/dist/hook-runtime/hooks/post-rewrite.js +836 -540
- package/dist/hook-runtime/hooks/post-tool-use.js +1160 -791
- package/dist/hook-runtime/hooks/pre-tool-use.js +2060 -1751
- package/dist/hook-runtime/hooks/prim-hook.js +1257 -856
- package/dist/hook-runtime/hooks/session-end.js +179 -129
- package/dist/hook-runtime/hooks/session-start.js +938 -640
- package/dist/hook-runtime/index.js +892 -554
- package/dist/hooks/post-commit.js +11 -11
- package/dist/hooks/post-rewrite.js +10 -10
- package/dist/hooks/post-tool-use.js +20 -20
- package/dist/hooks/pre-commit.js +4 -4
- package/dist/hooks/pre-tool-use.js +29 -17
- package/dist/hooks/prim-hook.js +22 -18
- package/dist/hooks/session-end.js +11 -5
- package/dist/hooks/session-start.js +26 -22
- package/dist/index.js +79 -60
- package/package.json +1 -1
|
@@ -51,10 +51,20 @@ var require_ucs2length = __commonJS({
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
-
// src/
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
// src/hooks/agent.ts
|
|
55
|
+
function parseAgent(argv) {
|
|
56
|
+
const i = argv.indexOf("--agent");
|
|
57
|
+
const value = i !== -1 ? argv[i + 1] : void 0;
|
|
58
|
+
if (value === "codex" || value === "cursor" || value === "hermes") {
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
return "claude_code";
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// src/commands/cursor-install.ts
|
|
65
|
+
import { existsSync as existsSync5, readFileSync as readFileSync5 } from "fs";
|
|
66
|
+
import { homedir as homedir3 } from "os";
|
|
67
|
+
import { isAbsolute as isAbsolute5, join as join6 } from "path";
|
|
58
68
|
|
|
59
69
|
// src/lib/atomic-file.ts
|
|
60
70
|
import { randomUUID } from "crypto";
|
|
@@ -269,61 +279,16 @@ function detachedHookShimCommand(bin, args = "") {
|
|
|
269
279
|
return `payload=$(cat); { trap '' HUP; printf '%s' "$payload" | { ${stableHookCommand(bin, args)}; }; } </dev/null >/dev/null 2>&1 &`;
|
|
270
280
|
}
|
|
271
281
|
|
|
272
|
-
// src/lib/bin-cache.ts
|
|
273
|
-
var GIT_HOOK_CACHE_SHELL_DIR = "${XDG_CACHE_HOME:-$HOME/.cache}/prim/bin";
|
|
274
|
-
var GIT_HOOK_CACHE_TTL_MINUTES = 1440;
|
|
275
|
-
var GIT_HOOK_CACHED_BINS = ["prim-post-commit", "prim-post-rewrite"];
|
|
276
|
-
function binCacheDir() {
|
|
277
|
-
const base = process.env.XDG_CACHE_HOME || join2(homedir(), ".cache");
|
|
278
|
-
return join2(base, "prim", "bin");
|
|
279
|
-
}
|
|
280
|
-
function writeAtomic(path, content) {
|
|
281
|
-
atomicWriteFile(path, content, { mode: 384 });
|
|
282
|
-
}
|
|
283
|
-
function warmBinCache() {
|
|
284
|
-
try {
|
|
285
|
-
if (process.env.PRIM_BIN_CACHE === "0") {
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
const dir = binCacheDir();
|
|
289
|
-
mkdirSync2(dir, { recursive: true, mode: 448 });
|
|
290
|
-
chmodSync(dir, 448);
|
|
291
|
-
writeAtomic(join2(dir, "node"), process.execPath);
|
|
292
|
-
for (const bin of GIT_HOOK_CACHED_BINS) {
|
|
293
|
-
const file = binFile(bin);
|
|
294
|
-
if (file) {
|
|
295
|
-
writeAtomic(join2(dir, bin), file);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
} catch {
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
// src/hooks/agent.ts
|
|
303
|
-
function parseAgent(argv) {
|
|
304
|
-
const i = argv.indexOf("--agent");
|
|
305
|
-
const value = i !== -1 ? argv[i + 1] : void 0;
|
|
306
|
-
if (value === "codex" || value === "cursor" || value === "hermes") {
|
|
307
|
-
return value;
|
|
308
|
-
}
|
|
309
|
-
return "claude_code";
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
// src/commands/cursor-install.ts
|
|
313
|
-
import { existsSync as existsSync5, readFileSync as readFileSync5 } from "fs";
|
|
314
|
-
import { homedir as homedir4 } from "os";
|
|
315
|
-
import { isAbsolute as isAbsolute5, join as join7 } from "path";
|
|
316
|
-
|
|
317
282
|
// src/lib/hook-runtime.ts
|
|
318
283
|
import { createHash, randomBytes as randomBytes2 } from "crypto";
|
|
319
284
|
import {
|
|
320
285
|
constants as constants2,
|
|
321
286
|
accessSync,
|
|
322
|
-
chmodSync
|
|
287
|
+
chmodSync,
|
|
323
288
|
copyFileSync,
|
|
324
289
|
existsSync as existsSync3,
|
|
325
290
|
lstatSync,
|
|
326
|
-
mkdirSync as
|
|
291
|
+
mkdirSync as mkdirSync3,
|
|
327
292
|
mkdtempSync,
|
|
328
293
|
readFileSync as readFileSync3,
|
|
329
294
|
readdirSync,
|
|
@@ -334,12 +299,12 @@ import {
|
|
|
334
299
|
utimesSync,
|
|
335
300
|
writeFileSync as writeFileSync3
|
|
336
301
|
} from "fs";
|
|
337
|
-
import { delimiter, dirname as dirname4, isAbsolute as isAbsolute3, join as
|
|
302
|
+
import { delimiter, dirname as dirname4, isAbsolute as isAbsolute3, join as join4, resolve } from "path";
|
|
338
303
|
|
|
339
304
|
// src/lib/file-lock.ts
|
|
340
305
|
import { randomBytes } from "crypto";
|
|
341
|
-
import { existsSync as existsSync2, mkdirSync as
|
|
342
|
-
import { dirname as dirname3, join as
|
|
306
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, rmSync as rmSync2, statSync, writeFileSync as writeFileSync2 } from "fs";
|
|
307
|
+
import { dirname as dirname3, join as join2 } from "path";
|
|
343
308
|
|
|
344
309
|
// src/lib/process-liveness.ts
|
|
345
310
|
function processIsAlive(pid, probe = process.kill) {
|
|
@@ -359,7 +324,7 @@ var DEFAULT_INIT_GRACE_MS = 2e3;
|
|
|
359
324
|
var DIRECTORY_MODE = 448;
|
|
360
325
|
var FILE_MODE = 384;
|
|
361
326
|
function ownerPath(lockDir) {
|
|
362
|
-
return
|
|
327
|
+
return join2(lockDir, "owner.json");
|
|
363
328
|
}
|
|
364
329
|
function readOwner(lockDir) {
|
|
365
330
|
try {
|
|
@@ -377,7 +342,7 @@ function sameOwner(a, b) {
|
|
|
377
342
|
}
|
|
378
343
|
function tryTakeLock(lockDir, now) {
|
|
379
344
|
try {
|
|
380
|
-
|
|
345
|
+
mkdirSync2(lockDir, { mode: DIRECTORY_MODE });
|
|
381
346
|
} catch (error) {
|
|
382
347
|
if (error.code === "EEXIST") return null;
|
|
383
348
|
throw error;
|
|
@@ -448,7 +413,7 @@ async function defaultSleep(ms, signal) {
|
|
|
448
413
|
}
|
|
449
414
|
var syncSleeper = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT));
|
|
450
415
|
async function withFileLock(lockDir, operation, options = {}) {
|
|
451
|
-
|
|
416
|
+
mkdirSync2(dirname3(lockDir), { recursive: true, mode: DIRECTORY_MODE });
|
|
452
417
|
const nowMs = options.nowMs ?? Date.now;
|
|
453
418
|
const alive = options.processAlive ?? processIsAlive;
|
|
454
419
|
const deadline = nowMs() + (options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
@@ -618,8 +583,8 @@ exit 0
|
|
|
618
583
|
`;
|
|
619
584
|
|
|
620
585
|
// src/lib/paths.ts
|
|
621
|
-
import { homedir
|
|
622
|
-
import { isAbsolute as isAbsolute2, join as
|
|
586
|
+
import { homedir } from "os";
|
|
587
|
+
import { isAbsolute as isAbsolute2, join as join3, normalize } from "path";
|
|
623
588
|
var UNSAFE_CONFIG_PATH_CHARACTERS = /[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u;
|
|
624
589
|
function absolutePath(value, variable) {
|
|
625
590
|
if (value !== void 0 && UNSAFE_CONFIG_PATH_CHARACTERS.test(value)) {
|
|
@@ -634,12 +599,12 @@ function resolvePrimConfigDirectory(options = {}) {
|
|
|
634
599
|
const explicit = absolutePath(env.PRIM_CONFIG_DIR, "PRIM_CONFIG_DIR");
|
|
635
600
|
if (explicit) return { path: explicit, source: "explicit" };
|
|
636
601
|
const xdgConfigHome = absolutePath(env.XDG_CONFIG_HOME, "XDG_CONFIG_HOME");
|
|
637
|
-
if (xdgConfigHome) return { path:
|
|
638
|
-
const home = absolutePath(options.homeDir ??
|
|
602
|
+
if (xdgConfigHome) return { path: join3(xdgConfigHome, "prim"), source: "xdg" };
|
|
603
|
+
const home = absolutePath(options.homeDir ?? homedir(), "HOME");
|
|
639
604
|
if (!home) {
|
|
640
605
|
throw new Error("cannot resolve Primitive config directory: HOME is not an absolute path");
|
|
641
606
|
}
|
|
642
|
-
return { path:
|
|
607
|
+
return { path: join3(home, ".config", "prim"), source: "default" };
|
|
643
608
|
}
|
|
644
609
|
function primConfigDirectory(options = {}) {
|
|
645
610
|
return resolvePrimConfigDirectory(options).path;
|
|
@@ -677,15 +642,15 @@ function hookRuntimePaths(options = {}) {
|
|
|
677
642
|
env,
|
|
678
643
|
homeDir: options.homeDir ?? env.HOME ?? ""
|
|
679
644
|
});
|
|
680
|
-
const runtimeDir =
|
|
645
|
+
const runtimeDir = join4(configDir, "hook-runtime");
|
|
681
646
|
return {
|
|
682
647
|
configDir,
|
|
683
|
-
launcher:
|
|
684
|
-
gitHookEntrypoint:
|
|
648
|
+
launcher: join4(configDir, STABLE_HOOK_LAUNCHER_NAME),
|
|
649
|
+
gitHookEntrypoint: join4(configDir, GIT_HOOK_ENTRYPOINT_NAME),
|
|
685
650
|
runtimeDir,
|
|
686
|
-
releasesDir:
|
|
687
|
-
current:
|
|
688
|
-
selectionLock:
|
|
651
|
+
releasesDir: join4(runtimeDir, "releases"),
|
|
652
|
+
current: join4(runtimeDir, "current"),
|
|
653
|
+
selectionLock: join4(runtimeDir, "selection.lock")
|
|
689
654
|
};
|
|
690
655
|
}
|
|
691
656
|
var STABLE_HOOK_LAUNCHER_CONTENT = `#!/bin/sh
|
|
@@ -744,8 +709,8 @@ function lstatIfPresent(path) {
|
|
|
744
709
|
|
|
745
710
|
// src/commands/claude-install.ts
|
|
746
711
|
import { existsSync as existsSync4, readFileSync as readFileSync4 } from "fs";
|
|
747
|
-
import { homedir as
|
|
748
|
-
import { join as
|
|
712
|
+
import { homedir as homedir2 } from "os";
|
|
713
|
+
import { join as join5 } from "path";
|
|
749
714
|
|
|
750
715
|
// src/lib/git.ts
|
|
751
716
|
import { execFileSync } from "child_process";
|
|
@@ -859,7 +824,7 @@ var SESSION_END_BIN = "prim-session-end";
|
|
|
859
824
|
var STATUSLINE_BIN = "prim-statusline";
|
|
860
825
|
var STATUSLINE_ARGS = "";
|
|
861
826
|
var STATUSLINE_COMMAND = stableHookCommand(STATUSLINE_BIN, STATUSLINE_ARGS);
|
|
862
|
-
var USER_SCOPE_PATH =
|
|
827
|
+
var USER_SCOPE_PATH = join5(homedir2(), ".claude", "settings.json");
|
|
863
828
|
function projectRoot() {
|
|
864
829
|
return gitToplevel() ?? process.cwd();
|
|
865
830
|
}
|
|
@@ -934,15 +899,15 @@ var REGISTRATIONS2 = [
|
|
|
934
899
|
{ event: "sessionStart", bin: SESSION_START_BIN2 },
|
|
935
900
|
{ event: "sessionEnd", bin: SESSION_END_BIN2 }
|
|
936
901
|
];
|
|
937
|
-
function cursorConfigDirectory(env = process.env, home =
|
|
902
|
+
function cursorConfigDirectory(env = process.env, home = homedir3(), platform = process.platform) {
|
|
938
903
|
const explicit = env.CURSOR_CONFIG_DIR?.trim();
|
|
939
904
|
if (explicit && isAbsolute5(explicit)) return explicit;
|
|
940
905
|
const xdg = env.XDG_CONFIG_HOME?.trim();
|
|
941
|
-
if (platform !== "darwin" && xdg && isAbsolute5(xdg)) return
|
|
942
|
-
return
|
|
906
|
+
if (platform !== "darwin" && xdg && isAbsolute5(xdg)) return join6(xdg, "cursor");
|
|
907
|
+
return join6(home, ".cursor");
|
|
943
908
|
}
|
|
944
909
|
function cursorHooksPath(scope, root = projectRoot()) {
|
|
945
|
-
return scope === "user" ?
|
|
910
|
+
return scope === "user" ? join6(cursorConfigDirectory(), "hooks.json") : join6(root, ".cursor", "hooks.json");
|
|
946
911
|
}
|
|
947
912
|
function plainObject(value) {
|
|
948
913
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -1145,13 +1110,13 @@ function readHookStdin(timeoutMs = 1e3, maxBytes = DEFAULT_MAX_BYTES) {
|
|
|
1145
1110
|
|
|
1146
1111
|
// src/client.ts
|
|
1147
1112
|
import { createHash as createHash4 } from "crypto";
|
|
1148
|
-
import { chmodSync as
|
|
1113
|
+
import { chmodSync as chmodSync2, existsSync as existsSync6, mkdirSync as mkdirSync4, readFileSync as readFileSync7, rmSync as rmSync4 } from "fs";
|
|
1149
1114
|
import { dirname as dirname7 } from "path";
|
|
1150
1115
|
|
|
1151
1116
|
// src/lib/credentials.ts
|
|
1152
1117
|
import { createHash as createHash3 } from "crypto";
|
|
1153
1118
|
import { readFileSync as readFileSync6 } from "fs";
|
|
1154
|
-
import { join as
|
|
1119
|
+
import { join as join7 } from "path";
|
|
1155
1120
|
|
|
1156
1121
|
// src/lib/workos-connect.ts
|
|
1157
1122
|
var TOKEN_PATH = "/oauth2/token";
|
|
@@ -1299,14 +1264,14 @@ function parseWorkosConnectTokens(value, options = {}) {
|
|
|
1299
1264
|
|
|
1300
1265
|
// src/lib/credentials.ts
|
|
1301
1266
|
var CONFIG_DIRECTORY = primConfigDirectory();
|
|
1302
|
-
var TOKEN_FILE_PATH =
|
|
1303
|
-
var REFRESH_TOKEN_PATH =
|
|
1304
|
-
var TOKEN_EXPIRES_PATH =
|
|
1305
|
-
var TERMINAL_REFRESH_PATH =
|
|
1306
|
-
var CREDENTIAL_METADATA_PATH =
|
|
1307
|
-
var CREDENTIAL_FAMILY_PATH =
|
|
1308
|
-
var CREDENTIAL_MIGRATION_PATH =
|
|
1309
|
-
var CREDENTIAL_LOCK_PATH =
|
|
1267
|
+
var TOKEN_FILE_PATH = join7(CONFIG_DIRECTORY, "token");
|
|
1268
|
+
var REFRESH_TOKEN_PATH = join7(CONFIG_DIRECTORY, "refresh_token");
|
|
1269
|
+
var TOKEN_EXPIRES_PATH = join7(CONFIG_DIRECTORY, "token_expires_at");
|
|
1270
|
+
var TERMINAL_REFRESH_PATH = join7(CONFIG_DIRECTORY, "refresh_terminal");
|
|
1271
|
+
var CREDENTIAL_METADATA_PATH = join7(CONFIG_DIRECTORY, "credential_metadata.json");
|
|
1272
|
+
var CREDENTIAL_FAMILY_PATH = join7(CONFIG_DIRECTORY, "credential_family.json");
|
|
1273
|
+
var CREDENTIAL_MIGRATION_PATH = join7(CONFIG_DIRECTORY, "credential_migration.json");
|
|
1274
|
+
var CREDENTIAL_LOCK_PATH = join7(CONFIG_DIRECTORY, "credentials.lock");
|
|
1310
1275
|
var MAX_CREDENTIAL_METADATA_BYTES = 4096;
|
|
1311
1276
|
var CREDENTIAL_MIGRATION_VERSION = 1;
|
|
1312
1277
|
var CREDENTIAL_MIGRATION_STATE = "family_bound";
|
|
@@ -1506,8 +1471,8 @@ function expiresAtFor(token, expiresIn) {
|
|
|
1506
1471
|
}
|
|
1507
1472
|
function ensureConfigDirectory() {
|
|
1508
1473
|
const directory = dirname7(TOKEN_FILE_PATH);
|
|
1509
|
-
|
|
1510
|
-
|
|
1474
|
+
mkdirSync4(directory, { recursive: true, mode: CONFIG_DIR_MODE });
|
|
1475
|
+
chmodSync2(directory, CONFIG_DIR_MODE);
|
|
1511
1476
|
}
|
|
1512
1477
|
function atomicWrite(path, content) {
|
|
1513
1478
|
ensureConfigDirectory();
|
|
@@ -1939,7 +1904,7 @@ import {
|
|
|
1939
1904
|
existsSync as existsSync8,
|
|
1940
1905
|
fstatSync as fstatSync2,
|
|
1941
1906
|
lstatSync as lstatSync4,
|
|
1942
|
-
mkdirSync as
|
|
1907
|
+
mkdirSync as mkdirSync5,
|
|
1943
1908
|
openSync as openSync3,
|
|
1944
1909
|
readFileSync as readFileSync9,
|
|
1945
1910
|
readSync as readSync2,
|
|
@@ -1948,8 +1913,8 @@ import {
|
|
|
1948
1913
|
rmSync as rmSync5,
|
|
1949
1914
|
rmdirSync as rmdirSync2
|
|
1950
1915
|
} from "fs";
|
|
1951
|
-
import { homedir as
|
|
1952
|
-
import { dirname as dirname9, isAbsolute as isAbsolute6, join as
|
|
1916
|
+
import { homedir as homedir5 } from "os";
|
|
1917
|
+
import { dirname as dirname9, isAbsolute as isAbsolute6, join as join11, relative as relative2, resolve as resolve5, sep as sep2 } from "path";
|
|
1953
1918
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
1954
1919
|
|
|
1955
1920
|
// node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/identity.js
|
|
@@ -8234,8 +8199,8 @@ import {
|
|
|
8234
8199
|
rmdirSync,
|
|
8235
8200
|
unlinkSync
|
|
8236
8201
|
} from "fs";
|
|
8237
|
-
import { homedir as
|
|
8238
|
-
import { dirname as dirname8, join as
|
|
8202
|
+
import { homedir as homedir4 } from "os";
|
|
8203
|
+
import { dirname as dirname8, join as join10, resolve as resolve4 } from "path";
|
|
8239
8204
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
8240
8205
|
|
|
8241
8206
|
// node_modules/.pnpm/diff@5.2.2/node_modules/diff/lib/index.mjs
|
|
@@ -8405,7 +8370,7 @@ Diff.prototype = {
|
|
|
8405
8370
|
tokenize: function tokenize(value) {
|
|
8406
8371
|
return value.split("");
|
|
8407
8372
|
},
|
|
8408
|
-
join: function
|
|
8373
|
+
join: function join9(chars) {
|
|
8409
8374
|
return chars.join("");
|
|
8410
8375
|
}
|
|
8411
8376
|
};
|
|
@@ -8622,10 +8587,10 @@ function readCodexGuidance(path) {
|
|
|
8622
8587
|
}
|
|
8623
8588
|
}
|
|
8624
8589
|
function effectiveCodexGuidance(scope) {
|
|
8625
|
-
const override = readCodexGuidance(
|
|
8590
|
+
const override = readCodexGuidance(join10(scope, "AGENTS.override.md"));
|
|
8626
8591
|
if (override === null) return null;
|
|
8627
8592
|
if (override !== void 0 && override.toString("utf8").trim().length > 0) return override;
|
|
8628
|
-
const base = readCodexGuidance(
|
|
8593
|
+
const base = readCodexGuidance(join10(scope, "AGENTS.md"));
|
|
8629
8594
|
return base ?? null;
|
|
8630
8595
|
}
|
|
8631
8596
|
function hasUsablePrimBlock(content, visibleBytes) {
|
|
@@ -8648,7 +8613,7 @@ function hasUsablePrimBlock(content, visibleBytes) {
|
|
|
8648
8613
|
}
|
|
8649
8614
|
function hasUsableCodexGuidance(projectRoot2) {
|
|
8650
8615
|
try {
|
|
8651
|
-
const codexHome = process.env.CODEX_HOME?.trim() ? resolve4(process.env.CODEX_HOME) :
|
|
8616
|
+
const codexHome = process.env.CODEX_HOME?.trim() ? resolve4(process.env.CODEX_HOME) : join10(homedir4(), ".codex");
|
|
8652
8617
|
const scopes = [
|
|
8653
8618
|
{ path: codexHome, visibleBytes: CODEX_GUIDANCE_LIMIT_BYTES },
|
|
8654
8619
|
{ path: projectRoot2, visibleBytes: CODEX_DEFAULT_PROJECT_GUIDANCE_BYTES }
|
|
@@ -8668,14 +8633,14 @@ function sha256(content) {
|
|
|
8668
8633
|
}
|
|
8669
8634
|
function cursorSkillDirectory(cwd, scope) {
|
|
8670
8635
|
const base = scope === "user" ? cursorConfigDirectory() : gitToplevel(cwd) ?? cwd;
|
|
8671
|
-
return
|
|
8636
|
+
return join10(base, scope === "user" ? "skills" : ".cursor/skills", "prim");
|
|
8672
8637
|
}
|
|
8673
8638
|
function cursorSkillPaths(cwd, scope) {
|
|
8674
8639
|
const directory = cursorSkillDirectory(cwd, scope);
|
|
8675
8640
|
return {
|
|
8676
8641
|
directory,
|
|
8677
|
-
skill:
|
|
8678
|
-
manifest:
|
|
8642
|
+
skill: join10(directory, "SKILL.md"),
|
|
8643
|
+
manifest: join10(directory, CURSOR_SKILL_MANIFEST)
|
|
8679
8644
|
};
|
|
8680
8645
|
}
|
|
8681
8646
|
function readCursorSkillManifest(path) {
|
|
@@ -8728,8 +8693,8 @@ var MAX_SKILL_BYTES = 1024 * 1024;
|
|
|
8728
8693
|
var REFRESH_LOCK_TIMEOUT_MS = 150;
|
|
8729
8694
|
var REFRESH_LOCK_POLL_MS = 10;
|
|
8730
8695
|
function pluginDirFor(cwd, scope) {
|
|
8731
|
-
const base = scope === "user" ?
|
|
8732
|
-
return
|
|
8696
|
+
const base = scope === "user" ? join11(homedir5(), ".claude") : join11(gitToplevel(cwd) ?? cwd, ".claude");
|
|
8697
|
+
return join11(base, "skills", "prim");
|
|
8733
8698
|
}
|
|
8734
8699
|
function packageVersion2() {
|
|
8735
8700
|
let dir = __dirname2;
|
|
@@ -8751,8 +8716,8 @@ function renderClaudePlugin() {
|
|
|
8751
8716
|
}
|
|
8752
8717
|
function pluginPaths(dir) {
|
|
8753
8718
|
return {
|
|
8754
|
-
manifestPath:
|
|
8755
|
-
skillPath:
|
|
8719
|
+
manifestPath: join11(dir, ".claude-plugin", "plugin.json"),
|
|
8720
|
+
skillPath: join11(dir, "SKILL.md")
|
|
8756
8721
|
};
|
|
8757
8722
|
}
|
|
8758
8723
|
function pathIsInside(root, path) {
|
|
@@ -8817,9 +8782,9 @@ function inspectRecognizedInstallation(paths, projectRoot2) {
|
|
|
8817
8782
|
};
|
|
8818
8783
|
}
|
|
8819
8784
|
function refreshLockDir(physicalPluginDir) {
|
|
8820
|
-
const cacheRoot = process.env.XDG_CACHE_HOME ||
|
|
8785
|
+
const cacheRoot = process.env.XDG_CACHE_HOME || join11(homedir5(), ".cache");
|
|
8821
8786
|
const identity = createHash6("sha256").update(physicalPluginDir).digest("hex");
|
|
8822
|
-
return
|
|
8787
|
+
return join11(cacheRoot, "prim", "skill-refresh-locks", `${identity}.lock`);
|
|
8823
8788
|
}
|
|
8824
8789
|
async function refreshClaudePlugins(cwd, options = {}) {
|
|
8825
8790
|
const result = { installed: 0, refreshed: 0 };
|
|
@@ -8827,7 +8792,7 @@ async function refreshClaudePlugins(cwd, options = {}) {
|
|
|
8827
8792
|
if (options.includeProject !== false) {
|
|
8828
8793
|
const projectRoot2 = options.projectRoot ?? gitToplevel(cwd);
|
|
8829
8794
|
if (projectRoot2 !== null && isAbsolute6(projectRoot2)) {
|
|
8830
|
-
candidates.push({ dir:
|
|
8795
|
+
candidates.push({ dir: join11(projectRoot2, ".claude", "skills", "prim"), projectRoot: projectRoot2 });
|
|
8831
8796
|
}
|
|
8832
8797
|
}
|
|
8833
8798
|
candidates.push({ dir: pluginDirFor(cwd, "user") });
|
|
@@ -8891,7 +8856,7 @@ async function refreshClaudePlugins(cwd, options = {}) {
|
|
|
8891
8856
|
|
|
8892
8857
|
// src/daemon/client.ts
|
|
8893
8858
|
import { createConnection } from "net";
|
|
8894
|
-
import { join as
|
|
8859
|
+
import { join as join12 } from "path";
|
|
8895
8860
|
|
|
8896
8861
|
// src/daemon/principal.ts
|
|
8897
8862
|
import { createHash as createHash7 } from "crypto";
|
|
@@ -8941,7 +8906,7 @@ function parseDaemonResponseEnvelope(value) {
|
|
|
8941
8906
|
}
|
|
8942
8907
|
|
|
8943
8908
|
// src/daemon/client.ts
|
|
8944
|
-
var SOCK_PATH =
|
|
8909
|
+
var SOCK_PATH = join12(primConfigDirectory(), "sock");
|
|
8945
8910
|
var DEFAULT_TIMEOUT_MS2 = 250;
|
|
8946
8911
|
var nextRequestId = 1;
|
|
8947
8912
|
function daemonRequest(method, params = {}, opts = {}) {
|
|
@@ -9248,8 +9213,8 @@ async function acknowledgeDecisionFeedback(input, dependencies = {}) {
|
|
|
9248
9213
|
// src/lib/activation.ts
|
|
9249
9214
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
9250
9215
|
import { existsSync as existsSync9, readFileSync as readFileSync10 } from "fs";
|
|
9251
|
-
import { homedir as
|
|
9252
|
-
import { join as
|
|
9216
|
+
import { homedir as homedir6 } from "os";
|
|
9217
|
+
import { join as join13 } from "path";
|
|
9253
9218
|
var PRIM_ACTIVE_KEY = "prim.active";
|
|
9254
9219
|
var PRIM_REPO_SYNC_ID_KEY = "prim.repoSyncId";
|
|
9255
9220
|
var PRIM_REPO_SYNC_REPOSITORY_KEY = "prim.repoSyncRepository";
|
|
@@ -9345,9 +9310,9 @@ function repositoryBindingState(cwd) {
|
|
|
9345
9310
|
}
|
|
9346
9311
|
function hasProjectPrimInstall(cwd) {
|
|
9347
9312
|
const root = gitToplevel(cwd);
|
|
9348
|
-
if (root === null || root ===
|
|
9313
|
+
if (root === null || root === homedir6()) return false;
|
|
9349
9314
|
for (const rel of PROJECT_INSTALL_FILES) {
|
|
9350
|
-
const path =
|
|
9315
|
+
const path = join13(root, rel);
|
|
9351
9316
|
if (existsSync9(path)) {
|
|
9352
9317
|
try {
|
|
9353
9318
|
const content = readFileSync10(path, "utf-8");
|
|
@@ -9368,6 +9333,39 @@ function decisionIngestionStatus(cwd) {
|
|
|
9368
9333
|
return isRepoActiveForCapture(cwd) ? "enabled" : "disabled";
|
|
9369
9334
|
}
|
|
9370
9335
|
|
|
9336
|
+
// src/lib/bin-cache.ts
|
|
9337
|
+
import { chmodSync as chmodSync3, mkdirSync as mkdirSync6 } from "fs";
|
|
9338
|
+
import { homedir as homedir7 } from "os";
|
|
9339
|
+
import { join as join14 } from "path";
|
|
9340
|
+
var GIT_HOOK_CACHE_SHELL_DIR = "${XDG_CACHE_HOME:-$HOME/.cache}/prim/bin";
|
|
9341
|
+
var GIT_HOOK_CACHE_TTL_MINUTES = 1440;
|
|
9342
|
+
var GIT_HOOK_CACHED_BINS = ["prim-post-commit", "prim-post-rewrite"];
|
|
9343
|
+
function binCacheDir() {
|
|
9344
|
+
const base = process.env.XDG_CACHE_HOME || join14(homedir7(), ".cache");
|
|
9345
|
+
return join14(base, "prim", "bin");
|
|
9346
|
+
}
|
|
9347
|
+
function writeAtomic(path, content) {
|
|
9348
|
+
atomicWriteFile(path, content, { mode: 384 });
|
|
9349
|
+
}
|
|
9350
|
+
function warmBinCache() {
|
|
9351
|
+
try {
|
|
9352
|
+
if (process.env.PRIM_BIN_CACHE === "0") {
|
|
9353
|
+
return;
|
|
9354
|
+
}
|
|
9355
|
+
const dir = binCacheDir();
|
|
9356
|
+
mkdirSync6(dir, { recursive: true, mode: 448 });
|
|
9357
|
+
chmodSync3(dir, 448);
|
|
9358
|
+
writeAtomic(join14(dir, "node"), process.execPath);
|
|
9359
|
+
for (const bin of GIT_HOOK_CACHED_BINS) {
|
|
9360
|
+
const file = binFile(bin);
|
|
9361
|
+
if (file) {
|
|
9362
|
+
writeAtomic(join14(dir, bin), file);
|
|
9363
|
+
}
|
|
9364
|
+
}
|
|
9365
|
+
} catch {
|
|
9366
|
+
}
|
|
9367
|
+
}
|
|
9368
|
+
|
|
9371
9369
|
// src/generated/cli-http-v1.validators.js
|
|
9372
9370
|
var import_ucs2length = __toESM(require_ucs2length(), 1);
|
|
9373
9371
|
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 };
|
|
@@ -20448,7 +20446,6 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20448
20446
|
return errors === 0;
|
|
20449
20447
|
}
|
|
20450
20448
|
validate45.evaluated = { "dynamicProps": true, "dynamicItems": false };
|
|
20451
|
-
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 }] };
|
|
20452
20449
|
function validate46(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
20453
20450
|
;
|
|
20454
20451
|
let vErrors = null;
|
|
@@ -20598,7 +20595,7 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20598
20595
|
if (errors === _errs12) {
|
|
20599
20596
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
20600
20597
|
let missing2;
|
|
20601
|
-
if (data.error === void 0 && (missing2 = "error")
|
|
20598
|
+
if (data.error === void 0 && (missing2 = "error")) {
|
|
20602
20599
|
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 + "'" };
|
|
20603
20600
|
if (vErrors === null) {
|
|
20604
20601
|
vErrors = [err10];
|
|
@@ -20609,7 +20606,7 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20609
20606
|
} else {
|
|
20610
20607
|
const _errs14 = errors;
|
|
20611
20608
|
for (const key2 in data) {
|
|
20612
|
-
if (!(key2 === "error"
|
|
20609
|
+
if (!(key2 === "error")) {
|
|
20613
20610
|
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" };
|
|
20614
20611
|
if (vErrors === null) {
|
|
20615
20612
|
vErrors = [err11];
|
|
@@ -20623,7 +20620,6 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20623
20620
|
if (_errs14 === errors) {
|
|
20624
20621
|
if (data.error !== void 0) {
|
|
20625
20622
|
let data2 = data.error;
|
|
20626
|
-
const _errs15 = errors;
|
|
20627
20623
|
if (typeof data2 !== "string") {
|
|
20628
20624
|
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" };
|
|
20629
20625
|
if (vErrors === null) {
|
|
@@ -20633,8 +20629,8 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20633
20629
|
}
|
|
20634
20630
|
errors++;
|
|
20635
20631
|
}
|
|
20636
|
-
if ("
|
|
20637
|
-
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: "
|
|
20632
|
+
if ("github_connect_unavailable" !== data2) {
|
|
20633
|
+
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" };
|
|
20638
20634
|
if (vErrors === null) {
|
|
20639
20635
|
vErrors = [err13];
|
|
20640
20636
|
} else {
|
|
@@ -20642,45 +20638,15 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20642
20638
|
}
|
|
20643
20639
|
errors++;
|
|
20644
20640
|
}
|
|
20645
|
-
var valid4 = _errs15 === errors;
|
|
20646
|
-
} else {
|
|
20647
|
-
var valid4 = true;
|
|
20648
|
-
}
|
|
20649
|
-
if (valid4) {
|
|
20650
|
-
if (data.feature !== void 0) {
|
|
20651
|
-
let data3 = data.feature;
|
|
20652
|
-
const _errs17 = errors;
|
|
20653
|
-
if (typeof data3 !== "string") {
|
|
20654
|
-
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" };
|
|
20655
|
-
if (vErrors === null) {
|
|
20656
|
-
vErrors = [err14];
|
|
20657
|
-
} else {
|
|
20658
|
-
vErrors.push(err14);
|
|
20659
|
-
}
|
|
20660
|
-
errors++;
|
|
20661
|
-
}
|
|
20662
|
-
if ("github-connect" !== data3) {
|
|
20663
|
-
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" };
|
|
20664
|
-
if (vErrors === null) {
|
|
20665
|
-
vErrors = [err15];
|
|
20666
|
-
} else {
|
|
20667
|
-
vErrors.push(err15);
|
|
20668
|
-
}
|
|
20669
|
-
errors++;
|
|
20670
|
-
}
|
|
20671
|
-
var valid4 = _errs17 === errors;
|
|
20672
|
-
} else {
|
|
20673
|
-
var valid4 = true;
|
|
20674
|
-
}
|
|
20675
20641
|
}
|
|
20676
20642
|
}
|
|
20677
20643
|
}
|
|
20678
20644
|
} else {
|
|
20679
|
-
const
|
|
20645
|
+
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" };
|
|
20680
20646
|
if (vErrors === null) {
|
|
20681
|
-
vErrors = [
|
|
20647
|
+
vErrors = [err14];
|
|
20682
20648
|
} else {
|
|
20683
|
-
vErrors.push(
|
|
20649
|
+
vErrors.push(err14);
|
|
20684
20650
|
}
|
|
20685
20651
|
errors++;
|
|
20686
20652
|
}
|
|
@@ -20692,148 +20658,117 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20692
20658
|
props0 = true;
|
|
20693
20659
|
}
|
|
20694
20660
|
}
|
|
20695
|
-
const
|
|
20696
|
-
if (errors ===
|
|
20661
|
+
const _errs17 = errors;
|
|
20662
|
+
if (errors === _errs17) {
|
|
20697
20663
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
20698
20664
|
let missing3;
|
|
20699
|
-
if (data.error === void 0 && (missing3 = "error")
|
|
20700
|
-
const
|
|
20665
|
+
if (data.error === void 0 && (missing3 = "error")) {
|
|
20666
|
+
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 + "'" };
|
|
20701
20667
|
if (vErrors === null) {
|
|
20702
|
-
vErrors = [
|
|
20668
|
+
vErrors = [err15];
|
|
20703
20669
|
} else {
|
|
20704
|
-
vErrors.push(
|
|
20670
|
+
vErrors.push(err15);
|
|
20705
20671
|
}
|
|
20706
20672
|
errors++;
|
|
20707
20673
|
} else {
|
|
20708
|
-
const
|
|
20674
|
+
const _errs19 = errors;
|
|
20709
20675
|
for (const key3 in data) {
|
|
20710
|
-
if (!(key3 === "error"
|
|
20711
|
-
const
|
|
20676
|
+
if (!(key3 === "error")) {
|
|
20677
|
+
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" };
|
|
20712
20678
|
if (vErrors === null) {
|
|
20713
|
-
vErrors = [
|
|
20679
|
+
vErrors = [err16];
|
|
20714
20680
|
} else {
|
|
20715
|
-
vErrors.push(
|
|
20681
|
+
vErrors.push(err16);
|
|
20716
20682
|
}
|
|
20717
20683
|
errors++;
|
|
20718
20684
|
break;
|
|
20719
20685
|
}
|
|
20720
20686
|
}
|
|
20721
|
-
if (
|
|
20687
|
+
if (_errs19 === errors) {
|
|
20722
20688
|
if (data.error !== void 0) {
|
|
20723
|
-
let
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
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" };
|
|
20689
|
+
let data3 = data.error;
|
|
20690
|
+
if (typeof data3 !== "string") {
|
|
20691
|
+
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" };
|
|
20727
20692
|
if (vErrors === null) {
|
|
20728
|
-
vErrors = [
|
|
20693
|
+
vErrors = [err17];
|
|
20729
20694
|
} else {
|
|
20730
|
-
vErrors.push(
|
|
20695
|
+
vErrors.push(err17);
|
|
20731
20696
|
}
|
|
20732
20697
|
errors++;
|
|
20733
20698
|
}
|
|
20734
|
-
if (
|
|
20735
|
-
const
|
|
20699
|
+
if ("WorkOS identity authority is temporarily unavailable" !== data3) {
|
|
20700
|
+
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" };
|
|
20736
20701
|
if (vErrors === null) {
|
|
20737
|
-
vErrors = [
|
|
20702
|
+
vErrors = [err18];
|
|
20738
20703
|
} else {
|
|
20739
|
-
vErrors.push(
|
|
20704
|
+
vErrors.push(err18);
|
|
20740
20705
|
}
|
|
20741
20706
|
errors++;
|
|
20742
20707
|
}
|
|
20743
|
-
var valid5 = _errs22 === errors;
|
|
20744
|
-
} else {
|
|
20745
|
-
var valid5 = true;
|
|
20746
|
-
}
|
|
20747
|
-
if (valid5) {
|
|
20748
|
-
if (data.feature !== void 0) {
|
|
20749
|
-
let data5 = data.feature;
|
|
20750
|
-
const _errs24 = errors;
|
|
20751
|
-
if (typeof data5 !== "string") {
|
|
20752
|
-
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" };
|
|
20753
|
-
if (vErrors === null) {
|
|
20754
|
-
vErrors = [err21];
|
|
20755
|
-
} else {
|
|
20756
|
-
vErrors.push(err21);
|
|
20757
|
-
}
|
|
20758
|
-
errors++;
|
|
20759
|
-
}
|
|
20760
|
-
if ("github-connect" !== data5) {
|
|
20761
|
-
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" };
|
|
20762
|
-
if (vErrors === null) {
|
|
20763
|
-
vErrors = [err22];
|
|
20764
|
-
} else {
|
|
20765
|
-
vErrors.push(err22);
|
|
20766
|
-
}
|
|
20767
|
-
errors++;
|
|
20768
|
-
}
|
|
20769
|
-
var valid5 = _errs24 === errors;
|
|
20770
|
-
} else {
|
|
20771
|
-
var valid5 = true;
|
|
20772
|
-
}
|
|
20773
20708
|
}
|
|
20774
20709
|
}
|
|
20775
20710
|
}
|
|
20776
20711
|
} else {
|
|
20777
|
-
const
|
|
20712
|
+
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" };
|
|
20778
20713
|
if (vErrors === null) {
|
|
20779
|
-
vErrors = [
|
|
20714
|
+
vErrors = [err19];
|
|
20780
20715
|
} else {
|
|
20781
|
-
vErrors.push(
|
|
20716
|
+
vErrors.push(err19);
|
|
20782
20717
|
}
|
|
20783
20718
|
errors++;
|
|
20784
20719
|
}
|
|
20785
20720
|
}
|
|
20786
|
-
var _valid0 =
|
|
20721
|
+
var _valid0 = _errs17 === errors;
|
|
20787
20722
|
valid1 = valid1 || _valid0;
|
|
20788
20723
|
if (_valid0) {
|
|
20789
20724
|
if (props0 !== true) {
|
|
20790
20725
|
props0 = true;
|
|
20791
20726
|
}
|
|
20792
20727
|
}
|
|
20793
|
-
const
|
|
20794
|
-
if (errors ===
|
|
20728
|
+
const _errs22 = errors;
|
|
20729
|
+
if (errors === _errs22) {
|
|
20795
20730
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
20796
20731
|
let missing4;
|
|
20797
20732
|
if (data.error === void 0 && (missing4 = "error")) {
|
|
20798
|
-
const
|
|
20733
|
+
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 + "'" };
|
|
20799
20734
|
if (vErrors === null) {
|
|
20800
|
-
vErrors = [
|
|
20735
|
+
vErrors = [err20];
|
|
20801
20736
|
} else {
|
|
20802
|
-
vErrors.push(
|
|
20737
|
+
vErrors.push(err20);
|
|
20803
20738
|
}
|
|
20804
20739
|
errors++;
|
|
20805
20740
|
} else {
|
|
20806
|
-
const
|
|
20741
|
+
const _errs24 = errors;
|
|
20807
20742
|
for (const key4 in data) {
|
|
20808
20743
|
if (!(key4 === "error")) {
|
|
20809
|
-
const
|
|
20744
|
+
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" };
|
|
20810
20745
|
if (vErrors === null) {
|
|
20811
|
-
vErrors = [
|
|
20746
|
+
vErrors = [err21];
|
|
20812
20747
|
} else {
|
|
20813
|
-
vErrors.push(
|
|
20748
|
+
vErrors.push(err21);
|
|
20814
20749
|
}
|
|
20815
20750
|
errors++;
|
|
20816
20751
|
break;
|
|
20817
20752
|
}
|
|
20818
20753
|
}
|
|
20819
|
-
if (
|
|
20754
|
+
if (_errs24 === errors) {
|
|
20820
20755
|
if (data.error !== void 0) {
|
|
20821
|
-
let
|
|
20822
|
-
if (typeof
|
|
20823
|
-
const
|
|
20756
|
+
let data4 = data.error;
|
|
20757
|
+
if (typeof data4 !== "string") {
|
|
20758
|
+
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" };
|
|
20824
20759
|
if (vErrors === null) {
|
|
20825
|
-
vErrors = [
|
|
20760
|
+
vErrors = [err22];
|
|
20826
20761
|
} else {
|
|
20827
|
-
vErrors.push(
|
|
20762
|
+
vErrors.push(err22);
|
|
20828
20763
|
}
|
|
20829
20764
|
errors++;
|
|
20830
20765
|
}
|
|
20831
|
-
if ("
|
|
20832
|
-
const
|
|
20766
|
+
if ("github_install_intent_conflict" !== data4) {
|
|
20767
|
+
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" };
|
|
20833
20768
|
if (vErrors === null) {
|
|
20834
|
-
vErrors = [
|
|
20769
|
+
vErrors = [err23];
|
|
20835
20770
|
} else {
|
|
20836
|
-
vErrors.push(
|
|
20771
|
+
vErrors.push(err23);
|
|
20837
20772
|
}
|
|
20838
20773
|
errors++;
|
|
20839
20774
|
}
|
|
@@ -20841,195 +20776,128 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20841
20776
|
}
|
|
20842
20777
|
}
|
|
20843
20778
|
} else {
|
|
20844
|
-
const
|
|
20779
|
+
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" };
|
|
20845
20780
|
if (vErrors === null) {
|
|
20846
|
-
vErrors = [
|
|
20781
|
+
vErrors = [err24];
|
|
20847
20782
|
} else {
|
|
20848
|
-
vErrors.push(
|
|
20783
|
+
vErrors.push(err24);
|
|
20849
20784
|
}
|
|
20850
20785
|
errors++;
|
|
20851
20786
|
}
|
|
20852
20787
|
}
|
|
20853
|
-
var _valid0 =
|
|
20788
|
+
var _valid0 = _errs22 === errors;
|
|
20854
20789
|
valid1 = valid1 || _valid0;
|
|
20855
20790
|
if (_valid0) {
|
|
20856
20791
|
if (props0 !== true) {
|
|
20857
20792
|
props0 = true;
|
|
20858
20793
|
}
|
|
20859
20794
|
}
|
|
20860
|
-
const
|
|
20861
|
-
if (errors ===
|
|
20795
|
+
const _errs27 = errors;
|
|
20796
|
+
if (errors === _errs27) {
|
|
20862
20797
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
20863
20798
|
let missing5;
|
|
20864
|
-
if (data.error === void 0 && (missing5 = "error")) {
|
|
20865
|
-
const
|
|
20799
|
+
if (data.error === void 0 && (missing5 = "error") || data.retryAt === void 0 && (missing5 = "retryAt")) {
|
|
20800
|
+
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 + "'" };
|
|
20866
20801
|
if (vErrors === null) {
|
|
20867
|
-
vErrors = [
|
|
20802
|
+
vErrors = [err25];
|
|
20868
20803
|
} else {
|
|
20869
|
-
vErrors.push(
|
|
20804
|
+
vErrors.push(err25);
|
|
20870
20805
|
}
|
|
20871
20806
|
errors++;
|
|
20872
20807
|
} else {
|
|
20873
|
-
const
|
|
20808
|
+
const _errs29 = errors;
|
|
20874
20809
|
for (const key5 in data) {
|
|
20875
|
-
if (!(key5 === "error")) {
|
|
20876
|
-
const
|
|
20877
|
-
if (vErrors === null) {
|
|
20878
|
-
vErrors = [err30];
|
|
20879
|
-
} else {
|
|
20880
|
-
vErrors.push(err30);
|
|
20881
|
-
}
|
|
20882
|
-
errors++;
|
|
20883
|
-
break;
|
|
20884
|
-
}
|
|
20885
|
-
}
|
|
20886
|
-
if (_errs33 === errors) {
|
|
20887
|
-
if (data.error !== void 0) {
|
|
20888
|
-
let data7 = data.error;
|
|
20889
|
-
if (typeof data7 !== "string") {
|
|
20890
|
-
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" };
|
|
20891
|
-
if (vErrors === null) {
|
|
20892
|
-
vErrors = [err31];
|
|
20893
|
-
} else {
|
|
20894
|
-
vErrors.push(err31);
|
|
20895
|
-
}
|
|
20896
|
-
errors++;
|
|
20897
|
-
}
|
|
20898
|
-
if ("github_install_intent_conflict" !== data7) {
|
|
20899
|
-
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" };
|
|
20900
|
-
if (vErrors === null) {
|
|
20901
|
-
vErrors = [err32];
|
|
20902
|
-
} else {
|
|
20903
|
-
vErrors.push(err32);
|
|
20904
|
-
}
|
|
20905
|
-
errors++;
|
|
20906
|
-
}
|
|
20907
|
-
}
|
|
20908
|
-
}
|
|
20909
|
-
}
|
|
20910
|
-
} else {
|
|
20911
|
-
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" };
|
|
20912
|
-
if (vErrors === null) {
|
|
20913
|
-
vErrors = [err33];
|
|
20914
|
-
} else {
|
|
20915
|
-
vErrors.push(err33);
|
|
20916
|
-
}
|
|
20917
|
-
errors++;
|
|
20918
|
-
}
|
|
20919
|
-
}
|
|
20920
|
-
var _valid0 = _errs31 === errors;
|
|
20921
|
-
valid1 = valid1 || _valid0;
|
|
20922
|
-
if (_valid0) {
|
|
20923
|
-
if (props0 !== true) {
|
|
20924
|
-
props0 = true;
|
|
20925
|
-
}
|
|
20926
|
-
}
|
|
20927
|
-
const _errs36 = errors;
|
|
20928
|
-
if (errors === _errs36) {
|
|
20929
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
20930
|
-
let missing6;
|
|
20931
|
-
if (data.error === void 0 && (missing6 = "error") || data.retryAt === void 0 && (missing6 = "retryAt")) {
|
|
20932
|
-
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 + "'" };
|
|
20933
|
-
if (vErrors === null) {
|
|
20934
|
-
vErrors = [err34];
|
|
20935
|
-
} else {
|
|
20936
|
-
vErrors.push(err34);
|
|
20937
|
-
}
|
|
20938
|
-
errors++;
|
|
20939
|
-
} else {
|
|
20940
|
-
const _errs38 = errors;
|
|
20941
|
-
for (const key6 in data) {
|
|
20942
|
-
if (!(key6 === "error" || key6 === "retryAt")) {
|
|
20943
|
-
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" };
|
|
20810
|
+
if (!(key5 === "error" || key5 === "retryAt")) {
|
|
20811
|
+
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" };
|
|
20944
20812
|
if (vErrors === null) {
|
|
20945
|
-
vErrors = [
|
|
20813
|
+
vErrors = [err26];
|
|
20946
20814
|
} else {
|
|
20947
|
-
vErrors.push(
|
|
20815
|
+
vErrors.push(err26);
|
|
20948
20816
|
}
|
|
20949
20817
|
errors++;
|
|
20950
20818
|
break;
|
|
20951
20819
|
}
|
|
20952
20820
|
}
|
|
20953
|
-
if (
|
|
20821
|
+
if (_errs29 === errors) {
|
|
20954
20822
|
if (data.error !== void 0) {
|
|
20955
|
-
let
|
|
20956
|
-
const
|
|
20957
|
-
if (typeof
|
|
20958
|
-
const
|
|
20823
|
+
let data5 = data.error;
|
|
20824
|
+
const _errs30 = errors;
|
|
20825
|
+
if (typeof data5 !== "string") {
|
|
20826
|
+
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" };
|
|
20959
20827
|
if (vErrors === null) {
|
|
20960
|
-
vErrors = [
|
|
20828
|
+
vErrors = [err27];
|
|
20961
20829
|
} else {
|
|
20962
|
-
vErrors.push(
|
|
20830
|
+
vErrors.push(err27);
|
|
20963
20831
|
}
|
|
20964
20832
|
errors++;
|
|
20965
20833
|
}
|
|
20966
|
-
if ("github_install_intent_rate_limited" !==
|
|
20967
|
-
const
|
|
20834
|
+
if ("github_install_intent_rate_limited" !== data5) {
|
|
20835
|
+
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" };
|
|
20968
20836
|
if (vErrors === null) {
|
|
20969
|
-
vErrors = [
|
|
20837
|
+
vErrors = [err28];
|
|
20970
20838
|
} else {
|
|
20971
|
-
vErrors.push(
|
|
20839
|
+
vErrors.push(err28);
|
|
20972
20840
|
}
|
|
20973
20841
|
errors++;
|
|
20974
20842
|
}
|
|
20975
|
-
var
|
|
20843
|
+
var valid7 = _errs30 === errors;
|
|
20976
20844
|
} else {
|
|
20977
|
-
var
|
|
20845
|
+
var valid7 = true;
|
|
20978
20846
|
}
|
|
20979
|
-
if (
|
|
20847
|
+
if (valid7) {
|
|
20980
20848
|
if (data.retryAt !== void 0) {
|
|
20981
|
-
let
|
|
20982
|
-
const
|
|
20983
|
-
if (!(typeof
|
|
20984
|
-
const
|
|
20849
|
+
let data6 = data.retryAt;
|
|
20850
|
+
const _errs32 = errors;
|
|
20851
|
+
if (!(typeof data6 == "number" && (!(data6 % 1) && !isNaN(data6)) && isFinite(data6))) {
|
|
20852
|
+
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" };
|
|
20985
20853
|
if (vErrors === null) {
|
|
20986
|
-
vErrors = [
|
|
20854
|
+
vErrors = [err29];
|
|
20987
20855
|
} else {
|
|
20988
|
-
vErrors.push(
|
|
20856
|
+
vErrors.push(err29);
|
|
20989
20857
|
}
|
|
20990
20858
|
errors++;
|
|
20991
20859
|
}
|
|
20992
|
-
if (errors ===
|
|
20993
|
-
if (typeof
|
|
20994
|
-
if (
|
|
20995
|
-
const
|
|
20860
|
+
if (errors === _errs32) {
|
|
20861
|
+
if (typeof data6 == "number" && isFinite(data6)) {
|
|
20862
|
+
if (data6 > 9007199254740991 || isNaN(data6)) {
|
|
20863
|
+
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" };
|
|
20996
20864
|
if (vErrors === null) {
|
|
20997
|
-
vErrors = [
|
|
20865
|
+
vErrors = [err30];
|
|
20998
20866
|
} else {
|
|
20999
|
-
vErrors.push(
|
|
20867
|
+
vErrors.push(err30);
|
|
21000
20868
|
}
|
|
21001
20869
|
errors++;
|
|
21002
20870
|
} else {
|
|
21003
|
-
if (
|
|
21004
|
-
const
|
|
20871
|
+
if (data6 < 0 || isNaN(data6)) {
|
|
20872
|
+
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" };
|
|
21005
20873
|
if (vErrors === null) {
|
|
21006
|
-
vErrors = [
|
|
20874
|
+
vErrors = [err31];
|
|
21007
20875
|
} else {
|
|
21008
|
-
vErrors.push(
|
|
20876
|
+
vErrors.push(err31);
|
|
21009
20877
|
}
|
|
21010
20878
|
errors++;
|
|
21011
20879
|
}
|
|
21012
20880
|
}
|
|
21013
20881
|
}
|
|
21014
20882
|
}
|
|
21015
|
-
var
|
|
20883
|
+
var valid7 = _errs32 === errors;
|
|
21016
20884
|
} else {
|
|
21017
|
-
var
|
|
20885
|
+
var valid7 = true;
|
|
21018
20886
|
}
|
|
21019
20887
|
}
|
|
21020
20888
|
}
|
|
21021
20889
|
}
|
|
21022
20890
|
} else {
|
|
21023
|
-
const
|
|
20891
|
+
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" };
|
|
21024
20892
|
if (vErrors === null) {
|
|
21025
|
-
vErrors = [
|
|
20893
|
+
vErrors = [err32];
|
|
21026
20894
|
} else {
|
|
21027
|
-
vErrors.push(
|
|
20895
|
+
vErrors.push(err32);
|
|
21028
20896
|
}
|
|
21029
20897
|
errors++;
|
|
21030
20898
|
}
|
|
21031
20899
|
}
|
|
21032
|
-
var _valid0 =
|
|
20900
|
+
var _valid0 = _errs27 === errors;
|
|
21033
20901
|
valid1 = valid1 || _valid0;
|
|
21034
20902
|
if (_valid0) {
|
|
21035
20903
|
if (props0 !== true) {
|
|
@@ -21037,11 +20905,11 @@ function validate46(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
21037
20905
|
}
|
|
21038
20906
|
}
|
|
21039
20907
|
if (!valid1) {
|
|
21040
|
-
const
|
|
20908
|
+
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" };
|
|
21041
20909
|
if (vErrors === null) {
|
|
21042
|
-
vErrors = [
|
|
20910
|
+
vErrors = [err33];
|
|
21043
20911
|
} else {
|
|
21044
|
-
vErrors.push(
|
|
20912
|
+
vErrors.push(err33);
|
|
21045
20913
|
}
|
|
21046
20914
|
errors++;
|
|
21047
20915
|
validate46.errors = vErrors;
|
|
@@ -23143,7 +23011,7 @@ function validate50(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
23143
23011
|
return errors === 0;
|
|
23144
23012
|
}
|
|
23145
23013
|
validate50.evaluated = { "dynamicProps": true, "dynamicItems": false };
|
|
23146
|
-
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": {} };
|
|
23014
|
+
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": {} };
|
|
23147
23015
|
var pattern8 = new RegExp("^[A-Za-z0-9_-]+$", "u");
|
|
23148
23016
|
function validate51(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
23149
23017
|
;
|
|
@@ -23270,13 +23138,18 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
23270
23138
|
var valid4 = true;
|
|
23271
23139
|
}
|
|
23272
23140
|
if (valid4) {
|
|
23273
|
-
if (data1.
|
|
23274
|
-
let data7 = data1.
|
|
23141
|
+
if (data1.repositoryContext !== void 0) {
|
|
23142
|
+
let data7 = data1.repositoryContext;
|
|
23275
23143
|
const _errs20 = errors;
|
|
23276
|
-
|
|
23277
|
-
|
|
23278
|
-
|
|
23279
|
-
|
|
23144
|
+
const _errs21 = errors;
|
|
23145
|
+
let valid5 = false;
|
|
23146
|
+
let passing0 = null;
|
|
23147
|
+
const _errs22 = errors;
|
|
23148
|
+
if (errors === _errs22) {
|
|
23149
|
+
if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
|
|
23150
|
+
let missing2;
|
|
23151
|
+
if (data7.kind === void 0 && (missing2 = "kind") || data7.repoSyncId === void 0 && (missing2 = "repoSyncId")) {
|
|
23152
|
+
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 + "'" };
|
|
23280
23153
|
if (vErrors === null) {
|
|
23281
23154
|
vErrors = [err6];
|
|
23282
23155
|
} else {
|
|
@@ -23284,184 +23157,392 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
23284
23157
|
}
|
|
23285
23158
|
errors++;
|
|
23286
23159
|
} else {
|
|
23287
|
-
|
|
23288
|
-
|
|
23289
|
-
if (
|
|
23290
|
-
|
|
23291
|
-
} else {
|
|
23292
|
-
vErrors.push(err7);
|
|
23293
|
-
}
|
|
23294
|
-
errors++;
|
|
23295
|
-
} else {
|
|
23296
|
-
if (!pattern8.test(data7)) {
|
|
23297
|
-
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_-]+$"' };
|
|
23160
|
+
const _errs24 = errors;
|
|
23161
|
+
for (const key0 in data7) {
|
|
23162
|
+
if (!(key0 === "kind" || key0 === "repoSyncId")) {
|
|
23163
|
+
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" };
|
|
23298
23164
|
if (vErrors === null) {
|
|
23299
|
-
vErrors = [
|
|
23165
|
+
vErrors = [err7];
|
|
23300
23166
|
} else {
|
|
23301
|
-
vErrors.push(
|
|
23167
|
+
vErrors.push(err7);
|
|
23302
23168
|
}
|
|
23303
23169
|
errors++;
|
|
23170
|
+
break;
|
|
23171
|
+
}
|
|
23172
|
+
}
|
|
23173
|
+
if (_errs24 === errors) {
|
|
23174
|
+
if (data7.kind !== void 0) {
|
|
23175
|
+
let data8 = data7.kind;
|
|
23176
|
+
const _errs25 = errors;
|
|
23177
|
+
if (typeof data8 !== "string") {
|
|
23178
|
+
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" };
|
|
23179
|
+
if (vErrors === null) {
|
|
23180
|
+
vErrors = [err8];
|
|
23181
|
+
} else {
|
|
23182
|
+
vErrors.push(err8);
|
|
23183
|
+
}
|
|
23184
|
+
errors++;
|
|
23185
|
+
}
|
|
23186
|
+
if ("repository_bound" !== data8) {
|
|
23187
|
+
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" };
|
|
23188
|
+
if (vErrors === null) {
|
|
23189
|
+
vErrors = [err9];
|
|
23190
|
+
} else {
|
|
23191
|
+
vErrors.push(err9);
|
|
23192
|
+
}
|
|
23193
|
+
errors++;
|
|
23194
|
+
}
|
|
23195
|
+
var valid6 = _errs25 === errors;
|
|
23196
|
+
} else {
|
|
23197
|
+
var valid6 = true;
|
|
23198
|
+
}
|
|
23199
|
+
if (valid6) {
|
|
23200
|
+
if (data7.repoSyncId !== void 0) {
|
|
23201
|
+
let data9 = data7.repoSyncId;
|
|
23202
|
+
const _errs27 = errors;
|
|
23203
|
+
if (errors === _errs27) {
|
|
23204
|
+
if (typeof data9 === "string") {
|
|
23205
|
+
if (func1(data9) > 128) {
|
|
23206
|
+
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" };
|
|
23207
|
+
if (vErrors === null) {
|
|
23208
|
+
vErrors = [err10];
|
|
23209
|
+
} else {
|
|
23210
|
+
vErrors.push(err10);
|
|
23211
|
+
}
|
|
23212
|
+
errors++;
|
|
23213
|
+
} else {
|
|
23214
|
+
if (func1(data9) < 1) {
|
|
23215
|
+
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" };
|
|
23216
|
+
if (vErrors === null) {
|
|
23217
|
+
vErrors = [err11];
|
|
23218
|
+
} else {
|
|
23219
|
+
vErrors.push(err11);
|
|
23220
|
+
}
|
|
23221
|
+
errors++;
|
|
23222
|
+
}
|
|
23223
|
+
}
|
|
23224
|
+
} else {
|
|
23225
|
+
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" };
|
|
23226
|
+
if (vErrors === null) {
|
|
23227
|
+
vErrors = [err12];
|
|
23228
|
+
} else {
|
|
23229
|
+
vErrors.push(err12);
|
|
23230
|
+
}
|
|
23231
|
+
errors++;
|
|
23232
|
+
}
|
|
23233
|
+
}
|
|
23234
|
+
var valid6 = _errs27 === errors;
|
|
23235
|
+
} else {
|
|
23236
|
+
var valid6 = true;
|
|
23237
|
+
}
|
|
23304
23238
|
}
|
|
23305
23239
|
}
|
|
23306
23240
|
}
|
|
23307
|
-
} else {
|
|
23308
|
-
const
|
|
23309
|
-
if (vErrors === null) {
|
|
23310
|
-
vErrors = [err9];
|
|
23311
|
-
} else {
|
|
23312
|
-
vErrors.push(err9);
|
|
23313
|
-
}
|
|
23314
|
-
errors++;
|
|
23315
|
-
}
|
|
23316
|
-
}
|
|
23317
|
-
var valid4 = _errs20 === errors;
|
|
23318
|
-
} else {
|
|
23319
|
-
var valid4 = true;
|
|
23320
|
-
}
|
|
23321
|
-
if (valid4) {
|
|
23322
|
-
if (data1.captureAuthorityKind !== void 0) {
|
|
23323
|
-
let data8 = data1.captureAuthorityKind;
|
|
23324
|
-
const _errs22 = errors;
|
|
23325
|
-
if (typeof data8 !== "string") {
|
|
23326
|
-
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" };
|
|
23327
|
-
if (vErrors === null) {
|
|
23328
|
-
vErrors = [err10];
|
|
23329
|
-
} else {
|
|
23330
|
-
vErrors.push(err10);
|
|
23331
|
-
}
|
|
23332
|
-
errors++;
|
|
23333
|
-
}
|
|
23334
|
-
if (!(data8 === "workos" || data8 === "service_token")) {
|
|
23335
|
-
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" };
|
|
23241
|
+
} else {
|
|
23242
|
+
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" };
|
|
23336
23243
|
if (vErrors === null) {
|
|
23337
|
-
vErrors = [
|
|
23244
|
+
vErrors = [err13];
|
|
23338
23245
|
} else {
|
|
23339
|
-
vErrors.push(
|
|
23246
|
+
vErrors.push(err13);
|
|
23340
23247
|
}
|
|
23341
23248
|
errors++;
|
|
23342
23249
|
}
|
|
23343
|
-
var valid4 = _errs22 === errors;
|
|
23344
|
-
} else {
|
|
23345
|
-
var valid4 = true;
|
|
23346
23250
|
}
|
|
23347
|
-
|
|
23348
|
-
|
|
23349
|
-
|
|
23350
|
-
|
|
23351
|
-
|
|
23352
|
-
|
|
23251
|
+
var _valid1 = _errs22 === errors;
|
|
23252
|
+
if (_valid1) {
|
|
23253
|
+
valid5 = true;
|
|
23254
|
+
passing0 = 0;
|
|
23255
|
+
var props0 = true;
|
|
23256
|
+
}
|
|
23257
|
+
const _errs29 = errors;
|
|
23258
|
+
if (errors === _errs29) {
|
|
23259
|
+
if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
|
|
23260
|
+
let missing3;
|
|
23261
|
+
if (data7.kind === void 0 && (missing3 = "kind")) {
|
|
23262
|
+
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 + "'" };
|
|
23353
23263
|
if (vErrors === null) {
|
|
23354
|
-
vErrors = [
|
|
23264
|
+
vErrors = [err14];
|
|
23355
23265
|
} else {
|
|
23356
|
-
vErrors.push(
|
|
23266
|
+
vErrors.push(err14);
|
|
23357
23267
|
}
|
|
23358
23268
|
errors++;
|
|
23269
|
+
} else {
|
|
23270
|
+
const _errs31 = errors;
|
|
23271
|
+
for (const key1 in data7) {
|
|
23272
|
+
if (!(key1 === "kind")) {
|
|
23273
|
+
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" };
|
|
23274
|
+
if (vErrors === null) {
|
|
23275
|
+
vErrors = [err15];
|
|
23276
|
+
} else {
|
|
23277
|
+
vErrors.push(err15);
|
|
23278
|
+
}
|
|
23279
|
+
errors++;
|
|
23280
|
+
break;
|
|
23281
|
+
}
|
|
23282
|
+
}
|
|
23283
|
+
if (_errs31 === errors) {
|
|
23284
|
+
if (data7.kind !== void 0) {
|
|
23285
|
+
let data10 = data7.kind;
|
|
23286
|
+
if (typeof data10 !== "string") {
|
|
23287
|
+
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" };
|
|
23288
|
+
if (vErrors === null) {
|
|
23289
|
+
vErrors = [err16];
|
|
23290
|
+
} else {
|
|
23291
|
+
vErrors.push(err16);
|
|
23292
|
+
}
|
|
23293
|
+
errors++;
|
|
23294
|
+
}
|
|
23295
|
+
if ("non_repository" !== data10) {
|
|
23296
|
+
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" };
|
|
23297
|
+
if (vErrors === null) {
|
|
23298
|
+
vErrors = [err17];
|
|
23299
|
+
} else {
|
|
23300
|
+
vErrors.push(err17);
|
|
23301
|
+
}
|
|
23302
|
+
errors++;
|
|
23303
|
+
}
|
|
23304
|
+
}
|
|
23305
|
+
}
|
|
23306
|
+
}
|
|
23307
|
+
} else {
|
|
23308
|
+
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" };
|
|
23309
|
+
if (vErrors === null) {
|
|
23310
|
+
vErrors = [err18];
|
|
23311
|
+
} else {
|
|
23312
|
+
vErrors.push(err18);
|
|
23313
|
+
}
|
|
23314
|
+
errors++;
|
|
23315
|
+
}
|
|
23316
|
+
}
|
|
23317
|
+
var _valid1 = _errs29 === errors;
|
|
23318
|
+
if (_valid1 && valid5) {
|
|
23319
|
+
valid5 = false;
|
|
23320
|
+
passing0 = [passing0, 1];
|
|
23321
|
+
} else {
|
|
23322
|
+
if (_valid1) {
|
|
23323
|
+
valid5 = true;
|
|
23324
|
+
passing0 = 1;
|
|
23325
|
+
if (props0 !== true) {
|
|
23326
|
+
props0 = true;
|
|
23327
|
+
}
|
|
23328
|
+
}
|
|
23329
|
+
}
|
|
23330
|
+
if (!valid5) {
|
|
23331
|
+
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" };
|
|
23332
|
+
if (vErrors === null) {
|
|
23333
|
+
vErrors = [err19];
|
|
23334
|
+
} else {
|
|
23335
|
+
vErrors.push(err19);
|
|
23336
|
+
}
|
|
23337
|
+
errors++;
|
|
23338
|
+
} else {
|
|
23339
|
+
errors = _errs21;
|
|
23340
|
+
if (vErrors !== null) {
|
|
23341
|
+
if (_errs21) {
|
|
23342
|
+
vErrors.length = _errs21;
|
|
23343
|
+
} else {
|
|
23344
|
+
vErrors = null;
|
|
23359
23345
|
}
|
|
23360
|
-
|
|
23361
|
-
|
|
23362
|
-
|
|
23363
|
-
|
|
23346
|
+
}
|
|
23347
|
+
}
|
|
23348
|
+
var valid4 = _errs20 === errors;
|
|
23349
|
+
} else {
|
|
23350
|
+
var valid4 = true;
|
|
23351
|
+
}
|
|
23352
|
+
if (valid4) {
|
|
23353
|
+
if (data1.capturedOrganizationId !== void 0) {
|
|
23354
|
+
let data11 = data1.capturedOrganizationId;
|
|
23355
|
+
const _errs34 = errors;
|
|
23356
|
+
if (errors === _errs34) {
|
|
23357
|
+
if (typeof data11 === "string") {
|
|
23358
|
+
if (func1(data11) > 128) {
|
|
23359
|
+
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" };
|
|
23360
|
+
if (vErrors === null) {
|
|
23361
|
+
vErrors = [err20];
|
|
23362
|
+
} else {
|
|
23363
|
+
vErrors.push(err20);
|
|
23364
|
+
}
|
|
23365
|
+
errors++;
|
|
23366
|
+
} else {
|
|
23367
|
+
if (func1(data11) < 1) {
|
|
23368
|
+
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" };
|
|
23364
23369
|
if (vErrors === null) {
|
|
23365
|
-
vErrors = [
|
|
23370
|
+
vErrors = [err21];
|
|
23366
23371
|
} else {
|
|
23367
|
-
vErrors.push(
|
|
23372
|
+
vErrors.push(err21);
|
|
23368
23373
|
}
|
|
23369
23374
|
errors++;
|
|
23370
23375
|
} else {
|
|
23371
|
-
if (
|
|
23372
|
-
const
|
|
23376
|
+
if (!pattern8.test(data11)) {
|
|
23377
|
+
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_-]+$"' };
|
|
23373
23378
|
if (vErrors === null) {
|
|
23374
|
-
vErrors = [
|
|
23379
|
+
vErrors = [err22];
|
|
23375
23380
|
} else {
|
|
23376
|
-
vErrors.push(
|
|
23381
|
+
vErrors.push(err22);
|
|
23377
23382
|
}
|
|
23378
23383
|
errors++;
|
|
23379
23384
|
}
|
|
23380
23385
|
}
|
|
23381
23386
|
}
|
|
23387
|
+
} else {
|
|
23388
|
+
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" };
|
|
23389
|
+
if (vErrors === null) {
|
|
23390
|
+
vErrors = [err23];
|
|
23391
|
+
} else {
|
|
23392
|
+
vErrors.push(err23);
|
|
23393
|
+
}
|
|
23394
|
+
errors++;
|
|
23395
|
+
}
|
|
23396
|
+
}
|
|
23397
|
+
var valid4 = _errs34 === errors;
|
|
23398
|
+
} else {
|
|
23399
|
+
var valid4 = true;
|
|
23400
|
+
}
|
|
23401
|
+
if (valid4) {
|
|
23402
|
+
if (data1.captureAuthorityKind !== void 0) {
|
|
23403
|
+
let data12 = data1.captureAuthorityKind;
|
|
23404
|
+
const _errs36 = errors;
|
|
23405
|
+
if (typeof data12 !== "string") {
|
|
23406
|
+
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" };
|
|
23407
|
+
if (vErrors === null) {
|
|
23408
|
+
vErrors = [err24];
|
|
23409
|
+
} else {
|
|
23410
|
+
vErrors.push(err24);
|
|
23411
|
+
}
|
|
23412
|
+
errors++;
|
|
23382
23413
|
}
|
|
23383
|
-
|
|
23414
|
+
if (!(data12 === "workos" || data12 === "service_token")) {
|
|
23415
|
+
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" };
|
|
23416
|
+
if (vErrors === null) {
|
|
23417
|
+
vErrors = [err25];
|
|
23418
|
+
} else {
|
|
23419
|
+
vErrors.push(err25);
|
|
23420
|
+
}
|
|
23421
|
+
errors++;
|
|
23422
|
+
}
|
|
23423
|
+
var valid4 = _errs36 === errors;
|
|
23384
23424
|
} else {
|
|
23385
23425
|
var valid4 = true;
|
|
23386
23426
|
}
|
|
23387
23427
|
if (valid4) {
|
|
23388
|
-
if (data1.
|
|
23389
|
-
let
|
|
23390
|
-
const
|
|
23391
|
-
if (typeof
|
|
23392
|
-
const
|
|
23428
|
+
if (data1.decisionLifecycleProtocolVersion !== void 0) {
|
|
23429
|
+
let data13 = data1.decisionLifecycleProtocolVersion;
|
|
23430
|
+
const _errs38 = errors;
|
|
23431
|
+
if (!(typeof data13 == "number" && (!(data13 % 1) && !isNaN(data13)) && isFinite(data13))) {
|
|
23432
|
+
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" };
|
|
23393
23433
|
if (vErrors === null) {
|
|
23394
|
-
vErrors = [
|
|
23434
|
+
vErrors = [err26];
|
|
23395
23435
|
} else {
|
|
23396
|
-
vErrors.push(
|
|
23436
|
+
vErrors.push(err26);
|
|
23397
23437
|
}
|
|
23398
23438
|
errors++;
|
|
23399
23439
|
}
|
|
23400
|
-
if (
|
|
23401
|
-
|
|
23402
|
-
|
|
23403
|
-
|
|
23404
|
-
|
|
23405
|
-
|
|
23440
|
+
if (errors === _errs38) {
|
|
23441
|
+
if (typeof data13 == "number" && isFinite(data13)) {
|
|
23442
|
+
if (data13 > 9007199254740991 || isNaN(data13)) {
|
|
23443
|
+
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" };
|
|
23444
|
+
if (vErrors === null) {
|
|
23445
|
+
vErrors = [err27];
|
|
23446
|
+
} else {
|
|
23447
|
+
vErrors.push(err27);
|
|
23448
|
+
}
|
|
23449
|
+
errors++;
|
|
23450
|
+
} else {
|
|
23451
|
+
if (data13 < 1 || isNaN(data13)) {
|
|
23452
|
+
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" };
|
|
23453
|
+
if (vErrors === null) {
|
|
23454
|
+
vErrors = [err28];
|
|
23455
|
+
} else {
|
|
23456
|
+
vErrors.push(err28);
|
|
23457
|
+
}
|
|
23458
|
+
errors++;
|
|
23459
|
+
}
|
|
23460
|
+
}
|
|
23406
23461
|
}
|
|
23407
|
-
errors++;
|
|
23408
23462
|
}
|
|
23409
|
-
var valid4 =
|
|
23463
|
+
var valid4 = _errs38 === errors;
|
|
23410
23464
|
} else {
|
|
23411
23465
|
var valid4 = true;
|
|
23412
23466
|
}
|
|
23413
23467
|
if (valid4) {
|
|
23414
|
-
if (data1.
|
|
23415
|
-
let
|
|
23416
|
-
const
|
|
23417
|
-
if (typeof
|
|
23418
|
-
const
|
|
23468
|
+
if (data1.producer !== void 0) {
|
|
23469
|
+
let data14 = data1.producer;
|
|
23470
|
+
const _errs40 = errors;
|
|
23471
|
+
if (typeof data14 !== "string") {
|
|
23472
|
+
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" };
|
|
23419
23473
|
if (vErrors === null) {
|
|
23420
|
-
vErrors = [
|
|
23474
|
+
vErrors = [err29];
|
|
23421
23475
|
} else {
|
|
23422
|
-
vErrors.push(
|
|
23476
|
+
vErrors.push(err29);
|
|
23423
23477
|
}
|
|
23424
23478
|
errors++;
|
|
23425
23479
|
}
|
|
23426
|
-
if (!(
|
|
23427
|
-
const
|
|
23480
|
+
if (!(data14 === "claude_code" || data14 === "codex" || data14 === "cursor" || data14 === "hermes")) {
|
|
23481
|
+
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" };
|
|
23428
23482
|
if (vErrors === null) {
|
|
23429
|
-
vErrors = [
|
|
23483
|
+
vErrors = [err30];
|
|
23430
23484
|
} else {
|
|
23431
|
-
vErrors.push(
|
|
23485
|
+
vErrors.push(err30);
|
|
23432
23486
|
}
|
|
23433
23487
|
errors++;
|
|
23434
23488
|
}
|
|
23435
|
-
var valid4 =
|
|
23489
|
+
var valid4 = _errs40 === errors;
|
|
23436
23490
|
} else {
|
|
23437
23491
|
var valid4 = true;
|
|
23438
23492
|
}
|
|
23439
23493
|
if (valid4) {
|
|
23440
|
-
if (data1.
|
|
23441
|
-
let
|
|
23442
|
-
const
|
|
23443
|
-
if (
|
|
23444
|
-
const
|
|
23494
|
+
if (data1.toolOutcome !== void 0) {
|
|
23495
|
+
let data15 = data1.toolOutcome;
|
|
23496
|
+
const _errs42 = errors;
|
|
23497
|
+
if (typeof data15 !== "string") {
|
|
23498
|
+
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" };
|
|
23445
23499
|
if (vErrors === null) {
|
|
23446
|
-
vErrors = [
|
|
23500
|
+
vErrors = [err31];
|
|
23447
23501
|
} else {
|
|
23448
|
-
vErrors.push(
|
|
23502
|
+
vErrors.push(err31);
|
|
23449
23503
|
}
|
|
23450
23504
|
errors++;
|
|
23451
23505
|
}
|
|
23452
|
-
if (
|
|
23453
|
-
const
|
|
23506
|
+
if (!(data15 === "succeeded" || data15 === "returned" || data15 === "failed" || data15 === "interrupted" || data15 === "prevented" || data15 === "unknown")) {
|
|
23507
|
+
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" };
|
|
23454
23508
|
if (vErrors === null) {
|
|
23455
|
-
vErrors = [
|
|
23509
|
+
vErrors = [err32];
|
|
23456
23510
|
} else {
|
|
23457
|
-
vErrors.push(
|
|
23511
|
+
vErrors.push(err32);
|
|
23458
23512
|
}
|
|
23459
23513
|
errors++;
|
|
23460
23514
|
}
|
|
23461
|
-
var valid4 =
|
|
23515
|
+
var valid4 = _errs42 === errors;
|
|
23462
23516
|
} else {
|
|
23463
23517
|
var valid4 = true;
|
|
23464
23518
|
}
|
|
23519
|
+
if (valid4) {
|
|
23520
|
+
if (data1.envelopeVersion !== void 0) {
|
|
23521
|
+
let data16 = data1.envelopeVersion;
|
|
23522
|
+
const _errs44 = errors;
|
|
23523
|
+
if (!(typeof data16 == "number" && isFinite(data16))) {
|
|
23524
|
+
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" };
|
|
23525
|
+
if (vErrors === null) {
|
|
23526
|
+
vErrors = [err33];
|
|
23527
|
+
} else {
|
|
23528
|
+
vErrors.push(err33);
|
|
23529
|
+
}
|
|
23530
|
+
errors++;
|
|
23531
|
+
}
|
|
23532
|
+
if (4 !== data16) {
|
|
23533
|
+
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" };
|
|
23534
|
+
if (vErrors === null) {
|
|
23535
|
+
vErrors = [err34];
|
|
23536
|
+
} else {
|
|
23537
|
+
vErrors.push(err34);
|
|
23538
|
+
}
|
|
23539
|
+
errors++;
|
|
23540
|
+
}
|
|
23541
|
+
var valid4 = _errs44 === errors;
|
|
23542
|
+
} else {
|
|
23543
|
+
var valid4 = true;
|
|
23544
|
+
}
|
|
23545
|
+
}
|
|
23465
23546
|
}
|
|
23466
23547
|
}
|
|
23467
23548
|
}
|
|
@@ -23474,11 +23555,11 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
23474
23555
|
}
|
|
23475
23556
|
}
|
|
23476
23557
|
} else {
|
|
23477
|
-
const
|
|
23558
|
+
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" };
|
|
23478
23559
|
if (vErrors === null) {
|
|
23479
|
-
vErrors = [
|
|
23560
|
+
vErrors = [err35];
|
|
23480
23561
|
} else {
|
|
23481
|
-
vErrors.push(
|
|
23562
|
+
vErrors.push(err35);
|
|
23482
23563
|
}
|
|
23483
23564
|
errors++;
|
|
23484
23565
|
}
|
|
@@ -23486,296 +23567,509 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
23486
23567
|
var _valid0 = _errs7 === errors;
|
|
23487
23568
|
valid3 = valid3 || _valid0;
|
|
23488
23569
|
if (_valid0) {
|
|
23489
|
-
var
|
|
23570
|
+
var props1 = true;
|
|
23490
23571
|
}
|
|
23491
|
-
const
|
|
23492
|
-
if (errors ===
|
|
23572
|
+
const _errs46 = errors;
|
|
23573
|
+
if (errors === _errs46) {
|
|
23493
23574
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
23494
|
-
let
|
|
23495
|
-
if (data1.moveId === void 0 && (
|
|
23496
|
-
const
|
|
23575
|
+
let missing4;
|
|
23576
|
+
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")) {
|
|
23577
|
+
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 + "'" };
|
|
23497
23578
|
if (vErrors === null) {
|
|
23498
|
-
vErrors = [
|
|
23579
|
+
vErrors = [err36];
|
|
23499
23580
|
} else {
|
|
23500
|
-
vErrors.push(
|
|
23581
|
+
vErrors.push(err36);
|
|
23501
23582
|
}
|
|
23502
23583
|
errors++;
|
|
23503
23584
|
} else {
|
|
23504
23585
|
if (data1.moveId !== void 0) {
|
|
23505
|
-
const
|
|
23586
|
+
const _errs49 = errors;
|
|
23506
23587
|
if (typeof data1.moveId !== "string") {
|
|
23507
|
-
const
|
|
23588
|
+
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" };
|
|
23508
23589
|
if (vErrors === null) {
|
|
23509
|
-
vErrors = [
|
|
23590
|
+
vErrors = [err37];
|
|
23510
23591
|
} else {
|
|
23511
|
-
vErrors.push(
|
|
23592
|
+
vErrors.push(err37);
|
|
23512
23593
|
}
|
|
23513
23594
|
errors++;
|
|
23514
23595
|
}
|
|
23515
|
-
var
|
|
23596
|
+
var valid8 = _errs49 === errors;
|
|
23516
23597
|
} else {
|
|
23517
|
-
var
|
|
23598
|
+
var valid8 = true;
|
|
23518
23599
|
}
|
|
23519
|
-
if (
|
|
23600
|
+
if (valid8) {
|
|
23520
23601
|
if (data1.capturedAt !== void 0) {
|
|
23521
|
-
let
|
|
23522
|
-
const
|
|
23523
|
-
if (!(typeof
|
|
23524
|
-
const
|
|
23602
|
+
let data18 = data1.capturedAt;
|
|
23603
|
+
const _errs51 = errors;
|
|
23604
|
+
if (!(typeof data18 == "number" && isFinite(data18))) {
|
|
23605
|
+
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" };
|
|
23525
23606
|
if (vErrors === null) {
|
|
23526
|
-
vErrors = [
|
|
23607
|
+
vErrors = [err38];
|
|
23527
23608
|
} else {
|
|
23528
|
-
vErrors.push(
|
|
23609
|
+
vErrors.push(err38);
|
|
23529
23610
|
}
|
|
23530
23611
|
errors++;
|
|
23531
23612
|
}
|
|
23532
|
-
var
|
|
23613
|
+
var valid8 = _errs51 === errors;
|
|
23533
23614
|
} else {
|
|
23534
|
-
var
|
|
23615
|
+
var valid8 = true;
|
|
23535
23616
|
}
|
|
23536
|
-
if (
|
|
23617
|
+
if (valid8) {
|
|
23537
23618
|
if (data1.sessionId !== void 0) {
|
|
23538
|
-
const
|
|
23619
|
+
const _errs53 = errors;
|
|
23539
23620
|
if (typeof data1.sessionId !== "string") {
|
|
23540
|
-
const
|
|
23621
|
+
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" };
|
|
23541
23622
|
if (vErrors === null) {
|
|
23542
|
-
vErrors = [
|
|
23623
|
+
vErrors = [err39];
|
|
23543
23624
|
} else {
|
|
23544
|
-
vErrors.push(
|
|
23625
|
+
vErrors.push(err39);
|
|
23545
23626
|
}
|
|
23546
23627
|
errors++;
|
|
23547
23628
|
}
|
|
23548
|
-
var
|
|
23629
|
+
var valid8 = _errs53 === errors;
|
|
23549
23630
|
} else {
|
|
23550
|
-
var
|
|
23631
|
+
var valid8 = true;
|
|
23551
23632
|
}
|
|
23552
|
-
if (
|
|
23633
|
+
if (valid8) {
|
|
23553
23634
|
if (data1.invocationId !== void 0) {
|
|
23554
|
-
const
|
|
23635
|
+
const _errs55 = errors;
|
|
23555
23636
|
if (typeof data1.invocationId !== "string") {
|
|
23556
|
-
const
|
|
23637
|
+
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" };
|
|
23557
23638
|
if (vErrors === null) {
|
|
23558
|
-
vErrors = [
|
|
23639
|
+
vErrors = [err40];
|
|
23559
23640
|
} else {
|
|
23560
|
-
vErrors.push(
|
|
23641
|
+
vErrors.push(err40);
|
|
23561
23642
|
}
|
|
23562
23643
|
errors++;
|
|
23563
23644
|
}
|
|
23564
|
-
var
|
|
23645
|
+
var valid8 = _errs55 === errors;
|
|
23565
23646
|
} else {
|
|
23566
|
-
var
|
|
23647
|
+
var valid8 = true;
|
|
23567
23648
|
}
|
|
23568
|
-
if (
|
|
23649
|
+
if (valid8) {
|
|
23569
23650
|
if (data1.eventType !== void 0) {
|
|
23570
|
-
const
|
|
23651
|
+
const _errs57 = errors;
|
|
23571
23652
|
if (typeof data1.eventType !== "string") {
|
|
23572
|
-
const
|
|
23653
|
+
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" };
|
|
23573
23654
|
if (vErrors === null) {
|
|
23574
|
-
vErrors = [
|
|
23655
|
+
vErrors = [err41];
|
|
23575
23656
|
} else {
|
|
23576
|
-
vErrors.push(
|
|
23657
|
+
vErrors.push(err41);
|
|
23577
23658
|
}
|
|
23578
23659
|
errors++;
|
|
23579
23660
|
}
|
|
23580
|
-
var
|
|
23661
|
+
var valid8 = _errs57 === errors;
|
|
23581
23662
|
} else {
|
|
23582
|
-
var
|
|
23663
|
+
var valid8 = true;
|
|
23583
23664
|
}
|
|
23584
|
-
if (
|
|
23585
|
-
if (data1.
|
|
23586
|
-
let
|
|
23587
|
-
const
|
|
23588
|
-
|
|
23589
|
-
|
|
23590
|
-
|
|
23591
|
-
|
|
23665
|
+
if (valid8) {
|
|
23666
|
+
if (data1.repositoryContext !== void 0) {
|
|
23667
|
+
let data22 = data1.repositoryContext;
|
|
23668
|
+
const _errs59 = errors;
|
|
23669
|
+
const _errs60 = errors;
|
|
23670
|
+
let valid9 = false;
|
|
23671
|
+
let passing1 = null;
|
|
23672
|
+
const _errs61 = errors;
|
|
23673
|
+
if (errors === _errs61) {
|
|
23674
|
+
if (data22 && typeof data22 == "object" && !Array.isArray(data22)) {
|
|
23675
|
+
let missing5;
|
|
23676
|
+
if (data22.kind === void 0 && (missing5 = "kind") || data22.repoSyncId === void 0 && (missing5 = "repoSyncId")) {
|
|
23677
|
+
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 + "'" };
|
|
23592
23678
|
if (vErrors === null) {
|
|
23593
|
-
vErrors = [
|
|
23679
|
+
vErrors = [err42];
|
|
23594
23680
|
} else {
|
|
23595
|
-
vErrors.push(
|
|
23681
|
+
vErrors.push(err42);
|
|
23596
23682
|
}
|
|
23597
23683
|
errors++;
|
|
23598
23684
|
} else {
|
|
23599
|
-
|
|
23600
|
-
|
|
23601
|
-
if (
|
|
23602
|
-
|
|
23603
|
-
} else {
|
|
23604
|
-
vErrors.push(err29);
|
|
23605
|
-
}
|
|
23606
|
-
errors++;
|
|
23607
|
-
} else {
|
|
23608
|
-
if (!pattern8.test(data18)) {
|
|
23609
|
-
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_-]+$"' };
|
|
23685
|
+
const _errs63 = errors;
|
|
23686
|
+
for (const key2 in data22) {
|
|
23687
|
+
if (!(key2 === "kind" || key2 === "repoSyncId")) {
|
|
23688
|
+
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" };
|
|
23610
23689
|
if (vErrors === null) {
|
|
23611
|
-
vErrors = [
|
|
23690
|
+
vErrors = [err43];
|
|
23612
23691
|
} else {
|
|
23613
|
-
vErrors.push(
|
|
23692
|
+
vErrors.push(err43);
|
|
23614
23693
|
}
|
|
23615
23694
|
errors++;
|
|
23695
|
+
break;
|
|
23696
|
+
}
|
|
23697
|
+
}
|
|
23698
|
+
if (_errs63 === errors) {
|
|
23699
|
+
if (data22.kind !== void 0) {
|
|
23700
|
+
let data23 = data22.kind;
|
|
23701
|
+
const _errs64 = errors;
|
|
23702
|
+
if (typeof data23 !== "string") {
|
|
23703
|
+
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" };
|
|
23704
|
+
if (vErrors === null) {
|
|
23705
|
+
vErrors = [err44];
|
|
23706
|
+
} else {
|
|
23707
|
+
vErrors.push(err44);
|
|
23708
|
+
}
|
|
23709
|
+
errors++;
|
|
23710
|
+
}
|
|
23711
|
+
if ("repository_bound" !== data23) {
|
|
23712
|
+
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" };
|
|
23713
|
+
if (vErrors === null) {
|
|
23714
|
+
vErrors = [err45];
|
|
23715
|
+
} else {
|
|
23716
|
+
vErrors.push(err45);
|
|
23717
|
+
}
|
|
23718
|
+
errors++;
|
|
23719
|
+
}
|
|
23720
|
+
var valid10 = _errs64 === errors;
|
|
23721
|
+
} else {
|
|
23722
|
+
var valid10 = true;
|
|
23723
|
+
}
|
|
23724
|
+
if (valid10) {
|
|
23725
|
+
if (data22.repoSyncId !== void 0) {
|
|
23726
|
+
let data24 = data22.repoSyncId;
|
|
23727
|
+
const _errs66 = errors;
|
|
23728
|
+
if (errors === _errs66) {
|
|
23729
|
+
if (typeof data24 === "string") {
|
|
23730
|
+
if (func1(data24) > 128) {
|
|
23731
|
+
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" };
|
|
23732
|
+
if (vErrors === null) {
|
|
23733
|
+
vErrors = [err46];
|
|
23734
|
+
} else {
|
|
23735
|
+
vErrors.push(err46);
|
|
23736
|
+
}
|
|
23737
|
+
errors++;
|
|
23738
|
+
} else {
|
|
23739
|
+
if (func1(data24) < 1) {
|
|
23740
|
+
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" };
|
|
23741
|
+
if (vErrors === null) {
|
|
23742
|
+
vErrors = [err47];
|
|
23743
|
+
} else {
|
|
23744
|
+
vErrors.push(err47);
|
|
23745
|
+
}
|
|
23746
|
+
errors++;
|
|
23747
|
+
}
|
|
23748
|
+
}
|
|
23749
|
+
} else {
|
|
23750
|
+
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" };
|
|
23751
|
+
if (vErrors === null) {
|
|
23752
|
+
vErrors = [err48];
|
|
23753
|
+
} else {
|
|
23754
|
+
vErrors.push(err48);
|
|
23755
|
+
}
|
|
23756
|
+
errors++;
|
|
23757
|
+
}
|
|
23758
|
+
}
|
|
23759
|
+
var valid10 = _errs66 === errors;
|
|
23760
|
+
} else {
|
|
23761
|
+
var valid10 = true;
|
|
23762
|
+
}
|
|
23616
23763
|
}
|
|
23617
23764
|
}
|
|
23618
23765
|
}
|
|
23619
23766
|
} else {
|
|
23620
|
-
const
|
|
23767
|
+
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" };
|
|
23621
23768
|
if (vErrors === null) {
|
|
23622
|
-
vErrors = [
|
|
23769
|
+
vErrors = [err49];
|
|
23623
23770
|
} else {
|
|
23624
|
-
vErrors.push(
|
|
23771
|
+
vErrors.push(err49);
|
|
23625
23772
|
}
|
|
23626
23773
|
errors++;
|
|
23627
23774
|
}
|
|
23628
23775
|
}
|
|
23629
|
-
var
|
|
23630
|
-
|
|
23631
|
-
|
|
23632
|
-
|
|
23633
|
-
|
|
23634
|
-
|
|
23635
|
-
|
|
23636
|
-
|
|
23637
|
-
if (typeof
|
|
23638
|
-
|
|
23639
|
-
if (
|
|
23640
|
-
|
|
23776
|
+
var _valid2 = _errs61 === errors;
|
|
23777
|
+
if (_valid2) {
|
|
23778
|
+
valid9 = true;
|
|
23779
|
+
passing1 = 0;
|
|
23780
|
+
var props2 = true;
|
|
23781
|
+
}
|
|
23782
|
+
const _errs68 = errors;
|
|
23783
|
+
if (errors === _errs68) {
|
|
23784
|
+
if (data22 && typeof data22 == "object" && !Array.isArray(data22)) {
|
|
23785
|
+
let missing6;
|
|
23786
|
+
if (data22.kind === void 0 && (missing6 = "kind")) {
|
|
23787
|
+
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 + "'" };
|
|
23788
|
+
if (vErrors === null) {
|
|
23789
|
+
vErrors = [err50];
|
|
23790
|
+
} else {
|
|
23791
|
+
vErrors.push(err50);
|
|
23792
|
+
}
|
|
23793
|
+
errors++;
|
|
23641
23794
|
} else {
|
|
23642
|
-
|
|
23795
|
+
const _errs70 = errors;
|
|
23796
|
+
for (const key3 in data22) {
|
|
23797
|
+
if (!(key3 === "kind")) {
|
|
23798
|
+
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" };
|
|
23799
|
+
if (vErrors === null) {
|
|
23800
|
+
vErrors = [err51];
|
|
23801
|
+
} else {
|
|
23802
|
+
vErrors.push(err51);
|
|
23803
|
+
}
|
|
23804
|
+
errors++;
|
|
23805
|
+
break;
|
|
23806
|
+
}
|
|
23807
|
+
}
|
|
23808
|
+
if (_errs70 === errors) {
|
|
23809
|
+
if (data22.kind !== void 0) {
|
|
23810
|
+
let data25 = data22.kind;
|
|
23811
|
+
if (typeof data25 !== "string") {
|
|
23812
|
+
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" };
|
|
23813
|
+
if (vErrors === null) {
|
|
23814
|
+
vErrors = [err52];
|
|
23815
|
+
} else {
|
|
23816
|
+
vErrors.push(err52);
|
|
23817
|
+
}
|
|
23818
|
+
errors++;
|
|
23819
|
+
}
|
|
23820
|
+
if ("non_repository" !== data25) {
|
|
23821
|
+
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" };
|
|
23822
|
+
if (vErrors === null) {
|
|
23823
|
+
vErrors = [err53];
|
|
23824
|
+
} else {
|
|
23825
|
+
vErrors.push(err53);
|
|
23826
|
+
}
|
|
23827
|
+
errors++;
|
|
23828
|
+
}
|
|
23829
|
+
}
|
|
23830
|
+
}
|
|
23643
23831
|
}
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
if (!(data19 === "workos" || data19 === "service_token")) {
|
|
23647
|
-
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" };
|
|
23832
|
+
} else {
|
|
23833
|
+
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" };
|
|
23648
23834
|
if (vErrors === null) {
|
|
23649
|
-
vErrors = [
|
|
23835
|
+
vErrors = [err54];
|
|
23650
23836
|
} else {
|
|
23651
|
-
vErrors.push(
|
|
23837
|
+
vErrors.push(err54);
|
|
23652
23838
|
}
|
|
23653
23839
|
errors++;
|
|
23654
23840
|
}
|
|
23655
|
-
|
|
23841
|
+
}
|
|
23842
|
+
var _valid2 = _errs68 === errors;
|
|
23843
|
+
if (_valid2 && valid9) {
|
|
23844
|
+
valid9 = false;
|
|
23845
|
+
passing1 = [passing1, 1];
|
|
23656
23846
|
} else {
|
|
23657
|
-
|
|
23847
|
+
if (_valid2) {
|
|
23848
|
+
valid9 = true;
|
|
23849
|
+
passing1 = 1;
|
|
23850
|
+
if (props2 !== true) {
|
|
23851
|
+
props2 = true;
|
|
23852
|
+
}
|
|
23853
|
+
}
|
|
23658
23854
|
}
|
|
23659
|
-
if (
|
|
23660
|
-
|
|
23661
|
-
|
|
23662
|
-
|
|
23663
|
-
|
|
23664
|
-
|
|
23665
|
-
|
|
23666
|
-
|
|
23667
|
-
|
|
23668
|
-
|
|
23669
|
-
|
|
23670
|
-
|
|
23855
|
+
if (!valid9) {
|
|
23856
|
+
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" };
|
|
23857
|
+
if (vErrors === null) {
|
|
23858
|
+
vErrors = [err55];
|
|
23859
|
+
} else {
|
|
23860
|
+
vErrors.push(err55);
|
|
23861
|
+
}
|
|
23862
|
+
errors++;
|
|
23863
|
+
} else {
|
|
23864
|
+
errors = _errs60;
|
|
23865
|
+
if (vErrors !== null) {
|
|
23866
|
+
if (_errs60) {
|
|
23867
|
+
vErrors.length = _errs60;
|
|
23868
|
+
} else {
|
|
23869
|
+
vErrors = null;
|
|
23671
23870
|
}
|
|
23672
|
-
|
|
23673
|
-
|
|
23674
|
-
|
|
23675
|
-
|
|
23871
|
+
}
|
|
23872
|
+
}
|
|
23873
|
+
var valid8 = _errs59 === errors;
|
|
23874
|
+
} else {
|
|
23875
|
+
var valid8 = true;
|
|
23876
|
+
}
|
|
23877
|
+
if (valid8) {
|
|
23878
|
+
if (data1.capturedOrganizationId !== void 0) {
|
|
23879
|
+
let data26 = data1.capturedOrganizationId;
|
|
23880
|
+
const _errs73 = errors;
|
|
23881
|
+
if (errors === _errs73) {
|
|
23882
|
+
if (typeof data26 === "string") {
|
|
23883
|
+
if (func1(data26) > 128) {
|
|
23884
|
+
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" };
|
|
23885
|
+
if (vErrors === null) {
|
|
23886
|
+
vErrors = [err56];
|
|
23887
|
+
} else {
|
|
23888
|
+
vErrors.push(err56);
|
|
23889
|
+
}
|
|
23890
|
+
errors++;
|
|
23891
|
+
} else {
|
|
23892
|
+
if (func1(data26) < 1) {
|
|
23893
|
+
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" };
|
|
23676
23894
|
if (vErrors === null) {
|
|
23677
|
-
vErrors = [
|
|
23895
|
+
vErrors = [err57];
|
|
23678
23896
|
} else {
|
|
23679
|
-
vErrors.push(
|
|
23897
|
+
vErrors.push(err57);
|
|
23680
23898
|
}
|
|
23681
23899
|
errors++;
|
|
23682
23900
|
} else {
|
|
23683
|
-
if (
|
|
23684
|
-
const
|
|
23901
|
+
if (!pattern8.test(data26)) {
|
|
23902
|
+
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_-]+$"' };
|
|
23685
23903
|
if (vErrors === null) {
|
|
23686
|
-
vErrors = [
|
|
23904
|
+
vErrors = [err58];
|
|
23687
23905
|
} else {
|
|
23688
|
-
vErrors.push(
|
|
23906
|
+
vErrors.push(err58);
|
|
23689
23907
|
}
|
|
23690
23908
|
errors++;
|
|
23691
23909
|
}
|
|
23692
23910
|
}
|
|
23693
23911
|
}
|
|
23912
|
+
} else {
|
|
23913
|
+
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" };
|
|
23914
|
+
if (vErrors === null) {
|
|
23915
|
+
vErrors = [err59];
|
|
23916
|
+
} else {
|
|
23917
|
+
vErrors.push(err59);
|
|
23918
|
+
}
|
|
23919
|
+
errors++;
|
|
23694
23920
|
}
|
|
23695
|
-
|
|
23921
|
+
}
|
|
23922
|
+
var valid8 = _errs73 === errors;
|
|
23923
|
+
} else {
|
|
23924
|
+
var valid8 = true;
|
|
23925
|
+
}
|
|
23926
|
+
if (valid8) {
|
|
23927
|
+
if (data1.captureAuthorityKind !== void 0) {
|
|
23928
|
+
let data27 = data1.captureAuthorityKind;
|
|
23929
|
+
const _errs75 = errors;
|
|
23930
|
+
if (typeof data27 !== "string") {
|
|
23931
|
+
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" };
|
|
23932
|
+
if (vErrors === null) {
|
|
23933
|
+
vErrors = [err60];
|
|
23934
|
+
} else {
|
|
23935
|
+
vErrors.push(err60);
|
|
23936
|
+
}
|
|
23937
|
+
errors++;
|
|
23938
|
+
}
|
|
23939
|
+
if (!(data27 === "workos" || data27 === "service_token")) {
|
|
23940
|
+
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" };
|
|
23941
|
+
if (vErrors === null) {
|
|
23942
|
+
vErrors = [err61];
|
|
23943
|
+
} else {
|
|
23944
|
+
vErrors.push(err61);
|
|
23945
|
+
}
|
|
23946
|
+
errors++;
|
|
23947
|
+
}
|
|
23948
|
+
var valid8 = _errs75 === errors;
|
|
23696
23949
|
} else {
|
|
23697
|
-
var
|
|
23950
|
+
var valid8 = true;
|
|
23698
23951
|
}
|
|
23699
|
-
if (
|
|
23700
|
-
if (data1.
|
|
23701
|
-
let
|
|
23702
|
-
const
|
|
23703
|
-
if (typeof
|
|
23704
|
-
const
|
|
23952
|
+
if (valid8) {
|
|
23953
|
+
if (data1.decisionLifecycleProtocolVersion !== void 0) {
|
|
23954
|
+
let data28 = data1.decisionLifecycleProtocolVersion;
|
|
23955
|
+
const _errs77 = errors;
|
|
23956
|
+
if (!(typeof data28 == "number" && (!(data28 % 1) && !isNaN(data28)) && isFinite(data28))) {
|
|
23957
|
+
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" };
|
|
23705
23958
|
if (vErrors === null) {
|
|
23706
|
-
vErrors = [
|
|
23959
|
+
vErrors = [err62];
|
|
23707
23960
|
} else {
|
|
23708
|
-
vErrors.push(
|
|
23961
|
+
vErrors.push(err62);
|
|
23709
23962
|
}
|
|
23710
23963
|
errors++;
|
|
23711
23964
|
}
|
|
23712
|
-
if (
|
|
23713
|
-
|
|
23714
|
-
|
|
23715
|
-
|
|
23716
|
-
|
|
23717
|
-
|
|
23965
|
+
if (errors === _errs77) {
|
|
23966
|
+
if (typeof data28 == "number" && isFinite(data28)) {
|
|
23967
|
+
if (data28 > 9007199254740991 || isNaN(data28)) {
|
|
23968
|
+
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" };
|
|
23969
|
+
if (vErrors === null) {
|
|
23970
|
+
vErrors = [err63];
|
|
23971
|
+
} else {
|
|
23972
|
+
vErrors.push(err63);
|
|
23973
|
+
}
|
|
23974
|
+
errors++;
|
|
23975
|
+
} else {
|
|
23976
|
+
if (data28 < 1 || isNaN(data28)) {
|
|
23977
|
+
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" };
|
|
23978
|
+
if (vErrors === null) {
|
|
23979
|
+
vErrors = [err64];
|
|
23980
|
+
} else {
|
|
23981
|
+
vErrors.push(err64);
|
|
23982
|
+
}
|
|
23983
|
+
errors++;
|
|
23984
|
+
}
|
|
23985
|
+
}
|
|
23718
23986
|
}
|
|
23719
|
-
errors++;
|
|
23720
23987
|
}
|
|
23721
|
-
var
|
|
23988
|
+
var valid8 = _errs77 === errors;
|
|
23722
23989
|
} else {
|
|
23723
|
-
var
|
|
23990
|
+
var valid8 = true;
|
|
23724
23991
|
}
|
|
23725
|
-
if (
|
|
23726
|
-
if (data1.
|
|
23727
|
-
let
|
|
23728
|
-
const
|
|
23729
|
-
if (typeof
|
|
23730
|
-
const
|
|
23992
|
+
if (valid8) {
|
|
23993
|
+
if (data1.producer !== void 0) {
|
|
23994
|
+
let data29 = data1.producer;
|
|
23995
|
+
const _errs79 = errors;
|
|
23996
|
+
if (typeof data29 !== "string") {
|
|
23997
|
+
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" };
|
|
23731
23998
|
if (vErrors === null) {
|
|
23732
|
-
vErrors = [
|
|
23999
|
+
vErrors = [err65];
|
|
23733
24000
|
} else {
|
|
23734
|
-
vErrors.push(
|
|
24001
|
+
vErrors.push(err65);
|
|
23735
24002
|
}
|
|
23736
24003
|
errors++;
|
|
23737
24004
|
}
|
|
23738
|
-
if (!(
|
|
23739
|
-
const
|
|
24005
|
+
if (!(data29 === "claude_code" || data29 === "codex" || data29 === "cursor" || data29 === "hermes")) {
|
|
24006
|
+
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" };
|
|
23740
24007
|
if (vErrors === null) {
|
|
23741
|
-
vErrors = [
|
|
24008
|
+
vErrors = [err66];
|
|
23742
24009
|
} else {
|
|
23743
|
-
vErrors.push(
|
|
24010
|
+
vErrors.push(err66);
|
|
23744
24011
|
}
|
|
23745
24012
|
errors++;
|
|
23746
24013
|
}
|
|
23747
|
-
var
|
|
24014
|
+
var valid8 = _errs79 === errors;
|
|
23748
24015
|
} else {
|
|
23749
|
-
var
|
|
24016
|
+
var valid8 = true;
|
|
23750
24017
|
}
|
|
23751
|
-
if (
|
|
23752
|
-
if (data1.
|
|
23753
|
-
let
|
|
23754
|
-
const
|
|
23755
|
-
if (
|
|
23756
|
-
|
|
23757
|
-
|
|
23758
|
-
|
|
24018
|
+
if (valid8) {
|
|
24019
|
+
if (data1.toolOutcome !== void 0) {
|
|
24020
|
+
let data30 = data1.toolOutcome;
|
|
24021
|
+
const _errs81 = errors;
|
|
24022
|
+
if (typeof data30 !== "string") {
|
|
24023
|
+
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" };
|
|
24024
|
+
if (vErrors === null) {
|
|
24025
|
+
vErrors = [err67];
|
|
24026
|
+
} else {
|
|
24027
|
+
vErrors.push(err67);
|
|
24028
|
+
}
|
|
24029
|
+
errors++;
|
|
24030
|
+
}
|
|
24031
|
+
if (!(data30 === "succeeded" || data30 === "returned" || data30 === "failed" || data30 === "interrupted" || data30 === "prevented" || data30 === "unknown")) {
|
|
24032
|
+
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" };
|
|
24033
|
+
if (vErrors === null) {
|
|
24034
|
+
vErrors = [err68];
|
|
24035
|
+
} else {
|
|
24036
|
+
vErrors.push(err68);
|
|
24037
|
+
}
|
|
24038
|
+
errors++;
|
|
24039
|
+
}
|
|
24040
|
+
var valid8 = _errs81 === errors;
|
|
24041
|
+
} else {
|
|
24042
|
+
var valid8 = true;
|
|
24043
|
+
}
|
|
24044
|
+
if (valid8) {
|
|
24045
|
+
if (data1.envelopeVersion !== void 0) {
|
|
24046
|
+
let data31 = data1.envelopeVersion;
|
|
24047
|
+
const _errs83 = errors;
|
|
24048
|
+
if (errors === _errs83) {
|
|
24049
|
+
if (typeof data31 == "number" && isFinite(data31)) {
|
|
24050
|
+
if (data31 >= 4 || isNaN(data31)) {
|
|
24051
|
+
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" };
|
|
24052
|
+
if (vErrors === null) {
|
|
24053
|
+
vErrors = [err69];
|
|
24054
|
+
} else {
|
|
24055
|
+
vErrors.push(err69);
|
|
24056
|
+
}
|
|
24057
|
+
errors++;
|
|
24058
|
+
}
|
|
24059
|
+
} else {
|
|
24060
|
+
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" };
|
|
23759
24061
|
if (vErrors === null) {
|
|
23760
|
-
vErrors = [
|
|
24062
|
+
vErrors = [err70];
|
|
23761
24063
|
} else {
|
|
23762
|
-
vErrors.push(
|
|
24064
|
+
vErrors.push(err70);
|
|
23763
24065
|
}
|
|
23764
24066
|
errors++;
|
|
23765
24067
|
}
|
|
23766
|
-
} else {
|
|
23767
|
-
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" };
|
|
23768
|
-
if (vErrors === null) {
|
|
23769
|
-
vErrors = [err42];
|
|
23770
|
-
} else {
|
|
23771
|
-
vErrors.push(err42);
|
|
23772
|
-
}
|
|
23773
|
-
errors++;
|
|
23774
24068
|
}
|
|
24069
|
+
var valid8 = _errs83 === errors;
|
|
24070
|
+
} else {
|
|
24071
|
+
var valid8 = true;
|
|
23775
24072
|
}
|
|
23776
|
-
var valid5 = _errs55 === errors;
|
|
23777
|
-
} else {
|
|
23778
|
-
var valid5 = true;
|
|
23779
24073
|
}
|
|
23780
24074
|
}
|
|
23781
24075
|
}
|
|
@@ -23789,28 +24083,28 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
23789
24083
|
}
|
|
23790
24084
|
}
|
|
23791
24085
|
} else {
|
|
23792
|
-
const
|
|
24086
|
+
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" };
|
|
23793
24087
|
if (vErrors === null) {
|
|
23794
|
-
vErrors = [
|
|
24088
|
+
vErrors = [err71];
|
|
23795
24089
|
} else {
|
|
23796
|
-
vErrors.push(
|
|
24090
|
+
vErrors.push(err71);
|
|
23797
24091
|
}
|
|
23798
24092
|
errors++;
|
|
23799
24093
|
}
|
|
23800
24094
|
}
|
|
23801
|
-
var _valid0 =
|
|
24095
|
+
var _valid0 = _errs46 === errors;
|
|
23802
24096
|
valid3 = valid3 || _valid0;
|
|
23803
24097
|
if (_valid0) {
|
|
23804
|
-
if (
|
|
23805
|
-
|
|
24098
|
+
if (props1 !== true) {
|
|
24099
|
+
props1 = true;
|
|
23806
24100
|
}
|
|
23807
24101
|
}
|
|
23808
24102
|
if (!valid3) {
|
|
23809
|
-
const
|
|
24103
|
+
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" };
|
|
23810
24104
|
if (vErrors === null) {
|
|
23811
|
-
vErrors = [
|
|
24105
|
+
vErrors = [err72];
|
|
23812
24106
|
} else {
|
|
23813
|
-
vErrors.push(
|
|
24107
|
+
vErrors.push(err72);
|
|
23814
24108
|
}
|
|
23815
24109
|
errors++;
|
|
23816
24110
|
validate51.errors = vErrors;
|
|
@@ -29219,13 +29513,18 @@ async function processSessionStart(raw, agent, feedbackSignal) {
|
|
|
29219
29513
|
if (typeof envelope.session_id !== "string" || envelope.session_id.length === 0) {
|
|
29220
29514
|
return { output: buildHookOutput({}) };
|
|
29221
29515
|
}
|
|
29516
|
+
const cwd = envelope.cwd ?? process.cwd();
|
|
29517
|
+
if (!gitToplevel(cwd) || !isRepoActiveForCapture(cwd)) {
|
|
29518
|
+
if (repoActiveFlag(cwd) === "false") clearHooksWired(cwd);
|
|
29519
|
+
return { output: agent === "cursor" ? {} : buildHookOutput({}) };
|
|
29520
|
+
}
|
|
29521
|
+
warmBinCache();
|
|
29222
29522
|
kickDaemonEnsure();
|
|
29223
29523
|
await daemonRequest(
|
|
29224
29524
|
"session_start",
|
|
29225
29525
|
{ sessionId: envelope.session_id, callerEnv: getSiteUrl() },
|
|
29226
29526
|
{ timeoutMs: DAEMON_TIMEOUT_MS }
|
|
29227
29527
|
);
|
|
29228
|
-
const cwd = envelope.cwd ?? process.cwd();
|
|
29229
29528
|
let projectRoot2 = null;
|
|
29230
29529
|
let active = false;
|
|
29231
29530
|
let skillState = { installed: 0, refreshed: 0 };
|
|
@@ -29352,7 +29651,6 @@ function emitOutput(output, acknowledge) {
|
|
|
29352
29651
|
return handoffHookOutput(output, acknowledge);
|
|
29353
29652
|
}
|
|
29354
29653
|
async function main() {
|
|
29355
|
-
warmBinCache();
|
|
29356
29654
|
const agent = parseAgent(process.argv);
|
|
29357
29655
|
let raw;
|
|
29358
29656
|
try {
|