@fabricorg/platform-host 2.0.1 → 4.0.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,34 @@
1
1
  # @fabricorg/platform-host
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - Make the capability runtime vertical-neutral and instance-scoped. Move experience and display
8
+ semantics into a namespaced companion package, require explicit host registries, replace privacy
9
+ field defaults with caller-owned policy, add PostgreSQL projection adapters, and generate executable
10
+ ProjectionHost read and PlatformHost mutation seams.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ - @fabricorg/platform@1.0.0
16
+
17
+ ## 3.0.0
18
+
19
+ ### Major Changes
20
+
21
+ - Deliver Phase 1 correctness and contracts: payload-bound idempotency with staged enforcement,
22
+ capture/replay authority evidence, bounded invocation provenance, capability execution and view usage
23
+ semantics, event-schema compatibility classification, and deterministic conformance plans.
24
+ - Default payload-bound conflicts to enforcement in Host 3 and return existing nonterminal invocations
25
+ without redispatch; dispatcher deployments must use the documented store-backed recovery worker.
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies
30
+ - @fabricorg/platform@0.12.0
31
+
3
32
  ## 2.0.1
4
33
 
5
34
  ### Patch Changes
@@ -0,0 +1,32 @@
1
+ # Payload-bound idempotency rollout
2
+
3
+ `ensureSchema()` adds nullable parameter-digest, actor/binding, provenance, authority, and reconciliation
4
+ columns. Existing rows remain valid. New idempotent submissions always record
5
+ `fabric-canonical-json-sha256-v1`.
6
+
7
+ 1. Before adopting Host 3's enforcement default, deploy with `conflictMode: "audit-only"` and capture `onConflict`/`onLegacyRecord` metrics.
8
+ 2. Soak until modified-payload key reuse has been removed from callers.
9
+ 3. Opt selected applications into `conflictMode: "enforce"`; the same key with different command
10
+ identity now throws `IDEMPOTENCY_CONFLICT`.
11
+ 4. Remove the override after upgrading to Host 3; enforcement is its default.
12
+
13
+ Rollback to audit-only is configuration-only. Do not drop digest columns during rollback; they are
14
+ additive evidence and permit enforcement to resume without rebuilding history. Legacy null-digest rows
15
+ continue old-key payload recovery because their original payload identity cannot be reconstructed safely.
16
+ Host 3 still rejects actor, authority-binding, and action-version conflicts for those rows; review these
17
+ identities during the audit-only soak before enabling enforcement.
18
+
19
+ The additive `reconciliation_required` action status is terminal in Phase 1 and requires an operator-
20
+ owned reconciliation path; exhaustive `ActionStatus` consumers must handle it. Custom stores must
21
+ persist the widened invocation fields, including `parameterDigest`, actor/authority binding, provenance,
22
+ and `authorizationReconciliation`. A store that drops them cannot claim payload-bound enforcement or
23
+ durable reconciliation evidence.
24
+
25
+ An action-version change is part of command identity. A retry using a key first recorded under a prior
26
+ action version is reported in audit-only mode and rejected in enforce mode; drain or retain the prior
27
+ action version for the retry window before deploying a breaking action revision.
28
+
29
+ Duplicate submission now returns an existing nonterminal invocation without redispatching it, which
30
+ prevents concurrent callers from driving the same mutation twice. Production asynchronous deployments
31
+ must run the store-backed worker/recovery loop; a dispatcher-only deployment cannot use client retry as
32
+ recovery for a crash between durable creation and dispatch.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  The canonical host for the `@fabricorg/platform` mutation pipeline.
4
4
 
5
5
  ```bash
6
- pnpm add @fabricorg/platform@^0.11.0 @fabricorg/platform-host@^2.0.0
6
+ pnpm add @fabricorg/platform@^1.0.0 @fabricorg/platform-host@^4.0.0
7
7
  ```
8
8
 
9
9
  ## AI agent integration boundary
@@ -15,7 +15,7 @@ registration, and submit stable idempotent commands. The gateway derives tenant
15
15
  calls `submitAction()`; an agent must never call handlers, adapters, workflow internals, or database
16
16
  writes directly.
17
17
 
18
- See the [Platform Host 2.x agent integration
18
+ See the [Platform Host 4.x agent integration
19
19
  guide](https://platform.fabric.pro/docs/platform/reference/platform-host) for application wiring,
20
20
  execution-time authorization, the PostgreSQL transaction binder, recovery semantics, and the external
21
21
  gateway contract.
@@ -32,8 +32,8 @@ Actor → ActionInvocation → Schema → Agent HITL → PolicyEvaluation → St
32
32
  worker entry point. With no dispatcher the host executes inline, which is intended for tests and local
33
33
  development only.
34
34
 
35
- Applications that assemble action catalogs per runtime can provide `resolveAction` instead of
36
- mutating the process-wide platform registry. A custom `extractEvents` implementation can pair with
35
+ Applications construct a `createModuleRegistry()` per runtime and pass it as `registry`; a narrow
36
+ `resolveAction` function remains available for adapters. No process-wide platform registry exists. A custom `extractEvents` implementation can pair with
37
37
  `eventResultFields` so its event carrier is removed from the durable invocation result. Domain events
38
38
  without an explicit `eventSchemaVersion` inherit the action version, while host lifecycle events stay
39
39
  at version 1. Emitted domain events must appear in the action's `emitsEvents` declaration. The
@@ -45,6 +45,12 @@ bounded batches with an atomic lease and `FOR UPDATE SKIP LOCKED`, and an expire
45
45
  recoverable after interruption. Pass a stable `idempotencyKey` to `submitAction()` so retries resolve
46
46
  to the original tenant-scoped invocation instead of creating another mutation.
47
47
 
48
+ New rows bind that key to the action version, actor/authority binding, and a versioned canonical
49
+ parameter digest. Host 3 defaults to `enforce`, which throws `IdempotencyConflictError`; configure
50
+ `idempotency.conflictMode` as `audit-only` for a preflight soak. Legacy null-digest rows skip only the
51
+ parameter comparison and call `onLegacyRecord`; actor, authority-binding, and action-version mismatches
52
+ still reject in enforce mode. See `MIGRATION-2-IDEMPOTENCY.md`.
53
+
48
54
  Lifecycle records use deterministic checkpoint ids. Recovered idempotent actions do not repeat an
49
55
  adapter that already reached `succeeded`, and event, policy, and adapter writes are append-safe. A
50
56
  stale action that was not declared idempotent fails terminally for manual reconciliation instead of
@@ -58,9 +64,24 @@ schema-parsed durable parameters, canonical invocation, opaque `authorizationBin
58
64
  `executionReason` of `initial`, `approval_resume`, or `recovery` immediately before policies and
59
65
  mutation code run.
60
66
 
67
+ `offline_replay` is the extensible evidence value for disconnected commands. Actions with execution
68
+ semantics can declare whether capture, execution, or both govern authority. A denied governed replay
69
+ returns structured `reconciliation_required` evidence.
70
+
71
+ For `execution` and `both`, the Host rejects an expired `AuthorizationBinding` before calling mutation
72
+ code and returns `authorization_expired` reconciliation evidence. `resourceScope` remains an opaque,
73
+ audit-safe scope identifier; the application-owned `authorizeExecution` implementation resolves and
74
+ checks it against current resource state.
75
+
76
+ `InvocationProvenance` carries namespaced trace and audit attributes. Durable audit attributes fail
77
+ closed when no allowlist is configured, pass through `redactAuditAttributes`, and remain bounded.
78
+ Trace attributes go only to the configured trace callback. Restricted outbox payloads omit provenance
79
+ by default; `outbox.includeProvenance` is the explicit classification-aware override.
80
+
61
81
  ```ts
62
82
  const host = createGovernedActionHost({
63
83
  store,
84
+ registry,
64
85
  authorization: {
65
86
  checkEntitlement,
66
87
  authorize: authorizeSubmission,
@@ -178,7 +199,7 @@ explain which contract and provider adapter governed a mutation after dependenci
178
199
  const host = createGovernedActionHost({
179
200
  // ...
180
201
  runtimeEvidence: {
181
- hostPackageVersion: "2.0.1",
202
+ hostPackageVersion: "3.0.0",
182
203
  policyRulesetVersion: "gtm-rules.v8",
183
204
  providerBridge: { name: "@fabric-harness/databricks", version: "1" },
184
205
  },