import { Editor } from '../../core/Editor.js';
import { StoryRuntime } from './story-types.js';
/**
 * Register the currently active editor for a story session.
 *
 * Returns a cleanup callback that only unregisters the session if the same
 * editor is still registered for that story key.
 */
export declare function registerLiveStorySessionRuntime(hostEditor: Editor, runtime: StoryRuntime, editor: Editor): () => void;
/**
 * Resolve the interactive runtime for a story session, if one is active.
 */
export declare function resolveLiveStorySessionRuntime(hostEditor: Editor, storyKey: string): StoryRuntime | null;
/**
 * Commits all currently active live story sessions for a host editor.
 *
 * Export paths operate on the host editor's canonical converter / OOXML
 * state. When a user is mid-edit in a hidden-host story session, that live
 * editor may contain newer content than the converter cache. Flush the
 * registered session editors first so host-level exports include those edits
 * without requiring the UI session to exit.
 *
 * @returns The number of live sessions that were committed.
 */
export declare function commitLiveStorySessionRuntimes(hostEditor: Editor): number;
/**
 * Remove a registered interactive runtime.
 *
 * When `editor` is provided, the registration is removed only if it still
 * points to that editor. This prevents a stale disposer from clearing a
 * newer activation for the same story.
 */
export declare function unregisterLiveStorySessionRuntime(hostEditor: Editor, storyKey: string, editor?: Editor): void;
/**
 * Visible for tests.
 */
export declare function getLiveStorySessionCount(hostEditor: Editor): number;
//# sourceMappingURL=live-story-session-runtime-registry.d.ts.map