vigiles 25.0.0 โ†’ 26.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/README.md CHANGED
@@ -173,7 +173,7 @@ Every path, script, symbol, and rule verified against reality โ€” plus tool cont
173
173
  ### ๐Ÿงช Test โ€” does the harness actually do its job?
174
174
 
175
175
  A hook that blocks nothing, a skill that hijacks unrelated prompts, context that never reaches the model โ€” each passes a naive "did it run?" check. That gap is **false confidence**: a guard that looks like it works and silently doesn't. vigiles tests the real thing โ€” hooks block, skills fire, subagents finish what they promised, a stray `git push` is caught before it happens. It drives a scripted stand-in for the model, not a live call, so it needs no key and runs on every commit.
176
- **[How testing works โ†’](docs/harness-testing.md)**
176
+ **[How testing works โ†’](docs/harness-testing.md)** ยท Got a safety hook? **[Prove it blocks `rm -rf` and force-push โ†’](docs/harness-testing.md#prove-a-guard-actually-blocks-the-disaster-battery)**
177
177
 
178
178
  **Nothing you scan leaves your machine.** `lint`, `audit` and the deterministic test tiers make no network call at all โ€” no telemetry, no analytics, no HTTP client in the package. Evals drive your own `claude` CLI on your own subscription, so no third party is introduced. **[What is and isn't transmitted โ†’](docs/safety.md#does-vigiles-send-my-code-anywhere)**
179
179
 
@@ -88,9 +88,12 @@ export declare function interpreterArgs(file: string, caps: NodeCaps, entry?: st
88
88
  * Expand the given path/glob patterns into concrete script files. A pattern
89
89
  * that is an existing file passes through unchanged; anything else is treated
90
90
  * as a glob. Falls back to `defaultGlob` when no patterns are given. Results
91
- * are deduped and sorted; `node_modules` and `dist` are always ignored.
91
+ * are deduped and sorted. `ignore` is the repo's ExcludeSet string face
92
+ * (src/exclude.ts โ€” the floor plus `.vigilesrc.json#exclude`), REQUIRED so a
93
+ * vendored corpus's own `*.harness.mjs` cannot be discovered and run as ours
94
+ * (#192). A path given explicitly in `patterns` is still run.
92
95
  */
93
- export declare function discoverScripts(patterns: readonly string[], defaultGlob: string, cwd: string): string[];
96
+ export declare function discoverScripts(patterns: readonly string[], defaultGlob: string, cwd: string, ignore: readonly string[]): string[];
94
97
  /** Extra wiring for {@link runScripts}. */
95
98
  export interface RunScriptsOptions {
96
99
  /**
@@ -150,9 +150,12 @@ function interpreterArgs(file, caps, entry) {
150
150
  * Expand the given path/glob patterns into concrete script files. A pattern
151
151
  * that is an existing file passes through unchanged; anything else is treated
152
152
  * as a glob. Falls back to `defaultGlob` when no patterns are given. Results
153
- * are deduped and sorted; `node_modules` and `dist` are always ignored.
153
+ * are deduped and sorted. `ignore` is the repo's ExcludeSet string face
154
+ * (src/exclude.ts โ€” the floor plus `.vigilesrc.json#exclude`), REQUIRED so a
155
+ * vendored corpus's own `*.harness.mjs` cannot be discovered and run as ours
156
+ * (#192). A path given explicitly in `patterns` is still run.
154
157
  */
155
- function discoverScripts(patterns, defaultGlob, cwd) {
158
+ function discoverScripts(patterns, defaultGlob, cwd, ignore) {
156
159
  const globs = patterns.length > 0 ? patterns : [defaultGlob];
157
160
  const found = new Set();
158
161
  for (const p of globs) {
@@ -173,7 +176,7 @@ function discoverScripts(patterns, defaultGlob, cwd) {
173
176
  // looked untested". Coverage learned it; the runner did not.
174
177
  for (const m of (0, glob_1.globSync)(p, {
175
178
  cwd,
176
- ignore: ["node_modules/**", "dist/**"],
179
+ ignore: [...ignore],
177
180
  dot: true,
178
181
  })) {
179
182
  found.add(m);
@@ -61,6 +61,24 @@ export declare function codexSkillFired(run: {
61
61
  * turn. Pure fs โ€” unit-testable without a binary.
62
62
  */
63
63
  export declare function installCodexSkills(pluginDir: string, cwd: string): number;
64
+ /**
65
+ * Refuse an `effort` this adapter cannot honour, LOUDLY.
66
+ *
67
+ * The Claude runner pins the reasoning budget through `--effort` plus the env var
68
+ * it sits under. Codex exposes no mapping we have measured โ€” its config carries a
69
+ * `model_reasoning_effort` key, but nothing here has driven the real binary
70
+ * through it, so claiming support would assert something unverified.
71
+ *
72
+ * The alternative โ€” forwarding `task`/`cwd`/`timeoutMs` and dropping `effort` on
73
+ * the floor, as this runner does today โ€” is the silent CC-only path the
74
+ * harness-parity rule forbids: a spec would declare `effort: "low"`, the lock
75
+ * would RECORD `low`, and the run would happen at whatever Codex defaults to.
76
+ * A stale number is recoverable; a confidently mislabelled one is not.
77
+ *
78
+ * Pure so the deferral itself is tested rather than living inside the ignored
79
+ * subprocess region.
80
+ */
81
+ export declare function refuseCodexEffort(effort: string | number | undefined): void;
64
82
  /**
65
83
  * The Codex eval-tier `AgentRunner`: install the run's skills into `.codex/skills`
66
84
  * (Codex's discovery path, vs Claude's `--plugin-dir`), then drive a real
@@ -32,6 +32,7 @@ exports.parseCodexEvalRun = parseCodexEvalRun;
32
32
  exports.codexRunError = codexRunError;
33
33
  exports.codexSkillFired = codexSkillFired;
34
34
  exports.installCodexSkills = installCodexSkills;
35
+ exports.refuseCodexEffort = refuseCodexEffort;
35
36
  exports.codexEvalAgentRunner = codexEvalAgentRunner;
36
37
  exports.codexEvalRunner = codexEvalRunner;
37
38
  const node_child_process_1 = require("node:child_process");
@@ -172,6 +173,31 @@ function installCodexSkills(pluginDir, cwd) {
172
173
  }
173
174
  return n;
174
175
  }
176
+ /**
177
+ * Refuse an `effort` this adapter cannot honour, LOUDLY.
178
+ *
179
+ * The Claude runner pins the reasoning budget through `--effort` plus the env var
180
+ * it sits under. Codex exposes no mapping we have measured โ€” its config carries a
181
+ * `model_reasoning_effort` key, but nothing here has driven the real binary
182
+ * through it, so claiming support would assert something unverified.
183
+ *
184
+ * The alternative โ€” forwarding `task`/`cwd`/`timeoutMs` and dropping `effort` on
185
+ * the floor, as this runner does today โ€” is the silent CC-only path the
186
+ * harness-parity rule forbids: a spec would declare `effort: "low"`, the lock
187
+ * would RECORD `low`, and the run would happen at whatever Codex defaults to.
188
+ * A stale number is recoverable; a confidently mislabelled one is not.
189
+ *
190
+ * Pure so the deferral itself is tested rather than living inside the ignored
191
+ * subprocess region.
192
+ */
193
+ function refuseCodexEffort(effort) {
194
+ if (effort === undefined)
195
+ return;
196
+ throw new Error(`effort (${JSON.stringify(effort)}) is not supported on the Codex adapter: ` +
197
+ `vigiles has not measured a mapping for it, so honouring the spec here ` +
198
+ `would record an effort the run did not use. Drop \`effort\` for this ` +
199
+ `harness, or run the eval on Claude Code.`);
200
+ }
175
201
  /* v8 ignore start -- real codex subprocess; validated against the binary, not the unit gate */
176
202
  /**
177
203
  * The Codex eval-tier `AgentRunner`: install the run's skills into `.codex/skills`
@@ -180,6 +206,7 @@ function installCodexSkills(pluginDir, cwd) {
180
206
  * codexEvalDriver })` dispatches through.
181
207
  */
182
208
  function codexEvalAgentRunner(args) {
209
+ refuseCodexEffort(args.effort);
183
210
  if (args.pluginDir)
184
211
  installCodexSkills(args.pluginDir, args.cwd);
185
212
  return Promise.resolve(codexEvalRunner({
package/dist/cli.d.ts CHANGED
@@ -9,6 +9,7 @@
9
9
  * `self-command-refs.test.ts` did not catch it because it guards against refs to
10
10
  * REMOVED commands, not against a list that merely stops growing.
11
11
  */
12
+ import { type ExcludeSet } from "./exclude.js";
12
13
  import type { RuleSeverity } from "./core/types.js";
13
14
  /** Reason the most recent `loadSpec()` returned null, or null if it succeeded. */
14
15
  export declare function specLoadFailureReason(): string | null;
@@ -130,6 +131,6 @@ export declare function lintTotals(report: LintReport): {
130
131
  * third-party plugins โ€” and scoring someone else's vendored plugin as if it were
131
132
  * yours is the false-positive that gets a gate switched off.
132
133
  */
133
- export declare function discoverNestedBundles(root: string, exclude?: readonly string[]): string[];
134
+ export declare function discoverNestedBundles(root: string, excludes: ExcludeSet): string[];
134
135
  export {};
135
136
  //# sourceMappingURL=cli.d.ts.map