/**
 * HTTP route handlers for the Todos dashboard API.
 * All route logic is here — utility functions remain in serve.ts.
 */
import type { Task } from "../types/index.js";
export { json, taskToSummary, SECURITY_HEADERS, MIME_TYPES, serveStaticFile, } from "./serve.js";
export interface FilteredClient {
    controller: ReadableStreamDefaultController;
    agentId?: string;
    projectId?: string;
    events?: Set<string>;
}
export interface RouteContext {
    port: number;
    sseClients: Set<ReadableStreamDefaultController>;
    filteredSseClients: Set<FilteredClient>;
    broadcastEvent: (event: {
        type: string;
        task_id?: string;
        action: string;
        agent_id?: string | null;
        project_id?: string | null;
    }) => void;
    dashboardExists: boolean;
    dashboardDir: string;
    apiKey: string | null;
}
export declare function handleSseEvents(_req: Request, url: URL, ctx: RouteContext): Response | null;
export declare function handleTasksStream(_req: Request, url: URL, ctx: RouteContext): Response | null;
export declare function handleHealth(_ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleHeadlessBoundary(_ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleStats(_ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleListTasks(_req: Request, url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Promise<Response>;
export declare function handleCreateTask(req: Request, ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Promise<Response>;
export declare function handleTasksExport(_req: Request, url: URL, _ctx: RouteContext, _json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Response;
export declare function handleTasksBulk(req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleTasksStatus(_req: Request, url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleTasksNext(_req: Request, url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Response;
export declare function handleTasksActive(_req: Request, url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleTasksStale(_req: Request, url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Response;
export declare function handleTasksChanged(_req: Request, url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Response;
export declare function handleTasksContext(_req: Request, url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Response;
export declare function handleTaskAttachments(id: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleTaskProgress(id: string, req: Request, method: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, url?: URL): Promise<Response | null>;
export declare function handleGetTask(id: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown, url?: URL): Response;
export declare function handlePatchTask(id: string, req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Promise<Response>;
export declare function handleDeleteTask(id: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleStartTask(id: string, ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Response;
export declare function handleFailTask(id: string, req: Request, ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Promise<Response>;
export declare function handleCompleteTask(id: string, ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Response;
export declare function handleListProjects(url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleCreateProject(req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleDeleteProject(id: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleAgentMe(_req: Request, url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Promise<Response>;
export declare function handleAgentQueue(agentId: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Response;
export declare function handleClaimTask(req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Promise<Response>;
export declare function handleListOrgs(_ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleCreateOrg(req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleUpdateOrg(id: string, req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleDeleteOrg(id: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleOrgChart(_ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleAgentTeam(agentId: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleListAgents(url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleRegisterAgent(req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleUpdateAgent(id: string, req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleDeleteAgent(id: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleBulkDeleteAgents(req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleBulkDeleteProjects(req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleDoctor(_ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleReport(_req: Request, url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleActivity(_req: Request, url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleTaskHistory(id: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, url?: URL): Response;
export declare function handleListWebhooks(_ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleCreateWebhook(req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleDeleteWebhook(id: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleListTemplates(_ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleCreateTemplate(req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleDeleteTemplate(id: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleListPlans(url: URL, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleCreatePlan(req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleBulkDeletePlans(req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleGetPlan(id: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response, taskToSummary: (task: Task, fields?: string[]) => unknown): Response;
export declare function handleUpdatePlan(id: string, req: Request, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Promise<Response>;
export declare function handleDeletePlan(id: string, _ctx: RouteContext, json: (data: unknown, status?: number) => Response): Response;
export declare function handleStaticFiles(path: string, method: string, ctx: RouteContext, json: (data: unknown, status?: number) => Response, serveStaticFile: (filePath: string) => Response | null): Response | null;
//# sourceMappingURL=routes.d.ts.map