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; action: { kind: "assistant_task"; conversationId: string; agentId: string; instruction: string; locale: "en" | "zh"; } | { kind: "routine"; routineId: string; version: number; hash: string; } | { kind: "agent"; instruction: string; agentId?: string | undefined; mcpSourceId?: string | undefined; workingDirectory?: string | undefined; model?: string | undefined; timeoutSeconds?: number | undefined; } | { kind: "task_command"; taskId: string; command: { type: "retry_allocation"; } | { type: "move"; phase: "ready" | "active" | "review" | "backlog" | "closed"; resolution?: "cancelled" | "done" | "duplicate" | "wont_do" | undefined; } | { type: "mark_ready"; } | { type: "start"; executor: { kind: "agent"; agentId: string; } | { kind: "human"; actorId: string; } | { kind: "external"; provider: string; config: unknown; }; scheduleAt?: number | undefined; } | { type: "request_review"; } | { type: "signoff"; resultId: string; } | { type: "close"; resolution: "cancelled" | "done" | "duplicate" | "wont_do"; } | { type: "reopen"; phase: "ready" | "active" | "review" | "backlog"; } | { type: "add_wait"; wait: { kind: "approval" | "paused" | "dependency" | "user_input" | "external_event" | "scheduled_time" | "retry_backoff"; reason: string; condition: Record; resumeAt?: number | undefined; }; } | { type: "resolve_wait"; waitId: string; resolution?: unknown; } | { type: "revise_contract"; contract: { objective: string; expectedOutputs: string[]; acceptanceCriteria: string[]; constraints: string[]; approvalRequired: string[]; assumptions: string[]; risks: string[]; outputDestinations: Record[]; acceptancePolicy: "verified_auto" | "verified_then_review" | "manual"; }; }; } | { kind: "system"; capability: "home.advisor.refresh" | "proactivity.tick" | "proactive.pulse.flush" | "memory.temporal_sweep" | "memory.daily_reconciliation" | "memory.weekly_knowledge"; }; delivery: { notificationPolicy: "none" | "attention" | "all"; destinations: ({ key: string; kind: "gateway_event"; } | { key: string; kind: "weixin"; conversationId: string; principalId: string; } | { key: string; kind: "webhook"; endpoint: string; secretId: string; } | { key: string; kind: "file"; targetId: string; pathTemplate: string; } | { key: string; kind: "card"; channelId: string; templateId: string; })[]; }; trigger: { kind: "manual"; } | { kind: "schedule"; schedule: { kind: "once"; at: string; } | { kind: "interval"; everyMs: number; anchorMs?: number | undefined; } | { kind: "cron"; expr: string; tz?: string | undefined; }; } | { kind: "webhook"; secretId?: string | undefined; } | { kind: "event"; eventType: string; source?: string | undefined; payloadMatch?: Record | undefined; }; conversationMode: "new_session" | "continuous"; projectId?: string | undefined; description?: string | undefined; safety?: { mode: "suggest_only" | "ask_before_apply" | "auto_apply"; } | undefined; reliability?: { executionTimeoutSeconds?: number | undefined; retryCount?: number | undefined; maxConcurrentRuns?: number | undefined; disableAfterConsecutiveFailures?: number | undefined; } | undefined; management?: { owner: string; editable: ("enabled" | "trigger")[]; runnable: boolean; deletable: boolean; } | undefined; id?: string | undefined; enabled?: boolean | undefined; state?: { nextRunAtMs?: number | undefined; runningRunId?: string | undefined; lastRunAtMs?: number | undefined; lastRunStatus?: "queued" | "cancelled" | "failed" | "running" | "succeeded" | "cancelling" | "timeout" | undefined; lastError?: string | undefined; consecutiveFailures?: number | undefined; } | undefined; }; 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 {};