import type { CreateGoalInput, CreateGoalPlanNodeInput, RecordGoalEventInput } from "../store.js"; import type { Goal, GoalExecutorResult, GoalPlanNode, GoalRun, GoalSpec, GoalStatus, RunGoalOptions } from "./types.js"; type MaybePromise = T | Promise; export interface GoalRunnerStore { findGoalByContext(context: { loopRunId?: string; workflowRunId?: string; workflowStepId?: string; sourceType?: string; sourceId?: string; }): MaybePromise; createGoal(input: CreateGoalInput, opts?: { daemonLeaseId?: string; now?: Date; }): MaybePromise; requireGoal(id: string): MaybePromise; createGoalPlanNodes(goalId: string, nodes: CreateGoalPlanNodeInput[], opts?: { daemonLeaseId?: string; now?: Date; }): MaybePromise; listGoalPlanNodes(goalIdOrPlanId: string): MaybePromise; updateGoalStatus(goalId: string, status: GoalStatus, opts?: { daemonLeaseId?: string; now?: Date; }): MaybePromise; updateGoalPlanNode(goalId: string, key: string, patch: Partial>, opts?: { daemonLeaseId?: string; now?: Date; }): MaybePromise; recordGoalEvent(input: RecordGoalEventInput, opts?: { daemonLeaseId?: string; now?: Date; }): MaybePromise; } export declare function runGoal(store: GoalRunnerStore, input: GoalSpec, opts?: RunGoalOptions): Promise; export {};