vigiles 19.0.0 → 20.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 +8 -8
- package/dist/adapters/claude-code/typed-spec.js +10 -10
- 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 +63 -17
- package/dist/core/spec.js +70 -16
- 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-install.js +35 -3
- package/dist/hook.d.ts +6 -6
- package/dist/hook.js +24 -13
- package/dist/linting.d.ts +33 -4
- package/dist/linting.js +62 -21
- package/dist/load-hook.js +1 -1
- package/dist/scaffold-test.js +1 -1
- 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/hook.js
CHANGED
|
@@ -15,15 +15,15 @@ exports.leafCommandsNormalized = exports.HookStateError = exports.durationSecond
|
|
|
15
15
|
*
|
|
16
16
|
* The roles, each with its own output type so a category mistake is a `tsc`
|
|
17
17
|
* error, not a silent no-op:
|
|
18
|
-
* - `
|
|
18
|
+
* - `experimental_defineHook` / `experimental_defineFileGate` — a **gate** returns a `Decision`
|
|
19
19
|
* (`allow`/`deny`/`ask`); `deny` is the only thing that blocks.
|
|
20
|
-
* - `
|
|
20
|
+
* - `experimental_definePromptGate` — a **prompt gate** (UserPromptSubmit) sees the prompt
|
|
21
21
|
* TEXT and may `deny` to block it (a security filter).
|
|
22
|
-
* - `
|
|
22
|
+
* - `experimental_defineStopGate` — a **stop gate** (Stop/SubagentStop) may `deny` to keep
|
|
23
23
|
* the agent going (gate-until-tests-pass).
|
|
24
|
-
* - `
|
|
24
|
+
* - `experimental_defineInject` — an **inject** returns an `Injection` (context text); it
|
|
25
25
|
* has no `deny`, so "block on a SessionStart hook" won't compile.
|
|
26
|
-
* - `
|
|
26
|
+
* - `experimental_defineReact` — a **react** (PostToolUse) returns a `Reaction`; it sees the
|
|
27
27
|
* tool RESPONSE, its `run(cmd)` is effect-classified at construction, and it
|
|
28
28
|
* can't block (the tool already ran).
|
|
29
29
|
*
|
|
@@ -57,12 +57,23 @@ var hook_program_js_1 = require("./core/hook-program.js");
|
|
|
57
57
|
// entry points makes the marking structural for the whole vocabulary. A
|
|
58
58
|
// per-name prefix could not guarantee that; a chokepoint can.
|
|
59
59
|
//
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
// 🔴 DO NOT alias the prefix away at the import. This block used to advise
|
|
61
|
+
// exactly that — "so the word crosses the package boundary exactly once" — and
|
|
62
|
+
// the advice defeated the mechanism it was attached to. Measured 2026-08-21:
|
|
63
|
+
// with the alias in place the marker survived at 0 of 5 call sites in the only
|
|
64
|
+
// user-facing example, because a reader 200 lines down sees `defineHook(...)`
|
|
65
|
+
// and cannot tell it is provisional. A prefix that is stripped on import is a
|
|
66
|
+
// subpath with extra steps; if the guarantee is only boundary-deep, the honest
|
|
67
|
+
// shape is a quarantined subpath, not a name nobody sees. We chose the name,
|
|
68
|
+
// and then deleted the subpath (`vigiles/experimental`, gone 2026-08-21) so
|
|
69
|
+
// there is only the one mechanism left to keep honest.
|
|
70
|
+
// so the name has to be there. The declarations carry it too — there is one
|
|
71
|
+
// spelling of each symbol now, and `local/experimental-name` no longer needs
|
|
72
|
+
// to reason about re-export aliasing to know what crosses the boundary.
|
|
73
|
+
Object.defineProperty(exports, "experimental_defineHook", { enumerable: true, get: function () { return hook_program_js_1.experimental_defineHook; } });
|
|
74
|
+
Object.defineProperty(exports, "experimental_defineFileGate", { enumerable: true, get: function () { return hook_program_js_1.experimental_defineFileGate; } });
|
|
75
|
+
Object.defineProperty(exports, "experimental_definePromptGate", { enumerable: true, get: function () { return hook_program_js_1.experimental_definePromptGate; } });
|
|
76
|
+
Object.defineProperty(exports, "experimental_defineStopGate", { enumerable: true, get: function () { return hook_program_js_1.experimental_defineStopGate; } });
|
|
66
77
|
Object.defineProperty(exports, "tool", { enumerable: true, get: function () { return hook_program_js_1.tool; } });
|
|
67
78
|
Object.defineProperty(exports, "tools", { enumerable: true, get: function () { return hook_program_js_1.tools; } });
|
|
68
79
|
Object.defineProperty(exports, "allow", { enumerable: true, get: function () { return hook_program_js_1.allow; } });
|
|
@@ -73,10 +84,10 @@ Object.defineProperty(exports, "pathView", { enumerable: true, get: function ()
|
|
|
73
84
|
Object.defineProperty(exports, "gateAction", { enumerable: true, get: function () { return hook_program_js_1.gateAction; } });
|
|
74
85
|
Object.defineProperty(exports, "hookMode", { enumerable: true, get: function () { return hook_program_js_1.hookMode; } });
|
|
75
86
|
// inject vocabulary
|
|
76
|
-
Object.defineProperty(exports, "experimental_defineInject", { enumerable: true, get: function () { return hook_program_js_1.
|
|
87
|
+
Object.defineProperty(exports, "experimental_defineInject", { enumerable: true, get: function () { return hook_program_js_1.experimental_defineInject; } });
|
|
77
88
|
Object.defineProperty(exports, "inject", { enumerable: true, get: function () { return hook_program_js_1.inject; } });
|
|
78
89
|
// react vocabulary
|
|
79
|
-
Object.defineProperty(exports, "experimental_defineReact", { enumerable: true, get: function () { return hook_program_js_1.
|
|
90
|
+
Object.defineProperty(exports, "experimental_defineReact", { enumerable: true, get: function () { return hook_program_js_1.experimental_defineReact; } });
|
|
80
91
|
Object.defineProperty(exports, "run", { enumerable: true, get: function () { return hook_program_js_1.run; } });
|
|
81
92
|
Object.defineProperty(exports, "notice", { enumerable: true, get: function () { return hook_program_js_1.notice; } });
|
|
82
93
|
Object.defineProperty(exports, "nothing", { enumerable: true, get: function () { return hook_program_js_1.nothing; } });
|
package/dist/linting.d.ts
CHANGED
|
@@ -1,14 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `vigiles/linting` — Pillar 1 entry point: the **linting layer** for instruction
|
|
3
|
-
* files.
|
|
4
|
-
* under one concern-named import.
|
|
5
|
-
* spec builders are also at the package root (`vigiles`).
|
|
3
|
+
* files. The spec builders/types that describe a CLAUDE.md, a SKILL.md or an
|
|
4
|
+
* agent, plus the public compile entry points, under one concern-named import.
|
|
6
5
|
*
|
|
7
6
|
* Curated (named, not `export *`) so the internal compiler validators, hash
|
|
8
7
|
* helpers, and the linter cross-reference ENGINE stay out of the public surface,
|
|
9
8
|
* the api reports, and the docs site (the CLI imports those from the source).
|
|
9
|
+
*
|
|
10
|
+
* 🔴 THAT SENTENCE USED TO BE FALSE, and so did the one after it (fixed
|
|
11
|
+
* 2026-08-21). The file claimed to be curated while `export * from
|
|
12
|
+
* "./core/spec.js"` sat one line below it, and it claimed "the spec builders are
|
|
13
|
+
* also at the package root (`vigiles`)" — measured against `vigiles.api.md`: 191
|
|
14
|
+
* exports there and zero matches for `claude`, `agent`, `enforce` or `result`.
|
|
15
|
+
* The builders' second door is `vigiles/spec`, not the root. Both claims read as
|
|
16
|
+
* documentation of a decision and were descriptions of the opposite one; a
|
|
17
|
+
* header nobody re-reads is where an `export *` hides best.
|
|
18
|
+
*
|
|
19
|
+
* WHAT THE CURATION DROPS (28 symbols, measured — nothing in this repo imported
|
|
20
|
+
* any of them from here; every in-repo user takes them from `vigiles/spec`, and
|
|
21
|
+
* the one live consumer of this subpath in the docs takes `compileAgent`): the
|
|
22
|
+
* typed-COMPOSITION family — `experimental_pipe`/`_pipeStep`/`_start`/
|
|
23
|
+
* `_andThen`/`_needs`, `Pipeline`, `PipeStep`, `Supplies`, `Handoff`,
|
|
24
|
+
* `NeedsContract`, `OkOf`, `TypedAgentSpec`, `TypedOutcome`, `Shape`,
|
|
25
|
+
* `OutputFieldType` and the `result()` builder. Those verify HANDOFFS between
|
|
26
|
+
* workers; they compile to nothing and lint nothing, so they are not pillar 1.
|
|
27
|
+
*
|
|
28
|
+
* ⚠️ The cut is not a clean slice along that line, and pretending otherwise
|
|
29
|
+
* would strand a signature: the `result()` FUNCTION leaves, but the
|
|
30
|
+
* `OutputContract` TYPE stays, because `compileAgent`/`compileSkill` name it in
|
|
31
|
+
* their own types. A consumer who needs to BUILD one imports `vigiles/spec`.
|
|
10
32
|
*/
|
|
11
|
-
export
|
|
33
|
+
export { instructionFile, prose, experimental_effect, enforce, guidance, guard, file, cmd, symbol, ref, dir, glob, project, experimental_skill, experimental_agent, railway, delegate,
|
|
34
|
+
/** @deprecated Renamed to `instructionFile`. Removed one major AFTER the one that introduces it. */
|
|
35
|
+
claude,
|
|
36
|
+
/** @deprecated Renamed to `prose`. Removed one major AFTER the one that introduces it. */
|
|
37
|
+
instructions,
|
|
38
|
+
/** @deprecated Renamed to `experimental_agent`. Removed one major AFTER the one that introduces it. */
|
|
39
|
+
agent, } from "./core/spec.js";
|
|
40
|
+
export { BUILTIN_LINTERS, type BuiltinLinter, type LinterRule, type VigilesRef, type EnforcementRef, type KnownLinterRules, type KnownProjectFiles, type KnownNpmScripts, type KnownAgentName, type StrictLinterRule, type StrictFile, type StrictCmd, type ToolVocabulary, type OpenToolVocabulary, type AllowedAt, type AuthoredPurity, type EnforceRule, type GuidanceRule, type GuardRule, type Rule, type VerifiedPath, type VerifiedCmd, type VerifiedRef, type VerifiedDir, type VerifiedGlob, type FileRef, type CmdRef, type SkillRef, type SymbolRef, type DirRef, type GlobRef, type Ref, type EffectRegion, type InstructionFragment, type InstructionTarget, type ClaudeSpec, type Gate, type RoleGate, type ProjectRole, type SkillInput, type SkillStep, type SkillSpec, type SkillSpecInput, type AgentSpec, type AgentSpecInput, type Railway, type RailwayStep, type OutputContract, } from "./core/spec.js";
|
|
12
41
|
export { compileClaude, compileSkill, compileAgent, compileRailway, CompileError, } from "./core/compile.js";
|
|
13
42
|
export type { CompileClaudeOptions, CompileClaudeResult, CompileSkillResult, CompileAgentResult, CompileRailwayOptions, CompileRailwayResult, } from "./core/compile.js";
|
|
14
43
|
//# sourceMappingURL=linting.d.ts.map
|
package/dist/linting.js
CHANGED
|
@@ -1,32 +1,73 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.compileRailway = exports.compileAgent = exports.compileSkill = exports.compileClaude = void 0;
|
|
18
2
|
/**
|
|
19
3
|
* `vigiles/linting` — Pillar 1 entry point: the **linting layer** for instruction
|
|
20
|
-
* files.
|
|
21
|
-
* under one concern-named import.
|
|
22
|
-
* spec builders are also at the package root (`vigiles`).
|
|
4
|
+
* files. The spec builders/types that describe a CLAUDE.md, a SKILL.md or an
|
|
5
|
+
* agent, plus the public compile entry points, under one concern-named import.
|
|
23
6
|
*
|
|
24
7
|
* Curated (named, not `export *`) so the internal compiler validators, hash
|
|
25
8
|
* helpers, and the linter cross-reference ENGINE stay out of the public surface,
|
|
26
9
|
* the api reports, and the docs site (the CLI imports those from the source).
|
|
10
|
+
*
|
|
11
|
+
* 🔴 THAT SENTENCE USED TO BE FALSE, and so did the one after it (fixed
|
|
12
|
+
* 2026-08-21). The file claimed to be curated while `export * from
|
|
13
|
+
* "./core/spec.js"` sat one line below it, and it claimed "the spec builders are
|
|
14
|
+
* also at the package root (`vigiles`)" — measured against `vigiles.api.md`: 191
|
|
15
|
+
* exports there and zero matches for `claude`, `agent`, `enforce` or `result`.
|
|
16
|
+
* The builders' second door is `vigiles/spec`, not the root. Both claims read as
|
|
17
|
+
* documentation of a decision and were descriptions of the opposite one; a
|
|
18
|
+
* header nobody re-reads is where an `export *` hides best.
|
|
19
|
+
*
|
|
20
|
+
* WHAT THE CURATION DROPS (28 symbols, measured — nothing in this repo imported
|
|
21
|
+
* any of them from here; every in-repo user takes them from `vigiles/spec`, and
|
|
22
|
+
* the one live consumer of this subpath in the docs takes `compileAgent`): the
|
|
23
|
+
* typed-COMPOSITION family — `experimental_pipe`/`_pipeStep`/`_start`/
|
|
24
|
+
* `_andThen`/`_needs`, `Pipeline`, `PipeStep`, `Supplies`, `Handoff`,
|
|
25
|
+
* `NeedsContract`, `OkOf`, `TypedAgentSpec`, `TypedOutcome`, `Shape`,
|
|
26
|
+
* `OutputFieldType` and the `result()` builder. Those verify HANDOFFS between
|
|
27
|
+
* workers; they compile to nothing and lint nothing, so they are not pillar 1.
|
|
28
|
+
*
|
|
29
|
+
* ⚠️ The cut is not a clean slice along that line, and pretending otherwise
|
|
30
|
+
* would strand a signature: the `result()` FUNCTION leaves, but the
|
|
31
|
+
* `OutputContract` TYPE stays, because `compileAgent`/`compileSkill` name it in
|
|
32
|
+
* their own types. A consumer who needs to BUILD one imports `vigiles/spec`.
|
|
27
33
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.compileRailway = exports.compileAgent = exports.compileSkill = exports.compileClaude = exports.BUILTIN_LINTERS = exports.agent = exports.instructions = exports.claude = exports.delegate = exports.railway = exports.experimental_agent = exports.experimental_skill = exports.project = exports.glob = exports.dir = exports.ref = exports.symbol = exports.cmd = exports.file = exports.guard = exports.guidance = exports.enforce = exports.experimental_effect = exports.prose = exports.instructionFile = void 0;
|
|
36
|
+
// --- the spec authoring builders: rules, refs, prose, and the three spec kinds ---
|
|
37
|
+
var spec_js_1 = require("./core/spec.js");
|
|
38
|
+
// instruction files
|
|
39
|
+
Object.defineProperty(exports, "instructionFile", { enumerable: true, get: function () { return spec_js_1.instructionFile; } });
|
|
40
|
+
Object.defineProperty(exports, "prose", { enumerable: true, get: function () { return spec_js_1.prose; } });
|
|
41
|
+
Object.defineProperty(exports, "experimental_effect", { enumerable: true, get: function () { return spec_js_1.experimental_effect; } });
|
|
42
|
+
// rules
|
|
43
|
+
Object.defineProperty(exports, "enforce", { enumerable: true, get: function () { return spec_js_1.enforce; } });
|
|
44
|
+
Object.defineProperty(exports, "guidance", { enumerable: true, get: function () { return spec_js_1.guidance; } });
|
|
45
|
+
Object.defineProperty(exports, "guard", { enumerable: true, get: function () { return spec_js_1.guard; } });
|
|
46
|
+
// verified references
|
|
47
|
+
Object.defineProperty(exports, "file", { enumerable: true, get: function () { return spec_js_1.file; } });
|
|
48
|
+
Object.defineProperty(exports, "cmd", { enumerable: true, get: function () { return spec_js_1.cmd; } });
|
|
49
|
+
Object.defineProperty(exports, "symbol", { enumerable: true, get: function () { return spec_js_1.symbol; } });
|
|
50
|
+
Object.defineProperty(exports, "ref", { enumerable: true, get: function () { return spec_js_1.ref; } });
|
|
51
|
+
Object.defineProperty(exports, "dir", { enumerable: true, get: function () { return spec_js_1.dir; } });
|
|
52
|
+
Object.defineProperty(exports, "glob", { enumerable: true, get: function () { return spec_js_1.glob; } });
|
|
53
|
+
Object.defineProperty(exports, "project", { enumerable: true, get: function () { return spec_js_1.project; } });
|
|
54
|
+
// the other two spec kinds + how a railway wires them
|
|
55
|
+
Object.defineProperty(exports, "experimental_skill", { enumerable: true, get: function () { return spec_js_1.experimental_skill; } });
|
|
56
|
+
Object.defineProperty(exports, "experimental_agent", { enumerable: true, get: function () { return spec_js_1.experimental_agent; } });
|
|
57
|
+
Object.defineProperty(exports, "railway", { enumerable: true, get: function () { return spec_js_1.railway; } });
|
|
58
|
+
Object.defineProperty(exports, "delegate", { enumerable: true, get: function () { return spec_js_1.delegate; } });
|
|
59
|
+
// ─── ОКНО АЛИАСА (один мажор) — see core/spec.ts for why a window is not
|
|
60
|
+
// politeness here. Kept on THIS door too: a consumer importing `claude` from
|
|
61
|
+
// `vigiles/linting` never saw `vigiles/spec`, so the window over there does
|
|
62
|
+
// not cover them.
|
|
63
|
+
/** @deprecated Renamed to `instructionFile`. Removed one major AFTER the one that introduces it. */
|
|
64
|
+
Object.defineProperty(exports, "claude", { enumerable: true, get: function () { return spec_js_1.claude; } });
|
|
65
|
+
/** @deprecated Renamed to `prose`. Removed one major AFTER the one that introduces it. */
|
|
66
|
+
Object.defineProperty(exports, "instructions", { enumerable: true, get: function () { return spec_js_1.instructions; } });
|
|
67
|
+
/** @deprecated Renamed to `experimental_agent`. Removed one major AFTER the one that introduces it. */
|
|
68
|
+
Object.defineProperty(exports, "agent", { enumerable: true, get: function () { return spec_js_1.agent; } });
|
|
69
|
+
var spec_js_2 = require("./core/spec.js");
|
|
70
|
+
Object.defineProperty(exports, "BUILTIN_LINTERS", { enumerable: true, get: function () { return spec_js_2.BUILTIN_LINTERS; } });
|
|
30
71
|
// Compile: only the public entry points + their option/result types.
|
|
31
72
|
var compile_js_1 = require("./core/compile.js");
|
|
32
73
|
Object.defineProperty(exports, "compileClaude", { enumerable: true, get: function () { return compile_js_1.compileClaude; } });
|
package/dist/load-hook.js
CHANGED
|
@@ -56,7 +56,7 @@ async function loadHook(file) {
|
|
|
56
56
|
const program = mod.default?.default ?? mod.default;
|
|
57
57
|
if (!program || typeof program !== "object") {
|
|
58
58
|
throw new hook_program_js_1.HookCompileError(`${file} has no default-exported hook program ` +
|
|
59
|
-
`(use \`export default
|
|
59
|
+
`(use \`export default experimental_defineHook({…})\`).`);
|
|
60
60
|
}
|
|
61
61
|
// Remember WHERE it came from, so the assertion that later EVALUATES it can
|
|
62
62
|
// attribute execution coverage without parsing anything. Remembering is not
|
package/dist/scaffold-test.js
CHANGED
|
@@ -180,7 +180,7 @@ function fallbackSection(input) {
|
|
|
180
180
|
return `import { runHarnessTest, assertToolUsed } from "vigiles";
|
|
181
181
|
|
|
182
182
|
// ${input.name} has no result() contract, so its outcome can't be asserted
|
|
183
|
-
// deterministically — add one (result() on its
|
|
183
|
+
// deterministically — add one (result() on its experimental_agent() spec) for a no-judge
|
|
184
184
|
// outcome test. For now, assert it reaches for the right tool.
|
|
185
185
|
const r = await runHarnessTest({
|
|
186
186
|
plugin: ".", // TODO: the plugin dir holding this subagent
|
package/dist/services-docker.js
CHANGED
|
@@ -9,7 +9,7 @@ exports.parseDockerPort = parseDockerPort;
|
|
|
9
9
|
exports.experimental_makeDockerRuntime = experimental_makeDockerRuntime;
|
|
10
10
|
/**
|
|
11
11
|
* vigiles — a Docker-backed {@link ContainerRuntime} for the R3 disposable-service
|
|
12
|
-
* tier (⚠️ EXPERIMENTAL / UNSTABLE — see src/services.ts
|
|
12
|
+
* tier (⚠️ EXPERIMENTAL / UNSTABLE — see src/services.ts; served from `vigiles`).
|
|
13
13
|
*
|
|
14
14
|
* This is the v0 backend the R3 build spec (research/r3-disposable-services.md)
|
|
15
15
|
* scopes: `docker run` a throwaway service, wait for it to be ready, run its seed,
|
|
@@ -23,7 +23,7 @@ exports.experimental_makeDockerRuntime = experimental_makeDockerRuntime;
|
|
|
23
23
|
* end-to-end integration test needs a live daemon (it skips when absent).
|
|
24
24
|
*
|
|
25
25
|
* @experimental
|
|
26
|
-
* @module vigiles
|
|
26
|
+
* @module vigiles (docker backend)
|
|
27
27
|
*/
|
|
28
28
|
const node_child_process_1 = require("node:child_process");
|
|
29
29
|
const node_net_1 = require("node:net");
|
package/dist/services.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* vigiles — R3 disposable-service tier (⚠️ EXPERIMENTAL / UNSTABLE).
|
|
3
3
|
*
|
|
4
4
|
* ─────────────────────────────────────────────────────────────────────────────
|
|
5
|
-
* EXPERIMENTAL: this surface is a DRAFT. Import it from `vigiles
|
|
5
|
+
* EXPERIMENTAL: this surface is a DRAFT. Import it from `vigiles`,
|
|
6
6
|
* NOT from a stable subpath. It is NOT covered by the stability guarantee and
|
|
7
7
|
* may change shape or be removed WITHOUT a major-version bump. Do not build a
|
|
8
8
|
* production workflow on it yet. See docs/measuring-skills.md § Experimental.
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
* side-effect-free).
|
|
45
45
|
*
|
|
46
46
|
* @experimental
|
|
47
|
-
* @module vigiles
|
|
47
|
+
* @module vigiles (services)
|
|
48
48
|
*/
|
|
49
49
|
/**
|
|
50
50
|
* How a service signals it is ready to accept work — polled by the
|
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": "20.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
|