import { type AgentSessionRuntime } from "@earendil-works/pi-coding-agent"; import type { Entry } from "../types.js"; import { type WorkspaceMutation, type WorkspaceMutationFromToolInput, type WorkspaceMutationPreparation } from "./workspace-undo.js"; export type AppWorkspaceActionsControllerHost = { readonly entries: Entry[]; allEntries?(): readonly Entry[]; runtime(): AgentSessionRuntime | undefined; awaitCurrentSessionExtensions(runtime?: AgentSessionRuntime): Promise; findUserEntry(entryId: string): Extract | undefined; touchEntry(entry: Entry): void; resetSessionView(): void; loadSessionHistory(): void; addEntry(entry: Entry): void; setInput(value: string): void; getInput(): string; setStatus(status: string): void; setSessionStatus(session: AgentSessionRuntime["session"] | undefined): void; showToast(message: string, kind: "success" | "error" | "warning" | "info"): void; render(): void; isRunning(): boolean; forkSessionEntryInNewTab(sessionEntryId: string): Promise; }; export declare class AppWorkspaceActionsController { private readonly host; private readonly workspaceUndoIndex; constructor(host: AppWorkspaceActionsControllerHost); prepareWorkspaceMutation(toolName: string, args: unknown): WorkspaceMutationPreparation | undefined; workspaceMutationFromToolExecution(input: Omit): WorkspaceMutation | undefined; recordWorkspaceMutationForUserEntry(entryId: string, mutation: WorkspaceMutation): void; scheduleUserSessionEntryMetadataSync(): void; syncUserSessionEntryMetadata(): void; copyUserMessage(entryId: string): Promise; forkFromUserMessage(entryId: string): Promise; forkFromUserMessageInNewTab(entryId: string): Promise; undoChangesFromUserMessage(entryId: string): Promise; private isRuntimeActive; private isSessionActive; private workspaceMutationPlanFromSessionEntry; private workspaceMutationPlanForSingleEntry; private findUserEntryBySessionEntryId; private resolveUserSessionEntryId; private getIdleRuntimeForAction; private workspaceMutationsForSessionEntry; private hasWorkspaceMutationsForSessionEntry; private persistWorkspaceMutations; private workspaceUndoIndexKey; }