vigiles 29.1.0 → 30.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/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/agent-runtime.js +3 -1
- package/dist/adapters/claude-code/dialect.js +87 -21
- package/dist/adapters/claude-code/effect-region.js +3 -1
- 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/claude-code/skill-runtime.js +3 -1
- 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 +185 -102
- package/dist/core/adapter.d.ts +213 -61
- package/dist/core/compile.d.ts +2 -2
- package/dist/core/compile.js +57 -46
- 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 +20 -7
- 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/guards.js +3 -1
- 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 -13
- 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 -12
- 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/coverage-artifact.d.ts +3 -2
- package/dist/coverage-artifact.js +6 -5
- package/dist/eval-cache.d.ts +6 -1
- package/dist/eval-cache.js +11 -1
- package/dist/eval.d.ts +16 -108
- package/dist/eval.js +36 -2
- 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/hook-runtime.js +4 -2
- package/dist/hook-state-store.js +3 -1
- package/dist/local-files-tracked.d.ts +17 -0
- package/dist/local-files-tracked.js +70 -0
- package/dist/local-files.d.ts +62 -0
- package/dist/local-files.js +183 -0
- package/dist/observe.d.ts +3 -2
- package/dist/observe.js +7 -6
- 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 -84
- 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 -22
- 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
|
@@ -1,28 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.opencodeLayout = void 0;
|
|
4
|
+
const instruction_chain_js_1 = require("../../core/instruction-chain.js");
|
|
5
|
+
const settings_codec_js_1 = require("../../core/settings-codec.js");
|
|
6
|
+
const instruction_chain_js_2 = require("./instruction-chain.js");
|
|
4
7
|
exports.opencodeLayout = {
|
|
5
8
|
name: "opencode",
|
|
6
9
|
manifestPath: "opencode.json",
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
|
|
10
|
+
// No `hooksConventionPath`: OpenCode hooks are JS plugin modules under
|
|
11
|
+
// `.opencode/plugin`, which is a DIRECTORY. The field names a standalone
|
|
12
|
+
// hooks FILE, and every reader treats it as one (dirname it, parse it,
|
|
13
|
+
// round-trip it), so naming a directory there made each of them wrong about
|
|
14
|
+
// it. The field is optional now and this layout omits it; the adapter already
|
|
15
|
+
// declares `shellHooks: false`, so no shell-hook reader asks.
|
|
11
16
|
settingsPath: "opencode.json",
|
|
12
|
-
|
|
17
|
+
settings: settings_codec_js_1.jsonSettingsCodec,
|
|
13
18
|
instructionFile: "AGENTS.md",
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
surfaces: {
|
|
20
|
+
skill: ".opencode/skill",
|
|
21
|
+
agent: ".opencode/agent",
|
|
22
|
+
command: ".opencode/command",
|
|
23
|
+
},
|
|
24
|
+
// No `userSurfaceRoot`: OpenCode's surfaces already live UNDER `.opencode/`
|
|
25
|
+
// at the source, so they are NOT relocated and the materialize prefix is ""
|
|
26
|
+
// (doubling the `.opencode/` segment is what a prefix here would do).
|
|
27
|
+
// Contrast Claude Code: root-level `skills/` surfaces relocated under
|
|
28
|
+
// `.claude`.
|
|
29
|
+
//
|
|
30
|
+
// No `hookScriptsDir`: there are no hook SCRIPTS to scan — the hooks are
|
|
31
|
+
// in-process code modules, which is the same fact `shellHooks: false` states
|
|
32
|
+
// on the adapter.
|
|
23
33
|
pluginRootToken: "${OPENCODE_PLUGIN_ROOT}",
|
|
24
34
|
mcpConfigFile: "opencode.json",
|
|
25
35
|
mcpManifestKey: "mcp",
|
|
26
|
-
|
|
36
|
+
// The root file plus whatever `opencode.json#instructions` names: a concrete
|
|
37
|
+
// path is an import, a glob is a PATTERN that is reported and never walked.
|
|
38
|
+
// This is the only implementation here that populates `patterns`.
|
|
39
|
+
instructionChain(files) {
|
|
40
|
+
return (0, instruction_chain_js_2.opencodeInstructionChain)(files, {
|
|
41
|
+
instructionFile: exports.opencodeLayout.instructionFile,
|
|
42
|
+
settingsPaths: (0, instruction_chain_js_1.settingsSourcePaths)(exports.opencodeLayout),
|
|
43
|
+
parseSettings: (text) => exports.opencodeLayout.settings.parse(text),
|
|
44
|
+
});
|
|
45
|
+
},
|
|
27
46
|
};
|
|
28
47
|
//# sourceMappingURL=layout.js.map
|
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".
|