vigiles 6.0.0 → 8.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.
Files changed (92) hide show
  1. package/README.md +189 -88
  2. package/dist/action-gate.js +1 -1
  3. package/dist/adapters/claude-code/agent-runtime.d.ts +46 -11
  4. package/dist/adapters/claude-code/agent-runtime.js +95 -24
  5. package/dist/adapters/claude-code/effect-region.js +1 -1
  6. package/dist/adapters/claude-code/skill-runtime.d.ts +1 -1
  7. package/dist/adapters/claude-code/skill-runtime.js +1 -1
  8. package/dist/adapters/codex/hook-protocol.js +3 -0
  9. package/dist/adapters/codex/mock-model.js +1 -1
  10. package/dist/cli-commands.d.ts +19 -0
  11. package/dist/cli-commands.js +47 -0
  12. package/dist/cli.d.ts +1 -1
  13. package/dist/cli.js +1054 -201
  14. package/dist/core/adopt.d.ts +65 -0
  15. package/dist/core/adopt.js +199 -0
  16. package/dist/core/bash-effects.d.ts +12 -0
  17. package/dist/core/bash-effects.js +31 -0
  18. package/dist/core/capability-diff.d.ts +46 -0
  19. package/dist/core/capability-diff.js +97 -0
  20. package/dist/core/compose.d.ts +1 -1
  21. package/dist/core/compose.js +1 -1
  22. package/dist/core/evolve.d.ts +4 -0
  23. package/dist/core/evolve.js +4 -0
  24. package/dist/core/frontmatter.d.ts +8 -7
  25. package/dist/core/frontmatter.js +8 -7
  26. package/dist/core/generate-harness.d.ts +1 -1
  27. package/dist/core/generate-harness.js +3 -3
  28. package/dist/core/generate-schema.js +1 -1
  29. package/dist/core/guards.d.ts +126 -0
  30. package/dist/core/guards.js +309 -0
  31. package/dist/core/harness-driver.d.ts +1 -1
  32. package/dist/core/hook-program.d.ts +459 -0
  33. package/dist/core/hook-program.js +468 -0
  34. package/dist/core/hook-protocol.d.ts +7 -0
  35. package/dist/core/hook-providers.d.ts +138 -0
  36. package/dist/core/hook-providers.js +155 -0
  37. package/dist/core/hook-spec.d.ts +74 -0
  38. package/dist/core/hook-spec.js +130 -0
  39. package/dist/core/inline.d.ts +6 -6
  40. package/dist/core/inline.js +7 -7
  41. package/dist/core/integrity.d.ts +31 -0
  42. package/dist/core/integrity.js +45 -0
  43. package/dist/core/mcp-tool.d.ts +12 -0
  44. package/dist/core/mcp-tool.js +20 -0
  45. package/dist/core/mcp.d.ts +13 -0
  46. package/dist/core/mcp.js +67 -0
  47. package/dist/core/orphans.js +1 -1
  48. package/dist/core/spec.d.ts +40 -2
  49. package/dist/core/spec.js +16 -1
  50. package/dist/core/types.d.ts +37 -5
  51. package/dist/core/validate.js +26 -26
  52. package/dist/dialect-drift.d.ts +65 -0
  53. package/dist/dialect-drift.js +216 -0
  54. package/dist/eval.d.ts +40 -5
  55. package/dist/eval.js +59 -5
  56. package/dist/guardrail-check.d.ts +85 -0
  57. package/dist/guardrail-check.js +152 -0
  58. package/dist/harness-assert.d.ts +10 -0
  59. package/dist/harness-assert.js +30 -0
  60. package/dist/hook-install.d.ts +43 -0
  61. package/dist/hook-install.js +91 -0
  62. package/dist/hook.d.ts +52 -0
  63. package/dist/hook.js +98 -0
  64. package/dist/leaderboard.d.ts +6 -0
  65. package/dist/leaderboard.js +43 -1
  66. package/dist/linting.d.ts +9 -5
  67. package/dist/linting.js +17 -5
  68. package/dist/optimize.js +1 -1
  69. package/dist/scaffold-test.js +21 -7
  70. package/dist/scan-behavioral.d.ts +60 -0
  71. package/dist/scan-behavioral.js +239 -1
  72. package/dist/scan-trigger-suggest.d.ts +54 -0
  73. package/dist/scan-trigger-suggest.js +70 -0
  74. package/dist/scan.d.ts +31 -1
  75. package/dist/scan.js +65 -3
  76. package/dist/score-explainer.js +1 -1
  77. package/dist/self-command-refs.d.ts +21 -0
  78. package/dist/self-command-refs.js +125 -0
  79. package/dist/setup-plan.d.ts +59 -1
  80. package/dist/setup-plan.js +103 -5
  81. package/dist/testing.d.ts +5 -3
  82. package/dist/testing.js +37 -23
  83. package/dist/tool-intercept.d.ts +4 -4
  84. package/dist/tool-intercept.js +5 -5
  85. package/dist/unit.d.ts +2 -0
  86. package/dist/unit.js +8 -1
  87. package/hooks/post-edit.sh +1 -1
  88. package/hooks/refs-nudge.sh +1 -1
  89. package/package.json +5 -3
  90. package/skills/adopt-spec/SKILL.md +7 -7
  91. package/skills/linter-docs/eslint.md +1 -1
  92. package/skills/strengthen/SKILL.md +1 -1
@@ -17,7 +17,7 @@
17
17
  *
18
18
  * Safety: this executes the gate commands the skill author declared (e.g.
19
19
  * `npm test`, `validate.py`) via an explicit, user-invoked command
20
- * (`vigiles run-skill`). It is not a silent hook and runs nothing the spec
20
+ * (`vigiles hook-runtime run-skill`). It is not a silent hook and runs nothing the spec
21
21
  * didn't declare as a gate.
22
22
  */
23
23
  import type { PurityLevel } from "../../core/effects.js";
@@ -18,7 +18,7 @@
18
18
  *
19
19
  * Safety: this executes the gate commands the skill author declared (e.g.
20
20
  * `npm test`, `validate.py`) via an explicit, user-invoked command
21
- * (`vigiles run-skill`). It is not a silent hook and runs nothing the spec
21
+ * (`vigiles hook-runtime run-skill`). It is not a silent hook and runs nothing the spec
22
22
  * didn't declare as a gate.
23
23
  */
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,6 +5,9 @@ exports.codexHookProtocol = {
5
5
  name: "codex",
6
6
  blockExitCode: 2,
7
7
  denyDecisionValues: ["block", "deny"],
8
+ // Codex matchers are anchored regexes (`matcher = "^Bash$"`), unlike Claude
9
+ // Code's exact tool name / `A|B` alternation.
10
+ matcherStyle: "regex",
8
11
  eventEnvVars: [
9
12
  "session_id",
10
13
  "cwd",
@@ -15,7 +15,7 @@ exports.startCodexMock = startCodexMock;
15
15
  * with the proven `response.created → … → response.completed` SSE sequence that
16
16
  * makes codex emit one assistant text message. There is no count-tokens
17
17
  * endpoint. This is the Codex-side analogue of the Anthropic Messages mock in
18
- * `src/adapters/claude-code/mock-model.ts` (`startMock`).
18
+ * `src/mock-model.ts` (`startMock`).
19
19
  *
20
20
  * The wire format here is NOT guessed — it is PROVEN end-to-end against real
21
21
  * `codex` (codex-cli 0.139.0) via the `-c model_providers.mock.*` recipe in
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The canonical vigiles command surface — the SINGLE SOURCE OF TRUTH the
3
+ * self-command-refs dogfood (`src/self-command-refs.test.ts`) cross-references
4
+ * vigiles's OWN docs + comments against, so a renamed/removed command can't
5
+ * leave a stale `vigiles <cmd>` reference rotting in the docs (the cross-ref
6
+ * moat applied to vigiles itself; the cohesive-cli-surface rule).
7
+ *
8
+ * VERBS are typed by a human/agent/CI. HOOK_RUNTIME_KINDS are the hidden runtime
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`)
11
+ * recognizes exactly these, so this list can't silently drift from the code.
12
+ */
13
+ /** Human-facing verbs (printed in help; typed by a human/agent/CI). */
14
+ export declare const VERBS: readonly ["init", "compile", "eject", "lint", "test", "eval", "scan", "scaffold-test", "generate", "hook-runtime"];
15
+ /** Runtime entrypoint kinds under `vigiles hook-runtime <kind>` (emitted, not typed). */
16
+ export declare const HOOK_RUNTIME_KINDS: readonly ["run-program", "agent", "agent-start", "agent-done", "skill", "skill-tool", "skill-start", "skill-done", "run-skill", "intercept-tool", "guard", "action", "refs", "effect-enter", "effect-exit"];
17
+ export type Verb = (typeof VERBS)[number];
18
+ export type HookRuntimeKind = (typeof HOOK_RUNTIME_KINDS)[number];
19
+ //# sourceMappingURL=cli-commands.d.ts.map
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ /**
3
+ * The canonical vigiles command surface — the SINGLE SOURCE OF TRUTH the
4
+ * self-command-refs dogfood (`src/self-command-refs.test.ts`) cross-references
5
+ * vigiles's OWN docs + comments against, so a renamed/removed command can't
6
+ * leave a stale `vigiles <cmd>` reference rotting in the docs (the cross-ref
7
+ * moat applied to vigiles itself; the cohesive-cli-surface rule).
8
+ *
9
+ * VERBS are typed by a human/agent/CI. HOOK_RUNTIME_KINDS are the hidden runtime
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`)
12
+ * recognizes exactly these, so this list can't silently drift from the code.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.HOOK_RUNTIME_KINDS = exports.VERBS = void 0;
16
+ /** Human-facing verbs (printed in help; typed by a human/agent/CI). */
17
+ exports.VERBS = [
18
+ "init",
19
+ "compile",
20
+ "eject",
21
+ "lint",
22
+ "test",
23
+ "eval",
24
+ "scan",
25
+ "scaffold-test",
26
+ "generate",
27
+ "hook-runtime",
28
+ ];
29
+ /** Runtime entrypoint kinds under `vigiles hook-runtime <kind>` (emitted, not typed). */
30
+ exports.HOOK_RUNTIME_KINDS = [
31
+ "run-program",
32
+ "agent",
33
+ "agent-start",
34
+ "agent-done",
35
+ "skill",
36
+ "skill-tool",
37
+ "skill-start",
38
+ "skill-done",
39
+ "run-skill",
40
+ "intercept-tool",
41
+ "guard",
42
+ "action",
43
+ "refs",
44
+ "effect-enter",
45
+ "effect-exit",
46
+ ];
47
+ //# sourceMappingURL=cli-commands.js.map
package/dist/cli.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * vigiles init — scaffold a spec from scratch
7
7
  * vigiles compile — compile .spec.ts → .md with linter verification
8
8
  * vigiles lint — verify hashes, report coverage, detect duplicates
9
- * vigiles generate-types — emit .d.ts with types from project state
9
+ * vigiles generate types — emit .d.ts with types from project state
10
10
  */
11
11
  export {};
12
12
  //# sourceMappingURL=cli.d.ts.map