import type { Logger } from "pino";
import type { AgentPromptInput, AgentRunOptions } from "./agent-sdk-types.js";
import type { AgentManager, ManagedAgent } from "./agent-manager.js";
import type { AgentStorage } from "./agent-storage.js";
export type AgentRunController = Pick<AgentManager, "getAgent" | "tryRunOutOfBand" | "hasInFlightRun" | "replaceAgentRun" | "streamAgent">;
export interface StartAgentRunOptions {
    replaceRunning?: boolean;
    runOptions?: AgentRunOptions;
}
export declare function startAgentRun(agentManager: AgentRunController, agentId: string, prompt: AgentPromptInput, logger: Logger, options?: StartAgentRunOptions): {
    outOfBand: boolean;
};
/**
 * 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>;
/**
 * Wrap a body in <paseo-system>…</paseo-system> so the receiving agent
 * recognizes the prompt as system-injected context — not a user turn.
 * Used by chat mentions, schedule fires, and notify-on-finish.
 */
export declare function formatSystemNotificationPrompt(reason: string): string;
export declare function isSystemInjectedEnvelope(text: string): boolean;
export interface SendPromptToAgentParams {
    agentManager: AgentManager;
    agentStorage: AgentStorage;
    agentId: 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;
    /**
     * Default true. When false, archived agents are skipped instead of being
     * unarchived. Use false for system-injected prompts (chat mentions,
     * schedule fires, notify-on-finish).
     */
    unarchive?: boolean;
    logger: Logger;
}
export interface StartCreatedAgentInitialPromptParams {
    agentManager: AgentManager;
    agentId: string;
    snapshot?: ManagedAgent;
    prompt: AgentPromptInput | null;
    runOptions?: AgentRunOptions;
    logger: Logger;
}
export declare function waitForAgentRunStartWithTimeout(agentManager: AgentManager, agentId: string): Promise<void>;
/**
 * Full send-prompt orchestration: (optional unarchive) → load → (optional
 * mode change) → start run.
 *
 * Every surface that sends a prompt to an agent (Session/WS, MCP, CLI-through-MCP,
 * chat mentions, notify-on-finish) MUST go through this so behavior can never
 * drift between them.
 *
 * When `unarchive` is false and the agent is archived, the call is a silent
 * no-op (returns `{ outOfBand: false }`) — the agent is not run.
 */
export declare function sendPromptToAgent(params: SendPromptToAgentParams): Promise<{
    outOfBand: boolean;
}>;
export declare function startCreatedAgentInitialPrompt(params: StartCreatedAgentInitialPromptParams): Promise<ManagedAgent>;
export interface SetupFinishNotificationParams {
    agentManager: AgentManager;
    agentStorage: AgentStorage;
    childAgentId: string;
    callerAgentId: string;
    logger: Logger;
}
export declare function setupFinishNotification(params: SetupFinishNotificationParams): void;
//# sourceMappingURL=agent-prompt.d.ts.map