import { type PersonalVaultOptions } from "../personal-vault.js"; export declare const AREA_LAYOUT_FORMAT = 1; export declare const AREA_ROUTER_VERSION = 1; export declare const META_AREA_ID = "@meta"; export type AreaId = string; export interface AreaLayoutArea { id: AreaId; /** Directory prefixes, without a trailing slash. */ prefixes: readonly string[]; /** Exact file paths, used for root files and continuity paths. */ paths: readonly string[]; /** The `root:@files` area owns non-excluded root-level files. */ rootFiles?: boolean; } /** The durable shape written as `layout.json`. */ export interface AreaLayout { format: typeof AREA_LAYOUT_FORMAT; routerVersion: typeof AREA_ROUTER_VERSION; areas: readonly AreaLayoutArea[]; } /** * A filesystem-free description of the current personal-vault inclusion set. * Directory entries mean all descendants; paths are exact included files. */ export interface PersonalVaultAreaScope { ordinaryRoots: readonly string[]; rootFiles: readonly string[]; includeManifest: boolean; localCompanySlugs: readonly string[]; continuityPaths: readonly string[]; /** Company directories discovered inside the synced agency subtree. */ agencyCompanies: readonly string[]; agencyTeams: readonly { company: string; team: string; }[]; /** Whether the entire workspace/agency carve-out is in the personal scope. */ includeAgency: boolean; includeSessionLogs: boolean; } /** * Collapse a local spelling into the wire path namespace used by vault keys. * The resulting value remains case-sensitive: S3 keys distinguish `Core` from * `core`, and folding here would turn an excluded alias into a routed path. */ export declare function canonicalizeVaultPath(value: string): string | null; /** Build the initial v1 mapping from an explicit, already-authorized scope. */ export declare function createPersonalVaultAreaLayout(scope: PersonalVaultAreaScope): AreaLayout; /** * Resolve exactly the personal-vault scope constructors used today. This is a * convenience for layout creation only; the resolver itself remains pure. */ export declare function inspectPersonalVaultAreaScope(hqRoot: string, options?: PersonalVaultOptions): PersonalVaultAreaScope; /** Longest-prefix resolver reconstructed only from a versioned layout. */ export declare class AreaResolver { readonly layout: AreaLayout; private readonly routes; constructor(layout: AreaLayout); static forPersonalVault(scope: PersonalVaultAreaScope): AreaResolver; static fromJson(serialized: string): AreaResolver; /** Return the uniquely owning area, or undefined when the path is out of scope. */ resolve(rawPath: string): AreaId | undefined; /** * Return every area that can own the root itself or one of its descendants. * * This deliberately consults the durable layout instead of probing every * area store. A root nested inside a broad route still selects that route; * a root that contains more-specific routes selects each of those routes. */ areasOverlappingRoots(roots: readonly string[]): readonly AreaId[]; /** Stable, newline-terminated `layout.json` serialization. */ toJson(): string; } //# sourceMappingURL=area-resolver.d.ts.map