@fabricorg/gen-conformance 0.1.0 → 0.1.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 +7 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -49,7 +49,7 @@ function createCertificationResult(input) {
|
|
|
49
49
|
if (input.checks.some((check) => check.status === "passed" && check.evidence.length === 0)) throw new Error("Passed certification checks require evidence references.");
|
|
50
50
|
return { ...input, formatVersion: 1, checks: [...input.checks].sort((a, b) => a.id.localeCompare(b.id)), passed: input.checks.every((check) => check.status === "passed") };
|
|
51
51
|
}
|
|
52
|
-
var conformanceGenerator = { name: "@fabricorg/gen-conformance", version: "0.1.
|
|
52
|
+
var conformanceGenerator = { name: "@fabricorg/gen-conformance", version: "0.1.1", generate(ir) {
|
|
53
53
|
return ir.modules.map((module2) => ({ path: `${module2.namespace}/conformance-plan.json`, content: (0, import_compiler.stableStringify)({ formatVersion: 1, generator: { name: conformanceGenerator.name, version: conformanceGenerator.version }, compilerVersion: ir.compilerVersion, manifestDigest: ir.manifestDigest, module: module2.namespace, requiredChecks: PHASE_1_CONFORMANCE_CHECKS }) }));
|
|
54
54
|
} };
|
|
55
55
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../index.ts"],"sourcesContent":["import { stableStringify, type FabricCompilerIr, type GeneratorTarget } from \"@fabricorg/compiler\";\n\nexport const PHASE_1_CONFORMANCE_CHECKS = [\n\t\"fabric.idempotency.same-command-replay.v1\", \"fabric.idempotency.conflicting-payload.v1\",\n\t\"fabric.idempotency.concurrent-submission.v1\", \"fabric.authorization.governing-moment.v1\",\n\t\"fabric.authorization.offline-replay.v1\", \"fabric.events.compatibility.v1\",\n\t\"fabric.provenance.propagation.v1\", \"fabric.consumers.tolerant-envelope.v1\",\n\t\"fabric.documentation.parity.v1\", \"fabric.documentation.llms-contract.v1\",\n] as const;\nexport type Phase1ConformanceCheckId = typeof PHASE_1_CONFORMANCE_CHECKS[number];\nexport interface ConformanceEvidence { id: Phase1ConformanceCheckId; status: \"passed\" | \"failed\"; evidence: string[]; }\nexport interface CertificationResult { formatVersion: 1; manifestDigest: string; compilerVersion: string; generatorDigests: Record<string, string>; checks: ConformanceEvidence[]; passed: boolean; }\n\nexport function createCertificationResult(input: Omit<CertificationResult, \"formatVersion\" | \"passed\">): CertificationResult {\n\tconst results = new Map(input.checks.map((check) => [check.id, check]));\n\tif (results.size !== input.checks.length) throw new Error(\"Certification evidence contains duplicate check identifiers.\");\n\tconst missing = PHASE_1_CONFORMANCE_CHECKS.filter((id) => !results.has(id));\n\tif (missing.length) throw new Error(`Certification evidence is missing mandatory checks: ${missing.join(\", \")}`);\n\tif (!/^[0-9a-f]{64}$/.test(input.manifestDigest)) throw new Error(\"Certification manifestDigest must be a lowercase SHA-256 digest.\");\n\tconst generatorDigests = Object.entries(input.generatorDigests);\n\tif (!generatorDigests.length || generatorDigests.some(([, digest]) => !/^[0-9a-f]{64}$/.test(digest))) throw new Error(\"Certification generatorDigests must contain SHA-256 evidence.\");\n\tif (input.checks.some((check) => check.status === \"passed\" && check.evidence.length === 0)) throw new Error(\"Passed certification checks require evidence references.\");\n\treturn { ...input, formatVersion: 1, checks: [...input.checks].sort((a, b) => a.id.localeCompare(b.id)), passed: input.checks.every((check) => check.status === \"passed\") };\n}\n\nexport const conformanceGenerator: GeneratorTarget = { name: \"@fabricorg/gen-conformance\", version: \"0.1.
|
|
1
|
+
{"version":3,"sources":["../index.ts"],"sourcesContent":["import { stableStringify, type FabricCompilerIr, type GeneratorTarget } from \"@fabricorg/compiler\";\n\nexport const PHASE_1_CONFORMANCE_CHECKS = [\n\t\"fabric.idempotency.same-command-replay.v1\", \"fabric.idempotency.conflicting-payload.v1\",\n\t\"fabric.idempotency.concurrent-submission.v1\", \"fabric.authorization.governing-moment.v1\",\n\t\"fabric.authorization.offline-replay.v1\", \"fabric.events.compatibility.v1\",\n\t\"fabric.provenance.propagation.v1\", \"fabric.consumers.tolerant-envelope.v1\",\n\t\"fabric.documentation.parity.v1\", \"fabric.documentation.llms-contract.v1\",\n] as const;\nexport type Phase1ConformanceCheckId = typeof PHASE_1_CONFORMANCE_CHECKS[number];\nexport interface ConformanceEvidence { id: Phase1ConformanceCheckId; status: \"passed\" | \"failed\"; evidence: string[]; }\nexport interface CertificationResult { formatVersion: 1; manifestDigest: string; compilerVersion: string; generatorDigests: Record<string, string>; checks: ConformanceEvidence[]; passed: boolean; }\n\nexport function createCertificationResult(input: Omit<CertificationResult, \"formatVersion\" | \"passed\">): CertificationResult {\n\tconst results = new Map(input.checks.map((check) => [check.id, check]));\n\tif (results.size !== input.checks.length) throw new Error(\"Certification evidence contains duplicate check identifiers.\");\n\tconst missing = PHASE_1_CONFORMANCE_CHECKS.filter((id) => !results.has(id));\n\tif (missing.length) throw new Error(`Certification evidence is missing mandatory checks: ${missing.join(\", \")}`);\n\tif (!/^[0-9a-f]{64}$/.test(input.manifestDigest)) throw new Error(\"Certification manifestDigest must be a lowercase SHA-256 digest.\");\n\tconst generatorDigests = Object.entries(input.generatorDigests);\n\tif (!generatorDigests.length || generatorDigests.some(([, digest]) => !/^[0-9a-f]{64}$/.test(digest))) throw new Error(\"Certification generatorDigests must contain SHA-256 evidence.\");\n\tif (input.checks.some((check) => check.status === \"passed\" && check.evidence.length === 0)) throw new Error(\"Passed certification checks require evidence references.\");\n\treturn { ...input, formatVersion: 1, checks: [...input.checks].sort((a, b) => a.id.localeCompare(b.id)), passed: input.checks.every((check) => check.status === \"passed\") };\n}\n\nexport const conformanceGenerator: GeneratorTarget = { name: \"@fabricorg/gen-conformance\", version: \"0.1.1\", generate(ir: FabricCompilerIr) { return ir.modules.map((module) => ({ path: `${module.namespace}/conformance-plan.json`, content: stableStringify({ formatVersion: 1, generator: { name: conformanceGenerator.name, version: conformanceGenerator.version }, compilerVersion: ir.compilerVersion, manifestDigest: ir.manifestDigest, module: module.namespace, requiredChecks: PHASE_1_CONFORMANCE_CHECKS }) })); } };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA6E;AAEtE,IAAM,6BAA6B;AAAA,EACzC;AAAA,EAA6C;AAAA,EAC7C;AAAA,EAA+C;AAAA,EAC/C;AAAA,EAA0C;AAAA,EAC1C;AAAA,EAAoC;AAAA,EACpC;AAAA,EAAkC;AACnC;AAKO,SAAS,0BAA0B,OAAmF;AAC5H,QAAM,UAAU,IAAI,IAAI,MAAM,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC;AACtE,MAAI,QAAQ,SAAS,MAAM,OAAO,OAAQ,OAAM,IAAI,MAAM,8DAA8D;AACxH,QAAM,UAAU,2BAA2B,OAAO,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC;AAC1E,MAAI,QAAQ,OAAQ,OAAM,IAAI,MAAM,uDAAuD,QAAQ,KAAK,IAAI,CAAC,EAAE;AAC/G,MAAI,CAAC,iBAAiB,KAAK,MAAM,cAAc,EAAG,OAAM,IAAI,MAAM,kEAAkE;AACpI,QAAM,mBAAmB,OAAO,QAAQ,MAAM,gBAAgB;AAC9D,MAAI,CAAC,iBAAiB,UAAU,iBAAiB,KAAK,CAAC,CAAC,EAAE,MAAM,MAAM,CAAC,iBAAiB,KAAK,MAAM,CAAC,EAAG,OAAM,IAAI,MAAM,+DAA+D;AACtL,MAAI,MAAM,OAAO,KAAK,CAAC,UAAU,MAAM,WAAW,YAAY,MAAM,SAAS,WAAW,CAAC,EAAG,OAAM,IAAI,MAAM,0DAA0D;AACtK,SAAO,EAAE,GAAG,OAAO,eAAe,GAAG,QAAQ,CAAC,GAAG,MAAM,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM,EAAE,GAAG,cAAc,EAAE,EAAE,CAAC,GAAG,QAAQ,MAAM,OAAO,MAAM,CAAC,UAAU,MAAM,WAAW,QAAQ,EAAE;AAC3K;AAEO,IAAM,uBAAwC,EAAE,MAAM,8BAA8B,SAAS,SAAS,SAAS,IAAsB;AAAE,SAAO,GAAG,QAAQ,IAAI,CAACA,aAAY,EAAE,MAAM,GAAGA,QAAO,SAAS,0BAA0B,aAAS,iCAAgB,EAAE,eAAe,GAAG,WAAW,EAAE,MAAM,qBAAqB,MAAM,SAAS,qBAAqB,QAAQ,GAAG,iBAAiB,GAAG,iBAAiB,gBAAgB,GAAG,gBAAgB,QAAQA,QAAO,WAAW,gBAAgB,2BAA2B,CAAC,EAAE,EAAE;AAAG,EAAE;","names":["module"]}
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ function createCertificationResult(input) {
|
|
|
23
23
|
if (input.checks.some((check) => check.status === "passed" && check.evidence.length === 0)) throw new Error("Passed certification checks require evidence references.");
|
|
24
24
|
return { ...input, formatVersion: 1, checks: [...input.checks].sort((a, b) => a.id.localeCompare(b.id)), passed: input.checks.every((check) => check.status === "passed") };
|
|
25
25
|
}
|
|
26
|
-
var conformanceGenerator = { name: "@fabricorg/gen-conformance", version: "0.1.
|
|
26
|
+
var conformanceGenerator = { name: "@fabricorg/gen-conformance", version: "0.1.1", generate(ir) {
|
|
27
27
|
return ir.modules.map((module) => ({ path: `${module.namespace}/conformance-plan.json`, content: stableStringify({ formatVersion: 1, generator: { name: conformanceGenerator.name, version: conformanceGenerator.version }, compilerVersion: ir.compilerVersion, manifestDigest: ir.manifestDigest, module: module.namespace, requiredChecks: PHASE_1_CONFORMANCE_CHECKS }) }));
|
|
28
28
|
} };
|
|
29
29
|
export {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../index.ts"],"sourcesContent":["import { stableStringify, type FabricCompilerIr, type GeneratorTarget } from \"@fabricorg/compiler\";\n\nexport const PHASE_1_CONFORMANCE_CHECKS = [\n\t\"fabric.idempotency.same-command-replay.v1\", \"fabric.idempotency.conflicting-payload.v1\",\n\t\"fabric.idempotency.concurrent-submission.v1\", \"fabric.authorization.governing-moment.v1\",\n\t\"fabric.authorization.offline-replay.v1\", \"fabric.events.compatibility.v1\",\n\t\"fabric.provenance.propagation.v1\", \"fabric.consumers.tolerant-envelope.v1\",\n\t\"fabric.documentation.parity.v1\", \"fabric.documentation.llms-contract.v1\",\n] as const;\nexport type Phase1ConformanceCheckId = typeof PHASE_1_CONFORMANCE_CHECKS[number];\nexport interface ConformanceEvidence { id: Phase1ConformanceCheckId; status: \"passed\" | \"failed\"; evidence: string[]; }\nexport interface CertificationResult { formatVersion: 1; manifestDigest: string; compilerVersion: string; generatorDigests: Record<string, string>; checks: ConformanceEvidence[]; passed: boolean; }\n\nexport function createCertificationResult(input: Omit<CertificationResult, \"formatVersion\" | \"passed\">): CertificationResult {\n\tconst results = new Map(input.checks.map((check) => [check.id, check]));\n\tif (results.size !== input.checks.length) throw new Error(\"Certification evidence contains duplicate check identifiers.\");\n\tconst missing = PHASE_1_CONFORMANCE_CHECKS.filter((id) => !results.has(id));\n\tif (missing.length) throw new Error(`Certification evidence is missing mandatory checks: ${missing.join(\", \")}`);\n\tif (!/^[0-9a-f]{64}$/.test(input.manifestDigest)) throw new Error(\"Certification manifestDigest must be a lowercase SHA-256 digest.\");\n\tconst generatorDigests = Object.entries(input.generatorDigests);\n\tif (!generatorDigests.length || generatorDigests.some(([, digest]) => !/^[0-9a-f]{64}$/.test(digest))) throw new Error(\"Certification generatorDigests must contain SHA-256 evidence.\");\n\tif (input.checks.some((check) => check.status === \"passed\" && check.evidence.length === 0)) throw new Error(\"Passed certification checks require evidence references.\");\n\treturn { ...input, formatVersion: 1, checks: [...input.checks].sort((a, b) => a.id.localeCompare(b.id)), passed: input.checks.every((check) => check.status === \"passed\") };\n}\n\nexport const conformanceGenerator: GeneratorTarget = { name: \"@fabricorg/gen-conformance\", version: \"0.1.
|
|
1
|
+
{"version":3,"sources":["../index.ts"],"sourcesContent":["import { stableStringify, type FabricCompilerIr, type GeneratorTarget } from \"@fabricorg/compiler\";\n\nexport const PHASE_1_CONFORMANCE_CHECKS = [\n\t\"fabric.idempotency.same-command-replay.v1\", \"fabric.idempotency.conflicting-payload.v1\",\n\t\"fabric.idempotency.concurrent-submission.v1\", \"fabric.authorization.governing-moment.v1\",\n\t\"fabric.authorization.offline-replay.v1\", \"fabric.events.compatibility.v1\",\n\t\"fabric.provenance.propagation.v1\", \"fabric.consumers.tolerant-envelope.v1\",\n\t\"fabric.documentation.parity.v1\", \"fabric.documentation.llms-contract.v1\",\n] as const;\nexport type Phase1ConformanceCheckId = typeof PHASE_1_CONFORMANCE_CHECKS[number];\nexport interface ConformanceEvidence { id: Phase1ConformanceCheckId; status: \"passed\" | \"failed\"; evidence: string[]; }\nexport interface CertificationResult { formatVersion: 1; manifestDigest: string; compilerVersion: string; generatorDigests: Record<string, string>; checks: ConformanceEvidence[]; passed: boolean; }\n\nexport function createCertificationResult(input: Omit<CertificationResult, \"formatVersion\" | \"passed\">): CertificationResult {\n\tconst results = new Map(input.checks.map((check) => [check.id, check]));\n\tif (results.size !== input.checks.length) throw new Error(\"Certification evidence contains duplicate check identifiers.\");\n\tconst missing = PHASE_1_CONFORMANCE_CHECKS.filter((id) => !results.has(id));\n\tif (missing.length) throw new Error(`Certification evidence is missing mandatory checks: ${missing.join(\", \")}`);\n\tif (!/^[0-9a-f]{64}$/.test(input.manifestDigest)) throw new Error(\"Certification manifestDigest must be a lowercase SHA-256 digest.\");\n\tconst generatorDigests = Object.entries(input.generatorDigests);\n\tif (!generatorDigests.length || generatorDigests.some(([, digest]) => !/^[0-9a-f]{64}$/.test(digest))) throw new Error(\"Certification generatorDigests must contain SHA-256 evidence.\");\n\tif (input.checks.some((check) => check.status === \"passed\" && check.evidence.length === 0)) throw new Error(\"Passed certification checks require evidence references.\");\n\treturn { ...input, formatVersion: 1, checks: [...input.checks].sort((a, b) => a.id.localeCompare(b.id)), passed: input.checks.every((check) => check.status === \"passed\") };\n}\n\nexport const conformanceGenerator: GeneratorTarget = { name: \"@fabricorg/gen-conformance\", version: \"0.1.1\", generate(ir: FabricCompilerIr) { return ir.modules.map((module) => ({ path: `${module.namespace}/conformance-plan.json`, content: stableStringify({ formatVersion: 1, generator: { name: conformanceGenerator.name, version: conformanceGenerator.version }, compilerVersion: ir.compilerVersion, manifestDigest: ir.manifestDigest, module: module.namespace, requiredChecks: PHASE_1_CONFORMANCE_CHECKS }) })); } };\n"],"mappings":";AAAA,SAAS,uBAAoE;AAEtE,IAAM,6BAA6B;AAAA,EACzC;AAAA,EAA6C;AAAA,EAC7C;AAAA,EAA+C;AAAA,EAC/C;AAAA,EAA0C;AAAA,EAC1C;AAAA,EAAoC;AAAA,EACpC;AAAA,EAAkC;AACnC;AAKO,SAAS,0BAA0B,OAAmF;AAC5H,QAAM,UAAU,IAAI,IAAI,MAAM,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC;AACtE,MAAI,QAAQ,SAAS,MAAM,OAAO,OAAQ,OAAM,IAAI,MAAM,8DAA8D;AACxH,QAAM,UAAU,2BAA2B,OAAO,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC;AAC1E,MAAI,QAAQ,OAAQ,OAAM,IAAI,MAAM,uDAAuD,QAAQ,KAAK,IAAI,CAAC,EAAE;AAC/G,MAAI,CAAC,iBAAiB,KAAK,MAAM,cAAc,EAAG,OAAM,IAAI,MAAM,kEAAkE;AACpI,QAAM,mBAAmB,OAAO,QAAQ,MAAM,gBAAgB;AAC9D,MAAI,CAAC,iBAAiB,UAAU,iBAAiB,KAAK,CAAC,CAAC,EAAE,MAAM,MAAM,CAAC,iBAAiB,KAAK,MAAM,CAAC,EAAG,OAAM,IAAI,MAAM,+DAA+D;AACtL,MAAI,MAAM,OAAO,KAAK,CAAC,UAAU,MAAM,WAAW,YAAY,MAAM,SAAS,WAAW,CAAC,EAAG,OAAM,IAAI,MAAM,0DAA0D;AACtK,SAAO,EAAE,GAAG,OAAO,eAAe,GAAG,QAAQ,CAAC,GAAG,MAAM,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM,EAAE,GAAG,cAAc,EAAE,EAAE,CAAC,GAAG,QAAQ,MAAM,OAAO,MAAM,CAAC,UAAU,MAAM,WAAW,QAAQ,EAAE;AAC3K;AAEO,IAAM,uBAAwC,EAAE,MAAM,8BAA8B,SAAS,SAAS,SAAS,IAAsB;AAAE,SAAO,GAAG,QAAQ,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,SAAS,0BAA0B,SAAS,gBAAgB,EAAE,eAAe,GAAG,WAAW,EAAE,MAAM,qBAAqB,MAAM,SAAS,qBAAqB,QAAQ,GAAG,iBAAiB,GAAG,iBAAiB,gBAAgB,GAAG,gBAAgB,QAAQ,OAAO,WAAW,gBAAgB,2BAA2B,CAAC,EAAE,EAAE;AAAG,EAAE;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabricorg/gen-conformance",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Deterministic Phase 1 capability conformance plans and certification evidence.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"LICENSE"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@fabricorg/compiler": "^
|
|
29
|
+
"@fabricorg/compiler": "^2.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.10.0",
|