coderifts 8.0.0 → 8.1.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,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.1.0 - 2026-09-05
4
+
5
+ ### Changed
6
+ - `@coderifts/agent-guard` range raised to `^16.0.0` (MIN_GUARD_MAJOR 16). Guard 16 makes `UNGUARDED_MUTATION` fail-closed the default; the CLI range must match so `npm i -g coderifts` installs the guard whose default the docs describe, not the 15.x advisory-default it shipped alongside before. No CLI behaviour change beyond the installed guard major.
7
+
8
+
9
+ ## 8.0.1 - 2026-09-02
10
+
11
+ ### Changed
12
+ - `--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).
13
+ - The generated strict workflow pins contract-gate v0.8.0 (1fae5d2); the previously published 8.0.0 still pinned 0.7.0.
14
+ - `@coderifts/agent-guard` range follows the published 15.1.0; embedded agent rule text regenerated (names cr.exec.v2 and ENFORCING_STRICT_V1 once).
15
+
3
16
  ## 8.0.0
4
17
 
5
18
  ### Security
package/README.md CHANGED
@@ -86,13 +86,13 @@ 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):
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
90
 
91
91
  | What | Who uses it | What it proves |
92
92
  |------|-------------|----------------|
93
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. |
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
96
 
97
97
  `--strict` turns on `require-grant` and `require-verified-monitoring` in the workflow; it does not rename those three things.
98
98
 
@@ -412,21 +412,31 @@ Do not copy one file onto another host.
412
412
 
413
413
  ### `coderifts status [repo]`
414
414
 
415
- **Read-only** cross-layer enforcement report (Runtime / Merge / Deploy, plus
416
- Content). Calls `GET /api/v1/enforcement-status` and prints the statuses the
417
- endpoint measured — no GitHub writes, no branch-protection changes. Pair with
418
- `coderifts enforce` (that command **acts**; this one only **shows**).
415
+ Prints three lines derived from **this process's actual config**, not a static
416
+ string: Runtime / Merge / Deploy = `PREVENTS` or `REPORTS`.
419
417
 
420
- Requires a cloud API key. Distinct from `coderifts hook status` (local
421
- pre-push hook install state). Exit **0** on a successful read, **1** on
422
- missing/invalid repo, missing key, or API error.
418
+ | Line | PREVENTS when | REPORTS when |
419
+ |------|----------------|--------------|
420
+ | Runtime | host wrap fail-closed (`CODERIFTS_ADVISORY` unset) | `CODERIFTS_ADVISORY=1\|true` |
421
+ | Merge | `MERGEGATE_ENFORCE=true` (exact string; `1` is not enough) | otherwise (the App default) |
422
+ | Deploy | deploy-gate fail-closed | `CODERIFTS_DEPLOY_ADVISORY=1\|true` or `CODERIFTS_ADVISORY=1\|true` |
423
+
424
+ `REPORTS` is `REPORTS` — this does not claim a wrap or required check is
425
+ installed on a repository. With `[repo]` / `--repo owner/repo`, also calls
426
+ `GET /api/v1/enforcement-status` and prints the statuses the endpoint measured
427
+ (API key required for that half). No GitHub writes. Pair with `coderifts
428
+ enforce` (that command **acts**; this one only **shows**). Distinct from
429
+ `coderifts hook status`. Exit **0** on the local three-liner or a successful
430
+ cloud read, **1** on invalid repo, missing key (when a repo is given), or API
431
+ error.
423
432
 
424
433
  | Flag | Description | Default |
425
434
  |------|-------------|---------|
426
- | `[repo]` / `--repo <owner/repo>` | Repository | none (required) |
427
- | `--json` | Machine-readable JSON (raw API body) | `false` |
435
+ | `[repo]` / `--repo <owner/repo>` | Repository (cloud report) | none (local posture only) |
436
+ | `--json` | Machine-readable JSON (local posture, or raw API body when a repo is given) | `false` |
428
437
 
429
438
  ```bash
439
+ coderifts status
430
440
  coderifts status owner/repo
431
441
  coderifts status --repo owner/repo --json
432
442
  ```
@@ -453,7 +463,7 @@ failed, **1** on missing repo/key, API error, or any apply failure.
453
463
  | `--branch <name>` | With `--check`: branch (default: repo default) | default branch |
454
464
  | `--provider <name>` | With `--check`: provider adapter. `github` only; others report UNVERIFIABLE and are never stubbed | `github` |
455
465
  | `--head-sha <sha>` | With `--check`: pull-request head commit, so the required-workflow pin can be compared with the bytes being merged | none |
456
- | `--require-workflow-binding` | With `--check`: also require a sha-pinned required workflow matching the head. **Default OFF** — without it the evidence still gains a `workflow_binding` section and neither the verdict nor the exit code changes | `false` |
466
+ | `--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` |
457
467
  | `--json` | Machine-readable JSON result | `false` |
458
468
 
459
469
  ```bash
package/bin/coderifts.js CHANGED
@@ -15,9 +15,11 @@ program
15
15
  .command('diff <old-spec> <new-spec>')
16
16
  .description('Compare two OpenAPI specs and report breaking changes')
17
17
  .option('-f, --format <format>', 'Output format: terminal (default), json, markdown', 'terminal')
18
- .option('--ci', 'CI mode — exit with code 1 if breaking changes exceed threshold')
18
+ .option('--ci', 'CI mode — exit 1 when risk exceeds --threshold (add --fail-on-breaking to also fail on any break)')
19
19
  .option('--threshold <number>', 'Risk score threshold for CI mode (0-100)', '50')
20
+ .option('--fail-on-breaking', 'CI mode: exit 1 on ANY breaking change, even under --threshold. Opt-in: the local analyser has a known false positive on additive request-body changes.')
20
21
  .option('--cloud', 'Use the CodeRifts cloud API instead of local analysis')
22
+ .option('--gate', 'Quote the server authorize verdict + receipt (the gate). Not a local recompute. Requires an API key.')
21
23
  .option('-c, --config <path>', 'Path to .coderifts.yml config file')
22
24
  .option('--no-normalize', 'Skip spec normalization (raw diff mode)')
23
25
  .action(async (oldSpec, newSpec, options) => {
@@ -36,7 +38,8 @@ program
36
38
  .option('--artifact <artifact_id>', 'Immutable artifact identity being deployed (content digest or commit SHA)')
37
39
  .option('--receipt <file>', 'Path to the signed chain_receipt token + decision envelope JSON')
38
40
  .option('--fingerprint <fp>', 'Optional intended fingerprint the receipt must match')
39
- .option('--keys <file-or-url>', 'Ed25519 key registry (file or URL). Default: https://app.coderifts.com/.well-known/coderifts-keys.json')
41
+ .option('--keys <file-or-url>', 'Ed25519 key registry (file or URL). Default: the vendored offline snapshot (keys/coderifts-keys.json)')
42
+ .option('--refresh-keys', 'Opt in to LIVE key discovery for this run (fetches the well-known registry). Default verification is offline.')
40
43
  .option('--pinned-key <file>', 'Air-gapped PEM public key (skips registry fetch)')
41
44
  .option('--json', 'Output the binding result as JSON')
42
45
  .option('--enforce', 'Accepted silently (exit is fail-closed by default). Still attests ENFORCING for inescapable_deploy.')
@@ -222,7 +225,7 @@ program
222
225
  // GET /api/v1/enforcement-status — no GitHub writes. Distinct from `coderifts hook status`.
223
226
  program
224
227
  .command('status [repo]')
225
- .description('Show cross-layer enforcement status (Runtime / Merge / Deploy) for a repo — read-only')
228
+ .description('Show Runtime / Merge / Deploy = PREVENTS or REPORTS from local config; with a repo, also the cloud enforcement-status report — read-only')
226
229
  .option('--repo <owner/repo>', 'Repository (owner/repo); also accepted as a positional argument')
227
230
  .option('--json', 'Machine-readable JSON (raw API body)')
228
231
  .action(async (repoPositional, options) => {
@@ -0,0 +1,5 @@
1
+ {
2
+ "$comment": "GENERATED by scripts/build.js. sha256 over src/**.js + bin/**.js (path + bytes). test/build-freshness.test.js recomputes it; a mismatch means dist/cli.js is stale.",
3
+ "sha256": "d9d48f2b01fa76855978dbbaa67d81be419b7632e1cc80eb5b999d5efcf9c090",
4
+ "file_count": 42
5
+ }