/** * A Cortex workspace is one bundle of per-user config + secrets + * memory state, stored under `~/.cortex/workspaces//`. Switching * workspaces flips the active pointer in `~/.cortex/state.json`; * subsequent CLI invocations resolve their config from the new * workspace's directory. */ export interface Workspace { slug: string; /** Absolute path to the workspace directory. */ path: string; /** Absolute path to the workspace's cortex.yaml (may not exist yet). */ configPath: string; /** Absolute path to the workspace's .env (may not exist yet). */ envPath: string; } export declare function workspacesRoot(): string; export declare function workspacePath(slug: string): string; export declare function workspaceConfigPath(slug: string): string; /** * List every workspace on disk, newest name first. A workspace exists * if the directory has a `config/` subfolder — that's how we tell it * apart from stray files someone dropped under ~/.cortex/workspaces. */ export declare function listWorkspaces(): Promise; export declare function findWorkspace(slug: string): Promise; export declare function getActiveWorkspace(): Promise; export declare function validateSlug(slug: string): { ok: true; } | { ok: false; reason: string; }; /** * Create a new workspace directory with empty config/ + .env scaffold. * If `fromPath` is provided and points at an existing cortex checkout * (or any directory containing `config/cortex.yaml`), the config and * .env are copied in so the new workspace matches the source setup. */ export declare function createWorkspace(opts: { slug: string; fromPath?: string; }): Promise; /** * Minimum cortex.yaml that parses cleanly against cortexConfigSchema * and leaves the server bootable. No providers configured yet — the * runtime logs a "no provider enabled" warning but keeps running so * the user can reach the dashboard to finish setup. */ export declare function bootstrapConfigTemplate(): string; export declare function removeWorkspace(slug: string): Promise; export declare function switchWorkspace(slug: string): Promise; //# sourceMappingURL=manager.d.ts.map