/**
 * QlogicagentExecutorHost — the REAL host backing host-executors (agent/tool/http/mcp/channel)
 * with qlogicagent's actual capabilities. No mocks, no stubs (plan §1.5).
 *
 * Boundary capabilities (runAgent / invokeMcp / sendChannel) are injected so this file stays
 * decoupled from the handler host that owns processManager/acpDetector and the openclaw channel
 * callback. Tool invocation goes straight through the single-source-of-truth tool registry
 * (`findTool`). fail-loud everywhere: unknown tool, missing channel host, or any rejection throws.
 */
import type { RuntimeToolContract } from "../../runtime/ports/index.js";
import { type DataItem } from "./data-item.js";
import type { ExecutorHost, ToolHostRequest, MemoryHostRequest, SubworkflowHostRequest, ApprovalHostRequest, WebhookWaitHostRequest } from "./node-schema.js";
/** Injected boundary capabilities — supplied by the handler host that owns the real runners. */
export interface QlaExecutorHostDeps {
    /** Run one agent turn (spawn external ACP agent + sendTask). Returns the agent's text output. */
    runAgent: (req: {
        agentId?: string;
        prompt: string;
        signal?: AbortSignal;
    }) => Promise<string>;
    /** Invoke an MCP server tool through the real MCP bridge. */
    invokeMcp: (req: {
        server: string;
        tool: string;
        args: Record<string, unknown>;
        signal?: AbortSignal;
    }) => Promise<unknown>;
    /**
     * Send a message out through a channel via the openclaw channel layer.
     * Undefined in standalone qlogicagent (no gateway) → channel nodes fail-loud (D12/D13).
     */
    sendChannel?: (req: {
        channel: string;
        target?: string;
        payload: unknown;
        signal?: AbortSignal;
    }) => Promise<unknown>;
    /** Tool lookup supplied by the runtime host. */
    findTool: (name: string) => RuntimeToolContract | undefined;
    /**
     * Project-scoped memory backend for the `memory` kind (spec D25). The handler host wires
     * the owning project root's memdir; absent → memory nodes fail-loud.
     */
    memory?: (req: MemoryHostRequest) => Promise<DataItem[]>;
    /** Run another workflow as a step (D34); the handler enforces cycle guards. */
    runSubworkflow?: (req: SubworkflowHostRequest) => Promise<DataItem[]>;
    /** Human-in-the-loop approval (D34): notify + await the owner's decision. */
    approval?: (req: ApprovalHostRequest) => Promise<{
        approved: boolean;
        decidedAt: string;
        note?: string;
    }>;
    /** D34 wait-until-webhook: suspend until the path is hit (handler owns the wake registry). */
    waitWebhook?: (req: WebhookWaitHostRequest) => Promise<Record<string, unknown>>;
    /**
     * IT-7b fine-grained unattended audit (unified permission engine's operation classifier).
     * Called for every tool invocation in an UNATTENDED run; throw to refuse (fail-loud).
     */
    auditUnattendedTool?: (req: ToolHostRequest) => void;
    /**
     * Vault credential → auth headers, resolved at EXECUTION time only (D29). Absent ⇒ http
     * nodes carrying credentialId fail-loud (never silently unauthenticated).
     */
    resolveCredentialHeaders?: (credentialId: string) => Record<string, string>;
    /** fetch impl; defaults to global fetch. Injectable for tests. */
    fetchImpl?: typeof fetch;
    /**
     * Owning workflow root (multi-root, R5):tool 节点的 cwd 必须钉在所属项目工作区。
     * in-process 工具注册表跟随 agent 的"活动项目"全局 cwd —— 不钉的话,项目 A 的
     * tool 节点会在项目 B 的目录里动文件(跨项目写,真机踩过:产物落错工作区)。
     * 注入方式 = exec 工具既有的 `workdir` 参数(作者显式指定时尊重);其余工具无
     * per-call cwd 通道,仍循全局 cwd —— 工作流里写文件的正路是 agent 节点(子进程
     * 带根 cwd)与 exec;若需全工具 cwd 线程化,另立决策改 RuntimeToolContract。
     */
    workspaceCwd?: string;
}
export declare function createQlaExecutorHost(deps: QlaExecutorHostDeps): ExecutorHost;
