import type { Api, Model } from '@earendil-works/pi-ai'; import type { SubagentRunner, WorkflowRunOptions, WorkflowRunResult } from '../../agent/workflow/types.js'; import type { WorkflowGraph } from '../domain/definition.js'; export type WorkflowRuntimeSubagentRunner = SubagentRunner; export type WorkflowRuntimeRunOptions = WorkflowRunOptions; export type WorkflowRuntimeRunResult = WorkflowRunResult; export interface WorkflowRuntimeDeps { runner: WorkflowRuntimeSubagentRunner; resolveModelId?: (modelId: string) => Model; } export interface WorkflowRuntime { run(graph: WorkflowGraph, deps: WorkflowRuntimeDeps, options: WorkflowRuntimeRunOptions): Promise>; }