import { type RealtimeInventoryGrant, type RealtimeInventoryRequest, type RealtimeRolloutClient } from "./realtime-rollout.js"; export type LocalMaterialPolicy = "retain" | "quarantine" | "delete-if-hash-matches"; export type ScopeInventoryDecision = { network: "allow-legacy"; state: "legacy"; grant: RealtimeInventoryGrant & { state: "legacy"; }; } | { network: "stop"; state: Exclude | "absent"; reason: string; grant?: RealtimeInventoryGrant; localMaterialPolicy?: LocalMaterialPolicy; }; export interface ScopeInventoryGate { refresh(scopeUid: string): Promise; } export interface ScopeInventoryClientOptions { inventory: RealtimeRolloutClient; request: RealtimeInventoryRequest; } /** * Policy strings originate at the server and are intentionally not silently * broadened here. Missing, stale, or future policy values retain all material * and prohibit destructive cleanup. */ export declare function parseLocalMaterialPolicy(value: unknown): LocalMaterialPolicy; export declare function allowsLegacyNetwork(decision: ScopeInventoryDecision): decision is Extract; /** * Fresh inventory gate used before a legacy push/pull pass. The request is * owned by the caller so its bearer/configuration/scope fingerprints remain * part of U10's cache key. */ export declare class ScopeInventoryClient implements ScopeInventoryGate { private readonly options; constructor(options: ScopeInventoryClientOptions); refresh(scopeUid: string): Promise; } export interface DisposeLocalMaterialInput { /** Absolute root containing the local synced path. */ rootDir: string; /** Canonical relative path; traversal is rejected before touching disk. */ relativePath: string; /** Last synchronized digest. Deletes are allowed only when it still matches. */ synchronizedSha256: `sha256:${string}`; policy: LocalMaterialPolicy; /** Required for quarantine and for divergent delete-if-hash-matches inputs. */ quarantineRoot?: string; } export type DisposeLocalMaterialResult = { outcome: "retained" | "absent"; } | { outcome: "deleted"; sha256: `sha256:${string}`; } | { outcome: "quarantined"; sha256: `sha256:${string}`; quarantinePath: string; }; /** * Applies a fresh server policy to one local path. `delete-if-hash-matches` * never deletes divergent bytes: those bytes must be moved and fsynced into * quarantine first. Unknown policies are normalized to retain by the caller. */ export declare function disposeLocalMaterial(input: DisposeLocalMaterialInput): DisposeLocalMaterialResult; //# sourceMappingURL=scope-inventory-client.d.ts.map