74 lines
2.5 KiB
TypeScript
74 lines
2.5 KiB
TypeScript
/**
|
|
* Pipeline content types — canonical source representation.
|
|
* Separate from runtime FestivalPackage types but maps 1:1 for serialization.
|
|
* Trace: ADR-005, SPIKE-04 §2, ARCH 10.3
|
|
*/
|
|
import type {
|
|
EmergencySection,
|
|
ScheduleSection,
|
|
MapSection,
|
|
InfoSection,
|
|
AssetsInventory,
|
|
FestivalMetadata,
|
|
AppCompatibility,
|
|
} from "../src/data/festival-package/types.js";
|
|
|
|
export interface EmergencySource extends EmergencySection {
|
|
// Same as EmergencySection — source sheet that generates both section + floor.
|
|
// Floor derivation uses this source directly (ARCH 10.3 same emergency source sheet).
|
|
}
|
|
|
|
export interface ContentSource {
|
|
readonly emergency: EmergencySource;
|
|
readonly schedule: ScheduleSection;
|
|
readonly map: MapSection;
|
|
readonly info: InfoSection;
|
|
readonly assets: AssetsInventory & { readonly blobs: ReadonlyMap<string, Uint8Array> };
|
|
}
|
|
|
|
export interface PipelineInput {
|
|
readonly edition: string; // e.g. "lumen-2026"
|
|
readonly packageVersion: number; // monotonic int
|
|
readonly schemaVersion: number;
|
|
readonly generatedAt: string; // ISO8601 UTC — informational only never gates
|
|
readonly festival: FestivalMetadata;
|
|
readonly appCompatibility: AppCompatibility;
|
|
readonly content: ContentSource;
|
|
/** previous package for stable-ID gate 2; null if first version */
|
|
readonly previous?: {
|
|
readonly packageVersion: number;
|
|
readonly schedule: ScheduleSection;
|
|
readonly map: MapSection;
|
|
} | null;
|
|
/** override latest pointer for monotonic check — optional */
|
|
readonly previousPackageVersion?: number | null;
|
|
}
|
|
|
|
export interface SectionFile {
|
|
readonly file: string;
|
|
readonly bytes: number;
|
|
readonly sha256: string;
|
|
readonly json: unknown; // parsed JSON for validation
|
|
readonly canonicalBytes: Uint8Array;
|
|
}
|
|
|
|
export interface AssetFile {
|
|
readonly id: string;
|
|
readonly file: string;
|
|
readonly bytes: number;
|
|
readonly sha256: string;
|
|
readonly kind: string;
|
|
readonly role: string;
|
|
readonly bytesContent: Uint8Array;
|
|
}
|
|
|
|
export interface BuiltPackage {
|
|
readonly manifest: import("../src/data/festival-package/types.js").FestivalManifest;
|
|
readonly signature?: import("../src/data/festival-package/types.js").PackageSignature | null;
|
|
readonly latest: import("../src/data/festival-package/types.js").LatestPointer;
|
|
readonly files: ReadonlyMap<string, SectionFile>; // file name -> file
|
|
readonly assets: readonly AssetFile[];
|
|
readonly emergencyFloor: import("../src/emergency-baseline/types.js").EmergencyFloor;
|
|
readonly floorBytes: number;
|
|
readonly floorSha256: string;
|
|
}
|