coderifts 7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.0.0
4
+
5
+ ### Security
6
+
7
+ - **Installs from `coderifts@7.0.0` pinned contract-gate v0.5.0.** That action's vendored verifier accepted receipts signed by revoked keys. Fixed in contract-gate **0.7.0**. The strict install now pins **0.7.0 / `90de4be`**.
8
+
9
+ ### Breaking
10
+
11
+ - **`@coderifts/agent-guard` declared `^15.0.0`** (`MIN_GUARD_MAJOR` 15). There is no `peerDependencies` entry — this is a **direct** dependency, so a fresh `npm i -g coderifts` resolves 15.x, not 14.x. The CLI still uses only `deployGate`, `asVerifiedDeployReceiptView`, `DEPLOY_RECEIPT_VIEW_SPEC`, and `matchGlob`.
12
+
13
+ ### Fixed
14
+
15
+ - **Claude Code PreToolUse hook governs a path family**, not a single `coderifts.specPath`. Default globs cover OpenAPI/Swagger, GraphQL, `*.proto`, AsyncAPI, MCP manifests, and `*tool-schema*.json`. `git config --add coderifts.specPath` is additive (never drops the family). `coderifts.specPathExclude` opts one path out. A not-governed Write/Edit/MultiEdit exits 0 and prints `coderifts claude-hook: not governed: <path>` — the hook is never silent on those tools.
16
+
17
+ ### Docs
18
+
19
+ - README **Grant versions** table: `cr.exec.v1` is the reference/teaching grant the demo and strict install use; the Atomic V2 request contract (`execution-grant-request.v2` fields) is what the SDK/Guard/executor speak; `ENFORCING_STRICT` is the current profile name and will become a versioned name.
20
+
3
21
  ## 7.0.0
4
22
 
5
23
  ### Breaking
package/README.md CHANGED
@@ -86,6 +86,16 @@ coderifts init --agents --check # which of the four pieces are present
86
86
  | **Host hook** | `.claude/settings.json`, `.cursor/hooks.json` | Reuses `hook install --claude` / `--cursor` (JSON-merge, backup, idempotent). Copilot shares Claude's `.claude/settings.json` — VS Code reads it by default. |
87
87
  | **CI workflow** | `.github/workflows/coderifts.yml` | `coderifts/contract-gate@v0`. Default: `require-verified-monitoring` commented (honest default: **false**). `--strict`: the same file with `require-verified-monitoring: 'true'` |
88
88
 
89
+ **Grant versions** (these names are not interchangeable):
90
+
91
+ | What | Who uses it | What it proves |
92
+ |------|-------------|----------------|
93
+ | `cr.exec.v1` | capability-demo and the strict-install workflow (`require-grant`) | A reference/teaching execution grant bound to `operation ∥ target_id ∥ after_payload`. The demo and `coderifts init --agents --strict` use this form. |
94
+ | Atomic V2 request (`execution-grant-request.v2` fields) | SDK, Guard, executor | The request contract those three speak when minting/verifying a grant. Not the same bytes as a `cr.exec.v1` token. |
95
+ | `ENFORCING_STRICT` | Guard `withCodeRifts({ profile })` | The current **profile name**. It is unsuffixed today and will become a versioned name; it is not a grant format and not Atomic V1. |
96
+
97
+ `--strict` turns on `require-grant` and `require-verified-monitoring` in the workflow; it does not rename those three things.
98
+
89
99
  **Next manual step:** add `CODERIFTS_API_KEY` to the repository secrets. The
90
100
  CLI never writes a key anywhere.
91
101
 
@@ -287,7 +297,26 @@ Unparseable settings JSON → refuse, no write.
287
297
  ### Claude Code PreToolUse (`coderifts claude-hook`) — ID824
288
298
 
289
299
  Tool-call-time gate for **Claude Code**: blocks contract-touching `Write` /
290
- `Edit` / `MultiEdit` when authorize preflight returns **BLOCK/STOP**.
300
+ `Edit` / `MultiEdit` when authorize preflight returns **BLOCK/STOP**. The
301
+ matcher is tool-level (`Write|Edit|MultiEdit`); the **path family** is
302
+ enforced inside the hook.
303
+
304
+ **Default governed family** (from `SUPPORTED_TYPES` + `@coderifts/contract-path`
305
+ `looksLikeContractPath` / `CONTRACT_EXT`; `agent_tools` via `*tool-schema*.json`):
306
+
307
+ - `**/*openapi*.{yaml,yml,json}` and `**/*swagger*.{yaml,yml,json}` (openapi)
308
+ - `**/*.{graphql,gql}` (graphql)
309
+ - `**/*.proto` (grpc)
310
+ - `**/*asyncapi*.{yaml,yml,json}` (asyncapi)
311
+ - `**/*mcp*.{json,yaml,yml}` (mcp_manifest)
312
+ - `**/*tool-schema*.json` (agent_tools)
313
+
314
+ `node_modules/` and `vendor/` are not governed (same as the path detector).
315
+ `git config --add coderifts.specPath <path-or-glob>` is **additive** (never
316
+ replaces the family). `git config --add coderifts.specPathExclude <path-or-glob>`
317
+ opts one path out. A not-governed path exits 0 and prints
318
+ `coderifts claude-hook: not governed: <path>` on stderr — the hook is never silent
319
+ on a write/edit.
291
320
 
292
321
  **Exit map (Claude Code semantics — fixed):**
293
322
 
@@ -299,11 +328,12 @@ Tool-call-time gate for **Claude Code**: blocks contract-touching `Write` /
299
328
 
300
329
  Push-time equivalent (git exit **1** on BLOCK): `coderifts hook install`.
301
330
 
302
- **Install path:** `coderifts hook install --claude` (or `agent-setup` writes project `.claude/settings.json` when absent). Then set key + spec:
331
+ **Install path:** `coderifts hook install --claude` (or `agent-setup` writes project `.claude/settings.json` when absent). Then set key; spec path is optional and additive:
303
332
 
304
333
  ```bash
305
334
  git config coderifts.apiKey 'cr_live_…' # or: coderifts login / CODERIFTS_API_KEY
306
- git config coderifts.specPath api/openapi.yaml # default if omitted
335
+ git config --add coderifts.specPath extra/spec.yaml # additive; does not drop the family
336
+ git config --add coderifts.specPathExclude docs/openapi.yaml # opt out one false positive
307
337
  ```
308
338
 
309
339
  **Recipe — project** (`.claude/settings.json`) **or user** (`~/.claude/settings.json`):
@@ -492,7 +522,7 @@ coderifts provider-canary --repo owner/repo --confirm --json
492
522
  Encodes an **already-signed** execution grant plus the PR head sha into a
493
523
  comment marker on stdout, for the 1094 PR-comment delivery slot. **It does not
494
524
  mint a grant** (`src/commands/grant-publish.js:4`) — the token must already be a
495
- signed `cr.exec.v1` or `cr.exec.v2`.
525
+ signed `cr.exec.v1` or `cr.exec.v2` (see **Grant versions** above).
496
526
 
497
527
  | Flag | Description | Default |
498
528
  |------|-------------|---------|