@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,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Testing utilities for `@empressaio/atom-contract`.
|
|
3
|
+
*
|
|
4
|
+
* Consumer atom registrations import {@link runAtomContractTests} to
|
|
5
|
+
* prove their registration is well-formed in one function call. The
|
|
6
|
+
* in-memory event service lets unit tests exercise the
|
|
7
|
+
* `EventAnchoringService` interface without spinning up Postgres.
|
|
8
|
+
*
|
|
9
|
+
* This module is intentionally **not** re-exported from the main barrel
|
|
10
|
+
* (`src/index.ts`) — it lives behind the `./testing` subpath so production
|
|
11
|
+
* bundles never pull it in.
|
|
12
|
+
*/
|
|
13
|
+
import { describe, it, expect } from "vitest";
|
|
14
|
+
import { createHash } from "node:crypto";
|
|
15
|
+
import { createAtomRegistry } from "../registry.js";
|
|
16
|
+
import { parseInlineReferences, serializeInlineReference, } from "../inline-reference.js";
|
|
17
|
+
import { defaultScope } from "../scope.js";
|
|
18
|
+
import { validateAtomConformance, } from "../conformance/validate.js";
|
|
19
|
+
import { ATOM_CONFORMANCE_TARGET_VERSION } from "../conformance/common.js";
|
|
20
|
+
/**
|
|
21
|
+
* Convenience wrapper around {@link createAtomRegistry} for tests. Accepts
|
|
22
|
+
* an initial set of registrations so a single call can register and
|
|
23
|
+
* return the registry.
|
|
24
|
+
*/
|
|
25
|
+
export function createTestRegistry(initial = []) {
|
|
26
|
+
const registry = createAtomRegistry();
|
|
27
|
+
for (const reg of initial) {
|
|
28
|
+
// Pre-built (type-erased) registrations can't satisfy the literal
|
|
29
|
+
// `entityType` constraint enforced by `register`; use the trusted
|
|
30
|
+
// `registerAny` escape hatch instead.
|
|
31
|
+
registry.registerAny(reg);
|
|
32
|
+
}
|
|
33
|
+
return registry;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* In-memory {@link EventAnchoringService} implementation. Mirrors
|
|
37
|
+
* {@link PostgresEventAnchoringService}'s chain-hash semantics so unit
|
|
38
|
+
* tests can assert against the same invariants without touching Postgres.
|
|
39
|
+
*/
|
|
40
|
+
export function createInMemoryEventService() {
|
|
41
|
+
const events = [];
|
|
42
|
+
let counter = 0;
|
|
43
|
+
function chainKey(entityType, entityId) {
|
|
44
|
+
return `${entityType}::${entityId}`;
|
|
45
|
+
}
|
|
46
|
+
function lastFor(entityType, entityId) {
|
|
47
|
+
const key = chainKey(entityType, entityId);
|
|
48
|
+
for (let i = events.length - 1; i >= 0; i--) {
|
|
49
|
+
const e = events[i];
|
|
50
|
+
if (e && chainKey(e.entityType, e.entityId) === key)
|
|
51
|
+
return e;
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
async appendEvent(input) {
|
|
57
|
+
const occurredAt = input.occurredAt ?? new Date();
|
|
58
|
+
const prev = lastFor(input.entityType, input.entityId);
|
|
59
|
+
const prevHash = prev?.chainHash ?? null;
|
|
60
|
+
const stable = JSON.stringify({
|
|
61
|
+
prevHash,
|
|
62
|
+
payload: input.payload,
|
|
63
|
+
occurredAt: occurredAt.toISOString(),
|
|
64
|
+
eventType: input.eventType,
|
|
65
|
+
actor: input.actor,
|
|
66
|
+
});
|
|
67
|
+
const chainHash = createHash("sha256").update(stable).digest("hex");
|
|
68
|
+
counter += 1;
|
|
69
|
+
const event = {
|
|
70
|
+
id: `mem-${String(counter).padStart(8, "0")}`,
|
|
71
|
+
entityType: input.entityType,
|
|
72
|
+
entityId: input.entityId,
|
|
73
|
+
eventType: input.eventType,
|
|
74
|
+
actor: input.actor,
|
|
75
|
+
payload: input.payload,
|
|
76
|
+
prevHash,
|
|
77
|
+
chainHash,
|
|
78
|
+
occurredAt,
|
|
79
|
+
recordedAt: new Date(),
|
|
80
|
+
};
|
|
81
|
+
events.push(event);
|
|
82
|
+
return event;
|
|
83
|
+
},
|
|
84
|
+
async readHistory(ref, opts = {}) {
|
|
85
|
+
const matching = events.filter((e) => e.entityType === ref.entityType && e.entityId === ref.entityId);
|
|
86
|
+
const sorted = [...matching].sort((a, b) => {
|
|
87
|
+
const cmp = a.occurredAt.getTime() - b.occurredAt.getTime();
|
|
88
|
+
if (cmp !== 0)
|
|
89
|
+
return cmp;
|
|
90
|
+
return a.id.localeCompare(b.id);
|
|
91
|
+
});
|
|
92
|
+
const ordered = opts.reverse ? sorted.reverse() : sorted;
|
|
93
|
+
const offset = Math.max(0, opts.offset ?? 0);
|
|
94
|
+
const limit = Math.max(1, Math.min(opts.limit ?? 1000, 10_000));
|
|
95
|
+
return ordered.slice(offset, offset + limit);
|
|
96
|
+
},
|
|
97
|
+
async latestEvent(ref) {
|
|
98
|
+
const rows = await this.readHistory(ref, { limit: 1, reverse: true });
|
|
99
|
+
return rows[0] ?? null;
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Contract test suite consumer atom registrations import to prove
|
|
105
|
+
* compliance with one function call.
|
|
106
|
+
*
|
|
107
|
+
* Asserts:
|
|
108
|
+
* 1. identity is present and `entityType` is non-empty,
|
|
109
|
+
* 2. `defaultMode` is in `supportedModes`,
|
|
110
|
+
* 3. `contextSummary` returns a valid four-layer shape with
|
|
111
|
+
* `historyProvenance` and `scopeFiltered`,
|
|
112
|
+
* 4. every composition edge resolves against `alsoRegister + this`,
|
|
113
|
+
* 5. inline-reference round-trips: `parse(serialize(ref))[0].reference`
|
|
114
|
+
* equals `ref` modulo `mode`.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* import { describe } from "vitest";
|
|
118
|
+
* import { runAtomContractTests } from "@empressaio/atom-contract/testing";
|
|
119
|
+
* import { taskAtom } from "./task.reg.js";
|
|
120
|
+
* describe("task atom contract", () => {
|
|
121
|
+
* runAtomContractTests(taskAtom, { withFixture: { entityId: "t1" } });
|
|
122
|
+
* });
|
|
123
|
+
*/
|
|
124
|
+
export function runAtomContractTests(registration, opts = {}) {
|
|
125
|
+
const fixture = opts.withFixture ?? {
|
|
126
|
+
entityId: "contract-test-id",
|
|
127
|
+
};
|
|
128
|
+
const alsoRegister = opts.alsoRegister ?? [];
|
|
129
|
+
describe(`atom contract: ${registration.entityType}`, () => {
|
|
130
|
+
it("declares identity and a non-empty entityType", () => {
|
|
131
|
+
expect(registration.entityType).toBeTypeOf("string");
|
|
132
|
+
expect(registration.entityType.length).toBeGreaterThan(0);
|
|
133
|
+
expect(registration.domain).toBeTypeOf("string");
|
|
134
|
+
expect(registration.domain.length).toBeGreaterThan(0);
|
|
135
|
+
});
|
|
136
|
+
it("declares defaultMode within supportedModes", () => {
|
|
137
|
+
expect(registration.supportedModes.length).toBeGreaterThan(0);
|
|
138
|
+
expect(registration.supportedModes).toContain(registration.defaultMode);
|
|
139
|
+
});
|
|
140
|
+
it("returns a four-layer ContextSummary with provenance + scopeFiltered", async () => {
|
|
141
|
+
if (fixture.setUp)
|
|
142
|
+
await fixture.setUp();
|
|
143
|
+
try {
|
|
144
|
+
const result = await registration.contextSummary(fixture.entityId, defaultScope());
|
|
145
|
+
expect(result).toBeDefined();
|
|
146
|
+
expect(typeof result.prose).toBe("string");
|
|
147
|
+
expect(typeof result.typed).toBe("object");
|
|
148
|
+
expect(Array.isArray(result.keyMetrics)).toBe(true);
|
|
149
|
+
expect(Array.isArray(result.relatedAtoms)).toBe(true);
|
|
150
|
+
expect(result.historyProvenance).toBeDefined();
|
|
151
|
+
expect(typeof result.historyProvenance.latestEventId).toBe("string");
|
|
152
|
+
expect(typeof result.historyProvenance.latestEventAt).toBe("string");
|
|
153
|
+
expect(typeof result.scopeFiltered).toBe("boolean");
|
|
154
|
+
}
|
|
155
|
+
finally {
|
|
156
|
+
if (fixture.tearDown)
|
|
157
|
+
await fixture.tearDown();
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
it("composition references resolve in the registry", () => {
|
|
161
|
+
const registry = createTestRegistry([
|
|
162
|
+
...alsoRegister,
|
|
163
|
+
registration,
|
|
164
|
+
]);
|
|
165
|
+
const result = registry.validate();
|
|
166
|
+
expect(result.ok).toBe(true);
|
|
167
|
+
});
|
|
168
|
+
it("inline-reference round-trips for an instance of this atom", () => {
|
|
169
|
+
const ref = {
|
|
170
|
+
kind: "atom",
|
|
171
|
+
entityType: registration.entityType,
|
|
172
|
+
entityId: fixture.entityId,
|
|
173
|
+
displayLabel: "Round-trip label",
|
|
174
|
+
};
|
|
175
|
+
const text = `Some prose ${serializeInlineReference(ref)} continues.`;
|
|
176
|
+
const parsed = parseInlineReferences(text);
|
|
177
|
+
const atomSegments = parsed.filter((s) => s.kind === "atom");
|
|
178
|
+
expect(atomSegments).toHaveLength(1);
|
|
179
|
+
const got = atomSegments[0];
|
|
180
|
+
if (!got || got.kind !== "atom")
|
|
181
|
+
throw new Error("unreachable");
|
|
182
|
+
expect(got.reference.entityType).toBe(ref.entityType);
|
|
183
|
+
expect(got.reference.entityId).toBe(ref.entityId);
|
|
184
|
+
expect(got.reference.displayLabel).toBe(ref.displayLabel);
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
/** Default fixture used when an atom passes none. Exported for tests. */
|
|
189
|
+
export const DEFAULT_CONTRACT_FIXTURE = {
|
|
190
|
+
entityId: "contract-test-id",
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Conformance test suite for the architecture-homes target shape (doc 02).
|
|
194
|
+
* Validates read-contract, accessPolicy, and signed-history at runtime.
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* import { describe } from "vitest";
|
|
198
|
+
* import { runAtomConformanceTests } from "@empressaio/atom-contract/testing";
|
|
199
|
+
* describe("code-section conformance", () => {
|
|
200
|
+
* runAtomConformanceTests("code-section", {
|
|
201
|
+
* tier: "data",
|
|
202
|
+
* readContract: emission.readContract,
|
|
203
|
+
* accessPolicy: "public-free",
|
|
204
|
+
* signedHistory: { events: emission.events },
|
|
205
|
+
* });
|
|
206
|
+
* });
|
|
207
|
+
*/
|
|
208
|
+
export function runAtomConformanceTests(label, input, _opts = {}) {
|
|
209
|
+
describe(`atom conformance: ${label}`, () => {
|
|
210
|
+
it(`targets conformance version ${ATOM_CONFORMANCE_TARGET_VERSION}`, () => {
|
|
211
|
+
expect(ATOM_CONFORMANCE_TARGET_VERSION).toBe("1.5.0");
|
|
212
|
+
});
|
|
213
|
+
it("passes validateAtomConformance", () => {
|
|
214
|
+
const result = validateAtomConformance(input);
|
|
215
|
+
if (!result.ok) {
|
|
216
|
+
const detail = result.errors
|
|
217
|
+
.map((e) => `${e.path}: ${e.message}`)
|
|
218
|
+
.join("; ");
|
|
219
|
+
expect.fail(`conformance failed: ${detail}`);
|
|
220
|
+
}
|
|
221
|
+
expect(result.ok).toBe(true);
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAqB,MAAM,gBAAgB,CAAC;AACvE,OAAO,EACL,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAc3C,OAAO,EACL,uBAAuB,GAExB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAE3E;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAChC,UAA8C,EAAE;IAEhD,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAC1B,kEAAkE;QAClE,kEAAkE;QAClE,sCAAsC;QACtC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B;IACxC,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,SAAS,QAAQ,CAAC,UAAkB,EAAE,QAAgB;QACpD,OAAO,GAAG,UAAU,KAAK,QAAQ,EAAE,CAAC;IACtC,CAAC;IAED,SAAS,OAAO,CAAC,UAAkB,EAAE,QAAgB;QACnD,MAAM,GAAG,GAAG,QAAQ,CAAC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A (Versioned Data Atom) wrapping — interface-stable, no-op today.
|
|
3
|
+
*
|
|
4
|
+
* Every data-level atom write goes through a versioning envelope so the
|
|
5
|
+
* historical chain can be reconstructed without mutating source rows.
|
|
6
|
+
* This package ships the **shape** of that envelope plus pure
|
|
7
|
+
* `wrapForStorage` / `unwrapFromStorage` functions whose runtime is a
|
|
8
|
+
* no-op: the value travels through unchanged. Consumers call these from
|
|
9
|
+
* their write paths today; when the real envelope ships, no consumer
|
|
10
|
+
* code needs to change.
|
|
11
|
+
*
|
|
12
|
+
* TODO(M2-C): replace the no-op envelope with the real version chain plus
|
|
13
|
+
* tombstone semantics. The current shape is intentionally minimal so
|
|
14
|
+
* extensions are additive.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Storage envelope wrapped around every persisted atom payload. The
|
|
18
|
+
* `version` field is the envelope schema version; `vdaApplied` is `false`
|
|
19
|
+
* today so consumers can detect "real-VDA-not-yet-on" data even if a
|
|
20
|
+
* caller forgets to migrate when the real envelope ships.
|
|
21
|
+
*/
|
|
22
|
+
export interface VdaEnvelope {
|
|
23
|
+
version: number;
|
|
24
|
+
vdaApplied: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** A wrapped value as it lives at rest. */
|
|
27
|
+
export interface WrappedValue<T> {
|
|
28
|
+
envelope: VdaEnvelope;
|
|
29
|
+
payload: T;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Wrap `value` for storage. The current implementation is a pure
|
|
33
|
+
* structural wrapper — it never mutates `value` and never copies it.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await db.insert(atoms).values({ payload: wrapForStorage(record) });
|
|
37
|
+
*/
|
|
38
|
+
export declare function wrapForStorage<T>(value: T): WrappedValue<T>;
|
|
39
|
+
/**
|
|
40
|
+
* Unwrap a storage envelope. Returns the inner payload unchanged. Tolerant
|
|
41
|
+
* of the no-envelope shape so legacy rows (or future shapes) read cleanly:
|
|
42
|
+
* if the input does not look like a {@link WrappedValue}, it is returned
|
|
43
|
+
* as-is and treated as the payload.
|
|
44
|
+
*/
|
|
45
|
+
export declare function unwrapFromStorage<T>(stored: WrappedValue<T> | T): T;
|
|
46
|
+
//# sourceMappingURL=vda.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vda.d.ts","sourceRoot":"","sources":["../src/vda.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,2CAA2C;AAC3C,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,QAAQ,EAAE,WAAW,CAAC;IACtB,OAAO,EAAE,CAAC,CAAC;CACZ;AAID;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAUnE"}
|
package/dist/vda.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VDA (Versioned Data Atom) wrapping — interface-stable, no-op today.
|
|
3
|
+
*
|
|
4
|
+
* Every data-level atom write goes through a versioning envelope so the
|
|
5
|
+
* historical chain can be reconstructed without mutating source rows.
|
|
6
|
+
* This package ships the **shape** of that envelope plus pure
|
|
7
|
+
* `wrapForStorage` / `unwrapFromStorage` functions whose runtime is a
|
|
8
|
+
* no-op: the value travels through unchanged. Consumers call these from
|
|
9
|
+
* their write paths today; when the real envelope ships, no consumer
|
|
10
|
+
* code needs to change.
|
|
11
|
+
*
|
|
12
|
+
* TODO(M2-C): replace the no-op envelope with the real version chain plus
|
|
13
|
+
* tombstone semantics. The current shape is intentionally minimal so
|
|
14
|
+
* extensions are additive.
|
|
15
|
+
*/
|
|
16
|
+
const CURRENT_ENVELOPE = { version: 1, vdaApplied: false };
|
|
17
|
+
/**
|
|
18
|
+
* Wrap `value` for storage. The current implementation is a pure
|
|
19
|
+
* structural wrapper — it never mutates `value` and never copies it.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* await db.insert(atoms).values({ payload: wrapForStorage(record) });
|
|
23
|
+
*/
|
|
24
|
+
export function wrapForStorage(value) {
|
|
25
|
+
return { envelope: CURRENT_ENVELOPE, payload: value };
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Unwrap a storage envelope. Returns the inner payload unchanged. Tolerant
|
|
29
|
+
* of the no-envelope shape so legacy rows (or future shapes) read cleanly:
|
|
30
|
+
* if the input does not look like a {@link WrappedValue}, it is returned
|
|
31
|
+
* as-is and treated as the payload.
|
|
32
|
+
*/
|
|
33
|
+
export function unwrapFromStorage(stored) {
|
|
34
|
+
if (stored !== null &&
|
|
35
|
+
typeof stored === "object" &&
|
|
36
|
+
"envelope" in stored &&
|
|
37
|
+
"payload" in stored) {
|
|
38
|
+
return stored.payload;
|
|
39
|
+
}
|
|
40
|
+
return stored;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=vda.js.map
|
package/dist/vda.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vda.js","sourceRoot":"","sources":["../src/vda.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAmBH,MAAM,gBAAgB,GAAgB,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAI,KAAQ;IACxC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AACxD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAI,MAA2B;IAC9D,IACE,MAAM,KAAK,IAAI;QACf,OAAO,MAAM,KAAK,QAAQ;QAC1B,UAAU,IAAK,MAAkC;QACjD,SAAS,IAAK,MAAkC,EAChD,CAAC;QACD,OAAQ,MAA0B,CAAC,OAAO,CAAC;IAC7C,CAAC;IACD,OAAO,MAAW,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type WidthedConfidence } from "../read-contract/common.js";
|
|
3
|
+
import { type WorkspaceAtomMetadata } from "./common.js";
|
|
4
|
+
export interface BriefRunCitationRef {
|
|
5
|
+
citationDid: string;
|
|
6
|
+
sourceType: "attachment" | "atom" | "external-link";
|
|
7
|
+
}
|
|
8
|
+
export interface BriefRun extends WorkspaceAtomMetadata {
|
|
9
|
+
entityType: "brief-run";
|
|
10
|
+
workspaceDid: string;
|
|
11
|
+
runInputs: Record<string, unknown>;
|
|
12
|
+
citationRefs: ReadonlyArray<BriefRunCitationRef>;
|
|
13
|
+
confidence: WidthedConfidence;
|
|
14
|
+
generatedAt: string;
|
|
15
|
+
}
|
|
16
|
+
/** Asserted confidence on a brief-run before live calibration fuel exists. */
|
|
17
|
+
export declare function createBriefRunAssertedConfidence(estimate: number): WidthedConfidence;
|
|
18
|
+
export declare const BRIEF_RUN_CITATION_REF_SCHEMA: z.ZodObject<{
|
|
19
|
+
citationDid: z.ZodString;
|
|
20
|
+
sourceType: z.ZodEnum<["attachment", "atom", "external-link"]>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
citationDid: string;
|
|
23
|
+
sourceType: "atom" | "attachment" | "external-link";
|
|
24
|
+
}, {
|
|
25
|
+
citationDid: string;
|
|
26
|
+
sourceType: "atom" | "attachment" | "external-link";
|
|
27
|
+
}>;
|
|
28
|
+
export declare const BRIEF_RUN_SCHEMA: z.ZodObject<{
|
|
29
|
+
did: z.ZodString;
|
|
30
|
+
createdAt: z.ZodString;
|
|
31
|
+
updatedAt: z.ZodString;
|
|
32
|
+
accessPolicy: z.ZodEnum<["public-free", "public-paid", "platform-internal", "tenant-private", "tenant-shared"]>;
|
|
33
|
+
} & {
|
|
34
|
+
entityType: z.ZodLiteral<"brief-run">;
|
|
35
|
+
workspaceDid: z.ZodString;
|
|
36
|
+
runInputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
37
|
+
citationRefs: z.ZodArray<z.ZodObject<{
|
|
38
|
+
citationDid: z.ZodString;
|
|
39
|
+
sourceType: z.ZodEnum<["attachment", "atom", "external-link"]>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
citationDid: string;
|
|
42
|
+
sourceType: "atom" | "attachment" | "external-link";
|
|
43
|
+
}, {
|
|
44
|
+
citationDid: string;
|
|
45
|
+
sourceType: "atom" | "attachment" | "external-link";
|
|
46
|
+
}>, "many">;
|
|
47
|
+
confidence: z.ZodReadonly<z.ZodObject<{
|
|
48
|
+
readonly estimate: z.ZodNumber;
|
|
49
|
+
readonly n: z.ZodNumber;
|
|
50
|
+
readonly intervalWidth: z.ZodNumber;
|
|
51
|
+
readonly provenance: z.ZodEnum<["asserted", "backtest", "seed", "live"]>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
estimate: number;
|
|
54
|
+
n: number;
|
|
55
|
+
intervalWidth: number;
|
|
56
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
57
|
+
}, {
|
|
58
|
+
estimate: number;
|
|
59
|
+
n: number;
|
|
60
|
+
intervalWidth: number;
|
|
61
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
62
|
+
}>>;
|
|
63
|
+
generatedAt: z.ZodString;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
accessPolicy: "public-free" | "public-paid" | "platform-internal" | "tenant-private" | "tenant-shared";
|
|
66
|
+
entityType: "brief-run";
|
|
67
|
+
confidence: Readonly<{
|
|
68
|
+
estimate: number;
|
|
69
|
+
n: number;
|
|
70
|
+
intervalWidth: number;
|
|
71
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
72
|
+
}>;
|
|
73
|
+
did: string;
|
|
74
|
+
createdAt: string;
|
|
75
|
+
updatedAt: string;
|
|
76
|
+
workspaceDid: string;
|
|
77
|
+
runInputs: Record<string, unknown>;
|
|
78
|
+
citationRefs: {
|
|
79
|
+
citationDid: string;
|
|
80
|
+
sourceType: "atom" | "attachment" | "external-link";
|
|
81
|
+
}[];
|
|
82
|
+
generatedAt: string;
|
|
83
|
+
}, {
|
|
84
|
+
accessPolicy: "public-free" | "public-paid" | "platform-internal" | "tenant-private" | "tenant-shared";
|
|
85
|
+
entityType: "brief-run";
|
|
86
|
+
confidence: Readonly<{
|
|
87
|
+
estimate: number;
|
|
88
|
+
n: number;
|
|
89
|
+
intervalWidth: number;
|
|
90
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
91
|
+
}>;
|
|
92
|
+
did: string;
|
|
93
|
+
createdAt: string;
|
|
94
|
+
updatedAt: string;
|
|
95
|
+
workspaceDid: string;
|
|
96
|
+
runInputs: Record<string, unknown>;
|
|
97
|
+
citationRefs: {
|
|
98
|
+
citationDid: string;
|
|
99
|
+
sourceType: "atom" | "attachment" | "external-link";
|
|
100
|
+
}[];
|
|
101
|
+
generatedAt: string;
|
|
102
|
+
}>;
|
|
103
|
+
export declare function validateBriefRun(input: unknown): BriefRun;
|
|
104
|
+
//# sourceMappingURL=brief-run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brief-run.d.ts","sourceRoot":"","sources":["../../src/workspace/brief-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAkC,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzF,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,YAAY,GAAG,MAAM,GAAG,eAAe,CAAC;CACrD;AAED,MAAM,WAAW,QAAS,SAAQ,qBAAqB;IACrD,UAAU,EAAE,WAAW,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,YAAY,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACjD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,8EAA8E;AAC9E,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,MAAM,GACf,iBAAiB,CAOnB;AAED,eAAO,MAAM,6BAA6B;;;;;;;;;EAGxC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO3B,CAAC;AAEH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAMzD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { createWidthedConfidence, WIDTHED_CONFIDENCE_SCHEMA, } from "../read-contract/common.js";
|
|
3
|
+
import { WORKSPACE_ATOM_METADATA_SCHEMA } from "./common.js";
|
|
4
|
+
/** Asserted confidence on a brief-run before live calibration fuel exists. */
|
|
5
|
+
export function createBriefRunAssertedConfidence(estimate) {
|
|
6
|
+
return createWidthedConfidence({
|
|
7
|
+
estimate,
|
|
8
|
+
n: 0,
|
|
9
|
+
intervalWidth: 1,
|
|
10
|
+
provenance: "asserted",
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export const BRIEF_RUN_CITATION_REF_SCHEMA = z.object({
|
|
14
|
+
citationDid: z.string().min(1),
|
|
15
|
+
sourceType: z.enum(["attachment", "atom", "external-link"]),
|
|
16
|
+
});
|
|
17
|
+
export const BRIEF_RUN_SCHEMA = WORKSPACE_ATOM_METADATA_SCHEMA.extend({
|
|
18
|
+
entityType: z.literal("brief-run"),
|
|
19
|
+
workspaceDid: z.string().min(1),
|
|
20
|
+
runInputs: z.record(z.string(), z.unknown()),
|
|
21
|
+
citationRefs: z.array(BRIEF_RUN_CITATION_REF_SCHEMA),
|
|
22
|
+
confidence: WIDTHED_CONFIDENCE_SCHEMA,
|
|
23
|
+
generatedAt: z.string().min(1),
|
|
24
|
+
});
|
|
25
|
+
export function validateBriefRun(input) {
|
|
26
|
+
const parsed = BRIEF_RUN_SCHEMA.parse(input);
|
|
27
|
+
return {
|
|
28
|
+
...parsed,
|
|
29
|
+
confidence: createWidthedConfidence(parsed.confidence),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=brief-run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brief-run.js","sourceRoot":"","sources":["../../src/workspace/brief-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,uBAAuB,EACvB,yBAAyB,GAE1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,8BAA8B,EAA8B,MAAM,aAAa,CAAC;AAgBzF,8EAA8E;AAC9E,MAAM,UAAU,gCAAgC,CAC9C,QAAgB;IAEhB,OAAO,uBAAuB,CAAC;QAC7B,QAAQ;QACR,CAAC,EAAE,CAAC;QACJ,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE,UAAU;KACvB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;CAC5D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,8BAA8B,CAAC,MAAM,CAAC;IACpE,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IAClC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;IAC5C,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,6BAA6B,CAAC;IACpD,UAAU,EAAE,yBAAyB;IACrC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC/B,CAAC,CAAC;AAEH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7C,OAAO;QACL,GAAG,MAAM;QACT,UAAU,EAAE,uBAAuB,CAAC,MAAM,CAAC,UAAU,CAAC;KACvD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { AccessPolicy } from "../registration.js";
|
|
3
|
+
export declare const WORKSPACE_ATOM_ENTITY_TYPES: readonly ["property-workspace", "brief-run", "workspace-attachment", "workspace-share-edge"];
|
|
4
|
+
export type WorkspaceAtomEntityType = (typeof WORKSPACE_ATOM_ENTITY_TYPES)[number];
|
|
5
|
+
export declare const USER_REF_SCHEMA: z.ZodObject<{
|
|
6
|
+
did: z.ZodString;
|
|
7
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
8
|
+
role: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
did: string;
|
|
11
|
+
displayName?: string | undefined;
|
|
12
|
+
role?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
did: string;
|
|
15
|
+
displayName?: string | undefined;
|
|
16
|
+
role?: string | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export type UserRef = z.infer<typeof USER_REF_SCHEMA>;
|
|
19
|
+
export declare const ACCESS_POLICY_SCHEMA: z.ZodEnum<["public-free", "public-paid", "platform-internal", "tenant-private", "tenant-shared"]>;
|
|
20
|
+
export declare const WORKSPACE_ATOM_METADATA_SCHEMA: z.ZodObject<{
|
|
21
|
+
did: z.ZodString;
|
|
22
|
+
createdAt: z.ZodString;
|
|
23
|
+
updatedAt: z.ZodString;
|
|
24
|
+
accessPolicy: z.ZodEnum<["public-free", "public-paid", "platform-internal", "tenant-private", "tenant-shared"]>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
accessPolicy: "public-free" | "public-paid" | "platform-internal" | "tenant-private" | "tenant-shared";
|
|
27
|
+
did: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
}, {
|
|
31
|
+
accessPolicy: "public-free" | "public-paid" | "platform-internal" | "tenant-private" | "tenant-shared";
|
|
32
|
+
did: string;
|
|
33
|
+
createdAt: string;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
}>;
|
|
36
|
+
export interface WorkspaceAtomMetadata {
|
|
37
|
+
did: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
accessPolicy: AccessPolicy;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/workspace/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,eAAO,MAAM,2BAA2B,8FAK9B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnF,eAAO,MAAM,eAAe;;;;;;;;;;;;EAI1B,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAEtD,eAAO,MAAM,oBAAoB,mGAM/B,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;EAKzC,CAAC;AAEH,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;CAC5B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const WORKSPACE_ATOM_ENTITY_TYPES = [
|
|
3
|
+
"property-workspace",
|
|
4
|
+
"brief-run",
|
|
5
|
+
"workspace-attachment",
|
|
6
|
+
"workspace-share-edge",
|
|
7
|
+
];
|
|
8
|
+
export const USER_REF_SCHEMA = z.object({
|
|
9
|
+
did: z.string().min(1),
|
|
10
|
+
displayName: z.string().min(1).optional(),
|
|
11
|
+
role: z.string().min(1).optional(),
|
|
12
|
+
});
|
|
13
|
+
export const ACCESS_POLICY_SCHEMA = z.enum([
|
|
14
|
+
"public-free",
|
|
15
|
+
"public-paid",
|
|
16
|
+
"platform-internal",
|
|
17
|
+
"tenant-private",
|
|
18
|
+
"tenant-shared",
|
|
19
|
+
]);
|
|
20
|
+
export const WORKSPACE_ATOM_METADATA_SCHEMA = z.object({
|
|
21
|
+
did: z.string().min(1),
|
|
22
|
+
createdAt: z.string().min(1),
|
|
23
|
+
updatedAt: z.string().min(1),
|
|
24
|
+
accessPolicy: ACCESS_POLICY_SCHEMA,
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/workspace/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,oBAAoB;IACpB,WAAW;IACX,sBAAsB;IACtB,sBAAsB;CACd,CAAC;AAIX,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC;IACzC,aAAa;IACb,aAAa;IACb,mBAAmB;IACnB,gBAAgB;IAChB,eAAe;CAChB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,YAAY,EAAE,oBAAoB;CACnC,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BriefRun } from "./brief-run.js";
|
|
2
|
+
import type { PropertyWorkspace } from "./property-workspace.js";
|
|
3
|
+
import type { WorkspaceAttachment } from "./workspace-attachment.js";
|
|
4
|
+
import type { WorkspaceShareEdge } from "./workspace-share-edge.js";
|
|
5
|
+
export declare const SAMPLE_PROPERTY_WORKSPACE: PropertyWorkspace;
|
|
6
|
+
export declare const SAMPLE_BRIEF_RUN: BriefRun;
|
|
7
|
+
export declare const SAMPLE_WORKSPACE_ATTACHMENT_LINK: WorkspaceAttachment;
|
|
8
|
+
export declare const SAMPLE_WORKSPACE_ATTACHMENT_NOTE: WorkspaceAttachment;
|
|
9
|
+
export declare const SAMPLE_WORKSPACE_SHARE_EDGE: WorkspaceShareEdge;
|
|
10
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/workspace/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,eAAO,MAAM,yBAAyB,EAAE,iBA0BvC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,QAmB9B,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,mBAa9C,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,mBAa9C,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,kBAezC,CAAC"}
|