import type { AgentPlan, ToolResult, ToolExecutionContext, MemoryCandidate, ScreenState } from "@loomic/types"; import type { GovernorVerdict } from "./governor.js"; import { UIComposer } from "./ui-composer.js"; import { ToolRegistry } from "./tool-registry.js"; import { RuntimeEventEmitter } from "./event-emitter.js"; import { ApprovalQueue } from "./approval-queue.js"; export type ExecutionResult = { /** Tool call results (only for allowed/modified tool actions) */ toolResults: ToolResult[]; /** Memory candidates that were approved and emitted */ memoryProposals: MemoryCandidate[]; /** Final screen state after UI diffs */ screenState: ScreenState; /** Number of UI diffs applied */ uiDiffsApplied: number; /** Number of actions pending approval */ pendingApprovalCount: number; /** Errors encountered during execution (non-fatal) */ errors: string[]; }; /** * PlanExecutor — applies the approved actions from a GovernorVerdict. * * Responsibilities: * - Apply allowed UI diffs to the UIComposer * - Execute allowed tool calls via the ToolRegistry * - Emit memory:proposed events for allowed memory writes * - Emit tool/ui events for observability * * The executor never re-evaluates policy — that's the Governor's job. */ export declare class PlanExecutor { private readonly uiComposer; private readonly toolRegistry; private readonly emitter; private readonly approvalQueue?; constructor(uiComposer: UIComposer, toolRegistry: ToolRegistry, emitter: RuntimeEventEmitter, approvalQueue?: ApprovalQueue | undefined); execute(plan: AgentPlan, verdict: GovernorVerdict, context: ToolExecutionContext, cycleId?: string): Promise; } //# sourceMappingURL=executor.d.ts.map