/** * One-shot data migrations and init-time recovery operations. * * Each function runs at most once per project directory (sentinel-file guard) * and is fire-and-forget from the plugin composition root — a failure never * blocks plugin initialisation. * * @module one-shot-migrations */ import type { OpenCodeClient } from "./shared/session-api.js"; /** * Remove the legacy `.hivemind/event-tracker/` directory if it still exists. * * Guarded by a sentinel file so it runs at most once per project directory. * Failures are logged but never thrown — this is best-effort cleanup. * * @param projectDirectory - Absolute path to the project root. * @param client - OpenCode SDK client for TUI logging (may be partial). */ export declare function migrateLegacyEventTracker(projectDirectory: string, client: OpenCodeClient): void; /** * Remove legacy `.hivemind/state/delegations.json` and `session-continuity.json` * files that were replaced by the session-tracker subsystem. * * Guarded by a sentinel file so it runs at most once per project directory. * Failures are logged but never thrown — this is best-effort cleanup. * * @param projectDirectory - Absolute path to the project root. * @param client - OpenCode SDK client for TUI logging (may be partial). */ export declare function migrateLegacyDelegationsJson(projectDirectory: string, client: OpenCodeClient): void; /** * Drain pending delegation notifications from ALL continuity records * and replay them into the TUI via appendTuiPrompt. Called at plugin init * to recover notifications that were queued while the parent session was ended. * * Best-effort: failures during replay are silently ignored — the continuity * array is cleared regardless to prevent duplicate replay on next init. * * Double-notification prevention: the lifecycle handler already calls * patchSessionContinuity(sessionID, { pendingNotifications: [] }) during * session.created/session.updated events. The init-time drain also clears * after replay. Since both use patchSessionContinuity to write and * listSessionContinuity to read fresh data each time, whichever runs first * clears the array and the other sees empty. No duplicate notifications. * * @param client - OpenCode SDK client for TUI operations. * @param projectDirectory - Absolute path to the project root (optional). */ export declare function replayPendingDelegationNotifications(client: OpenCodeClient, projectDirectory?: string): Promise; //# sourceMappingURL=one-shot-migrations.d.ts.map