coderifts 7.0.0 → 8.0.1
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 +25 -0
- package/README.md +35 -5
- package/dist/cli.js +1740 -300
- package/package.json +3 -3
- package/scripts/assert-guard-major.js +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 8.0.1 - 2026-09-02
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- `--require-workflow-binding` now gates the exit code: `enforce --check` exits non-zero when the required workflow is not SHA-pinned to the head (Action-path audit verdict; default off, advisory output unchanged without the flag).
|
|
7
|
+
- The generated strict workflow pins contract-gate v0.8.0 (1fae5d2); the previously published 8.0.0 still pinned 0.7.0.
|
|
8
|
+
- `@coderifts/agent-guard` range follows the published 15.1.0; embedded agent rule text regenerated (names cr.exec.v2 and ENFORCING_STRICT_V1 once).
|
|
9
|
+
|
|
10
|
+
## 8.0.0
|
|
11
|
+
|
|
12
|
+
### Security
|
|
13
|
+
|
|
14
|
+
- **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`**.
|
|
15
|
+
|
|
16
|
+
### Breaking
|
|
17
|
+
|
|
18
|
+
- **`@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`.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **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.
|
|
23
|
+
|
|
24
|
+
### Docs
|
|
25
|
+
|
|
26
|
+
- 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.
|
|
27
|
+
|
|
3
28
|
## 7.0.0
|
|
4
29
|
|
|
5
30
|
### 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; field-by-field matrix: [Grant versions](https://github.com/coderifts/app/blob/main/docs/grant-versions.md)):
|
|
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 (the V2 fields of the authorize request; see docs/grant-versions.md) | TS SDK, Python SDK, Guard (not MCP; not the capability-demo executor) | The request contract those three speak when minting a grant. Not the same bytes as a `cr.exec.v1` token. |
|
|
95
|
+
| `ENFORCING_STRICT` | Guard `withCodeRifts({ profile })` | Permanent alias of `ENFORCING_STRICT_V1` (must resolve to `_V1` forever). Not a grant format. Different axis from `ENFORCING_ATOMIC_V1`/`V2`. |
|
|
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
|
|
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
|
|
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`):
|
|
@@ -423,7 +453,7 @@ failed, **1** on missing repo/key, API error, or any apply failure.
|
|
|
423
453
|
| `--branch <name>` | With `--check`: branch (default: repo default) | default branch |
|
|
424
454
|
| `--provider <name>` | With `--check`: provider adapter. `github` only; others report UNVERIFIABLE and are never stubbed | `github` |
|
|
425
455
|
| `--head-sha <sha>` | With `--check`: pull-request head commit, so the required-workflow pin can be compared with the bytes being merged | none |
|
|
426
|
-
| `--require-workflow-binding` | With `--check`:
|
|
456
|
+
| `--require-workflow-binding` | With `--check`: **exit non-zero** when the required workflow is not sha-pinned to the head (`workflow_binding.grants_pass !== true`). Scope: the CLI's own audit verdict on the **Action path** — it is not the App-path merge clamp, which is decided server-side and is a separate control. **Default OFF** — without the flag the evidence is byte-identical, the verdict is unchanged and the exit code stays 0 (advisory) | `false` |
|
|
427
457
|
| `--json` | Machine-readable JSON result | `false` |
|
|
428
458
|
|
|
429
459
|
```bash
|
|
@@ -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
|
|------|-------------|---------|
|