plumbbob 0.9.3 → 0.9.5
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/.claude-plugin/plugin.json +1 -1
- package/README.md +15 -13
- package/dist/cli-core.js +19 -2
- package/dist/lib/check.js +46 -13
- package/dist/lib/intent.js +1 -1
- package/dist/lib/latch.js +3 -3
- package/dist/lib/reentry.js +70 -0
- package/dist/verbs/agent.js +2 -2
- package/dist/verbs/doctor.js +4 -4
- package/dist/verbs/finish.js +1 -1
- package/dist/verbs/recover.js +297 -0
- package/dist/verbs/revert.js +2 -2
- package/dist/verbs/spike.js +8 -2
- package/hooks/post-edit.sh +4 -4
- package/hooks/pre-bash-commit.sh +3 -3
- package/node_modules/checkride/.claude-plugin/plugin.json +11 -0
- package/node_modules/checkride/CHANGELOG.md +1003 -0
- package/node_modules/checkride/LICENSE +201 -21
- package/node_modules/checkride/README.md +171 -30
- package/node_modules/checkride/dist/__tests__/fixtures/released-stanzas.d.ts +15 -0
- package/node_modules/checkride/dist/__tests__/fixtures/released-stanzas.d.ts.map +1 -0
- package/node_modules/checkride/dist/__tests__/fixtures/released-stanzas.js +17 -0
- package/node_modules/checkride/dist/__tests__/fixtures/released-stanzas.js.map +1 -0
- package/node_modules/checkride/dist/adapters.d.ts +18 -6
- package/node_modules/checkride/dist/adapters.d.ts.map +1 -1
- package/node_modules/checkride/dist/adapters.js +42 -23
- package/node_modules/checkride/dist/adapters.js.map +1 -1
- package/node_modules/checkride/dist/agent-setup/claude.d.ts +88 -0
- package/node_modules/checkride/dist/agent-setup/claude.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/claude.js +305 -0
- package/node_modules/checkride/dist/agent-setup/claude.js.map +1 -0
- package/node_modules/checkride/dist/agent-setup/command.d.ts +43 -0
- package/node_modules/checkride/dist/agent-setup/command.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/command.js +77 -0
- package/node_modules/checkride/dist/agent-setup/command.js.map +1 -0
- package/node_modules/checkride/dist/agent-setup/cursor.d.ts +61 -0
- package/node_modules/checkride/dist/agent-setup/cursor.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/cursor.js +189 -0
- package/node_modules/checkride/dist/agent-setup/cursor.js.map +1 -0
- package/node_modules/checkride/dist/agent-setup/files.d.ts +50 -0
- package/node_modules/checkride/dist/agent-setup/files.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/files.js +80 -0
- package/node_modules/checkride/dist/agent-setup/files.js.map +1 -0
- package/node_modules/checkride/dist/agent-setup/harness.d.ts +101 -0
- package/node_modules/checkride/dist/agent-setup/harness.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/harness.js +84 -0
- package/node_modules/checkride/dist/agent-setup/harness.js.map +1 -0
- package/node_modules/checkride/dist/agent-setup/hook.d.ts +45 -52
- package/node_modules/checkride/dist/agent-setup/hook.d.ts.map +1 -1
- package/node_modules/checkride/dist/agent-setup/hook.js +64 -95
- package/node_modules/checkride/dist/agent-setup/hook.js.map +1 -1
- package/node_modules/checkride/dist/agent-setup/index.d.ts +10 -4
- package/node_modules/checkride/dist/agent-setup/index.d.ts.map +1 -1
- package/node_modules/checkride/dist/agent-setup/index.js +9 -4
- package/node_modules/checkride/dist/agent-setup/index.js.map +1 -1
- package/node_modules/checkride/dist/agent-setup/scripts.d.ts +58 -0
- package/node_modules/checkride/dist/agent-setup/scripts.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/scripts.js +299 -0
- package/node_modules/checkride/dist/agent-setup/scripts.js.map +1 -0
- package/node_modules/checkride/dist/agent-setup/skills.d.ts +31 -0
- package/node_modules/checkride/dist/agent-setup/skills.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/skills.js +56 -0
- package/node_modules/checkride/dist/agent-setup/skills.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/configured.d.ts +30 -0
- package/node_modules/checkride/dist/artifacts/configured.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/configured.js +45 -0
- package/node_modules/checkride/dist/artifacts/configured.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/format.d.ts +33 -0
- package/node_modules/checkride/dist/artifacts/format.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/format.js +56 -0
- package/node_modules/checkride/dist/artifacts/format.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/freshness.d.ts +32 -0
- package/node_modules/checkride/dist/artifacts/freshness.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/freshness.js +37 -0
- package/node_modules/checkride/dist/artifacts/freshness.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/index.d.ts +22 -0
- package/node_modules/checkride/dist/artifacts/index.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/index.js +19 -0
- package/node_modules/checkride/dist/artifacts/index.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/json.d.ts +31 -0
- package/node_modules/checkride/dist/artifacts/json.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/json.js +47 -0
- package/node_modules/checkride/dist/artifacts/json.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/raw.d.ts +60 -0
- package/node_modules/checkride/dist/artifacts/raw.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/raw.js +91 -0
- package/node_modules/checkride/dist/artifacts/raw.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/summary.d.ts +69 -0
- package/node_modules/checkride/dist/artifacts/summary.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/summary.js +108 -0
- package/node_modules/checkride/dist/artifacts/summary.js.map +1 -0
- package/node_modules/checkride/dist/atomic.d.ts +16 -1
- package/node_modules/checkride/dist/atomic.d.ts.map +1 -1
- package/node_modules/checkride/dist/atomic.js +25 -3
- package/node_modules/checkride/dist/atomic.js.map +1 -1
- package/node_modules/checkride/dist/baseline/fallow.d.ts +9 -5
- package/node_modules/checkride/dist/baseline/fallow.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/fallow.js +161 -58
- package/node_modules/checkride/dist/baseline/fallow.js.map +1 -1
- package/node_modules/checkride/dist/baseline/fingerprint.d.ts +7 -7
- package/node_modules/checkride/dist/baseline/fingerprint.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/fingerprint.js +16 -19
- package/node_modules/checkride/dist/baseline/fingerprint.js.map +1 -1
- package/node_modules/checkride/dist/baseline/index.d.ts +4 -4
- package/node_modules/checkride/dist/baseline/index.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/index.js +4 -4
- package/node_modules/checkride/dist/baseline/index.js.map +1 -1
- package/node_modules/checkride/dist/baseline/store.d.ts +12 -4
- package/node_modules/checkride/dist/baseline/store.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/store.js +16 -9
- package/node_modules/checkride/dist/baseline/store.js.map +1 -1
- package/node_modules/checkride/dist/baseline-command.d.ts +5 -5
- package/node_modules/checkride/dist/baseline-command.js +7 -7
- package/node_modules/checkride/dist/baseline-command.js.map +1 -1
- package/node_modules/checkride/dist/cli.d.ts +17 -4
- package/node_modules/checkride/dist/cli.d.ts.map +1 -1
- package/node_modules/checkride/dist/cli.js +259 -18
- package/node_modules/checkride/dist/cli.js.map +1 -1
- package/node_modules/checkride/dist/config.d.ts +84 -8
- package/node_modules/checkride/dist/config.d.ts.map +1 -1
- package/node_modules/checkride/dist/config.js +122 -18
- package/node_modules/checkride/dist/config.js.map +1 -1
- package/node_modules/checkride/dist/digest/digest.d.ts +5 -5
- package/node_modules/checkride/dist/digest/digest.js +5 -5
- package/node_modules/checkride/dist/digest/index.d.ts +2 -2
- package/node_modules/checkride/dist/digest/index.js +2 -2
- package/node_modules/checkride/dist/doctor.d.ts +25 -6
- package/node_modules/checkride/dist/doctor.d.ts.map +1 -1
- package/node_modules/checkride/dist/doctor.js +193 -27
- package/node_modules/checkride/dist/doctor.js.map +1 -1
- package/node_modules/checkride/dist/gate.d.ts +135 -0
- package/node_modules/checkride/dist/gate.d.ts.map +1 -0
- package/node_modules/checkride/dist/gate.js +490 -0
- package/node_modules/checkride/dist/gate.js.map +1 -0
- package/node_modules/checkride/dist/init.d.ts +72 -12
- package/node_modules/checkride/dist/init.d.ts.map +1 -1
- package/node_modules/checkride/dist/init.js +324 -81
- package/node_modules/checkride/dist/init.js.map +1 -1
- package/node_modules/checkride/dist/json.d.ts +21 -0
- package/node_modules/checkride/dist/json.d.ts.map +1 -0
- package/node_modules/checkride/dist/json.js +21 -0
- package/node_modules/checkride/dist/json.js.map +1 -0
- package/node_modules/checkride/dist/links.d.ts +31 -5
- package/node_modules/checkride/dist/links.d.ts.map +1 -1
- package/node_modules/checkride/dist/links.js +141 -32
- package/node_modules/checkride/dist/links.js.map +1 -1
- package/node_modules/checkride/dist/node-pin.d.ts +129 -0
- package/node_modules/checkride/dist/node-pin.d.ts.map +1 -0
- package/node_modules/checkride/dist/node-pin.js +211 -0
- package/node_modules/checkride/dist/node-pin.js.map +1 -0
- package/node_modules/checkride/dist/orchestrator.d.ts +40 -10
- package/node_modules/checkride/dist/orchestrator.d.ts.map +1 -1
- package/node_modules/checkride/dist/orchestrator.js +196 -102
- package/node_modules/checkride/dist/orchestrator.js.map +1 -1
- package/node_modules/checkride/dist/pack.d.ts +8 -9
- package/node_modules/checkride/dist/pack.d.ts.map +1 -1
- package/node_modules/checkride/dist/pack.js +53 -17
- package/node_modules/checkride/dist/pack.js.map +1 -1
- package/node_modules/checkride/dist/pm/detect.d.ts +6 -1
- package/node_modules/checkride/dist/pm/detect.d.ts.map +1 -1
- package/node_modules/checkride/dist/pm/detect.js +6 -1
- package/node_modules/checkride/dist/pm/detect.js.map +1 -1
- package/node_modules/checkride/dist/pm/index.d.ts +6 -2
- package/node_modules/checkride/dist/pm/index.d.ts.map +1 -1
- package/node_modules/checkride/dist/pm/index.js +6 -2
- package/node_modules/checkride/dist/pm/index.js.map +1 -1
- package/node_modules/checkride/dist/pm/launch.d.ts +51 -0
- package/node_modules/checkride/dist/pm/launch.d.ts.map +1 -0
- package/node_modules/checkride/dist/pm/launch.js +92 -0
- package/node_modules/checkride/dist/pm/launch.js.map +1 -0
- package/node_modules/checkride/dist/pm/tools.d.ts +73 -0
- package/node_modules/checkride/dist/pm/tools.d.ts.map +1 -0
- package/node_modules/checkride/dist/pm/tools.js +124 -0
- package/node_modules/checkride/dist/pm/tools.js.map +1 -0
- package/node_modules/checkride/dist/pm/translate.d.ts +35 -9
- package/node_modules/checkride/dist/pm/translate.d.ts.map +1 -1
- package/node_modules/checkride/dist/pm/translate.js +78 -18
- package/node_modules/checkride/dist/pm/translate.js.map +1 -1
- package/node_modules/checkride/dist/proc.d.ts +30 -0
- package/node_modules/checkride/dist/proc.d.ts.map +1 -0
- package/node_modules/checkride/dist/proc.js +42 -0
- package/node_modules/checkride/dist/proc.js.map +1 -0
- package/node_modules/checkride/dist/qa/cli.d.ts +20 -0
- package/node_modules/checkride/dist/qa/cli.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/cli.js +24 -0
- package/node_modules/checkride/dist/qa/cli.js.map +1 -0
- package/node_modules/checkride/dist/qa/dead.d.ts +39 -0
- package/node_modules/checkride/dist/qa/dead.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/dead.js +88 -0
- package/node_modules/checkride/dist/qa/dead.js.map +1 -0
- package/node_modules/checkride/dist/qa/dupes.d.ts +45 -0
- package/node_modules/checkride/dist/qa/dupes.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/dupes.js +62 -0
- package/node_modules/checkride/dist/qa/dupes.js.map +1 -0
- package/node_modules/checkride/dist/qa/health.d.ts +85 -0
- package/node_modules/checkride/dist/qa/health.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/health.js +109 -0
- package/node_modules/checkride/dist/qa/health.js.map +1 -0
- package/node_modules/checkride/dist/qa/index.d.ts +23 -0
- package/node_modules/checkride/dist/qa/index.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/index.js +22 -0
- package/node_modules/checkride/dist/qa/index.js.map +1 -0
- package/node_modules/checkride/dist/qa/mutation.d.ts +80 -0
- package/node_modules/checkride/dist/qa/mutation.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/mutation.js +195 -0
- package/node_modules/checkride/dist/qa/mutation.js.map +1 -0
- package/node_modules/checkride/dist/qa/qa.d.ts +71 -0
- package/node_modules/checkride/dist/qa/qa.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/qa.js +158 -0
- package/node_modules/checkride/dist/qa/qa.js.map +1 -0
- package/node_modules/checkride/dist/qa/read.d.ts +40 -0
- package/node_modules/checkride/dist/qa/read.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/read.js +47 -0
- package/node_modules/checkride/dist/qa/read.js.map +1 -0
- package/node_modules/checkride/dist/qa/render.d.ts +26 -0
- package/node_modules/checkride/dist/qa/render.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/render.js +310 -0
- package/node_modules/checkride/dist/qa/render.js.map +1 -0
- package/node_modules/checkride/dist/security.d.ts +45 -0
- package/node_modules/checkride/dist/security.d.ts.map +1 -0
- package/node_modules/checkride/dist/security.js +86 -0
- package/node_modules/checkride/dist/security.js.map +1 -0
- package/node_modules/checkride/dist/smoke.d.ts +5 -5
- package/node_modules/checkride/dist/smoke.js +5 -5
- package/node_modules/checkride/dist/snippets.d.ts +26 -29
- package/node_modules/checkride/dist/snippets.d.ts.map +1 -1
- package/node_modules/checkride/dist/snippets.js +26 -30
- package/node_modules/checkride/dist/snippets.js.map +1 -1
- package/node_modules/checkride/dist/tool-json.d.ts +33 -0
- package/node_modules/checkride/dist/tool-json.d.ts.map +1 -0
- package/node_modules/checkride/dist/tool-json.js +58 -0
- package/node_modules/checkride/dist/tool-json.js.map +1 -0
- package/node_modules/checkride/dist/triage/cli.d.ts +21 -0
- package/node_modules/checkride/dist/triage/cli.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/cli.js +26 -0
- package/node_modules/checkride/dist/triage/cli.js.map +1 -0
- package/node_modules/checkride/dist/triage/doctor-fold.d.ts +51 -0
- package/node_modules/checkride/dist/triage/doctor-fold.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/doctor-fold.js +88 -0
- package/node_modules/checkride/dist/triage/doctor-fold.js.map +1 -0
- package/node_modules/checkride/dist/triage/env.d.ts +54 -0
- package/node_modules/checkride/dist/triage/env.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/env.js +81 -0
- package/node_modules/checkride/dist/triage/env.js.map +1 -0
- package/node_modules/checkride/dist/triage/gate.d.ts +61 -0
- package/node_modules/checkride/dist/triage/gate.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/gate.js +121 -0
- package/node_modules/checkride/dist/triage/gate.js.map +1 -0
- package/node_modules/checkride/dist/triage/index.d.ts +22 -0
- package/node_modules/checkride/dist/triage/index.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/index.js +20 -0
- package/node_modules/checkride/dist/triage/index.js.map +1 -0
- package/node_modules/checkride/dist/triage/render.d.ts +19 -0
- package/node_modules/checkride/dist/triage/render.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/render.js +419 -0
- package/node_modules/checkride/dist/triage/render.js.map +1 -0
- package/node_modules/checkride/dist/triage/triage.d.ts +83 -0
- package/node_modules/checkride/dist/triage/triage.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/triage.js +131 -0
- package/node_modules/checkride/dist/triage/triage.js.map +1 -0
- package/node_modules/checkride/package.json +17 -15
- package/node_modules/checkride/schema/checkride.config.schema.json +62 -5
- package/node_modules/checkride/schema/checkride.summary.schema.json +1 -1
- package/node_modules/checkride/skills/check/SKILL.md +257 -0
- package/node_modules/checkride/skills/qa/SKILL.md +231 -0
- package/node_modules/checkride/templates/shared/cspell.json +1 -0
- package/node_modules/checkride/templates/shared/oxlintrc.json +1 -1
- package/package.json +2 -2
- package/skills/build/SKILL.md +23 -19
- package/skills/finish/SKILL.md +3 -1
- package/skills/harvest/SKILL.md +2 -1
- package/skills/plan/SKILL.md +8 -7
- package/skills/recover/SKILL.md +28 -0
- package/skills/refine/SKILL.md +5 -4
- package/skills/spike/SKILL.md +1 -1
- package/skills/step/SKILL.md +4 -4
- package/skills/verify/SKILL.md +19 -14
- package/templates/intent.md +8 -7
|
@@ -1,63 +1,56 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Agent hooks — the mechanical half of the agent contract.
|
|
3
3
|
*
|
|
4
|
-
* `init` and `checkride agent-setup` write
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* check`, `bun run check`) so the hook works in any repo, not only pnpm ones
|
|
10
|
-
* (b7). Merging is surgical: unrelated hooks, other Stop groups, and every other
|
|
11
|
-
* settings key are preserved, and re-applying with the same PM is a no-op.
|
|
4
|
+
* `init` and `checkride agent-setup` write a small registry of hooks into every
|
|
5
|
+
* selected harness's config. The load-bearing one is the gate: it runs the
|
|
6
|
+
* project's `check` script when the turn ends and refuses to let the agent
|
|
7
|
+
* finish while the pipeline is red, so "exit 0 = done" becomes enforcement, not
|
|
8
|
+
* just advice.
|
|
12
9
|
*
|
|
13
|
-
* This module
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
command?: string;
|
|
24
|
-
};
|
|
25
|
-
/** A Stop-hook group. Only `hooks` is meaningful for Stop; other keys pass through. */
|
|
26
|
-
type StopGroup = {
|
|
27
|
-
hooks?: CommandHook[];
|
|
28
|
-
} & Record<string, unknown>;
|
|
29
|
-
/** The subset of `.claude/settings.json` we touch; every other key is preserved. */
|
|
30
|
-
type ClaudeSettings = {
|
|
31
|
-
hooks?: {
|
|
32
|
-
Stop?: StopGroup[];
|
|
33
|
-
} & Record<string, unknown>;
|
|
34
|
-
} & Record<string, unknown>;
|
|
35
|
-
/**
|
|
36
|
-
* The Stop-hook command for `pm`: run the gate, and on red print guidance and
|
|
37
|
-
* exit 2 (the blocking code — a plain exit 1 lets the agent stop anyway).
|
|
10
|
+
* This module is the harness-neutral half — which hooks exist, which harnesses a
|
|
11
|
+
* repo wants, and the fan-out. Everything harness-shaped lives in a sibling:
|
|
12
|
+
* `./claude.ts` and `./cursor.ts` own their config schemas, `./scripts.ts` owns
|
|
13
|
+
* the generated scripts, and `../gate.ts` owns the verdict those scripts hand
|
|
14
|
+
* back. Adding a third harness means one more sibling and one more entry in
|
|
15
|
+
* `HARNESS_NAMES`, not a change here.
|
|
16
|
+
*
|
|
17
|
+
* The AGENTS.md stanza and the higher-level `agent-setup` command live in
|
|
18
|
+
* `init.ts`, which imports the writers here — a single direction, so there is no
|
|
19
|
+
* cycle.
|
|
38
20
|
*/
|
|
39
|
-
|
|
21
|
+
import { type HarnessName } from '../gate.js';
|
|
22
|
+
import type { PackageManager } from '../pm/index.js';
|
|
23
|
+
import type { HookFile } from './files.js';
|
|
24
|
+
import { HOOK_NAMES, type HookName } from './harness.js';
|
|
25
|
+
export { HOOK_NAMES, type HookName };
|
|
40
26
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
27
|
+
* Which harnesses to wire up when `--harness` was not given.
|
|
28
|
+
*
|
|
29
|
+
* Claude Code is always included: it is the harness checkride was built against,
|
|
30
|
+
* and writing its hooks into a repo that never opens Claude costs two ignored
|
|
31
|
+
* files. Cursor is included only on evidence (`.cursor/` exists), because the
|
|
32
|
+
* inverse — seeding `.cursor/` into every repo checkride touches — would put
|
|
33
|
+
* config in front of people who never asked for it.
|
|
46
34
|
*/
|
|
47
|
-
export declare function
|
|
48
|
-
export type StopHookResult = {
|
|
49
|
-
path: string;
|
|
50
|
-
changed: boolean;
|
|
51
|
-
};
|
|
35
|
+
export declare function detectHarnesses(cwd: string): HarnessName[];
|
|
52
36
|
/**
|
|
53
|
-
* Write or refresh the
|
|
54
|
-
* (
|
|
55
|
-
*
|
|
56
|
-
*
|
|
37
|
+
* Write or refresh the selected hooks (default: all) for the selected harnesses
|
|
38
|
+
* (default: detected) in `cwd`, and tear out any named in `remove`. Every write
|
|
39
|
+
* is idempotent — a second run reports `changed: false` per file — and `dryRun`
|
|
40
|
+
* computes the result without writing.
|
|
41
|
+
*
|
|
42
|
+
* Removal is how a hook goes away *after the fact*: unselecting one with
|
|
43
|
+
* `hooks` only declines to refresh it, which leaves an already-installed gate
|
|
44
|
+
* firing. The two compose — `{ hooks: [], remove: ['gate'] }` removes the gate
|
|
45
|
+
* and leaves everything else exactly as it stands.
|
|
57
46
|
*/
|
|
58
|
-
export declare function
|
|
47
|
+
export declare function writeHooks(cwd: string, opts?: {
|
|
59
48
|
pm?: PackageManager;
|
|
60
49
|
dryRun?: boolean;
|
|
61
|
-
|
|
62
|
-
|
|
50
|
+
hooks?: readonly HookName[];
|
|
51
|
+
remove?: readonly HookName[];
|
|
52
|
+
harnesses?: readonly HarnessName[];
|
|
53
|
+
}): Promise<{
|
|
54
|
+
files: HookFile[];
|
|
55
|
+
}>;
|
|
63
56
|
//# sourceMappingURL=hook.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/agent-setup/hook.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/agent-setup/hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,KAAK,QAAQ,EAAqB,MAAM,cAAc,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,KAAK,QAAQ,EAAE,CAAC;AAcrC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,EAAE,CAE1D;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,MAAM,EACX,IAAI,GAAE;IACJ,EAAE,CAAC,EAAE,cAAc,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC5B,MAAM,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC7B,SAAS,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;CAC/B,GACL,OAAO,CAAC;IAAE,KAAK,EAAE,QAAQ,EAAE,CAAA;CAAE,CAAC,CAahC"}
|
|
@@ -1,106 +1,75 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Agent hooks — the mechanical half of the agent contract.
|
|
3
3
|
*
|
|
4
|
-
* `init` and `checkride agent-setup` write
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* check`, `bun run check`) so the hook works in any repo, not only pnpm ones
|
|
10
|
-
* (b7). Merging is surgical: unrelated hooks, other Stop groups, and every other
|
|
11
|
-
* settings key are preserved, and re-applying with the same PM is a no-op.
|
|
4
|
+
* `init` and `checkride agent-setup` write a small registry of hooks into every
|
|
5
|
+
* selected harness's config. The load-bearing one is the gate: it runs the
|
|
6
|
+
* project's `check` script when the turn ends and refuses to let the agent
|
|
7
|
+
* finish while the pipeline is red, so "exit 0 = done" becomes enforcement, not
|
|
8
|
+
* just advice.
|
|
12
9
|
*
|
|
13
|
-
* This module
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* Stable, package-manager-independent marker identifying checkride's Stop hook
|
|
24
|
-
* inside a settings file. The run prefix varies by PM, so identity keys on the
|
|
25
|
-
* guidance message, which does not.
|
|
26
|
-
*/
|
|
27
|
-
const HOOK_SENTINEL = 'checkride: the gate is red';
|
|
28
|
-
/** True when a hook entry is checkride's (matched by the PM-independent sentinel). */
|
|
29
|
-
function isCheckrideHook(hook) {
|
|
30
|
-
return hook.type === 'command' && typeof hook.command === 'string' && hook.command.includes(HOOK_SENTINEL);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* The Stop-hook command for `pm`: run the gate, and on red print guidance and
|
|
34
|
-
* exit 2 (the blocking code — a plain exit 1 lets the agent stop anyway).
|
|
35
|
-
*/
|
|
36
|
-
export function stopHookCommand(pm) {
|
|
37
|
-
const run = `${pm} run check`;
|
|
38
|
-
const guidance = `${HOOK_SENTINEL} — read .check/summary.json, fix the failing slot, then finish (do not stop while checkride is red).`;
|
|
39
|
-
return `${run} || { echo '${guidance}' >&2; exit 2; }`;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Merge checkride's Stop hook into parsed settings, idempotently. An existing
|
|
43
|
-
* checkride hook (found by its sentinel) has its command refreshed in place;
|
|
44
|
-
* otherwise a new Stop group is appended. Sibling hooks in the same group, other
|
|
45
|
-
* Stop groups, and every unrelated settings key are left untouched, so applying
|
|
46
|
-
* twice with the same command yields deep-equal settings.
|
|
10
|
+
* This module is the harness-neutral half — which hooks exist, which harnesses a
|
|
11
|
+
* repo wants, and the fan-out. Everything harness-shaped lives in a sibling:
|
|
12
|
+
* `./claude.ts` and `./cursor.ts` own their config schemas, `./scripts.ts` owns
|
|
13
|
+
* the generated scripts, and `../gate.ts` owns the verdict those scripts hand
|
|
14
|
+
* back. Adding a third harness means one more sibling and one more entry in
|
|
15
|
+
* `HARNESS_NAMES`, not a change here.
|
|
16
|
+
*
|
|
17
|
+
* The AGENTS.md stanza and the higher-level `agent-setup` command live in
|
|
18
|
+
* `init.ts`, which imports the writers here — a single direction, so there is no
|
|
19
|
+
* cycle.
|
|
47
20
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
try {
|
|
66
|
-
return await readFile(path, 'utf8');
|
|
67
|
-
}
|
|
68
|
-
catch {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
21
|
+
import { existsSync } from 'node:fs';
|
|
22
|
+
import { join } from 'node:path';
|
|
23
|
+
import { HARNESS_NAMES } from '../gate.js';
|
|
24
|
+
import { writeClaudeHooks } from './claude.js';
|
|
25
|
+
import { writeCursorHooks } from './cursor.js';
|
|
26
|
+
import { HOOK_NAMES } from './harness.js';
|
|
27
|
+
export { HOOK_NAMES };
|
|
28
|
+
/** The per-harness writers, keyed so the fan-out is a lookup, not a switch. */
|
|
29
|
+
const WRITERS = {
|
|
30
|
+
claude: writeClaudeHooks,
|
|
31
|
+
cursor: writeCursorHooks,
|
|
32
|
+
};
|
|
33
|
+
/** The directory whose presence means a repo is already using that harness. */
|
|
34
|
+
const HARNESS_MARKER = {
|
|
35
|
+
claude: '.claude',
|
|
36
|
+
cursor: '.cursor',
|
|
37
|
+
};
|
|
72
38
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
39
|
+
* Which harnesses to wire up when `--harness` was not given.
|
|
40
|
+
*
|
|
41
|
+
* Claude Code is always included: it is the harness checkride was built against,
|
|
42
|
+
* and writing its hooks into a repo that never opens Claude costs two ignored
|
|
43
|
+
* files. Cursor is included only on evidence (`.cursor/` exists), because the
|
|
44
|
+
* inverse — seeding `.cursor/` into every repo checkride touches — would put
|
|
45
|
+
* config in front of people who never asked for it.
|
|
76
46
|
*/
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
-
return JSON.parse(raw);
|
|
80
|
-
}
|
|
81
|
-
catch (err) {
|
|
82
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
83
|
-
throw new Error(`invalid ${CLAUDE_SETTINGS_FILE}: ${reason}`, { cause: err });
|
|
84
|
-
}
|
|
47
|
+
export function detectHarnesses(cwd) {
|
|
48
|
+
return HARNESS_NAMES.filter((h) => h === 'claude' || existsSync(join(cwd, HARNESS_MARKER[h])));
|
|
85
49
|
}
|
|
86
50
|
/**
|
|
87
|
-
* Write or refresh the
|
|
88
|
-
* (
|
|
89
|
-
*
|
|
90
|
-
*
|
|
51
|
+
* Write or refresh the selected hooks (default: all) for the selected harnesses
|
|
52
|
+
* (default: detected) in `cwd`, and tear out any named in `remove`. Every write
|
|
53
|
+
* is idempotent — a second run reports `changed: false` per file — and `dryRun`
|
|
54
|
+
* computes the result without writing.
|
|
55
|
+
*
|
|
56
|
+
* Removal is how a hook goes away *after the fact*: unselecting one with
|
|
57
|
+
* `hooks` only declines to refresh it, which leaves an already-installed gate
|
|
58
|
+
* firing. The two compose — `{ hooks: [], remove: ['gate'] }` removes the gate
|
|
59
|
+
* and leaves everything else exactly as it stands.
|
|
91
60
|
*/
|
|
92
|
-
export async function
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return {
|
|
61
|
+
export async function writeHooks(cwd, opts = {}) {
|
|
62
|
+
const hooks = opts.hooks ?? HOOK_NAMES;
|
|
63
|
+
const harnesses = opts.harnesses ?? detectHarnesses(cwd);
|
|
64
|
+
const write = {
|
|
65
|
+
...(opts.pm ? { pm: opts.pm } : {}),
|
|
66
|
+
...(opts.remove ? { remove: opts.remove } : {}),
|
|
67
|
+
dryRun: opts.dryRun ?? false,
|
|
68
|
+
hooks,
|
|
69
|
+
};
|
|
70
|
+
// Concurrent: no two harnesses share a path, and `Promise.all` keeps the
|
|
71
|
+
// reported order tied to the selection rather than to who finished first.
|
|
72
|
+
const perHarness = await Promise.all(harnesses.map((h) => WRITERS[h](cwd, write)));
|
|
73
|
+
return { files: perHarness.flat() };
|
|
105
74
|
}
|
|
106
75
|
//# sourceMappingURL=hook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../src/agent-setup/hook.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../src/agent-setup/hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAoB,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAoC,MAAM,cAAc,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAiB,CAAC;AAErC,+EAA+E;AAC/E,MAAM,OAAO,GAAkF;IAC7F,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,gBAAgB;CACzB,CAAC;AAEF,+EAA+E;AAC/E,MAAM,cAAc,GAAgC;IAClD,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;CAClB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,GAAW;IACzC,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjG,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,GAAW,EACX,OAMI,EAAE;IAEN,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,UAAU,CAAC;IACvC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,KAAK,GAAiB;QAC1B,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/C,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;QAC5B,KAAK;KACN,CAAC;IACF,yEAAyE;IACzE,0EAA0E;IAC1E,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACnF,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Agent-setup module — the
|
|
3
|
-
* module's only public surface
|
|
4
|
-
* never from `./hook.js` directly.
|
|
2
|
+
* Agent-setup module — the hooks every supported harness gets (the stop gate and
|
|
3
|
+
* kin). This barrel is the module's only public surface: siblings import from
|
|
4
|
+
* `../agent-setup`, never from `./hook.js` or a per-harness writer directly.
|
|
5
5
|
*/
|
|
6
|
-
export {
|
|
6
|
+
export { applyHooks, CLAUDE_SETTINGS_FILE, GATE_SCRIPT_FILE, PROTECT_SCRIPT_FILE, removeHooks, } from './claude.js';
|
|
7
|
+
export { type HooksOptions, runHooks } from './command.js';
|
|
8
|
+
export { applyCursorHooks, CURSOR_HOOKS_FILE, removeCursorHooks } from './cursor.js';
|
|
9
|
+
export type { HookFile } from './files.js';
|
|
10
|
+
export { detectHarnesses, HOOK_NAMES, type HookName, writeHooks } from './hook.js';
|
|
11
|
+
export { dirtyScript, gateScript, protectScript } from './scripts.js';
|
|
12
|
+
export { CURSOR_SKILLS_DIR, renameSkill, writeCursorSkills } from './skills.js';
|
|
7
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent-setup/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent-setup/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,GACZ,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,YAAY,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErF,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,KAAK,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Agent-setup module — the
|
|
3
|
-
* module's only public surface
|
|
4
|
-
* never from `./hook.js` directly.
|
|
2
|
+
* Agent-setup module — the hooks every supported harness gets (the stop gate and
|
|
3
|
+
* kin). This barrel is the module's only public surface: siblings import from
|
|
4
|
+
* `../agent-setup`, never from `./hook.js` or a per-harness writer directly.
|
|
5
5
|
*/
|
|
6
|
-
export {
|
|
6
|
+
export { applyHooks, CLAUDE_SETTINGS_FILE, GATE_SCRIPT_FILE, PROTECT_SCRIPT_FILE, removeHooks, } from './claude.js';
|
|
7
|
+
export { runHooks } from './command.js';
|
|
8
|
+
export { applyCursorHooks, CURSOR_HOOKS_FILE, removeCursorHooks } from './cursor.js';
|
|
9
|
+
export { detectHarnesses, HOOK_NAMES, writeHooks } from './hook.js';
|
|
10
|
+
export { dirtyScript, gateScript, protectScript } from './scripts.js';
|
|
11
|
+
export { CURSOR_SKILLS_DIR, renameSkill, writeCursorSkills } from './skills.js';
|
|
7
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent-setup/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent-setup/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,GACZ,MAAM,aAAa,CAAC;AAErB,OAAO,EAAqB,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIrF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAiB,UAAU,EAAE,MAAM,WAAW,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hook scripts checkride generates into a consumer repo.
|
|
3
|
+
*
|
|
4
|
+
* checkride owns these files and overwrites them on every `agent-setup`/`init`,
|
|
5
|
+
* so consumer customization belongs beside them, never in them. That is also why
|
|
6
|
+
* the settings entry each harness gets is a stable one-liner invoking a script
|
|
7
|
+
* rather than the behavior inline: a refresh rewrites the script freely without
|
|
8
|
+
* ever clobbering an entry a human may have edited.
|
|
9
|
+
*
|
|
10
|
+
* **Every script here is one a harness's configuration could not express.** A
|
|
11
|
+
* generated file in someone's repo is a standing cost — reviewed, kept in sync,
|
|
12
|
+
* wondered about — so it is written only where config falls short. Claude Code
|
|
13
|
+
* takes just the gate: its `protect` is a `permissions.deny` rule and its
|
|
14
|
+
* `dirty` an inline command. Cursor, whose config is hooks and nothing else,
|
|
15
|
+
* still takes all three. The gate is the one both need, because it alone has a
|
|
16
|
+
* branch neither config can carry (see {@link gateTail}).
|
|
17
|
+
*/
|
|
18
|
+
import { type HarnessName } from '../gate.js';
|
|
19
|
+
import { type PackageManager } from '../pm/index.js';
|
|
20
|
+
/**
|
|
21
|
+
* The gate script: `cd` to the repo, hand off to `checkride gate`, and translate
|
|
22
|
+
* the result into the harness's protocol.
|
|
23
|
+
*
|
|
24
|
+
* `dirtyGuard` (on when the `dirty` hook is written alongside — the default)
|
|
25
|
+
* makes the gate conditional on the edit marker, so pure-conversation turns
|
|
26
|
+
* don't pay for a full pipeline run. Without the marker hook the guard would
|
|
27
|
+
* disarm the gate entirely, so a `--hook gate` selection writes it unguarded.
|
|
28
|
+
*/
|
|
29
|
+
export declare function gateScript(pm: PackageManager, opts: {
|
|
30
|
+
harness: HarnessName;
|
|
31
|
+
dirtyGuard?: boolean;
|
|
32
|
+
}): string;
|
|
33
|
+
/**
|
|
34
|
+
* The dirty script: mark that this turn edited a file. A stop hook fires on
|
|
35
|
+
* every turn, including pure-conversation ones; the marker is what lets the gate
|
|
36
|
+
* skip those instead of taxing every reply with a full pipeline run.
|
|
37
|
+
*
|
|
38
|
+
* It exits 0 unconditionally. A failure to record an edit must never block the
|
|
39
|
+
* edit itself — the cost of a missed marker is one skipped gate, and the cost of
|
|
40
|
+
* a hard failure here is a repo where no file can be written.
|
|
41
|
+
*/
|
|
42
|
+
export declare function dirtyScript(): string;
|
|
43
|
+
/**
|
|
44
|
+
* The `protect` deny script: "never add to the baseline to make a check pass" as
|
|
45
|
+
* enforcement, not README advice. A Node script (not sh) because the hook
|
|
46
|
+
* protocol is JSON on stdin, and every checkride repo has node by construction;
|
|
47
|
+
* `.cjs` so it runs regardless of the repo's module type. Only edit tools are
|
|
48
|
+
* matched — reads are never denied, because triage depends on reading `.check/`
|
|
49
|
+
* artifacts.
|
|
50
|
+
*
|
|
51
|
+
* **Cursor only.** Claude Code enforces the same paths through
|
|
52
|
+
* `permissions.deny`, which is checked below the hook layer and costs nothing
|
|
53
|
+
* per tool call, so it needs no script. Cursor has no documented equivalent —
|
|
54
|
+
* its config is hooks — so the script survives for the harness that still
|
|
55
|
+
* requires one. If Cursor grows a file-path deny list, this file goes away.
|
|
56
|
+
*/
|
|
57
|
+
export declare function protectScript(): string;
|
|
58
|
+
//# sourceMappingURL=scripts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scripts.d.ts","sourceRoot":"","sources":["../../src/agent-setup/scripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAwHlE;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,EAAE,EAAE,cAAc,EAClB,IAAI,EAAE;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACnD,MAAM,CAmBR;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAepC;AA8CD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,IAAI,MAAM,CA4DtC"}
|