stopbar 1.2.0 → 1.2.2
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/CHANGELOG.md +88 -0
- package/README.md +112 -114
- package/SECURITY.md +106 -68
- package/bin/stopbar.mjs +0 -0
- package/dist/adapters/antigravity.js +6 -6
- package/dist/adapters/claude.js +1 -1
- package/dist/adapters/codex.js +7 -7
- package/dist/adapters/cursor.js +6 -6
- package/dist/adapters/gemini.js +7 -7
- package/dist/adapters/index.js +4 -3
- package/dist/adapters/types.js +7 -4
- package/dist/build-info.json +1 -1
- package/dist/classify.js +293 -11
- package/dist/cli.js +12 -4
- package/dist/commands.js +37 -9
- package/dist/config.js +8 -6
- package/dist/doctor.js +109 -33
- package/dist/hook.js +10 -5
- package/dist/integrations.js +94 -22
- package/dist/probe/index.js +39 -16
- package/dist/probe/init.js +1 -1
- package/dist/probe/sdk.js +1 -1
- package/dist/probe/stdio.js +25 -13
- package/dist/probe/wrapper.js +1 -1
- package/dist/repo.js +62 -0
- package/dist/run.js +12 -1
- package/dist/store.js +5 -3
- package/dist/verify.js +34 -26
- package/docs/probe.md +94 -0
- package/package.json +3 -2
- package/skills/stopbar/SKILL.md +2 -1
- package/src/probe/sdk.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stopbar",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "A formally proven execution gate for AI coding agents: hooks for Claude Code, Cursor, Codex CLI, Gemini CLI and Antigravity CLI, plus git hooks. No commit without a passing build and full test suite, no silent test weakening, no exfiltration after a secret read.",
|
|
5
5
|
"author": "Paweł Olszewski <kontakt@polszewski.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"src/probe/sdk.ts",
|
|
32
32
|
"claude-hooks.example.json",
|
|
33
33
|
"skills/",
|
|
34
|
+
"docs/probe.md",
|
|
34
35
|
"README.md",
|
|
35
36
|
"SECURITY.md",
|
|
36
37
|
"CHANGELOG.md",
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
"verify:lean": "node scripts/build.ts && node scripts/verify-lean.ts",
|
|
50
51
|
"probe": "node scripts/build.ts && node bin/stopbar.mjs probe",
|
|
51
52
|
"bench": "node bench/hook-latency.ts",
|
|
52
|
-
"typecheck": "tsc --noEmit",
|
|
53
|
+
"typecheck": "node scripts/build.ts && tsc --noEmit",
|
|
53
54
|
"prepack": "node scripts/build.ts"
|
|
54
55
|
},
|
|
55
56
|
"keywords": [
|
package/skills/stopbar/SKILL.md
CHANGED
|
@@ -50,7 +50,8 @@ set another one with `stopbar init --cli "<cmd>"`.
|
|
|
50
50
|
- Do not bypass a block with a script, a wrapper, a generated file, an alias, `git -c alias.*`, `--no-verify` or
|
|
51
51
|
another git client.
|
|
52
52
|
- Do not edit `.git/` (hooks, `.git/stopbar/`), the hook config of any agent (`.claude/`, `.cursor/`, `.codex/`,
|
|
53
|
-
`.gemini/`, `.agents/`)
|
|
53
|
+
`.gemini/`, `.agents/`), the git hook managers (`.husky/`, `lefthook*.yml`, `.lefthook/`, a custom
|
|
54
|
+
`core.hooksPath`) or the Stopbar package. A change to a hook there is for a human.
|
|
54
55
|
|
|
55
56
|
### Human-only commands
|
|
56
57
|
|
package/src/probe/sdk.ts
CHANGED
|
@@ -118,7 +118,7 @@ export type ActionSpec<S> = {
|
|
|
118
118
|
weight?: number
|
|
119
119
|
/** Arguments of one step: pure data that survives JSON (saved in reproductions and regressions). */
|
|
120
120
|
gen(r: Rng): unknown
|
|
121
|
-
run(state: S, args:
|
|
121
|
+
run(state: S, args: unknown, check: Check): Awaitable<void>
|
|
122
122
|
}
|
|
123
123
|
export type Invariant<S> = ((state: S, check: Check) => Awaitable<void>) | {name: string; check(state: S, check: Check): Awaitable<void>}
|
|
124
124
|
export type MutantSpec<S> = ((ctx: {seed: number; dir: string}) => Awaitable<S>) | {description?: string; setup(ctx: {seed: number; dir: string}): Awaitable<S>}
|
|
@@ -203,7 +203,7 @@ export function defineModel<S>(spec: ModelSpec<S>): ProbeTarget<ModelRun> & {mut
|
|
|
203
203
|
}
|
|
204
204
|
let out: Outcome
|
|
205
205
|
try {
|
|
206
|
-
let setup: (c:
|
|
206
|
+
let setup: (c: Ctx) => Awaitable<S> = spec.setup
|
|
207
207
|
if (mutant !== undefined) {
|
|
208
208
|
const m = mutants.get(mutant)
|
|
209
209
|
if (!m) throw new MismatchError('unknown mutant', [...mutants.keys()], mutant)
|