arkgate 4.8.8 → 4.8.9

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 (47) hide show
  1. package/CHANGELOG.md +64 -3
  2. package/README.md +9 -6
  3. package/bin/ark-check-runtime.mjs +22 -0
  4. package/bin/ark-layer-match.mjs +25 -10
  5. package/bin/lib/agent-homes.mjs +1 -1
  6. package/bin/lib/analysis-engine.mjs +8 -8
  7. package/bin/lib/ark-order-sensors.mjs +103 -3
  8. package/bin/lib/config-extras.mjs +1 -0
  9. package/bin/lib/contract-smells.mjs +12 -6
  10. package/bin/lib/doctor-human.mjs +32 -7
  11. package/bin/lib/doctor-next-actions.mjs +21 -2
  12. package/bin/lib/gate-files.mjs +108 -22
  13. package/bin/lib/managed-upgrade.mjs +9 -1
  14. package/bin/lib/upgrade-command.mjs +17 -4
  15. package/dist/{configTypes-0eHpocR3.d.ts → configTypes-j7so8B4O.d.ts} +12 -0
  16. package/dist/{diagnosticCatalog-DxKCTBbp.d.ts → diagnosticCatalog-BrkOiwCk.d.ts} +3 -3
  17. package/dist/eslint/index.cjs +5 -5
  18. package/dist/eslint/index.d.ts +6 -4
  19. package/dist/eslint/index.js +5 -5
  20. package/dist/index.cjs +30 -30
  21. package/dist/index.d.ts +13 -4
  22. package/dist/index.js +31 -31
  23. package/dist/nestjs/index.cjs +3 -3
  24. package/dist/nestjs/index.d.ts +3 -3
  25. package/dist/nestjs/index.js +2 -2
  26. package/dist/order/index.cjs +1 -1
  27. package/dist/order/index.d.ts +6 -2
  28. package/dist/order/index.js +1 -1
  29. package/dist/runtime/index.cjs +11 -11
  30. package/dist/runtime/index.d.ts +6 -6
  31. package/dist/runtime/index.js +11 -11
  32. package/dist/{types-BK47clMl.d.ts → types-Djbs3KjE.d.ts} +1 -1
  33. package/dist/{types-DxvmJO-D.d.ts → types-tGhZUiGX.d.ts} +1 -1
  34. package/docs/README.md +4 -3
  35. package/docs/agent-guide.md +2 -1
  36. package/docs/arkorder.md +30 -7
  37. package/docs/configuration.md +47 -13
  38. package/docs/develop.md +4 -2
  39. package/docs/package-surface.md +5 -4
  40. package/package.json +1 -1
  41. package/schemas/ark.config.schema.json +9 -0
  42. package/server.json +2 -2
  43. package/templates/agent-skills/README.md +1 -1
  44. package/templates/agent-skills/ark-contract/SKILL.md +1 -1
  45. package/templates/agent-skills/ark-explore/SKILL.md +2 -2
  46. package/templates/skills/ark-contract.md +1 -1
  47. package/templates/skills/ark-explore.md +2 -2
@@ -1,4 +1,4 @@
1
- import { a as ArkConfigRule, f as ArkConfigLayer, A as ArkConfig } from './configTypes-0eHpocR3.js';
1
+ import { a as ArkConfigRule, f as ArkConfigLayer, A as ArkConfig } from './configTypes-j7so8B4O.js';
2
2
 
3
3
  /**
4
4
  * Policy types for the Ark kernel.
@@ -1,4 +1,4 @@
1
- import { i as Policy, P as PolicyViolation, I as IntentName, j as IntentCreator, k as IntentRelationship, b as ArchitectureProfile, D as DomainEvent, E as EventMetadata, h as PolicyEnforcementMode, A as ArchitectureLayer, c as ArchitectureRule, d as ArkCheckConfig } from './types-BK47clMl.js';
1
+ import { i as Policy, P as PolicyViolation, I as IntentName, j as IntentCreator, k as IntentRelationship, b as ArchitectureProfile, D as DomainEvent, E as EventMetadata, h as PolicyEnforcementMode, A as ArchitectureLayer, c as ArchitectureRule, d as ArkCheckConfig } from './types-Djbs3KjE.js';
2
2
 
3
3
  /**
4
4
  * PolicyEngine
package/docs/README.md CHANGED
@@ -66,13 +66,14 @@ These are **not** the day-to-day product path. They stay in the repo for evidenc
66
66
  | Area | Path |
67
67
  |------|------|
68
68
  | Release notes (by version) | [releases/](releases/) · npm [CHANGELOG.md](../CHANGELOG.md) (Unreleased + 4.6.x) · [pre-4.6 archive](archive/CHANGELOG-pre-4.6.md) |
69
- | Epic plans | [plans/](plans/) — maintainer seeds, not required to use the package. Live: [alive-in-six-months](plans/alive-in-six-months/README.md) (`AL01`–`AL04` done; `AL05` parked). [arkrun](plans/arkrun/README.md) (Phase RN; `RN01`–`RN17` done; shipped **4.7.0** + companion **4.7.4**; ADRs [0020](adr/0020-arkrun-gated-extra-plane.md)–[0024](adr/0024-arkrun-transport-ports.md) accepted). [one-catalog-one-root](plans/one-catalog-one-root/README.md) (Phase HS; `HS01`–`HS05` done; shipped **4.7.1**). [arkorder](plans/arkorder/README.md) (Phase OR; `OR01`–`OR07` done; shipped **4.8.0**; extra **inside** package `arkgate` as `arkgate/order`; ADRs [0027](adr/0027-arkorder-gated-extra-plane.md)–[0031](adr/0031-one-package-extras-deprecate-companion.md)). [arkorder-arkrun](plans/arkorder-arkrun/README.md) (Phase XP; `XP01`–`XP08` done; shipped **4.8.5**; ADR [0033](adr/0033-arkorder-runtime-half-is-arkrun.md)). [arkorder-valve-loop](plans/arkorder-valve-loop/README.md) (Phase LV; `LV01`–`LV09` done; shipped **4.8.6**; [ADR 0034](adr/0034-arkorder-valved-loop.md); does not close K01). [layer-description-projection](plans/layer-description-projection/README.md) (Phase LD; `LD01`–`LD06` done; shipped **4.8.7**; [ADR 0035](adr/0035-layer-description-projection.md); project `layers[].description`; no schema bump). [observability-tui](plans/observability-tui/README.md) (`OD01`–`OD04` done on the **4.8.8 prepared tree**; not yet published; in-memory honesty retained). |
69
+ | Epic plans | [plans/](plans/) — maintainer seeds, not required to use the package. Live: [alive-in-six-months](plans/alive-in-six-months/README.md) (`AL01`–`AL04` done; `AL05` parked). [arkrun](plans/arkrun/README.md) (Phase RN; `RN01`–`RN17` done; shipped **4.7.0** + companion **4.7.4**; ADRs [0020](adr/0020-arkrun-gated-extra-plane.md)–[0024](adr/0024-arkrun-transport-ports.md) accepted). [one-catalog-one-root](plans/one-catalog-one-root/README.md) (Phase HS; `HS01`–`HS05` done; shipped **4.7.1**). [arkorder](plans/arkorder/README.md) (Phase OR; `OR01`–`OR07` done; shipped **4.8.0**; extra **inside** package `arkgate` as `arkgate/order`; ADRs [0027](adr/0027-arkorder-gated-extra-plane.md)–[0031](adr/0031-one-package-extras-deprecate-companion.md)). [arkorder-arkrun](plans/arkorder-arkrun/README.md) (Phase XP; `XP01`–`XP08` done; shipped **4.8.5**; ADR [0033](adr/0033-arkorder-runtime-half-is-arkrun.md)). [arkorder-valve-loop](plans/arkorder-valve-loop/README.md) (Phase LV; `LV01`–`LV09` done; shipped **4.8.6**; [ADR 0034](adr/0034-arkorder-valved-loop.md); does not close K01). [layer-description-projection](plans/layer-description-projection/README.md) (Phase LD; `LD01`–`LD06` done; shipped **4.8.7**; [ADR 0035](adr/0035-layer-description-projection.md); project `layers[].description`; no schema bump). [observability-tui](plans/observability-tui/README.md) (`OD01`–`OD04` done; shipped **4.8.8**; in-memory honesty retained). |
70
70
  | Claims audit | [audit/claims-matrix.md](audit/claims-matrix.md) |
71
71
  | Field adoption kit (scaffolding, not closed) | [field/](field/) |
72
72
  | Runtime hardening (experimental) | [production-hardening.md](production-hardening.md) |
73
73
 
74
- Prepared: [releases/4.8.8.md](releases/4.8.8.md) (`arkgate@4.8.8`; not published).
75
- Current published: [releases/4.8.7.md](releases/4.8.7.md) (`arkgate@4.8.7` on npm `latest`; does not close `K01`).
74
+ Prepared: [releases/4.8.9.md](releases/4.8.9.md) (`arkgate@4.8.9`; not published).
75
+ Current published: [releases/4.8.8.md](releases/4.8.8.md) (`arkgate@4.8.8` on npm `latest`; does not close `K01`).
76
+ Prior published: [releases/4.8.7.md](releases/4.8.7.md) (`arkgate@4.8.7`).
76
77
  Prior: [releases/4.8.6.md](releases/4.8.6.md) · [releases/4.8.5.md](releases/4.8.5.md) · [releases/4.8.4.md](releases/4.8.4.md) · [releases/4.8.3.md](releases/4.8.3.md) · [releases/4.8.2.md](releases/4.8.2.md) · [releases/4.8.1.md](releases/4.8.1.md) · [4.8.0](releases/4.8.0.md) · [4.7.6](releases/4.7.6.md) · [4.7.5](releases/4.7.5.md) · [4.7.4](releases/4.7.4.md) · [4.7.3](releases/4.7.3.md) · [4.7.2](releases/4.7.2.md) · [4.7.1](releases/4.7.1.md) · [4.7.0](releases/4.7.0.md) · [4.6.7](releases/4.6.7.md) · [4.6.6](releases/4.6.6.md) · [4.6.5](releases/4.6.5.md) · [4.6.4](releases/4.6.4.md) · [4.6.3](releases/4.6.3.md) · [4.6.2](releases/4.6.2.md) · [4.6.1](releases/4.6.1.md) · [4.6.0](releases/4.6.0.md).
77
78
  Older notes: [releases/](releases/). Config: [configuration.md](configuration.md).
78
79
 
@@ -358,7 +358,8 @@ into orchestration/persistence), `contract-lateral-adapter-allow` (adapter layer
358
358
  sibling adapter layer; X03 — an adapter into its OWN family's infra base, e.g.
359
359
  `PaymentsAdapters -> PaymentsInfra`, is the sanctioned direction and does not fire),
360
360
  `contract-dead-rule` (rule references an empty or unknown layer, or is a
361
- same-layer no-op; `optional: true` layers are exempt). Advisory only: it never changes the
361
+ same-layer allow / classic same-layer deny; a same-layer `peerIsolation: true`
362
+ + `allowed: false` wall is live, not this smell; `optional: true` layers are exempt). Advisory only: it never changes the
362
363
  verdict, `designFitness`, or `patternBets` — layer roles come from name heuristics, so treat a
363
364
  miss as a warning to read, not a defect to silence. A deliberate edge is acknowledged in
364
365
  `.ark/contract-smell-acks.json` (`{ acks: [{ id, edge, reason, reviewBy? }] }`); `acknowledged` counts
package/docs/arkorder.md CHANGED
@@ -25,7 +25,7 @@ Config: [configuration.md](configuration.md). Surface:
25
25
  | Is | Is not |
26
26
  |----|--------|
27
27
  | A **library** (`createOrderPlane`) plus **static sensors** | A running service, daemon, or hosted plane |
28
- | Valved verbs: `release` / `project` / `ingest` / `proposeRelease` / `apply` / `refreshSigma` | A generic `update` / `patch` / `set` |
28
+ | Valved verbs: `release` / `project` / `ingest` / `proposeRelease` / `apply` / `refreshSigma` / `restore` | A generic `update` / `patch` / `set` |
29
29
  | Opt-in extra on `ark.config.json` | Always-on; compact starters leave it off |
30
30
  | Consumer-named slow keys (`xiKeys`) | A construction OS, BIM, or FirmPack |
31
31
  | Same npm tarball | not `@arkgate/order` |
@@ -66,6 +66,9 @@ They already exist:
66
66
  | Capacity as data | `ConstraintPack.capacity` (`kind` / `sigmaKey` / `payloadKey` / `op`) | 4.8.6 |
67
67
  | Store port | `ReleaseStore` / `createMemoryReleaseStore` in-memory default — not durable, not K01 | 4.8.6 |
68
68
  | Thin travel helper | `ingestTravelAction` absorb→`send` / escalate_up human→`raises` | 4.8.6 |
69
+ | Verify a stored `Release.hash` | `hashOf(ξ, σ)` alias of `hashReleasePayload` — no `release()` side effect | 4.8.9 |
70
+ | Reinstall a frozen Release | `restore(release)` — process-local; hash is identity; not durable; does not close K01 | 4.8.9 |
71
+ | Default clock | omitted `clocks` is Kernel `Date.now()`; Domain must not call `Date.now` | 4.8.9 |
69
72
 
70
73
  Nothing here is a hosted runtime. Nothing here can be “down”. A degraded-mode
71
74
  contract would defend against an outage that cannot happen.
@@ -77,13 +80,13 @@ contract would defend against an outage that cannot happen.
77
80
  **ArkOrder freezes the pattern through a valve. ArkRun is how the residual travels.**
78
81
 
79
82
  ```ts
80
- import { createOrderPlane } from 'arkgate/order';
83
+ import { createOrderPlane, hashOf, hashReleasePayload } from 'arkgate/order';
81
84
 
82
85
  const plane = createOrderPlane({
83
86
  projector, // consumer: (release, sigma) => { allowedKinds, invalidated }
84
87
  xiSchema, // JSON Schema object; additionalProperties false
85
88
  maxXiKeys, // default 7
86
- clocks, // injected; Domain must not call Date.now
89
+ clocks, // optional; default Kernel Date.now(); Domain must not call Date.now
87
90
  packs, // data, not user predicates (capacity is kind/sigmaKey/payloadKey/op)
88
91
  informationBudget, // optional { cannotObserve: ['ledger'] } — not a config key
89
92
  sigmaMaxAgeMs, // optional σ freshness; never on ξ — not a config key
@@ -97,6 +100,8 @@ plane.ingest(event); // residual absorb | escalate_up | hold. Never a
97
100
  plane.proposeRelease(delta); // blast radius. Empty blast = domain error
98
101
  plane.apply(proposal); // valve: later ξ change
99
102
  plane.refreshSigma(sigma); // saldo / clocks; xiHash unchanged
103
+ plane.restore(release); // process-local install; hash is identity; not durable; not K01
104
+ hashOf(xi, sigma); // same bytes as hashReleasePayload; no freeze side effect
100
105
  ```
101
106
 
102
107
  There is no `update()`. Calling `update` / `patch` / `set` on the plane throws
@@ -112,9 +117,24 @@ There is no `update()`. Calling `update` / `patch` / `set` on the plane throws
112
117
  | Change plan / protocol / cost-code bound | `proposeRelease` then `apply` |
113
118
  | PATCH the slow key through Prisma/Drizzle | `ARKORDER_XI_FIELD_WRITE` |
114
119
 
115
- Copy [examples/arkorder-billing/](../examples/arkorder-billing/) and rename the
116
- three keys. Membership ids (`projectId`) are not keys: a `proposeRelease` that
117
- does not change `h(ξ)` fails closed (`ARKORDER_EMPTY_BLAST`).
120
+ Gallery (not in the npm tarball):
121
+ [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing).
122
+ Rename the three keys. Membership ids (`projectId`) are not keys: a
123
+ `proposeRelease` that does not change `h(ξ)` fails closed (`ARKORDER_EMPTY_BLAST`).
124
+
125
+ ---
126
+
127
+ ## Ingest kinds vs payload (deliberate)
128
+
129
+ `classifyIngest` uses `event.kind` for `escalateKinds` and `allowedKinds`.
130
+ `ConstraintPack` is data-only: a function in the pack is `hold` with
131
+ `reasonCode: pack` ([ADR 0016](adr/0016-arkrules-no-executable-core.md) /
132
+ [ADR 0034](adr/0034-arkorder-valved-loop.md) D5). Capacity already compares
133
+ numeric `payload[payloadKey]` against `sigma[sigmaKey]`.
134
+
135
+ A payload-dependent story such as "second week failing a goal" is domain /
136
+ projector work (a new kind, or that kind in `allowedKinds` when ξ says so).
137
+ It is not a pack predicate. Do not add user functions to `ConstraintPack`.
118
138
 
119
139
  ---
120
140
 
@@ -204,6 +224,8 @@ package, inspector, in-memory compare). ArkOrder does not grow a bus, outbox,
204
224
  or hosted replay. [ADR 0033](adr/0033-arkorder-runtime-half-is-arkrun.md).
205
225
 
206
226
  Durability (`K01`) stays parked. In-memory is the honesty line.
227
+ `restore(release)` reinstalls a frozen Release in this process. It is not a
228
+ store. It does not close `K01`.
207
229
 
208
230
  ---
209
231
 
@@ -233,6 +255,7 @@ In-memory `ReleaseStore` is **not** durable. Doctor / status `arkOrder` stays
233
255
 
234
256
  ```bash
235
257
  npx arkgate-check --doctor
236
- # copy examples/arkorder-billing/ and rename the three keys
258
+ # gallery (not in the npm tarball):
259
+ # https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing
237
260
  # /ark-adopt to turn arkOrder on advisory
238
261
  ```
@@ -126,17 +126,23 @@ Top-level fields:
126
126
  preflight / CI verdict and arm only when the layer plane is classified (same ≥50%
127
127
  governed and ≥1 populated-layer floor as ArkRules).
128
128
  - **`arkOrder`** (optional, schema `1.3+`) — inline ArkOrder extra (`mode`, `planeRoots`,
129
- `managedLayers`, `maxXiKeys`, **`xiKeys`**). Absence is silent. Unknown keys fail closed.
130
- Import `createOrderPlane` from `arkgate/order` (same package). Empty `planeRoots` in
131
- `enforced` mode fails closed (`ARKORDER_MISSING_PLANE`). `xiKeys` are the 3–5 slow
132
- names the product already knows (plan, protocol, cost-code bound). Empty `xiKeys`
133
- leaves `ARKORDER_XI_FIELD_WRITE` silent. Membership ids and recomputable statuses
134
- such as `paid` / `overdue` are not keys. Factory options
135
- `informationBudget`, `sigmaMaxAgeMs`, `store` (`ReleaseStore`), and capacity packs
136
- belong on `createOrderPlane`, not this extra object. Later ξ is `proposeRelease`
137
- then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold`.
138
- Demotion or deletion is a policy-delta **weakening**. Field ingest never mints
139
- a pattern.
129
+ `managedLayers`, `maxXiKeys`, **`xiKeys`**, optional **`appliesTo`**). Absence is silent.
130
+ Unknown keys fail closed. Import `createOrderPlane` from `arkgate/order` (same package).
131
+ Empty `planeRoots` in `enforced` mode fails closed (`ARKORDER_MISSING_PLANE`).
132
+ `xiKeys` is a repo-wide watchlist of slow names the product already knows (plan,
133
+ protocol, cost-code bound). Empty `xiKeys` leaves `ARKORDER_XI_FIELD_WRITE` silent.
134
+ `maxXiKeys` (default 7) is the Haken cap on one `release()` / `assertXiKeyCap`, not
135
+ a cap on watchlist length: eight named `xiKeys` with `maxXiKeys` 7 is valid.
136
+ `ARKORDER_TOO_MANY_PARAMS` fires when `release()` `keyCount` exceeds `maxXiKeys`.
137
+ Optional `appliesTo` uses the same glob engine as `layers[].patterns`. Absence or
138
+ empty keeps current behavior (every file in `managedLayers`). Non-empty emits
139
+ `ARKORDER_XI_FIELD_WRITE` only when the layer is managed **and** the file matches
140
+ at least one glob. Membership ids and recomputable statuses such as `paid` /
141
+ `overdue` are not keys. Factory options `informationBudget`, `sigmaMaxAgeMs`,
142
+ `store` (`ReleaseStore`), and capacity packs belong on `createOrderPlane`, not this
143
+ extra object. Later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest
144
+ residual `absorb | escalate_up | hold`. Demotion or deletion is a policy-delta
145
+ **weakening**. Field ingest never mints a pattern.
140
146
 
141
147
  **Activation is one shape.** ArkRun and ArkOrder both use `mode` + `managedLayers`.
142
148
  Absence of either extra is silent. They keep different *root* names because they
@@ -191,8 +197,36 @@ Rule fields:
191
197
  - `from`, `to`, `allowed`, `message`, `peerIsolation`, `sliceFolders`, `sharedRoots`,
192
198
  `allowedCrossSlice`
193
199
  - `peerIsolation: true` + `allowed: false`: deny only when slice ids differ; same-slice allows
194
- when both paths classify. Missing paths, empty slice folders, or unclassifiable slices
195
- **fail closed** (deny — cannot prove same-slice).
200
+ when both paths classify. Applies to **any** declared `from`→`to` pair, not only self-edges.
201
+ Missing paths, empty slice folders, or unclassifiable slices **fail closed** (deny — cannot
202
+ prove same-slice).
203
+
204
+ #### Cross-layer slice walls (already in the engine)
205
+
206
+ A slice wall on a cross-layer edge is a `peerIsolation` rule on that `from`/`to` pair
207
+ (`allowed: false`). There is no slice-wide engine mode, no new config key, and no new skill
208
+ name. `findDeniedEdgeDecision` already applies `peerIsolation` to any declared pair
209
+ (same-layer or cross-layer) — locked on `EdgeRule` and `findDeniedEdgeDecision` in
210
+ [`src/domain/layerMatch.ts`](../src/domain/layerMatch.ts). There is no dedicated ADR to add.
211
+
212
+ A feature slice is often cross-layer. Classic Application→Domain is allowed by omission, so
213
+ `ApplicationOrchestration/management` importing `DomainModel/projects` is invisible to an
214
+ Application→Application wall. Declare the cross-layer pair with the same `sliceFolders` /
215
+ `sharedRoots` as the same-layer wall:
216
+
217
+ ```jsonc
218
+ {
219
+ "from": "ApplicationOrchestration",
220
+ "to": "DomainModel",
221
+ "allowed": false,
222
+ "peerIsolation": true,
223
+ "sliceFolders": ["features"],
224
+ "sharedRoots": ["ui", "hooks"]
225
+ }
226
+ ```
227
+
228
+ Domain files that do not resolve to a slice **fail closed** unless they sit under a declared
229
+ `sharedRoots` entry. Do not invent a sixth rule shape for this.
196
230
 
197
231
  #### Declared peerIsolation exceptions (4.8.4)
198
232
 
package/docs/develop.md CHANGED
@@ -214,8 +214,10 @@ First freeze is `release()`. Later pattern change is `proposeRelease` then
214
214
  `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data;
215
215
  `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`.
216
216
 
217
- Copy [examples/arkorder-billing/](../examples/arkorder-billing/) (`plan` / `cycle` /
218
- `tenancy`) and rename the keys. Posting an invoice is absorbed; changing plan is
217
+ The billing gallery (`plan` / `cycle` / `tenancy`) lives on GitHub, not in the
218
+ npm tarball:
219
+ [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing).
220
+ Rename the keys. Posting an invoice is absorbed; changing plan is
219
221
  `proposeRelease` then `apply`. See [configuration.md](configuration.md) and
220
222
  [package-surface.md](package-surface.md).
221
223
 
@@ -191,7 +191,7 @@ claims. Static architecture enforcement does not depend on them.
191
191
  |---------|-------------|--------|
192
192
  | **ArkRun kernel** | **`arkgate/runtime`** | Public brand **ArkRun**. Same npm package `arkgate` (ADR 0031). Factory `createStrictArkKernel` (each call is an isolated instance; no process-wide `getKernel()` singleton). Root export does **not** include the factory. Optional extra `arkRun` on schema `1.2+`. Event bus, intents, policies, sagas, event buffer, projections, and strict helpers. Managed components declare `uses` / `reactsTo` / `raises` / `sends` on `register()`; `getDependencyInformationPackage()` is a JSON snapshot of ids, lifetime, and declarations and never includes factories, live instances, or input DTOs (ADR 0023). `requestGraph()` slices that snapshot into **process** or **technical** graphs with optional `nodeIds`, `degreesOfSeparation`, and include/exclude query; `formatArkRunGraphMermaid()` (also `graph.mermaid`) is a helper string, never a score. `send()` is the transport port (local / localBlocking / broker); missing broker falls back to in-process local delivery, `ephemeral` defaults true, and **no cloud SDKs ship** in the package (ADR 0024). Opt-in `startInspector()` / `startArkRunInspector()` binds **`127.0.0.1` only**, refuses `NODE_ENV=production`, lazy-loads HTTP, and serves JSON snapshots, SSE, `/graph` slices of the information package, plus queue monitors **`GET /outbox`** and **`GET /workflows`** (full counts + sanitized samples capped at 32; no full event payloads; missing ports are unavailable; no public / authless bind). Snapshot `hardening.durability` classifies the explicit outbox/audit/workflow store ports; default `InMemory*` stores stay visibly `memory`, never durable. Dual bins **`ark-dashboard`** / **`arkgate-dashboard`** poll those JSON facts (ANSI TUI in `bin/` only — presentation is not in the kernel); `ark dashboard` / `arkgate dashboard` dispatch to the same executable. **Shadow / replay / compare** (`shadowInformationPackage`, `compareInformationPackages`, `replayInformationPackages`) are in-memory helpers on that snapshot — not durable, not a second bus (ADR 0033). **Decision tape** `decisionTape` `{ xiHash, event, residual }` via `appendDecisionTape` (ADR 0034). Built-in stores are **InMemory reference only**. Branding ArkRun is not a production-durability claim. **`@arkgate/runtime` is deprecated** leftover 0.x (`experimental` dist-tag). |
193
193
  | **NestJS adapter** | **`arkgate/nestjs`** | Experimental optional peer `@nestjs/common` for the ArkRun kernel. Same npm package. `@arkgate/runtime/nestjs` is deprecated. |
194
- | **ArkOrder plane** | **`arkgate/order`** | Public brand **ArkOrder**. Same npm package `arkgate` (ADR 0030) — not `@arkgate/order`. Factory `createOrderPlane`. Valved verbs: `release` / `project` / `ingest` / `proposeRelease` / `apply` / `refreshSigma`. No `update`. First freeze is `release()`; later ξ change is `apply` (`ARKORDER_UNVALVED_RELEASE`). Haken: few slow keys; ingest residual `absorb | escalate_up | hold` + closed `reasonCode`; empty blast fails closed. Capacity pack as data (`kind` / `sigmaKey` / `payloadKey` / `op`). Factory options (not config keys): `informationBudget.cannotObserve`, `sigmaMaxAgeMs`, `store` (`ReleaseStore` / `createMemoryReleaseStore`), `catalogDigest`. Thin travel: `ingestTravelAction` absorb→`send` / escalate_up human→`raises`. `IngestEscalate.target` includes `human`. Root `arkgate` export does **not** include the factory. Optional extra `arkOrder` on schema `1.3`. In-memory; not durable; does not close K01. Does not replace ArkRun. Runtime half (shadow/replay/compare + `decisionTape` / `appendDecisionTape`) is ArkRun (ADR 0033 / 0034). Canonical: [ArkOrder](arkorder.md). |
194
+ | **ArkOrder plane** | **`arkgate/order`** | Public brand **ArkOrder**. Same npm package `arkgate` (ADR 0030) — not `@arkgate/order`. Factory `createOrderPlane`. Valved verbs: `release` / `project` / `ingest` / `proposeRelease` / `apply` / `refreshSigma` / `restore`. No `update`. First freeze is `release()`; later ξ change is `apply` (`ARKORDER_UNVALVED_RELEASE`). `restore(release)` installs a previously frozen `Release` (hash remains identity; not durable). `hashOf` / `hashReleasePayload` verify a stored hash without a second freeze. Default Kernel clock is `Date.now()`. Optional `arkOrder.appliesTo` globs; `maxXiKeys` caps one `release()`, not `xiKeys.length`. Haken: few slow keys; ingest residual `absorb | escalate_up | hold` + closed `reasonCode`; empty blast fails closed. Capacity pack as data (`kind` / `sigmaKey` / `payloadKey` / `op`). Factory options (not config keys): `informationBudget.cannotObserve`, `sigmaMaxAgeMs`, `store` (`ReleaseStore` / `createMemoryReleaseStore`), `catalogDigest`. Thin travel: `ingestTravelAction` absorb→`send` / escalate_up human→`raises`. `IngestEscalate.target` includes `human`. Root `arkgate` export does **not** include the factory. Optional extra `arkOrder` on schema `1.3`. In-memory; not durable; does not close K01. Does not replace ArkRun. Runtime half (shadow/replay/compare + `decisionTape` / `appendDecisionTape`) is ArkRun (ADR 0033 / 0034). Billing gallery is git-only: [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing) (not in the npm tarball). Canonical: [ArkOrder](arkorder.md). |
195
195
 
196
196
  ---
197
197
 
@@ -201,7 +201,7 @@ claims. Static architecture enforcement does not depend on them.
201
201
  import { createAICodeGate } from 'arkgate';
202
202
  import { createStrictArkKernel, createStrictArkKernelFromConfig } from 'arkgate/runtime';
203
203
  import { ArkModule, InjectArk } from 'arkgate/nestjs';
204
- import { createOrderPlane } from 'arkgate/order';
204
+ import { createOrderPlane, hashOf } from 'arkgate/order';
205
205
  ```
206
206
 
207
207
  One install: `npm install arkgate`. `@arkgate/runtime` is deprecated.
@@ -265,8 +265,9 @@ production deployment would need to satisfy; it is not a readiness certification
265
265
  ## Release notes (maintainers)
266
266
 
267
267
  Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
268
- (current tree candidate: [4.8.8.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.8.md), prepared and not published;
269
- current published: [4.8.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.7.md);
268
+ (current tree candidate: [4.8.9.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.9.md), prepared and not published;
269
+ current published: [4.8.8.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.8.md);
270
+ prior published: [4.8.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.7.md);
270
271
  prior published: [4.8.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.6.md);
271
272
  prior published: [4.8.5.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.5.md);
272
273
  prior published: [4.8.4.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.4.md);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkgate",
3
- "version": "4.8.8",
3
+ "version": "4.8.9",
4
4
  "description": "When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -954,6 +954,15 @@
954
954
  },
955
955
  "uniqueItems": true,
956
956
  "default": []
957
+ },
958
+ "appliesTo": {
959
+ "type": "array",
960
+ "items": {
961
+ "type": "string",
962
+ "minLength": 1
963
+ },
964
+ "uniqueItems": true,
965
+ "default": []
957
966
  }
958
967
  }
959
968
  }
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/pedroknigge/arkgate",
7
7
  "source": "github"
8
8
  },
9
- "version": "4.8.8",
9
+ "version": "4.8.9",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "arkgate",
14
- "version": "4.8.8",
14
+ "version": "4.8.9",
15
15
  "runtimeHint": "npx",
16
16
  "transport": {
17
17
  "type": "stdio"
@@ -7,7 +7,7 @@
7
7
  This directory is the **Agent Skills–compatible** packaging of the same **13**
8
8
  `/ark-*` skills shipped as flat templates for Ark install. **No new skill names.**
9
9
 
10
- Package version when last generated context: **arkgate@4.8.6**
10
+ Package version when last generated context: **arkgate@4.8.9**
11
11
  Schema: agent-skills package contract `1.0`
12
12
 
13
13
  ## Skills (frozen catalog)
@@ -45,7 +45,7 @@ Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrd
45
45
 
46
46
  Application / Features may declare advisory **`writes-via-aggregate`**: a use-case that imports a persistence driver and calls `.insert` / `.create` / `INSERT INTO` is the skip. Persistence adapters stay the write edge. Do not add `Externals/` or `admission.ts` as contract law.
47
47
 
48
- When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids and recomputable statuses are not keys: derive a status on read or fold it from ingest instead. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. Copy [examples/arkorder-billing/](../../../examples/arkorder-billing/) and rename the three keys. The check remains silent on semantic entailment.
48
+ When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids and recomputable statuses are not keys: derive a status on read or fold it from ingest instead. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. The billing gallery lives on GitHub, not in the npm tarball: [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing). Rename the three keys. The check remains silent on semantic entailment.
49
49
 
50
50
  ## Subagent fan-out (optional, host-dependent)
51
51
 
@@ -168,7 +168,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
168
168
  ### Explore + extras
169
169
  - Map extras when present; never write `arkRun` / `arkOrder`. Extra off → residual `n/a` / silent.
170
170
  - When `arkOrder` is on, name the valve: first freeze `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` (`createMemoryReleaseStore`); thin travel `ingestTravelAction`. ArkRun residual may include information package `decisionTape` `{ xiHash, event, residual }`.
171
- - Field path may name `examples/arkorder-billing/` (ArkOrder fixture — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
171
+ - Field path may name the ArkOrder gallery on GitHub (`https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing`; not in the npm tarball — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
172
172
 
173
173
  ## Output mode (pick one — do not invent a fourth)
174
174
 
@@ -297,7 +297,7 @@ When `examples/`, `templates/`, gallery starters, eval fixtures, or docs claim
297
297
  3. Diff **rule strength** across archetypes (missing denies = soft false-green for consumers).
298
298
  4. Note import style vs package surface docs (`arkgate` root barrel vs preferred subpath).
299
299
  5. Flag **false promises**: demo fails under its own check, or green with a hollow contract.
300
- 6. When extras are on, label residual `[ArkRun]` / `[ArkOrder]`. Field path may name `examples/arkorder-billing/`. Never write extras from this skill.
300
+ 6. When extras are on, label residual `[ArkRun]` / `[ArkOrder]`. Field path may name the ArkOrder gallery on GitHub (`https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing`; not in the npm tarball). Never write extras from this skill.
301
301
 
302
302
  If the repo is a **pure app** (no examples): state **Field path: internal** and do one of:
303
303
  - Name the **norm for new code** that the residual implies (e.g. “no new `platform/db` in routes”), or
@@ -45,7 +45,7 @@ Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrd
45
45
 
46
46
  Application / Features may declare advisory **`writes-via-aggregate`**: a use-case that imports a persistence driver and calls `.insert` / `.create` / `INSERT INTO` is the skip. Persistence adapters stay the write edge. Do not add `Externals/` or `admission.ts` as contract law.
47
47
 
48
- When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids and recomputable statuses are not keys: derive a status on read or fold it from ingest instead. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. Copy [examples/arkorder-billing/](../../../examples/arkorder-billing/) and rename the three keys. The check remains silent on semantic entailment.
48
+ When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids and recomputable statuses are not keys: derive a status on read or fold it from ingest instead. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. The billing gallery lives on GitHub, not in the npm tarball: [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing). Rename the three keys. The check remains silent on semantic entailment.
49
49
 
50
50
  ## Subagent fan-out (optional, host-dependent)
51
51
 
@@ -168,7 +168,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
168
168
  ### Explore + extras
169
169
  - Map extras when present; never write `arkRun` / `arkOrder`. Extra off → residual `n/a` / silent.
170
170
  - When `arkOrder` is on, name the valve: first freeze `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` (`createMemoryReleaseStore`); thin travel `ingestTravelAction`. ArkRun residual may include information package `decisionTape` `{ xiHash, event, residual }`.
171
- - Field path may name `examples/arkorder-billing/` (ArkOrder fixture — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
171
+ - Field path may name the ArkOrder gallery on GitHub (`https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing`; not in the npm tarball — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
172
172
 
173
173
  ## Output mode (pick one — do not invent a fourth)
174
174
 
@@ -297,7 +297,7 @@ When `examples/`, `templates/`, gallery starters, eval fixtures, or docs claim
297
297
  3. Diff **rule strength** across archetypes (missing denies = soft false-green for consumers).
298
298
  4. Note import style vs package surface docs (`arkgate` root barrel vs preferred subpath).
299
299
  5. Flag **false promises**: demo fails under its own check, or green with a hollow contract.
300
- 6. When extras are on, label residual `[ArkRun]` / `[ArkOrder]`. Field path may name `examples/arkorder-billing/`. Never write extras from this skill.
300
+ 6. When extras are on, label residual `[ArkRun]` / `[ArkOrder]`. Field path may name the ArkOrder gallery on GitHub (`https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing`; not in the npm tarball). Never write extras from this skill.
301
301
 
302
302
  If the repo is a **pure app** (no examples): state **Field path: internal** and do one of:
303
303
  - Name the **norm for new code** that the residual implies (e.g. “no new `platform/db` in routes”), or