import { URI } from "../../../base/common/uri.js"; /** Branch-name prefix for worktree-isolated agent sessions. */ export declare const AGENT_BRANCH_PREFIX = "agents/"; /** * The `.worktrees` sibling directory where per-session isolated worktrees * are created, e.g. `/src/vscode` → `/src/vscode.worktrees`. * * Shared across layers: the node agent host creates worktrees here, and the * browser workspace-trust gates use it as a structural provenance guard (only a * working directory under this root is treated as a VS Code-created worktree * eligible to inherit trust from its base repository). */ export declare function getWorktreesRoot(repositoryRoot: URI): URI; /** * Whether `candidate` is an individual VS Code-created worktree of * `repositoryRoot` — a **strict descendant** of {@link getWorktreesRoot}, never * the shared `.worktrees` container itself. * * The browser workspace-trust gates use this to decide whether a working * directory may inherit trust from its (trusted) base repository. The container * must be excluded: trusting `.worktrees` would, via workspace trust's * equal-or-descendant resolution, silently trust every current and future * worktree under it. Paths are normalized first so an equivalent spelling of the * container (e.g. a trailing `.`) cannot slip past the strict-descendant check. */ export declare function isWorktreeUnderRepository(candidate: URI, repositoryRoot: URI): boolean; /** * The repository a VS Code-created worktree belongs to, derived from its * location under the repository's {@link getWorktreesRoot} (e.g. * `/src/vscode.worktrees/task` → `/src/vscode`), or `undefined` when * `worktree` is not directly under a `.worktrees` directory. Path-based, * so it applies to mapped remote URIs as well. */ export declare function getRepositoryRootFromWorktree(worktree: URI): URI | undefined;