@primitive.ai/prim 0.1.0-alpha.111 → 0.1.0-alpha.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1
- package/SKILL.md +12 -2
- package/dist/{chunk-KQ4WBK5R.js → chunk-3KKEV7VI.js} +2 -2
- package/dist/{chunk-2IRLFOEL.js → chunk-6JHKKLA2.js} +79 -1
- package/dist/{chunk-IQZA65NV.js → chunk-7DVEH7FO.js} +1 -1
- package/dist/{chunk-W4ZEPZLK.js → chunk-BXLH4LDU.js} +1 -1
- package/dist/{chunk-GA2RXPJL.js → chunk-DWAXFXDG.js} +2 -2
- package/dist/{chunk-7VIMU2HR.js → chunk-FTW4ZCBA.js} +2 -2
- package/dist/{chunk-JJI7FU24.js → chunk-HMD5K6W7.js} +1 -1
- package/dist/{chunk-HTRFPXMD.js → chunk-IW5HCCOW.js} +3 -3
- package/dist/{chunk-UDBBJWQH.js → chunk-IZXLH3R5.js} +930 -582
- package/dist/{chunk-5LRKJTLA.js → chunk-J5HBSRAV.js} +7 -5
- package/dist/{chunk-5BLGBSDM.js → chunk-JDIAPBY7.js} +1 -1
- package/dist/{chunk-2Q3OGSTV.js → chunk-NEQI2VLM.js} +2 -2
- package/dist/{chunk-AOJ254C2.js → chunk-PJW6JZMH.js} +4 -4
- package/dist/{chunk-43ZKL27W.js → chunk-RTULPLS7.js} +1 -1
- package/dist/{chunk-CTRAJCPN.js → chunk-XV6C5ZV2.js} +1 -1
- package/dist/daemon/server.js +1184 -754
- package/dist/hook-runtime/daemon/server.js +1184 -754
- package/dist/hook-runtime/hooks/post-commit.js +929 -581
- package/dist/hook-runtime/hooks/post-rewrite.js +929 -581
- package/dist/hook-runtime/hooks/post-tool-use.js +1015 -588
- package/dist/hook-runtime/hooks/pre-commit.js +85 -6
- package/dist/hook-runtime/hooks/pre-tool-use.js +1017 -591
- package/dist/hook-runtime/hooks/prim-hook.js +1016 -589
- package/dist/hook-runtime/hooks/session-end.js +14 -12
- package/dist/hook-runtime/hooks/session-start.js +1016 -589
- package/dist/hook-runtime/index.js +1211 -791
- package/dist/hook-runtime/statusline-main.js +7 -5
- package/dist/hooks/post-commit.js +5 -5
- package/dist/hooks/post-rewrite.js +5 -5
- package/dist/hooks/post-tool-use.js +12 -12
- package/dist/hooks/pre-commit.js +3 -3
- package/dist/hooks/pre-tool-use.js +10 -11
- package/dist/hooks/prim-hook.js +12 -12
- package/dist/hooks/session-end.js +1 -1
- package/dist/hooks/session-start.js +7 -7
- package/dist/index.js +177 -183
- package/dist/statusline-main.js +7 -5
- package/package.json +2 -1
|
@@ -51,94 +51,8 @@ var require_ucs2length = __commonJS({
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
-
// src/daemon/
|
|
55
|
-
import { chmodSync as chmodSync7, existsSync as existsSync10, mkdirSync as mkdirSync8, readFileSync as readFileSync10, unlinkSync as unlinkSync3 } from "fs";
|
|
56
|
-
import { createServer } from "net";
|
|
57
|
-
import { join as join15 } from "path";
|
|
58
|
-
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
59
|
-
|
|
60
|
-
// src/client.ts
|
|
54
|
+
// src/daemon/principal.ts
|
|
61
55
|
import { createHash as createHash2 } from "crypto";
|
|
62
|
-
import { chmodSync as chmodSync2, existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync5, rmSync as rmSync3 } from "fs";
|
|
63
|
-
import { dirname as dirname4 } from "path";
|
|
64
|
-
|
|
65
|
-
// src/lib/atomic-file.ts
|
|
66
|
-
import { randomUUID } from "crypto";
|
|
67
|
-
import {
|
|
68
|
-
constants,
|
|
69
|
-
closeSync,
|
|
70
|
-
fchmodSync,
|
|
71
|
-
fsyncSync,
|
|
72
|
-
mkdirSync,
|
|
73
|
-
openSync,
|
|
74
|
-
renameSync,
|
|
75
|
-
rmSync,
|
|
76
|
-
writeFileSync
|
|
77
|
-
} from "fs";
|
|
78
|
-
import { dirname } from "path";
|
|
79
|
-
var DEFAULT_FILE_MODE = 438;
|
|
80
|
-
function syncDirectory(path) {
|
|
81
|
-
const fd = openSync(path, constants.O_RDONLY);
|
|
82
|
-
try {
|
|
83
|
-
fsyncSync(fd);
|
|
84
|
-
} finally {
|
|
85
|
-
closeSync(fd);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
function syncCreatedParentChain(firstCreatedParent, parent) {
|
|
89
|
-
const createdDirectories = [];
|
|
90
|
-
let current = parent;
|
|
91
|
-
while (current !== firstCreatedParent) {
|
|
92
|
-
createdDirectories.push(current);
|
|
93
|
-
const next = dirname(current);
|
|
94
|
-
if (next === current) {
|
|
95
|
-
throw new Error("recursive mkdir returned a path outside the target parent chain");
|
|
96
|
-
}
|
|
97
|
-
current = next;
|
|
98
|
-
}
|
|
99
|
-
createdDirectories.push(firstCreatedParent);
|
|
100
|
-
syncDirectory(dirname(firstCreatedParent));
|
|
101
|
-
for (const directory of createdDirectories.reverse().slice(0, -1)) {
|
|
102
|
-
syncDirectory(directory);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
function ensureDurableDirectory(path, mode) {
|
|
106
|
-
const firstCreatedParent = mkdirSync(path, { recursive: true, mode });
|
|
107
|
-
if (firstCreatedParent) {
|
|
108
|
-
syncCreatedParentChain(firstCreatedParent, path);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function atomicWriteFile(target, content, options = {}) {
|
|
112
|
-
const parent = dirname(target);
|
|
113
|
-
if (options.ensureParent) {
|
|
114
|
-
ensureDurableDirectory(parent);
|
|
115
|
-
}
|
|
116
|
-
const temporaryPath = `${target}.${randomUUID()}.tmp`;
|
|
117
|
-
let temporaryCreated = false;
|
|
118
|
-
try {
|
|
119
|
-
const flags = constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW;
|
|
120
|
-
const fd = openSync(temporaryPath, flags, options.mode ?? DEFAULT_FILE_MODE);
|
|
121
|
-
temporaryCreated = true;
|
|
122
|
-
try {
|
|
123
|
-
if (options.mode !== void 0) fchmodSync(fd, options.mode);
|
|
124
|
-
writeFileSync(fd, content);
|
|
125
|
-
fsyncSync(fd);
|
|
126
|
-
} finally {
|
|
127
|
-
closeSync(fd);
|
|
128
|
-
}
|
|
129
|
-
options.validate?.(temporaryPath);
|
|
130
|
-
renameSync(temporaryPath, target);
|
|
131
|
-
syncDirectory(parent);
|
|
132
|
-
} catch (error) {
|
|
133
|
-
if (temporaryCreated) {
|
|
134
|
-
try {
|
|
135
|
-
rmSync(temporaryPath, { force: true });
|
|
136
|
-
} catch {
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
throw error;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
56
|
|
|
143
57
|
// src/lib/credentials.ts
|
|
144
58
|
import { createHash } from "crypto";
|
|
@@ -456,6 +370,247 @@ function jwtExpiresAt(token) {
|
|
|
456
370
|
return typeof exp === "number" && Number.isFinite(exp) ? exp * 1e3 : void 0;
|
|
457
371
|
}
|
|
458
372
|
|
|
373
|
+
// src/daemon/principal.ts
|
|
374
|
+
var PRINCIPAL_COMPONENT_MAX_LENGTH = 512;
|
|
375
|
+
var SHA256_HEX_PATTERN = /^[a-f0-9]{64}$/;
|
|
376
|
+
function boundedClaim(value) {
|
|
377
|
+
return typeof value === "string" && value.length > 0 && value.length <= PRINCIPAL_COMPONENT_MAX_LENGTH ? value : void 0;
|
|
378
|
+
}
|
|
379
|
+
function sha256(value) {
|
|
380
|
+
return createHash2("sha256").update(value).digest("hex");
|
|
381
|
+
}
|
|
382
|
+
function resolveDaemonCredentialKey(token = resolveAuthCredential()?.token) {
|
|
383
|
+
return token ? sha256(token) : void 0;
|
|
384
|
+
}
|
|
385
|
+
function resolveDaemonPrincipal(token = resolveAuthCredential()?.token) {
|
|
386
|
+
if (!token) return void 0;
|
|
387
|
+
const payload = decodeJwtPayload(token);
|
|
388
|
+
const subject = boundedClaim(payload?.sub);
|
|
389
|
+
const organizationId = boundedClaim(payload?.org_id);
|
|
390
|
+
if (!(subject && organizationId)) return void 0;
|
|
391
|
+
const issuer = boundedClaim(payload?.iss) ?? "unknown-issuer";
|
|
392
|
+
return {
|
|
393
|
+
principalId: sha256(`${issuer}\0${subject}`),
|
|
394
|
+
organizationId,
|
|
395
|
+
credentialFingerprint: sha256(token)
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
function isDaemonPrincipal(value) {
|
|
399
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
|
|
400
|
+
const candidate = value;
|
|
401
|
+
return typeof candidate.principalId === "string" && SHA256_HEX_PATTERN.test(candidate.principalId) && typeof candidate.organizationId === "string" && candidate.organizationId.length > 0 && candidate.organizationId.length <= PRINCIPAL_COMPONENT_MAX_LENGTH && typeof candidate.credentialFingerprint === "string" && SHA256_HEX_PATTERN.test(candidate.credentialFingerprint);
|
|
402
|
+
}
|
|
403
|
+
function daemonPrincipalsMatch(caller, daemon) {
|
|
404
|
+
return caller !== void 0 && daemon !== void 0 && caller.principalId === daemon.principalId && caller.organizationId === daemon.organizationId && caller.credentialFingerprint === daemon.credentialFingerprint;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// src/daemon/protocol.ts
|
|
408
|
+
var DAEMON_JSON_REQUEST_MAX_BYTES = 64 * 1024;
|
|
409
|
+
var DAEMON_JSON_RESPONSE_MAX_BYTES = 8 * 1024 * 1024;
|
|
410
|
+
var DAEMON_SOCKET_IDLE_TIMEOUT_MS = 2e3;
|
|
411
|
+
var DECISION_IDENTITY_VERSION = 7;
|
|
412
|
+
function isRecord(value) {
|
|
413
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
414
|
+
}
|
|
415
|
+
function parseDaemonRequestEnvelope(value) {
|
|
416
|
+
if (!isRecord(value)) return void 0;
|
|
417
|
+
if (!(typeof value.id === "number" && Number.isSafeInteger(value.id) && value.id >= 0)) {
|
|
418
|
+
return void 0;
|
|
419
|
+
}
|
|
420
|
+
if (typeof value.method !== "string" || value.method.length === 0 || value.method.length > 100) {
|
|
421
|
+
return void 0;
|
|
422
|
+
}
|
|
423
|
+
if (value.params !== void 0 && !isRecord(value.params)) return void 0;
|
|
424
|
+
if (value.caller !== void 0 && !isDaemonPrincipal(value.caller)) return void 0;
|
|
425
|
+
return {
|
|
426
|
+
id: value.id,
|
|
427
|
+
method: value.method,
|
|
428
|
+
...value.params === void 0 ? {} : { params: value.params },
|
|
429
|
+
...value.caller === void 0 ? {} : { caller: value.caller }
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
function parseDaemonResponseEnvelope(value) {
|
|
433
|
+
if (!isRecord(value)) return void 0;
|
|
434
|
+
if (!(typeof value.id === "number" && Number.isSafeInteger(value.id) && value.id >= 0)) {
|
|
435
|
+
return void 0;
|
|
436
|
+
}
|
|
437
|
+
if (typeof value.ok !== "boolean") return void 0;
|
|
438
|
+
if (value.error !== void 0 && typeof value.error !== "string") return void 0;
|
|
439
|
+
return {
|
|
440
|
+
id: value.id,
|
|
441
|
+
...typeof value.decisionIdentityVersion === "number" ? { decisionIdentityVersion: value.decisionIdentityVersion } : {},
|
|
442
|
+
ok: value.ok,
|
|
443
|
+
...value.result === void 0 ? {} : { result: value.result },
|
|
444
|
+
...value.error === void 0 ? {} : { error: value.error }
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// src/daemon/server.ts
|
|
449
|
+
import { chmodSync as chmodSync7, existsSync as existsSync10, mkdirSync as mkdirSync8, readFileSync as readFileSync10, unlinkSync as unlinkSync3 } from "fs";
|
|
450
|
+
import { createServer } from "net";
|
|
451
|
+
import { join as join15 } from "path";
|
|
452
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
453
|
+
|
|
454
|
+
// src/decisions/identity.ts
|
|
455
|
+
var PUBLIC_ID = /^dec_[0-9a-f]{8}$/u;
|
|
456
|
+
var BARE_ID = /^[0-9a-f]{8}$/u;
|
|
457
|
+
var OPAQUE_FIELDS = /* @__PURE__ */ new Set([
|
|
458
|
+
"cursor",
|
|
459
|
+
"continueCursor",
|
|
460
|
+
"nextCursor",
|
|
461
|
+
"reviewToken",
|
|
462
|
+
"bypassToken"
|
|
463
|
+
]);
|
|
464
|
+
function decisionIdentifier(id, shortId) {
|
|
465
|
+
if (typeof id === "string" && PUBLIC_ID.test(id)) return id;
|
|
466
|
+
if (typeof shortId === "string" && BARE_ID.test(shortId)) return `dec_${shortId}`;
|
|
467
|
+
if (typeof id === "string" && BARE_ID.test(id)) return `dec_${id}`;
|
|
468
|
+
return void 0;
|
|
469
|
+
}
|
|
470
|
+
function publicDecisionResponse(value) {
|
|
471
|
+
const replacements = /* @__PURE__ */ new Map();
|
|
472
|
+
const referenceKeys = /* @__PURE__ */ new Set([
|
|
473
|
+
"decisionId",
|
|
474
|
+
"childId",
|
|
475
|
+
"parentId",
|
|
476
|
+
"supersededBy",
|
|
477
|
+
"activationDecisionId"
|
|
478
|
+
]);
|
|
479
|
+
function visit(input, field = "") {
|
|
480
|
+
if (OPAQUE_FIELDS.has(field) || input === null || input === void 0) return input;
|
|
481
|
+
if (Array.isArray(input)) return input.map((item) => visit(item, field));
|
|
482
|
+
if (typeof input === "string" && (referenceKeys.has(field) || /DecisionIds$/u.test(field))) {
|
|
483
|
+
const id = decisionIdentifier(input);
|
|
484
|
+
if (!id) throw new Error("Decision identity unavailable; update Primitive and retry");
|
|
485
|
+
return id;
|
|
486
|
+
}
|
|
487
|
+
if (typeof input !== "object") return input;
|
|
488
|
+
const row = { ...input };
|
|
489
|
+
for (const [idKey, shortKey] of [
|
|
490
|
+
["id", "shortId"],
|
|
491
|
+
["_id", "shortId"],
|
|
492
|
+
["decisionId", "shortId"],
|
|
493
|
+
["childId", "childShortId"],
|
|
494
|
+
["parentId", "parentShortId"]
|
|
495
|
+
]) {
|
|
496
|
+
if (!(idKey in row) || (idKey === "id" || idKey === "_id") && !("intent" in row || "shortId" in row))
|
|
497
|
+
continue;
|
|
498
|
+
const id = decisionIdentifier(
|
|
499
|
+
row[idKey],
|
|
500
|
+
row[shortKey] ?? (idKey === "decisionId" ? row.decisionShortId : void 0)
|
|
501
|
+
);
|
|
502
|
+
if (!id) throw new Error("Decision identity unavailable; update Primitive and retry");
|
|
503
|
+
const previous = row[idKey];
|
|
504
|
+
if (typeof previous === "string" && !PUBLIC_ID.test(previous) && !BARE_ID.test(previous)) {
|
|
505
|
+
replacements.set(previous, id);
|
|
506
|
+
}
|
|
507
|
+
if (shortKey in row) row[shortKey] = id.slice(4);
|
|
508
|
+
if (idKey === "decisionId" && "decisionShortId" in row) row.decisionShortId = id.slice(4);
|
|
509
|
+
row[idKey] = id;
|
|
510
|
+
}
|
|
511
|
+
return Object.fromEntries(Object.entries(row).map(([key, item]) => [key, visit(item, key)]));
|
|
512
|
+
}
|
|
513
|
+
const projected = visit(value);
|
|
514
|
+
function replace(input, field = "") {
|
|
515
|
+
if (OPAQUE_FIELDS.has(field)) return input;
|
|
516
|
+
if (typeof input === "string") {
|
|
517
|
+
let output = input;
|
|
518
|
+
for (const [raw, id] of replacements) if (raw !== id) output = output.replaceAll(raw, id);
|
|
519
|
+
return output;
|
|
520
|
+
}
|
|
521
|
+
if (Array.isArray(input)) return input.map((item) => replace(item, field));
|
|
522
|
+
if (input && typeof input === "object")
|
|
523
|
+
return Object.fromEntries(
|
|
524
|
+
Object.entries(input).map(([key, item]) => [key, replace(item, key)])
|
|
525
|
+
);
|
|
526
|
+
return input;
|
|
527
|
+
}
|
|
528
|
+
return replace(projected);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
// src/client.ts
|
|
532
|
+
import { createHash as createHash3 } from "crypto";
|
|
533
|
+
import { chmodSync as chmodSync2, existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync5, rmSync as rmSync3 } from "fs";
|
|
534
|
+
import { dirname as dirname4 } from "path";
|
|
535
|
+
|
|
536
|
+
// src/lib/atomic-file.ts
|
|
537
|
+
import { randomUUID } from "crypto";
|
|
538
|
+
import {
|
|
539
|
+
constants,
|
|
540
|
+
closeSync,
|
|
541
|
+
fchmodSync,
|
|
542
|
+
fsyncSync,
|
|
543
|
+
mkdirSync,
|
|
544
|
+
openSync,
|
|
545
|
+
renameSync,
|
|
546
|
+
rmSync,
|
|
547
|
+
writeFileSync
|
|
548
|
+
} from "fs";
|
|
549
|
+
import { dirname } from "path";
|
|
550
|
+
var DEFAULT_FILE_MODE = 438;
|
|
551
|
+
function syncDirectory(path) {
|
|
552
|
+
const fd = openSync(path, constants.O_RDONLY);
|
|
553
|
+
try {
|
|
554
|
+
fsyncSync(fd);
|
|
555
|
+
} finally {
|
|
556
|
+
closeSync(fd);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
function syncCreatedParentChain(firstCreatedParent, parent) {
|
|
560
|
+
const createdDirectories = [];
|
|
561
|
+
let current = parent;
|
|
562
|
+
while (current !== firstCreatedParent) {
|
|
563
|
+
createdDirectories.push(current);
|
|
564
|
+
const next = dirname(current);
|
|
565
|
+
if (next === current) {
|
|
566
|
+
throw new Error("recursive mkdir returned a path outside the target parent chain");
|
|
567
|
+
}
|
|
568
|
+
current = next;
|
|
569
|
+
}
|
|
570
|
+
createdDirectories.push(firstCreatedParent);
|
|
571
|
+
syncDirectory(dirname(firstCreatedParent));
|
|
572
|
+
for (const directory of createdDirectories.reverse().slice(0, -1)) {
|
|
573
|
+
syncDirectory(directory);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
function ensureDurableDirectory(path, mode) {
|
|
577
|
+
const firstCreatedParent = mkdirSync(path, { recursive: true, mode });
|
|
578
|
+
if (firstCreatedParent) {
|
|
579
|
+
syncCreatedParentChain(firstCreatedParent, path);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
function atomicWriteFile(target, content, options = {}) {
|
|
583
|
+
const parent = dirname(target);
|
|
584
|
+
if (options.ensureParent) {
|
|
585
|
+
ensureDurableDirectory(parent);
|
|
586
|
+
}
|
|
587
|
+
const temporaryPath = `${target}.${randomUUID()}.tmp`;
|
|
588
|
+
let temporaryCreated = false;
|
|
589
|
+
try {
|
|
590
|
+
const flags = constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW;
|
|
591
|
+
const fd = openSync(temporaryPath, flags, options.mode ?? DEFAULT_FILE_MODE);
|
|
592
|
+
temporaryCreated = true;
|
|
593
|
+
try {
|
|
594
|
+
if (options.mode !== void 0) fchmodSync(fd, options.mode);
|
|
595
|
+
writeFileSync(fd, content);
|
|
596
|
+
fsyncSync(fd);
|
|
597
|
+
} finally {
|
|
598
|
+
closeSync(fd);
|
|
599
|
+
}
|
|
600
|
+
options.validate?.(temporaryPath);
|
|
601
|
+
renameSync(temporaryPath, target);
|
|
602
|
+
syncDirectory(parent);
|
|
603
|
+
} catch (error) {
|
|
604
|
+
if (temporaryCreated) {
|
|
605
|
+
try {
|
|
606
|
+
rmSync(temporaryPath, { force: true });
|
|
607
|
+
} catch {
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
throw error;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
|
|
459
614
|
// src/lib/file-lock.ts
|
|
460
615
|
import { randomBytes } from "crypto";
|
|
461
616
|
import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync2, rmSync as rmSync2, statSync, writeFileSync as writeFileSync2 } from "fs";
|
|
@@ -833,7 +988,7 @@ function isTokenExpiringSoon(credential) {
|
|
|
833
988
|
return expiresAt !== void 0 && Date.now() >= expiresAt - REFRESH_THRESHOLD_MS;
|
|
834
989
|
}
|
|
835
990
|
function refreshFingerprint(refreshToken2) {
|
|
836
|
-
return
|
|
991
|
+
return createHash3("sha256").update(refreshToken2).digest("hex");
|
|
837
992
|
}
|
|
838
993
|
function legacyBrokerCredentialMetadata(accessToken, refreshToken2) {
|
|
839
994
|
return {
|
|
@@ -1189,7 +1344,7 @@ async function responseValue(response) {
|
|
|
1189
1344
|
const message = typeof errorRecord?.error === "string" ? errorRecord.error : `HTTP ${response.status}`;
|
|
1190
1345
|
throw new HttpError(response.status, message, errorBody);
|
|
1191
1346
|
}
|
|
1192
|
-
return response.json();
|
|
1347
|
+
return publicDecisionResponse(await response.json());
|
|
1193
1348
|
}
|
|
1194
1349
|
async function request(method, path, body, options) {
|
|
1195
1350
|
const siteUrl = getSiteUrl();
|
|
@@ -1260,7 +1415,7 @@ import { createReadStream, renameSync as renameSync3, statSync as statSync2, unl
|
|
|
1260
1415
|
import { dirname as dirname9, join as join11 } from "path";
|
|
1261
1416
|
|
|
1262
1417
|
// src/dead-letter.ts
|
|
1263
|
-
import { createHash as
|
|
1418
|
+
import { createHash as createHash4, randomBytes as randomBytes3 } from "crypto";
|
|
1264
1419
|
import {
|
|
1265
1420
|
constants as constants2,
|
|
1266
1421
|
chmodSync as chmodSync3,
|
|
@@ -1282,7 +1437,7 @@ function deadLetterDirectoryForRotation(flushingPath) {
|
|
|
1282
1437
|
return join7(dirname5(flushingPath), DEAD_LETTER_DIRNAME);
|
|
1283
1438
|
}
|
|
1284
1439
|
function deadLetterPathForRawLine(flushingPath, rawLine) {
|
|
1285
|
-
const quarantineId =
|
|
1440
|
+
const quarantineId = createHash4("sha256").update(rawLine).digest("hex");
|
|
1286
1441
|
return join7(deadLetterDirectoryForRotation(flushingPath), `raw-${quarantineId}.json`);
|
|
1287
1442
|
}
|
|
1288
1443
|
function ensureDeadLetterDirectory(flushingPath, persistDirectory) {
|
|
@@ -1324,7 +1479,7 @@ function quarantineMove(flushingPath, move, reason, now = Date.now, options = {}
|
|
|
1324
1479
|
const serializedMove = JSON.stringify(move);
|
|
1325
1480
|
const record = {
|
|
1326
1481
|
version: 1,
|
|
1327
|
-
quarantineId:
|
|
1482
|
+
quarantineId: createHash4("sha256").update(serializedMove).digest("hex"),
|
|
1328
1483
|
quarantinedAt: now(),
|
|
1329
1484
|
reason,
|
|
1330
1485
|
move
|
|
@@ -1340,7 +1495,7 @@ function quarantineRawLine(flushingPath, rawLine, now = Date.now, options = {})
|
|
|
1340
1495
|
const record = {
|
|
1341
1496
|
version: 1,
|
|
1342
1497
|
recordKind: "raw_line_v1",
|
|
1343
|
-
quarantineId:
|
|
1498
|
+
quarantineId: createHash4("sha256").update(bytes).digest("hex"),
|
|
1344
1499
|
quarantinedAt: now(),
|
|
1345
1500
|
reason: "invalid_move",
|
|
1346
1501
|
rawLineEncoding: "base64",
|
|
@@ -1707,7 +1862,9 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1707
1862
|
return errors === 0;
|
|
1708
1863
|
}
|
|
1709
1864
|
validate22.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
1710
|
-
var schema37 = { "type": "object", "properties": { "decision": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} }, "rationale": { "type": "string" }, "reversibility": { "type": "string", "enum": ["high", "low"] }, "fanOut": { "type": "number" }, "upstream": { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "string" } } }, "required": ["files"], "additionalProperties": {} }, "downstream": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} } }, "trigger": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "enum": ["file_edit", "supersession", "invalidation", "confirmation_request"] }, "file": { "type": "string" }, "contextName": { "type": "string" }, "flaggedAt": { "type": "number" }, "authorName": { "type": "string" }, "reason": { "type": "string" } }, "required": ["type", "flaggedAt"], "additionalProperties": {} }, { "type": "null" }] }, "truncated": { "type": "boolean" } }, "required": ["decision", "fanOut", "upstream", "downstream", "trigger", "truncated"], "additionalProperties": {} };
|
|
1865
|
+
var schema37 = { "type": "object", "properties": { "decision": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} }, "rationale": { "type": "string" }, "reversibility": { "type": "string", "enum": ["high", "low"] }, "fanOut": { "type": "number" }, "upstream": { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "string" } } }, "required": ["files"], "additionalProperties": {} }, "downstream": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} } }, "trigger": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "enum": ["file_edit", "supersession", "invalidation", "confirmation_request"] }, "file": { "type": "string" }, "contextName": { "type": "string" }, "flaggedAt": { "type": "number" }, "authorName": { "type": "string" }, "reason": { "type": "string" } }, "required": ["type", "flaggedAt"], "additionalProperties": {} }, { "type": "null" }] }, "truncated": { "type": "boolean" } }, "required": ["decision", "fanOut", "upstream", "downstream", "trigger", "truncated"], "additionalProperties": {} };
|
|
1866
|
+
var pattern4 = new RegExp("^dec_[0-9a-f]{8}$", "u");
|
|
1867
|
+
var pattern5 = new RegExp("^[0-9a-f]{8}$", "u");
|
|
1711
1868
|
function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
1712
1869
|
;
|
|
1713
1870
|
let vErrors = null;
|
|
@@ -1745,6 +1902,11 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1745
1902
|
if (func1(data1) < 1) {
|
|
1746
1903
|
validate23.errors = [{ instancePath: instancePath + "/decision/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/decision/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
1747
1904
|
return false;
|
|
1905
|
+
} else {
|
|
1906
|
+
if (!pattern4.test(data1)) {
|
|
1907
|
+
validate23.errors = [{ instancePath: instancePath + "/decision/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/decision/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
1908
|
+
return false;
|
|
1909
|
+
}
|
|
1748
1910
|
}
|
|
1749
1911
|
} else {
|
|
1750
1912
|
validate23.errors = [{ instancePath: instancePath + "/decision/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/decision/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
@@ -1757,10 +1919,18 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1757
1919
|
}
|
|
1758
1920
|
if (valid2) {
|
|
1759
1921
|
if (data0.shortId !== void 0) {
|
|
1922
|
+
let data2 = data0.shortId;
|
|
1760
1923
|
const _errs8 = errors;
|
|
1761
|
-
if (
|
|
1762
|
-
|
|
1763
|
-
|
|
1924
|
+
if (errors === _errs8) {
|
|
1925
|
+
if (typeof data2 === "string") {
|
|
1926
|
+
if (!pattern5.test(data2)) {
|
|
1927
|
+
validate23.errors = [{ instancePath: instancePath + "/decision/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/decision/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
|
|
1928
|
+
return false;
|
|
1929
|
+
}
|
|
1930
|
+
} else {
|
|
1931
|
+
validate23.errors = [{ instancePath: instancePath + "/decision/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/decision/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1932
|
+
return false;
|
|
1933
|
+
}
|
|
1764
1934
|
}
|
|
1765
1935
|
var valid2 = _errs8 === errors;
|
|
1766
1936
|
} else {
|
|
@@ -1953,6 +2123,11 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1953
2123
|
if (func1(data16) < 1) {
|
|
1954
2124
|
validate23.errors = [{ instancePath: instancePath + "/downstream/" + i1 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/downstream/items/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
1955
2125
|
return false;
|
|
2126
|
+
} else {
|
|
2127
|
+
if (!pattern4.test(data16)) {
|
|
2128
|
+
validate23.errors = [{ instancePath: instancePath + "/downstream/" + i1 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/downstream/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
2129
|
+
return false;
|
|
2130
|
+
}
|
|
1956
2131
|
}
|
|
1957
2132
|
} else {
|
|
1958
2133
|
validate23.errors = [{ instancePath: instancePath + "/downstream/" + i1 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/downstream/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
@@ -1965,10 +2140,18 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1965
2140
|
}
|
|
1966
2141
|
if (valid6) {
|
|
1967
2142
|
if (data15.shortId !== void 0) {
|
|
2143
|
+
let data17 = data15.shortId;
|
|
1968
2144
|
const _errs40 = errors;
|
|
1969
|
-
if (
|
|
1970
|
-
|
|
1971
|
-
|
|
2145
|
+
if (errors === _errs40) {
|
|
2146
|
+
if (typeof data17 === "string") {
|
|
2147
|
+
if (!pattern5.test(data17)) {
|
|
2148
|
+
validate23.errors = [{ instancePath: instancePath + "/downstream/" + i1 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/downstream/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
|
|
2149
|
+
return false;
|
|
2150
|
+
}
|
|
2151
|
+
} else {
|
|
2152
|
+
validate23.errors = [{ instancePath: instancePath + "/downstream/" + i1 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCascadeResponse/properties/downstream/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2153
|
+
return false;
|
|
2154
|
+
}
|
|
1972
2155
|
}
|
|
1973
2156
|
var valid6 = _errs40 === errors;
|
|
1974
2157
|
} else {
|
|
@@ -3208,7 +3391,7 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3208
3391
|
return errors === 0;
|
|
3209
3392
|
}
|
|
3210
3393
|
validate25.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
3211
|
-
var schema43 = { "anyOf": [{ "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "outcome": { "type": "string", "enum": ["stale", "confirmed", "corrected"] } }, "required": ["decisionId", "outcome"], "additionalProperties": {} }, { "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "outcome": { "type": "string", "const": "already_responded" }, "confirmed": { "type": "boolean" }, "respondedAt": { "type": "number" } }, "required": ["decisionId", "outcome", "respondedAt"], "additionalProperties": {} }, { "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "outcome": { "type": "string", "const": "no_pending_prompt" } }, "required": ["decisionId", "outcome"], "additionalProperties": {} }] };
|
|
3394
|
+
var schema43 = { "anyOf": [{ "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "outcome": { "type": "string", "enum": ["stale", "confirmed", "corrected"] } }, "required": ["decisionId", "outcome"], "additionalProperties": {} }, { "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "outcome": { "type": "string", "const": "already_responded" }, "confirmed": { "type": "boolean" }, "respondedAt": { "type": "number" } }, "required": ["decisionId", "outcome", "respondedAt"], "additionalProperties": {} }, { "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "outcome": { "type": "string", "const": "no_pending_prompt" } }, "required": ["decisionId", "outcome"], "additionalProperties": {} }] };
|
|
3212
3395
|
function validate26(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
3213
3396
|
;
|
|
3214
3397
|
let vErrors = null;
|
|
@@ -3247,14 +3430,24 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3247
3430
|
} else {
|
|
3248
3431
|
vErrors.push(err1);
|
|
3249
3432
|
}
|
|
3250
|
-
errors++;
|
|
3433
|
+
errors++;
|
|
3434
|
+
} else {
|
|
3435
|
+
if (!pattern4.test(data0)) {
|
|
3436
|
+
const err2 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
|
|
3437
|
+
if (vErrors === null) {
|
|
3438
|
+
vErrors = [err2];
|
|
3439
|
+
} else {
|
|
3440
|
+
vErrors.push(err2);
|
|
3441
|
+
}
|
|
3442
|
+
errors++;
|
|
3443
|
+
}
|
|
3251
3444
|
}
|
|
3252
3445
|
} else {
|
|
3253
|
-
const
|
|
3446
|
+
const err3 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3254
3447
|
if (vErrors === null) {
|
|
3255
|
-
vErrors = [
|
|
3448
|
+
vErrors = [err3];
|
|
3256
3449
|
} else {
|
|
3257
|
-
vErrors.push(
|
|
3450
|
+
vErrors.push(err3);
|
|
3258
3451
|
}
|
|
3259
3452
|
errors++;
|
|
3260
3453
|
}
|
|
@@ -3265,15 +3458,28 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3265
3458
|
}
|
|
3266
3459
|
if (valid2) {
|
|
3267
3460
|
if (data.shortId !== void 0) {
|
|
3461
|
+
let data1 = data.shortId;
|
|
3268
3462
|
const _errs7 = errors;
|
|
3269
|
-
if (
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3463
|
+
if (errors === _errs7) {
|
|
3464
|
+
if (typeof data1 === "string") {
|
|
3465
|
+
if (!pattern5.test(data1)) {
|
|
3466
|
+
const err4 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
|
|
3467
|
+
if (vErrors === null) {
|
|
3468
|
+
vErrors = [err4];
|
|
3469
|
+
} else {
|
|
3470
|
+
vErrors.push(err4);
|
|
3471
|
+
}
|
|
3472
|
+
errors++;
|
|
3473
|
+
}
|
|
3273
3474
|
} else {
|
|
3274
|
-
|
|
3475
|
+
const err5 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3476
|
+
if (vErrors === null) {
|
|
3477
|
+
vErrors = [err5];
|
|
3478
|
+
} else {
|
|
3479
|
+
vErrors.push(err5);
|
|
3480
|
+
}
|
|
3481
|
+
errors++;
|
|
3275
3482
|
}
|
|
3276
|
-
errors++;
|
|
3277
3483
|
}
|
|
3278
3484
|
var valid2 = _errs7 === errors;
|
|
3279
3485
|
} else {
|
|
@@ -3284,20 +3490,20 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3284
3490
|
let data2 = data.outcome;
|
|
3285
3491
|
const _errs9 = errors;
|
|
3286
3492
|
if (typeof data2 !== "string") {
|
|
3287
|
-
const
|
|
3493
|
+
const err6 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/outcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3288
3494
|
if (vErrors === null) {
|
|
3289
|
-
vErrors = [
|
|
3495
|
+
vErrors = [err6];
|
|
3290
3496
|
} else {
|
|
3291
|
-
vErrors.push(
|
|
3497
|
+
vErrors.push(err6);
|
|
3292
3498
|
}
|
|
3293
3499
|
errors++;
|
|
3294
3500
|
}
|
|
3295
3501
|
if (!(data2 === "stale" || data2 === "confirmed" || data2 === "corrected")) {
|
|
3296
|
-
const
|
|
3502
|
+
const err7 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/properties/outcome/enum", keyword: "enum", params: { allowedValues: schema43.anyOf[0].properties.outcome.enum }, message: "must be equal to one of the allowed values" };
|
|
3297
3503
|
if (vErrors === null) {
|
|
3298
|
-
vErrors = [
|
|
3504
|
+
vErrors = [err7];
|
|
3299
3505
|
} else {
|
|
3300
|
-
vErrors.push(
|
|
3506
|
+
vErrors.push(err7);
|
|
3301
3507
|
}
|
|
3302
3508
|
errors++;
|
|
3303
3509
|
}
|
|
@@ -3309,11 +3515,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3309
3515
|
}
|
|
3310
3516
|
}
|
|
3311
3517
|
} else {
|
|
3312
|
-
const
|
|
3518
|
+
const err8 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
3313
3519
|
if (vErrors === null) {
|
|
3314
|
-
vErrors = [
|
|
3520
|
+
vErrors = [err8];
|
|
3315
3521
|
} else {
|
|
3316
|
-
vErrors.push(
|
|
3522
|
+
vErrors.push(err8);
|
|
3317
3523
|
}
|
|
3318
3524
|
errors++;
|
|
3319
3525
|
}
|
|
@@ -3328,11 +3534,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3328
3534
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
3329
3535
|
let missing1;
|
|
3330
3536
|
if (data.decisionId === void 0 && (missing1 = "decisionId") || data.outcome === void 0 && (missing1 = "outcome") || data.respondedAt === void 0 && (missing1 = "respondedAt")) {
|
|
3331
|
-
const
|
|
3537
|
+
const err9 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
|
|
3332
3538
|
if (vErrors === null) {
|
|
3333
|
-
vErrors = [
|
|
3539
|
+
vErrors = [err9];
|
|
3334
3540
|
} else {
|
|
3335
|
-
vErrors.push(
|
|
3541
|
+
vErrors.push(err9);
|
|
3336
3542
|
}
|
|
3337
3543
|
errors++;
|
|
3338
3544
|
} else {
|
|
@@ -3342,20 +3548,30 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3342
3548
|
if (errors === _errs14) {
|
|
3343
3549
|
if (typeof data3 === "string") {
|
|
3344
3550
|
if (func1(data3) < 1) {
|
|
3345
|
-
const
|
|
3551
|
+
const err10 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/decisionId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
3346
3552
|
if (vErrors === null) {
|
|
3347
|
-
vErrors = [
|
|
3553
|
+
vErrors = [err10];
|
|
3348
3554
|
} else {
|
|
3349
|
-
vErrors.push(
|
|
3555
|
+
vErrors.push(err10);
|
|
3350
3556
|
}
|
|
3351
3557
|
errors++;
|
|
3558
|
+
} else {
|
|
3559
|
+
if (!pattern4.test(data3)) {
|
|
3560
|
+
const err11 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
|
|
3561
|
+
if (vErrors === null) {
|
|
3562
|
+
vErrors = [err11];
|
|
3563
|
+
} else {
|
|
3564
|
+
vErrors.push(err11);
|
|
3565
|
+
}
|
|
3566
|
+
errors++;
|
|
3567
|
+
}
|
|
3352
3568
|
}
|
|
3353
3569
|
} else {
|
|
3354
|
-
const
|
|
3570
|
+
const err12 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3355
3571
|
if (vErrors === null) {
|
|
3356
|
-
vErrors = [
|
|
3572
|
+
vErrors = [err12];
|
|
3357
3573
|
} else {
|
|
3358
|
-
vErrors.push(
|
|
3574
|
+
vErrors.push(err12);
|
|
3359
3575
|
}
|
|
3360
3576
|
errors++;
|
|
3361
3577
|
}
|
|
@@ -3366,15 +3582,28 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3366
3582
|
}
|
|
3367
3583
|
if (valid3) {
|
|
3368
3584
|
if (data.shortId !== void 0) {
|
|
3585
|
+
let data4 = data.shortId;
|
|
3369
3586
|
const _errs16 = errors;
|
|
3370
|
-
if (
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3587
|
+
if (errors === _errs16) {
|
|
3588
|
+
if (typeof data4 === "string") {
|
|
3589
|
+
if (!pattern5.test(data4)) {
|
|
3590
|
+
const err13 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
|
|
3591
|
+
if (vErrors === null) {
|
|
3592
|
+
vErrors = [err13];
|
|
3593
|
+
} else {
|
|
3594
|
+
vErrors.push(err13);
|
|
3595
|
+
}
|
|
3596
|
+
errors++;
|
|
3597
|
+
}
|
|
3374
3598
|
} else {
|
|
3375
|
-
|
|
3599
|
+
const err14 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3600
|
+
if (vErrors === null) {
|
|
3601
|
+
vErrors = [err14];
|
|
3602
|
+
} else {
|
|
3603
|
+
vErrors.push(err14);
|
|
3604
|
+
}
|
|
3605
|
+
errors++;
|
|
3376
3606
|
}
|
|
3377
|
-
errors++;
|
|
3378
3607
|
}
|
|
3379
3608
|
var valid3 = _errs16 === errors;
|
|
3380
3609
|
} else {
|
|
@@ -3385,20 +3614,20 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3385
3614
|
let data5 = data.outcome;
|
|
3386
3615
|
const _errs18 = errors;
|
|
3387
3616
|
if (typeof data5 !== "string") {
|
|
3388
|
-
const
|
|
3617
|
+
const err15 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/outcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3389
3618
|
if (vErrors === null) {
|
|
3390
|
-
vErrors = [
|
|
3619
|
+
vErrors = [err15];
|
|
3391
3620
|
} else {
|
|
3392
|
-
vErrors.push(
|
|
3621
|
+
vErrors.push(err15);
|
|
3393
3622
|
}
|
|
3394
3623
|
errors++;
|
|
3395
3624
|
}
|
|
3396
3625
|
if ("already_responded" !== data5) {
|
|
3397
|
-
const
|
|
3626
|
+
const err16 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/outcome/const", keyword: "const", params: { allowedValue: "already_responded" }, message: "must be equal to constant" };
|
|
3398
3627
|
if (vErrors === null) {
|
|
3399
|
-
vErrors = [
|
|
3628
|
+
vErrors = [err16];
|
|
3400
3629
|
} else {
|
|
3401
|
-
vErrors.push(
|
|
3630
|
+
vErrors.push(err16);
|
|
3402
3631
|
}
|
|
3403
3632
|
errors++;
|
|
3404
3633
|
}
|
|
@@ -3410,11 +3639,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3410
3639
|
if (data.confirmed !== void 0) {
|
|
3411
3640
|
const _errs20 = errors;
|
|
3412
3641
|
if (typeof data.confirmed !== "boolean") {
|
|
3413
|
-
const
|
|
3642
|
+
const err17 = { instancePath: instancePath + "/confirmed", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/confirmed/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
3414
3643
|
if (vErrors === null) {
|
|
3415
|
-
vErrors = [
|
|
3644
|
+
vErrors = [err17];
|
|
3416
3645
|
} else {
|
|
3417
|
-
vErrors.push(
|
|
3646
|
+
vErrors.push(err17);
|
|
3418
3647
|
}
|
|
3419
3648
|
errors++;
|
|
3420
3649
|
}
|
|
@@ -3427,11 +3656,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3427
3656
|
let data7 = data.respondedAt;
|
|
3428
3657
|
const _errs22 = errors;
|
|
3429
3658
|
if (!(typeof data7 == "number" && isFinite(data7))) {
|
|
3430
|
-
const
|
|
3659
|
+
const err18 = { instancePath: instancePath + "/respondedAt", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/properties/respondedAt/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
3431
3660
|
if (vErrors === null) {
|
|
3432
|
-
vErrors = [
|
|
3661
|
+
vErrors = [err18];
|
|
3433
3662
|
} else {
|
|
3434
|
-
vErrors.push(
|
|
3663
|
+
vErrors.push(err18);
|
|
3435
3664
|
}
|
|
3436
3665
|
errors++;
|
|
3437
3666
|
}
|
|
@@ -3445,11 +3674,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3445
3674
|
}
|
|
3446
3675
|
}
|
|
3447
3676
|
} else {
|
|
3448
|
-
const
|
|
3677
|
+
const err19 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
3449
3678
|
if (vErrors === null) {
|
|
3450
|
-
vErrors = [
|
|
3679
|
+
vErrors = [err19];
|
|
3451
3680
|
} else {
|
|
3452
|
-
vErrors.push(
|
|
3681
|
+
vErrors.push(err19);
|
|
3453
3682
|
}
|
|
3454
3683
|
errors++;
|
|
3455
3684
|
}
|
|
@@ -3466,11 +3695,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3466
3695
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
3467
3696
|
let missing2;
|
|
3468
3697
|
if (data.decisionId === void 0 && (missing2 = "decisionId") || data.outcome === void 0 && (missing2 = "outcome")) {
|
|
3469
|
-
const
|
|
3698
|
+
const err20 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" };
|
|
3470
3699
|
if (vErrors === null) {
|
|
3471
|
-
vErrors = [
|
|
3700
|
+
vErrors = [err20];
|
|
3472
3701
|
} else {
|
|
3473
|
-
vErrors.push(
|
|
3702
|
+
vErrors.push(err20);
|
|
3474
3703
|
}
|
|
3475
3704
|
errors++;
|
|
3476
3705
|
} else {
|
|
@@ -3480,20 +3709,30 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3480
3709
|
if (errors === _errs27) {
|
|
3481
3710
|
if (typeof data8 === "string") {
|
|
3482
3711
|
if (func1(data8) < 1) {
|
|
3483
|
-
const
|
|
3712
|
+
const err21 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/decisionId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
3484
3713
|
if (vErrors === null) {
|
|
3485
|
-
vErrors = [
|
|
3714
|
+
vErrors = [err21];
|
|
3486
3715
|
} else {
|
|
3487
|
-
vErrors.push(
|
|
3716
|
+
vErrors.push(err21);
|
|
3488
3717
|
}
|
|
3489
3718
|
errors++;
|
|
3719
|
+
} else {
|
|
3720
|
+
if (!pattern4.test(data8)) {
|
|
3721
|
+
const err22 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
|
|
3722
|
+
if (vErrors === null) {
|
|
3723
|
+
vErrors = [err22];
|
|
3724
|
+
} else {
|
|
3725
|
+
vErrors.push(err22);
|
|
3726
|
+
}
|
|
3727
|
+
errors++;
|
|
3728
|
+
}
|
|
3490
3729
|
}
|
|
3491
3730
|
} else {
|
|
3492
|
-
const
|
|
3731
|
+
const err23 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3493
3732
|
if (vErrors === null) {
|
|
3494
|
-
vErrors = [
|
|
3733
|
+
vErrors = [err23];
|
|
3495
3734
|
} else {
|
|
3496
|
-
vErrors.push(
|
|
3735
|
+
vErrors.push(err23);
|
|
3497
3736
|
}
|
|
3498
3737
|
errors++;
|
|
3499
3738
|
}
|
|
@@ -3504,15 +3743,28 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3504
3743
|
}
|
|
3505
3744
|
if (valid4) {
|
|
3506
3745
|
if (data.shortId !== void 0) {
|
|
3746
|
+
let data9 = data.shortId;
|
|
3507
3747
|
const _errs29 = errors;
|
|
3508
|
-
if (
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3748
|
+
if (errors === _errs29) {
|
|
3749
|
+
if (typeof data9 === "string") {
|
|
3750
|
+
if (!pattern5.test(data9)) {
|
|
3751
|
+
const err24 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
|
|
3752
|
+
if (vErrors === null) {
|
|
3753
|
+
vErrors = [err24];
|
|
3754
|
+
} else {
|
|
3755
|
+
vErrors.push(err24);
|
|
3756
|
+
}
|
|
3757
|
+
errors++;
|
|
3758
|
+
}
|
|
3512
3759
|
} else {
|
|
3513
|
-
|
|
3760
|
+
const err25 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3761
|
+
if (vErrors === null) {
|
|
3762
|
+
vErrors = [err25];
|
|
3763
|
+
} else {
|
|
3764
|
+
vErrors.push(err25);
|
|
3765
|
+
}
|
|
3766
|
+
errors++;
|
|
3514
3767
|
}
|
|
3515
|
-
errors++;
|
|
3516
3768
|
}
|
|
3517
3769
|
var valid4 = _errs29 === errors;
|
|
3518
3770
|
} else {
|
|
@@ -3523,20 +3775,20 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3523
3775
|
let data10 = data.outcome;
|
|
3524
3776
|
const _errs31 = errors;
|
|
3525
3777
|
if (typeof data10 !== "string") {
|
|
3526
|
-
const
|
|
3778
|
+
const err26 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/outcome/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3527
3779
|
if (vErrors === null) {
|
|
3528
|
-
vErrors = [
|
|
3780
|
+
vErrors = [err26];
|
|
3529
3781
|
} else {
|
|
3530
|
-
vErrors.push(
|
|
3782
|
+
vErrors.push(err26);
|
|
3531
3783
|
}
|
|
3532
3784
|
errors++;
|
|
3533
3785
|
}
|
|
3534
3786
|
if ("no_pending_prompt" !== data10) {
|
|
3535
|
-
const
|
|
3787
|
+
const err27 = { instancePath: instancePath + "/outcome", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/properties/outcome/const", keyword: "const", params: { allowedValue: "no_pending_prompt" }, message: "must be equal to constant" };
|
|
3536
3788
|
if (vErrors === null) {
|
|
3537
|
-
vErrors = [
|
|
3789
|
+
vErrors = [err27];
|
|
3538
3790
|
} else {
|
|
3539
|
-
vErrors.push(
|
|
3791
|
+
vErrors.push(err27);
|
|
3540
3792
|
}
|
|
3541
3793
|
errors++;
|
|
3542
3794
|
}
|
|
@@ -3548,11 +3800,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3548
3800
|
}
|
|
3549
3801
|
}
|
|
3550
3802
|
} else {
|
|
3551
|
-
const
|
|
3803
|
+
const err28 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
3552
3804
|
if (vErrors === null) {
|
|
3553
|
-
vErrors = [
|
|
3805
|
+
vErrors = [err28];
|
|
3554
3806
|
} else {
|
|
3555
|
-
vErrors.push(
|
|
3807
|
+
vErrors.push(err28);
|
|
3556
3808
|
}
|
|
3557
3809
|
errors++;
|
|
3558
3810
|
}
|
|
@@ -3565,11 +3817,11 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3565
3817
|
}
|
|
3566
3818
|
}
|
|
3567
3819
|
if (!valid1) {
|
|
3568
|
-
const
|
|
3820
|
+
const err29 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionConfirmSuccessResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
3569
3821
|
if (vErrors === null) {
|
|
3570
|
-
vErrors = [
|
|
3822
|
+
vErrors = [err29];
|
|
3571
3823
|
} else {
|
|
3572
|
-
vErrors.push(
|
|
3824
|
+
vErrors.push(err29);
|
|
3573
3825
|
}
|
|
3574
3826
|
errors++;
|
|
3575
3827
|
validate26.errors = vErrors;
|
|
@@ -4538,7 +4790,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4538
4790
|
return errors === 0;
|
|
4539
4791
|
}
|
|
4540
4792
|
validate27.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
4541
|
-
var schema47 = { "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "createdAt": { "type": "number" }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 } }, "required": ["kind", "userId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "scopeWarnings": { "type": "array", "items": { "type": "string" } } }, "required": ["decisionId", "shortId", "createdAt"], "additionalProperties": {} };
|
|
4793
|
+
var schema47 = { "type": "object", "properties": { "decisionId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "createdAt": { "type": "number" }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 } }, "required": ["kind", "userId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "scopeWarnings": { "type": "array", "items": { "type": "string" } } }, "required": ["decisionId", "shortId", "createdAt"], "additionalProperties": {} };
|
|
4542
4794
|
function validate28(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
4543
4795
|
;
|
|
4544
4796
|
let vErrors = null;
|
|
@@ -4566,6 +4818,11 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4566
4818
|
if (func1(data0) < 1) {
|
|
4567
4819
|
validate28.errors = [{ instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCreateResponse/properties/decisionId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
4568
4820
|
return false;
|
|
4821
|
+
} else {
|
|
4822
|
+
if (!pattern4.test(data0)) {
|
|
4823
|
+
validate28.errors = [{ instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCreateResponse/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
4824
|
+
return false;
|
|
4825
|
+
}
|
|
4569
4826
|
}
|
|
4570
4827
|
} else {
|
|
4571
4828
|
validate28.errors = [{ instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCreateResponse/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
@@ -4578,10 +4835,18 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4578
4835
|
}
|
|
4579
4836
|
if (valid1) {
|
|
4580
4837
|
if (data.shortId !== void 0) {
|
|
4838
|
+
let data1 = data.shortId;
|
|
4581
4839
|
const _errs5 = errors;
|
|
4582
|
-
if (
|
|
4583
|
-
|
|
4584
|
-
|
|
4840
|
+
if (errors === _errs5) {
|
|
4841
|
+
if (typeof data1 === "string") {
|
|
4842
|
+
if (!pattern5.test(data1)) {
|
|
4843
|
+
validate28.errors = [{ instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCreateResponse/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
|
|
4844
|
+
return false;
|
|
4845
|
+
}
|
|
4846
|
+
} else {
|
|
4847
|
+
validate28.errors = [{ instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionCreateResponse/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
4848
|
+
return false;
|
|
4849
|
+
}
|
|
4585
4850
|
}
|
|
4586
4851
|
var valid1 = _errs5 === errors;
|
|
4587
4852
|
} else {
|
|
@@ -5323,7 +5588,7 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5323
5588
|
return errors === 0;
|
|
5324
5589
|
}
|
|
5325
5590
|
validate28.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
5326
|
-
var schema49 = { "type": "object", "properties": { "decision": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "intent": { "type": "string" }, "intentKind": { "type": "string", "enum": ["change", "exploration", "task_execution", "unclear"] }, "rationale": { "type": "string" }, "decided": { "type": "array", "items": { "type": "string" } }, "alternatives": { "type": "array", "items": { "type": "string" } }, "area": { "type": "string" }, "producerKind": { "type": "string" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] }, "supersededBy": { "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] }, "confidence": { "type": "string", "enum": ["high", "medium", "low"] }, "reversibility": { "type": "string", "enum": ["high", "low"] }, "confirmed": { "type": "boolean" }, "respondedAt": { "type": "number" }, "fanOut": { "type": "number" }, "classifiedAt": { "type": "number" }, "authorName": { "type": "string" } }, "required": ["id", "intent", "intentKind", "alternatives", "stage", "status", "supersededBy", "confidence", "classifiedAt", "authorName"], "additionalProperties": {} }, "files": { "type": "array", "items": { "type": "string" } }, "flags": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["file_edit", "supersession", "invalidation", "confirmation_request"] }, "file": { "type": "string" }, "flaggedAt": { "type": "number" }, "acknowledgedAt": { "type": "number" }, "gateVerdict": { "type": "string" }, "reason": { "type": "string" } }, "required": ["type", "flaggedAt"], "additionalProperties": {} } }, "dependsOn": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} } }, "dependents": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} } }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 }, "displayName": { "type": "string" } }, "required": ["kind", "userId", "displayName"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "truncated": { "type": "boolean" } }, "required": ["decision", "files", "flags", "dependsOn", "dependents", "scope", "truncated"], "additionalProperties": {} };
|
|
5591
|
+
var schema49 = { "type": "object", "properties": { "decision": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "intent": { "type": "string" }, "intentKind": { "type": "string", "enum": ["change", "exploration", "task_execution", "unclear"] }, "rationale": { "type": "string" }, "decided": { "type": "array", "items": { "type": "string" } }, "alternatives": { "type": "array", "items": { "type": "string" } }, "area": { "type": "string" }, "producerKind": { "type": "string" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] }, "supersededBy": { "anyOf": [{ "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$" }, { "type": "null" }], "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "confidence": { "type": "string", "enum": ["high", "medium", "low"] }, "reversibility": { "type": "string", "enum": ["high", "low"] }, "confirmed": { "type": "boolean" }, "respondedAt": { "type": "number" }, "fanOut": { "type": "number" }, "classifiedAt": { "type": "number" }, "authorName": { "type": "string" } }, "required": ["id", "intent", "intentKind", "alternatives", "stage", "status", "supersededBy", "confidence", "classifiedAt", "authorName"], "additionalProperties": {} }, "files": { "type": "array", "items": { "type": "string" } }, "flags": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["file_edit", "supersession", "invalidation", "confirmation_request"] }, "file": { "type": "string" }, "flaggedAt": { "type": "number" }, "acknowledgedAt": { "type": "number" }, "gateVerdict": { "type": "string" }, "reason": { "type": "string" } }, "required": ["type", "flaggedAt"], "additionalProperties": {} } }, "dependsOn": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} } }, "dependents": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "intent": { "type": "string" }, "area": { "type": "string" }, "authorName": { "type": "string" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] } }, "required": ["id", "intent", "authorName", "classifiedAt", "status"], "additionalProperties": {} } }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 }, "displayName": { "type": "string" } }, "required": ["kind", "userId", "displayName"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "truncated": { "type": "boolean" } }, "required": ["decision", "files", "flags", "dependsOn", "dependents", "scope", "truncated"], "additionalProperties": {} };
|
|
5327
5592
|
function validate29(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
5328
5593
|
;
|
|
5329
5594
|
let vErrors = null;
|
|
@@ -5361,6 +5626,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5361
5626
|
if (func1(data1) < 1) {
|
|
5362
5627
|
validate29.errors = [{ instancePath: instancePath + "/decision/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
5363
5628
|
return false;
|
|
5629
|
+
} else {
|
|
5630
|
+
if (!pattern4.test(data1)) {
|
|
5631
|
+
validate29.errors = [{ instancePath: instancePath + "/decision/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
5632
|
+
return false;
|
|
5633
|
+
}
|
|
5364
5634
|
}
|
|
5365
5635
|
} else {
|
|
5366
5636
|
validate29.errors = [{ instancePath: instancePath + "/decision/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
@@ -5373,10 +5643,18 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5373
5643
|
}
|
|
5374
5644
|
if (valid2) {
|
|
5375
5645
|
if (data0.shortId !== void 0) {
|
|
5646
|
+
let data2 = data0.shortId;
|
|
5376
5647
|
const _errs8 = errors;
|
|
5377
|
-
if (
|
|
5378
|
-
|
|
5379
|
-
|
|
5648
|
+
if (errors === _errs8) {
|
|
5649
|
+
if (typeof data2 === "string") {
|
|
5650
|
+
if (!pattern5.test(data2)) {
|
|
5651
|
+
validate29.errors = [{ instancePath: instancePath + "/decision/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
|
|
5652
|
+
return false;
|
|
5653
|
+
}
|
|
5654
|
+
} else {
|
|
5655
|
+
validate29.errors = [{ instancePath: instancePath + "/decision/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
5656
|
+
return false;
|
|
5657
|
+
}
|
|
5380
5658
|
}
|
|
5381
5659
|
var valid2 = _errs8 === errors;
|
|
5382
5660
|
} else {
|
|
@@ -5547,13 +5825,23 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5547
5825
|
vErrors.push(err0);
|
|
5548
5826
|
}
|
|
5549
5827
|
errors++;
|
|
5828
|
+
} else {
|
|
5829
|
+
if (!pattern4.test(data14)) {
|
|
5830
|
+
const err1 = { instancePath: instancePath + "/decision/supersededBy", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/supersededBy/anyOf/0/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
|
|
5831
|
+
if (vErrors === null) {
|
|
5832
|
+
vErrors = [err1];
|
|
5833
|
+
} else {
|
|
5834
|
+
vErrors.push(err1);
|
|
5835
|
+
}
|
|
5836
|
+
errors++;
|
|
5837
|
+
}
|
|
5550
5838
|
}
|
|
5551
5839
|
} else {
|
|
5552
|
-
const
|
|
5840
|
+
const err2 = { instancePath: instancePath + "/decision/supersededBy", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/supersededBy/anyOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
5553
5841
|
if (vErrors === null) {
|
|
5554
|
-
vErrors = [
|
|
5842
|
+
vErrors = [err2];
|
|
5555
5843
|
} else {
|
|
5556
|
-
vErrors.push(
|
|
5844
|
+
vErrors.push(err2);
|
|
5557
5845
|
}
|
|
5558
5846
|
errors++;
|
|
5559
5847
|
}
|
|
@@ -5562,22 +5850,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5562
5850
|
valid5 = valid5 || _valid0;
|
|
5563
5851
|
const _errs36 = errors;
|
|
5564
5852
|
if (data14 !== null) {
|
|
5565
|
-
const
|
|
5853
|
+
const err3 = { instancePath: instancePath + "/decision/supersededBy", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/supersededBy/anyOf/1/type", keyword: "type", params: { type: "null" }, message: "must be null" };
|
|
5566
5854
|
if (vErrors === null) {
|
|
5567
|
-
vErrors = [
|
|
5855
|
+
vErrors = [err3];
|
|
5568
5856
|
} else {
|
|
5569
|
-
vErrors.push(
|
|
5857
|
+
vErrors.push(err3);
|
|
5570
5858
|
}
|
|
5571
5859
|
errors++;
|
|
5572
5860
|
}
|
|
5573
5861
|
var _valid0 = _errs36 === errors;
|
|
5574
5862
|
valid5 = valid5 || _valid0;
|
|
5575
5863
|
if (!valid5) {
|
|
5576
|
-
const
|
|
5864
|
+
const err4 = { instancePath: instancePath + "/decision/supersededBy", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/decision/properties/supersededBy/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
5577
5865
|
if (vErrors === null) {
|
|
5578
|
-
vErrors = [
|
|
5866
|
+
vErrors = [err4];
|
|
5579
5867
|
} else {
|
|
5580
|
-
vErrors.push(
|
|
5868
|
+
vErrors.push(err4);
|
|
5581
5869
|
}
|
|
5582
5870
|
errors++;
|
|
5583
5871
|
validate29.errors = vErrors;
|
|
@@ -5883,6 +6171,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5883
6171
|
if (func1(data34) < 1) {
|
|
5884
6172
|
validate29.errors = [{ instancePath: instancePath + "/dependsOn/" + i4 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependsOn/items/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
5885
6173
|
return false;
|
|
6174
|
+
} else {
|
|
6175
|
+
if (!pattern4.test(data34)) {
|
|
6176
|
+
validate29.errors = [{ instancePath: instancePath + "/dependsOn/" + i4 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependsOn/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
6177
|
+
return false;
|
|
6178
|
+
}
|
|
5886
6179
|
}
|
|
5887
6180
|
} else {
|
|
5888
6181
|
validate29.errors = [{ instancePath: instancePath + "/dependsOn/" + i4 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependsOn/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
@@ -5895,10 +6188,18 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5895
6188
|
}
|
|
5896
6189
|
if (valid10) {
|
|
5897
6190
|
if (data33.shortId !== void 0) {
|
|
6191
|
+
let data35 = data33.shortId;
|
|
5898
6192
|
const _errs80 = errors;
|
|
5899
|
-
if (
|
|
5900
|
-
|
|
5901
|
-
|
|
6193
|
+
if (errors === _errs80) {
|
|
6194
|
+
if (typeof data35 === "string") {
|
|
6195
|
+
if (!pattern5.test(data35)) {
|
|
6196
|
+
validate29.errors = [{ instancePath: instancePath + "/dependsOn/" + i4 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependsOn/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
|
|
6197
|
+
return false;
|
|
6198
|
+
}
|
|
6199
|
+
} else {
|
|
6200
|
+
validate29.errors = [{ instancePath: instancePath + "/dependsOn/" + i4 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependsOn/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
6201
|
+
return false;
|
|
6202
|
+
}
|
|
5902
6203
|
}
|
|
5903
6204
|
var valid10 = _errs80 === errors;
|
|
5904
6205
|
} else {
|
|
@@ -6017,6 +6318,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6017
6318
|
if (func1(data43) < 1) {
|
|
6018
6319
|
validate29.errors = [{ instancePath: instancePath + "/dependents/" + i5 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependents/items/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
6019
6320
|
return false;
|
|
6321
|
+
} else {
|
|
6322
|
+
if (!pattern4.test(data43)) {
|
|
6323
|
+
validate29.errors = [{ instancePath: instancePath + "/dependents/" + i5 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependents/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
6324
|
+
return false;
|
|
6325
|
+
}
|
|
6020
6326
|
}
|
|
6021
6327
|
} else {
|
|
6022
6328
|
validate29.errors = [{ instancePath: instancePath + "/dependents/" + i5 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependents/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
@@ -6029,10 +6335,18 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6029
6335
|
}
|
|
6030
6336
|
if (valid12) {
|
|
6031
6337
|
if (data42.shortId !== void 0) {
|
|
6338
|
+
let data44 = data42.shortId;
|
|
6032
6339
|
const _errs99 = errors;
|
|
6033
|
-
if (
|
|
6034
|
-
|
|
6035
|
-
|
|
6340
|
+
if (errors === _errs99) {
|
|
6341
|
+
if (typeof data44 === "string") {
|
|
6342
|
+
if (!pattern5.test(data44)) {
|
|
6343
|
+
validate29.errors = [{ instancePath: instancePath + "/dependents/" + i5 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependents/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
|
|
6344
|
+
return false;
|
|
6345
|
+
}
|
|
6346
|
+
} else {
|
|
6347
|
+
validate29.errors = [{ instancePath: instancePath + "/dependents/" + i5 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/dependents/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
6348
|
+
return false;
|
|
6349
|
+
}
|
|
6036
6350
|
}
|
|
6037
6351
|
var valid12 = _errs99 === errors;
|
|
6038
6352
|
} else {
|
|
@@ -6354,22 +6668,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6354
6668
|
if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
|
|
6355
6669
|
let missing7;
|
|
6356
6670
|
if (data64.kind === void 0 && (missing7 = "kind") || data64.userId === void 0 && (missing7 = "userId") || data64.displayName === void 0 && (missing7 = "displayName")) {
|
|
6357
|
-
const
|
|
6671
|
+
const err5 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" };
|
|
6358
6672
|
if (vErrors === null) {
|
|
6359
|
-
vErrors = [
|
|
6673
|
+
vErrors = [err5];
|
|
6360
6674
|
} else {
|
|
6361
|
-
vErrors.push(
|
|
6675
|
+
vErrors.push(err5);
|
|
6362
6676
|
}
|
|
6363
6677
|
errors++;
|
|
6364
6678
|
} else {
|
|
6365
6679
|
const _errs146 = errors;
|
|
6366
6680
|
for (const key0 in data64) {
|
|
6367
6681
|
if (!(key0 === "kind" || key0 === "userId" || key0 === "displayName")) {
|
|
6368
|
-
const
|
|
6682
|
+
const err6 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
6369
6683
|
if (vErrors === null) {
|
|
6370
|
-
vErrors = [
|
|
6684
|
+
vErrors = [err6];
|
|
6371
6685
|
} else {
|
|
6372
|
-
vErrors.push(
|
|
6686
|
+
vErrors.push(err6);
|
|
6373
6687
|
}
|
|
6374
6688
|
errors++;
|
|
6375
6689
|
break;
|
|
@@ -6380,20 +6694,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6380
6694
|
let data65 = data64.kind;
|
|
6381
6695
|
const _errs147 = errors;
|
|
6382
6696
|
if (typeof data65 !== "string") {
|
|
6383
|
-
const
|
|
6697
|
+
const err7 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
6384
6698
|
if (vErrors === null) {
|
|
6385
|
-
vErrors = [
|
|
6699
|
+
vErrors = [err7];
|
|
6386
6700
|
} else {
|
|
6387
|
-
vErrors.push(
|
|
6701
|
+
vErrors.push(err7);
|
|
6388
6702
|
}
|
|
6389
6703
|
errors++;
|
|
6390
6704
|
}
|
|
6391
6705
|
if ("user" !== data65) {
|
|
6392
|
-
const
|
|
6706
|
+
const err8 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/kind/const", keyword: "const", params: { allowedValue: "user" }, message: "must be equal to constant" };
|
|
6393
6707
|
if (vErrors === null) {
|
|
6394
|
-
vErrors = [
|
|
6708
|
+
vErrors = [err8];
|
|
6395
6709
|
} else {
|
|
6396
|
-
vErrors.push(
|
|
6710
|
+
vErrors.push(err8);
|
|
6397
6711
|
}
|
|
6398
6712
|
errors++;
|
|
6399
6713
|
}
|
|
@@ -6408,20 +6722,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6408
6722
|
if (errors === _errs149) {
|
|
6409
6723
|
if (typeof data66 === "string") {
|
|
6410
6724
|
if (func1(data66) < 1) {
|
|
6411
|
-
const
|
|
6725
|
+
const err9 = { instancePath: instancePath + "/scope/users/" + i9 + "/userId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/userId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
6412
6726
|
if (vErrors === null) {
|
|
6413
|
-
vErrors = [
|
|
6727
|
+
vErrors = [err9];
|
|
6414
6728
|
} else {
|
|
6415
|
-
vErrors.push(
|
|
6729
|
+
vErrors.push(err9);
|
|
6416
6730
|
}
|
|
6417
6731
|
errors++;
|
|
6418
6732
|
}
|
|
6419
6733
|
} else {
|
|
6420
|
-
const
|
|
6734
|
+
const err10 = { instancePath: instancePath + "/scope/users/" + i9 + "/userId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/userId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
6421
6735
|
if (vErrors === null) {
|
|
6422
|
-
vErrors = [
|
|
6736
|
+
vErrors = [err10];
|
|
6423
6737
|
} else {
|
|
6424
|
-
vErrors.push(
|
|
6738
|
+
vErrors.push(err10);
|
|
6425
6739
|
}
|
|
6426
6740
|
errors++;
|
|
6427
6741
|
}
|
|
@@ -6434,11 +6748,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6434
6748
|
if (data64.displayName !== void 0) {
|
|
6435
6749
|
const _errs151 = errors;
|
|
6436
6750
|
if (typeof data64.displayName !== "string") {
|
|
6437
|
-
const
|
|
6751
|
+
const err11 = { instancePath: instancePath + "/scope/users/" + i9 + "/displayName", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/properties/displayName/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
6438
6752
|
if (vErrors === null) {
|
|
6439
|
-
vErrors = [
|
|
6753
|
+
vErrors = [err11];
|
|
6440
6754
|
} else {
|
|
6441
|
-
vErrors.push(
|
|
6755
|
+
vErrors.push(err11);
|
|
6442
6756
|
}
|
|
6443
6757
|
errors++;
|
|
6444
6758
|
}
|
|
@@ -6451,11 +6765,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6451
6765
|
}
|
|
6452
6766
|
}
|
|
6453
6767
|
} else {
|
|
6454
|
-
const
|
|
6768
|
+
const err12 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
6455
6769
|
if (vErrors === null) {
|
|
6456
|
-
vErrors = [
|
|
6770
|
+
vErrors = [err12];
|
|
6457
6771
|
} else {
|
|
6458
|
-
vErrors.push(
|
|
6772
|
+
vErrors.push(err12);
|
|
6459
6773
|
}
|
|
6460
6774
|
errors++;
|
|
6461
6775
|
}
|
|
@@ -6471,22 +6785,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6471
6785
|
if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
|
|
6472
6786
|
let missing8;
|
|
6473
6787
|
if (data64.kind === void 0 && (missing8 = "kind") || data64.role === void 0 && (missing8 = "role")) {
|
|
6474
|
-
const
|
|
6788
|
+
const err13 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
|
|
6475
6789
|
if (vErrors === null) {
|
|
6476
|
-
vErrors = [
|
|
6790
|
+
vErrors = [err13];
|
|
6477
6791
|
} else {
|
|
6478
|
-
vErrors.push(
|
|
6792
|
+
vErrors.push(err13);
|
|
6479
6793
|
}
|
|
6480
6794
|
errors++;
|
|
6481
6795
|
} else {
|
|
6482
6796
|
const _errs155 = errors;
|
|
6483
6797
|
for (const key1 in data64) {
|
|
6484
6798
|
if (!(key1 === "kind" || key1 === "role")) {
|
|
6485
|
-
const
|
|
6799
|
+
const err14 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
6486
6800
|
if (vErrors === null) {
|
|
6487
|
-
vErrors = [
|
|
6801
|
+
vErrors = [err14];
|
|
6488
6802
|
} else {
|
|
6489
|
-
vErrors.push(
|
|
6803
|
+
vErrors.push(err14);
|
|
6490
6804
|
}
|
|
6491
6805
|
errors++;
|
|
6492
6806
|
break;
|
|
@@ -6497,20 +6811,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6497
6811
|
let data68 = data64.kind;
|
|
6498
6812
|
const _errs156 = errors;
|
|
6499
6813
|
if (typeof data68 !== "string") {
|
|
6500
|
-
const
|
|
6814
|
+
const err15 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
6501
6815
|
if (vErrors === null) {
|
|
6502
|
-
vErrors = [
|
|
6816
|
+
vErrors = [err15];
|
|
6503
6817
|
} else {
|
|
6504
|
-
vErrors.push(
|
|
6818
|
+
vErrors.push(err15);
|
|
6505
6819
|
}
|
|
6506
6820
|
errors++;
|
|
6507
6821
|
}
|
|
6508
6822
|
if ("role" !== data68) {
|
|
6509
|
-
const
|
|
6823
|
+
const err16 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/properties/kind/const", keyword: "const", params: { allowedValue: "role" }, message: "must be equal to constant" };
|
|
6510
6824
|
if (vErrors === null) {
|
|
6511
|
-
vErrors = [
|
|
6825
|
+
vErrors = [err16];
|
|
6512
6826
|
} else {
|
|
6513
|
-
vErrors.push(
|
|
6827
|
+
vErrors.push(err16);
|
|
6514
6828
|
}
|
|
6515
6829
|
errors++;
|
|
6516
6830
|
}
|
|
@@ -6523,20 +6837,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6523
6837
|
let data69 = data64.role;
|
|
6524
6838
|
const _errs158 = errors;
|
|
6525
6839
|
if (typeof data69 !== "string") {
|
|
6526
|
-
const
|
|
6840
|
+
const err17 = { instancePath: instancePath + "/scope/users/" + i9 + "/role", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/properties/role/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
6527
6841
|
if (vErrors === null) {
|
|
6528
|
-
vErrors = [
|
|
6842
|
+
vErrors = [err17];
|
|
6529
6843
|
} else {
|
|
6530
|
-
vErrors.push(
|
|
6844
|
+
vErrors.push(err17);
|
|
6531
6845
|
}
|
|
6532
6846
|
errors++;
|
|
6533
6847
|
}
|
|
6534
6848
|
if (!(data69 === "owner" || data69 === "admin" || data69 === "member")) {
|
|
6535
|
-
const
|
|
6849
|
+
const err18 = { instancePath: instancePath + "/scope/users/" + i9 + "/role", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/properties/role/enum", keyword: "enum", params: { allowedValues: schema49.properties.scope.properties.users.items.oneOf[1].properties.role.enum }, message: "must be equal to one of the allowed values" };
|
|
6536
6850
|
if (vErrors === null) {
|
|
6537
|
-
vErrors = [
|
|
6851
|
+
vErrors = [err18];
|
|
6538
6852
|
} else {
|
|
6539
|
-
vErrors.push(
|
|
6853
|
+
vErrors.push(err18);
|
|
6540
6854
|
}
|
|
6541
6855
|
errors++;
|
|
6542
6856
|
}
|
|
@@ -6548,11 +6862,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6548
6862
|
}
|
|
6549
6863
|
}
|
|
6550
6864
|
} else {
|
|
6551
|
-
const
|
|
6865
|
+
const err19 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
6552
6866
|
if (vErrors === null) {
|
|
6553
|
-
vErrors = [
|
|
6867
|
+
vErrors = [err19];
|
|
6554
6868
|
} else {
|
|
6555
|
-
vErrors.push(
|
|
6869
|
+
vErrors.push(err19);
|
|
6556
6870
|
}
|
|
6557
6871
|
errors++;
|
|
6558
6872
|
}
|
|
@@ -6574,22 +6888,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6574
6888
|
if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
|
|
6575
6889
|
let missing9;
|
|
6576
6890
|
if (data64.kind === void 0 && (missing9 = "kind") || data64.agent === void 0 && (missing9 = "agent")) {
|
|
6577
|
-
const
|
|
6891
|
+
const err20 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
|
|
6578
6892
|
if (vErrors === null) {
|
|
6579
|
-
vErrors = [
|
|
6893
|
+
vErrors = [err20];
|
|
6580
6894
|
} else {
|
|
6581
|
-
vErrors.push(
|
|
6895
|
+
vErrors.push(err20);
|
|
6582
6896
|
}
|
|
6583
6897
|
errors++;
|
|
6584
6898
|
} else {
|
|
6585
6899
|
const _errs162 = errors;
|
|
6586
6900
|
for (const key2 in data64) {
|
|
6587
6901
|
if (!(key2 === "kind" || key2 === "agent")) {
|
|
6588
|
-
const
|
|
6902
|
+
const err21 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
|
|
6589
6903
|
if (vErrors === null) {
|
|
6590
|
-
vErrors = [
|
|
6904
|
+
vErrors = [err21];
|
|
6591
6905
|
} else {
|
|
6592
|
-
vErrors.push(
|
|
6906
|
+
vErrors.push(err21);
|
|
6593
6907
|
}
|
|
6594
6908
|
errors++;
|
|
6595
6909
|
break;
|
|
@@ -6600,20 +6914,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6600
6914
|
let data70 = data64.kind;
|
|
6601
6915
|
const _errs163 = errors;
|
|
6602
6916
|
if (typeof data70 !== "string") {
|
|
6603
|
-
const
|
|
6917
|
+
const err22 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
6604
6918
|
if (vErrors === null) {
|
|
6605
|
-
vErrors = [
|
|
6919
|
+
vErrors = [err22];
|
|
6606
6920
|
} else {
|
|
6607
|
-
vErrors.push(
|
|
6921
|
+
vErrors.push(err22);
|
|
6608
6922
|
}
|
|
6609
6923
|
errors++;
|
|
6610
6924
|
}
|
|
6611
6925
|
if ("agent" !== data70) {
|
|
6612
|
-
const
|
|
6926
|
+
const err23 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/properties/kind/const", keyword: "const", params: { allowedValue: "agent" }, message: "must be equal to constant" };
|
|
6613
6927
|
if (vErrors === null) {
|
|
6614
|
-
vErrors = [
|
|
6928
|
+
vErrors = [err23];
|
|
6615
6929
|
} else {
|
|
6616
|
-
vErrors.push(
|
|
6930
|
+
vErrors.push(err23);
|
|
6617
6931
|
}
|
|
6618
6932
|
errors++;
|
|
6619
6933
|
}
|
|
@@ -6626,20 +6940,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6626
6940
|
let data71 = data64.agent;
|
|
6627
6941
|
const _errs165 = errors;
|
|
6628
6942
|
if (typeof data71 !== "string") {
|
|
6629
|
-
const
|
|
6943
|
+
const err24 = { instancePath: instancePath + "/scope/users/" + i9 + "/agent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/properties/agent/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
6630
6944
|
if (vErrors === null) {
|
|
6631
|
-
vErrors = [
|
|
6945
|
+
vErrors = [err24];
|
|
6632
6946
|
} else {
|
|
6633
|
-
vErrors.push(
|
|
6947
|
+
vErrors.push(err24);
|
|
6634
6948
|
}
|
|
6635
6949
|
errors++;
|
|
6636
6950
|
}
|
|
6637
6951
|
if (!(data71 === "claude_code" || data71 === "codex" || data71 === "cursor" || data71 === "hermes")) {
|
|
6638
|
-
const
|
|
6952
|
+
const err25 = { instancePath: instancePath + "/scope/users/" + i9 + "/agent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/properties/agent/enum", keyword: "enum", params: { allowedValues: schema49.properties.scope.properties.users.items.oneOf[2].properties.agent.enum }, message: "must be equal to one of the allowed values" };
|
|
6639
6953
|
if (vErrors === null) {
|
|
6640
|
-
vErrors = [
|
|
6954
|
+
vErrors = [err25];
|
|
6641
6955
|
} else {
|
|
6642
|
-
vErrors.push(
|
|
6956
|
+
vErrors.push(err25);
|
|
6643
6957
|
}
|
|
6644
6958
|
errors++;
|
|
6645
6959
|
}
|
|
@@ -6651,11 +6965,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6651
6965
|
}
|
|
6652
6966
|
}
|
|
6653
6967
|
} else {
|
|
6654
|
-
const
|
|
6968
|
+
const err26 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
6655
6969
|
if (vErrors === null) {
|
|
6656
|
-
vErrors = [
|
|
6970
|
+
vErrors = [err26];
|
|
6657
6971
|
} else {
|
|
6658
|
-
vErrors.push(
|
|
6972
|
+
vErrors.push(err26);
|
|
6659
6973
|
}
|
|
6660
6974
|
errors++;
|
|
6661
6975
|
}
|
|
@@ -6677,22 +6991,22 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6677
6991
|
if (data64 && typeof data64 == "object" && !Array.isArray(data64)) {
|
|
6678
6992
|
let missing10;
|
|
6679
6993
|
if (data64.kind === void 0 && (missing10 = "kind") || data64.credential === void 0 && (missing10 = "credential")) {
|
|
6680
|
-
const
|
|
6994
|
+
const err27 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/required", keyword: "required", params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'" };
|
|
6681
6995
|
if (vErrors === null) {
|
|
6682
|
-
vErrors = [
|
|
6996
|
+
vErrors = [err27];
|
|
6683
6997
|
} else {
|
|
6684
|
-
vErrors.push(
|
|
6998
|
+
vErrors.push(err27);
|
|
6685
6999
|
}
|
|
6686
7000
|
errors++;
|
|
6687
7001
|
} else {
|
|
6688
7002
|
const _errs169 = errors;
|
|
6689
7003
|
for (const key3 in data64) {
|
|
6690
7004
|
if (!(key3 === "kind" || key3 === "credential")) {
|
|
6691
|
-
const
|
|
7005
|
+
const err28 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
|
|
6692
7006
|
if (vErrors === null) {
|
|
6693
|
-
vErrors = [
|
|
7007
|
+
vErrors = [err28];
|
|
6694
7008
|
} else {
|
|
6695
|
-
vErrors.push(
|
|
7009
|
+
vErrors.push(err28);
|
|
6696
7010
|
}
|
|
6697
7011
|
errors++;
|
|
6698
7012
|
break;
|
|
@@ -6703,20 +7017,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6703
7017
|
let data72 = data64.kind;
|
|
6704
7018
|
const _errs170 = errors;
|
|
6705
7019
|
if (typeof data72 !== "string") {
|
|
6706
|
-
const
|
|
7020
|
+
const err29 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
6707
7021
|
if (vErrors === null) {
|
|
6708
|
-
vErrors = [
|
|
7022
|
+
vErrors = [err29];
|
|
6709
7023
|
} else {
|
|
6710
|
-
vErrors.push(
|
|
7024
|
+
vErrors.push(err29);
|
|
6711
7025
|
}
|
|
6712
7026
|
errors++;
|
|
6713
7027
|
}
|
|
6714
7028
|
if ("credential" !== data72) {
|
|
6715
|
-
const
|
|
7029
|
+
const err30 = { instancePath: instancePath + "/scope/users/" + i9 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/properties/kind/const", keyword: "const", params: { allowedValue: "credential" }, message: "must be equal to constant" };
|
|
6716
7030
|
if (vErrors === null) {
|
|
6717
|
-
vErrors = [
|
|
7031
|
+
vErrors = [err30];
|
|
6718
7032
|
} else {
|
|
6719
|
-
vErrors.push(
|
|
7033
|
+
vErrors.push(err30);
|
|
6720
7034
|
}
|
|
6721
7035
|
errors++;
|
|
6722
7036
|
}
|
|
@@ -6729,20 +7043,20 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6729
7043
|
let data73 = data64.credential;
|
|
6730
7044
|
const _errs172 = errors;
|
|
6731
7045
|
if (typeof data73 !== "string") {
|
|
6732
|
-
const
|
|
7046
|
+
const err31 = { instancePath: instancePath + "/scope/users/" + i9 + "/credential", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/properties/credential/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
6733
7047
|
if (vErrors === null) {
|
|
6734
|
-
vErrors = [
|
|
7048
|
+
vErrors = [err31];
|
|
6735
7049
|
} else {
|
|
6736
|
-
vErrors.push(
|
|
7050
|
+
vErrors.push(err31);
|
|
6737
7051
|
}
|
|
6738
7052
|
errors++;
|
|
6739
7053
|
}
|
|
6740
7054
|
if (!(data73 === "workos_jwt" || data73 === "workos_api_key" || data73 === "service_token")) {
|
|
6741
|
-
const
|
|
7055
|
+
const err32 = { instancePath: instancePath + "/scope/users/" + i9 + "/credential", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/properties/credential/enum", keyword: "enum", params: { allowedValues: schema49.properties.scope.properties.users.items.oneOf[3].properties.credential.enum }, message: "must be equal to one of the allowed values" };
|
|
6742
7056
|
if (vErrors === null) {
|
|
6743
|
-
vErrors = [
|
|
7057
|
+
vErrors = [err32];
|
|
6744
7058
|
} else {
|
|
6745
|
-
vErrors.push(
|
|
7059
|
+
vErrors.push(err32);
|
|
6746
7060
|
}
|
|
6747
7061
|
errors++;
|
|
6748
7062
|
}
|
|
@@ -6754,11 +7068,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6754
7068
|
}
|
|
6755
7069
|
}
|
|
6756
7070
|
} else {
|
|
6757
|
-
const
|
|
7071
|
+
const err33 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf/3/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
6758
7072
|
if (vErrors === null) {
|
|
6759
|
-
vErrors = [
|
|
7073
|
+
vErrors = [err33];
|
|
6760
7074
|
} else {
|
|
6761
|
-
vErrors.push(
|
|
7075
|
+
vErrors.push(err33);
|
|
6762
7076
|
}
|
|
6763
7077
|
errors++;
|
|
6764
7078
|
}
|
|
@@ -6779,11 +7093,11 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6779
7093
|
}
|
|
6780
7094
|
}
|
|
6781
7095
|
if (!valid20) {
|
|
6782
|
-
const
|
|
7096
|
+
const err34 = { instancePath: instancePath + "/scope/users/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionDetailResponse/properties/scope/properties/users/items/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
6783
7097
|
if (vErrors === null) {
|
|
6784
|
-
vErrors = [
|
|
7098
|
+
vErrors = [err34];
|
|
6785
7099
|
} else {
|
|
6786
|
-
vErrors.push(
|
|
7100
|
+
vErrors.push(err34);
|
|
6787
7101
|
}
|
|
6788
7102
|
errors++;
|
|
6789
7103
|
validate29.errors = vErrors;
|
|
@@ -7086,7 +7400,7 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7086
7400
|
return errors === 0;
|
|
7087
7401
|
}
|
|
7088
7402
|
validate32.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
7089
|
-
var schema57 = { "type": "object", "properties": { "outcome": { "type": "string", "enum": ["linked", "already_linked", "unlinked", "not_linked"] }, "childId": { "type": "string", "minLength": 1 }, "childShortId": { "type": "string" }, "parentId": { "type": "string", "minLength": 1 }, "parentShortId": { "type": "string" } }, "required": ["outcome", "childId", "parentId"], "additionalProperties": {} };
|
|
7403
|
+
var schema57 = { "type": "object", "properties": { "outcome": { "type": "string", "enum": ["linked", "already_linked", "unlinked", "not_linked"] }, "childId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "childShortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "parentId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "parentShortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" } }, "required": ["outcome", "childId", "parentId"], "additionalProperties": {} };
|
|
7090
7404
|
function validate33(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
7091
7405
|
;
|
|
7092
7406
|
let vErrors = null;
|
|
@@ -7130,6 +7444,11 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7130
7444
|
if (func1(data1) < 1) {
|
|
7131
7445
|
validate33.errors = [{ instancePath: instancePath + "/childId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/childId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
7132
7446
|
return false;
|
|
7447
|
+
} else {
|
|
7448
|
+
if (!pattern4.test(data1)) {
|
|
7449
|
+
validate33.errors = [{ instancePath: instancePath + "/childId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/childId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
7450
|
+
return false;
|
|
7451
|
+
}
|
|
7133
7452
|
}
|
|
7134
7453
|
} else {
|
|
7135
7454
|
validate33.errors = [{ instancePath: instancePath + "/childId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/childId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
@@ -7142,10 +7461,18 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7142
7461
|
}
|
|
7143
7462
|
if (valid1) {
|
|
7144
7463
|
if (data.childShortId !== void 0) {
|
|
7464
|
+
let data2 = data.childShortId;
|
|
7145
7465
|
const _errs7 = errors;
|
|
7146
|
-
if (
|
|
7147
|
-
|
|
7148
|
-
|
|
7466
|
+
if (errors === _errs7) {
|
|
7467
|
+
if (typeof data2 === "string") {
|
|
7468
|
+
if (!pattern5.test(data2)) {
|
|
7469
|
+
validate33.errors = [{ instancePath: instancePath + "/childShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/childShortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
|
|
7470
|
+
return false;
|
|
7471
|
+
}
|
|
7472
|
+
} else {
|
|
7473
|
+
validate33.errors = [{ instancePath: instancePath + "/childShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/childShortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7474
|
+
return false;
|
|
7475
|
+
}
|
|
7149
7476
|
}
|
|
7150
7477
|
var valid1 = _errs7 === errors;
|
|
7151
7478
|
} else {
|
|
@@ -7160,6 +7487,11 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7160
7487
|
if (func1(data3) < 1) {
|
|
7161
7488
|
validate33.errors = [{ instancePath: instancePath + "/parentId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/parentId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
7162
7489
|
return false;
|
|
7490
|
+
} else {
|
|
7491
|
+
if (!pattern4.test(data3)) {
|
|
7492
|
+
validate33.errors = [{ instancePath: instancePath + "/parentId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/parentId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
7493
|
+
return false;
|
|
7494
|
+
}
|
|
7163
7495
|
}
|
|
7164
7496
|
} else {
|
|
7165
7497
|
validate33.errors = [{ instancePath: instancePath + "/parentId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/parentId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
@@ -7172,10 +7504,18 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7172
7504
|
}
|
|
7173
7505
|
if (valid1) {
|
|
7174
7506
|
if (data.parentShortId !== void 0) {
|
|
7507
|
+
let data4 = data.parentShortId;
|
|
7175
7508
|
const _errs11 = errors;
|
|
7176
|
-
if (
|
|
7177
|
-
|
|
7178
|
-
|
|
7509
|
+
if (errors === _errs11) {
|
|
7510
|
+
if (typeof data4 === "string") {
|
|
7511
|
+
if (!pattern5.test(data4)) {
|
|
7512
|
+
validate33.errors = [{ instancePath: instancePath + "/parentShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/parentShortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
|
|
7513
|
+
return false;
|
|
7514
|
+
}
|
|
7515
|
+
} else {
|
|
7516
|
+
validate33.errors = [{ instancePath: instancePath + "/parentShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRelateSuccessResponse/properties/parentShortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7517
|
+
return false;
|
|
7518
|
+
}
|
|
7179
7519
|
}
|
|
7180
7520
|
var valid1 = _errs11 === errors;
|
|
7181
7521
|
} else {
|
|
@@ -8091,7 +8431,7 @@ function validate34(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8091
8431
|
return errors === 0;
|
|
8092
8432
|
}
|
|
8093
8433
|
validate34.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
8094
|
-
var schema61 = { "anyOf": [{ "type": "object", "properties": { "outcome": { "type": "string", "const": "no_op" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 } }, "required": ["kind", "userId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "scopeWarnings": { "type": "array", "items": { "type": "string" } } }, "required": ["outcome", "stage", "scope"], "additionalProperties": {} }, { "type": "object", "properties": { "outcome": { "type": "string", "const": "ok" }, "decisionId": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 } }, "required": ["kind", "userId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "scopeWarnings": { "type": "array", "items": { "type": "string" } } }, "required": ["outcome", "decisionId", "stage", "scope"], "additionalProperties": {} }] };
|
|
8434
|
+
var schema61 = { "anyOf": [{ "type": "object", "properties": { "outcome": { "type": "string", "const": "no_op" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 } }, "required": ["kind", "userId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "scopeWarnings": { "type": "array", "items": { "type": "string" } } }, "required": ["outcome", "stage", "scope"], "additionalProperties": {} }, { "type": "object", "properties": { "outcome": { "type": "string", "const": "ok" }, "decisionId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] }, "scope": { "type": "object", "properties": { "location": { "type": "object", "properties": { "mode": { "type": "string", "enum": ["inherited", "explicit"] }, "repository": { "type": "boolean" }, "directories": { "type": "array", "items": { "type": "string" } }, "globs": { "type": "array", "items": { "type": "string" } }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["repository", "directories", "globs", "branches"], "additionalProperties": {} }, "time": { "type": "object", "properties": { "effectiveFrom": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "effectiveUntil": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": {} }, "users": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "user" }, "userId": { "type": "string", "minLength": 1 } }, "required": ["kind", "userId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "role" }, "role": { "type": "string", "enum": ["owner", "admin", "member"] } }, "required": ["kind", "role"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "agent" }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] } }, "required": ["kind", "agent"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "credential" }, "credential": { "type": "string", "enum": ["workos_jwt", "workos_api_key", "service_token"] } }, "required": ["kind", "credential"], "additionalProperties": false }] } } }, "required": ["location", "time", "users"], "additionalProperties": {} }, "scopeWarnings": { "type": "array", "items": { "type": "string" } } }, "required": ["outcome", "decisionId", "stage", "scope"], "additionalProperties": {} }] };
|
|
8095
8435
|
function validate35(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
8096
8436
|
;
|
|
8097
8437
|
let vErrors = null;
|
|
@@ -9063,13 +9403,23 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9063
9403
|
vErrors.push(err61);
|
|
9064
9404
|
}
|
|
9065
9405
|
errors++;
|
|
9406
|
+
} else {
|
|
9407
|
+
if (!pattern4.test(data28)) {
|
|
9408
|
+
const err62 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
|
|
9409
|
+
if (vErrors === null) {
|
|
9410
|
+
vErrors = [err62];
|
|
9411
|
+
} else {
|
|
9412
|
+
vErrors.push(err62);
|
|
9413
|
+
}
|
|
9414
|
+
errors++;
|
|
9415
|
+
}
|
|
9066
9416
|
}
|
|
9067
9417
|
} else {
|
|
9068
|
-
const
|
|
9418
|
+
const err63 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9069
9419
|
if (vErrors === null) {
|
|
9070
|
-
vErrors = [
|
|
9420
|
+
vErrors = [err63];
|
|
9071
9421
|
} else {
|
|
9072
|
-
vErrors.push(
|
|
9422
|
+
vErrors.push(err63);
|
|
9073
9423
|
}
|
|
9074
9424
|
errors++;
|
|
9075
9425
|
}
|
|
@@ -9080,15 +9430,28 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9080
9430
|
}
|
|
9081
9431
|
if (valid16) {
|
|
9082
9432
|
if (data.shortId !== void 0) {
|
|
9433
|
+
let data29 = data.shortId;
|
|
9083
9434
|
const _errs81 = errors;
|
|
9084
|
-
if (
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9435
|
+
if (errors === _errs81) {
|
|
9436
|
+
if (typeof data29 === "string") {
|
|
9437
|
+
if (!pattern5.test(data29)) {
|
|
9438
|
+
const err64 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
|
|
9439
|
+
if (vErrors === null) {
|
|
9440
|
+
vErrors = [err64];
|
|
9441
|
+
} else {
|
|
9442
|
+
vErrors.push(err64);
|
|
9443
|
+
}
|
|
9444
|
+
errors++;
|
|
9445
|
+
}
|
|
9088
9446
|
} else {
|
|
9089
|
-
|
|
9447
|
+
const err65 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9448
|
+
if (vErrors === null) {
|
|
9449
|
+
vErrors = [err65];
|
|
9450
|
+
} else {
|
|
9451
|
+
vErrors.push(err65);
|
|
9452
|
+
}
|
|
9453
|
+
errors++;
|
|
9090
9454
|
}
|
|
9091
|
-
errors++;
|
|
9092
9455
|
}
|
|
9093
9456
|
var valid16 = _errs81 === errors;
|
|
9094
9457
|
} else {
|
|
@@ -9099,20 +9462,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9099
9462
|
let data30 = data.stage;
|
|
9100
9463
|
const _errs83 = errors;
|
|
9101
9464
|
if (typeof data30 !== "string") {
|
|
9102
|
-
const
|
|
9465
|
+
const err66 = { instancePath: instancePath + "/stage", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/stage/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9103
9466
|
if (vErrors === null) {
|
|
9104
|
-
vErrors = [
|
|
9467
|
+
vErrors = [err66];
|
|
9105
9468
|
} else {
|
|
9106
|
-
vErrors.push(
|
|
9469
|
+
vErrors.push(err66);
|
|
9107
9470
|
}
|
|
9108
9471
|
errors++;
|
|
9109
9472
|
}
|
|
9110
9473
|
if (!(data30 === "draft" || data30 === "provisional" || data30 === "adopted" || data30 === "superseded" || data30 === "abandoned")) {
|
|
9111
|
-
const
|
|
9474
|
+
const err67 = { instancePath: instancePath + "/stage", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/stage/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.stage.enum }, message: "must be equal to one of the allowed values" };
|
|
9112
9475
|
if (vErrors === null) {
|
|
9113
|
-
vErrors = [
|
|
9476
|
+
vErrors = [err67];
|
|
9114
9477
|
} else {
|
|
9115
|
-
vErrors.push(
|
|
9478
|
+
vErrors.push(err67);
|
|
9116
9479
|
}
|
|
9117
9480
|
errors++;
|
|
9118
9481
|
}
|
|
@@ -9128,11 +9491,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9128
9491
|
if (data31 && typeof data31 == "object" && !Array.isArray(data31)) {
|
|
9129
9492
|
let missing8;
|
|
9130
9493
|
if (data31.location === void 0 && (missing8 = "location") || data31.time === void 0 && (missing8 = "time") || data31.users === void 0 && (missing8 = "users")) {
|
|
9131
|
-
const
|
|
9494
|
+
const err68 = { instancePath: instancePath + "/scope", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
|
|
9132
9495
|
if (vErrors === null) {
|
|
9133
|
-
vErrors = [
|
|
9496
|
+
vErrors = [err68];
|
|
9134
9497
|
} else {
|
|
9135
|
-
vErrors.push(
|
|
9498
|
+
vErrors.push(err68);
|
|
9136
9499
|
}
|
|
9137
9500
|
errors++;
|
|
9138
9501
|
} else {
|
|
@@ -9143,11 +9506,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9143
9506
|
if (data32 && typeof data32 == "object" && !Array.isArray(data32)) {
|
|
9144
9507
|
let missing9;
|
|
9145
9508
|
if (data32.repository === void 0 && (missing9 = "repository") || data32.directories === void 0 && (missing9 = "directories") || data32.globs === void 0 && (missing9 = "globs") || data32.branches === void 0 && (missing9 = "branches")) {
|
|
9146
|
-
const
|
|
9509
|
+
const err69 = { instancePath: instancePath + "/scope/location", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
|
|
9147
9510
|
if (vErrors === null) {
|
|
9148
|
-
vErrors = [
|
|
9511
|
+
vErrors = [err69];
|
|
9149
9512
|
} else {
|
|
9150
|
-
vErrors.push(
|
|
9513
|
+
vErrors.push(err69);
|
|
9151
9514
|
}
|
|
9152
9515
|
errors++;
|
|
9153
9516
|
} else {
|
|
@@ -9155,20 +9518,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9155
9518
|
let data33 = data32.mode;
|
|
9156
9519
|
const _errs91 = errors;
|
|
9157
9520
|
if (typeof data33 !== "string") {
|
|
9158
|
-
const
|
|
9521
|
+
const err70 = { instancePath: instancePath + "/scope/location/mode", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/mode/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9159
9522
|
if (vErrors === null) {
|
|
9160
|
-
vErrors = [
|
|
9523
|
+
vErrors = [err70];
|
|
9161
9524
|
} else {
|
|
9162
|
-
vErrors.push(
|
|
9525
|
+
vErrors.push(err70);
|
|
9163
9526
|
}
|
|
9164
9527
|
errors++;
|
|
9165
9528
|
}
|
|
9166
9529
|
if (!(data33 === "inherited" || data33 === "explicit")) {
|
|
9167
|
-
const
|
|
9530
|
+
const err71 = { instancePath: instancePath + "/scope/location/mode", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/mode/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.scope.properties.location.properties.mode.enum }, message: "must be equal to one of the allowed values" };
|
|
9168
9531
|
if (vErrors === null) {
|
|
9169
|
-
vErrors = [
|
|
9532
|
+
vErrors = [err71];
|
|
9170
9533
|
} else {
|
|
9171
|
-
vErrors.push(
|
|
9534
|
+
vErrors.push(err71);
|
|
9172
9535
|
}
|
|
9173
9536
|
errors++;
|
|
9174
9537
|
}
|
|
@@ -9180,11 +9543,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9180
9543
|
if (data32.repository !== void 0) {
|
|
9181
9544
|
const _errs93 = errors;
|
|
9182
9545
|
if (typeof data32.repository !== "boolean") {
|
|
9183
|
-
const
|
|
9546
|
+
const err72 = { instancePath: instancePath + "/scope/location/repository", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/repository/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
9184
9547
|
if (vErrors === null) {
|
|
9185
|
-
vErrors = [
|
|
9548
|
+
vErrors = [err72];
|
|
9186
9549
|
} else {
|
|
9187
|
-
vErrors.push(
|
|
9550
|
+
vErrors.push(err72);
|
|
9188
9551
|
}
|
|
9189
9552
|
errors++;
|
|
9190
9553
|
}
|
|
@@ -9203,11 +9566,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9203
9566
|
for (let i5 = 0; i5 < len5; i5++) {
|
|
9204
9567
|
const _errs97 = errors;
|
|
9205
9568
|
if (typeof data35[i5] !== "string") {
|
|
9206
|
-
const
|
|
9569
|
+
const err73 = { instancePath: instancePath + "/scope/location/directories/" + i5, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/directories/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9207
9570
|
if (vErrors === null) {
|
|
9208
|
-
vErrors = [
|
|
9571
|
+
vErrors = [err73];
|
|
9209
9572
|
} else {
|
|
9210
|
-
vErrors.push(
|
|
9573
|
+
vErrors.push(err73);
|
|
9211
9574
|
}
|
|
9212
9575
|
errors++;
|
|
9213
9576
|
}
|
|
@@ -9217,11 +9580,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9217
9580
|
}
|
|
9218
9581
|
}
|
|
9219
9582
|
} else {
|
|
9220
|
-
const
|
|
9583
|
+
const err74 = { instancePath: instancePath + "/scope/location/directories", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/directories/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
9221
9584
|
if (vErrors === null) {
|
|
9222
|
-
vErrors = [
|
|
9585
|
+
vErrors = [err74];
|
|
9223
9586
|
} else {
|
|
9224
|
-
vErrors.push(
|
|
9587
|
+
vErrors.push(err74);
|
|
9225
9588
|
}
|
|
9226
9589
|
errors++;
|
|
9227
9590
|
}
|
|
@@ -9241,11 +9604,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9241
9604
|
for (let i6 = 0; i6 < len6; i6++) {
|
|
9242
9605
|
const _errs101 = errors;
|
|
9243
9606
|
if (typeof data37[i6] !== "string") {
|
|
9244
|
-
const
|
|
9607
|
+
const err75 = { instancePath: instancePath + "/scope/location/globs/" + i6, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/globs/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9245
9608
|
if (vErrors === null) {
|
|
9246
|
-
vErrors = [
|
|
9609
|
+
vErrors = [err75];
|
|
9247
9610
|
} else {
|
|
9248
|
-
vErrors.push(
|
|
9611
|
+
vErrors.push(err75);
|
|
9249
9612
|
}
|
|
9250
9613
|
errors++;
|
|
9251
9614
|
}
|
|
@@ -9255,11 +9618,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9255
9618
|
}
|
|
9256
9619
|
}
|
|
9257
9620
|
} else {
|
|
9258
|
-
const
|
|
9621
|
+
const err76 = { instancePath: instancePath + "/scope/location/globs", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/globs/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
9259
9622
|
if (vErrors === null) {
|
|
9260
|
-
vErrors = [
|
|
9623
|
+
vErrors = [err76];
|
|
9261
9624
|
} else {
|
|
9262
|
-
vErrors.push(
|
|
9625
|
+
vErrors.push(err76);
|
|
9263
9626
|
}
|
|
9264
9627
|
errors++;
|
|
9265
9628
|
}
|
|
@@ -9279,11 +9642,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9279
9642
|
for (let i7 = 0; i7 < len7; i7++) {
|
|
9280
9643
|
const _errs105 = errors;
|
|
9281
9644
|
if (typeof data39[i7] !== "string") {
|
|
9282
|
-
const
|
|
9645
|
+
const err77 = { instancePath: instancePath + "/scope/location/branches/" + i7, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/branches/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9283
9646
|
if (vErrors === null) {
|
|
9284
|
-
vErrors = [
|
|
9647
|
+
vErrors = [err77];
|
|
9285
9648
|
} else {
|
|
9286
|
-
vErrors.push(
|
|
9649
|
+
vErrors.push(err77);
|
|
9287
9650
|
}
|
|
9288
9651
|
errors++;
|
|
9289
9652
|
}
|
|
@@ -9293,11 +9656,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9293
9656
|
}
|
|
9294
9657
|
}
|
|
9295
9658
|
} else {
|
|
9296
|
-
const
|
|
9659
|
+
const err78 = { instancePath: instancePath + "/scope/location/branches", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/properties/branches/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
9297
9660
|
if (vErrors === null) {
|
|
9298
|
-
vErrors = [
|
|
9661
|
+
vErrors = [err78];
|
|
9299
9662
|
} else {
|
|
9300
|
-
vErrors.push(
|
|
9663
|
+
vErrors.push(err78);
|
|
9301
9664
|
}
|
|
9302
9665
|
errors++;
|
|
9303
9666
|
}
|
|
@@ -9312,11 +9675,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9312
9675
|
}
|
|
9313
9676
|
}
|
|
9314
9677
|
} else {
|
|
9315
|
-
const
|
|
9678
|
+
const err79 = { instancePath: instancePath + "/scope/location", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/location/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9316
9679
|
if (vErrors === null) {
|
|
9317
|
-
vErrors = [
|
|
9680
|
+
vErrors = [err79];
|
|
9318
9681
|
} else {
|
|
9319
|
-
vErrors.push(
|
|
9682
|
+
vErrors.push(err79);
|
|
9320
9683
|
}
|
|
9321
9684
|
errors++;
|
|
9322
9685
|
}
|
|
@@ -9335,31 +9698,31 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9335
9698
|
let data42 = data41.effectiveFrom;
|
|
9336
9699
|
const _errs110 = errors;
|
|
9337
9700
|
if (!(typeof data42 == "number" && (!(data42 % 1) && !isNaN(data42)) && isFinite(data42))) {
|
|
9338
|
-
const
|
|
9701
|
+
const err80 = { instancePath: instancePath + "/scope/time/effectiveFrom", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveFrom/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
9339
9702
|
if (vErrors === null) {
|
|
9340
|
-
vErrors = [
|
|
9703
|
+
vErrors = [err80];
|
|
9341
9704
|
} else {
|
|
9342
|
-
vErrors.push(
|
|
9705
|
+
vErrors.push(err80);
|
|
9343
9706
|
}
|
|
9344
9707
|
errors++;
|
|
9345
9708
|
}
|
|
9346
9709
|
if (errors === _errs110) {
|
|
9347
9710
|
if (typeof data42 == "number" && isFinite(data42)) {
|
|
9348
9711
|
if (data42 > 9007199254740991 || isNaN(data42)) {
|
|
9349
|
-
const
|
|
9712
|
+
const err81 = { instancePath: instancePath + "/scope/time/effectiveFrom", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveFrom/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
|
|
9350
9713
|
if (vErrors === null) {
|
|
9351
|
-
vErrors = [
|
|
9714
|
+
vErrors = [err81];
|
|
9352
9715
|
} else {
|
|
9353
|
-
vErrors.push(
|
|
9716
|
+
vErrors.push(err81);
|
|
9354
9717
|
}
|
|
9355
9718
|
errors++;
|
|
9356
9719
|
} else {
|
|
9357
9720
|
if (data42 < -9007199254740991 || isNaN(data42)) {
|
|
9358
|
-
const
|
|
9721
|
+
const err82 = { instancePath: instancePath + "/scope/time/effectiveFrom", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveFrom/minimum", keyword: "minimum", params: { comparison: ">=", limit: -9007199254740991 }, message: "must be >= -9007199254740991" };
|
|
9359
9722
|
if (vErrors === null) {
|
|
9360
|
-
vErrors = [
|
|
9723
|
+
vErrors = [err82];
|
|
9361
9724
|
} else {
|
|
9362
|
-
vErrors.push(
|
|
9725
|
+
vErrors.push(err82);
|
|
9363
9726
|
}
|
|
9364
9727
|
errors++;
|
|
9365
9728
|
}
|
|
@@ -9375,31 +9738,31 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9375
9738
|
let data43 = data41.effectiveUntil;
|
|
9376
9739
|
const _errs112 = errors;
|
|
9377
9740
|
if (!(typeof data43 == "number" && (!(data43 % 1) && !isNaN(data43)) && isFinite(data43))) {
|
|
9378
|
-
const
|
|
9741
|
+
const err83 = { instancePath: instancePath + "/scope/time/effectiveUntil", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveUntil/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
9379
9742
|
if (vErrors === null) {
|
|
9380
|
-
vErrors = [
|
|
9743
|
+
vErrors = [err83];
|
|
9381
9744
|
} else {
|
|
9382
|
-
vErrors.push(
|
|
9745
|
+
vErrors.push(err83);
|
|
9383
9746
|
}
|
|
9384
9747
|
errors++;
|
|
9385
9748
|
}
|
|
9386
9749
|
if (errors === _errs112) {
|
|
9387
9750
|
if (typeof data43 == "number" && isFinite(data43)) {
|
|
9388
9751
|
if (data43 > 9007199254740991 || isNaN(data43)) {
|
|
9389
|
-
const
|
|
9752
|
+
const err84 = { instancePath: instancePath + "/scope/time/effectiveUntil", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveUntil/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
|
|
9390
9753
|
if (vErrors === null) {
|
|
9391
|
-
vErrors = [
|
|
9754
|
+
vErrors = [err84];
|
|
9392
9755
|
} else {
|
|
9393
|
-
vErrors.push(
|
|
9756
|
+
vErrors.push(err84);
|
|
9394
9757
|
}
|
|
9395
9758
|
errors++;
|
|
9396
9759
|
} else {
|
|
9397
9760
|
if (data43 < -9007199254740991 || isNaN(data43)) {
|
|
9398
|
-
const
|
|
9761
|
+
const err85 = { instancePath: instancePath + "/scope/time/effectiveUntil", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/properties/effectiveUntil/minimum", keyword: "minimum", params: { comparison: ">=", limit: -9007199254740991 }, message: "must be >= -9007199254740991" };
|
|
9399
9762
|
if (vErrors === null) {
|
|
9400
|
-
vErrors = [
|
|
9763
|
+
vErrors = [err85];
|
|
9401
9764
|
} else {
|
|
9402
|
-
vErrors.push(
|
|
9765
|
+
vErrors.push(err85);
|
|
9403
9766
|
}
|
|
9404
9767
|
errors++;
|
|
9405
9768
|
}
|
|
@@ -9412,11 +9775,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9412
9775
|
}
|
|
9413
9776
|
}
|
|
9414
9777
|
} else {
|
|
9415
|
-
const
|
|
9778
|
+
const err86 = { instancePath: instancePath + "/scope/time", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/time/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9416
9779
|
if (vErrors === null) {
|
|
9417
|
-
vErrors = [
|
|
9780
|
+
vErrors = [err86];
|
|
9418
9781
|
} else {
|
|
9419
|
-
vErrors.push(
|
|
9782
|
+
vErrors.push(err86);
|
|
9420
9783
|
}
|
|
9421
9784
|
errors++;
|
|
9422
9785
|
}
|
|
@@ -9444,22 +9807,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9444
9807
|
if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
|
|
9445
9808
|
let missing10;
|
|
9446
9809
|
if (data45.kind === void 0 && (missing10 = "kind") || data45.userId === void 0 && (missing10 = "userId")) {
|
|
9447
|
-
const
|
|
9810
|
+
const err87 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/required", keyword: "required", params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'" };
|
|
9448
9811
|
if (vErrors === null) {
|
|
9449
|
-
vErrors = [
|
|
9812
|
+
vErrors = [err87];
|
|
9450
9813
|
} else {
|
|
9451
|
-
vErrors.push(
|
|
9814
|
+
vErrors.push(err87);
|
|
9452
9815
|
}
|
|
9453
9816
|
errors++;
|
|
9454
9817
|
} else {
|
|
9455
9818
|
const _errs120 = errors;
|
|
9456
9819
|
for (const key4 in data45) {
|
|
9457
9820
|
if (!(key4 === "kind" || key4 === "userId")) {
|
|
9458
|
-
const
|
|
9821
|
+
const err88 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
|
|
9459
9822
|
if (vErrors === null) {
|
|
9460
|
-
vErrors = [
|
|
9823
|
+
vErrors = [err88];
|
|
9461
9824
|
} else {
|
|
9462
|
-
vErrors.push(
|
|
9825
|
+
vErrors.push(err88);
|
|
9463
9826
|
}
|
|
9464
9827
|
errors++;
|
|
9465
9828
|
break;
|
|
@@ -9470,20 +9833,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9470
9833
|
let data46 = data45.kind;
|
|
9471
9834
|
const _errs121 = errors;
|
|
9472
9835
|
if (typeof data46 !== "string") {
|
|
9473
|
-
const
|
|
9836
|
+
const err89 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9474
9837
|
if (vErrors === null) {
|
|
9475
|
-
vErrors = [
|
|
9838
|
+
vErrors = [err89];
|
|
9476
9839
|
} else {
|
|
9477
|
-
vErrors.push(
|
|
9840
|
+
vErrors.push(err89);
|
|
9478
9841
|
}
|
|
9479
9842
|
errors++;
|
|
9480
9843
|
}
|
|
9481
9844
|
if ("user" !== data46) {
|
|
9482
|
-
const
|
|
9845
|
+
const err90 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/properties/kind/const", keyword: "const", params: { allowedValue: "user" }, message: "must be equal to constant" };
|
|
9483
9846
|
if (vErrors === null) {
|
|
9484
|
-
vErrors = [
|
|
9847
|
+
vErrors = [err90];
|
|
9485
9848
|
} else {
|
|
9486
|
-
vErrors.push(
|
|
9849
|
+
vErrors.push(err90);
|
|
9487
9850
|
}
|
|
9488
9851
|
errors++;
|
|
9489
9852
|
}
|
|
@@ -9498,20 +9861,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9498
9861
|
if (errors === _errs123) {
|
|
9499
9862
|
if (typeof data47 === "string") {
|
|
9500
9863
|
if (func1(data47) < 1) {
|
|
9501
|
-
const
|
|
9864
|
+
const err91 = { instancePath: instancePath + "/scope/users/" + i8 + "/userId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/properties/userId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
9502
9865
|
if (vErrors === null) {
|
|
9503
|
-
vErrors = [
|
|
9866
|
+
vErrors = [err91];
|
|
9504
9867
|
} else {
|
|
9505
|
-
vErrors.push(
|
|
9868
|
+
vErrors.push(err91);
|
|
9506
9869
|
}
|
|
9507
9870
|
errors++;
|
|
9508
9871
|
}
|
|
9509
9872
|
} else {
|
|
9510
|
-
const
|
|
9873
|
+
const err92 = { instancePath: instancePath + "/scope/users/" + i8 + "/userId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/properties/userId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9511
9874
|
if (vErrors === null) {
|
|
9512
|
-
vErrors = [
|
|
9875
|
+
vErrors = [err92];
|
|
9513
9876
|
} else {
|
|
9514
|
-
vErrors.push(
|
|
9877
|
+
vErrors.push(err92);
|
|
9515
9878
|
}
|
|
9516
9879
|
errors++;
|
|
9517
9880
|
}
|
|
@@ -9524,11 +9887,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9524
9887
|
}
|
|
9525
9888
|
}
|
|
9526
9889
|
} else {
|
|
9527
|
-
const
|
|
9890
|
+
const err93 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9528
9891
|
if (vErrors === null) {
|
|
9529
|
-
vErrors = [
|
|
9892
|
+
vErrors = [err93];
|
|
9530
9893
|
} else {
|
|
9531
|
-
vErrors.push(
|
|
9894
|
+
vErrors.push(err93);
|
|
9532
9895
|
}
|
|
9533
9896
|
errors++;
|
|
9534
9897
|
}
|
|
@@ -9544,22 +9907,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9544
9907
|
if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
|
|
9545
9908
|
let missing11;
|
|
9546
9909
|
if (data45.kind === void 0 && (missing11 = "kind") || data45.role === void 0 && (missing11 = "role")) {
|
|
9547
|
-
const
|
|
9910
|
+
const err94 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/required", keyword: "required", params: { missingProperty: missing11 }, message: "must have required property '" + missing11 + "'" };
|
|
9548
9911
|
if (vErrors === null) {
|
|
9549
|
-
vErrors = [
|
|
9912
|
+
vErrors = [err94];
|
|
9550
9913
|
} else {
|
|
9551
|
-
vErrors.push(
|
|
9914
|
+
vErrors.push(err94);
|
|
9552
9915
|
}
|
|
9553
9916
|
errors++;
|
|
9554
9917
|
} else {
|
|
9555
9918
|
const _errs127 = errors;
|
|
9556
9919
|
for (const key5 in data45) {
|
|
9557
9920
|
if (!(key5 === "kind" || key5 === "role")) {
|
|
9558
|
-
const
|
|
9921
|
+
const err95 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" };
|
|
9559
9922
|
if (vErrors === null) {
|
|
9560
|
-
vErrors = [
|
|
9923
|
+
vErrors = [err95];
|
|
9561
9924
|
} else {
|
|
9562
|
-
vErrors.push(
|
|
9925
|
+
vErrors.push(err95);
|
|
9563
9926
|
}
|
|
9564
9927
|
errors++;
|
|
9565
9928
|
break;
|
|
@@ -9570,20 +9933,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9570
9933
|
let data48 = data45.kind;
|
|
9571
9934
|
const _errs128 = errors;
|
|
9572
9935
|
if (typeof data48 !== "string") {
|
|
9573
|
-
const
|
|
9936
|
+
const err96 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9574
9937
|
if (vErrors === null) {
|
|
9575
|
-
vErrors = [
|
|
9938
|
+
vErrors = [err96];
|
|
9576
9939
|
} else {
|
|
9577
|
-
vErrors.push(
|
|
9940
|
+
vErrors.push(err96);
|
|
9578
9941
|
}
|
|
9579
9942
|
errors++;
|
|
9580
9943
|
}
|
|
9581
9944
|
if ("role" !== data48) {
|
|
9582
|
-
const
|
|
9945
|
+
const err97 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/properties/kind/const", keyword: "const", params: { allowedValue: "role" }, message: "must be equal to constant" };
|
|
9583
9946
|
if (vErrors === null) {
|
|
9584
|
-
vErrors = [
|
|
9947
|
+
vErrors = [err97];
|
|
9585
9948
|
} else {
|
|
9586
|
-
vErrors.push(
|
|
9949
|
+
vErrors.push(err97);
|
|
9587
9950
|
}
|
|
9588
9951
|
errors++;
|
|
9589
9952
|
}
|
|
@@ -9596,20 +9959,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9596
9959
|
let data49 = data45.role;
|
|
9597
9960
|
const _errs130 = errors;
|
|
9598
9961
|
if (typeof data49 !== "string") {
|
|
9599
|
-
const
|
|
9962
|
+
const err98 = { instancePath: instancePath + "/scope/users/" + i8 + "/role", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/properties/role/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9600
9963
|
if (vErrors === null) {
|
|
9601
|
-
vErrors = [
|
|
9964
|
+
vErrors = [err98];
|
|
9602
9965
|
} else {
|
|
9603
|
-
vErrors.push(
|
|
9966
|
+
vErrors.push(err98);
|
|
9604
9967
|
}
|
|
9605
9968
|
errors++;
|
|
9606
9969
|
}
|
|
9607
9970
|
if (!(data49 === "owner" || data49 === "admin" || data49 === "member")) {
|
|
9608
|
-
const
|
|
9971
|
+
const err99 = { instancePath: instancePath + "/scope/users/" + i8 + "/role", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/properties/role/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.scope.properties.users.items.oneOf[1].properties.role.enum }, message: "must be equal to one of the allowed values" };
|
|
9609
9972
|
if (vErrors === null) {
|
|
9610
|
-
vErrors = [
|
|
9973
|
+
vErrors = [err99];
|
|
9611
9974
|
} else {
|
|
9612
|
-
vErrors.push(
|
|
9975
|
+
vErrors.push(err99);
|
|
9613
9976
|
}
|
|
9614
9977
|
errors++;
|
|
9615
9978
|
}
|
|
@@ -9621,11 +9984,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9621
9984
|
}
|
|
9622
9985
|
}
|
|
9623
9986
|
} else {
|
|
9624
|
-
const
|
|
9987
|
+
const err100 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9625
9988
|
if (vErrors === null) {
|
|
9626
|
-
vErrors = [
|
|
9989
|
+
vErrors = [err100];
|
|
9627
9990
|
} else {
|
|
9628
|
-
vErrors.push(
|
|
9991
|
+
vErrors.push(err100);
|
|
9629
9992
|
}
|
|
9630
9993
|
errors++;
|
|
9631
9994
|
}
|
|
@@ -9647,22 +10010,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9647
10010
|
if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
|
|
9648
10011
|
let missing12;
|
|
9649
10012
|
if (data45.kind === void 0 && (missing12 = "kind") || data45.agent === void 0 && (missing12 = "agent")) {
|
|
9650
|
-
const
|
|
10013
|
+
const err101 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/required", keyword: "required", params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'" };
|
|
9651
10014
|
if (vErrors === null) {
|
|
9652
|
-
vErrors = [
|
|
10015
|
+
vErrors = [err101];
|
|
9653
10016
|
} else {
|
|
9654
|
-
vErrors.push(
|
|
10017
|
+
vErrors.push(err101);
|
|
9655
10018
|
}
|
|
9656
10019
|
errors++;
|
|
9657
10020
|
} else {
|
|
9658
10021
|
const _errs134 = errors;
|
|
9659
10022
|
for (const key6 in data45) {
|
|
9660
10023
|
if (!(key6 === "kind" || key6 === "agent")) {
|
|
9661
|
-
const
|
|
10024
|
+
const err102 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key6 }, message: "must NOT have additional properties" };
|
|
9662
10025
|
if (vErrors === null) {
|
|
9663
|
-
vErrors = [
|
|
10026
|
+
vErrors = [err102];
|
|
9664
10027
|
} else {
|
|
9665
|
-
vErrors.push(
|
|
10028
|
+
vErrors.push(err102);
|
|
9666
10029
|
}
|
|
9667
10030
|
errors++;
|
|
9668
10031
|
break;
|
|
@@ -9673,20 +10036,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9673
10036
|
let data50 = data45.kind;
|
|
9674
10037
|
const _errs135 = errors;
|
|
9675
10038
|
if (typeof data50 !== "string") {
|
|
9676
|
-
const
|
|
10039
|
+
const err103 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9677
10040
|
if (vErrors === null) {
|
|
9678
|
-
vErrors = [
|
|
10041
|
+
vErrors = [err103];
|
|
9679
10042
|
} else {
|
|
9680
|
-
vErrors.push(
|
|
10043
|
+
vErrors.push(err103);
|
|
9681
10044
|
}
|
|
9682
10045
|
errors++;
|
|
9683
10046
|
}
|
|
9684
10047
|
if ("agent" !== data50) {
|
|
9685
|
-
const
|
|
10048
|
+
const err104 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/properties/kind/const", keyword: "const", params: { allowedValue: "agent" }, message: "must be equal to constant" };
|
|
9686
10049
|
if (vErrors === null) {
|
|
9687
|
-
vErrors = [
|
|
10050
|
+
vErrors = [err104];
|
|
9688
10051
|
} else {
|
|
9689
|
-
vErrors.push(
|
|
10052
|
+
vErrors.push(err104);
|
|
9690
10053
|
}
|
|
9691
10054
|
errors++;
|
|
9692
10055
|
}
|
|
@@ -9699,20 +10062,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9699
10062
|
let data51 = data45.agent;
|
|
9700
10063
|
const _errs137 = errors;
|
|
9701
10064
|
if (typeof data51 !== "string") {
|
|
9702
|
-
const
|
|
10065
|
+
const err105 = { instancePath: instancePath + "/scope/users/" + i8 + "/agent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/properties/agent/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9703
10066
|
if (vErrors === null) {
|
|
9704
|
-
vErrors = [
|
|
10067
|
+
vErrors = [err105];
|
|
9705
10068
|
} else {
|
|
9706
|
-
vErrors.push(
|
|
10069
|
+
vErrors.push(err105);
|
|
9707
10070
|
}
|
|
9708
10071
|
errors++;
|
|
9709
10072
|
}
|
|
9710
10073
|
if (!(data51 === "claude_code" || data51 === "codex" || data51 === "cursor" || data51 === "hermes")) {
|
|
9711
|
-
const
|
|
10074
|
+
const err106 = { instancePath: instancePath + "/scope/users/" + i8 + "/agent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/properties/agent/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.scope.properties.users.items.oneOf[2].properties.agent.enum }, message: "must be equal to one of the allowed values" };
|
|
9712
10075
|
if (vErrors === null) {
|
|
9713
|
-
vErrors = [
|
|
10076
|
+
vErrors = [err106];
|
|
9714
10077
|
} else {
|
|
9715
|
-
vErrors.push(
|
|
10078
|
+
vErrors.push(err106);
|
|
9716
10079
|
}
|
|
9717
10080
|
errors++;
|
|
9718
10081
|
}
|
|
@@ -9724,11 +10087,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9724
10087
|
}
|
|
9725
10088
|
}
|
|
9726
10089
|
} else {
|
|
9727
|
-
const
|
|
10090
|
+
const err107 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9728
10091
|
if (vErrors === null) {
|
|
9729
|
-
vErrors = [
|
|
10092
|
+
vErrors = [err107];
|
|
9730
10093
|
} else {
|
|
9731
|
-
vErrors.push(
|
|
10094
|
+
vErrors.push(err107);
|
|
9732
10095
|
}
|
|
9733
10096
|
errors++;
|
|
9734
10097
|
}
|
|
@@ -9750,22 +10113,22 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9750
10113
|
if (data45 && typeof data45 == "object" && !Array.isArray(data45)) {
|
|
9751
10114
|
let missing13;
|
|
9752
10115
|
if (data45.kind === void 0 && (missing13 = "kind") || data45.credential === void 0 && (missing13 = "credential")) {
|
|
9753
|
-
const
|
|
10116
|
+
const err108 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/required", keyword: "required", params: { missingProperty: missing13 }, message: "must have required property '" + missing13 + "'" };
|
|
9754
10117
|
if (vErrors === null) {
|
|
9755
|
-
vErrors = [
|
|
10118
|
+
vErrors = [err108];
|
|
9756
10119
|
} else {
|
|
9757
|
-
vErrors.push(
|
|
10120
|
+
vErrors.push(err108);
|
|
9758
10121
|
}
|
|
9759
10122
|
errors++;
|
|
9760
10123
|
} else {
|
|
9761
10124
|
const _errs141 = errors;
|
|
9762
10125
|
for (const key7 in data45) {
|
|
9763
10126
|
if (!(key7 === "kind" || key7 === "credential")) {
|
|
9764
|
-
const
|
|
10127
|
+
const err109 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" };
|
|
9765
10128
|
if (vErrors === null) {
|
|
9766
|
-
vErrors = [
|
|
10129
|
+
vErrors = [err109];
|
|
9767
10130
|
} else {
|
|
9768
|
-
vErrors.push(
|
|
10131
|
+
vErrors.push(err109);
|
|
9769
10132
|
}
|
|
9770
10133
|
errors++;
|
|
9771
10134
|
break;
|
|
@@ -9776,20 +10139,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9776
10139
|
let data52 = data45.kind;
|
|
9777
10140
|
const _errs142 = errors;
|
|
9778
10141
|
if (typeof data52 !== "string") {
|
|
9779
|
-
const
|
|
10142
|
+
const err110 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9780
10143
|
if (vErrors === null) {
|
|
9781
|
-
vErrors = [
|
|
10144
|
+
vErrors = [err110];
|
|
9782
10145
|
} else {
|
|
9783
|
-
vErrors.push(
|
|
10146
|
+
vErrors.push(err110);
|
|
9784
10147
|
}
|
|
9785
10148
|
errors++;
|
|
9786
10149
|
}
|
|
9787
10150
|
if ("credential" !== data52) {
|
|
9788
|
-
const
|
|
10151
|
+
const err111 = { instancePath: instancePath + "/scope/users/" + i8 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/properties/kind/const", keyword: "const", params: { allowedValue: "credential" }, message: "must be equal to constant" };
|
|
9789
10152
|
if (vErrors === null) {
|
|
9790
|
-
vErrors = [
|
|
10153
|
+
vErrors = [err111];
|
|
9791
10154
|
} else {
|
|
9792
|
-
vErrors.push(
|
|
10155
|
+
vErrors.push(err111);
|
|
9793
10156
|
}
|
|
9794
10157
|
errors++;
|
|
9795
10158
|
}
|
|
@@ -9802,20 +10165,20 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9802
10165
|
let data53 = data45.credential;
|
|
9803
10166
|
const _errs144 = errors;
|
|
9804
10167
|
if (typeof data53 !== "string") {
|
|
9805
|
-
const
|
|
10168
|
+
const err112 = { instancePath: instancePath + "/scope/users/" + i8 + "/credential", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/properties/credential/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9806
10169
|
if (vErrors === null) {
|
|
9807
|
-
vErrors = [
|
|
10170
|
+
vErrors = [err112];
|
|
9808
10171
|
} else {
|
|
9809
|
-
vErrors.push(
|
|
10172
|
+
vErrors.push(err112);
|
|
9810
10173
|
}
|
|
9811
10174
|
errors++;
|
|
9812
10175
|
}
|
|
9813
10176
|
if (!(data53 === "workos_jwt" || data53 === "workos_api_key" || data53 === "service_token")) {
|
|
9814
|
-
const
|
|
10177
|
+
const err113 = { instancePath: instancePath + "/scope/users/" + i8 + "/credential", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/properties/credential/enum", keyword: "enum", params: { allowedValues: schema61.anyOf[1].properties.scope.properties.users.items.oneOf[3].properties.credential.enum }, message: "must be equal to one of the allowed values" };
|
|
9815
10178
|
if (vErrors === null) {
|
|
9816
|
-
vErrors = [
|
|
10179
|
+
vErrors = [err113];
|
|
9817
10180
|
} else {
|
|
9818
|
-
vErrors.push(
|
|
10181
|
+
vErrors.push(err113);
|
|
9819
10182
|
}
|
|
9820
10183
|
errors++;
|
|
9821
10184
|
}
|
|
@@ -9827,11 +10190,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9827
10190
|
}
|
|
9828
10191
|
}
|
|
9829
10192
|
} else {
|
|
9830
|
-
const
|
|
10193
|
+
const err114 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf/3/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9831
10194
|
if (vErrors === null) {
|
|
9832
|
-
vErrors = [
|
|
10195
|
+
vErrors = [err114];
|
|
9833
10196
|
} else {
|
|
9834
|
-
vErrors.push(
|
|
10197
|
+
vErrors.push(err114);
|
|
9835
10198
|
}
|
|
9836
10199
|
errors++;
|
|
9837
10200
|
}
|
|
@@ -9852,11 +10215,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9852
10215
|
}
|
|
9853
10216
|
}
|
|
9854
10217
|
if (!valid24) {
|
|
9855
|
-
const
|
|
10218
|
+
const err115 = { instancePath: instancePath + "/scope/users/" + i8, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/items/oneOf", keyword: "oneOf", params: { passingSchemas: passing1 }, message: "must match exactly one schema in oneOf" };
|
|
9856
10219
|
if (vErrors === null) {
|
|
9857
|
-
vErrors = [
|
|
10220
|
+
vErrors = [err115];
|
|
9858
10221
|
} else {
|
|
9859
|
-
vErrors.push(
|
|
10222
|
+
vErrors.push(err115);
|
|
9860
10223
|
}
|
|
9861
10224
|
errors++;
|
|
9862
10225
|
} else {
|
|
@@ -9875,11 +10238,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9875
10238
|
}
|
|
9876
10239
|
}
|
|
9877
10240
|
} else {
|
|
9878
|
-
const
|
|
10241
|
+
const err116 = { instancePath: instancePath + "/scope/users", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/properties/users/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
9879
10242
|
if (vErrors === null) {
|
|
9880
|
-
vErrors = [
|
|
10243
|
+
vErrors = [err116];
|
|
9881
10244
|
} else {
|
|
9882
|
-
vErrors.push(
|
|
10245
|
+
vErrors.push(err116);
|
|
9883
10246
|
}
|
|
9884
10247
|
errors++;
|
|
9885
10248
|
}
|
|
@@ -9892,11 +10255,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9892
10255
|
}
|
|
9893
10256
|
}
|
|
9894
10257
|
} else {
|
|
9895
|
-
const
|
|
10258
|
+
const err117 = { instancePath: instancePath + "/scope", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9896
10259
|
if (vErrors === null) {
|
|
9897
|
-
vErrors = [
|
|
10260
|
+
vErrors = [err117];
|
|
9898
10261
|
} else {
|
|
9899
|
-
vErrors.push(
|
|
10262
|
+
vErrors.push(err117);
|
|
9900
10263
|
}
|
|
9901
10264
|
errors++;
|
|
9902
10265
|
}
|
|
@@ -9916,11 +10279,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9916
10279
|
for (let i9 = 0; i9 < len9; i9++) {
|
|
9917
10280
|
const _errs148 = errors;
|
|
9918
10281
|
if (typeof data54[i9] !== "string") {
|
|
9919
|
-
const
|
|
10282
|
+
const err118 = { instancePath: instancePath + "/scopeWarnings/" + i9, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scopeWarnings/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9920
10283
|
if (vErrors === null) {
|
|
9921
|
-
vErrors = [
|
|
10284
|
+
vErrors = [err118];
|
|
9922
10285
|
} else {
|
|
9923
|
-
vErrors.push(
|
|
10286
|
+
vErrors.push(err118);
|
|
9924
10287
|
}
|
|
9925
10288
|
errors++;
|
|
9926
10289
|
}
|
|
@@ -9930,11 +10293,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9930
10293
|
}
|
|
9931
10294
|
}
|
|
9932
10295
|
} else {
|
|
9933
|
-
const
|
|
10296
|
+
const err119 = { instancePath: instancePath + "/scopeWarnings", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/properties/scopeWarnings/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
9934
10297
|
if (vErrors === null) {
|
|
9935
|
-
vErrors = [
|
|
10298
|
+
vErrors = [err119];
|
|
9936
10299
|
} else {
|
|
9937
|
-
vErrors.push(
|
|
10300
|
+
vErrors.push(err119);
|
|
9938
10301
|
}
|
|
9939
10302
|
errors++;
|
|
9940
10303
|
}
|
|
@@ -9950,11 +10313,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9950
10313
|
}
|
|
9951
10314
|
}
|
|
9952
10315
|
} else {
|
|
9953
|
-
const
|
|
10316
|
+
const err120 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9954
10317
|
if (vErrors === null) {
|
|
9955
|
-
vErrors = [
|
|
10318
|
+
vErrors = [err120];
|
|
9956
10319
|
} else {
|
|
9957
|
-
vErrors.push(
|
|
10320
|
+
vErrors.push(err120);
|
|
9958
10321
|
}
|
|
9959
10322
|
errors++;
|
|
9960
10323
|
}
|
|
@@ -9967,11 +10330,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9967
10330
|
}
|
|
9968
10331
|
}
|
|
9969
10332
|
if (!valid1) {
|
|
9970
|
-
const
|
|
10333
|
+
const err121 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionRescopeResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
9971
10334
|
if (vErrors === null) {
|
|
9972
|
-
vErrors = [
|
|
10335
|
+
vErrors = [err121];
|
|
9973
10336
|
} else {
|
|
9974
|
-
vErrors.push(
|
|
10337
|
+
vErrors.push(err121);
|
|
9975
10338
|
}
|
|
9976
10339
|
errors++;
|
|
9977
10340
|
validate35.errors = vErrors;
|
|
@@ -9991,7 +10354,7 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9991
10354
|
return errors === 0;
|
|
9992
10355
|
}
|
|
9993
10356
|
validate35.evaluated = { "dynamicProps": true, "dynamicItems": false };
|
|
9994
|
-
var schema63 = { "anyOf": [{ "type": "object", "properties": { "outcome": { "type": "string", "const": "no_op" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] } }, "required": ["outcome", "stage"], "additionalProperties": {} }, { "type": "object", "properties": { "outcome": { "type": "string", "const": "ok" }, "decisionId": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] } }, "required": ["outcome", "decisionId", "stage"], "additionalProperties": {} }] };
|
|
10357
|
+
var schema63 = { "anyOf": [{ "type": "object", "properties": { "outcome": { "type": "string", "const": "no_op" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] } }, "required": ["outcome", "stage"], "additionalProperties": {} }, { "type": "object", "properties": { "outcome": { "type": "string", "const": "ok" }, "decisionId": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] } }, "required": ["outcome", "decisionId", "stage"], "additionalProperties": {} }] };
|
|
9995
10358
|
function validate36(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
9996
10359
|
;
|
|
9997
10360
|
let vErrors = null;
|
|
@@ -10138,13 +10501,23 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10138
10501
|
vErrors.push(err9);
|
|
10139
10502
|
}
|
|
10140
10503
|
errors++;
|
|
10504
|
+
} else {
|
|
10505
|
+
if (!pattern4.test(data3)) {
|
|
10506
|
+
const err10 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
|
|
10507
|
+
if (vErrors === null) {
|
|
10508
|
+
vErrors = [err10];
|
|
10509
|
+
} else {
|
|
10510
|
+
vErrors.push(err10);
|
|
10511
|
+
}
|
|
10512
|
+
errors++;
|
|
10513
|
+
}
|
|
10141
10514
|
}
|
|
10142
10515
|
} else {
|
|
10143
|
-
const
|
|
10516
|
+
const err11 = { instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10144
10517
|
if (vErrors === null) {
|
|
10145
|
-
vErrors = [
|
|
10518
|
+
vErrors = [err11];
|
|
10146
10519
|
} else {
|
|
10147
|
-
vErrors.push(
|
|
10520
|
+
vErrors.push(err11);
|
|
10148
10521
|
}
|
|
10149
10522
|
errors++;
|
|
10150
10523
|
}
|
|
@@ -10155,15 +10528,28 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10155
10528
|
}
|
|
10156
10529
|
if (valid3) {
|
|
10157
10530
|
if (data.shortId !== void 0) {
|
|
10531
|
+
let data4 = data.shortId;
|
|
10158
10532
|
const _errs16 = errors;
|
|
10159
|
-
if (
|
|
10160
|
-
|
|
10161
|
-
|
|
10162
|
-
|
|
10533
|
+
if (errors === _errs16) {
|
|
10534
|
+
if (typeof data4 === "string") {
|
|
10535
|
+
if (!pattern5.test(data4)) {
|
|
10536
|
+
const err12 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
|
|
10537
|
+
if (vErrors === null) {
|
|
10538
|
+
vErrors = [err12];
|
|
10539
|
+
} else {
|
|
10540
|
+
vErrors.push(err12);
|
|
10541
|
+
}
|
|
10542
|
+
errors++;
|
|
10543
|
+
}
|
|
10163
10544
|
} else {
|
|
10164
|
-
|
|
10545
|
+
const err13 = { instancePath: instancePath + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10546
|
+
if (vErrors === null) {
|
|
10547
|
+
vErrors = [err13];
|
|
10548
|
+
} else {
|
|
10549
|
+
vErrors.push(err13);
|
|
10550
|
+
}
|
|
10551
|
+
errors++;
|
|
10165
10552
|
}
|
|
10166
|
-
errors++;
|
|
10167
10553
|
}
|
|
10168
10554
|
var valid3 = _errs16 === errors;
|
|
10169
10555
|
} else {
|
|
@@ -10174,20 +10560,20 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10174
10560
|
let data5 = data.stage;
|
|
10175
10561
|
const _errs18 = errors;
|
|
10176
10562
|
if (typeof data5 !== "string") {
|
|
10177
|
-
const
|
|
10563
|
+
const err14 = { instancePath: instancePath + "/stage", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/stage/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10178
10564
|
if (vErrors === null) {
|
|
10179
|
-
vErrors = [
|
|
10565
|
+
vErrors = [err14];
|
|
10180
10566
|
} else {
|
|
10181
|
-
vErrors.push(
|
|
10567
|
+
vErrors.push(err14);
|
|
10182
10568
|
}
|
|
10183
10569
|
errors++;
|
|
10184
10570
|
}
|
|
10185
10571
|
if (!(data5 === "draft" || data5 === "provisional" || data5 === "adopted" || data5 === "superseded" || data5 === "abandoned")) {
|
|
10186
|
-
const
|
|
10572
|
+
const err15 = { instancePath: instancePath + "/stage", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/properties/stage/enum", keyword: "enum", params: { allowedValues: schema63.anyOf[1].properties.stage.enum }, message: "must be equal to one of the allowed values" };
|
|
10187
10573
|
if (vErrors === null) {
|
|
10188
|
-
vErrors = [
|
|
10574
|
+
vErrors = [err15];
|
|
10189
10575
|
} else {
|
|
10190
|
-
vErrors.push(
|
|
10576
|
+
vErrors.push(err15);
|
|
10191
10577
|
}
|
|
10192
10578
|
errors++;
|
|
10193
10579
|
}
|
|
@@ -10200,11 +10586,11 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10200
10586
|
}
|
|
10201
10587
|
}
|
|
10202
10588
|
} else {
|
|
10203
|
-
const
|
|
10589
|
+
const err16 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
10204
10590
|
if (vErrors === null) {
|
|
10205
|
-
vErrors = [
|
|
10591
|
+
vErrors = [err16];
|
|
10206
10592
|
} else {
|
|
10207
|
-
vErrors.push(
|
|
10593
|
+
vErrors.push(err16);
|
|
10208
10594
|
}
|
|
10209
10595
|
errors++;
|
|
10210
10596
|
}
|
|
@@ -10217,11 +10603,11 @@ function validate36(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10217
10603
|
}
|
|
10218
10604
|
}
|
|
10219
10605
|
if (!valid1) {
|
|
10220
|
-
const
|
|
10606
|
+
const err17 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionStageSuccessResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
10221
10607
|
if (vErrors === null) {
|
|
10222
|
-
vErrors = [
|
|
10608
|
+
vErrors = [err17];
|
|
10223
10609
|
} else {
|
|
10224
|
-
vErrors.push(
|
|
10610
|
+
vErrors.push(err17);
|
|
10225
10611
|
}
|
|
10226
10612
|
errors++;
|
|
10227
10613
|
validate36.errors = vErrors;
|
|
@@ -10292,7 +10678,7 @@ function validate37(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10292
10678
|
return errors === 0;
|
|
10293
10679
|
}
|
|
10294
10680
|
validate37.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
10295
|
-
var schema67 = { "type": "object", "properties": { "decisions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "intent": { "type": "string" }, "rationale": { "type": "string" }, "status": { "type": "string", "enum": ["active", "under_review"] }, "classifiedAt": { "type": "number" }, "matchedFiles": { "type": "array", "items": { "type": "string" } } }, "required": ["id", "intent", "status", "classifiedAt", "matchedFiles"], "additionalProperties": {} } }, "truncated": { "type": "boolean" }, "repoSyncId": { "type": "string" }, "unavailable": { "type": "string" } }, "required": ["decisions", "truncated"], "additionalProperties": {} };
|
|
10681
|
+
var schema67 = { "type": "object", "properties": { "decisions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "intent": { "type": "string" }, "rationale": { "type": "string" }, "status": { "type": "string", "enum": ["active", "under_review"] }, "classifiedAt": { "type": "number" }, "matchedFiles": { "type": "array", "items": { "type": "string" } } }, "required": ["id", "intent", "status", "classifiedAt", "matchedFiles"], "additionalProperties": {} } }, "truncated": { "type": "boolean" }, "repoSyncId": { "type": "string" }, "unavailable": { "type": "string" } }, "required": ["decisions", "truncated"], "additionalProperties": {} };
|
|
10296
10682
|
function validate38(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
10297
10683
|
;
|
|
10298
10684
|
let vErrors = null;
|
|
@@ -10337,6 +10723,11 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10337
10723
|
if (func1(data2) < 1) {
|
|
10338
10724
|
validate38.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsAffectingResponse/properties/decisions/items/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
10339
10725
|
return false;
|
|
10726
|
+
} else {
|
|
10727
|
+
if (!pattern4.test(data2)) {
|
|
10728
|
+
validate38.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsAffectingResponse/properties/decisions/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
10729
|
+
return false;
|
|
10730
|
+
}
|
|
10340
10731
|
}
|
|
10341
10732
|
} else {
|
|
10342
10733
|
validate38.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsAffectingResponse/properties/decisions/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
@@ -10496,7 +10887,7 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10496
10887
|
return errors === 0;
|
|
10497
10888
|
}
|
|
10498
10889
|
validate38.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
10499
|
-
var schema69 = { "type": "object", "properties": { "decisions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "shortId": { "type": "string" }, "intent": { "type": "string" }, "rationale": { "type": "string" }, "area": { "type": "string" }, "producerKind": { "type": "string" }, "isDecision": { "type": "boolean" }, "userId": { "type": "string" }, "authorName": { "type": "string" }, "authorIsSelf": { "type": "boolean" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] } }, "required": ["id", "intent", "userId", "authorName", "authorIsSelf", "classifiedAt", "status", "stage"], "additionalProperties": {} } }, "viewerHasDecisions": { "type": "boolean" }, "author": { "type": "object", "properties": { "userId": { "type": "string" }, "name": { "type": "string" } }, "required": ["userId", "name"], "additionalProperties": {} }, "authorHasDecisions": { "type": "boolean" }, "windowTotal": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "windowTotalCapped": { "type": "boolean" }, "continueCursor": { "type": "string", "minLength": 1, "maxLength": 4096 }, "isDone": { "type": "boolean" }, "unavailable": { "type": "string" } }, "required": ["decisions"], "additionalProperties": {}, "x-primitive-runtime-refinements": ["recent_response_variant"] };
|
|
10890
|
+
var schema69 = { "type": "object", "properties": { "decisions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "intent": { "type": "string" }, "rationale": { "type": "string" }, "area": { "type": "string" }, "producerKind": { "type": "string" }, "isDecision": { "type": "boolean" }, "userId": { "type": "string" }, "authorName": { "type": "string" }, "authorIsSelf": { "type": "boolean" }, "classifiedAt": { "type": "number" }, "status": { "type": "string", "enum": ["active", "superseded", "under_review"] }, "stage": { "type": "string", "enum": ["draft", "provisional", "adopted", "superseded", "abandoned"] } }, "required": ["id", "intent", "userId", "authorName", "authorIsSelf", "classifiedAt", "status", "stage"], "additionalProperties": {} } }, "viewerHasDecisions": { "type": "boolean" }, "author": { "type": "object", "properties": { "userId": { "type": "string" }, "name": { "type": "string" } }, "required": ["userId", "name"], "additionalProperties": {} }, "authorHasDecisions": { "type": "boolean" }, "windowTotal": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "windowTotalCapped": { "type": "boolean" }, "continueCursor": { "type": "string", "minLength": 1, "maxLength": 4096 }, "isDone": { "type": "boolean" }, "unavailable": { "type": "string" } }, "required": ["decisions"], "additionalProperties": {}, "x-primitive-runtime-refinements": ["recent_response_variant"] };
|
|
10500
10891
|
function validate39(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
10501
10892
|
;
|
|
10502
10893
|
let vErrors = null;
|
|
@@ -10541,6 +10932,11 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10541
10932
|
if (func1(data2) < 1) {
|
|
10542
10933
|
validate39.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsRecentResponse/properties/decisions/items/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
10543
10934
|
return false;
|
|
10935
|
+
} else {
|
|
10936
|
+
if (!pattern4.test(data2)) {
|
|
10937
|
+
validate39.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsRecentResponse/properties/decisions/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
10938
|
+
return false;
|
|
10939
|
+
}
|
|
10544
10940
|
}
|
|
10545
10941
|
} else {
|
|
10546
10942
|
validate39.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsRecentResponse/properties/decisions/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
@@ -10553,10 +10949,18 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10553
10949
|
}
|
|
10554
10950
|
if (valid3) {
|
|
10555
10951
|
if (data1.shortId !== void 0) {
|
|
10952
|
+
let data3 = data1.shortId;
|
|
10556
10953
|
const _errs11 = errors;
|
|
10557
|
-
if (
|
|
10558
|
-
|
|
10559
|
-
|
|
10954
|
+
if (errors === _errs11) {
|
|
10955
|
+
if (typeof data3 === "string") {
|
|
10956
|
+
if (!pattern5.test(data3)) {
|
|
10957
|
+
validate39.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsRecentResponse/properties/decisions/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
|
|
10958
|
+
return false;
|
|
10959
|
+
}
|
|
10960
|
+
} else {
|
|
10961
|
+
validate39.errors = [{ instancePath: instancePath + "/decisions/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DecisionsRecentResponse/properties/decisions/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
10962
|
+
return false;
|
|
10963
|
+
}
|
|
10560
10964
|
}
|
|
10561
10965
|
var valid3 = _errs11 === errors;
|
|
10562
10966
|
} else {
|
|
@@ -10891,8 +11295,8 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10891
11295
|
return errors === 0;
|
|
10892
11296
|
}
|
|
10893
11297
|
validate39.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
10894
|
-
var
|
|
10895
|
-
var
|
|
11298
|
+
var pattern34 = new RegExp("^[a-zA-Z0-9]{1,64}$", "u");
|
|
11299
|
+
var pattern35 = new RegExp("^[a-f0-9]{64}$", "u");
|
|
10896
11300
|
function validate40(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
10897
11301
|
;
|
|
10898
11302
|
let vErrors = null;
|
|
@@ -10926,7 +11330,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10926
11330
|
const _errs3 = errors;
|
|
10927
11331
|
if (errors === _errs3) {
|
|
10928
11332
|
if (typeof data0 === "string") {
|
|
10929
|
-
if (!
|
|
11333
|
+
if (!pattern34.test(data0)) {
|
|
10930
11334
|
validate40.errors = [{ instancePath: instancePath + "/runId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoCompleteRequest/properties/runId/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9]{1,64}$" }, message: 'must match pattern "^[a-zA-Z0-9]{1,64}$"' }];
|
|
10931
11335
|
return false;
|
|
10932
11336
|
}
|
|
@@ -10970,7 +11374,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10970
11374
|
const _errs7 = errors;
|
|
10971
11375
|
if (errors === _errs7) {
|
|
10972
11376
|
if (typeof data2 === "string") {
|
|
10973
|
-
if (!
|
|
11377
|
+
if (!pattern35.test(data2)) {
|
|
10974
11378
|
validate40.errors = [{ instancePath: instancePath + "/appliedDigest", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoCompleteRequest/properties/appliedDigest/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "^[a-f0-9]{64}$"' }];
|
|
10975
11379
|
return false;
|
|
10976
11380
|
}
|
|
@@ -10996,7 +11400,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10996
11400
|
return errors === 0;
|
|
10997
11401
|
}
|
|
10998
11402
|
validate40.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
10999
|
-
var
|
|
11403
|
+
var pattern38 = new RegExp("\\S", "u");
|
|
11000
11404
|
function validate41(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
11001
11405
|
;
|
|
11002
11406
|
let vErrors = null;
|
|
@@ -11043,7 +11447,7 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11043
11447
|
const _errs5 = errors;
|
|
11044
11448
|
if (errors === _errs5) {
|
|
11045
11449
|
if (typeof data0 === "string") {
|
|
11046
|
-
if (!
|
|
11450
|
+
if (!pattern34.test(data0)) {
|
|
11047
11451
|
const err2 = { instancePath: instancePath + "/runId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoResolveRequest/oneOf/0/properties/runId/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9]{1,64}$" }, message: 'must match pattern "^[a-zA-Z0-9]{1,64}$"' };
|
|
11048
11452
|
if (vErrors === null) {
|
|
11049
11453
|
vErrors = [err2];
|
|
@@ -11184,7 +11588,7 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11184
11588
|
const _errs14 = errors;
|
|
11185
11589
|
if (errors === _errs14) {
|
|
11186
11590
|
if (typeof data3 === "string") {
|
|
11187
|
-
if (!
|
|
11591
|
+
if (!pattern34.test(data3)) {
|
|
11188
11592
|
const err12 = { instancePath: instancePath + "/runId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoResolveRequest/oneOf/1/properties/runId/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9]{1,64}$" }, message: 'must match pattern "^[a-zA-Z0-9]{1,64}$"' };
|
|
11189
11593
|
if (vErrors === null) {
|
|
11190
11594
|
vErrors = [err12];
|
|
@@ -11297,7 +11701,7 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11297
11701
|
}
|
|
11298
11702
|
errors++;
|
|
11299
11703
|
} else {
|
|
11300
|
-
if (!
|
|
11704
|
+
if (!pattern38.test(data6)) {
|
|
11301
11705
|
const err21 = { instancePath: instancePath + "/reason", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoResolveRequest/oneOf/1/properties/reason/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: 'must match pattern "\\S"' };
|
|
11302
11706
|
if (vErrors === null) {
|
|
11303
11707
|
vErrors = [err21];
|
|
@@ -11408,7 +11812,7 @@ function validate42(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11408
11812
|
const _errs3 = errors;
|
|
11409
11813
|
if (errors === _errs3) {
|
|
11410
11814
|
if (typeof data0 === "string") {
|
|
11411
|
-
if (!
|
|
11815
|
+
if (!pattern34.test(data0)) {
|
|
11412
11816
|
validate42.errors = [{ instancePath: instancePath + "/runId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoRunRequest/properties/runId/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9]{1,64}$" }, message: 'must match pattern "^[a-zA-Z0-9]{1,64}$"' }];
|
|
11413
11817
|
return false;
|
|
11414
11818
|
}
|
|
@@ -11458,7 +11862,7 @@ function validate42(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11458
11862
|
return errors === 0;
|
|
11459
11863
|
}
|
|
11460
11864
|
validate42.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
11461
|
-
var
|
|
11865
|
+
var pattern40 = new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "u");
|
|
11462
11866
|
function validate43(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
11463
11867
|
;
|
|
11464
11868
|
let vErrors = null;
|
|
@@ -11509,7 +11913,7 @@ function validate43(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11509
11913
|
if (errors === _errs5) {
|
|
11510
11914
|
if (errors === _errs5) {
|
|
11511
11915
|
if (typeof data1 === "string") {
|
|
11512
|
-
if (!
|
|
11916
|
+
if (!pattern40.test(data1)) {
|
|
11513
11917
|
validate43.errors = [{ instancePath: instancePath + "/localRunId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStartRequest/properties/localRunId/pattern", keyword: "pattern", params: { pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, message: 'must match pattern "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"' }];
|
|
11514
11918
|
return false;
|
|
11515
11919
|
}
|
|
@@ -11537,7 +11941,7 @@ function validate43(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11537
11941
|
validate43.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
11538
11942
|
var schema79 = { "type": "object", "properties": { "scenarioVersion": { "type": "number", "const": 1 }, "fictional": { "type": "boolean", "const": true }, "evaluation": { "type": "string", "const": "live" }, "runId": { "type": "string", "pattern": "^[a-zA-Z0-9]{1,64}$" }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "stage": { "type": "string", "enum": ["ready", "checking", "blocked", "approved", "completed", "skipped", "expired"] }, "authorName": { "type": "string", "maxLength": 200 }, "story": { "type": "object", "properties": { "orgName": { "type": "string", "maxLength": 200 }, "recipient": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "decisionDate": { "type": "string", "maxLength": 100 } }, "required": ["orgName", "recipient", "decisionDate"], "additionalProperties": false }, "email": { "type": "string", "enum": ["not_queued", "queued", "accepted", "failed", "suppressed"] }, "verdict": { "type": "string", "enum": ["block", "pass", "pending"] }, "reasonCode": { "type": "string", "maxLength": 100 }, "choice": { "type": "string", "enum": ["adhere", "supersede"] }, "reason": { "type": "string", "maxLength": 500 }, "approvedDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": ["scenarioVersion", "fictional", "evaluation", "runId", "revision", "stage", "authorName", "story", "email"], "additionalProperties": false };
|
|
11539
11943
|
var func34 = Object.prototype.hasOwnProperty;
|
|
11540
|
-
var
|
|
11944
|
+
var pattern42 = new RegExp("^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "u");
|
|
11541
11945
|
function validate44(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
11542
11946
|
;
|
|
11543
11947
|
let vErrors = null;
|
|
@@ -11619,7 +12023,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11619
12023
|
const _errs9 = errors;
|
|
11620
12024
|
if (errors === _errs9) {
|
|
11621
12025
|
if (typeof data3 === "string") {
|
|
11622
|
-
if (!
|
|
12026
|
+
if (!pattern34.test(data3)) {
|
|
11623
12027
|
validate44.errors = [{ instancePath: instancePath + "/runId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/runId/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9]{1,64}$" }, message: 'must match pattern "^[a-zA-Z0-9]{1,64}$"' }];
|
|
11624
12028
|
return false;
|
|
11625
12029
|
}
|
|
@@ -11737,7 +12141,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11737
12141
|
if (errors === _errs22) {
|
|
11738
12142
|
if (errors === _errs22) {
|
|
11739
12143
|
if (typeof data9 === "string") {
|
|
11740
|
-
if (!
|
|
12144
|
+
if (!pattern42.test(data9)) {
|
|
11741
12145
|
validate44.errors = [{ instancePath: instancePath + "/story/recipient", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/story/properties/recipient/pattern", keyword: "pattern", params: { pattern: "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, message: `must match pattern "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"` }];
|
|
11742
12146
|
return false;
|
|
11743
12147
|
}
|
|
@@ -11875,7 +12279,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11875
12279
|
const _errs36 = errors;
|
|
11876
12280
|
if (errors === _errs36) {
|
|
11877
12281
|
if (typeof data16 === "string") {
|
|
11878
|
-
if (!
|
|
12282
|
+
if (!pattern35.test(data16)) {
|
|
11879
12283
|
validate44.errors = [{ instancePath: instancePath + "/approvedDigest", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/approvedDigest/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "^[a-f0-9]{64}$"' }];
|
|
11880
12284
|
return false;
|
|
11881
12285
|
}
|
|
@@ -12078,15 +12482,28 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12078
12482
|
}
|
|
12079
12483
|
if (valid3) {
|
|
12080
12484
|
if (data3.decisionId !== void 0) {
|
|
12485
|
+
let data8 = data3.decisionId;
|
|
12081
12486
|
const _errs22 = errors;
|
|
12082
|
-
if (
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12487
|
+
if (errors === _errs22) {
|
|
12488
|
+
if (typeof data8 === "string") {
|
|
12489
|
+
if (!pattern4.test(data8)) {
|
|
12490
|
+
const err6 = { instancePath: instancePath + "/verdictFooter/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
|
|
12491
|
+
if (vErrors === null) {
|
|
12492
|
+
vErrors = [err6];
|
|
12493
|
+
} else {
|
|
12494
|
+
vErrors.push(err6);
|
|
12495
|
+
}
|
|
12496
|
+
errors++;
|
|
12497
|
+
}
|
|
12086
12498
|
} else {
|
|
12087
|
-
|
|
12499
|
+
const err7 = { instancePath: instancePath + "/verdictFooter/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
12500
|
+
if (vErrors === null) {
|
|
12501
|
+
vErrors = [err7];
|
|
12502
|
+
} else {
|
|
12503
|
+
vErrors.push(err7);
|
|
12504
|
+
}
|
|
12505
|
+
errors++;
|
|
12088
12506
|
}
|
|
12089
|
-
errors++;
|
|
12090
12507
|
}
|
|
12091
12508
|
var valid3 = _errs22 === errors;
|
|
12092
12509
|
} else {
|
|
@@ -12094,15 +12511,28 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12094
12511
|
}
|
|
12095
12512
|
if (valid3) {
|
|
12096
12513
|
if (data3.decisionShortId !== void 0) {
|
|
12514
|
+
let data9 = data3.decisionShortId;
|
|
12097
12515
|
const _errs24 = errors;
|
|
12098
|
-
if (
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12516
|
+
if (errors === _errs24) {
|
|
12517
|
+
if (typeof data9 === "string") {
|
|
12518
|
+
if (!pattern5.test(data9)) {
|
|
12519
|
+
const err8 = { instancePath: instancePath + "/verdictFooter/decisionShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/properties/decisionShortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
|
|
12520
|
+
if (vErrors === null) {
|
|
12521
|
+
vErrors = [err8];
|
|
12522
|
+
} else {
|
|
12523
|
+
vErrors.push(err8);
|
|
12524
|
+
}
|
|
12525
|
+
errors++;
|
|
12526
|
+
}
|
|
12102
12527
|
} else {
|
|
12103
|
-
|
|
12528
|
+
const err9 = { instancePath: instancePath + "/verdictFooter/decisionShortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/properties/decisionShortId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
12529
|
+
if (vErrors === null) {
|
|
12530
|
+
vErrors = [err9];
|
|
12531
|
+
} else {
|
|
12532
|
+
vErrors.push(err9);
|
|
12533
|
+
}
|
|
12534
|
+
errors++;
|
|
12104
12535
|
}
|
|
12105
|
-
errors++;
|
|
12106
12536
|
}
|
|
12107
12537
|
var valid3 = _errs24 === errors;
|
|
12108
12538
|
} else {
|
|
@@ -12116,11 +12546,11 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12116
12546
|
}
|
|
12117
12547
|
}
|
|
12118
12548
|
} else {
|
|
12119
|
-
const
|
|
12549
|
+
const err10 = { instancePath: instancePath + "/verdictFooter", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
12120
12550
|
if (vErrors === null) {
|
|
12121
|
-
vErrors = [
|
|
12551
|
+
vErrors = [err10];
|
|
12122
12552
|
} else {
|
|
12123
|
-
vErrors.push(
|
|
12553
|
+
vErrors.push(err10);
|
|
12124
12554
|
}
|
|
12125
12555
|
errors++;
|
|
12126
12556
|
}
|
|
@@ -12129,22 +12559,22 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12129
12559
|
valid2 = valid2 || _valid0;
|
|
12130
12560
|
const _errs26 = errors;
|
|
12131
12561
|
if (data3 !== null) {
|
|
12132
|
-
const
|
|
12562
|
+
const err11 = { instancePath: instancePath + "/verdictFooter", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf/1/type", keyword: "type", params: { type: "null" }, message: "must be null" };
|
|
12133
12563
|
if (vErrors === null) {
|
|
12134
|
-
vErrors = [
|
|
12564
|
+
vErrors = [err11];
|
|
12135
12565
|
} else {
|
|
12136
|
-
vErrors.push(
|
|
12566
|
+
vErrors.push(err11);
|
|
12137
12567
|
}
|
|
12138
12568
|
errors++;
|
|
12139
12569
|
}
|
|
12140
12570
|
var _valid0 = _errs26 === errors;
|
|
12141
12571
|
valid2 = valid2 || _valid0;
|
|
12142
12572
|
if (!valid2) {
|
|
12143
|
-
const
|
|
12573
|
+
const err12 = { instancePath: instancePath + "/verdictFooter", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DurableMoveIngestResponse/properties/verdictFooter/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
12144
12574
|
if (vErrors === null) {
|
|
12145
|
-
vErrors = [
|
|
12575
|
+
vErrors = [err12];
|
|
12146
12576
|
} else {
|
|
12147
|
-
vErrors.push(
|
|
12577
|
+
vErrors.push(err12);
|
|
12148
12578
|
}
|
|
12149
12579
|
errors++;
|
|
12150
12580
|
validate45.errors = vErrors;
|
|
@@ -12778,8 +13208,7 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12778
13208
|
return errors === 0;
|
|
12779
13209
|
}
|
|
12780
13210
|
validate48.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
12781
|
-
var schema89 = { "anyOf": [{ "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "empty" }, "hasMore": { "type": "boolean", "const": false } }, "required": ["protocolVersion", "status", "hasMore"], "additionalProperties": {} }, { "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "leased" }, "events": { "minItems": 1, "maxItems": 40, "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "minLength": 1, "maxLength": 128 }, "leaseVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "decisionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "intent": { "type": "string" }, "webUrl": { "type": "string" }, "kind": { "type": "string", "enum": ["confirm_prompt", "publish_prompt"] } }, "required": ["eventId", "leaseVersion", "shortId", "intent", "webUrl"], "additionalProperties": {} } }, "hasMore": { "type": "boolean" } }, "required": ["protocolVersion", "status", "events", "hasMore"], "additionalProperties": {} }, { "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "unavailable" }, "reason": { "type": "string", "const": "organization_unbound" } }, "required": ["protocolVersion", "status", "reason"], "additionalProperties": {} }], "x-primitive-runtime-refinements": ["feedback_response_version_negotiation", "feedback_publish_prompt_decision_id", "unique_feedback_event_ids"] };
|
|
12782
|
-
var pattern14 = new RegExp("^[0-9a-f]{8}$", "u");
|
|
13211
|
+
var schema89 = { "anyOf": [{ "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "empty" }, "hasMore": { "type": "boolean", "const": false } }, "required": ["protocolVersion", "status", "hasMore"], "additionalProperties": {} }, { "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "leased" }, "events": { "minItems": 1, "maxItems": 40, "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "minLength": 1, "maxLength": 128 }, "leaseVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "decisionId": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "intent": { "type": "string" }, "webUrl": { "type": "string" }, "kind": { "type": "string", "enum": ["confirm_prompt", "publish_prompt"] } }, "required": ["eventId", "leaseVersion", "shortId", "intent", "webUrl"], "additionalProperties": {} } }, "hasMore": { "type": "boolean" } }, "required": ["protocolVersion", "status", "events", "hasMore"], "additionalProperties": {} }, { "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "unavailable" }, "reason": { "type": "string", "const": "organization_unbound" } }, "required": ["protocolVersion", "status", "reason"], "additionalProperties": {} }], "x-primitive-runtime-refinements": ["feedback_response_version_negotiation", "feedback_publish_prompt_decision_id", "unique_feedback_event_ids"] };
|
|
12783
13212
|
function validate49(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
12784
13213
|
;
|
|
12785
13214
|
let vErrors = null;
|
|
@@ -13118,7 +13547,7 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13118
13547
|
const _errs27 = errors;
|
|
13119
13548
|
if (errors === _errs27) {
|
|
13120
13549
|
if (typeof data9 === "string") {
|
|
13121
|
-
if (!
|
|
13550
|
+
if (!pattern5.test(data9)) {
|
|
13122
13551
|
const err24 = { instancePath: instancePath + "/events/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
|
|
13123
13552
|
if (vErrors === null) {
|
|
13124
13553
|
vErrors = [err24];
|
|
@@ -13164,14 +13593,24 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13164
13593
|
vErrors.push(err27);
|
|
13165
13594
|
}
|
|
13166
13595
|
errors++;
|
|
13596
|
+
} else {
|
|
13597
|
+
if (!pattern4.test(data10)) {
|
|
13598
|
+
const err28 = { instancePath: instancePath + "/events/" + i0 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' };
|
|
13599
|
+
if (vErrors === null) {
|
|
13600
|
+
vErrors = [err28];
|
|
13601
|
+
} else {
|
|
13602
|
+
vErrors.push(err28);
|
|
13603
|
+
}
|
|
13604
|
+
errors++;
|
|
13605
|
+
}
|
|
13167
13606
|
}
|
|
13168
13607
|
}
|
|
13169
13608
|
} else {
|
|
13170
|
-
const
|
|
13609
|
+
const err29 = { instancePath: instancePath + "/events/" + i0 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
13171
13610
|
if (vErrors === null) {
|
|
13172
|
-
vErrors = [
|
|
13611
|
+
vErrors = [err29];
|
|
13173
13612
|
} else {
|
|
13174
|
-
vErrors.push(
|
|
13613
|
+
vErrors.push(err29);
|
|
13175
13614
|
}
|
|
13176
13615
|
errors++;
|
|
13177
13616
|
}
|
|
@@ -13184,11 +13623,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13184
13623
|
if (data6.intent !== void 0) {
|
|
13185
13624
|
const _errs31 = errors;
|
|
13186
13625
|
if (typeof data6.intent !== "string") {
|
|
13187
|
-
const
|
|
13626
|
+
const err30 = { instancePath: instancePath + "/events/" + i0 + "/intent", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/intent/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
13188
13627
|
if (vErrors === null) {
|
|
13189
|
-
vErrors = [
|
|
13628
|
+
vErrors = [err30];
|
|
13190
13629
|
} else {
|
|
13191
|
-
vErrors.push(
|
|
13630
|
+
vErrors.push(err30);
|
|
13192
13631
|
}
|
|
13193
13632
|
errors++;
|
|
13194
13633
|
}
|
|
@@ -13200,11 +13639,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13200
13639
|
if (data6.webUrl !== void 0) {
|
|
13201
13640
|
const _errs33 = errors;
|
|
13202
13641
|
if (typeof data6.webUrl !== "string") {
|
|
13203
|
-
const
|
|
13642
|
+
const err31 = { instancePath: instancePath + "/events/" + i0 + "/webUrl", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/webUrl/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
13204
13643
|
if (vErrors === null) {
|
|
13205
|
-
vErrors = [
|
|
13644
|
+
vErrors = [err31];
|
|
13206
13645
|
} else {
|
|
13207
|
-
vErrors.push(
|
|
13646
|
+
vErrors.push(err31);
|
|
13208
13647
|
}
|
|
13209
13648
|
errors++;
|
|
13210
13649
|
}
|
|
@@ -13217,20 +13656,20 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13217
13656
|
let data13 = data6.kind;
|
|
13218
13657
|
const _errs35 = errors;
|
|
13219
13658
|
if (typeof data13 !== "string") {
|
|
13220
|
-
const
|
|
13659
|
+
const err32 = { instancePath: instancePath + "/events/" + i0 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
13221
13660
|
if (vErrors === null) {
|
|
13222
|
-
vErrors = [
|
|
13661
|
+
vErrors = [err32];
|
|
13223
13662
|
} else {
|
|
13224
|
-
vErrors.push(
|
|
13663
|
+
vErrors.push(err32);
|
|
13225
13664
|
}
|
|
13226
13665
|
errors++;
|
|
13227
13666
|
}
|
|
13228
13667
|
if (!(data13 === "confirm_prompt" || data13 === "publish_prompt")) {
|
|
13229
|
-
const
|
|
13668
|
+
const err33 = { instancePath: instancePath + "/events/" + i0 + "/kind", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/kind/enum", keyword: "enum", params: { allowedValues: schema89.anyOf[1].properties.events.items.properties.kind.enum }, message: "must be equal to one of the allowed values" };
|
|
13230
13669
|
if (vErrors === null) {
|
|
13231
|
-
vErrors = [
|
|
13670
|
+
vErrors = [err33];
|
|
13232
13671
|
} else {
|
|
13233
|
-
vErrors.push(
|
|
13672
|
+
vErrors.push(err33);
|
|
13234
13673
|
}
|
|
13235
13674
|
errors++;
|
|
13236
13675
|
}
|
|
@@ -13246,11 +13685,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13246
13685
|
}
|
|
13247
13686
|
}
|
|
13248
13687
|
} else {
|
|
13249
|
-
const
|
|
13688
|
+
const err34 = { instancePath: instancePath + "/events/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
13250
13689
|
if (vErrors === null) {
|
|
13251
|
-
vErrors = [
|
|
13690
|
+
vErrors = [err34];
|
|
13252
13691
|
} else {
|
|
13253
|
-
vErrors.push(
|
|
13692
|
+
vErrors.push(err34);
|
|
13254
13693
|
}
|
|
13255
13694
|
errors++;
|
|
13256
13695
|
}
|
|
@@ -13263,11 +13702,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13263
13702
|
}
|
|
13264
13703
|
}
|
|
13265
13704
|
} else {
|
|
13266
|
-
const
|
|
13705
|
+
const err35 = { instancePath: instancePath + "/events", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
13267
13706
|
if (vErrors === null) {
|
|
13268
|
-
vErrors = [
|
|
13707
|
+
vErrors = [err35];
|
|
13269
13708
|
} else {
|
|
13270
|
-
vErrors.push(
|
|
13709
|
+
vErrors.push(err35);
|
|
13271
13710
|
}
|
|
13272
13711
|
errors++;
|
|
13273
13712
|
}
|
|
@@ -13280,11 +13719,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13280
13719
|
if (data.hasMore !== void 0) {
|
|
13281
13720
|
const _errs37 = errors;
|
|
13282
13721
|
if (typeof data.hasMore !== "boolean") {
|
|
13283
|
-
const
|
|
13722
|
+
const err36 = { instancePath: instancePath + "/hasMore", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/hasMore/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
13284
13723
|
if (vErrors === null) {
|
|
13285
|
-
vErrors = [
|
|
13724
|
+
vErrors = [err36];
|
|
13286
13725
|
} else {
|
|
13287
|
-
vErrors.push(
|
|
13726
|
+
vErrors.push(err36);
|
|
13288
13727
|
}
|
|
13289
13728
|
errors++;
|
|
13290
13729
|
}
|
|
@@ -13297,11 +13736,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13297
13736
|
}
|
|
13298
13737
|
}
|
|
13299
13738
|
} else {
|
|
13300
|
-
const
|
|
13739
|
+
const err37 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
13301
13740
|
if (vErrors === null) {
|
|
13302
|
-
vErrors = [
|
|
13741
|
+
vErrors = [err37];
|
|
13303
13742
|
} else {
|
|
13304
|
-
vErrors.push(
|
|
13743
|
+
vErrors.push(err37);
|
|
13305
13744
|
}
|
|
13306
13745
|
errors++;
|
|
13307
13746
|
}
|
|
@@ -13318,11 +13757,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13318
13757
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
13319
13758
|
let missing3;
|
|
13320
13759
|
if (data.protocolVersion === void 0 && (missing3 = "protocolVersion") || data.status === void 0 && (missing3 = "status") || data.reason === void 0 && (missing3 = "reason")) {
|
|
13321
|
-
const
|
|
13760
|
+
const err38 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
|
|
13322
13761
|
if (vErrors === null) {
|
|
13323
|
-
vErrors = [
|
|
13762
|
+
vErrors = [err38];
|
|
13324
13763
|
} else {
|
|
13325
|
-
vErrors.push(
|
|
13764
|
+
vErrors.push(err38);
|
|
13326
13765
|
}
|
|
13327
13766
|
errors++;
|
|
13328
13767
|
} else {
|
|
@@ -13330,31 +13769,31 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13330
13769
|
let data15 = data.protocolVersion;
|
|
13331
13770
|
const _errs42 = errors;
|
|
13332
13771
|
if (!(typeof data15 == "number" && (!(data15 % 1) && !isNaN(data15)) && isFinite(data15))) {
|
|
13333
|
-
const
|
|
13772
|
+
const err39 = { instancePath: instancePath + "/protocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/protocolVersion/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
13334
13773
|
if (vErrors === null) {
|
|
13335
|
-
vErrors = [
|
|
13774
|
+
vErrors = [err39];
|
|
13336
13775
|
} else {
|
|
13337
|
-
vErrors.push(
|
|
13776
|
+
vErrors.push(err39);
|
|
13338
13777
|
}
|
|
13339
13778
|
errors++;
|
|
13340
13779
|
}
|
|
13341
13780
|
if (errors === _errs42) {
|
|
13342
13781
|
if (typeof data15 == "number" && isFinite(data15)) {
|
|
13343
13782
|
if (data15 > 2 || isNaN(data15)) {
|
|
13344
|
-
const
|
|
13783
|
+
const err40 = { instancePath: instancePath + "/protocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/protocolVersion/maximum", keyword: "maximum", params: { comparison: "<=", limit: 2 }, message: "must be <= 2" };
|
|
13345
13784
|
if (vErrors === null) {
|
|
13346
|
-
vErrors = [
|
|
13785
|
+
vErrors = [err40];
|
|
13347
13786
|
} else {
|
|
13348
|
-
vErrors.push(
|
|
13787
|
+
vErrors.push(err40);
|
|
13349
13788
|
}
|
|
13350
13789
|
errors++;
|
|
13351
13790
|
} else {
|
|
13352
13791
|
if (data15 < 1 || isNaN(data15)) {
|
|
13353
|
-
const
|
|
13792
|
+
const err41 = { instancePath: instancePath + "/protocolVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/protocolVersion/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
|
|
13354
13793
|
if (vErrors === null) {
|
|
13355
|
-
vErrors = [
|
|
13794
|
+
vErrors = [err41];
|
|
13356
13795
|
} else {
|
|
13357
|
-
vErrors.push(
|
|
13796
|
+
vErrors.push(err41);
|
|
13358
13797
|
}
|
|
13359
13798
|
errors++;
|
|
13360
13799
|
}
|
|
@@ -13370,20 +13809,20 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13370
13809
|
let data16 = data.status;
|
|
13371
13810
|
const _errs44 = errors;
|
|
13372
13811
|
if (typeof data16 !== "string") {
|
|
13373
|
-
const
|
|
13812
|
+
const err42 = { instancePath: instancePath + "/status", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/status/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
13374
13813
|
if (vErrors === null) {
|
|
13375
|
-
vErrors = [
|
|
13814
|
+
vErrors = [err42];
|
|
13376
13815
|
} else {
|
|
13377
|
-
vErrors.push(
|
|
13816
|
+
vErrors.push(err42);
|
|
13378
13817
|
}
|
|
13379
13818
|
errors++;
|
|
13380
13819
|
}
|
|
13381
13820
|
if ("unavailable" !== data16) {
|
|
13382
|
-
const
|
|
13821
|
+
const err43 = { instancePath: instancePath + "/status", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/status/const", keyword: "const", params: { allowedValue: "unavailable" }, message: "must be equal to constant" };
|
|
13383
13822
|
if (vErrors === null) {
|
|
13384
|
-
vErrors = [
|
|
13823
|
+
vErrors = [err43];
|
|
13385
13824
|
} else {
|
|
13386
|
-
vErrors.push(
|
|
13825
|
+
vErrors.push(err43);
|
|
13387
13826
|
}
|
|
13388
13827
|
errors++;
|
|
13389
13828
|
}
|
|
@@ -13396,20 +13835,20 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13396
13835
|
let data17 = data.reason;
|
|
13397
13836
|
const _errs46 = errors;
|
|
13398
13837
|
if (typeof data17 !== "string") {
|
|
13399
|
-
const
|
|
13838
|
+
const err44 = { instancePath: instancePath + "/reason", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/reason/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
13400
13839
|
if (vErrors === null) {
|
|
13401
|
-
vErrors = [
|
|
13840
|
+
vErrors = [err44];
|
|
13402
13841
|
} else {
|
|
13403
|
-
vErrors.push(
|
|
13842
|
+
vErrors.push(err44);
|
|
13404
13843
|
}
|
|
13405
13844
|
errors++;
|
|
13406
13845
|
}
|
|
13407
13846
|
if ("organization_unbound" !== data17) {
|
|
13408
|
-
const
|
|
13847
|
+
const err45 = { instancePath: instancePath + "/reason", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/properties/reason/const", keyword: "const", params: { allowedValue: "organization_unbound" }, message: "must be equal to constant" };
|
|
13409
13848
|
if (vErrors === null) {
|
|
13410
|
-
vErrors = [
|
|
13849
|
+
vErrors = [err45];
|
|
13411
13850
|
} else {
|
|
13412
|
-
vErrors.push(
|
|
13851
|
+
vErrors.push(err45);
|
|
13413
13852
|
}
|
|
13414
13853
|
errors++;
|
|
13415
13854
|
}
|
|
@@ -13421,11 +13860,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13421
13860
|
}
|
|
13422
13861
|
}
|
|
13423
13862
|
} else {
|
|
13424
|
-
const
|
|
13863
|
+
const err46 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
13425
13864
|
if (vErrors === null) {
|
|
13426
|
-
vErrors = [
|
|
13865
|
+
vErrors = [err46];
|
|
13427
13866
|
} else {
|
|
13428
|
-
vErrors.push(
|
|
13867
|
+
vErrors.push(err46);
|
|
13429
13868
|
}
|
|
13430
13869
|
errors++;
|
|
13431
13870
|
}
|
|
@@ -13438,11 +13877,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13438
13877
|
}
|
|
13439
13878
|
}
|
|
13440
13879
|
if (!valid1) {
|
|
13441
|
-
const
|
|
13880
|
+
const err47 = { instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
13442
13881
|
if (vErrors === null) {
|
|
13443
|
-
vErrors = [
|
|
13882
|
+
vErrors = [err47];
|
|
13444
13883
|
} else {
|
|
13445
|
-
vErrors.push(
|
|
13884
|
+
vErrors.push(err47);
|
|
13446
13885
|
}
|
|
13447
13886
|
errors++;
|
|
13448
13887
|
validate49.errors = vErrors;
|
|
@@ -14174,8 +14613,8 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14174
14613
|
return errors === 0;
|
|
14175
14614
|
}
|
|
14176
14615
|
validate51.evaluated = { "dynamicProps": true, "dynamicItems": false };
|
|
14177
|
-
var
|
|
14178
|
-
var
|
|
14616
|
+
var pattern48 = new RegExp("^[A-Za-z0-9]{1,128}$", "u");
|
|
14617
|
+
var pattern49 = new RegExp("^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$", "u");
|
|
14179
14618
|
function validate52(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
14180
14619
|
;
|
|
14181
14620
|
let vErrors = null;
|
|
@@ -14257,7 +14696,7 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14257
14696
|
const _errs9 = errors;
|
|
14258
14697
|
if (errors === _errs9) {
|
|
14259
14698
|
if (typeof data3 === "string") {
|
|
14260
|
-
if (!
|
|
14699
|
+
if (!pattern48.test(data3)) {
|
|
14261
14700
|
validate52.errors = [{ instancePath: instancePath + "/intentId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartResponse/properties/intentId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9]{1,128}$"' }];
|
|
14262
14701
|
return false;
|
|
14263
14702
|
}
|
|
@@ -14276,7 +14715,7 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14276
14715
|
const _errs11 = errors;
|
|
14277
14716
|
if (errors === _errs11) {
|
|
14278
14717
|
if (typeof data4 === "string") {
|
|
14279
|
-
if (!
|
|
14718
|
+
if (!pattern49.test(data4)) {
|
|
14280
14719
|
validate52.errors = [{ instancePath: instancePath + "/browserUrl", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartResponse/properties/browserUrl/pattern", keyword: "pattern", params: { pattern: "^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$" }, message: 'must match pattern "^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$"' }];
|
|
14281
14720
|
return false;
|
|
14282
14721
|
}
|
|
@@ -14684,7 +15123,7 @@ function validate54(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14684
15123
|
const _errs3 = errors;
|
|
14685
15124
|
if (errors === _errs3) {
|
|
14686
15125
|
if (typeof data0 === "string") {
|
|
14687
|
-
if (!
|
|
15126
|
+
if (!pattern48.test(data0)) {
|
|
14688
15127
|
validate54.errors = [{ instancePath: instancePath + "/intentId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStatusRequest/properties/intentId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9]{1,128}$"' }];
|
|
14689
15128
|
return false;
|
|
14690
15129
|
}
|
|
@@ -16257,7 +16696,7 @@ function validate55(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
16257
16696
|
validate55.evaluated = { "dynamicProps": true, "dynamicItems": false };
|
|
16258
16697
|
var isMoveIngestRequest = validate56;
|
|
16259
16698
|
var schema103 = { "type": "object", "properties": { "batch": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "moveId": { "type": "string" }, "capturedAt": { "type": "number" }, "sessionId": { "type": "string" }, "invocationId": { "type": "string" }, "eventType": { "type": "string" }, "payload": {}, "env": {}, "repositoryContext": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "repository_bound" }, "repoSyncId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["kind", "repoSyncId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "non_repository" } }, "required": ["kind"], "additionalProperties": false }] }, "capturedOrganizationId": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9_-]+$" }, "captureAuthorityKind": { "type": "string", "enum": ["workos", "service_token"] }, "decisionLifecycleProtocolVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "producer": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] }, "toolOutcome": { "type": "string", "enum": ["succeeded", "returned", "failed", "interrupted", "prevented", "unknown"] }, "envelopeVersion": { "type": "number", "const": 4 } }, "required": ["moveId", "capturedAt", "sessionId", "eventType", "capturedOrganizationId", "captureAuthorityKind", "decisionLifecycleProtocolVersion", "envelopeVersion"], "additionalProperties": {} }, { "type": "object", "properties": { "moveId": { "type": "string" }, "capturedAt": { "type": "number" }, "sessionId": { "type": "string" }, "invocationId": { "type": "string" }, "eventType": { "type": "string" }, "payload": {}, "env": {}, "repositoryContext": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "repository_bound" }, "repoSyncId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["kind", "repoSyncId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "non_repository" } }, "required": ["kind"], "additionalProperties": false }] }, "capturedOrganizationId": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9_-]+$" }, "captureAuthorityKind": { "type": "string", "enum": ["workos", "service_token"] }, "decisionLifecycleProtocolVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "producer": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] }, "toolOutcome": { "type": "string", "enum": ["succeeded", "returned", "failed", "interrupted", "prevented", "unknown"] }, "envelopeVersion": { "type": "number", "exclusiveMaximum": 4 } }, "required": ["moveId", "capturedAt", "sessionId", "eventType"], "additionalProperties": {} }] } } }, "required": ["batch"], "additionalProperties": {} };
|
|
16260
|
-
var
|
|
16699
|
+
var pattern51 = new RegExp("^[A-Za-z0-9_-]+$", "u");
|
|
16261
16700
|
function validate56(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
16262
16701
|
;
|
|
16263
16702
|
let vErrors = null;
|
|
@@ -16618,7 +17057,7 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
16618
17057
|
}
|
|
16619
17058
|
errors++;
|
|
16620
17059
|
} else {
|
|
16621
|
-
if (!
|
|
17060
|
+
if (!pattern51.test(data11)) {
|
|
16622
17061
|
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_-]+$"' };
|
|
16623
17062
|
if (vErrors === null) {
|
|
16624
17063
|
vErrors = [err22];
|
|
@@ -17143,7 +17582,7 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17143
17582
|
}
|
|
17144
17583
|
errors++;
|
|
17145
17584
|
} else {
|
|
17146
|
-
if (!
|
|
17585
|
+
if (!pattern51.test(data26)) {
|
|
17147
17586
|
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_-]+$"' };
|
|
17148
17587
|
if (vErrors === null) {
|
|
17149
17588
|
vErrors = [err58];
|
|
@@ -17386,10 +17825,10 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17386
17825
|
}
|
|
17387
17826
|
validate56.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
17388
17827
|
var schema105 = { "type": "object", "properties": { "protocolVersion": { "type": "number", "const": 3 }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] }, "sessionId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "invocationId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "repoSyncId": { "type": "string", "pattern": "^[A-Za-z0-9]{1,64}$" }, "paths": { "maxItems": 32, "type": "array", "items": { "type": "string" } }, "coverage": { "type": "string", "enum": ["complete", "unverified"] }, "branch": { "type": "string", "maxLength": 255, "pattern": "^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$" }, "clientMode": { "type": "string", "enum": ["block", "warn"] }, "clientVersion": { "type": "string", "maxLength": 32, "pattern": "^[A-Za-z0-9][A-Za-z0-9._+-]*$" }, "proposal": { "type": "string" } }, "required": ["protocolVersion", "agent", "sessionId", "invocationId", "repoSyncId", "paths", "coverage", "proposal"], "additionalProperties": false, "x-primitive-runtime-refinements": ["canonical_repository_paths", "unique_repository_paths", "complete_coverage_requires_path", "proposal_utf8_max_6144", "degrade_invalid_rollout_fields", "degrade_invalid_branch"] };
|
|
17389
|
-
var
|
|
17390
|
-
var
|
|
17391
|
-
var
|
|
17392
|
-
var
|
|
17828
|
+
var pattern53 = new RegExp("^[A-Za-z0-9._:-]{1,128}$", "u");
|
|
17829
|
+
var pattern55 = new RegExp("^[A-Za-z0-9]{1,64}$", "u");
|
|
17830
|
+
var pattern56 = new RegExp("^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$", "u");
|
|
17831
|
+
var pattern57 = new RegExp("^[A-Za-z0-9][A-Za-z0-9._+-]*$", "u");
|
|
17393
17832
|
function validate57(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
17394
17833
|
;
|
|
17395
17834
|
let vErrors = null;
|
|
@@ -17455,7 +17894,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17455
17894
|
const _errs8 = errors;
|
|
17456
17895
|
if (errors === _errs8) {
|
|
17457
17896
|
if (typeof data2 === "string") {
|
|
17458
|
-
if (!
|
|
17897
|
+
if (!pattern53.test(data2)) {
|
|
17459
17898
|
validate57.errors = [{ instancePath: instancePath + "/sessionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/sessionId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9._:-]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9._:-]{1,128}$"' }];
|
|
17460
17899
|
return false;
|
|
17461
17900
|
}
|
|
@@ -17474,7 +17913,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17474
17913
|
const _errs10 = errors;
|
|
17475
17914
|
if (errors === _errs10) {
|
|
17476
17915
|
if (typeof data3 === "string") {
|
|
17477
|
-
if (!
|
|
17916
|
+
if (!pattern53.test(data3)) {
|
|
17478
17917
|
validate57.errors = [{ instancePath: instancePath + "/invocationId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/invocationId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9._:-]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9._:-]{1,128}$"' }];
|
|
17479
17918
|
return false;
|
|
17480
17919
|
}
|
|
@@ -17493,7 +17932,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17493
17932
|
const _errs12 = errors;
|
|
17494
17933
|
if (errors === _errs12) {
|
|
17495
17934
|
if (typeof data4 === "string") {
|
|
17496
|
-
if (!
|
|
17935
|
+
if (!pattern55.test(data4)) {
|
|
17497
17936
|
validate57.errors = [{ instancePath: instancePath + "/repoSyncId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/repoSyncId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9]{1,64}$" }, message: 'must match pattern "^[A-Za-z0-9]{1,64}$"' }];
|
|
17498
17937
|
return false;
|
|
17499
17938
|
}
|
|
@@ -17565,7 +18004,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17565
18004
|
validate57.errors = [{ instancePath: instancePath + "/branch", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/branch/maxLength", keyword: "maxLength", params: { limit: 255 }, message: "must NOT have more than 255 characters" }];
|
|
17566
18005
|
return false;
|
|
17567
18006
|
} else {
|
|
17568
|
-
if (!
|
|
18007
|
+
if (!pattern56.test(data8)) {
|
|
17569
18008
|
validate57.errors = [{ instancePath: instancePath + "/branch", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/branch/pattern", keyword: "pattern", params: { pattern: "^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$" }, message: 'must match pattern "^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$"' }];
|
|
17570
18009
|
return false;
|
|
17571
18010
|
}
|
|
@@ -17605,7 +18044,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17605
18044
|
validate57.errors = [{ instancePath: instancePath + "/clientVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/clientVersion/maxLength", keyword: "maxLength", params: { limit: 32 }, message: "must NOT have more than 32 characters" }];
|
|
17606
18045
|
return false;
|
|
17607
18046
|
} else {
|
|
17608
|
-
if (!
|
|
18047
|
+
if (!pattern57.test(data10)) {
|
|
17609
18048
|
validate57.errors = [{ instancePath: instancePath + "/clientVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/clientVersion/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9][A-Za-z0-9._+-]*$" }, message: 'must match pattern "^[A-Za-z0-9][A-Za-z0-9._+-]*$"' }];
|
|
17610
18049
|
return false;
|
|
17611
18050
|
}
|
|
@@ -17651,7 +18090,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17651
18090
|
return errors === 0;
|
|
17652
18091
|
}
|
|
17653
18092
|
validate57.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
17654
|
-
var schema107 = { "type": "object", "properties": { "protocolVersion": { "type": "number", "const": 3 }, "checkId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "verdict": { "type": "string", "enum": ["allow", "warn", "ask", "block", "unavailable"] }, "reasonCode": { "type": "string" }, "message": { "type": "string" }, "conflicts": { "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string" }, "shortId": { "type": "string" }, "title": { "type": "string" } }, "required": ["decisionId"], "additionalProperties": {} } }, "bypassed": { "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string" }, "bypassId": { "type": "string" }, "shortId": { "type": "string" } }, "required": ["decisionId"], "additionalProperties": {} } }, "evaluationCoverage": { "type": "object", "properties": { "candidateCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "submittedCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "evaluatedCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": ["completed", "partial", "unavailable", "not_run", "unknown"] }, "semanticBatchCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "completedSemanticBatchCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "selectionOmissions": { "type": "array", "items": { "type": "object", "properties": { "source": { "type": "string", "enum": ["exact_scope", "location_scope", "organization_scope", "candidate_scan", "candidate_limit", "bypass_scan"] }, "reason": { "type": "string", "enum": ["scan_limit", "candidate_limit", "bucket_limit"] }, "omittedCountLowerBound": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["source", "reason", "omittedCountLowerBound"], "additionalProperties": false } }, "evidenceOmissions": { "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string" }, "reason": { "type": "string", "enum": ["prompt_budget", "batch_limit", "evaluation_failed", "evaluation_deadline"] } }, "required": ["decisionId", "reason"], "additionalProperties": false } } }, "required": ["candidateCount", "submittedCount", "evaluatedCount", "status", "semanticBatchCount", "completedSemanticBatchCount", "selectionOmissions", "evidenceOmissions"], "additionalProperties": false }, "decisionDisclosures": { "minItems": 1, "maxItems": 16, "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string" }, "shortId": { "type": "string" }, "participation": { "type": "string", "enum": ["candidate", "reconcile_bypass"] } }, "required": ["decisionId", "shortId", "participation"], "additionalProperties": false } } }, "required": ["protocolVersion", "verdict", "reasonCode", "message", "conflicts", "bypassed"], "additionalProperties": {} };
|
|
18093
|
+
var schema107 = { "type": "object", "properties": { "protocolVersion": { "type": "number", "const": 3 }, "checkId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "verdict": { "type": "string", "enum": ["allow", "warn", "ask", "block", "unavailable"] }, "reasonCode": { "type": "string" }, "message": { "type": "string" }, "conflicts": { "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string", "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "title": { "type": "string" } }, "required": ["decisionId"], "additionalProperties": {} } }, "bypassed": { "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string", "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "bypassId": { "type": "string" }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" } }, "required": ["decisionId"], "additionalProperties": {} } }, "evaluationCoverage": { "type": "object", "properties": { "candidateCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "submittedCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "evaluatedCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": ["completed", "partial", "unavailable", "not_run", "unknown"] }, "semanticBatchCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "completedSemanticBatchCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "selectionOmissions": { "type": "array", "items": { "type": "object", "properties": { "source": { "type": "string", "enum": ["exact_scope", "location_scope", "organization_scope", "candidate_scan", "candidate_limit", "bypass_scan"] }, "reason": { "type": "string", "enum": ["scan_limit", "candidate_limit", "bucket_limit"] }, "omittedCountLowerBound": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["source", "reason", "omittedCountLowerBound"], "additionalProperties": false } }, "evidenceOmissions": { "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string", "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "reason": { "type": "string", "enum": ["prompt_budget", "batch_limit", "evaluation_failed", "evaluation_deadline"] } }, "required": ["decisionId", "reason"], "additionalProperties": false } } }, "required": ["candidateCount", "submittedCount", "evaluatedCount", "status", "semanticBatchCount", "completedSemanticBatchCount", "selectionOmissions", "evidenceOmissions"], "additionalProperties": false }, "decisionDisclosures": { "minItems": 1, "maxItems": 16, "type": "array", "items": { "type": "object", "properties": { "decisionId": { "type": "string", "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "participation": { "type": "string", "enum": ["candidate", "reconcile_bypass"] } }, "required": ["decisionId", "shortId", "participation"], "additionalProperties": false } } }, "required": ["protocolVersion", "verdict", "reasonCode", "message", "conflicts", "bypassed"], "additionalProperties": {} };
|
|
17655
18094
|
function validate58(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
17656
18095
|
;
|
|
17657
18096
|
let vErrors = null;
|
|
@@ -17692,7 +18131,7 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17692
18131
|
const _errs5 = errors;
|
|
17693
18132
|
if (errors === _errs5) {
|
|
17694
18133
|
if (typeof data1 === "string") {
|
|
17695
|
-
if (!
|
|
18134
|
+
if (!pattern53.test(data1)) {
|
|
17696
18135
|
validate58.errors = [{ instancePath: instancePath + "/checkId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/checkId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9._:-]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9._:-]{1,128}$"' }];
|
|
17697
18136
|
return false;
|
|
17698
18137
|
}
|
|
@@ -17762,10 +18201,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17762
18201
|
return false;
|
|
17763
18202
|
} else {
|
|
17764
18203
|
if (data6.decisionId !== void 0) {
|
|
18204
|
+
let data7 = data6.decisionId;
|
|
17765
18205
|
const _errs18 = errors;
|
|
17766
|
-
if (
|
|
17767
|
-
|
|
17768
|
-
|
|
18206
|
+
if (errors === _errs18) {
|
|
18207
|
+
if (typeof data7 === "string") {
|
|
18208
|
+
if (!pattern4.test(data7)) {
|
|
18209
|
+
validate58.errors = [{ instancePath: instancePath + "/conflicts/" + i0 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/conflicts/items/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
18210
|
+
return false;
|
|
18211
|
+
}
|
|
18212
|
+
} else {
|
|
18213
|
+
validate58.errors = [{ instancePath: instancePath + "/conflicts/" + i0 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/conflicts/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
18214
|
+
return false;
|
|
18215
|
+
}
|
|
17769
18216
|
}
|
|
17770
18217
|
var valid3 = _errs18 === errors;
|
|
17771
18218
|
} else {
|
|
@@ -17773,10 +18220,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17773
18220
|
}
|
|
17774
18221
|
if (valid3) {
|
|
17775
18222
|
if (data6.shortId !== void 0) {
|
|
18223
|
+
let data8 = data6.shortId;
|
|
17776
18224
|
const _errs20 = errors;
|
|
17777
|
-
if (
|
|
17778
|
-
|
|
17779
|
-
|
|
18225
|
+
if (errors === _errs20) {
|
|
18226
|
+
if (typeof data8 === "string") {
|
|
18227
|
+
if (!pattern5.test(data8)) {
|
|
18228
|
+
validate58.errors = [{ instancePath: instancePath + "/conflicts/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/conflicts/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
|
|
18229
|
+
return false;
|
|
18230
|
+
}
|
|
18231
|
+
} else {
|
|
18232
|
+
validate58.errors = [{ instancePath: instancePath + "/conflicts/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/conflicts/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
18233
|
+
return false;
|
|
18234
|
+
}
|
|
17780
18235
|
}
|
|
17781
18236
|
var valid3 = _errs20 === errors;
|
|
17782
18237
|
} else {
|
|
@@ -17834,10 +18289,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17834
18289
|
return false;
|
|
17835
18290
|
} else {
|
|
17836
18291
|
if (data11.decisionId !== void 0) {
|
|
18292
|
+
let data12 = data11.decisionId;
|
|
17837
18293
|
const _errs29 = errors;
|
|
17838
|
-
if (
|
|
17839
|
-
|
|
17840
|
-
|
|
18294
|
+
if (errors === _errs29) {
|
|
18295
|
+
if (typeof data12 === "string") {
|
|
18296
|
+
if (!pattern4.test(data12)) {
|
|
18297
|
+
validate58.errors = [{ instancePath: instancePath + "/bypassed/" + i1 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/bypassed/items/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
18298
|
+
return false;
|
|
18299
|
+
}
|
|
18300
|
+
} else {
|
|
18301
|
+
validate58.errors = [{ instancePath: instancePath + "/bypassed/" + i1 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/bypassed/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
18302
|
+
return false;
|
|
18303
|
+
}
|
|
17841
18304
|
}
|
|
17842
18305
|
var valid5 = _errs29 === errors;
|
|
17843
18306
|
} else {
|
|
@@ -17856,10 +18319,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
17856
18319
|
}
|
|
17857
18320
|
if (valid5) {
|
|
17858
18321
|
if (data11.shortId !== void 0) {
|
|
18322
|
+
let data14 = data11.shortId;
|
|
17859
18323
|
const _errs33 = errors;
|
|
17860
|
-
if (
|
|
17861
|
-
|
|
17862
|
-
|
|
18324
|
+
if (errors === _errs33) {
|
|
18325
|
+
if (typeof data14 === "string") {
|
|
18326
|
+
if (!pattern5.test(data14)) {
|
|
18327
|
+
validate58.errors = [{ instancePath: instancePath + "/bypassed/" + i1 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/bypassed/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
|
|
18328
|
+
return false;
|
|
18329
|
+
}
|
|
18330
|
+
} else {
|
|
18331
|
+
validate58.errors = [{ instancePath: instancePath + "/bypassed/" + i1 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/bypassed/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
18332
|
+
return false;
|
|
18333
|
+
}
|
|
17863
18334
|
}
|
|
17864
18335
|
var valid5 = _errs33 === errors;
|
|
17865
18336
|
} else {
|
|
@@ -18181,10 +18652,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
18181
18652
|
}
|
|
18182
18653
|
if (_errs65 === errors) {
|
|
18183
18654
|
if (data28.decisionId !== void 0) {
|
|
18655
|
+
let data29 = data28.decisionId;
|
|
18184
18656
|
const _errs66 = errors;
|
|
18185
|
-
if (
|
|
18186
|
-
|
|
18187
|
-
|
|
18657
|
+
if (errors === _errs66) {
|
|
18658
|
+
if (typeof data29 === "string") {
|
|
18659
|
+
if (!pattern4.test(data29)) {
|
|
18660
|
+
validate58.errors = [{ instancePath: instancePath + "/evaluationCoverage/evidenceOmissions/" + i3 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/evaluationCoverage/properties/evidenceOmissions/items/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
18661
|
+
return false;
|
|
18662
|
+
}
|
|
18663
|
+
} else {
|
|
18664
|
+
validate58.errors = [{ instancePath: instancePath + "/evaluationCoverage/evidenceOmissions/" + i3 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/evaluationCoverage/properties/evidenceOmissions/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
18665
|
+
return false;
|
|
18666
|
+
}
|
|
18188
18667
|
}
|
|
18189
18668
|
var valid10 = _errs66 === errors;
|
|
18190
18669
|
} else {
|
|
@@ -18282,10 +18761,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
18282
18761
|
}
|
|
18283
18762
|
if (_errs74 === errors) {
|
|
18284
18763
|
if (data32.decisionId !== void 0) {
|
|
18764
|
+
let data33 = data32.decisionId;
|
|
18285
18765
|
const _errs75 = errors;
|
|
18286
|
-
if (
|
|
18287
|
-
|
|
18288
|
-
|
|
18766
|
+
if (errors === _errs75) {
|
|
18767
|
+
if (typeof data33 === "string") {
|
|
18768
|
+
if (!pattern4.test(data33)) {
|
|
18769
|
+
validate58.errors = [{ instancePath: instancePath + "/decisionDisclosures/" + i4 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/decisionDisclosures/items/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
18770
|
+
return false;
|
|
18771
|
+
}
|
|
18772
|
+
} else {
|
|
18773
|
+
validate58.errors = [{ instancePath: instancePath + "/decisionDisclosures/" + i4 + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/decisionDisclosures/items/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
18774
|
+
return false;
|
|
18775
|
+
}
|
|
18289
18776
|
}
|
|
18290
18777
|
var valid12 = _errs75 === errors;
|
|
18291
18778
|
} else {
|
|
@@ -18293,10 +18780,18 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
18293
18780
|
}
|
|
18294
18781
|
if (valid12) {
|
|
18295
18782
|
if (data32.shortId !== void 0) {
|
|
18783
|
+
let data34 = data32.shortId;
|
|
18296
18784
|
const _errs77 = errors;
|
|
18297
|
-
if (
|
|
18298
|
-
|
|
18299
|
-
|
|
18785
|
+
if (errors === _errs77) {
|
|
18786
|
+
if (typeof data34 === "string") {
|
|
18787
|
+
if (!pattern5.test(data34)) {
|
|
18788
|
+
validate58.errors = [{ instancePath: instancePath + "/decisionDisclosures/" + i4 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/decisionDisclosures/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' }];
|
|
18789
|
+
return false;
|
|
18790
|
+
}
|
|
18791
|
+
} else {
|
|
18792
|
+
validate58.errors = [{ instancePath: instancePath + "/decisionDisclosures/" + i4 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/decisionDisclosures/items/properties/shortId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
18793
|
+
return false;
|
|
18794
|
+
}
|
|
18300
18795
|
}
|
|
18301
18796
|
var valid12 = _errs77 === errors;
|
|
18302
18797
|
} else {
|
|
@@ -18362,8 +18857,8 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
18362
18857
|
}
|
|
18363
18858
|
validate58.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
18364
18859
|
var isPresenceHeartbeatRequest = validate59;
|
|
18365
|
-
var
|
|
18366
|
-
var
|
|
18860
|
+
var pattern66 = new RegExp("^[A-Za-z0-9._-]{1,128}$", "u");
|
|
18861
|
+
var pattern67 = new RegExp("^pci_[A-Za-z0-9_-]{43}$", "u");
|
|
18367
18862
|
function validate59(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
18368
18863
|
;
|
|
18369
18864
|
let vErrors = null;
|
|
@@ -18388,7 +18883,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
18388
18883
|
const _errs3 = errors;
|
|
18389
18884
|
if (errors === _errs3) {
|
|
18390
18885
|
if (typeof data0 === "string") {
|
|
18391
|
-
if (!
|
|
18886
|
+
if (!pattern66.test(data0)) {
|
|
18392
18887
|
validate59.errors = [{ instancePath: instancePath + "/sessionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PresenceHeartbeatRequest/properties/sessionId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9._-]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9._-]{1,128}$"' }];
|
|
18393
18888
|
return false;
|
|
18394
18889
|
}
|
|
@@ -18407,7 +18902,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
18407
18902
|
const _errs5 = errors;
|
|
18408
18903
|
if (errors === _errs5) {
|
|
18409
18904
|
if (typeof data1 === "string") {
|
|
18410
|
-
if (!
|
|
18905
|
+
if (!pattern67.test(data1)) {
|
|
18411
18906
|
validate59.errors = [{ instancePath: instancePath + "/clientInstanceId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PresenceHeartbeatRequest/properties/clientInstanceId/pattern", keyword: "pattern", params: { pattern: "^pci_[A-Za-z0-9_-]{43}$" }, message: 'must match pattern "^pci_[A-Za-z0-9_-]{43}$"' }];
|
|
18412
18907
|
return false;
|
|
18413
18908
|
}
|
|
@@ -18950,7 +19445,7 @@ function validate61(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
18950
19445
|
return errors === 0;
|
|
18951
19446
|
}
|
|
18952
19447
|
validate61.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
18953
|
-
var schema115 = { "type": "object", "properties": { "ok": { "type": "boolean", "const": true }, "checkId": { "type": "string" }, "decisionId": { "type": "string" }, "outcome": { "type": "string", "enum": ["followed", "superseded"] }, "recordedAt": { "type": "number" }, "duplicate": { "type": "boolean" } }, "required": ["ok", "checkId", "decisionId", "outcome", "recordedAt", "duplicate"], "additionalProperties": false };
|
|
19448
|
+
var schema115 = { "type": "object", "properties": { "ok": { "type": "boolean", "const": true }, "checkId": { "type": "string" }, "decisionId": { "type": "string", "pattern": "^dec_[0-9a-f]{8}$", "description": "Canonical public Decision ID; internal Convex IDs are accepted only as legacy inputs." }, "outcome": { "type": "string", "enum": ["followed", "superseded"] }, "recordedAt": { "type": "number" }, "duplicate": { "type": "boolean" } }, "required": ["ok", "checkId", "decisionId", "outcome", "recordedAt", "duplicate"], "additionalProperties": false };
|
|
18954
19449
|
function validate62(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
18955
19450
|
;
|
|
18956
19451
|
let vErrors = null;
|
|
@@ -19007,10 +19502,18 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19007
19502
|
}
|
|
19008
19503
|
if (valid1) {
|
|
19009
19504
|
if (data.decisionId !== void 0) {
|
|
19505
|
+
let data2 = data.decisionId;
|
|
19010
19506
|
const _errs7 = errors;
|
|
19011
|
-
if (
|
|
19012
|
-
|
|
19013
|
-
|
|
19507
|
+
if (errors === _errs7) {
|
|
19508
|
+
if (typeof data2 === "string") {
|
|
19509
|
+
if (!pattern4.test(data2)) {
|
|
19510
|
+
validate62.errors = [{ instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/ReconcileResolutionResponse/properties/decisionId/pattern", keyword: "pattern", params: { pattern: "^dec_[0-9a-f]{8}$" }, message: 'must match pattern "^dec_[0-9a-f]{8}$"' }];
|
|
19511
|
+
return false;
|
|
19512
|
+
}
|
|
19513
|
+
} else {
|
|
19514
|
+
validate62.errors = [{ instancePath: instancePath + "/decisionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/ReconcileResolutionResponse/properties/decisionId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
19515
|
+
return false;
|
|
19516
|
+
}
|
|
19014
19517
|
}
|
|
19015
19518
|
var valid1 = _errs7 === errors;
|
|
19016
19519
|
} else {
|
|
@@ -19071,7 +19574,7 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19071
19574
|
return errors === 0;
|
|
19072
19575
|
}
|
|
19073
19576
|
validate62.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
19074
|
-
var
|
|
19577
|
+
var pattern69 = new RegExp("^(?![A-Za-z0-9-]*--)[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?\\/[A-Za-z0-9._-]{1,100}$", "u");
|
|
19075
19578
|
function validate63(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
19076
19579
|
;
|
|
19077
19580
|
let vErrors = null;
|
|
@@ -19105,7 +19608,7 @@ function validate63(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19105
19608
|
const _errs3 = errors;
|
|
19106
19609
|
if (errors === _errs3) {
|
|
19107
19610
|
if (typeof data0 === "string") {
|
|
19108
|
-
if (!
|
|
19611
|
+
if (!pattern69.test(data0)) {
|
|
19109
19612
|
validate63.errors = [{ instancePath: instancePath + "/repositoryFullName", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/RepositoryBindRequest/properties/repositoryFullName/pattern", keyword: "pattern", params: { pattern: "^(?![A-Za-z0-9-]*--)[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?\\/[A-Za-z0-9._-]{1,100}$" }, message: 'must match pattern "^(?![A-Za-z0-9-]*--)[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?\\/[A-Za-z0-9._-]{1,100}$"' }];
|
|
19110
19613
|
return false;
|
|
19111
19614
|
}
|
|
@@ -19170,7 +19673,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19170
19673
|
return errors === 0;
|
|
19171
19674
|
}
|
|
19172
19675
|
validate64.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
19173
|
-
var
|
|
19676
|
+
var pattern71 = new RegExp("^api_key_[A-Za-z0-9_-]+$", "u");
|
|
19174
19677
|
function validate65(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
19175
19678
|
;
|
|
19176
19679
|
let vErrors = null;
|
|
@@ -19204,7 +19707,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19204
19707
|
const _errs3 = errors;
|
|
19205
19708
|
if (errors === _errs3) {
|
|
19206
19709
|
if (typeof data0 === "string") {
|
|
19207
|
-
if (!
|
|
19710
|
+
if (!pattern35.test(data0)) {
|
|
19208
19711
|
validate65.errors = [{ instancePath: instancePath + "/requestId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListRequest/properties/requestId/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "^[a-f0-9]{64}$"' }];
|
|
19209
19712
|
return false;
|
|
19210
19713
|
}
|
|
@@ -19256,7 +19759,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19256
19759
|
validate65.errors = [{ instancePath: instancePath + "/after", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListRequest/properties/after/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
|
|
19257
19760
|
return false;
|
|
19258
19761
|
} else {
|
|
19259
|
-
if (!
|
|
19762
|
+
if (!pattern71.test(data2)) {
|
|
19260
19763
|
validate65.errors = [{ instancePath: instancePath + "/after", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListRequest/properties/after/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
|
|
19261
19764
|
return false;
|
|
19262
19765
|
}
|
|
@@ -19284,9 +19787,9 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19284
19787
|
return errors === 0;
|
|
19285
19788
|
}
|
|
19286
19789
|
validate65.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
19287
|
-
var
|
|
19288
|
-
var
|
|
19289
|
-
var
|
|
19790
|
+
var pattern73 = new RegExp("^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$", "u");
|
|
19791
|
+
var pattern74 = new RegExp("^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$", "u");
|
|
19792
|
+
var pattern75 = new RegExp("^[\\x21-\\x7e]+$", "u");
|
|
19290
19793
|
function validate66(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
19291
19794
|
;
|
|
19292
19795
|
let vErrors = null;
|
|
@@ -19358,7 +19861,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19358
19861
|
validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/id/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
|
|
19359
19862
|
return false;
|
|
19360
19863
|
} else {
|
|
19361
|
-
if (!
|
|
19864
|
+
if (!pattern71.test(data2)) {
|
|
19362
19865
|
validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
|
|
19363
19866
|
return false;
|
|
19364
19867
|
}
|
|
@@ -19387,7 +19890,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19387
19890
|
validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
19388
19891
|
return false;
|
|
19389
19892
|
} else {
|
|
19390
|
-
if (!
|
|
19893
|
+
if (!pattern73.test(data3)) {
|
|
19391
19894
|
validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/name/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$" }, message: 'must match pattern "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$"' }];
|
|
19392
19895
|
return false;
|
|
19393
19896
|
}
|
|
@@ -19416,7 +19919,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19416
19919
|
validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/obfuscatedValue/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
19417
19920
|
return false;
|
|
19418
19921
|
} else {
|
|
19419
|
-
if (!
|
|
19922
|
+
if (!pattern74.test(data4)) {
|
|
19420
19923
|
validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/obfuscatedValue/pattern", keyword: "pattern", params: { pattern: "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$" }, message: 'must match pattern "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$"' }];
|
|
19421
19924
|
return false;
|
|
19422
19925
|
}
|
|
@@ -19456,7 +19959,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19456
19959
|
validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/permissions/" + i1, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/permissions/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
19457
19960
|
return false;
|
|
19458
19961
|
} else {
|
|
19459
|
-
if (!
|
|
19962
|
+
if (!pattern75.test(data6)) {
|
|
19460
19963
|
validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/permissions/" + i1, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/permissions/items/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e]+$" }, message: 'must match pattern "^[\\x21-\\x7e]+$"' }];
|
|
19461
19964
|
return false;
|
|
19462
19965
|
}
|
|
@@ -19742,7 +20245,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19742
20245
|
}
|
|
19743
20246
|
errors++;
|
|
19744
20247
|
} else {
|
|
19745
|
-
if (!
|
|
20248
|
+
if (!pattern71.test(data11)) {
|
|
19746
20249
|
const err12 = { instancePath: instancePath + "/nextCursor", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/nextCursor/anyOf/0/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' };
|
|
19747
20250
|
if (vErrors === null) {
|
|
19748
20251
|
vErrors = [err12];
|
|
@@ -19854,7 +20357,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19854
20357
|
validate67.errors = [{ instancePath: instancePath + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/id/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
|
|
19855
20358
|
return false;
|
|
19856
20359
|
} else {
|
|
19857
|
-
if (!
|
|
20360
|
+
if (!pattern71.test(data0)) {
|
|
19858
20361
|
validate67.errors = [{ instancePath: instancePath + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/id/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
|
|
19859
20362
|
return false;
|
|
19860
20363
|
}
|
|
@@ -19883,7 +20386,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19883
20386
|
validate67.errors = [{ instancePath: instancePath + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
19884
20387
|
return false;
|
|
19885
20388
|
} else {
|
|
19886
|
-
if (!
|
|
20389
|
+
if (!pattern73.test(data1)) {
|
|
19887
20390
|
validate67.errors = [{ instancePath: instancePath + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/name/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$" }, message: 'must match pattern "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$"' }];
|
|
19888
20391
|
return false;
|
|
19889
20392
|
}
|
|
@@ -19912,7 +20415,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19912
20415
|
validate67.errors = [{ instancePath: instancePath + "/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/obfuscatedValue/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
19913
20416
|
return false;
|
|
19914
20417
|
} else {
|
|
19915
|
-
if (!
|
|
20418
|
+
if (!pattern74.test(data2)) {
|
|
19916
20419
|
validate67.errors = [{ instancePath: instancePath + "/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/obfuscatedValue/pattern", keyword: "pattern", params: { pattern: "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$" }, message: 'must match pattern "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$"' }];
|
|
19917
20420
|
return false;
|
|
19918
20421
|
}
|
|
@@ -19952,7 +20455,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
19952
20455
|
validate67.errors = [{ instancePath: instancePath + "/permissions/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/permissions/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
19953
20456
|
return false;
|
|
19954
20457
|
} else {
|
|
19955
|
-
if (!
|
|
20458
|
+
if (!pattern75.test(data4)) {
|
|
19956
20459
|
validate67.errors = [{ instancePath: instancePath + "/permissions/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/permissions/items/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e]+$" }, message: 'must match pattern "^[\\x21-\\x7e]+$"' }];
|
|
19957
20460
|
return false;
|
|
19958
20461
|
}
|
|
@@ -20233,7 +20736,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20233
20736
|
const _errs3 = errors;
|
|
20234
20737
|
if (errors === _errs3) {
|
|
20235
20738
|
if (typeof data0 === "string") {
|
|
20236
|
-
if (!
|
|
20739
|
+
if (!pattern35.test(data0)) {
|
|
20237
20740
|
validate68.errors = [{ instancePath: instancePath + "/requestId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintRequest/properties/requestId/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "^[a-f0-9]{64}$"' }];
|
|
20238
20741
|
return false;
|
|
20239
20742
|
}
|
|
@@ -20260,7 +20763,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20260
20763
|
validate68.errors = [{ instancePath: instancePath + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintRequest/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
20261
20764
|
return false;
|
|
20262
20765
|
} else {
|
|
20263
|
-
if (!
|
|
20766
|
+
if (!pattern73.test(data1)) {
|
|
20264
20767
|
validate68.errors = [{ instancePath: instancePath + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintRequest/properties/name/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$" }, message: 'must match pattern "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$"' }];
|
|
20265
20768
|
return false;
|
|
20266
20769
|
}
|
|
@@ -20313,7 +20816,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20313
20816
|
return errors === 0;
|
|
20314
20817
|
}
|
|
20315
20818
|
validate68.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
20316
|
-
var
|
|
20819
|
+
var pattern87 = new RegExp("^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$", "u");
|
|
20317
20820
|
function validate69(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
20318
20821
|
;
|
|
20319
20822
|
let vErrors = null;
|
|
@@ -20374,7 +20877,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20374
20877
|
validate69.errors = [{ instancePath: instancePath + "/apiKey/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/id/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
|
|
20375
20878
|
return false;
|
|
20376
20879
|
} else {
|
|
20377
|
-
if (!
|
|
20880
|
+
if (!pattern71.test(data1)) {
|
|
20378
20881
|
validate69.errors = [{ instancePath: instancePath + "/apiKey/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/id/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
|
|
20379
20882
|
return false;
|
|
20380
20883
|
}
|
|
@@ -20403,7 +20906,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20403
20906
|
validate69.errors = [{ instancePath: instancePath + "/apiKey/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
20404
20907
|
return false;
|
|
20405
20908
|
} else {
|
|
20406
|
-
if (!
|
|
20909
|
+
if (!pattern73.test(data2)) {
|
|
20407
20910
|
validate69.errors = [{ instancePath: instancePath + "/apiKey/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/name/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$" }, message: 'must match pattern "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$"' }];
|
|
20408
20911
|
return false;
|
|
20409
20912
|
}
|
|
@@ -20432,7 +20935,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20432
20935
|
validate69.errors = [{ instancePath: instancePath + "/apiKey/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/obfuscatedValue/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
20433
20936
|
return false;
|
|
20434
20937
|
} else {
|
|
20435
|
-
if (!
|
|
20938
|
+
if (!pattern74.test(data3)) {
|
|
20436
20939
|
validate69.errors = [{ instancePath: instancePath + "/apiKey/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/obfuscatedValue/pattern", keyword: "pattern", params: { pattern: "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$" }, message: 'must match pattern "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$"' }];
|
|
20437
20940
|
return false;
|
|
20438
20941
|
}
|
|
@@ -20472,7 +20975,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20472
20975
|
validate69.errors = [{ instancePath: instancePath + "/apiKey/permissions/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/permissions/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
20473
20976
|
return false;
|
|
20474
20977
|
} else {
|
|
20475
|
-
if (!
|
|
20978
|
+
if (!pattern75.test(data5)) {
|
|
20476
20979
|
validate69.errors = [{ instancePath: instancePath + "/apiKey/permissions/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/permissions/items/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e]+$" }, message: 'must match pattern "^[\\x21-\\x7e]+$"' }];
|
|
20477
20980
|
return false;
|
|
20478
20981
|
}
|
|
@@ -20734,7 +21237,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20734
21237
|
validate69.errors = [{ instancePath: instancePath + "/secret", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/secret/minLength", keyword: "minLength", params: { limit: 4 }, message: "must NOT have fewer than 4 characters" }];
|
|
20735
21238
|
return false;
|
|
20736
21239
|
} else {
|
|
20737
|
-
if (!
|
|
21240
|
+
if (!pattern87.test(data10)) {
|
|
20738
21241
|
validate69.errors = [{ instancePath: instancePath + "/secret", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/secret/pattern", keyword: "pattern", params: { pattern: "^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$" }, message: 'must match pattern "^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$"' }];
|
|
20739
21242
|
return false;
|
|
20740
21243
|
}
|
|
@@ -20794,7 +21297,7 @@ function validate70(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20794
21297
|
const _errs3 = errors;
|
|
20795
21298
|
if (errors === _errs3) {
|
|
20796
21299
|
if (typeof data0 === "string") {
|
|
20797
|
-
if (!
|
|
21300
|
+
if (!pattern35.test(data0)) {
|
|
20798
21301
|
validate70.errors = [{ instancePath: instancePath + "/requestId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyRevokeRequest/properties/requestId/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "^[a-f0-9]{64}$"' }];
|
|
20799
21302
|
return false;
|
|
20800
21303
|
}
|
|
@@ -20856,7 +21359,7 @@ function validate71(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
20856
21359
|
validate71.errors = [{ instancePath: instancePath + "/apiKeyId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyRevokeResponse/properties/apiKeyId/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
|
|
20857
21360
|
return false;
|
|
20858
21361
|
} else {
|
|
20859
|
-
if (!
|
|
21362
|
+
if (!pattern71.test(data0)) {
|
|
20860
21363
|
validate71.errors = [{ instancePath: instancePath + "/apiKeyId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyRevokeResponse/properties/apiKeyId/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
|
|
20861
21364
|
return false;
|
|
20862
21365
|
}
|
|
@@ -21120,7 +21623,7 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
21120
21623
|
}
|
|
21121
21624
|
validate73.evaluated = { "dynamicProps": true, "dynamicItems": false };
|
|
21122
21625
|
var schema139 = { "type": "object", "properties": { "protocol_version": { "type": "number", "const": 1 }, "issuer": { "type": "string", "format": "uri" }, "client_id": { "type": "string", "maxLength": 256, "pattern": "^client_[A-Za-z0-9_-]+$" }, "default_scopes": { "minItems": 4, "maxItems": 4, "type": "array", "items": { "type": "string", "enum": ["openid", "profile", "email", "offline_access"] } } }, "required": ["protocol_version", "issuer", "client_id", "default_scopes"], "additionalProperties": false, "x-primitive-runtime-refinements": ["canonical_https_origin", "exact_workos_connect_device_scopes"] };
|
|
21123
|
-
var
|
|
21626
|
+
var pattern90 = new RegExp("^client_[A-Za-z0-9_-]+$", "u");
|
|
21124
21627
|
function validate74(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
21125
21628
|
;
|
|
21126
21629
|
let vErrors = null;
|
|
@@ -21189,7 +21692,7 @@ function validate74(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
21189
21692
|
validate74.errors = [{ instancePath: instancePath + "/client_id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/WorkosConnectDeviceConfigurationSuccess/properties/client_id/maxLength", keyword: "maxLength", params: { limit: 256 }, message: "must NOT have more than 256 characters" }];
|
|
21190
21693
|
return false;
|
|
21191
21694
|
} else {
|
|
21192
|
-
if (!
|
|
21695
|
+
if (!pattern90.test(data2)) {
|
|
21193
21696
|
validate74.errors = [{ instancePath: instancePath + "/client_id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/WorkosConnectDeviceConfigurationSuccess/properties/client_id/pattern", keyword: "pattern", params: { pattern: "^client_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^client_[A-Za-z0-9_-]+$"' }];
|
|
21194
21697
|
return false;
|
|
21195
21698
|
}
|
|
@@ -21319,7 +21822,7 @@ import { join as join9 } from "path";
|
|
|
21319
21822
|
|
|
21320
21823
|
// src/lib/git.ts
|
|
21321
21824
|
import { execFileSync } from "child_process";
|
|
21322
|
-
import { createHash as
|
|
21825
|
+
import { createHash as createHash5 } from "crypto";
|
|
21323
21826
|
import { lstatSync as lstatSync2, realpathSync } from "fs";
|
|
21324
21827
|
import { basename as basename2, dirname as dirname7, isAbsolute as isAbsolute3, relative, resolve as resolve2, sep } from "path";
|
|
21325
21828
|
var GIT_TIMEOUT_MS = 1e3;
|
|
@@ -22583,82 +23086,6 @@ var StatuslineIngestionCache = class {
|
|
|
22583
23086
|
// src/daemon/client.ts
|
|
22584
23087
|
import { createConnection } from "net";
|
|
22585
23088
|
import { join as join12 } from "path";
|
|
22586
|
-
|
|
22587
|
-
// src/daemon/principal.ts
|
|
22588
|
-
import { createHash as createHash5 } from "crypto";
|
|
22589
|
-
var PRINCIPAL_COMPONENT_MAX_LENGTH = 512;
|
|
22590
|
-
var SHA256_HEX_PATTERN = /^[a-f0-9]{64}$/;
|
|
22591
|
-
function boundedClaim(value) {
|
|
22592
|
-
return typeof value === "string" && value.length > 0 && value.length <= PRINCIPAL_COMPONENT_MAX_LENGTH ? value : void 0;
|
|
22593
|
-
}
|
|
22594
|
-
function sha256(value) {
|
|
22595
|
-
return createHash5("sha256").update(value).digest("hex");
|
|
22596
|
-
}
|
|
22597
|
-
function resolveDaemonCredentialKey(token = resolveAuthCredential()?.token) {
|
|
22598
|
-
return token ? sha256(token) : void 0;
|
|
22599
|
-
}
|
|
22600
|
-
function resolveDaemonPrincipal(token = resolveAuthCredential()?.token) {
|
|
22601
|
-
if (!token) return void 0;
|
|
22602
|
-
const payload = decodeJwtPayload(token);
|
|
22603
|
-
const subject = boundedClaim(payload?.sub);
|
|
22604
|
-
const organizationId = boundedClaim(payload?.org_id);
|
|
22605
|
-
if (!(subject && organizationId)) return void 0;
|
|
22606
|
-
const issuer = boundedClaim(payload?.iss) ?? "unknown-issuer";
|
|
22607
|
-
return {
|
|
22608
|
-
principalId: sha256(`${issuer}\0${subject}`),
|
|
22609
|
-
organizationId,
|
|
22610
|
-
credentialFingerprint: sha256(token)
|
|
22611
|
-
};
|
|
22612
|
-
}
|
|
22613
|
-
function isDaemonPrincipal(value) {
|
|
22614
|
-
if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
|
|
22615
|
-
const candidate = value;
|
|
22616
|
-
return typeof candidate.principalId === "string" && SHA256_HEX_PATTERN.test(candidate.principalId) && typeof candidate.organizationId === "string" && candidate.organizationId.length > 0 && candidate.organizationId.length <= PRINCIPAL_COMPONENT_MAX_LENGTH && typeof candidate.credentialFingerprint === "string" && SHA256_HEX_PATTERN.test(candidate.credentialFingerprint);
|
|
22617
|
-
}
|
|
22618
|
-
function daemonPrincipalsMatch(caller, daemon) {
|
|
22619
|
-
return caller !== void 0 && daemon !== void 0 && caller.principalId === daemon.principalId && caller.organizationId === daemon.organizationId && caller.credentialFingerprint === daemon.credentialFingerprint;
|
|
22620
|
-
}
|
|
22621
|
-
|
|
22622
|
-
// src/daemon/protocol.ts
|
|
22623
|
-
var DAEMON_JSON_REQUEST_MAX_BYTES = 64 * 1024;
|
|
22624
|
-
var DAEMON_JSON_RESPONSE_MAX_BYTES = 8 * 1024 * 1024;
|
|
22625
|
-
var DAEMON_SOCKET_IDLE_TIMEOUT_MS = 2e3;
|
|
22626
|
-
function isRecord(value) {
|
|
22627
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22628
|
-
}
|
|
22629
|
-
function parseDaemonRequestEnvelope(value) {
|
|
22630
|
-
if (!isRecord(value)) return void 0;
|
|
22631
|
-
if (!(typeof value.id === "number" && Number.isSafeInteger(value.id) && value.id >= 0)) {
|
|
22632
|
-
return void 0;
|
|
22633
|
-
}
|
|
22634
|
-
if (typeof value.method !== "string" || value.method.length === 0 || value.method.length > 100) {
|
|
22635
|
-
return void 0;
|
|
22636
|
-
}
|
|
22637
|
-
if (value.params !== void 0 && !isRecord(value.params)) return void 0;
|
|
22638
|
-
if (value.caller !== void 0 && !isDaemonPrincipal(value.caller)) return void 0;
|
|
22639
|
-
return {
|
|
22640
|
-
id: value.id,
|
|
22641
|
-
method: value.method,
|
|
22642
|
-
...value.params === void 0 ? {} : { params: value.params },
|
|
22643
|
-
...value.caller === void 0 ? {} : { caller: value.caller }
|
|
22644
|
-
};
|
|
22645
|
-
}
|
|
22646
|
-
function parseDaemonResponseEnvelope(value) {
|
|
22647
|
-
if (!isRecord(value)) return void 0;
|
|
22648
|
-
if (!(typeof value.id === "number" && Number.isSafeInteger(value.id) && value.id >= 0)) {
|
|
22649
|
-
return void 0;
|
|
22650
|
-
}
|
|
22651
|
-
if (typeof value.ok !== "boolean") return void 0;
|
|
22652
|
-
if (value.error !== void 0 && typeof value.error !== "string") return void 0;
|
|
22653
|
-
return {
|
|
22654
|
-
id: value.id,
|
|
22655
|
-
ok: value.ok,
|
|
22656
|
-
...value.result === void 0 ? {} : { result: value.result },
|
|
22657
|
-
...value.error === void 0 ? {} : { error: value.error }
|
|
22658
|
-
};
|
|
22659
|
-
}
|
|
22660
|
-
|
|
22661
|
-
// src/daemon/client.ts
|
|
22662
23089
|
var SOCK_PATH = join12(primConfigDirectory(), "sock");
|
|
22663
23090
|
var DEFAULT_TIMEOUT_MS2 = 250;
|
|
22664
23091
|
var nextRequestId = 1;
|
|
@@ -22731,7 +23158,9 @@ function daemonRequest(method, params = {}, opts = {}) {
|
|
|
22731
23158
|
return;
|
|
22732
23159
|
}
|
|
22733
23160
|
clearTimeout(timer);
|
|
22734
|
-
settle(
|
|
23161
|
+
settle(
|
|
23162
|
+
(!(method.startsWith("decisions_") || method.startsWith("decision_")) || res.decisionIdentityVersion === DECISION_IDENTITY_VERSION) && res.ok && res.result !== void 0 ? res.result : null
|
|
23163
|
+
);
|
|
22735
23164
|
} catch {
|
|
22736
23165
|
clearTimeout(timer);
|
|
22737
23166
|
settle(null);
|
|
@@ -22753,7 +23182,7 @@ var DECISION_DIGEST_CACHE_LIMIT = 100;
|
|
|
22753
23182
|
var DECISION_DIGEST_CACHE_WINDOW = "24h";
|
|
22754
23183
|
var DECISION_DIGEST_CACHE_PATH = `/api/cli/decisions/recent?limit=${String(DECISION_DIGEST_CACHE_LIMIT)}&since=${DECISION_DIGEST_CACHE_WINDOW}`;
|
|
22755
23184
|
var DECISION_DRAFT_DIGEST_CACHE_PATH = `${DECISION_DIGEST_CACHE_PATH}&drafts=true`;
|
|
22756
|
-
var SAFE_PRIVATE_DRAFT_ID = /^[
|
|
23185
|
+
var SAFE_PRIVATE_DRAFT_ID = /^dec_[0-9a-f]{8}$/u;
|
|
22757
23186
|
var MAX_DRAFT_CURSOR_LENGTH = 4096;
|
|
22758
23187
|
function decisionDraftDigestCachePath(cursor) {
|
|
22759
23188
|
return cursor === void 0 ? DECISION_DRAFT_DIGEST_CACHE_PATH : `/api/cli/decisions/recent?limit=${String(DECISION_DIGEST_CACHE_LIMIT)}&drafts=true&cursor=${encodeURIComponent(cursor)}`;
|
|
@@ -23842,6 +24271,7 @@ function handleConnection(conn) {
|
|
|
23842
24271
|
let dispatched = false;
|
|
23843
24272
|
conn.setTimeout(DAEMON_SOCKET_IDLE_TIMEOUT_MS, () => conn.end());
|
|
23844
24273
|
const writeJsonResponse = (response) => {
|
|
24274
|
+
response.decisionIdentityVersion = DECISION_IDENTITY_VERSION;
|
|
23845
24275
|
let payload = Buffer.from(`${JSON.stringify(response)}
|
|
23846
24276
|
`, "utf8");
|
|
23847
24277
|
if (payload.length > DAEMON_JSON_RESPONSE_MAX_BYTES) {
|