vigiles 29.0.0 → 30.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/adapter-conformance.d.ts +1 -1
- package/dist/adapter-conformance.js +106 -25
- package/dist/adapter-registry.d.ts +61 -14
- package/dist/adapter-registry.js +78 -10
- package/dist/adapter.d.ts +23 -2
- package/dist/adapter.js +13 -1
- package/dist/adapters/claude-code/adapter.d.ts +32 -2
- package/dist/adapters/claude-code/adapter.js +44 -23
- package/dist/adapters/claude-code/dialect.js +87 -21
- package/dist/adapters/claude-code/hook-protocol.js +16 -0
- package/dist/adapters/claude-code/instruction-chain.d.ts +25 -0
- package/dist/adapters/claude-code/instruction-chain.js +626 -0
- package/dist/adapters/claude-code/layout.d.ts +2 -2
- package/dist/adapters/claude-code/layout.js +42 -8
- package/dist/adapters/claude-code/model-access.d.ts +41 -0
- package/dist/adapters/claude-code/model-access.js +46 -0
- package/dist/adapters/claude-code/skill-reachability.d.ts +125 -0
- package/dist/adapters/claude-code/skill-reachability.js +111 -0
- package/dist/adapters/codex/adapter.d.ts +39 -2
- package/dist/adapters/codex/adapter.js +29 -29
- package/dist/adapters/codex/dialect.js +11 -6
- package/dist/adapters/codex/eval.d.ts +10 -0
- package/dist/adapters/codex/eval.js +48 -1
- package/dist/adapters/codex/hook-protocol.d.ts +2 -1
- package/dist/adapters/codex/hook-protocol.js +10 -0
- package/dist/adapters/codex/instruction-chain.d.ts +40 -0
- package/dist/adapters/codex/instruction-chain.js +105 -0
- package/dist/adapters/codex/layout.d.ts +1 -1
- package/dist/adapters/codex/layout.js +41 -14
- package/dist/adapters/opencode/adapter.d.ts +33 -2
- package/dist/adapters/opencode/adapter.js +36 -36
- package/dist/adapters/opencode/dialect.js +2 -2
- package/dist/adapters/opencode/instruction-chain.d.ts +37 -0
- package/dist/adapters/opencode/instruction-chain.js +70 -0
- package/dist/adapters/opencode/layout.d.ts +19 -0
- package/dist/adapters/opencode/layout.js +34 -15
- package/dist/adoptability.d.ts +31 -1
- package/dist/adoptability.js +57 -0
- package/dist/cli-main.js +180 -102
- package/dist/core/adapter.d.ts +213 -61
- package/dist/core/compile.d.ts +2 -2
- package/dist/core/compile.js +57 -38
- package/dist/core/compose.d.ts +5 -3
- package/dist/core/compose.js +5 -3
- package/dist/core/config-schema.d.ts +14 -2
- package/dist/core/config-schema.js +24 -3
- package/dist/core/dialect.d.ts +54 -12
- package/dist/core/dialect.js +56 -0
- package/dist/core/eval-driver.d.ts +194 -0
- package/dist/core/eval-driver.js +3 -0
- package/dist/core/frontmatter-read.d.ts +10 -0
- package/dist/core/frontmatter-read.js +30 -3
- package/dist/core/hook-program.d.ts +27 -2
- package/dist/core/hook-program.js +29 -24
- package/dist/core/hook-protocol.d.ts +54 -0
- package/dist/core/install-reader.d.ts +18 -0
- package/dist/core/install-reader.js +88 -0
- package/dist/core/instruction-chain.d.ts +444 -0
- package/dist/core/instruction-chain.js +292 -0
- package/dist/core/instruction-weight.d.ts +96 -14
- package/dist/core/instruction-weight.js +65 -30
- package/dist/core/layout.d.ts +220 -33
- package/dist/core/layout.js +115 -1
- package/dist/core/lethal-trifecta.d.ts +12 -7
- package/dist/core/lethal-trifecta.js +13 -8
- package/dist/core/live-driver.d.ts +137 -0
- package/dist/core/live-driver.js +14 -0
- package/dist/core/markdown.d.ts +23 -0
- package/dist/core/markdown.js +77 -28
- package/dist/core/orphans.js +9 -7
- package/dist/core/settings-codec.d.ts +17 -0
- package/dist/core/settings-codec.js +56 -0
- package/dist/core/surface-discovery.d.ts +2 -2
- package/dist/core/surface-discovery.js +24 -8
- package/dist/core/surface-scopes.d.ts +26 -6
- package/dist/core/surface-scopes.js +52 -11
- package/dist/core/validate.js +16 -3
- package/dist/eval.d.ts +16 -108
- package/dist/eval.js +34 -1
- package/dist/harness-test.d.ts +3 -63
- package/dist/hook-install.d.ts +12 -1
- package/dist/hook-install.js +12 -1
- package/dist/plugin-loader.d.ts +1 -1
- package/dist/plugin-loader.js +43 -36
- package/dist/scan-behavioral.d.ts +34 -25
- package/dist/scan-behavioral.js +122 -58
- package/dist/scan-core.js +37 -18
- package/dist/scan-files.d.ts +1 -1
- package/dist/scan-files.js +53 -33
- package/dist/scan-trigger-suggest.d.ts +0 -21
- package/dist/scan-trigger-suggest.js +0 -23
- package/dist/scan.d.ts +4 -4
- package/dist/scan.js +120 -73
- package/dist/skill-harness.d.ts +21 -5
- package/dist/skill-harness.js +29 -11
- package/dist/surface-discovery-fs.d.ts +2 -0
- package/dist/surface-discovery-fs.js +108 -6
- package/dist/test-coverage-files.js +24 -17
- package/dist/test-coverage.d.ts +9 -3
- package/dist/test-coverage.js +32 -17
- package/dist/verify-plugin-guards.js +1 -1
- package/package.json +1 -1
- package/dist/skill-reachability.d.ts +0 -68
- package/dist/skill-reachability.js +0 -205
- /package/dist/{dialect-drift.d.ts → adapters/claude-code/dialect-drift.d.ts} +0 -0
- /package/dist/{dialect-drift.js → adapters/claude-code/dialect-drift.js} +0 -0
package/dist/adoptability.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import { type AgentRunner, type ModelOutputParser } from "./eval.js";
|
|
1
|
+
import { type AgentRunner, type ModelOutputParser, type EvalDriver, type RunOut } from "./eval.js";
|
|
2
|
+
/**
|
|
3
|
+
* The harness CLI did not run, as distinct from running and finding nothing.
|
|
4
|
+
* A named class so the caller can tell the two apart without matching prose.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DraftRunFailed extends Error {
|
|
7
|
+
constructor(reason: string);
|
|
8
|
+
}
|
|
2
9
|
/** A reference the model proposes as machine-verifiable. */
|
|
3
10
|
export interface DraftedRef {
|
|
4
11
|
readonly kind: "enforce" | "file" | "cmd" | "dir";
|
|
@@ -36,9 +43,32 @@ export interface DraftOptions {
|
|
|
36
43
|
readonly cwd?: string;
|
|
37
44
|
readonly runner?: AgentRunner;
|
|
38
45
|
readonly parse?: ModelOutputParser;
|
|
46
|
+
/**
|
|
47
|
+
* The driver's own reader for a failure the exit code does not carry — a
|
|
48
|
+
* refusal, or a turn error inside a zero-exit run. Supplied by
|
|
49
|
+
* {@link draftWith}; absent means the exit code is the only signal.
|
|
50
|
+
*/
|
|
51
|
+
readonly runError?: (out: RunOut) => string | null;
|
|
39
52
|
}
|
|
40
53
|
/** Injectable drafter — the real one calls a model; tests pass a fake. */
|
|
41
54
|
export type Drafter = (content: string) => Promise<DraftedRef[]>;
|
|
55
|
+
/**
|
|
56
|
+
* Build the real drafter from a harness's EVAL DRIVER, instead of the hard-wired
|
|
57
|
+
* `spawnAgent` + `parseClaudeRun` defaults above.
|
|
58
|
+
*
|
|
59
|
+
* 🔴 THIS IS WHY THE PREVIEW IS NOT CLAUDE-CODE-ONLY. `defaultDraft`'s two
|
|
60
|
+
* defaults ARE the two members of the Claude eval driver, and nothing else in
|
|
61
|
+
* the drafter is harness-specific: the prompt is over an instruction file's
|
|
62
|
+
* prose, and prose is prose. The VERIFIER is deterministic and harness-free
|
|
63
|
+
* ("LLM proposes, deterministic disposes", this file's header), so "M broken
|
|
64
|
+
* right now" is exactly as trustworthy driven by one harness as by another;
|
|
65
|
+
* only the draft's RECALL varies by model, which it already does across models
|
|
66
|
+
* of the same harness.
|
|
67
|
+
*
|
|
68
|
+
* `model` is passed through to whichever runner: the trigger tier already does
|
|
69
|
+
* this, and a runner that does not understand the alias ignores it.
|
|
70
|
+
*/
|
|
71
|
+
export declare function draftWith(driver: EvalDriver, opts?: DraftOptions): Drafter;
|
|
42
72
|
export interface AdoptabilityTierOptions {
|
|
43
73
|
readonly instructionContent: string;
|
|
44
74
|
readonly basePath: string;
|
package/dist/adoptability.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DraftRunFailed = void 0;
|
|
3
4
|
exports.verifyDraftedRefs = verifyDraftedRefs;
|
|
4
5
|
exports.parseDraftJson = parseDraftJson;
|
|
6
|
+
exports.draftWith = draftWith;
|
|
5
7
|
exports.runAdoptabilityTier = runAdoptabilityTier;
|
|
6
8
|
exports.formatAdoptability = formatAdoptability;
|
|
7
9
|
/**
|
|
@@ -26,6 +28,17 @@ const linters_js_1 = require("./core/linters.js");
|
|
|
26
28
|
const compile_js_1 = require("./core/compile.js");
|
|
27
29
|
const hash_js_1 = require("./core/hash.js");
|
|
28
30
|
const eval_js_1 = require("./eval.js");
|
|
31
|
+
/**
|
|
32
|
+
* The harness CLI did not run, as distinct from running and finding nothing.
|
|
33
|
+
* A named class so the caller can tell the two apart without matching prose.
|
|
34
|
+
*/
|
|
35
|
+
class DraftRunFailed extends Error {
|
|
36
|
+
constructor(reason) {
|
|
37
|
+
super(`could not run the drafting model — ${reason}`);
|
|
38
|
+
this.name = "DraftRunFailed";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.DraftRunFailed = DraftRunFailed;
|
|
29
42
|
/** Verify ONE drafted ref against the real repo; null = resolves, else the breakage. */
|
|
30
43
|
function verifyOne(r, basePath) {
|
|
31
44
|
switch (r.kind) {
|
|
@@ -163,8 +176,52 @@ async function defaultDraft(content, opts = {}) {
|
|
|
163
176
|
timeoutMs: 120000,
|
|
164
177
|
env: process.env,
|
|
165
178
|
});
|
|
179
|
+
// 🔴 THE EXIT CODE IS READ, AND IT WAS NOT. A runner that could not start the
|
|
180
|
+
// harness binary returns code 1 with empty stdout; `parse` then yields no
|
|
181
|
+
// output, `parseDraftJson` yields `[]`, and the report prints "no
|
|
182
|
+
// machine-verifiable references found" — a valid-looking answer to a question
|
|
183
|
+
// nothing ever asked. Found on review of #265: the unconditional
|
|
184
|
+
// `subscription` on the Codex driver lets this path run with no binary
|
|
185
|
+
// present, and unlike the behavioral probe there is nothing here that
|
|
186
|
+
// self-reports unavailability.
|
|
187
|
+
//
|
|
188
|
+
// Thrown rather than returned empty, because "the run failed" and "the model
|
|
189
|
+
// found nothing" are different answers and the caller has to be able to say
|
|
190
|
+
// which. `runError` is the driver's own reader for a failure the exit code
|
|
191
|
+
// does not carry — a refusal or a turn error inside a zero-exit run.
|
|
192
|
+
if (out.code !== 0) {
|
|
193
|
+
throw new DraftRunFailed(`the harness CLI exited ${String(out.code)}${out.stderr ? `: ${out.stderr.trim().slice(0, 200)}` : " with no output"}`);
|
|
194
|
+
}
|
|
195
|
+
const driverError = opts.runError?.(out);
|
|
196
|
+
if (driverError !== null && driverError !== undefined) {
|
|
197
|
+
throw new DraftRunFailed(driverError);
|
|
198
|
+
}
|
|
166
199
|
return parseDraftJson(parse(out).output);
|
|
167
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Build the real drafter from a harness's EVAL DRIVER, instead of the hard-wired
|
|
203
|
+
* `spawnAgent` + `parseClaudeRun` defaults above.
|
|
204
|
+
*
|
|
205
|
+
* 🔴 THIS IS WHY THE PREVIEW IS NOT CLAUDE-CODE-ONLY. `defaultDraft`'s two
|
|
206
|
+
* defaults ARE the two members of the Claude eval driver, and nothing else in
|
|
207
|
+
* the drafter is harness-specific: the prompt is over an instruction file's
|
|
208
|
+
* prose, and prose is prose. The VERIFIER is deterministic and harness-free
|
|
209
|
+
* ("LLM proposes, deterministic disposes", this file's header), so "M broken
|
|
210
|
+
* right now" is exactly as trustworthy driven by one harness as by another;
|
|
211
|
+
* only the draft's RECALL varies by model, which it already does across models
|
|
212
|
+
* of the same harness.
|
|
213
|
+
*
|
|
214
|
+
* `model` is passed through to whichever runner: the trigger tier already does
|
|
215
|
+
* this, and a runner that does not understand the alias ignores it.
|
|
216
|
+
*/
|
|
217
|
+
function draftWith(driver, opts = {}) {
|
|
218
|
+
return (content) => defaultDraft(content, {
|
|
219
|
+
...opts,
|
|
220
|
+
runner: driver.runner,
|
|
221
|
+
parse: driver.parse,
|
|
222
|
+
runError: driver.runError,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
168
225
|
/**
|
|
169
226
|
* Run the preview: draft refs from the instruction file (model), then verify them
|
|
170
227
|
* (deterministic). The composition root of "LLM proposes, deterministic disposes".
|