import type { CreateAutomationInput } from '../domain/validation.js'; import type { AutomationRepairDraftResponse, AutomationSimulation } from './automation-draft.types.js'; interface GeneratedAutomationDraft { automation: CreateAutomationInput; explanation: string; assumptions: string[]; risks: string[]; } export declare function parseGeneratedAutomationDraft(raw: string): GeneratedAutomationDraft; export declare function buildAutomationDraftResponse(draft: GeneratedAutomationDraft, repairAttempts: number): { draftId: `${string}-${string}-${string}-${string}-${string}`; automation: { name: string; projectId?: string; action?: { kind: "agent"; instruction: string; agentId?: string; workingDirectory?: string; model?: string; timeoutSeconds?: number; } | { kind: "workflow"; workflowId: string; agentId?: string; input?: unknown; inputEnvelope?: { payload: unknown; goal?: string; variables?: Record; context?: Record; }; goal?: string; concurrency?: number; maxSubagents?: number; timeoutSeconds?: number; } | { kind: "browser_recipe"; recipeId: string; args?: Record; timeoutSeconds?: number; } | { kind: "task_command"; taskId: string; command?: { type: "mark_ready"; } | { type: "start"; executor?: { kind: "agent"; agentId: string; } | { kind: "workflow"; workflowId: string; workflowVersion?: string; input?: unknown; } | { kind: "human"; actorId: string; } | { kind: "external"; provider: string; config: unknown; }; scheduleAt?: number; } | { type: "request_review"; } | { type: "close"; resolution: "cancelled" | "done" | "duplicate" | "wont_do"; } | { type: "reopen"; phase: "active" | "ready"; } | { type: "add_wait"; wait: { kind: "paused" | "approval" | "dependency" | "user_input" | "external_event" | "scheduled_time" | "retry_backoff"; reason: string; condition: Record; resumeAt?: number; }; } | { type: "resolve_wait"; waitId: string; resolution?: unknown; } | { type: "delegate"; agentId?: string; } | { type: "revise_contract"; contract: { objective: string; expectedOutputs: string[]; acceptanceCriteria: string[]; constraints: string[]; approvalRequired: string[]; assumptions: string[]; risks: string[]; acceptancePolicy: "manual" | "verified_auto" | "verified_then_review"; outputDestinations: Record[]; }; }; }; description?: string; safety?: { mode: "suggest_only" | "ask_before_apply" | "auto_apply"; }; trigger?: { kind: "manual"; } | { kind: "schedule"; schedule?: { kind: "once"; at: string; } | { kind: "interval"; everyMs: number; anchorMs?: number; } | { kind: "cron"; expr: string; tz?: string; }; } | { kind: "webhook"; secretId?: string; } | { kind: "event"; eventType: string; source?: string; payloadMatch?: Record; }; afterRun?: { kind: "none"; } | { kind: "saveToSession"; } | { kind: "webhook"; url: string; }; reliability?: { executionTimeoutSeconds?: number; timeoutSeconds?: number; retryCount?: number; maxConcurrentRuns?: number; disableAfterConsecutiveFailures?: number; }; id?: string; enabled?: boolean; state?: { nextRunAtMs?: number; runningRunId?: string; lastRunAtMs?: number; lastRunStatus?: "failed" | "succeeded" | "running" | "queued" | "cancelled" | "timeout" | "cancelling"; lastError?: string; consecutiveFailures?: number; }; }; explanation: string; assumptions: string[]; risks: string[]; simulation: AutomationSimulation; repairAttempts: number; }; export declare function parseGeneratedAutomationRepairDraft(raw: string, repairAttempts: number): AutomationRepairDraftResponse; export declare function simulateAutomation(input: CreateAutomationInput): AutomationSimulation; export {};