import { type Workspace } from "./cli/workspace/manager.js"; /** * Bridges the AsyncLocalStorage-tracked session workspace and the * on-disk workspace manager. Workspace-scoped tools call these to * resolve the filesystem paths they need (people.yaml, projects.yaml, * .env, etc.) from the session's binding rather than the legacy * process-global "active workspace" in state.json. * * Resolution order for every scoped tool: * 1. The session's explicit binding (set via set_session_workspace). * 2. The active workspace in state.json — for backwards compat * with clients that haven't called set_session_workspace yet. * 3. Error ("no workspace — call set_session_workspace first"). * * Tools that intentionally run outside a workspace (browser_*, * fetch_pr, fetch_ticket, list_workspaces, add_workspace, the * session-workspace tools themselves) never call these helpers and * are unaffected. */ export declare class NoWorkspaceBoundError extends Error { constructor(message?: string); } /** * Return the session's workspace slug, falling back to the CLI-side * active-workspace pointer for unbound sessions (old clients that * haven't adopted the prompt flow yet). Returns null only when the * user explicitly set the session to `"none"`. * * `undefined` means "nothing bound and no fallback" → caller should * throw NoWorkspaceBoundError. */ export declare function resolveSessionWorkspaceSlug(): Promise; /** * Resolve a full Workspace object (path, configPath, envPath) from * the session. Throws NoWorkspaceBoundError when there's nothing * bound or discoverable. Tools that write files (taxonomy, env, * job profile in future) need the path; retrieval tools can use * just the slug via resolveSessionWorkspaceSlug. */ export declare function requireSessionWorkspace(): Promise; /** * Variant that returns null when the session is explicitly in * no-workspace mode, or the Workspace when one is resolvable. * Tools that want to gracefully skip (e.g. retrieval tools that can * still answer from global state) use this instead of the throwing * version. */ export declare function maybeSessionWorkspace(): Promise; //# sourceMappingURL=session-workspace-helpers.d.ts.map