/** * `/api/dashboard/workspaces` — list, switch, create. Wraps the CLI * workspace manager so the dashboard can: * * - render the workspace switcher in the top bar * - hot-switch the dashboard session's bound workspace (without * touching the CLI's global active pointer) * - create new workspaces from the UI (with optional seed path) * * Surface: * GET /api/dashboard/workspaces * → { workspaces: Array<{ slug, isActive }> } * POST /api/dashboard/workspaces/switch body { slug } * → 200 { ok: true, workspace } | 404 unknown_slug * POST /api/dashboard/workspaces/create body { slug, fromPath? } * → 201 { ok: true, workspace: { slug, path } } | 409 already_exists * * All routes are gated by `requireDashboardAuth(["admin"])` — * workspace selection is a privileged action because it determines * which secrets and which memory the dashboard sees. * * The "is active" marker comes from the BROWSING SESSION'S bound * workspace (the one set via `setDashboardSession`), not the * filesystem-wide `state.json` pointer. That keeps two dashboard * tabs from clobbering each other. */ import type { IncomingMessage, ServerResponse } from "node:http"; import type { RouteContext } from "../route-context.js"; export declare function handle(req: IncomingMessage, res: ServerResponse, ctx: RouteContext): Promise; //# sourceMappingURL=dashboard-workspaces.d.ts.map