@fabricorg/platform 1.5.1 → 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 +32 -0
- package/README.md +27 -2
- package/dist/actions/index.cjs +6 -6
- package/dist/actions/index.d.cts +79 -2
- package/dist/actions/index.d.ts +79 -2
- package/dist/actions/index.js +1 -1
- package/dist/certification/index.cjs +8 -7
- package/dist/certification/index.d.cts +1 -0
- package/dist/certification/index.d.ts +1 -0
- package/dist/certification/index.js +5 -4
- package/dist/{chunk-VZ6C4LXC.cjs → chunk-45OKKLNY.cjs} +17 -9
- package/dist/chunk-45OKKLNY.cjs.map +1 -0
- package/dist/{chunk-2W6FORTE.js → chunk-6QX4I45I.js} +5 -2
- package/dist/chunk-6QX4I45I.js.map +1 -0
- package/dist/chunk-D4SWRBUH.cjs +22 -0
- package/dist/chunk-D4SWRBUH.cjs.map +1 -0
- package/dist/{chunk-KIVQBZOA.cjs → chunk-DBTAUI6C.cjs} +10 -4
- package/dist/chunk-DBTAUI6C.cjs.map +1 -0
- package/dist/{chunk-DDO4EQ2J.js → chunk-EMSAFNPX.js} +3 -3
- package/dist/{chunk-DDO4EQ2J.js.map → chunk-EMSAFNPX.js.map} +1 -1
- package/dist/{chunk-JFVEPAED.js → chunk-GU3LZWJD.js} +17 -9
- package/dist/chunk-GU3LZWJD.js.map +1 -0
- package/dist/chunk-LFE74IJX.js +20 -0
- package/dist/chunk-LFE74IJX.js.map +1 -0
- package/dist/{chunk-PFKTD7V5.cjs → chunk-MCWSUGB3.cjs} +4 -4
- package/dist/{chunk-PFKTD7V5.cjs.map → chunk-MCWSUGB3.cjs.map} +1 -1
- package/dist/{chunk-JG35DT2G.js → chunk-MLBALEUR.js} +5 -2
- package/dist/chunk-MLBALEUR.js.map +1 -0
- package/dist/{chunk-MC3GSVJ6.js → chunk-PDN5DOLQ.js} +17 -4
- package/dist/chunk-PDN5DOLQ.js.map +1 -0
- package/dist/{chunk-CXR6KEKQ.cjs → chunk-SNTV45LH.cjs} +5 -2
- package/dist/chunk-SNTV45LH.cjs.map +1 -0
- package/dist/{chunk-GRBZYDEV.js → chunk-WNZP53GI.js} +9 -3
- package/dist/chunk-WNZP53GI.js.map +1 -0
- package/dist/{chunk-ZBXFRJON.cjs → chunk-WQ3BYI7T.cjs} +20 -7
- package/dist/chunk-WQ3BYI7T.cjs.map +1 -0
- package/dist/{chunk-MSABJAED.cjs → chunk-XCAOO6KG.cjs} +5 -2
- package/dist/chunk-XCAOO6KG.cjs.map +1 -0
- package/dist/discovery/index.cjs +12 -0
- package/dist/discovery/index.cjs.map +1 -0
- package/dist/discovery/index.d.cts +10 -0
- package/dist/discovery/index.d.ts +10 -0
- package/dist/discovery/index.js +3 -0
- package/dist/discovery/index.js.map +1 -0
- package/dist/governance/index.d.cts +1 -0
- package/dist/governance/index.d.ts +1 -0
- package/dist/index.cjs +71 -66
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +9 -8
- package/dist/manifest/index.cjs +10 -9
- package/dist/manifest/index.d.cts +3 -2
- package/dist/manifest/index.d.ts +3 -2
- package/dist/manifest/index.js +4 -3
- package/dist/modules/index.cjs +11 -10
- package/dist/modules/index.d.cts +1 -0
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.js +3 -2
- package/dist/policies/index.cjs +9 -9
- package/dist/policies/index.d.cts +15 -1
- package/dist/policies/index.d.ts +15 -1
- package/dist/policies/index.js +1 -1
- package/dist/projections/index.cjs +6 -5
- package/dist/projections/index.d.cts +2 -1
- package/dist/projections/index.d.ts +2 -1
- package/dist/projections/index.js +2 -1
- package/dist/testing/index.d.cts +1 -0
- package/dist/testing/index.d.ts +1 -0
- package/package.json +11 -1
- package/dist/chunk-2W6FORTE.js.map +0 -1
- package/dist/chunk-CXR6KEKQ.cjs.map +0 -1
- package/dist/chunk-GRBZYDEV.js.map +0 -1
- package/dist/chunk-JFVEPAED.js.map +0 -1
- package/dist/chunk-JG35DT2G.js.map +0 -1
- package/dist/chunk-KIVQBZOA.cjs.map +0 -1
- package/dist/chunk-MC3GSVJ6.js.map +0 -1
- package/dist/chunk-MSABJAED.cjs.map +0 -1
- package/dist/chunk-VZ6C4LXC.cjs.map +0 -1
- package/dist/chunk-ZBXFRJON.cjs.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDBTAUI6C_cjs = require('./chunk-DBTAUI6C.cjs');
|
|
4
|
+
var chunkD4SWRBUH_cjs = require('./chunk-D4SWRBUH.cjs');
|
|
4
5
|
|
|
5
6
|
// manifest/index.ts
|
|
6
7
|
var MODULE_MANIFEST_VERSION = 2;
|
|
@@ -9,10 +10,16 @@ function normalizeModuleManifest(manifest) {
|
|
|
9
10
|
if (version !== 1 && version !== MODULE_MANIFEST_VERSION) {
|
|
10
11
|
throw new Error(`Unsupported module manifest version: ${String(version)}`);
|
|
11
12
|
}
|
|
13
|
+
const views = "views" in manifest && Array.isArray(manifest.views) ? manifest.views : [];
|
|
14
|
+
if (Array.isArray(manifest.actions))
|
|
15
|
+
for (const [index, action] of manifest.actions.entries())
|
|
16
|
+
chunkD4SWRBUH_cjs.assertSurfaceDeclaration(action, `Module "${manifest.namespace}" action[${index}] "${action?.actionId ?? "unknown"}"`);
|
|
17
|
+
for (const [index, view] of views.entries())
|
|
18
|
+
chunkD4SWRBUH_cjs.assertSurfaceDeclaration(view, `Module "${manifest.namespace}" view[${index}] "${view?.name ?? "unknown"}"`);
|
|
12
19
|
return {
|
|
13
20
|
...manifest,
|
|
14
21
|
manifestVersion: MODULE_MANIFEST_VERSION,
|
|
15
|
-
views
|
|
22
|
+
views
|
|
16
23
|
};
|
|
17
24
|
}
|
|
18
25
|
function normalizeModuleManifestBundle(bundle) {
|
|
@@ -32,7 +39,7 @@ function isRecord(value) {
|
|
|
32
39
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
33
40
|
}
|
|
34
41
|
function exportDependency(dependency) {
|
|
35
|
-
const namespace =
|
|
42
|
+
const namespace = chunkDBTAUI6C_cjs.getModuleDependencyNamespace(dependency);
|
|
36
43
|
if (typeof dependency === "string") {
|
|
37
44
|
return { namespace };
|
|
38
45
|
}
|
|
@@ -45,7 +52,7 @@ function exportObjectType(objectType) {
|
|
|
45
52
|
if (typeof objectType === "string") {
|
|
46
53
|
return { type: objectType };
|
|
47
54
|
}
|
|
48
|
-
const normalized = { type:
|
|
55
|
+
const normalized = { type: chunkDBTAUI6C_cjs.getObjectTypeName(objectType) };
|
|
49
56
|
if (objectType.displayName !== void 0) normalized.displayName = objectType.displayName;
|
|
50
57
|
if (objectType.idPrefix !== void 0) normalized.idPrefix = objectType.idPrefix;
|
|
51
58
|
if (objectType.schema !== void 0) normalized.schema = cloneJson(objectType.schema);
|
|
@@ -72,7 +79,7 @@ function exportEventType(eventType) {
|
|
|
72
79
|
return { eventType, schemaVersion: 1 };
|
|
73
80
|
}
|
|
74
81
|
const normalized = {
|
|
75
|
-
eventType:
|
|
82
|
+
eventType: chunkDBTAUI6C_cjs.getEventTypeName(eventType),
|
|
76
83
|
schemaVersion: eventType.schemaVersion
|
|
77
84
|
};
|
|
78
85
|
if (eventType.description !== void 0) normalized.description = eventType.description;
|
|
@@ -80,6 +87,7 @@ function exportEventType(eventType) {
|
|
|
80
87
|
return normalized;
|
|
81
88
|
}
|
|
82
89
|
function exportAction(action) {
|
|
90
|
+
chunkD4SWRBUH_cjs.assertSurfaceDeclaration(action, `Action "${action?.actionId ?? "unknown"}"`);
|
|
83
91
|
const manifest = {
|
|
84
92
|
actionId: action.actionId,
|
|
85
93
|
version: action.version,
|
|
@@ -88,6 +96,8 @@ function exportAction(action) {
|
|
|
88
96
|
mutatesDomain: action.mutatesDomain,
|
|
89
97
|
emitsEvents: [...action.emitsEvents]
|
|
90
98
|
};
|
|
99
|
+
if (action.surface !== void 0) manifest.surface = action.surface;
|
|
100
|
+
if (action.surfaceReason !== void 0) manifest.surfaceReason = action.surfaceReason;
|
|
91
101
|
if (action.policies !== void 0) manifest.policies = [...action.policies];
|
|
92
102
|
if (action.requiredRoles !== void 0) manifest.requiredRoles = [...action.requiredRoles];
|
|
93
103
|
if (action.requiredPermissions !== void 0) {
|
|
@@ -180,6 +190,7 @@ function exportStateMachine(machine) {
|
|
|
180
190
|
};
|
|
181
191
|
}
|
|
182
192
|
function exportView(view) {
|
|
193
|
+
chunkD4SWRBUH_cjs.assertSurfaceDeclaration(view, `View "${view?.name ?? "unknown"}"`);
|
|
183
194
|
const output = {
|
|
184
195
|
name: view.name,
|
|
185
196
|
version: view.version,
|
|
@@ -191,6 +202,8 @@ function exportView(view) {
|
|
|
191
202
|
scope: view.scope,
|
|
192
203
|
snapshotVersion: view.snapshotVersion
|
|
193
204
|
};
|
|
205
|
+
if (view.surface !== void 0) output.surface = view.surface;
|
|
206
|
+
if (view.surfaceReason !== void 0) output.surfaceReason = view.surfaceReason;
|
|
194
207
|
if (view.parameterSchema !== void 0) output.parameterSchema = cloneJson(view.parameterSchema);
|
|
195
208
|
if (view.compatibleSnapshotVersions) output.compatibleSnapshotVersions = [...view.compatibleSnapshotVersions];
|
|
196
209
|
if (view.usage) output.usage = cloneJson(view.usage);
|
|
@@ -232,5 +245,5 @@ exports.exportModuleManifestBundle = exportModuleManifestBundle;
|
|
|
232
245
|
exports.isJsonSchemaExportableValidator = isJsonSchemaExportableValidator;
|
|
233
246
|
exports.normalizeModuleManifest = normalizeModuleManifest;
|
|
234
247
|
exports.normalizeModuleManifestBundle = normalizeModuleManifestBundle;
|
|
235
|
-
//# sourceMappingURL=chunk-
|
|
236
|
-
//# sourceMappingURL=chunk-
|
|
248
|
+
//# sourceMappingURL=chunk-WQ3BYI7T.cjs.map
|
|
249
|
+
//# sourceMappingURL=chunk-WQ3BYI7T.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../manifest/index.ts"],"names":["assertSurfaceDeclaration","get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2BACf,OAAA,EACuB;AACvB,EAAA,OAAO;AAAA,IACN,eAAA,EAAiB,uBAAA;AAAA,IACjB,OAAA,EAAS,OAAA,CAAQ,GAAA,CAAI,oBAAoB;AAAA,GAC1C;AACD","file":"chunk-WQ3BYI7T.cjs","sourcesContent":["import { assertSurfaceDeclaration, type SurfaceDeclaration } from \"../discovery\";\nimport type {\n\tActionExecutionContract,\n\tActionDefinition,\n\tAdapterStepRetryPolicy,\n\tSchemaValidator,\n} from \"../actions\";\nimport {\n\tgetEventTypeName,\n\tgetModuleDependencyNamespace,\n\tgetObjectTypeName,\n\ttype FabricModule,\n\ttype CapabilityMetadata,\n\ttype DeclarativeInvariant,\n\ttype ModuleDependency,\n\ttype ModuleDependencyInput,\n\ttype ObjectRelationDefinition,\n} from \"../modules\";\nimport type { JsonValue, PortableJsonSchema } from \"../objects\";\nimport type {\n\tDataPolicyDefinition,\n\tPolicyFallbackDefinition,\n\tPolicyKind,\n} from \"../policies\";\nimport type { StateDefinition, StateMachineDefinition } from \"../state-machines\";\nimport type { ViewContract } from \"../projections\";\n\n/**\n * Version of the module manifest contract. Bump when the serialized shape\n * changes in a way consumers must detect.\n */\nexport const MODULE_MANIFEST_VERSION = 2 as const;\n\nexport interface ModuleManifestObjectType {\n\ttype: string;\n\tdisplayName?: string;\n\tidPrefix?: string;\n\tschema?: PortableJsonSchema;\n\tsemantics?: Record<string, JsonValue>;\n\trelations?: ObjectRelationDefinition[];\n\tinvariants?: DeclarativeInvariant[];\n}\n\nexport interface ModuleManifestIdPrefix {\n\tprefix: string;\n\tname: string;\n}\n\nexport interface ModuleManifestEventType {\n\teventType: string;\n\tschemaVersion: number;\n\tdescription?: string;\n\tschema?: PortableJsonSchema;\n}\n\nexport interface ModuleManifestActionStateMachine {\n\tentityType: string;\n\t/** Present only when the binding declares a static target state. */\n\ttargetState?: string;\n}\n\nexport interface ModuleManifestAdapterStep {\n\tadapterType: string;\n\toperation: string;\n\tretryPolicy?: AdapterStepRetryPolicy;\n}\n\nexport interface ModuleManifestAction extends SurfaceDeclaration {\n\tactionId: string;\n\tversion: number;\n\tkind: \"atomic\" | \"saga\";\n\tidempotent: boolean;\n\tmutatesDomain: boolean;\n\temitsEvents: string[];\n\tpolicies?: string[];\n\trequiredRoles?: string[];\n\trequiredPermissions?: string[];\n\teventPhase?: \"before_adapters\" | \"after_adapters\";\n\texecution?: ActionExecutionContract;\n\t/**\n\t * JSON Schema for the action parameters, present only when the action's\n\t * `schema` validator implements {@link JsonSchemaExportableValidator}.\n\t */\n\tparameterSchema?: unknown;\n\tparameterSchemaFormat?: \"json-schema\";\n\tresultSchema?: unknown;\n\tresultSchemaFormat?: \"json-schema\";\n\tstateMachine?: ModuleManifestActionStateMachine;\n\tadapterSteps?: ModuleManifestAdapterStep[];\n}\n\nexport interface ModuleManifestCodePolicy {\n\ttype: \"code\";\n\tpolicyId: string;\n\tversion: number;\n\tpreviewSafe?: boolean;\n}\n\nexport interface ModuleManifestDataPolicy {\n\ttype: \"data\";\n\tpolicyId: string;\n\tpolicyVersion: number;\n\tkind: PolicyKind;\n\tdataDefinition?: DataPolicyDefinition;\n\tcodeEvaluatorPolicyId?: string;\n\tfallback?: PolicyFallbackDefinition;\n}\n\nexport type ModuleManifestPolicy = ModuleManifestCodePolicy | ModuleManifestDataPolicy;\n\nexport interface ModuleManifestStateMachineTransition {\n\tfrom: string;\n\tto: string;\n\tcausedByAction: string;\n\t/** `true` when the transition declares a guard function. The guard itself is never serialized. */\n\thasGuard: boolean;\n}\n\nexport interface ModuleManifestStateMachine {\n\tentityType: string;\n\t/** States in declaration order (`Object.values` order of the definition record). */\n\tstates: StateDefinition[];\n\ttransitions: ModuleManifestStateMachineTransition[];\n}\n\nexport interface ModuleManifestView extends SurfaceDeclaration {\n\tname: string;\n\tversion: string;\n\tshape: PortableJsonSchema;\n\tparameterSchema?: PortableJsonSchema;\n\tconsumes: Array<{ eventType: string; schemaVersions: number[] }>;\n\tscope: \"tenant-space\";\n\tsnapshotVersion: number;\n\tcompatibleSnapshotVersions?: number[];\n\tusage?: ViewContract[\"usage\"];\n}\n\n/**\n * Stable, JSON-serializable description of a {@link FabricModule}'s ontology:\n * object types, subject types, id prefixes, event types, actions, policies,\n * and state machines. Intended for downstream tooling (semantics exporters,\n * docs generators, tool generators) that cannot consume live module code.\n *\n * The manifest contains definitions only — never raw parameter values,\n * secrets, or runtime data. Function fields (`handler`, `evaluate`, `guard`,\n * dynamic `targetState`, adapter `getInput`) are never serialized.\n */\nexport interface ModuleManifest {\n\tmanifestVersion: typeof MODULE_MANIFEST_VERSION;\n\tnamespace: string;\n\tversion?: string;\n\tdisplayName?: string;\n\tdescription?: string;\n\tcapability?: CapabilityMetadata;\n\tdependencies: ModuleDependency[];\n\tobjectTypes: ModuleManifestObjectType[];\n\tsubjectTypes: string[];\n\tidPrefixes: ModuleManifestIdPrefix[];\n\teventTypes: ModuleManifestEventType[];\n\tactions: ModuleManifestAction[];\n\tpolicies: ModuleManifestPolicy[];\n\tstateMachines: ModuleManifestStateMachine[];\n\tviews: ModuleManifestView[];\n}\n\nexport interface ModuleManifestBundle {\n\tmanifestVersion: typeof MODULE_MANIFEST_VERSION;\n\t/** Manifests in the input module order. */\n\tmodules: ModuleManifest[];\n}\n\n/** Manifest v1 remains accepted by v2 readers; missing v2 fields normalize to absence. */\nexport type ModuleManifestObjectTypeV1 = Omit<\n\tModuleManifestObjectType,\n\t\"schema\" | \"semantics\" | \"relations\" | \"invariants\"\n>;\nexport type ModuleManifestActionV1 = Omit<\n\tModuleManifestAction,\n\t\"resultSchema\" | \"resultSchemaFormat\"\n>;\nexport type ModuleManifestV1 = Omit<\n\tModuleManifest,\n\t\"manifestVersion\" | \"objectTypes\" | \"actions\" | \"views\"\n> & {\n\tmanifestVersion: 1;\n\tobjectTypes: ModuleManifestObjectTypeV1[];\n\tactions: ModuleManifestActionV1[];\n};\nexport type ModuleManifestBundleV1 = Omit<ModuleManifestBundle, \"manifestVersion\" | \"modules\"> & {\n\tmanifestVersion: 1;\n\tmodules: ModuleManifestV1[];\n};\n\nexport function normalizeModuleManifest(\n\tmanifest: ModuleManifest | ModuleManifestV1,\n): ModuleManifest {\n\tconst version: number = manifest.manifestVersion;\n\tif (version !== 1 && version !== MODULE_MANIFEST_VERSION) {\n\t\tthrow new Error(`Unsupported module manifest version: ${String(version)}`);\n\t}\n\tconst views = \"views\" in manifest && Array.isArray(manifest.views) ? manifest.views : [];\n\t// Preserve the normalizer's legacy tolerance for absent/non-array fields.\n\tif (Array.isArray(manifest.actions))\n\t\tfor (const [index, action] of manifest.actions.entries())\n\t\t\tassertSurfaceDeclaration(action, `Module \"${manifest.namespace}\" action[${index}] \"${action?.actionId ?? \"unknown\"}\"`);\n\tfor (const [index, view] of views.entries())\n\t\tassertSurfaceDeclaration(view, `Module \"${manifest.namespace}\" view[${index}] \"${view?.name ?? \"unknown\"}\"`);\n\treturn {\n\t\t...manifest,\n\t\tmanifestVersion: MODULE_MANIFEST_VERSION,\n\t\tviews,\n\t};\n}\n\nexport function normalizeModuleManifestBundle(\n\tbundle: ModuleManifestBundle | ModuleManifestBundleV1,\n): ModuleManifestBundle {\n\tconst version: number = bundle.manifestVersion;\n\tif (version !== 1 && version !== MODULE_MANIFEST_VERSION) {\n\t\tthrow new Error(`Unsupported module manifest bundle version: ${String(version)}`);\n\t}\n\treturn {\n\t\tmanifestVersion: MODULE_MANIFEST_VERSION,\n\t\tmodules: bundle.modules.map((manifest) => normalizeModuleManifest(manifest)),\n\t};\n}\n\n/**\n * A {@link SchemaValidator} that can also export its parameter schema as JSON\n * Schema (for example a Zod 4 schema via `z.toJSONSchema`). Keeps the platform\n * zero-dependency while letting schema-bearing actions flow into manifests.\n */\nexport interface JsonSchemaExportableValidator extends SchemaValidator {\n\ttoJSONSchema(): Record<string, unknown>;\n}\n\nexport function isJsonSchemaExportableValidator(\n\tschema: SchemaValidator,\n): schema is JsonSchemaExportableValidator {\n\treturn (\n\t\ttypeof (schema as Partial<JsonSchemaExportableValidator>).toJSONSchema === \"function\"\n\t);\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction exportDependency(dependency: ModuleDependencyInput): ModuleDependency {\n\tconst namespace = getModuleDependencyNamespace(dependency);\n\tif (typeof dependency === \"string\") {\n\t\treturn { namespace };\n\t}\n\tconst normalized: ModuleDependency = { namespace };\n\tif (dependency.version !== undefined) normalized.version = dependency.version;\n\tif (dependency.optional !== undefined) normalized.optional = dependency.optional;\n\treturn normalized;\n}\n\nfunction exportObjectType(\n\tobjectType: NonNullable<FabricModule[\"objectTypes\"]>[number],\n): ModuleManifestObjectType {\n\tif (typeof objectType === \"string\") {\n\t\treturn { type: objectType };\n\t}\n\tconst normalized: ModuleManifestObjectType = { type: getObjectTypeName(objectType) };\n\tif (objectType.displayName !== undefined) normalized.displayName = objectType.displayName;\n\tif (objectType.idPrefix !== undefined) normalized.idPrefix = objectType.idPrefix;\n\tif (objectType.schema !== undefined) normalized.schema = cloneJson(objectType.schema);\n\tif (objectType.semantics !== undefined) normalized.semantics = cloneJson(objectType.semantics);\n\tif (objectType.relations !== undefined) {\n\t\tnormalized.relations = objectType.relations.map((relation) => ({ ...relation }));\n\t}\n\tif (objectType.invariants !== undefined) {\n\t\tnormalized.invariants = objectType.invariants.map((invariant) => ({ ...invariant }));\n\t}\n\treturn normalized;\n}\n\nfunction cloneJson<T>(value: T): T {\n\tif (Array.isArray(value)) return value.map((item) => cloneJson(item)) as T;\n\tif (value !== null && typeof value === \"object\") {\n\t\treturn Object.fromEntries(\n\t\t\tObject.entries(value as Record<string, unknown>).map(([key, child]) => [key, cloneJson(child)]),\n\t\t) as T;\n\t}\n\treturn value;\n}\n\nfunction exportEventType(\n\teventType: NonNullable<FabricModule[\"eventTypes\"]>[number],\n): ModuleManifestEventType {\n\tif (typeof eventType === \"string\") {\n\t\t// String registrations carry no explicit schema version; the events\n\t\t// registry treats the bare name as the initial version of the type.\n\t\treturn { eventType, schemaVersion: 1 };\n\t}\n\tconst normalized: ModuleManifestEventType = {\n\t\teventType: getEventTypeName(eventType),\n\t\tschemaVersion: eventType.schemaVersion,\n\t};\n\tif (eventType.description !== undefined) normalized.description = eventType.description;\n\tif (eventType.schema !== undefined) normalized.schema = cloneJson(eventType.schema);\n\treturn normalized;\n}\n\nfunction exportAction(action: ActionDefinition): ModuleManifestAction {\n\tassertSurfaceDeclaration(action, `Action \"${action?.actionId ?? \"unknown\"}\"`);\n\tconst manifest: ModuleManifestAction = {\n\t\tactionId: action.actionId,\n\t\tversion: action.version,\n\t\tkind: action.kind ?? \"atomic\",\n\t\tidempotent: action.idempotent,\n\t\tmutatesDomain: action.mutatesDomain,\n\t\temitsEvents: [...action.emitsEvents],\n\t};\n\n\tif (action.surface !== undefined) manifest.surface = action.surface;\n\tif (action.surfaceReason !== undefined) manifest.surfaceReason = action.surfaceReason;\n\tif (action.policies !== undefined) manifest.policies = [...action.policies];\n\tif (action.requiredRoles !== undefined) manifest.requiredRoles = [...action.requiredRoles];\n\tif (action.requiredPermissions !== undefined) {\n\t\tmanifest.requiredPermissions = [...action.requiredPermissions];\n\t}\n\tif (action.eventPhase !== undefined) manifest.eventPhase = action.eventPhase;\n\tif (action.execution !== undefined) manifest.execution = cloneJson(action.execution);\n\n\tif (isJsonSchemaExportableValidator(action.schema)) {\n\t\ttry {\n\t\t\tmanifest.parameterSchema = action.schema.toJSONSchema();\n\t\t\tmanifest.parameterSchemaFormat = \"json-schema\";\n\t\t} catch {\n\t\t\t// Runtime-valid schemas that cannot be represented portably remain executable;\n\t\t\t// build-time consumers see the schema as unavailable rather than crashing export.\n\t\t}\n\t}\n\tif (action.resultSchema && isJsonSchemaExportableValidator(action.resultSchema)) {\n\t\ttry {\n\t\t\tmanifest.resultSchema = action.resultSchema.toJSONSchema();\n\t\t\tmanifest.resultSchemaFormat = \"json-schema\";\n\t\t} catch {\n\t\t\t// See parameter-schema behavior above.\n\t\t}\n\t}\n\n\tif (action.stateMachine !== undefined) {\n\t\tconst binding: ModuleManifestActionStateMachine = {\n\t\t\tentityType: action.stateMachine.entityType,\n\t\t};\n\t\tif (typeof action.stateMachine.targetState === \"string\") {\n\t\t\tbinding.targetState = action.stateMachine.targetState;\n\t\t}\n\t\tmanifest.stateMachine = binding;\n\t}\n\n\tif (action.adapterSteps !== undefined) {\n\t\tmanifest.adapterSteps = action.adapterSteps.map((step) => {\n\t\t\tconst exported: ModuleManifestAdapterStep = {\n\t\t\t\tadapterType: step.adapterType,\n\t\t\t\toperation: step.operation,\n\t\t\t};\n\t\t\tif (step.retryPolicy !== undefined) exported.retryPolicy = { ...step.retryPolicy };\n\t\t\treturn exported;\n\t\t});\n\t}\n\n\treturn manifest;\n}\n\nfunction exportPolicy(policy: unknown): ModuleManifestPolicy | undefined {\n\tif (!isRecord(policy) || typeof policy.policyId !== \"string\") {\n\t\treturn undefined;\n\t}\n\n\t// Code evaluator: identified by its `evaluate` function (never serialized).\n\tif (typeof policy.evaluate === \"function\") {\n\t\tconst exported: ModuleManifestCodePolicy = {\n\t\t\ttype: \"code\",\n\t\t\tpolicyId: policy.policyId,\n\t\t\tversion: typeof policy.version === \"number\" ? policy.version : 1,\n\t\t};\n\t\tif (typeof policy.previewSafe === \"boolean\") exported.previewSafe = policy.previewSafe;\n\t\treturn exported;\n\t}\n\n\t// Declarative runtime policy definition: pure data, serialized as-is.\n\tif (typeof policy.kind === \"string\" && typeof policy.policyVersion === \"number\") {\n\t\tconst exported: ModuleManifestDataPolicy = {\n\t\t\ttype: \"data\",\n\t\t\tpolicyId: policy.policyId,\n\t\t\tpolicyVersion: policy.policyVersion,\n\t\t\tkind: policy.kind as PolicyKind,\n\t\t};\n\t\tif (isRecord(policy.dataDefinition)) {\n\t\t\texported.dataDefinition = policy.dataDefinition as unknown as DataPolicyDefinition;\n\t\t}\n\t\tif (typeof policy.codeEvaluatorPolicyId === \"string\") {\n\t\t\texported.codeEvaluatorPolicyId = policy.codeEvaluatorPolicyId;\n\t\t}\n\t\tif (isRecord(policy.fallback)) {\n\t\t\texported.fallback = policy.fallback as unknown as PolicyFallbackDefinition;\n\t\t}\n\t\treturn exported;\n\t}\n\n\t// Unknown policy shape: omit rather than guess.\n\treturn undefined;\n}\n\nfunction exportStateMachine(machine: unknown): ModuleManifestStateMachine | undefined {\n\tif (\n\t\t!isRecord(machine) ||\n\t\ttypeof machine.entityType !== \"string\" ||\n\t\t!isRecord(machine.states) ||\n\t\t!Array.isArray(machine.transitions)\n\t) {\n\t\treturn undefined;\n\t}\n\n\tconst definition = machine as unknown as StateMachineDefinition;\n\treturn {\n\t\tentityType: definition.entityType,\n\t\tstates: Object.values(definition.states),\n\t\ttransitions: definition.transitions.map((transition) => ({\n\t\t\tfrom: transition.from,\n\t\t\tto: transition.to,\n\t\t\tcausedByAction: transition.causedByAction,\n\t\t\thasGuard: typeof transition.guard === \"function\",\n\t\t})),\n\t};\n}\n\nfunction exportView(view: ViewContract): ModuleManifestView {\n\tassertSurfaceDeclaration(view, `View \"${view?.name ?? \"unknown\"}\"`);\n\tconst output: ModuleManifestView = {\n\t\tname: view.name,\n\t\tversion: view.version,\n\t\tshape: cloneJson(view.shape),\n\t\tconsumes: view.consumes.map((consumption) => ({\n\t\t\teventType: consumption.eventType,\n\t\t\tschemaVersions: [...consumption.schemaVersions],\n\t\t})),\n\t\tscope: view.scope,\n\t\tsnapshotVersion: view.snapshotVersion,\n\t};\n\tif (view.surface !== undefined) output.surface = view.surface;\n\tif (view.surfaceReason !== undefined) output.surfaceReason = view.surfaceReason;\n\tif (view.parameterSchema !== undefined) output.parameterSchema = cloneJson(view.parameterSchema);\n\tif (view.compatibleSnapshotVersions) output.compatibleSnapshotVersions = [...view.compatibleSnapshotVersions];\n\tif (view.usage) output.usage = cloneJson(view.usage);\n\treturn output;\n}\n\n/**\n * Export a stable, JSON-serializable manifest of a module's ontology.\n *\n * This is a pure function of the module object: it does not read or mutate the\n * global module/action/policy/state-machine registries, and the module does\n * not need to be registered first. Declaration order is preserved everywhere\n * (nothing is sorted), so the same module object always produces a\n * byte-identical `JSON.stringify` result.\n *\n * The manifest contains definitions only — never raw parameter values,\n * secrets, or runtime data. Function fields are elided (`handler`,\n * policy `evaluate`, transition `guard` → `hasGuard`, dynamic `targetState`,\n * adapter `getInput`).\n */\nexport function exportModuleManifest(module: FabricModule<unknown>): ModuleManifest {\n\tconst manifest: ModuleManifest = {\n\t\tmanifestVersion: MODULE_MANIFEST_VERSION,\n\t\tnamespace: module.namespace,\n\t\tdependencies: (module.dependencies ?? []).map(exportDependency),\n\t\tobjectTypes: (module.objectTypes ?? []).map(exportObjectType),\n\t\tsubjectTypes: [...(module.subjectTypes ?? [])],\n\t\tidPrefixes: (module.idPrefixes ?? []).map((registration) => ({\n\t\t\tprefix: registration.prefix,\n\t\t\tname: registration.name,\n\t\t})),\n\t\teventTypes: (module.eventTypes ?? []).map(exportEventType),\n\t\tactions: (module.actions ?? []).map(exportAction),\n\t\tpolicies: (module.policies ?? [])\n\t\t\t.map(exportPolicy)\n\t\t\t.filter((policy): policy is ModuleManifestPolicy => policy !== undefined),\n\t\tstateMachines: (module.stateMachines ?? [])\n\t\t\t.map(exportStateMachine)\n\t\t\t.filter((machine): machine is ModuleManifestStateMachine => machine !== undefined),\n\t\tviews: (module.views ?? []).map(exportView),\n\t};\n\n\tif (module.version !== undefined) manifest.version = module.version;\n\tif (module.displayName !== undefined) manifest.displayName = module.displayName;\n\tif (module.description !== undefined) manifest.description = module.description;\n\tif (module.capability !== undefined) manifest.capability = cloneJson(module.capability);\n\n\treturn manifest;\n}\n\n/**\n * Export manifests for a set of modules, preserving the input order.\n * Like {@link exportModuleManifest}, this is pure and registry-free.\n */\nexport function exportModuleManifestBundle(\n\tmodules: FabricModule<unknown>[],\n): ModuleManifestBundle {\n\treturn {\n\t\tmanifestVersion: MODULE_MANIFEST_VERSION,\n\t\tmodules: modules.map(exportModuleManifest),\n\t};\n}\n"]}
|
|
@@ -30,6 +30,9 @@ function createActionRegistry(definitions = []) {
|
|
|
30
30
|
if (definition.mutatesDomain && definition.emitsEvents.length === 0) {
|
|
31
31
|
throw new Error(`Action "${definition.actionId}" mutates domain but emits no events. Every mutating action must emit at least one AssetEvent.`);
|
|
32
32
|
}
|
|
33
|
+
if (definition.admitSubmission !== void 0 && typeof definition.admitSubmission !== "function") {
|
|
34
|
+
throw new Error(`Action "${definition.actionId}" declares admitSubmission that is not a function.`);
|
|
35
|
+
}
|
|
33
36
|
actions.set(definition.actionId, definition);
|
|
34
37
|
};
|
|
35
38
|
for (const definition of definitions) register(definition);
|
|
@@ -49,5 +52,5 @@ exports.assertActionId = assertActionId;
|
|
|
49
52
|
exports.assertActorType = assertActorType;
|
|
50
53
|
exports.createActionRegistry = createActionRegistry;
|
|
51
54
|
exports.isActorType = isActorType;
|
|
52
|
-
//# sourceMappingURL=chunk-
|
|
53
|
-
//# sourceMappingURL=chunk-
|
|
55
|
+
//# sourceMappingURL=chunk-XCAOO6KG.cjs.map
|
|
56
|
+
//# sourceMappingURL=chunk-XCAOO6KG.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../actions/index.ts"],"names":[],"mappings":";;;AAyBO,IAAM,WAAA,GAAoC;AAAA,EAChD,gBAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,iBAAA;AAAA,EACA,iBAAA;AAAA,EACA;AACD;AAEO,SAAS,YAAY,KAAA,EAAmC;AAC9D,EAAA,OAAQ,WAAA,CAAkC,SAAS,KAAK,CAAA;AACzD;AAEO,SAAS,gBAAgB,KAAA,EAA2C;AAC1E,EAAA,IAAI,CAAC,WAAA,CAAY,KAAK,CAAA,EAAG;AACxB,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,mBAAA,EAAsB,KAAK,CAAA,CAAE,CAAA;AAAA,EAC9C;AACD;AAmQO,SAAS,eAAe,QAAA,EAAgD;AAC9E,EAAA,IAAI,CAAC,oCAAA,CAAqC,IAAA,CAAK,QAAQ,CAAA,EAAG;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A,CAAQ,IAAI,QAAQ,CAAA;AAAA,IAC3C,GAAA,EAAK,CAAC,QAAA,KAAmC,OAAA,CAAQ,IAAI,QAAoB,CAAA;AAAA,IACzE,KAAK,MAAM,KAAA,CAAM,IAAA,CAAK,OAAA,CAAQ,MAAM;AAAA,GACrC;AACD","file":"chunk-XCAOO6KG.cjs","sourcesContent":["import type { SurfaceDeclaration } from \"../discovery\";\nexport type ActionId = `${string}.${string}`;\n\nexport interface SchemaParseIssue {\n\tpath: PropertyKey[];\n\tmessage: string;\n}\n\nexport type SchemaParseResult<T = unknown> =\n\t| { success: true; data: T }\n\t| { success: false; error: { issues: SchemaParseIssue[] } };\n\nexport interface SchemaValidator<T = unknown> {\n\tparse(input: unknown): T;\n\tsafeParse(input: unknown): SchemaParseResult<T>;\n}\n\nexport type ActorType =\n\t| \"natural_person\"\n\t| \"agent\"\n\t| \"system\"\n\t| \"service_account\"\n\t| \"external_system\"\n\t| \"integration\";\n\nexport const ACTOR_TYPES: readonly ActorType[] = [\n\t\"natural_person\",\n\t\"agent\",\n\t\"system\",\n\t\"service_account\",\n\t\"external_system\",\n\t\"integration\",\n] as const;\n\nexport function isActorType(value: string): value is ActorType {\n\treturn (ACTOR_TYPES as readonly string[]).includes(value);\n}\n\nexport function assertActorType(value: string): asserts value is ActorType {\n\tif (!isActorType(value)) {\n\t\tthrow new Error(`Invalid actorType: ${value}`);\n\t}\n}\n\nexport type ActionStatus =\n\t| \"pending\"\n\t| \"running\"\n\t| \"completed\"\n\t| \"failed\"\n\t| \"blocked_by_policy\"\n\t| \"waiting_for_approval\"\n\t| \"reconciliation_required\"\n\t| \"validation_failed\";\n\nexport interface FabricRuntimeServices {\n\treadonly [serviceName: string]: unknown;\n}\n\nexport interface ActionContext<TDb = unknown> {\n\tactionInvocationId: string;\n\ttenantId: string;\n\tspaceId: string;\n\tactorId: string;\n\tactorType: ActorType;\n\tcorrelationId: string;\n\tcausationId?: string;\n\tprovenance?: { source: string; auditAttributes?: Record<string, string> };\n\tdb: TDb;\n\tservices?: FabricRuntimeServices;\n\t/**\n\t * When the host admitted this invocation's submission through the\n\t * action's `admitSubmission` check, read from the durable invocation\n\t * record. Absent when the action declares no check, or when the runtime\n\t * that built this context does not run declared admission checks (a host\n\t * older than the one that introduced them). A handler whose action\n\t * declares `admitSubmission` can refuse to run without it.\n\t */\n\tadmittedAt?: Date;\n}\n\n/**\n * Trusted facts a host gives an action's `admitSubmission` check. Scope and\n * actor come from the host's authenticated submission, never from the\n * parameters.\n */\nexport interface ActionAdmissionInput {\n\treadonly actionId: ActionId;\n\treadonly tenantId: string;\n\treadonly spaceId: string;\n\treadonly actorId: string;\n\treadonly actorType: ActorType;\n\t/**\n\t * The submitted parameters, unvalidated, as a copy made for this check.\n\t * `@fabricorg/platform-host` records its own copy of the same value, taken\n\t * before the check ran, and only if the check admits it; changing this\n\t * copy changes nothing the host records.\n\t */\n\treadonly parameters: Readonly<Record<string, unknown>>;\n\t/**\n\t * Aborted when the host's admission deadline passes. Hosts pass an\n\t * `AbortSignal`. `@fabricorg/platform-host` refuses an answer that settles\n\t * at or after the deadline, even one that settles before the abort.\n\t */\n\treadonly signal: ActionAdmissionSignal;\n}\n\n/**\n * The part of an `AbortSignal` an admission check can rely on. Declared\n * structurally so this module compiles without DOM or Node type libraries; a\n * host passes a real `AbortSignal`, which satisfies it.\n */\nexport interface ActionAdmissionSignal {\n\treadonly aborted: boolean;\n\taddEventListener(type: \"abort\", listener: () => void, options?: { once?: boolean }): void;\n\tremoveEventListener(type: \"abort\", listener: () => void): void;\n}\n\n/**\n * An admission check's answer. Only `{ admitted: true }` admits. A refusal's\n * `code` must be a fixed code chosen by the action (lower-case first letter,\n * then letters, digits, `_`, `.`, `:` or `-`, at most 128 characters), never\n * a submitted value: the host puts it in the error it throws.\n */\nexport type ActionAdmissionDecision =\n\t| { readonly admitted: true }\n\t| { readonly admitted: false; readonly code: string };\n\n/**\n * Decides whether a submission may be recorded at all. A host that supports\n * it runs the check after authorizing the submitter and before it writes\n * anything durable for the submission; a refusal, a throw, a timeout or any\n * answer other than `{ admitted: true }` refuses the submission.\n */\nexport type ActionAdmission = (input: ActionAdmissionInput) => Promise<ActionAdmissionDecision>;\n\nexport interface ActionResult {\n\tsuccess: boolean;\n\tdata?: Record<string, unknown>;\n\terror?: string;\n}\n\nexport type ActionHandler<TDb = unknown> = (\n\tctx: ActionContext<TDb>,\n\tparams: unknown,\n) => Promise<ActionResult>;\n\nexport interface AdapterStepRetryPolicy {\n\tidempotent: boolean;\n\tmaxAttempts?: number;\n\tinitialDelayMs?: number;\n\tbackoffMultiplier?: number;\n\tmaxDelayMs?: number;\n}\n\nexport interface AdapterStep {\n\tadapterType: string;\n\toperation: string;\n\tretryPolicy?: AdapterStepRetryPolicy;\n\tgetInput: (\n\t\tparams: unknown,\n\t\thandlerResult: Record<string, unknown>,\n\t) => Record<string, unknown> | undefined;\n}\n\nexport interface ActionStateMachineBinding {\n\tentityType: string;\n\ttargetState: string | ((params: unknown) => string);\n\tgetEntityId: (params: unknown) => string | undefined;\n}\n\nexport interface ActionDefinition<TDb = unknown> extends SurfaceDeclaration {\n\tactionId: ActionId;\n\tnamespace: string;\n\tversion: number;\n\tschema: SchemaValidator;\n\t/**\n\t * Optional check a host runs on every submission before it records\n\t * anything durable for it (invocation, idempotency key, events, errors).\n\t * Use it when parameters must be validated against trusted context, for\n\t * example a secret reference the tenant's secret store must hold, before\n\t * they may be persisted. `@fabricorg/platform-host` runs it from the\n\t * release that introduced it; an older host ignores it, so a handler that\n\t * relies on it should require `ActionContext.admittedAt`.\n\t */\n\tadmitSubmission?: ActionAdmission;\n\t/** Optional validation contract for the public handler result data. */\n\tresultSchema?: SchemaValidator;\n\thandler?: ActionHandler<TDb>;\n\trequiredRoles?: string[];\n\trequiredPermissions?: string[];\n\tpolicies?: `${string}.v${number}`[];\n\temitsEvents: string[];\n\tidempotent: boolean;\n\tmutatesDomain: boolean;\n\t/** Portable execution semantics used by hosts, gateways, and generated capability contracts. */\n\texecution?: ActionExecutionContract;\n\tstateMachine?: ActionStateMachineBinding;\n\tadapterSteps?: AdapterStep[];\n\t/** Completion actions can attest only after all external adapter work succeeds. */\n\teventPhase?: \"before_adapters\" | \"after_adapters\";\n\t/**\n\t * If \"saga\", the action is a multi-step orchestration. The worker dispatches\n\t * to a registered saga implementation instead of running `handler` directly.\n\t */\n\tkind?: \"atomic\" | \"saga\";\n}\n\nexport type ActionConnectivity = \"online-required\" | \"offline-capturable\";\nexport type AuthorityMoment = \"capture\" | \"execution\" | \"both\";\nexport type ActionIdempotencyStance = \"required\" | \"supported\" | \"prohibited\";\nexport type ActionCompletionMode = \"immediate\" | \"accepted\" | \"long-running\";\nexport type ActionConsistency = \"authoritative-now\" | \"provisional-until-reconciled\";\nexport type ActionDataSensitivity = \"public\" | \"internal\" | \"confidential\" | \"restricted\";\n\nexport interface ActionExecutionContract {\n\tconnectivity: ActionConnectivity;\n\tauthorityMoment: AuthorityMoment;\n\tidempotency: ActionIdempotencyStance;\n\t/**\n\t * `immediate`: the invocation settles within the host's execution.\n\t * `accepted` and `long-running`: an adapter may hand the work to an\n\t * external system and the invocation stays running until that system\n\t * completes it by reference through the host's completion ingress.\n\t * Declare `completionDeadlineMs` on a `long-running` action so a callback\n\t * that never comes is noticed rather than waited on forever.\n\t */\n\tcompletion: ActionCompletionMode;\n\t/**\n\t * How long an accepted handoff may wait for its completion before the host\n\t * moves the invocation to reconciliation. Without it, nothing sweeps the\n\t * handoff. Refused on `immediate`, since nothing external completes it.\n\t */\n\tcompletionDeadlineMs?: number;\n\tconsistency: ActionConsistency;\n\tsensitivity?: ActionDataSensitivity;\n}\n\nexport interface SagaContext {\n\tactionInvocationId: string;\n\ttenantId: string;\n\tspaceId: string;\n\tparameters: unknown;\n\tsleep?: (delayMs: number) => Promise<void>;\n\tquery?: <T = unknown>(model: string, operation: string, args: unknown) => Promise<T>;\n\t/**\n\t * Wait for a named external signal carrying a payload of `T`, with a timeout.\n\t *\n\t * Resolves with the payload of the first signal received, or `null` if the timeout\n\t * fires first. Subsequent signals with the same name received before another\n\t * `awaitSignal` call are buffered (FIFO) so no signal is lost.\n\t *\n\t * Intended for agent-driven and webhook-driven coordination: replace polling loops\n\t * with push-based wakeups while preserving the saga's deterministic replay\n\t * semantics (the runtime is responsible for capturing signals into workflow history).\n\t *\n\t * Optional. Runtimes that cannot implement push-based signaling (e.g. an in-memory\n\t * test harness) may omit this; sagas should treat absence as a fallback condition\n\t * and use `sleep` + `query` polling instead.\n\t *\n\t * Signal *senders* are runtime-specific (e.g. a Temporal `WorkflowClient.signal()`\n\t * call from an action handler). Apps that need to send signals from action\n\t * handlers should expose a coordination service via `ActionContext.services`\n\t * — the platform does not prescribe the sender API.\n\t *\n\t * @example\n\t * const payload = await ctx.awaitSignal?.<{ result: Record<string, unknown> }>(\n\t * \"userInputProcessed\",\n\t * 5 * 60 * 1000,\n\t * );\n\t * if (payload) { /* handle pushed result *\\/ }\n\t * else { /* timeout — fall back to deterministic path *\\/ }\n\t */\n\tawaitSignal?: <T = unknown>(signalName: string, timeoutMs: number) => Promise<T | null>;\n}\n\nexport interface SagaChildActionInput {\n\tsuffix: string;\n\tactionId: string;\n\tparameters: Record<string, unknown>;\n}\n\nexport type SagaRunChild = (input: SagaChildActionInput) => Promise<Record<string, unknown>>;\n\nexport interface SagaCompletionEvent {\n\teventType: string;\n\tsubjectType: string;\n\tsubjectId: string;\n\tpayload: unknown;\n\teventSchemaVersion?: number;\n}\n\nexport interface SagaCompletion {\n\tresultData: Record<string, unknown>;\n\tevent?: SagaCompletionEvent;\n}\n\nexport type SagaImplementation = (\n\tctx: SagaContext,\n\trunChild: SagaRunChild,\n) => Promise<SagaCompletion>;\n\nexport function assertActionId(actionId: string): asserts actionId is ActionId {\n\tif (!/^[a-z][a-z0-9-]*\\.[a-z][a-z0-9_]*$/.test(actionId)) {\n\t\tthrow new Error(`Invalid action ID: ${actionId}`);\n\t}\n}\n\nexport interface ActionRegistry<TDb = unknown> {\n\tregister(definition: ActionDefinition<TDb>): void;\n\tregisterIfMissing(definition: ActionDefinition<TDb>): void;\n\tresolve(actionId: ActionId): ActionDefinition<TDb> | undefined;\n\thas(actionId: string): actionId is ActionId;\n\tids(): ActionId[];\n}\n\nexport function createActionRegistry<TDb = unknown>(definitions: readonly ActionDefinition<TDb>[] = []): ActionRegistry<TDb> {\n\tconst actions = new Map<ActionId, ActionDefinition<TDb>>();\n\tconst register = (definition: ActionDefinition<TDb>): void => {\n\t\tassertActionId(definition.actionId);\n\t\tif (actions.has(definition.actionId)) throw new Error(`Action \"${definition.actionId}\" is already registered`);\n\t\tif (definition.mutatesDomain && definition.emitsEvents.length === 0) {\n\t\t\tthrow new Error(`Action \"${definition.actionId}\" mutates domain but emits no events. Every mutating action must emit at least one AssetEvent.`);\n\t\t}\n\t\tif (definition.admitSubmission !== undefined && typeof definition.admitSubmission !== \"function\") {\n\t\t\tthrow new Error(`Action \"${definition.actionId}\" declares admitSubmission that is not a function.`);\n\t\t}\n\t\tactions.set(definition.actionId, definition);\n\t};\n\tfor (const definition of definitions) register(definition);\n\treturn {\n\t\tregister,\n\t\tregisterIfMissing(definition) {\n\t\t\tif (!actions.has(definition.actionId)) register(definition);\n\t\t},\n\t\tresolve: (actionId) => actions.get(actionId),\n\t\thas: (actionId): actionId is ActionId => actions.has(actionId as ActionId),\n\t\tids: () => Array.from(actions.keys()),\n\t};\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkD4SWRBUH_cjs = require('../chunk-D4SWRBUH.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "assertSurfaceDeclaration", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkD4SWRBUH_cjs.assertSurfaceDeclaration; }
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=index.cjs.map
|
|
12
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Portable discovery metadata. It never grants or denies runtime invocation authority. */
|
|
2
|
+
interface SurfaceDeclaration {
|
|
3
|
+
/** Omitted is public discovery; internal contracts are withheld from external catalogs. */
|
|
4
|
+
surface?: "public" | "internal";
|
|
5
|
+
/** Required, non-blank explanation when surface is internal; never include sensitive data. */
|
|
6
|
+
surfaceReason?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function assertSurfaceDeclaration(value: unknown, label?: string): asserts value is SurfaceDeclaration;
|
|
9
|
+
|
|
10
|
+
export { type SurfaceDeclaration, assertSurfaceDeclaration };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Portable discovery metadata. It never grants or denies runtime invocation authority. */
|
|
2
|
+
interface SurfaceDeclaration {
|
|
3
|
+
/** Omitted is public discovery; internal contracts are withheld from external catalogs. */
|
|
4
|
+
surface?: "public" | "internal";
|
|
5
|
+
/** Required, non-blank explanation when surface is internal; never include sensitive data. */
|
|
6
|
+
surfaceReason?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function assertSurfaceDeclaration(value: unknown, label?: string): asserts value is SurfaceDeclaration;
|
|
9
|
+
|
|
10
|
+
export { type SurfaceDeclaration, assertSurfaceDeclaration };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ActorType } from '../actions/index.cjs';
|
|
2
2
|
import { EvidencePacketReference } from '../evidence/index.cjs';
|
|
3
|
+
import '../discovery/index.cjs';
|
|
3
4
|
|
|
4
5
|
/** Language-neutral governance contract version shared by TypeScript and .NET. */
|
|
5
6
|
declare const FABRIC_GOVERNANCE_CONTRACT_VERSION: 1;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ActorType } from '../actions/index.js';
|
|
2
2
|
import { EvidencePacketReference } from '../evidence/index.js';
|
|
3
|
+
import '../discovery/index.js';
|
|
3
4
|
|
|
4
5
|
/** Language-neutral governance contract version shared by TypeScript and .NET. */
|
|
5
6
|
declare const FABRIC_GOVERNANCE_CONTRACT_VERSION: 1;
|
package/dist/index.cjs
CHANGED
|
@@ -1,24 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkWI7CWNYI_cjs = require('./chunk-WI7CWNYI.cjs');
|
|
3
4
|
var chunkUSDLP4E7_cjs = require('./chunk-USDLP4E7.cjs');
|
|
5
|
+
var chunkTBS2S5AX_cjs = require('./chunk-TBS2S5AX.cjs');
|
|
4
6
|
var chunkLZSE6QGQ_cjs = require('./chunk-LZSE6QGQ.cjs');
|
|
5
|
-
var
|
|
7
|
+
var chunk45OKKLNY_cjs = require('./chunk-45OKKLNY.cjs');
|
|
6
8
|
var chunkX3GHYMAJ_cjs = require('./chunk-X3GHYMAJ.cjs');
|
|
7
|
-
var
|
|
8
|
-
var chunkMSABJAED_cjs = require('./chunk-MSABJAED.cjs');
|
|
9
|
+
var chunkXCAOO6KG_cjs = require('./chunk-XCAOO6KG.cjs');
|
|
9
10
|
var chunkXZQZQ5SW_cjs = require('./chunk-XZQZQ5SW.cjs');
|
|
10
11
|
var chunkF3E5SXPN_cjs = require('./chunk-F3E5SXPN.cjs');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var chunkMCWSUGB3_cjs = require('./chunk-MCWSUGB3.cjs');
|
|
13
|
+
var chunkWQ3BYI7T_cjs = require('./chunk-WQ3BYI7T.cjs');
|
|
14
|
+
var chunkDBTAUI6C_cjs = require('./chunk-DBTAUI6C.cjs');
|
|
14
15
|
var chunkIFW43ELT_cjs = require('./chunk-IFW43ELT.cjs');
|
|
15
|
-
var
|
|
16
|
+
var chunkSNTV45LH_cjs = require('./chunk-SNTV45LH.cjs');
|
|
17
|
+
var chunkD4SWRBUH_cjs = require('./chunk-D4SWRBUH.cjs');
|
|
16
18
|
var chunk2AE6TMAX_cjs = require('./chunk-2AE6TMAX.cjs');
|
|
17
19
|
require('./chunk-PG5LYTUX.cjs');
|
|
18
|
-
var chunkTBS2S5AX_cjs = require('./chunk-TBS2S5AX.cjs');
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
|
|
23
|
+
Object.defineProperty(exports, "createStateMachineRegistry", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkWI7CWNYI_cjs.createStateMachineRegistry; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "evaluateStateMachineTransition", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkWI7CWNYI_cjs.evaluateStateMachineTransition; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "validateStateMachineTransition", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkWI7CWNYI_cjs.validateStateMachineTransition; }
|
|
34
|
+
});
|
|
22
35
|
Object.defineProperty(exports, "createDeterministicIdFactory", {
|
|
23
36
|
enumerable: true,
|
|
24
37
|
get: function () { return chunkUSDLP4E7_cjs.createDeterministicIdFactory; }
|
|
@@ -31,6 +44,18 @@ Object.defineProperty(exports, "createInMemoryAdapterRegistry", {
|
|
|
31
44
|
enumerable: true,
|
|
32
45
|
get: function () { return chunkUSDLP4E7_cjs.createInMemoryAdapterRegistry; }
|
|
33
46
|
});
|
|
47
|
+
Object.defineProperty(exports, "FABRIC_GOVERNANCE_CONTRACT_VERSION", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () { return chunkTBS2S5AX_cjs.FABRIC_GOVERNANCE_CONTRACT_VERSION; }
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "assertGovernanceRuntimeEvidence", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () { return chunkTBS2S5AX_cjs.assertGovernanceRuntimeEvidence; }
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "assertMutationGovernanceContext", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () { return chunkTBS2S5AX_cjs.assertMutationGovernanceContext; }
|
|
58
|
+
});
|
|
34
59
|
Object.defineProperty(exports, "FABRIC_ID_PREFIXES", {
|
|
35
60
|
enumerable: true,
|
|
36
61
|
get: function () { return chunkLZSE6QGQ_cjs.FABRIC_ID_PREFIXES; }
|
|
@@ -49,35 +74,35 @@ Object.defineProperty(exports, "parseFabricId", {
|
|
|
49
74
|
});
|
|
50
75
|
Object.defineProperty(exports, "aggregatePolicyOutcomes", {
|
|
51
76
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunk45OKKLNY_cjs.aggregatePolicyOutcomes; }
|
|
53
78
|
});
|
|
54
79
|
Object.defineProperty(exports, "assertPolicyId", {
|
|
55
80
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunk45OKKLNY_cjs.assertPolicyId; }
|
|
57
82
|
});
|
|
58
83
|
Object.defineProperty(exports, "createPolicyRegistry", {
|
|
59
84
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunk45OKKLNY_cjs.createPolicyRegistry; }
|
|
61
86
|
});
|
|
62
87
|
Object.defineProperty(exports, "evaluatePolicyDefinition", {
|
|
63
88
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunk45OKKLNY_cjs.evaluatePolicyDefinition; }
|
|
65
90
|
});
|
|
66
91
|
Object.defineProperty(exports, "evaluatePolicyDefinitions", {
|
|
67
92
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunk45OKKLNY_cjs.evaluatePolicyDefinitions; }
|
|
69
94
|
});
|
|
70
95
|
Object.defineProperty(exports, "evaluateRegisteredPolicies", {
|
|
71
96
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunk45OKKLNY_cjs.evaluateRegisteredPolicies; }
|
|
73
98
|
});
|
|
74
99
|
Object.defineProperty(exports, "validateDataPolicyDefinition", {
|
|
75
100
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunk45OKKLNY_cjs.validateDataPolicyDefinition; }
|
|
77
102
|
});
|
|
78
103
|
Object.defineProperty(exports, "validatePolicyGuidance", {
|
|
79
104
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunk45OKKLNY_cjs.validatePolicyGuidance; }
|
|
81
106
|
});
|
|
82
107
|
Object.defineProperty(exports, "ANONYMIZATION_POLICY_VERSION", {
|
|
83
108
|
enumerable: true,
|
|
@@ -115,37 +140,25 @@ Object.defineProperty(exports, "stableChecksum", {
|
|
|
115
140
|
enumerable: true,
|
|
116
141
|
get: function () { return chunkX3GHYMAJ_cjs.stableChecksum; }
|
|
117
142
|
});
|
|
118
|
-
Object.defineProperty(exports, "createStateMachineRegistry", {
|
|
119
|
-
enumerable: true,
|
|
120
|
-
get: function () { return chunkWI7CWNYI_cjs.createStateMachineRegistry; }
|
|
121
|
-
});
|
|
122
|
-
Object.defineProperty(exports, "evaluateStateMachineTransition", {
|
|
123
|
-
enumerable: true,
|
|
124
|
-
get: function () { return chunkWI7CWNYI_cjs.evaluateStateMachineTransition; }
|
|
125
|
-
});
|
|
126
|
-
Object.defineProperty(exports, "validateStateMachineTransition", {
|
|
127
|
-
enumerable: true,
|
|
128
|
-
get: function () { return chunkWI7CWNYI_cjs.validateStateMachineTransition; }
|
|
129
|
-
});
|
|
130
143
|
Object.defineProperty(exports, "ACTOR_TYPES", {
|
|
131
144
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunkXCAOO6KG_cjs.ACTOR_TYPES; }
|
|
133
146
|
});
|
|
134
147
|
Object.defineProperty(exports, "assertActionId", {
|
|
135
148
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
149
|
+
get: function () { return chunkXCAOO6KG_cjs.assertActionId; }
|
|
137
150
|
});
|
|
138
151
|
Object.defineProperty(exports, "assertActorType", {
|
|
139
152
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunkXCAOO6KG_cjs.assertActorType; }
|
|
141
154
|
});
|
|
142
155
|
Object.defineProperty(exports, "createActionRegistry", {
|
|
143
156
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkXCAOO6KG_cjs.createActionRegistry; }
|
|
145
158
|
});
|
|
146
159
|
Object.defineProperty(exports, "isActorType", {
|
|
147
160
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunkXCAOO6KG_cjs.isActorType; }
|
|
149
162
|
});
|
|
150
163
|
Object.defineProperty(exports, "AdapterRegistry", {
|
|
151
164
|
enumerable: true,
|
|
@@ -185,71 +198,71 @@ Object.defineProperty(exports, "AgentActionPolicyRegistry", {
|
|
|
185
198
|
});
|
|
186
199
|
Object.defineProperty(exports, "STRICT_EXECUTION_CONTRACT_PROFILE", {
|
|
187
200
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
201
|
+
get: function () { return chunkMCWSUGB3_cjs.STRICT_EXECUTION_CONTRACT_PROFILE; }
|
|
189
202
|
});
|
|
190
203
|
Object.defineProperty(exports, "STRICT_EXECUTION_CONTRACT_PROFILE_ID", {
|
|
191
204
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
205
|
+
get: function () { return chunkMCWSUGB3_cjs.STRICT_EXECUTION_CONTRACT_PROFILE_ID; }
|
|
193
206
|
});
|
|
194
207
|
Object.defineProperty(exports, "executionContractProfile", {
|
|
195
208
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
209
|
+
get: function () { return chunkMCWSUGB3_cjs.executionContractProfile; }
|
|
197
210
|
});
|
|
198
211
|
Object.defineProperty(exports, "MODULE_MANIFEST_VERSION", {
|
|
199
212
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
213
|
+
get: function () { return chunkWQ3BYI7T_cjs.MODULE_MANIFEST_VERSION; }
|
|
201
214
|
});
|
|
202
215
|
Object.defineProperty(exports, "exportModuleManifest", {
|
|
203
216
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
217
|
+
get: function () { return chunkWQ3BYI7T_cjs.exportModuleManifest; }
|
|
205
218
|
});
|
|
206
219
|
Object.defineProperty(exports, "exportModuleManifestBundle", {
|
|
207
220
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
221
|
+
get: function () { return chunkWQ3BYI7T_cjs.exportModuleManifestBundle; }
|
|
209
222
|
});
|
|
210
223
|
Object.defineProperty(exports, "isJsonSchemaExportableValidator", {
|
|
211
224
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
225
|
+
get: function () { return chunkWQ3BYI7T_cjs.isJsonSchemaExportableValidator; }
|
|
213
226
|
});
|
|
214
227
|
Object.defineProperty(exports, "normalizeModuleManifest", {
|
|
215
228
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
229
|
+
get: function () { return chunkWQ3BYI7T_cjs.normalizeModuleManifest; }
|
|
217
230
|
});
|
|
218
231
|
Object.defineProperty(exports, "normalizeModuleManifestBundle", {
|
|
219
232
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
233
|
+
get: function () { return chunkWQ3BYI7T_cjs.normalizeModuleManifestBundle; }
|
|
221
234
|
});
|
|
222
235
|
Object.defineProperty(exports, "createModuleRegistry", {
|
|
223
236
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
237
|
+
get: function () { return chunkDBTAUI6C_cjs.createModuleRegistry; }
|
|
225
238
|
});
|
|
226
239
|
Object.defineProperty(exports, "getEventTypeName", {
|
|
227
240
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
241
|
+
get: function () { return chunkDBTAUI6C_cjs.getEventTypeName; }
|
|
229
242
|
});
|
|
230
243
|
Object.defineProperty(exports, "getModuleDependencyNamespace", {
|
|
231
244
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
245
|
+
get: function () { return chunkDBTAUI6C_cjs.getModuleDependencyNamespace; }
|
|
233
246
|
});
|
|
234
247
|
Object.defineProperty(exports, "getObjectTypeName", {
|
|
235
248
|
enumerable: true,
|
|
236
|
-
get: function () { return
|
|
249
|
+
get: function () { return chunkDBTAUI6C_cjs.getObjectTypeName; }
|
|
237
250
|
});
|
|
238
251
|
Object.defineProperty(exports, "registerFabricModule", {
|
|
239
252
|
enumerable: true,
|
|
240
|
-
get: function () { return
|
|
253
|
+
get: function () { return chunkDBTAUI6C_cjs.registerFabricModule; }
|
|
241
254
|
});
|
|
242
255
|
Object.defineProperty(exports, "registerFabricModules", {
|
|
243
256
|
enumerable: true,
|
|
244
|
-
get: function () { return
|
|
257
|
+
get: function () { return chunkDBTAUI6C_cjs.registerFabricModules; }
|
|
245
258
|
});
|
|
246
259
|
Object.defineProperty(exports, "validateAndOrderFabricModules", {
|
|
247
260
|
enumerable: true,
|
|
248
|
-
get: function () { return
|
|
261
|
+
get: function () { return chunkDBTAUI6C_cjs.validateAndOrderFabricModules; }
|
|
249
262
|
});
|
|
250
263
|
Object.defineProperty(exports, "validateModuleNamespace", {
|
|
251
264
|
enumerable: true,
|
|
252
|
-
get: function () { return
|
|
265
|
+
get: function () { return chunkDBTAUI6C_cjs.validateModuleNamespace; }
|
|
253
266
|
});
|
|
254
267
|
Object.defineProperty(exports, "assertObjectType", {
|
|
255
268
|
enumerable: true,
|
|
@@ -269,35 +282,27 @@ Object.defineProperty(exports, "validatePortableJson", {
|
|
|
269
282
|
});
|
|
270
283
|
Object.defineProperty(exports, "createViewRegistry", {
|
|
271
284
|
enumerable: true,
|
|
272
|
-
get: function () { return
|
|
285
|
+
get: function () { return chunkSNTV45LH_cjs.createViewRegistry; }
|
|
273
286
|
});
|
|
274
287
|
Object.defineProperty(exports, "replayEvents", {
|
|
275
288
|
enumerable: true,
|
|
276
|
-
get: function () { return
|
|
289
|
+
get: function () { return chunkSNTV45LH_cjs.replayEvents; }
|
|
277
290
|
});
|
|
278
291
|
Object.defineProperty(exports, "replayView", {
|
|
279
292
|
enumerable: true,
|
|
280
|
-
get: function () { return
|
|
293
|
+
get: function () { return chunkSNTV45LH_cjs.replayView; }
|
|
281
294
|
});
|
|
282
295
|
Object.defineProperty(exports, "viewContractKey", {
|
|
283
296
|
enumerable: true,
|
|
284
|
-
get: function () { return
|
|
297
|
+
get: function () { return chunkSNTV45LH_cjs.viewContractKey; }
|
|
285
298
|
});
|
|
286
|
-
Object.defineProperty(exports, "
|
|
299
|
+
Object.defineProperty(exports, "assertSurfaceDeclaration", {
|
|
287
300
|
enumerable: true,
|
|
288
|
-
get: function () { return
|
|
301
|
+
get: function () { return chunkD4SWRBUH_cjs.assertSurfaceDeclaration; }
|
|
289
302
|
});
|
|
290
|
-
Object.defineProperty(exports, "
|
|
291
|
-
enumerable: true,
|
|
292
|
-
get: function () { return chunkTBS2S5AX_cjs.FABRIC_GOVERNANCE_CONTRACT_VERSION; }
|
|
293
|
-
});
|
|
294
|
-
Object.defineProperty(exports, "assertGovernanceRuntimeEvidence", {
|
|
295
|
-
enumerable: true,
|
|
296
|
-
get: function () { return chunkTBS2S5AX_cjs.assertGovernanceRuntimeEvidence; }
|
|
297
|
-
});
|
|
298
|
-
Object.defineProperty(exports, "assertMutationGovernanceContext", {
|
|
303
|
+
Object.defineProperty(exports, "createEventContractRegistry", {
|
|
299
304
|
enumerable: true,
|
|
300
|
-
get: function () { return
|
|
305
|
+
get: function () { return chunk2AE6TMAX_cjs.createEventContractRegistry; }
|
|
301
306
|
});
|
|
302
307
|
//# sourceMappingURL=index.cjs.map
|
|
303
308
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { ACTOR_TYPES, ActionCompletionMode, ActionConnectivity, ActionConsistency, ActionContext, ActionDataSensitivity, ActionDefinition, ActionExecutionContract, ActionHandler, ActionId, ActionIdempotencyStance, ActionRegistry, ActionResult, ActionStateMachineBinding, ActionStatus, ActorType, AdapterStep, AdapterStepRetryPolicy, AuthorityMoment, FabricRuntimeServices, SagaChildActionInput, SagaCompletion, SagaCompletionEvent, SagaContext, SagaImplementation, SagaRunChild, SchemaParseIssue, SchemaParseResult, SchemaValidator, assertActionId, assertActorType, createActionRegistry, isActorType } from './actions/index.cjs';
|
|
1
|
+
export { ACTOR_TYPES, ActionAdmission, ActionAdmissionDecision, ActionAdmissionInput, ActionAdmissionSignal, ActionCompletionMode, ActionConnectivity, ActionConsistency, ActionContext, ActionDataSensitivity, ActionDefinition, ActionExecutionContract, ActionHandler, ActionId, ActionIdempotencyStance, ActionRegistry, ActionResult, ActionStateMachineBinding, ActionStatus, ActorType, AdapterStep, AdapterStepRetryPolicy, AuthorityMoment, FabricRuntimeServices, SagaChildActionInput, SagaCompletion, SagaCompletionEvent, SagaContext, SagaImplementation, SagaRunChild, SchemaParseIssue, SchemaParseResult, SchemaValidator, assertActionId, assertActorType, createActionRegistry, isActorType } from './actions/index.cjs';
|
|
2
2
|
export { AcceptedExternalOperation, AdapterAttempt, AdapterCircuitBreakerConfig, AdapterExecutionContext, AdapterExecutionResult, AdapterExecutor, AdapterImplementation, AdapterOutcomeEvidence, AdapterOutcomeKind, AdapterRegistry, AdapterRetryPolicy, ExecuteWithRetryOptions, MissingAdapterRegistrationError, ResolvedAdapterRetryPolicy, assertAdapterOutcomeConsistency, classifyAdapterOutcome, executeWithAdapterRetry, getRetryDelayMs, resolveAdapterRetryPolicy, shouldRetryAdapterOutcome } from './adapters/index.cjs';
|
|
3
3
|
export { AssetEventActorType, AssetEventEnvelope, AssetEventSubjectType, AssetEventType, EventContractRegistry, EventProvenance, createEventContractRegistry } from './events/index.cjs';
|
|
4
4
|
export { FABRIC_ID_PREFIXES, FabricIdPrefix, createFabricId, isFabricId, parseFabricId } from './ids/index.cjs';
|
|
5
5
|
export { JsonSchemaExportableValidator, MODULE_MANIFEST_VERSION, ModuleManifest, ModuleManifestAction, ModuleManifestActionStateMachine, ModuleManifestActionV1, ModuleManifestAdapterStep, ModuleManifestBundle, ModuleManifestBundleV1, ModuleManifestCodePolicy, ModuleManifestDataPolicy, ModuleManifestEventType, ModuleManifestIdPrefix, ModuleManifestObjectType, ModuleManifestObjectTypeV1, ModuleManifestPolicy, ModuleManifestStateMachine, ModuleManifestStateMachineTransition, ModuleManifestV1, ModuleManifestView, exportModuleManifest, exportModuleManifestBundle, isJsonSchemaExportableValidator, normalizeModuleManifest, normalizeModuleManifestBundle } from './manifest/index.cjs';
|
|
6
6
|
export { CapabilityMetadata, CapabilityPortRequirement, CapabilityRequirements, CapabilityWorkflowCompensation, CapabilityWorkflowDeclaration, CapabilityWorkflowTimer, DeclarativeInvariant, EventTypeRegistration, EventTypeRegistrationInput, FabricModule, IdPrefixRegistration, InvariantEnforcement, ModuleDependency, ModuleDependencyInput, ModuleRegistry, ObjectRelationCardinality, ObjectRelationDefinition, ObjectRelationDeleteBehavior, ObjectRelationSemantics, ObjectTypeRegistration, ObjectTypeRegistrationInput, PolicyRegistration, StateMachineRegistration, createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateAndOrderFabricModules, validateModuleNamespace } from './modules/index.cjs';
|
|
7
7
|
export { FabricObjectType, JsonPrimitive, JsonSchemaValidationIssue, JsonValue, ObjectTypeRegistry, PortableJsonSchema, assertObjectType, assertPortableJsonSchema, createObjectTypeRegistry, validatePortableJson } from './objects/index.cjs';
|
|
8
|
-
export { DataPolicyComparisonOperator, DataPolicyCondition, DataPolicyConditionResult, DataPolicyDefinition, DataPolicyLiteral, DataPolicySource, DataPolicySourceReference, DataPolicyValidationResult, PolicyContext, PolicyCorrectiveAction, PolicyCorrectiveActionBase, PolicyCorrectiveActionKind, PolicyDispatchEvidence, PolicyEvaluationMode, PolicyEvaluationResult, PolicyEvaluator, PolicyFact, PolicyFallbackDefinition, PolicyFallbackTrigger, PolicyGuidance, PolicyGuidanceValidationResult, PolicyId, PolicyInvokeActionCorrectiveAction, PolicyKind, PolicyManualCorrectiveAction, PolicyNavigateCorrectiveAction, PolicyOutcome, PolicyRegistry, RuntimePolicyDefinition, aggregatePolicyOutcomes, assertPolicyId, createPolicyRegistry, evaluatePolicyDefinition, evaluatePolicyDefinitions, evaluateRegisteredPolicies, validateDataPolicyDefinition, validatePolicyGuidance } from './policies/index.cjs';
|
|
8
|
+
export { DataPolicyComparisonOperator, DataPolicyCondition, DataPolicyConditionResult, DataPolicyDefinition, DataPolicyLiteral, DataPolicySource, DataPolicySourceReference, DataPolicyValidationResult, PolicyAuthorityReference, PolicyContext, PolicyCorrectiveAction, PolicyCorrectiveActionBase, PolicyCorrectiveActionKind, PolicyDispatchEvidence, PolicyEvaluationMode, PolicyEvaluationResult, PolicyEvaluator, PolicyFact, PolicyFallbackDefinition, PolicyFallbackTrigger, PolicyGuidance, PolicyGuidanceValidationResult, PolicyId, PolicyInvokeActionCorrectiveAction, PolicyKind, PolicyManualCorrectiveAction, PolicyNavigateCorrectiveAction, PolicyOutcome, PolicyRegistry, RuntimePolicyDefinition, aggregatePolicyOutcomes, assertPolicyId, createPolicyRegistry, evaluatePolicyDefinition, evaluatePolicyDefinitions, evaluateRegisteredPolicies, validateDataPolicyDefinition, validatePolicyGuidance } from './policies/index.cjs';
|
|
9
9
|
export { StateClass, StateDefinition, StateMachineDatabaseClient, StateMachineDefinition, StateMachineRegistry, TransitionContext, createStateMachineRegistry, evaluateStateMachineTransition, validateStateMachineTransition } from './state-machines/index.cjs';
|
|
10
10
|
export { ReplayEventsOptions, ReplayEventsResult, ReplayScope, ReplaySnapshot, ReplayViewOptions, ReplayWarning, ReplayWarningCode, ReplayableAssetEvent, ViewContract, ViewEventConsumption, ViewRegistry, ViewUsageMetadata, createViewRegistry, replayEvents, replayView, viewContractKey } from './projections/index.cjs';
|
|
11
11
|
export { ANONYMIZATION_POLICY_VERSION, AnalyticsDataContract, AnalyticsDataContractSource, AnalyticsEligibilityDecision, AnonymizationContext, AnonymizationEngine, AnonymizationFieldMetadata, AnonymizationFieldPolicy, AnonymizationLifecycleEvidence, AnonymizationMetadata, AnonymizationPolicy, AnonymizationResult, AssetEventLike, DataClassificationRule, EvidencePacketLike, FieldRedactor, PLATFORM_PRIVACY_POLICY_VERSION, PlatformDataClass, RedactionMethod, RedactionRule, RetentionRule, anonymizeAssetEventPayload, anonymizeEvidencePacket, anonymizeJsonValue, buildAnonymizationLifecycleEvidence, stableChecksum } from './privacy/index.cjs';
|
|
@@ -14,3 +14,4 @@ export { ExecutionAttestation, ExecutionPrincipal, ExternalReconciliation, Exter
|
|
|
14
14
|
export { AgentActionPolicyContext, AgentActionPolicyDecision, AgentActionPolicyDefinition, AgentActionPolicyEvaluator, AgentActionPolicyRegistry, AgentActionRiskTier, AgentActionRoute } from './agent-hitl/index.cjs';
|
|
15
15
|
export { FakeActionContextOptions, createDeterministicIdFactory, createFakeActionContext, createInMemoryAdapterRegistry } from './testing/index.cjs';
|
|
16
16
|
export { ExecutionContractFinding, ExecutionContractFindingCode, ExecutionContractProfile, ExecutionContractProfileOptions, STRICT_EXECUTION_CONTRACT_PROFILE, STRICT_EXECUTION_CONTRACT_PROFILE_ID, executionContractProfile } from './certification/index.cjs';
|
|
17
|
+
export { SurfaceDeclaration, assertSurfaceDeclaration } from './discovery/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { ACTOR_TYPES, ActionCompletionMode, ActionConnectivity, ActionConsistency, ActionContext, ActionDataSensitivity, ActionDefinition, ActionExecutionContract, ActionHandler, ActionId, ActionIdempotencyStance, ActionRegistry, ActionResult, ActionStateMachineBinding, ActionStatus, ActorType, AdapterStep, AdapterStepRetryPolicy, AuthorityMoment, FabricRuntimeServices, SagaChildActionInput, SagaCompletion, SagaCompletionEvent, SagaContext, SagaImplementation, SagaRunChild, SchemaParseIssue, SchemaParseResult, SchemaValidator, assertActionId, assertActorType, createActionRegistry, isActorType } from './actions/index.js';
|
|
1
|
+
export { ACTOR_TYPES, ActionAdmission, ActionAdmissionDecision, ActionAdmissionInput, ActionAdmissionSignal, ActionCompletionMode, ActionConnectivity, ActionConsistency, ActionContext, ActionDataSensitivity, ActionDefinition, ActionExecutionContract, ActionHandler, ActionId, ActionIdempotencyStance, ActionRegistry, ActionResult, ActionStateMachineBinding, ActionStatus, ActorType, AdapterStep, AdapterStepRetryPolicy, AuthorityMoment, FabricRuntimeServices, SagaChildActionInput, SagaCompletion, SagaCompletionEvent, SagaContext, SagaImplementation, SagaRunChild, SchemaParseIssue, SchemaParseResult, SchemaValidator, assertActionId, assertActorType, createActionRegistry, isActorType } from './actions/index.js';
|
|
2
2
|
export { AcceptedExternalOperation, AdapterAttempt, AdapterCircuitBreakerConfig, AdapterExecutionContext, AdapterExecutionResult, AdapterExecutor, AdapterImplementation, AdapterOutcomeEvidence, AdapterOutcomeKind, AdapterRegistry, AdapterRetryPolicy, ExecuteWithRetryOptions, MissingAdapterRegistrationError, ResolvedAdapterRetryPolicy, assertAdapterOutcomeConsistency, classifyAdapterOutcome, executeWithAdapterRetry, getRetryDelayMs, resolveAdapterRetryPolicy, shouldRetryAdapterOutcome } from './adapters/index.js';
|
|
3
3
|
export { AssetEventActorType, AssetEventEnvelope, AssetEventSubjectType, AssetEventType, EventContractRegistry, EventProvenance, createEventContractRegistry } from './events/index.js';
|
|
4
4
|
export { FABRIC_ID_PREFIXES, FabricIdPrefix, createFabricId, isFabricId, parseFabricId } from './ids/index.js';
|
|
5
5
|
export { JsonSchemaExportableValidator, MODULE_MANIFEST_VERSION, ModuleManifest, ModuleManifestAction, ModuleManifestActionStateMachine, ModuleManifestActionV1, ModuleManifestAdapterStep, ModuleManifestBundle, ModuleManifestBundleV1, ModuleManifestCodePolicy, ModuleManifestDataPolicy, ModuleManifestEventType, ModuleManifestIdPrefix, ModuleManifestObjectType, ModuleManifestObjectTypeV1, ModuleManifestPolicy, ModuleManifestStateMachine, ModuleManifestStateMachineTransition, ModuleManifestV1, ModuleManifestView, exportModuleManifest, exportModuleManifestBundle, isJsonSchemaExportableValidator, normalizeModuleManifest, normalizeModuleManifestBundle } from './manifest/index.js';
|
|
6
6
|
export { CapabilityMetadata, CapabilityPortRequirement, CapabilityRequirements, CapabilityWorkflowCompensation, CapabilityWorkflowDeclaration, CapabilityWorkflowTimer, DeclarativeInvariant, EventTypeRegistration, EventTypeRegistrationInput, FabricModule, IdPrefixRegistration, InvariantEnforcement, ModuleDependency, ModuleDependencyInput, ModuleRegistry, ObjectRelationCardinality, ObjectRelationDefinition, ObjectRelationDeleteBehavior, ObjectRelationSemantics, ObjectTypeRegistration, ObjectTypeRegistrationInput, PolicyRegistration, StateMachineRegistration, createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateAndOrderFabricModules, validateModuleNamespace } from './modules/index.js';
|
|
7
7
|
export { FabricObjectType, JsonPrimitive, JsonSchemaValidationIssue, JsonValue, ObjectTypeRegistry, PortableJsonSchema, assertObjectType, assertPortableJsonSchema, createObjectTypeRegistry, validatePortableJson } from './objects/index.js';
|
|
8
|
-
export { DataPolicyComparisonOperator, DataPolicyCondition, DataPolicyConditionResult, DataPolicyDefinition, DataPolicyLiteral, DataPolicySource, DataPolicySourceReference, DataPolicyValidationResult, PolicyContext, PolicyCorrectiveAction, PolicyCorrectiveActionBase, PolicyCorrectiveActionKind, PolicyDispatchEvidence, PolicyEvaluationMode, PolicyEvaluationResult, PolicyEvaluator, PolicyFact, PolicyFallbackDefinition, PolicyFallbackTrigger, PolicyGuidance, PolicyGuidanceValidationResult, PolicyId, PolicyInvokeActionCorrectiveAction, PolicyKind, PolicyManualCorrectiveAction, PolicyNavigateCorrectiveAction, PolicyOutcome, PolicyRegistry, RuntimePolicyDefinition, aggregatePolicyOutcomes, assertPolicyId, createPolicyRegistry, evaluatePolicyDefinition, evaluatePolicyDefinitions, evaluateRegisteredPolicies, validateDataPolicyDefinition, validatePolicyGuidance } from './policies/index.js';
|
|
8
|
+
export { DataPolicyComparisonOperator, DataPolicyCondition, DataPolicyConditionResult, DataPolicyDefinition, DataPolicyLiteral, DataPolicySource, DataPolicySourceReference, DataPolicyValidationResult, PolicyAuthorityReference, PolicyContext, PolicyCorrectiveAction, PolicyCorrectiveActionBase, PolicyCorrectiveActionKind, PolicyDispatchEvidence, PolicyEvaluationMode, PolicyEvaluationResult, PolicyEvaluator, PolicyFact, PolicyFallbackDefinition, PolicyFallbackTrigger, PolicyGuidance, PolicyGuidanceValidationResult, PolicyId, PolicyInvokeActionCorrectiveAction, PolicyKind, PolicyManualCorrectiveAction, PolicyNavigateCorrectiveAction, PolicyOutcome, PolicyRegistry, RuntimePolicyDefinition, aggregatePolicyOutcomes, assertPolicyId, createPolicyRegistry, evaluatePolicyDefinition, evaluatePolicyDefinitions, evaluateRegisteredPolicies, validateDataPolicyDefinition, validatePolicyGuidance } from './policies/index.js';
|
|
9
9
|
export { StateClass, StateDefinition, StateMachineDatabaseClient, StateMachineDefinition, StateMachineRegistry, TransitionContext, createStateMachineRegistry, evaluateStateMachineTransition, validateStateMachineTransition } from './state-machines/index.js';
|
|
10
10
|
export { ReplayEventsOptions, ReplayEventsResult, ReplayScope, ReplaySnapshot, ReplayViewOptions, ReplayWarning, ReplayWarningCode, ReplayableAssetEvent, ViewContract, ViewEventConsumption, ViewRegistry, ViewUsageMetadata, createViewRegistry, replayEvents, replayView, viewContractKey } from './projections/index.js';
|
|
11
11
|
export { ANONYMIZATION_POLICY_VERSION, AnalyticsDataContract, AnalyticsDataContractSource, AnalyticsEligibilityDecision, AnonymizationContext, AnonymizationEngine, AnonymizationFieldMetadata, AnonymizationFieldPolicy, AnonymizationLifecycleEvidence, AnonymizationMetadata, AnonymizationPolicy, AnonymizationResult, AssetEventLike, DataClassificationRule, EvidencePacketLike, FieldRedactor, PLATFORM_PRIVACY_POLICY_VERSION, PlatformDataClass, RedactionMethod, RedactionRule, RetentionRule, anonymizeAssetEventPayload, anonymizeEvidencePacket, anonymizeJsonValue, buildAnonymizationLifecycleEvidence, stableChecksum } from './privacy/index.js';
|
|
@@ -14,3 +14,4 @@ export { ExecutionAttestation, ExecutionPrincipal, ExternalReconciliation, Exter
|
|
|
14
14
|
export { AgentActionPolicyContext, AgentActionPolicyDecision, AgentActionPolicyDefinition, AgentActionPolicyEvaluator, AgentActionPolicyRegistry, AgentActionRiskTier, AgentActionRoute } from './agent-hitl/index.js';
|
|
15
15
|
export { FakeActionContextOptions, createDeterministicIdFactory, createFakeActionContext, createInMemoryAdapterRegistry } from './testing/index.js';
|
|
16
16
|
export { ExecutionContractFinding, ExecutionContractFindingCode, ExecutionContractProfile, ExecutionContractProfileOptions, STRICT_EXECUTION_CONTRACT_PROFILE, STRICT_EXECUTION_CONTRACT_PROFILE_ID, executionContractProfile } from './certification/index.js';
|
|
17
|
+
export { SurfaceDeclaration, assertSurfaceDeclaration } from './discovery/index.js';
|