import type { AskResponse, DialogResult } from "../ask-user/types.js"; import type { PlanPacketLike } from "../harness-run-context.js"; export const DEFAULT_PLAN_APPROVAL_OPTIONS = [ "Approve", "Request changes", "Cancel", ] as const; /** Optional Darwin research artifacts from /harness-plan (research-brief.yaml, not in plan-packet). */ export interface PlanResearchBrief { decomposition?: Record | null; hypothesis?: Record | null; eval?: Record | null; stack?: Record | null; implementation?: Record | null; debate?: { rounds?: Record[]; hypothesis_validations?: Record[]; } | null; dag_validation?: Record | null; } export interface ApprovePlanParams { plan_packet?: PlanPacketLike; human_summary?: string; research_brief?: PlanResearchBrief | null; options?: Array; displayMode?: "overlay" | "inline"; } export interface ValidatedApprovePlanParams { plan_packet: PlanPacketLike; human_summary?: string; research_brief?: PlanResearchBrief | null; options: { title: string; description?: string }[]; displayMode: "overlay" | "inline"; } export interface ApprovePlanToolDetails { plan_packet: PlanPacketLike; human_summary?: string; research_brief?: PlanResearchBrief | null; options: string[]; response: AskResponse | null; cancelled: boolean; } export type PlanApprovalDialogResult = DialogResult;