import { type InvocationAuthority } from "./authority.ts"; import { type WorkspacePolicyError } from "./errors.ts"; import { type ResourceVersion, type WorkspaceAccess } from "./schema.ts"; declare const ROOT_GRANT: unique symbol; export declare const ROOT_ENFORCEMENT_MODES: readonly ["native-single-root", "native-multi-root", "resolve-only"]; export type RootEnforcement = (typeof ROOT_ENFORCEMENT_MODES)[number]; export interface RootGrant { readonly [ROOT_GRANT]: true; readonly grantId: string; readonly bindingId: string; readonly resourceDomainId: string; /** Canonical physical path; runtime-only and never persisted in portable records. */ readonly physicalRoot: string; readonly maxAccess: WorkspaceAccess; readonly version?: Readonly; readonly allowedPrincipals: ReadonlySet; readonly enforcement: RootEnforcement; } export interface HostRootGrantInput { grantId: string; bindingId: string; resourceDomainId: string; physicalRoot: string; maxAccess: WorkspaceAccess; version?: ResourceVersion; allowedPrincipals: Iterable; enforcement: RootEnforcement; } export interface RootRegistry { readonly registryId: string; authorize(grantId: string, principal: InvocationAuthority, requested: WorkspaceAccess): RootGrant | WorkspacePolicyError; } export interface RootRegistryInput { registryId: string; grants: readonly RootGrant[]; } /** Invalid trusted host policy; detected before an invocation can start. */ export declare class RootRegistryConfigurationError extends Error { constructor(message: string); } /** * Host-only RootGrant constructor. * * The private symbol plus WeakSet identity make grants non-forgeable by JSON, * object spread, structural casts, or structured cloning. Trusted delivery * code calls this while loading its local root policy. */ export declare function createHostRootGrant(input: HostRootGrantInput): RootGrant; export declare function isRootGrant(value: unknown): value is RootGrant; /** * Build a registry and reject alias configurations that could split locking, * journaling, version, or cache identity for one writable physical resource. */ export declare function createRootRegistry(input: RootRegistryInput): RootRegistry; export {}; //# sourceMappingURL=registry.d.ts.map