@fabricorg/platform 1.4.0 → 1.5.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 +12 -0
- package/dist/certification/index.cjs +25 -0
- package/dist/certification/index.cjs.map +1 -0
- package/dist/certification/index.d.cts +42 -0
- package/dist/certification/index.d.ts +42 -0
- package/dist/certification/index.js +8 -0
- package/dist/certification/index.js.map +1 -0
- package/dist/chunk-DDO4EQ2J.js +98 -0
- package/dist/chunk-DDO4EQ2J.js.map +1 -0
- package/dist/chunk-PFKTD7V5.cjs +102 -0
- package/dist/chunk-PFKTD7V5.cjs.map +1 -0
- package/dist/index.cjs +121 -108
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -6
- package/dist/manifest/index.d.cts +1 -1
- package/dist/manifest/index.d.ts +1 -1
- package/package.json +12 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @fabricorg/platform
|
|
2
2
|
|
|
3
|
+
## 1.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1b81b20: Publish with real build provenance, and name the repository each attestation points at. `pnpm publish` accepts `--provenance` and drops it, so every release until now was unattested while the release document claimed otherwise. The pipeline now packs with pnpm and uploads the tarball with `npm publish --provenance`, and every package declares `repository`, `homepage`, and `bugs`.
|
|
8
|
+
|
|
9
|
+
## 1.5.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 07e3c65: `STRICT_EXECUTION_CONTRACT_PROFILE` and `executionContractProfile()` under a new `certification` entry. The base action type keeps the execution contract and its `sensitivity` optional, because making them mandatory breaks every manifest that predates them; a deployment that wants the guarantee applies the profile at certification. The strict profile fails any action with no contract, any dimension missing or outside its permitted values, no sensitivity, an `accepted` or `long-running` completion without `completionDeadlineMs`, or an `immediate` completion with one. A manifest reaches certification without the registry, so the contract's content is checked and not only its presence. It validates a manifest or a module, asserts, and exposes the compiler's conformance adapter shape. Additive.
|
|
14
|
+
|
|
3
15
|
## 1.4.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkPFKTD7V5_cjs = require('../chunk-PFKTD7V5.cjs');
|
|
4
|
+
require('../chunk-ZBXFRJON.cjs');
|
|
5
|
+
require('../chunk-KIVQBZOA.cjs');
|
|
6
|
+
require('../chunk-IFW43ELT.cjs');
|
|
7
|
+
require('../chunk-CXR6KEKQ.cjs');
|
|
8
|
+
require('../chunk-2AE6TMAX.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Object.defineProperty(exports, "STRICT_EXECUTION_CONTRACT_PROFILE", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkPFKTD7V5_cjs.STRICT_EXECUTION_CONTRACT_PROFILE; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "STRICT_EXECUTION_CONTRACT_PROFILE_ID", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkPFKTD7V5_cjs.STRICT_EXECUTION_CONTRACT_PROFILE_ID; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "executionContractProfile", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkPFKTD7V5_cjs.executionContractProfile; }
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=index.cjs.map
|
|
25
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ActionCompletionMode } from '../actions/index.cjs';
|
|
2
|
+
import { ModuleManifest } from '../manifest/index.cjs';
|
|
3
|
+
import { FabricModule } from '../modules/index.cjs';
|
|
4
|
+
import '../objects/index.cjs';
|
|
5
|
+
import '../policies/index.cjs';
|
|
6
|
+
import '../state-machines/index.cjs';
|
|
7
|
+
import '../projections/index.cjs';
|
|
8
|
+
|
|
9
|
+
type ExecutionContractFindingCode = "missing_execution_contract" | "invalid_execution_dimension" | "missing_sensitivity" | "missing_completion_deadline" | "unexpected_completion_deadline";
|
|
10
|
+
interface ExecutionContractFinding {
|
|
11
|
+
code: ExecutionContractFindingCode;
|
|
12
|
+
actionId: string;
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
interface ExecutionContractProfileOptions {
|
|
16
|
+
/** Adapter and profile id. Defaults to the strict profile's id. */
|
|
17
|
+
id?: string;
|
|
18
|
+
/** Require `sensitivity`, which the base contract leaves optional. Defaults to true. */
|
|
19
|
+
requireSensitivity?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Completion modes that must declare `completionDeadlineMs`. Defaults to
|
|
22
|
+
* both modes that hand work off, since without a deadline nothing sweeps a
|
|
23
|
+
* callback that never comes.
|
|
24
|
+
*/
|
|
25
|
+
requireDeadlineFor?: readonly ActionCompletionMode[];
|
|
26
|
+
}
|
|
27
|
+
interface ExecutionContractProfile {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
validate(manifest: ModuleManifest): ExecutionContractFinding[];
|
|
30
|
+
assert(subject: FabricModule<unknown> | ModuleManifest): void;
|
|
31
|
+
/** For certification tooling: the compiler's conformance adapter shape. */
|
|
32
|
+
readonly adapter: {
|
|
33
|
+
id: string;
|
|
34
|
+
evaluate(manifest: ModuleManifest): ExecutionContractFinding[];
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
declare const STRICT_EXECUTION_CONTRACT_PROFILE_ID = "fabric.execution-contract.strict";
|
|
38
|
+
declare function executionContractProfile(options?: ExecutionContractProfileOptions): ExecutionContractProfile;
|
|
39
|
+
/** All six dimensions on every action, and a deadline wherever work is handed off. */
|
|
40
|
+
declare const STRICT_EXECUTION_CONTRACT_PROFILE: ExecutionContractProfile;
|
|
41
|
+
|
|
42
|
+
export { type ExecutionContractFinding, type ExecutionContractFindingCode, type ExecutionContractProfile, type ExecutionContractProfileOptions, STRICT_EXECUTION_CONTRACT_PROFILE, STRICT_EXECUTION_CONTRACT_PROFILE_ID, executionContractProfile };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ActionCompletionMode } from '../actions/index.js';
|
|
2
|
+
import { ModuleManifest } from '../manifest/index.js';
|
|
3
|
+
import { FabricModule } from '../modules/index.js';
|
|
4
|
+
import '../objects/index.js';
|
|
5
|
+
import '../policies/index.js';
|
|
6
|
+
import '../state-machines/index.js';
|
|
7
|
+
import '../projections/index.js';
|
|
8
|
+
|
|
9
|
+
type ExecutionContractFindingCode = "missing_execution_contract" | "invalid_execution_dimension" | "missing_sensitivity" | "missing_completion_deadline" | "unexpected_completion_deadline";
|
|
10
|
+
interface ExecutionContractFinding {
|
|
11
|
+
code: ExecutionContractFindingCode;
|
|
12
|
+
actionId: string;
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
interface ExecutionContractProfileOptions {
|
|
16
|
+
/** Adapter and profile id. Defaults to the strict profile's id. */
|
|
17
|
+
id?: string;
|
|
18
|
+
/** Require `sensitivity`, which the base contract leaves optional. Defaults to true. */
|
|
19
|
+
requireSensitivity?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Completion modes that must declare `completionDeadlineMs`. Defaults to
|
|
22
|
+
* both modes that hand work off, since without a deadline nothing sweeps a
|
|
23
|
+
* callback that never comes.
|
|
24
|
+
*/
|
|
25
|
+
requireDeadlineFor?: readonly ActionCompletionMode[];
|
|
26
|
+
}
|
|
27
|
+
interface ExecutionContractProfile {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
validate(manifest: ModuleManifest): ExecutionContractFinding[];
|
|
30
|
+
assert(subject: FabricModule<unknown> | ModuleManifest): void;
|
|
31
|
+
/** For certification tooling: the compiler's conformance adapter shape. */
|
|
32
|
+
readonly adapter: {
|
|
33
|
+
id: string;
|
|
34
|
+
evaluate(manifest: ModuleManifest): ExecutionContractFinding[];
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
declare const STRICT_EXECUTION_CONTRACT_PROFILE_ID = "fabric.execution-contract.strict";
|
|
38
|
+
declare function executionContractProfile(options?: ExecutionContractProfileOptions): ExecutionContractProfile;
|
|
39
|
+
/** All six dimensions on every action, and a deadline wherever work is handed off. */
|
|
40
|
+
declare const STRICT_EXECUTION_CONTRACT_PROFILE: ExecutionContractProfile;
|
|
41
|
+
|
|
42
|
+
export { type ExecutionContractFinding, type ExecutionContractFindingCode, type ExecutionContractProfile, type ExecutionContractProfileOptions, STRICT_EXECUTION_CONTRACT_PROFILE, STRICT_EXECUTION_CONTRACT_PROFILE_ID, executionContractProfile };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { STRICT_EXECUTION_CONTRACT_PROFILE, STRICT_EXECUTION_CONTRACT_PROFILE_ID, executionContractProfile } from '../chunk-DDO4EQ2J.js';
|
|
2
|
+
import '../chunk-MC3GSVJ6.js';
|
|
3
|
+
import '../chunk-GRBZYDEV.js';
|
|
4
|
+
import '../chunk-ZAEVQSB5.js';
|
|
5
|
+
import '../chunk-JG35DT2G.js';
|
|
6
|
+
import '../chunk-B5DOGDPG.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { exportModuleManifest } from './chunk-MC3GSVJ6.js';
|
|
2
|
+
|
|
3
|
+
// certification/index.ts
|
|
4
|
+
var STRICT_EXECUTION_CONTRACT_PROFILE_ID = "fabric.execution-contract.strict";
|
|
5
|
+
function permittedDimensions() {
|
|
6
|
+
return [
|
|
7
|
+
["connectivity", /* @__PURE__ */ new Set(["online-required", "offline-capturable"])],
|
|
8
|
+
["authorityMoment", /* @__PURE__ */ new Set(["capture", "execution", "both"])],
|
|
9
|
+
["idempotency", /* @__PURE__ */ new Set(["required", "supported", "prohibited"])],
|
|
10
|
+
["completion", /* @__PURE__ */ new Set(["immediate", "accepted", "long-running"])],
|
|
11
|
+
["consistency", /* @__PURE__ */ new Set(["authoritative-now", "provisional-until-reconciled"])]
|
|
12
|
+
];
|
|
13
|
+
}
|
|
14
|
+
var permittedSensitivities = () => /* @__PURE__ */ new Set(["public", "internal", "confidential", "restricted"]);
|
|
15
|
+
function executionContractProfile(options = {}) {
|
|
16
|
+
const id = options.id ?? STRICT_EXECUTION_CONTRACT_PROFILE_ID;
|
|
17
|
+
const requireSensitivity = options.requireSensitivity ?? true;
|
|
18
|
+
const requireDeadlineFor = new Set(options.requireDeadlineFor ?? ["accepted", "long-running"]);
|
|
19
|
+
const dimensions = permittedDimensions();
|
|
20
|
+
const sensitivities = permittedSensitivities();
|
|
21
|
+
const validate = (manifest) => {
|
|
22
|
+
const findings = [];
|
|
23
|
+
for (const action of manifest.actions) {
|
|
24
|
+
const contract = action.execution;
|
|
25
|
+
if (!contract) {
|
|
26
|
+
findings.push({
|
|
27
|
+
code: "missing_execution_contract",
|
|
28
|
+
actionId: action.actionId,
|
|
29
|
+
message: `Action "${action.actionId}" declares no execution contract; connectivity, authorityMoment, idempotency, completion, and consistency are required.`
|
|
30
|
+
});
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
let complete = true;
|
|
34
|
+
for (const [dimension, permitted] of dimensions) {
|
|
35
|
+
const value = contract[dimension];
|
|
36
|
+
if (!permitted.has(value)) {
|
|
37
|
+
complete = false;
|
|
38
|
+
findings.push({
|
|
39
|
+
code: "invalid_execution_dimension",
|
|
40
|
+
actionId: action.actionId,
|
|
41
|
+
message: `Action "${action.actionId}" ${value === void 0 ? "declares no" : `declares an unknown`} ${dimension}${value === void 0 ? "" : ` "${String(value)}"`}; permitted values are ${[...permitted].map((item) => `"${String(item)}"`).join(", ")}.`
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (contract.sensitivity !== void 0 && !sensitivities.has(contract.sensitivity)) {
|
|
46
|
+
findings.push({
|
|
47
|
+
code: "invalid_execution_dimension",
|
|
48
|
+
actionId: action.actionId,
|
|
49
|
+
message: `Action "${action.actionId}" declares an unknown sensitivity "${String(contract.sensitivity)}"; permitted values are ${[...sensitivities].map((item) => `"${item}"`).join(", ")}.`
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
if (!complete) continue;
|
|
53
|
+
if (contract.completion === "immediate" && contract.completionDeadlineMs !== void 0) {
|
|
54
|
+
findings.push({
|
|
55
|
+
code: "unexpected_completion_deadline",
|
|
56
|
+
actionId: action.actionId,
|
|
57
|
+
message: `Action "${action.actionId}" declares immediate completion and a completionDeadlineMs; nothing external completes it.`
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (requireSensitivity && contract.sensitivity === void 0) {
|
|
61
|
+
findings.push({
|
|
62
|
+
code: "missing_sensitivity",
|
|
63
|
+
actionId: action.actionId,
|
|
64
|
+
message: `Action "${action.actionId}" declares no sensitivity; say whether its durable data is public, internal, confidential, or restricted.`
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
if (requireDeadlineFor.has(contract.completion) && !(typeof contract.completionDeadlineMs === "number" && contract.completionDeadlineMs > 0)) {
|
|
68
|
+
findings.push({
|
|
69
|
+
code: "missing_completion_deadline",
|
|
70
|
+
actionId: action.actionId,
|
|
71
|
+
message: `Action "${action.actionId}" declares ${contract.completion} completion and no completionDeadlineMs; a callback that never comes would never be noticed.`
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return findings;
|
|
76
|
+
};
|
|
77
|
+
return {
|
|
78
|
+
id,
|
|
79
|
+
validate,
|
|
80
|
+
assert(subject) {
|
|
81
|
+
const manifest = isManifest(subject) ? subject : exportModuleManifest(subject);
|
|
82
|
+
const findings = validate(manifest);
|
|
83
|
+
if (findings.length > 0) {
|
|
84
|
+
throw new Error(`Execution-contract profile "${id}" failed for "${manifest.namespace}":
|
|
85
|
+
${findings.map((finding) => `- ${finding.message}`).join("\n")}`);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
adapter: { id, evaluate: validate }
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
var STRICT_EXECUTION_CONTRACT_PROFILE = executionContractProfile();
|
|
92
|
+
function isManifest(subject) {
|
|
93
|
+
return typeof subject.manifestVersion === "number" && Array.isArray(subject.actions);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export { STRICT_EXECUTION_CONTRACT_PROFILE, STRICT_EXECUTION_CONTRACT_PROFILE_ID, executionContractProfile };
|
|
97
|
+
//# sourceMappingURL=chunk-DDO4EQ2J.js.map
|
|
98
|
+
//# sourceMappingURL=chunk-DDO4EQ2J.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../certification/index.ts"],"names":[],"mappings":";;;AA+CO,IAAM,oCAAA,GAAuC;AAGpD,SAAS,mBAAA,GAAqE;AAC7E,EAAA,OAAO;AAAA,IACN,CAAC,gCAAgB,IAAI,GAAA,CAAI,CAAC,iBAAA,EAAmB,oBAAoB,CAAC,CAAC,CAAA;AAAA,IACnE,CAAC,mCAAmB,IAAI,GAAA,CAAI,CAAC,SAAA,EAAW,WAAA,EAAa,MAAM,CAAC,CAAC,CAAA;AAAA,IAC7D,CAAC,+BAAe,IAAI,GAAA,CAAI,CAAC,UAAA,EAAY,WAAA,EAAa,YAAY,CAAC,CAAC,CAAA;AAAA,IAChE,CAAC,8BAAc,IAAI,GAAA,CAAI,CAAC,WAAA,EAAa,UAAA,EAAY,cAAc,CAAC,CAAC,CAAA;AAAA,IACjE,CAAC,+BAAe,IAAI,GAAA,CAAI,CAAC,mBAAA,EAAqB,8BAA8B,CAAC,CAAC;AAAA,GAC/E;AACD;AACA,IAAM,sBAAA,GAAyB,sBAA2B,IAAI,G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,IAAA,CAAK,IAAI,CAAC,CAAA,CAAE,CAAA;AAAA,MAC1J;AAAA,IACD,CAAA;AAAA,IACA,OAAA,EAAS,EAAE,EAAA,EAAI,QAAA,EAAU,QAAA;AAAS,GACnC;AACD;AAGO,IAAM,oCAA8D,wBAAA;AAE3E,SAAS,WAAW,OAAA,EAA4E;AAC/F,EAAA,OAAO,OAAQ,OAAA,CAA2B,eAAA,KAAoB,YAAY,KAAA,CAAM,OAAA,CAAS,QAA2B,OAAO,CAAA;AAC5H","file":"chunk-DDO4EQ2J.js","sourcesContent":["import type { ActionCompletionMode } from \"../actions\";\nimport { exportModuleManifest, type ModuleManifest } from \"../manifest\";\nimport type { FabricModule } from \"../modules\";\n\n// ── Execution-contract certification ────────────────────────────────────────\n//\n// The base types keep the execution contract optional, because making it\n// mandatory is a break for every existing manifest. A deployment that wants\n// the guarantee applies a profile at certification instead: every governed\n// action declares all six dimensions, and any action that hands work to an\n// external system says how long it may wait. The profile is a seam a\n// vertical applies, not content the platform assumes.\n\nexport type ExecutionContractFindingCode =\n\t| \"missing_execution_contract\"\n\t| \"invalid_execution_dimension\"\n\t| \"missing_sensitivity\"\n\t| \"missing_completion_deadline\"\n\t| \"unexpected_completion_deadline\";\n\nexport interface ExecutionContractFinding {\n\tcode: ExecutionContractFindingCode;\n\tactionId: string;\n\tmessage: string;\n}\n\nexport interface ExecutionContractProfileOptions {\n\t/** Adapter and profile id. Defaults to the strict profile's id. */\n\tid?: string;\n\t/** Require `sensitivity`, which the base contract leaves optional. Defaults to true. */\n\trequireSensitivity?: boolean;\n\t/**\n\t * Completion modes that must declare `completionDeadlineMs`. Defaults to\n\t * both modes that hand work off, since without a deadline nothing sweeps a\n\t * callback that never comes.\n\t */\n\trequireDeadlineFor?: readonly ActionCompletionMode[];\n}\n\nexport interface ExecutionContractProfile {\n\treadonly id: string;\n\tvalidate(manifest: ModuleManifest): ExecutionContractFinding[];\n\tassert(subject: FabricModule<unknown> | ModuleManifest): void;\n\t/** For certification tooling: the compiler's conformance adapter shape. */\n\treadonly adapter: { id: string; evaluate(manifest: ModuleManifest): ExecutionContractFinding[] };\n}\n\nexport const STRICT_EXECUTION_CONTRACT_PROFILE_ID = \"fabric.execution-contract.strict\";\n\n/** The permitted values of each required dimension, mirrored from the action types. */\nfunction permittedDimensions(): ReadonlyArray<[string, ReadonlySet<unknown>]> {\n\treturn [\n\t\t[\"connectivity\", new Set([\"online-required\", \"offline-capturable\"])],\n\t\t[\"authorityMoment\", new Set([\"capture\", \"execution\", \"both\"])],\n\t\t[\"idempotency\", new Set([\"required\", \"supported\", \"prohibited\"])],\n\t\t[\"completion\", new Set([\"immediate\", \"accepted\", \"long-running\"])],\n\t\t[\"consistency\", new Set([\"authoritative-now\", \"provisional-until-reconciled\"])],\n\t];\n}\nconst permittedSensitivities = (): ReadonlySet<string> => new Set([\"public\", \"internal\", \"confidential\", \"restricted\"]);\n\nexport function executionContractProfile(options: ExecutionContractProfileOptions = {}): ExecutionContractProfile {\n\tconst id = options.id ?? STRICT_EXECUTION_CONTRACT_PROFILE_ID;\n\tconst requireSensitivity = options.requireSensitivity ?? true;\n\tconst requireDeadlineFor = new Set<ActionCompletionMode>(options.requireDeadlineFor ?? [\"accepted\", \"long-running\"]);\n\tconst dimensions = permittedDimensions();\n\tconst sensitivities = permittedSensitivities();\n\tconst validate = (manifest: ModuleManifest): ExecutionContractFinding[] => {\n\t\tconst findings: ExecutionContractFinding[] = [];\n\t\tfor (const action of manifest.actions) {\n\t\t\tconst contract = action.execution;\n\t\t\tif (!contract) {\n\t\t\t\tfindings.push({\n\t\t\t\t\tcode: \"missing_execution_contract\",\n\t\t\t\t\tactionId: action.actionId,\n\t\t\t\t\tmessage: `Action \"${action.actionId}\" declares no execution contract; connectivity, authorityMoment, idempotency, completion, and consistency are required.`,\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// The contract's presence proves nothing about its content: a manifest\n\t\t\t// reaches certification without passing through the registry, so each\n\t\t\t// dimension is checked against its permitted values here.\n\t\t\tlet complete = true;\n\t\t\tfor (const [dimension, permitted] of dimensions) {\n\t\t\t\tconst value = (contract as unknown as Record<string, unknown>)[dimension];\n\t\t\t\tif (!permitted.has(value)) {\n\t\t\t\t\tcomplete = false;\n\t\t\t\t\tfindings.push({\n\t\t\t\t\t\tcode: \"invalid_execution_dimension\",\n\t\t\t\t\t\tactionId: action.actionId,\n\t\t\t\t\t\tmessage: `Action \"${action.actionId}\" ${value === undefined ? \"declares no\" : `declares an unknown`} ${dimension}${value === undefined ? \"\" : ` \"${String(value)}\"`}; permitted values are ${[...permitted].map((item) => `\"${String(item)}\"`).join(\", \")}.`,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contract.sensitivity !== undefined && !sensitivities.has(contract.sensitivity)) {\n\t\t\t\tfindings.push({\n\t\t\t\t\tcode: \"invalid_execution_dimension\",\n\t\t\t\t\tactionId: action.actionId,\n\t\t\t\t\tmessage: `Action \"${action.actionId}\" declares an unknown sensitivity \"${String(contract.sensitivity)}\"; permitted values are ${[...sensitivities].map((item) => `\"${item}\"`).join(\", \")}.`,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (!complete) continue;\n\t\t\tif (contract.completion === \"immediate\" && contract.completionDeadlineMs !== undefined) {\n\t\t\t\tfindings.push({\n\t\t\t\t\tcode: \"unexpected_completion_deadline\",\n\t\t\t\t\tactionId: action.actionId,\n\t\t\t\t\tmessage: `Action \"${action.actionId}\" declares immediate completion and a completionDeadlineMs; nothing external completes it.`,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (requireSensitivity && contract.sensitivity === undefined) {\n\t\t\t\tfindings.push({\n\t\t\t\t\tcode: \"missing_sensitivity\",\n\t\t\t\t\tactionId: action.actionId,\n\t\t\t\t\tmessage: `Action \"${action.actionId}\" declares no sensitivity; say whether its durable data is public, internal, confidential, or restricted.`,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (requireDeadlineFor.has(contract.completion) && !(typeof contract.completionDeadlineMs === \"number\" && contract.completionDeadlineMs > 0)) {\n\t\t\t\tfindings.push({\n\t\t\t\t\tcode: \"missing_completion_deadline\",\n\t\t\t\t\tactionId: action.actionId,\n\t\t\t\t\tmessage: `Action \"${action.actionId}\" declares ${contract.completion} completion and no completionDeadlineMs; a callback that never comes would never be noticed.`,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn findings;\n\t};\n\treturn {\n\t\tid,\n\t\tvalidate,\n\t\tassert(subject) {\n\t\t\tconst manifest = isManifest(subject) ? subject : exportModuleManifest(subject);\n\t\t\tconst findings = validate(manifest);\n\t\t\tif (findings.length > 0) {\n\t\t\t\tthrow new Error(`Execution-contract profile \"${id}\" failed for \"${manifest.namespace}\":\\n${findings.map((finding) => `- ${finding.message}`).join(\"\\n\")}`);\n\t\t\t}\n\t\t},\n\t\tadapter: { id, evaluate: validate },\n\t};\n}\n\n/** All six dimensions on every action, and a deadline wherever work is handed off. */\nexport const STRICT_EXECUTION_CONTRACT_PROFILE: ExecutionContractProfile = executionContractProfile();\n\nfunction isManifest(subject: FabricModule<unknown> | ModuleManifest): subject is ModuleManifest {\n\treturn typeof (subject as ModuleManifest).manifestVersion === \"number\" && Array.isArray((subject as ModuleManifest).actions);\n}\n"]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkZBXFRJON_cjs = require('./chunk-ZBXFRJON.cjs');
|
|
4
|
+
|
|
5
|
+
// certification/index.ts
|
|
6
|
+
var STRICT_EXECUTION_CONTRACT_PROFILE_ID = "fabric.execution-contract.strict";
|
|
7
|
+
function permittedDimensions() {
|
|
8
|
+
return [
|
|
9
|
+
["connectivity", /* @__PURE__ */ new Set(["online-required", "offline-capturable"])],
|
|
10
|
+
["authorityMoment", /* @__PURE__ */ new Set(["capture", "execution", "both"])],
|
|
11
|
+
["idempotency", /* @__PURE__ */ new Set(["required", "supported", "prohibited"])],
|
|
12
|
+
["completion", /* @__PURE__ */ new Set(["immediate", "accepted", "long-running"])],
|
|
13
|
+
["consistency", /* @__PURE__ */ new Set(["authoritative-now", "provisional-until-reconciled"])]
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
var permittedSensitivities = () => /* @__PURE__ */ new Set(["public", "internal", "confidential", "restricted"]);
|
|
17
|
+
function executionContractProfile(options = {}) {
|
|
18
|
+
const id = options.id ?? STRICT_EXECUTION_CONTRACT_PROFILE_ID;
|
|
19
|
+
const requireSensitivity = options.requireSensitivity ?? true;
|
|
20
|
+
const requireDeadlineFor = new Set(options.requireDeadlineFor ?? ["accepted", "long-running"]);
|
|
21
|
+
const dimensions = permittedDimensions();
|
|
22
|
+
const sensitivities = permittedSensitivities();
|
|
23
|
+
const validate = (manifest) => {
|
|
24
|
+
const findings = [];
|
|
25
|
+
for (const action of manifest.actions) {
|
|
26
|
+
const contract = action.execution;
|
|
27
|
+
if (!contract) {
|
|
28
|
+
findings.push({
|
|
29
|
+
code: "missing_execution_contract",
|
|
30
|
+
actionId: action.actionId,
|
|
31
|
+
message: `Action "${action.actionId}" declares no execution contract; connectivity, authorityMoment, idempotency, completion, and consistency are required.`
|
|
32
|
+
});
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
let complete = true;
|
|
36
|
+
for (const [dimension, permitted] of dimensions) {
|
|
37
|
+
const value = contract[dimension];
|
|
38
|
+
if (!permitted.has(value)) {
|
|
39
|
+
complete = false;
|
|
40
|
+
findings.push({
|
|
41
|
+
code: "invalid_execution_dimension",
|
|
42
|
+
actionId: action.actionId,
|
|
43
|
+
message: `Action "${action.actionId}" ${value === void 0 ? "declares no" : `declares an unknown`} ${dimension}${value === void 0 ? "" : ` "${String(value)}"`}; permitted values are ${[...permitted].map((item) => `"${String(item)}"`).join(", ")}.`
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (contract.sensitivity !== void 0 && !sensitivities.has(contract.sensitivity)) {
|
|
48
|
+
findings.push({
|
|
49
|
+
code: "invalid_execution_dimension",
|
|
50
|
+
actionId: action.actionId,
|
|
51
|
+
message: `Action "${action.actionId}" declares an unknown sensitivity "${String(contract.sensitivity)}"; permitted values are ${[...sensitivities].map((item) => `"${item}"`).join(", ")}.`
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (!complete) continue;
|
|
55
|
+
if (contract.completion === "immediate" && contract.completionDeadlineMs !== void 0) {
|
|
56
|
+
findings.push({
|
|
57
|
+
code: "unexpected_completion_deadline",
|
|
58
|
+
actionId: action.actionId,
|
|
59
|
+
message: `Action "${action.actionId}" declares immediate completion and a completionDeadlineMs; nothing external completes it.`
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
if (requireSensitivity && contract.sensitivity === void 0) {
|
|
63
|
+
findings.push({
|
|
64
|
+
code: "missing_sensitivity",
|
|
65
|
+
actionId: action.actionId,
|
|
66
|
+
message: `Action "${action.actionId}" declares no sensitivity; say whether its durable data is public, internal, confidential, or restricted.`
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
if (requireDeadlineFor.has(contract.completion) && !(typeof contract.completionDeadlineMs === "number" && contract.completionDeadlineMs > 0)) {
|
|
70
|
+
findings.push({
|
|
71
|
+
code: "missing_completion_deadline",
|
|
72
|
+
actionId: action.actionId,
|
|
73
|
+
message: `Action "${action.actionId}" declares ${contract.completion} completion and no completionDeadlineMs; a callback that never comes would never be noticed.`
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return findings;
|
|
78
|
+
};
|
|
79
|
+
return {
|
|
80
|
+
id,
|
|
81
|
+
validate,
|
|
82
|
+
assert(subject) {
|
|
83
|
+
const manifest = isManifest(subject) ? subject : chunkZBXFRJON_cjs.exportModuleManifest(subject);
|
|
84
|
+
const findings = validate(manifest);
|
|
85
|
+
if (findings.length > 0) {
|
|
86
|
+
throw new Error(`Execution-contract profile "${id}" failed for "${manifest.namespace}":
|
|
87
|
+
${findings.map((finding) => `- ${finding.message}`).join("\n")}`);
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
adapter: { id, evaluate: validate }
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
var STRICT_EXECUTION_CONTRACT_PROFILE = executionContractProfile();
|
|
94
|
+
function isManifest(subject) {
|
|
95
|
+
return typeof subject.manifestVersion === "number" && Array.isArray(subject.actions);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
exports.STRICT_EXECUTION_CONTRACT_PROFILE = STRICT_EXECUTION_CONTRACT_PROFILE;
|
|
99
|
+
exports.STRICT_EXECUTION_CONTRACT_PROFILE_ID = STRICT_EXECUTION_CONTRACT_PROFILE_ID;
|
|
100
|
+
exports.executionContractProfile = executionContractProfile;
|
|
101
|
+
//# sourceMappingURL=chunk-PFKTD7V5.cjs.map
|
|
102
|
+
//# sourceMappingURL=chunk-PFKTD7V5.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../certification/index.ts"],"names":["exportModuleManifest"],"mappings":";;;;;AA+CO,IAAM,oCAAA,GAAuC;AAGpD,SAAS,mBAAA,GAAqE;AAC7E,EAAA,OAAO;AAAA,IACN,CAAC,gCAAgB,IAAI,GAAA,CAAI,CAAC,iBAAA,EAAmB,oBAAoB,CAAC,CAAC,CAAA;AAAA,IACnE,CAAC,mCAAmB,IAAI,GAAA,CAAI,CAAC,SAAA,EAAW,WAAA,EAAa,MAAM,CAAC,CAAC,CAAA;AAAA,IAC7D,CAAC,+BAAe,IAAI,GAAA,CAAI,CAAC,UAAA,EAAY,WAAA,EAAa,YAAY,CAAC,CAAC,CAAA;AAAA,IAChE,CAAC,8BAAc,IAAI,GAAA,CAAI,CAAC,WAAA,EAAa,UAAA,EAAY,cAAc,CAAC,CAAC,CAAA;AAAA,IACjE,CAAC,+BAAe,IAAI,GAAA,CAAI,CAAC,mBAAA,EAAqB,8BAA8B,CAAC,CAAC;AAAA,GAC/E;AACD;AACA,IAAM,sBAAA,GAAy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A,CAAE,CAAA,CAAE,IAAA,CAAK,IAAI,CAAC,CAAA,CAAE,CAAA;AAAA,MAC1J;AAAA,IACD,CAAA;AAAA,IACA,OAAA,EAAS,EAAE,EAAA,EAAI,QAAA,EAAU,QAAA;AAAS,GACnC;AACD;AAGO,IAAM,oCAA8D,wBAAA;AAE3E,SAAS,WAAW,OAAA,EAA4E;AAC/F,EAAA,OAAO,OAAQ,OAAA,CAA2B,eAAA,KAAoB,YAAY,KAAA,CAAM,OAAA,CAAS,QAA2B,OAAO,CAAA;AAC5H","file":"chunk-PFKTD7V5.cjs","sourcesContent":["import type { ActionCompletionMode } from \"../actions\";\nimport { exportModuleManifest, type ModuleManifest } from \"../manifest\";\nimport type { FabricModule } from \"../modules\";\n\n// ── Execution-contract certification ────────────────────────────────────────\n//\n// The base types keep the execution contract optional, because making it\n// mandatory is a break for every existing manifest. A deployment that wants\n// the guarantee applies a profile at certification instead: every governed\n// action declares all six dimensions, and any action that hands work to an\n// external system says how long it may wait. The profile is a seam a\n// vertical applies, not content the platform assumes.\n\nexport type ExecutionContractFindingCode =\n\t| \"missing_execution_contract\"\n\t| \"invalid_execution_dimension\"\n\t| \"missing_sensitivity\"\n\t| \"missing_completion_deadline\"\n\t| \"unexpected_completion_deadline\";\n\nexport interface ExecutionContractFinding {\n\tcode: ExecutionContractFindingCode;\n\tactionId: string;\n\tmessage: string;\n}\n\nexport interface ExecutionContractProfileOptions {\n\t/** Adapter and profile id. Defaults to the strict profile's id. */\n\tid?: string;\n\t/** Require `sensitivity`, which the base contract leaves optional. Defaults to true. */\n\trequireSensitivity?: boolean;\n\t/**\n\t * Completion modes that must declare `completionDeadlineMs`. Defaults to\n\t * both modes that hand work off, since without a deadline nothing sweeps a\n\t * callback that never comes.\n\t */\n\trequireDeadlineFor?: readonly ActionCompletionMode[];\n}\n\nexport interface ExecutionContractProfile {\n\treadonly id: string;\n\tvalidate(manifest: ModuleManifest): ExecutionContractFinding[];\n\tassert(subject: FabricModule<unknown> | ModuleManifest): void;\n\t/** For certification tooling: the compiler's conformance adapter shape. */\n\treadonly adapter: { id: string; evaluate(manifest: ModuleManifest): ExecutionContractFinding[] };\n}\n\nexport const STRICT_EXECUTION_CONTRACT_PROFILE_ID = \"fabric.execution-contract.strict\";\n\n/** The permitted values of each required dimension, mirrored from the action types. */\nfunction permittedDimensions(): ReadonlyArray<[string, ReadonlySet<unknown>]> {\n\treturn [\n\t\t[\"connectivity\", new Set([\"online-required\", \"offline-capturable\"])],\n\t\t[\"authorityMoment\", new Set([\"capture\", \"execution\", \"both\"])],\n\t\t[\"idempotency\", new Set([\"required\", \"supported\", \"prohibited\"])],\n\t\t[\"completion\", new Set([\"immediate\", \"accepted\", \"long-running\"])],\n\t\t[\"consistency\", new Set([\"authoritative-now\", \"provisional-until-reconciled\"])],\n\t];\n}\nconst permittedSensitivities = (): ReadonlySet<string> => new Set([\"public\", \"internal\", \"confidential\", \"restricted\"]);\n\nexport function executionContractProfile(options: ExecutionContractProfileOptions = {}): ExecutionContractProfile {\n\tconst id = options.id ?? STRICT_EXECUTION_CONTRACT_PROFILE_ID;\n\tconst requireSensitivity = options.requireSensitivity ?? true;\n\tconst requireDeadlineFor = new Set<ActionCompletionMode>(options.requireDeadlineFor ?? [\"accepted\", \"long-running\"]);\n\tconst dimensions = permittedDimensions();\n\tconst sensitivities = permittedSensitivities();\n\tconst validate = (manifest: ModuleManifest): ExecutionContractFinding[] => {\n\t\tconst findings: ExecutionContractFinding[] = [];\n\t\tfor (const action of manifest.actions) {\n\t\t\tconst contract = action.execution;\n\t\t\tif (!contract) {\n\t\t\t\tfindings.push({\n\t\t\t\t\tcode: \"missing_execution_contract\",\n\t\t\t\t\tactionId: action.actionId,\n\t\t\t\t\tmessage: `Action \"${action.actionId}\" declares no execution contract; connectivity, authorityMoment, idempotency, completion, and consistency are required.`,\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// The contract's presence proves nothing about its content: a manifest\n\t\t\t// reaches certification without passing through the registry, so each\n\t\t\t// dimension is checked against its permitted values here.\n\t\t\tlet complete = true;\n\t\t\tfor (const [dimension, permitted] of dimensions) {\n\t\t\t\tconst value = (contract as unknown as Record<string, unknown>)[dimension];\n\t\t\t\tif (!permitted.has(value)) {\n\t\t\t\t\tcomplete = false;\n\t\t\t\t\tfindings.push({\n\t\t\t\t\t\tcode: \"invalid_execution_dimension\",\n\t\t\t\t\t\tactionId: action.actionId,\n\t\t\t\t\t\tmessage: `Action \"${action.actionId}\" ${value === undefined ? \"declares no\" : `declares an unknown`} ${dimension}${value === undefined ? \"\" : ` \"${String(value)}\"`}; permitted values are ${[...permitted].map((item) => `\"${String(item)}\"`).join(\", \")}.`,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contract.sensitivity !== undefined && !sensitivities.has(contract.sensitivity)) {\n\t\t\t\tfindings.push({\n\t\t\t\t\tcode: \"invalid_execution_dimension\",\n\t\t\t\t\tactionId: action.actionId,\n\t\t\t\t\tmessage: `Action \"${action.actionId}\" declares an unknown sensitivity \"${String(contract.sensitivity)}\"; permitted values are ${[...sensitivities].map((item) => `\"${item}\"`).join(\", \")}.`,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (!complete) continue;\n\t\t\tif (contract.completion === \"immediate\" && contract.completionDeadlineMs !== undefined) {\n\t\t\t\tfindings.push({\n\t\t\t\t\tcode: \"unexpected_completion_deadline\",\n\t\t\t\t\tactionId: action.actionId,\n\t\t\t\t\tmessage: `Action \"${action.actionId}\" declares immediate completion and a completionDeadlineMs; nothing external completes it.`,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (requireSensitivity && contract.sensitivity === undefined) {\n\t\t\t\tfindings.push({\n\t\t\t\t\tcode: \"missing_sensitivity\",\n\t\t\t\t\tactionId: action.actionId,\n\t\t\t\t\tmessage: `Action \"${action.actionId}\" declares no sensitivity; say whether its durable data is public, internal, confidential, or restricted.`,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (requireDeadlineFor.has(contract.completion) && !(typeof contract.completionDeadlineMs === \"number\" && contract.completionDeadlineMs > 0)) {\n\t\t\t\tfindings.push({\n\t\t\t\t\tcode: \"missing_completion_deadline\",\n\t\t\t\t\tactionId: action.actionId,\n\t\t\t\t\tmessage: `Action \"${action.actionId}\" declares ${contract.completion} completion and no completionDeadlineMs; a callback that never comes would never be noticed.`,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn findings;\n\t};\n\treturn {\n\t\tid,\n\t\tvalidate,\n\t\tassert(subject) {\n\t\t\tconst manifest = isManifest(subject) ? subject : exportModuleManifest(subject);\n\t\t\tconst findings = validate(manifest);\n\t\t\tif (findings.length > 0) {\n\t\t\t\tthrow new Error(`Execution-contract profile \"${id}\" failed for \"${manifest.namespace}\":\\n${findings.map((finding) => `- ${finding.message}`).join(\"\\n\")}`);\n\t\t\t}\n\t\t},\n\t\tadapter: { id, evaluate: validate },\n\t};\n}\n\n/** All six dimensions on every action, and a deadline wherever work is handed off. */\nexport const STRICT_EXECUTION_CONTRACT_PROFILE: ExecutionContractProfile = executionContractProfile();\n\nfunction isManifest(subject: FabricModule<unknown> | ModuleManifest): subject is ModuleManifest {\n\treturn typeof (subject as ModuleManifest).manifestVersion === \"number\" && Array.isArray((subject as ModuleManifest).actions);\n}\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,94 +1,51 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var chunkIFW43ELT_cjs = require('./chunk-IFW43ELT.cjs');
|
|
3
|
+
var chunkUSDLP4E7_cjs = require('./chunk-USDLP4E7.cjs');
|
|
4
|
+
var chunkLZSE6QGQ_cjs = require('./chunk-LZSE6QGQ.cjs');
|
|
6
5
|
var chunkVZ6C4LXC_cjs = require('./chunk-VZ6C4LXC.cjs');
|
|
7
6
|
var chunkX3GHYMAJ_cjs = require('./chunk-X3GHYMAJ.cjs');
|
|
8
|
-
var chunkCXR6KEKQ_cjs = require('./chunk-CXR6KEKQ.cjs');
|
|
9
7
|
var chunkWI7CWNYI_cjs = require('./chunk-WI7CWNYI.cjs');
|
|
10
|
-
var chunkUSDLP4E7_cjs = require('./chunk-USDLP4E7.cjs');
|
|
11
8
|
var chunkMSABJAED_cjs = require('./chunk-MSABJAED.cjs');
|
|
12
9
|
var chunkXZQZQ5SW_cjs = require('./chunk-XZQZQ5SW.cjs');
|
|
13
10
|
var chunkF3E5SXPN_cjs = require('./chunk-F3E5SXPN.cjs');
|
|
11
|
+
var chunkPFKTD7V5_cjs = require('./chunk-PFKTD7V5.cjs');
|
|
12
|
+
var chunkZBXFRJON_cjs = require('./chunk-ZBXFRJON.cjs');
|
|
13
|
+
var chunkKIVQBZOA_cjs = require('./chunk-KIVQBZOA.cjs');
|
|
14
|
+
var chunkIFW43ELT_cjs = require('./chunk-IFW43ELT.cjs');
|
|
15
|
+
var chunkCXR6KEKQ_cjs = require('./chunk-CXR6KEKQ.cjs');
|
|
14
16
|
var chunk2AE6TMAX_cjs = require('./chunk-2AE6TMAX.cjs');
|
|
15
17
|
require('./chunk-PG5LYTUX.cjs');
|
|
16
18
|
var chunkTBS2S5AX_cjs = require('./chunk-TBS2S5AX.cjs');
|
|
17
|
-
var chunkLZSE6QGQ_cjs = require('./chunk-LZSE6QGQ.cjs');
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
|
|
21
|
-
Object.defineProperty(exports, "
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () { return chunkZBXFRJON_cjs.MODULE_MANIFEST_VERSION; }
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(exports, "exportModuleManifest", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () { return chunkZBXFRJON_cjs.exportModuleManifest; }
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(exports, "exportModuleManifestBundle", {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
get: function () { return chunkZBXFRJON_cjs.exportModuleManifestBundle; }
|
|
32
|
-
});
|
|
33
|
-
Object.defineProperty(exports, "isJsonSchemaExportableValidator", {
|
|
34
|
-
enumerable: true,
|
|
35
|
-
get: function () { return chunkZBXFRJON_cjs.isJsonSchemaExportableValidator; }
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(exports, "normalizeModuleManifest", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function () { return chunkZBXFRJON_cjs.normalizeModuleManifest; }
|
|
40
|
-
});
|
|
41
|
-
Object.defineProperty(exports, "normalizeModuleManifestBundle", {
|
|
42
|
-
enumerable: true,
|
|
43
|
-
get: function () { return chunkZBXFRJON_cjs.normalizeModuleManifestBundle; }
|
|
44
|
-
});
|
|
45
|
-
Object.defineProperty(exports, "createModuleRegistry", {
|
|
46
|
-
enumerable: true,
|
|
47
|
-
get: function () { return chunkKIVQBZOA_cjs.createModuleRegistry; }
|
|
48
|
-
});
|
|
49
|
-
Object.defineProperty(exports, "getEventTypeName", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
get: function () { return chunkKIVQBZOA_cjs.getEventTypeName; }
|
|
52
|
-
});
|
|
53
|
-
Object.defineProperty(exports, "getModuleDependencyNamespace", {
|
|
54
|
-
enumerable: true,
|
|
55
|
-
get: function () { return chunkKIVQBZOA_cjs.getModuleDependencyNamespace; }
|
|
56
|
-
});
|
|
57
|
-
Object.defineProperty(exports, "getObjectTypeName", {
|
|
58
|
-
enumerable: true,
|
|
59
|
-
get: function () { return chunkKIVQBZOA_cjs.getObjectTypeName; }
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(exports, "registerFabricModule", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function () { return chunkKIVQBZOA_cjs.registerFabricModule; }
|
|
64
|
-
});
|
|
65
|
-
Object.defineProperty(exports, "registerFabricModules", {
|
|
22
|
+
Object.defineProperty(exports, "createDeterministicIdFactory", {
|
|
66
23
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkUSDLP4E7_cjs.createDeterministicIdFactory; }
|
|
68
25
|
});
|
|
69
|
-
Object.defineProperty(exports, "
|
|
26
|
+
Object.defineProperty(exports, "createFakeActionContext", {
|
|
70
27
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkUSDLP4E7_cjs.createFakeActionContext; }
|
|
72
29
|
});
|
|
73
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "createInMemoryAdapterRegistry", {
|
|
74
31
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkUSDLP4E7_cjs.createInMemoryAdapterRegistry; }
|
|
76
33
|
});
|
|
77
|
-
Object.defineProperty(exports, "
|
|
34
|
+
Object.defineProperty(exports, "FABRIC_ID_PREFIXES", {
|
|
78
35
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkLZSE6QGQ_cjs.FABRIC_ID_PREFIXES; }
|
|
80
37
|
});
|
|
81
|
-
Object.defineProperty(exports, "
|
|
38
|
+
Object.defineProperty(exports, "createFabricId", {
|
|
82
39
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkLZSE6QGQ_cjs.createFabricId; }
|
|
84
41
|
});
|
|
85
|
-
Object.defineProperty(exports, "
|
|
42
|
+
Object.defineProperty(exports, "isFabricId", {
|
|
86
43
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkLZSE6QGQ_cjs.isFabricId; }
|
|
88
45
|
});
|
|
89
|
-
Object.defineProperty(exports, "
|
|
46
|
+
Object.defineProperty(exports, "parseFabricId", {
|
|
90
47
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkLZSE6QGQ_cjs.parseFabricId; }
|
|
92
49
|
});
|
|
93
50
|
Object.defineProperty(exports, "aggregatePolicyOutcomes", {
|
|
94
51
|
enumerable: true,
|
|
@@ -158,22 +115,6 @@ Object.defineProperty(exports, "stableChecksum", {
|
|
|
158
115
|
enumerable: true,
|
|
159
116
|
get: function () { return chunkX3GHYMAJ_cjs.stableChecksum; }
|
|
160
117
|
});
|
|
161
|
-
Object.defineProperty(exports, "createViewRegistry", {
|
|
162
|
-
enumerable: true,
|
|
163
|
-
get: function () { return chunkCXR6KEKQ_cjs.createViewRegistry; }
|
|
164
|
-
});
|
|
165
|
-
Object.defineProperty(exports, "replayEvents", {
|
|
166
|
-
enumerable: true,
|
|
167
|
-
get: function () { return chunkCXR6KEKQ_cjs.replayEvents; }
|
|
168
|
-
});
|
|
169
|
-
Object.defineProperty(exports, "replayView", {
|
|
170
|
-
enumerable: true,
|
|
171
|
-
get: function () { return chunkCXR6KEKQ_cjs.replayView; }
|
|
172
|
-
});
|
|
173
|
-
Object.defineProperty(exports, "viewContractKey", {
|
|
174
|
-
enumerable: true,
|
|
175
|
-
get: function () { return chunkCXR6KEKQ_cjs.viewContractKey; }
|
|
176
|
-
});
|
|
177
118
|
Object.defineProperty(exports, "createStateMachineRegistry", {
|
|
178
119
|
enumerable: true,
|
|
179
120
|
get: function () { return chunkWI7CWNYI_cjs.createStateMachineRegistry; }
|
|
@@ -186,18 +127,6 @@ Object.defineProperty(exports, "validateStateMachineTransition", {
|
|
|
186
127
|
enumerable: true,
|
|
187
128
|
get: function () { return chunkWI7CWNYI_cjs.validateStateMachineTransition; }
|
|
188
129
|
});
|
|
189
|
-
Object.defineProperty(exports, "createDeterministicIdFactory", {
|
|
190
|
-
enumerable: true,
|
|
191
|
-
get: function () { return chunkUSDLP4E7_cjs.createDeterministicIdFactory; }
|
|
192
|
-
});
|
|
193
|
-
Object.defineProperty(exports, "createFakeActionContext", {
|
|
194
|
-
enumerable: true,
|
|
195
|
-
get: function () { return chunkUSDLP4E7_cjs.createFakeActionContext; }
|
|
196
|
-
});
|
|
197
|
-
Object.defineProperty(exports, "createInMemoryAdapterRegistry", {
|
|
198
|
-
enumerable: true,
|
|
199
|
-
get: function () { return chunkUSDLP4E7_cjs.createInMemoryAdapterRegistry; }
|
|
200
|
-
});
|
|
201
130
|
Object.defineProperty(exports, "ACTOR_TYPES", {
|
|
202
131
|
enumerable: true,
|
|
203
132
|
get: function () { return chunkMSABJAED_cjs.ACTOR_TYPES; }
|
|
@@ -254,37 +183,121 @@ Object.defineProperty(exports, "AgentActionPolicyRegistry", {
|
|
|
254
183
|
enumerable: true,
|
|
255
184
|
get: function () { return chunkF3E5SXPN_cjs.AgentActionPolicyRegistry; }
|
|
256
185
|
});
|
|
257
|
-
Object.defineProperty(exports, "
|
|
186
|
+
Object.defineProperty(exports, "STRICT_EXECUTION_CONTRACT_PROFILE", {
|
|
258
187
|
enumerable: true,
|
|
259
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkPFKTD7V5_cjs.STRICT_EXECUTION_CONTRACT_PROFILE; }
|
|
260
189
|
});
|
|
261
|
-
Object.defineProperty(exports, "
|
|
190
|
+
Object.defineProperty(exports, "STRICT_EXECUTION_CONTRACT_PROFILE_ID", {
|
|
262
191
|
enumerable: true,
|
|
263
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkPFKTD7V5_cjs.STRICT_EXECUTION_CONTRACT_PROFILE_ID; }
|
|
264
193
|
});
|
|
265
|
-
Object.defineProperty(exports, "
|
|
194
|
+
Object.defineProperty(exports, "executionContractProfile", {
|
|
266
195
|
enumerable: true,
|
|
267
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkPFKTD7V5_cjs.executionContractProfile; }
|
|
268
197
|
});
|
|
269
|
-
Object.defineProperty(exports, "
|
|
198
|
+
Object.defineProperty(exports, "MODULE_MANIFEST_VERSION", {
|
|
270
199
|
enumerable: true,
|
|
271
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkZBXFRJON_cjs.MODULE_MANIFEST_VERSION; }
|
|
272
201
|
});
|
|
273
|
-
Object.defineProperty(exports, "
|
|
202
|
+
Object.defineProperty(exports, "exportModuleManifest", {
|
|
274
203
|
enumerable: true,
|
|
275
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunkZBXFRJON_cjs.exportModuleManifest; }
|
|
276
205
|
});
|
|
277
|
-
Object.defineProperty(exports, "
|
|
206
|
+
Object.defineProperty(exports, "exportModuleManifestBundle", {
|
|
278
207
|
enumerable: true,
|
|
279
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkZBXFRJON_cjs.exportModuleManifestBundle; }
|
|
280
209
|
});
|
|
281
|
-
Object.defineProperty(exports, "
|
|
210
|
+
Object.defineProperty(exports, "isJsonSchemaExportableValidator", {
|
|
282
211
|
enumerable: true,
|
|
283
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkZBXFRJON_cjs.isJsonSchemaExportableValidator; }
|
|
284
213
|
});
|
|
285
|
-
Object.defineProperty(exports, "
|
|
214
|
+
Object.defineProperty(exports, "normalizeModuleManifest", {
|
|
286
215
|
enumerable: true,
|
|
287
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkZBXFRJON_cjs.normalizeModuleManifest; }
|
|
217
|
+
});
|
|
218
|
+
Object.defineProperty(exports, "normalizeModuleManifestBundle", {
|
|
219
|
+
enumerable: true,
|
|
220
|
+
get: function () { return chunkZBXFRJON_cjs.normalizeModuleManifestBundle; }
|
|
221
|
+
});
|
|
222
|
+
Object.defineProperty(exports, "createModuleRegistry", {
|
|
223
|
+
enumerable: true,
|
|
224
|
+
get: function () { return chunkKIVQBZOA_cjs.createModuleRegistry; }
|
|
225
|
+
});
|
|
226
|
+
Object.defineProperty(exports, "getEventTypeName", {
|
|
227
|
+
enumerable: true,
|
|
228
|
+
get: function () { return chunkKIVQBZOA_cjs.getEventTypeName; }
|
|
229
|
+
});
|
|
230
|
+
Object.defineProperty(exports, "getModuleDependencyNamespace", {
|
|
231
|
+
enumerable: true,
|
|
232
|
+
get: function () { return chunkKIVQBZOA_cjs.getModuleDependencyNamespace; }
|
|
233
|
+
});
|
|
234
|
+
Object.defineProperty(exports, "getObjectTypeName", {
|
|
235
|
+
enumerable: true,
|
|
236
|
+
get: function () { return chunkKIVQBZOA_cjs.getObjectTypeName; }
|
|
237
|
+
});
|
|
238
|
+
Object.defineProperty(exports, "registerFabricModule", {
|
|
239
|
+
enumerable: true,
|
|
240
|
+
get: function () { return chunkKIVQBZOA_cjs.registerFabricModule; }
|
|
241
|
+
});
|
|
242
|
+
Object.defineProperty(exports, "registerFabricModules", {
|
|
243
|
+
enumerable: true,
|
|
244
|
+
get: function () { return chunkKIVQBZOA_cjs.registerFabricModules; }
|
|
245
|
+
});
|
|
246
|
+
Object.defineProperty(exports, "validateAndOrderFabricModules", {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
get: function () { return chunkKIVQBZOA_cjs.validateAndOrderFabricModules; }
|
|
249
|
+
});
|
|
250
|
+
Object.defineProperty(exports, "validateModuleNamespace", {
|
|
251
|
+
enumerable: true,
|
|
252
|
+
get: function () { return chunkKIVQBZOA_cjs.validateModuleNamespace; }
|
|
253
|
+
});
|
|
254
|
+
Object.defineProperty(exports, "assertObjectType", {
|
|
255
|
+
enumerable: true,
|
|
256
|
+
get: function () { return chunkIFW43ELT_cjs.assertObjectType; }
|
|
257
|
+
});
|
|
258
|
+
Object.defineProperty(exports, "assertPortableJsonSchema", {
|
|
259
|
+
enumerable: true,
|
|
260
|
+
get: function () { return chunkIFW43ELT_cjs.assertPortableJsonSchema; }
|
|
261
|
+
});
|
|
262
|
+
Object.defineProperty(exports, "createObjectTypeRegistry", {
|
|
263
|
+
enumerable: true,
|
|
264
|
+
get: function () { return chunkIFW43ELT_cjs.createObjectTypeRegistry; }
|
|
265
|
+
});
|
|
266
|
+
Object.defineProperty(exports, "validatePortableJson", {
|
|
267
|
+
enumerable: true,
|
|
268
|
+
get: function () { return chunkIFW43ELT_cjs.validatePortableJson; }
|
|
269
|
+
});
|
|
270
|
+
Object.defineProperty(exports, "createViewRegistry", {
|
|
271
|
+
enumerable: true,
|
|
272
|
+
get: function () { return chunkCXR6KEKQ_cjs.createViewRegistry; }
|
|
273
|
+
});
|
|
274
|
+
Object.defineProperty(exports, "replayEvents", {
|
|
275
|
+
enumerable: true,
|
|
276
|
+
get: function () { return chunkCXR6KEKQ_cjs.replayEvents; }
|
|
277
|
+
});
|
|
278
|
+
Object.defineProperty(exports, "replayView", {
|
|
279
|
+
enumerable: true,
|
|
280
|
+
get: function () { return chunkCXR6KEKQ_cjs.replayView; }
|
|
281
|
+
});
|
|
282
|
+
Object.defineProperty(exports, "viewContractKey", {
|
|
283
|
+
enumerable: true,
|
|
284
|
+
get: function () { return chunkCXR6KEKQ_cjs.viewContractKey; }
|
|
285
|
+
});
|
|
286
|
+
Object.defineProperty(exports, "createEventContractRegistry", {
|
|
287
|
+
enumerable: true,
|
|
288
|
+
get: function () { return chunk2AE6TMAX_cjs.createEventContractRegistry; }
|
|
289
|
+
});
|
|
290
|
+
Object.defineProperty(exports, "FABRIC_GOVERNANCE_CONTRACT_VERSION", {
|
|
291
|
+
enumerable: true,
|
|
292
|
+
get: function () { return chunkTBS2S5AX_cjs.FABRIC_GOVERNANCE_CONTRACT_VERSION; }
|
|
293
|
+
});
|
|
294
|
+
Object.defineProperty(exports, "assertGovernanceRuntimeEvidence", {
|
|
295
|
+
enumerable: true,
|
|
296
|
+
get: function () { return chunkTBS2S5AX_cjs.assertGovernanceRuntimeEvidence; }
|
|
297
|
+
});
|
|
298
|
+
Object.defineProperty(exports, "assertMutationGovernanceContext", {
|
|
299
|
+
enumerable: true,
|
|
300
|
+
get: function () { return chunkTBS2S5AX_cjs.assertMutationGovernanceContext; }
|
|
288
301
|
});
|
|
289
302
|
//# sourceMappingURL=index.cjs.map
|
|
290
303
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -13,3 +13,4 @@ export { EvidenceGenerationContext, EvidencePacketEnvelope, EvidencePacketRefere
|
|
|
13
13
|
export { ExecutionAttestation, ExecutionPrincipal, ExternalReconciliation, ExternalResourceOperation, ExternalResourceRef, FABRIC_GOVERNANCE_CONTRACT_VERSION, GovernanceRuntimeEvidence, MutationFootprint, MutationFootprintEntry, MutationGovernanceContext, MutationGovernanceResolutionInput, MutationGovernanceResolver, PolicyObligation, PolicyObligationStatus, ReconciliationStatus, assertGovernanceRuntimeEvidence, assertMutationGovernanceContext } from './governance/index.cjs';
|
|
14
14
|
export { AgentActionPolicyContext, AgentActionPolicyDecision, AgentActionPolicyDefinition, AgentActionPolicyEvaluator, AgentActionPolicyRegistry, AgentActionRiskTier, AgentActionRoute } from './agent-hitl/index.cjs';
|
|
15
15
|
export { FakeActionContextOptions, createDeterministicIdFactory, createFakeActionContext, createInMemoryAdapterRegistry } from './testing/index.cjs';
|
|
16
|
+
export { ExecutionContractFinding, ExecutionContractFindingCode, ExecutionContractProfile, ExecutionContractProfileOptions, STRICT_EXECUTION_CONTRACT_PROFILE, STRICT_EXECUTION_CONTRACT_PROFILE_ID, executionContractProfile } from './certification/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -13,3 +13,4 @@ export { EvidenceGenerationContext, EvidencePacketEnvelope, EvidencePacketRefere
|
|
|
13
13
|
export { ExecutionAttestation, ExecutionPrincipal, ExternalReconciliation, ExternalResourceOperation, ExternalResourceRef, FABRIC_GOVERNANCE_CONTRACT_VERSION, GovernanceRuntimeEvidence, MutationFootprint, MutationFootprintEntry, MutationGovernanceContext, MutationGovernanceResolutionInput, MutationGovernanceResolver, PolicyObligation, PolicyObligationStatus, ReconciliationStatus, assertGovernanceRuntimeEvidence, assertMutationGovernanceContext } from './governance/index.js';
|
|
14
14
|
export { AgentActionPolicyContext, AgentActionPolicyDecision, AgentActionPolicyDefinition, AgentActionPolicyEvaluator, AgentActionPolicyRegistry, AgentActionRiskTier, AgentActionRoute } from './agent-hitl/index.js';
|
|
15
15
|
export { FakeActionContextOptions, createDeterministicIdFactory, createFakeActionContext, createInMemoryAdapterRegistry } from './testing/index.js';
|
|
16
|
+
export { ExecutionContractFinding, ExecutionContractFindingCode, ExecutionContractProfile, ExecutionContractProfileOptions, STRICT_EXECUTION_CONTRACT_PROFILE, STRICT_EXECUTION_CONTRACT_PROFILE_ID, executionContractProfile } from './certification/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { assertObjectType, assertPortableJsonSchema, createObjectTypeRegistry, validatePortableJson } from './chunk-ZAEVQSB5.js';
|
|
1
|
+
export { createDeterministicIdFactory, createFakeActionContext, createInMemoryAdapterRegistry } from './chunk-DCC3UIUJ.js';
|
|
2
|
+
export { FABRIC_ID_PREFIXES, createFabricId, isFabricId, parseFabricId } from './chunk-RALMUSOX.js';
|
|
4
3
|
export { aggregatePolicyOutcomes, assertPolicyId, createPolicyRegistry, evaluatePolicyDefinition, evaluatePolicyDefinitions, evaluateRegisteredPolicies, validateDataPolicyDefinition, validatePolicyGuidance } from './chunk-JFVEPAED.js';
|
|
5
4
|
export { ANONYMIZATION_POLICY_VERSION, AnonymizationEngine, FieldRedactor, PLATFORM_PRIVACY_POLICY_VERSION, anonymizeAssetEventPayload, anonymizeEvidencePacket, anonymizeJsonValue, buildAnonymizationLifecycleEvidence, stableChecksum } from './chunk-ATWWZTRC.js';
|
|
6
|
-
export { createViewRegistry, replayEvents, replayView, viewContractKey } from './chunk-JG35DT2G.js';
|
|
7
5
|
export { createStateMachineRegistry, evaluateStateMachineTransition, validateStateMachineTransition } from './chunk-7GAWSUOG.js';
|
|
8
|
-
export { createDeterministicIdFactory, createFakeActionContext, createInMemoryAdapterRegistry } from './chunk-DCC3UIUJ.js';
|
|
9
6
|
export { ACTOR_TYPES, assertActionId, assertActorType, createActionRegistry, isActorType } from './chunk-2W6FORTE.js';
|
|
10
7
|
export { AdapterRegistry, MissingAdapterRegistrationError, assertAdapterOutcomeConsistency, classifyAdapterOutcome, executeWithAdapterRetry, getRetryDelayMs, resolveAdapterRetryPolicy, shouldRetryAdapterOutcome } from './chunk-FAG2RTPM.js';
|
|
11
8
|
export { AgentActionPolicyRegistry } from './chunk-OFCCZ27Z.js';
|
|
9
|
+
export { STRICT_EXECUTION_CONTRACT_PROFILE, STRICT_EXECUTION_CONTRACT_PROFILE_ID, executionContractProfile } from './chunk-DDO4EQ2J.js';
|
|
10
|
+
export { MODULE_MANIFEST_VERSION, exportModuleManifest, exportModuleManifestBundle, isJsonSchemaExportableValidator, normalizeModuleManifest, normalizeModuleManifestBundle } from './chunk-MC3GSVJ6.js';
|
|
11
|
+
export { createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateAndOrderFabricModules, validateModuleNamespace } from './chunk-GRBZYDEV.js';
|
|
12
|
+
export { assertObjectType, assertPortableJsonSchema, createObjectTypeRegistry, validatePortableJson } from './chunk-ZAEVQSB5.js';
|
|
13
|
+
export { createViewRegistry, replayEvents, replayView, viewContractKey } from './chunk-JG35DT2G.js';
|
|
12
14
|
export { createEventContractRegistry } from './chunk-B5DOGDPG.js';
|
|
13
15
|
import './chunk-OZLZHISS.js';
|
|
14
16
|
export { FABRIC_GOVERNANCE_CONTRACT_VERSION, assertGovernanceRuntimeEvidence, assertMutationGovernanceContext } from './chunk-Y2PJLRIY.js';
|
|
15
|
-
export { FABRIC_ID_PREFIXES, createFabricId, isFabricId, parseFabricId } from './chunk-RALMUSOX.js';
|
|
16
17
|
//# sourceMappingURL=index.js.map
|
|
17
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActionExecutionContract, AdapterStepRetryPolicy, SchemaValidator } from '../actions/index.cjs';
|
|
2
2
|
import { CapabilityMetadata, ModuleDependency, ObjectRelationDefinition, DeclarativeInvariant, FabricModule } from '../modules/index.cjs';
|
|
3
3
|
import { PortableJsonSchema, JsonValue } from '../objects/index.cjs';
|
|
4
4
|
import { PolicyKind, DataPolicyDefinition, PolicyFallbackDefinition } from '../policies/index.cjs';
|
package/dist/manifest/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActionExecutionContract, AdapterStepRetryPolicy, SchemaValidator } from '../actions/index.js';
|
|
2
2
|
import { CapabilityMetadata, ModuleDependency, ObjectRelationDefinition, DeclarativeInvariant, FabricModule } from '../modules/index.js';
|
|
3
3
|
import { PortableJsonSchema, JsonValue } from '../objects/index.js';
|
|
4
4
|
import { PolicyKind, DataPolicyDefinition, PolicyFallbackDefinition } from '../policies/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabricorg/platform",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Generic, vertical-agnostic runtime for ontology-based business applications. Provides actions, modules, events, policies, state machines, adapters, displays, projections, privacy, and evidence contracts. Zero runtime dependencies; portable across any database client and any vertical (lending, insurance, healthcare, legal, etc.).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fabric",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"author": "Fabric",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "https://github.com/Fabric-Pro/fabric-platform.git",
|
|
19
|
+
"url": "git+https://github.com/Fabric-Pro/fabric-platform.git",
|
|
20
20
|
"directory": "packages/platform"
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/Fabric-Pro/fabric-platform#readme",
|
|
@@ -178,6 +178,16 @@
|
|
|
178
178
|
"default": "./dist/state-machines/index.cjs"
|
|
179
179
|
}
|
|
180
180
|
},
|
|
181
|
+
"./certification": {
|
|
182
|
+
"import": {
|
|
183
|
+
"types": "./dist/certification/index.d.ts",
|
|
184
|
+
"default": "./dist/certification/index.js"
|
|
185
|
+
},
|
|
186
|
+
"require": {
|
|
187
|
+
"types": "./dist/certification/index.d.cts",
|
|
188
|
+
"default": "./dist/certification/index.cjs"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
181
191
|
"./testing": {
|
|
182
192
|
"import": {
|
|
183
193
|
"types": "./dist/testing/index.d.ts",
|