/** * Orchestrator Runner -- Programmatic API for the orchestrator CLI. * * Exports `runOrchestrator()` so the orchestrator can be invoked from code * (e.g. Next.js route handlers, tests, or custom scripts) without going * through process.argv / process.env / process.exit. */ import { type AgentProcess, type OrchestratorIssue } from '@renseiai/agentfactory'; export interface OrchestratorRunnerConfig { /** Linear API key for authentication */ linearApiKey: string; /** Filter issues by project name */ project?: string; /** Maximum concurrent agents (default: 3) */ max?: number; /** Process a single issue by ID */ single?: string; /** Wait for agents to complete (default: true) */ wait?: boolean; /** Show what would be done without executing (default: false) */ dryRun?: boolean; /** Git repository root (default: auto-detect) */ gitRoot?: string; /** Callbacks for agent lifecycle events */ callbacks?: OrchestratorCallbacks; /** Custom workflow template directory path */ templateDir?: string; /** Git repository URL for worktree cloning */ repository?: string; /** Force a specific work type (used with --single) */ workType?: string; } export interface OrchestratorCallbacks { onIssueSelected?: (issue: OrchestratorIssue) => void; onAgentStart?: (agent: AgentProcess) => void; onAgentComplete?: (agent: AgentProcess) => void; onAgentError?: (agent: AgentProcess, error: Error) => void; onAgentIncomplete?: (agent: AgentProcess) => void; } export interface OrchestratorRunnerResult { agentsSpawned: number; errors: Array<{ issueId: string; error: Error; }>; completed: AgentProcess[]; } export declare function getGitRoot(): string; export declare function formatDuration(ms: number): string; export declare function runOrchestrator(config: OrchestratorRunnerConfig): Promise; //# sourceMappingURL=orchestrator-runner.d.ts.map