import type { IncomingMessage, ServerResponse } from 'node:http'; /** * Match-and-handle dispatcher. Returns `true` when the request was * served; `false` when the URL/method didn't match. */ export declare function handleWorkspacesApi(req: IncomingMessage, res: ServerResponse, url: URL): Promise; /** * Validate + sanitize an incoming WorkspaceConfig from the settings * editor. Returns a clean object on success or a string error message * on failure. Reused by POST and PATCH so behavior is identical. */ export declare function validateWorkspacePayload(raw: unknown, expectedId?: string): { ok: true; cfg: import('../core/workspace.js').WorkspaceConfig; } | { ok: false; error: string; }; /** * Persist the workspaces array back to ~/.agim/config.json so changes * survive a restart. Best-effort: a write failure is logged but the * in-memory registry has already been updated, so the change is live * until the next process boot. */ export declare function persistWorkspacesToConfig(workspaces: import('../core/workspace.js').WorkspaceConfig[]): Promise; //# sourceMappingURL=workspaces-api.d.ts.map