import type { AgentMessage } from "@earendil-works/pi-agent-core";
import type { ImageContent, TextContent } from "@earendil-works/pi-ai/compat";
import type { BashResult } from "../bash-executor.ts";
import type { ContextDeletionRequest } from "../compaction/index.ts";
import type { CustomMessage } from "../messages.ts";
import type { BashOperations } from "../tools/bash.ts";
export interface ContextEventResult {
    messages?: AgentMessage[];
}
export type BeforeProviderRequestEventResult = unknown;
export interface ToolCallEventResult {
    /** Block tool execution. To modify arguments, mutate `event.input` in place instead. */
    block?: boolean;
    reason?: string;
}
/** Result from user_bash event handler */
export interface UserBashEventResult {
    /** Custom operations to use for execution */
    operations?: BashOperations;
    /** Full replacement: extension handled execution, use this result */
    result?: BashResult;
}
export interface ToolResultEventResult {
    content?: (TextContent | ImageContent)[];
    details?: unknown;
    isError?: boolean;
}
export interface MessageEndEventResult {
    /** Replace the finalized message. The replacement must keep the original message role. */
    message?: AgentMessage;
}
export interface BeforeAgentStartEventResult {
    message?: Pick<CustomMessage, "customType" | "content" | "display" | "details">;
    /** Replace the system prompt for this turn. If multiple extensions return this, they are chained. */
    systemPrompt?: string;
}
export interface SessionBeforeSwitchResult {
    cancel?: boolean;
}
export interface SessionBeforeForkResult {
    cancel?: boolean;
    skipConversationRestore?: boolean;
}
export interface SessionBeforeCompactResult {
    cancel?: boolean;
    deletionRequest?: ContextDeletionRequest;
}
export interface SessionBeforeTreeResult {
    cancel?: boolean;
    summary?: {
        summary: string;
        details?: unknown;
    };
    /** Override custom instructions for summarization */
    customInstructions?: string;
    /** Override whether customInstructions replaces the default prompt */
    replaceInstructions?: boolean;
    /** Override label to attach to the branch summary entry */
    label?: string;
}
//# sourceMappingURL=event-results.d.ts.map