@fabricorg/platform 0.11.1 → 0.12.1

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/actions/index.cjs +11 -11
  3. package/dist/actions/index.d.cts +22 -2
  4. package/dist/actions/index.d.ts +22 -2
  5. package/dist/actions/index.js +1 -1
  6. package/dist/{chunk-NFHS5NWD.js → chunk-35SDMFCR.js} +19 -5
  7. package/dist/chunk-35SDMFCR.js.map +1 -0
  8. package/dist/{chunk-4YQOGV7H.js → chunk-3O4GMCCE.js} +2 -2
  9. package/dist/chunk-3O4GMCCE.js.map +1 -0
  10. package/dist/{chunk-JM55UQWK.js → chunk-4RMKUYRX.js} +2 -2
  11. package/dist/chunk-4RMKUYRX.js.map +1 -0
  12. package/dist/{chunk-JAXDEK5Z.cjs → chunk-7RV5REPT.cjs} +2 -2
  13. package/dist/chunk-7RV5REPT.cjs.map +1 -0
  14. package/dist/{chunk-3WEHM2P3.cjs → chunk-7SHNYYGI.cjs} +53 -14
  15. package/dist/chunk-7SHNYYGI.cjs.map +1 -0
  16. package/dist/{chunk-FN6IYVBK.js → chunk-FSUYD4F4.js} +53 -14
  17. package/dist/chunk-FSUYD4F4.js.map +1 -0
  18. package/dist/{chunk-N3OUWEYA.js → chunk-HL77HWWP.js} +6 -3
  19. package/dist/chunk-HL77HWWP.js.map +1 -0
  20. package/dist/{chunk-HLRIXNVG.cjs → chunk-JOATYJXQ.cjs} +2 -2
  21. package/dist/chunk-JOATYJXQ.cjs.map +1 -0
  22. package/dist/{chunk-K27DUWRY.cjs → chunk-LAZL2GDT.cjs} +25 -11
  23. package/dist/chunk-LAZL2GDT.cjs.map +1 -0
  24. package/dist/{chunk-JIT3UR27.cjs → chunk-ZZGSS65W.cjs} +9 -6
  25. package/dist/chunk-ZZGSS65W.cjs.map +1 -0
  26. package/dist/events/index.cjs +8 -8
  27. package/dist/events/index.d.cts +6 -1
  28. package/dist/events/index.d.ts +6 -1
  29. package/dist/events/index.js +1 -1
  30. package/dist/index.cjs +42 -42
  31. package/dist/index.d.cts +4 -4
  32. package/dist/index.d.ts +4 -4
  33. package/dist/index.js +5 -5
  34. package/dist/manifest/index.cjs +11 -11
  35. package/dist/manifest/index.d.cts +5 -2
  36. package/dist/manifest/index.d.ts +5 -2
  37. package/dist/manifest/index.js +5 -5
  38. package/dist/modules/index.cjs +11 -11
  39. package/dist/modules/index.d.cts +23 -1
  40. package/dist/modules/index.d.ts +23 -1
  41. package/dist/modules/index.js +4 -4
  42. package/dist/projections/index.cjs +8 -8
  43. package/dist/projections/index.d.cts +28 -3
  44. package/dist/projections/index.d.ts +28 -3
  45. package/dist/projections/index.js +1 -1
  46. package/package.json +1 -1
  47. package/dist/chunk-3WEHM2P3.cjs.map +0 -1
  48. package/dist/chunk-4YQOGV7H.js.map +0 -1
  49. package/dist/chunk-FN6IYVBK.js.map +0 -1
  50. package/dist/chunk-HLRIXNVG.cjs.map +0 -1
  51. package/dist/chunk-JAXDEK5Z.cjs.map +0 -1
  52. package/dist/chunk-JIT3UR27.cjs.map +0 -1
  53. package/dist/chunk-JM55UQWK.js.map +0 -1
  54. package/dist/chunk-K27DUWRY.cjs.map +0 -1
  55. package/dist/chunk-N3OUWEYA.js.map +0 -1
  56. package/dist/chunk-NFHS5NWD.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkK27DUWRY_cjs = require('./chunk-K27DUWRY.cjs');
3
+ var chunkLAZL2GDT_cjs = require('./chunk-LAZL2GDT.cjs');
4
4
 
5
5
  // manifest/index.ts
6
6
  var MODULE_MANIFEST_VERSION = 2;
@@ -32,7 +32,7 @@ function isRecord(value) {
32
32
  return value !== null && typeof value === "object" && !Array.isArray(value);
33
33
  }
34
34
  function exportDependency(dependency) {
35
- const namespace = chunkK27DUWRY_cjs.getModuleDependencyNamespace(dependency);
35
+ const namespace = chunkLAZL2GDT_cjs.getModuleDependencyNamespace(dependency);
36
36
  if (typeof dependency === "string") {
37
37
  return { namespace };
38
38
  }
@@ -45,7 +45,7 @@ function exportObjectType(objectType) {
45
45
  if (typeof objectType === "string") {
46
46
  return { type: objectType };
47
47
  }
48
- const normalized = { type: chunkK27DUWRY_cjs.getObjectTypeName(objectType) };
48
+ const normalized = { type: chunkLAZL2GDT_cjs.getObjectTypeName(objectType) };
49
49
  if (objectType.displayName !== void 0) normalized.displayName = objectType.displayName;
50
50
  if (objectType.idPrefix !== void 0) normalized.idPrefix = objectType.idPrefix;
51
51
  if (objectType.schema !== void 0) normalized.schema = cloneJson(objectType.schema);
@@ -72,10 +72,11 @@ function exportEventType(eventType) {
72
72
  return { eventType, schemaVersion: 1 };
73
73
  }
74
74
  const normalized = {
75
- eventType: chunkK27DUWRY_cjs.getEventTypeName(eventType),
75
+ eventType: chunkLAZL2GDT_cjs.getEventTypeName(eventType),
76
76
  schemaVersion: eventType.schemaVersion
77
77
  };
78
78
  if (eventType.description !== void 0) normalized.description = eventType.description;
79
+ if (eventType.schema !== void 0) normalized.schema = cloneJson(eventType.schema);
79
80
  return normalized;
80
81
  }
81
82
  function exportAction(action) {
@@ -93,6 +94,7 @@ function exportAction(action) {
93
94
  manifest.requiredPermissions = [...action.requiredPermissions];
94
95
  }
95
96
  if (action.eventPhase !== void 0) manifest.eventPhase = action.eventPhase;
97
+ if (action.execution !== void 0) manifest.execution = cloneJson(action.execution);
96
98
  if (isJsonSchemaExportableValidator(action.schema)) {
97
99
  try {
98
100
  manifest.parameterSchema = action.schema.toJSONSchema();
@@ -190,6 +192,7 @@ function exportView(view) {
190
192
  snapshotVersion: view.snapshotVersion
191
193
  };
192
194
  if (view.compatibleSnapshotVersions) output.compatibleSnapshotVersions = [...view.compatibleSnapshotVersions];
195
+ if (view.usage) output.usage = cloneJson(view.usage);
193
196
  return output;
194
197
  }
195
198
  function exportModuleManifest(module) {
@@ -228,5 +231,5 @@ exports.exportModuleManifestBundle = exportModuleManifestBundle;
228
231
  exports.isJsonSchemaExportableValidator = isJsonSchemaExportableValidator;
229
232
  exports.normalizeModuleManifest = normalizeModuleManifest;
230
233
  exports.normalizeModuleManifestBundle = normalizeModuleManifestBundle;
231
- //# sourceMappingURL=chunk-JIT3UR27.cjs.map
232
- //# sourceMappingURL=chunk-JIT3UR27.cjs.map
234
+ //# sourceMappingURL=chunk-ZZGSS65W.cjs.map
235
+ //# sourceMappingURL=chunk-ZZGSS65W.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../manifest/index.ts"],"names":["getModuleDependencyNamespace","getObjectTypeName","getEventTypeName"],"mappings":";;;;;AA8BO,IAAM,uBAAA,GAA0B;AAiKhC,SAAS,wBACf,QAAA,EACiB;AACjB,EAAA,MAAM,UAAkB,QAAA,CAAS,eAAA;AACjC,EAAA,IAAI,OAAA,KAAY,CAAA,IAAK,OAAA,KAAY,uBAAA,EAAyB;AACzD,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,qCAAA,EAAwC,MAAA,CAAO,OAAO,CAAC,CAAA,CAAE,CAAA;AAAA,EAC1E;AACA,EAAA,OAAO;AAAA,IACN,GAAG,QAAA;AAAA,IACH,eAAA,EAAiB,uBAAA;AAAA,IACjB,KAAA,EAAO,OAAA,IAAW,QAAA,IAAY,KAAA,CAAM,OAAA,CAAQ,SAAS,KAAK,CAAA,GAAI,QAAA,CAAS,KAAA,GAAQ;AAAC,GACjF;AACD;AAEO,SAAS,8BACf,MAAA,EACuB;AACvB,EAAA,MAAM,UAAkB,MAAA,CAAO,eAAA;AAC/B,EAAA,IAAI,OAAA,KAAY,CAAA,IAAK,OAAA,KAAY,uBAAA,EAAyB;AACzD,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,4CAAA,EAA+C,MAAA,CAAO,OAAO,CAAC,CAAA,CAAE,CAAA;AAAA,EACjF;AACA,EAAA,OAAO;AAAA,IACN,eAAA,EAAiB,uBAAA;AAAA,IACjB,OAAA,EAAS,OAAO,OAAA,CAAQ,GA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AAW,QAAA,CAAS,cAAc,MAAA,CAAO,WAAA;AACpE,EAAA,IAAI,MAAA,CAAO,WAAA,KAAgB,MAAA,EAAW,QAAA,CAAS,cAAc,MAAA,CAAO,WAAA;AACpE,EAAA,IAAI,OAAO,UAAA,KAAe,MAAA,WAAoB,UAAA,GAAa,SAAA,CAAU,OAAO,UAAU,CAAA;AAEtF,EAAA,OAAO,QAAA;AACR;AAMO,SAAS,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-ZZGSS65W.cjs","sourcesContent":["import 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 {\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 {\n\tname: string;\n\tversion: string;\n\tshape: 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\treturn {\n\t\t...manifest,\n\t\tmanifestVersion: MODULE_MANIFEST_VERSION,\n\t\tviews: \"views\" in manifest && Array.isArray(manifest.views) ? manifest.views : [],\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\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.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\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.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"]}
@@ -1,36 +1,36 @@
1
1
  'use strict';
2
2
 
3
- var chunkJAXDEK5Z_cjs = require('../chunk-JAXDEK5Z.cjs');
3
+ var chunk7RV5REPT_cjs = require('../chunk-7RV5REPT.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "createEventTypeRegistry", {
8
8
  enumerable: true,
9
- get: function () { return chunkJAXDEK5Z_cjs.createEventTypeRegistry; }
9
+ get: function () { return chunk7RV5REPT_cjs.createEventTypeRegistry; }
10
10
  });
11
11
  Object.defineProperty(exports, "getRegisteredEventTypes", {
12
12
  enumerable: true,
13
- get: function () { return chunkJAXDEK5Z_cjs.getRegisteredEventTypes; }
13
+ get: function () { return chunk7RV5REPT_cjs.getRegisteredEventTypes; }
14
14
  });
15
15
  Object.defineProperty(exports, "getRegisteredSubjectTypes", {
16
16
  enumerable: true,
17
- get: function () { return chunkJAXDEK5Z_cjs.getRegisteredSubjectTypes; }
17
+ get: function () { return chunk7RV5REPT_cjs.getRegisteredSubjectTypes; }
18
18
  });
19
19
  Object.defineProperty(exports, "isValidEventType", {
20
20
  enumerable: true,
21
- get: function () { return chunkJAXDEK5Z_cjs.isValidEventType; }
21
+ get: function () { return chunk7RV5REPT_cjs.isValidEventType; }
22
22
  });
23
23
  Object.defineProperty(exports, "isValidSubjectType", {
24
24
  enumerable: true,
25
- get: function () { return chunkJAXDEK5Z_cjs.isValidSubjectType; }
25
+ get: function () { return chunk7RV5REPT_cjs.isValidSubjectType; }
26
26
  });
27
27
  Object.defineProperty(exports, "registerEventType", {
28
28
  enumerable: true,
29
- get: function () { return chunkJAXDEK5Z_cjs.registerEventType; }
29
+ get: function () { return chunk7RV5REPT_cjs.registerEventType; }
30
30
  });
31
31
  Object.defineProperty(exports, "registerSubjectType", {
32
32
  enumerable: true,
33
- get: function () { return chunkJAXDEK5Z_cjs.registerSubjectType; }
33
+ get: function () { return chunk7RV5REPT_cjs.registerSubjectType; }
34
34
  });
35
35
  //# sourceMappingURL=index.cjs.map
36
36
  //# sourceMappingURL=index.cjs.map
@@ -15,6 +15,11 @@ interface AssetEventEnvelope<TPayload = unknown> {
15
15
  recordedAt: Date;
16
16
  correlationId: string;
17
17
  causationId?: string;
18
+ provenance?: EventProvenance;
19
+ }
20
+ interface EventProvenance {
21
+ source: "sdui" | "api" | "agent" | "worker" | "system";
22
+ auditAttributes?: Record<string, string>;
18
23
  }
19
24
  type AssetEventSubjectType = string;
20
25
  type AssetEventType = string;
@@ -32,4 +37,4 @@ interface EventTypeRegistry {
32
37
  }
33
38
  declare function createEventTypeRegistry(initialEventTypes?: string[]): EventTypeRegistry;
34
39
 
35
- export { type AssetEventActorType, type AssetEventEnvelope, type AssetEventSubjectType, type AssetEventType, type EventTypeRegistry, createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType };
40
+ export { type AssetEventActorType, type AssetEventEnvelope, type AssetEventSubjectType, type AssetEventType, type EventProvenance, type EventTypeRegistry, createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType };
@@ -15,6 +15,11 @@ interface AssetEventEnvelope<TPayload = unknown> {
15
15
  recordedAt: Date;
16
16
  correlationId: string;
17
17
  causationId?: string;
18
+ provenance?: EventProvenance;
19
+ }
20
+ interface EventProvenance {
21
+ source: "sdui" | "api" | "agent" | "worker" | "system";
22
+ auditAttributes?: Record<string, string>;
18
23
  }
19
24
  type AssetEventSubjectType = string;
20
25
  type AssetEventType = string;
@@ -32,4 +37,4 @@ interface EventTypeRegistry {
32
37
  }
33
38
  declare function createEventTypeRegistry(initialEventTypes?: string[]): EventTypeRegistry;
34
39
 
35
- export { type AssetEventActorType, type AssetEventEnvelope, type AssetEventSubjectType, type AssetEventType, type EventTypeRegistry, createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType };
40
+ export { type AssetEventActorType, type AssetEventEnvelope, type AssetEventSubjectType, type AssetEventType, type EventProvenance, type EventTypeRegistry, createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType };
@@ -1,3 +1,3 @@
1
- export { createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType } from '../chunk-4YQOGV7H.js';
1
+ export { createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType } from '../chunk-3O4GMCCE.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
package/dist/index.cjs CHANGED
@@ -2,18 +2,18 @@
2
2
 
3
3
  var chunkYZKUEC2J_cjs = require('./chunk-YZKUEC2J.cjs');
4
4
  var chunkLZSE6QGQ_cjs = require('./chunk-LZSE6QGQ.cjs');
5
- var chunkJIT3UR27_cjs = require('./chunk-JIT3UR27.cjs');
6
- var chunkK27DUWRY_cjs = require('./chunk-K27DUWRY.cjs');
5
+ var chunkZZGSS65W_cjs = require('./chunk-ZZGSS65W.cjs');
6
+ var chunkLAZL2GDT_cjs = require('./chunk-LAZL2GDT.cjs');
7
7
  var chunkOC4ZFJKD_cjs = require('./chunk-OC4ZFJKD.cjs');
8
8
  var chunkNJL3US7H_cjs = require('./chunk-NJL3US7H.cjs');
9
9
  var chunkYQEXO3IQ_cjs = require('./chunk-YQEXO3IQ.cjs');
10
- var chunk3WEHM2P3_cjs = require('./chunk-3WEHM2P3.cjs');
10
+ var chunk7SHNYYGI_cjs = require('./chunk-7SHNYYGI.cjs');
11
11
  var chunkUV252FLT_cjs = require('./chunk-UV252FLT.cjs');
12
- var chunkHLRIXNVG_cjs = require('./chunk-HLRIXNVG.cjs');
12
+ var chunkJOATYJXQ_cjs = require('./chunk-JOATYJXQ.cjs');
13
13
  var chunkNPVIFZQV_cjs = require('./chunk-NPVIFZQV.cjs');
14
14
  var chunkF3E5SXPN_cjs = require('./chunk-F3E5SXPN.cjs');
15
15
  var chunkEO4VSB2O_cjs = require('./chunk-EO4VSB2O.cjs');
16
- var chunkJAXDEK5Z_cjs = require('./chunk-JAXDEK5Z.cjs');
16
+ var chunk7RV5REPT_cjs = require('./chunk-7RV5REPT.cjs');
17
17
  require('./chunk-PG5LYTUX.cjs');
18
18
  var chunkANPJYXBK_cjs = require('./chunk-ANPJYXBK.cjs');
19
19
 
@@ -49,55 +49,55 @@ Object.defineProperty(exports, "parseFabricId", {
49
49
  });
50
50
  Object.defineProperty(exports, "MODULE_MANIFEST_VERSION", {
51
51
  enumerable: true,
52
- get: function () { return chunkJIT3UR27_cjs.MODULE_MANIFEST_VERSION; }
52
+ get: function () { return chunkZZGSS65W_cjs.MODULE_MANIFEST_VERSION; }
53
53
  });
54
54
  Object.defineProperty(exports, "exportModuleManifest", {
55
55
  enumerable: true,
56
- get: function () { return chunkJIT3UR27_cjs.exportModuleManifest; }
56
+ get: function () { return chunkZZGSS65W_cjs.exportModuleManifest; }
57
57
  });
58
58
  Object.defineProperty(exports, "exportModuleManifestBundle", {
59
59
  enumerable: true,
60
- get: function () { return chunkJIT3UR27_cjs.exportModuleManifestBundle; }
60
+ get: function () { return chunkZZGSS65W_cjs.exportModuleManifestBundle; }
61
61
  });
62
62
  Object.defineProperty(exports, "isJsonSchemaExportableValidator", {
63
63
  enumerable: true,
64
- get: function () { return chunkJIT3UR27_cjs.isJsonSchemaExportableValidator; }
64
+ get: function () { return chunkZZGSS65W_cjs.isJsonSchemaExportableValidator; }
65
65
  });
66
66
  Object.defineProperty(exports, "normalizeModuleManifest", {
67
67
  enumerable: true,
68
- get: function () { return chunkJIT3UR27_cjs.normalizeModuleManifest; }
68
+ get: function () { return chunkZZGSS65W_cjs.normalizeModuleManifest; }
69
69
  });
70
70
  Object.defineProperty(exports, "normalizeModuleManifestBundle", {
71
71
  enumerable: true,
72
- get: function () { return chunkJIT3UR27_cjs.normalizeModuleManifestBundle; }
72
+ get: function () { return chunkZZGSS65W_cjs.normalizeModuleManifestBundle; }
73
73
  });
74
74
  Object.defineProperty(exports, "createModuleRegistry", {
75
75
  enumerable: true,
76
- get: function () { return chunkK27DUWRY_cjs.createModuleRegistry; }
76
+ get: function () { return chunkLAZL2GDT_cjs.createModuleRegistry; }
77
77
  });
78
78
  Object.defineProperty(exports, "getEventTypeName", {
79
79
  enumerable: true,
80
- get: function () { return chunkK27DUWRY_cjs.getEventTypeName; }
80
+ get: function () { return chunkLAZL2GDT_cjs.getEventTypeName; }
81
81
  });
82
82
  Object.defineProperty(exports, "getModuleDependencyNamespace", {
83
83
  enumerable: true,
84
- get: function () { return chunkK27DUWRY_cjs.getModuleDependencyNamespace; }
84
+ get: function () { return chunkLAZL2GDT_cjs.getModuleDependencyNamespace; }
85
85
  });
86
86
  Object.defineProperty(exports, "getObjectTypeName", {
87
87
  enumerable: true,
88
- get: function () { return chunkK27DUWRY_cjs.getObjectTypeName; }
88
+ get: function () { return chunkLAZL2GDT_cjs.getObjectTypeName; }
89
89
  });
90
90
  Object.defineProperty(exports, "registerFabricModule", {
91
91
  enumerable: true,
92
- get: function () { return chunkK27DUWRY_cjs.registerFabricModule; }
92
+ get: function () { return chunkLAZL2GDT_cjs.registerFabricModule; }
93
93
  });
94
94
  Object.defineProperty(exports, "registerFabricModules", {
95
95
  enumerable: true,
96
- get: function () { return chunkK27DUWRY_cjs.registerFabricModules; }
96
+ get: function () { return chunkLAZL2GDT_cjs.registerFabricModules; }
97
97
  });
98
98
  Object.defineProperty(exports, "validateModuleNamespace", {
99
99
  enumerable: true,
100
- get: function () { return chunkK27DUWRY_cjs.validateModuleNamespace; }
100
+ get: function () { return chunkLAZL2GDT_cjs.validateModuleNamespace; }
101
101
  });
102
102
  Object.defineProperty(exports, "assertObjectType", {
103
103
  enumerable: true,
@@ -201,31 +201,31 @@ Object.defineProperty(exports, "stableChecksum", {
201
201
  });
202
202
  Object.defineProperty(exports, "getRegisteredViewContractKeys", {
203
203
  enumerable: true,
204
- get: function () { return chunk3WEHM2P3_cjs.getRegisteredViewContractKeys; }
204
+ get: function () { return chunk7SHNYYGI_cjs.getRegisteredViewContractKeys; }
205
205
  });
206
206
  Object.defineProperty(exports, "registerViewContract", {
207
207
  enumerable: true,
208
- get: function () { return chunk3WEHM2P3_cjs.registerViewContract; }
208
+ get: function () { return chunk7SHNYYGI_cjs.registerViewContract; }
209
209
  });
210
210
  Object.defineProperty(exports, "registerViewContractIfMissing", {
211
211
  enumerable: true,
212
- get: function () { return chunk3WEHM2P3_cjs.registerViewContractIfMissing; }
212
+ get: function () { return chunk7SHNYYGI_cjs.registerViewContractIfMissing; }
213
213
  });
214
214
  Object.defineProperty(exports, "replayEvents", {
215
215
  enumerable: true,
216
- get: function () { return chunk3WEHM2P3_cjs.replayEvents; }
216
+ get: function () { return chunk7SHNYYGI_cjs.replayEvents; }
217
217
  });
218
218
  Object.defineProperty(exports, "replayView", {
219
219
  enumerable: true,
220
- get: function () { return chunk3WEHM2P3_cjs.replayView; }
220
+ get: function () { return chunk7SHNYYGI_cjs.replayView; }
221
221
  });
222
222
  Object.defineProperty(exports, "resolveViewContract", {
223
223
  enumerable: true,
224
- get: function () { return chunk3WEHM2P3_cjs.resolveViewContract; }
224
+ get: function () { return chunk7SHNYYGI_cjs.resolveViewContract; }
225
225
  });
226
226
  Object.defineProperty(exports, "viewContractKey", {
227
227
  enumerable: true,
228
- get: function () { return chunk3WEHM2P3_cjs.viewContractKey; }
228
+ get: function () { return chunk7SHNYYGI_cjs.viewContractKey; }
229
229
  });
230
230
  Object.defineProperty(exports, "getAllowedTransitions", {
231
231
  enumerable: true,
@@ -253,43 +253,43 @@ Object.defineProperty(exports, "validateTransition", {
253
253
  });
254
254
  Object.defineProperty(exports, "ACTOR_TYPES", {
255
255
  enumerable: true,
256
- get: function () { return chunkHLRIXNVG_cjs.ACTOR_TYPES; }
256
+ get: function () { return chunkJOATYJXQ_cjs.ACTOR_TYPES; }
257
257
  });
258
258
  Object.defineProperty(exports, "assertActionId", {
259
259
  enumerable: true,
260
- get: function () { return chunkHLRIXNVG_cjs.assertActionId; }
260
+ get: function () { return chunkJOATYJXQ_cjs.assertActionId; }
261
261
  });
262
262
  Object.defineProperty(exports, "assertActorType", {
263
263
  enumerable: true,
264
- get: function () { return chunkHLRIXNVG_cjs.assertActorType; }
264
+ get: function () { return chunkJOATYJXQ_cjs.assertActorType; }
265
265
  });
266
266
  Object.defineProperty(exports, "getRegisteredActionIds", {
267
267
  enumerable: true,
268
- get: function () { return chunkHLRIXNVG_cjs.getRegisteredActionIds; }
268
+ get: function () { return chunkJOATYJXQ_cjs.getRegisteredActionIds; }
269
269
  });
270
270
  Object.defineProperty(exports, "isActorType", {
271
271
  enumerable: true,
272
- get: function () { return chunkHLRIXNVG_cjs.isActorType; }
272
+ get: function () { return chunkJOATYJXQ_cjs.isActorType; }
273
273
  });
274
274
  Object.defineProperty(exports, "isRegisteredActionId", {
275
275
  enumerable: true,
276
- get: function () { return chunkHLRIXNVG_cjs.isRegisteredActionId; }
276
+ get: function () { return chunkJOATYJXQ_cjs.isRegisteredActionId; }
277
277
  });
278
278
  Object.defineProperty(exports, "registerAction", {
279
279
  enumerable: true,
280
- get: function () { return chunkHLRIXNVG_cjs.registerAction; }
280
+ get: function () { return chunkJOATYJXQ_cjs.registerAction; }
281
281
  });
282
282
  Object.defineProperty(exports, "registerActionIfMissing", {
283
283
  enumerable: true,
284
- get: function () { return chunkHLRIXNVG_cjs.registerActionIfMissing; }
284
+ get: function () { return chunkJOATYJXQ_cjs.registerActionIfMissing; }
285
285
  });
286
286
  Object.defineProperty(exports, "resolveAction", {
287
287
  enumerable: true,
288
- get: function () { return chunkHLRIXNVG_cjs.resolveAction; }
288
+ get: function () { return chunkJOATYJXQ_cjs.resolveAction; }
289
289
  });
290
290
  Object.defineProperty(exports, "resolveRegisteredAction", {
291
291
  enumerable: true,
292
- get: function () { return chunkHLRIXNVG_cjs.resolveRegisteredAction; }
292
+ get: function () { return chunkJOATYJXQ_cjs.resolveRegisteredAction; }
293
293
  });
294
294
  Object.defineProperty(exports, "AdapterRegistry", {
295
295
  enumerable: true,
@@ -333,31 +333,31 @@ Object.defineProperty(exports, "resolveDisplayRenderer", {
333
333
  });
334
334
  Object.defineProperty(exports, "createEventTypeRegistry", {
335
335
  enumerable: true,
336
- get: function () { return chunkJAXDEK5Z_cjs.createEventTypeRegistry; }
336
+ get: function () { return chunk7RV5REPT_cjs.createEventTypeRegistry; }
337
337
  });
338
338
  Object.defineProperty(exports, "getRegisteredEventTypes", {
339
339
  enumerable: true,
340
- get: function () { return chunkJAXDEK5Z_cjs.getRegisteredEventTypes; }
340
+ get: function () { return chunk7RV5REPT_cjs.getRegisteredEventTypes; }
341
341
  });
342
342
  Object.defineProperty(exports, "getRegisteredSubjectTypes", {
343
343
  enumerable: true,
344
- get: function () { return chunkJAXDEK5Z_cjs.getRegisteredSubjectTypes; }
344
+ get: function () { return chunk7RV5REPT_cjs.getRegisteredSubjectTypes; }
345
345
  });
346
346
  Object.defineProperty(exports, "isValidEventType", {
347
347
  enumerable: true,
348
- get: function () { return chunkJAXDEK5Z_cjs.isValidEventType; }
348
+ get: function () { return chunk7RV5REPT_cjs.isValidEventType; }
349
349
  });
350
350
  Object.defineProperty(exports, "isValidSubjectType", {
351
351
  enumerable: true,
352
- get: function () { return chunkJAXDEK5Z_cjs.isValidSubjectType; }
352
+ get: function () { return chunk7RV5REPT_cjs.isValidSubjectType; }
353
353
  });
354
354
  Object.defineProperty(exports, "registerEventType", {
355
355
  enumerable: true,
356
- get: function () { return chunkJAXDEK5Z_cjs.registerEventType; }
356
+ get: function () { return chunk7RV5REPT_cjs.registerEventType; }
357
357
  });
358
358
  Object.defineProperty(exports, "registerSubjectType", {
359
359
  enumerable: true,
360
- get: function () { return chunkJAXDEK5Z_cjs.registerSubjectType; }
360
+ get: function () { return chunk7RV5REPT_cjs.registerSubjectType; }
361
361
  });
362
362
  Object.defineProperty(exports, "FABRIC_GOVERNANCE_CONTRACT_VERSION", {
363
363
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1,13 +1,13 @@
1
- export { ACTOR_TYPES, ActionContext, ActionDefinition, ActionHandler, ActionId, ActionResult, ActionStateMachineBinding, ActionStatus, ActorType, AdapterStep, AdapterStepRetryPolicy, FabricRuntimeServices, SagaChildActionInput, SagaCompletion, SagaCompletionEvent, SagaContext, SagaImplementation, SagaRunChild, SchemaParseIssue, SchemaParseResult, SchemaValidator, assertActionId, assertActorType, getRegisteredActionIds, isActorType, isRegisteredActionId, registerAction, registerActionIfMissing, resolveAction, resolveRegisteredAction } from './actions/index.cjs';
1
+ export { ACTOR_TYPES, ActionCompletionMode, ActionConnectivity, ActionConsistency, ActionContext, ActionDataSensitivity, ActionDefinition, ActionExecutionContract, ActionHandler, ActionId, ActionIdempotencyStance, ActionResult, ActionStateMachineBinding, ActionStatus, ActorType, AdapterStep, AdapterStepRetryPolicy, AuthorityMoment, FabricRuntimeServices, SagaChildActionInput, SagaCompletion, SagaCompletionEvent, SagaContext, SagaImplementation, SagaRunChild, SchemaParseIssue, SchemaParseResult, SchemaValidator, assertActionId, assertActorType, getRegisteredActionIds, isActorType, isRegisteredActionId, registerAction, registerActionIfMissing, resolveAction, resolveRegisteredAction } from './actions/index.cjs';
2
2
  export { AdapterAttempt, AdapterCircuitBreakerConfig, AdapterExecutionContext, AdapterExecutionResult, AdapterExecutor, AdapterImplementation, AdapterRegistry, AdapterRetryPolicy, ExecuteWithRetryOptions, MissingAdapterRegistrationError, ResolvedAdapterRetryPolicy, executeWithAdapterRetry, getRetryDelayMs, resolveAdapterRetryPolicy } from './adapters/index.cjs';
3
- export { AssetEventActorType, AssetEventEnvelope, AssetEventSubjectType, AssetEventType, EventTypeRegistry, createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType } from './events/index.cjs';
3
+ export { AssetEventActorType, AssetEventEnvelope, AssetEventSubjectType, AssetEventType, EventProvenance, EventTypeRegistry, createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType } 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
- export { CapabilityMetadata, CapabilitySlotDefinition, DeclarativeInvariant, EventTypeRegistration, EventTypeRegistrationInput, FabricModule, IdPrefixRegistration, InvariantEnforcement, ModuleDependency, ModuleDependencyInput, ModuleDisplayRendererRegistration, ModuleRegistry, ObjectRelationCardinality, ObjectRelationDefinition, ObjectRelationDeleteBehavior, ObjectRelationSemantics, ObjectTypeRegistration, ObjectTypeRegistrationInput, PolicyRegistration, StateMachineRegistration, createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateModuleNamespace } from './modules/index.cjs';
6
+ export { CapabilityActionIntent, CapabilityMetadata, CapabilityPortRequirement, CapabilityRequirements, CapabilitySlotDefinition, DeclarativeInvariant, EventTypeRegistration, EventTypeRegistrationInput, FabricModule, IdPrefixRegistration, InvariantEnforcement, ModuleDependency, ModuleDependencyInput, ModuleDisplayRendererRegistration, ModuleRegistry, ObjectRelationCardinality, ObjectRelationDefinition, ObjectRelationDeleteBehavior, ObjectRelationSemantics, ObjectTypeRegistration, ObjectTypeRegistrationInput, PolicyRegistration, StateMachineRegistration, createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateModuleNamespace } from './modules/index.cjs';
7
7
  export { FabricObjectType, JsonPrimitive, JsonValue, PortableJsonSchema, assertObjectType, assertPortableJsonSchema, getRegisteredObjectTypes, isValidObjectType, registerObjectType } from './objects/index.cjs';
8
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, RuntimePolicyDefinition, aggregatePolicyOutcomes, assertPolicyId, evaluatePolicyDefinition, evaluatePolicyDefinitions, evaluateRegisteredPolicies, getRegisteredPolicyIds, registerPolicy, registerPolicyIfMissing, resolvePolicy, validateDataPolicyDefinition, validatePolicyGuidance } from './policies/index.cjs';
9
9
  export { StateClass, StateDefinition, StateMachineDatabaseClient, StateMachineDefinition, TransitionContext, getAllowedTransitions, getEntityStateClass, registerStateMachine, registerStateMachineIfMissing, resolveStateMachine, validateTransition } from './state-machines/index.cjs';
10
- export { ReplayEventsOptions, ReplayEventsResult, ReplayScope, ReplaySnapshot, ReplayViewOptions, ReplayWarning, ReplayWarningCode, ReplayableAssetEvent, ViewContract, ViewEventConsumption, getRegisteredViewContractKeys, registerViewContract, registerViewContractIfMissing, replayEvents, replayView, resolveViewContract, viewContractKey } from './projections/index.cjs';
10
+ export { ReplayEventsOptions, ReplayEventsResult, ReplayScope, ReplaySnapshot, ReplayViewOptions, ReplayWarning, ReplayWarningCode, ReplayableAssetEvent, ViewContract, ViewEventConsumption, ViewUsageMetadata, getRegisteredViewContractKeys, registerViewContract, registerViewContractIfMissing, replayEvents, replayView, resolveViewContract, viewContractKey } from './projections/index.cjs';
11
11
  export { CachedDisplayDescriptor, DisplayContext, DisplayDatabaseClient, DisplayDescriptor, DisplayRenderer, DisplayRendererRegistration, denormalizeDisplaySnapshot, registerDisplayRenderer, renderEventDisplay, resolveDisplayRenderer } from './displays/index.cjs';
12
12
  export { ANONYMIZATION_POLICY_VERSION, AnalyticsDataContract, AnalyticsDataContractSource, AnalyticsEligibilityDecision, AnonymizationContext, AnonymizationEngine, AnonymizationFieldMetadata, AnonymizationLifecycleEvidence, AnonymizationMetadata, AnonymizationResult, AssetEventLike, DataClassificationRule, EvidencePacketLike, FieldRedactor, PLATFORM_PRIVACY_POLICY_VERSION, PlatformDataClass, RedactionMethod, RedactionRule, RetentionRule, anonymizeAssetEventPayload, anonymizeEvidencePacket, anonymizeJsonValue, buildAnonymizationLifecycleEvidence, stableChecksum } from './privacy/index.cjs';
13
13
  export { EvidenceGenerationContext, EvidencePacketEnvelope, EvidencePacketReference, EvidencePacketStatus, EvidencePacketSubject, EvidenceRenderer } from './evidence/index.cjs';
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- export { ACTOR_TYPES, ActionContext, ActionDefinition, ActionHandler, ActionId, ActionResult, ActionStateMachineBinding, ActionStatus, ActorType, AdapterStep, AdapterStepRetryPolicy, FabricRuntimeServices, SagaChildActionInput, SagaCompletion, SagaCompletionEvent, SagaContext, SagaImplementation, SagaRunChild, SchemaParseIssue, SchemaParseResult, SchemaValidator, assertActionId, assertActorType, getRegisteredActionIds, isActorType, isRegisteredActionId, registerAction, registerActionIfMissing, resolveAction, resolveRegisteredAction } from './actions/index.js';
1
+ export { ACTOR_TYPES, ActionCompletionMode, ActionConnectivity, ActionConsistency, ActionContext, ActionDataSensitivity, ActionDefinition, ActionExecutionContract, ActionHandler, ActionId, ActionIdempotencyStance, ActionResult, ActionStateMachineBinding, ActionStatus, ActorType, AdapterStep, AdapterStepRetryPolicy, AuthorityMoment, FabricRuntimeServices, SagaChildActionInput, SagaCompletion, SagaCompletionEvent, SagaContext, SagaImplementation, SagaRunChild, SchemaParseIssue, SchemaParseResult, SchemaValidator, assertActionId, assertActorType, getRegisteredActionIds, isActorType, isRegisteredActionId, registerAction, registerActionIfMissing, resolveAction, resolveRegisteredAction } from './actions/index.js';
2
2
  export { AdapterAttempt, AdapterCircuitBreakerConfig, AdapterExecutionContext, AdapterExecutionResult, AdapterExecutor, AdapterImplementation, AdapterRegistry, AdapterRetryPolicy, ExecuteWithRetryOptions, MissingAdapterRegistrationError, ResolvedAdapterRetryPolicy, executeWithAdapterRetry, getRetryDelayMs, resolveAdapterRetryPolicy } from './adapters/index.js';
3
- export { AssetEventActorType, AssetEventEnvelope, AssetEventSubjectType, AssetEventType, EventTypeRegistry, createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType } from './events/index.js';
3
+ export { AssetEventActorType, AssetEventEnvelope, AssetEventSubjectType, AssetEventType, EventProvenance, EventTypeRegistry, createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType } 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
- export { CapabilityMetadata, CapabilitySlotDefinition, DeclarativeInvariant, EventTypeRegistration, EventTypeRegistrationInput, FabricModule, IdPrefixRegistration, InvariantEnforcement, ModuleDependency, ModuleDependencyInput, ModuleDisplayRendererRegistration, ModuleRegistry, ObjectRelationCardinality, ObjectRelationDefinition, ObjectRelationDeleteBehavior, ObjectRelationSemantics, ObjectTypeRegistration, ObjectTypeRegistrationInput, PolicyRegistration, StateMachineRegistration, createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateModuleNamespace } from './modules/index.js';
6
+ export { CapabilityActionIntent, CapabilityMetadata, CapabilityPortRequirement, CapabilityRequirements, CapabilitySlotDefinition, DeclarativeInvariant, EventTypeRegistration, EventTypeRegistrationInput, FabricModule, IdPrefixRegistration, InvariantEnforcement, ModuleDependency, ModuleDependencyInput, ModuleDisplayRendererRegistration, ModuleRegistry, ObjectRelationCardinality, ObjectRelationDefinition, ObjectRelationDeleteBehavior, ObjectRelationSemantics, ObjectTypeRegistration, ObjectTypeRegistrationInput, PolicyRegistration, StateMachineRegistration, createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateModuleNamespace } from './modules/index.js';
7
7
  export { FabricObjectType, JsonPrimitive, JsonValue, PortableJsonSchema, assertObjectType, assertPortableJsonSchema, getRegisteredObjectTypes, isValidObjectType, registerObjectType } from './objects/index.js';
8
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, RuntimePolicyDefinition, aggregatePolicyOutcomes, assertPolicyId, evaluatePolicyDefinition, evaluatePolicyDefinitions, evaluateRegisteredPolicies, getRegisteredPolicyIds, registerPolicy, registerPolicyIfMissing, resolvePolicy, validateDataPolicyDefinition, validatePolicyGuidance } from './policies/index.js';
9
9
  export { StateClass, StateDefinition, StateMachineDatabaseClient, StateMachineDefinition, TransitionContext, getAllowedTransitions, getEntityStateClass, registerStateMachine, registerStateMachineIfMissing, resolveStateMachine, validateTransition } from './state-machines/index.js';
10
- export { ReplayEventsOptions, ReplayEventsResult, ReplayScope, ReplaySnapshot, ReplayViewOptions, ReplayWarning, ReplayWarningCode, ReplayableAssetEvent, ViewContract, ViewEventConsumption, getRegisteredViewContractKeys, registerViewContract, registerViewContractIfMissing, replayEvents, replayView, resolveViewContract, viewContractKey } from './projections/index.js';
10
+ export { ReplayEventsOptions, ReplayEventsResult, ReplayScope, ReplaySnapshot, ReplayViewOptions, ReplayWarning, ReplayWarningCode, ReplayableAssetEvent, ViewContract, ViewEventConsumption, ViewUsageMetadata, getRegisteredViewContractKeys, registerViewContract, registerViewContractIfMissing, replayEvents, replayView, resolveViewContract, viewContractKey } from './projections/index.js';
11
11
  export { CachedDisplayDescriptor, DisplayContext, DisplayDatabaseClient, DisplayDescriptor, DisplayRenderer, DisplayRendererRegistration, denormalizeDisplaySnapshot, registerDisplayRenderer, renderEventDisplay, resolveDisplayRenderer } from './displays/index.js';
12
12
  export { ANONYMIZATION_POLICY_VERSION, AnalyticsDataContract, AnalyticsDataContractSource, AnalyticsEligibilityDecision, AnonymizationContext, AnonymizationEngine, AnonymizationFieldMetadata, AnonymizationLifecycleEvidence, AnonymizationMetadata, AnonymizationResult, AssetEventLike, DataClassificationRule, EvidencePacketLike, FieldRedactor, PLATFORM_PRIVACY_POLICY_VERSION, PlatformDataClass, RedactionMethod, RedactionRule, RetentionRule, anonymizeAssetEventPayload, anonymizeEvidencePacket, anonymizeJsonValue, buildAnonymizationLifecycleEvidence, stableChecksum } from './privacy/index.js';
13
13
  export { EvidenceGenerationContext, EvidencePacketEnvelope, EvidencePacketReference, EvidencePacketStatus, EvidencePacketSubject, EvidenceRenderer } from './evidence/index.js';
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  export { createDeterministicIdFactory, createFakeActionContext, createInMemoryAdapterRegistry } from './chunk-IFMZPLM4.js';
2
2
  export { FABRIC_ID_PREFIXES, createFabricId, isFabricId, parseFabricId } from './chunk-RALMUSOX.js';
3
- export { MODULE_MANIFEST_VERSION, exportModuleManifest, exportModuleManifestBundle, isJsonSchemaExportableValidator, normalizeModuleManifest, normalizeModuleManifestBundle } from './chunk-N3OUWEYA.js';
4
- export { createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateModuleNamespace } from './chunk-NFHS5NWD.js';
3
+ export { MODULE_MANIFEST_VERSION, exportModuleManifest, exportModuleManifestBundle, isJsonSchemaExportableValidator, normalizeModuleManifest, normalizeModuleManifestBundle } from './chunk-HL77HWWP.js';
4
+ export { createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateModuleNamespace } from './chunk-35SDMFCR.js';
5
5
  export { assertObjectType, assertPortableJsonSchema, getRegisteredObjectTypes, isValidObjectType, registerObjectType } from './chunk-4MMMXV4Q.js';
6
6
  export { aggregatePolicyOutcomes, assertPolicyId, evaluatePolicyDefinition, evaluatePolicyDefinitions, evaluateRegisteredPolicies, getRegisteredPolicyIds, registerPolicy, registerPolicyIfMissing, resolvePolicy, validateDataPolicyDefinition, validatePolicyGuidance } from './chunk-6ER62UUN.js';
7
7
  export { ANONYMIZATION_POLICY_VERSION, AnonymizationEngine, FieldRedactor, PLATFORM_PRIVACY_POLICY_VERSION, anonymizeAssetEventPayload, anonymizeEvidencePacket, anonymizeJsonValue, buildAnonymizationLifecycleEvidence, stableChecksum } from './chunk-X7WC4AYC.js';
8
- export { getRegisteredViewContractKeys, registerViewContract, registerViewContractIfMissing, replayEvents, replayView, resolveViewContract, viewContractKey } from './chunk-FN6IYVBK.js';
8
+ export { getRegisteredViewContractKeys, registerViewContract, registerViewContractIfMissing, replayEvents, replayView, resolveViewContract, viewContractKey } from './chunk-FSUYD4F4.js';
9
9
  export { getAllowedTransitions, getEntityStateClass, registerStateMachine, registerStateMachineIfMissing, resolveStateMachine, validateTransition } from './chunk-T2JLSZN6.js';
10
- export { ACTOR_TYPES, assertActionId, assertActorType, getRegisteredActionIds, isActorType, isRegisteredActionId, registerAction, registerActionIfMissing, resolveAction, resolveRegisteredAction } from './chunk-JM55UQWK.js';
10
+ export { ACTOR_TYPES, assertActionId, assertActorType, getRegisteredActionIds, isActorType, isRegisteredActionId, registerAction, registerActionIfMissing, resolveAction, resolveRegisteredAction } from './chunk-4RMKUYRX.js';
11
11
  export { AdapterRegistry, MissingAdapterRegistrationError, executeWithAdapterRetry, getRetryDelayMs, resolveAdapterRetryPolicy } from './chunk-3ZW5USXF.js';
12
12
  export { AgentActionPolicyRegistry } from './chunk-OFCCZ27Z.js';
13
13
  export { denormalizeDisplaySnapshot, registerDisplayRenderer, renderEventDisplay, resolveDisplayRenderer } from './chunk-O5WVBQ7P.js';
14
- export { createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType } from './chunk-4YQOGV7H.js';
14
+ export { createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType } from './chunk-3O4GMCCE.js';
15
15
  import './chunk-OZLZHISS.js';
16
16
  export { FABRIC_GOVERNANCE_CONTRACT_VERSION, assertGovernanceRuntimeEvidence, assertMutationGovernanceContext } from './chunk-3OWMPDBD.js';
17
17
  //# sourceMappingURL=index.js.map
@@ -1,40 +1,40 @@
1
1
  'use strict';
2
2
 
3
- var chunkJIT3UR27_cjs = require('../chunk-JIT3UR27.cjs');
4
- require('../chunk-K27DUWRY.cjs');
3
+ var chunkZZGSS65W_cjs = require('../chunk-ZZGSS65W.cjs');
4
+ require('../chunk-LAZL2GDT.cjs');
5
5
  require('../chunk-OC4ZFJKD.cjs');
6
6
  require('../chunk-NJL3US7H.cjs');
7
- require('../chunk-3WEHM2P3.cjs');
7
+ require('../chunk-7SHNYYGI.cjs');
8
8
  require('../chunk-UV252FLT.cjs');
9
- require('../chunk-HLRIXNVG.cjs');
9
+ require('../chunk-JOATYJXQ.cjs');
10
10
  require('../chunk-EO4VSB2O.cjs');
11
- require('../chunk-JAXDEK5Z.cjs');
11
+ require('../chunk-7RV5REPT.cjs');
12
12
 
13
13
 
14
14
 
15
15
  Object.defineProperty(exports, "MODULE_MANIFEST_VERSION", {
16
16
  enumerable: true,
17
- get: function () { return chunkJIT3UR27_cjs.MODULE_MANIFEST_VERSION; }
17
+ get: function () { return chunkZZGSS65W_cjs.MODULE_MANIFEST_VERSION; }
18
18
  });
19
19
  Object.defineProperty(exports, "exportModuleManifest", {
20
20
  enumerable: true,
21
- get: function () { return chunkJIT3UR27_cjs.exportModuleManifest; }
21
+ get: function () { return chunkZZGSS65W_cjs.exportModuleManifest; }
22
22
  });
23
23
  Object.defineProperty(exports, "exportModuleManifestBundle", {
24
24
  enumerable: true,
25
- get: function () { return chunkJIT3UR27_cjs.exportModuleManifestBundle; }
25
+ get: function () { return chunkZZGSS65W_cjs.exportModuleManifestBundle; }
26
26
  });
27
27
  Object.defineProperty(exports, "isJsonSchemaExportableValidator", {
28
28
  enumerable: true,
29
- get: function () { return chunkJIT3UR27_cjs.isJsonSchemaExportableValidator; }
29
+ get: function () { return chunkZZGSS65W_cjs.isJsonSchemaExportableValidator; }
30
30
  });
31
31
  Object.defineProperty(exports, "normalizeModuleManifest", {
32
32
  enumerable: true,
33
- get: function () { return chunkJIT3UR27_cjs.normalizeModuleManifest; }
33
+ get: function () { return chunkZZGSS65W_cjs.normalizeModuleManifest; }
34
34
  });
35
35
  Object.defineProperty(exports, "normalizeModuleManifestBundle", {
36
36
  enumerable: true,
37
- get: function () { return chunkJIT3UR27_cjs.normalizeModuleManifestBundle; }
37
+ get: function () { return chunkZZGSS65W_cjs.normalizeModuleManifestBundle; }
38
38
  });
39
39
  //# sourceMappingURL=index.cjs.map
40
40
  //# sourceMappingURL=index.cjs.map
@@ -1,10 +1,10 @@
1
- import { SchemaValidator, AdapterStepRetryPolicy } from '../actions/index.cjs';
1
+ import { SchemaValidator, ActionExecutionContract, AdapterStepRetryPolicy } from '../actions/index.cjs';
2
2
  import { CapabilityMetadata, ModuleDependency, ObjectRelationDefinition, DeclarativeInvariant, FabricModule } from '../modules/index.cjs';
3
3
  import { PortableJsonSchema, JsonValue } from '../objects/index.cjs';
4
4
  import { PolicyKind, DataPolicyDefinition, PolicyFallbackDefinition } from '../policies/index.cjs';
5
5
  import { StateDefinition } from '../state-machines/index.cjs';
6
+ import { ViewContract } from '../projections/index.cjs';
6
7
  import '../displays/index.cjs';
7
- import '../projections/index.cjs';
8
8
 
9
9
  /**
10
10
  * Version of the module manifest contract. Bump when the serialized shape
@@ -28,6 +28,7 @@ interface ModuleManifestEventType {
28
28
  eventType: string;
29
29
  schemaVersion: number;
30
30
  description?: string;
31
+ schema?: PortableJsonSchema;
31
32
  }
32
33
  interface ModuleManifestActionStateMachine {
33
34
  entityType: string;
@@ -50,6 +51,7 @@ interface ModuleManifestAction {
50
51
  requiredRoles?: string[];
51
52
  requiredPermissions?: string[];
52
53
  eventPhase?: "before_adapters" | "after_adapters";
54
+ execution?: ActionExecutionContract;
53
55
  /**
54
56
  * JSON Schema for the action parameters, present only when the action's
55
57
  * `schema` validator implements {@link JsonSchemaExportableValidator}.
@@ -101,6 +103,7 @@ interface ModuleManifestView {
101
103
  scope: "tenant-space";
102
104
  snapshotVersion: number;
103
105
  compatibleSnapshotVersions?: number[];
106
+ usage?: ViewContract["usage"];
104
107
  }
105
108
  /**
106
109
  * Stable, JSON-serializable description of a {@link FabricModule}'s ontology: