/**
 * Lifecycle management for a GoodVibes runtime host.
 *
 * Handles ordered teardown: persist session, fire lifecycle hooks,
 * stop background managers. Terminal teardown remains in main.ts.
 */
import type { HookDispatcher } from '../hooks/index.js';
import type { ScheduleManager } from '../tools/workflow/index.js';
import type { ProviderRegistry } from '../providers/registry.js';
export { saveSession } from './session-persistence.js';
import { type SessionPersistenceOptions, type SessionSnapshot } from './session-persistence.js';
import type { CrossSessionTaskRegistry } from '../sessions/orchestration/index.js';
/**
 * Fire the session:start lifecycle hook.
 * Hook failures are logged and do not block startup.
 */
export declare function fireSessionStart(sessionId: string, hookDispatcher: Pick<HookDispatcher, 'fire'> | null): void;
/**
 * Ordered logical shutdown of all background runtime subsystems.
 *
 * Sequence:
 * 1. Persist conversation to sessions store
 * 2. Fire session:end and session:save lifecycle hooks
 * 3. Destroy ScheduleManager (cancels pending scheduled tasks)
 * 4. Stop provider registry file-watcher
 *
 * This function does NOT touch the terminal (alt-screen, raw mode, etc.) —
 * that remains the responsibility of main.ts.
 *
 * @param sessionId  - Active session identifier.
 * @param sessionData - Latest conversation to persist.
 * @param model      - Active model identifier.
 * @param provider   - Active provider identifier.
 * @param title      - Conversation title (may be empty string).
 */
export declare function shutdownRuntime(sessionId: string, sessionData: SessionSnapshot, model: string, provider: string, title?: string, scheduleManager?: ScheduleManager | null, hookDispatcher?: Pick<HookDispatcher, 'fire'> | null, providerRegistry?: Pick<ProviderRegistry, 'stopWatching'> | null, sessionOrchestration?: Pick<CrossSessionTaskRegistry, 'dispose'> | null, persistenceOptions?: SessionPersistenceOptions): Promise<void>;
//# sourceMappingURL=lifecycle.d.ts.map