/** * Resolve an existing workspace path through symlinks and (unless disarmed) * enforce containment. * * @param cwd - Session workspace directory. * @param target - Client-supplied absolute path in the session's namespace. * @param fence - Whether containment is enforced (the settings-page * `workspaceFence` switch). Even when false the paths are still resolved * through symlinks so callers always receive the canonical target. * @returns The canonical absolute path used for the filesystem operation. */ export declare function ensureWorkspacePath(cwd: string, target: string, fence?: boolean): Promise; /** * Validate a write destination, including destinations that do not exist yet. * Existing targets are resolved to catch symlinks; missing targets are checked * against the nearest existing ancestor before the caller creates or renames. * The returned path is rebuilt from that canonical ancestor, so an existing * symlink is never left in the path passed to the write operation. * * @param cwd - Session workspace directory. * @param target - Client-supplied absolute destination path in the session's namespace. * @param fence - Whether containment is enforced (the settings-page * `workspaceFence` switch). Resolution/canonicalization is identical either way. * @returns A canonical path for an existing target or its nearest existing ancestor. */ export declare function ensureWorkspaceWritePath(cwd: string, target: string, fence?: boolean): Promise;