vigiles 8.0.0 → 9.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 +63 -35
- package/dist/adoptability.d.ts +55 -0
- package/dist/adoptability.js +196 -0
- package/dist/audit-html.d.ts +20 -0
- package/dist/audit-html.js +61 -0
- package/dist/audit-prompts.d.ts +46 -0
- package/dist/audit-prompts.js +90 -0
- package/dist/audit-report.d.ts +70 -0
- package/dist/audit-report.js +51 -0
- package/dist/audit-report.template.html +110 -0
- package/dist/audit-score.d.ts +44 -0
- package/dist/audit-score.js +221 -0
- package/dist/cli-commands.d.ts +1 -1
- package/dist/cli-commands.js +1 -1
- package/dist/cli.js +340 -111
- package/dist/core/inline.js +11 -1
- package/dist/core/types.d.ts +12 -0
- package/dist/dialect-drift.js +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +1 -1
- package/dist/optimize.d.ts +12 -5
- package/dist/optimize.js +27 -5
- package/dist/scan-behavioral.d.ts +8 -2
- package/dist/scan-behavioral.js +6 -4
- package/dist/scan-trigger-suggest.d.ts +68 -31
- package/dist/scan-trigger-suggest.js +66 -33
- package/dist/scan.d.ts +36 -11
- package/dist/scan.js +60 -14
- package/dist/score-explainer.d.ts +1 -1
- package/package.json +4 -2
- package/skills/test-harness/SKILL.md +1 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `AuditReport` — the versioned JSON contract that IS the audit's product
|
|
3
|
+
* boundary. Everything renders FROM it: the local self-contained HTML report,
|
|
4
|
+
* `audit --json` for CI, and (later) an upload to a hosted dashboard. Because it's
|
|
5
|
+
* the wire format between the CLI and anything downstream, it is VERSIONED
|
|
6
|
+
* (`meta.schemaVersion`) and stable — additive changes only within a version.
|
|
7
|
+
*
|
|
8
|
+
* Pure: `buildAuditReport` assembles the report from the same deterministic pieces
|
|
9
|
+
* the terminal output uses (`auditScore` + `optimize` + the scan inventory) — no
|
|
10
|
+
* re-detection (one-detector-no-drift), no model, no clock (a `generatedAt`
|
|
11
|
+
* timestamp is attached by the CLI at write time, never by this pure builder, so
|
|
12
|
+
* the embedded-in-HTML form stays deterministic).
|
|
13
|
+
*/
|
|
14
|
+
import { type AuditScore } from "./audit-score.js";
|
|
15
|
+
import { type Recommendation } from "./optimize.js";
|
|
16
|
+
import type { AdoptabilityResult } from "./adoptability.js";
|
|
17
|
+
import type { ScanReport } from "./scan.js";
|
|
18
|
+
/** The current schema version. Bump only on a BREAKING change to the shape. */
|
|
19
|
+
export declare const AUDIT_SCHEMA_VERSION = 1;
|
|
20
|
+
export interface AuditReportMeta {
|
|
21
|
+
/** Wire-format version — consumers gate on this. */
|
|
22
|
+
readonly schemaVersion: typeof AUDIT_SCHEMA_VERSION;
|
|
23
|
+
readonly tool: "vigiles";
|
|
24
|
+
/** The vigiles version that produced the report. */
|
|
25
|
+
readonly vigilesVersion: string;
|
|
26
|
+
/** The detected/selected harness (`claude-code`, `codex`, …). */
|
|
27
|
+
readonly harness: string;
|
|
28
|
+
/** The audited directory. */
|
|
29
|
+
readonly dir: string;
|
|
30
|
+
/** ISO-8601 produced-at stamp — set by the CLI at write time (NOT the pure builder). */
|
|
31
|
+
readonly generatedAt?: string;
|
|
32
|
+
}
|
|
33
|
+
/** What the harness ships — the "inventory" surface counts. */
|
|
34
|
+
export interface AuditInventory {
|
|
35
|
+
readonly skills: number;
|
|
36
|
+
readonly agents: number;
|
|
37
|
+
readonly hooks: number;
|
|
38
|
+
readonly commands: number;
|
|
39
|
+
readonly mcp: boolean;
|
|
40
|
+
readonly untested: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The full audit, as the dashboard / CI / HTML all consume it. Self-describing
|
|
44
|
+
* and versioned; additive-only within a `schemaVersion`.
|
|
45
|
+
*/
|
|
46
|
+
export interface AuditReport {
|
|
47
|
+
readonly meta: AuditReportMeta;
|
|
48
|
+
/** The four deterministic category rings + the weighted overall + grade. */
|
|
49
|
+
readonly score: AuditScore;
|
|
50
|
+
/** The deterministic, ranked fixes (the inline recommendations). */
|
|
51
|
+
readonly recommendations: readonly Recommendation[];
|
|
52
|
+
readonly inventory: AuditInventory;
|
|
53
|
+
/**
|
|
54
|
+
* The adoption preview — "what would vigiles catch in your repo?" Present only
|
|
55
|
+
* when the model-gated tier ran (behind consent); a deterministic read omits it.
|
|
56
|
+
* Additive/optional, so the schema version is unchanged.
|
|
57
|
+
*/
|
|
58
|
+
readonly adoptability?: AdoptabilityResult;
|
|
59
|
+
}
|
|
60
|
+
export interface BuildAuditReportOptions {
|
|
61
|
+
readonly harness: string;
|
|
62
|
+
readonly vigilesVersion: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Assemble the versioned {@link AuditReport} from a scan report — pure, no clock.
|
|
66
|
+
* The CLI attaches `meta.generatedAt` when it writes the JSON artifact; the
|
|
67
|
+
* HTML-embedded form omits it so the rendered file stays deterministic.
|
|
68
|
+
*/
|
|
69
|
+
export declare function buildAuditReport(report: ScanReport, opts: BuildAuditReportOptions): AuditReport;
|
|
70
|
+
//# sourceMappingURL=audit-report.d.ts.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AUDIT_SCHEMA_VERSION = void 0;
|
|
4
|
+
exports.buildAuditReport = buildAuditReport;
|
|
5
|
+
/**
|
|
6
|
+
* The `AuditReport` — the versioned JSON contract that IS the audit's product
|
|
7
|
+
* boundary. Everything renders FROM it: the local self-contained HTML report,
|
|
8
|
+
* `audit --json` for CI, and (later) an upload to a hosted dashboard. Because it's
|
|
9
|
+
* the wire format between the CLI and anything downstream, it is VERSIONED
|
|
10
|
+
* (`meta.schemaVersion`) and stable — additive changes only within a version.
|
|
11
|
+
*
|
|
12
|
+
* Pure: `buildAuditReport` assembles the report from the same deterministic pieces
|
|
13
|
+
* the terminal output uses (`auditScore` + `optimize` + the scan inventory) — no
|
|
14
|
+
* re-detection (one-detector-no-drift), no model, no clock (a `generatedAt`
|
|
15
|
+
* timestamp is attached by the CLI at write time, never by this pure builder, so
|
|
16
|
+
* the embedded-in-HTML form stays deterministic).
|
|
17
|
+
*/
|
|
18
|
+
const audit_score_js_1 = require("./audit-score.js");
|
|
19
|
+
const optimize_js_1 = require("./optimize.js");
|
|
20
|
+
/** The current schema version. Bump only on a BREAKING change to the shape. */
|
|
21
|
+
exports.AUDIT_SCHEMA_VERSION = 1;
|
|
22
|
+
/**
|
|
23
|
+
* Assemble the versioned {@link AuditReport} from a scan report — pure, no clock.
|
|
24
|
+
* The CLI attaches `meta.generatedAt` when it writes the JSON artifact; the
|
|
25
|
+
* HTML-embedded form omits it so the rendered file stays deterministic.
|
|
26
|
+
*/
|
|
27
|
+
function buildAuditReport(report, opts) {
|
|
28
|
+
return {
|
|
29
|
+
meta: {
|
|
30
|
+
schemaVersion: exports.AUDIT_SCHEMA_VERSION,
|
|
31
|
+
tool: "vigiles",
|
|
32
|
+
vigilesVersion: opts.vigilesVersion,
|
|
33
|
+
harness: opts.harness,
|
|
34
|
+
dir: report.dir,
|
|
35
|
+
},
|
|
36
|
+
score: (0, audit_score_js_1.auditScore)(report),
|
|
37
|
+
recommendations: (0, optimize_js_1.optimize)(report).recommendations,
|
|
38
|
+
inventory: {
|
|
39
|
+
skills: report.skills.length,
|
|
40
|
+
agents: report.agents.length,
|
|
41
|
+
// All hooks, file-backed + inline — matches formatScanReport and the
|
|
42
|
+
// emptiness/scoring count, so a JSON/HTML "What it ships" never reports 0
|
|
43
|
+
// hooks for an inline-hook-only harness.
|
|
44
|
+
hooks: report.hooks.length + report.inlineHooks,
|
|
45
|
+
commands: report.commands,
|
|
46
|
+
mcp: report.mcp,
|
|
47
|
+
untested: report.untested,
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=audit-report.js.map
|