vigiles 26.2.0 → 27.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/audit-score.js +1 -1
- package/dist/cli-commands.d.ts +1 -1
- package/dist/cli-commands.js +1 -1
- package/dist/cli-main.d.ts +146 -0
- package/dist/cli-main.js +6811 -0
- package/dist/cli.d.ts +42 -126
- package/dist/cli.js +76 -7278
- package/dist/core/bash-effects.js +44 -29
- package/dist/core/compile.d.ts +0 -6
- package/dist/core/compile.js +16 -6
- package/dist/core/hook-program.d.ts +0 -6
- package/dist/core/hook-program.js +48 -7
- package/dist/core/linters.d.ts +11 -2
- package/dist/core/linters.js +12 -3
- package/dist/core/types.d.ts +4 -2
- package/dist/coverage-evidence.d.ts +1 -1
- package/dist/coverage-evidence.js +2 -2
- package/dist/exclude.js +8 -72
- package/dist/hook-install.js +8 -2
- package/dist/hook-runtime.d.ts +63 -0
- package/dist/hook-runtime.js +540 -0
- package/dist/hook.d.ts +1 -1
- package/dist/hook.js +2 -3
- package/dist/test-coverage.d.ts +3 -3
- package/dist/test-coverage.js +7 -7
- package/package.json +1 -1
package/dist/audit-score.js
CHANGED
|
@@ -308,7 +308,7 @@ function safety(r) {
|
|
|
308
308
|
}
|
|
309
309
|
/**
|
|
310
310
|
* TESTED — DETERMINISTIC harness coverage only (`*.harness.*`, plus any custom
|
|
311
|
-
* `
|
|
311
|
+
* `include`):
|
|
312
312
|
* free, milliseconds, every push. It answers "does this gate still catch what it
|
|
313
313
|
* claims?" The real-model tier is a SEPARATE ring ({@link evaluated}) because it
|
|
314
314
|
* differs on cost, on cadence AND on the question it answers — folding both into
|
package/dist/cli-commands.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* VERBS are typed by a human/agent/CI. HOOK_RUNTIME_KINDS are the hidden runtime
|
|
9
9
|
* entrypoints under `vigiles hook-runtime <kind>`, emitted into hooks configs and
|
|
10
|
-
* never typed by hand. A behavioural test asserts the dispatch (`src/cli.ts`)
|
|
10
|
+
* never typed by hand. A behavioural test asserts the dispatch (`src/cli-main.ts`)
|
|
11
11
|
* recognizes exactly these, so this list can't silently drift from the code.
|
|
12
12
|
*/
|
|
13
13
|
/** Human-facing verbs (printed in help; typed by a human/agent/CI). */
|
package/dist/cli-commands.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* VERBS are typed by a human/agent/CI. HOOK_RUNTIME_KINDS are the hidden runtime
|
|
10
10
|
* entrypoints under `vigiles hook-runtime <kind>`, emitted into hooks configs and
|
|
11
|
-
* never typed by hand. A behavioural test asserts the dispatch (`src/cli.ts`)
|
|
11
|
+
* never typed by hand. A behavioural test asserts the dispatch (`src/cli-main.ts`)
|
|
12
12
|
* recognizes exactly these, so this list can't silently drift from the code.
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vigiles CLI — verify your agent harness is real, and prove it works.
|
|
3
|
+
*
|
|
4
|
+
* The verbs and their one-liners live in ONE place, `COMMAND_HELP` + `HELP_GROUPS`
|
|
5
|
+
* near the bottom of this file, and `--help` prints from that table. A second list
|
|
6
|
+
* here would be a copy that rots — this docblock WAS that copy: it named four
|
|
7
|
+
* commands and omitted `audit`, `test`, `eval` and `eject`, four of the eight, and
|
|
8
|
+
* `self-command-refs.test.ts` did not catch it because it guards against refs to
|
|
9
|
+
* REMOVED commands, not against a list that merely stops growing.
|
|
10
|
+
*/
|
|
11
|
+
import { type ExcludeSet } from "./exclude.js";
|
|
12
|
+
import type { RuleSeverity } from "./core/types.js";
|
|
13
|
+
/** Reason the most recent `loadSpec()` returned null, or null if it succeeded. */
|
|
14
|
+
export declare function specLoadFailureReason(): string | null;
|
|
15
|
+
/**
|
|
16
|
+
* Structured lint report used by --json, --summary, and exit-code logic.
|
|
17
|
+
*/
|
|
18
|
+
interface LintReport {
|
|
19
|
+
hashErrors: number;
|
|
20
|
+
validationErrors: number;
|
|
21
|
+
inlineErrors: number;
|
|
22
|
+
inlineRules: number;
|
|
23
|
+
frontmatterErrors: number;
|
|
24
|
+
frontmatterRules: number;
|
|
25
|
+
specRefIssues: number;
|
|
26
|
+
specRefErrors: number;
|
|
27
|
+
duplicatePairs: number;
|
|
28
|
+
/** Severity of `duplicate-instructions` — carried so the exit code can tier it. */
|
|
29
|
+
duplicateSeverity: RuleSeverity;
|
|
30
|
+
coverageEnabled: number;
|
|
31
|
+
coverageDocumented: number;
|
|
32
|
+
strengthenSuggestions: number;
|
|
33
|
+
integrityErrors: number;
|
|
34
|
+
coverageErrors: number;
|
|
35
|
+
orphanCount: number;
|
|
36
|
+
/** Severity of `orphan-docs` — carried so the exit code can tier it (#181). */
|
|
37
|
+
orphanSeverity: RuleSeverity;
|
|
38
|
+
untestedSurfaces: number;
|
|
39
|
+
untestedErrors: number;
|
|
40
|
+
toolContractIssues: number;
|
|
41
|
+
toolContractErrors: number;
|
|
42
|
+
hookEventIssues: number;
|
|
43
|
+
hookEventErrors: number;
|
|
44
|
+
frontmatterSchemaIssues: number;
|
|
45
|
+
frontmatterSchemaErrors: number;
|
|
46
|
+
mcpConfigIssues: number;
|
|
47
|
+
mcpConfigErrors: number;
|
|
48
|
+
skillFrontmatterIssues: number;
|
|
49
|
+
skillFrontmatterErrors: number;
|
|
50
|
+
mcpToolIssues: number;
|
|
51
|
+
mcpToolErrors: number;
|
|
52
|
+
hookScriptIssues: number;
|
|
53
|
+
hookScriptErrors: number;
|
|
54
|
+
disallowedToolIssues: number;
|
|
55
|
+
disallowedToolErrors: number;
|
|
56
|
+
descriptionOverlapIssues: number;
|
|
57
|
+
descriptionOverlapErrors: number;
|
|
58
|
+
descriptionBudgetIssues: number;
|
|
59
|
+
descriptionBudgetErrors: number;
|
|
60
|
+
frontmatterValidIssues: number;
|
|
61
|
+
frontmatterValidErrors: number;
|
|
62
|
+
mcpHookIssues: number;
|
|
63
|
+
mcpHookErrors: number;
|
|
64
|
+
preferCompiledHookIssues: number;
|
|
65
|
+
preferCompiledHookErrors: number;
|
|
66
|
+
lethalTrifectaIssues: number;
|
|
67
|
+
lethalTrifectaErrors: number;
|
|
68
|
+
skillResourceIssues: number;
|
|
69
|
+
skillResourceErrors: number;
|
|
70
|
+
skillFenceIssues: number;
|
|
71
|
+
skillFenceErrors: number;
|
|
72
|
+
pluginLayoutIssues: number;
|
|
73
|
+
pluginLayoutErrors: number;
|
|
74
|
+
delegationTrifectaIssues: number;
|
|
75
|
+
delegationTrifectaErrors: number;
|
|
76
|
+
hookBlockIssues: number;
|
|
77
|
+
hookBlockErrors: number;
|
|
78
|
+
hookMatcherIssues: number;
|
|
79
|
+
hookMatcherErrors: number;
|
|
80
|
+
docRefErrors: number;
|
|
81
|
+
symbolRefErrors: number;
|
|
82
|
+
mcpRefErrors: number;
|
|
83
|
+
files: string[];
|
|
84
|
+
/**
|
|
85
|
+
* Findings / errors / warnings for the whole run — the same numbers the
|
|
86
|
+
* human-readable summary line prints, so a consumer never has to reconstruct
|
|
87
|
+
* them by counting output lines (#183, and the generic-consumer half of #181).
|
|
88
|
+
*/
|
|
89
|
+
totals?: {
|
|
90
|
+
findings: number;
|
|
91
|
+
errors: number;
|
|
92
|
+
warnings: number;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/** Exit codes: 0 clean, 1 warnings only, 2 hard errors. */
|
|
96
|
+
/**
|
|
97
|
+
* The run's totals, derived from the report itself.
|
|
98
|
+
*
|
|
99
|
+
* 🔴 ONE SOURCE, because the two numbers disagreeing IS the bug (#183). The
|
|
100
|
+
* human-readable log had no total, and counting its `⚠` lines gave a different
|
|
101
|
+
* number from the JSON — 21 against 88 on a real repo — because some checks print
|
|
102
|
+
* one line per finding and others one line carrying a count. Both numbers were
|
|
103
|
+
* right and nothing said why they differed, so "vigiles reports 21 warnings" and
|
|
104
|
+
* "88 warnings" were equally defensible readings of one run.
|
|
105
|
+
*
|
|
106
|
+
* Counted GENERICALLY off the `*Issues` / `*Errors` / count keys rather than a
|
|
107
|
+
* hand-maintained list, so a rule added later is included by existing, not by
|
|
108
|
+
* somebody remembering. `orphanCount` and `duplicatePairs` are named explicitly
|
|
109
|
+
* only because they predate the `*Issues` convention (#181).
|
|
110
|
+
*/
|
|
111
|
+
export declare function lintTotals(report: LintReport): {
|
|
112
|
+
findings: number;
|
|
113
|
+
errors: number;
|
|
114
|
+
warnings: number;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Nested plugin bundles under a lint root — a directory that is itself a harness
|
|
118
|
+
* (its own `.claude-plugin/plugin.json`, or its own skills dir) and is NOT the
|
|
119
|
+
* root being linted.
|
|
120
|
+
*
|
|
121
|
+
* 🔴 WHY THIS EXISTS. Every per-surface check reads ONE root, so in a monorepo
|
|
122
|
+
* holding `skills/` plus `plugins/ * /skills/` the nested skills were never scored
|
|
123
|
+
* and nothing said so. Measured on a fixture: 4 skills over the description
|
|
124
|
+
* budget, `lint .` reported 2, exit 0 — a repo reads that as green-with-2 while
|
|
125
|
+
* the other 2 carry the same defect (#185). The failure is silent, which is the
|
|
126
|
+
* shape this repo treats as worse than a loud one.
|
|
127
|
+
*
|
|
128
|
+
* Deliberately shallow (one level under a container dir): deep recursion would
|
|
129
|
+
* sweep vendored corpora — this repo's own `test/dogfood/` holds real pinned
|
|
130
|
+
* third-party plugins — and scoring someone else's vendored plugin as if it were
|
|
131
|
+
* yours is the false-positive that gets a gate switched off.
|
|
132
|
+
*/
|
|
133
|
+
export declare function discoverNestedBundles(root: string, excludes: ExcludeSet): string[];
|
|
134
|
+
/** Dispatch the skill-runtime subcommands. Returns false if unrecognized. */
|
|
135
|
+
/**
|
|
136
|
+
* `vigiles hook-runtime <kind> [args]` — the hidden umbrella for RUNTIME
|
|
137
|
+
* entrypoints: the executables the harness invokes via a block `vigiles compile`
|
|
138
|
+
* emits into your hooks config, NEVER typed by a human. They stay off the help
|
|
139
|
+
* surface by design — verbs are typed, runtime entrypoints are emitted (the
|
|
140
|
+
* cohesive-cli-surface rule). Renaming a `<kind>` breaks every already-emitted
|
|
141
|
+
* block, so it is a breaking change.
|
|
142
|
+
*/
|
|
143
|
+
export declare function handleHookRuntime(kind: string | undefined, restArgs: string[]): Promise<void>;
|
|
144
|
+
export declare function main(): Promise<void>;
|
|
145
|
+
export {};
|
|
146
|
+
//# sourceMappingURL=cli-main.d.ts.map
|