vigiles 4.0.0 → 4.0.1
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 +28 -17
- package/action.yml +1 -1
- package/dist/adapters/claude-code/adapter.js +1 -1
- package/dist/claude-code.d.ts +1 -1
- package/dist/claude-code.js +1 -1
- package/dist/cli.js +3 -3
- package/dist/e2e.d.ts +1 -1
- package/dist/e2e.js +1 -1
- package/dist/{adapters/claude-code/eval-cache.d.ts → eval-cache.d.ts} +1 -1
- package/dist/{adapters/claude-code/eval-cache.js → eval-cache.js} +1 -1
- package/dist/{adapters/claude-code/eval.js → eval.js} +2 -2
- package/dist/harness-assert.d.ts +8 -8
- package/dist/harness-assert.js +5 -5
- package/dist/{adapters/claude-code/harness-test.d.ts → harness-test.d.ts} +4 -4
- package/dist/{adapters/claude-code/harness-test.js → harness-test.js} +4 -4
- package/dist/integration.d.ts +3 -3
- package/dist/integration.js +2 -3
- package/dist/{adapters/claude-code/mock-model.d.ts → mock-model.d.ts} +2 -2
- package/dist/{adapters/claude-code/run-hook.d.ts → run-hook.d.ts} +1 -1
- package/dist/{adapters/claude-code/run-hook.js → run-hook.js} +1 -1
- package/dist/{adapters/claude-code/sandbox.js → sandbox.js} +1 -1
- package/dist/testing.d.ts +8 -3
- package/dist/testing.js +8 -3
- package/dist/unit.d.ts +2 -2
- package/dist/unit.js +1 -1
- package/hooks/session-start.sh +3 -3
- package/package.json +6 -6
- /package/dist/{adapters/claude-code/egress-entry.d.ts → egress-entry.d.ts} +0 -0
- /package/dist/{adapters/claude-code/egress-entry.js → egress-entry.js} +0 -0
- /package/dist/{adapters/claude-code/egress-proxy.d.ts → egress-proxy.d.ts} +0 -0
- /package/dist/{adapters/claude-code/egress-proxy.js → egress-proxy.js} +0 -0
- /package/dist/{adapters/claude-code/egress.d.ts → egress.d.ts} +0 -0
- /package/dist/{adapters/claude-code/egress.js → egress.js} +0 -0
- /package/dist/{adapters/claude-code/eval-baseline.d.ts → eval-baseline.d.ts} +0 -0
- /package/dist/{adapters/claude-code/eval-baseline.js → eval-baseline.js} +0 -0
- /package/dist/{adapters/claude-code/eval.d.ts → eval.d.ts} +0 -0
- /package/dist/{adapters/claude-code/judge.d.ts → judge.d.ts} +0 -0
- /package/dist/{adapters/claude-code/judge.js → judge.js} +0 -0
- /package/dist/{adapters/claude-code/mock-entry.d.ts → mock-entry.d.ts} +0 -0
- /package/dist/{adapters/claude-code/mock-entry.js → mock-entry.js} +0 -0
- /package/dist/{adapters/claude-code/mock-model.js → mock-model.js} +0 -0
- /package/dist/{adapters/claude-code/sandbox.d.ts → sandbox.d.ts} +0 -0
- /package/dist/{adapters/claude-code/stats.d.ts → stats.d.ts} +0 -0
- /package/dist/{adapters/claude-code/stats.js → stats.js} +0 -0
package/README.md
CHANGED
|
@@ -100,13 +100,15 @@ hijacking unrelated ones (precision). **[Full guide →](docs/harness-testing.md
|
|
|
100
100
|
|
|
101
101
|
## Quick start
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
103
|
+
**Paste into Claude Code or Codex:**
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
Install vigiles in this repo and run it. Verify my CLAUDE.md / AGENTS.md
|
|
107
|
+
references and show me what's stale, then write and run a harness test for one
|
|
108
|
+
of my hooks or skills. Use good defaults (both pillars, non-interactive), but
|
|
109
|
+
ask me first whether to gate it in CI, whether to add a real-model eval, and
|
|
110
|
+
whether to enforce strictly (--strict).
|
|
111
|
+
```
|
|
110
112
|
|
|
111
113
|
Or do it yourself:
|
|
112
114
|
|
|
@@ -118,16 +120,25 @@ It's interactive in a terminal and non-interactive for agents/CI (or with
|
|
|
118
120
|
`--yes`), so "set up vigiles" from a Claude Code / Codex prompt Just Works — and
|
|
119
121
|
it installs a model-invocable **`test-harness` skill**, so afterward you can just
|
|
120
122
|
tell your agent _"test my skills"_ and it picks the tier and writes the test.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
-
|
|
130
|
-
|
|
123
|
+
|
|
124
|
+
<details>
|
|
125
|
+
<summary>What <code>init</code> sets up</summary>
|
|
126
|
+
|
|
127
|
+
- **Both pillars** by default; scope with `--lint` / `--test` (one or both).
|
|
128
|
+
- Adds `vigiles` to your `devDependencies`.
|
|
129
|
+
- Installs the Claude Code plugin (skills + hooks) via the marketplace —
|
|
130
|
+
globally, never vendored into your repo.
|
|
131
|
+
- Wires CI as a `zernie/vigiles@v1` workflow (a composite over the same CLI):
|
|
132
|
+
|
|
133
|
+
```yaml
|
|
134
|
+
- uses: actions/checkout@v4
|
|
135
|
+
- uses: zernie/vigiles@v1 # lints by default; posts a sticky PR comment + a `valid` output
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Prefer to write tests yourself? They can be JS **or** TS
|
|
139
|
+
(`*.harness.{mjs,ts}`) — run them with `npx vigiles test`.
|
|
140
|
+
|
|
141
|
+
</details>
|
|
131
142
|
|
|
132
143
|
## More
|
|
133
144
|
|
package/action.yml
CHANGED
|
@@ -11,7 +11,7 @@ inputs:
|
|
|
11
11
|
required: false
|
|
12
12
|
default: "lint"
|
|
13
13
|
paths:
|
|
14
|
-
description: "Comma- or space-separated paths to operate on (.md files for
|
|
14
|
+
description: "Comma- or space-separated paths to operate on (.md files for lint, .spec.ts files for compile). Auto-discovers when empty."
|
|
15
15
|
required: false
|
|
16
16
|
default: ""
|
|
17
17
|
version:
|
|
@@ -14,7 +14,7 @@ const layout_js_1 = require("./layout.js");
|
|
|
14
14
|
const runtime_js_1 = require("./runtime.js");
|
|
15
15
|
const hook_protocol_js_1 = require("./hook-protocol.js");
|
|
16
16
|
const model_mock_js_1 = require("./model-mock.js");
|
|
17
|
-
const harness_test_js_1 = require("
|
|
17
|
+
const harness_test_js_1 = require("../../harness-test.js");
|
|
18
18
|
exports.claudeCodeAdapter = {
|
|
19
19
|
name: "claude-code",
|
|
20
20
|
// The reference harness: every tier. Mockable transport (Anthropic SSE) and
|
package/dist/claude-code.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* is the adapter, so a future `vigiles/<other-harness>` can sit beside it.
|
|
7
7
|
*/
|
|
8
8
|
export * from "./adapters/claude-code/plugin-loader.js";
|
|
9
|
-
export * from "./
|
|
9
|
+
export * from "./mock-model.js";
|
|
10
10
|
export * from "./adapters/claude-code/dialect.js";
|
|
11
11
|
export * from "./adapters/claude-code/layout.js";
|
|
12
12
|
export * from "./adapters/claude-code/runtime.js";
|
package/dist/claude-code.js
CHANGED
|
@@ -22,7 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
* is the adapter, so a future `vigiles/<other-harness>` can sit beside it.
|
|
23
23
|
*/
|
|
24
24
|
__exportStar(require("./adapters/claude-code/plugin-loader.js"), exports);
|
|
25
|
-
__exportStar(require("./
|
|
25
|
+
__exportStar(require("./mock-model.js"), exports);
|
|
26
26
|
__exportStar(require("./adapters/claude-code/dialect.js"), exports);
|
|
27
27
|
__exportStar(require("./adapters/claude-code/layout.js"), exports);
|
|
28
28
|
__exportStar(require("./adapters/claude-code/runtime.js"), exports);
|
package/dist/cli.js
CHANGED
|
@@ -36,7 +36,7 @@ const refs_js_1 = require("./core/refs.js");
|
|
|
36
36
|
const mcp_js_1 = require("./core/mcp.js");
|
|
37
37
|
const skill_runtime_js_1 = require("./adapters/claude-code/skill-runtime.js");
|
|
38
38
|
const linters_js_1 = require("./core/linters.js");
|
|
39
|
-
const harness_test_js_1 = require("./
|
|
39
|
+
const harness_test_js_1 = require("./harness-test.js");
|
|
40
40
|
const run_scripts_js_1 = require("./adapters/claude-code/run-scripts.js");
|
|
41
41
|
const integrity_js_1 = require("./core/integrity.js");
|
|
42
42
|
const coverage_js_1 = require("./core/coverage.js");
|
|
@@ -1943,7 +1943,7 @@ function printUsage(command) {
|
|
|
1943
1943
|
console.log("Examples:");
|
|
1944
1944
|
console.log(" vigiles init Auto-detect project, create specs, wire CI");
|
|
1945
1945
|
console.log(" vigiles compile Compile all .spec.ts files");
|
|
1946
|
-
console.log(" vigiles
|
|
1946
|
+
console.log(" vigiles lint Verify references, hashes, coverage + suggestions");
|
|
1947
1947
|
console.log("");
|
|
1948
1948
|
console.log("Plumbing:");
|
|
1949
1949
|
console.log(" vigiles generate-types [out] Emit .d.ts from project state");
|
|
@@ -2244,7 +2244,7 @@ function refsHookCommand() {
|
|
|
2244
2244
|
issues.map((m) => ` - ${m}`).join("\n") +
|
|
2245
2245
|
`\nExpress references as marks (\`enforce()\` / \`file()\` / \`cmd()\` / a ` +
|
|
2246
2246
|
`\`vigiles:symbol\` span / an inline \`<!-- vigiles:enforce -->\` comment) so ` +
|
|
2247
|
-
`\`vigiles
|
|
2247
|
+
`\`vigiles lint\` can check them — or add \`<!-- vigiles:ignore -->\` if it ` +
|
|
2248
2248
|
`is prose, not a reference.`;
|
|
2249
2249
|
process.stdout.write(JSON.stringify({
|
|
2250
2250
|
hookSpecificOutput: {
|
package/dist/e2e.d.ts
CHANGED
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
* [`vigiles/eval`](./eval.ts) + [`vigiles/judge`](./judge.ts), not from here.
|
|
16
16
|
*/
|
|
17
17
|
export * from "./integration.js";
|
|
18
|
-
export { egressRoutes } from "./
|
|
18
|
+
export { egressRoutes } from "./run-hook.js";
|
|
19
19
|
//# sourceMappingURL=e2e.d.ts.map
|
package/dist/e2e.js
CHANGED
|
@@ -34,6 +34,6 @@ exports.egressRoutes = void 0;
|
|
|
34
34
|
__exportStar(require("./integration.js"), exports);
|
|
35
35
|
// The real-egress capability probe (the egress-using runHook is already re-exported
|
|
36
36
|
// via the integration→unit chain).
|
|
37
|
-
var run_hook_js_1 = require("./
|
|
37
|
+
var run_hook_js_1 = require("./run-hook.js");
|
|
38
38
|
Object.defineProperty(exports, "egressRoutes", { enumerable: true, get: function () { return run_hook_js_1.egressRoutes; } });
|
|
39
39
|
//# sourceMappingURL=e2e.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SHA256Hash } from "
|
|
1
|
+
import { type SHA256Hash } from "./core/hash.js";
|
|
2
2
|
import type { RunOut } from "./eval.js";
|
|
3
3
|
/** Cache behaviour: never touch the cache / read-only / read-and-write. */
|
|
4
4
|
export type CacheMode = "off" | "read" | "readwrite";
|
|
@@ -24,7 +24,7 @@ exports.restoreDir = restoreDir;
|
|
|
24
24
|
*/
|
|
25
25
|
const node_fs_1 = require("node:fs");
|
|
26
26
|
const node_path_1 = require("node:path");
|
|
27
|
-
const hash_js_1 = require("
|
|
27
|
+
const hash_js_1 = require("./core/hash.js");
|
|
28
28
|
const MAX_SNAPSHOT_FILE_BYTES = 1024 * 1024;
|
|
29
29
|
const SKIP_DIRS = new Set(["node_modules", ".git"]);
|
|
30
30
|
/**
|
|
@@ -39,8 +39,8 @@ const node_child_process_1 = require("node:child_process");
|
|
|
39
39
|
const node_fs_1 = require("node:fs");
|
|
40
40
|
const node_os_1 = require("node:os");
|
|
41
41
|
const node_path_1 = require("node:path");
|
|
42
|
-
const plugin_loader_js_1 = require("./plugin-loader.js");
|
|
43
|
-
const runtime_js_1 = require("./runtime.js");
|
|
42
|
+
const plugin_loader_js_1 = require("./adapters/claude-code/plugin-loader.js");
|
|
43
|
+
const runtime_js_1 = require("./adapters/claude-code/runtime.js");
|
|
44
44
|
const harness_test_js_1 = require("./harness-test.js");
|
|
45
45
|
const eval_cache_js_1 = require("./eval-cache.js");
|
|
46
46
|
function writeFiles(cwd, files) {
|
package/dist/harness-assert.d.ts
CHANGED
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
* `expect(...).toHaveCreated(...)` sugar. The signature is identical for
|
|
14
14
|
* vitest and jest, so the same object supports both.
|
|
15
15
|
*/
|
|
16
|
-
import { type HarnessTestSpec, type HarnessTestResult, type ToolCall, type Trace } from "./
|
|
17
|
-
import type { EvalReport, TriggerRateReport } from "./
|
|
18
|
-
import type { HookRunResult, EgressAttempt } from "./
|
|
16
|
+
import { type HarnessTestSpec, type HarnessTestResult, type ToolCall, type Trace } from "./harness-test.js";
|
|
17
|
+
import type { EvalReport, TriggerRateReport } from "./eval.js";
|
|
18
|
+
import type { HookRunResult, EgressAttempt } from "./run-hook.js";
|
|
19
19
|
import type { OutputContract } from "./core/spec.js";
|
|
20
20
|
import { type ParsedAgentResult } from "./adapters/claude-code/agent-result.js";
|
|
21
|
-
import { type BaselineFile, type DiffOptions } from "./
|
|
22
|
-
export { compareArms } from "./
|
|
23
|
-
export type { Comparison } from "./
|
|
24
|
-
export { diffReports, toBaselineFile, parseBaselineFile, readBaseline, writeBaseline, formatBaselineDiff, diffToJUnit, } from "./
|
|
25
|
-
export type { BaselineFile, BaselineDiff, MetricDiff, DiffStatus, DiffOptions, } from "./
|
|
21
|
+
import { type BaselineFile, type DiffOptions } from "./eval-baseline.js";
|
|
22
|
+
export { compareArms } from "./stats.js";
|
|
23
|
+
export type { Comparison } from "./stats.js";
|
|
24
|
+
export { diffReports, toBaselineFile, parseBaselineFile, readBaseline, writeBaseline, formatBaselineDiff, diffToJUnit, } from "./eval-baseline.js";
|
|
25
|
+
export type { BaselineFile, BaselineDiff, MetricDiff, DiffStatus, DiffOptions, } from "./eval-baseline.js";
|
|
26
26
|
/**
|
|
27
27
|
* Run a harness test, hand the result to `fn`, and always clean up the sandbox.
|
|
28
28
|
* Returns whatever `fn` returns. Use this instead of calling `cleanup()` by
|
package/dist/harness-assert.js
CHANGED
|
@@ -57,15 +57,15 @@ exports.assertTriggerRate = assertTriggerRate;
|
|
|
57
57
|
* `expect(...).toHaveCreated(...)` sugar. The signature is identical for
|
|
58
58
|
* vitest and jest, so the same object supports both.
|
|
59
59
|
*/
|
|
60
|
-
const harness_test_js_1 = require("./
|
|
60
|
+
const harness_test_js_1 = require("./harness-test.js");
|
|
61
61
|
const agent_result_js_1 = require("./adapters/claude-code/agent-result.js");
|
|
62
|
-
const stats_js_1 = require("./
|
|
63
|
-
const eval_baseline_js_1 = require("./
|
|
62
|
+
const stats_js_1 = require("./stats.js");
|
|
63
|
+
const eval_baseline_js_1 = require("./eval-baseline.js");
|
|
64
64
|
// Re-export the significance primitives so the whole eval-analysis surface lives
|
|
65
65
|
// behind `vigiles/harness-assert` (no separate entry point).
|
|
66
|
-
var stats_js_2 = require("./
|
|
66
|
+
var stats_js_2 = require("./stats.js");
|
|
67
67
|
Object.defineProperty(exports, "compareArms", { enumerable: true, get: function () { return stats_js_2.compareArms; } });
|
|
68
|
-
var eval_baseline_js_2 = require("./
|
|
68
|
+
var eval_baseline_js_2 = require("./eval-baseline.js");
|
|
69
69
|
Object.defineProperty(exports, "diffReports", { enumerable: true, get: function () { return eval_baseline_js_2.diffReports; } });
|
|
70
70
|
Object.defineProperty(exports, "toBaselineFile", { enumerable: true, get: function () { return eval_baseline_js_2.toBaselineFile; } });
|
|
71
71
|
Object.defineProperty(exports, "parseBaselineFile", { enumerable: true, get: function () { return eval_baseline_js_2.parseBaselineFile; } });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { HarnessAdapter } from "
|
|
2
|
-
import type { HarnessTestDriver, ToolCall, HookFire, ParsedRun, ModelTurn, ModelRequest } from "
|
|
1
|
+
import type { HarnessAdapter } from "./core/adapter.js";
|
|
2
|
+
import type { HarnessTestDriver, ToolCall, HookFire, ParsedRun, ModelTurn, ModelRequest } from "./core/harness-driver.js";
|
|
3
3
|
import { type SandboxMode } from "./sandbox.js";
|
|
4
4
|
export { scriptModel } from "./mock-model.js";
|
|
5
|
-
export type { ModelTurn, ModelRequest, ToolCall, HookFire, HarnessTestDriver, } from "
|
|
6
|
-
export { loadPlugin, resolveHarness } from "./plugin-loader.js";
|
|
5
|
+
export type { ModelTurn, ModelRequest, ToolCall, HookFire, HarnessTestDriver, } from "./core/harness-driver.js";
|
|
6
|
+
export { loadPlugin, resolveHarness, } from "./adapters/claude-code/plugin-loader.js";
|
|
7
7
|
export { decideSandbox, specTrusted, sandboxAvailable, type SandboxMode, } from "./sandbox.js";
|
|
8
8
|
export interface HarnessTestSpec {
|
|
9
9
|
/** Fixture files to write in a fresh temp working dir (path → contents). */
|
|
@@ -43,14 +43,14 @@ const node_child_process_1 = require("node:child_process");
|
|
|
43
43
|
const node_fs_1 = require("node:fs");
|
|
44
44
|
const node_os_1 = require("node:os");
|
|
45
45
|
const node_path_1 = require("node:path");
|
|
46
|
-
const adapter_conformance_js_1 = require("
|
|
47
|
-
const runtime_js_1 = require("./runtime.js");
|
|
46
|
+
const adapter_conformance_js_1 = require("./adapter-conformance.js");
|
|
47
|
+
const runtime_js_1 = require("./adapters/claude-code/runtime.js");
|
|
48
48
|
const mock_model_js_1 = require("./mock-model.js");
|
|
49
|
-
const plugin_loader_js_1 = require("./plugin-loader.js");
|
|
49
|
+
const plugin_loader_js_1 = require("./adapters/claude-code/plugin-loader.js");
|
|
50
50
|
const sandbox_js_1 = require("./sandbox.js");
|
|
51
51
|
var mock_model_js_2 = require("./mock-model.js");
|
|
52
52
|
Object.defineProperty(exports, "scriptModel", { enumerable: true, get: function () { return mock_model_js_2.scriptModel; } });
|
|
53
|
-
var plugin_loader_js_2 = require("./plugin-loader.js");
|
|
53
|
+
var plugin_loader_js_2 = require("./adapters/claude-code/plugin-loader.js");
|
|
54
54
|
Object.defineProperty(exports, "loadPlugin", { enumerable: true, get: function () { return plugin_loader_js_2.loadPlugin; } });
|
|
55
55
|
Object.defineProperty(exports, "resolveHarness", { enumerable: true, get: function () { return plugin_loader_js_2.resolveHarness; } });
|
|
56
56
|
var sandbox_js_2 = require("./sandbox.js");
|
package/dist/integration.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* imports from here.
|
|
11
11
|
*/
|
|
12
12
|
export * from "./unit.js";
|
|
13
|
-
export * from "./
|
|
14
|
-
export * from "./
|
|
15
|
-
export
|
|
13
|
+
export * from "./harness-test.js";
|
|
14
|
+
export * from "./mock-model.js";
|
|
15
|
+
export type { LoadedPlugin } from "./plugin-loader.js";
|
|
16
16
|
//# sourceMappingURL=integration.d.ts.map
|
package/dist/integration.js
CHANGED
|
@@ -26,7 +26,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
* imports from here.
|
|
27
27
|
*/
|
|
28
28
|
__exportStar(require("./unit.js"), exports);
|
|
29
|
-
__exportStar(require("./
|
|
30
|
-
__exportStar(require("./
|
|
31
|
-
__exportStar(require("./adapters/claude-code/plugin-loader.js"), exports);
|
|
29
|
+
__exportStar(require("./harness-test.js"), exports);
|
|
30
|
+
__exportStar(require("./mock-model.js"), exports);
|
|
32
31
|
//# sourceMappingURL=integration.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ModelTurn, ModelRequest } from "
|
|
2
|
-
export type { ModelTurn, ModelRequest } from "
|
|
1
|
+
import type { ModelTurn, ModelRequest } from "./core/harness-driver.js";
|
|
2
|
+
export type { ModelTurn, ModelRequest } from "./core/harness-driver.js";
|
|
3
3
|
/** Build a scripted model from an ordered list of turns. */
|
|
4
4
|
export declare function scriptModel(turns: readonly ModelTurn[]): ModelTurn[];
|
|
5
5
|
export interface TurnInfo {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HookProtocol } from "
|
|
1
|
+
import type { HookProtocol } from "./core/hook-protocol.js";
|
|
2
2
|
import { type SandboxMode, type EgressAttempt } from "./sandbox.js";
|
|
3
3
|
export type { EgressAttempt };
|
|
4
4
|
/** A hook event payload (the JSON Claude Code writes to the hook's stdin). */
|
|
@@ -38,7 +38,7 @@ const node_child_process_1 = require("node:child_process");
|
|
|
38
38
|
const node_fs_1 = require("node:fs");
|
|
39
39
|
const node_os_1 = require("node:os");
|
|
40
40
|
const node_path_1 = require("node:path");
|
|
41
|
-
const hook_protocol_js_1 = require("./hook-protocol.js");
|
|
41
|
+
const hook_protocol_js_1 = require("./adapters/claude-code/hook-protocol.js");
|
|
42
42
|
const egress_js_1 = require("./egress.js");
|
|
43
43
|
const sandbox_js_1 = require("./sandbox.js");
|
|
44
44
|
/** Parse stdout as a hook JSON decision (pure, testable without a process). */
|
|
@@ -35,7 +35,7 @@ const node_child_process_1 = require("node:child_process");
|
|
|
35
35
|
const node_fs_1 = require("node:fs");
|
|
36
36
|
const node_os_1 = require("node:os");
|
|
37
37
|
const node_path_1 = require("node:path");
|
|
38
|
-
const runtime_js_1 = require("./runtime.js");
|
|
38
|
+
const runtime_js_1 = require("./adapters/claude-code/runtime.js");
|
|
39
39
|
let cachedAvailable;
|
|
40
40
|
/**
|
|
41
41
|
* Whether this environment can ACTUALLY confine untrusted code under bubblewrap.
|
package/dist/testing.d.ts
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
* (eval) — plus the runner-agnostic predicates/assertions. Kept deliberately
|
|
5
5
|
* separate from `vigiles/claude-code` so this surface can stay harness-agnostic as
|
|
6
6
|
* more harnesses are added. Granular paths (`vigiles/run-hook`, etc.) still work.
|
|
7
|
+
*
|
|
8
|
+
* It re-exports the composition-root runner modules (which do the Claude-Code
|
|
9
|
+
* default-wiring), never an adapter directly — the `agnostic-surface` eslint
|
|
10
|
+
* boundary forbids importing `src/adapters/*` from here. See
|
|
11
|
+
* `research/adapter-api-design.md`.
|
|
7
12
|
*/
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
13
|
+
export * from "./run-hook.js";
|
|
14
|
+
export * from "./harness-test.js";
|
|
15
|
+
export * from "./eval.js";
|
|
11
16
|
export * from "./harness-assert.js";
|
|
12
17
|
//# sourceMappingURL=testing.d.ts.map
|
package/dist/testing.js
CHANGED
|
@@ -20,9 +20,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
20
20
|
* (eval) — plus the runner-agnostic predicates/assertions. Kept deliberately
|
|
21
21
|
* separate from `vigiles/claude-code` so this surface can stay harness-agnostic as
|
|
22
22
|
* more harnesses are added. Granular paths (`vigiles/run-hook`, etc.) still work.
|
|
23
|
+
*
|
|
24
|
+
* It re-exports the composition-root runner modules (which do the Claude-Code
|
|
25
|
+
* default-wiring), never an adapter directly — the `agnostic-surface` eslint
|
|
26
|
+
* boundary forbids importing `src/adapters/*` from here. See
|
|
27
|
+
* `research/adapter-api-design.md`.
|
|
23
28
|
*/
|
|
24
|
-
__exportStar(require("./
|
|
25
|
-
__exportStar(require("./
|
|
26
|
-
__exportStar(require("./
|
|
29
|
+
__exportStar(require("./run-hook.js"), exports);
|
|
30
|
+
__exportStar(require("./harness-test.js"), exports);
|
|
31
|
+
__exportStar(require("./eval.js"), exports);
|
|
27
32
|
__exportStar(require("./harness-assert.js"), exports);
|
|
28
33
|
//# sourceMappingURL=testing.js.map
|
package/dist/unit.d.ts
CHANGED
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* `vigiles/e2e`.
|
|
13
13
|
*/
|
|
14
14
|
export * from "./harness-assert.js";
|
|
15
|
-
export { runHook, parseHookOutput, decideHook
|
|
16
|
-
export type { HookInput, HookOutput, HookRunResult, RunHookOptions, } from "./
|
|
15
|
+
export { runHook, parseHookOutput, decideHook } from "./run-hook.js";
|
|
16
|
+
export type { HookInput, HookOutput, HookRunResult, RunHookOptions, } from "./run-hook.js";
|
|
17
17
|
//# sourceMappingURL=unit.d.ts.map
|
package/dist/unit.js
CHANGED
|
@@ -29,7 +29,7 @@ exports.decideHook = exports.parseHookOutput = exports.runHook = void 0;
|
|
|
29
29
|
* `vigiles/e2e`.
|
|
30
30
|
*/
|
|
31
31
|
__exportStar(require("./harness-assert.js"), exports);
|
|
32
|
-
var run_hook_js_1 = require("./
|
|
32
|
+
var run_hook_js_1 = require("./run-hook.js");
|
|
33
33
|
Object.defineProperty(exports, "runHook", { enumerable: true, get: function () { return run_hook_js_1.runHook; } });
|
|
34
34
|
Object.defineProperty(exports, "parseHookOutput", { enumerable: true, get: function () { return run_hook_js_1.parseHookOutput; } });
|
|
35
35
|
Object.defineProperty(exports, "decideHook", { enumerable: true, get: function () { return run_hook_js_1.decideHook; } });
|
package/hooks/session-start.sh
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# SessionStart hook — inject a one-line vigiles
|
|
2
|
+
# SessionStart hook — inject a one-line vigiles lint summary into
|
|
3
3
|
# Claude's context at session start and after compaction.
|
|
4
4
|
#
|
|
5
|
-
# Uses `vigiles
|
|
5
|
+
# Uses `vigiles lint --summary` which is designed for this: it
|
|
6
6
|
# silences all per-stage output and prints a single line like
|
|
7
7
|
# vigiles: 3 stale / 2 validation errors / 1 duplicate
|
|
8
8
|
# (or "vigiles: clean") so the injection costs a handful of tokens.
|
|
@@ -24,7 +24,7 @@ fi
|
|
|
24
24
|
|
|
25
25
|
# Prefer local install, fall back to npx.
|
|
26
26
|
if command -v npx &>/dev/null; then
|
|
27
|
-
SUMMARY=$(npx --no-install vigiles
|
|
27
|
+
SUMMARY=$(npx --no-install vigiles lint --summary 2>/dev/null || true)
|
|
28
28
|
else
|
|
29
29
|
exit 0
|
|
30
30
|
fi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vigiles",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Compile .spec.ts files to instruction files (CLAUDE.md, AGENTS.md) with linter cross-referencing",
|
|
5
5
|
"bin": {
|
|
6
6
|
"vigiles": "dist/cli.js"
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"./spec": "./dist/core/spec.js",
|
|
21
21
|
"./compile": "./dist/core/compile.js",
|
|
22
22
|
"./linters": "./dist/core/linters.js",
|
|
23
|
-
"./eval": "./dist/
|
|
24
|
-
"./harness-test": "./dist/
|
|
23
|
+
"./eval": "./dist/eval.js",
|
|
24
|
+
"./harness-test": "./dist/harness-test.js",
|
|
25
25
|
"./harness-assert": "./dist/harness-assert.js",
|
|
26
|
-
"./run-hook": "./dist/
|
|
26
|
+
"./run-hook": "./dist/run-hook.js",
|
|
27
27
|
"./plugin-loader": "./dist/adapters/claude-code/plugin-loader.js",
|
|
28
28
|
"./mcp": "./dist/core/mcp.js",
|
|
29
|
-
"./judge": "./dist/
|
|
30
|
-
"./mock-model": "./dist/
|
|
29
|
+
"./judge": "./dist/judge.js",
|
|
30
|
+
"./mock-model": "./dist/mock-model.js",
|
|
31
31
|
"./vitest": {
|
|
32
32
|
"types": "./dist/vitest.d.mts",
|
|
33
33
|
"default": "./dist/vitest.mjs"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|