import { type JsonPointerExactBudget, type JsonPointerExactLocator, type JsonPointerExactObservation } from "./long-task-json-pointer-observation.js"; import type { WorkspaceManifestV2 } from "./long-task-workspace-runtime-types.js"; export type StaticObservationFreezeErrorCode = "static_observation_not_in_pre_run_snapshot" | "static_observation_changed_by_runner" | "static_observation_manifest_invalid" | "static_observation_path_escape" | "static_observation_root_invalid" | "static_observation_parent_not_directory" | "static_observation_symlink_not_allowed" | "static_observation_hardlink_not_allowed" | "static_observation_not_regular_file" | "static_observation_size_limit"; export declare class StaticObservationFreezeError extends Error { readonly code: StaticObservationFreezeErrorCode; readonly artifact_path: string; readonly cause_code: string | null; constructor(code: StaticObservationFreezeErrorCode, artifactPath: string, causeCode?: string | null); } export interface StaticObservationManifestMembership { path: string; mode: number; declared_size: number; /** Git/blob identity from the workspace manifest; never a content digest. */ manifest_object_identity: string; } export interface StaticObservationFileIdentity { device: string; inode: string; mode: number; links: string; size: number; modified_time_ns: string; changed_time_ns: string; birth_time_ns: string; content_sha256: string; } export interface VerifiedObservationInputFile { readonly artifact_path: string; readonly manifest_membership: StaticObservationManifestMembership; readonly pre_run_identity: StaticObservationFileIdentity; readonly post_run_identity: StaticObservationFileIdentity; } export interface VerifiedStaticObservationCarrier extends VerifiedObservationInputFile { copyFrozenBytes(): Uint8Array; extractJsonPointerExactObservation(input: { locator: JsonPointerExactLocator; sensitivity: string; budget?: JsonPointerExactBudget; }): JsonPointerExactObservation; extractJsonPointerExactValue(input: { locator: JsonPointerExactLocator; sensitivity: string; budget?: JsonPointerExactBudget; }): { raw_value: unknown; observation: JsonPointerExactObservation; }; } export interface FrozenObservationInputFile { readonly artifact_path: string; readonly manifest_membership: StaticObservationManifestMembership; readonly pre_run_identity: StaticObservationFileIdentity; verifyPostRun(): Promise; dispose(): void; } export interface FrozenStaticObservationCarrier extends FrozenObservationInputFile { verifyPostRun(): Promise; } export interface ObservationInputFreezeBudget { readonly seen_artifact_paths: Set; total_artifact_bytes: number; readonly max_artifacts: number; readonly max_total_artifact_bytes: number; } export declare function createObservationInputFreezeBudget(input: { max_artifacts: number; max_total_artifact_bytes: number; }): ObservationInputFreezeBudget; export declare function freezeStaticObservationCarrier(input: { snapshot_root: string; workspace_manifest: WorkspaceManifestV2; artifact_path: string; budget?: JsonPointerExactBudget; input_freeze_budget?: ObservationInputFreezeBudget; }): Promise; export declare function freezeObservationInputFile(input: { snapshot_root: string; workspace_manifest: WorkspaceManifestV2; artifact_path: string; max_file_bytes: number; budget?: ObservationInputFreezeBudget; }): Promise;