@fabricorg/platform 0.8.0 → 0.10.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 +39 -2
- package/README.md +14 -0
- package/dist/chunk-3OWMPDBD.js +30 -0
- package/dist/chunk-3OWMPDBD.js.map +1 -0
- package/dist/chunk-54EQTOH6.cjs +165 -0
- package/dist/chunk-54EQTOH6.cjs.map +1 -0
- package/dist/chunk-ANPJYXBK.cjs +34 -0
- package/dist/chunk-ANPJYXBK.cjs.map +1 -0
- package/dist/chunk-N72WJ4AU.js +160 -0
- package/dist/chunk-N72WJ4AU.js.map +1 -0
- package/dist/governance/index.cjs +10 -2
- package/dist/governance/index.d.cts +15 -1
- package/dist/governance/index.d.ts +15 -1
- package/dist/governance/index.js +1 -1
- package/dist/index.cjs +40 -15
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/dist/manifest/index.cjs +31 -0
- package/dist/manifest/index.cjs.map +1 -0
- package/dist/manifest/index.d.cts +145 -0
- package/dist/manifest/index.d.ts +145 -0
- package/dist/manifest/index.js +10 -0
- package/dist/manifest/index.js.map +1 -0
- package/package.json +11 -1
- package/dist/chunk-C72F6IRQ.cjs +0 -20
- package/dist/chunk-C72F6IRQ.cjs.map +0 -1
- package/dist/chunk-WGJBT66A.js +0 -18
- package/dist/chunk-WGJBT66A.js.map +0 -1
package/dist/chunk-WGJBT66A.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// governance/index.ts
|
|
2
|
-
function assertMutationGovernanceContext(value) {
|
|
3
|
-
if (!Number.isInteger(value.footprint.version) || value.footprint.version < 1) {
|
|
4
|
-
throw new Error("Mutation footprint version must be a positive integer");
|
|
5
|
-
}
|
|
6
|
-
for (const entry of value.footprint.resources) {
|
|
7
|
-
if (!entry.resource.provider.trim()) throw new Error("Resource provider is required");
|
|
8
|
-
if (!entry.resource.resourceType.trim()) throw new Error("Resource type is required");
|
|
9
|
-
if (!entry.resource.resourceId.trim()) throw new Error("Resource id is required");
|
|
10
|
-
}
|
|
11
|
-
if (!value.executionPrincipal.principalId.trim()) {
|
|
12
|
-
throw new Error("Execution principal id is required");
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { assertMutationGovernanceContext };
|
|
17
|
-
//# sourceMappingURL=chunk-WGJBT66A.js.map
|
|
18
|
-
//# sourceMappingURL=chunk-WGJBT66A.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../governance/index.ts"],"names":[],"mappings":";AAiGO,SAAS,gCACf,KAAA,EACO;AACP,EAAA,IAAI,CAAC,MAAA,CAAO,SAAA,CAAU,KAAA,CAAM,SAAA,CAAU,OAAO,CAAA,IAAK,KAAA,CAAM,SAAA,CAAU,OAAA,GAAU,CAAA,EAAG;AAC9E,IAAA,MAAM,IAAI,MAAM,uDAAuD,CAAA;AAAA,EACxE;AACA,EAAA,KAAA,MAAW,KAAA,IAAS,KAAA,CAAM,SAAA,CAAU,SAAA,EAAW;AAC9C,IAAA,IAAI,CAAC,MAAM,QAAA,CAAS,QAAA,CAAS,MAAK,EAAG,MAAM,IAAI,KAAA,CAAM,+BAA+B,CAAA;AACpF,IAAA,IAAI,CAAC,MAAM,QAAA,CAAS,YAAA,CAAa,MAAK,EAAG,MAAM,IAAI,KAAA,CAAM,2BAA2B,CAAA;AACpF,IAAA,IAAI,CAAC,MAAM,QAAA,CAAS,UAAA,CAAW,MAAK,EAAG,MAAM,IAAI,KAAA,CAAM,yBAAyB,CAAA;AAAA,EACjF;AACA,EAAA,IAAI,CAAC,KAAA,CAAM,kBAAA,CAAmB,WAAA,CAAY,MAAK,EAAG;AACjD,IAAA,MAAM,IAAI,MAAM,oCAAoC,CAAA;AAAA,EACrD;AACD","file":"chunk-WGJBT66A.js","sourcesContent":["import type { ActorType } from \"../actions\";\nimport type { EvidencePacketReference } from \"../evidence\";\n\nexport type ExternalResourceOperation =\n\t| \"read\"\n\t| \"create\"\n\t| \"update\"\n\t| \"delete\"\n\t| \"execute\"\n\t| \"publish\";\n\n/** Provider-neutral identity for infrastructure touched by a governed mutation. */\nexport interface ExternalResourceRef {\n\tprovider: string;\n\tresourceType: string;\n\tresourceId: string;\n\tdisplayName?: string;\n\tmetadata?: Record<string, unknown>;\n}\n\nexport interface MutationFootprintEntry {\n\tresource: ExternalResourceRef;\n\toperation: ExternalResourceOperation;\n\tdataClassifications?: string[];\n}\n\n/** Durable declaration of the external effects an invocation is allowed to produce. */\nexport interface MutationFootprint {\n\tversion: number;\n\tresources: MutationFootprintEntry[];\n}\n\n/** Effective execution identity, including the delegation chain that produced it. */\nexport interface ExecutionPrincipal {\n\tprincipalId: string;\n\tprincipalType: ActorType | string;\n\tprovider?: string;\n\tdelegatedBy?: ExecutionPrincipal;\n\tmetadata?: Record<string, unknown>;\n}\n\nexport type PolicyObligationStatus = \"pending\" | \"satisfied\" | \"waived\" | \"failed\";\n\nexport interface PolicyObligation {\n\tid: string;\n\ttype: string;\n\tstatus: PolicyObligationStatus;\n\trequired?: boolean;\n\tdescription?: string;\n\tevidenceReferences?: EvidencePacketReference[];\n\tmetadata?: Record<string, unknown>;\n}\n\n/** Audit-safe proof returned by an external execution provider. */\nexport interface ExecutionAttestation {\n\tprovider: string;\n\toperation: string;\n\texternalOperationId?: string;\n\tresource?: ExternalResourceRef;\n\tevidenceReferences: EvidencePacketReference[];\n\tsatisfiesObligations?: string[];\n\tstartedAt: Date | string;\n\tcompletedAt?: Date | string;\n\tmetadata?: Record<string, unknown>;\n}\n\nexport type ReconciliationStatus = \"not_required\" | \"pending\" | \"reconciled\" | \"failed\";\n\nexport interface ExternalReconciliation {\n\tstatus: ReconciliationStatus;\n\tprovider: string;\n\texternalOperationId?: string;\n\tattempt: number;\n\treason?: string;\n\tevidenceReferences?: EvidencePacketReference[];\n\tobservedAt: Date | string;\n}\n\nexport interface MutationGovernanceContext {\n\tfootprint: MutationFootprint;\n\texecutionPrincipal: ExecutionPrincipal;\n}\n\nexport interface MutationGovernanceResolutionInput {\n\tactionInvocationId: string;\n\tactionId: string;\n\ttenantId: string;\n\tspaceId: string;\n\tactorId: string;\n\tactorType: ActorType;\n\tparameters: unknown;\n}\n\nexport type MutationGovernanceResolver = (\n\tinput: MutationGovernanceResolutionInput,\n) => Promise<MutationGovernanceContext> | MutationGovernanceContext;\n\nexport function assertMutationGovernanceContext(\n\tvalue: MutationGovernanceContext,\n): void {\n\tif (!Number.isInteger(value.footprint.version) || value.footprint.version < 1) {\n\t\tthrow new Error(\"Mutation footprint version must be a positive integer\");\n\t}\n\tfor (const entry of value.footprint.resources) {\n\t\tif (!entry.resource.provider.trim()) throw new Error(\"Resource provider is required\");\n\t\tif (!entry.resource.resourceType.trim()) throw new Error(\"Resource type is required\");\n\t\tif (!entry.resource.resourceId.trim()) throw new Error(\"Resource id is required\");\n\t}\n\tif (!value.executionPrincipal.principalId.trim()) {\n\t\tthrow new Error(\"Execution principal id is required\");\n\t}\n}\n"]}
|