@fabricorg/platform 1.10.0 → 1.10.2

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 (209) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +32 -3
  3. package/dist/actions/index.cjs +45 -26
  4. package/dist/actions/index.cjs.map +1 -1
  5. package/dist/actions/index.d.cts +225 -226
  6. package/dist/actions/index.d.ts +225 -226
  7. package/dist/actions/index.js +41 -2
  8. package/dist/actions/index.js.map +1 -1
  9. package/dist/adapters/index.cjs +696 -66
  10. package/dist/adapters/index.cjs.map +1 -1
  11. package/dist/adapters/index.d.cts +367 -365
  12. package/dist/adapters/index.d.ts +367 -365
  13. package/dist/adapters/index.js +682 -2
  14. package/dist/adapters/index.js.map +1 -1
  15. package/dist/agent-hitl/index.cjs +21 -10
  16. package/dist/agent-hitl/index.cjs.map +1 -1
  17. package/dist/agent-hitl/index.d.cts +30 -30
  18. package/dist/agent-hitl/index.d.ts +30 -30
  19. package/dist/agent-hitl/index.js +21 -2
  20. package/dist/agent-hitl/index.js.map +1 -1
  21. package/dist/certification/index.cjs +109 -24
  22. package/dist/certification/index.cjs.map +1 -1
  23. package/dist/certification/index.d.cts +33 -39
  24. package/dist/certification/index.d.ts +33 -39
  25. package/dist/certification/index.js +107 -8
  26. package/dist/certification/index.js.map +1 -1
  27. package/dist/discovery/index.cjs +12 -10
  28. package/dist/discovery/index.cjs.map +1 -1
  29. package/dist/discovery/index.d.cts +2 -10
  30. package/dist/discovery/index.d.ts +2 -10
  31. package/dist/discovery/index.js +12 -2
  32. package/dist/discovery/index.js.map +1 -1
  33. package/dist/engine-B4csEOEc.js +223 -0
  34. package/dist/engine-B4csEOEc.js.map +1 -0
  35. package/dist/engine-BqScuhrT.cjs +246 -0
  36. package/dist/engine-BqScuhrT.cjs.map +1 -0
  37. package/dist/events/index.cjs +39 -10
  38. package/dist/events/index.cjs.map +1 -1
  39. package/dist/events/index.d.cts +43 -43
  40. package/dist/events/index.d.ts +43 -43
  41. package/dist/events/index.js +39 -2
  42. package/dist/events/index.js.map +1 -1
  43. package/dist/evidence/index.cjs +12 -50
  44. package/dist/evidence/index.d.cts +2 -229
  45. package/dist/evidence/index.d.ts +2 -229
  46. package/dist/evidence/index.js +1 -5
  47. package/dist/evidence-BuCICb0c.js +516 -0
  48. package/dist/evidence-BuCICb0c.js.map +1 -0
  49. package/dist/evidence-Cq48eDvA.cjs +575 -0
  50. package/dist/evidence-Cq48eDvA.cjs.map +1 -0
  51. package/dist/governance/index.cjs +24 -18
  52. package/dist/governance/index.cjs.map +1 -1
  53. package/dist/governance/index.d.cts +80 -83
  54. package/dist/governance/index.d.ts +80 -83
  55. package/dist/governance/index.js +22 -2
  56. package/dist/governance/index.js.map +1 -1
  57. package/dist/ids/index.cjs +52 -22
  58. package/dist/ids/index.cjs.map +1 -1
  59. package/dist/ids/index.d.cts +17 -17
  60. package/dist/ids/index.d.ts +17 -17
  61. package/dist/ids/index.js +49 -2
  62. package/dist/ids/index.js.map +1 -1
  63. package/dist/index-9jasmw76.d.cts +124 -0
  64. package/dist/index-BXpeFdk2.d.cts +190 -0
  65. package/dist/index-BXpeFdk2.d.ts +190 -0
  66. package/dist/index-BnbsKZsT.d.cts +231 -0
  67. package/dist/index-CIl1rYRv.d.cts +11 -0
  68. package/dist/index-CIl1rYRv.d.ts +11 -0
  69. package/dist/index-CVHA1ypT.d.cts +262 -0
  70. package/dist/index-DZ4mnNb7.d.cts +78 -0
  71. package/dist/index-DZ4mnNb7.d.ts +78 -0
  72. package/dist/index-IqcDvl69.d.ts +124 -0
  73. package/dist/index-fmUiRBXu.d.cts +57 -0
  74. package/dist/index-fmUiRBXu.d.ts +57 -0
  75. package/dist/index-sPUPs8pr.d.ts +262 -0
  76. package/dist/index-z9-CYOIo.d.ts +231 -0
  77. package/dist/index.cjs +111 -393
  78. package/dist/index.d.cts +18 -17
  79. package/dist/index.d.ts +18 -17
  80. package/dist/index.js +19 -20
  81. package/dist/manifest/index.cjs +224 -35
  82. package/dist/manifest/index.cjs.map +1 -1
  83. package/dist/manifest/index.d.cts +130 -131
  84. package/dist/manifest/index.d.ts +130 -131
  85. package/dist/manifest/index.js +219 -7
  86. package/dist/manifest/index.js.map +1 -1
  87. package/dist/modules/index.cjs +281 -42
  88. package/dist/modules/index.cjs.map +1 -1
  89. package/dist/modules/index.d.cts +157 -159
  90. package/dist/modules/index.d.ts +157 -159
  91. package/dist/modules/index.js +274 -6
  92. package/dist/modules/index.js.map +1 -1
  93. package/dist/objects/index.cjs +355 -22
  94. package/dist/objects/index.cjs.map +1 -1
  95. package/dist/objects/index.d.cts +2 -77
  96. package/dist/objects/index.d.ts +2 -77
  97. package/dist/objects/index.js +352 -2
  98. package/dist/objects/index.js.map +1 -1
  99. package/dist/policies/index.cjs +14 -56
  100. package/dist/policies/index.d.cts +2 -261
  101. package/dist/policies/index.d.ts +2 -261
  102. package/dist/policies/index.js +1 -3
  103. package/dist/policies-DH_GCXQ-.js +627 -0
  104. package/dist/policies-DH_GCXQ-.js.map +1 -0
  105. package/dist/policies-Nxbp1CH8.cjs +698 -0
  106. package/dist/policies-Nxbp1CH8.cjs.map +1 -0
  107. package/dist/privacy/index.cjs +26 -43
  108. package/dist/privacy/index.cjs.map +1 -1
  109. package/dist/privacy/index.d.cts +2 -189
  110. package/dist/privacy/index.d.ts +2 -189
  111. package/dist/privacy/index.js +18 -3
  112. package/dist/privacy/index.js.map +1 -1
  113. package/dist/projections/index.cjs +241 -23
  114. package/dist/projections/index.cjs.map +1 -1
  115. package/dist/projections/index.d.cts +2 -125
  116. package/dist/projections/index.d.ts +2 -125
  117. package/dist/projections/index.js +238 -3
  118. package/dist/projections/index.js.map +1 -1
  119. package/dist/state-machines/index.cjs +76 -18
  120. package/dist/state-machines/index.cjs.map +1 -1
  121. package/dist/state-machines/index.d.cts +2 -55
  122. package/dist/state-machines/index.d.ts +2 -55
  123. package/dist/state-machines/index.js +74 -2
  124. package/dist/state-machines/index.js.map +1 -1
  125. package/dist/testing/index.cjs +27 -19
  126. package/dist/testing/index.cjs.map +1 -1
  127. package/dist/testing/index.d.cts +17 -19
  128. package/dist/testing/index.d.ts +17 -19
  129. package/dist/testing/index.js +25 -3
  130. package/dist/testing/index.js.map +1 -1
  131. package/package.json +6 -5
  132. package/dist/chunk-2AE6TMAX.cjs +0 -44
  133. package/dist/chunk-2AE6TMAX.cjs.map +0 -1
  134. package/dist/chunk-6HY35TKB.cjs +0 -491
  135. package/dist/chunk-6HY35TKB.cjs.map +0 -1
  136. package/dist/chunk-6UGEIDLC.cjs +0 -26
  137. package/dist/chunk-6UGEIDLC.cjs.map +0 -1
  138. package/dist/chunk-7GAWSUOG.js +0 -64
  139. package/dist/chunk-7GAWSUOG.js.map +0 -1
  140. package/dist/chunk-A42JJIPL.cjs +0 -699
  141. package/dist/chunk-A42JJIPL.cjs.map +0 -1
  142. package/dist/chunk-AFXKSIVI.cjs +0 -540
  143. package/dist/chunk-AFXKSIVI.cjs.map +0 -1
  144. package/dist/chunk-B5DOGDPG.js +0 -42
  145. package/dist/chunk-B5DOGDPG.js.map +0 -1
  146. package/dist/chunk-BJGZE3GE.js +0 -20
  147. package/dist/chunk-BJGZE3GE.js.map +0 -1
  148. package/dist/chunk-CRZXTZ36.cjs +0 -258
  149. package/dist/chunk-CRZXTZ36.cjs.map +0 -1
  150. package/dist/chunk-D4SWRBUH.cjs +0 -22
  151. package/dist/chunk-D4SWRBUH.cjs.map +0 -1
  152. package/dist/chunk-DBTAUI6C.cjs +0 -395
  153. package/dist/chunk-DBTAUI6C.cjs.map +0 -1
  154. package/dist/chunk-EMSAFNPX.js +0 -98
  155. package/dist/chunk-EMSAFNPX.js.map +0 -1
  156. package/dist/chunk-F3E5SXPN.cjs +0 -28
  157. package/dist/chunk-F3E5SXPN.cjs.map +0 -1
  158. package/dist/chunk-HEYMMVDP.js +0 -480
  159. package/dist/chunk-HEYMMVDP.js.map +0 -1
  160. package/dist/chunk-IFW43ELT.cjs +0 -331
  161. package/dist/chunk-IFW43ELT.cjs.map +0 -1
  162. package/dist/chunk-LFE74IJX.js +0 -20
  163. package/dist/chunk-LFE74IJX.js.map +0 -1
  164. package/dist/chunk-LZSE6QGQ.cjs +0 -60
  165. package/dist/chunk-LZSE6QGQ.cjs.map +0 -1
  166. package/dist/chunk-MCWSUGB3.cjs +0 -102
  167. package/dist/chunk-MCWSUGB3.cjs.map +0 -1
  168. package/dist/chunk-MLBALEUR.js +0 -290
  169. package/dist/chunk-MLBALEUR.js.map +0 -1
  170. package/dist/chunk-NNXQZPB3.cjs +0 -31
  171. package/dist/chunk-NNXQZPB3.cjs.map +0 -1
  172. package/dist/chunk-OFCCZ27Z.js +0 -26
  173. package/dist/chunk-OFCCZ27Z.js.map +0 -1
  174. package/dist/chunk-PDN5DOLQ.js +0 -242
  175. package/dist/chunk-PDN5DOLQ.js.map +0 -1
  176. package/dist/chunk-PIDZQAEL.js +0 -50
  177. package/dist/chunk-PIDZQAEL.js.map +0 -1
  178. package/dist/chunk-PXD7NG6X.js +0 -686
  179. package/dist/chunk-PXD7NG6X.js.map +0 -1
  180. package/dist/chunk-Q4Q4JPR3.js +0 -524
  181. package/dist/chunk-Q4Q4JPR3.js.map +0 -1
  182. package/dist/chunk-RALMUSOX.js +0 -55
  183. package/dist/chunk-RALMUSOX.js.map +0 -1
  184. package/dist/chunk-SNTV45LH.cjs +0 -295
  185. package/dist/chunk-SNTV45LH.cjs.map +0 -1
  186. package/dist/chunk-TBS2S5AX.cjs +0 -40
  187. package/dist/chunk-TBS2S5AX.cjs.map +0 -1
  188. package/dist/chunk-TYNIFC7J.js +0 -253
  189. package/dist/chunk-TYNIFC7J.js.map +0 -1
  190. package/dist/chunk-UGWGHTNC.cjs +0 -56
  191. package/dist/chunk-UGWGHTNC.cjs.map +0 -1
  192. package/dist/chunk-WI7CWNYI.cjs +0 -68
  193. package/dist/chunk-WI7CWNYI.cjs.map +0 -1
  194. package/dist/chunk-WNZP53GI.js +0 -386
  195. package/dist/chunk-WNZP53GI.js.map +0 -1
  196. package/dist/chunk-WQ3BYI7T.cjs +0 -249
  197. package/dist/chunk-WQ3BYI7T.cjs.map +0 -1
  198. package/dist/chunk-Y2PJLRIY.js +0 -36
  199. package/dist/chunk-Y2PJLRIY.js.map +0 -1
  200. package/dist/chunk-ZAEVQSB5.js +0 -326
  201. package/dist/chunk-ZAEVQSB5.js.map +0 -1
  202. package/dist/chunk-ZMQTV5OJ.js +0 -27
  203. package/dist/chunk-ZMQTV5OJ.js.map +0 -1
  204. package/dist/evidence/index.cjs.map +0 -1
  205. package/dist/evidence/index.js.map +0 -1
  206. package/dist/index.cjs.map +0 -1
  207. package/dist/index.js.map +0 -1
  208. package/dist/policies/index.cjs.map +0 -1
  209. package/dist/policies/index.js.map +0 -1
@@ -1,110 +1,110 @@
1
- import { SurfaceDeclaration } from '../discovery/index.cjs';
2
- import { ActionExecutionContract, AdapterStepRetryPolicy, SchemaValidator } from '../actions/index.cjs';
3
- import { CapabilityMetadata, ModuleDependency, ObjectRelationDefinition, DeclarativeInvariant, FabricModule } from '../modules/index.cjs';
4
- import { PortableJsonSchema, JsonValue } from '../objects/index.cjs';
5
- import { PolicyKind, DataPolicyDefinition, PolicyFallbackDefinition } from '../policies/index.cjs';
6
- import { StateDefinition } from '../state-machines/index.cjs';
7
- import { ViewContract } from '../projections/index.cjs';
8
-
1
+ import { t as SurfaceDeclaration } from "../index-CIl1rYRv.cjs";
2
+ import { ActionExecutionContract, AdapterStepRetryPolicy, SchemaValidator } from "../actions/index.cjs";
3
+ import { i as JsonValue, o as PortableJsonSchema } from "../index-DZ4mnNb7.cjs";
4
+ import { T as PolicyKind, i as DataPolicyDefinition, y as PolicyFallbackDefinition } from "../index-CVHA1ypT.cjs";
5
+ import { n as StateDefinition } from "../index-fmUiRBXu.cjs";
6
+ import { l as ViewContract } from "../index-9jasmw76.cjs";
7
+ import { CapabilityMetadata, DeclarativeInvariant, FabricModule, ModuleDependency, ObjectRelationDefinition } from "../modules/index.cjs";
8
+ //#region manifest/index.d.ts
9
9
  /**
10
10
  * Version of the module manifest contract. Bump when the serialized shape
11
11
  * changes in a way consumers must detect.
12
12
  */
13
- declare const MODULE_MANIFEST_VERSION: 2;
14
- interface ModuleManifestObjectType {
15
- type: string;
16
- displayName?: string;
17
- idPrefix?: string;
18
- schema?: PortableJsonSchema;
19
- semantics?: Record<string, JsonValue>;
20
- relations?: ObjectRelationDefinition[];
21
- invariants?: DeclarativeInvariant[];
13
+ export declare const MODULE_MANIFEST_VERSION: 2;
14
+ export interface ModuleManifestObjectType {
15
+ type: string;
16
+ displayName?: string;
17
+ idPrefix?: string;
18
+ schema?: PortableJsonSchema;
19
+ semantics?: Record<string, JsonValue>;
20
+ relations?: ObjectRelationDefinition[];
21
+ invariants?: DeclarativeInvariant[];
22
22
  }
23
- interface ModuleManifestIdPrefix {
24
- prefix: string;
25
- name: string;
23
+ export interface ModuleManifestIdPrefix {
24
+ prefix: string;
25
+ name: string;
26
26
  }
27
- interface ModuleManifestEventType {
28
- eventType: string;
29
- schemaVersion: number;
30
- description?: string;
31
- schema?: PortableJsonSchema;
27
+ export interface ModuleManifestEventType {
28
+ eventType: string;
29
+ schemaVersion: number;
30
+ description?: string;
31
+ schema?: PortableJsonSchema;
32
32
  }
33
- interface ModuleManifestActionStateMachine {
34
- entityType: string;
35
- /** Present only when the binding declares a static target state. */
36
- targetState?: string;
33
+ export interface ModuleManifestActionStateMachine {
34
+ entityType: string;
35
+ /** Present only when the binding declares a static target state. */
36
+ targetState?: string;
37
37
  }
38
- interface ModuleManifestAdapterStep {
39
- adapterType: string;
40
- operation: string;
41
- retryPolicy?: AdapterStepRetryPolicy;
38
+ export interface ModuleManifestAdapterStep {
39
+ adapterType: string;
40
+ operation: string;
41
+ retryPolicy?: AdapterStepRetryPolicy;
42
42
  }
43
- interface ModuleManifestAction extends SurfaceDeclaration {
44
- actionId: string;
45
- version: number;
46
- kind: "atomic" | "saga";
47
- idempotent: boolean;
48
- mutatesDomain: boolean;
49
- emitsEvents: string[];
50
- policies?: string[];
51
- requiredRoles?: string[];
52
- requiredPermissions?: string[];
53
- eventPhase?: "before_adapters" | "after_adapters";
54
- execution?: ActionExecutionContract;
55
- /**
56
- * JSON Schema for the action parameters, present only when the action's
57
- * `schema` validator implements {@link JsonSchemaExportableValidator}.
58
- */
59
- parameterSchema?: unknown;
60
- parameterSchemaFormat?: "json-schema";
61
- resultSchema?: unknown;
62
- resultSchemaFormat?: "json-schema";
63
- stateMachine?: ModuleManifestActionStateMachine;
64
- adapterSteps?: ModuleManifestAdapterStep[];
43
+ export interface ModuleManifestAction extends SurfaceDeclaration {
44
+ actionId: string;
45
+ version: number;
46
+ kind: "atomic" | "saga";
47
+ idempotent: boolean;
48
+ mutatesDomain: boolean;
49
+ emitsEvents: string[];
50
+ policies?: string[];
51
+ requiredRoles?: string[];
52
+ requiredPermissions?: string[];
53
+ eventPhase?: "before_adapters" | "after_adapters";
54
+ execution?: ActionExecutionContract;
55
+ /**
56
+ * JSON Schema for the action parameters, present only when the action's
57
+ * `schema` validator implements {@link JsonSchemaExportableValidator}.
58
+ */
59
+ parameterSchema?: unknown;
60
+ parameterSchemaFormat?: "json-schema";
61
+ resultSchema?: unknown;
62
+ resultSchemaFormat?: "json-schema";
63
+ stateMachine?: ModuleManifestActionStateMachine;
64
+ adapterSteps?: ModuleManifestAdapterStep[];
65
65
  }
66
- interface ModuleManifestCodePolicy {
67
- type: "code";
68
- policyId: string;
69
- version: number;
70
- previewSafe?: boolean;
66
+ export interface ModuleManifestCodePolicy {
67
+ type: "code";
68
+ policyId: string;
69
+ version: number;
70
+ previewSafe?: boolean;
71
71
  }
72
- interface ModuleManifestDataPolicy {
73
- type: "data";
74
- policyId: string;
75
- policyVersion: number;
76
- kind: PolicyKind;
77
- dataDefinition?: DataPolicyDefinition;
78
- codeEvaluatorPolicyId?: string;
79
- fallback?: PolicyFallbackDefinition;
72
+ export interface ModuleManifestDataPolicy {
73
+ type: "data";
74
+ policyId: string;
75
+ policyVersion: number;
76
+ kind: PolicyKind;
77
+ dataDefinition?: DataPolicyDefinition;
78
+ codeEvaluatorPolicyId?: string;
79
+ fallback?: PolicyFallbackDefinition;
80
80
  }
81
- type ModuleManifestPolicy = ModuleManifestCodePolicy | ModuleManifestDataPolicy;
82
- interface ModuleManifestStateMachineTransition {
83
- from: string;
84
- to: string;
85
- causedByAction: string;
86
- /** `true` when the transition declares a guard function. The guard itself is never serialized. */
87
- hasGuard: boolean;
81
+ export type ModuleManifestPolicy = ModuleManifestCodePolicy | ModuleManifestDataPolicy;
82
+ export interface ModuleManifestStateMachineTransition {
83
+ from: string;
84
+ to: string;
85
+ causedByAction: string;
86
+ /** `true` when the transition declares a guard function. The guard itself is never serialized. */
87
+ hasGuard: boolean;
88
88
  }
89
- interface ModuleManifestStateMachine {
90
- entityType: string;
91
- /** States in declaration order (`Object.values` order of the definition record). */
92
- states: StateDefinition[];
93
- transitions: ModuleManifestStateMachineTransition[];
89
+ export interface ModuleManifestStateMachine {
90
+ entityType: string;
91
+ /** States in declaration order (`Object.values` order of the definition record). */
92
+ states: StateDefinition[];
93
+ transitions: ModuleManifestStateMachineTransition[];
94
94
  }
95
- interface ModuleManifestView extends SurfaceDeclaration {
96
- name: string;
97
- version: string;
98
- shape: PortableJsonSchema;
99
- parameterSchema?: PortableJsonSchema;
100
- consumes: Array<{
101
- eventType: string;
102
- schemaVersions: number[];
103
- }>;
104
- scope: "tenant-space";
105
- snapshotVersion: number;
106
- compatibleSnapshotVersions?: number[];
107
- usage?: ViewContract["usage"];
95
+ export interface ModuleManifestView extends SurfaceDeclaration {
96
+ name: string;
97
+ version: string;
98
+ shape: PortableJsonSchema;
99
+ parameterSchema?: PortableJsonSchema;
100
+ consumes: Array<{
101
+ eventType: string;
102
+ schemaVersions: number[];
103
+ }>;
104
+ scope: "tenant-space";
105
+ snapshotVersion: number;
106
+ compatibleSnapshotVersions?: number[];
107
+ usage?: ViewContract["usage"];
108
108
  }
109
109
  /**
110
110
  * Stable, JSON-serializable description of a {@link FabricModule}'s ontology:
@@ -116,51 +116,51 @@ interface ModuleManifestView extends SurfaceDeclaration {
116
116
  * secrets, or runtime data. Function fields (`handler`, `evaluate`, `guard`,
117
117
  * dynamic `targetState`, adapter `getInput`) are never serialized.
118
118
  */
119
- interface ModuleManifest {
120
- manifestVersion: typeof MODULE_MANIFEST_VERSION;
121
- namespace: string;
122
- version?: string;
123
- displayName?: string;
124
- description?: string;
125
- capability?: CapabilityMetadata;
126
- dependencies: ModuleDependency[];
127
- objectTypes: ModuleManifestObjectType[];
128
- subjectTypes: string[];
129
- idPrefixes: ModuleManifestIdPrefix[];
130
- eventTypes: ModuleManifestEventType[];
131
- actions: ModuleManifestAction[];
132
- policies: ModuleManifestPolicy[];
133
- stateMachines: ModuleManifestStateMachine[];
134
- views: ModuleManifestView[];
119
+ export interface ModuleManifest {
120
+ manifestVersion: typeof MODULE_MANIFEST_VERSION;
121
+ namespace: string;
122
+ version?: string;
123
+ displayName?: string;
124
+ description?: string;
125
+ capability?: CapabilityMetadata;
126
+ dependencies: ModuleDependency[];
127
+ objectTypes: ModuleManifestObjectType[];
128
+ subjectTypes: string[];
129
+ idPrefixes: ModuleManifestIdPrefix[];
130
+ eventTypes: ModuleManifestEventType[];
131
+ actions: ModuleManifestAction[];
132
+ policies: ModuleManifestPolicy[];
133
+ stateMachines: ModuleManifestStateMachine[];
134
+ views: ModuleManifestView[];
135
135
  }
136
- interface ModuleManifestBundle {
137
- manifestVersion: typeof MODULE_MANIFEST_VERSION;
138
- /** Manifests in the input module order. */
139
- modules: ModuleManifest[];
136
+ export interface ModuleManifestBundle {
137
+ manifestVersion: typeof MODULE_MANIFEST_VERSION;
138
+ /** Manifests in the input module order. */
139
+ modules: ModuleManifest[];
140
140
  }
141
141
  /** Manifest v1 remains accepted by v2 readers; missing v2 fields normalize to absence. */
142
- type ModuleManifestObjectTypeV1 = Omit<ModuleManifestObjectType, "schema" | "semantics" | "relations" | "invariants">;
143
- type ModuleManifestActionV1 = Omit<ModuleManifestAction, "resultSchema" | "resultSchemaFormat">;
144
- type ModuleManifestV1 = Omit<ModuleManifest, "manifestVersion" | "objectTypes" | "actions" | "views"> & {
145
- manifestVersion: 1;
146
- objectTypes: ModuleManifestObjectTypeV1[];
147
- actions: ModuleManifestActionV1[];
142
+ export type ModuleManifestObjectTypeV1 = Omit<ModuleManifestObjectType, "schema" | "semantics" | "relations" | "invariants">;
143
+ export type ModuleManifestActionV1 = Omit<ModuleManifestAction, "resultSchema" | "resultSchemaFormat">;
144
+ export type ModuleManifestV1 = Omit<ModuleManifest, "manifestVersion" | "objectTypes" | "actions" | "views"> & {
145
+ manifestVersion: 1;
146
+ objectTypes: ModuleManifestObjectTypeV1[];
147
+ actions: ModuleManifestActionV1[];
148
148
  };
149
- type ModuleManifestBundleV1 = Omit<ModuleManifestBundle, "manifestVersion" | "modules"> & {
150
- manifestVersion: 1;
151
- modules: ModuleManifestV1[];
149
+ export type ModuleManifestBundleV1 = Omit<ModuleManifestBundle, "manifestVersion" | "modules"> & {
150
+ manifestVersion: 1;
151
+ modules: ModuleManifestV1[];
152
152
  };
153
- declare function normalizeModuleManifest(manifest: ModuleManifest | ModuleManifestV1): ModuleManifest;
154
- declare function normalizeModuleManifestBundle(bundle: ModuleManifestBundle | ModuleManifestBundleV1): ModuleManifestBundle;
153
+ export declare function normalizeModuleManifest(manifest: ModuleManifest | ModuleManifestV1): ModuleManifest;
154
+ export declare function normalizeModuleManifestBundle(bundle: ModuleManifestBundle | ModuleManifestBundleV1): ModuleManifestBundle;
155
155
  /**
156
156
  * A {@link SchemaValidator} that can also export its parameter schema as JSON
157
157
  * Schema (for example a Zod 4 schema via `z.toJSONSchema`). Keeps the platform
158
158
  * zero-dependency while letting schema-bearing actions flow into manifests.
159
159
  */
160
- interface JsonSchemaExportableValidator extends SchemaValidator {
161
- toJSONSchema(): Record<string, unknown>;
160
+ export interface JsonSchemaExportableValidator extends SchemaValidator {
161
+ toJSONSchema(): Record<string, unknown>;
162
162
  }
163
- declare function isJsonSchemaExportableValidator(schema: SchemaValidator): schema is JsonSchemaExportableValidator;
163
+ export declare function isJsonSchemaExportableValidator(schema: SchemaValidator): schema is JsonSchemaExportableValidator;
164
164
  /**
165
165
  * Export a stable, JSON-serializable manifest of a module's ontology.
166
166
  *
@@ -175,11 +175,10 @@ declare function isJsonSchemaExportableValidator(schema: SchemaValidator): schem
175
175
  * policy `evaluate`, transition `guard` → `hasGuard`, dynamic `targetState`,
176
176
  * adapter `getInput`).
177
177
  */
178
- declare function exportModuleManifest(module: FabricModule<unknown>): ModuleManifest;
178
+ export declare function exportModuleManifest(module: FabricModule<unknown>): ModuleManifest;
179
179
  /**
180
180
  * Export manifests for a set of modules, preserving the input order.
181
181
  * Like {@link exportModuleManifest}, this is pure and registry-free.
182
182
  */
183
- declare function exportModuleManifestBundle(modules: FabricModule<unknown>[]): ModuleManifestBundle;
184
-
185
- export { type JsonSchemaExportableValidator, MODULE_MANIFEST_VERSION, type ModuleManifest, type ModuleManifestAction, type ModuleManifestActionStateMachine, type ModuleManifestActionV1, type ModuleManifestAdapterStep, type ModuleManifestBundle, type ModuleManifestBundleV1, type ModuleManifestCodePolicy, type ModuleManifestDataPolicy, type ModuleManifestEventType, type ModuleManifestIdPrefix, type ModuleManifestObjectType, type ModuleManifestObjectTypeV1, type ModuleManifestPolicy, type ModuleManifestStateMachine, type ModuleManifestStateMachineTransition, type ModuleManifestV1, type ModuleManifestView, exportModuleManifest, exportModuleManifestBundle, isJsonSchemaExportableValidator, normalizeModuleManifest, normalizeModuleManifestBundle };
183
+ export declare function exportModuleManifestBundle(modules: FabricModule<unknown>[]): ModuleManifestBundle;
184
+ //#endregion
@@ -1,110 +1,110 @@
1
- import { SurfaceDeclaration } from '../discovery/index.js';
2
- import { ActionExecutionContract, AdapterStepRetryPolicy, SchemaValidator } from '../actions/index.js';
3
- import { CapabilityMetadata, ModuleDependency, ObjectRelationDefinition, DeclarativeInvariant, FabricModule } from '../modules/index.js';
4
- import { PortableJsonSchema, JsonValue } from '../objects/index.js';
5
- import { PolicyKind, DataPolicyDefinition, PolicyFallbackDefinition } from '../policies/index.js';
6
- import { StateDefinition } from '../state-machines/index.js';
7
- import { ViewContract } from '../projections/index.js';
8
-
1
+ import { t as SurfaceDeclaration } from "../index-CIl1rYRv.js";
2
+ import { ActionExecutionContract, AdapterStepRetryPolicy, SchemaValidator } from "../actions/index.js";
3
+ import { i as JsonValue, o as PortableJsonSchema } from "../index-DZ4mnNb7.js";
4
+ import { T as PolicyKind, i as DataPolicyDefinition, y as PolicyFallbackDefinition } from "../index-sPUPs8pr.js";
5
+ import { n as StateDefinition } from "../index-fmUiRBXu.js";
6
+ import { l as ViewContract } from "../index-IqcDvl69.js";
7
+ import { CapabilityMetadata, DeclarativeInvariant, FabricModule, ModuleDependency, ObjectRelationDefinition } from "../modules/index.js";
8
+ //#region manifest/index.d.ts
9
9
  /**
10
10
  * Version of the module manifest contract. Bump when the serialized shape
11
11
  * changes in a way consumers must detect.
12
12
  */
13
- declare const MODULE_MANIFEST_VERSION: 2;
14
- interface ModuleManifestObjectType {
15
- type: string;
16
- displayName?: string;
17
- idPrefix?: string;
18
- schema?: PortableJsonSchema;
19
- semantics?: Record<string, JsonValue>;
20
- relations?: ObjectRelationDefinition[];
21
- invariants?: DeclarativeInvariant[];
13
+ export declare const MODULE_MANIFEST_VERSION: 2;
14
+ export interface ModuleManifestObjectType {
15
+ type: string;
16
+ displayName?: string;
17
+ idPrefix?: string;
18
+ schema?: PortableJsonSchema;
19
+ semantics?: Record<string, JsonValue>;
20
+ relations?: ObjectRelationDefinition[];
21
+ invariants?: DeclarativeInvariant[];
22
22
  }
23
- interface ModuleManifestIdPrefix {
24
- prefix: string;
25
- name: string;
23
+ export interface ModuleManifestIdPrefix {
24
+ prefix: string;
25
+ name: string;
26
26
  }
27
- interface ModuleManifestEventType {
28
- eventType: string;
29
- schemaVersion: number;
30
- description?: string;
31
- schema?: PortableJsonSchema;
27
+ export interface ModuleManifestEventType {
28
+ eventType: string;
29
+ schemaVersion: number;
30
+ description?: string;
31
+ schema?: PortableJsonSchema;
32
32
  }
33
- interface ModuleManifestActionStateMachine {
34
- entityType: string;
35
- /** Present only when the binding declares a static target state. */
36
- targetState?: string;
33
+ export interface ModuleManifestActionStateMachine {
34
+ entityType: string;
35
+ /** Present only when the binding declares a static target state. */
36
+ targetState?: string;
37
37
  }
38
- interface ModuleManifestAdapterStep {
39
- adapterType: string;
40
- operation: string;
41
- retryPolicy?: AdapterStepRetryPolicy;
38
+ export interface ModuleManifestAdapterStep {
39
+ adapterType: string;
40
+ operation: string;
41
+ retryPolicy?: AdapterStepRetryPolicy;
42
42
  }
43
- interface ModuleManifestAction extends SurfaceDeclaration {
44
- actionId: string;
45
- version: number;
46
- kind: "atomic" | "saga";
47
- idempotent: boolean;
48
- mutatesDomain: boolean;
49
- emitsEvents: string[];
50
- policies?: string[];
51
- requiredRoles?: string[];
52
- requiredPermissions?: string[];
53
- eventPhase?: "before_adapters" | "after_adapters";
54
- execution?: ActionExecutionContract;
55
- /**
56
- * JSON Schema for the action parameters, present only when the action's
57
- * `schema` validator implements {@link JsonSchemaExportableValidator}.
58
- */
59
- parameterSchema?: unknown;
60
- parameterSchemaFormat?: "json-schema";
61
- resultSchema?: unknown;
62
- resultSchemaFormat?: "json-schema";
63
- stateMachine?: ModuleManifestActionStateMachine;
64
- adapterSteps?: ModuleManifestAdapterStep[];
43
+ export interface ModuleManifestAction extends SurfaceDeclaration {
44
+ actionId: string;
45
+ version: number;
46
+ kind: "atomic" | "saga";
47
+ idempotent: boolean;
48
+ mutatesDomain: boolean;
49
+ emitsEvents: string[];
50
+ policies?: string[];
51
+ requiredRoles?: string[];
52
+ requiredPermissions?: string[];
53
+ eventPhase?: "before_adapters" | "after_adapters";
54
+ execution?: ActionExecutionContract;
55
+ /**
56
+ * JSON Schema for the action parameters, present only when the action's
57
+ * `schema` validator implements {@link JsonSchemaExportableValidator}.
58
+ */
59
+ parameterSchema?: unknown;
60
+ parameterSchemaFormat?: "json-schema";
61
+ resultSchema?: unknown;
62
+ resultSchemaFormat?: "json-schema";
63
+ stateMachine?: ModuleManifestActionStateMachine;
64
+ adapterSteps?: ModuleManifestAdapterStep[];
65
65
  }
66
- interface ModuleManifestCodePolicy {
67
- type: "code";
68
- policyId: string;
69
- version: number;
70
- previewSafe?: boolean;
66
+ export interface ModuleManifestCodePolicy {
67
+ type: "code";
68
+ policyId: string;
69
+ version: number;
70
+ previewSafe?: boolean;
71
71
  }
72
- interface ModuleManifestDataPolicy {
73
- type: "data";
74
- policyId: string;
75
- policyVersion: number;
76
- kind: PolicyKind;
77
- dataDefinition?: DataPolicyDefinition;
78
- codeEvaluatorPolicyId?: string;
79
- fallback?: PolicyFallbackDefinition;
72
+ export interface ModuleManifestDataPolicy {
73
+ type: "data";
74
+ policyId: string;
75
+ policyVersion: number;
76
+ kind: PolicyKind;
77
+ dataDefinition?: DataPolicyDefinition;
78
+ codeEvaluatorPolicyId?: string;
79
+ fallback?: PolicyFallbackDefinition;
80
80
  }
81
- type ModuleManifestPolicy = ModuleManifestCodePolicy | ModuleManifestDataPolicy;
82
- interface ModuleManifestStateMachineTransition {
83
- from: string;
84
- to: string;
85
- causedByAction: string;
86
- /** `true` when the transition declares a guard function. The guard itself is never serialized. */
87
- hasGuard: boolean;
81
+ export type ModuleManifestPolicy = ModuleManifestCodePolicy | ModuleManifestDataPolicy;
82
+ export interface ModuleManifestStateMachineTransition {
83
+ from: string;
84
+ to: string;
85
+ causedByAction: string;
86
+ /** `true` when the transition declares a guard function. The guard itself is never serialized. */
87
+ hasGuard: boolean;
88
88
  }
89
- interface ModuleManifestStateMachine {
90
- entityType: string;
91
- /** States in declaration order (`Object.values` order of the definition record). */
92
- states: StateDefinition[];
93
- transitions: ModuleManifestStateMachineTransition[];
89
+ export interface ModuleManifestStateMachine {
90
+ entityType: string;
91
+ /** States in declaration order (`Object.values` order of the definition record). */
92
+ states: StateDefinition[];
93
+ transitions: ModuleManifestStateMachineTransition[];
94
94
  }
95
- interface ModuleManifestView extends SurfaceDeclaration {
96
- name: string;
97
- version: string;
98
- shape: PortableJsonSchema;
99
- parameterSchema?: PortableJsonSchema;
100
- consumes: Array<{
101
- eventType: string;
102
- schemaVersions: number[];
103
- }>;
104
- scope: "tenant-space";
105
- snapshotVersion: number;
106
- compatibleSnapshotVersions?: number[];
107
- usage?: ViewContract["usage"];
95
+ export interface ModuleManifestView extends SurfaceDeclaration {
96
+ name: string;
97
+ version: string;
98
+ shape: PortableJsonSchema;
99
+ parameterSchema?: PortableJsonSchema;
100
+ consumes: Array<{
101
+ eventType: string;
102
+ schemaVersions: number[];
103
+ }>;
104
+ scope: "tenant-space";
105
+ snapshotVersion: number;
106
+ compatibleSnapshotVersions?: number[];
107
+ usage?: ViewContract["usage"];
108
108
  }
109
109
  /**
110
110
  * Stable, JSON-serializable description of a {@link FabricModule}'s ontology:
@@ -116,51 +116,51 @@ interface ModuleManifestView extends SurfaceDeclaration {
116
116
  * secrets, or runtime data. Function fields (`handler`, `evaluate`, `guard`,
117
117
  * dynamic `targetState`, adapter `getInput`) are never serialized.
118
118
  */
119
- interface ModuleManifest {
120
- manifestVersion: typeof MODULE_MANIFEST_VERSION;
121
- namespace: string;
122
- version?: string;
123
- displayName?: string;
124
- description?: string;
125
- capability?: CapabilityMetadata;
126
- dependencies: ModuleDependency[];
127
- objectTypes: ModuleManifestObjectType[];
128
- subjectTypes: string[];
129
- idPrefixes: ModuleManifestIdPrefix[];
130
- eventTypes: ModuleManifestEventType[];
131
- actions: ModuleManifestAction[];
132
- policies: ModuleManifestPolicy[];
133
- stateMachines: ModuleManifestStateMachine[];
134
- views: ModuleManifestView[];
119
+ export interface ModuleManifest {
120
+ manifestVersion: typeof MODULE_MANIFEST_VERSION;
121
+ namespace: string;
122
+ version?: string;
123
+ displayName?: string;
124
+ description?: string;
125
+ capability?: CapabilityMetadata;
126
+ dependencies: ModuleDependency[];
127
+ objectTypes: ModuleManifestObjectType[];
128
+ subjectTypes: string[];
129
+ idPrefixes: ModuleManifestIdPrefix[];
130
+ eventTypes: ModuleManifestEventType[];
131
+ actions: ModuleManifestAction[];
132
+ policies: ModuleManifestPolicy[];
133
+ stateMachines: ModuleManifestStateMachine[];
134
+ views: ModuleManifestView[];
135
135
  }
136
- interface ModuleManifestBundle {
137
- manifestVersion: typeof MODULE_MANIFEST_VERSION;
138
- /** Manifests in the input module order. */
139
- modules: ModuleManifest[];
136
+ export interface ModuleManifestBundle {
137
+ manifestVersion: typeof MODULE_MANIFEST_VERSION;
138
+ /** Manifests in the input module order. */
139
+ modules: ModuleManifest[];
140
140
  }
141
141
  /** Manifest v1 remains accepted by v2 readers; missing v2 fields normalize to absence. */
142
- type ModuleManifestObjectTypeV1 = Omit<ModuleManifestObjectType, "schema" | "semantics" | "relations" | "invariants">;
143
- type ModuleManifestActionV1 = Omit<ModuleManifestAction, "resultSchema" | "resultSchemaFormat">;
144
- type ModuleManifestV1 = Omit<ModuleManifest, "manifestVersion" | "objectTypes" | "actions" | "views"> & {
145
- manifestVersion: 1;
146
- objectTypes: ModuleManifestObjectTypeV1[];
147
- actions: ModuleManifestActionV1[];
142
+ export type ModuleManifestObjectTypeV1 = Omit<ModuleManifestObjectType, "schema" | "semantics" | "relations" | "invariants">;
143
+ export type ModuleManifestActionV1 = Omit<ModuleManifestAction, "resultSchema" | "resultSchemaFormat">;
144
+ export type ModuleManifestV1 = Omit<ModuleManifest, "manifestVersion" | "objectTypes" | "actions" | "views"> & {
145
+ manifestVersion: 1;
146
+ objectTypes: ModuleManifestObjectTypeV1[];
147
+ actions: ModuleManifestActionV1[];
148
148
  };
149
- type ModuleManifestBundleV1 = Omit<ModuleManifestBundle, "manifestVersion" | "modules"> & {
150
- manifestVersion: 1;
151
- modules: ModuleManifestV1[];
149
+ export type ModuleManifestBundleV1 = Omit<ModuleManifestBundle, "manifestVersion" | "modules"> & {
150
+ manifestVersion: 1;
151
+ modules: ModuleManifestV1[];
152
152
  };
153
- declare function normalizeModuleManifest(manifest: ModuleManifest | ModuleManifestV1): ModuleManifest;
154
- declare function normalizeModuleManifestBundle(bundle: ModuleManifestBundle | ModuleManifestBundleV1): ModuleManifestBundle;
153
+ export declare function normalizeModuleManifest(manifest: ModuleManifest | ModuleManifestV1): ModuleManifest;
154
+ export declare function normalizeModuleManifestBundle(bundle: ModuleManifestBundle | ModuleManifestBundleV1): ModuleManifestBundle;
155
155
  /**
156
156
  * A {@link SchemaValidator} that can also export its parameter schema as JSON
157
157
  * Schema (for example a Zod 4 schema via `z.toJSONSchema`). Keeps the platform
158
158
  * zero-dependency while letting schema-bearing actions flow into manifests.
159
159
  */
160
- interface JsonSchemaExportableValidator extends SchemaValidator {
161
- toJSONSchema(): Record<string, unknown>;
160
+ export interface JsonSchemaExportableValidator extends SchemaValidator {
161
+ toJSONSchema(): Record<string, unknown>;
162
162
  }
163
- declare function isJsonSchemaExportableValidator(schema: SchemaValidator): schema is JsonSchemaExportableValidator;
163
+ export declare function isJsonSchemaExportableValidator(schema: SchemaValidator): schema is JsonSchemaExportableValidator;
164
164
  /**
165
165
  * Export a stable, JSON-serializable manifest of a module's ontology.
166
166
  *
@@ -175,11 +175,10 @@ declare function isJsonSchemaExportableValidator(schema: SchemaValidator): schem
175
175
  * policy `evaluate`, transition `guard` → `hasGuard`, dynamic `targetState`,
176
176
  * adapter `getInput`).
177
177
  */
178
- declare function exportModuleManifest(module: FabricModule<unknown>): ModuleManifest;
178
+ export declare function exportModuleManifest(module: FabricModule<unknown>): ModuleManifest;
179
179
  /**
180
180
  * Export manifests for a set of modules, preserving the input order.
181
181
  * Like {@link exportModuleManifest}, this is pure and registry-free.
182
182
  */
183
- declare function exportModuleManifestBundle(modules: FabricModule<unknown>[]): ModuleManifestBundle;
184
-
185
- export { type JsonSchemaExportableValidator, MODULE_MANIFEST_VERSION, type ModuleManifest, type ModuleManifestAction, type ModuleManifestActionStateMachine, type ModuleManifestActionV1, type ModuleManifestAdapterStep, type ModuleManifestBundle, type ModuleManifestBundleV1, type ModuleManifestCodePolicy, type ModuleManifestDataPolicy, type ModuleManifestEventType, type ModuleManifestIdPrefix, type ModuleManifestObjectType, type ModuleManifestObjectTypeV1, type ModuleManifestPolicy, type ModuleManifestStateMachine, type ModuleManifestStateMachineTransition, type ModuleManifestV1, type ModuleManifestView, exportModuleManifest, exportModuleManifestBundle, isJsonSchemaExportableValidator, normalizeModuleManifest, normalizeModuleManifestBundle };
183
+ export declare function exportModuleManifestBundle(modules: FabricModule<unknown>[]): ModuleManifestBundle;
184
+ //#endregion