mirror of
https://github.com/morluto/rea.git
synced 2026-11-22 22:45:47 +00:00
20 lines
733 B
TypeScript
20 lines
733 B
TypeScript
import { z } from "zod";
|
|
import { webArtifactFileSchema } from "./webScriptArtifacts.js";
|
|
|
|
/** Independently completed reads; these facts never claim a completed analysis. */
|
|
export const webArtifactAcquisitionSchema = z.strictObject({
|
|
kind: z.literal("web-artifact-acquisition"),
|
|
analysis: z.literal("not-performed"),
|
|
files: z.array(
|
|
z.strictObject({
|
|
role: z.enum(["manifest", "source", "source-map", "import-map"]),
|
|
file: webArtifactFileSchema,
|
|
// Source verification establishes declared digest/length, not text decoding.
|
|
admission: z.enum(["read", "manifest-validated", "source-verified"]),
|
|
}),
|
|
),
|
|
});
|
|
export type WebArtifactAcquisition = z.infer<
|
|
typeof webArtifactAcquisitionSchema
|
|
>;
|