import type { AgentRpcError } from "../protocol/wire/index.js";
import type { MultiAgentHandlerHost } from "./multi-agent-handler-host.js";
import type { WorkflowHandlerHost } from "./handlers/workflow-handler.js";
/**
 * WorkflowHostAdapter — the host the legacy `workflow.*` JSON-RPC domain binds to.
 *
 * The workflow handlers (workflow.create/run/list/onImMessage/onWebhook/…) need MORE than the
 * agents/solo/product sub-host provides: `toolCatalog` (workflow `tool` nodes look up real
 * qlogicagent tools via `findTool`) plus the lazy engine slots that `ensureWorkflowController`
 * fills (controller/store/scheduler/processManager). The multi-agent sub-host has neither, so
 * binding workflow there left `this.toolCatalog` undefined — a workflow `tool` node would throw
 * "Cannot read properties of undefined (reading 'findTool')" at run time. This adapter supplies
 * the missing pieces explicitly, mirroring createDreamHostAdapter / createAcpExtendedHostAdapter.
 *
 * `acpDetector` is sourced from the multi-agent sub-host so workflow `agent` nodes resolve the same
 * canonical external descriptors that the `agents.*` domain configures. The engine slots are plain
 * own-properties this (per-agent singleton) adapter owns and `ensureWorkflowController` mutates once;
 * keeping them here means the controller it publishes via setWorkflowController stays a singleton and
 * the multi-agent sub-host is no longer polluted with workflow state.
 */
export interface WorkflowHostAdapterDeps {
    multiAgentHost: MultiAgentHandlerHost;
    getActiveProjectRoot(): string;
    getToolCatalog(): WorkflowHandlerHost["toolCatalog"];
    handleMcpToolCall: WorkflowHandlerHost["handleMcpToolCall"];
    sendNotification(method: string, params: Record<string, unknown>): void;
    sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
}
export declare function createWorkflowHostAdapter(deps: WorkflowHostAdapterDeps): WorkflowHandlerHost;
