import { type IncomingMessage, type ServerResponse } from 'node:http';
import type { TriggerInput, TriggerResult } from '../workflows/trigger-run.js';
export declare function setWorkflowRunner(fn: (input: TriggerInput) => Promise<TriggerResult>): void;
import { composeRowFromActive, composeRowFromClosed, type SessionRow } from './dashboard-rows.js';
import type { ParsedSchedule } from '../types.js';
export interface IpcServerHandle {
    port: number;
    close: () => Promise<void>;
}
export type Handler = (req: IncomingMessage, res: ServerResponse, params: Record<string, string>) => Promise<void> | void;
/** Register a handler. Path supports `:name` segments captured into the params object. */
export declare function ipcRoute(method: string, path: string, handler: Handler): void;
export declare function jsonRes(res: ServerResponse, status: number, body: unknown): void;
export declare function readJsonBody<T = unknown>(req: IncomingMessage): Promise<T>;
/** Test seam: override the secret used to verify token-route HMAC. */
export declare function setIpcAuthSecret(secret: string | null): void;
export type { SessionRow };
export { composeRowFromActive, composeRowFromClosed };
export declare function setBotName(name: string): void;
export declare function setLarkAppId(id: string): void;
export interface ScheduleRow {
    id: string;
    name: string;
    parsed: ParsedSchedule;
    prompt: string;
    workingDir: string;
    chatId: string;
    rootMessageId?: string;
    larkAppId?: string;
    botName?: string;
    enabled: boolean;
    createdAt: string;
    lastRunAt?: string;
    nextRunAt?: string;
    lastStatus?: 'ok' | 'error';
    lastError?: string;
    repeat?: {
        times: number | null;
        completed: number;
    };
    feishuChatLink: string;
}
export declare function startIpcServer(opts: {
    port: number;
    host: string;
}): Promise<IpcServerHandle>;
//# sourceMappingURL=dashboard-ipc-server.d.ts.map