Push/event contract
Полный контракт событий: 7 каналов host → Web и 11 каналов Web → host.
6.1. Host → Web — 7
Заголовок раздела «6.1. Host → Web — 7»onDocumentSessionSnapshot: onDocumentSessionSnapshot(callback: (snapshot: ShellDocumentSessionSnapshot) => void): () => void
fastdoc-shell:document-session-snapshotonMenuCommand: onMenuCommand(callback: (command: MenuCommand) => void): () => void
fastdoc-shell:menu-commandonSaveBeforeClose: onSaveBeforeClose(callback: () => void): () => void
fastdoc-shell:save-before-closeonSaveBeforeCloseFailed: onSaveBeforeCloseFailed(callback: (payload: { message: string }) => void): () => void
fastdoc-shell:save-before-close-failedonSaveBeforeDocumentSwitch: onSaveBeforeDocumentSwitch(callback: (request: { requestId: number }) => void): () => void
fastdoc-shell:save-before-document-switchonStateChanged: onStateChanged(callback: (state: ShellBridgeState) => void): () => void
fastdoc-shell:state-changedonSystemPaste: onSystemPaste(callback: (payload: SystemPastePayload) => void): () => void
fastdoc-shell:system-paste6.2. Web → host — 11
Заголовок раздела «6.2. Web → host — 11»completeSaveBeforeClose: completeSaveBeforeClose(payload: { saved: boolean; message?: string | null }): void
fastdoc-shell:save-before-close-resultcompleteSaveBeforeDocumentSwitch: completeSaveBeforeDocumentSwitch(result: { requestId: number; saved: boolean; savedPath: string | null; errorMessage: string | null; }): void
fastdoc-shell:document-switch-save-resultnotifyCanonicalEditDropped: notifyCanonicalEditDropped(payload: { code: string; requestId: string; commandType: string; }): void
fastdoc-shell:canonical-edit-droppednotifyCurrentDocumentTruthViewerReady: notifyCurrentDocumentTruthViewerReady(payload: { availability: string; fixtureId: string | null; blockedStatesVisible: boolean; forbiddenClaimsVisible: boolean; unavailableStateVisible: boolean; genericFixtureListVisible: boolean; }): void
fastdoc-shell:current-document-truth-viewer-readynotifyDocumentRendered: notifyDocumentRendered(renderedPath: string | null): void
fastdoc-shell:document-renderednotifyEditKeyDropped: notifyEditKeyDropped(payload: { code: string; inputType: string; selectionShape: string; inputRoute: string; contextRefusal: string; pressIndex: number; }): void
fastdoc-shell:edit-key-droppednotifyPageHydrationDropped: notifyPageHydrationDropped(payload: { code: string; stage: string }): void
fastdoc-shell:page-hydration-droppednotifyPersistentSaveRefused: notifyPersistentSaveRefused(payload: { code: string; requestId: string; saveAs: boolean; }): void
fastdoc-shell:persistent-save-refusednotifyRendererReady: notifyRendererReady(): void
fastdoc-shell:renderer-readynotifySmokeCheckpoint: notifySmokeCheckpoint(checkpoint: string, payload?: { screenshotDataUrl?: string | null; screenshots?: Array<{ name?: string | null; dataUrl?: string | null }>; telemetry?: unknown; reserveCyclesCompleted?: number; reserveElapsedMs?: number; reserveRichPayloadBytes?: number; }): void
fastdoc-shell:smoke-checkpointnotifyUnsavedState: notifyUnsavedState(hasUnsavedChanges: boolean): void
fastdoc-shell:unsaved-stateListener lifecycle. Каждый on* возвращает unsubscribe () => void; вызывайте при unmount/window teardown.