@empressaio/atom-contract 1.7.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 +360 -0
- package/README.md +379 -0
- package/dist/composition.d.ts +112 -0
- package/dist/composition.d.ts.map +1 -0
- package/dist/composition.js +80 -0
- package/dist/composition.js.map +1 -0
- package/dist/conformance/common.d.ts +21 -0
- package/dist/conformance/common.d.ts.map +1 -0
- package/dist/conformance/common.js +29 -0
- package/dist/conformance/common.js.map +1 -0
- package/dist/conformance/fixtures.d.ts +13 -0
- package/dist/conformance/fixtures.d.ts.map +1 -0
- package/dist/conformance/fixtures.js +63 -0
- package/dist/conformance/fixtures.js.map +1 -0
- package/dist/conformance/index.d.ts +11 -0
- package/dist/conformance/index.d.ts.map +1 -0
- package/dist/conformance/index.js +11 -0
- package/dist/conformance/index.js.map +1 -0
- package/dist/conformance/validate.d.ts +49 -0
- package/dist/conformance/validate.d.ts.map +1 -0
- package/dist/conformance/validate.js +138 -0
- package/dist/conformance/validate.js.map +1 -0
- package/dist/conformance/verify-chain.d.ts +25 -0
- package/dist/conformance/verify-chain.d.ts.map +1 -0
- package/dist/conformance/verify-chain.js +76 -0
- package/dist/conformance/verify-chain.js.map +1 -0
- package/dist/context.d.ts +134 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +110 -0
- package/dist/context.js.map +1 -0
- package/dist/encumbrances/administrative-rule.d.ts +128 -0
- package/dist/encumbrances/administrative-rule.d.ts.map +1 -0
- package/dist/encumbrances/administrative-rule.js +18 -0
- package/dist/encumbrances/administrative-rule.js.map +1 -0
- package/dist/encumbrances/common.d.ts +153 -0
- package/dist/encumbrances/common.d.ts.map +1 -0
- package/dist/encumbrances/common.js +124 -0
- package/dist/encumbrances/common.js.map +1 -0
- package/dist/encumbrances/constraint-resolution.d.ts +169 -0
- package/dist/encumbrances/constraint-resolution.d.ts.map +1 -0
- package/dist/encumbrances/constraint-resolution.js +41 -0
- package/dist/encumbrances/constraint-resolution.js.map +1 -0
- package/dist/encumbrances/fixtures.d.ts +16 -0
- package/dist/encumbrances/fixtures.d.ts.map +1 -0
- package/dist/encumbrances/fixtures.js +107 -0
- package/dist/encumbrances/fixtures.js.map +1 -0
- package/dist/encumbrances/index.d.ts +15 -0
- package/dist/encumbrances/index.d.ts.map +1 -0
- package/dist/encumbrances/index.js +15 -0
- package/dist/encumbrances/index.js.map +1 -0
- package/dist/encumbrances/recorded-instrument.d.ts +131 -0
- package/dist/encumbrances/recorded-instrument.d.ts.map +1 -0
- package/dist/encumbrances/recorded-instrument.js +19 -0
- package/dist/encumbrances/recorded-instrument.js.map +1 -0
- package/dist/encumbrances/restriction-clause.d.ts +120 -0
- package/dist/encumbrances/restriction-clause.d.ts.map +1 -0
- package/dist/encumbrances/restriction-clause.js +17 -0
- package/dist/encumbrances/restriction-clause.js.map +1 -0
- package/dist/encumbrances/restriction-corpus.d.ts +44 -0
- package/dist/encumbrances/restriction-corpus.d.ts.map +1 -0
- package/dist/encumbrances/restriction-corpus.js +14 -0
- package/dist/encumbrances/restriction-corpus.js.map +1 -0
- package/dist/export/downloadable-atom.d.ts +133 -0
- package/dist/export/downloadable-atom.d.ts.map +1 -0
- package/dist/export/downloadable-atom.js +115 -0
- package/dist/export/downloadable-atom.js.map +1 -0
- package/dist/export/index.d.ts +6 -0
- package/dist/export/index.d.ts.map +1 -0
- package/dist/export/index.js +6 -0
- package/dist/export/index.js.map +1 -0
- package/dist/history.d.ts +124 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +170 -0
- package/dist/history.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/inline-reference.d.ts +60 -0
- package/dist/inline-reference.d.ts.map +1 -0
- package/dist/inline-reference.js +73 -0
- package/dist/inline-reference.js.map +1 -0
- package/dist/obligation.d.ts +131 -0
- package/dist/obligation.d.ts.map +1 -0
- package/dist/obligation.js +55 -0
- package/dist/obligation.js.map +1 -0
- package/dist/og/common.d.ts +253 -0
- package/dist/og/common.d.ts.map +1 -0
- package/dist/og/common.js +195 -0
- package/dist/og/common.js.map +1 -0
- package/dist/og/completion.d.ts +70 -0
- package/dist/og/completion.d.ts.map +1 -0
- package/dist/og/completion.js +22 -0
- package/dist/og/completion.js.map +1 -0
- package/dist/og/equipment-state.d.ts +55 -0
- package/dist/og/equipment-state.d.ts.map +1 -0
- package/dist/og/equipment-state.js +25 -0
- package/dist/og/equipment-state.js.map +1 -0
- package/dist/og/fixtures.d.ts +40 -0
- package/dist/og/fixtures.d.ts.map +1 -0
- package/dist/og/fixtures.js +255 -0
- package/dist/og/fixtures.js.map +1 -0
- package/dist/og/index.d.ts +23 -0
- package/dist/og/index.d.ts.map +1 -0
- package/dist/og/index.js +23 -0
- package/dist/og/index.js.map +1 -0
- package/dist/og/mineral-lease.d.ts +150 -0
- package/dist/og/mineral-lease.d.ts.map +1 -0
- package/dist/og/mineral-lease.js +24 -0
- package/dist/og/mineral-lease.js.map +1 -0
- package/dist/og/ownership-interest.d.ts +163 -0
- package/dist/og/ownership-interest.d.ts.map +1 -0
- package/dist/og/ownership-interest.js +36 -0
- package/dist/og/ownership-interest.js.map +1 -0
- package/dist/og/pad.d.ts +101 -0
- package/dist/og/pad.d.ts.map +1 -0
- package/dist/og/pad.js +19 -0
- package/dist/og/pad.js.map +1 -0
- package/dist/og/production-timeseries.d.ts +154 -0
- package/dist/og/production-timeseries.d.ts.map +1 -0
- package/dist/og/production-timeseries.js +37 -0
- package/dist/og/production-timeseries.js.map +1 -0
- package/dist/og/revenue-allocation-unit.d.ts +762 -0
- package/dist/og/revenue-allocation-unit.d.ts.map +1 -0
- package/dist/og/revenue-allocation-unit.js +105 -0
- package/dist/og/revenue-allocation-unit.js.map +1 -0
- package/dist/og/rrc-lease.d.ts +124 -0
- package/dist/og/rrc-lease.d.ts.map +1 -0
- package/dist/og/rrc-lease.js +29 -0
- package/dist/og/rrc-lease.js.map +1 -0
- package/dist/og/tract.d.ts +88 -0
- package/dist/og/tract.d.ts.map +1 -0
- package/dist/og/tract.js +30 -0
- package/dist/og/tract.js.map +1 -0
- package/dist/og/well.d.ts +201 -0
- package/dist/og/well.d.ts.map +1 -0
- package/dist/og/well.js +40 -0
- package/dist/og/well.js.map +1 -0
- package/dist/og/wellbore.d.ts +61 -0
- package/dist/og/wellbore.d.ts.map +1 -0
- package/dist/og/wellbore.js +25 -0
- package/dist/og/wellbore.js.map +1 -0
- package/dist/og/zone.d.ts +45 -0
- package/dist/og/zone.d.ts.map +1 -0
- package/dist/og/zone.js +16 -0
- package/dist/og/zone.js.map +1 -0
- package/dist/read-contract/common.d.ts +74 -0
- package/dist/read-contract/common.d.ts.map +1 -0
- package/dist/read-contract/common.js +54 -0
- package/dist/read-contract/common.js.map +1 -0
- package/dist/read-contract/consequence.d.ts +99 -0
- package/dist/read-contract/consequence.d.ts.map +1 -0
- package/dist/read-contract/consequence.js +46 -0
- package/dist/read-contract/consequence.js.map +1 -0
- package/dist/read-contract/fixtures.d.ts +8 -0
- package/dist/read-contract/fixtures.d.ts.map +1 -0
- package/dist/read-contract/fixtures.js +44 -0
- package/dist/read-contract/fixtures.js.map +1 -0
- package/dist/read-contract/index.d.ts +14 -0
- package/dist/read-contract/index.d.ts.map +1 -0
- package/dist/read-contract/index.js +14 -0
- package/dist/read-contract/index.js.map +1 -0
- package/dist/read-contract/model-attribution.d.ts +85 -0
- package/dist/read-contract/model-attribution.d.ts.map +1 -0
- package/dist/read-contract/model-attribution.js +30 -0
- package/dist/read-contract/model-attribution.js.map +1 -0
- package/dist/read-contract/read-contract.d.ts +455 -0
- package/dist/read-contract/read-contract.d.ts.map +1 -0
- package/dist/read-contract/read-contract.js +46 -0
- package/dist/read-contract/read-contract.js.map +1 -0
- package/dist/registration.d.ts +192 -0
- package/dist/registration.d.ts.map +1 -0
- package/dist/registration.js +15 -0
- package/dist/registration.js.map +1 -0
- package/dist/registry.d.ts +128 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +122 -0
- package/dist/registry.js.map +1 -0
- package/dist/render.d.ts +30 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +44 -0
- package/dist/render.js.map +1 -0
- package/dist/scope.d.ts +46 -0
- package/dist/scope.d.ts.map +1 -0
- package/dist/scope.js +17 -0
- package/dist/scope.js.map +1 -0
- package/dist/temporal/anticipatory-atom.d.ts +123 -0
- package/dist/temporal/anticipatory-atom.d.ts.map +1 -0
- package/dist/temporal/anticipatory-atom.js +124 -0
- package/dist/temporal/anticipatory-atom.js.map +1 -0
- package/dist/temporal/common.d.ts +47 -0
- package/dist/temporal/common.d.ts.map +1 -0
- package/dist/temporal/common.js +100 -0
- package/dist/temporal/common.js.map +1 -0
- package/dist/temporal/fixtures.d.ts +7 -0
- package/dist/temporal/fixtures.d.ts.map +1 -0
- package/dist/temporal/fixtures.js +21 -0
- package/dist/temporal/fixtures.js.map +1 -0
- package/dist/temporal/index.d.ts +13 -0
- package/dist/temporal/index.d.ts.map +1 -0
- package/dist/temporal/index.js +13 -0
- package/dist/temporal/index.js.map +1 -0
- package/dist/temporal/interval-query.d.ts +42 -0
- package/dist/temporal/interval-query.d.ts.map +1 -0
- package/dist/temporal/interval-query.js +49 -0
- package/dist/temporal/interval-query.js.map +1 -0
- package/dist/temporal/node-id.d.ts +112 -0
- package/dist/temporal/node-id.d.ts.map +1 -0
- package/dist/temporal/node-id.js +208 -0
- package/dist/temporal/node-id.js.map +1 -0
- package/dist/temporal/would-affect-edge.d.ts +66 -0
- package/dist/temporal/would-affect-edge.d.ts.map +1 -0
- package/dist/temporal/would-affect-edge.js +113 -0
- package/dist/temporal/would-affect-edge.js.map +1 -0
- package/dist/testing/index.d.ts +98 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +225 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/vda.d.ts +46 -0
- package/dist/vda.d.ts.map +1 -0
- package/dist/vda.js +42 -0
- package/dist/vda.js.map +1 -0
- package/dist/workspace/brief-run.d.ts +104 -0
- package/dist/workspace/brief-run.d.ts.map +1 -0
- package/dist/workspace/brief-run.js +32 -0
- package/dist/workspace/brief-run.js.map +1 -0
- package/dist/workspace/common.d.ts +42 -0
- package/dist/workspace/common.d.ts.map +1 -0
- package/dist/workspace/common.js +26 -0
- package/dist/workspace/common.js.map +1 -0
- package/dist/workspace/fixtures.d.ts +10 -0
- package/dist/workspace/fixtures.d.ts.map +1 -0
- package/dist/workspace/fixtures.js +93 -0
- package/dist/workspace/fixtures.js.map +1 -0
- package/dist/workspace/index.d.ts +13 -0
- package/dist/workspace/index.d.ts.map +1 -0
- package/dist/workspace/index.js +13 -0
- package/dist/workspace/index.js.map +1 -0
- package/dist/workspace/property-workspace.d.ts +148 -0
- package/dist/workspace/property-workspace.d.ts.map +1 -0
- package/dist/workspace/property-workspace.js +21 -0
- package/dist/workspace/property-workspace.js.map +1 -0
- package/dist/workspace/workspace-attachment.d.ts +99 -0
- package/dist/workspace/workspace-attachment.d.ts.map +1 -0
- package/dist/workspace/workspace-attachment.js +35 -0
- package/dist/workspace/workspace-attachment.js.map +1 -0
- package/dist/workspace/workspace-share-edge.d.ts +115 -0
- package/dist/workspace/workspace-share-edge.d.ts.map +1 -0
- package/dist/workspace/workspace-share-edge.js +22 -0
- package/dist/workspace/workspace-share-edge.js.map +1 -0
- package/package.json +107 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { __internal } from "../history.js";
|
|
2
|
+
import { SAMPLE_READ_CONTRACT } from "../read-contract/fixtures.js";
|
|
3
|
+
import { ATOM_CONFORMANCE_TARGET_VERSION } from "./common.js";
|
|
4
|
+
import { verifyEventChain } from "./verify-chain.js";
|
|
5
|
+
/** Build a gap-free signed chain with recomputed hashes for tests. */
|
|
6
|
+
export function buildValidSignedEventChain(events) {
|
|
7
|
+
const built = [];
|
|
8
|
+
for (const raw of events) {
|
|
9
|
+
const prevHash = built.length > 0
|
|
10
|
+
? (built[built.length - 1]?.chainHash ?? null)
|
|
11
|
+
: (raw.prevHash ?? null);
|
|
12
|
+
const chainHash = raw.chainHash ??
|
|
13
|
+
__internal.computeChainHash({
|
|
14
|
+
prevHash,
|
|
15
|
+
payload: raw.payload,
|
|
16
|
+
occurredAt: raw.occurredAt,
|
|
17
|
+
eventType: raw.eventType,
|
|
18
|
+
actor: raw.actor,
|
|
19
|
+
});
|
|
20
|
+
built.push({ ...raw, prevHash, chainHash });
|
|
21
|
+
}
|
|
22
|
+
return built;
|
|
23
|
+
}
|
|
24
|
+
export const SAMPLE_DATA_CONFORMANCE_EVENTS = buildValidSignedEventChain([
|
|
25
|
+
{
|
|
26
|
+
id: "evt-genesis",
|
|
27
|
+
entityType: "code-section",
|
|
28
|
+
entityId: "ibc-2021-1603",
|
|
29
|
+
eventType: "atom.created",
|
|
30
|
+
actor: { kind: "system", id: "ingest:icc" },
|
|
31
|
+
payload: { version: 1 },
|
|
32
|
+
prevHash: null,
|
|
33
|
+
occurredAt: new Date("2026-06-01T00:00:00.000Z"),
|
|
34
|
+
recordedAt: new Date("2026-06-01T00:00:01.000Z"),
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: "evt-calibrated",
|
|
38
|
+
entityType: "code-section",
|
|
39
|
+
entityId: "ibc-2021-1603",
|
|
40
|
+
eventType: "calibration.updated",
|
|
41
|
+
actor: { kind: "agent", id: "calibration-runner" },
|
|
42
|
+
payload: { pool: "icc-ibc-2021" },
|
|
43
|
+
occurredAt: new Date("2026-06-21T12:00:00.000Z"),
|
|
44
|
+
recordedAt: new Date("2026-06-21T12:00:01.000Z"),
|
|
45
|
+
},
|
|
46
|
+
]);
|
|
47
|
+
export const SAMPLE_DATA_CONFORMANCE_TARGET = {
|
|
48
|
+
conformanceTargetVersion: ATOM_CONFORMANCE_TARGET_VERSION,
|
|
49
|
+
tier: "data",
|
|
50
|
+
readContract: SAMPLE_READ_CONTRACT,
|
|
51
|
+
accessPolicy: "public-free",
|
|
52
|
+
signedHistory: {
|
|
53
|
+
events: SAMPLE_DATA_CONFORMANCE_EVENTS,
|
|
54
|
+
verifyChain: verifyEventChain(SAMPLE_DATA_CONFORMANCE_EVENTS),
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
export const SAMPLE_APP_CONFORMANCE_TARGET = {
|
|
58
|
+
conformanceTargetVersion: ATOM_CONFORMANCE_TARGET_VERSION,
|
|
59
|
+
tier: "app",
|
|
60
|
+
readContract: SAMPLE_READ_CONTRACT,
|
|
61
|
+
accessPolicy: "tenant-private",
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../src/conformance/fixtures.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAOrD,sEAAsE;AACtE,MAAM,UAAU,0BAA0B,CACxC,MAAqC;IAErC,MAAM,KAAK,GAAgB,EAAE,CAAC;IAC9B,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,MAAM,QAAQ,GACZ,KAAK,CAAC,MAAM,GAAG,CAAC;YACd,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,SAAS,IAAI,IAAI,CAAC;YAC9C,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC;QAC7B,MAAM,SAAS,GACb,GAAG,CAAC,SAAS;YACb,UAAU,CAAC,gBAAgB,CAAC;gBAC1B,QAAQ;gBACR,OAAO,EAAE,GAAG,CAAC,OAAO;gBACpB,UAAU,EAAE,GAAG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8B,CAAC;KAC9D;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAA0B;IAClE,wBAAwB,EAAE,+BAA+B;IACzD,IAAI,EAAE,KAAK;IACX,YAAY,EAAE,oBAAoB;IAClC,YAAY,EAAE,gBAAgB;CAC/B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture-homes atom conformance target (doc 02).
|
|
3
|
+
*
|
|
4
|
+
* Import from `@empressaio/atom-contract/conformance`. Validates read-contract,
|
|
5
|
+
* accessPolicy, and signed-history for data-level atoms.
|
|
6
|
+
*/
|
|
7
|
+
export { ATOM_CONFORMANCE_TARGET_VERSION, ACCESS_POLICY_VALUES, ACCESS_POLICY_SCHEMA, ATOM_TIER_VALUES, type AtomConformanceTargetVersion, type AtomTier, } from "./common.js";
|
|
8
|
+
export { verifyEventChain, type VerifyChainError, type VerifyChainErrorKind, type VerifyChainResult, } from "./verify-chain.js";
|
|
9
|
+
export { validateAtomConformance, type AtomConformanceError, type AtomConformanceErrorCode, type AtomConformanceTarget, type AtomConformanceValidationResult, type ValidateAtomConformanceInput, } from "./validate.js";
|
|
10
|
+
export { buildValidSignedEventChain, SAMPLE_APP_CONFORMANCE_TARGET, SAMPLE_DATA_CONFORMANCE_EVENTS, SAMPLE_DATA_CONFORMANCE_TARGET, } from "./fixtures.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/conformance/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,4BAA4B,EACjC,KAAK,QAAQ,GACd,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,GAClC,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture-homes atom conformance target (doc 02).
|
|
3
|
+
*
|
|
4
|
+
* Import from `@empressaio/atom-contract/conformance`. Validates read-contract,
|
|
5
|
+
* accessPolicy, and signed-history for data-level atoms.
|
|
6
|
+
*/
|
|
7
|
+
export { ATOM_CONFORMANCE_TARGET_VERSION, ACCESS_POLICY_VALUES, ACCESS_POLICY_SCHEMA, ATOM_TIER_VALUES, } from "./common.js";
|
|
8
|
+
export { verifyEventChain, } from "./verify-chain.js";
|
|
9
|
+
export { validateAtomConformance, } from "./validate.js";
|
|
10
|
+
export { buildValidSignedEventChain, SAMPLE_APP_CONFORMANCE_TARGET, SAMPLE_DATA_CONFORMANCE_EVENTS, SAMPLE_DATA_CONFORMANCE_TARGET, } from "./fixtures.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/conformance/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GAGjB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,gBAAgB,GAIjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,uBAAuB,GAMxB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime validator for the architecture-homes atom conformance target.
|
|
3
|
+
*
|
|
4
|
+
* Checks read-contract (three widthed axes), accessPolicy (five-value
|
|
5
|
+
* union), and signed-history + verify-chain for data-level atoms.
|
|
6
|
+
*/
|
|
7
|
+
import type { AccessPolicy } from "../registration.js";
|
|
8
|
+
import type { AtomEvent } from "../history.js";
|
|
9
|
+
import type { ReadContract } from "../read-contract/read-contract.js";
|
|
10
|
+
import { ATOM_CONFORMANCE_TARGET_VERSION, type AtomTier } from "./common.js";
|
|
11
|
+
import { type VerifyChainResult } from "./verify-chain.js";
|
|
12
|
+
export type AtomConformanceErrorCode = "invalid-read-contract" | "invalid-access-policy" | "missing-signed-history" | "invalid-signed-history" | "verify-chain-failed";
|
|
13
|
+
export interface AtomConformanceError {
|
|
14
|
+
readonly code: AtomConformanceErrorCode;
|
|
15
|
+
readonly path: string;
|
|
16
|
+
readonly message: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AtomConformanceTarget {
|
|
19
|
+
readonly conformanceTargetVersion: typeof ATOM_CONFORMANCE_TARGET_VERSION;
|
|
20
|
+
readonly tier: AtomTier;
|
|
21
|
+
readonly readContract: ReadContract;
|
|
22
|
+
readonly accessPolicy: AccessPolicy;
|
|
23
|
+
/** Present and verified when {@link AtomConformanceTarget.tier} is `"data"`. */
|
|
24
|
+
readonly signedHistory?: {
|
|
25
|
+
readonly events: ReadonlyArray<AtomEvent>;
|
|
26
|
+
readonly verifyChain: VerifyChainResult;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface ValidateAtomConformanceInput {
|
|
30
|
+
tier: AtomTier;
|
|
31
|
+
readContract: unknown;
|
|
32
|
+
accessPolicy: unknown;
|
|
33
|
+
signedHistory?: {
|
|
34
|
+
events: unknown;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface AtomConformanceValidationResult {
|
|
38
|
+
readonly ok: boolean;
|
|
39
|
+
readonly conformanceTargetVersion: typeof ATOM_CONFORMANCE_TARGET_VERSION;
|
|
40
|
+
readonly errors: ReadonlyArray<AtomConformanceError>;
|
|
41
|
+
/** Populated when validation succeeds. */
|
|
42
|
+
readonly target?: AtomConformanceTarget;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Validate a candidate atom emission against the conformance target.
|
|
46
|
+
* Every repo can call this at read time, export time, or in contract tests.
|
|
47
|
+
*/
|
|
48
|
+
export declare function validateAtomConformance(input: ValidateAtomConformanceInput): AtomConformanceValidationResult;
|
|
49
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/conformance/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAEL,+BAA+B,EAC/B,KAAK,QAAQ,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,MAAM,MAAM,wBAAwB,GAChC,uBAAuB,GACvB,uBAAuB,GACvB,wBAAwB,GACxB,wBAAwB,GACxB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,wBAAwB,EAAE,OAAO,+BAA+B,CAAC;IAC1E,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,gFAAgF;IAChF,QAAQ,CAAC,aAAa,CAAC,EAAE;QACvB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;QAC1C,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;KACzC,CAAC;CACH;AA2CD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE;QACd,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,wBAAwB,EAAE,OAAO,+BAA+B,CAAC;IAC1E,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACrD,0CAA0C;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,qBAAqB,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,4BAA4B,GAClC,+BAA+B,CA4FjC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime validator for the architecture-homes atom conformance target.
|
|
3
|
+
*
|
|
4
|
+
* Checks read-contract (three widthed axes), accessPolicy (five-value
|
|
5
|
+
* union), and signed-history + verify-chain for data-level atoms.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { READ_CONTRACT_SCHEMA } from "../read-contract/read-contract.js";
|
|
9
|
+
import { ACCESS_POLICY_SCHEMA, ATOM_CONFORMANCE_TARGET_VERSION, } from "./common.js";
|
|
10
|
+
import { verifyEventChain } from "./verify-chain.js";
|
|
11
|
+
const ATOM_EVENT_SCHEMA = z
|
|
12
|
+
.object({
|
|
13
|
+
id: z.string().min(1),
|
|
14
|
+
entityType: z.string().min(1),
|
|
15
|
+
entityId: z.string().min(1),
|
|
16
|
+
eventType: z.string().min(1),
|
|
17
|
+
actor: z.object({
|
|
18
|
+
kind: z.enum(["user", "agent", "system"]),
|
|
19
|
+
id: z.string().min(1),
|
|
20
|
+
}),
|
|
21
|
+
payload: z.record(z.unknown()),
|
|
22
|
+
prevHash: z.string().nullable(),
|
|
23
|
+
chainHash: z.string().min(1),
|
|
24
|
+
occurredAt: z.union([z.date(), z.string().min(1)]),
|
|
25
|
+
recordedAt: z.union([z.date(), z.string().min(1)]),
|
|
26
|
+
})
|
|
27
|
+
.readonly();
|
|
28
|
+
function normalizeEvent(raw) {
|
|
29
|
+
return {
|
|
30
|
+
id: raw.id,
|
|
31
|
+
entityType: raw.entityType,
|
|
32
|
+
entityId: raw.entityId,
|
|
33
|
+
eventType: raw.eventType,
|
|
34
|
+
actor: raw.actor,
|
|
35
|
+
payload: raw.payload,
|
|
36
|
+
prevHash: raw.prevHash,
|
|
37
|
+
chainHash: raw.chainHash,
|
|
38
|
+
occurredAt: raw.occurredAt instanceof Date
|
|
39
|
+
? raw.occurredAt
|
|
40
|
+
: new Date(raw.occurredAt),
|
|
41
|
+
recordedAt: raw.recordedAt instanceof Date
|
|
42
|
+
? raw.recordedAt
|
|
43
|
+
: new Date(raw.recordedAt),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Validate a candidate atom emission against the conformance target.
|
|
48
|
+
* Every repo can call this at read time, export time, or in contract tests.
|
|
49
|
+
*/
|
|
50
|
+
export function validateAtomConformance(input) {
|
|
51
|
+
const errors = [];
|
|
52
|
+
const readContractParsed = READ_CONTRACT_SCHEMA.safeParse(input.readContract);
|
|
53
|
+
if (!readContractParsed.success) {
|
|
54
|
+
errors.push({
|
|
55
|
+
code: "invalid-read-contract",
|
|
56
|
+
path: "readContract",
|
|
57
|
+
message: readContractParsed.error.message,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
const accessPolicyParsed = ACCESS_POLICY_SCHEMA.safeParse(input.accessPolicy);
|
|
61
|
+
if (!accessPolicyParsed.success) {
|
|
62
|
+
errors.push({
|
|
63
|
+
code: "invalid-access-policy",
|
|
64
|
+
path: "accessPolicy",
|
|
65
|
+
message: accessPolicyParsed.error.message,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
let signedHistory;
|
|
69
|
+
if (input.tier === "data") {
|
|
70
|
+
if (!input.signedHistory) {
|
|
71
|
+
errors.push({
|
|
72
|
+
code: "missing-signed-history",
|
|
73
|
+
path: "signedHistory",
|
|
74
|
+
message: "data-level atoms require a signed event chain",
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
else if (!Array.isArray(input.signedHistory.events)) {
|
|
78
|
+
errors.push({
|
|
79
|
+
code: "invalid-signed-history",
|
|
80
|
+
path: "signedHistory.events",
|
|
81
|
+
message: "signedHistory.events must be an array",
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
const events = [];
|
|
86
|
+
for (let i = 0; i < input.signedHistory.events.length; i++) {
|
|
87
|
+
const parsed = ATOM_EVENT_SCHEMA.safeParse(input.signedHistory.events[i]);
|
|
88
|
+
if (!parsed.success) {
|
|
89
|
+
errors.push({
|
|
90
|
+
code: "invalid-signed-history",
|
|
91
|
+
path: `signedHistory.events[${i}]`,
|
|
92
|
+
message: parsed.error.message,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
events.push(normalizeEvent(parsed.data));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (events.length > 0) {
|
|
100
|
+
const verifyChain = verifyEventChain(events);
|
|
101
|
+
if (!verifyChain.ok) {
|
|
102
|
+
for (const chainError of verifyChain.errors) {
|
|
103
|
+
errors.push({
|
|
104
|
+
code: "verify-chain-failed",
|
|
105
|
+
path: "signedHistory.verifyChain",
|
|
106
|
+
message: chainError.message,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
signedHistory = { events, verifyChain };
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (errors.length > 0 ||
|
|
117
|
+
!readContractParsed.success ||
|
|
118
|
+
!accessPolicyParsed.success) {
|
|
119
|
+
return {
|
|
120
|
+
ok: false,
|
|
121
|
+
conformanceTargetVersion: ATOM_CONFORMANCE_TARGET_VERSION,
|
|
122
|
+
errors,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
ok: true,
|
|
127
|
+
conformanceTargetVersion: ATOM_CONFORMANCE_TARGET_VERSION,
|
|
128
|
+
errors: [],
|
|
129
|
+
target: {
|
|
130
|
+
conformanceTargetVersion: ATOM_CONFORMANCE_TARGET_VERSION,
|
|
131
|
+
tier: input.tier,
|
|
132
|
+
readContract: readContractParsed.data,
|
|
133
|
+
accessPolicy: accessPolicyParsed.data,
|
|
134
|
+
signedHistory,
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/conformance/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAGzE,OAAO,EACL,oBAAoB,EACpB,+BAA+B,GAEhC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAA0B,MAAM,mBAAmB,CAAC;AA2B7E,MAAM,iBAAiB,GAAG,CAAC;KACxB,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,UAAU,EAAE,CAAC,CAAC,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B;4BAC3B,IAAI,EAAE,2BAA2B;4BACjC,OAAO,EAAE,UAAU,CAAC,OAAO;yBAC5B,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,aAAa,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;gBAC1C,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,IACE,MAAM,CAAC,MAAM,GAAG,CAAC;QACjB,CAAC,kBAAkB,CAAC,OAAO;QAC3B,CAAC,kBAAkB,CAAC,OAAO,EAC3B,CAAC;QACD,OAAO;YACL,EAAE,EAAE,KAAK;YACT,wBAAwB,EAAE,+BAA+B;YACzD,MAAM;SACP,CAAC;IACJ,CAAC;IAED,OAAO;QACL,EAAE,EAAE,IAAI;QACR,wBAAwB,EAAE,+BAA+B;QACzD,MAAM,EAAE,EAAE;QACV,MAAM,EAAE;YACN,wBAAwB,EAAE,+BAA+B;YACzD,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,YAAY,EAAE,kBAAkB,CAAC,IAAoB;YACrD,YAAY,EAAE,kBAAkB,CAAC,IAAI;YACrC,aAAa;SACd;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signed event-chain verification for data-level atom conformance.
|
|
3
|
+
*
|
|
4
|
+
* Uses the same deterministic SHA-256 formula as
|
|
5
|
+
* {@link PostgresEventAnchoringService} so exports and audit tooling can
|
|
6
|
+
* verify history without trusting the hosting system.
|
|
7
|
+
*/
|
|
8
|
+
import type { AtomEvent } from "../history.js";
|
|
9
|
+
export type VerifyChainErrorKind = "empty-chain" | "genesis-prev-hash" | "broken-link" | "hash-mismatch";
|
|
10
|
+
export interface VerifyChainError {
|
|
11
|
+
readonly kind: VerifyChainErrorKind;
|
|
12
|
+
readonly eventId?: string;
|
|
13
|
+
readonly message: string;
|
|
14
|
+
}
|
|
15
|
+
export interface VerifyChainResult {
|
|
16
|
+
readonly ok: boolean;
|
|
17
|
+
readonly eventCount: number;
|
|
18
|
+
readonly errors: ReadonlyArray<VerifyChainError>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Verify an append-only signed event chain. Events may be passed in any
|
|
22
|
+
* order; they are sorted oldest-first before verification.
|
|
23
|
+
*/
|
|
24
|
+
export declare function verifyEventChain(events: ReadonlyArray<AtomEvent>): VerifyChainResult;
|
|
25
|
+
//# sourceMappingURL=verify-chain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-chain.d.ts","sourceRoot":"","sources":["../../src/conformance/verify-chain.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,MAAM,MAAM,oBAAoB,GAC5B,aAAa,GACb,mBAAmB,GACnB,aAAa,GACb,eAAe,CAAC;AAEpB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;CAClD;AAYD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,GAC/B,iBAAiB,CA8DnB"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signed event-chain verification for data-level atom conformance.
|
|
3
|
+
*
|
|
4
|
+
* Uses the same deterministic SHA-256 formula as
|
|
5
|
+
* {@link PostgresEventAnchoringService} so exports and audit tooling can
|
|
6
|
+
* verify history without trusting the hosting system.
|
|
7
|
+
*/
|
|
8
|
+
import { __internal } from "../history.js";
|
|
9
|
+
function sortEventsOldestFirst(events) {
|
|
10
|
+
return [...events].sort((a, b) => {
|
|
11
|
+
const cmp = a.occurredAt.getTime() - b.occurredAt.getTime();
|
|
12
|
+
if (cmp !== 0)
|
|
13
|
+
return cmp;
|
|
14
|
+
return a.id.localeCompare(b.id);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Verify an append-only signed event chain. Events may be passed in any
|
|
19
|
+
* order; they are sorted oldest-first before verification.
|
|
20
|
+
*/
|
|
21
|
+
export function verifyEventChain(events) {
|
|
22
|
+
if (events.length === 0) {
|
|
23
|
+
return {
|
|
24
|
+
ok: false,
|
|
25
|
+
eventCount: 0,
|
|
26
|
+
errors: [
|
|
27
|
+
{
|
|
28
|
+
kind: "empty-chain",
|
|
29
|
+
message: "signed event chain is empty",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const ordered = sortEventsOldestFirst(events);
|
|
35
|
+
const errors = [];
|
|
36
|
+
for (let i = 0; i < ordered.length; i++) {
|
|
37
|
+
const event = ordered[i];
|
|
38
|
+
if (!event)
|
|
39
|
+
continue;
|
|
40
|
+
const expectedPrev = i === 0 ? null : (ordered[i - 1]?.chainHash ?? null);
|
|
41
|
+
if (i === 0 && event.prevHash !== null) {
|
|
42
|
+
errors.push({
|
|
43
|
+
kind: "genesis-prev-hash",
|
|
44
|
+
eventId: event.id,
|
|
45
|
+
message: `genesis event must have prevHash null; got ${event.prevHash}`,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
if (i > 0 && event.prevHash !== expectedPrev) {
|
|
49
|
+
errors.push({
|
|
50
|
+
kind: "broken-link",
|
|
51
|
+
eventId: event.id,
|
|
52
|
+
message: `prevHash mismatch at event ${event.id}: expected ${expectedPrev}, got ${event.prevHash}`,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const recomputed = __internal.computeChainHash({
|
|
56
|
+
prevHash: event.prevHash,
|
|
57
|
+
payload: event.payload,
|
|
58
|
+
occurredAt: event.occurredAt,
|
|
59
|
+
eventType: event.eventType,
|
|
60
|
+
actor: event.actor,
|
|
61
|
+
});
|
|
62
|
+
if (recomputed !== event.chainHash) {
|
|
63
|
+
errors.push({
|
|
64
|
+
kind: "hash-mismatch",
|
|
65
|
+
eventId: event.id,
|
|
66
|
+
message: `chainHash mismatch at event ${event.id}: stored ${event.chainHash}, recomputed ${recomputed}`,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
ok: errors.length === 0,
|
|
72
|
+
eventCount: ordered.length,
|
|
73
|
+
errors,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=verify-chain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-chain.js","sourceRoot":"","sources":["../../src/conformance/verify-chain.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAoB3C,SAAS,qBAAqB,CAC5B,MAAgC;IAEhC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC/B,MAAM,GAAG,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;QAC5D,IAAI,GAAG,KAAK,CAAC;YAAE,OAAO,GAAG,CAAC;QAC1B,OAAO,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAgC;IAEhC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO;YACL,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;YACxB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC,CAAC;QAEH,IAAI,UAAU,KAAK,KAAK,CAAC,SAAS,EAAE,CAAC;YACnC,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,KAAK,CAAC,EAAE;gBACjB,OAAO,EAAE,+BAA+B,KAAK,CAAC,EAAE,YAAY,KAAK,CAAC,SAAS,gBAAgB,UAAU,EAAE;aACxG,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QACvB,UAAU,EAAE,OAAO,CAAC,MAAM;QAC1B,MAAM;KACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Four-layer context payload returned by `AtomRegistration.contextSummary`.
|
|
3
|
+
*
|
|
4
|
+
* Four layers — `prose`, `typed`, `keyMetrics`, `relatedAtoms` — plus
|
|
5
|
+
* history provenance and a `scopeFiltered` marker that lets the caller
|
|
6
|
+
* know whether the {@link Scope} object actually changed the result.
|
|
7
|
+
*/
|
|
8
|
+
import type { AccessPolicy, AtomReference } from "./registration.js";
|
|
9
|
+
import type { Scope } from "./scope.js";
|
|
10
|
+
/**
|
|
11
|
+
* One row of the `keyMetrics` layer. `unit` is optional because some
|
|
12
|
+
* metrics (counts, dates) don't have one; render bindings should display
|
|
13
|
+
* `value` followed by `unit` when present.
|
|
14
|
+
*/
|
|
15
|
+
export interface KeyMetric {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string | number;
|
|
18
|
+
unit?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Provenance for the latest event written through
|
|
22
|
+
* {@link EventAnchoringService}. Always present; if the atom has no
|
|
23
|
+
* events yet, set `latestEventId: ""` and `latestEventAt` to the atom's
|
|
24
|
+
* creation timestamp.
|
|
25
|
+
*/
|
|
26
|
+
export interface HistoryProvenance {
|
|
27
|
+
latestEventId: string;
|
|
28
|
+
latestEventAt: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Four-layer context shape.
|
|
32
|
+
*
|
|
33
|
+
* @typeParam TType - Literal entity type of the atom that produced this
|
|
34
|
+
* payload. Reserved for future per-atom narrowing of the `typed` field;
|
|
35
|
+
* today the field is `Record<string, unknown>` so any atom can populate
|
|
36
|
+
* it without introducing a discriminated union per atom type yet.
|
|
37
|
+
*/
|
|
38
|
+
export interface ContextSummary<_TType extends string = string> {
|
|
39
|
+
/** Human-readable prose summary suitable for AI prompt insertion. */
|
|
40
|
+
prose: string;
|
|
41
|
+
/**
|
|
42
|
+
* Atom-typed payload. Future revisions will narrow this with a
|
|
43
|
+
* discriminated union per `entityType`; today it is intentionally open
|
|
44
|
+
* so the framework ships without introducing a per-atom registry-side
|
|
45
|
+
* type map.
|
|
46
|
+
*/
|
|
47
|
+
typed: Record<string, unknown>;
|
|
48
|
+
/** Compact key/value tiles surfaced in card and compact modes. */
|
|
49
|
+
keyMetrics: KeyMetric[];
|
|
50
|
+
/** Other atoms this one references; used for crawl + chip rendering. */
|
|
51
|
+
relatedAtoms: AtomReference[];
|
|
52
|
+
/** Provenance of the latest history event (interface-stable). */
|
|
53
|
+
historyProvenance: HistoryProvenance;
|
|
54
|
+
/**
|
|
55
|
+
* `true` when the {@link Scope} object changed the resolved payload
|
|
56
|
+
* relative to the unscoped baseline. Atoms that don't filter by scope
|
|
57
|
+
* should set this to `false`; the {@link httpContextSummary} helper
|
|
58
|
+
* defaults to `false`.
|
|
59
|
+
*/
|
|
60
|
+
scopeFiltered: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Per-instance access tier per ADR-017. Surfaces that gate on visibility
|
|
63
|
+
* (MCP `list_*`, public catalog APIs) treat an omitted field as the
|
|
64
|
+
* registration's `accessPolicy` default — or `"public-free"` when the
|
|
65
|
+
* registration also omits it. Lets a mostly-public atom mark individual
|
|
66
|
+
* instances internal (e.g. partnership-pending jurisdictions).
|
|
67
|
+
*
|
|
68
|
+
* @see {@link AccessPolicy} for the value semantics.
|
|
69
|
+
*/
|
|
70
|
+
accessPolicy?: AccessPolicy;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Configuration for {@link httpContextSummary}.
|
|
74
|
+
*/
|
|
75
|
+
export interface HttpContextSummaryOptions {
|
|
76
|
+
/**
|
|
77
|
+
* Base URL for the API surface that returns the typed payload. Joined
|
|
78
|
+
* with `${slug}/${entityId}/summary`. Defaults to `""` so callers can
|
|
79
|
+
* pass a relative path that the platform proxy resolves.
|
|
80
|
+
*/
|
|
81
|
+
baseUrl?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Cache TTL in milliseconds. Default 30 seconds. Pass `0` to disable
|
|
84
|
+
* caching.
|
|
85
|
+
*/
|
|
86
|
+
ttlMs?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Custom fetch implementation. Defaults to `globalThis.fetch`. Useful
|
|
89
|
+
* for tests and for environments where `credentials: "include"` should
|
|
90
|
+
* not be the default.
|
|
91
|
+
*/
|
|
92
|
+
fetchImpl?: typeof fetch;
|
|
93
|
+
/**
|
|
94
|
+
* Forwarded onto the request. Defaults to `"include"`. Tests may set
|
|
95
|
+
* `"omit"`. Typed as the union of the three valid
|
|
96
|
+
* `RequestInit.credentials` values rather than the DOM lib alias so
|
|
97
|
+
* this file does not require `lib: ["dom"]`.
|
|
98
|
+
*/
|
|
99
|
+
credentials?: "include" | "omit" | "same-origin";
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Handle returned by {@link httpContextSummary}. Exposes the typed
|
|
103
|
+
* `contextSummary` function for use in a registration plus an
|
|
104
|
+
* `invalidate` hook the mutation pipeline calls when an entity changes.
|
|
105
|
+
*/
|
|
106
|
+
export interface HttpContextSummaryHandle<TType extends string> {
|
|
107
|
+
contextSummary: (entityId: string, scope: Scope) => Promise<ContextSummary<TType>>;
|
|
108
|
+
/** Drop the cached entry for `entityId`. Idempotent. */
|
|
109
|
+
invalidate: (entityId: string) => void;
|
|
110
|
+
/** Drop every cached entry. Useful for tests. */
|
|
111
|
+
clear: () => void;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Build a `contextSummary` callback that wraps `fetch` against a typed
|
|
115
|
+
* server endpoint. Centralizes the boilerplate every registration would
|
|
116
|
+
* otherwise have to write by hand and bakes in the 30s TTL cache plus a
|
|
117
|
+
* mutation-invalidation hook. The server is expected to return a JSON
|
|
118
|
+
* body matching {@link ContextSummary}; missing fields are filled with
|
|
119
|
+
* safe defaults.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* const summary = httpContextSummary<"task">("task", { ttlMs: 30_000 });
|
|
123
|
+
* const reg: AtomRegistration<"task", ["card"]> = {
|
|
124
|
+
* entityType: "task",
|
|
125
|
+
* domain: "sprint",
|
|
126
|
+
* supportedModes: ["card"],
|
|
127
|
+
* defaultMode: "card",
|
|
128
|
+
* contextSummary: summary.contextSummary,
|
|
129
|
+
* };
|
|
130
|
+
* // On mutation:
|
|
131
|
+
* summary.invalidate(taskId);
|
|
132
|
+
*/
|
|
133
|
+
export declare function httpContextSummary<TType extends string>(slug: TType, opts?: HttpContextSummaryOptions): HttpContextSummaryHandle<TType>;
|
|
134
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,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