/** * Advanced workflows (2026-10): the bridge-side node executor. * * The hub engine hands over ONE node at a time; this executes it on the * machine and returns the result (output + any produced files). Effect kinds: * agent -> spawn the agent's harness for the node's instruction * tool -> run a deterministic node tool, else drive the harness * http -> fetch (method/url/headers/body) * media -> generate image / video / audio with the agent's provider key * browser -> drive the harness with a browsing instruction * * All decisions (which node is next, branching, loops) live in the hub engine; * this file only performs effects. */ import type { AgentSettings } from '../../cli/utils'; import type { WorkflowNodeArtifact, WorkflowNodeTask, WorkflowRunContext } from '../api-types'; export interface NodeExecutionResult { ok: boolean; output?: unknown; error?: string; artifacts?: WorkflowNodeArtifact[]; } export interface NodeExecutionContext { task: WorkflowNodeTask; run: WorkflowRunContext; agentId: string; apiKey: string; apiBaseUrl: string; settings: AgentSettings; cwd: string; sessionId: string; secrets: Record; log: (text: string, level?: 'stdout' | 'stderr') => void; } export declare function executeWorkflowNode(ctx: NodeExecutionContext): Promise;