/** * workspace/registration/resolution.ts * * The PURE resolution function and path helpers for the registered-workspace * registry. No disk, no git spawning, given a path, optional worktree-link git * metadata, and the registry state, it decides whether the path is covered by * (and which) registered root, remembered-declined, or unknown. * * SETTLED SEMANTICS (implemented exactly): * - Coverage flows DOWN a registered root's subtree, never up: a root covers a * path when the path equals the root or sits beneath it. * - Worktree inheritance follows the git worktree→main-repo LINK, not path * ancestry: if the path is a linked worktree whose main repo * (git.mainWorktreeRoot) is covered by a registered root, the path inherits * that registration even when it lives outside the root's subtree (the * orchestration sibling-worktree case). * - Nearest registered root wins when registrations nest (longest matching * root path). * - Declines are subtree-scoped at the root that was asked; a declined root * covers its subtree the same way a registered root does. * - When a registered root and a declined root both cover a path, the NEARER * one wins; a tie resolves to `covered` (affirmative coverage beats a * remembered "no"). */ import type { ResolveWorkspaceInput, WorkspaceResolution } from './types.js'; /** * Exact-string normalization matching the agent registry: an absolute path with * no trailing separator (except a bare filesystem root). Registration must not * require the directory to exist, so this uses `resolve`, not `realpath`. */ export declare function normalizeWorkspaceRoot(root: string): string; /** Does `ancestor` cover `descendant`, same path, or a directory strictly above it? */ export declare function pathCovers(ancestor: string, descendant: string): boolean; /** * Resolve a path against the registry. Pure: identical inputs always yield an * identical verdict. */ export declare function resolveWorkspaceRegistration(input: ResolveWorkspaceInput): WorkspaceResolution; //# sourceMappingURL=resolution.d.ts.map