@hachej/boring-workspace 0.1.70 → 0.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FileTree-B_fRS4Om.js → FileTree-C8JPlZtS.js} +1 -1
- package/dist/{MarkdownEditor-C55gVDyW.js → MarkdownEditor-B9wN6tGH.js} +14 -14
- package/dist/{WorkspaceLoadingState-D3i4X-eH.js → WorkspaceLoadingState-TgOWTNJC.js} +350 -203
- package/dist/{WorkspaceProvider-Ddx7GByq.js → WorkspaceProvider-DcOiZU24.js} +9 -9
- package/dist/app-front.d.ts +2 -883
- package/dist/app-front.js +1049 -1033
- package/dist/app-server.d.ts +4 -4
- package/dist/bridge-client.d.ts +2 -2
- package/dist/charts.d.ts +2 -119
- package/dist/plugin.d.ts +3 -3
- package/dist/{runtimeEnv-CU-c4kaV.d.ts → runtimeEnv-DKtVLBXo.d.ts} +2 -2
- package/dist/server.d.ts +6 -6
- package/dist/shared.d.ts +3 -3
- package/dist/src/__tests__/WorkspaceProvider.test.d.ts +1 -0
- package/dist/src/__tests__/exploration.property.test.d.ts +1 -0
- package/dist/src/__tests__/plugin-integration.test.d.ts +1 -0
- package/dist/src/__tests__/public-api.test.d.ts +1 -0
- package/dist/src/__tests__/publicFileStateApi.test.d.ts +1 -0
- package/dist/src/__tests__/theme-system.test.d.ts +1 -0
- package/dist/src/app/front/CloseLeftPaneOnAttention.d.ts +10 -0
- package/dist/src/app/front/PluginAppLeftHost.d.ts +18 -0
- package/dist/src/app/front/WorkspaceAgentFront.d.ts +174 -0
- package/dist/src/app/front/WorkspaceAgentStatusStates.d.ts +5 -0
- package/dist/src/app/front/WorkspaceBackgroundBoot.d.ts +10 -0
- package/dist/src/app/front/WorkspaceBootGate.d.ts +12 -0
- package/dist/src/app/front/WorkspaceFullPagePanel.d.ts +5 -0
- package/dist/src/app/front/WorkspaceShellCapabilitiesHost.d.ts +20 -0
- package/dist/src/app/front/WorkspaceUiStateSync.d.ts +9 -0
- package/dist/src/app/front/__tests__/WorkspaceAgentFront.test.d.ts +1 -0
- package/dist/src/app/front/__tests__/WorkspaceBackgroundBoot.test.d.ts +1 -0
- package/dist/src/app/front/__tests__/WorkspaceBootGate.test.d.ts +1 -0
- package/dist/src/app/front/__tests__/WorkspaceFullPagePanel.test.d.ts +1 -0
- package/dist/src/app/front/__tests__/chatPaneState.property.test.d.ts +1 -0
- package/dist/src/app/front/__tests__/useWorkspaceShellCapabilitiesController.test.d.ts +1 -0
- package/dist/src/app/front/__tests__/workspacePreload.test.d.ts +1 -0
- package/dist/src/app/front/chatPaneState.d.ts +8 -0
- package/dist/src/app/front/fullPageRoute.d.ts +10 -0
- package/dist/src/app/front/fullPageRouteErrors.d.ts +7 -0
- package/dist/src/app/front/index.d.ts +8 -0
- package/dist/src/app/front/localStorageSessions.d.ts +18 -0
- package/dist/src/app/front/useWorkspaceShellCapabilitiesController.d.ts +8 -0
- package/dist/src/app/front/workspaceBuiltinPlugins.d.ts +6 -0
- package/dist/src/app/front/workspacePreload.d.ts +64 -0
- package/dist/src/bridge-client/__tests__/client.test.d.ts +1 -0
- package/dist/src/bridge-client/index.d.ts +65 -0
- package/dist/src/front/agentPlugins/__tests__/registerAgentPlugin.test.d.ts +1 -0
- package/dist/src/front/agentPlugins/registerAgentPlugin.d.ts +26 -0
- package/dist/src/front/agentPlugins/reloadEvent.d.ts +7 -0
- package/dist/src/front/attention/WorkspaceAttentionProvider.d.ts +71 -0
- package/dist/src/front/attention/__tests__/WorkspaceAttentionProvider.test.d.ts +1 -0
- package/dist/src/front/attention/index.d.ts +2 -0
- package/dist/src/front/bridge/WorkspaceLink.d.ts +35 -0
- package/dist/src/front/bridge/__tests__/WorkspaceLink.test.d.ts +1 -0
- package/dist/src/front/bridge/__tests__/bridge.property.test.d.ts +1 -0
- package/dist/src/front/bridge/__tests__/bridge.test.d.ts +1 -0
- package/dist/src/front/bridge/__tests__/client.test.d.ts +1 -0
- package/dist/src/front/bridge/__tests__/uiCommandDispatcher.test.d.ts +1 -0
- package/dist/src/front/bridge/__tests__/uiCommandStream.test.d.ts +1 -0
- package/dist/src/front/bridge/client.d.ts +33 -0
- package/dist/src/front/bridge/createBridge.d.ts +8 -0
- package/dist/src/front/bridge/index.d.ts +12 -0
- package/dist/src/front/bridge/types.d.ts +92 -0
- package/dist/src/front/bridge/uiCommandBus.d.ts +3 -0
- package/dist/src/front/bridge/uiCommandDispatcher.d.ts +44 -0
- package/dist/src/front/bridge/uiCommandStream.d.ts +41 -0
- package/dist/src/front/bridge/validation.d.ts +66 -0
- package/dist/src/front/charts/__tests__/charts.test.d.ts +1 -0
- package/dist/src/front/charts/index.d.ts +92 -0
- package/dist/src/front/chrome/artifact-surface/ArtifactSurfacePane.d.ts +18 -0
- package/dist/src/front/chrome/artifact-surface/SurfaceShell.d.ts +84 -0
- package/dist/src/front/chrome/artifact-surface/__tests__/ArtifactSurfacePane.persistence.test.d.ts +1 -0
- package/dist/src/front/chrome/artifact-surface/__tests__/ArtifactSurfacePane.test.d.ts +1 -0
- package/dist/src/front/chrome/artifact-surface/__tests__/SurfaceShell.test.d.ts +1 -0
- package/dist/src/front/chrome/artifact-surface/__tests__/resolvePanelForPath.test.d.ts +1 -0
- package/dist/src/front/chrome/artifact-surface/definition.d.ts +12 -0
- package/dist/src/front/chrome/artifact-surface/surfaceShellHelpers.d.ts +10 -0
- package/dist/src/front/chrome/chat/ChatPanelHost.d.ts +16 -0
- package/dist/src/front/chrome/chat/DetachedChatPopover.d.ts +11 -0
- package/dist/src/front/chrome/chat/__tests__/ChatPanelHost.test.d.ts +1 -0
- package/dist/src/front/chrome/chat/composerStop.d.ts +19 -0
- package/dist/src/front/chrome/chat/definition.d.ts +16 -0
- package/dist/src/front/chrome/chat/types.d.ts +30 -0
- package/dist/src/front/chrome/empty-pane/EmptyPane.d.ts +5 -0
- package/dist/src/front/chrome/empty-pane/__tests__/EmptyPane.test.d.ts +1 -0
- package/dist/src/front/chrome/management/ManagementOverlaySurface.d.ts +16 -0
- package/dist/src/front/chrome/plugins/PluginsOverlay.d.ts +16 -0
- package/dist/src/front/chrome/session-list/SessionBrowser.d.ts +20 -0
- package/dist/src/front/chrome/session-list/__tests__/SessionBrowser.test.d.ts +1 -0
- package/dist/src/front/chrome/session-list/definition.d.ts +28 -0
- package/dist/src/front/chrome/skills/SkillsPage.d.ts +11 -0
- package/dist/src/front/chrome/skills/definition.d.ts +3 -0
- package/dist/src/front/chrome/workbench-left/WorkbenchLeftPane.d.ts +28 -0
- package/dist/src/front/chrome/workbench-left/__tests__/WorkbenchLeftPane.test.d.ts +1 -0
- package/dist/src/front/chrome/workbench-left/definition.d.ts +12 -0
- package/dist/src/front/chrome/workbench-left/useWorkspaceLeftPaneActions.d.ts +48 -0
- package/dist/src/front/components/CommandPalette.d.ts +21 -0
- package/dist/src/front/components/ControlTooltip.d.ts +12 -0
- package/dist/src/front/components/ErrorChip.d.ts +6 -0
- package/dist/src/front/components/PanelErrorBoundary.d.ts +22 -0
- package/dist/src/front/components/SessionList.d.ts +15 -0
- package/dist/src/front/components/WorkspaceLoadingState.d.ts +8 -0
- package/dist/src/front/components/__tests__/CommandPalette.test.d.ts +1 -0
- package/dist/src/front/components/__tests__/PanelErrorBoundary.test.d.ts +1 -0
- package/dist/src/front/components/__tests__/SessionList.test.d.ts +1 -0
- package/dist/src/front/components/__tests__/WorkspaceLoadingState.test.d.ts +1 -0
- package/dist/src/front/components/commandPaletteHelpers.d.ts +16 -0
- package/dist/src/front/components/recent/__tests__/migrate.test.d.ts +1 -0
- package/dist/src/front/components/recent/__tests__/recentStore.test.d.ts +1 -0
- package/dist/src/front/components/recent/index.d.ts +2 -0
- package/dist/src/front/components/recent/recentStore.d.ts +9 -0
- package/dist/src/front/components/recent/types.d.ts +23 -0
- package/dist/src/front/components/useCommandPaletteCatalogSearch.d.ts +7 -0
- package/dist/src/front/components/useCommandPaletteChrome.d.ts +14 -0
- package/dist/src/front/components/useCommandPaletteSelection.d.ts +15 -0
- package/dist/src/front/detached/DetachedPanelPopover.d.ts +2 -0
- package/dist/src/front/detached/detachedPanelTypes.d.ts +21 -0
- package/dist/src/front/detached/useDetachedPanelPosition.d.ts +10 -0
- package/dist/src/front/dock/DockviewShell.d.ts +6 -0
- package/dist/src/front/dock/PanelChrome.d.ts +16 -0
- package/dist/src/front/dock/ShadcnTab.d.ts +2 -0
- package/dist/src/front/dock/__tests__/dock.test.d.ts +1 -0
- package/dist/src/front/dock/index.d.ts +3 -0
- package/dist/src/front/dock/types.d.ts +69 -0
- package/dist/src/front/events/__tests__/agentBridge.test.d.ts +1 -0
- package/dist/src/front/events/__tests__/bus.test.d.ts +1 -0
- package/dist/src/front/events/__tests__/types.test.d.ts +1 -0
- package/dist/src/front/events/__tests__/useEvent.test.d.ts +1 -0
- package/dist/src/front/events/agentBridge.d.ts +1 -0
- package/dist/src/front/events/bus.d.ts +21 -0
- package/dist/src/front/events/index.d.ts +7 -0
- package/dist/src/front/events/types.d.ts +137 -0
- package/dist/src/front/events/useEvent.d.ts +7 -0
- package/dist/src/front/fullPage.d.ts +24 -0
- package/dist/src/front/hooks/__tests__/useArtifactPanels.test.d.ts +1 -0
- package/dist/src/front/hooks/__tests__/useArtifactRouting.test.d.ts +1 -0
- package/dist/src/front/hooks/__tests__/useEditorLifecycle.test.d.ts +1 -0
- package/dist/src/front/hooks/__tests__/useKeyboardShortcuts.test.d.ts +1 -0
- package/dist/src/front/hooks/__tests__/useViewportBreakpoint.test.d.ts +1 -0
- package/dist/src/front/hooks/index.d.ts +6 -0
- package/dist/src/front/hooks/useArtifactPanels.d.ts +14 -0
- package/dist/src/front/hooks/useArtifactRouting.d.ts +12 -0
- package/dist/src/front/hooks/useEditorLifecycle.d.ts +27 -0
- package/dist/src/front/hooks/useKeyboardShortcuts.d.ts +13 -0
- package/dist/src/front/hooks/useResponsiveSidebarCollapse.d.ts +6 -0
- package/dist/src/front/hooks/useViewportBreakpoint.d.ts +1 -0
- package/dist/src/front/layout/ChatLayout.d.ts +4 -0
- package/dist/src/front/layout/ChatPaneStage.d.ts +59 -0
- package/dist/src/front/layout/ChatPaneStageDock.d.ts +5 -0
- package/dist/src/front/layout/IdeLayout.d.ts +4 -0
- package/dist/src/front/layout/ResponsiveDockviewShell.d.ts +6 -0
- package/dist/src/front/layout/ThemeToggle.d.ts +10 -0
- package/dist/src/front/layout/TopBar.d.ts +17 -0
- package/dist/src/front/layout/__tests__/ChatPaneStageDock.test.d.ts +1 -0
- package/dist/src/front/layout/__tests__/TopBar.test.d.ts +1 -0
- package/dist/src/front/layout/__tests__/presets.test.d.ts +1 -0
- package/dist/src/front/layout/cornerChrome.d.ts +10 -0
- package/dist/src/front/layout/index.d.ts +9 -0
- package/dist/src/front/layout/mobileShell.d.ts +18 -0
- package/dist/src/front/layout/paneCollapseButton.d.ts +15 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftOverlayChromeContext.d.ts +1 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftPane.d.ts +75 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftPaneActions.d.ts +13 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftPaneHeader.d.ts +7 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftPaneProjects.d.ts +18 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftPaneSections.d.ts +6 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftPaneSessionRow.d.ts +18 -0
- package/dist/src/front/layout/plugin-tabs/PluginTabsWorkspaceShell.d.ts +15 -0
- package/dist/src/front/layout/plugin-tabs/__tests__/AppLeftPane.test.d.ts +1 -0
- package/dist/src/front/layout/types.d.ts +40 -0
- package/dist/src/front/layout/useViewportWidth.d.ts +1 -0
- package/dist/src/front/lib/utils.d.ts +2 -0
- package/dist/src/front/lib/utils.test.d.ts +1 -0
- package/dist/src/front/lib/validation.d.ts +189 -0
- package/dist/src/front/plugin/PluginErrorBoundary.d.ts +21 -0
- package/dist/src/front/plugin/PluginErrorContext.d.ts +19 -0
- package/dist/src/front/plugin/PluginInspector.d.ts +8 -0
- package/dist/src/front/plugin/__tests__/CatalogRegistry.test.d.ts +1 -0
- package/dist/src/front/plugin/__tests__/PluginErrorBoundary.test.d.ts +1 -0
- package/dist/src/front/plugin/__tests__/PluginInspector.test.d.ts +1 -0
- package/dist/src/front/plugin/__tests__/useWorkspacePluginClient.test.d.ts +1 -0
- package/dist/src/front/plugin/index.d.ts +10 -0
- package/dist/src/front/plugin/useActivePanels.d.ts +2 -0
- package/dist/src/front/plugin/useCatalogs.d.ts +2 -0
- package/dist/src/front/plugin/useCommands.d.ts +2 -0
- package/dist/src/front/plugin/useWorkspacePluginClient.d.ts +29 -0
- package/dist/src/front/provider/WorkspaceProvider.d.ts +84 -0
- package/dist/src/front/provider/index.d.ts +9 -0
- package/dist/src/front/provider/workspaceTitle.d.ts +5 -0
- package/dist/src/front/registry/PanelRegistry.d.ts +39 -0
- package/dist/src/front/registry/PanelRenderStatusBoundary.d.ts +38 -0
- package/dist/src/front/registry/RegistryProvider.d.ts +21 -0
- package/dist/src/front/registry/WorkspaceSourceRegistry.d.ts +25 -0
- package/dist/src/front/registry/__tests__/registry.test.d.ts +1 -0
- package/dist/src/front/registry/__tests__/replaceByPluginId.test.d.ts +1 -0
- package/dist/src/front/registry/__tests__/subscribe.test.d.ts +1 -0
- package/dist/src/front/registry/coreRegistrations.d.ts +2 -0
- package/dist/src/front/registry/getFileIcon.d.ts +2 -0
- package/dist/src/front/registry/index.d.ts +7 -0
- package/dist/src/front/registry/types.d.ts +2 -0
- package/dist/src/front/shell/WorkspaceShellCapabilitiesContext.d.ts +1 -0
- package/dist/src/front/store/__tests__/store.property.test.d.ts +1 -0
- package/dist/src/front/store/__tests__/store.test.d.ts +1 -0
- package/dist/src/front/store/index.d.ts +35 -0
- package/dist/src/front/store/localStorageValues.d.ts +4 -0
- package/dist/src/front/store/selectors.d.ts +21 -0
- package/dist/src/front/store/types.d.ts +53 -0
- package/dist/src/front/testing/TestWorkspaceProvider.d.ts +13 -0
- package/dist/src/front/testing/__tests__/testing.test.d.ts +1 -0
- package/dist/src/front/testing/createLocalStorageSessions.d.ts +16 -0
- package/dist/src/front/testing/createMockBridge.d.ts +20 -0
- package/dist/src/front/testing/createMockPaneProps.d.ts +11 -0
- package/dist/src/front/testing/createMockRegistry.d.ts +7 -0
- package/dist/src/front/testing/createMockSessions.d.ts +24 -0
- package/dist/src/front/testing/e2e.d.ts +61 -0
- package/dist/src/front/testing/index.d.ts +17 -0
- package/dist/src/front/testing/mockApi.d.ts +9 -0
- package/dist/src/front/testing/renderPane.d.ts +20 -0
- package/dist/src/front/theme/codemirror-theme.d.ts +4 -0
- package/dist/src/front/theme/index.d.ts +1 -0
- package/dist/src/front/toast/__tests__/toast.test.d.ts +1 -0
- package/dist/src/front/toast/index.d.ts +1 -0
- package/dist/src/index.d.ts +90 -0
- package/dist/src/plugin.d.ts +19 -0
- package/dist/src/plugins/filesystemPlugin/front/ConflictBanner.d.ts +14 -0
- package/dist/src/plugins/filesystemPlugin/front/FilePaneShell.d.ts +73 -0
- package/dist/src/plugins/filesystemPlugin/front/__tests__/agentFileBridge.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/__tests__/filePanelBinding.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/__tests__/filesystemPlugin.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/__tests__/search.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/__tests__/useFilePane.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/agentFileBridge.d.ts +12 -0
- package/dist/src/plugins/filesystemPlugin/front/catalogs.d.ts +9 -0
- package/dist/src/plugins/filesystemPlugin/front/code-editor/CodeEditor.d.ts +10 -0
- package/dist/src/plugins/filesystemPlugin/front/code-editor/CodeEditorPane.d.ts +8 -0
- package/dist/src/plugins/filesystemPlugin/front/code-editor/__tests__/CodeEditor.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/code-editor/__tests__/CodeEditorPane.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/DataProvider.d.ts +16 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/fetchClient.integration.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/fetchClient.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/fileRecords.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/hooks.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/useFileEventInvalidation.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/useFileEventStream.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/useFileUpload.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/fetchClient.d.ts +63 -0
- package/dist/src/plugins/filesystemPlugin/front/data/fileRecords.d.ts +34 -0
- package/dist/src/plugins/filesystemPlugin/front/data/filesystemErrorRedaction.d.ts +2 -0
- package/dist/src/plugins/filesystemPlugin/front/data/hooks.d.ts +48 -0
- package/dist/src/plugins/filesystemPlugin/front/data/index.d.ts +9 -0
- package/dist/src/plugins/filesystemPlugin/front/data/treePreloadCache.d.ts +3 -0
- package/dist/src/plugins/filesystemPlugin/front/data/types.d.ts +37 -0
- package/dist/src/plugins/filesystemPlugin/front/data/useFileEventInvalidation.d.ts +28 -0
- package/dist/src/plugins/filesystemPlugin/front/data/useFileEventStream.d.ts +27 -0
- package/dist/src/plugins/filesystemPlugin/front/data/useFileUpload.d.ts +12 -0
- package/dist/src/plugins/filesystemPlugin/front/empty-file-panel/EmptyFilePanel.d.ts +6 -0
- package/dist/src/plugins/filesystemPlugin/front/empty-file-panel/definition.d.ts +8 -0
- package/dist/src/plugins/filesystemPlugin/front/events.d.ts +6 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/FileTree.d.ts +59 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/FileTreeView.d.ts +83 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/__tests__/FileTree.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/__tests__/FileTreePane.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/__tests__/copyToClipboard.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/clipboard.d.ts +6 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/dndManager.d.ts +8 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/treeModel.d.ts +20 -0
- package/dist/src/plugins/filesystemPlugin/front/filePanelBinding.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/html-viewer/HtmlViewer.d.ts +18 -0
- package/dist/src/plugins/filesystemPlugin/front/html-viewer/HtmlViewer.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/html-viewer/HtmlViewerPane.d.ts +7 -0
- package/dist/src/plugins/filesystemPlugin/front/index.d.ts +11 -0
- package/dist/src/plugins/filesystemPlugin/front/markdown-editor/MarkdownEditor.d.ts +44 -0
- package/dist/src/plugins/filesystemPlugin/front/markdown-editor/MarkdownEditorPane.d.ts +8 -0
- package/dist/src/plugins/filesystemPlugin/front/markdown-editor/ResizableImage.d.ts +10 -0
- package/dist/src/plugins/filesystemPlugin/front/markdown-editor/__tests__/MarkdownEditor.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/markdown-editor/__tests__/MarkdownEditorPane.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/media-viewer/MediaViewer.d.ts +9 -0
- package/dist/src/plugins/filesystemPlugin/front/media-viewer/MediaViewer.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/media-viewer/MediaViewerPane.d.ts +8 -0
- package/dist/src/plugins/filesystemPlugin/front/media-viewer/useMediaViewerReload.d.ts +8 -0
- package/dist/src/plugins/filesystemPlugin/front/media-viewer/useMediaViewerReload.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/search.d.ts +5 -0
- package/dist/src/plugins/filesystemPlugin/front/search.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/surfaceResolver.d.ts +10 -0
- package/dist/src/plugins/filesystemPlugin/front/useFilePane.d.ts +61 -0
- package/dist/src/plugins/filesystemPlugin/shared/constants.d.ts +12 -0
- package/dist/src/plugins/filesystemPlugin/shared/events.d.ts +39 -0
- package/dist/src/shared/__tests__/filesystem.test.d.ts +1 -0
- package/dist/src/shared/__tests__/telemetry.test.d.ts +1 -0
- package/dist/src/shared/__tests__/workspaceBridgeRpc.test.d.ts +1 -0
- package/dist/src/shared/index.d.ts +25 -0
- package/dist/src/shared/plugins/CatalogRegistry.d.ts +28 -0
- package/dist/src/shared/plugins/CommandRegistry.d.ts +23 -0
- package/dist/src/shared/plugins/SurfaceResolverRegistry.d.ts +24 -0
- package/dist/src/shared/plugins/__tests__/bootstrap.test.d.ts +1 -0
- package/dist/src/shared/plugins/__tests__/frontFactory.test.d.ts +1 -0
- package/dist/src/shared/plugins/__tests__/manifest.test.d.ts +1 -0
- package/dist/src/shared/plugins/__tests__/uiBridgeRegistry.test.d.ts +1 -0
- package/dist/src/shared/plugins/appLeftOverlayChrome.d.ts +10 -0
- package/dist/src/shared/plugins/bootstrap.d.ts +41 -0
- package/dist/src/shared/plugins/errors.d.ts +5 -0
- package/dist/src/shared/plugins/frontFactory.d.ts +166 -0
- package/dist/src/shared/plugins/index.d.ts +5 -0
- package/dist/src/shared/plugins/manifest.d.ts +58 -0
- package/dist/src/shared/plugins/runtimePluginTypes.d.ts +51 -0
- package/dist/src/shared/plugins/types.d.ts +84 -0
- package/dist/src/shared/plugins/uiBridgeRegistry.d.ts +44 -0
- package/dist/src/shared/plugins/workspaceShellCapabilities.d.ts +44 -0
- package/dist/src/shared/telemetry.d.ts +11 -0
- package/dist/src/shared/types/agent-tool.d.ts +30 -0
- package/dist/src/shared/types/boring-core-front.d.ts +2 -0
- package/dist/src/shared/types/filesystem.d.ts +15 -0
- package/dist/src/shared/types/panel.d.ts +123 -0
- package/dist/src/shared/types/surface.d.ts +42 -0
- package/dist/src/shared/ui-bridge.d.ts +77 -0
- package/dist/src/shared/workspace-bridge-rpc.d.ts +122 -0
- package/dist/{surface-aLQ_Hryw.d.ts → surface-h6IgrsK5.d.ts} +1 -1
- package/dist/testing-e2e.d.ts +2 -73
- package/dist/testing.d.ts +2 -433
- package/dist/testing.js +11 -11
- package/dist/{ui-bridge-D2eO3epD.d.ts → ui-bridge-C4CyIrQA.d.ts} +1 -1
- package/dist/{workspace-bridge-rpc-A98RA5o6.d.ts → workspace-bridge-rpc-BHsOJMlW.d.ts} +1 -1
- package/dist/workspace.css +21 -0
- package/dist/workspace.d.ts +2 -2649
- package/dist/workspace.js +40 -40
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { useCommands } from './useCommands';
|
|
2
|
+
export { useActivePanels } from './useActivePanels';
|
|
3
|
+
export { useCatalogs } from './useCatalogs';
|
|
4
|
+
export { PluginErrorBoundary } from './PluginErrorBoundary';
|
|
5
|
+
export { PluginErrorProvider, usePluginErrors } from './PluginErrorContext';
|
|
6
|
+
export type { PluginError } from './PluginErrorContext';
|
|
7
|
+
export { PluginInspector } from './PluginInspector';
|
|
8
|
+
export type { PluginMeta } from './PluginInspector';
|
|
9
|
+
export { WorkspacePluginClientProvider, createWorkspacePluginClient, useWorkspacePluginClient } from './useWorkspacePluginClient';
|
|
10
|
+
export type { WorkspacePluginClient } from './useWorkspacePluginClient';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode, FunctionComponentElement, ProviderProps } from 'react';
|
|
2
|
+
export interface WorkspacePluginClient {
|
|
3
|
+
apiBaseUrl: string;
|
|
4
|
+
workspaceId?: string;
|
|
5
|
+
workspaceHeaders(): Record<string, string>;
|
|
6
|
+
getJson<T = unknown>(path: string, options?: {
|
|
7
|
+
missingMessage?: string;
|
|
8
|
+
}): Promise<T>;
|
|
9
|
+
readJsonFile<T>(path: string, options?: {
|
|
10
|
+
missingMessage?: string;
|
|
11
|
+
}): Promise<T>;
|
|
12
|
+
postJson<T = unknown>(path: string, body?: unknown, options?: {
|
|
13
|
+
headers?: Record<string, string>;
|
|
14
|
+
}): Promise<T>;
|
|
15
|
+
sendAgentPrompt(message: string, options?: {
|
|
16
|
+
title?: string;
|
|
17
|
+
noncePrefix?: string;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
interface WorkspacePluginClientProviderProps {
|
|
21
|
+
apiBaseUrl: string;
|
|
22
|
+
workspaceId?: string;
|
|
23
|
+
authHeaders?: Record<string, string>;
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare function createWorkspacePluginClient(apiBaseUrl: string, workspaceId?: string, authHeaders?: Record<string, string>): WorkspacePluginClient;
|
|
27
|
+
export declare function WorkspacePluginClientProvider({ apiBaseUrl, workspaceId, authHeaders, children, }: WorkspacePluginClientProviderProps): FunctionComponentElement<ProviderProps<WorkspacePluginClient | null>>;
|
|
28
|
+
export declare function useWorkspacePluginClient(): WorkspacePluginClient;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CommandPaletteSessionSearchConfig } from '../components/CommandPalette';
|
|
3
|
+
import { BoringFrontFactoryWithId, CapturedFrontPlugin } from '../../shared/plugins/frontFactory';
|
|
4
|
+
import { CommandConfig, PanelConfig } from '../registry/types';
|
|
5
|
+
import { CatalogConfig } from '../../shared/plugins/types';
|
|
6
|
+
import { WorkspaceChatPanelComponent } from '../chrome/chat/types';
|
|
7
|
+
export type FrontPluginHotReloadMode = "vite" | false;
|
|
8
|
+
export declare function useTheme(): {
|
|
9
|
+
theme: "light" | "dark";
|
|
10
|
+
setTheme: (theme: "light" | "dark") => void;
|
|
11
|
+
toggleTheme: () => void;
|
|
12
|
+
};
|
|
13
|
+
export interface ThemeProviderProps {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
defaultTheme?: "light" | "dark";
|
|
16
|
+
onThemeChange?: (theme: "light" | "dark") => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function ThemeProvider({ children, defaultTheme, onThemeChange }: ThemeProviderProps): import("react").JSX.Element;
|
|
19
|
+
export interface WorkspaceBridgeContextValue {
|
|
20
|
+
connected: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function useWorkspaceBridge(): WorkspaceBridgeContextValue;
|
|
23
|
+
export interface RegisteredPluginMeta {
|
|
24
|
+
id: string;
|
|
25
|
+
label?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface WorkspaceContextValue {
|
|
28
|
+
chatPanel: WorkspaceChatPanelComponent | null;
|
|
29
|
+
registeredPlugins: RegisteredPluginMeta[];
|
|
30
|
+
workspaceId?: string;
|
|
31
|
+
debug: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function useWorkspaceContext(): WorkspaceContextValue;
|
|
34
|
+
export declare function useWorkspaceContextOptional(): WorkspaceContextValue | null;
|
|
35
|
+
export declare function useWorkspaceChatPanel(): WorkspaceChatPanelComponent;
|
|
36
|
+
export interface WorkspaceProviderProps {
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
chatPanel?: WorkspaceChatPanelComponent;
|
|
39
|
+
/**
|
|
40
|
+
* Front plugin entries produced by `definePlugin({ id, ... })` from
|
|
41
|
+
* `@hachej/boring-workspace/plugin`.
|
|
42
|
+
*/
|
|
43
|
+
plugins?: BoringFrontFactoryWithId[];
|
|
44
|
+
capturedPlugins?: CapturedFrontPlugin[];
|
|
45
|
+
excludeDefaults?: string[];
|
|
46
|
+
panels?: PanelConfig[];
|
|
47
|
+
commands?: CommandConfig[];
|
|
48
|
+
catalogs?: CatalogConfig[];
|
|
49
|
+
capabilities?: Record<string, boolean>;
|
|
50
|
+
apiBaseUrl?: string;
|
|
51
|
+
authHeaders?: Record<string, string>;
|
|
52
|
+
/** Per-request timeout for the data layer's FetchClient, in ms. */
|
|
53
|
+
apiTimeout?: number;
|
|
54
|
+
/** Active chat/session scope shared with plugin providers that need session-scoped data. */
|
|
55
|
+
activeSessionId?: string | null;
|
|
56
|
+
/** Session ids that are currently open in chat panes, for plugins that must avoid opening closed-session UI. */
|
|
57
|
+
openSessionIds?: readonly string[];
|
|
58
|
+
/** Authoritative chat session ids used to drop stale session-scoped Inbox/attention entries. */
|
|
59
|
+
attentionSessionIds?: readonly string[];
|
|
60
|
+
/** False while session data is loading or paginated; prevents pruning valid off-page attention entries. */
|
|
61
|
+
attentionSessionsAuthoritative?: boolean;
|
|
62
|
+
defaultTheme?: "light" | "dark" | undefined;
|
|
63
|
+
onThemeChange?: (theme: "light" | "dark") => void;
|
|
64
|
+
workspaceId?: string;
|
|
65
|
+
workspaceLabel?: string;
|
|
66
|
+
appTitle?: string;
|
|
67
|
+
storageKey?: string;
|
|
68
|
+
persistenceEnabled?: boolean;
|
|
69
|
+
manageDocumentTitle?: boolean;
|
|
70
|
+
bridgeEndpoint?: string | null;
|
|
71
|
+
onAuthError?: (statusCode: number) => void;
|
|
72
|
+
onOpenFile?: (path: string) => void;
|
|
73
|
+
debug?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Hot-load dynamically discovered front plugin modules. The current
|
|
76
|
+
* implementation relies on Vite's /@fs transform endpoint, so it defaults to
|
|
77
|
+
* dev-only. Production hosts should keep this false until they provide their
|
|
78
|
+
* own module asset endpoint.
|
|
79
|
+
*/
|
|
80
|
+
frontPluginHotReload?: FrontPluginHotReloadMode;
|
|
81
|
+
fullPageBasePath?: string;
|
|
82
|
+
commandPaletteSessionSearch?: CommandPaletteSessionSearchConfig;
|
|
83
|
+
}
|
|
84
|
+
export declare function WorkspaceProvider({ children, chatPanel, plugins, capturedPlugins, excludeDefaults, panels, commands, catalogs, capabilities, apiBaseUrl, authHeaders, apiTimeout, activeSessionId, openSessionIds, attentionSessionIds, attentionSessionsAuthoritative, defaultTheme, onThemeChange, workspaceId, workspaceLabel, appTitle, storageKey, persistenceEnabled, manageDocumentTitle, bridgeEndpoint, onAuthError, onOpenFile, debug, frontPluginHotReload, fullPageBasePath, commandPaletteSessionSearch, }: WorkspaceProviderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @hachej/boring-workspace/front/provider — Provider components.
|
|
3
|
+
*/
|
|
4
|
+
export { WorkspaceProvider, ThemeProvider, useTheme, useWorkspaceBridge, useWorkspaceContext, useWorkspaceContextOptional, useWorkspaceChatPanel, } from './WorkspaceProvider';
|
|
5
|
+
export type { WorkspaceProviderProps, FrontPluginHotReloadMode, ThemeProviderProps, WorkspaceBridgeContextValue, WorkspaceContextValue, } from './WorkspaceProvider';
|
|
6
|
+
export { formatWorkspaceDocumentTitle } from './workspaceTitle';
|
|
7
|
+
export { WORKSPACE_ATTENTION_ACTION_EVENT, WorkspaceAttentionProvider, emitWorkspaceAttentionAction, useWorkspaceAttention, workspaceAttentionSessionBadgeForBlocker, } from '../attention';
|
|
8
|
+
export type { WorkspaceAttentionActionDetail, WorkspaceAttentionBlocker, WorkspaceAttentionBlockerAction, WorkspaceAttentionContextValue, WorkspaceAttentionProviderProps, WorkspaceAttentionSessionBadge, WorkspaceAttentionFocusMetadata, } from '../attention';
|
|
9
|
+
export type { OpenArtifactHandler, WorkspaceChatPanelComponent, WorkspaceChatPanelProps, } from '../chrome/chat/types';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { PanelConfig, PanelRegistration } from './types';
|
|
3
|
+
export declare class PanelRegistry {
|
|
4
|
+
private panels;
|
|
5
|
+
private registrationOrder;
|
|
6
|
+
private capabilities;
|
|
7
|
+
private listeners;
|
|
8
|
+
private snapshotCache;
|
|
9
|
+
private lazyComponentCache;
|
|
10
|
+
private wrapperComponentCache;
|
|
11
|
+
private generation;
|
|
12
|
+
constructor(capabilities?: Record<string, boolean>);
|
|
13
|
+
register(id: string, config: PanelRegistration): void;
|
|
14
|
+
unregister(id: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Atomic replace: unregister all panels owned by `pluginId`, then register
|
|
17
|
+
* the new set, in one emit cycle. Subscribers see exactly one intermediate
|
|
18
|
+
* state — never an empty registry between unregister and re-register.
|
|
19
|
+
*
|
|
20
|
+
* Collision policy: a new registration whose id is already owned by a
|
|
21
|
+
* DIFFERENT pluginId is skipped with a warning. Preserves cross-plugin
|
|
22
|
+
* isolation during reload — a renamed plugin can't silently steal another
|
|
23
|
+
* plugin's panel id. Teardown + rebuild as a single observable transition,
|
|
24
|
+
* driven by the front-side SSE reload subscriber.
|
|
25
|
+
*/
|
|
26
|
+
replaceByPluginId(pluginId: string, panels: PanelConfig[]): void;
|
|
27
|
+
get(id: string): PanelConfig | undefined;
|
|
28
|
+
has(id: string): boolean;
|
|
29
|
+
list(): PanelConfig[];
|
|
30
|
+
listAll(): PanelConfig[];
|
|
31
|
+
getComponents(): Record<string, ComponentType<any>>;
|
|
32
|
+
subscribe: (cb: () => void) => (() => void);
|
|
33
|
+
getSnapshot: () => readonly PanelConfig[];
|
|
34
|
+
private getWrappedComponent;
|
|
35
|
+
private getLazyComponent;
|
|
36
|
+
private emit;
|
|
37
|
+
private filteredPanels;
|
|
38
|
+
private satisfiesCapabilities;
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ReactNode, FunctionComponentElement, ProviderProps, DetailedReactHTMLElement } from 'react';
|
|
2
|
+
export type PanelRenderState = "loading" | "ready" | "error" | "missing";
|
|
3
|
+
export interface PanelRenderStatusReport {
|
|
4
|
+
pluginId: string;
|
|
5
|
+
panelId: string;
|
|
6
|
+
panelInstanceId: string;
|
|
7
|
+
revision?: number;
|
|
8
|
+
state: PanelRenderState;
|
|
9
|
+
error?: {
|
|
10
|
+
code: string;
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
interface PanelRenderStatusReporter {
|
|
15
|
+
report(status: PanelRenderStatusReport): void;
|
|
16
|
+
}
|
|
17
|
+
export interface PanelRenderStatusProviderProps {
|
|
18
|
+
apiBaseUrl?: string;
|
|
19
|
+
workspaceId?: string;
|
|
20
|
+
authHeaders?: Record<string, string>;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare function PanelRenderStatusProvider(props: PanelRenderStatusProviderProps): FunctionComponentElement<ProviderProps<PanelRenderStatusReporter>>;
|
|
24
|
+
interface PanelRenderStatusBoundaryProps {
|
|
25
|
+
pluginId: string;
|
|
26
|
+
panelId: string;
|
|
27
|
+
panelInstanceId?: string;
|
|
28
|
+
revision?: number;
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export declare function PanelRenderStatusBoundary(props: PanelRenderStatusBoundaryProps): DetailedReactHTMLElement<{
|
|
32
|
+
"data-boring-plugin-revision"?: string | undefined;
|
|
33
|
+
"data-boring-panel-instance-id"?: string | undefined;
|
|
34
|
+
className: string;
|
|
35
|
+
"data-boring-plugin-id": string;
|
|
36
|
+
"data-boring-panel-component-id": string;
|
|
37
|
+
}, HTMLElement>;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PanelRegistry } from './PanelRegistry';
|
|
3
|
+
import { WorkspaceSourceRegistry } from './WorkspaceSourceRegistry';
|
|
4
|
+
import { CommandRegistry } from '../../shared/plugins/CommandRegistry';
|
|
5
|
+
import { SurfaceResolverRegistry } from '../../shared/plugins/SurfaceResolverRegistry';
|
|
6
|
+
import { CatalogRegistry } from '../../shared/plugins/CatalogRegistry';
|
|
7
|
+
interface RegistryProviderProps {
|
|
8
|
+
panelRegistry: PanelRegistry;
|
|
9
|
+
workspaceSourceRegistry?: WorkspaceSourceRegistry;
|
|
10
|
+
commandRegistry: CommandRegistry;
|
|
11
|
+
catalogRegistry?: CatalogRegistry;
|
|
12
|
+
surfaceResolverRegistry?: SurfaceResolverRegistry;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare function RegistryProvider({ panelRegistry, workspaceSourceRegistry, commandRegistry, catalogRegistry, surfaceResolverRegistry, children, }: RegistryProviderProps): import("react").JSX.Element;
|
|
16
|
+
export declare function useRegistry(): PanelRegistry;
|
|
17
|
+
export declare function useWorkspaceSourceRegistry(): WorkspaceSourceRegistry;
|
|
18
|
+
export declare function useCommandRegistry(): CommandRegistry;
|
|
19
|
+
export declare function useCatalogRegistry(): CatalogRegistry;
|
|
20
|
+
export declare function useSurfaceResolverRegistry(): SurfaceResolverRegistry;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { WorkspaceSourceConfig, WorkspaceSourceRegistration } from './types';
|
|
3
|
+
export declare class WorkspaceSourceRegistry {
|
|
4
|
+
private sources;
|
|
5
|
+
private registrationOrder;
|
|
6
|
+
private capabilities;
|
|
7
|
+
private listeners;
|
|
8
|
+
private snapshotCache;
|
|
9
|
+
private lazyComponentCache;
|
|
10
|
+
constructor(capabilities?: Record<string, boolean>);
|
|
11
|
+
register(id: string, config: WorkspaceSourceRegistration): void;
|
|
12
|
+
unregister(id: string): void;
|
|
13
|
+
replaceByPluginId(pluginId: string, sources: WorkspaceSourceConfig[]): void;
|
|
14
|
+
get(id: string): WorkspaceSourceConfig | undefined;
|
|
15
|
+
has(id: string): boolean;
|
|
16
|
+
getComponent(sourceId: string): ComponentType<any> | undefined;
|
|
17
|
+
list(): WorkspaceSourceConfig[];
|
|
18
|
+
listAll(): WorkspaceSourceConfig[];
|
|
19
|
+
subscribe: (cb: () => void) => (() => void);
|
|
20
|
+
getSnapshot: () => readonly WorkspaceSourceConfig[];
|
|
21
|
+
private getLazyComponent;
|
|
22
|
+
private emit;
|
|
23
|
+
private filteredSources;
|
|
24
|
+
private satisfiesCapabilities;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { PanelRegistry } from './PanelRegistry';
|
|
2
|
+
export { WorkspaceSourceRegistry } from './WorkspaceSourceRegistry';
|
|
3
|
+
export { RegistryProvider, useRegistry, useWorkspaceSourceRegistry, useCommandRegistry, useCatalogRegistry, useSurfaceResolverRegistry, } from './RegistryProvider';
|
|
4
|
+
export { getFileIcon } from './getFileIcon';
|
|
5
|
+
export type { PanelConfig, PanelRegistration, CommandConfig, PaneProps, WorkspaceSourceConfig, WorkspaceSourceOpenPanelConfig, WorkspaceSourceProps, WorkspaceSourceRegistration, } from './types';
|
|
6
|
+
export type { SurfaceOpenRequest, SurfacePanelResolution, SurfaceResolverConfig, SurfaceResolverRegistration, } from '../../shared/types/surface';
|
|
7
|
+
export { WORKSPACE_OPEN_PATH_SURFACE_KIND } from '../../shared/types/surface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WorkspaceShellCapabilitiesProvider, useWorkspaceShellCapabilities, type WorkspaceShellArtifactTarget, type WorkspaceShellCapabilityResult, type WorkspaceShellCapabilities, } from '../../shared/plugins/workspaceShellCapabilities';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { WorkspaceStore, SidebarState } from './types';
|
|
2
|
+
import { StoreApi } from 'zustand';
|
|
3
|
+
import { PersistOptions } from 'zustand/middleware';
|
|
4
|
+
export interface CreateWorkspaceStoreOptions {
|
|
5
|
+
workspaceId?: string;
|
|
6
|
+
storageKey?: string;
|
|
7
|
+
persistenceEnabled?: boolean;
|
|
8
|
+
onLayoutVersionMismatch?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function createWorkspaceStore(options?: CreateWorkspaceStoreOptions): {
|
|
11
|
+
(): WorkspaceStore;
|
|
12
|
+
<U>(selector: (state: WorkspaceStore) => U): U;
|
|
13
|
+
} & Omit< StoreApi<WorkspaceStore>, "setState" | "persist"> & {
|
|
14
|
+
setState(partial: WorkspaceStore | Partial<WorkspaceStore> | ((state: WorkspaceStore) => WorkspaceStore | Partial<WorkspaceStore>), replace?: false | undefined): unknown;
|
|
15
|
+
setState(state: WorkspaceStore | ((state: WorkspaceStore) => WorkspaceStore), replace: true): unknown;
|
|
16
|
+
persist: {
|
|
17
|
+
setOptions: (options: Partial< PersistOptions<WorkspaceStore, {
|
|
18
|
+
layout: unknown;
|
|
19
|
+
sidebar: SidebarState;
|
|
20
|
+
panelSizes: Record<string, number>;
|
|
21
|
+
}, unknown>>) => void;
|
|
22
|
+
clearStorage: () => void;
|
|
23
|
+
rehydrate: () => Promise<void> | void;
|
|
24
|
+
hasHydrated: () => boolean;
|
|
25
|
+
onHydrate: (fn: (state: WorkspaceStore) => void) => () => void;
|
|
26
|
+
onFinishHydration: (fn: (state: WorkspaceStore) => void) => () => void;
|
|
27
|
+
getOptions: () => Partial< PersistOptions<WorkspaceStore, {
|
|
28
|
+
layout: unknown;
|
|
29
|
+
sidebar: SidebarState;
|
|
30
|
+
panelSizes: Record<string, number>;
|
|
31
|
+
}, unknown>>;
|
|
32
|
+
};
|
|
33
|
+
} & {
|
|
34
|
+
cleanup: () => void;
|
|
35
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function readStoredBoolean(key: string, fallback: boolean, enabled?: boolean): boolean;
|
|
2
|
+
export declare function writeStoredBoolean(key: string, value: boolean, enabled?: boolean): void;
|
|
3
|
+
export declare function readStoredNumber(key: string, fallback: number, enabled?: boolean): number;
|
|
4
|
+
export declare function writeStoredNumber(key: string, value: number, enabled?: boolean): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { WorkspaceStore, SidebarState, PanelState } from './types';
|
|
2
|
+
type WorkspaceStoreApi = {
|
|
3
|
+
getState: () => WorkspaceStore;
|
|
4
|
+
subscribe: (listener: (state: WorkspaceStore, prevState: WorkspaceStore) => void) => () => void;
|
|
5
|
+
setState: (partial: Partial<WorkspaceStore>) => void;
|
|
6
|
+
getInitialState: () => WorkspaceStore;
|
|
7
|
+
};
|
|
8
|
+
export declare function bindStore(store: WorkspaceStoreApi): void;
|
|
9
|
+
export declare function useActiveFile(): string | null;
|
|
10
|
+
export declare function useActivePanel(): string | null;
|
|
11
|
+
export declare function useSidebarState(): SidebarState;
|
|
12
|
+
export declare function useSetSidebar(): (sidebar: Partial< SidebarState>) => void;
|
|
13
|
+
export declare function useOpenPanels(): PanelState[];
|
|
14
|
+
export declare function useDirtyFiles(): Record<string, {
|
|
15
|
+
panelId: string;
|
|
16
|
+
savedAt: number | null;
|
|
17
|
+
}>;
|
|
18
|
+
export declare function useThemePreference(): "light" | "dark";
|
|
19
|
+
export declare function useHydrationComplete(): boolean;
|
|
20
|
+
export declare function useResetLayout(): () => void;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface PanelState {
|
|
2
|
+
id: string;
|
|
3
|
+
component: string;
|
|
4
|
+
params?: Record<string, unknown>;
|
|
5
|
+
groupId?: string;
|
|
6
|
+
essential?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface Notification {
|
|
9
|
+
id: string;
|
|
10
|
+
message: string;
|
|
11
|
+
type: "info" | "warning" | "error";
|
|
12
|
+
timestamp: number;
|
|
13
|
+
}
|
|
14
|
+
export interface SidebarState {
|
|
15
|
+
collapsed: boolean;
|
|
16
|
+
width: number;
|
|
17
|
+
}
|
|
18
|
+
export interface WorkspaceState {
|
|
19
|
+
hydrationComplete: boolean;
|
|
20
|
+
layout: unknown | null;
|
|
21
|
+
sidebar: SidebarState;
|
|
22
|
+
panelSizes: Record<string, number>;
|
|
23
|
+
preferences: {
|
|
24
|
+
theme: "light" | "dark";
|
|
25
|
+
};
|
|
26
|
+
panels: PanelState[];
|
|
27
|
+
activePanel: string | null;
|
|
28
|
+
activeFile: string | null;
|
|
29
|
+
visibleFiles: string[];
|
|
30
|
+
dirtyFiles: Record<string, {
|
|
31
|
+
panelId: string;
|
|
32
|
+
savedAt: number | null;
|
|
33
|
+
}>;
|
|
34
|
+
notifications: Notification[];
|
|
35
|
+
}
|
|
36
|
+
export interface WorkspaceActions {
|
|
37
|
+
setHydrationComplete: (complete: boolean) => void;
|
|
38
|
+
setLayout: (layout: unknown) => void;
|
|
39
|
+
setSidebar: (sidebar: Partial<SidebarState>) => void;
|
|
40
|
+
setPanelSize: (panelId: string, size: number) => void;
|
|
41
|
+
setTheme: (theme: "light" | "dark") => void;
|
|
42
|
+
openPanel: (panel: PanelState) => void;
|
|
43
|
+
closePanel: (panelId: string) => void;
|
|
44
|
+
activatePanel: (panelId: string) => void;
|
|
45
|
+
openFile: (file: string, panelId?: string) => void;
|
|
46
|
+
markDirty: (file: string, panelId: string) => void;
|
|
47
|
+
markClean: (file: string) => void;
|
|
48
|
+
showNotification: (notification: Omit<Notification, "id" | "timestamp">) => void;
|
|
49
|
+
dismissNotification: (id: string) => void;
|
|
50
|
+
navigateToLine: (file: string, line: number) => void;
|
|
51
|
+
resetLayout: () => void;
|
|
52
|
+
}
|
|
53
|
+
export type WorkspaceStore = WorkspaceState & WorkspaceActions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PanelRegistry } from '../registry/PanelRegistry';
|
|
3
|
+
import { MockDataFixtures } from './mockApi';
|
|
4
|
+
export interface TestWorkspaceProviderProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
fixtures?: MockDataFixtures;
|
|
7
|
+
registry?: PanelRegistry;
|
|
8
|
+
apiBaseUrl?: string;
|
|
9
|
+
authHeaders?: Record<string, string>;
|
|
10
|
+
defaultTheme?: "light" | "dark";
|
|
11
|
+
timeout?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function TestWorkspaceProvider({ children, fixtures, registry, apiBaseUrl, authHeaders, defaultTheme, timeout, }: TestWorkspaceProviderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MockSessionsState as State, MockSessionsStore as Store } from './createMockSessions';
|
|
2
|
+
export interface CreateLocalStorageSessionsOptions {
|
|
3
|
+
/** localStorage key prefix. Defaults to `"workspace:sessions"`. */
|
|
4
|
+
storageKey?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Seed used the first time we run (no value at `storageKey` yet).
|
|
7
|
+
* Defaults to a single "New session" row with `id = "s${Date.now()}"`.
|
|
8
|
+
*/
|
|
9
|
+
initial?: () => State;
|
|
10
|
+
}
|
|
11
|
+
export declare function createLocalStorageSessions(opts?: CreateLocalStorageSessionsOptions): Store;
|
|
12
|
+
/**
|
|
13
|
+
* React hook bound to a specific store instance. Identical signature to
|
|
14
|
+
* `useMockSessions` — both stores share the `MockSessionsStore` type.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useLocalStorageSessions(store: Store): State;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BridgeEventMap, WorkspaceBridge } from '../bridge/types';
|
|
2
|
+
import { PanelState } from '../store/types';
|
|
3
|
+
type SpyFactory = <T extends (...args: any[]) => any>(implementation?: T) => any;
|
|
4
|
+
export interface MockBridgeState {
|
|
5
|
+
openPanels: PanelState[];
|
|
6
|
+
activeFile: string | null;
|
|
7
|
+
dirtyFiles: string[];
|
|
8
|
+
visibleFiles: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface CreateMockBridgeOptions {
|
|
11
|
+
state?: Partial<MockBridgeState>;
|
|
12
|
+
fn?: SpyFactory;
|
|
13
|
+
}
|
|
14
|
+
export type MockWorkspaceBridge = WorkspaceBridge & {
|
|
15
|
+
emit<K extends keyof BridgeEventMap>(event: K, payload: BridgeEventMap[K]): void;
|
|
16
|
+
setState(next: Partial<MockBridgeState>): void;
|
|
17
|
+
getStateSnapshot(): MockBridgeState;
|
|
18
|
+
};
|
|
19
|
+
export declare function createMockBridge(options?: CreateMockBridgeOptions): MockWorkspaceBridge;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PaneProps } from '../registry/types';
|
|
2
|
+
export interface CreateMockPaneOptions<T> {
|
|
3
|
+
params: T;
|
|
4
|
+
panelId?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Override individual `api` fields without re-stubbing the whole surface. */
|
|
7
|
+
apiOverrides?: Partial<PaneProps<T>["api"]>;
|
|
8
|
+
/** Override individual `containerApi` fields. */
|
|
9
|
+
containerApiOverrides?: Partial<PaneProps<T>["containerApi"]>;
|
|
10
|
+
}
|
|
11
|
+
export declare function createMockPaneProps<T>(optsOrParams: T | CreateMockPaneOptions<T>): PaneProps<T>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PanelRegistry } from '../registry/PanelRegistry';
|
|
2
|
+
import { PanelConfig } from '../registry/types';
|
|
3
|
+
export interface CreateMockRegistryOptions {
|
|
4
|
+
panels?: PanelConfig[];
|
|
5
|
+
capabilities?: Record<string, boolean>;
|
|
6
|
+
}
|
|
7
|
+
export declare function createMockRegistry(options?: CreateMockRegistryOptions): PanelRegistry;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SessionItem } from '../components/SessionList';
|
|
2
|
+
export interface MockSessionsState {
|
|
3
|
+
sessions: SessionItem[];
|
|
4
|
+
activeId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface MockSessionsStore {
|
|
7
|
+
getState: () => MockSessionsState;
|
|
8
|
+
subscribe: (fn: () => void) => () => void;
|
|
9
|
+
switchTo: (id: string) => void;
|
|
10
|
+
create: () => void;
|
|
11
|
+
remove: (id: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface CreateMockSessionsOptions {
|
|
14
|
+
/** Initial sessions. Defaults to a 5-row demo set with descending updatedAt. */
|
|
15
|
+
initial?: SessionItem[];
|
|
16
|
+
/** Initial active session id. Defaults to the first session's id. */
|
|
17
|
+
activeId?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function createMockSessions(opts?: CreateMockSessionsOptions): MockSessionsStore;
|
|
20
|
+
/**
|
|
21
|
+
* Convenience hook bound to a specific store instance. Subscribes via
|
|
22
|
+
* useSyncExternalStore so React only re-renders on actual state changes.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useMockSessions(store: MockSessionsStore): MockSessionsState;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
export interface BootCleanOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Storage prefix used by declarative chat shells. The
|
|
5
|
+
* bootClean default is to pre-seed `${shellKey}:surface=1` so the
|
|
6
|
+
* workbench mounts at boot — required for any test that posts an
|
|
7
|
+
* openPanel via the bridge (the dispatcher early-returns when no
|
|
8
|
+
* surface is mounted).
|
|
9
|
+
*/
|
|
10
|
+
shellKey: string;
|
|
11
|
+
/** Extra localStorage entries to seed after the clear. */
|
|
12
|
+
seed?: Record<string, string>;
|
|
13
|
+
/**
|
|
14
|
+
* If false, surface=1 is NOT pre-seeded — the test starts with the
|
|
15
|
+
* workbench closed. Default: true.
|
|
16
|
+
*/
|
|
17
|
+
openWorkbenchAtBoot?: boolean;
|
|
18
|
+
/** Vite + dockview cold-mount allowance. Default 2500ms. */
|
|
19
|
+
mountSettleMs?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Land on the app with a clean localStorage so persistence-sensitive tests
|
|
23
|
+
* start from defaults. Pre-opens the workbench surface unless told
|
|
24
|
+
* otherwise — see `openWorkbenchAtBoot`.
|
|
25
|
+
*
|
|
26
|
+
* Also drains the server-side bridge command queue. The bridge is process-
|
|
27
|
+
* global on a shared dev server (E2E_EXTERNAL_SERVER=1); without an
|
|
28
|
+
* explicit drain, a leftover command from a previous test (e.g. an
|
|
29
|
+
* openPanel posted just before that test ended) gets re-delivered to the
|
|
30
|
+
* next test's SSE subscriber and mounts an unexpected pane. The drain is
|
|
31
|
+
* a no-op when the queue is already empty.
|
|
32
|
+
*/
|
|
33
|
+
export declare function bootClean(page: Page, opts: BootCleanOptions): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Ensure the workbench surface is OPEN. Idempotent — checks the persisted
|
|
36
|
+
* flag rather than blindly toggling, so it's safe to call after bootClean
|
|
37
|
+
* (which pre-seeds the open flag by default) or independently.
|
|
38
|
+
*/
|
|
39
|
+
export declare function openWorkbench(page: Page, opts: {
|
|
40
|
+
shellKey: string;
|
|
41
|
+
}): Promise<void>;
|
|
42
|
+
export interface OpenPaneViaBridgeConfig {
|
|
43
|
+
/** Tab/panel instance id (e.g. `"chart:CPIAUCSL"`, `"deck:intro.md"`). */
|
|
44
|
+
id: string;
|
|
45
|
+
/** Registered panel component id. Must appear in `extraPanels`. */
|
|
46
|
+
component: string;
|
|
47
|
+
/** Tab title to wait for. */
|
|
48
|
+
title: string;
|
|
49
|
+
/** Forwarded to the panel component as its `params`. */
|
|
50
|
+
params: Record<string, unknown>;
|
|
51
|
+
/** Override the dockview-tab wait timeout. Default 10s. */
|
|
52
|
+
paneMountTimeoutMs?: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Push an openPanel command through the workspace UI bridge, then poll
|
|
56
|
+
* until the corresponding dockview tab actually appears. The chat shell
|
|
57
|
+
* receives commands over an SSE stream; subscribe latency is
|
|
58
|
+
* non-deterministic (cold Vite, ClickHouse warm-up, EventSource reconnect
|
|
59
|
+
* budget), so we wait on the rendered tab rather than a fixed sleep.
|
|
60
|
+
*/
|
|
61
|
+
export declare function openPaneViaBridge(page: Page, cfg: OpenPaneViaBridgeConfig): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { TestWorkspaceProvider } from './TestWorkspaceProvider';
|
|
2
|
+
export type { TestWorkspaceProviderProps } from './TestWorkspaceProvider';
|
|
3
|
+
export { createMockBridge } from './createMockBridge';
|
|
4
|
+
export type { CreateMockBridgeOptions, MockBridgeState, MockWorkspaceBridge, } from './createMockBridge';
|
|
5
|
+
export { createMockRegistry } from './createMockRegistry';
|
|
6
|
+
export type { CreateMockRegistryOptions } from './createMockRegistry';
|
|
7
|
+
export { renderPane } from './renderPane';
|
|
8
|
+
export type { RenderPaneOptions, RenderPaneResult } from './renderPane';
|
|
9
|
+
export type { MockDataFixtures, MockFileFixture } from './mockApi';
|
|
10
|
+
export { createMockSessions, useMockSessions } from './createMockSessions';
|
|
11
|
+
export type { CreateMockSessionsOptions, MockSessionsState, MockSessionsStore, } from './createMockSessions';
|
|
12
|
+
export { createLocalStorageSessions, useLocalStorageSessions, } from './createLocalStorageSessions';
|
|
13
|
+
export type { CreateLocalStorageSessionsOptions } from './createLocalStorageSessions';
|
|
14
|
+
export { bootClean, openWorkbench, openPaneViaBridge, } from './e2e';
|
|
15
|
+
export type { BootCleanOptions, OpenPaneViaBridgeConfig, } from './e2e';
|
|
16
|
+
export { createMockPaneProps } from './createMockPaneProps';
|
|
17
|
+
export type { CreateMockPaneOptions } from './createMockPaneProps';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface MockFileFixture {
|
|
2
|
+
path: string;
|
|
3
|
+
content: string;
|
|
4
|
+
mtimeMs?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface MockDataFixtures {
|
|
7
|
+
files?: MockFileFixture[];
|
|
8
|
+
}
|
|
9
|
+
export declare function createMockApiFetch(fixtures?: MockDataFixtures, fallbackFetch?: typeof fetch): typeof fetch;
|