import { z } from "zod";
import type { Logger } from "pino";
import type { AgentPromptInput, AgentPermissionRequest } from "./agent-sdk-types.js";
import type { AgentManager, ManagedAgent, WaitForAgentResult } from "./agent-manager.js";
import type { AgentStorage } from "./agent-storage.js";
import { StoredScheduleSchema } from "../schedule/types.js";
export declare const AgentProviderEnum: z.ZodEnum<[string, ...string[]]>;
export declare const AgentStatusEnum: z.ZodEnum<["initializing", "idle", "running", "error", "closed"]>;
export declare const ProviderModeSchema: z.ZodObject<{
    id: z.ZodString;
    label: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    id: string;
    label: string;
    description?: string | undefined;
}, {
    id: string;
    label: string;
    description?: string | undefined;
}>;
export declare const ProviderSummarySchema: z.ZodObject<{
    id: z.ZodString;
    label: z.ZodString;
    modes: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        id: string;
        label: string;
        description?: string | undefined;
    }, {
        id: string;
        label: string;
        description?: string | undefined;
    }>, "many">;
}, "strip", z.ZodTypeAny, {
    id: string;
    label: string;
    modes: {
        id: string;
        label: string;
        description?: string | undefined;
    }[];
}, {
    id: string;
    label: string;
    modes: {
        id: string;
        label: string;
        description?: string | undefined;
    }[];
}>;
export declare const AgentSelectOptionSchema: z.ZodObject<{
    id: z.ZodString;
    label: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    isDefault: z.ZodOptional<z.ZodBoolean>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
    id: string;
    label: string;
    metadata?: Record<string, unknown> | undefined;
    description?: string | undefined;
    isDefault?: boolean | undefined;
}, {
    id: string;
    label: string;
    metadata?: Record<string, unknown> | undefined;
    description?: string | undefined;
    isDefault?: boolean | undefined;
}>;
export declare const AgentModelSchema: z.ZodObject<{
    provider: z.ZodString;
    id: z.ZodString;
    label: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    isDefault: z.ZodOptional<z.ZodBoolean>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    thinkingOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        isDefault: z.ZodOptional<z.ZodBoolean>;
        metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, "strip", z.ZodTypeAny, {
        id: string;
        label: string;
        metadata?: Record<string, unknown> | undefined;
        description?: string | undefined;
        isDefault?: boolean | undefined;
    }, {
        id: string;
        label: string;
        metadata?: Record<string, unknown> | undefined;
        description?: string | undefined;
        isDefault?: boolean | undefined;
    }>, "many">>;
    defaultThinkingOptionId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    id: string;
    provider: string;
    label: string;
    metadata?: Record<string, unknown> | undefined;
    description?: string | undefined;
    isDefault?: boolean | undefined;
    thinkingOptions?: {
        id: string;
        label: string;
        metadata?: Record<string, unknown> | undefined;
        description?: string | undefined;
        isDefault?: boolean | undefined;
    }[] | undefined;
    defaultThinkingOptionId?: string | undefined;
}, {
    id: string;
    provider: string;
    label: string;
    metadata?: Record<string, unknown> | undefined;
    description?: string | undefined;
    isDefault?: boolean | undefined;
    thinkingOptions?: {
        id: string;
        label: string;
        metadata?: Record<string, unknown> | undefined;
        description?: string | undefined;
        isDefault?: boolean | undefined;
    }[] | undefined;
    defaultThinkingOptionId?: string | undefined;
}>;
export declare const AGENT_WAIT_TIMEOUT_MS = 30000;
export type StartAgentRunOptions = {
    replaceRunning?: boolean;
};
/**
 * Wraps agentManager.waitForAgentEvent with a self-imposed timeout.
 * Returns a friendly message when timeout occurs, rather than letting
 * the SDK tool timeout trigger a generic "tool failed" error.
 */
export declare function waitForAgentWithTimeout(agentManager: AgentManager, agentId: string, options?: {
    signal?: AbortSignal;
    waitForActive?: boolean;
}): Promise<WaitForAgentResult>;
export declare function startAgentRun(agentManager: AgentManager, agentId: string, prompt: AgentPromptInput, logger: Logger, options?: StartAgentRunOptions): void;
interface SetupFinishNotificationParams {
    agentManager: AgentManager;
    childAgentId: string;
    callerAgentId: string;
    logger: Logger;
}
export declare function setupFinishNotification(params: SetupFinishNotificationParams): void;
export declare function sanitizePermissionRequest(permission: AgentPermissionRequest | null | undefined): AgentPermissionRequest | null;
export declare function resolveAgentTitle(agentStorage: AgentStorage, agentId: string, logger: Logger): Promise<string | null>;
export declare function serializeSnapshotWithMetadata(agentStorage: AgentStorage, snapshot: ManagedAgent, logger: Logger): Promise<{
    status: "error" | "idle" | "initializing" | "running" | "closed";
    id: string;
    title: string | null;
    provider: string;
    cwd: string;
    model: string | null;
    createdAt: string;
    updatedAt: string;
    lastUserMessageAt: string | null;
    capabilities: import("./agent-sdk-types.js").AgentCapabilityFlags;
    currentModeId: string | null;
    availableModes: import("./agent-sdk-types.js").AgentMode[];
    pendingPermissions: AgentPermissionRequest[];
    persistence: import("./agent-sdk-types.js").AgentPersistenceHandle | null;
    labels: Record<string, string>;
    features?: ({
        value: boolean;
        type: "toggle";
        id: string;
        label: string;
        description?: string | undefined;
        tooltip?: string | undefined;
        icon?: string | undefined;
    } | {
        value: string | null;
        options: {
            id: string;
            label: string;
            metadata?: Record<string, unknown> | undefined;
            description?: string | undefined;
            isDefault?: boolean | undefined;
        }[];
        type: "select";
        id: string;
        label: string;
        description?: string | undefined;
        tooltip?: string | undefined;
        icon?: string | undefined;
    })[] | undefined;
    thinkingOptionId?: string | null | undefined;
    effectiveThinkingOptionId?: string | null | undefined;
    runtimeInfo?: import("./agent-sdk-types.js").AgentRuntimeInfo | undefined;
    lastUsage?: import("./agent-sdk-types.js").AgentUsage | undefined;
    lastError?: string | undefined;
    requiresAttention?: boolean | undefined;
    attentionReason?: "error" | "finished" | "permission" | null | undefined;
    attentionTimestamp?: string | null | undefined;
    archivedAt?: string | null | undefined;
}>;
export declare function parseDurationString(input: string): number;
export declare function toScheduleSummary(schedule: z.infer<typeof StoredScheduleSchema>): {
    name: string | null;
    status: "active" | "paused" | "completed";
    id: string;
    createdAt: string;
    updatedAt: string;
    prompt: string;
    cadence: {
        type: "every";
        everyMs: number;
    } | {
        type: "cron";
        expression: string;
    };
    target: {
        type: "agent";
        agentId: string;
    } | {
        type: "new-agent";
        config: {
            provider: string;
            cwd: string;
            title?: string | null | undefined;
            model?: string | undefined;
            thinkingOptionId?: string | undefined;
            modeId?: string | undefined;
            approvalPolicy?: string | undefined;
            sandboxMode?: string | undefined;
            networkAccess?: boolean | undefined;
            webSearch?: boolean | undefined;
            extra?: {
                codex?: Record<string, unknown> | undefined;
                claude?: Record<string, unknown> | undefined;
            } | undefined;
            systemPrompt?: string | undefined;
            mcpServers?: Record<string, unknown> | undefined;
        };
    };
    nextRunAt: string | null;
    lastRunAt: string | null;
    pausedAt: string | null;
    expiresAt: string | null;
    maxRuns: number | null;
};
export {};
//# sourceMappingURL=mcp-shared.d.ts.map