arkgate 4.7.6 → 4.8.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +37 -3
  2. package/README.md +8 -9
  3. package/bin/lib/analysis-engine.mjs +6 -6
  4. package/bin/lib/architecture-scan.mjs +7 -2
  5. package/bin/lib/ark-order-error.mjs +18 -0
  6. package/bin/lib/ark-order-facts.mjs +53 -0
  7. package/bin/lib/ark-order-invariants.mjs +160 -0
  8. package/bin/lib/ark-order-sensors.mjs +118 -0
  9. package/bin/lib/ark-order-types.mjs +11 -0
  10. package/bin/lib/ark-run-sensors.mjs +13 -5
  11. package/bin/lib/config-contract.mjs +16 -72
  12. package/bin/lib/config-extras.mjs +151 -0
  13. package/bin/lib/diagnostic-catalog.mjs +7 -2
  14. package/bin/lib/extra-merge-teeth.mjs +8 -2
  15. package/bin/lib/install-migrate.mjs +4 -2
  16. package/bin/lib/invariant-coverage-io.mjs +61 -24
  17. package/bin/lib/invariant-coverage.mjs +4 -1
  18. package/bin/lib/managed-upgrade.mjs +1 -1
  19. package/bin/lib/mcp-adoption.mjs +9 -3
  20. package/bin/lib/policy-delta-io.mjs +8 -2
  21. package/bin/lib/remediation.mjs +48 -9
  22. package/bin/lib/resolved-candidate-facts.mjs +43 -0
  23. package/bin/lib/rules-under-contract.mjs +8 -2
  24. package/bin/lib/skill-install.mjs +17 -2
  25. package/bin/lib/start-preview.mjs +1 -0
  26. package/bin/lib/status-manifest.mjs +1 -1
  27. package/bin/lib/write-path-capabilities.mjs +2 -2
  28. package/dist/{configTypes-CgJimx9o.d.ts → configTypes-BdCe_gvv.d.ts} +22 -6
  29. package/dist/diagnosticCatalog-CSF4N3w8.d.ts +2313 -0
  30. package/dist/eslint/index.cjs +7 -6
  31. package/dist/eslint/index.d.ts +33 -2
  32. package/dist/eslint/index.js +7 -6
  33. package/dist/index.cjs +35 -35
  34. package/dist/index.d.ts +271 -2554
  35. package/dist/index.js +35 -35
  36. package/dist/nestjs/index.cjs +18 -0
  37. package/dist/nestjs/index.d.ts +24 -0
  38. package/dist/nestjs/index.js +18 -0
  39. package/dist/order/index.cjs +1 -0
  40. package/dist/order/index.d.ts +79 -0
  41. package/dist/order/index.js +1 -0
  42. package/dist/runtime/index.cjs +25 -0
  43. package/dist/runtime/index.d.ts +497 -0
  44. package/dist/runtime/index.js +25 -0
  45. package/dist/types-C9KApBzX.d.ts +1237 -0
  46. package/dist/types-DCSlrRnV.d.ts +181 -0
  47. package/docs/README.md +4 -4
  48. package/docs/agent-guide.md +1 -1
  49. package/docs/ai-gates.md +9 -2
  50. package/docs/configuration.md +13 -6
  51. package/docs/develop.md +4 -3
  52. package/docs/diagnostics.md +57 -3
  53. package/docs/package-surface.md +20 -16
  54. package/docs/product-voice.md +2 -1
  55. package/package.json +21 -2
  56. package/schemas/ark.config.schema.json +54 -2
  57. package/schemas/ark.resolved-candidate-facts.schema.json +1 -1
  58. package/server.json +2 -2
  59. package/templates/agent-skills/README.md +1 -1
  60. package/templates/agent-skills/ark-adopt/SKILL.md +2 -2
  61. package/templates/agent-skills/ark-contract/SKILL.md +1 -1
  62. package/templates/agent-skills/ark-place/SKILL.md +15 -6
  63. package/templates/agent-skills/ark-runtime/SKILL.md +10 -15
  64. package/templates/skills/ark-adopt.md +2 -2
  65. package/templates/skills/ark-contract.md +1 -1
  66. package/templates/skills/ark-place.md +15 -6
  67. package/templates/skills/ark-runtime.md +10 -15
package/CHANGELOG.md CHANGED
@@ -3,13 +3,47 @@
3
3
  All notable changes to ArkGate (`arkgate`; formerly `ark-runtime-kernel`) are documented here or
4
4
  in the immutable pre-2.0 archive linked below.
5
5
 
6
- ## Unreleased
6
+ ## 4.8.1 — 2026-08-30
7
+
8
+ **Patch** over **4.8.0**. ArkRules invariant coverage reads tests first and retains only files that mention a declared invariant id, so large repos no longer report `INVARIANT_UNCOVERED` / `never-had-tests` while covering tests sit on disk. Does not close `K01` / `Z09`. **No required config migration.**
9
+
10
+ **Status: published** (on npm `latest`; see `docs/releases/4.8.1.md`).
11
+
12
+ ### Fixed
13
+ - **INVARIANT_UNCOVERED on large trees:** `loadInvariantCoverageInputs` spent `MAX_COVERAGE_FILES` (400) on production facts before walking tests. Any repo with more than 400 governed files got `testGlobsMissing: true` and a false *never-had-tests* claim. Tests walk first; with `invariantIds`, a test is retained only if it mentions a catalog id. Doctor and policy-delta use the same ids. When the file budget is exhausted, the diagnostic says so instead of claiming the suite never existed.
14
+
15
+ ## 4.8.0 — 2026-08-29
16
+
17
+ **Minor** over **4.7.6**. One npm package **`arkgate`**: extras opt-in by config + subpath.
18
+ **ArkOrder** (`arkgate/order`) on schema `1.3`. **ArkRun** kernel is `arkgate/runtime` in
19
+ the same tarball. `@arkgate/runtime` is **deprecated**. Does not close `K01` / `Z09`.
20
+ ArkRules unchanged.
21
+
22
+ **Status: published** (on npm `latest`; see `docs/releases/4.8.0.md`).
23
+
24
+ ### Added
25
+ - **ArkOrder extra (`arkOrder`):** optional, silent when absent. Enforced skip: missing plane, Domain import of `arkgate/order`, generic `update` of ξ.
26
+ - **`arkgate/order`:** `createOrderPlane` with `release` / `project` / `ingest` / `proposeRelease`. Root `arkgate` export stays the gate.
27
+ - **Billing gallery:** `examples/arkorder-billing/` consumer projector (`plan` / `cycle` / `tenancy`).
28
+ - **`arkgate/runtime` and `arkgate/nestjs`:** real subpaths of package `arkgate` (ADR 0031). Root export stays the gate.
29
+
30
+ ### Changed
31
+ - **`@arkgate/runtime` deprecated.** Prefer `import { createStrictArkKernel } from 'arkgate/runtime'`. Companion remains a leftover 0.x `experimental` pin.
32
+ - **Gate waist (WH01 / ADR 0026):** the parity-capable check is config + resolved-candidate-facts → one analysis-result. New doctor advisory surfaces must project existing facts and must not become a second verdict. Does not move shipped compass/coach. Does not close `K01` / `Z09`.
33
+ - **Config schema `1.3`:** additive `arkOrder`. `1.2` configs migrate. Absence is silent.
34
+
35
+ ### Fixed
36
+ - **`K01` honesty:** 4.7.6 shipped workflow OCC / lease / `tx` / `resume` primitives. It does not close in-process bus commit gaps or durable outbox. `K01` stays parked.
37
+ - **Release-surface pin:** ROADMAP / CONTRIBUTING / `q06ReleaseSurfaces` name npm `latest` as **4.7.6** (the #173 merge left the 4.7.5 pin).
38
+ - **CodeQL alert 16:** `scripts/release-npm.mjs` invokes npm with `execFileSync` and an argv array (no shell). Closes `js/shell-command-injection-from-environment`.
39
+ - **Antigravity MCP path:** `--install-agent-gates --tools antigravity` (and compact start) writes official workspace `.agents/mcp_config.json`. Doctor evidence for host `antigravity` no longer treats shared `.mcp.json` as loaded by the host.
7
40
 
8
41
  ## 4.7.6 — 2026-08-26
9
42
 
10
- **Patch** over **4.7.5**. Production durability primitives for ArkRun (K01). Adds OCC, leases, DB tx handoff, and resume capabilities to the workflow engine. **No required config migration.** Companion `@arkgate/runtime` is republished as `0.1.0-experimental.1`.
43
+ **Patch** over **4.7.5**. Production durability *primitives* for ArkRun (`tx`, OCC, leases, `resume`). Adds those hooks to the workflow engine. **No required config migration.** Companion `@arkgate/runtime` is republished as `0.1.0-experimental.1`.
44
+ Does **not** close `K01` (in-process bus commit gaps and durable outbox remain).
11
45
 
12
- **Status: prepared** (see `docs/releases/4.7.6.md`).
46
+ **Status: published** (on npm `latest`; see `docs/releases/4.7.6.md`).
13
47
 
14
48
  ### Changed
15
49
  - **ArkRun (Workflow Engine):** added `tx` argument to `EventBus` and Sagas for database transactions.
package/README.md CHANGED
@@ -29,11 +29,11 @@ Works with Cursor, Claude, Codex, and Grok.
29
29
 
30
30
  </div>
31
31
 
32
- > **ArkGate 4.7.6** is on npm `latest`. Write. Check. Ship. Adopted = required GitHub
32
+ > **ArkGate 4.8.1** is on npm `latest`. Write. Check. Ship. Adopted = required GitHub
33
33
  > status running `arkgate-check --strict-merge`, or an explicit `advisory-only` stance.
34
34
  > Status is compact (`arkgate-check --doctor`; `--all` for Details). Optional **ArkRun**
35
- > (`@arkgate/runtime`, `experimental`) is an in-memory runtime — not Postgres.
36
- > [4.7.6](docs/releases/4.7.6.md) · [Docs hub](docs/README.md) · [Voice](docs/product-voice.md)
35
+ > (`arkgate/runtime`) is an in-memory runtime — not Postgres. `@arkgate/runtime` is deprecated.
36
+ > [4.8.1](docs/releases/4.8.1.md) · [4.8.0](docs/releases/4.8.0.md) · [4.7.6](docs/releases/4.7.6.md) · [Docs hub](docs/README.md) · [Voice](docs/product-voice.md)
37
37
 
38
38
  ---
39
39
 
@@ -97,7 +97,7 @@ once you adopt. The other two are optional.
97
97
  | **While the agent writes** | The write doesn’t land on supported hosts; warning only elsewhere | Always (ArkGate) |
98
98
  | **Before merge** | `arkgate-check` as a **required** CI status | Always (ArkGate) |
99
99
  | **ArkRules** | Optional policies *inside* a layer | When you ask |
100
- | **ArkRun** | Optional experimental runtime (`@arkgate/runtime`) | Off unless you turn it on |
100
+ | **ArkRun** | Optional experimental runtime (`arkgate/runtime`) | Off unless you turn it on |
101
101
 
102
102
  Layers (who may import whom) always run. ArkRules and ArkRun change no inter-layer
103
103
  verdict when absent. Label leftovers **`[Layer]`** vs **`[ArkRules]`**.
@@ -240,12 +240,10 @@ More: [docs/develop.md](docs/develop.md) · skills install: [docs/agent-guide.md
240
240
  Gates need **no** app runtime. Skip this unless you want an optional runtime
241
241
  for decoupling.
242
242
 
243
- **ArkRun** (`@arkgate/runtime`, npm tag `experimental`) is that runtime. Each
243
+ **ArkRun** (`arkgate/runtime`, same npm package) is that runtime. Each
244
244
  `createStrictArkKernel()` call is a new instance — no process singleton. Data
245
245
  lives in memory and **dies on restart**. Fine for local. Not Postgres, not an
246
- outbox, not Temporal.
247
-
248
- The `arkgate` tarball does not bundle it.
246
+ outbox, not Temporal. `@arkgate/runtime` is deprecated.
249
247
 
250
248
  ### Durability stance
251
249
 
@@ -268,7 +266,8 @@ interfaces for production. Details: [docs/production-hardening.md](docs/producti
268
266
  | Config · package surface · TS | [configuration](docs/configuration.md) · [package-surface](docs/package-surface.md) · [typescript-support](docs/typescript-support.md) |
269
267
  | Brownfield | [docs/brownfield-adoption.md](docs/brownfield-adoption.md) |
270
268
  | Security | [SECURITY.md](SECURITY.md) |
271
- | Current published (4.7.6 on npm `latest`) | [docs/releases/4.7.6.md](docs/releases/4.7.6.md) · [CHANGELOG](CHANGELOG.md) |
269
+ | Current published (4.8.1 on npm `latest`) | [docs/releases/4.8.1.md](docs/releases/4.8.1.md) · [CHANGELOG](CHANGELOG.md) |
270
+ | Prior published (4.7.6) | [docs/releases/4.7.6.md](docs/releases/4.7.6.md) |
272
271
  | Prior published (4.7.5) | [docs/releases/4.7.5.md](docs/releases/4.7.5.md) |
273
272
  | Prior published (4.7.3) | [docs/releases/4.7.3.md](docs/releases/4.7.3.md) |
274
273
  | Prior published (4.7.2) | [docs/releases/4.7.2.md](docs/releases/4.7.2.md) |