@fabricorg/platform 1.9.0 → 1.10.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.
- package/CHANGELOG.md +56 -0
- package/README.md +48 -2
- package/dist/actions/index.cjs +45 -26
- package/dist/actions/index.cjs.map +1 -1
- package/dist/actions/index.d.cts +225 -226
- package/dist/actions/index.d.ts +225 -226
- package/dist/actions/index.js +41 -2
- package/dist/actions/index.js.map +1 -1
- package/dist/adapters/index.cjs +696 -66
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.d.cts +367 -365
- package/dist/adapters/index.d.ts +367 -365
- package/dist/adapters/index.js +682 -2
- package/dist/adapters/index.js.map +1 -1
- package/dist/agent-hitl/index.cjs +21 -10
- package/dist/agent-hitl/index.cjs.map +1 -1
- package/dist/agent-hitl/index.d.cts +30 -30
- package/dist/agent-hitl/index.d.ts +30 -30
- package/dist/agent-hitl/index.js +21 -2
- package/dist/agent-hitl/index.js.map +1 -1
- package/dist/certification/index.cjs +109 -24
- package/dist/certification/index.cjs.map +1 -1
- package/dist/certification/index.d.cts +33 -39
- package/dist/certification/index.d.ts +33 -39
- package/dist/certification/index.js +107 -8
- package/dist/certification/index.js.map +1 -1
- package/dist/discovery/index.cjs +12 -10
- package/dist/discovery/index.cjs.map +1 -1
- package/dist/discovery/index.d.cts +2 -10
- package/dist/discovery/index.d.ts +2 -10
- package/dist/discovery/index.js +12 -2
- package/dist/discovery/index.js.map +1 -1
- package/dist/engine-B4csEOEc.js +223 -0
- package/dist/engine-B4csEOEc.js.map +1 -0
- package/dist/engine-BqScuhrT.cjs +246 -0
- package/dist/engine-BqScuhrT.cjs.map +1 -0
- package/dist/events/index.cjs +39 -10
- package/dist/events/index.cjs.map +1 -1
- package/dist/events/index.d.cts +43 -43
- package/dist/events/index.d.ts +43 -43
- package/dist/events/index.js +39 -2
- package/dist/events/index.js.map +1 -1
- package/dist/evidence/index.cjs +12 -50
- package/dist/evidence/index.d.cts +2 -229
- package/dist/evidence/index.d.ts +2 -229
- package/dist/evidence/index.js +1 -5
- package/dist/evidence-BuCICb0c.js +516 -0
- package/dist/evidence-BuCICb0c.js.map +1 -0
- package/dist/evidence-Cq48eDvA.cjs +575 -0
- package/dist/evidence-Cq48eDvA.cjs.map +1 -0
- package/dist/governance/index.cjs +24 -18
- package/dist/governance/index.cjs.map +1 -1
- package/dist/governance/index.d.cts +80 -83
- package/dist/governance/index.d.ts +80 -83
- package/dist/governance/index.js +22 -2
- package/dist/governance/index.js.map +1 -1
- package/dist/ids/index.cjs +52 -22
- package/dist/ids/index.cjs.map +1 -1
- package/dist/ids/index.d.cts +17 -17
- package/dist/ids/index.d.ts +17 -17
- package/dist/ids/index.js +49 -2
- package/dist/ids/index.js.map +1 -1
- package/dist/index-9jasmw76.d.cts +124 -0
- package/dist/index-BXpeFdk2.d.cts +190 -0
- package/dist/index-BXpeFdk2.d.ts +190 -0
- package/dist/index-BnbsKZsT.d.cts +231 -0
- package/dist/index-CIl1rYRv.d.cts +11 -0
- package/dist/index-CIl1rYRv.d.ts +11 -0
- package/dist/index-CVHA1ypT.d.cts +262 -0
- package/dist/index-DZ4mnNb7.d.cts +78 -0
- package/dist/index-DZ4mnNb7.d.ts +78 -0
- package/dist/index-IqcDvl69.d.ts +124 -0
- package/dist/index-fmUiRBXu.d.cts +57 -0
- package/dist/index-fmUiRBXu.d.ts +57 -0
- package/dist/index-sPUPs8pr.d.ts +262 -0
- package/dist/index-z9-CYOIo.d.ts +231 -0
- package/dist/index.cjs +111 -385
- package/dist/index.d.cts +18 -17
- package/dist/index.d.ts +18 -17
- package/dist/index.js +19 -20
- package/dist/manifest/index.cjs +224 -35
- package/dist/manifest/index.cjs.map +1 -1
- package/dist/manifest/index.d.cts +130 -131
- package/dist/manifest/index.d.ts +130 -131
- package/dist/manifest/index.js +219 -7
- package/dist/manifest/index.js.map +1 -1
- package/dist/modules/index.cjs +281 -42
- package/dist/modules/index.cjs.map +1 -1
- package/dist/modules/index.d.cts +157 -159
- package/dist/modules/index.d.ts +157 -159
- package/dist/modules/index.js +274 -6
- package/dist/modules/index.js.map +1 -1
- package/dist/objects/index.cjs +355 -22
- package/dist/objects/index.cjs.map +1 -1
- package/dist/objects/index.d.cts +2 -77
- package/dist/objects/index.d.ts +2 -77
- package/dist/objects/index.js +352 -2
- package/dist/objects/index.js.map +1 -1
- package/dist/policies/index.cjs +14 -48
- package/dist/policies/index.d.cts +2 -247
- package/dist/policies/index.d.ts +2 -247
- package/dist/policies/index.js +1 -3
- package/dist/policies-DH_GCXQ-.js +627 -0
- package/dist/policies-DH_GCXQ-.js.map +1 -0
- package/dist/policies-Nxbp1CH8.cjs +698 -0
- package/dist/policies-Nxbp1CH8.cjs.map +1 -0
- package/dist/privacy/index.cjs +26 -43
- package/dist/privacy/index.cjs.map +1 -1
- package/dist/privacy/index.d.cts +2 -189
- package/dist/privacy/index.d.ts +2 -189
- package/dist/privacy/index.js +18 -3
- package/dist/privacy/index.js.map +1 -1
- package/dist/projections/index.cjs +241 -23
- package/dist/projections/index.cjs.map +1 -1
- package/dist/projections/index.d.cts +2 -125
- package/dist/projections/index.d.ts +2 -125
- package/dist/projections/index.js +238 -3
- package/dist/projections/index.js.map +1 -1
- package/dist/state-machines/index.cjs +76 -18
- package/dist/state-machines/index.cjs.map +1 -1
- package/dist/state-machines/index.d.cts +2 -55
- package/dist/state-machines/index.d.ts +2 -55
- package/dist/state-machines/index.js +74 -2
- package/dist/state-machines/index.js.map +1 -1
- package/dist/testing/index.cjs +27 -19
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +17 -19
- package/dist/testing/index.d.ts +17 -19
- package/dist/testing/index.js +25 -3
- package/dist/testing/index.js.map +1 -1
- package/package.json +6 -5
- package/dist/chunk-2AE6TMAX.cjs +0 -44
- package/dist/chunk-2AE6TMAX.cjs.map +0 -1
- package/dist/chunk-6HY35TKB.cjs +0 -491
- package/dist/chunk-6HY35TKB.cjs.map +0 -1
- package/dist/chunk-6UGEIDLC.cjs +0 -26
- package/dist/chunk-6UGEIDLC.cjs.map +0 -1
- package/dist/chunk-7GAWSUOG.js +0 -64
- package/dist/chunk-7GAWSUOG.js.map +0 -1
- package/dist/chunk-AFXFAEWA.js +0 -673
- package/dist/chunk-AFXFAEWA.js.map +0 -1
- package/dist/chunk-AFXKSIVI.cjs +0 -540
- package/dist/chunk-AFXKSIVI.cjs.map +0 -1
- package/dist/chunk-B5DOGDPG.js +0 -42
- package/dist/chunk-B5DOGDPG.js.map +0 -1
- package/dist/chunk-BJGZE3GE.js +0 -20
- package/dist/chunk-BJGZE3GE.js.map +0 -1
- package/dist/chunk-CRZXTZ36.cjs +0 -258
- package/dist/chunk-CRZXTZ36.cjs.map +0 -1
- package/dist/chunk-D4SWRBUH.cjs +0 -22
- package/dist/chunk-D4SWRBUH.cjs.map +0 -1
- package/dist/chunk-DBTAUI6C.cjs +0 -395
- package/dist/chunk-DBTAUI6C.cjs.map +0 -1
- package/dist/chunk-EMSAFNPX.js +0 -98
- package/dist/chunk-EMSAFNPX.js.map +0 -1
- package/dist/chunk-F3E5SXPN.cjs +0 -28
- package/dist/chunk-F3E5SXPN.cjs.map +0 -1
- package/dist/chunk-HEYMMVDP.js +0 -480
- package/dist/chunk-HEYMMVDP.js.map +0 -1
- package/dist/chunk-IFW43ELT.cjs +0 -331
- package/dist/chunk-IFW43ELT.cjs.map +0 -1
- package/dist/chunk-LFE74IJX.js +0 -20
- package/dist/chunk-LFE74IJX.js.map +0 -1
- package/dist/chunk-LZSE6QGQ.cjs +0 -60
- package/dist/chunk-LZSE6QGQ.cjs.map +0 -1
- package/dist/chunk-MCWSUGB3.cjs +0 -102
- package/dist/chunk-MCWSUGB3.cjs.map +0 -1
- package/dist/chunk-MLBALEUR.js +0 -290
- package/dist/chunk-MLBALEUR.js.map +0 -1
- package/dist/chunk-NNXQZPB3.cjs +0 -31
- package/dist/chunk-NNXQZPB3.cjs.map +0 -1
- package/dist/chunk-OFCCZ27Z.js +0 -26
- package/dist/chunk-OFCCZ27Z.js.map +0 -1
- package/dist/chunk-PDN5DOLQ.js +0 -242
- package/dist/chunk-PDN5DOLQ.js.map +0 -1
- package/dist/chunk-PIDZQAEL.js +0 -50
- package/dist/chunk-PIDZQAEL.js.map +0 -1
- package/dist/chunk-Q4Q4JPR3.js +0 -524
- package/dist/chunk-Q4Q4JPR3.js.map +0 -1
- package/dist/chunk-RALMUSOX.js +0 -55
- package/dist/chunk-RALMUSOX.js.map +0 -1
- package/dist/chunk-SNTV45LH.cjs +0 -295
- package/dist/chunk-SNTV45LH.cjs.map +0 -1
- package/dist/chunk-TBS2S5AX.cjs +0 -40
- package/dist/chunk-TBS2S5AX.cjs.map +0 -1
- package/dist/chunk-TYNIFC7J.js +0 -253
- package/dist/chunk-TYNIFC7J.js.map +0 -1
- package/dist/chunk-UGWGHTNC.cjs +0 -56
- package/dist/chunk-UGWGHTNC.cjs.map +0 -1
- package/dist/chunk-WI7CWNYI.cjs +0 -68
- package/dist/chunk-WI7CWNYI.cjs.map +0 -1
- package/dist/chunk-WNZP53GI.js +0 -386
- package/dist/chunk-WNZP53GI.js.map +0 -1
- package/dist/chunk-WQ3BYI7T.cjs +0 -249
- package/dist/chunk-WQ3BYI7T.cjs.map +0 -1
- package/dist/chunk-Y2PJLRIY.js +0 -36
- package/dist/chunk-Y2PJLRIY.js.map +0 -1
- package/dist/chunk-YGIPN3TU.cjs +0 -684
- package/dist/chunk-YGIPN3TU.cjs.map +0 -1
- package/dist/chunk-ZAEVQSB5.js +0 -326
- package/dist/chunk-ZAEVQSB5.js.map +0 -1
- package/dist/chunk-ZMQTV5OJ.js +0 -27
- package/dist/chunk-ZMQTV5OJ.js.map +0 -1
- package/dist/evidence/index.cjs.map +0 -1
- package/dist/evidence/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/policies/index.cjs.map +0 -1
- package/dist/policies/index.js.map +0 -1
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
import { SurfaceDeclaration } from
|
|
2
|
-
import { ActionExecutionContract, AdapterStepRetryPolicy, SchemaValidator } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
25
|
-
|
|
23
|
+
export interface ModuleManifestIdPrefix {
|
|
24
|
+
prefix: string;
|
|
25
|
+
name: string;
|
|
26
26
|
}
|
|
27
|
-
interface ModuleManifestEventType {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
export interface ModuleManifestEventType {
|
|
28
|
+
eventType: string;
|
|
29
|
+
schemaVersion: number;
|
|
30
|
+
description?: string;
|
|
31
|
+
schema?: PortableJsonSchema;
|
|
32
32
|
}
|
|
33
|
-
interface ModuleManifestActionStateMachine {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
export interface ModuleManifestAdapterStep {
|
|
39
|
+
adapterType: string;
|
|
40
|
+
operation: string;
|
|
41
|
+
retryPolicy?: AdapterStepRetryPolicy;
|
|
42
42
|
}
|
|
43
|
-
interface ModuleManifestAction extends SurfaceDeclaration {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
export interface ModuleManifestCodePolicy {
|
|
67
|
+
type: "code";
|
|
68
|
+
policyId: string;
|
|
69
|
+
version: number;
|
|
70
|
+
previewSafe?: boolean;
|
|
71
71
|
}
|
|
72
|
-
interface ModuleManifestDataPolicy {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
151
|
-
|
|
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
|
-
|
|
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
|
package/dist/manifest/index.d.ts
CHANGED
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
import { SurfaceDeclaration } from
|
|
2
|
-
import { ActionExecutionContract, AdapterStepRetryPolicy, SchemaValidator } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
25
|
-
|
|
23
|
+
export interface ModuleManifestIdPrefix {
|
|
24
|
+
prefix: string;
|
|
25
|
+
name: string;
|
|
26
26
|
}
|
|
27
|
-
interface ModuleManifestEventType {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
export interface ModuleManifestEventType {
|
|
28
|
+
eventType: string;
|
|
29
|
+
schemaVersion: number;
|
|
30
|
+
description?: string;
|
|
31
|
+
schema?: PortableJsonSchema;
|
|
32
32
|
}
|
|
33
|
-
interface ModuleManifestActionStateMachine {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
export interface ModuleManifestAdapterStep {
|
|
39
|
+
adapterType: string;
|
|
40
|
+
operation: string;
|
|
41
|
+
retryPolicy?: AdapterStepRetryPolicy;
|
|
42
42
|
}
|
|
43
|
-
interface ModuleManifestAction extends SurfaceDeclaration {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
export interface ModuleManifestCodePolicy {
|
|
67
|
+
type: "code";
|
|
68
|
+
policyId: string;
|
|
69
|
+
version: number;
|
|
70
|
+
previewSafe?: boolean;
|
|
71
71
|
}
|
|
72
|
-
interface ModuleManifestDataPolicy {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
151
|
-
|
|
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
|
-
|
|
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
|