vigiles 15.4.0 → 16.0.0
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/dist/adapters/claude-code/run-scripts.d.ts +4 -4
- package/dist/adapters/claude-code/run-scripts.js +6 -6
- package/dist/adapters/claude-code/typed-spec.d.ts +26 -3
- package/dist/adapters/claude-code/typed-spec.js +21 -4
- package/dist/audit-report.template.html +1 -1
- package/dist/audit-score.d.ts +1 -1
- package/dist/audit-score.js +2 -2
- package/dist/check-count.js +1 -1
- package/dist/claude-code.d.ts +1 -1
- package/dist/claude-code.js +3 -3
- package/dist/cli.js +8 -8
- package/dist/codex.d.ts +1 -1
- package/dist/codex.js +1 -1
- package/dist/core/spec.d.ts +37 -5
- package/dist/core/spec.js +33 -7
- package/dist/eval-surface.d.ts +122 -0
- package/dist/eval-surface.js +130 -0
- package/dist/harness-assert.d.ts +1 -1
- package/dist/harness-assert.js +2 -2
- package/dist/load-hook.d.ts +1 -1
- package/dist/load-hook.js +1 -1
- package/dist/run-hook.js +1 -1
- package/dist/scaffold-test.js +7 -11
- package/dist/scan-trigger-suggest.d.ts +3 -3
- package/dist/scan-trigger-suggest.js +4 -4
- package/dist/test-coverage.js +1 -1
- package/dist/test.d.ts +75 -0
- package/dist/test.js +192 -0
- package/package.json +9 -8
- package/skills/test-harness/SKILL.md +16 -14
- package/dist/e2e.d.ts +0 -18
- package/dist/e2e.js +0 -34
- package/dist/integration.d.ts +0 -29
- package/dist/integration.js +0 -58
- package/dist/testing.d.ts +0 -41
- package/dist/testing.js +0 -123
- package/dist/unit.d.ts +0 -39
- package/dist/unit.js +0 -74
package/dist/integration.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `vigiles/integration` — the **deterministic, assembled-machine** tier.
|
|
3
|
-
*
|
|
4
|
-
* Re-exports everything in [`vigiles/unit`](./unit.ts) and adds the
|
|
5
|
-
* harness-agnostic runners for the assembled machine: `runHarnessTest` /
|
|
6
|
-
* `runHarness` (real hooks fire, outcome reproducible) plus the generic trace
|
|
7
|
-
* parsers and the sandbox policy. Capability contract: needs the **`claude`
|
|
8
|
-
* binary and bubblewrap**, but **no API key and no network**. A
|
|
9
|
-
* `*.integration.test.ts` imports from here.
|
|
10
|
-
*
|
|
11
|
-
* The Claude-Code **transport** — the scripted mock (`scriptModel`) and the
|
|
12
|
-
* plugin loader (`loadPlugin` / `resolveHarness`) — is harness-specific, so it is
|
|
13
|
-
* NOT re-exported here (this surface stays agnostic, enforced by the
|
|
14
|
-
* `agnostic-surface ⊄ adapter` boundary lint). Import it from
|
|
15
|
-
* [`vigiles/claude-code`](./claude-code.ts):
|
|
16
|
-
* `import { scriptModel, loadPlugin } from "vigiles/claude-code"`.
|
|
17
|
-
*
|
|
18
|
-
* Real **egress** is a CAPABILITY of this scope (the former `e2e` tier), not a
|
|
19
|
-
* separate tier: `egressRoutes()` probes whether allowlisted egress can route,
|
|
20
|
-
* and `runHook` takes `egress: { allow }` for allowlisted real outbound — gated
|
|
21
|
-
* by a routable sandbox + real network (a test self-skips via `egressRoutes()`).
|
|
22
|
-
* `vigiles/e2e` remains as a thin back-compat alias. See
|
|
23
|
-
* `research/testing-api-design.md` Part 4.
|
|
24
|
-
*/
|
|
25
|
-
export * from "./unit.js";
|
|
26
|
-
export { runHarnessTest, runHarness, parseToolCalls, parseSubagents, parseResultEvent, parseOutput, parseHooks, decideSandbox, specTrusted, sandboxAvailable, } from "./harness-test.js";
|
|
27
|
-
export type { HarnessTestSpec, Trace, SubagentTrace, HarnessTestResult, RunHarnessTestOptions, ModelTurn, ModelRequest, ToolCall, HookFire, HarnessTestDriver, SandboxMode, } from "./harness-test.js";
|
|
28
|
-
export { egressRoutes } from "./run-hook.js";
|
|
29
|
-
//# sourceMappingURL=integration.d.ts.map
|
package/dist/integration.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.egressRoutes = exports.sandboxAvailable = exports.specTrusted = exports.decideSandbox = exports.parseHooks = exports.parseOutput = exports.parseResultEvent = exports.parseSubagents = exports.parseToolCalls = exports.runHarness = exports.runHarnessTest = void 0;
|
|
18
|
-
/**
|
|
19
|
-
* `vigiles/integration` — the **deterministic, assembled-machine** tier.
|
|
20
|
-
*
|
|
21
|
-
* Re-exports everything in [`vigiles/unit`](./unit.ts) and adds the
|
|
22
|
-
* harness-agnostic runners for the assembled machine: `runHarnessTest` /
|
|
23
|
-
* `runHarness` (real hooks fire, outcome reproducible) plus the generic trace
|
|
24
|
-
* parsers and the sandbox policy. Capability contract: needs the **`claude`
|
|
25
|
-
* binary and bubblewrap**, but **no API key and no network**. A
|
|
26
|
-
* `*.integration.test.ts` imports from here.
|
|
27
|
-
*
|
|
28
|
-
* The Claude-Code **transport** — the scripted mock (`scriptModel`) and the
|
|
29
|
-
* plugin loader (`loadPlugin` / `resolveHarness`) — is harness-specific, so it is
|
|
30
|
-
* NOT re-exported here (this surface stays agnostic, enforced by the
|
|
31
|
-
* `agnostic-surface ⊄ adapter` boundary lint). Import it from
|
|
32
|
-
* [`vigiles/claude-code`](./claude-code.ts):
|
|
33
|
-
* `import { scriptModel, loadPlugin } from "vigiles/claude-code"`.
|
|
34
|
-
*
|
|
35
|
-
* Real **egress** is a CAPABILITY of this scope (the former `e2e` tier), not a
|
|
36
|
-
* separate tier: `egressRoutes()` probes whether allowlisted egress can route,
|
|
37
|
-
* and `runHook` takes `egress: { allow }` for allowlisted real outbound — gated
|
|
38
|
-
* by a routable sandbox + real network (a test self-skips via `egressRoutes()`).
|
|
39
|
-
* `vigiles/e2e` remains as a thin back-compat alias. See
|
|
40
|
-
* `research/testing-api-design.md` Part 4.
|
|
41
|
-
*/
|
|
42
|
-
__exportStar(require("./unit.js"), exports);
|
|
43
|
-
// The harness-test tier — AGNOSTIC SURFACE ONLY (CC transport lives in
|
|
44
|
-
// vigiles/claude-code; see the module doc above).
|
|
45
|
-
var harness_test_js_1 = require("./harness-test.js");
|
|
46
|
-
Object.defineProperty(exports, "runHarnessTest", { enumerable: true, get: function () { return harness_test_js_1.runHarnessTest; } });
|
|
47
|
-
Object.defineProperty(exports, "runHarness", { enumerable: true, get: function () { return harness_test_js_1.runHarness; } });
|
|
48
|
-
Object.defineProperty(exports, "parseToolCalls", { enumerable: true, get: function () { return harness_test_js_1.parseToolCalls; } });
|
|
49
|
-
Object.defineProperty(exports, "parseSubagents", { enumerable: true, get: function () { return harness_test_js_1.parseSubagents; } });
|
|
50
|
-
Object.defineProperty(exports, "parseResultEvent", { enumerable: true, get: function () { return harness_test_js_1.parseResultEvent; } });
|
|
51
|
-
Object.defineProperty(exports, "parseOutput", { enumerable: true, get: function () { return harness_test_js_1.parseOutput; } });
|
|
52
|
-
Object.defineProperty(exports, "parseHooks", { enumerable: true, get: function () { return harness_test_js_1.parseHooks; } });
|
|
53
|
-
Object.defineProperty(exports, "decideSandbox", { enumerable: true, get: function () { return harness_test_js_1.decideSandbox; } });
|
|
54
|
-
Object.defineProperty(exports, "specTrusted", { enumerable: true, get: function () { return harness_test_js_1.specTrusted; } });
|
|
55
|
-
Object.defineProperty(exports, "sandboxAvailable", { enumerable: true, get: function () { return harness_test_js_1.sandboxAvailable; } });
|
|
56
|
-
var run_hook_js_1 = require("./run-hook.js");
|
|
57
|
-
Object.defineProperty(exports, "egressRoutes", { enumerable: true, get: function () { return run_hook_js_1.egressRoutes; } });
|
|
58
|
-
//# sourceMappingURL=integration.js.map
|
package/dist/testing.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `vigiles/testing` — Pillar 2 entry point: the **harness-testing** API. Re-exports
|
|
3
|
-
* the three tiers — `runHook` (unit), `runHarnessTest` (deterministic), `runEval`
|
|
4
|
-
* (eval) — plus the runner-agnostic predicates/assertions. Kept deliberately
|
|
5
|
-
* separate from `vigiles/claude-code` so this surface can stay harness-agnostic as
|
|
6
|
-
* more harnesses are added.
|
|
7
|
-
*
|
|
8
|
-
* 🔴 THIS LINE USED TO SAY the granular paths (`vigiles/run-hook`, etc.) «still
|
|
9
|
-
* work». MEASURED 2026-08-16: they do not. `vigiles/run-hook`, `vigiles/eval`,
|
|
10
|
-
* `vigiles/harness-test`, `vigiles/harness-assert`, `vigiles/skill` and
|
|
11
|
-
* `vigiles/skill-test` all raise ERR_PACKAGE_PATH_NOT_EXPORTED — six paths this
|
|
12
|
-
* package advertised to its own readers and does not serve. A promise that an
|
|
13
|
-
* import keeps working is exactly the kind a reader has no reason to re-check.
|
|
14
|
-
*
|
|
15
|
-
* It re-exports the composition-root runner modules (which do the Claude-Code
|
|
16
|
-
* default-wiring), never an adapter directly — the `agnostic-surface` eslint
|
|
17
|
-
* boundary forbids importing `src/adapters/*` from here. See
|
|
18
|
-
* `research/adapter-api-design.md`.
|
|
19
|
-
*/
|
|
20
|
-
export { recordCheck } from "./check-count.js";
|
|
21
|
-
export { runScript } from "./run-script.js";
|
|
22
|
-
export type { RunScriptOptions, ScriptRunResult } from "./run-script.js";
|
|
23
|
-
export { runHook, propertyHook, fileToolEvents } from "./run-hook.js";
|
|
24
|
-
export type { HookRunResult, RunHookOptions, HookInput, HookOutput, HookPropertyResult, FileToolEventOptions, } from "./run-hook.js";
|
|
25
|
-
export { runEval, measure, measureArms, measureTriggerRate, assertRates, assertPromptDiversity, checkPromptDiversity, checkReportToJUnit, formatCheckReport, formatEvalReport, formatTriggerRateReport, claudeEvalDriver, parseClaudeRun, stubSkillBody, } from "./eval.js";
|
|
26
|
-
export type { EvalArm, EvalDriver, EvalSpec, EvalReport, EvalUsage, MeasureSpec, ArmsMeasureSpec, ArmReport, ArmUsage, ArmsCheckReport, CheckRate, CheckReport, MetricStat, Metrics, ModelOutputParser, ParsedModelRun, PromptDiversityIssue, PromptTriggerStat, RunContext, RunOut, SelectionTrialResult, TriggerRateReport, TriggerRateSpec, AgentRunArgs, AgentRunner, } from "./eval.js";
|
|
27
|
-
export * from "./harness-assert.js";
|
|
28
|
-
export { loadHook } from "./load-hook.js";
|
|
29
|
-
export * from "./check.js";
|
|
30
|
-
export { hookFired } from "./check.js";
|
|
31
|
-
export { judge } from "./judge.js";
|
|
32
|
-
export * from "./tool-stub.js";
|
|
33
|
-
export { runHarnessTest, runHarness } from "./harness-test.js";
|
|
34
|
-
export { commandsIn, mustInclude, mustNotInclude } from "./doc-commands.js";
|
|
35
|
-
export type { DocCommand } from "./doc-commands.js";
|
|
36
|
-
export { skillContract } from "./skill-contract.js";
|
|
37
|
-
export { compareContainment, formatContainment, } from "./trigger-containment.js";
|
|
38
|
-
export type { ContainmentInput, ContainmentVerdict, } from "./trigger-containment.js";
|
|
39
|
-
export type { SkillContract, SkillContractOptions } from "./skill-contract.js";
|
|
40
|
-
export type { HarnessTestSpec, Trace, SubagentTrace, HarnessTestResult, RunHarnessTestOptions, ModelTurn, ModelRequest, ToolCall, HookFire, HarnessTestDriver, SandboxMode, } from "./harness-test.js";
|
|
41
|
-
//# sourceMappingURL=testing.d.ts.map
|
package/dist/testing.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* `vigiles/testing` — Pillar 2 entry point: the **harness-testing** API. Re-exports
|
|
4
|
-
* the three tiers — `runHook` (unit), `runHarnessTest` (deterministic), `runEval`
|
|
5
|
-
* (eval) — plus the runner-agnostic predicates/assertions. Kept deliberately
|
|
6
|
-
* separate from `vigiles/claude-code` so this surface can stay harness-agnostic as
|
|
7
|
-
* more harnesses are added.
|
|
8
|
-
*
|
|
9
|
-
* 🔴 THIS LINE USED TO SAY the granular paths (`vigiles/run-hook`, etc.) «still
|
|
10
|
-
* work». MEASURED 2026-08-16: they do not. `vigiles/run-hook`, `vigiles/eval`,
|
|
11
|
-
* `vigiles/harness-test`, `vigiles/harness-assert`, `vigiles/skill` and
|
|
12
|
-
* `vigiles/skill-test` all raise ERR_PACKAGE_PATH_NOT_EXPORTED — six paths this
|
|
13
|
-
* package advertised to its own readers and does not serve. A promise that an
|
|
14
|
-
* import keeps working is exactly the kind a reader has no reason to re-check.
|
|
15
|
-
*
|
|
16
|
-
* It re-exports the composition-root runner modules (which do the Claude-Code
|
|
17
|
-
* default-wiring), never an adapter directly — the `agnostic-surface` eslint
|
|
18
|
-
* boundary forbids importing `src/adapters/*` from here. See
|
|
19
|
-
* `research/adapter-api-design.md`.
|
|
20
|
-
*/
|
|
21
|
-
// Curated public re-exports (named, not `export *`) so the internal seams —
|
|
22
|
-
// the injectable `*With` runners, low-level `parse*`, pool/aggregate/model-tier
|
|
23
|
-
// helpers — stay out of the public surface, the api reports, and the docs site.
|
|
24
|
-
// (vigiles's own tests import those from the source modules directly.)
|
|
25
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
26
|
-
if (k2 === undefined) k2 = k;
|
|
27
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
28
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
29
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
30
|
-
}
|
|
31
|
-
Object.defineProperty(o, k2, desc);
|
|
32
|
-
}) : (function(o, m, k, k2) {
|
|
33
|
-
if (k2 === undefined) k2 = k;
|
|
34
|
-
o[k2] = m[k];
|
|
35
|
-
}));
|
|
36
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
37
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.formatContainment = exports.compareContainment = exports.skillContract = exports.mustNotInclude = exports.mustInclude = exports.commandsIn = exports.runHarness = exports.runHarnessTest = exports.judge = exports.hookFired = exports.loadHook = exports.stubSkillBody = exports.parseClaudeRun = exports.claudeEvalDriver = exports.formatTriggerRateReport = exports.formatEvalReport = exports.formatCheckReport = exports.checkReportToJUnit = exports.checkPromptDiversity = exports.assertPromptDiversity = exports.assertRates = exports.measureTriggerRate = exports.measureArms = exports.measure = exports.runEval = exports.fileToolEvents = exports.propertyHook = exports.runHook = exports.runScript = exports.recordCheck = void 0;
|
|
41
|
-
// --- reporting: how much did this script actually do? ---
|
|
42
|
-
// `vigiles test` can otherwise see only an exit code, so a file that runs NOTHING
|
|
43
|
-
// prints the same `✓` as one that ran and passed (measured 2026-08-08 on a file
|
|
44
|
-
// exporting an object of tests nobody calls). The tiers below count themselves;
|
|
45
|
-
// call `recordCheck()` yourself when you assert some OTHER way — `node:assert`,
|
|
46
|
-
// vitest's `expect` — so those are visible to the runner too. See check-count.ts.
|
|
47
|
-
var check_count_js_1 = require("./check-count.js");
|
|
48
|
-
Object.defineProperty(exports, "recordCheck", { enumerable: true, get: function () { return check_count_js_1.recordCheck; } });
|
|
49
|
-
// --- unit tier: runScript (the primitive) + runHook (it, plus a decision) ---
|
|
50
|
-
// `runScript` runs any program and reports what it DID (exit, both streams,
|
|
51
|
-
// writes, egress). `runHook` is that plus the hook protocol: event to stdin,
|
|
52
|
-
// exit code to allow/deny. Testing a plain helper script? Reach for runScript —
|
|
53
|
-
// its result carries no `decision`, because a script does not have one.
|
|
54
|
-
var run_script_js_1 = require("./run-script.js");
|
|
55
|
-
Object.defineProperty(exports, "runScript", { enumerable: true, get: function () { return run_script_js_1.runScript; } });
|
|
56
|
-
var run_hook_js_1 = require("./run-hook.js");
|
|
57
|
-
Object.defineProperty(exports, "runHook", { enumerable: true, get: function () { return run_hook_js_1.runHook; } });
|
|
58
|
-
Object.defineProperty(exports, "propertyHook", { enumerable: true, get: function () { return run_hook_js_1.propertyHook; } });
|
|
59
|
-
Object.defineProperty(exports, "fileToolEvents", { enumerable: true, get: function () { return run_hook_js_1.fileToolEvents; } });
|
|
60
|
-
// --- eval tier: runEval / measure / trigger-rate ---
|
|
61
|
-
var eval_js_1 = require("./eval.js");
|
|
62
|
-
Object.defineProperty(exports, "runEval", { enumerable: true, get: function () { return eval_js_1.runEval; } });
|
|
63
|
-
Object.defineProperty(exports, "measure", { enumerable: true, get: function () { return eval_js_1.measure; } });
|
|
64
|
-
Object.defineProperty(exports, "measureArms", { enumerable: true, get: function () { return eval_js_1.measureArms; } });
|
|
65
|
-
Object.defineProperty(exports, "measureTriggerRate", { enumerable: true, get: function () { return eval_js_1.measureTriggerRate; } });
|
|
66
|
-
Object.defineProperty(exports, "assertRates", { enumerable: true, get: function () { return eval_js_1.assertRates; } });
|
|
67
|
-
Object.defineProperty(exports, "assertPromptDiversity", { enumerable: true, get: function () { return eval_js_1.assertPromptDiversity; } });
|
|
68
|
-
Object.defineProperty(exports, "checkPromptDiversity", { enumerable: true, get: function () { return eval_js_1.checkPromptDiversity; } });
|
|
69
|
-
Object.defineProperty(exports, "checkReportToJUnit", { enumerable: true, get: function () { return eval_js_1.checkReportToJUnit; } });
|
|
70
|
-
Object.defineProperty(exports, "formatCheckReport", { enumerable: true, get: function () { return eval_js_1.formatCheckReport; } });
|
|
71
|
-
Object.defineProperty(exports, "formatEvalReport", { enumerable: true, get: function () { return eval_js_1.formatEvalReport; } });
|
|
72
|
-
Object.defineProperty(exports, "formatTriggerRateReport", { enumerable: true, get: function () { return eval_js_1.formatTriggerRateReport; } });
|
|
73
|
-
Object.defineProperty(exports, "claudeEvalDriver", { enumerable: true, get: function () { return eval_js_1.claudeEvalDriver; } });
|
|
74
|
-
Object.defineProperty(exports, "parseClaudeRun", { enumerable: true, get: function () { return eval_js_1.parseClaudeRun; } });
|
|
75
|
-
Object.defineProperty(exports, "stubSkillBody", { enumerable: true, get: function () { return eval_js_1.stubSkillBody; } });
|
|
76
|
-
__exportStar(require("./harness-assert.js"), exports);
|
|
77
|
-
// The compiled-hook LOADER. The in-process assertions above take the hook
|
|
78
|
-
// OBJECT, but a `.harness.mjs` test only has its PATH — without this the
|
|
79
|
-
// intended in-process test path is unreachable from the file format
|
|
80
|
-
// `vigiles test` actually runs, and authors fall back to spawning the runtime as
|
|
81
|
-
// a subprocess (the very plumbing compiled hooks exist to remove). Same loader
|
|
82
|
-
// the CLI runtime uses, so a hook that loads in a test loads identically in prod.
|
|
83
|
-
var load_hook_js_1 = require("./load-hook.js");
|
|
84
|
-
Object.defineProperty(exports, "loadHook", { enumerable: true, get: function () { return load_hook_js_1.loadHook; } });
|
|
85
|
-
// The declarative check vocabulary is now first-class at the front door. Its
|
|
86
|
-
// `hookFired` (a `Check<Trace>`) supersedes the legacy boolean predicate of the
|
|
87
|
-
// same name — the explicit re-export below wins over the two `export *`s.
|
|
88
|
-
__exportStar(require("./check.js"), exports);
|
|
89
|
-
var check_js_1 = require("./check.js");
|
|
90
|
-
Object.defineProperty(exports, "hookFired", { enumerable: true, get: function () { return check_js_1.hookFired; } });
|
|
91
|
-
// The model-graded judge (agnostic — grades text against a rubric). Public here
|
|
92
|
-
// now that `vigiles/judge` is no longer a standalone subpath.
|
|
93
|
-
var judge_js_1 = require("./judge.js");
|
|
94
|
-
Object.defineProperty(exports, "judge", { enumerable: true, get: function () { return judge_js_1.judge; } });
|
|
95
|
-
// Tool stubs on PATH (rung R2): shadow a CLI tool with a recorded canned result.
|
|
96
|
-
__exportStar(require("./tool-stub.js"), exports);
|
|
97
|
-
// The harness-test tier — AGNOSTIC SURFACE ONLY. The Claude-Code transport
|
|
98
|
-
// (`scriptModel`, `claudeCodeDriver`, `buildClaudeArgs`, `parseClaudeRun`,
|
|
99
|
-
// `claudeAvailable`, `loadPlugin`, `resolveHarness`) is deliberately NOT
|
|
100
|
-
// re-exported here, so `vigiles/testing` stays harness-agnostic — import those
|
|
101
|
-
// from `vigiles/claude-code` (or your harness's package). See
|
|
102
|
-
// `research/code-adapter-architecture.md`.
|
|
103
|
-
var harness_test_js_1 = require("./harness-test.js");
|
|
104
|
-
Object.defineProperty(exports, "runHarnessTest", { enumerable: true, get: function () { return harness_test_js_1.runHarnessTest; } });
|
|
105
|
-
Object.defineProperty(exports, "runHarness", { enumerable: true, get: function () { return harness_test_js_1.runHarness; } });
|
|
106
|
-
// A document's own rule about its own COMMANDS, made checkable. vigiles cannot
|
|
107
|
-
// infer "always pass -g" from prose; what was missing was a cheap way to declare
|
|
108
|
-
// it — measured at ~95 lines of markdown parsing around ~5 lines of rule, which
|
|
109
|
-
// is why nobody wrote the check and the rule stayed prose.
|
|
110
|
-
var doc_commands_js_1 = require("./doc-commands.js");
|
|
111
|
-
Object.defineProperty(exports, "commandsIn", { enumerable: true, get: function () { return doc_commands_js_1.commandsIn; } });
|
|
112
|
-
Object.defineProperty(exports, "mustInclude", { enumerable: true, get: function () { return doc_commands_js_1.mustInclude; } });
|
|
113
|
-
Object.defineProperty(exports, "mustNotInclude", { enumerable: true, get: function () { return doc_commands_js_1.mustNotInclude; } });
|
|
114
|
-
// A skill's own `allowed-tools:` frontmatter, read back as checks — the wiring
|
|
115
|
-
// from a declaration to the existing check vocabulary, not new machinery.
|
|
116
|
-
var skill_contract_js_1 = require("./skill-contract.js");
|
|
117
|
-
Object.defineProperty(exports, "skillContract", { enumerable: true, get: function () { return skill_contract_js_1.skillContract; } });
|
|
118
|
-
// Is a WEAKER model a valid lower bound for trigger-rate? Pure comparison of two
|
|
119
|
-
// runs; the open question the model floor makes people ask.
|
|
120
|
-
var trigger_containment_js_1 = require("./trigger-containment.js");
|
|
121
|
-
Object.defineProperty(exports, "compareContainment", { enumerable: true, get: function () { return trigger_containment_js_1.compareContainment; } });
|
|
122
|
-
Object.defineProperty(exports, "formatContainment", { enumerable: true, get: function () { return trigger_containment_js_1.formatContainment; } });
|
|
123
|
-
//# sourceMappingURL=testing.js.map
|
package/dist/unit.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `vigiles/unit` — the **no-capability** harness-testing surface.
|
|
3
|
-
*
|
|
4
|
-
* Importing from here is MOSTLY a contract: this test needs no `claude`, no
|
|
5
|
-
* bubblewrap and no network — only a process. It is the cheap base of the pyramid:
|
|
6
|
-
*
|
|
7
|
-
* 🔴 «NO MODEL» IS NOT TRUE TODAY, AND SAYING SO WAS THE WORST OF THE FOUR
|
|
8
|
-
* MISSTATEMENTS ON THIS SURFACE, because it reads as a guarantee rather than a
|
|
9
|
-
* description. `judged` is re-exported here and its default judge is a REAL model
|
|
10
|
-
* call — `check.ts` resolves `opts.judge ?? ((o) => runJudge(o))`. So a test that
|
|
11
|
-
* imports only from this barrel can still spend money, and the one line a reader
|
|
12
|
-
* would rely on to know it cannot is this one.
|
|
13
|
-
*
|
|
14
|
-
* The honest fix is to MOVE `judged` off this barrel, not to reword the sentence —
|
|
15
|
-
* but that changes the public surface, and the surface is being reorganised
|
|
16
|
-
* separately (the measured proposal splits by COST: everything free on one path,
|
|
17
|
-
* everything that spends money on another, where this defect becomes unexpressible
|
|
18
|
-
* rather than merely documented). Until that lands, the claim is corrected here
|
|
19
|
-
* rather than left standing.
|
|
20
|
-
*
|
|
21
|
-
* `runHook` (pipe a synthesized event to a hook and read the block/allow
|
|
22
|
-
* decision), the bare `Trace` predicates, the `assert*` helpers, and the pure
|
|
23
|
-
* parsers. A `*.test.ts` should import **only** from here (enforced by lint).
|
|
24
|
-
*
|
|
25
|
-
* Higher tiers re-export this one — dependencies point downward only
|
|
26
|
-
* (e2e → integration → unit), never up. See `vigiles/integration` and
|
|
27
|
-
* `vigiles/e2e`.
|
|
28
|
-
*/
|
|
29
|
-
export * from "./harness-assert.js";
|
|
30
|
-
export { loadHook } from "./load-hook.js";
|
|
31
|
-
export { runHook, parseHookOutput, decideHook, propertyHook, fileToolEvents, } from "./run-hook.js";
|
|
32
|
-
export type { HookInput, HookOutput, HookRunResult, RunHookOptions, HookPropertyResult, FileToolEventOptions, } from "./run-hook.js";
|
|
33
|
-
export { runScript } from "./run-script.js";
|
|
34
|
-
export type { RunScriptOptions, ScriptRunResult } from "./run-script.js";
|
|
35
|
-
export * from "./check.js";
|
|
36
|
-
export { hookFired } from "./check.js";
|
|
37
|
-
export { DISASTER_CATALOG, verifyGuardrail, unblockedDisasters, assertBlocksDisasters, formatGuardrailReport, } from "./guardrail-check.js";
|
|
38
|
-
export type { DisasterEvent, DisasterCategory, GuardrailResult, VerifyGuardrailOptions, } from "./guardrail-check.js";
|
|
39
|
-
//# sourceMappingURL=unit.d.ts.map
|
package/dist/unit.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.formatGuardrailReport = exports.assertBlocksDisasters = exports.unblockedDisasters = exports.verifyGuardrail = exports.DISASTER_CATALOG = exports.hookFired = exports.runScript = exports.fileToolEvents = exports.propertyHook = exports.decideHook = exports.parseHookOutput = exports.runHook = exports.loadHook = void 0;
|
|
18
|
-
/**
|
|
19
|
-
* `vigiles/unit` — the **no-capability** harness-testing surface.
|
|
20
|
-
*
|
|
21
|
-
* Importing from here is MOSTLY a contract: this test needs no `claude`, no
|
|
22
|
-
* bubblewrap and no network — only a process. It is the cheap base of the pyramid:
|
|
23
|
-
*
|
|
24
|
-
* 🔴 «NO MODEL» IS NOT TRUE TODAY, AND SAYING SO WAS THE WORST OF THE FOUR
|
|
25
|
-
* MISSTATEMENTS ON THIS SURFACE, because it reads as a guarantee rather than a
|
|
26
|
-
* description. `judged` is re-exported here and its default judge is a REAL model
|
|
27
|
-
* call — `check.ts` resolves `opts.judge ?? ((o) => runJudge(o))`. So a test that
|
|
28
|
-
* imports only from this barrel can still spend money, and the one line a reader
|
|
29
|
-
* would rely on to know it cannot is this one.
|
|
30
|
-
*
|
|
31
|
-
* The honest fix is to MOVE `judged` off this barrel, not to reword the sentence —
|
|
32
|
-
* but that changes the public surface, and the surface is being reorganised
|
|
33
|
-
* separately (the measured proposal splits by COST: everything free on one path,
|
|
34
|
-
* everything that spends money on another, where this defect becomes unexpressible
|
|
35
|
-
* rather than merely documented). Until that lands, the claim is corrected here
|
|
36
|
-
* rather than left standing.
|
|
37
|
-
*
|
|
38
|
-
* `runHook` (pipe a synthesized event to a hook and read the block/allow
|
|
39
|
-
* decision), the bare `Trace` predicates, the `assert*` helpers, and the pure
|
|
40
|
-
* parsers. A `*.test.ts` should import **only** from here (enforced by lint).
|
|
41
|
-
*
|
|
42
|
-
* Higher tiers re-export this one — dependencies point downward only
|
|
43
|
-
* (e2e → integration → unit), never up. See `vigiles/integration` and
|
|
44
|
-
* `vigiles/e2e`.
|
|
45
|
-
*/
|
|
46
|
-
__exportStar(require("./harness-assert.js"), exports);
|
|
47
|
-
// The compiled-hook loader belongs to the no-capability tier: it imports a local
|
|
48
|
-
// module and nothing else. Without it the in-process assertions above are
|
|
49
|
-
// unreachable from a test that only knows the hook's PATH.
|
|
50
|
-
var load_hook_js_1 = require("./load-hook.js");
|
|
51
|
-
Object.defineProperty(exports, "loadHook", { enumerable: true, get: function () { return load_hook_js_1.loadHook; } });
|
|
52
|
-
var run_hook_js_1 = require("./run-hook.js");
|
|
53
|
-
Object.defineProperty(exports, "runHook", { enumerable: true, get: function () { return run_hook_js_1.runHook; } });
|
|
54
|
-
Object.defineProperty(exports, "parseHookOutput", { enumerable: true, get: function () { return run_hook_js_1.parseHookOutput; } });
|
|
55
|
-
Object.defineProperty(exports, "decideHook", { enumerable: true, get: function () { return run_hook_js_1.decideHook; } });
|
|
56
|
-
Object.defineProperty(exports, "propertyHook", { enumerable: true, get: function () { return run_hook_js_1.propertyHook; } });
|
|
57
|
-
Object.defineProperty(exports, "fileToolEvents", { enumerable: true, get: function () { return run_hook_js_1.fileToolEvents; } });
|
|
58
|
-
// The PRIMITIVE beneath runHook: run any program, get what it did. A hook has a
|
|
59
|
-
// DECISION, a script has EFFECTS — two questions, so two result types.
|
|
60
|
-
var run_script_js_1 = require("./run-script.js");
|
|
61
|
-
Object.defineProperty(exports, "runScript", { enumerable: true, get: function () { return run_script_js_1.runScript; } });
|
|
62
|
-
// The check vocabulary is part of the base surface (pure, no capability). Its
|
|
63
|
-
// `hookFired` check supersedes the legacy boolean predicate of the same name.
|
|
64
|
-
__exportStar(require("./check.js"), exports);
|
|
65
|
-
var check_js_1 = require("./check.js");
|
|
66
|
-
Object.defineProperty(exports, "hookFired", { enumerable: true, get: function () { return check_js_1.hookFired; } });
|
|
67
|
-
// Guardrail verification — "prove your safety hook actually blocks" (over runHook).
|
|
68
|
-
var guardrail_check_js_1 = require("./guardrail-check.js");
|
|
69
|
-
Object.defineProperty(exports, "DISASTER_CATALOG", { enumerable: true, get: function () { return guardrail_check_js_1.DISASTER_CATALOG; } });
|
|
70
|
-
Object.defineProperty(exports, "verifyGuardrail", { enumerable: true, get: function () { return guardrail_check_js_1.verifyGuardrail; } });
|
|
71
|
-
Object.defineProperty(exports, "unblockedDisasters", { enumerable: true, get: function () { return guardrail_check_js_1.unblockedDisasters; } });
|
|
72
|
-
Object.defineProperty(exports, "assertBlocksDisasters", { enumerable: true, get: function () { return guardrail_check_js_1.assertBlocksDisasters; } });
|
|
73
|
-
Object.defineProperty(exports, "formatGuardrailReport", { enumerable: true, get: function () { return guardrail_check_js_1.formatGuardrailReport; } });
|
|
74
|
-
//# sourceMappingURL=unit.js.map
|