import type { IncomingMessage, ServerResponse } from 'node:http';
import { type CatalogDefinition, type CatalogEntry } from '../workflows/catalog.js';
export type WorkflowApiDeps = {
    runsDir: string;
    proxyToDaemon: (larkAppId: string, daemonPath: string, init: RequestInit) => Promise<Response>;
    /**
     * Test seam: override catalog list/load so route tests can scope to a tmp
     * workflow dir instead of $HOME/.botmux/workflows.  Production callers omit
     * these and the defaults read the real search paths.
     */
    listWorkflowDefinitions?: () => Promise<CatalogEntry[]>;
    loadCatalogDefinition?: (workflowId: string) => Promise<CatalogDefinition | undefined>;
};
export declare function jsonRes(res: ServerResponse, status: number, body: unknown): void;
/**
 * Dashboard workflow API router.
 *
 * Kept separate from `dashboard.ts` so route behavior can be exercised with a
 * small HTTP smoke test without starting the top-level dashboard process,
 * daemon registry, or SSE fanout.
 *
 * `authed` reflects whether the request presented a valid cookie/token; the
 * caller (`dashboard.ts`) computes this from `decideDashboardAuth` and
 * passes it through.  Public-read endpoints (`GET /snapshot`) use it to
 * scrub log bytes from the response when the reader is unauthenticated —
 * see `scrubSnapshotForUnauthed`.  Defaults to `false` so test callers
 * that omit the flag get the secure-by-default behavior.
 */
export declare function handleWorkflowApi(req: IncomingMessage, res: ServerResponse, url: URL, deps: WorkflowApiDeps, authed?: boolean): Promise<boolean>;
//# sourceMappingURL=workflow-api.d.ts.map