fix(artifacts): publish addressable inspection sources through both adapters

This commit is contained in:
morluto
2026-10-24 02:50:15 +08:00
parent b885f44bef
commit bd8e1fb2c1
6 changed files with 136 additions and 27 deletions
+11 -1
View File
@@ -1,3 +1,4 @@
import { readArtifactInspectionSources } from "../domain/artifactInspection.js";
import { dispatchQueuedInterrupts } from "../process/queuedInterrupts.js";
import { absoluteCallerPath } from "../filesystem/callerPath.js";
import { requireAuthenticationHeadroom } from "./JsonAuthenticationHeadroom.js";
@@ -84,7 +85,16 @@ export const deliverAnalysisEvidence = async (
});
if (!headroom.ok)
return err(headroom.error.retainPartialObservation(evidence));
const bundle = createImmutableEvidenceBundle([evidence]);
const sourceEvidence =
evidence.operation === "inspect_artifact"
? readArtifactInspectionSources(evidence.normalized_result)
: ok([]);
if (!sourceEvidence.ok)
return err(sourceEvidence.error.retainPartialObservation(evidence));
const bundle = createImmutableEvidenceBundle([
...sourceEvidence.value,
evidence,
]);
const delivered =
detail === "summary"
? inspectAnalysisViewValidated(