import { z } from "zod";
import type { Logger } from "pino";
import type { AgentPromptInput, AgentPermissionRequest, AgentRunOptions } 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";
import type { AgentProvider } from "./agent-sdk-types.js";
export declare const AgentProviderEnum: z.ZodString;
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>;
    icon: z.ZodOptional<z.ZodString>;
    colorTier: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    id: string;
    label: string;
    description?: string | undefined;
    icon?: string | undefined;
    colorTier?: string | undefined;
}, {
    id: string;
    label: string;
    description?: string | undefined;
    icon?: string | undefined;
    colorTier?: 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>;
        icon: z.ZodOptional<z.ZodString>;
        colorTier: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        id: string;
        label: string;
        description?: string | undefined;
        icon?: string | undefined;
        colorTier?: string | undefined;
    }, {
        id: string;
        label: string;
        description?: string | undefined;
        icon?: string | undefined;
        colorTier?: string | undefined;
    }>, "many">;
}, "strip", z.ZodTypeAny, {
    id: string;
    label: string;
    modes: {
        id: string;
        label: string;
        description?: string | undefined;
        icon?: string | undefined;
        colorTier?: string | undefined;
    }[];
}, {
    id: string;
    label: string;
    modes: {
        id: string;
        label: string;
        description?: string | undefined;
        icon?: string | undefined;
        colorTier?: 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;
    description?: string | undefined;
    metadata?: Record<string, unknown> | undefined;
    isDefault?: boolean | undefined;
}, {
    id: string;
    label: string;
    description?: string | undefined;
    metadata?: Record<string, unknown> | 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;
        description?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
        isDefault?: boolean | undefined;
    }, {
        id: string;
        label: string;
        description?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
        isDefault?: boolean | undefined;
    }>, "many">>;
    defaultThinkingOptionId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    id: string;
    label: string;
    provider: string;
    description?: string | undefined;
    metadata?: Record<string, unknown> | undefined;
    isDefault?: boolean | undefined;
    thinkingOptions?: {
        id: string;
        label: string;
        description?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
        isDefault?: boolean | undefined;
    }[] | undefined;
    defaultThinkingOptionId?: string | undefined;
}, {
    id: string;
    label: string;
    provider: string;
    description?: string | undefined;
    metadata?: Record<string, unknown> | undefined;
    isDefault?: boolean | undefined;
    thinkingOptions?: {
        id: string;
        label: string;
        description?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
        isDefault?: boolean | undefined;
    }[] | undefined;
    defaultThinkingOptionId?: string | undefined;
}>;
export declare const AGENT_WAIT_TIMEOUT_MS = 30000;
export interface ResolvedProviderModel {
    provider: AgentProvider;
    model: string | undefined;
}
export declare function resolveProviderAndModel(params: {
    provider?: string;
    model?: string;
    defaultProvider: AgentProvider;
}): ResolvedProviderModel;
export type StartAgentRunOptions = {
    replaceRunning?: boolean;
    runOptions?: AgentRunOptions;
};
/**
 * 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;
/**
 * Clear the archived flag from a stored agent record.
 * Shared across Session (app/WS), MCP, and CLI so every surface that acts on
 * an archived agent unarchives it the same way.
 */
export declare function unarchiveAgentState(agentStorage: AgentStorage, agentManager: AgentManager, agentId: string): Promise<boolean>;
export interface SendPromptToAgentParams {
    agentManager: AgentManager;
    agentStorage: AgentStorage;
    agentId: string;
    /** Raw user text to record in the timeline. */
    userMessageText: string;
    /** Prompt to dispatch to the provider (may include image blocks or wrapped text). */
    prompt: AgentPromptInput;
    messageId?: string;
    runOptions?: AgentRunOptions;
    /** Optional mode to set on the agent before the run starts. */
    sessionMode?: string;
    logger: Logger;
}
/**
 * Full send-prompt orchestration: unarchive → load → (optional mode change) →
 * record user message → start run.
 *
 * Every surface that sends a prompt to an agent (Session/WS, MCP, CLI-through-MCP)
 * MUST go through this so behavior can never drift between them.
 */
export declare function sendPromptToAgent(params: SendPromptToAgentParams): Promise<void>;
interface SetupFinishNotificationParams {
    agentManager: AgentManager;
    agentStorage: AgentStorage;
    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<{
    title: string | null;
    id: string;
    status: "error" | "initializing" | "idle" | "running" | "closed";
    cwd: string;
    provider: string;
    model: string | null;
    persistence: import("./agent-sdk-types.js").AgentPersistenceHandle | null;
    availableModes: import("./agent-sdk-types.js").AgentMode[];
    updatedAt: string;
    capabilities: import("./agent-sdk-types.js").AgentCapabilityFlags;
    createdAt: string;
    lastUserMessageAt: string | null;
    labels: Record<string, string>;
    currentModeId: string | null;
    pendingPermissions: AgentPermissionRequest[];
    thinkingOptionId?: string | null | undefined;
    runtimeInfo?: import("./agent-sdk-types.js").AgentRuntimeInfo | undefined;
    features?: ({
        id: string;
        label: string;
        value: boolean;
        type: "toggle";
        description?: string | undefined;
        icon?: string | undefined;
        tooltip?: string | undefined;
    } | {
        id: string;
        label: string;
        value: string | null;
        options: {
            id: string;
            label: string;
            description?: string | undefined;
            metadata?: Record<string, unknown> | undefined;
            isDefault?: boolean | undefined;
        }[];
        type: "select";
        description?: string | undefined;
        icon?: string | undefined;
        tooltip?: string | undefined;
    })[] | undefined;
    requiresAttention?: boolean | undefined;
    attentionReason?: "finished" | "error" | "permission" | null | undefined;
    attentionTimestamp?: string | null | undefined;
    archivedAt?: string | null | undefined;
    effectiveThinkingOptionId?: string | null | undefined;
    lastUsage?: import("./agent-sdk-types.js").AgentUsage | undefined;
    lastError?: string | undefined;
}>;
export declare function parseDurationString(input: string): number;
export declare function toScheduleSummary(schedule: z.infer<typeof StoredScheduleSchema>): {
    name: string | null;
    id: string;
    status: "completed" | "active" | "paused";
    prompt: string;
    updatedAt: string;
    createdAt: string;
    cadence: {
        type: "every";
        everyMs: number;
    } | {
        type: "cron";
        expression: string;
    };
    target: {
        agentId: string;
        type: "agent";
    } | {
        type: "new-agent";
        config: {
            cwd: string;
            provider: string;
            title?: string | null | undefined;
            systemPrompt?: string | undefined;
            modeId?: string | undefined;
            model?: string | undefined;
            thinkingOptionId?: string | undefined;
            approvalPolicy?: string | undefined;
            sandboxMode?: string | undefined;
            networkAccess?: boolean | undefined;
            webSearch?: boolean | undefined;
            extra?: {
                claude?: Record<string, unknown> | undefined;
                codex?: Record<string, unknown> | undefined;
            } | 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