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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stopbar",
3
- "version": "1.2.0",
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": [
@@ -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/`) or the Stopbar package.
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: any, check: Check): Awaitable<void>
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: any) => Awaitable<S> = spec.setup
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)