refactor: use canonical implementations and types directly

Remove forwarding wrappers and shadow aliases, migrate callers and verification scripts to their owners, and share one exhaustive semantic resource-bound projection.
This commit is contained in:
morluto
2026-10-09 23:35:19 +08:00
parent 3283a45d09
commit 765e809e36
119 changed files with 577 additions and 629 deletions
+5 -5
View File
@@ -1,11 +1,11 @@
import { canonicalDigest } from "../domain/comparisonSemantics.js";
import { digestCanonicalValue } from "../domain/canonicalDigest.js";
import { createEvidence } from "../domain/evidence.js";
import { jsonValueSchema } from "../domain/jsonValue.js";
const inventory = (digit: string) => {
const sha = digit.repeat(64);
const artifactId = `art_${canonicalDigest({ sha256: sha }, "Artifact example")}`;
const occurrenceId = `occ_${canonicalDigest({ root: artifactId }, "Artifact example")}`;
const artifactId = `art_${digestCanonicalValue({ sha256: sha }, "Artifact example")}`;
const occurrenceId = `occ_${digestCanonicalValue({ root: artifactId }, "Artifact example")}`;
const nodes = [
{
artifact_id: artifactId,
@@ -36,7 +36,7 @@ const inventory = (digit: string) => {
limitations: [],
},
];
const graphSha256 = canonicalDigest(
const graphSha256 = digestCanonicalValue(
{
nodes,
occurrences,
@@ -47,7 +47,7 @@ const inventory = (digit: string) => {
);
return jsonValueSchema.parse({
manifest: {
manifest_id: `agm_${canonicalDigest(
manifest_id: `agm_${digestCanonicalValue(
{
root_artifact_id: artifactId,
graph_sha256: graphSha256,