plumbbob 0.9.3 → 0.10.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/.claude-plugin/plugin.json +1 -1
- package/README.md +92 -89
- package/dist/cli-core.js +25 -8
- package/dist/cli.js +1 -1
- package/dist/lib/agents.js +26 -26
- package/dist/lib/buildlog.js +11 -11
- package/dist/lib/buildlogsync.js +8 -8
- package/dist/lib/check.js +55 -22
- package/dist/lib/commitbody.js +72 -0
- package/dist/lib/commitmsg.js +7 -7
- package/dist/lib/git.js +44 -15
- package/dist/lib/intent.js +21 -20
- package/dist/lib/latch.js +19 -19
- package/dist/lib/orient.js +36 -17
- package/dist/lib/reentry.js +70 -0
- package/dist/lib/settings.js +16 -16
- package/dist/lib/sidecar.js +54 -54
- package/dist/lib/templates.js +1 -1
- package/dist/verbs/agent.js +27 -27
- package/dist/verbs/build.js +9 -9
- package/dist/verbs/check.js +6 -6
- package/dist/verbs/checkpoint.js +48 -47
- package/dist/verbs/doctor.js +31 -30
- package/dist/verbs/finish.js +28 -41
- package/dist/verbs/handoff.js +9 -8
- package/dist/verbs/init.js +9 -9
- package/dist/verbs/park.js +3 -3
- package/dist/verbs/recover.js +297 -0
- package/dist/verbs/revert.js +13 -13
- package/dist/verbs/spike.js +25 -19
- package/dist/verbs/start.js +49 -19
- package/dist/verbs/status.js +8 -8
- package/dist/verbs/turn.js +16 -16
- package/dist/verbs/use.js +4 -4
- 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 +1404 -0
- package/node_modules/checkride/LICENSE +201 -21
- package/node_modules/checkride/README.md +197 -38
- 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 +30 -10
- package/node_modules/checkride/dist/adapters.d.ts.map +1 -1
- package/node_modules/checkride/dist/adapters.js +62 -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 +69 -0
- package/node_modules/checkride/dist/agent-setup/cursor.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/cursor.js +247 -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 +93 -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 +81 -0
- package/node_modules/checkride/dist/agent-setup/scripts.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/scripts.js +604 -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 +163 -60
- package/node_modules/checkride/dist/baseline/fallow.js.map +1 -1
- package/node_modules/checkride/dist/baseline/fingerprint.d.ts +20 -11
- package/node_modules/checkride/dist/baseline/fingerprint.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/fingerprint.js +73 -23
- package/node_modules/checkride/dist/baseline/fingerprint.js.map +1 -1
- package/node_modules/checkride/dist/baseline/history.d.ts +98 -0
- package/node_modules/checkride/dist/baseline/history.d.ts.map +1 -0
- package/node_modules/checkride/dist/baseline/history.js +232 -0
- package/node_modules/checkride/dist/baseline/history.js.map +1 -0
- package/node_modules/checkride/dist/baseline/index.d.ts +7 -5
- package/node_modules/checkride/dist/baseline/index.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/index.js +5 -4
- package/node_modules/checkride/dist/baseline/index.js.map +1 -1
- package/node_modules/checkride/dist/baseline/store.d.ts +41 -10
- package/node_modules/checkride/dist/baseline/store.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/store.js +65 -24
- 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 +21 -4
- package/node_modules/checkride/dist/cli.d.ts.map +1 -1
- package/node_modules/checkride/dist/cli.js +350 -36
- package/node_modules/checkride/dist/cli.js.map +1 -1
- package/node_modules/checkride/dist/config.d.ts +114 -9
- package/node_modules/checkride/dist/config.d.ts.map +1 -1
- package/node_modules/checkride/dist/config.js +142 -23
- 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 +6 -6
- 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 +27 -6
- package/node_modules/checkride/dist/doctor.d.ts.map +1 -1
- package/node_modules/checkride/dist/doctor.js +231 -27
- package/node_modules/checkride/dist/doctor.js.map +1 -1
- package/node_modules/checkride/dist/gate.d.ts +180 -0
- package/node_modules/checkride/dist/gate.d.ts.map +1 -0
- package/node_modules/checkride/dist/gate.js +617 -0
- package/node_modules/checkride/dist/gate.js.map +1 -0
- package/node_modules/checkride/dist/init.d.ts +79 -12
- package/node_modules/checkride/dist/init.d.ts.map +1 -1
- package/node_modules/checkride/dist/init.js +385 -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 +53 -10
- package/node_modules/checkride/dist/orchestrator.d.ts.map +1 -1
- package/node_modules/checkride/dist/orchestrator.js +312 -113
- 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 +7 -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 +72 -0
- package/node_modules/checkride/dist/pm/launch.d.ts.map +1 -0
- package/node_modules/checkride/dist/pm/launch.js +108 -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/recover.d.ts +48 -0
- package/node_modules/checkride/dist/recover.d.ts.map +1 -0
- package/node_modules/checkride/dist/recover.js +220 -0
- package/node_modules/checkride/dist/recover.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 +6 -6
- package/node_modules/checkride/dist/smoke.js +6 -6
- package/node_modules/checkride/dist/snippets.d.ts +27 -30
- 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 +18 -15
- package/node_modules/checkride/schema/checkride.config.schema.json +70 -5
- package/node_modules/checkride/schema/checkride.summary.schema.json +1 -1
- package/node_modules/checkride/skills/check/SKILL.md +265 -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/node_modules/checkride/templates/shared/styles/Repo/Drift.yml +41 -0
- package/node_modules/checkride/templates/shared/styles/Repo/Latin.yml +14 -0
- package/node_modules/checkride/templates/shared/styles/Repo/LyHyphen.yml +28 -0
- package/node_modules/checkride/templates/shared/styles/Repo/Minted.yml +33 -0
- package/node_modules/checkride/templates/shared/styles/Repo/ThereIs.yml +16 -0
- package/node_modules/checkride/templates/shared/styles/Repo/Weasel.yml +26 -0
- package/node_modules/checkride/templates/shared/vale.ini +34 -0
- package/package.json +10 -9
- package/skills/build/SKILL.md +85 -76
- package/skills/doctor/SKILL.md +11 -11
- package/skills/finish/SKILL.md +21 -18
- package/skills/harvest/SKILL.md +13 -11
- package/skills/park/SKILL.md +10 -10
- package/skills/plan/SKILL.md +69 -59
- package/skills/recover/SKILL.md +28 -0
- package/skills/refine/SKILL.md +21 -18
- package/skills/revert/SKILL.md +6 -6
- package/skills/spike/SKILL.md +9 -9
- package/skills/status/SKILL.md +5 -5
- package/skills/step/SKILL.md +20 -15
- package/skills/verify/SKILL.md +56 -46
- package/templates/build-log.md +7 -7
- package/templates/intent.md +52 -41
- package/templates/spike-report.md +10 -10
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `checkride gate` — the stop-gate verdict, harness-neutral.
|
|
3
|
+
*
|
|
4
|
+
* Every agent harness offers some "the turn is ending" hook, and checkride's
|
|
5
|
+
* gate hangs off it: run the repo's `check` script, and while it is red, refuse
|
|
6
|
+
* to let the turn finish. What differs between harnesses is only the *wire
|
|
7
|
+
* format* of that refusal — Claude Code reads stderr and blocks on exit 2,
|
|
8
|
+
* Cursor reads a `followup_message` on stdout and submits it as the next turn.
|
|
9
|
+
* The decision itself (is it dirty, is it green, which artifact should the agent
|
|
10
|
+
* read) is identical, so it lives here once and the generated hook scripts
|
|
11
|
+
* become two-line adapters that name their harness.
|
|
12
|
+
*
|
|
13
|
+
* That split is the point. Before this command, the whole body was duplicated
|
|
14
|
+
* shell inside `.claude/hooks/checkride-gate.sh`, untestable outside an e2e run
|
|
15
|
+
* and impossible to share with a second harness.
|
|
16
|
+
*
|
|
17
|
+
* The gate answers three verdicts, not two. Green and red are the pipeline's;
|
|
18
|
+
* the third is **could not run**, for a package manager that refused to start
|
|
19
|
+
* the check script at all — an `engines.node` pin the hook's Node does not
|
|
20
|
+
* satisfy is the common cause, and it exits non-zero exactly like a failing
|
|
21
|
+
* test. Reading that as red produced a permanent red no code change could clear,
|
|
22
|
+
* pointing at a `.check/summary.json` no run had written. So it names the cause
|
|
23
|
+
* instead of naming an artifact. See `./pm/launch.ts` for the classification and
|
|
24
|
+
* `./node-pin.ts` for the alignment that avoids it.
|
|
25
|
+
*
|
|
26
|
+
* Whether that third verdict *blocks* turns on one question: can the turn clear
|
|
27
|
+
* it? A missing `check` script can be fixed by the agent holding the edit tools,
|
|
28
|
+
* so the gate blocks and the agent fixes it. A Node the harness never put on
|
|
29
|
+
* `PATH` cannot, so the gate says so and stands down (see
|
|
30
|
+
* {@link reportStandDown}). Blocking on the second only re-asks an agent that
|
|
31
|
+
* has no lever to pull, which is not gating — it is a loop, and the way out of
|
|
32
|
+
* a loop is turning the gate off.
|
|
33
|
+
*
|
|
34
|
+
* Not to be confused with `../triage/gate.ts`, which also runs the `check`
|
|
35
|
+
* script: that one runs it *verbatim* as a reader's preflight and classifies the
|
|
36
|
+
* result for a report. This one appends `--strict --digest` because it IS the
|
|
37
|
+
* gate, and its output is a verdict for the harness, not prose for a human.
|
|
38
|
+
*/
|
|
39
|
+
import type { CheckrideConfig, GateProfile } from './config.js';
|
|
40
|
+
import type { PinEnv } from './node-pin.js';
|
|
41
|
+
import type { Out } from './orchestrator.js';
|
|
42
|
+
import { type PackageManager } from './pm/index.js';
|
|
43
|
+
/**
|
|
44
|
+
* The edit marker: touched by the harness's "a file changed" hook, checked here
|
|
45
|
+
* under `--if-dirty`, and cleared by a green gate. Dot-named so it can never
|
|
46
|
+
* collide with a slot's `<slot>.json`/`<slot>.stdout.txt` artifacts, which the
|
|
47
|
+
* orchestrator deletes per slot before a re-run — the marker must survive every
|
|
48
|
+
* run.
|
|
49
|
+
*
|
|
50
|
+
* It lives here, not in `agent-setup`, because the gate is what reads and clears
|
|
51
|
+
* it; the hook writers import it from this module to build the touch command.
|
|
52
|
+
*/
|
|
53
|
+
export declare const DIRTY_MARKER = ".check/.dirty";
|
|
54
|
+
/**
|
|
55
|
+
* Whether a follow-up has already been auto-submitted this conversation: `1` if
|
|
56
|
+
* so, `0` if not. The generated stop-hook script reads the harness's stop payload
|
|
57
|
+
* and exports it; the hook writers import the name from here to spell the export.
|
|
58
|
+
*
|
|
59
|
+
* It exists for exactly one decision. Under Cursor the only channel that reaches
|
|
60
|
+
* a *user* is `followup_message`, and that field **submits a new turn** — so a
|
|
61
|
+
* stand-down spending it on every turn is the unbounded loop a stand-down exists
|
|
62
|
+
* to avoid. `0` means the budget of one has not been spent yet. checkride cannot
|
|
63
|
+
* work this out alone: the stop payload goes to the hook script, never to this
|
|
64
|
+
* process. See {@link reportStandDown}.
|
|
65
|
+
*
|
|
66
|
+
* **Absence is not `0`.** A script generated before this variable existed exports
|
|
67
|
+
* neither value, and reading absence as "go ahead" would loop under precisely the
|
|
68
|
+
* pairing checkride cannot detect — a new binary, an old script, and the
|
|
69
|
+
* `loop_limit: null` the gate's own hook entry asks for. So absence keeps the
|
|
70
|
+
* older and quieter behavior, and only an explicit `0` unlocks the message.
|
|
71
|
+
*/
|
|
72
|
+
export declare const GATE_RETRY_ENV = "CHECKRIDE_GATE_RETRY";
|
|
73
|
+
/**
|
|
74
|
+
* Cursor's own hook config. It lives here rather than in `agent-setup/cursor.ts`
|
|
75
|
+
* for the same reason {@link DIRTY_MARKER} does: the gate *reads* it (see
|
|
76
|
+
* {@link deferredToCursor}), and the writer importing from the gate is the
|
|
77
|
+
* direction that has no cycle. `agent-setup/cursor.ts` re-exports it.
|
|
78
|
+
*/
|
|
79
|
+
export declare const CURSOR_HOOKS_FILE = ".cursor/hooks.json";
|
|
80
|
+
/** Every harness whose stop-hook protocol the gate can speak. */
|
|
81
|
+
export declare const HARNESS_NAMES: readonly ["claude", "cursor"];
|
|
82
|
+
export type HarnessName = (typeof HARNESS_NAMES)[number];
|
|
83
|
+
/**
|
|
84
|
+
* Spawn the check script and forward its output. Injectable so the command's
|
|
85
|
+
* branches are testable without a real toolchain.
|
|
86
|
+
*
|
|
87
|
+
* Both child streams are forwarded to **stderr**, never stdout: under
|
|
88
|
+
* `--harness cursor` this process's stdout must contain the hook's JSON and
|
|
89
|
+
* nothing else, and in a hook context the check's output is human-facing
|
|
90
|
+
* progress either way. Returns the exit code; a signal death is `null` and the
|
|
91
|
+
* caller reads it as red, because "not cleanly green" is the only distinction a
|
|
92
|
+
* gate needs.
|
|
93
|
+
*/
|
|
94
|
+
export type GateSpawn = (command: string, args: readonly string[], opts: {
|
|
95
|
+
cwd: string;
|
|
96
|
+
stderr: Out;
|
|
97
|
+
env: Record<string, string | undefined>;
|
|
98
|
+
}) => Promise<number | null>;
|
|
99
|
+
export type GateOptions = {
|
|
100
|
+
cwd?: string;
|
|
101
|
+
/** Skip the run entirely when the edit marker is absent (`--if-dirty`). */
|
|
102
|
+
ifDirty?: boolean;
|
|
103
|
+
/** Which harness's stop-hook protocol to answer in. Defaults to `claude`. */
|
|
104
|
+
harness?: HarnessName;
|
|
105
|
+
pm?: PackageManager;
|
|
106
|
+
stdout?: Out;
|
|
107
|
+
stderr?: Out;
|
|
108
|
+
spawn?: GateSpawn;
|
|
109
|
+
/** Process environment; injectable so {@link deferredToCursor} is testable. */
|
|
110
|
+
env?: Record<string, string | undefined>;
|
|
111
|
+
/** The Node-pin surface; injectable so alignment is testable without a version manager. */
|
|
112
|
+
pinEnv?: PinEnv;
|
|
113
|
+
/**
|
|
114
|
+
* The gate profile. Read from `checkride.config.json` when absent; pass `null`
|
|
115
|
+
* to run the full check whatever the config says.
|
|
116
|
+
*/
|
|
117
|
+
profile?: GateProfile | null;
|
|
118
|
+
/** Wall-clock source for the elapsed time the gate reports; injectable for tests. */
|
|
119
|
+
now?: () => number;
|
|
120
|
+
};
|
|
121
|
+
export type GateResult = {
|
|
122
|
+
exitCode: number;
|
|
123
|
+
/** False when `--if-dirty` or the Cursor deferral short-circuited the run. */
|
|
124
|
+
ran: boolean;
|
|
125
|
+
green: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Why the package manager never started the check script, or `null` when it
|
|
128
|
+
* did. A refusal is not a red: it blocks the turn all the same, but nothing
|
|
129
|
+
* was checked and nothing was written, so no artifact describes this run.
|
|
130
|
+
*/
|
|
131
|
+
refusal: string | null;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* The gate's `check`-script invocation for `pm` (the alias `agent-setup`
|
|
135
|
+
* ensures exists). The hook IS a gate, so it runs `--strict` (zero checks
|
|
136
|
+
* running is exit 2, not a pass — docs/contract.md) and `--digest` (the
|
|
137
|
+
* token-bounded failure excerpt is a far better landing spot for an agent than
|
|
138
|
+
* raw summary.json). npm alone needs `--` to reach the script with flags;
|
|
139
|
+
* pnpm/yarn/bun forward them directly.
|
|
140
|
+
*/
|
|
141
|
+
export declare function checkArgs(pm: PackageManager, profile?: GateProfile | null): string[];
|
|
142
|
+
/**
|
|
143
|
+
* The repo's gate profile, or `null` when it configures none and the gate should
|
|
144
|
+
* run the whole check.
|
|
145
|
+
*
|
|
146
|
+
* A profile with nothing in it is `null` too: `"gate": {}` narrows nothing, and
|
|
147
|
+
* carrying it forward would put "not the full check" on a verdict that *was* the
|
|
148
|
+
* full check.
|
|
149
|
+
*/
|
|
150
|
+
export declare function gateProfile(cwd: string, config?: CheckrideConfig | null): GateProfile | null;
|
|
151
|
+
/**
|
|
152
|
+
* The repo's gate preflight, or `null` when it declares none.
|
|
153
|
+
*
|
|
154
|
+
* Read at *write* time rather than at run time, by the hook writers in
|
|
155
|
+
* `./agent-setup/`, and baked into the generated script as a literal path. Two
|
|
156
|
+
* reasons, and both are the point of the seam:
|
|
157
|
+
*
|
|
158
|
+
* 1. A preflight that only ran once checkride had started could not answer for
|
|
159
|
+
* the case it exists to cover — a repo whose dependencies were never
|
|
160
|
+
* installed, where `checkride gate` is the thing that cannot run.
|
|
161
|
+
* 2. Every `hooks add`/`agent-setup` re-reads this file, so the wiring is
|
|
162
|
+
* restored on every refresh instead of being clobbered by it. That is exactly
|
|
163
|
+
* the failure a `--preflight` flag would have kept: a teammate running the
|
|
164
|
+
* bare command would silently drop the guard.
|
|
165
|
+
*
|
|
166
|
+
* Kept separate from {@link gateProfile} because a preflight narrows nothing —
|
|
167
|
+
* it must never put a "NOT the full check" clause on a verdict.
|
|
168
|
+
*/
|
|
169
|
+
export declare function gatePreflight(cwd: string, config?: CheckrideConfig | null): string | null;
|
|
170
|
+
/**
|
|
171
|
+
* Run the gate and answer in `harness`'s protocol.
|
|
172
|
+
*
|
|
173
|
+
* The exit code is unchanged and stays as `docs/contract.md` promises it: 2 while
|
|
174
|
+
* blocked under `--harness claude`, always 0 under `--harness cursor`. What each
|
|
175
|
+
* harness *displays* is carried by the JSON body on stdout — see
|
|
176
|
+
* {@link reportGreen} and {@link reportRed} — because that is the only channel
|
|
177
|
+
* either harness renders for a human.
|
|
178
|
+
*/
|
|
179
|
+
export declare function runGate(options?: GateOptions): Promise<GateResult>;
|
|
180
|
+
//# sourceMappingURL=gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGhE,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,KAAK,EAAE,GAAG,EAAgB,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAIL,KAAK,cAAc,EAGpB,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,kBAAkB,CAAC;AAE5C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,cAAc,yBAAyB,CAAC;AAKrD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAStD,iEAAiE;AACjE,eAAO,MAAM,aAAa,+BAAgC,CAAC;AAC3D,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAKzD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,SAAS,GAAG,CACtB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,IAAI,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,GAAG,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;CAAE,KACxE,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AA8C5B,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,EAAE,CAAC,EAAE,cAAc,CAAC;IACpB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+EAA+E;IAC/E,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,2FAA2F;IAC3F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,qFAAqF;IACrF,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC;AA+BF;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,cAAc,EAAE,OAAO,GAAE,WAAW,GAAG,IAAW,GAAG,MAAM,EAAE,CAS1F;AAkBD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,eAAe,GAAG,IAAsB,GAAG,WAAW,GAAG,IAAI,CAI7G;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,eAAe,GAAG,IAAsB,GAAG,MAAM,GAAG,IAAI,CAG1G;AAsZD;;;;;;;;GAQG;AACH,wBAAsB,OAAO,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,CAiD5E"}
|