vigiles 19.0.1 → 21.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 +6 -0
- package/dist/adapter-conformance.js +1 -1
- package/dist/adapters/claude-code/typed-spec.d.ts +45 -8
- package/dist/adapters/claude-code/typed-spec.js +28 -11
- package/dist/claude-code.d.ts +7 -1
- package/dist/claude-code.js +15 -4
- package/dist/cli.js +4 -4
- package/dist/core/CLAUDE.md.spec.js +1 -1
- package/dist/core/adopt.d.ts +4 -4
- package/dist/core/adopt.js +10 -10
- package/dist/core/compile.js +16 -7
- package/dist/core/hook-program.d.ts +36 -18
- package/dist/core/hook-program.js +42 -24
- package/dist/core/rule-meta.js +2 -2
- package/dist/core/skill-normalize.d.ts +50 -0
- package/dist/core/skill-normalize.js +60 -0
- package/dist/core/spec.d.ts +122 -28
- package/dist/core/spec.js +108 -24
- package/dist/eval-surface.d.ts +8 -3
- package/dist/eval-surface.js +8 -3
- package/dist/harness-assert.js +1 -1
- package/dist/hook.d.ts +6 -6
- package/dist/hook.js +24 -13
- package/dist/linting.d.ts +33 -4
- package/dist/linting.js +61 -21
- package/dist/load-hook.js +1 -1
- package/dist/scaffold-test.js +2 -2
- package/dist/services-docker.js +2 -2
- package/dist/services.d.ts +2 -2
- package/dist/services.js +2 -2
- package/dist/test.d.ts +3 -0
- package/dist/test.js +42 -2
- package/package.json +2 -3
- package/dist/experimental.d.ts +0 -34
- package/dist/experimental.js +0 -44
package/dist/services.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* vigiles — R3 disposable-service tier (⚠️ EXPERIMENTAL / UNSTABLE).
|
|
4
4
|
*
|
|
5
5
|
* ─────────────────────────────────────────────────────────────────────────────
|
|
6
|
-
* EXPERIMENTAL: this surface is a DRAFT. Import it from `vigiles
|
|
6
|
+
* EXPERIMENTAL: this surface is a DRAFT. Import it from `vigiles`,
|
|
7
7
|
* NOT from a stable subpath. It is NOT covered by the stability guarantee and
|
|
8
8
|
* may change shape or be removed WITHOUT a major-version bump. Do not build a
|
|
9
9
|
* production workflow on it yet. See docs/measuring-skills.md § Experimental.
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* side-effect-free).
|
|
46
46
|
*
|
|
47
47
|
* @experimental
|
|
48
|
-
* @module vigiles
|
|
48
|
+
* @module vigiles (services)
|
|
49
49
|
*/
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.experimental_startServices = experimental_startServices;
|
package/dist/test.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export type { RunScriptOptions, ScriptRunResult } from "./run-script.js";
|
|
|
56
56
|
export { runHook, parseHookOutput, decideHook, propertyHook, fileToolEvents, egressRoutes, } from "./run-hook.js";
|
|
57
57
|
export type { HookRunResult, RunHookOptions, HookInput, HookOutput, HookPropertyResult, FileToolEventOptions, } from "./run-hook.js";
|
|
58
58
|
export * from "./harness-assert.js";
|
|
59
|
+
export { experimental_emitTool, experimental_parseEmitted, experimental_assertEmittedOk, type EmitFieldSchema, type EmitObjectSchema, type EmitPropertySchema, type EmitTrackSchema, type EmitToolDefinition, type ExperimentalEmitTool, } from "./experimental-emit.js";
|
|
59
60
|
export { loadHook } from "./load-hook.js";
|
|
60
61
|
export { evalChecks, assertChecks, tool, toolWith, notTool, onlyTools, skill, output, hookFired, received, turns, wrote, didNotWrite, subagent, blocked, allowed, mcp, cost, latency, tokens, inputTokens, outputTokens, cacheTokens, } from "./check.js";
|
|
61
62
|
export type { ArgMatcher, Check, CheckJSON, CheckResult, JudgeFn, } from "./check.js";
|
|
@@ -74,4 +75,6 @@ export { defineEval } from "./eval-define.js";
|
|
|
74
75
|
export type { EvalDefinition, EvalDefinitionInput, EvalHooks, EvalKind, EvalMeasurements, EvalReports, SelectionMatrixSpec, } from "./eval-define.js";
|
|
75
76
|
export { assertRates, assertPromptDiversity, checkPromptDiversity, checkReportToJUnit, formatCheckReport, formatEvalReport, formatTriggerRateReport, parseClaudeRun, stubSkillBody, } from "./eval.js";
|
|
76
77
|
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";
|
|
78
|
+
export { experimental_startServices, experimental_withServices, type ServiceSpec, type ServiceReady, type ServiceReset, type ServiceHandle, type ServiceSession, type ContainerRuntime, } from "./services.js";
|
|
79
|
+
export { experimental_dockerRuntime, experimental_makeDockerRuntime, type DockerExec, type NetProbe, } from "./services-docker.js";
|
|
77
80
|
//# sourceMappingURL=test.d.ts.map
|
package/dist/test.js
CHANGED
|
@@ -66,8 +66,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
66
66
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
67
67
|
};
|
|
68
68
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69
|
-
exports.
|
|
70
|
-
exports.stubSkillBody = exports.parseClaudeRun = exports.formatTriggerRateReport = exports.formatEvalReport = exports.formatCheckReport = exports.checkReportToJUnit = exports.checkPromptDiversity = exports.assertPromptDiversity = exports.assertRates = exports.defineEval = exports.formatContainment = exports.compareContainment = exports.skillContract = void 0;
|
|
69
|
+
exports.sandboxAvailable = exports.specTrusted = exports.decideSandbox = exports.parseHooks = exports.parseOutput = exports.parseResultEvent = exports.parseSubagents = exports.parseToolCalls = exports.runHarness = exports.runHarnessTest = exports.formatGuardrailReport = exports.assertBlocksDisasters = exports.unblockedDisasters = exports.verifyGuardrail = exports.DISASTER_CATALOG = exports.cacheTokens = exports.outputTokens = exports.inputTokens = exports.tokens = exports.latency = exports.cost = exports.mcp = exports.allowed = exports.blocked = exports.subagent = exports.didNotWrite = exports.wrote = exports.turns = exports.received = exports.hookFired = exports.output = exports.skill = exports.onlyTools = exports.notTool = exports.toolWith = exports.tool = exports.assertChecks = exports.evalChecks = exports.loadHook = exports.experimental_assertEmittedOk = exports.experimental_parseEmitted = exports.experimental_emitTool = exports.egressRoutes = exports.fileToolEvents = exports.propertyHook = exports.decideHook = exports.parseHookOutput = exports.runHook = exports.runScript = exports.recordCheck = void 0;
|
|
70
|
+
exports.experimental_makeDockerRuntime = exports.experimental_dockerRuntime = exports.experimental_withServices = exports.experimental_startServices = exports.stubSkillBody = exports.parseClaudeRun = exports.formatTriggerRateReport = exports.formatEvalReport = exports.formatCheckReport = exports.checkReportToJUnit = exports.checkPromptDiversity = exports.assertPromptDiversity = exports.assertRates = exports.defineEval = exports.formatContainment = exports.compareContainment = exports.skillContract = exports.mustNotInclude = exports.mustInclude = exports.commandsIn = void 0;
|
|
71
71
|
// --- reporting: how much did this script actually do? ---
|
|
72
72
|
// `vigiles test` can otherwise see only an exit code, so a file that runs NOTHING
|
|
73
73
|
// prints the same `✓` as one that ran and passed (measured 2026-08-08 on a file
|
|
@@ -92,6 +92,19 @@ Object.defineProperty(exports, "fileToolEvents", { enumerable: true, get: functi
|
|
|
92
92
|
Object.defineProperty(exports, "egressRoutes", { enumerable: true, get: function () { return run_hook_js_1.egressRoutes; } });
|
|
93
93
|
// --- assertions and the eval-RESULT analysis helpers (free; see cost #1 above) ---
|
|
94
94
|
__exportStar(require("./harness-assert.js"), exports);
|
|
95
|
+
// --- the EMIT delivery for a typed result (⚠️ EXPERIMENTAL) ---
|
|
96
|
+
// Moved here 2026-08-21 from the `vigiles/experimental` subpath, which is gone
|
|
97
|
+
// (the `experimental_` prefix already marks every call site; the subpath only
|
|
98
|
+
// marked the import line). It belongs BESIDE the assertions above rather than in
|
|
99
|
+
// a drawer of its own: `experimental_parseEmitted` / `experimental_assertEmittedOk`
|
|
100
|
+
// are the emit-channel twins of `parseAgentResult` / `assertAgentOk`, and a reader
|
|
101
|
+
// comparing the two delivery shapes should not have to change doors to see both.
|
|
102
|
+
// Read src/experimental-emit.ts's header before using it — it lists, by number,
|
|
103
|
+
// what is unproven and what would have to be true to drop the prefix.
|
|
104
|
+
var experimental_emit_js_1 = require("./experimental-emit.js");
|
|
105
|
+
Object.defineProperty(exports, "experimental_emitTool", { enumerable: true, get: function () { return experimental_emit_js_1.experimental_emitTool; } });
|
|
106
|
+
Object.defineProperty(exports, "experimental_parseEmitted", { enumerable: true, get: function () { return experimental_emit_js_1.experimental_parseEmitted; } });
|
|
107
|
+
Object.defineProperty(exports, "experimental_assertEmittedOk", { enumerable: true, get: function () { return experimental_emit_js_1.experimental_assertEmittedOk; } });
|
|
95
108
|
// The compiled-hook LOADER. The in-process assertions above take the hook
|
|
96
109
|
// OBJECT, but a `.harness.mjs` test only has its PATH — without this the
|
|
97
110
|
// intended in-process test path is unreachable from the file format
|
|
@@ -196,4 +209,31 @@ Object.defineProperty(exports, "formatEvalReport", { enumerable: true, get: func
|
|
|
196
209
|
Object.defineProperty(exports, "formatTriggerRateReport", { enumerable: true, get: function () { return eval_js_1.formatTriggerRateReport; } });
|
|
197
210
|
Object.defineProperty(exports, "parseClaudeRun", { enumerable: true, get: function () { return eval_js_1.parseClaudeRun; } });
|
|
198
211
|
Object.defineProperty(exports, "stubSkillBody", { enumerable: true, get: function () { return eval_js_1.stubSkillBody; } });
|
|
212
|
+
// --- R3: the disposable-service tier (⚠️ EXPERIMENTAL, and it has REAL EFFECTS) ---
|
|
213
|
+
// Moved off the `vigiles/experimental` subpath 2026-08-21, when that subpath was
|
|
214
|
+
// deleted: it marked the IMPORT LINE, which is out of view by the time anyone
|
|
215
|
+
// reads the call, while `experimental_` marks every call site.
|
|
216
|
+
//
|
|
217
|
+
// 🔴 IT LANDED ON `vigiles/eval` FIRST, AND THE EXPORT-PREFIX GATE REJECTED IT —
|
|
218
|
+
// correctly, and the reasoning is worth keeping. `./eval` has a naming contract:
|
|
219
|
+
// every runtime export there is `paid_*`, meaning THIS CALL CAN BILL YOU. R3 felt
|
|
220
|
+
// like it belonged because the docs frame it as measuring skills for real. But
|
|
221
|
+
// `experimental_startServices` takes a `ContainerRuntime` and starts containers;
|
|
222
|
+
// it calls no model. Naming it `paid_experimental_startServices` to satisfy the
|
|
223
|
+
// gate would have made `paid_` mean "expensive in some sense", which is exactly
|
|
224
|
+
// the erosion that turns a prefix back into decoration. The model spend is in
|
|
225
|
+
// `paid_measureArms`, which is already over there. So R3 is free-of-model-cost
|
|
226
|
+
// and belongs on this door — where "free" keeps its narrow meaning.
|
|
227
|
+
//
|
|
228
|
+
// ⚠️ FREE OF MODEL COST IS NOT FREE OF CONSEQUENCE, and this is the one place the
|
|
229
|
+
// root barrel carries something with real side effects. The disposable container
|
|
230
|
+
// is the ONLY isolation vigiles provides — it does NOT confine the skill's
|
|
231
|
+
// filesystem or network. Run it somewhere disposable with no production access
|
|
232
|
+
// and keep real credentials out of the run. See the SAFETY note in src/services.ts.
|
|
233
|
+
var services_js_1 = require("./services.js");
|
|
234
|
+
Object.defineProperty(exports, "experimental_startServices", { enumerable: true, get: function () { return services_js_1.experimental_startServices; } });
|
|
235
|
+
Object.defineProperty(exports, "experimental_withServices", { enumerable: true, get: function () { return services_js_1.experimental_withServices; } });
|
|
236
|
+
var services_docker_js_1 = require("./services-docker.js");
|
|
237
|
+
Object.defineProperty(exports, "experimental_dockerRuntime", { enumerable: true, get: function () { return services_docker_js_1.experimental_dockerRuntime; } });
|
|
238
|
+
Object.defineProperty(exports, "experimental_makeDockerRuntime", { enumerable: true, get: function () { return services_docker_js_1.experimental_makeDockerRuntime; } });
|
|
199
239
|
//# sourceMappingURL=test.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vigiles",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0",
|
|
4
4
|
"description": "Audit, test and measure the harness your AI agent runs on — grade your CLAUDE.md / AGENTS.md, skills, subagents and hooks, run them against a scripted model, and measure whether they actually fire.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
"./claude-code": "./dist/claude-code.js",
|
|
47
47
|
"./codex": "./dist/codex.js",
|
|
48
48
|
"./adapter": "./dist/adapter.js",
|
|
49
|
-
"./experimental": "./dist/experimental.js",
|
|
50
49
|
"./vitest": {
|
|
51
50
|
"types": "./dist/vitest.d.mts",
|
|
52
51
|
"default": "./dist/vitest.mjs"
|
|
@@ -92,7 +91,7 @@
|
|
|
92
91
|
"check": "node scripts/check.mjs",
|
|
93
92
|
"docs:check": "npm run build && node scripts/check-doc-imports.mjs . docs README.md",
|
|
94
93
|
"exports:check": "npm run build && node scripts/check-export-prefixes.mjs .",
|
|
95
|
-
"
|
|
94
|
+
"internal:check": "npm run api:check && node scripts/check-internal-tag.mjs",
|
|
96
95
|
"docs:api": "typedoc"
|
|
97
96
|
},
|
|
98
97
|
"devDependencies": {
|
package/dist/experimental.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `vigiles/experimental` — ⚠️ EXPERIMENTAL, UNSTABLE public surface.
|
|
3
|
-
*
|
|
4
|
-
* Everything re-exported here is a DRAFT. It is deliberately quarantined behind
|
|
5
|
-
* the `experimental` subpath (and the `experimental_` name prefix on runtime
|
|
6
|
-
* exports) so the import itself signals the risk at the call site:
|
|
7
|
-
*
|
|
8
|
-
* import { experimental_startServices } from "vigiles/experimental";
|
|
9
|
-
*
|
|
10
|
-
* NOT covered by the stability guarantee (STABILITY.md): the shape may change or
|
|
11
|
-
* be removed WITHOUT a major-version bump. Do not depend on it in production.
|
|
12
|
-
*
|
|
13
|
-
* Current contents:
|
|
14
|
-
* - the R3 disposable-service tier (real side-effect testing; see
|
|
15
|
-
* docs/measuring-skills.md § Experimental and src/services.ts);
|
|
16
|
-
* - the EMIT delivery for a typed result (`src/experimental-emit.ts`) — a skill
|
|
17
|
-
* that CALLS a tool with its outcome instead of ending its turn with a fenced
|
|
18
|
-
* block, which is how an UNFORKED skill can carry an `OutputContract` at all.
|
|
19
|
-
* Read that module's header before using it: it lists, by number, what is
|
|
20
|
-
* unproven and what would have to be true to drop the prefix.
|
|
21
|
-
*
|
|
22
|
-
* ⚠️ SAFETY: R3 runs a model-driven skill FOR REAL. The disposable container is
|
|
23
|
-
* the ONLY isolation vigiles provides — it does not confine the skill's filesystem
|
|
24
|
-
* or network. Run it in a disposable environment with NO production access and
|
|
25
|
-
* keep real credentials out of the run. See the SAFETY note in src/services.ts and
|
|
26
|
-
* docs/measuring-skills.md § Experimental.
|
|
27
|
-
*
|
|
28
|
-
* @experimental
|
|
29
|
-
* @module vigiles/experimental
|
|
30
|
-
*/
|
|
31
|
-
export { experimental_startServices, experimental_withServices, type ServiceSpec, type ServiceReady, type ServiceReset, type ServiceHandle, type ServiceSession, type ContainerRuntime, } from "./services.js";
|
|
32
|
-
export { experimental_dockerRuntime, experimental_makeDockerRuntime, type DockerExec, type NetProbe, } from "./services-docker.js";
|
|
33
|
-
export { experimental_emitTool, experimental_parseEmitted, experimental_assertEmittedOk, type EmitFieldSchema, type EmitObjectSchema, type EmitPropertySchema, type EmitTrackSchema, type EmitToolDefinition, type ExperimentalEmitTool, } from "./experimental-emit.js";
|
|
34
|
-
//# sourceMappingURL=experimental.d.ts.map
|
package/dist/experimental.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.experimental_assertEmittedOk = exports.experimental_parseEmitted = exports.experimental_emitTool = exports.experimental_makeDockerRuntime = exports.experimental_dockerRuntime = exports.experimental_withServices = exports.experimental_startServices = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* `vigiles/experimental` — ⚠️ EXPERIMENTAL, UNSTABLE public surface.
|
|
6
|
-
*
|
|
7
|
-
* Everything re-exported here is a DRAFT. It is deliberately quarantined behind
|
|
8
|
-
* the `experimental` subpath (and the `experimental_` name prefix on runtime
|
|
9
|
-
* exports) so the import itself signals the risk at the call site:
|
|
10
|
-
*
|
|
11
|
-
* import { experimental_startServices } from "vigiles/experimental";
|
|
12
|
-
*
|
|
13
|
-
* NOT covered by the stability guarantee (STABILITY.md): the shape may change or
|
|
14
|
-
* be removed WITHOUT a major-version bump. Do not depend on it in production.
|
|
15
|
-
*
|
|
16
|
-
* Current contents:
|
|
17
|
-
* - the R3 disposable-service tier (real side-effect testing; see
|
|
18
|
-
* docs/measuring-skills.md § Experimental and src/services.ts);
|
|
19
|
-
* - the EMIT delivery for a typed result (`src/experimental-emit.ts`) — a skill
|
|
20
|
-
* that CALLS a tool with its outcome instead of ending its turn with a fenced
|
|
21
|
-
* block, which is how an UNFORKED skill can carry an `OutputContract` at all.
|
|
22
|
-
* Read that module's header before using it: it lists, by number, what is
|
|
23
|
-
* unproven and what would have to be true to drop the prefix.
|
|
24
|
-
*
|
|
25
|
-
* ⚠️ SAFETY: R3 runs a model-driven skill FOR REAL. The disposable container is
|
|
26
|
-
* the ONLY isolation vigiles provides — it does not confine the skill's filesystem
|
|
27
|
-
* or network. Run it in a disposable environment with NO production access and
|
|
28
|
-
* keep real credentials out of the run. See the SAFETY note in src/services.ts and
|
|
29
|
-
* docs/measuring-skills.md § Experimental.
|
|
30
|
-
*
|
|
31
|
-
* @experimental
|
|
32
|
-
* @module vigiles/experimental
|
|
33
|
-
*/
|
|
34
|
-
var services_js_1 = require("./services.js");
|
|
35
|
-
Object.defineProperty(exports, "experimental_startServices", { enumerable: true, get: function () { return services_js_1.experimental_startServices; } });
|
|
36
|
-
Object.defineProperty(exports, "experimental_withServices", { enumerable: true, get: function () { return services_js_1.experimental_withServices; } });
|
|
37
|
-
var services_docker_js_1 = require("./services-docker.js");
|
|
38
|
-
Object.defineProperty(exports, "experimental_dockerRuntime", { enumerable: true, get: function () { return services_docker_js_1.experimental_dockerRuntime; } });
|
|
39
|
-
Object.defineProperty(exports, "experimental_makeDockerRuntime", { enumerable: true, get: function () { return services_docker_js_1.experimental_makeDockerRuntime; } });
|
|
40
|
-
var experimental_emit_js_1 = require("./experimental-emit.js");
|
|
41
|
-
Object.defineProperty(exports, "experimental_emitTool", { enumerable: true, get: function () { return experimental_emit_js_1.experimental_emitTool; } });
|
|
42
|
-
Object.defineProperty(exports, "experimental_parseEmitted", { enumerable: true, get: function () { return experimental_emit_js_1.experimental_parseEmitted; } });
|
|
43
|
-
Object.defineProperty(exports, "experimental_assertEmittedOk", { enumerable: true, get: function () { return experimental_emit_js_1.experimental_assertEmittedOk; } });
|
|
44
|
-
//# sourceMappingURL=experimental.js.map
|