coderifts 8.0.1 → 8.2.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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.2.0 - 2026-09-05
4
+
5
+ ### Changed
6
+ - `@coderifts/agent-guard` range raised to `^17.0.0` (MIN_GUARD_MAJOR 17). Guard 17 blocks a raw shell carrying a mutation by default (a host-declared mutating_shell now reaches the UNGUARDED_MUTATION decision instead of slipping through). The CLI range must match so `npm i -g coderifts` installs the guard whose default the docs describe. No CLI behaviour change beyond the installed guard major.
7
+
8
+
9
+ ## 8.1.0 - 2026-09-05
10
+
11
+ ### Changed
12
+ - `@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.
13
+
14
+
3
15
  ## 8.0.1 - 2026-09-02
4
16
 
5
17
  ### Changed
package/README.md CHANGED
@@ -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**).
419
-
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.
415
+ Prints three lines derived from **this process's actual config**, not a static
416
+ string: Runtime / Merge / Deploy = `PREVENTS` or `REPORTS`.
417
+
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
  ```
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
+ }