import type { AgentSendOpts } from './types.js';
/** Root for all per-agent IM workspaces. Kept stable so memory persists.
 *  Honors the legacy `IMHUB_WORKSPACES_ROOT` env override; otherwise
 *  resolves via core/agim-paths (which prefers `~/.agim-workspaces/` but
 *  falls back to the legacy `~/.im-hub-workspaces/` on 0.x systems). */
export declare function imhubWorkspacesRoot(): string;
/** Default cwd for a given agent under the workspaces root. */
export declare function defaultAgentCwd(agentName: string): string;
/**
 * Resolve the cwd to spawn an agent CLI in.
 *
 * Decision order:
 *   1. Env override `IMHUB_<AGENT>_CWD` always wins.
 *   2. If we're in an IM context (threadId + platform both present), pin to
 *      `~/.agim-workspaces/<agent>/`.
 *   3. Otherwise return undefined → adapter inherits agim's cwd. This
 *      keeps web/scheduler/intent-llm judge paths exactly as they were.
 */
export declare function resolveAgentCwd(agentName: string, opts: AgentSendOpts): string | undefined;
/**
 * Idempotent: create the workspace dir and seed initial CLAUDE.md / AGENTS.md
 * if they don't exist. Existing files are NEVER overwritten — the user is free
 * to evolve them by hand or have the agent itself rewrite them via
 * auto-memory.
 *
 * Honors IMHUB_<AGENT>_CWD overrides — if set, we bootstrap THAT path
 * instead. Skips bootstrapping when the override is empty / unset and we
 * compute it from defaultAgentCwd; either way the resolved path is what
 * spawnStream will pass as cwd.
 */
export declare function ensureAgentWorkspace(agentName: string, seed: {
    filename: string;
    content: string;
}): Promise<string>;
/**
 * Bootstrap the workspaces for the two built-in CLI agents we ship by
 * default. Safe to call multiple times. Returns a summary suitable for
 * logging.
 *
 * Other agents (codex, ACP-imported) don't need cwd isolation
 * either because they don't have per-cwd memory, or because they're
 * remote — they'll pass through with cwd undefined like before.
 */
export declare function bootstrapAgentWorkspaces(): Promise<Array<{
    agent: string;
    dir: string;
}>>;
//# sourceMappingURL=agent-cwd.d.ts.map