import { spawn as defaultSpawn } from "../../agent-spawn/dist/index.js"; import { type TaskList } from "../../task-list/dist/index.js"; import type { AttemptPhase, FailureCategory } from "./runtime/phases.js"; import "./drivers/index.js"; export interface Logger { info?(message: string, meta?: Record): void; warn?(message: string, meta?: Record): void; error?(message: string, meta?: Record): void; } export interface RunMaestroOptions { workflowPath?: string; name?: string; maxConcurrent?: number; pollIntervalMs?: number; list?: string; dryRun?: boolean; yes?: boolean; logLevel?: "trace" | "debug" | "info" | "warn" | "error"; onEvent?: (e: MaestroEvent) => void; taskList?: TaskList; agentSpawn?: typeof defaultSpawn; logger?: Logger; } export type MaestroEvent = { type: "tick_started"; at: string; } | { type: "task_skipped"; task_id: string; reason: "unsupported_kind"; kind: string; } | { type: "dispatch"; task_id: string; qualified_id: string; workspace: string; } | { type: "attempt_phase"; task_id: string; from: AttemptPhase | null; to: AttemptPhase; step?: string; failure?: FailureCategory; } | { type: "agent_event"; task_id: string; step: string; session_id: string; event: string; payload?: unknown; } | { type: "worker_exit"; task_id: string; reason: "normal" | "abnormal" | "skip"; skipReason?: "terminal_state" | "unconfigured_state"; failure?: FailureCategory; failedStep?: string; error?: string; } | { type: "unconfigured_state"; task_id: string; state: string; } | { type: "reconcile"; task_id: string; action: "stop_clean" | "stop_keep" | "update"; } | { type: "retry_scheduled"; task_id: string; attempt: number; due_in_ms: number; } | { type: "validation_failed"; reason: string; }; export declare function runMaestro(opts?: RunMaestroOptions): Promise<() => Promise>; export { ATTEMPT_TRANSITIONS, transitionPhase, type AttemptPhase, type AttemptState, type FailureCategory } from "./runtime/phases.js"; export { backoffMs, CONTINUATION_DELAY_MS, shouldRetry, type RetryContext, type RetryDecision } from "./runtime/retry.js"; export { sanitizeWorkspaceKey } from "./runtime/sanitize.js"; export { cancelRetry, claim, createState, markCompleted, markRunning, release, scheduleRetry, type MaestroState, type RetryEntry, type RunningEntry } from "./runtime/state.js"; export { reconcileRunning, type ReconcileAction, type ReconcileDeps, type ReconcileResult } from "./runtime/reconcile.js"; export { tick, type TickDeps, type TickEvent } from "./runtime/loop.js"; export { maestroTaskStateMachine, type MaestroTaskEvent, type MaestroTaskState } from "./state-machine.js"; export { loadWorkflow, WorkflowLoadError, type WorkflowDefinition, type WorkflowLoadErrorCode } from "./config/load.js"; export { resolveConfig, type ResolvedConfig } from "./config/schema.js"; export { resolveConfiguredTaskListOptions } from "./config/task-list.js"; export { validateDispatch, type DispatchPreflightCode, type DispatchValidationResult } from "./config/validate.js"; export { renderStepPrompt, renderTaskPrompt } from "./prompt/render.js"; export { resolveWorkflowPath } from "./workflow-path.js"; export { runMaestroTick, type RunMaestroTickOptions } from "./tick-command.js"; export { runAttempt, type AttemptDeps, type AttemptEvent, type AttemptOutcome, type AttemptReconcileResult } from "./agent/runner.js"; export { getDriver, listDrivers, registerDriver } from "./drivers/registry.js"; export { type WorkflowDriver, type WorkflowDriverContext } from "./drivers/types.js"; export { harnessDriver, superintendentDriver } from "./drivers/index.js"; export { ensureWorkspace, removeWorkspace, startupTerminalCleanup, type EnsureWorkspaceResult } from "./workspace/manager.js";