@fabricorg/platform-host 0.5.0 → 0.6.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 +10 -0
- package/README.md +18 -2
- package/dist/index.cjs +21 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +22 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @fabricorg/platform-host
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
- Persist governance, Host, provider-bridge, package, and policy-ruleset generations with every new invocation.
|
|
6
|
+
- Add PostgreSQL `runtime_evidence` migration and in-memory/PostgreSQL conformance coverage.
|
|
7
|
+
- Run the shared external-mutation fixture used by the .NET parity suite.
|
|
8
|
+
|
|
9
|
+
## 0.5.1 — 2026-07-20
|
|
10
|
+
|
|
11
|
+
- Include the audit-safe, redacted adapter input in execution-attestation extraction so integrations can identify external resources even when provider responses are minimal.
|
|
12
|
+
|
|
3
13
|
## 0.5.0 — 2026-07-20
|
|
4
14
|
|
|
5
15
|
- Persist resolved mutation footprints and execution-principal delegation.
|
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.
|
|
6
|
+
pnpm add @fabricorg/platform@^0.9.0 @fabricorg/platform-host@^0.6.0
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Vertical packages register `FabricModule` definitions. Host applications provide tenant authorization,
|
|
@@ -91,13 +91,29 @@ whose ingress is adjacent to secret material; redaction runs before the invocati
|
|
|
91
91
|
Hosts can configure `resolveMutationGovernance` to persist an approved, provider-neutral
|
|
92
92
|
`MutationFootprint` and `ExecutionPrincipal` after schema validation. `resolvePolicyObligations`
|
|
93
93
|
makes required controls durable. `extractExecutionAttestation` converts successful adapter output
|
|
94
|
-
into audit-safe external evidence and can satisfy named obligations. Required obligations that are
|
|
94
|
+
and the already-redacted adapter input into audit-safe external evidence and can satisfy named obligations. Required obligations that are
|
|
95
95
|
still pending or failed prevent completion.
|
|
96
96
|
|
|
97
97
|
The built-in stores persist footprints, delegation, obligations, attestations, and reconciliation
|
|
98
98
|
observations. Provider-specific authentication and clients do not belong here. For Databricks, use
|
|
99
99
|
the optional Platform integration exported by `@fabric-harness/databricks`.
|
|
100
100
|
|
|
101
|
+
Every newly submitted invocation also records `runtimeEvidence`. The host always supplies the
|
|
102
|
+
portable governance and host contract generations; applications should add the deployed host
|
|
103
|
+
package version, policy ruleset version, and provider bridge identity. This makes an audit record
|
|
104
|
+
explain which contract and provider adapter governed a mutation after dependencies have moved on.
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
const host = createGovernedActionHost({
|
|
108
|
+
// ...
|
|
109
|
+
runtimeEvidence: {
|
|
110
|
+
hostPackageVersion: "0.6.0",
|
|
111
|
+
policyRulesetVersion: "gtm-rules.v8",
|
|
112
|
+
providerBridge: { name: "@fabric-harness/databricks", version: "1" },
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
101
117
|
`MemoryPlatformHostStore` is for tests and local demos. Production control planes use
|
|
102
118
|
`PostgresPlatformHostStore` with Databricks Lakebase (or standard Postgres), call
|
|
103
119
|
`ensureSchema()` at startup, and hydrate projections from `listEvents()`.
|
package/dist/index.cjs
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var platform = require('@fabricorg/platform');
|
|
4
4
|
|
|
5
|
+
// src/host.ts
|
|
6
|
+
|
|
7
|
+
// src/types.ts
|
|
8
|
+
var PLATFORM_HOST_CONTRACT_VERSION = 1;
|
|
9
|
+
|
|
5
10
|
// src/host.ts
|
|
6
11
|
var DEFAULT_EXTRACT_EVENTS = (data) => {
|
|
7
12
|
const value = data._events;
|
|
@@ -27,6 +32,12 @@ function createGovernedActionHost(options) {
|
|
|
27
32
|
const actionInvocationId = platform.createFabricId("act");
|
|
28
33
|
const correlationId = input.correlationId ?? platform.createFabricId("corr");
|
|
29
34
|
const durableParameters = options.redactActionParameters ? options.redactActionParameters(input.actionId, input.parameters) : input.parameters;
|
|
35
|
+
const runtimeEvidence = {
|
|
36
|
+
governanceContractVersion: platform.FABRIC_GOVERNANCE_CONTRACT_VERSION,
|
|
37
|
+
hostContractVersion: PLATFORM_HOST_CONTRACT_VERSION,
|
|
38
|
+
...options.runtimeEvidence
|
|
39
|
+
};
|
|
40
|
+
platform.assertGovernanceRuntimeEvidence(runtimeEvidence);
|
|
30
41
|
const durableInvocation = await options.store.createActionInvocation({
|
|
31
42
|
id: actionInvocationId,
|
|
32
43
|
tenantId: input.tenantId,
|
|
@@ -38,6 +49,7 @@ function createGovernedActionHost(options) {
|
|
|
38
49
|
status: "pending",
|
|
39
50
|
parameters: durableParameters,
|
|
40
51
|
result: {},
|
|
52
|
+
runtimeEvidence,
|
|
41
53
|
correlationId,
|
|
42
54
|
...input.causationId ? { causationId: input.causationId } : {},
|
|
43
55
|
...input.idempotencyKey ? { idempotencyKey: input.idempotencyKey } : {}
|
|
@@ -418,6 +430,7 @@ function createGovernedActionHost(options) {
|
|
|
418
430
|
adapterType: step.adapterType,
|
|
419
431
|
operation: step.operation,
|
|
420
432
|
vendor: adapter.vendor,
|
|
433
|
+
input: recordedInput,
|
|
421
434
|
startedAt,
|
|
422
435
|
completedAt: now(),
|
|
423
436
|
output
|
|
@@ -872,7 +885,7 @@ var PostgresPlatformHostStore = class {
|
|
|
872
885
|
attempt_count integer NOT NULL DEFAULT 0, lease_owner text,
|
|
873
886
|
lease_expires_at timestamptz, hitl_route text, hitl_risk_tier text,
|
|
874
887
|
hitl_reason text, hitl_policy_version text, approval_decision jsonb,
|
|
875
|
-
mutation_footprint jsonb, execution_principal jsonb,
|
|
888
|
+
mutation_footprint jsonb, execution_principal jsonb, runtime_evidence jsonb,
|
|
876
889
|
created_at timestamptz NOT NULL, updated_at timestamptz NOT NULL
|
|
877
890
|
);
|
|
878
891
|
ALTER TABLE fabric_platform.action_invocations
|
|
@@ -886,7 +899,8 @@ var PostgresPlatformHostStore = class {
|
|
|
886
899
|
ADD COLUMN IF NOT EXISTS hitl_policy_version text,
|
|
887
900
|
ADD COLUMN IF NOT EXISTS approval_decision jsonb,
|
|
888
901
|
ADD COLUMN IF NOT EXISTS mutation_footprint jsonb,
|
|
889
|
-
ADD COLUMN IF NOT EXISTS execution_principal jsonb
|
|
902
|
+
ADD COLUMN IF NOT EXISTS execution_principal jsonb,
|
|
903
|
+
ADD COLUMN IF NOT EXISTS runtime_evidence jsonb;
|
|
890
904
|
CREATE UNIQUE INDEX IF NOT EXISTS action_invocations_idempotency_idx
|
|
891
905
|
ON fabric_platform.action_invocations
|
|
892
906
|
(tenant_id, space_id, action_id, idempotency_key)
|
|
@@ -950,8 +964,8 @@ var PostgresPlatformHostStore = class {
|
|
|
950
964
|
const result = await this.sql.query(
|
|
951
965
|
`INSERT INTO fabric_platform.action_invocations
|
|
952
966
|
(id,tenant_id,space_id,action_id,action_version,actor_id,actor_type,status,
|
|
953
|
-
|
|
954
|
-
|
|
967
|
+
parameters,result,correlation_id,causation_id,idempotency_key,error,runtime_evidence,created_at,updated_at)
|
|
968
|
+
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9::jsonb,$10::jsonb,$11,$12,$13,$14,$15::jsonb,$16,$16)
|
|
955
969
|
ON CONFLICT (tenant_id,space_id,action_id,idempotency_key)
|
|
956
970
|
WHERE idempotency_key IS NOT NULL DO UPDATE SET id=fabric_platform.action_invocations.id
|
|
957
971
|
RETURNING *`,
|
|
@@ -970,6 +984,7 @@ var PostgresPlatformHostStore = class {
|
|
|
970
984
|
input.causationId ?? null,
|
|
971
985
|
input.idempotencyKey ?? null,
|
|
972
986
|
input.error ?? null,
|
|
987
|
+
input.runtimeEvidence ? JSON.stringify(input.runtimeEvidence) : null,
|
|
973
988
|
now
|
|
974
989
|
]
|
|
975
990
|
);
|
|
@@ -1341,6 +1356,7 @@ function toActionRecord(row) {
|
|
|
1341
1356
|
...row.approval_decision ? { approvalDecision: toApprovalDecision(row.approval_decision) } : {},
|
|
1342
1357
|
...row.mutation_footprint ? { mutationFootprint: row.mutation_footprint } : {},
|
|
1343
1358
|
...row.execution_principal ? { executionPrincipal: row.execution_principal } : {},
|
|
1359
|
+
...row.runtime_evidence ? { runtimeEvidence: row.runtime_evidence } : {},
|
|
1344
1360
|
...row.error ? { error: String(row.error) } : {},
|
|
1345
1361
|
createdAt: new Date(row.created_at),
|
|
1346
1362
|
updatedAt: new Date(row.updated_at)
|
|
@@ -1475,6 +1491,7 @@ async function abortableDelay(milliseconds, signal) {
|
|
|
1475
1491
|
}
|
|
1476
1492
|
|
|
1477
1493
|
exports.MemoryPlatformHostStore = MemoryPlatformHostStore;
|
|
1494
|
+
exports.PLATFORM_HOST_CONTRACT_VERSION = PLATFORM_HOST_CONTRACT_VERSION;
|
|
1478
1495
|
exports.PostgresPlatformHostStore = PostgresPlatformHostStore;
|
|
1479
1496
|
exports.createGovernedActionHost = createGovernedActionHost;
|
|
1480
1497
|
exports.createStoreBackedActionDispatcher = createStoreBackedActionDispatcher;
|