import type { ExtensionAPI, Theme } from "@earendil-works/pi-coding-agent"; import type { AgentStepContract, AgentStepPresentation, AgentStepSubmission } from "../workflows/types.js"; import { type MessageCardView } from "./message-card.js"; export declare const WORKFLOW_AGENT_STEP_MESSAGE_TYPE = "pi-workflows-step"; export declare const WORKFLOW_AGENT_STEP_MESSAGE_SCHEMA = "pi-workflows.agent-step-message.v1"; type PromptDeliveryReason = "initial" | "resumed" | "reminder"; export type WorkflowAgentStepMessageDetails = { schema: typeof WORKFLOW_AGENT_STEP_MESSAGE_SCHEMA; kind: "step"; reason: PromptDeliveryReason; contract: AgentStepContract; presentation?: AgentStepPresentation; requestId: string; workflowMessageId: string; }; type WorkflowAgentStepMessage = { content: unknown; details?: unknown; }; type WorkflowAgentStepView = MessageCardView; export declare function registerWorkflowAgentStepMessageRenderer(pi: ExtensionAPI): void; /** Build renderer text without depending on Pi's session or TUI state. */ export declare function buildWorkflowAgentStepView(message: WorkflowAgentStepMessage, expanded: boolean, theme?: Pick): WorkflowAgentStepView; /** * Adopt an already visible response for the same assistant-output attempt. * This is used only when an interrupted run resumes in its origin session. */ export declare function recoverAssistantStep(entries: readonly unknown[], contract: AgentStepContract): AgentStepSubmission | undefined; /** Extract the exact visible text blocks from one finalized assistant message. */ export declare function visibleAssistantText(message: unknown, maxChars?: number): string; export {};