@fabricorg/platform 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +8 -1
- package/dist/actions/index.cjs +11 -11
- package/dist/actions/index.d.cts +2 -0
- package/dist/actions/index.d.ts +2 -0
- package/dist/actions/index.js +1 -1
- package/dist/chunk-3JQI3OFC.js +347 -0
- package/dist/chunk-3JQI3OFC.js.map +1 -0
- package/dist/chunk-3S6UTP4X.js +110 -0
- package/dist/chunk-3S6UTP4X.js.map +1 -0
- package/dist/{chunk-Q3WYIWCN.cjs → chunk-7WASIL46.js} +58 -5
- package/dist/chunk-7WASIL46.js.map +1 -0
- package/dist/{chunk-BWNPGRRV.cjs → chunk-HLRIXNVG.cjs} +2 -2
- package/dist/chunk-HLRIXNVG.cjs.map +1 -0
- package/dist/{chunk-4SMPJPJ6.js → chunk-JM55UQWK.js} +2 -2
- package/dist/chunk-JM55UQWK.js.map +1 -0
- package/dist/{chunk-N72WJ4AU.js → chunk-NFP5DJBT.js} +65 -6
- package/dist/chunk-NFP5DJBT.js.map +1 -0
- package/dist/{chunk-JSTGOT6P.js → chunk-O7IHZ53Y.cjs} +66 -3
- package/dist/chunk-O7IHZ53Y.cjs.map +1 -0
- package/dist/chunk-ODP3DO6P.cjs +355 -0
- package/dist/chunk-ODP3DO6P.cjs.map +1 -0
- package/dist/{chunk-54EQTOH6.cjs → chunk-RYCHDNHZ.cjs} +69 -8
- package/dist/chunk-RYCHDNHZ.cjs.map +1 -0
- package/dist/chunk-XCL2HBMB.cjs +116 -0
- package/dist/chunk-XCL2HBMB.cjs.map +1 -0
- package/dist/index.cjs +67 -31
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -5
- package/dist/manifest/index.cjs +17 -8
- package/dist/manifest/index.d.cts +39 -3
- package/dist/manifest/index.d.ts +39 -3
- package/dist/manifest/index.js +5 -4
- package/dist/modules/index.cjs +11 -10
- package/dist/modules/index.d.cts +49 -1
- package/dist/modules/index.d.ts +49 -1
- package/dist/modules/index.js +4 -3
- package/dist/objects/index.cjs +9 -5
- package/dist/objects/index.d.cts +45 -1
- package/dist/objects/index.d.ts +45 -1
- package/dist/objects/index.js +1 -1
- package/dist/projections/index.cjs +26 -2
- package/dist/projections/index.d.cts +38 -2
- package/dist/projections/index.d.ts +38 -2
- package/dist/projections/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-35DD3H55.js +0 -187
- package/dist/chunk-35DD3H55.js.map +0 -1
- package/dist/chunk-4SMPJPJ6.js.map +0 -1
- package/dist/chunk-54EQTOH6.cjs.map +0 -1
- package/dist/chunk-BWNPGRRV.cjs.map +0 -1
- package/dist/chunk-I35B576X.js +0 -30
- package/dist/chunk-I35B576X.js.map +0 -1
- package/dist/chunk-JSTGOT6P.js.map +0 -1
- package/dist/chunk-N72WJ4AU.js.map +0 -1
- package/dist/chunk-Q3WYIWCN.cjs.map +0 -1
- package/dist/chunk-QETQGAXJ.cjs +0 -35
- package/dist/chunk-QETQGAXJ.cjs.map +0 -1
- package/dist/chunk-SSYKDXR4.cjs +0 -195
- package/dist/chunk-SSYKDXR4.cjs.map +0 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// objects/index.ts
|
|
4
|
+
var objectTypeRegistry = /* @__PURE__ */ new Set([
|
|
5
|
+
"AssetEvent",
|
|
6
|
+
"ActionInvocation",
|
|
7
|
+
"PolicyEvaluation",
|
|
8
|
+
"ApprovalRequest",
|
|
9
|
+
"ConsentRecord",
|
|
10
|
+
"AgentRun"
|
|
11
|
+
]);
|
|
12
|
+
var supportedSchemaKeywords = /* @__PURE__ */ new Set([
|
|
13
|
+
"$schema",
|
|
14
|
+
"$id",
|
|
15
|
+
"$ref",
|
|
16
|
+
"$defs",
|
|
17
|
+
"title",
|
|
18
|
+
"description",
|
|
19
|
+
"type",
|
|
20
|
+
"enum",
|
|
21
|
+
"const",
|
|
22
|
+
"properties",
|
|
23
|
+
"required",
|
|
24
|
+
"additionalProperties",
|
|
25
|
+
"items",
|
|
26
|
+
"allOf",
|
|
27
|
+
"anyOf",
|
|
28
|
+
"oneOf",
|
|
29
|
+
"not",
|
|
30
|
+
"minimum",
|
|
31
|
+
"maximum",
|
|
32
|
+
"exclusiveMinimum",
|
|
33
|
+
"exclusiveMaximum",
|
|
34
|
+
"minLength",
|
|
35
|
+
"maxLength",
|
|
36
|
+
"pattern",
|
|
37
|
+
"format",
|
|
38
|
+
"minItems",
|
|
39
|
+
"maxItems",
|
|
40
|
+
"uniqueItems",
|
|
41
|
+
"default",
|
|
42
|
+
"readOnly",
|
|
43
|
+
"writeOnly"
|
|
44
|
+
]);
|
|
45
|
+
function assertPortableJsonSchema(schema, path = "schema") {
|
|
46
|
+
if (!schema || typeof schema !== "object" || Array.isArray(schema)) {
|
|
47
|
+
throw new Error(`${path} must be a JSON Schema object.`);
|
|
48
|
+
}
|
|
49
|
+
const value = schema;
|
|
50
|
+
for (const keyword of Object.keys(value)) {
|
|
51
|
+
if (!supportedSchemaKeywords.has(keyword) && !keyword.startsWith("x-")) {
|
|
52
|
+
throw new Error(`${path} uses unsupported JSON Schema keyword "${keyword}".`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (value.properties !== void 0) {
|
|
56
|
+
if (!value.properties || typeof value.properties !== "object" || Array.isArray(value.properties)) {
|
|
57
|
+
throw new Error(`${path}.properties must be an object.`);
|
|
58
|
+
}
|
|
59
|
+
for (const [name, child] of Object.entries(value.properties)) {
|
|
60
|
+
assertPortableJsonSchema(child, `${path}.properties.${name}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (value.$defs !== void 0) {
|
|
64
|
+
if (!value.$defs || typeof value.$defs !== "object" || Array.isArray(value.$defs)) {
|
|
65
|
+
throw new Error(`${path}.$defs must be an object.`);
|
|
66
|
+
}
|
|
67
|
+
for (const [name, child] of Object.entries(value.$defs)) {
|
|
68
|
+
assertPortableJsonSchema(child, `${path}.$defs.${name}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
for (const keyword of ["allOf", "anyOf", "oneOf"]) {
|
|
72
|
+
if (value[keyword] !== void 0) {
|
|
73
|
+
if (!Array.isArray(value[keyword])) throw new Error(`${path}.${keyword} must be an array.`);
|
|
74
|
+
value[keyword].forEach((child, index) => assertPortableJsonSchema(child, `${path}.${keyword}[${index}]`));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (value.not !== void 0) assertPortableJsonSchema(value.not, `${path}.not`);
|
|
78
|
+
if (value.additionalProperties !== void 0 && typeof value.additionalProperties !== "boolean") {
|
|
79
|
+
assertPortableJsonSchema(value.additionalProperties, `${path}.additionalProperties`);
|
|
80
|
+
}
|
|
81
|
+
if (value.items !== void 0) {
|
|
82
|
+
if (Array.isArray(value.items)) {
|
|
83
|
+
value.items.forEach((child, index) => assertPortableJsonSchema(child, `${path}.items[${index}]`));
|
|
84
|
+
} else {
|
|
85
|
+
assertPortableJsonSchema(value.items, `${path}.items`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (value.required !== void 0 && (!Array.isArray(value.required) || value.required.some((item) => typeof item !== "string"))) {
|
|
89
|
+
throw new Error(`${path}.required must be an array of property names.`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function assertObjectType(type) {
|
|
93
|
+
if (!/^[A-Z][a-zA-Z0-9]*$/.test(type)) {
|
|
94
|
+
throw new Error(
|
|
95
|
+
`Invalid object type: "${type}". Object types must be PascalCase alphanumeric.`
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function registerObjectType(type) {
|
|
100
|
+
assertObjectType(type);
|
|
101
|
+
objectTypeRegistry.add(type);
|
|
102
|
+
}
|
|
103
|
+
function isValidObjectType(type) {
|
|
104
|
+
return objectTypeRegistry.has(type);
|
|
105
|
+
}
|
|
106
|
+
function getRegisteredObjectTypes() {
|
|
107
|
+
return Array.from(objectTypeRegistry);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
exports.assertObjectType = assertObjectType;
|
|
111
|
+
exports.assertPortableJsonSchema = assertPortableJsonSchema;
|
|
112
|
+
exports.getRegisteredObjectTypes = getRegisteredObjectTypes;
|
|
113
|
+
exports.isValidObjectType = isValidObjectType;
|
|
114
|
+
exports.registerObjectType = registerObjectType;
|
|
115
|
+
//# sourceMappingURL=chunk-XCL2HBMB.cjs.map
|
|
116
|
+
//# sourceMappingURL=chunk-XCL2HBMB.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../objects/index.ts"],"names":[],"mappings":";;;AAAA,IAAM,kBAAA,uBAAyB,GAAA,CAAY;AAAA,EAC1C,YAAA;AAAA,EACA,kBAAA;AAAA,EACA,kBAAA;AAAA,EACA,iBAAA;AAAA,EACA,eAAA;AAAA,EACA;AACD,CAAC,CAAA;AA+CD,IAAM,uBAAA,uBAA8B,GAAA,CAAI;AAAA,EACvC,SAAA;AAAA,EAAW,KAAA;AAAA,EAAO,MAAA;AAAA,EAAQ,OAAA;AAAA,EAAS,OAAA;AAAA,EAAS,aAAA;AAAA,EAAe,MAAA;AAAA,EAAQ,MAAA;AAAA,EAAQ,OAAA;AAAA,EAC3E,YAAA;AAAA,EAAc,UAAA;AAAA,EAAY,sBAAA;AAAA,EAAwB,OAAA;AAAA,EAAS,OAAA;AAAA,EAAS,OAAA;AAAA,EAAS,OAAA;AAAA,EAC7E,KAAA;AAAA,EAAO,SAAA;AAAA,EAAW,SAAA;AAAA,EAAW,kBAAA;AAAA,EAAoB,kBAAA;AAAA,EAAoB,WAAA;AAAA,EACrE,WAAA;AAAA,EAAa,SAAA;AAAA,EAAW,QAAA;AAAA,EAAU,UAAA;AAAA,EAAY,UAAA;AAAA,EAAY,aAAA;AAAA,EAAe,SAAA;AAAA,EACzE,UAAA;AAAA,EAAY;AACb,CAAC,CA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A;AACrC","file":"chunk-XCL2HBMB.cjs","sourcesContent":["const objectTypeRegistry = new Set<string>([\n\t\"AssetEvent\",\n\t\"ActionInvocation\",\n\t\"PolicyEvaluation\",\n\t\"ApprovalRequest\",\n\t\"ConsentRecord\",\n\t\"AgentRun\",\n]);\n\nexport type FabricObjectType = string;\n\nexport type JsonPrimitive = string | number | boolean | null;\nexport type JsonValue = JsonPrimitive | JsonValue[] | { [key: string]: JsonValue };\n\n/**\n * Dependency-free JSON Schema profile accepted in portable module manifests.\n * Unknown extension keywords must use an `x-` prefix. Runtime validators may\n * support more vocabulary, but exported entity contracts stay in this profile.\n */\nexport interface PortableJsonSchema {\n\t$schema?: string;\n\t$id?: string;\n\t$ref?: string;\n\t$defs?: Record<string, PortableJsonSchema>;\n\ttitle?: string;\n\tdescription?: string;\n\ttype?: \"null\" | \"boolean\" | \"object\" | \"array\" | \"number\" | \"integer\" | \"string\" | Array<\"null\" | \"boolean\" | \"object\" | \"array\" | \"number\" | \"integer\" | \"string\">;\n\tenum?: JsonValue[];\n\tconst?: JsonValue;\n\tproperties?: Record<string, PortableJsonSchema>;\n\trequired?: string[];\n\tadditionalProperties?: boolean | PortableJsonSchema;\n\titems?: PortableJsonSchema | PortableJsonSchema[];\n\tallOf?: PortableJsonSchema[];\n\tanyOf?: PortableJsonSchema[];\n\toneOf?: PortableJsonSchema[];\n\tnot?: PortableJsonSchema;\n\tminimum?: number;\n\tmaximum?: number;\n\texclusiveMinimum?: number;\n\texclusiveMaximum?: number;\n\tminLength?: number;\n\tmaxLength?: number;\n\tpattern?: string;\n\tformat?: string;\n\tminItems?: number;\n\tmaxItems?: number;\n\tuniqueItems?: boolean;\n\tdefault?: JsonValue;\n\treadOnly?: boolean;\n\twriteOnly?: boolean;\n\t[key: `x-${string}`]: JsonValue | undefined;\n}\n\nconst supportedSchemaKeywords = new Set([\n\t\"$schema\", \"$id\", \"$ref\", \"$defs\", \"title\", \"description\", \"type\", \"enum\", \"const\",\n\t\"properties\", \"required\", \"additionalProperties\", \"items\", \"allOf\", \"anyOf\", \"oneOf\",\n\t\"not\", \"minimum\", \"maximum\", \"exclusiveMinimum\", \"exclusiveMaximum\", \"minLength\",\n\t\"maxLength\", \"pattern\", \"format\", \"minItems\", \"maxItems\", \"uniqueItems\", \"default\",\n\t\"readOnly\", \"writeOnly\",\n]);\n\nexport function assertPortableJsonSchema(\n\tschema: unknown,\n\tpath = \"schema\",\n): asserts schema is PortableJsonSchema {\n\tif (!schema || typeof schema !== \"object\" || Array.isArray(schema)) {\n\t\tthrow new Error(`${path} must be a JSON Schema object.`);\n\t}\n\tconst value = schema as Record<string, unknown>;\n\tfor (const keyword of Object.keys(value)) {\n\t\tif (!supportedSchemaKeywords.has(keyword) && !keyword.startsWith(\"x-\")) {\n\t\t\tthrow new Error(`${path} uses unsupported JSON Schema keyword \"${keyword}\".`);\n\t\t}\n\t}\n\tif (value.properties !== undefined) {\n\t\tif (!value.properties || typeof value.properties !== \"object\" || Array.isArray(value.properties)) {\n\t\t\tthrow new Error(`${path}.properties must be an object.`);\n\t\t}\n\t\tfor (const [name, child] of Object.entries(value.properties)) {\n\t\t\tassertPortableJsonSchema(child, `${path}.properties.${name}`);\n\t\t}\n\t}\n\tif (value.$defs !== undefined) {\n\t\tif (!value.$defs || typeof value.$defs !== \"object\" || Array.isArray(value.$defs)) {\n\t\t\tthrow new Error(`${path}.$defs must be an object.`);\n\t\t}\n\t\tfor (const [name, child] of Object.entries(value.$defs)) {\n\t\t\tassertPortableJsonSchema(child, `${path}.$defs.${name}`);\n\t\t}\n\t}\n\tfor (const keyword of [\"allOf\", \"anyOf\", \"oneOf\"] as const) {\n\t\tif (value[keyword] !== undefined) {\n\t\t\tif (!Array.isArray(value[keyword])) throw new Error(`${path}.${keyword} must be an array.`);\n\t\t\tvalue[keyword].forEach((child, index) => assertPortableJsonSchema(child, `${path}.${keyword}[${index}]`));\n\t\t}\n\t}\n\tif (value.not !== undefined) assertPortableJsonSchema(value.not, `${path}.not`);\n\tif (value.additionalProperties !== undefined && typeof value.additionalProperties !== \"boolean\") {\n\t\tassertPortableJsonSchema(value.additionalProperties, `${path}.additionalProperties`);\n\t}\n\tif (value.items !== undefined) {\n\t\tif (Array.isArray(value.items)) {\n\t\t\tvalue.items.forEach((child, index) => assertPortableJsonSchema(child, `${path}.items[${index}]`));\n\t\t} else {\n\t\t\tassertPortableJsonSchema(value.items, `${path}.items`);\n\t\t}\n\t}\n\tif (value.required !== undefined && (!Array.isArray(value.required) || value.required.some((item) => typeof item !== \"string\"))) {\n\t\tthrow new Error(`${path}.required must be an array of property names.`);\n\t}\n}\n\nexport function assertObjectType(type: string): asserts type is FabricObjectType {\n\tif (!/^[A-Z][a-zA-Z0-9]*$/.test(type)) {\n\t\tthrow new Error(\n\t\t\t`Invalid object type: \"${type}\". Object types must be PascalCase alphanumeric.`,\n\t\t);\n\t}\n}\n\nexport function registerObjectType(type: string): void {\n\tassertObjectType(type);\n\tobjectTypeRegistry.add(type);\n}\n\nexport function isValidObjectType(type: string): boolean {\n\treturn objectTypeRegistry.has(type);\n}\n\nexport function getRegisteredObjectTypes(): string[] {\n\treturn Array.from(objectTypeRegistry);\n}\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkYZKUEC2J_cjs = require('./chunk-YZKUEC2J.cjs');
|
|
4
4
|
var chunkLZSE6QGQ_cjs = require('./chunk-LZSE6QGQ.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var chunkRYCHDNHZ_cjs = require('./chunk-RYCHDNHZ.cjs');
|
|
6
|
+
var chunkODP3DO6P_cjs = require('./chunk-ODP3DO6P.cjs');
|
|
7
|
+
var chunkXCL2HBMB_cjs = require('./chunk-XCL2HBMB.cjs');
|
|
8
8
|
var chunkNJL3US7H_cjs = require('./chunk-NJL3US7H.cjs');
|
|
9
9
|
var chunkYQEXO3IQ_cjs = require('./chunk-YQEXO3IQ.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunkO7IHZ53Y_cjs = require('./chunk-O7IHZ53Y.cjs');
|
|
11
11
|
var chunkUV252FLT_cjs = require('./chunk-UV252FLT.cjs');
|
|
12
|
-
var
|
|
12
|
+
var chunkHLRIXNVG_cjs = require('./chunk-HLRIXNVG.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');
|
|
@@ -49,63 +49,75 @@ Object.defineProperty(exports, "parseFabricId", {
|
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "MODULE_MANIFEST_VERSION", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkRYCHDNHZ_cjs.MODULE_MANIFEST_VERSION; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "exportModuleManifest", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkRYCHDNHZ_cjs.exportModuleManifest; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "exportModuleManifestBundle", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkRYCHDNHZ_cjs.exportModuleManifestBundle; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "isJsonSchemaExportableValidator", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkRYCHDNHZ_cjs.isJsonSchemaExportableValidator; }
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "normalizeModuleManifest", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () { return chunkRYCHDNHZ_cjs.normalizeModuleManifest; }
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(exports, "normalizeModuleManifestBundle", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function () { return chunkRYCHDNHZ_cjs.normalizeModuleManifestBundle; }
|
|
65
73
|
});
|
|
66
74
|
Object.defineProperty(exports, "createModuleRegistry", {
|
|
67
75
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkODP3DO6P_cjs.createModuleRegistry; }
|
|
69
77
|
});
|
|
70
78
|
Object.defineProperty(exports, "getEventTypeName", {
|
|
71
79
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkODP3DO6P_cjs.getEventTypeName; }
|
|
73
81
|
});
|
|
74
82
|
Object.defineProperty(exports, "getModuleDependencyNamespace", {
|
|
75
83
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkODP3DO6P_cjs.getModuleDependencyNamespace; }
|
|
77
85
|
});
|
|
78
86
|
Object.defineProperty(exports, "getObjectTypeName", {
|
|
79
87
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkODP3DO6P_cjs.getObjectTypeName; }
|
|
81
89
|
});
|
|
82
90
|
Object.defineProperty(exports, "registerFabricModule", {
|
|
83
91
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkODP3DO6P_cjs.registerFabricModule; }
|
|
85
93
|
});
|
|
86
94
|
Object.defineProperty(exports, "registerFabricModules", {
|
|
87
95
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkODP3DO6P_cjs.registerFabricModules; }
|
|
89
97
|
});
|
|
90
98
|
Object.defineProperty(exports, "validateModuleNamespace", {
|
|
91
99
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkODP3DO6P_cjs.validateModuleNamespace; }
|
|
93
101
|
});
|
|
94
102
|
Object.defineProperty(exports, "assertObjectType", {
|
|
95
103
|
enumerable: true,
|
|
96
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkXCL2HBMB_cjs.assertObjectType; }
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, "assertPortableJsonSchema", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function () { return chunkXCL2HBMB_cjs.assertPortableJsonSchema; }
|
|
97
109
|
});
|
|
98
110
|
Object.defineProperty(exports, "getRegisteredObjectTypes", {
|
|
99
111
|
enumerable: true,
|
|
100
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkXCL2HBMB_cjs.getRegisteredObjectTypes; }
|
|
101
113
|
});
|
|
102
114
|
Object.defineProperty(exports, "isValidObjectType", {
|
|
103
115
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkXCL2HBMB_cjs.isValidObjectType; }
|
|
105
117
|
});
|
|
106
118
|
Object.defineProperty(exports, "registerObjectType", {
|
|
107
119
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkXCL2HBMB_cjs.registerObjectType; }
|
|
109
121
|
});
|
|
110
122
|
Object.defineProperty(exports, "aggregatePolicyOutcomes", {
|
|
111
123
|
enumerable: true,
|
|
@@ -187,9 +199,33 @@ Object.defineProperty(exports, "stableChecksum", {
|
|
|
187
199
|
enumerable: true,
|
|
188
200
|
get: function () { return chunkYQEXO3IQ_cjs.stableChecksum; }
|
|
189
201
|
});
|
|
202
|
+
Object.defineProperty(exports, "getRegisteredViewContractKeys", {
|
|
203
|
+
enumerable: true,
|
|
204
|
+
get: function () { return chunkO7IHZ53Y_cjs.getRegisteredViewContractKeys; }
|
|
205
|
+
});
|
|
206
|
+
Object.defineProperty(exports, "registerViewContract", {
|
|
207
|
+
enumerable: true,
|
|
208
|
+
get: function () { return chunkO7IHZ53Y_cjs.registerViewContract; }
|
|
209
|
+
});
|
|
210
|
+
Object.defineProperty(exports, "registerViewContractIfMissing", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function () { return chunkO7IHZ53Y_cjs.registerViewContractIfMissing; }
|
|
213
|
+
});
|
|
190
214
|
Object.defineProperty(exports, "replayEvents", {
|
|
191
215
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkO7IHZ53Y_cjs.replayEvents; }
|
|
217
|
+
});
|
|
218
|
+
Object.defineProperty(exports, "replayView", {
|
|
219
|
+
enumerable: true,
|
|
220
|
+
get: function () { return chunkO7IHZ53Y_cjs.replayView; }
|
|
221
|
+
});
|
|
222
|
+
Object.defineProperty(exports, "resolveViewContract", {
|
|
223
|
+
enumerable: true,
|
|
224
|
+
get: function () { return chunkO7IHZ53Y_cjs.resolveViewContract; }
|
|
225
|
+
});
|
|
226
|
+
Object.defineProperty(exports, "viewContractKey", {
|
|
227
|
+
enumerable: true,
|
|
228
|
+
get: function () { return chunkO7IHZ53Y_cjs.viewContractKey; }
|
|
193
229
|
});
|
|
194
230
|
Object.defineProperty(exports, "getAllowedTransitions", {
|
|
195
231
|
enumerable: true,
|
|
@@ -217,43 +253,43 @@ Object.defineProperty(exports, "validateTransition", {
|
|
|
217
253
|
});
|
|
218
254
|
Object.defineProperty(exports, "ACTOR_TYPES", {
|
|
219
255
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
256
|
+
get: function () { return chunkHLRIXNVG_cjs.ACTOR_TYPES; }
|
|
221
257
|
});
|
|
222
258
|
Object.defineProperty(exports, "assertActionId", {
|
|
223
259
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
260
|
+
get: function () { return chunkHLRIXNVG_cjs.assertActionId; }
|
|
225
261
|
});
|
|
226
262
|
Object.defineProperty(exports, "assertActorType", {
|
|
227
263
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
264
|
+
get: function () { return chunkHLRIXNVG_cjs.assertActorType; }
|
|
229
265
|
});
|
|
230
266
|
Object.defineProperty(exports, "getRegisteredActionIds", {
|
|
231
267
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
268
|
+
get: function () { return chunkHLRIXNVG_cjs.getRegisteredActionIds; }
|
|
233
269
|
});
|
|
234
270
|
Object.defineProperty(exports, "isActorType", {
|
|
235
271
|
enumerable: true,
|
|
236
|
-
get: function () { return
|
|
272
|
+
get: function () { return chunkHLRIXNVG_cjs.isActorType; }
|
|
237
273
|
});
|
|
238
274
|
Object.defineProperty(exports, "isRegisteredActionId", {
|
|
239
275
|
enumerable: true,
|
|
240
|
-
get: function () { return
|
|
276
|
+
get: function () { return chunkHLRIXNVG_cjs.isRegisteredActionId; }
|
|
241
277
|
});
|
|
242
278
|
Object.defineProperty(exports, "registerAction", {
|
|
243
279
|
enumerable: true,
|
|
244
|
-
get: function () { return
|
|
280
|
+
get: function () { return chunkHLRIXNVG_cjs.registerAction; }
|
|
245
281
|
});
|
|
246
282
|
Object.defineProperty(exports, "registerActionIfMissing", {
|
|
247
283
|
enumerable: true,
|
|
248
|
-
get: function () { return
|
|
284
|
+
get: function () { return chunkHLRIXNVG_cjs.registerActionIfMissing; }
|
|
249
285
|
});
|
|
250
286
|
Object.defineProperty(exports, "resolveAction", {
|
|
251
287
|
enumerable: true,
|
|
252
|
-
get: function () { return
|
|
288
|
+
get: function () { return chunkHLRIXNVG_cjs.resolveAction; }
|
|
253
289
|
});
|
|
254
290
|
Object.defineProperty(exports, "resolveRegisteredAction", {
|
|
255
291
|
enumerable: true,
|
|
256
|
-
get: function () { return
|
|
292
|
+
get: function () { return chunkHLRIXNVG_cjs.resolveRegisteredAction; }
|
|
257
293
|
});
|
|
258
294
|
Object.defineProperty(exports, "AdapterRegistry", {
|
|
259
295
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -2,12 +2,12 @@ export { ACTOR_TYPES, ActionContext, ActionDefinition, ActionHandler, ActionId,
|
|
|
2
2
|
export { AdapterAttempt, AdapterCircuitBreakerConfig, AdapterExecutionContext, AdapterExecutionResult, AdapterExecutor, AdapterImplementation, AdapterRegistry, AdapterRetryPolicy, ExecuteWithRetryOptions, MissingAdapterRegistrationError, ResolvedAdapterRetryPolicy, executeWithAdapterRetry, getRetryDelayMs, resolveAdapterRetryPolicy } from './adapters/index.cjs';
|
|
3
3
|
export { AssetEventActorType, AssetEventEnvelope, AssetEventSubjectType, AssetEventType, 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
|
-
export { JsonSchemaExportableValidator, MODULE_MANIFEST_VERSION, ModuleManifest, ModuleManifestAction, ModuleManifestActionStateMachine, ModuleManifestAdapterStep, ModuleManifestBundle, ModuleManifestCodePolicy, ModuleManifestDataPolicy, ModuleManifestEventType, ModuleManifestIdPrefix, ModuleManifestObjectType, ModuleManifestPolicy, ModuleManifestStateMachine, ModuleManifestStateMachineTransition, exportModuleManifest, exportModuleManifestBundle, isJsonSchemaExportableValidator } from './manifest/index.cjs';
|
|
6
|
-
export { EventTypeRegistration, EventTypeRegistrationInput, FabricModule, IdPrefixRegistration, ModuleDependency, ModuleDependencyInput, ModuleDisplayRendererRegistration, ModuleRegistry, ObjectTypeRegistration, ObjectTypeRegistrationInput, PolicyRegistration, StateMachineRegistration, createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateModuleNamespace } from './modules/index.cjs';
|
|
7
|
-
export { FabricObjectType, assertObjectType, getRegisteredObjectTypes, isValidObjectType, registerObjectType } from './objects/index.cjs';
|
|
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';
|
|
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, ReplayWarning, ReplayWarningCode, ReplayableAssetEvent, replayEvents } from './projections/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';
|
|
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
|
@@ -2,12 +2,12 @@ export { ACTOR_TYPES, ActionContext, ActionDefinition, ActionHandler, ActionId,
|
|
|
2
2
|
export { AdapterAttempt, AdapterCircuitBreakerConfig, AdapterExecutionContext, AdapterExecutionResult, AdapterExecutor, AdapterImplementation, AdapterRegistry, AdapterRetryPolicy, ExecuteWithRetryOptions, MissingAdapterRegistrationError, ResolvedAdapterRetryPolicy, executeWithAdapterRetry, getRetryDelayMs, resolveAdapterRetryPolicy } from './adapters/index.js';
|
|
3
3
|
export { AssetEventActorType, AssetEventEnvelope, AssetEventSubjectType, AssetEventType, 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
|
-
export { JsonSchemaExportableValidator, MODULE_MANIFEST_VERSION, ModuleManifest, ModuleManifestAction, ModuleManifestActionStateMachine, ModuleManifestAdapterStep, ModuleManifestBundle, ModuleManifestCodePolicy, ModuleManifestDataPolicy, ModuleManifestEventType, ModuleManifestIdPrefix, ModuleManifestObjectType, ModuleManifestPolicy, ModuleManifestStateMachine, ModuleManifestStateMachineTransition, exportModuleManifest, exportModuleManifestBundle, isJsonSchemaExportableValidator } from './manifest/index.js';
|
|
6
|
-
export { EventTypeRegistration, EventTypeRegistrationInput, FabricModule, IdPrefixRegistration, ModuleDependency, ModuleDependencyInput, ModuleDisplayRendererRegistration, ModuleRegistry, ObjectTypeRegistration, ObjectTypeRegistrationInput, PolicyRegistration, StateMachineRegistration, createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateModuleNamespace } from './modules/index.js';
|
|
7
|
-
export { FabricObjectType, assertObjectType, getRegisteredObjectTypes, isValidObjectType, registerObjectType } from './objects/index.js';
|
|
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';
|
|
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, ReplayWarning, ReplayWarningCode, ReplayableAssetEvent, replayEvents } from './projections/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';
|
|
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,13 +1,13 @@
|
|
|
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 } from './chunk-
|
|
4
|
-
export { createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateModuleNamespace } from './chunk-
|
|
5
|
-
export { assertObjectType, getRegisteredObjectTypes, isValidObjectType, registerObjectType } from './chunk-
|
|
3
|
+
export { MODULE_MANIFEST_VERSION, exportModuleManifest, exportModuleManifestBundle, isJsonSchemaExportableValidator, normalizeModuleManifest, normalizeModuleManifestBundle } from './chunk-NFP5DJBT.js';
|
|
4
|
+
export { createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateModuleNamespace } from './chunk-3JQI3OFC.js';
|
|
5
|
+
export { assertObjectType, assertPortableJsonSchema, getRegisteredObjectTypes, isValidObjectType, registerObjectType } from './chunk-3S6UTP4X.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 { replayEvents } from './chunk-
|
|
8
|
+
export { getRegisteredViewContractKeys, registerViewContract, registerViewContractIfMissing, replayEvents, replayView, resolveViewContract, viewContractKey } from './chunk-7WASIL46.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-
|
|
10
|
+
export { ACTOR_TYPES, assertActionId, assertActorType, getRegisteredActionIds, isActorType, isRegisteredActionId, registerAction, registerActionIfMissing, resolveAction, resolveRegisteredAction } from './chunk-JM55UQWK.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';
|
package/dist/manifest/index.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var chunkRYCHDNHZ_cjs = require('../chunk-RYCHDNHZ.cjs');
|
|
4
|
+
require('../chunk-ODP3DO6P.cjs');
|
|
5
|
+
require('../chunk-XCL2HBMB.cjs');
|
|
6
6
|
require('../chunk-NJL3US7H.cjs');
|
|
7
|
+
require('../chunk-O7IHZ53Y.cjs');
|
|
7
8
|
require('../chunk-UV252FLT.cjs');
|
|
8
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-HLRIXNVG.cjs');
|
|
9
10
|
require('../chunk-EO4VSB2O.cjs');
|
|
10
11
|
require('../chunk-JAXDEK5Z.cjs');
|
|
11
12
|
|
|
@@ -13,19 +14,27 @@ require('../chunk-JAXDEK5Z.cjs');
|
|
|
13
14
|
|
|
14
15
|
Object.defineProperty(exports, "MODULE_MANIFEST_VERSION", {
|
|
15
16
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkRYCHDNHZ_cjs.MODULE_MANIFEST_VERSION; }
|
|
17
18
|
});
|
|
18
19
|
Object.defineProperty(exports, "exportModuleManifest", {
|
|
19
20
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkRYCHDNHZ_cjs.exportModuleManifest; }
|
|
21
22
|
});
|
|
22
23
|
Object.defineProperty(exports, "exportModuleManifestBundle", {
|
|
23
24
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkRYCHDNHZ_cjs.exportModuleManifestBundle; }
|
|
25
26
|
});
|
|
26
27
|
Object.defineProperty(exports, "isJsonSchemaExportableValidator", {
|
|
27
28
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkRYCHDNHZ_cjs.isJsonSchemaExportableValidator; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "normalizeModuleManifest", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkRYCHDNHZ_cjs.normalizeModuleManifest; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "normalizeModuleManifestBundle", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunkRYCHDNHZ_cjs.normalizeModuleManifestBundle; }
|
|
29
38
|
});
|
|
30
39
|
//# sourceMappingURL=index.cjs.map
|
|
31
40
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import { SchemaValidator, AdapterStepRetryPolicy } from '../actions/index.cjs';
|
|
2
|
-
import { ModuleDependency, FabricModule } from '../modules/index.cjs';
|
|
2
|
+
import { CapabilityMetadata, ModuleDependency, ObjectRelationDefinition, DeclarativeInvariant, FabricModule } from '../modules/index.cjs';
|
|
3
|
+
import { PortableJsonSchema, JsonValue } from '../objects/index.cjs';
|
|
3
4
|
import { PolicyKind, DataPolicyDefinition, PolicyFallbackDefinition } from '../policies/index.cjs';
|
|
4
5
|
import { StateDefinition } from '../state-machines/index.cjs';
|
|
5
6
|
import '../displays/index.cjs';
|
|
7
|
+
import '../projections/index.cjs';
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* Version of the module manifest contract. Bump when the serialized shape
|
|
9
11
|
* changes in a way consumers must detect.
|
|
10
12
|
*/
|
|
11
|
-
declare const MODULE_MANIFEST_VERSION:
|
|
13
|
+
declare const MODULE_MANIFEST_VERSION: 2;
|
|
12
14
|
interface ModuleManifestObjectType {
|
|
13
15
|
type: string;
|
|
14
16
|
displayName?: string;
|
|
15
17
|
idPrefix?: string;
|
|
18
|
+
schema?: PortableJsonSchema;
|
|
19
|
+
semantics?: Record<string, JsonValue>;
|
|
20
|
+
relations?: ObjectRelationDefinition[];
|
|
21
|
+
invariants?: DeclarativeInvariant[];
|
|
16
22
|
}
|
|
17
23
|
interface ModuleManifestIdPrefix {
|
|
18
24
|
prefix: string;
|
|
@@ -50,6 +56,8 @@ interface ModuleManifestAction {
|
|
|
50
56
|
*/
|
|
51
57
|
parameterSchema?: unknown;
|
|
52
58
|
parameterSchemaFormat?: "json-schema";
|
|
59
|
+
resultSchema?: unknown;
|
|
60
|
+
resultSchemaFormat?: "json-schema";
|
|
53
61
|
stateMachine?: ModuleManifestActionStateMachine;
|
|
54
62
|
adapterSteps?: ModuleManifestAdapterStep[];
|
|
55
63
|
}
|
|
@@ -82,6 +90,18 @@ interface ModuleManifestStateMachine {
|
|
|
82
90
|
states: StateDefinition[];
|
|
83
91
|
transitions: ModuleManifestStateMachineTransition[];
|
|
84
92
|
}
|
|
93
|
+
interface ModuleManifestView {
|
|
94
|
+
name: string;
|
|
95
|
+
version: string;
|
|
96
|
+
shape: PortableJsonSchema;
|
|
97
|
+
consumes: Array<{
|
|
98
|
+
eventType: string;
|
|
99
|
+
schemaVersions: number[];
|
|
100
|
+
}>;
|
|
101
|
+
scope: "tenant-space";
|
|
102
|
+
snapshotVersion: number;
|
|
103
|
+
compatibleSnapshotVersions?: number[];
|
|
104
|
+
}
|
|
85
105
|
/**
|
|
86
106
|
* Stable, JSON-serializable description of a {@link FabricModule}'s ontology:
|
|
87
107
|
* object types, subject types, id prefixes, event types, actions, policies,
|
|
@@ -98,6 +118,7 @@ interface ModuleManifest {
|
|
|
98
118
|
version?: string;
|
|
99
119
|
displayName?: string;
|
|
100
120
|
description?: string;
|
|
121
|
+
capability?: CapabilityMetadata;
|
|
101
122
|
dependencies: ModuleDependency[];
|
|
102
123
|
objectTypes: ModuleManifestObjectType[];
|
|
103
124
|
subjectTypes: string[];
|
|
@@ -106,12 +127,27 @@ interface ModuleManifest {
|
|
|
106
127
|
actions: ModuleManifestAction[];
|
|
107
128
|
policies: ModuleManifestPolicy[];
|
|
108
129
|
stateMachines: ModuleManifestStateMachine[];
|
|
130
|
+
views: ModuleManifestView[];
|
|
109
131
|
}
|
|
110
132
|
interface ModuleManifestBundle {
|
|
111
133
|
manifestVersion: typeof MODULE_MANIFEST_VERSION;
|
|
112
134
|
/** Manifests in the input module order. */
|
|
113
135
|
modules: ModuleManifest[];
|
|
114
136
|
}
|
|
137
|
+
/** Manifest v1 remains accepted by v2 readers; missing v2 fields normalize to absence. */
|
|
138
|
+
type ModuleManifestObjectTypeV1 = Omit<ModuleManifestObjectType, "schema" | "semantics" | "relations" | "invariants">;
|
|
139
|
+
type ModuleManifestActionV1 = Omit<ModuleManifestAction, "resultSchema" | "resultSchemaFormat">;
|
|
140
|
+
type ModuleManifestV1 = Omit<ModuleManifest, "manifestVersion" | "objectTypes" | "actions" | "views"> & {
|
|
141
|
+
manifestVersion: 1;
|
|
142
|
+
objectTypes: ModuleManifestObjectTypeV1[];
|
|
143
|
+
actions: ModuleManifestActionV1[];
|
|
144
|
+
};
|
|
145
|
+
type ModuleManifestBundleV1 = Omit<ModuleManifestBundle, "manifestVersion" | "modules"> & {
|
|
146
|
+
manifestVersion: 1;
|
|
147
|
+
modules: ModuleManifestV1[];
|
|
148
|
+
};
|
|
149
|
+
declare function normalizeModuleManifest(manifest: ModuleManifest | ModuleManifestV1): ModuleManifest;
|
|
150
|
+
declare function normalizeModuleManifestBundle(bundle: ModuleManifestBundle | ModuleManifestBundleV1): ModuleManifestBundle;
|
|
115
151
|
/**
|
|
116
152
|
* A {@link SchemaValidator} that can also export its parameter schema as JSON
|
|
117
153
|
* Schema (for example a Zod 4 schema via `z.toJSONSchema`). Keeps the platform
|
|
@@ -142,4 +178,4 @@ declare function exportModuleManifest(module: FabricModule<unknown>): ModuleMani
|
|
|
142
178
|
*/
|
|
143
179
|
declare function exportModuleManifestBundle(modules: FabricModule<unknown>[]): ModuleManifestBundle;
|
|
144
180
|
|
|
145
|
-
export { type JsonSchemaExportableValidator, MODULE_MANIFEST_VERSION, type ModuleManifest, type ModuleManifestAction, type ModuleManifestActionStateMachine, type ModuleManifestAdapterStep, type ModuleManifestBundle, type ModuleManifestCodePolicy, type ModuleManifestDataPolicy, type ModuleManifestEventType, type ModuleManifestIdPrefix, type ModuleManifestObjectType, type ModuleManifestPolicy, type ModuleManifestStateMachine, type ModuleManifestStateMachineTransition, exportModuleManifest, exportModuleManifestBundle, isJsonSchemaExportableValidator };
|
|
181
|
+
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 };
|