@fro.bot/systematic 3.18.3 → 3.18.5
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/HARNESSES.md +8 -4
- package/dist/ce-review-validator.d.ts +43 -2
- package/dist/cli.js +12 -18
- package/dist/{index-be0zwq50.js → index-ft2sjkks.js} +63 -108
- package/dist/index.js +1 -1
- package/dist/lib/review-artifact-schema.d.ts +18 -1
- package/dist/lib/review-pipeline-contract.d.ts +1446 -0
- package/dist/lib/review-pipeline.d.ts +812 -0
- package/dist/lib/review-return-validator.d.ts +19 -0
- package/dist/pi.js +63 -108
- package/package.json +2 -2
- package/skills/ce-review/SKILL.md +54 -83
- package/skills/ce-review/references/pipeline-invocation.md +263 -0
- package/skills/ce-review/references/review-output-template.md +2 -1
- package/skills/ce-review/references/review-pipeline-schema.json +391 -0
- package/skills/ce-review/references/subagent-template.md +1 -1
- package/skills/ce-review/references/synthesis-artifact-contract.md +57 -68
- package/skills/ce-review/scripts/validate-review.mjs +3350 -196
package/HARNESSES.md
CHANGED
|
@@ -55,13 +55,17 @@ Behavioral enforcement rides a plugin output style (`force-for-plugin: true`), w
|
|
|
55
55
|
|
|
56
56
|
Honest capability boundary: output-style enforcement is real and applies automatically on install, but it operates at the system-prompt level — the same layer as any other instruction the model receives — so it is strong guidance, not a hard gate the model cannot violate. Coverage also differs by surface: plugin-bundled hooks fire app-wide, including in Cowork, while a project-local `.claude/settings.json` hook fires in the Code tab but not in Cowork — state or enforcement reaching Cowork sessions has to come through the plugin, not a project-local hook. Integration coverage lives in `tests/integration/claude-code.test.ts` [CC-10].
|
|
57
57
|
|
|
58
|
-
## Review
|
|
58
|
+
## Review synthesis pipeline validator — packaged paths
|
|
59
59
|
|
|
60
|
-
The raw-return and
|
|
60
|
+
The raw-return validator and the four-phase synthesis pipeline (`screen`, `prepare`, `merge`,
|
|
61
|
+
`finalize`) ship as one self-contained Node bundle,
|
|
61
62
|
`skills/ce-review/scripts/validate-review.mjs`, generated from
|
|
62
63
|
`src/ce-review-validator.ts` by `scripts/generate-ce-review-validator.ts` and
|
|
63
|
-
gated by `bun run ce-review-validator:drift`.
|
|
64
|
-
|
|
64
|
+
gated by `bun run ce-review-validator:drift`. The bundle dispatches six subcommands (`return`,
|
|
65
|
+
`artifact`, `screen`, `prepare`, `merge`, `finalize`) through one shared exit-code vocabulary (0
|
|
66
|
+
ok, 1 rejection/oversized/invalid UTF-8, 2 usage/TTY/read failure) and one exception boundary;
|
|
67
|
+
`merge` and `finalize` run through one shared strict-JSON stdin runner bounded by
|
|
68
|
+
`AGGREGATE_STDIN_BYTE_CAP`. Recorded execution evidence for this surface:
|
|
65
69
|
|
|
66
70
|
- **npm / OpenCode / Pi package layout** — real Node execution from an extracted
|
|
67
71
|
`npm pack --ignore-scripts` archive, resolving the script through its packaged
|
|
@@ -4,14 +4,55 @@ import { type ReadChunk } from './lib/review-return-validator.js';
|
|
|
4
4
|
* validator shim (`skills/ce-review/scripts/validate-review.mjs`).
|
|
5
5
|
*
|
|
6
6
|
* This is a thin packaging compatibility shim, not a public extension point:
|
|
7
|
-
* it dispatches exactly
|
|
7
|
+
* it dispatches exactly six subcommands and owns no validation logic
|
|
8
|
+
* beyond `screen`'s flag parsing and stdin plumbing.
|
|
8
9
|
* - `return` -> the bounded raw persona-return validator (stdin).
|
|
9
10
|
* - `artifact` -> the existing aggregate review-artifact validator.
|
|
11
|
+
* - `screen` -> executable reviewer-return admission (`screenReviewReturn`),
|
|
12
|
+
* reusing the same bounded stdin reader as `return`.
|
|
13
|
+
* - `prepare` -> executable candidate preparation (`prepareReviewCandidates`),
|
|
14
|
+
* reusing the same bounded stdin reader with the larger
|
|
15
|
+
* aggregate byte cap.
|
|
16
|
+
* - `merge` -> executable adjudication application
|
|
17
|
+
* (`applyReviewAdjudication`), reusing the same bounded
|
|
18
|
+
* stdin reader with the aggregate byte cap.
|
|
19
|
+
* - `finalize` -> executable finalize-envelope synthesis (`finalizeReview`),
|
|
20
|
+
* reusing the same bounded stdin reader with the aggregate
|
|
21
|
+
* byte cap.
|
|
10
22
|
*
|
|
11
23
|
* It exists because shipped skill layouts cannot all rely on the npm CLI or
|
|
12
24
|
* `dist/`; every harness invokes the committed bundle through `SKILL_DIR`.
|
|
13
25
|
*/
|
|
14
|
-
export declare const CE_REVIEW_VALIDATOR_USAGE = "Usage: node validate-review.mjs <return|artifact> [...]";
|
|
26
|
+
export declare const CE_REVIEW_VALIDATOR_USAGE = "Usage: node validate-review.mjs <return|artifact|screen|prepare|merge|finalize> [...]";
|
|
27
|
+
export declare const CE_REVIEW_SCREEN_USAGE = "Usage: node validate-review.mjs screen --reviewer <name> --harness <opencode|pi|claude-code>";
|
|
28
|
+
export declare const CE_REVIEW_SCREEN_STDIN_TTY_MESSAGE = "screen reads one raw reviewer return from stdin; interactive input is not supported";
|
|
29
|
+
export declare const CE_REVIEW_SCREEN_STDIN_READ_FAILED_MESSAGE = "screen could not read the reviewer return from stdin";
|
|
30
|
+
export declare const CE_REVIEW_SCREEN_STDIN_OVERSIZED_MESSAGE = "screen input exceeds the 1 MiB limit";
|
|
31
|
+
export declare const CE_REVIEW_SCREEN_STDIN_INVALID_UTF8_MESSAGE = "screen input is not valid UTF-8";
|
|
32
|
+
export declare const CE_REVIEW_SCREEN_STDIN_EMPTY_MESSAGE = "screen received empty stdin";
|
|
33
|
+
export declare const CE_REVIEW_SCREEN_REJECTED_MESSAGE = "screen rejected the reviewer return";
|
|
34
|
+
export declare const CE_REVIEW_SCREEN_INTERNAL_ERROR_MESSAGE = "ce-review-validator: internal error";
|
|
35
|
+
export declare const CE_REVIEW_PREPARE_USAGE = "Usage: node validate-review.mjs prepare";
|
|
36
|
+
export declare const CE_REVIEW_PREPARE_STDIN_TTY_MESSAGE = "prepare reads one aggregate JSON envelope from stdin; interactive input is not supported";
|
|
37
|
+
export declare const CE_REVIEW_PREPARE_STDIN_READ_FAILED_MESSAGE = "prepare could not read the aggregate envelope from stdin";
|
|
38
|
+
export declare const CE_REVIEW_PREPARE_STDIN_OVERSIZED_MESSAGE = "prepare input exceeds the aggregate byte cap";
|
|
39
|
+
export declare const CE_REVIEW_PREPARE_STDIN_INVALID_UTF8_MESSAGE = "prepare input is not valid UTF-8";
|
|
40
|
+
export declare const CE_REVIEW_PREPARE_STDIN_EMPTY_MESSAGE = "prepare received empty stdin";
|
|
41
|
+
export declare const CE_REVIEW_PREPARE_REJECTED_MESSAGE = "prepare rejected the aggregate envelope";
|
|
42
|
+
export declare const CE_REVIEW_MERGE_USAGE = "Usage: node validate-review.mjs merge";
|
|
43
|
+
export declare const CE_REVIEW_MERGE_STDIN_TTY_MESSAGE = "merge reads one aggregate JSON envelope from stdin; interactive input is not supported";
|
|
44
|
+
export declare const CE_REVIEW_MERGE_STDIN_READ_FAILED_MESSAGE = "merge could not read the aggregate envelope from stdin";
|
|
45
|
+
export declare const CE_REVIEW_MERGE_STDIN_OVERSIZED_MESSAGE = "merge input exceeds the aggregate byte cap";
|
|
46
|
+
export declare const CE_REVIEW_MERGE_STDIN_INVALID_UTF8_MESSAGE = "merge input is not valid UTF-8";
|
|
47
|
+
export declare const CE_REVIEW_MERGE_STDIN_EMPTY_MESSAGE = "merge received empty stdin";
|
|
48
|
+
export declare const CE_REVIEW_MERGE_REJECTED_MESSAGE = "merge rejected the aggregate envelope";
|
|
49
|
+
export declare const CE_REVIEW_FINALIZE_USAGE = "Usage: node validate-review.mjs finalize";
|
|
50
|
+
export declare const CE_REVIEW_FINALIZE_STDIN_TTY_MESSAGE = "finalize reads one aggregate JSON envelope from stdin; interactive input is not supported";
|
|
51
|
+
export declare const CE_REVIEW_FINALIZE_STDIN_READ_FAILED_MESSAGE = "finalize could not read the aggregate envelope from stdin";
|
|
52
|
+
export declare const CE_REVIEW_FINALIZE_STDIN_OVERSIZED_MESSAGE = "finalize input exceeds the aggregate byte cap";
|
|
53
|
+
export declare const CE_REVIEW_FINALIZE_STDIN_INVALID_UTF8_MESSAGE = "finalize input is not valid UTF-8";
|
|
54
|
+
export declare const CE_REVIEW_FINALIZE_STDIN_EMPTY_MESSAGE = "finalize received empty stdin";
|
|
55
|
+
export declare const CE_REVIEW_FINALIZE_REJECTED_MESSAGE = "finalize rejected the aggregate envelope";
|
|
15
56
|
export interface CeReviewValidatorOptions {
|
|
16
57
|
readonly argv: readonly string[];
|
|
17
58
|
readonly cwd?: string;
|
package/dist/cli.js
CHANGED
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
findCommandsInDir,
|
|
34
34
|
findSkillsInDir,
|
|
35
35
|
discoverSkills
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-ft2sjkks.js";
|
|
37
37
|
var __defProp = Object.defineProperty;
|
|
38
38
|
var __returnValue = (v) => v;
|
|
39
39
|
function __exportSetter(name, newValue) {
|
|
@@ -831,7 +831,7 @@ function buildCapabilitySnapshot(options) {
|
|
|
831
831
|
options.outputSink?.(serialized);
|
|
832
832
|
return snapshot;
|
|
833
833
|
}
|
|
834
|
-
// node_modules/.bun/zod@4.6.
|
|
834
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/classic/iso.js
|
|
835
835
|
var exports_iso = {};
|
|
836
836
|
__export(exports_iso, {
|
|
837
837
|
ZodISODate: () => ZodISODate,
|
|
@@ -2204,7 +2204,6 @@ var REVIEW_ARTIFACT_CUSTOM_MESSAGES = [
|
|
|
2204
2204
|
"provenance.agreement_credit must not contain duplicate reviewers",
|
|
2205
2205
|
"provenance.agreement_credit must not overlap provenance.submitters",
|
|
2206
2206
|
"provenance.agreement_credit requires an eligible returned persona with admitted evidence",
|
|
2207
|
-
"satisfied risk coverage must cite a validated finding on the lost persona selection surface",
|
|
2208
2207
|
"satisfied risk coverage must cite an admitted ledger row owned by another persona"
|
|
2209
2208
|
];
|
|
2210
2209
|
var boundedText = (maxLength) => string().min(1).max(maxLength).regex(/\S/);
|
|
@@ -2243,7 +2242,13 @@ var RISK_CRITICAL_PERSONAS = [
|
|
|
2243
2242
|
];
|
|
2244
2243
|
var RiskCriticalPersonaSchema = _enum(RISK_CRITICAL_PERSONAS);
|
|
2245
2244
|
var FindingTitleSchema = boundedText(256);
|
|
2246
|
-
var SeveritySchema = _enum([
|
|
2245
|
+
var SeveritySchema = _enum([
|
|
2246
|
+
"P0",
|
|
2247
|
+
"P1",
|
|
2248
|
+
"P2",
|
|
2249
|
+
"P3",
|
|
2250
|
+
"unknown"
|
|
2251
|
+
]);
|
|
2247
2252
|
var FindingSeveritySchema = SeveritySchema.exclude(["unknown"]);
|
|
2248
2253
|
var AutofixClassSchema = _enum([
|
|
2249
2254
|
"safe_auto",
|
|
@@ -2592,17 +2597,6 @@ var ReviewArtifactSchema = object({
|
|
|
2592
2597
|
return;
|
|
2593
2598
|
}
|
|
2594
2599
|
if (owner === coverage.persona) {
|
|
2595
|
-
ctx.addIssue({
|
|
2596
|
-
code: "custom",
|
|
2597
|
-
path: ["risk_coverage", coverageIndex, "input_finding_id"],
|
|
2598
|
-
message: REVIEW_ARTIFACT_CUSTOM_MESSAGES[19]
|
|
2599
|
-
});
|
|
2600
|
-
return;
|
|
2601
|
-
}
|
|
2602
|
-
const lostDispatch = artifact.dispatches.find((dispatch) => dispatch.persona === coverage.persona);
|
|
2603
|
-
const surface = lostDispatch?.selection_surface ?? [];
|
|
2604
|
-
const covered = artifact.findings.some((finding) => finding.input_finding_ids.includes(citedId) && finding.validated !== false && surface.includes(finding.file));
|
|
2605
|
-
if (!covered) {
|
|
2606
2600
|
ctx.addIssue({
|
|
2607
2601
|
code: "custom",
|
|
2608
2602
|
path: ["risk_coverage", coverageIndex, "input_finding_id"],
|
|
@@ -2713,11 +2707,11 @@ function readChunkWithRetry(fd, buffer, toRead, readChunk) {
|
|
|
2713
2707
|
}
|
|
2714
2708
|
}
|
|
2715
2709
|
}
|
|
2716
|
-
function readBoundedStdin(fd, readChunk) {
|
|
2710
|
+
function readBoundedStdin(fd, readChunk, maxBytes = MAX_REVIEW_RETURN_BYTES) {
|
|
2717
2711
|
const chunks = [];
|
|
2718
2712
|
let total = 0;
|
|
2719
2713
|
while (true) {
|
|
2720
|
-
const remaining =
|
|
2714
|
+
const remaining = maxBytes + 1 - total;
|
|
2721
2715
|
if (remaining <= 0)
|
|
2722
2716
|
return { status: "oversized" };
|
|
2723
2717
|
const toRead = Math.min(READ_CHUNK_BYTES, remaining);
|
|
@@ -2729,7 +2723,7 @@ function readBoundedStdin(fd, readChunk) {
|
|
|
2729
2723
|
break;
|
|
2730
2724
|
total += read.bytesRead;
|
|
2731
2725
|
chunks.push(buffer.subarray(0, read.bytesRead));
|
|
2732
|
-
if (total >
|
|
2726
|
+
if (total > maxBytes)
|
|
2733
2727
|
return { status: "oversized" };
|
|
2734
2728
|
}
|
|
2735
2729
|
return { buffer: Buffer.concat(chunks, total), status: "ok" };
|
|
@@ -1786,7 +1786,7 @@ var BUNDLED_SKILL_NAMES = [
|
|
|
1786
1786
|
"writing-skills"
|
|
1787
1787
|
];
|
|
1788
1788
|
|
|
1789
|
-
// node_modules/.bun/zod@4.6.
|
|
1789
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/util.js
|
|
1790
1790
|
function getEnumValues(entries) {
|
|
1791
1791
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
1792
1792
|
const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
@@ -2224,9 +2224,6 @@ function members(proto, table) {
|
|
|
2224
2224
|
else
|
|
2225
2225
|
defineBound(proto, key, desc.value);
|
|
2226
2226
|
}
|
|
2227
|
-
for (const sym of Object.getOwnPropertySymbols(table)) {
|
|
2228
|
-
defineBound(proto, sym, table[sym]);
|
|
2229
|
-
}
|
|
2230
2227
|
}
|
|
2231
2228
|
function own(inst, key, value, enumerable = true) {
|
|
2232
2229
|
Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value });
|
|
@@ -2332,7 +2329,7 @@ function constantCatch(value) {
|
|
|
2332
2329
|
return fn;
|
|
2333
2330
|
}
|
|
2334
2331
|
|
|
2335
|
-
// node_modules/.bun/zod@4.6.
|
|
2332
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/core.js
|
|
2336
2333
|
var _a;
|
|
2337
2334
|
var _zodDesc = { value: undefined, enumerable: false };
|
|
2338
2335
|
var _E = "captureStackTrace" in Error ? Error : null;
|
|
@@ -2374,8 +2371,7 @@ function $constructor(name, initializer, proto, params) {
|
|
|
2374
2371
|
} finally {
|
|
2375
2372
|
_zodDesc.value = undefined;
|
|
2376
2373
|
}
|
|
2377
|
-
}
|
|
2378
|
-
if (inst._zod.traits.has(name)) {
|
|
2374
|
+
} else if (inst._zod.traits.has(name)) {
|
|
2379
2375
|
return;
|
|
2380
2376
|
}
|
|
2381
2377
|
inst._zod.traits.add(name);
|
|
@@ -2451,7 +2447,7 @@ function config(newConfig) {
|
|
|
2451
2447
|
Object.assign(globalConfig, newConfig);
|
|
2452
2448
|
return globalConfig;
|
|
2453
2449
|
}
|
|
2454
|
-
// node_modules/.bun/zod@4.6.
|
|
2450
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/errors.js
|
|
2455
2451
|
function _getMessage() {
|
|
2456
2452
|
const internals = this._zod;
|
|
2457
2453
|
internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
|
|
@@ -2566,7 +2562,7 @@ function formatError(error, mapper = (issue) => issue.message) {
|
|
|
2566
2562
|
return fieldErrors;
|
|
2567
2563
|
}
|
|
2568
2564
|
|
|
2569
|
-
// node_modules/.bun/zod@4.6.
|
|
2565
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/parse.js
|
|
2570
2566
|
function finalizeParams(callee, params) {
|
|
2571
2567
|
return { callee: params?.callee ?? callee, Err: params?.Err };
|
|
2572
2568
|
}
|
|
@@ -2713,7 +2709,7 @@ var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
2713
2709
|
var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2714
2710
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
2715
2711
|
};
|
|
2716
|
-
// node_modules/.bun/zod@4.6.
|
|
2712
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/regexes.js
|
|
2717
2713
|
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
2718
2714
|
var cuid2 = /^[0-9a-z]+$/;
|
|
2719
2715
|
var ulid = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
@@ -2771,7 +2767,7 @@ var boolean2 = /^(?:true|false)$/i;
|
|
|
2771
2767
|
var lowercase = /^[^A-Z]*$/;
|
|
2772
2768
|
var uppercase = /^[^a-z]*$/;
|
|
2773
2769
|
|
|
2774
|
-
// node_modules/.bun/zod@4.6.
|
|
2770
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/checks.js
|
|
2775
2771
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
2776
2772
|
var _a;
|
|
2777
2773
|
inst._zod ?? (inst._zod = {});
|
|
@@ -3087,7 +3083,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
3087
3083
|
};
|
|
3088
3084
|
});
|
|
3089
3085
|
|
|
3090
|
-
// node_modules/.bun/zod@4.6.
|
|
3086
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/doc.js
|
|
3091
3087
|
class Doc {
|
|
3092
3088
|
constructor(args = [], closed = {}) {
|
|
3093
3089
|
this.content = [];
|
|
@@ -3129,14 +3125,14 @@ ${content.join(`
|
|
|
3129
3125
|
}
|
|
3130
3126
|
}
|
|
3131
3127
|
|
|
3132
|
-
// node_modules/.bun/zod@4.6.
|
|
3128
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/versions.js
|
|
3133
3129
|
var version = {
|
|
3134
3130
|
major: 4,
|
|
3135
3131
|
minor: 6,
|
|
3136
|
-
patch:
|
|
3132
|
+
patch: 4
|
|
3137
3133
|
};
|
|
3138
3134
|
|
|
3139
|
-
// node_modules/.bun/zod@4.6.
|
|
3135
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/schemas.js
|
|
3140
3136
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
3141
3137
|
var _a;
|
|
3142
3138
|
inst ?? (inst = {});
|
|
@@ -3318,11 +3314,32 @@ var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
|
|
|
3318
3314
|
});
|
|
3319
3315
|
var URL_BAD_FORMAT = 1;
|
|
3320
3316
|
var URL_UNPARSEABLE = 2;
|
|
3317
|
+
function canParseURL(input) {
|
|
3318
|
+
try {
|
|
3319
|
+
if (typeof URL !== "undefined" && typeof URL.canParse === "function")
|
|
3320
|
+
return URL.canParse(input);
|
|
3321
|
+
new URL(input);
|
|
3322
|
+
return true;
|
|
3323
|
+
} catch {
|
|
3324
|
+
return false;
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
function validateURL(trimmed, def) {
|
|
3328
|
+
if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) {
|
|
3329
|
+
return canParseURL(trimmed) || URL_UNPARSEABLE;
|
|
3330
|
+
}
|
|
3331
|
+
return parseURLObject(trimmed, def);
|
|
3332
|
+
}
|
|
3321
3333
|
function parseURLObject(trimmed, def) {
|
|
3322
3334
|
if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) {
|
|
3323
3335
|
return URL_BAD_FORMAT;
|
|
3324
3336
|
}
|
|
3325
3337
|
try {
|
|
3338
|
+
if (typeof URL !== "undefined") {
|
|
3339
|
+
const URLStatic = URL;
|
|
3340
|
+
if (typeof URLStatic.parse === "function")
|
|
3341
|
+
return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;
|
|
3342
|
+
}
|
|
3326
3343
|
return new URL(trimmed);
|
|
3327
3344
|
} catch {
|
|
3328
3345
|
return URL_UNPARSEABLE;
|
|
@@ -3345,7 +3362,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
3345
3362
|
inst._zod.check = (payload) => {
|
|
3346
3363
|
try {
|
|
3347
3364
|
const trimmed = payload.value.trim();
|
|
3348
|
-
const url =
|
|
3365
|
+
const url = validateURL(trimmed, def);
|
|
3349
3366
|
if (url === URL_BAD_FORMAT) {
|
|
3350
3367
|
payload.issues.push({
|
|
3351
3368
|
code: "invalid_format",
|
|
@@ -3367,6 +3384,10 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
3367
3384
|
});
|
|
3368
3385
|
return;
|
|
3369
3386
|
}
|
|
3387
|
+
if (url === true) {
|
|
3388
|
+
payload.value = stripTabAndNewline(trimmed);
|
|
3389
|
+
return;
|
|
3390
|
+
}
|
|
3370
3391
|
if (def.hostname && !urlHostnameOk(url, def.hostname)) {
|
|
3371
3392
|
payload.issues.push({
|
|
3372
3393
|
code: "invalid_format",
|
|
@@ -3456,12 +3477,7 @@ var ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
|
|
|
3456
3477
|
function isValidIPv6(value) {
|
|
3457
3478
|
if (!ipv6Alphabet.test(value))
|
|
3458
3479
|
return false;
|
|
3459
|
-
|
|
3460
|
-
new URL(`http://[${value}]`);
|
|
3461
|
-
return true;
|
|
3462
|
-
} catch {
|
|
3463
|
-
return false;
|
|
3464
|
-
}
|
|
3480
|
+
return canParseURL(`http://[${value}]`);
|
|
3465
3481
|
}
|
|
3466
3482
|
var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
3467
3483
|
def.pattern ?? (def.pattern = ipv6);
|
|
@@ -4728,62 +4744,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
4728
4744
|
payload.issues.push(issue(_iss));
|
|
4729
4745
|
}
|
|
4730
4746
|
}
|
|
4731
|
-
|
|
4732
|
-
if (result.issues.length) {
|
|
4733
|
-
payload.issues.push(...prefixIssues(key, result.issues));
|
|
4734
|
-
}
|
|
4735
|
-
}
|
|
4736
|
-
var $ZodProperties = /* @__PURE__ */ $constructor("$ZodProperties", (inst, def) => {
|
|
4737
|
-
$ZodType.init(inst, def);
|
|
4738
|
-
$ZodCheck.init(inst, def);
|
|
4739
|
-
const memo = globalConfig.memoizer;
|
|
4740
|
-
memo?.attach(inst);
|
|
4741
|
-
let entries;
|
|
4742
|
-
const runShape = (payload, ctx) => {
|
|
4743
|
-
entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
|
|
4744
|
-
const input = payload.value;
|
|
4745
|
-
let proms;
|
|
4746
|
-
for (const [key, schema] of entries) {
|
|
4747
|
-
const result = schema._zod.run({ value: input[key], issues: [] }, ctx);
|
|
4748
|
-
if (result instanceof Promise) {
|
|
4749
|
-
proms ?? (proms = []);
|
|
4750
|
-
proms.push(result.then((result) => handlePropertiesResult(result, payload, key)));
|
|
4751
|
-
} else {
|
|
4752
|
-
handlePropertiesResult(result, payload, key);
|
|
4753
|
-
}
|
|
4754
|
-
}
|
|
4755
|
-
if (proms)
|
|
4756
|
-
return Promise.all(proms).then(() => {
|
|
4757
|
-
return;
|
|
4758
|
-
});
|
|
4759
|
-
return;
|
|
4760
|
-
};
|
|
4761
|
-
inst._zod.parse = (payload, ctx) => {
|
|
4762
|
-
const input = payload.value;
|
|
4763
|
-
if (input === null || typeof input !== "object" && typeof input !== "function") {
|
|
4764
|
-
payload.issues.push({ expected: "object", code: "invalid_type", input, inst });
|
|
4765
|
-
return payload;
|
|
4766
|
-
}
|
|
4767
|
-
if (ctx.direction === "backward")
|
|
4768
|
-
ctx = { ...ctx, direction: "forward" };
|
|
4769
|
-
if (memo)
|
|
4770
|
-
memo.alloc(inst, payload, input, ctx);
|
|
4771
|
-
const result = runShape(payload, ctx);
|
|
4772
|
-
return result instanceof Promise ? result.then(() => payload) : payload;
|
|
4773
|
-
};
|
|
4774
|
-
inst._zod.check = (payload) => {
|
|
4775
|
-
if (payload.value == null) {
|
|
4776
|
-
payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
|
|
4777
|
-
return;
|
|
4778
|
-
}
|
|
4779
|
-
return runShape(payload, {});
|
|
4780
|
-
};
|
|
4781
|
-
}, {
|
|
4782
|
-
*[Symbol.iterator]() {
|
|
4783
|
-
yield this;
|
|
4784
|
-
}
|
|
4785
|
-
});
|
|
4786
|
-
// node_modules/.bun/zod@4.6.2/node_modules/zod/v4/core/memoizer.js
|
|
4747
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/memoizer.js
|
|
4787
4748
|
class $ZodCyclicError extends Error {
|
|
4788
4749
|
constructor() {
|
|
4789
4750
|
super(`Cannot parse a reference cycle that closes through a transform`);
|
|
@@ -4793,7 +4754,7 @@ class $ZodCyclicError extends Error {
|
|
|
4793
4754
|
var STATE = "~memo";
|
|
4794
4755
|
var NO_ISSUES = [];
|
|
4795
4756
|
function isRef(value) {
|
|
4796
|
-
return value !== null &&
|
|
4757
|
+
return value !== null && typeof value === "object";
|
|
4797
4758
|
}
|
|
4798
4759
|
function cloneIssues(issues) {
|
|
4799
4760
|
return issues.map((iss) => iss.path ? { ...iss, path: iss.path.slice() } : { ...iss });
|
|
@@ -4842,9 +4803,6 @@ function isRecursive(inst, stack, resolve) {
|
|
|
4842
4803
|
check(def.catchall);
|
|
4843
4804
|
break;
|
|
4844
4805
|
}
|
|
4845
|
-
case "properties":
|
|
4846
|
-
merge(shape(def.shape, false));
|
|
4847
|
-
break;
|
|
4848
4806
|
case "array":
|
|
4849
4807
|
check(def.element);
|
|
4850
4808
|
break;
|
|
@@ -5055,7 +5013,7 @@ function isBackEdge(ctx, value) {
|
|
|
5055
5013
|
const backEdges = ctx[STATE]?.backEdges;
|
|
5056
5014
|
return backEdges !== undefined && isRef(value) && backEdges.has(value);
|
|
5057
5015
|
}
|
|
5058
|
-
// node_modules/.bun/zod@4.6.
|
|
5016
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/locales/en.js
|
|
5059
5017
|
var error = () => {
|
|
5060
5018
|
const Sizable = {
|
|
5061
5019
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -5095,6 +5053,7 @@ var error = () => {
|
|
|
5095
5053
|
base64url: "base64url-encoded string",
|
|
5096
5054
|
json_string: "JSON string",
|
|
5097
5055
|
e164: "E.164 number",
|
|
5056
|
+
currency_code: "currency code",
|
|
5098
5057
|
credit_card: "credit card number",
|
|
5099
5058
|
iban: "IBAN",
|
|
5100
5059
|
jwt: "JWT",
|
|
@@ -5176,7 +5135,7 @@ function en_default() {
|
|
|
5176
5135
|
localeError: error()
|
|
5177
5136
|
};
|
|
5178
5137
|
}
|
|
5179
|
-
// node_modules/.bun/zod@4.6.
|
|
5138
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/registries.js
|
|
5180
5139
|
var _a2;
|
|
5181
5140
|
class $ZodRegistry {
|
|
5182
5141
|
constructor() {
|
|
@@ -5223,12 +5182,14 @@ function registry() {
|
|
|
5223
5182
|
}
|
|
5224
5183
|
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
5225
5184
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
5226
|
-
// node_modules/.bun/zod@4.6.
|
|
5185
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/api.js
|
|
5186
|
+
function snapshotChecks(def) {
|
|
5187
|
+
if (def.checks)
|
|
5188
|
+
def.checks = [...def.checks];
|
|
5189
|
+
return def;
|
|
5190
|
+
}
|
|
5227
5191
|
function _string(Class, params) {
|
|
5228
|
-
return new Class({
|
|
5229
|
-
type: "string",
|
|
5230
|
-
...normalizeParams(params)
|
|
5231
|
-
});
|
|
5192
|
+
return new Class(snapshotChecks({ type: "string", ...normalizeParams(params) }));
|
|
5232
5193
|
}
|
|
5233
5194
|
function _email(Class, params) {
|
|
5234
5195
|
return new Class({
|
|
@@ -5468,11 +5429,7 @@ function _isoDuration(Class, params) {
|
|
|
5468
5429
|
});
|
|
5469
5430
|
}
|
|
5470
5431
|
function _number(Class, params) {
|
|
5471
|
-
return new Class({
|
|
5472
|
-
type: "number",
|
|
5473
|
-
checks: [],
|
|
5474
|
-
...normalizeParams(params)
|
|
5475
|
-
});
|
|
5432
|
+
return new Class(snapshotChecks({ type: "number", checks: [], ...normalizeParams(params) }));
|
|
5476
5433
|
}
|
|
5477
5434
|
function _int(Class, params) {
|
|
5478
5435
|
return new Class({
|
|
@@ -5673,7 +5630,7 @@ function _check(fn, params) {
|
|
|
5673
5630
|
ch._zod.check = fn;
|
|
5674
5631
|
return ch;
|
|
5675
5632
|
}
|
|
5676
|
-
// node_modules/.bun/zod@4.6.
|
|
5633
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/to-json-schema.js
|
|
5677
5634
|
function assignProps(target, ...sources) {
|
|
5678
5635
|
for (const source of sources) {
|
|
5679
5636
|
for (const key of Reflect.ownKeys(source)) {
|
|
@@ -6196,7 +6153,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
|
|
|
6196
6153
|
extractDefs(ctx, schema);
|
|
6197
6154
|
return finalize(ctx, schema);
|
|
6198
6155
|
};
|
|
6199
|
-
// node_modules/.bun/zod@4.6.
|
|
6156
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/core/json-schema-processors.js
|
|
6200
6157
|
var narrowMin = (agg, key, value) => {
|
|
6201
6158
|
if (agg[key] === undefined || value > agg[key])
|
|
6202
6159
|
agg[key] = value;
|
|
@@ -6476,17 +6433,15 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
6476
6433
|
path: [...params.path, "properties", key]
|
|
6477
6434
|
}));
|
|
6478
6435
|
}
|
|
6479
|
-
const
|
|
6480
|
-
const
|
|
6436
|
+
const requiredKeys = [];
|
|
6437
|
+
for (const key of Object.keys(shape)) {
|
|
6481
6438
|
const field = def.shape[key];
|
|
6482
|
-
if (ctx.io === "input") {
|
|
6483
|
-
|
|
6484
|
-
} else {
|
|
6485
|
-
return field._zod.optout === undefined;
|
|
6439
|
+
if (ctx.io === "input" ? inputOptin(field) === undefined : field._zod.optout === undefined) {
|
|
6440
|
+
requiredKeys.push(key);
|
|
6486
6441
|
}
|
|
6487
|
-
}
|
|
6488
|
-
if (requiredKeys.
|
|
6489
|
-
json.required =
|
|
6442
|
+
}
|
|
6443
|
+
if (requiredKeys.length > 0) {
|
|
6444
|
+
json.required = requiredKeys;
|
|
6490
6445
|
}
|
|
6491
6446
|
if (def.catchall?._zod.def.type === "never") {
|
|
6492
6447
|
json.additionalProperties = false;
|
|
@@ -6723,7 +6678,7 @@ var optionalProcessor = (schema, ctx, _json, params) => {
|
|
|
6723
6678
|
const seen = ctx.seen.get(schema);
|
|
6724
6679
|
seen.ref = def.innerType;
|
|
6725
6680
|
};
|
|
6726
|
-
// node_modules/.bun/zod@4.6.
|
|
6681
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/classic/errors.js
|
|
6727
6682
|
var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
6728
6683
|
function _lazyMethod(proto, key, make) {
|
|
6729
6684
|
Object.defineProperty(proto, key, {
|
|
@@ -6768,7 +6723,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, undefi
|
|
|
6768
6723
|
Parent: Error
|
|
6769
6724
|
});
|
|
6770
6725
|
|
|
6771
|
-
// node_modules/.bun/zod@4.6.
|
|
6726
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/classic/parse.js
|
|
6772
6727
|
var parse4 = /* @__PURE__ */ _parse(ZodRealError);
|
|
6773
6728
|
var parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
6774
6729
|
var safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -6782,7 +6737,7 @@ var safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
6782
6737
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
6783
6738
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
6784
6739
|
|
|
6785
|
-
// node_modules/.bun/zod@4.6.
|
|
6740
|
+
// node_modules/.bun/zod@4.6.4/node_modules/zod/v4/classic/schemas.js
|
|
6786
6741
|
function _ensureDefaultLocale() {
|
|
6787
6742
|
if (!globalConfig.localeError)
|
|
6788
6743
|
config(en_default());
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const MAX_INPUT_ID_LENGTH = 128;
|
|
3
|
+
export declare const MAX_REASON_LENGTH = 2048;
|
|
4
|
+
export declare const MAX_FINDINGS = 32;
|
|
5
|
+
export declare const MAX_PERSONAS = 64;
|
|
6
|
+
export declare const REVIEW_ARTIFACT_CUSTOM_MESSAGES: readonly ['severity count must match rejected finding count', 'filtered findings require a validation reason', 'risk-critical dispatches require a non-empty selection surface', 'satisfied risk coverage requires a citing input finding ID', 'unsatisfied risk coverage must not cite an input finding ID', 'passed validation must not include a reason; non-passed validation requires a reason', 'validation_unavailable dispatches must record zero input findings', 'a completed run must not contain validation_unavailable evidence', 'a validation_unavailable persona must not have an input finding', 'every synthesized input finding ID must resolve to an admitted ledger row', 'every provenance submitter must be represented by a cited admitted ledger row', 'satisfied risk coverage must cite an admitted ledger row', 'duplicate admitted input finding IDs are not allowed', 'every cited admitted reviewer must appear in provenance.submitters', 'provenance.submitters must not contain duplicate reviewers', 'provenance.agreement_credit must not contain duplicate reviewers', 'provenance.agreement_credit must not overlap provenance.submitters', 'provenance.agreement_credit requires an eligible returned persona with admitted evidence', 'satisfied risk coverage must cite an admitted ledger row owned by another persona'];
|
|
3
7
|
export declare const DispatchOutcomeSchema: z.ZodEnum<{
|
|
4
8
|
empty: "empty";
|
|
5
9
|
findings: "findings";
|
|
@@ -20,6 +24,14 @@ export declare const HarnessSchema: z.ZodEnum<{
|
|
|
20
24
|
pi: "pi";
|
|
21
25
|
}>;
|
|
22
26
|
export declare const RepoRelativePathSchema: z.ZodString;
|
|
27
|
+
export declare const RISK_CRITICAL_PERSONAS: readonly ['security', 'data-migrations', 'api-contract', 'reliability', 'performance'];
|
|
28
|
+
export declare const SeveritySchema: z.ZodEnum<{
|
|
29
|
+
P0: "P0";
|
|
30
|
+
P1: "P1";
|
|
31
|
+
P2: "P2";
|
|
32
|
+
P3: "P3";
|
|
33
|
+
unknown: "unknown";
|
|
34
|
+
}>;
|
|
23
35
|
export declare const InputFindingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
36
|
record_type: z.ZodLiteral<"admitted">;
|
|
25
37
|
input_id: z.ZodString;
|
|
@@ -54,6 +66,11 @@ export declare const InputFindingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
54
66
|
}>;
|
|
55
67
|
reason: z.ZodString;
|
|
56
68
|
}, z.core.$strict>], "record_type">;
|
|
69
|
+
export declare const ProvenanceSchema: z.ZodObject<{
|
|
70
|
+
fingerprint: z.ZodString;
|
|
71
|
+
submitters: z.ZodArray<z.ZodString>;
|
|
72
|
+
agreement_credit: z.ZodArray<z.ZodString>;
|
|
73
|
+
}, z.core.$strict>;
|
|
57
74
|
declare const SynthesizedFindingFieldsSchema: z.ZodObject<{
|
|
58
75
|
title: z.ZodString;
|
|
59
76
|
severity: z.ZodEnum<{
|