/** Cap shared with reminder body evidence attachment (spec: reuse body upper bound). */ export declare const REMINDER_BODY_MAX_CHARS = 32000; export declare const PREFLIGHT_DEFAULT_TIMEOUT_MS: number; export declare const PREFLIGHT_MAX_TIMEOUT_MS: number; export type PreflightRunStatus = 'succeeded' | 'declined' | 'errored'; export interface PreflightExecutionResult { durationMs: number; endedAt: string; exitCode?: number; signal?: string; startedAt: string; status: PreflightRunStatus; stderr?: string; stderrTruncated?: boolean; stdout?: string; stdoutTruncated?: boolean; timedOut?: boolean; } export interface PreflightLastResult extends PreflightExecutionResult { scheduledAt: string; } export interface RunPreflightInput { abortSignal?: AbortSignal; agentId: string; animaHome: string; command: string; cwd: string; now?: Date; reminderId?: string; runtimeEnv?: Record; scheduledAt?: string; timeoutMs?: number; } export interface RunPreflightOutput { aborted: boolean; result?: PreflightExecutionResult; } interface RunHostedPreflightInput extends RunPreflightInput { reminderId: string; scheduledAt: string; } interface RunHostedPreflightOutput extends RunPreflightOutput { result?: PreflightLastResult; } export declare function isPreflightRunning(reminderId: string): boolean; export declare function tryBeginPreflight(reminderId: string, kill: () => void): boolean; export declare function endPreflight(reminderId: string): void; export declare function killAllRunningPreflights(): void; /** Test-only: clear concurrency map between cases. */ export declare function resetPreflightConcurrencyForTests(): void; export declare function normalizePreflightTimeoutMs(timeoutMs: number | undefined): number; export declare function validatePreflightCommand(command: string): string; /** * Run a preflight shell command with fixed CWD (Agent Home). * The caller supplies the agent's captured configured/managed runtime env; no * wake-item context is invented. Timeout / abort kill the entire process group. */ export declare function runPreflightCommand(input: RunHostedPreflightInput): Promise; export declare function runPreflightCommand(input: RunPreflightInput): Promise; export interface PreflightEnvironmentOptions { agentId: string; animaHome: string; reminderId?: string; runtimeEnv?: Record; } export declare function buildPreflightEnvironment(options: PreflightEnvironmentOptions): Record; export declare function preflightEvidenceForWake(result: PreflightLastResult): string | undefined; export declare function classifyPreflightAttentionKey(reminderId: string, result: PreflightLastResult): string; export declare function killProcessGroup(pid: number | undefined): void; export {}; //# sourceMappingURL=preflight.d.ts.map