import type { BeforeAgentStartEvent, ExtensionAPI, ExtensionCommandContext, ExtensionContext } from "@mariozechner/pi-coding-agent"; import { type NonLoopPhaseName, type PhaseDoneInput, type PhaseName, type RalphiContext } from "./types"; export declare class RalphiRuntime { private readonly pi; private readonly phaseRuns; private readonly activePhaseBySession; private readonly loops; private readonly commandContextByRun; private readonly pendingFinalizeRuns; private _suppressEventRestore; private readonly loopController; private readonly loopFinalizer; private readonly phaseController; constructor(pi: ExtensionAPI); private sessionKey; private shortId; private sendUserMessage; private appendRalphiEvent; private sendProgressMessage; private appendLoopAutoCompletionNote; private snapshotState; private rebuildIndexes; private pruneEphemeralState; private configFile; private prdFile; private progressFile; private lastBranchFile; private archiveDir; private readPrdBranchName; private runGit; private isGitRepository; private currentGitBranch; private localBranchExists; private switchToBranch; private createBranchFrom; private hasConfiguredCommands; private precommitRunsRalphiCheck; private validatePrdForLoop; private isTestRuntime; private collectLoopPrerequisiteIssues; private ensureLoopPrerequisites; validateLoopPrerequisites(ctx: ExtensionCommandContext): Promise; private chooseBranchBase; private ensureLoopBranch; private readLastBranchName; private writeLastBranchName; private progressHeader; private archiveSuffixFromBranch; private ensureProgressFileForCurrentPrd; private readConfigYaml; private parseConfigYaml; private loadConfigData; private hasAdvancedReviewControls; private hasReflectionConfig; private reflectionCheckpointInfo; private reflectionCountdownLabel; private renderReflectionPromptBlock; private renderLoopConfigSection; private upsertLoopSection; private readStateFile; private writeStateFile; private newerState; private persistState; private restoreStateFromSession; private currentPhaseRunForSession; private updatePhaseStatusLine; private clearTimingWidget; private updateLoopStatusLine; private deactivateLoop; private finalizeNonLoopRun; private finalizeLoopRun; startPhase(ctx: ExtensionCommandContext, phase: NonLoopPhaseName, args: string): Promise; finalizeRun(ctx: ExtensionCommandContext, runId: string): Promise; runLoopIteration(ctx: ExtensionCommandContext, loopId: string): Promise; startLoop(ctx: ExtensionCommandContext, args: string): Promise; stopLoop(ctx: ExtensionCommandContext, requested: string): Promise; openLoop(ctx: ExtensionCommandContext, requested: string): Promise; openLoopController(ctx: ExtensionCommandContext, requested: string): Promise; showLoopStatus(ctx: ExtensionCommandContext): void; showLoopGuidance(ctx: ExtensionCommandContext): void; setLoopGuidance(ctx: ExtensionCommandContext, args: string): Promise; clearLoopGuidance(ctx: ExtensionCommandContext): void; private runningLoopIterationRuns; private resolveLoopIterationRunAlias; private runNotFoundMessage; private loopReviewControlsForRun; private validateLoopReviewControls; private validateLoopReflectionCheckpointMetadata; private driftCompletionGuidance; markPhaseDone(ctx: ExtensionContext, params: PhaseDoneInput): Promise<{ ok: boolean; text: string; }>; handleTurnEnd(ctx: ExtensionContext): Promise; handleSessionStart(ctx: ExtensionContext): void; handleSessionSwitch(ctx: ExtensionContext): void; handleBeforeTree(event: { preparation: { targetId: string; }; }): { summary: { summary: string; details: unknown; }; } | undefined; handleBeforeCompact(): { cancel: boolean; } | undefined; handleBeforeAgentStart(event: BeforeAgentStartEvent, ctx: ExtensionContext): { systemPrompt: string; } | void; getActivePhaseForSession(ctx: RalphiContext): PhaseName | undefined; phaseKinds(): readonly PhaseName[]; } //# sourceMappingURL=runtime.d.ts.map