@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
package/dist/workspace.d.ts
CHANGED
|
@@ -1,2649 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { ComponentType } from 'react';
|
|
4
|
-
import { Context } from 'react';
|
|
5
|
-
import { dismissToast } from '@hachej/boring-ui-kit';
|
|
6
|
-
import { DockviewApi } from 'dockview-react';
|
|
7
|
-
import { DockviewPanelApi } from 'dockview-react';
|
|
8
|
-
import { ErrorInfo } from 'react';
|
|
9
|
-
import { Extension } from '@codemirror/state';
|
|
10
|
-
import { FunctionComponentElement } from 'react';
|
|
11
|
-
import { JSX } from 'react';
|
|
12
|
-
import { JSXElementConstructor } from 'react';
|
|
13
|
-
import { LucideIcon } from 'lucide-react';
|
|
14
|
-
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
15
|
-
import { PersistOptions } from 'zustand/middleware';
|
|
16
|
-
import { PiChatPanelProps } from '@hachej/boring-agent/front';
|
|
17
|
-
import { ProviderProps } from 'react';
|
|
18
|
-
import { ReactElement } from 'react';
|
|
19
|
-
import { ReactNode } from 'react';
|
|
20
|
-
import { ReactPortal } from 'react';
|
|
21
|
-
import { StoreApi as StoreApi_3 } from 'zustand';
|
|
22
|
-
import { toast } from '@hachej/boring-ui-kit';
|
|
23
|
-
import { ToastApi } from '@hachej/boring-ui-kit';
|
|
24
|
-
import { Toaster } from '@hachej/boring-ui-kit';
|
|
25
|
-
import { ToasterProps } from '@hachej/boring-ui-kit';
|
|
26
|
-
import { ToastInput } from '@hachej/boring-ui-kit';
|
|
27
|
-
import { ToastRecord } from '@hachej/boring-ui-kit';
|
|
28
|
-
import { ToastVariant } from '@hachej/boring-ui-kit';
|
|
29
|
-
import { z } from 'zod';
|
|
30
|
-
|
|
31
|
-
export declare function agentMeta(toolCallId: string): {
|
|
32
|
-
cause: "agent";
|
|
33
|
-
toolCallId: string;
|
|
34
|
-
ts: number;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Structural tool contract accepted from workspace plugins and UI tool
|
|
39
|
-
* factories. Kept agent-runtime-neutral so only the app integration layer
|
|
40
|
-
* needs to import @hachej/boring-agent.
|
|
41
|
-
*/
|
|
42
|
-
export declare interface AgentTool {
|
|
43
|
-
name: string;
|
|
44
|
-
description: string;
|
|
45
|
-
promptSnippet?: string;
|
|
46
|
-
readinessRequirements?: ToolReadinessRequirement[];
|
|
47
|
-
parameters: JSONSchema;
|
|
48
|
-
execute(params: Record<string, unknown>, ctx: ToolExecContext): Promise<ToolResult>;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export declare interface AppLeftOverlayChromeValue {
|
|
52
|
-
headerInsetStart: boolean;
|
|
53
|
-
headerInsetEnd: boolean;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export declare interface ArtifactPanel {
|
|
57
|
-
id: string;
|
|
58
|
-
component: string;
|
|
59
|
-
params?: Record<string, unknown>;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export declare function ArtifactSurfacePane({ visible, storageKey, allowedPanels, persistedLayout, onLayoutChange, onReady, prefixHeaderActions, rightHeaderActions, watermarkComponent, className, }: ArtifactSurfacePaneProps): JSX.Element | null;
|
|
63
|
-
|
|
64
|
-
export declare namespace ArtifactSurfacePane {
|
|
65
|
-
var defaultAllowedPanels: string[];
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export declare interface ArtifactSurfacePaneProps {
|
|
69
|
-
visible?: boolean;
|
|
70
|
-
storageKey?: string;
|
|
71
|
-
allowedPanels?: string[];
|
|
72
|
-
persistedLayout?: SerializedLayout;
|
|
73
|
-
onLayoutChange?: (layout: SerializedLayout) => void;
|
|
74
|
-
onReady?: (api: DockviewApi) => void;
|
|
75
|
-
prefixHeaderActions?: React.FunctionComponent<unknown>;
|
|
76
|
-
rightHeaderActions?: React.FunctionComponent<unknown>;
|
|
77
|
-
watermarkComponent?: React.FunctionComponent<unknown>;
|
|
78
|
-
className?: string;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export declare function bindStore(store: WorkspaceStoreApi): void;
|
|
82
|
-
|
|
83
|
-
export declare function bootstrap(options: BootstrapOptions): BootstrapResult;
|
|
84
|
-
|
|
85
|
-
export declare interface BootstrapOptions {
|
|
86
|
-
chatPanel: unknown;
|
|
87
|
-
plugins?: BoringFrontFactoryWithId[];
|
|
88
|
-
capturedPlugins?: CapturedFrontPlugin[];
|
|
89
|
-
defaults?: BoringFrontFactoryWithId[];
|
|
90
|
-
excludeDefaults?: string[];
|
|
91
|
-
registries: {
|
|
92
|
-
panels: PanelRegistryLike;
|
|
93
|
-
workspaceSources?: WorkspaceSourceRegistryLike;
|
|
94
|
-
commands: CommandRegistryLike;
|
|
95
|
-
catalogs: CatalogRegistryLike;
|
|
96
|
-
surfaceResolvers?: SurfaceResolverRegistryLike;
|
|
97
|
-
};
|
|
98
|
-
panelCommandRunner?: (command: BoringFrontPanelCommandRegistration) => (() => void) | undefined;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export declare interface BootstrapResult {
|
|
102
|
-
registered: string[];
|
|
103
|
-
plugins: CapturedFrontPlugin[];
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
declare interface BoringFrontAPI {
|
|
107
|
-
registerProvider(registration: BoringFrontProviderRegistration): void;
|
|
108
|
-
registerBinding(registration: BoringFrontBindingRegistration): void;
|
|
109
|
-
registerCatalog(registration: CatalogConfig): void;
|
|
110
|
-
registerPanel<T = unknown>(registration: BoringFrontPanelRegistration<T>): void;
|
|
111
|
-
registerWorkspaceSource<T = unknown>(registration: BoringFrontWorkspaceSourceRegistration<T>): void;
|
|
112
|
-
registerPanelCommand(registration: BoringFrontPanelCommandRegistration): void;
|
|
113
|
-
registerAppLeftAction(registration: BoringFrontAppLeftActionRegistration): void;
|
|
114
|
-
registerSurfaceResolver(registration: BoringFrontSurfaceResolverRegistration): void;
|
|
115
|
-
registerToolRenderer(registration: BoringFrontToolRendererRegistration): void;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
declare interface BoringFrontAppLeftActionRegistration {
|
|
119
|
-
id: string;
|
|
120
|
-
label: string;
|
|
121
|
-
icon?: ComponentType<{
|
|
122
|
-
className?: string;
|
|
123
|
-
}>;
|
|
124
|
-
trailing?: ComponentType;
|
|
125
|
-
overlay: ComponentType<BoringFrontAppLeftOverlayProps>;
|
|
126
|
-
order?: number;
|
|
127
|
-
emphasis?: boolean;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
declare interface BoringFrontAppLeftOverlayProps {
|
|
131
|
-
onClose: () => void;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
declare interface BoringFrontBindingRegistration {
|
|
135
|
-
id: string;
|
|
136
|
-
component: PluginBinding;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
declare type BoringFrontFactory = (api: BoringFrontAPI) => void | Promise<void>;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* A `BoringFrontFactory` that carries its own plugin id (and optional
|
|
143
|
-
* label) as static properties. Produced by `definePlugin({ ... })` and used
|
|
144
|
-
* directly by `WorkspaceProvider.plugins`.
|
|
145
|
-
*/
|
|
146
|
-
declare type BoringFrontFactoryWithId = BoringFrontFactory & {
|
|
147
|
-
pluginId: string;
|
|
148
|
-
pluginLabel?: string;
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
declare interface BoringFrontPanelCommandRegistration {
|
|
152
|
-
id: string;
|
|
153
|
-
title: string;
|
|
154
|
-
panelId?: string;
|
|
155
|
-
run?: () => void;
|
|
156
|
-
keywords?: string[];
|
|
157
|
-
shortcut?: string;
|
|
158
|
-
when?: () => boolean;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
declare interface BoringFrontPanelRegistration<T = unknown> {
|
|
162
|
-
id: string;
|
|
163
|
-
component: ComponentType<PaneProps<T>> | (() => Promise<{
|
|
164
|
-
default: ComponentType<PaneProps<T>>;
|
|
165
|
-
}>);
|
|
166
|
-
label?: string;
|
|
167
|
-
icon?: ComponentType<{
|
|
168
|
-
className?: string;
|
|
169
|
-
}>;
|
|
170
|
-
placement?: PanelConfig["placement"];
|
|
171
|
-
requiresCapabilities?: string[];
|
|
172
|
-
essential?: boolean;
|
|
173
|
-
lazy?: boolean;
|
|
174
|
-
chromeless?: boolean;
|
|
175
|
-
supportsFullPage?: boolean;
|
|
176
|
-
source?: string;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
declare interface BoringFrontProviderRegistration {
|
|
180
|
-
id: string;
|
|
181
|
-
component: PluginProvider;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
declare interface BoringFrontSurfaceResolverRegistration {
|
|
185
|
-
id?: string;
|
|
186
|
-
kind: string;
|
|
187
|
-
title?: string;
|
|
188
|
-
description?: string;
|
|
189
|
-
targetHint?: string;
|
|
190
|
-
examples?: SurfaceResolverExample[];
|
|
191
|
-
metaSchema?: Record<string, unknown>;
|
|
192
|
-
source?: string;
|
|
193
|
-
resolve: (request: SurfaceOpenRequest) => SurfacePanelResolution | null | undefined;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
declare type BoringFrontToolRenderer = (part: unknown) => ReactNode;
|
|
197
|
-
|
|
198
|
-
declare interface BoringFrontToolRendererRegistration {
|
|
199
|
-
id: string;
|
|
200
|
-
render: BoringFrontToolRenderer;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
declare interface BoringFrontWorkspaceSourceRegistration<T = unknown> {
|
|
204
|
-
id: string;
|
|
205
|
-
component: ComponentType<WorkspaceSourceProps<T>> | (() => Promise<{
|
|
206
|
-
default: ComponentType<WorkspaceSourceProps<T>>;
|
|
207
|
-
}>);
|
|
208
|
-
label?: string;
|
|
209
|
-
icon?: ComponentType<{
|
|
210
|
-
className?: string;
|
|
211
|
-
}>;
|
|
212
|
-
requiresCapabilities?: string[];
|
|
213
|
-
lazy?: boolean;
|
|
214
|
-
chromeless?: boolean;
|
|
215
|
-
defaultPanelId?: string;
|
|
216
|
-
source?: string;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
export declare interface BridgeClient {
|
|
220
|
-
connect(): void;
|
|
221
|
-
disconnect(): void;
|
|
222
|
-
pushState(causedBy: CausedBy): void;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export declare interface BridgeClientOptions {
|
|
226
|
-
endpoint: string;
|
|
227
|
-
bridge: WorkspaceBridge;
|
|
228
|
-
store: StoreApi_2;
|
|
229
|
-
authToken?: string;
|
|
230
|
-
pollMode?: boolean;
|
|
231
|
-
pollInterval?: number;
|
|
232
|
-
onAuthError?: (statusCode: number) => void;
|
|
233
|
-
onVersionMismatch?: (version: number) => void;
|
|
234
|
-
onConnectionChange?: (connected: boolean) => void;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export declare interface BridgeEventMap {
|
|
238
|
-
"panel:opened": {
|
|
239
|
-
panelId: string;
|
|
240
|
-
params: Record<string, unknown>;
|
|
241
|
-
};
|
|
242
|
-
"panel:closed": {
|
|
243
|
-
panelId: string;
|
|
244
|
-
};
|
|
245
|
-
"panel:activated": {
|
|
246
|
-
panelId: string;
|
|
247
|
-
previousPanelId: string | null;
|
|
248
|
-
};
|
|
249
|
-
"file:opened": {
|
|
250
|
-
path: string;
|
|
251
|
-
mode: "view" | "edit" | "diff";
|
|
252
|
-
filesystem?: FilesystemId;
|
|
253
|
-
};
|
|
254
|
-
"file:saved": {
|
|
255
|
-
path: string;
|
|
256
|
-
};
|
|
257
|
-
"file:dirty": {
|
|
258
|
-
path: string;
|
|
259
|
-
dirty: boolean;
|
|
260
|
-
};
|
|
261
|
-
"sidebar:toggled": {
|
|
262
|
-
collapsed: boolean;
|
|
263
|
-
};
|
|
264
|
-
"tree:expand": {
|
|
265
|
-
path: string;
|
|
266
|
-
};
|
|
267
|
-
"notification:shown": {
|
|
268
|
-
message: string;
|
|
269
|
-
level: "info" | "warn" | "error";
|
|
270
|
-
};
|
|
271
|
-
"pane:error": {
|
|
272
|
-
panelId: string;
|
|
273
|
-
error: string;
|
|
274
|
-
stack?: string;
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
export declare function buildChatLayout(props?: ChatLayoutProps): LayoutConfig;
|
|
279
|
-
|
|
280
|
-
export declare function buildFullPagePanelHref({ componentId, params, basePath }: BuildFullPagePanelHrefInput): string;
|
|
281
|
-
|
|
282
|
-
export declare interface BuildFullPagePanelHrefInput {
|
|
283
|
-
componentId: string;
|
|
284
|
-
params?: Record<string, unknown>;
|
|
285
|
-
basePath: string;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export declare function buildIdeLayout(props?: IdeLayoutProps): LayoutConfig;
|
|
289
|
-
|
|
290
|
-
declare interface CapturedBoringFrontRegistrations {
|
|
291
|
-
providers: BoringFrontProviderRegistration[];
|
|
292
|
-
bindings: BoringFrontBindingRegistration[];
|
|
293
|
-
catalogs: CatalogConfig[];
|
|
294
|
-
panels: BoringFrontPanelRegistration<any>[];
|
|
295
|
-
workspaceSources: BoringFrontWorkspaceSourceRegistration<any>[];
|
|
296
|
-
panelCommands: BoringFrontPanelCommandRegistration[];
|
|
297
|
-
appLeftActions: BoringFrontAppLeftActionRegistration[];
|
|
298
|
-
surfaceResolvers: BoringFrontSurfaceResolverRegistration[];
|
|
299
|
-
toolRenderers: BoringFrontToolRendererRegistration[];
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
declare interface CapturedFrontPlugin {
|
|
303
|
-
id: string;
|
|
304
|
-
label?: string;
|
|
305
|
-
registrations: CapturedBoringFrontRegistrations;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
export declare type CatalogAdapter = {
|
|
309
|
-
search(args: CatalogSearchArgs): Promise<CatalogSearchResult>;
|
|
310
|
-
fetchFacets?(args: CatalogFacetsArgs): Promise<CatalogFacets>;
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
export declare type CatalogBadge = {
|
|
314
|
-
/** 1–4 char mono code rendered as a chip. */
|
|
315
|
-
code: string;
|
|
316
|
-
tooltip?: string;
|
|
317
|
-
};
|
|
318
|
-
|
|
319
|
-
export declare interface CatalogConfig {
|
|
320
|
-
id: string;
|
|
321
|
-
label: string;
|
|
322
|
-
adapter: CatalogAdapter;
|
|
323
|
-
onSelect: (row: CatalogRow) => void;
|
|
324
|
-
pluginId?: string;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
export declare type CatalogFacetConfig = {
|
|
328
|
-
key: string;
|
|
329
|
-
label: string;
|
|
330
|
-
order?: string[];
|
|
331
|
-
formatValue?: (value: string) => string;
|
|
332
|
-
};
|
|
333
|
-
|
|
334
|
-
export declare type CatalogFacets = Record<string, CatalogFacetValue[]>;
|
|
335
|
-
|
|
336
|
-
export declare type CatalogFacetsArgs = {
|
|
337
|
-
filters: Record<string, string[]>;
|
|
338
|
-
signal?: AbortSignal;
|
|
339
|
-
};
|
|
340
|
-
|
|
341
|
-
export declare type CatalogFacetValue = {
|
|
342
|
-
value: string;
|
|
343
|
-
count: number;
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
export declare class CatalogRegistry {
|
|
347
|
-
private catalogs;
|
|
348
|
-
private listeners;
|
|
349
|
-
private snapshotCache;
|
|
350
|
-
private warnOnDuplicate;
|
|
351
|
-
constructor(options?: CatalogRegistryOptions);
|
|
352
|
-
register(config: CatalogConfig, sourcePluginId: string): void;
|
|
353
|
-
unregister(id: string): void;
|
|
354
|
-
unregisterByPluginId(pluginId: string): void;
|
|
355
|
-
/**
|
|
356
|
-
* Atomic replace by pluginId: drop owned catalogs and register the new
|
|
357
|
-
* set in one emit. Pi parity for reload semantics.
|
|
358
|
-
*
|
|
359
|
-
* Collision policy: a new catalog id already owned by a DIFFERENT pluginId
|
|
360
|
-
* is skipped with a warning — same posture as `register`'s warnOnDuplicate
|
|
361
|
-
* but never silently overwriting another plugin's contribution.
|
|
362
|
-
*/
|
|
363
|
-
replaceByPluginId(pluginId: string, catalogs: CatalogConfig[]): void;
|
|
364
|
-
list(): readonly CatalogConfig[];
|
|
365
|
-
get(id: string): CatalogConfig | undefined;
|
|
366
|
-
subscribe: (cb: () => void) => (() => void);
|
|
367
|
-
getSnapshot: () => readonly CatalogConfig[];
|
|
368
|
-
private emit;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
export declare interface CatalogRegistryLike {
|
|
372
|
-
register(catalog: CatalogConfig, pluginId: string): void;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
export declare interface CatalogRegistryOptions {
|
|
376
|
-
warnOnDuplicate?: boolean;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
export declare type CatalogRow = {
|
|
380
|
-
id: string;
|
|
381
|
-
title: string;
|
|
382
|
-
subtitle?: string;
|
|
383
|
-
group?: string;
|
|
384
|
-
leading?: CatalogBadge;
|
|
385
|
-
trailing?: CatalogBadge[];
|
|
386
|
-
meta?: string;
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
export declare type CatalogSearchArgs = {
|
|
390
|
-
query: string;
|
|
391
|
-
filters: Record<string, string[]>;
|
|
392
|
-
group?: {
|
|
393
|
-
key: string;
|
|
394
|
-
value: string;
|
|
395
|
-
};
|
|
396
|
-
limit: number;
|
|
397
|
-
offset: number;
|
|
398
|
-
signal?: AbortSignal;
|
|
399
|
-
};
|
|
400
|
-
|
|
401
|
-
export declare type CatalogSearchResult = {
|
|
402
|
-
items: CatalogRow[];
|
|
403
|
-
total: number;
|
|
404
|
-
hasMore: boolean;
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
export declare type CausedBy = "user" | "agent" | "restore";
|
|
408
|
-
|
|
409
|
-
export declare function ChatLayout(props: ChatLayoutProps): JSX.Element;
|
|
410
|
-
|
|
411
|
-
export declare interface ChatLayoutProps {
|
|
412
|
-
nav?: string | null;
|
|
413
|
-
navParams?: Record<string, unknown>;
|
|
414
|
-
center?: string;
|
|
415
|
-
centerParams?: Record<string, unknown>;
|
|
416
|
-
chatPanes?: ChatPaneDescriptor[];
|
|
417
|
-
/** Optional host actions rendered in the active chat pane header. */
|
|
418
|
-
chatTopActions?: ReactNode;
|
|
419
|
-
activeChatPaneId?: string | null;
|
|
420
|
-
onActiveChatPaneChange?: (id: string) => void;
|
|
421
|
-
onCloseChatPane?: (id: string) => void;
|
|
422
|
-
onCreateChatPaneAfter?: (id: string) => void;
|
|
423
|
-
onDropChatSession?: (sessionId: string) => void;
|
|
424
|
-
flashChatPaneId?: string | null;
|
|
425
|
-
surface?: string | null;
|
|
426
|
-
surfaceParams?: Record<string, unknown>;
|
|
427
|
-
/** Opaque overlay rendered over the full chat stage only (not over the workbench). */
|
|
428
|
-
chatOverlay?: ReactNode;
|
|
429
|
-
/** Called when shell chrome needs to dismiss the chat overlay before collapsing chat. */
|
|
430
|
-
onCloseChatOverlay?: () => void;
|
|
431
|
-
surfaceOverlay?: ReactNode;
|
|
432
|
-
sidebar?: string | null;
|
|
433
|
-
sidebarParams?: Record<string, unknown>;
|
|
434
|
-
storageKey?: string;
|
|
435
|
-
onOpenNav?: () => void;
|
|
436
|
-
onOpenSurface?: () => void;
|
|
437
|
-
surfaceButtonBottomOffset?: number;
|
|
438
|
-
onOpenSidebar?: () => void;
|
|
439
|
-
className?: string;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
declare interface ChatPaneDescriptor {
|
|
443
|
-
id: string;
|
|
444
|
-
title?: string | null;
|
|
445
|
-
panel?: string;
|
|
446
|
-
params?: Record<string, unknown>;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
export declare const closePanelSchema: z.ZodObject<{
|
|
450
|
-
id: z.ZodString;
|
|
451
|
-
}, "strip", z.ZodTypeAny, {
|
|
452
|
-
id: string;
|
|
453
|
-
}, {
|
|
454
|
-
id: string;
|
|
455
|
-
}>;
|
|
456
|
-
|
|
457
|
-
export declare function cn(...inputs: ClassValue[]): string;
|
|
458
|
-
|
|
459
|
-
export declare function CodeEditor({ content, onChange, language, readOnly, lineNumbers, wordWrap, className, }: CodeEditorProps): JSX.Element;
|
|
460
|
-
|
|
461
|
-
export declare function CodeEditorPane({ params, api, className }: CodeEditorPaneProps): JSX.Element;
|
|
462
|
-
|
|
463
|
-
export declare type CodeEditorPaneProps = PaneProps<{
|
|
464
|
-
path?: string;
|
|
465
|
-
filesystem?: FilesystemId;
|
|
466
|
-
mode?: "view" | "edit" | "diff";
|
|
467
|
-
}>;
|
|
468
|
-
|
|
469
|
-
export declare interface CodeEditorProps {
|
|
470
|
-
content: string;
|
|
471
|
-
onChange?: (content: string) => void;
|
|
472
|
-
language?: string;
|
|
473
|
-
readOnly?: boolean;
|
|
474
|
-
lineNumbers?: boolean;
|
|
475
|
-
wordWrap?: boolean;
|
|
476
|
-
className?: string;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
export declare interface CommandConfig {
|
|
480
|
-
id: string;
|
|
481
|
-
title: string;
|
|
482
|
-
run: () => void;
|
|
483
|
-
keywords?: string[];
|
|
484
|
-
shortcut?: string;
|
|
485
|
-
when?: () => boolean;
|
|
486
|
-
pluginId?: string;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
export declare function CommandPalette({ sessionSearch, apiBaseUrl, authHeaders }?: CommandPaletteProps): JSX.Element;
|
|
490
|
-
|
|
491
|
-
export declare interface CommandPaletteProps {
|
|
492
|
-
sessionSearch?: CommandPaletteSessionSearchConfig;
|
|
493
|
-
apiBaseUrl?: string;
|
|
494
|
-
authHeaders?: Record<string, string>;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
declare interface CommandPaletteSessionItem {
|
|
498
|
-
id: string;
|
|
499
|
-
title?: string | null;
|
|
500
|
-
updatedAt?: string | number;
|
|
501
|
-
turnCount?: number;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
declare interface CommandPaletteSessionSearchConfig {
|
|
505
|
-
sessions: CommandPaletteSessionItem[];
|
|
506
|
-
activeId?: string | null;
|
|
507
|
-
openIds?: readonly string[];
|
|
508
|
-
search?: (sessions: readonly CommandPaletteSessionItem[], query: string) => CommandPaletteSessionItem[];
|
|
509
|
-
onSwitch: (id: string) => void;
|
|
510
|
-
onOpenAsTab: (id: string) => void;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
export declare class CommandRegistry {
|
|
514
|
-
private commands;
|
|
515
|
-
private listeners;
|
|
516
|
-
private snapshotCache;
|
|
517
|
-
registerCommand(config: CommandConfig): void;
|
|
518
|
-
unregisterByPluginId(pluginId: string): void;
|
|
519
|
-
unregisterCommand(id: string): void;
|
|
520
|
-
/**
|
|
521
|
-
* Atomic replace by pluginId: drop owned commands and register the new
|
|
522
|
-
* set in one emit. Pi parity for reload semantics.
|
|
523
|
-
*
|
|
524
|
-
* Collision policy: a new command id already owned by a DIFFERENT pluginId
|
|
525
|
-
* is skipped with a warning — preserves cross-plugin isolation on reload.
|
|
526
|
-
*/
|
|
527
|
-
replaceByPluginId(pluginId: string, commands: CommandConfig[]): void;
|
|
528
|
-
getCommand(id: string): CommandConfig | undefined;
|
|
529
|
-
getCommands(): CommandConfig[];
|
|
530
|
-
getActiveCommands(): CommandConfig[];
|
|
531
|
-
subscribe: (cb: () => void) => (() => void);
|
|
532
|
-
getSnapshot: () => readonly CommandConfig[];
|
|
533
|
-
private emit;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
export declare interface CommandRegistryLike {
|
|
537
|
-
registerCommand(command: CommandConfig): void;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
export declare interface CommandResult {
|
|
541
|
-
seq: number;
|
|
542
|
-
status: "ok" | "error";
|
|
543
|
-
error?: {
|
|
544
|
-
code: string;
|
|
545
|
-
message: string;
|
|
546
|
-
};
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
export declare function createBridge(store: StoreApi): WorkspaceBridge;
|
|
550
|
-
|
|
551
|
-
export declare function createBridgeClient(options: BridgeClientOptions): BridgeClient;
|
|
552
|
-
|
|
553
|
-
export declare function createShadcnTheme(options?: {
|
|
554
|
-
dark?: boolean;
|
|
555
|
-
}): Extension[];
|
|
556
|
-
|
|
557
|
-
export declare function createWorkspacePluginClient(apiBaseUrl: string, workspaceId?: string, authHeaders?: Record<string, string>): WorkspacePluginClient;
|
|
558
|
-
|
|
559
|
-
export declare function createWorkspaceStore(options?: CreateWorkspaceStoreOptions): {
|
|
560
|
-
(): WorkspaceStore;
|
|
561
|
-
<U>(selector: (state: WorkspaceStore) => U): U;
|
|
562
|
-
} & Omit< StoreApi_3<WorkspaceStore>, "setState" | "persist"> & {
|
|
563
|
-
setState(partial: WorkspaceStore | Partial<WorkspaceStore> | ((state: WorkspaceStore) => WorkspaceStore | Partial<WorkspaceStore>), replace?: false | undefined): unknown;
|
|
564
|
-
setState(state: WorkspaceStore | ((state: WorkspaceStore) => WorkspaceStore), replace: true): unknown;
|
|
565
|
-
persist: {
|
|
566
|
-
setOptions: (options: Partial< PersistOptions<WorkspaceStore, {
|
|
567
|
-
layout: unknown;
|
|
568
|
-
sidebar: SidebarState;
|
|
569
|
-
panelSizes: Record<string, number>;
|
|
570
|
-
}, unknown>>) => void;
|
|
571
|
-
clearStorage: () => void;
|
|
572
|
-
rehydrate: () => Promise<void> | void;
|
|
573
|
-
hasHydrated: () => boolean;
|
|
574
|
-
onHydrate: (fn: (state: WorkspaceStore) => void) => () => void;
|
|
575
|
-
onFinishHydration: (fn: (state: WorkspaceStore) => void) => () => void;
|
|
576
|
-
getOptions: () => Partial< PersistOptions<WorkspaceStore, {
|
|
577
|
-
layout: unknown;
|
|
578
|
-
sidebar: SidebarState;
|
|
579
|
-
panelSizes: Record<string, number>;
|
|
580
|
-
}, unknown>>;
|
|
581
|
-
};
|
|
582
|
-
} & {
|
|
583
|
-
cleanup: () => void;
|
|
584
|
-
};
|
|
585
|
-
|
|
586
|
-
export declare interface CreateWorkspaceStoreOptions {
|
|
587
|
-
workspaceId?: string;
|
|
588
|
-
storageKey?: string;
|
|
589
|
-
persistenceEnabled?: boolean;
|
|
590
|
-
onLayoutVersionMismatch?: () => void;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
declare interface DataProviderProps {
|
|
594
|
-
apiBaseUrl: string;
|
|
595
|
-
authHeaders?: Record<string, string>;
|
|
596
|
-
onAuthError?: (statusCode: number) => void;
|
|
597
|
-
timeout?: number;
|
|
598
|
-
client?: FetchClient;
|
|
599
|
-
children: ReactNode;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* Identity helper for type-safe panel registration. Pure runtime
|
|
604
|
-
* passthrough — the value of this is forcing TypeScript to verify that
|
|
605
|
-
* the registered component accepts the params shape declared on the
|
|
606
|
-
* config. Without it, apps tend to widen `component` to
|
|
607
|
-
* `ComponentType<PaneProps<unknown>>` and lose the link.
|
|
608
|
-
*
|
|
609
|
-
* ```ts
|
|
610
|
-
* const editorPanel = definePanel<{ path: string }>({
|
|
611
|
-
* id: "code-editor",
|
|
612
|
-
* title: "Editor",
|
|
613
|
-
* component: CodeEditorPane, // typechecked against PaneProps<{ path: string }>
|
|
614
|
-
* placement: "center",
|
|
615
|
-
* })
|
|
616
|
-
* ```
|
|
617
|
-
*/
|
|
618
|
-
export declare function definePanel<T = unknown>(config: PanelConfig<T>): PanelConfig<T>;
|
|
619
|
-
|
|
620
|
-
export { dismissToast }
|
|
621
|
-
|
|
622
|
-
export declare interface DispatchContext {
|
|
623
|
-
/**
|
|
624
|
-
* Imperative handle to the workbench surface. Function (getter) so a
|
|
625
|
-
* late SurfaceShell mount, or any later swap, is picked up without
|
|
626
|
-
* restarting the transport. Returns null when the surface isn't ready.
|
|
627
|
-
*/
|
|
628
|
-
surface: () => SurfaceShellApi | null;
|
|
629
|
-
/** Read the current open/closed state of the workbench pane. */
|
|
630
|
-
isWorkbenchOpen: () => boolean;
|
|
631
|
-
/** Toggle the workbench pane open. Must be a no-op when already open. */
|
|
632
|
-
openWorkbench: () => void;
|
|
633
|
-
/** Open the workbench sources/file-tree pane. Must be a no-op when already open. */
|
|
634
|
-
openWorkbenchSources?: () => void;
|
|
635
|
-
/** Close the workbench pane when a command opened it only for an ephemeral task. */
|
|
636
|
-
closeWorkbench?: () => void;
|
|
637
|
-
/**
|
|
638
|
-
* Park an op that couldn't run because the surface never mounted within the
|
|
639
|
-
* retry budget (collapsed surface / warmup overlay). The host flushes parked
|
|
640
|
-
* ops when the SurfaceShell next becomes ready. Without this the op is
|
|
641
|
-
* silently dropped.
|
|
642
|
-
*/
|
|
643
|
-
enqueue?: (run: (surface: SurfaceShellApi) => void) => void;
|
|
644
|
-
/** Optional host policy hook for surface requests that are only relevant in a visible/open context. */
|
|
645
|
-
shouldOpenSurface?: (request: SurfaceOpenRequest) => boolean;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
export declare function DockviewShell({ layout, persistedLayout, onReady, onLayoutChange, allowedPanels, className, prefixHeaderActions, rightHeaderActions, watermarkComponent, }: DockviewShellProps): JSX.Element;
|
|
649
|
-
|
|
650
|
-
export declare interface DockviewShellApi {
|
|
651
|
-
addPanel(groupId: string, config: {
|
|
652
|
-
id: string;
|
|
653
|
-
component: string;
|
|
654
|
-
title?: string;
|
|
655
|
-
params?: Record<string, unknown>;
|
|
656
|
-
}): void;
|
|
657
|
-
removePanel(panelId: string): void;
|
|
658
|
-
activatePanel(panelId: string): void;
|
|
659
|
-
movePanel(panelId: string, target: {
|
|
660
|
-
groupId: string;
|
|
661
|
-
} | {
|
|
662
|
-
direction: "left" | "right" | "above" | "below";
|
|
663
|
-
referencePanelId: string;
|
|
664
|
-
}): void;
|
|
665
|
-
updatePanelParams(panelId: string, params: Record<string, unknown>): void;
|
|
666
|
-
setPanelTitle(panelId: string, title: string): void;
|
|
667
|
-
findPanelsByParam(key: string, value: unknown): string[];
|
|
668
|
-
getActivePanel(): string | null;
|
|
669
|
-
toJSON(): SerializedLayout;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
export declare interface DockviewShellProps {
|
|
673
|
-
layout: LayoutConfig;
|
|
674
|
-
persistedLayout?: SerializedLayout;
|
|
675
|
-
onReady?: (api: DockviewApi) => void;
|
|
676
|
-
onLayoutChange?: (layout: SerializedLayout) => void;
|
|
677
|
-
storageKey?: string;
|
|
678
|
-
allowedPanels?: string[];
|
|
679
|
-
className?: string;
|
|
680
|
-
/** Component rendered in the tab strip BEFORE the tabs. Useful for inline controls. */
|
|
681
|
-
prefixHeaderActions?: React.FunctionComponent<unknown>;
|
|
682
|
-
/** Component rendered in the tab strip on the far right. */
|
|
683
|
-
rightHeaderActions?: React.FunctionComponent<unknown>;
|
|
684
|
-
/** Component used as the empty-state watermark when a group has no panels. */
|
|
685
|
-
watermarkComponent?: React.FunctionComponent<unknown>;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
export declare interface DynamicPaneConfig {
|
|
689
|
-
id: string;
|
|
690
|
-
component: string;
|
|
691
|
-
params?: Record<string, unknown>;
|
|
692
|
-
title?: string;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
export declare interface EditorLifecycleAdapter {
|
|
696
|
-
isDirty: () => boolean;
|
|
697
|
-
save: () => Promise<void>;
|
|
698
|
-
getContent: () => string;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
export declare function emitAgentData(part: unknown): void;
|
|
702
|
-
|
|
703
|
-
export declare function emitFilesystemAgentFileChange(part: unknown): void;
|
|
704
|
-
|
|
705
|
-
export declare function emitWorkspaceAttentionAction(detail: WorkspaceAttentionActionDetail): void;
|
|
706
|
-
|
|
707
|
-
export declare function emitWorkspaceComposerStop(detail: WorkspaceComposerStopDetail): void;
|
|
708
|
-
|
|
709
|
-
export declare function EmptyPane({ className, onOpenFile }: EmptyPaneProps): JSX.Element;
|
|
710
|
-
|
|
711
|
-
export declare interface EmptyPaneProps {
|
|
712
|
-
className?: string;
|
|
713
|
-
onOpenFile?: () => void;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
/**
|
|
717
|
-
* Tiny typed event bus. ~30 lines, no runtime deps.
|
|
718
|
-
*
|
|
719
|
-
* Design constraints (locked by reviewer feedback in
|
|
720
|
-
* `packages/workspace/docs/plans/archive/UNIFIED_EVENT_BUS.md`):
|
|
721
|
-
*
|
|
722
|
-
* - Synchronous emit only. Slow subscribers fire-and-forget their own async work.
|
|
723
|
-
* - Snapshot listeners before iterating so subscribe / unsubscribe
|
|
724
|
-
* during dispatch is safe.
|
|
725
|
-
* - One thrown listener does not stop the chain. Errors go to console.error.
|
|
726
|
-
* - Bus emits transitions only — no replay-on-subscribe.
|
|
727
|
-
*/
|
|
728
|
-
declare interface EventBus<TMap extends Record<string, any>> {
|
|
729
|
-
/** Subscribe to one event name. Returns an unsubscribe function. */
|
|
730
|
-
on<K extends keyof TMap>(name: K, fn: (payload: TMap[K]) => void): () => void;
|
|
731
|
-
/** Synchronously dispatch to every matching listener. */
|
|
732
|
-
emit<K extends keyof TMap>(name: K, payload: TMap[K]): void;
|
|
733
|
-
/** Test-only — never call from production code. Underscore-prefixed by convention. */
|
|
734
|
-
_reset(): void;
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
/** Common envelope on every payload. */
|
|
738
|
-
export declare type EventMeta = Origin & {
|
|
739
|
-
ts: number;
|
|
740
|
-
};
|
|
741
|
-
|
|
742
|
-
export declare const events: EventBus<WorkspaceEventMap>;
|
|
743
|
-
|
|
744
|
-
export declare const expandToFileSchema: z.ZodObject<{
|
|
745
|
-
path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
746
|
-
}, "strip", z.ZodTypeAny, {
|
|
747
|
-
path: string;
|
|
748
|
-
}, {
|
|
749
|
-
path: string;
|
|
750
|
-
}>;
|
|
751
|
-
|
|
752
|
-
declare class FetchClient {
|
|
753
|
-
private baseUrl;
|
|
754
|
-
private headers;
|
|
755
|
-
private onAuthError?;
|
|
756
|
-
private onTimeout?;
|
|
757
|
-
private timeout;
|
|
758
|
-
private maxRetries;
|
|
759
|
-
private retryBaseMs;
|
|
760
|
-
constructor(opts: FetchClientOptions);
|
|
761
|
-
private request;
|
|
762
|
-
getTree(path: string, signal?: AbortSignal, filesystem?: string): Promise<FileEntry[]>;
|
|
763
|
-
getFile(path: string, signal?: AbortSignal, filesystem?: string): Promise<FileContent>;
|
|
764
|
-
/**
|
|
765
|
-
* Write file content. When `expectedMtimeMs` is supplied, the server
|
|
766
|
-
* runs an optimistic-concurrency check and returns 409 if the file
|
|
767
|
-
* has been modified since that mtime — surfaced here as a typed
|
|
768
|
-
* `FileConflictError` so the editor can ask the user to reload or
|
|
769
|
-
* force-overwrite. The returned `mtimeMs` is the server's stat
|
|
770
|
-
* after the write; callers use it as the OCC baseline for the
|
|
771
|
-
* next save. Set `returnMtimeMs: false` only for writes that do
|
|
772
|
-
* not need a fresh OCC baseline (for example, creating an empty
|
|
773
|
-
* file before immediately opening/refetching it). That lets remote
|
|
774
|
-
* sandboxes skip an expensive post-write stat.
|
|
775
|
-
*/
|
|
776
|
-
writeFile(path: string, content: string, opts?: {
|
|
777
|
-
expectedMtimeMs?: number;
|
|
778
|
-
returnMtimeMs?: boolean;
|
|
779
|
-
filesystem?: string;
|
|
780
|
-
}): Promise<{
|
|
781
|
-
mtimeMs?: number;
|
|
782
|
-
}>;
|
|
783
|
-
deleteFile(path: string, options?: {
|
|
784
|
-
filesystem?: string;
|
|
785
|
-
}): Promise<void>;
|
|
786
|
-
stat(path: string, signal?: AbortSignal, filesystem?: string): Promise<FileStat>;
|
|
787
|
-
getGitUrlMetadata(path: string, signal?: AbortSignal): Promise<GitUrlMetadata>;
|
|
788
|
-
search(query: string, limit?: number, signal?: AbortSignal): Promise<string[]>;
|
|
789
|
-
createDir(path: string, options?: {
|
|
790
|
-
filesystem?: string;
|
|
791
|
-
}): Promise<void>;
|
|
792
|
-
moveFile(from: string, to: string, options?: {
|
|
793
|
-
filesystem?: string;
|
|
794
|
-
}): Promise<void>;
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
declare interface FetchClientOptions {
|
|
798
|
-
apiBaseUrl: string;
|
|
799
|
-
authHeaders?: Record<string, string>;
|
|
800
|
-
onAuthError?: (statusCode: number) => void;
|
|
801
|
-
onTimeout?: (route: string) => void;
|
|
802
|
-
timeout?: number;
|
|
803
|
-
maxRetries?: number;
|
|
804
|
-
retryBaseMs?: number;
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
declare class FetchError extends Error {
|
|
808
|
-
readonly status: number;
|
|
809
|
-
readonly body?: unknown | undefined;
|
|
810
|
-
constructor(status: number, message: string, body?: unknown | undefined);
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
/**
|
|
814
|
-
* Thrown by `writeFile` when the server returns 409 because the file
|
|
815
|
-
* has been modified since the client's last read. Carries the
|
|
816
|
-
* server's current mtime so the editor can show the user a
|
|
817
|
-
* Reload-vs-Overwrite choice with the actual conflict context.
|
|
818
|
-
*/
|
|
819
|
-
declare class FileConflictError extends Error {
|
|
820
|
-
readonly path: string;
|
|
821
|
-
readonly currentMtimeMs: number | null;
|
|
822
|
-
readonly expectedMtimeMs: number | null;
|
|
823
|
-
constructor(path: string, currentMtimeMs: number | null, expectedMtimeMs: number | null);
|
|
824
|
-
static from(err: FetchError, path: string): FileConflictError;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
declare interface FileContent {
|
|
828
|
-
content: string;
|
|
829
|
-
/** Access granted by the resolved filesystem binding, when the server exposes it. */
|
|
830
|
-
access?: "readonly" | "readwrite";
|
|
831
|
-
/**
|
|
832
|
-
* Server-stat'd modification time. Used as the OCC baseline for the
|
|
833
|
-
* next write — the client sends it back as `expectedMtimeMs` so the
|
|
834
|
-
* server can return 409 if the file changed underneath. Optional
|
|
835
|
-
* because not every workspace impl can stat cheaply (sandbox
|
|
836
|
-
* impl is best-effort).
|
|
837
|
-
*/
|
|
838
|
-
mtimeMs?: number;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
declare interface FileEntry {
|
|
842
|
-
name: string;
|
|
843
|
-
kind: "file" | "dir";
|
|
844
|
-
path: string;
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
export declare type FileRecordsFormat = "json-array" | "ndjson" | "csv";
|
|
848
|
-
|
|
849
|
-
export declare interface FileRecordsResult {
|
|
850
|
-
source: FileRecordsSource;
|
|
851
|
-
path: string;
|
|
852
|
-
format: FileRecordsFormat;
|
|
853
|
-
columns: {
|
|
854
|
-
name: string;
|
|
855
|
-
type: string;
|
|
856
|
-
}[];
|
|
857
|
-
rows: Record<string, unknown>[];
|
|
858
|
-
total: number;
|
|
859
|
-
hasMore: boolean;
|
|
860
|
-
offset: number;
|
|
861
|
-
limit: number;
|
|
862
|
-
mtimeMs?: number;
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
export declare interface FileRecordsSource {
|
|
866
|
-
kind: "file";
|
|
867
|
-
path: string;
|
|
868
|
-
format: FileRecordsFormat;
|
|
869
|
-
recordSet?: string;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
declare interface FileStat {
|
|
873
|
-
size: number;
|
|
874
|
-
mtimeMs: number;
|
|
875
|
-
kind: "file" | "dir";
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
declare const FILESYSTEM_FILE_CHANGED_EVENT = "filesystem:file.changed";
|
|
879
|
-
|
|
880
|
-
declare const FILESYSTEM_FILE_CREATED_EVENT = "filesystem:file.created";
|
|
881
|
-
|
|
882
|
-
declare const FILESYSTEM_FILE_DELETED_EVENT = "filesystem:file.deleted";
|
|
883
|
-
|
|
884
|
-
declare const FILESYSTEM_FILE_MOVED_EVENT = "filesystem:file.moved";
|
|
885
|
-
|
|
886
|
-
export declare interface FilesystemEventMap {
|
|
887
|
-
[FILESYSTEM_FILE_MOVED_EVENT]: FilesystemEventMeta & {
|
|
888
|
-
from: string;
|
|
889
|
-
to: string;
|
|
890
|
-
};
|
|
891
|
-
[FILESYSTEM_FILE_DELETED_EVENT]: FilesystemEventMeta & {
|
|
892
|
-
path: string;
|
|
893
|
-
};
|
|
894
|
-
[FILESYSTEM_FILE_CREATED_EVENT]: FilesystemEventMeta & {
|
|
895
|
-
path: string;
|
|
896
|
-
kind: "file" | "dir";
|
|
897
|
-
};
|
|
898
|
-
[FILESYSTEM_FILE_CHANGED_EVENT]: FilesystemEventMeta & {
|
|
899
|
-
path: string;
|
|
900
|
-
};
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
export declare type FilesystemEventMeta = ({
|
|
904
|
-
cause: "user";
|
|
905
|
-
} | {
|
|
906
|
-
cause: "agent";
|
|
907
|
-
toolCallId: string;
|
|
908
|
-
} | {
|
|
909
|
-
cause: "remote";
|
|
910
|
-
toolCallId?: string;
|
|
911
|
-
}) & {
|
|
912
|
-
ts: number;
|
|
913
|
-
filesystem?: FilesystemId;
|
|
914
|
-
};
|
|
915
|
-
|
|
916
|
-
export declare const filesystemEvents: {
|
|
917
|
-
readonly changed: "filesystem:file.changed";
|
|
918
|
-
readonly created: "filesystem:file.created";
|
|
919
|
-
readonly moved: "filesystem:file.moved";
|
|
920
|
-
readonly deleted: "filesystem:file.deleted";
|
|
921
|
-
};
|
|
922
|
-
|
|
923
|
-
declare type FilesystemId = "user" | "company_context" | (string & {});
|
|
924
|
-
|
|
925
|
-
export declare const filesystemPlugin: BoringFrontFactoryWithId;
|
|
926
|
-
|
|
927
|
-
export declare function FileTree({ files, selectedPath, searchQuery, height, editing, revealPath, pendingPaths, onSelect, onExpand, onCollapse, onContextMenu, onSubmitEdit, onCancelEdit, onRevealHandled, onDragDrop, className, }: FileTreeProps): JSX.Element;
|
|
928
|
-
|
|
929
|
-
/**
|
|
930
|
-
* The minimal slice of {@link WorkspaceBridge} a file tree needs: click-to-open
|
|
931
|
-
* (`openFile`), initial selection (`getActiveFile`), reactive reveal (`select`,
|
|
932
|
-
* plus optional `subscribe`). Lives here (core bridge layer) — not in the
|
|
933
|
-
* filesystem plugin — so core chrome (WorkbenchLeftPane) can forward a
|
|
934
|
-
* surface-backed adapter without importing a plugin module.
|
|
935
|
-
*/
|
|
936
|
-
declare type FileTreeBridge = Pick<WorkspaceBridge, "openFile" | "getActiveFile" | "select"> & Partial<Pick<WorkspaceBridge, "subscribe">>;
|
|
937
|
-
|
|
938
|
-
declare interface FileTreeEditState {
|
|
939
|
-
/** Path of the row currently being edited (rename target or draft path). */
|
|
940
|
-
path: string;
|
|
941
|
-
/** When true, treat blank/Esc as cancel-without-error (new-file/folder flow). */
|
|
942
|
-
isDraft: boolean;
|
|
943
|
-
/** Pre-filled value (for rename). */
|
|
944
|
-
initialValue?: string;
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
export declare interface FileTreeNode {
|
|
948
|
-
name: string;
|
|
949
|
-
kind: "file" | "dir";
|
|
950
|
-
path: string;
|
|
951
|
-
children?: FileTreeNode[];
|
|
952
|
-
/**
|
|
953
|
-
* Internal: marks a placeholder row used for inline new-file/new-folder
|
|
954
|
-
* input. Consumers (FileTreeView) inject this when the user starts a
|
|
955
|
-
* create action; FileTree renders an <input> instead of a name.
|
|
956
|
-
*/
|
|
957
|
-
isDraft?: boolean;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
/**
|
|
961
|
-
* Default "Files" panel: `PanelChrome` + always-visible search input wired to
|
|
962
|
-
* `<FileTreeView>`. Drop into a dockview registry as-is, or compose
|
|
963
|
-
* `FileTreeView` directly when you want different chrome/search UX.
|
|
964
|
-
*/
|
|
965
|
-
export declare function FileTreePane({ params, rootDir, searchQuery: controlledSearchQuery, panelApi, bridge, api, chromeless, filesystem, access, roots, className, }: FileTreePaneProps): JSX.Element;
|
|
966
|
-
|
|
967
|
-
declare interface FileTreePaneParams extends LeftTabParams {
|
|
968
|
-
rootDir?: string;
|
|
969
|
-
searchQuery?: string;
|
|
970
|
-
query?: string;
|
|
971
|
-
bridge?: unknown;
|
|
972
|
-
chromeless?: boolean;
|
|
973
|
-
filesystem?: FilesystemId;
|
|
974
|
-
access?: "readonly" | "readwrite";
|
|
975
|
-
roots?: FileTreeRootConfig[];
|
|
976
|
-
revealFileTreeRequest?: {
|
|
977
|
-
path: string;
|
|
978
|
-
seq: number;
|
|
979
|
-
} | null;
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
export declare interface FileTreePaneProps extends Partial<PaneProps<FileTreePaneParams>> {
|
|
983
|
-
rootDir?: string;
|
|
984
|
-
searchQuery?: string;
|
|
985
|
-
panelApi?: DockviewPanelApi;
|
|
986
|
-
bridge?: FileTreeBridge;
|
|
987
|
-
chromeless?: boolean;
|
|
988
|
-
filesystem?: FilesystemId;
|
|
989
|
-
access?: "readonly" | "readwrite";
|
|
990
|
-
roots?: FileTreeRootConfig[];
|
|
991
|
-
className?: string;
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
export declare interface FileTreeProps {
|
|
995
|
-
files: FileTreeNode[];
|
|
996
|
-
selectedPath?: string | null;
|
|
997
|
-
searchQuery?: string;
|
|
998
|
-
height?: number;
|
|
999
|
-
/** Path of the row whose name should render as an <input>. */
|
|
1000
|
-
editing?: FileTreeEditState | null;
|
|
1001
|
-
/** Path that should be scrolled into view, opening parent folders if needed. */
|
|
1002
|
-
revealPath?: string | null;
|
|
1003
|
-
/** Paths currently being mutated — render a small spinner on those rows. */
|
|
1004
|
-
pendingPaths?: ReadonlySet<string>;
|
|
1005
|
-
onSelect?: (path: string) => void;
|
|
1006
|
-
onExpand?: (path: string) => void;
|
|
1007
|
-
onCollapse?: (path: string) => void;
|
|
1008
|
-
onContextMenu?: (event: React.MouseEvent, node: FileTreeNode) => void;
|
|
1009
|
-
onDragDrop?: (sourcePath: string, targetDirPath: string) => void;
|
|
1010
|
-
/** Called after a reveal request has opened parents and scheduled scrolling. */
|
|
1011
|
-
onRevealHandled?: (path: string) => void;
|
|
1012
|
-
/** Called when the user presses Enter on an inline-edit input. */
|
|
1013
|
-
onSubmitEdit?: (path: string, value: string) => void;
|
|
1014
|
-
/** Called when the user presses Esc or blurs without submitting. */
|
|
1015
|
-
onCancelEdit?: () => void;
|
|
1016
|
-
className?: string;
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
declare interface FileTreeRootConfig {
|
|
1020
|
-
filesystem: FilesystemId;
|
|
1021
|
-
label: string;
|
|
1022
|
-
rootDir?: string;
|
|
1023
|
-
access?: "readonly" | "readwrite";
|
|
1024
|
-
searchPlaceholder?: string;
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
/**
|
|
1028
|
-
* File tree with the full workbench actions: tracks container height,
|
|
1029
|
-
* routes selects through `bridge.openFile`, and provides a right-click
|
|
1030
|
-
* context menu (new file/folder, rename, delete, copy path) plus a
|
|
1031
|
-
* delete-confirmation dialog.
|
|
1032
|
-
*
|
|
1033
|
-
* The chrome (PanelChrome, search input) is the consumer's responsibility.
|
|
1034
|
-
* `FileTreePane` (below) is the default chromed wrapper for hosts that just
|
|
1035
|
-
* want a "Files" panel; `WorkbenchLeftPane` uses this primitive directly to
|
|
1036
|
-
* share its search input with the Data tab.
|
|
1037
|
-
*/
|
|
1038
|
-
export declare function FileTreeView({ rootDir, searchQuery, bridge, revealFileTreeRequest, filesystem, access, ignoreNames, className, }: FileTreeViewProps): JSX.Element;
|
|
1039
|
-
|
|
1040
|
-
export declare interface FileTreeViewProps {
|
|
1041
|
-
rootDir?: string;
|
|
1042
|
-
/** Already-debounced query. Empty/undefined means no filter. */
|
|
1043
|
-
searchQuery?: string;
|
|
1044
|
-
bridge?: FileTreeBridge;
|
|
1045
|
-
revealFileTreeRequest?: {
|
|
1046
|
-
path: string;
|
|
1047
|
-
seq: number;
|
|
1048
|
-
} | null;
|
|
1049
|
-
filesystem?: FilesystemId;
|
|
1050
|
-
access?: "readonly" | "readwrite";
|
|
1051
|
-
/**
|
|
1052
|
-
* Names (or regex patterns) to hide from the tree. Defaults to
|
|
1053
|
-
* `DEFAULT_TREE_IGNORE` (node_modules, .git, dist, …). Pass `[]` to
|
|
1054
|
-
* show everything; pass your own array to override entirely. Patterns
|
|
1055
|
-
* match on file/folder NAME, not the full path.
|
|
1056
|
-
*/
|
|
1057
|
-
ignoreNames?: ReadonlyArray<string | RegExp>;
|
|
1058
|
-
/** Forwarded to the inner <FileTree>. */
|
|
1059
|
-
className?: string;
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
export declare function formatShortcut(binding: Pick<ShortcutBinding, "key" | "mod" | "shift">): string;
|
|
1063
|
-
|
|
1064
|
-
export declare type FrontPluginHotReloadMode = "vite" | false;
|
|
1065
|
-
|
|
1066
|
-
export declare function getFileIcon(filename: string): LucideIcon;
|
|
1067
|
-
|
|
1068
|
-
declare interface GitUrlMetadata {
|
|
1069
|
-
enabled: boolean;
|
|
1070
|
-
reason?: string;
|
|
1071
|
-
url?: string;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
export declare interface GroupConfig {
|
|
1075
|
-
id: string;
|
|
1076
|
-
position: "left" | "center" | "right" | "bottom";
|
|
1077
|
-
panel?: string;
|
|
1078
|
-
params?: Record<string, unknown>;
|
|
1079
|
-
locked?: boolean;
|
|
1080
|
-
hideHeader?: boolean;
|
|
1081
|
-
dynamic?: boolean;
|
|
1082
|
-
placeholder?: string;
|
|
1083
|
-
collapsible?: boolean;
|
|
1084
|
-
collapsedWidth?: number;
|
|
1085
|
-
constraints?: {
|
|
1086
|
-
minWidth?: number;
|
|
1087
|
-
maxWidth?: number;
|
|
1088
|
-
maxWidthViewportRatio?: number;
|
|
1089
|
-
minHeight?: number;
|
|
1090
|
-
maxHeight?: number;
|
|
1091
|
-
};
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
export declare function IdeLayout(props: IdeLayoutProps): JSX.Element;
|
|
1095
|
-
|
|
1096
|
-
export declare interface IdeLayoutProps {
|
|
1097
|
-
sidebar?: string;
|
|
1098
|
-
center?: string;
|
|
1099
|
-
right?: string;
|
|
1100
|
-
className?: string;
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
export declare function isWorkspaceComposerStopDetail(value: unknown): value is WorkspaceComposerStopDetail;
|
|
1104
|
-
|
|
1105
|
-
export declare function isWorkspaceComposerStopReason(value: unknown): value is WorkspaceComposerStopReason;
|
|
1106
|
-
|
|
1107
|
-
export declare type JSONSchema = Record<string, unknown>;
|
|
1108
|
-
|
|
1109
|
-
export declare interface LayoutConfig {
|
|
1110
|
-
version: string;
|
|
1111
|
-
groups: GroupConfig[];
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
export declare type LeftTabComponent = ComponentType<WorkspaceSourceProps<LeftTabParams>>;
|
|
1115
|
-
|
|
1116
|
-
export declare interface LeftTabParams {
|
|
1117
|
-
rootDir?: string;
|
|
1118
|
-
query?: string;
|
|
1119
|
-
searchQuery?: string;
|
|
1120
|
-
bridge?: unknown;
|
|
1121
|
-
chromeless?: boolean;
|
|
1122
|
-
/** Optional DOM target for left-tab toolbar actions owned by the pane. */
|
|
1123
|
-
chromeActionsElement?: Element | null;
|
|
1124
|
-
revealFileTreeRequest?: {
|
|
1125
|
-
path: string;
|
|
1126
|
-
seq: number;
|
|
1127
|
-
} | null;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
export declare function MarkdownEditor({ content, onChange, readOnly, placeholder, className, documentPath, filesystem: rawFilesystem, }: MarkdownEditorProps): JSX.Element;
|
|
1131
|
-
|
|
1132
|
-
export declare function MarkdownEditorPane({ params, api, className }: MarkdownEditorPaneProps): JSX.Element;
|
|
1133
|
-
|
|
1134
|
-
export declare type MarkdownEditorPaneProps = PaneProps<{
|
|
1135
|
-
path?: string;
|
|
1136
|
-
filesystem?: FilesystemId;
|
|
1137
|
-
mode?: "view" | "edit" | "diff";
|
|
1138
|
-
}>;
|
|
1139
|
-
|
|
1140
|
-
export declare interface MarkdownEditorProps {
|
|
1141
|
-
content: string;
|
|
1142
|
-
onChange?: (content: string) => void;
|
|
1143
|
-
readOnly?: boolean;
|
|
1144
|
-
placeholder?: string;
|
|
1145
|
-
className?: string;
|
|
1146
|
-
/** Workspace-relative markdown file path, used to make uploaded image links relative. */
|
|
1147
|
-
documentPath?: string;
|
|
1148
|
-
/** Filesystem identity for relative markdown links/assets. Defaults to user. */
|
|
1149
|
-
filesystem?: FilesystemId;
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
export declare const MAX_PANELS = 50;
|
|
1153
|
-
|
|
1154
|
-
export declare const navigateToLineSchema: z.ZodObject<{
|
|
1155
|
-
file: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1156
|
-
line: z.ZodNumber;
|
|
1157
|
-
}, "strip", z.ZodTypeAny, {
|
|
1158
|
-
line: number;
|
|
1159
|
-
file: string;
|
|
1160
|
-
}, {
|
|
1161
|
-
line: number;
|
|
1162
|
-
file: string;
|
|
1163
|
-
}>;
|
|
1164
|
-
|
|
1165
|
-
declare interface Notification_2 {
|
|
1166
|
-
id: string;
|
|
1167
|
-
message: string;
|
|
1168
|
-
type: "info" | "warning" | "error";
|
|
1169
|
-
timestamp: number;
|
|
1170
|
-
}
|
|
1171
|
-
export { Notification_2 as Notification }
|
|
1172
|
-
|
|
1173
|
-
export declare const notificationSchema: z.ZodObject<{
|
|
1174
|
-
msg: z.ZodString;
|
|
1175
|
-
level: z.ZodOptional<z.ZodEnum<["info", "warn", "error"]>>;
|
|
1176
|
-
}, "strip", z.ZodTypeAny, {
|
|
1177
|
-
msg: string;
|
|
1178
|
-
level?: "error" | "info" | "warn" | undefined;
|
|
1179
|
-
}, {
|
|
1180
|
-
msg: string;
|
|
1181
|
-
level?: "error" | "info" | "warn" | undefined;
|
|
1182
|
-
}>;
|
|
1183
|
-
|
|
1184
|
-
/** Subscribe to file-changed events. Returns the unsubscribe function. */
|
|
1185
|
-
export declare function onFilesystemChanged(handler: (payload: FilesystemEventMeta & {
|
|
1186
|
-
path: string;
|
|
1187
|
-
}) => void): () => void;
|
|
1188
|
-
|
|
1189
|
-
export declare type OpenArtifactHandler = (path: string, options?: {
|
|
1190
|
-
filesystem?: FilesystemId;
|
|
1191
|
-
}) => void;
|
|
1192
|
-
|
|
1193
|
-
export declare const openFileSchema: z.ZodObject<{
|
|
1194
|
-
path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1195
|
-
mode: z.ZodOptional<z.ZodEnum<["view", "edit", "diff"]>>;
|
|
1196
|
-
filesystem: z.ZodOptional<z.ZodString>;
|
|
1197
|
-
}, "strip", z.ZodTypeAny, {
|
|
1198
|
-
path: string;
|
|
1199
|
-
filesystem?: string | undefined;
|
|
1200
|
-
mode?: "view" | "edit" | "diff" | undefined;
|
|
1201
|
-
}, {
|
|
1202
|
-
path: string;
|
|
1203
|
-
filesystem?: string | undefined;
|
|
1204
|
-
mode?: "view" | "edit" | "diff" | undefined;
|
|
1205
|
-
}>;
|
|
1206
|
-
|
|
1207
|
-
export declare interface OpenPanelConfig {
|
|
1208
|
-
/** Panel instance id. If a panel with this id is already open, it's re-activated instead of duplicated. */
|
|
1209
|
-
id: string;
|
|
1210
|
-
/** Registered component id (must match a `PanelConfig.id` in WorkspaceProvider's panel registry). */
|
|
1211
|
-
component: string;
|
|
1212
|
-
/** Tab title. Defaults to `id`. */
|
|
1213
|
-
title?: string;
|
|
1214
|
-
/** Arbitrary params passed to the pane component. */
|
|
1215
|
-
params?: Record<string, unknown>;
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
export declare const openPanelSchema: z.ZodObject<{
|
|
1219
|
-
id: z.ZodString;
|
|
1220
|
-
component: z.ZodString;
|
|
1221
|
-
params: z.ZodEffects<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>, Record<string, unknown> | undefined, Record<string, unknown> | undefined>;
|
|
1222
|
-
title: z.ZodOptional<z.ZodString>;
|
|
1223
|
-
}, "strip", z.ZodTypeAny, {
|
|
1224
|
-
id: string;
|
|
1225
|
-
component: string;
|
|
1226
|
-
title?: string | undefined;
|
|
1227
|
-
params?: Record<string, unknown> | undefined;
|
|
1228
|
-
}, {
|
|
1229
|
-
id: string;
|
|
1230
|
-
component: string;
|
|
1231
|
-
title?: string | undefined;
|
|
1232
|
-
params?: Record<string, unknown> | undefined;
|
|
1233
|
-
}>;
|
|
1234
|
-
|
|
1235
|
-
/**
|
|
1236
|
-
* Discriminated origin metadata. Encoded as a union (rather than a
|
|
1237
|
-
* flat `cause` + optional `toolCallId`) so the type system enforces
|
|
1238
|
-
* that agent-originated events always carry a tool call id.
|
|
1239
|
-
*/
|
|
1240
|
-
export declare type Origin = {
|
|
1241
|
-
cause: "user";
|
|
1242
|
-
} | {
|
|
1243
|
-
cause: "agent";
|
|
1244
|
-
toolCallId: string;
|
|
1245
|
-
}
|
|
1246
|
-
/**
|
|
1247
|
-
* Anything observed via the server-side fs watcher: a collaborator
|
|
1248
|
-
* editing the same workspace, a git pull, an external editor, the
|
|
1249
|
-
* agent in another tab. Carries the tool call id ONLY when the
|
|
1250
|
-
* server can attribute the change (sandbox emits its own writes
|
|
1251
|
-
* with attribution; chokidar can't). Consumers that want to
|
|
1252
|
-
* suppress UX side-effects on self-echo compare `actorClientId` (a
|
|
1253
|
-
* future field) against their own.
|
|
1254
|
-
*/
|
|
1255
|
-
| {
|
|
1256
|
-
cause: "remote";
|
|
1257
|
-
toolCallId?: string;
|
|
1258
|
-
};
|
|
1259
|
-
|
|
1260
|
-
export declare function PanelChrome({ title, icon: Icon, essential, children, className, panelApi, }: PanelChromeProps): JSX.Element;
|
|
1261
|
-
|
|
1262
|
-
declare interface PanelChromeProps {
|
|
1263
|
-
title: string;
|
|
1264
|
-
icon?: ComponentType<{
|
|
1265
|
-
className?: string;
|
|
1266
|
-
}>;
|
|
1267
|
-
essential?: boolean;
|
|
1268
|
-
children: ReactNode;
|
|
1269
|
-
className?: string;
|
|
1270
|
-
panelApi?: DockviewPanelApi;
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
export declare interface PanelConfig<T = any> {
|
|
1274
|
-
id: string;
|
|
1275
|
-
title: string;
|
|
1276
|
-
icon?: ComponentType<{
|
|
1277
|
-
className?: string;
|
|
1278
|
-
}>;
|
|
1279
|
-
/** Placement hint. Public plugin placements: "workspace-page" | "shared-dockview". */
|
|
1280
|
-
placement?: PanelPlacement | string;
|
|
1281
|
-
requiresCapabilities?: string[];
|
|
1282
|
-
essential?: boolean;
|
|
1283
|
-
chromeless?: boolean;
|
|
1284
|
-
supportsFullPage?: boolean;
|
|
1285
|
-
/** Source: "builtin" | "app" */
|
|
1286
|
-
source?: string;
|
|
1287
|
-
pluginId?: string;
|
|
1288
|
-
/** Revision emitted by the runtime plugin asset manager for hot-loaded panels. */
|
|
1289
|
-
pluginRevision?: number;
|
|
1290
|
-
/**
|
|
1291
|
-
* Whether to wrap the component with React.lazy + Suspense. Omit to let
|
|
1292
|
-
* the registry auto-detect: zero-arg functions (factories) are treated as
|
|
1293
|
-
* lazy; components that accept a props argument are treated as eager.
|
|
1294
|
-
*/
|
|
1295
|
-
lazy?: boolean;
|
|
1296
|
-
component: ComponentType<PaneProps<T>> | (() => Promise<{
|
|
1297
|
-
default: ComponentType<PaneProps<T>>;
|
|
1298
|
-
}>);
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
export declare class PanelErrorBoundary extends Component<PanelErrorBoundaryProps, State_2> {
|
|
1302
|
-
state: State_2;
|
|
1303
|
-
static getDerivedStateFromError(error: Error): State_2;
|
|
1304
|
-
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
1305
|
-
handleRetry: () => void;
|
|
1306
|
-
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | JSX.Element | null | undefined;
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
export declare interface PanelErrorBoundaryProps {
|
|
1310
|
-
panelId: string;
|
|
1311
|
-
onError?: (data: {
|
|
1312
|
-
panelId: string;
|
|
1313
|
-
error: string;
|
|
1314
|
-
stack?: string;
|
|
1315
|
-
}) => void;
|
|
1316
|
-
children: ReactNode;
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
export declare interface PanelLifecycleApi {
|
|
1320
|
-
panelId: string;
|
|
1321
|
-
title: string;
|
|
1322
|
-
setTitle(title: string): void;
|
|
1323
|
-
close(): void;
|
|
1324
|
-
focus(): void;
|
|
1325
|
-
isActive: boolean;
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
declare type PanelPlacement = "left" | "center" | "right" | "bottom" | "shared-dockview" | "workspace-page" | "right-tab";
|
|
1329
|
-
|
|
1330
|
-
export declare type PanelRegistration<T = any> = Omit<PanelConfig<T>, 'id'>;
|
|
1331
|
-
|
|
1332
|
-
export declare class PanelRegistry {
|
|
1333
|
-
private panels;
|
|
1334
|
-
private registrationOrder;
|
|
1335
|
-
private capabilities;
|
|
1336
|
-
private listeners;
|
|
1337
|
-
private snapshotCache;
|
|
1338
|
-
private lazyComponentCache;
|
|
1339
|
-
private wrapperComponentCache;
|
|
1340
|
-
private generation;
|
|
1341
|
-
constructor(capabilities?: Record<string, boolean>);
|
|
1342
|
-
register(id: string, config: PanelRegistration): void;
|
|
1343
|
-
unregister(id: string): void;
|
|
1344
|
-
/**
|
|
1345
|
-
* Atomic replace: unregister all panels owned by `pluginId`, then register
|
|
1346
|
-
* the new set, in one emit cycle. Subscribers see exactly one intermediate
|
|
1347
|
-
* state — never an empty registry between unregister and re-register.
|
|
1348
|
-
*
|
|
1349
|
-
* Collision policy: a new registration whose id is already owned by a
|
|
1350
|
-
* DIFFERENT pluginId is skipped with a warning. Preserves cross-plugin
|
|
1351
|
-
* isolation during reload — a renamed plugin can't silently steal another
|
|
1352
|
-
* plugin's panel id. Teardown + rebuild as a single observable transition,
|
|
1353
|
-
* driven by the front-side SSE reload subscriber.
|
|
1354
|
-
*/
|
|
1355
|
-
replaceByPluginId(pluginId: string, panels: PanelConfig[]): void;
|
|
1356
|
-
get(id: string): PanelConfig | undefined;
|
|
1357
|
-
has(id: string): boolean;
|
|
1358
|
-
list(): PanelConfig[];
|
|
1359
|
-
listAll(): PanelConfig[];
|
|
1360
|
-
getComponents(): Record<string, ComponentType<any>>;
|
|
1361
|
-
subscribe: (cb: () => void) => (() => void);
|
|
1362
|
-
getSnapshot: () => readonly PanelConfig[];
|
|
1363
|
-
private getWrappedComponent;
|
|
1364
|
-
private getLazyComponent;
|
|
1365
|
-
private emit;
|
|
1366
|
-
private filteredPanels;
|
|
1367
|
-
private satisfiesCapabilities;
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
export declare interface PanelRegistryLike {
|
|
1371
|
-
register(id: string, config: PanelRegistration): void;
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
export declare type PanelRenderMode = "dock" | "full-page";
|
|
1375
|
-
|
|
1376
|
-
export declare interface PanelState {
|
|
1377
|
-
id: string;
|
|
1378
|
-
component: string;
|
|
1379
|
-
params?: Record<string, unknown>;
|
|
1380
|
-
groupId?: string;
|
|
1381
|
-
essential?: boolean;
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
/**
|
|
1385
|
-
* Unified prop shape for panel components rendered inside DockviewShell.
|
|
1386
|
-
*
|
|
1387
|
-
* Structurally mirrors dockview's `IDockviewPanelProps<T>` so dockview
|
|
1388
|
-
* can render registered components directly — no wrapper, no field
|
|
1389
|
-
* renaming, no `as` casts. We re-state the shape (rather than re-export
|
|
1390
|
-
* dockview's type) so the workspace package owns its public contract:
|
|
1391
|
-
* if dockview's type ever drifts, only the wiring inside DockviewShell
|
|
1392
|
-
* needs to change.
|
|
1393
|
-
*
|
|
1394
|
-
* Use {@link definePanel} for type-safe registration.
|
|
1395
|
-
*
|
|
1396
|
-
* @typeParam T - Shape of the panel-specific `params` payload. Defaults
|
|
1397
|
-
* to `unknown` because layouts restored from JSON are inherently
|
|
1398
|
-
* un-typed at runtime; use a generic param when you control the
|
|
1399
|
-
* addPanel call site, otherwise read defensively.
|
|
1400
|
-
*/
|
|
1401
|
-
export declare interface PaneProps<T = unknown> {
|
|
1402
|
-
/** App-supplied data for this panel instance (e.g. `{ path: string }`). */
|
|
1403
|
-
params: T;
|
|
1404
|
-
/** Per-panel control surface (close, setActive, setTitle, …). */
|
|
1405
|
-
api: DockviewPanelApi;
|
|
1406
|
-
/** Top-level dockview API (groups, addPanel, removePanel, fromJSON, …). */
|
|
1407
|
-
containerApi: DockviewApi;
|
|
1408
|
-
/** Optional className forwarded to the pane's root element. */
|
|
1409
|
-
className?: string;
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
export declare type PluginBinding = ComponentType<unknown>;
|
|
1413
|
-
|
|
1414
|
-
export declare interface PluginContributionError {
|
|
1415
|
-
kind: "contribution";
|
|
1416
|
-
pluginId: string;
|
|
1417
|
-
contributionKind: "panel" | "workspace-source" | "catalog-row" | "chat-suggestion" | "app-left-action";
|
|
1418
|
-
contributionId?: string;
|
|
1419
|
-
error: Error;
|
|
1420
|
-
componentStack?: string | null;
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
export declare class PluginError extends Error {
|
|
1424
|
-
readonly kind: PluginErrorKind;
|
|
1425
|
-
constructor(kind: PluginErrorKind, message: string);
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
export declare class PluginErrorBoundary extends Component<Props, State> {
|
|
1429
|
-
static contextType: Context< PluginErrorContextValue | null>;
|
|
1430
|
-
context: React.ContextType<typeof PluginErrorContext>;
|
|
1431
|
-
state: State;
|
|
1432
|
-
static getDerivedStateFromError(error: Error): State;
|
|
1433
|
-
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
1434
|
-
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | JSX.Element | null | undefined;
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
declare const PluginErrorContext: Context<PluginErrorContextValue | null>;
|
|
1438
|
-
|
|
1439
|
-
declare interface PluginErrorContextValue {
|
|
1440
|
-
errors: PluginContributionError[];
|
|
1441
|
-
reportPluginError: (error: PluginContributionError) => void;
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
export declare type PluginErrorKind = "duplicate-id" | "validation" | "runtime";
|
|
1445
|
-
|
|
1446
|
-
export declare function PluginErrorProvider({ children }: {
|
|
1447
|
-
children: ReactNode;
|
|
1448
|
-
}): JSX.Element;
|
|
1449
|
-
|
|
1450
|
-
export declare type PluginProvider = ComponentType<PluginProviderProps>;
|
|
1451
|
-
|
|
1452
|
-
export declare interface PluginProviderProps {
|
|
1453
|
-
apiBaseUrl: string;
|
|
1454
|
-
authHeaders?: Record<string, string>;
|
|
1455
|
-
onAuthError?: (statusCode: number) => void;
|
|
1456
|
-
apiTimeout?: number;
|
|
1457
|
-
activeSessionId?: string | null;
|
|
1458
|
-
openSessionIds?: readonly string[];
|
|
1459
|
-
children: ReactNode;
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
export declare function postUiCommand(command: UiCommand): void;
|
|
1463
|
-
|
|
1464
|
-
declare interface Props {
|
|
1465
|
-
pluginId: string;
|
|
1466
|
-
contributionKind: "panel" | "workspace-source" | "catalog-row" | "chat-suggestion" | "app-left-action";
|
|
1467
|
-
contributionId?: string;
|
|
1468
|
-
children?: ReactNode;
|
|
1469
|
-
onError?: (error: Error, info: ErrorInfo) => void;
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
export declare function readFileRecords(options: ReadFileRecordsOptions): Promise<FileRecordsResult>;
|
|
1473
|
-
|
|
1474
|
-
export declare interface ReadFileRecordsOptions {
|
|
1475
|
-
path: string;
|
|
1476
|
-
recordSet?: string;
|
|
1477
|
-
offset?: number;
|
|
1478
|
-
limit?: number;
|
|
1479
|
-
q?: string;
|
|
1480
|
-
apiBaseUrl?: string;
|
|
1481
|
-
headers?: Record<string, string>;
|
|
1482
|
-
workspaceId?: string;
|
|
1483
|
-
signal?: AbortSignal;
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
declare interface RegisteredPluginMeta {
|
|
1487
|
-
id: string;
|
|
1488
|
-
label?: string;
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
export declare function RegistryProvider({ panelRegistry, workspaceSourceRegistry, commandRegistry, catalogRegistry, surfaceResolverRegistry, children, }: RegistryProviderProps): JSX.Element;
|
|
1492
|
-
|
|
1493
|
-
declare interface RegistryProviderProps {
|
|
1494
|
-
panelRegistry: PanelRegistry;
|
|
1495
|
-
workspaceSourceRegistry?: WorkspaceSourceRegistry;
|
|
1496
|
-
commandRegistry: CommandRegistry;
|
|
1497
|
-
catalogRegistry?: CatalogRegistry;
|
|
1498
|
-
surfaceResolverRegistry?: SurfaceResolverRegistry;
|
|
1499
|
-
children: ReactNode;
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
export declare function ResponsiveDockviewShell({ layout, className, }: ResponsiveDockviewShellProps): JSX.Element;
|
|
1503
|
-
|
|
1504
|
-
export declare interface ResponsiveDockviewShellProps {
|
|
1505
|
-
layout: LayoutConfig;
|
|
1506
|
-
className?: string;
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
export declare type SerializedLayout = Parameters<DockviewApi["fromJSON"]>[0];
|
|
1510
|
-
|
|
1511
|
-
export declare function SessionBrowser({ sessions, activeId, openIds, pinnedIds, onTogglePin, onSwitch, onOpenAsTab, onCreate, onDelete, onLoadMore, hasMore, loadingMore, onClose, className, }: SessionBrowserProps): JSX.Element;
|
|
1512
|
-
|
|
1513
|
-
export declare interface SessionBrowserProps {
|
|
1514
|
-
sessions: SessionItem[];
|
|
1515
|
-
activeId?: string | null;
|
|
1516
|
-
/** Session ids currently open as chat panes, in pane order. */
|
|
1517
|
-
openIds?: string[];
|
|
1518
|
-
/** Session ids the user pinned; surfaced in a Pinned section on top. */
|
|
1519
|
-
pinnedIds?: string[];
|
|
1520
|
-
onTogglePin?: (id: string) => void;
|
|
1521
|
-
onSwitch?: (id: string) => void;
|
|
1522
|
-
onOpenAsTab?: (id: string) => void;
|
|
1523
|
-
onCreate?: () => void;
|
|
1524
|
-
onDelete?: (id: string) => void;
|
|
1525
|
-
onLoadMore?: () => void;
|
|
1526
|
-
hasMore?: boolean;
|
|
1527
|
-
loadingMore?: boolean;
|
|
1528
|
-
onClose?: () => void;
|
|
1529
|
-
className?: string;
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
export declare interface SessionItem {
|
|
1533
|
-
id: string;
|
|
1534
|
-
title: string;
|
|
1535
|
-
updatedAt?: string | number;
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
export declare function SessionList({ sessions, activeId, onSwitch, onCreate, onDelete, className, }: SessionListProps): JSX.Element;
|
|
1539
|
-
|
|
1540
|
-
export declare interface SessionListProps {
|
|
1541
|
-
sessions: SessionItem[];
|
|
1542
|
-
activeId?: string | null;
|
|
1543
|
-
onSwitch?: (id: string) => void;
|
|
1544
|
-
onCreate?: () => void;
|
|
1545
|
-
onDelete?: (id: string) => void;
|
|
1546
|
-
onRename?: (id: string, newTitle: string) => void;
|
|
1547
|
-
className?: string;
|
|
1548
|
-
}
|
|
1549
|
-
|
|
1550
|
-
export declare interface ShortcutBinding {
|
|
1551
|
-
key: string;
|
|
1552
|
-
mod?: boolean;
|
|
1553
|
-
shift?: boolean;
|
|
1554
|
-
allowInEditable?: boolean;
|
|
1555
|
-
handler: () => void;
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
export declare interface SidebarState {
|
|
1559
|
-
collapsed: boolean;
|
|
1560
|
-
width: number;
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
declare interface State {
|
|
1564
|
-
error: Error | null;
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
declare interface State_2 {
|
|
1568
|
-
hasError: boolean;
|
|
1569
|
-
error: Error | null;
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
declare type StoreApi = {
|
|
1573
|
-
getState: () => WorkspaceStore;
|
|
1574
|
-
subscribe: (listener: (state: WorkspaceStore, prev: WorkspaceStore) => void) => () => void;
|
|
1575
|
-
};
|
|
1576
|
-
|
|
1577
|
-
declare type StoreApi_2 = {
|
|
1578
|
-
getState: () => WorkspaceStore;
|
|
1579
|
-
subscribe: (listener: (state: WorkspaceStore, prev: WorkspaceStore) => void) => () => void;
|
|
1580
|
-
};
|
|
1581
|
-
|
|
1582
|
-
export declare interface SurfaceOpenRequest {
|
|
1583
|
-
kind: string;
|
|
1584
|
-
target: string;
|
|
1585
|
-
filesystem?: FilesystemId;
|
|
1586
|
-
meta?: Record<string, unknown>;
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
|
-
export declare interface SurfacePanelResolution {
|
|
1590
|
-
component: string;
|
|
1591
|
-
id?: string;
|
|
1592
|
-
title?: string;
|
|
1593
|
-
params?: Record<string, unknown>;
|
|
1594
|
-
score?: number;
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
export declare interface SurfaceResolverConfig extends SurfaceResolverMetadata {
|
|
1598
|
-
id: string;
|
|
1599
|
-
resolve: (request: SurfaceOpenRequest) => SurfacePanelResolution | undefined;
|
|
1600
|
-
source?: string;
|
|
1601
|
-
pluginId?: string;
|
|
1602
|
-
}
|
|
1603
|
-
|
|
1604
|
-
declare interface SurfaceResolverExample {
|
|
1605
|
-
target: string;
|
|
1606
|
-
label?: string;
|
|
1607
|
-
meta?: Record<string, unknown>;
|
|
1608
|
-
}
|
|
1609
|
-
|
|
1610
|
-
declare interface SurfaceResolverMetadata {
|
|
1611
|
-
kind?: string;
|
|
1612
|
-
title?: string;
|
|
1613
|
-
description?: string;
|
|
1614
|
-
targetHint?: string;
|
|
1615
|
-
examples?: SurfaceResolverExample[];
|
|
1616
|
-
metaSchema?: Record<string, unknown>;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
export declare type SurfaceResolverRegistration = Omit<SurfaceResolverConfig, "id">;
|
|
1620
|
-
|
|
1621
|
-
export declare class SurfaceResolverRegistry {
|
|
1622
|
-
private resolvers;
|
|
1623
|
-
private registrationOrder;
|
|
1624
|
-
private listeners;
|
|
1625
|
-
private snapshotCache;
|
|
1626
|
-
register(id: string, config: SurfaceResolverRegistration): void;
|
|
1627
|
-
unregister(id: string): void;
|
|
1628
|
-
/**
|
|
1629
|
-
* Atomic replace by pluginId: drop owned resolvers and register the new
|
|
1630
|
-
* set in one emit. Pi parity for reload semantics.
|
|
1631
|
-
*
|
|
1632
|
-
* Collision policy: a new resolver id already owned by a DIFFERENT
|
|
1633
|
-
* pluginId is skipped with a warning.
|
|
1634
|
-
*/
|
|
1635
|
-
replaceByPluginId(pluginId: string, resolvers: SurfaceResolverConfig[]): void;
|
|
1636
|
-
get(id: string): SurfaceResolverConfig | undefined;
|
|
1637
|
-
has(id: string): boolean;
|
|
1638
|
-
list(): SurfaceResolverConfig[];
|
|
1639
|
-
resolve(request: SurfaceOpenRequest): SurfacePanelResolution | undefined;
|
|
1640
|
-
subscribe: (cb: () => void) => (() => void);
|
|
1641
|
-
getSnapshot: () => readonly SurfaceResolverConfig[];
|
|
1642
|
-
private emit;
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
export declare interface SurfaceResolverRegistryLike {
|
|
1646
|
-
register(id: string, config: SurfaceResolverRegistration): void;
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
|
-
export declare function SurfaceShell({ rootDir, sidebarDefaultWidth, sidebarMinWidth, sidebarMaxWidth, storageKey, onReady, onChange, onClose, showCloseAction, extraPanels, defaultLeftTab, onReloadAgentPlugins, initialPanels, className, }: SurfaceShellProps): JSX.Element;
|
|
1650
|
-
|
|
1651
|
-
export declare interface SurfaceShellApi {
|
|
1652
|
-
/** Open a file in the workbench. Idempotent — re-activates an existing pane for the same filesystem/path. */
|
|
1653
|
-
openFile: (path: string, options?: SurfaceShellOpenFileOptions) => void;
|
|
1654
|
-
/** Open a plugin-defined surface target through the registered surface resolvers. */
|
|
1655
|
-
openSurface: (request: SurfaceOpenRequest) => void;
|
|
1656
|
-
/**
|
|
1657
|
-
* Open a non-file pane in the workbench. Idempotent on `id` —
|
|
1658
|
-
* re-activates an existing panel with the same id rather than duplicating.
|
|
1659
|
-
* Use this for app-specific panes (charts, dashboards, log viewers, …) that
|
|
1660
|
-
* aren't anchored to a filesystem path.
|
|
1661
|
-
*/
|
|
1662
|
-
openPanel: (config: OpenPanelConfig) => void;
|
|
1663
|
-
/** Hide the workbench's left sources/files pane while leaving the workbench open. */
|
|
1664
|
-
closeWorkbenchLeftPane: () => void;
|
|
1665
|
-
/** Reveal/select a file-tree path without opening an editor pane. */
|
|
1666
|
-
expandToFile: (path: string) => void;
|
|
1667
|
-
/** Current snapshot of open tabs + active tab. */
|
|
1668
|
-
getSnapshot: () => SurfaceShellSnapshot;
|
|
1669
|
-
}
|
|
1670
|
-
|
|
1671
|
-
declare interface SurfaceShellOpenFileOptions {
|
|
1672
|
-
filesystem?: FilesystemId;
|
|
1673
|
-
mode?: "view" | "edit" | "diff";
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
export declare interface SurfaceShellProps {
|
|
1677
|
-
rootDir?: string;
|
|
1678
|
-
sidebarDefaultWidth?: number;
|
|
1679
|
-
sidebarMinWidth?: number;
|
|
1680
|
-
sidebarMaxWidth?: number;
|
|
1681
|
-
storageKey?: string;
|
|
1682
|
-
/** Called once when the surface dockview becomes ready, with an imperative handle. */
|
|
1683
|
-
onReady?: (api: SurfaceShellApi) => void;
|
|
1684
|
-
/** Called on every panel add/remove/active-change with the current snapshot. */
|
|
1685
|
-
onChange?: (snapshot: SurfaceShellSnapshot) => void;
|
|
1686
|
-
/** Optional close action for hosts that model the workbench as collapsible. */
|
|
1687
|
-
onClose?: () => void;
|
|
1688
|
-
/** Render the built-in top-right close affordance. Hosts can set false when they provide their own chrome. */
|
|
1689
|
-
showCloseAction?: boolean;
|
|
1690
|
-
/**
|
|
1691
|
-
* Extra panel ids (registered via WorkspaceProvider's `panels` prop) that
|
|
1692
|
-
* this workbench is allowed to render. Defaults to the built-in
|
|
1693
|
-
* editor/viewer panels only. Pass app-specific pane ids here so calls
|
|
1694
|
-
* like `surface.openPanel({ component: "chart-canvas" })` actually
|
|
1695
|
-
* instantiate — without this, dockview's components map filters them
|
|
1696
|
-
* out and you get an empty tab. Two-layer defense: SurfaceShell.openPanel
|
|
1697
|
-
* validates against the registry (loud throw on unknown), AND the
|
|
1698
|
-
* dockview allowlist below filters which registered panels can mount
|
|
1699
|
-
* inside THIS surface (so a host can gate panels per shell instance).
|
|
1700
|
-
*/
|
|
1701
|
-
extraPanels?: string[];
|
|
1702
|
-
defaultLeftTab?: string;
|
|
1703
|
-
onReloadAgentPlugins?: () => void | Promise<unknown>;
|
|
1704
|
-
initialPanels?: Array<{
|
|
1705
|
-
id: string;
|
|
1706
|
-
component: string;
|
|
1707
|
-
title?: string;
|
|
1708
|
-
params?: Record<string, unknown>;
|
|
1709
|
-
}>;
|
|
1710
|
-
className?: string;
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
export declare interface SurfaceShellSnapshot {
|
|
1714
|
-
openTabs: SurfaceShellTab[];
|
|
1715
|
-
activeTab: string | null;
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
export declare interface SurfaceShellTab {
|
|
1719
|
-
id: string;
|
|
1720
|
-
/** Registered panel component id for this tab. May differ from the tab instance id. */
|
|
1721
|
-
component?: string;
|
|
1722
|
-
title: string;
|
|
1723
|
-
params?: Record<string, unknown>;
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
export declare function ThemeProvider({ children, defaultTheme, onThemeChange }: ThemeProviderProps): JSX.Element;
|
|
1727
|
-
|
|
1728
|
-
export declare interface ThemeProviderProps {
|
|
1729
|
-
children: ReactNode;
|
|
1730
|
-
defaultTheme?: "light" | "dark";
|
|
1731
|
-
onThemeChange?: (theme: "light" | "dark") => void;
|
|
1732
|
-
}
|
|
1733
|
-
|
|
1734
|
-
export { toast }
|
|
1735
|
-
|
|
1736
|
-
export { ToastApi }
|
|
1737
|
-
|
|
1738
|
-
export { Toaster }
|
|
1739
|
-
|
|
1740
|
-
export { ToasterProps }
|
|
1741
|
-
|
|
1742
|
-
export { ToastInput }
|
|
1743
|
-
|
|
1744
|
-
export { ToastRecord }
|
|
1745
|
-
|
|
1746
|
-
export { ToastVariant }
|
|
1747
|
-
|
|
1748
|
-
export declare interface ToolExecContext {
|
|
1749
|
-
abortSignal: AbortSignal;
|
|
1750
|
-
toolCallId: string;
|
|
1751
|
-
onUpdate?: (partial: string) => void;
|
|
1752
|
-
/** Agent chat/session id executing this tool, when known. */
|
|
1753
|
-
sessionId?: string;
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1756
|
-
declare type ToolReadinessRequirement = 'workspace-fs' | 'sandbox-exec' | 'ui-bridge' | 'runtime-dependencies' | `runtime:${string}`;
|
|
1757
|
-
|
|
1758
|
-
export declare interface ToolResult {
|
|
1759
|
-
content: Array<{
|
|
1760
|
-
type: "text";
|
|
1761
|
-
text: string;
|
|
1762
|
-
}>;
|
|
1763
|
-
isError?: boolean;
|
|
1764
|
-
details?: unknown;
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
export declare function TopBar({ appTitle, sessionTitle, onCommandPalette, onNewChat, topBarLeft, topBarRight, className, }: TopBarProps): JSX.Element;
|
|
1768
|
-
|
|
1769
|
-
export declare interface TopBarProps {
|
|
1770
|
-
appTitle?: string;
|
|
1771
|
-
sessionTitle?: string;
|
|
1772
|
-
onCommandPalette?: () => void;
|
|
1773
|
-
onNewChat?: () => void;
|
|
1774
|
-
/** Override the brand/title block on the left. Hosts pass workspace
|
|
1775
|
-
* switchers, breadcrumbs, etc. here. When set, the default
|
|
1776
|
-
* `[B] appTitle / sessionTitle` block is replaced entirely. */
|
|
1777
|
-
topBarLeft?: ReactNode;
|
|
1778
|
-
/** Override the avatar on the right. The new-chat (+) button stays —
|
|
1779
|
-
* it's session-mechanic, not host chrome. Hosts pass theme toggles,
|
|
1780
|
-
* user menus, etc. here. */
|
|
1781
|
-
topBarRight?: ReactNode;
|
|
1782
|
-
className?: string;
|
|
1783
|
-
}
|
|
1784
|
-
|
|
1785
|
-
export declare const UI_COMMAND_EVENT = "boring-workspace:ui-command";
|
|
1786
|
-
|
|
1787
|
-
export declare interface UiCommand {
|
|
1788
|
-
v?: number;
|
|
1789
|
-
seq?: number;
|
|
1790
|
-
kind: string;
|
|
1791
|
-
params: Record<string, unknown>;
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
export declare interface UIStatePut {
|
|
1795
|
-
v: 1;
|
|
1796
|
-
causedBy: CausedBy;
|
|
1797
|
-
openPanels: PanelState[];
|
|
1798
|
-
activePanel: string | null;
|
|
1799
|
-
activeFile: string | null;
|
|
1800
|
-
visibleFiles: string[];
|
|
1801
|
-
dirtyFiles: string[];
|
|
1802
|
-
}
|
|
1803
|
-
|
|
1804
|
-
export declare type Unsubscribe = () => void;
|
|
1805
|
-
|
|
1806
|
-
export declare function useActiveFile(): string | null;
|
|
1807
|
-
|
|
1808
|
-
export declare function useActivePanel(): string | null;
|
|
1809
|
-
|
|
1810
|
-
export declare function useActivePanels(): readonly PanelConfig[];
|
|
1811
|
-
|
|
1812
|
-
export declare function useApiBaseUrl(): string;
|
|
1813
|
-
|
|
1814
|
-
export declare function useAppLeftOverlayChrome(): AppLeftOverlayChromeValue;
|
|
1815
|
-
|
|
1816
|
-
export declare function useArtifactPanels(surfaceApi: DockviewShellApi | null): UseArtifactPanelsReturn;
|
|
1817
|
-
|
|
1818
|
-
export declare interface UseArtifactPanelsReturn {
|
|
1819
|
-
panels: ArtifactPanel[];
|
|
1820
|
-
open: (panel: ArtifactPanel) => void;
|
|
1821
|
-
close: (panelId: string) => void;
|
|
1822
|
-
activate: (panelId: string) => void;
|
|
1823
|
-
isOpen: (panelId: string) => boolean;
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
|
-
export declare function useArtifactRouting(artifactPanels: UseArtifactPanelsReturn, opts?: UseArtifactRoutingOptions): UseArtifactRoutingReturn;
|
|
1827
|
-
|
|
1828
|
-
export declare interface UseArtifactRoutingOptions {
|
|
1829
|
-
toolPanelMap?: Record<string, string>;
|
|
1830
|
-
}
|
|
1831
|
-
|
|
1832
|
-
export declare interface UseArtifactRoutingReturn {
|
|
1833
|
-
openForTool: (toolName: string, params: {
|
|
1834
|
-
path: string;
|
|
1835
|
-
[key: string]: unknown;
|
|
1836
|
-
}) => void;
|
|
1837
|
-
resolvePanel: (toolName: string) => string | undefined;
|
|
1838
|
-
}
|
|
1839
|
-
|
|
1840
|
-
export declare function useAutoOpenAgentFiles(onOpen: (path: string) => void, options?: UseAutoOpenAgentFilesOptions): void;
|
|
1841
|
-
|
|
1842
|
-
export declare interface UseAutoOpenAgentFilesOptions {
|
|
1843
|
-
skip?: (path: string) => boolean;
|
|
1844
|
-
filesOnly?: boolean;
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
export declare function useCatalogRegistry(): CatalogRegistry;
|
|
1848
|
-
|
|
1849
|
-
export declare function useCatalogs(): readonly CatalogConfig[];
|
|
1850
|
-
|
|
1851
|
-
export declare function useCommandRegistry(): CommandRegistry;
|
|
1852
|
-
|
|
1853
|
-
export declare function useCommands(): readonly CommandConfig[];
|
|
1854
|
-
|
|
1855
|
-
export declare function useDirtyFiles(): Record<string, {
|
|
1856
|
-
panelId: string;
|
|
1857
|
-
savedAt: number | null;
|
|
1858
|
-
}>;
|
|
1859
|
-
|
|
1860
|
-
export declare function useDockviewApi(): DockviewShellApi;
|
|
1861
|
-
|
|
1862
|
-
export declare function useEditorLifecycle(path: string | null, opts: UseEditorLifecycleOptions): UseEditorLifecycleReturn;
|
|
1863
|
-
|
|
1864
|
-
export declare interface UseEditorLifecycleOptions {
|
|
1865
|
-
adapter: EditorLifecycleAdapter | null;
|
|
1866
|
-
panelId: string;
|
|
1867
|
-
onDirtyChange?: (path: string, dirty: boolean) => void;
|
|
1868
|
-
serverMtime?: number | null;
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
export declare interface UseEditorLifecycleReturn {
|
|
1872
|
-
isDirty: boolean;
|
|
1873
|
-
isSaving: boolean;
|
|
1874
|
-
lastSavedAt: number | null;
|
|
1875
|
-
markDirty: () => void;
|
|
1876
|
-
markClean: () => void;
|
|
1877
|
-
flushSave: () => Promise<void>;
|
|
1878
|
-
shouldSync: boolean;
|
|
1879
|
-
ackSync: () => void;
|
|
1880
|
-
/** True when the file was modified externally while the editor has unsaved changes. */
|
|
1881
|
-
externalChangeWhileDirty: boolean;
|
|
1882
|
-
ackExternalChange: () => void;
|
|
1883
|
-
/** Call after a successful save with the mtime the server returned. */
|
|
1884
|
-
notifySaved: (mtime: number) => void;
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
/**
|
|
1888
|
-
* React hook: subscribe to a workspace event for the lifetime of the
|
|
1889
|
-
* component. The handler ref is stable across renders so changing the
|
|
1890
|
-
* handler doesn't tear down and re-subscribe.
|
|
1891
|
-
*/
|
|
1892
|
-
export declare function useEvent<K extends keyof WorkspaceEventMap>(name: K, handler: (payload: WorkspaceEventMap[K]) => void): void;
|
|
1893
|
-
|
|
1894
|
-
/**
|
|
1895
|
-
* Shared hook for file-based panes (code editor, markdown editor, etc.).
|
|
1896
|
-
*
|
|
1897
|
-
* Handles:
|
|
1898
|
-
* - File loading via React Query
|
|
1899
|
-
* - Local content state with dirty tracking
|
|
1900
|
-
* - Optimistic concurrency control (OCC) via mtime
|
|
1901
|
-
* - External file change detection
|
|
1902
|
-
* - Conflict resolution (reload vs overwrite)
|
|
1903
|
-
* - Panel title updates with dirty indicator
|
|
1904
|
-
*
|
|
1905
|
-
* @example
|
|
1906
|
-
* ```typescript
|
|
1907
|
-
* function MyEditorPane({ params, api }) {
|
|
1908
|
-
* const { content, setContent, isLoading, error, conflict, ... } = useFilePane({
|
|
1909
|
-
* path: params.path,
|
|
1910
|
-
* panelId: api.id,
|
|
1911
|
-
* })
|
|
1912
|
-
*
|
|
1913
|
-
* if (!params.path) return <NoFileSelected />
|
|
1914
|
-
* if (error) return <ErrorBanner error={error} />
|
|
1915
|
-
*
|
|
1916
|
-
* return (
|
|
1917
|
-
* <>
|
|
1918
|
-
* {conflict && <ConflictBanner onReload={onReloadFromServer} onOverwrite={onOverwrite} />}
|
|
1919
|
-
* <MyEditor content={content} onChange={setContent} />
|
|
1920
|
-
* </>
|
|
1921
|
-
* )
|
|
1922
|
-
* }
|
|
1923
|
-
* ```
|
|
1924
|
-
*/
|
|
1925
|
-
export declare function useFilePane(options: UseFilePaneOptions): UseFilePaneReturn;
|
|
1926
|
-
|
|
1927
|
-
export declare interface UseFilePaneOptions {
|
|
1928
|
-
/** The file path to load/edit. If empty/undefined, pane shows "no file selected". */
|
|
1929
|
-
path: string;
|
|
1930
|
-
/** Filesystem identity for cache/dirty/stale separation. Defaults to user. */
|
|
1931
|
-
filesystem?: FilesystemId;
|
|
1932
|
-
/** Unique panel ID for lifecycle tracking. Omit to use a stable per-pane fallback ID. */
|
|
1933
|
-
panelId?: string;
|
|
1934
|
-
/** Initial content (optional, for draft/unsaved files). */
|
|
1935
|
-
initialContent?: string;
|
|
1936
|
-
/** When supplied, auto-create the file with this content if it does not exist. */
|
|
1937
|
-
createIfMissing?: string;
|
|
1938
|
-
}
|
|
1939
|
-
|
|
1940
|
-
export declare interface UseFilePaneReturn {
|
|
1941
|
-
isLoading: boolean;
|
|
1942
|
-
error: Error | null;
|
|
1943
|
-
content: string | null;
|
|
1944
|
-
isDirty: boolean;
|
|
1945
|
-
isReadonly: boolean;
|
|
1946
|
-
conflict: FileConflictError | null;
|
|
1947
|
-
onReloadFromServer: () => Promise<void>;
|
|
1948
|
-
onOverwrite: () => Promise<void>;
|
|
1949
|
-
setContent: (content: string) => void;
|
|
1950
|
-
save: () => Promise<void>;
|
|
1951
|
-
flushSave: () => Promise<void>;
|
|
1952
|
-
fileName: string;
|
|
1953
|
-
tabTitle: string;
|
|
1954
|
-
}
|
|
1955
|
-
|
|
1956
|
-
export declare function useFullPagePanelHref(input: {
|
|
1957
|
-
componentId: string;
|
|
1958
|
-
params?: Record<string, unknown>;
|
|
1959
|
-
}): string | null;
|
|
1960
|
-
|
|
1961
|
-
export declare function useHasWorkspaceFilesProvider(): boolean;
|
|
1962
|
-
|
|
1963
|
-
export declare function useHydrationComplete(): boolean;
|
|
1964
|
-
|
|
1965
|
-
export declare function useIsFullPagePanel(): boolean;
|
|
1966
|
-
|
|
1967
|
-
export declare function useKeyboardShortcuts({ shortcuts, enabled }: UseKeyboardShortcutsOptions): void;
|
|
1968
|
-
|
|
1969
|
-
export declare interface UseKeyboardShortcutsOptions {
|
|
1970
|
-
shortcuts: ShortcutBinding[];
|
|
1971
|
-
enabled?: boolean;
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
export declare function useOpenPanels(): PanelState[];
|
|
1975
|
-
|
|
1976
|
-
export declare function usePanelRenderMode(): PanelRenderMode;
|
|
1977
|
-
|
|
1978
|
-
export declare function usePluginErrors(): PluginErrorContextValue;
|
|
1979
|
-
|
|
1980
|
-
export declare function useRegistry(): PanelRegistry;
|
|
1981
|
-
|
|
1982
|
-
export declare function useResetLayout(): () => void;
|
|
1983
|
-
|
|
1984
|
-
export declare function useResponsiveSidebarCollapse({ isNarrowViewport, isCollapsed, setCollapsed, }: UseResponsiveSidebarCollapseOptions): () => void;
|
|
1985
|
-
|
|
1986
|
-
export declare interface UseResponsiveSidebarCollapseOptions {
|
|
1987
|
-
isNarrowViewport: boolean;
|
|
1988
|
-
isCollapsed: boolean;
|
|
1989
|
-
setCollapsed: (collapsed: boolean) => void;
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
/** Helper for emitting a user-originated event payload. */
|
|
1993
|
-
export declare function userMeta(): {
|
|
1994
|
-
cause: "user";
|
|
1995
|
-
ts: number;
|
|
1996
|
-
};
|
|
1997
|
-
|
|
1998
|
-
export declare function useSetSidebar(): (sidebar: Partial< SidebarState>) => void;
|
|
1999
|
-
|
|
2000
|
-
export declare function useSidebarState(): SidebarState;
|
|
2001
|
-
|
|
2002
|
-
export declare function useSurfaceResolverRegistry(): SurfaceResolverRegistry;
|
|
2003
|
-
|
|
2004
|
-
export declare function useTheme(): {
|
|
2005
|
-
theme: "light" | "dark";
|
|
2006
|
-
setTheme: (theme: "light" | "dark") => void;
|
|
2007
|
-
toggleTheme: () => void;
|
|
2008
|
-
};
|
|
2009
|
-
|
|
2010
|
-
export declare function useThemePreference(): "light" | "dark";
|
|
2011
|
-
|
|
2012
|
-
export declare function useViewportBreakpoint(maxWidth?: number): boolean;
|
|
2013
|
-
|
|
2014
|
-
export declare function useWorkspaceAttention(): WorkspaceAttentionContextValue;
|
|
2015
|
-
|
|
2016
|
-
export declare function useWorkspaceBridge(): WorkspaceBridgeContextValue;
|
|
2017
|
-
|
|
2018
|
-
export declare function useWorkspaceChatPanel(): WorkspaceChatPanelComponent;
|
|
2019
|
-
|
|
2020
|
-
export declare function useWorkspaceContext(): WorkspaceContextValue;
|
|
2021
|
-
|
|
2022
|
-
export declare function useWorkspaceContextOptional(): WorkspaceContextValue | null;
|
|
2023
|
-
|
|
2024
|
-
export declare function useWorkspaceLeftPaneActions(options?: UseWorkspaceLeftPaneActionsOptions): WorkspaceLeftPaneAction[];
|
|
2025
|
-
|
|
2026
|
-
export declare interface UseWorkspaceLeftPaneActionsOptions {
|
|
2027
|
-
defaultTab?: WorkbenchLeftTabId;
|
|
2028
|
-
activeTab?: WorkbenchLeftTabId;
|
|
2029
|
-
activePanelId?: string | null;
|
|
2030
|
-
onActiveTabChange?: (tab: WorkbenchLeftTabId) => void;
|
|
2031
|
-
revealFileTreeRequest?: {
|
|
2032
|
-
path: string;
|
|
2033
|
-
seq: number;
|
|
2034
|
-
} | null;
|
|
2035
|
-
onOpenPanel?: (config: WorkspaceLeftPaneOpenPanelConfig) => void;
|
|
2036
|
-
onReloadAgentPlugins?: () => void | Promise<unknown>;
|
|
2037
|
-
onExpand?: (tab?: WorkbenchLeftTabId) => void;
|
|
2038
|
-
onCloseSourcePane?: () => void;
|
|
2039
|
-
railOnly?: boolean;
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
export declare function useWorkspacePluginClient(): WorkspacePluginClient;
|
|
2043
|
-
|
|
2044
|
-
export declare function useWorkspaceRequestId(): string | null;
|
|
2045
|
-
|
|
2046
|
-
export declare function useWorkspaceShellCapabilities(): WorkspaceShellCapabilities;
|
|
2047
|
-
|
|
2048
|
-
export declare function useWorkspaceSourceRegistry(): WorkspaceSourceRegistry;
|
|
2049
|
-
|
|
2050
|
-
export declare function WorkbenchLeftPane({ rootDir, bridge, defaultTab, activeTab: controlledActiveTab, activePanelId, onActiveTabChange, revealFileTreeRequest, onOpenPanel, onReloadAgentPlugins, onCollapse, onExpand, onCloseSourcePane, railOnly, className, }: WorkbenchLeftPaneProps): JSX.Element;
|
|
2051
|
-
|
|
2052
|
-
export declare interface WorkbenchLeftPaneProps {
|
|
2053
|
-
rootDir?: string;
|
|
2054
|
-
bridge?: FileTreeBridge;
|
|
2055
|
-
defaultTab?: WorkbenchLeftTabId;
|
|
2056
|
-
activeTab?: WorkbenchLeftTabId;
|
|
2057
|
-
/**
|
|
2058
|
-
* Id of the currently-focused surface tab (dockview's active panel). Drives the
|
|
2059
|
-
* accent for "workspace-page" rail icons so a page only glows while it's the open
|
|
2060
|
-
* tab — `activeTab` is the rail's own click state and goes stale on tab switches.
|
|
2061
|
-
*/
|
|
2062
|
-
activePanelId?: string | null;
|
|
2063
|
-
onActiveTabChange?: (tab: WorkbenchLeftTabId) => void;
|
|
2064
|
-
revealFileTreeRequest?: {
|
|
2065
|
-
path: string;
|
|
2066
|
-
seq: number;
|
|
2067
|
-
} | null;
|
|
2068
|
-
onOpenPanel?: (config: WorkspaceLeftPaneOpenPanelConfig) => void;
|
|
2069
|
-
onReloadAgentPlugins?: () => void | Promise<unknown>;
|
|
2070
|
-
onCollapse?: () => void;
|
|
2071
|
-
onExpand?: (tab?: WorkbenchLeftTabId) => void;
|
|
2072
|
-
onCloseSourcePane?: () => void;
|
|
2073
|
-
railOnly?: boolean;
|
|
2074
|
-
className?: string;
|
|
2075
|
-
}
|
|
2076
|
-
|
|
2077
|
-
export declare type WorkbenchLeftTabId = string;
|
|
2078
|
-
|
|
2079
|
-
declare const WORKSPACE_AGENT_DATA_EVENT = "workspace:agent.data";
|
|
2080
|
-
|
|
2081
|
-
export declare const WORKSPACE_ATTENTION_ACTION_EVENT: "boring-workspace:attention-action";
|
|
2082
|
-
|
|
2083
|
-
export declare const WORKSPACE_COMPOSER_STOP_EVENT: "boring:workspace-composer-stop";
|
|
2084
|
-
|
|
2085
|
-
export declare const WORKSPACE_COMPOSER_STOP_REASONS: {
|
|
2086
|
-
readonly sessionSwitch: "session-switch";
|
|
2087
|
-
readonly userStop: "user-stop";
|
|
2088
|
-
};
|
|
2089
|
-
|
|
2090
|
-
declare const WORKSPACE_EDITOR_SAVE_END_EVENT = "workspace:editor.save.end";
|
|
2091
|
-
|
|
2092
|
-
declare const WORKSPACE_EDITOR_SAVE_START_EVENT = "workspace:editor.save.start";
|
|
2093
|
-
|
|
2094
|
-
export declare const WORKSPACE_OPEN_PATH_SURFACE_KIND = "workspace.open.path";
|
|
2095
|
-
|
|
2096
|
-
declare const WORKSPACE_PANEL_CLOSE_EVENT = "workspace:panel.close";
|
|
2097
|
-
|
|
2098
|
-
declare const WORKSPACE_PANEL_UPDATE_EVENT = "workspace:panel.update";
|
|
2099
|
-
|
|
2100
|
-
export declare const WORKSPACE_SURFACE_OPEN_SKIPPED_EVENT = "boring-workspace:surface-open-skipped";
|
|
2101
|
-
|
|
2102
|
-
declare const WORKSPACE_UI_COMMAND_EVENT = "workspace:ui.command";
|
|
2103
|
-
|
|
2104
|
-
export declare interface WorkspaceActions {
|
|
2105
|
-
setHydrationComplete: (complete: boolean) => void;
|
|
2106
|
-
setLayout: (layout: unknown) => void;
|
|
2107
|
-
setSidebar: (sidebar: Partial<SidebarState>) => void;
|
|
2108
|
-
setPanelSize: (panelId: string, size: number) => void;
|
|
2109
|
-
setTheme: (theme: "light" | "dark") => void;
|
|
2110
|
-
openPanel: (panel: PanelState) => void;
|
|
2111
|
-
closePanel: (panelId: string) => void;
|
|
2112
|
-
activatePanel: (panelId: string) => void;
|
|
2113
|
-
openFile: (file: string, panelId?: string) => void;
|
|
2114
|
-
markDirty: (file: string, panelId: string) => void;
|
|
2115
|
-
markClean: (file: string) => void;
|
|
2116
|
-
showNotification: (notification: Omit<Notification_2, "id" | "timestamp">) => void;
|
|
2117
|
-
dismissNotification: (id: string) => void;
|
|
2118
|
-
navigateToLine: (file: string, line: number) => void;
|
|
2119
|
-
resetLayout: () => void;
|
|
2120
|
-
}
|
|
2121
|
-
|
|
2122
|
-
export declare type WorkspaceAttentionActionDetail = {
|
|
2123
|
-
blockerId: string;
|
|
2124
|
-
actionId: string;
|
|
2125
|
-
blocker: WorkspaceAttentionBlocker;
|
|
2126
|
-
sessionId?: string;
|
|
2127
|
-
};
|
|
2128
|
-
|
|
2129
|
-
export declare type WorkspaceAttentionBlocker = {
|
|
2130
|
-
id: string;
|
|
2131
|
-
/** Plugin/domain-specific reason, e.g. "ask-user.question" or "pr-review.review". */
|
|
2132
|
-
reason: string;
|
|
2133
|
-
surfaceKind?: string;
|
|
2134
|
-
target?: string;
|
|
2135
|
-
label?: string;
|
|
2136
|
-
sessionId?: string;
|
|
2137
|
-
/** Optional generic session-row badge contributed by the plugin that owns this attention. */
|
|
2138
|
-
sessionBadge?: WorkspaceAttentionSessionBadge;
|
|
2139
|
-
/**
|
|
2140
|
-
* Remove this blocker once its workspace chat session disappears from the
|
|
2141
|
-
* authoritative session list. Leave unset for external inbox items whose
|
|
2142
|
-
* `sessionId` is a source/thread identifier rather than a local chat id.
|
|
2143
|
-
*/
|
|
2144
|
-
pruneWhenSessionMissing?: boolean;
|
|
2145
|
-
/** Explicit inbox projection metadata. New inbox-aware plugins should provide this instead of relying on reason parsing. */
|
|
2146
|
-
inbox?: WorkspaceAttentionInboxMetadata;
|
|
2147
|
-
/** Optional shell focus behavior requested by the plugin that owns this blocker. */
|
|
2148
|
-
focus?: WorkspaceAttentionFocusMetadata;
|
|
2149
|
-
actions?: WorkspaceAttentionBlockerAction[];
|
|
2150
|
-
};
|
|
2151
|
-
|
|
2152
|
-
export declare type WorkspaceAttentionBlockerAction = {
|
|
2153
|
-
id: string;
|
|
2154
|
-
label: string;
|
|
2155
|
-
};
|
|
2156
|
-
|
|
2157
|
-
export declare interface WorkspaceAttentionContextValue {
|
|
2158
|
-
blockers: WorkspaceAttentionBlocker[];
|
|
2159
|
-
addBlocker: (blocker: WorkspaceAttentionBlocker) => void;
|
|
2160
|
-
removeBlocker: (id: string) => void;
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
|
-
export declare type WorkspaceAttentionFocusMetadata = {
|
|
2164
|
-
/** Close the workbench left pane when this blocker becomes active for the current session. */
|
|
2165
|
-
closeWorkbenchLeftPane?: boolean;
|
|
2166
|
-
};
|
|
2167
|
-
|
|
2168
|
-
declare type WorkspaceAttentionInboxMetadata = {
|
|
2169
|
-
kind: "question" | "review" | "approval" | "notice";
|
|
2170
|
-
sourceLabel: string;
|
|
2171
|
-
createdAt?: string | number | Date;
|
|
2172
|
-
updatedAt?: string | number | Date;
|
|
2173
|
-
priority?: number;
|
|
2174
|
-
};
|
|
2175
|
-
|
|
2176
|
-
export declare type WorkspaceAttentionProviderProps = {
|
|
2177
|
-
children: ReactNode;
|
|
2178
|
-
/** Authoritative set of existing chat sessions. Blockers that opt into pruning outside this set are stale and removed. */
|
|
2179
|
-
knownSessionIds?: readonly string[];
|
|
2180
|
-
/** Keep false while sessions are still loading/paginated so valid blockers are not pruned early. */
|
|
2181
|
-
knownSessionsAuthoritative?: boolean;
|
|
2182
|
-
};
|
|
2183
|
-
|
|
2184
|
-
export declare type WorkspaceAttentionSessionBadge = {
|
|
2185
|
-
/** Stable badge kind for data attributes and plugin-specific styling hooks. */
|
|
2186
|
-
kind: string;
|
|
2187
|
-
/** Short text rendered on the session row, e.g. "question", "review", "approval". */
|
|
2188
|
-
label: string;
|
|
2189
|
-
/** Visual tone only; semantics are owned by the plugin-specific kind/reason. */
|
|
2190
|
-
tone?: "attention" | "danger" | "neutral" | "warning";
|
|
2191
|
-
/** Higher priority wins when several plugins mark the same session. */
|
|
2192
|
-
priority?: number;
|
|
2193
|
-
};
|
|
2194
|
-
|
|
2195
|
-
export declare function workspaceAttentionSessionBadgeForBlocker(blocker: Pick<WorkspaceAttentionBlocker, "reason" | "sessionBadge">): WorkspaceAttentionSessionBadge | null;
|
|
2196
|
-
|
|
2197
|
-
export declare interface WorkspaceBridge {
|
|
2198
|
-
getOpenPanels(): PanelState[];
|
|
2199
|
-
getActiveFile(): string | null;
|
|
2200
|
-
getDirtyFiles(): string[];
|
|
2201
|
-
getVisibleFiles(): string[];
|
|
2202
|
-
openFile(path: string, opts?: {
|
|
2203
|
-
mode?: "view" | "edit" | "diff";
|
|
2204
|
-
filesystem?: FilesystemId;
|
|
2205
|
-
}): Promise<CommandResult>;
|
|
2206
|
-
openPanel(config: DynamicPaneConfig): Promise<CommandResult>;
|
|
2207
|
-
closePanel(id: string): Promise<CommandResult>;
|
|
2208
|
-
closeWorkbenchLeftPane(): Promise<CommandResult>;
|
|
2209
|
-
showNotification(msg: string, level?: "info" | "warn" | "error"): Promise<CommandResult>;
|
|
2210
|
-
navigateToLine(file: string, line: number): Promise<CommandResult>;
|
|
2211
|
-
expandToFile(path: string): Promise<CommandResult>;
|
|
2212
|
-
markDirty(path: string): void;
|
|
2213
|
-
markClean(path: string): void;
|
|
2214
|
-
subscribe<K extends keyof BridgeEventMap>(event: K, handler: (data: BridgeEventMap[K]) => void): Unsubscribe;
|
|
2215
|
-
select<T>(selector: (state: WorkspaceState) => T, handler: (value: T) => void): Unsubscribe;
|
|
2216
|
-
}
|
|
2217
|
-
|
|
2218
|
-
export declare interface WorkspaceBridgeContextValue {
|
|
2219
|
-
connected: boolean;
|
|
2220
|
-
}
|
|
2221
|
-
|
|
2222
|
-
export declare type WorkspaceChatPanelComponent = ComponentType<any>;
|
|
2223
|
-
|
|
2224
|
-
export declare interface WorkspaceChatPanelProps extends Omit<PiChatPanelProps<WorkspaceAttentionBlocker>, "onOpenArtifact"> {
|
|
2225
|
-
sessionId: string;
|
|
2226
|
-
onOpenArtifact?: OpenArtifactHandler;
|
|
2227
|
-
/** Endpoint base for agent → visible-workbench UI commands. */
|
|
2228
|
-
bridgeEndpoint?: string | null;
|
|
2229
|
-
/** Imperative handle getter for the visible workbench surface. */
|
|
2230
|
-
getSurface?: () => SurfaceShellApi | null;
|
|
2231
|
-
/** Reads whether the visible workbench surface should be open. */
|
|
2232
|
-
isWorkbenchOpen?: () => boolean;
|
|
2233
|
-
/** Opens the visible workbench surface before dispatching a command. */
|
|
2234
|
-
openWorkbench?: () => void;
|
|
2235
|
-
/** Opens the visible workbench sources/file-tree pane before dispatching a reveal. */
|
|
2236
|
-
openWorkbenchSources?: () => void;
|
|
2237
|
-
/** Closes the visible workbench surface after an ephemeral command finishes. */
|
|
2238
|
-
closeWorkbench?: () => void;
|
|
2239
|
-
/** Host-injected composer blockers (for shell policies such as detached read-only chat). */
|
|
2240
|
-
composerBlockers?: WorkspaceAttentionBlocker[];
|
|
2241
|
-
onComposerStop?: () => void;
|
|
2242
|
-
onComposerBlockerAction?: (blocker: WorkspaceAttentionBlocker, action: string) => void;
|
|
2243
|
-
onData?: (part: unknown) => void;
|
|
2244
|
-
}
|
|
2245
|
-
|
|
2246
|
-
export declare function workspaceComposerStopAppliesToSession(detail: unknown, sessionId: string, options?: WorkspaceComposerStopMatchOptions): boolean;
|
|
2247
|
-
|
|
2248
|
-
export declare type WorkspaceComposerStopDetail = {
|
|
2249
|
-
sessionId?: string;
|
|
2250
|
-
reason: WorkspaceComposerStopReason;
|
|
2251
|
-
};
|
|
2252
|
-
|
|
2253
|
-
export declare type WorkspaceComposerStopMatchOptions = {
|
|
2254
|
-
fallbackSessionId?: string | null;
|
|
2255
|
-
ignoredReasons?: readonly WorkspaceComposerStopReason[];
|
|
2256
|
-
};
|
|
2257
|
-
|
|
2258
|
-
export declare type WorkspaceComposerStopReason = typeof WORKSPACE_COMPOSER_STOP_REASONS[keyof typeof WORKSPACE_COMPOSER_STOP_REASONS];
|
|
2259
|
-
|
|
2260
|
-
export declare function workspaceComposerStopTargetSessionId(detail: unknown, fallbackSessionId?: string | null): string | undefined;
|
|
2261
|
-
|
|
2262
|
-
export declare interface WorkspaceContextValue {
|
|
2263
|
-
chatPanel: WorkspaceChatPanelComponent | null;
|
|
2264
|
-
registeredPlugins: RegisteredPluginMeta[];
|
|
2265
|
-
workspaceId?: string;
|
|
2266
|
-
debug: boolean;
|
|
2267
|
-
}
|
|
2268
|
-
|
|
2269
|
-
export declare interface WorkspaceEventMap extends WorkspaceHostEventMap, WorkspacePluginEventMap {
|
|
2270
|
-
}
|
|
2271
|
-
|
|
2272
|
-
/** Names that share a prefix can be filtered with `startsWith`. */
|
|
2273
|
-
export declare type WorkspaceEventName = keyof WorkspaceEventMap;
|
|
2274
|
-
|
|
2275
|
-
export declare const workspaceEvents: {
|
|
2276
|
-
readonly uiCommand: "workspace:ui.command";
|
|
2277
|
-
readonly editorSaveStart: "workspace:editor.save.start";
|
|
2278
|
-
readonly editorSaveEnd: "workspace:editor.save.end";
|
|
2279
|
-
readonly panelUpdate: "workspace:panel.update";
|
|
2280
|
-
readonly panelClose: "workspace:panel.close";
|
|
2281
|
-
readonly agentData: "workspace:agent.data";
|
|
2282
|
-
};
|
|
2283
|
-
|
|
2284
|
-
export declare function WorkspaceFilesProvider({ apiBaseUrl, authHeaders, onAuthError, timeout, client: providedClient, children, }: DataProviderProps): JSX.Element;
|
|
2285
|
-
|
|
2286
|
-
declare interface WorkspaceHostEventMap {
|
|
2287
|
-
/** Shared UI manipulation contract used by the agent stream and plugin bindings. */
|
|
2288
|
-
[WORKSPACE_UI_COMMAND_EVENT]: EventMeta & {
|
|
2289
|
-
command: UiCommand;
|
|
2290
|
-
};
|
|
2291
|
-
[WORKSPACE_EDITOR_SAVE_START_EVENT]: {
|
|
2292
|
-
panelId: string;
|
|
2293
|
-
};
|
|
2294
|
-
[WORKSPACE_EDITOR_SAVE_END_EVENT]: {
|
|
2295
|
-
panelId: string;
|
|
2296
|
-
ok?: boolean;
|
|
2297
|
-
error?: string;
|
|
2298
|
-
};
|
|
2299
|
-
[WORKSPACE_PANEL_UPDATE_EVENT]: EventMeta & {
|
|
2300
|
-
match: WorkspacePanelMatch | WorkspacePanelMatch[];
|
|
2301
|
-
params?: Record<string, unknown>;
|
|
2302
|
-
title?: string;
|
|
2303
|
-
};
|
|
2304
|
-
[WORKSPACE_PANEL_CLOSE_EVENT]: EventMeta & {
|
|
2305
|
-
match: WorkspacePanelMatch | WorkspacePanelMatch[];
|
|
2306
|
-
};
|
|
2307
|
-
/**
|
|
2308
|
-
* Raw agent stream data observed by ChatPanelHost. Core treats this as an
|
|
2309
|
-
* opaque packet; plugins translate packets they understand into their own
|
|
2310
|
-
* plugin-keyed events.
|
|
2311
|
-
*/
|
|
2312
|
-
[WORKSPACE_AGENT_DATA_EVENT]: {
|
|
2313
|
-
ts: number;
|
|
2314
|
-
part: unknown;
|
|
2315
|
-
};
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
export declare interface WorkspaceLeftPaneAction {
|
|
2319
|
-
id: WorkbenchLeftTabId;
|
|
2320
|
-
title: string;
|
|
2321
|
-
icon: ReactNode;
|
|
2322
|
-
kind: "source" | "workspace-page";
|
|
2323
|
-
active: boolean;
|
|
2324
|
-
select: () => void;
|
|
2325
|
-
reloadAgentPlugins?: () => void | Promise<unknown>;
|
|
2326
|
-
}
|
|
2327
|
-
|
|
2328
|
-
export declare interface WorkspaceLeftPaneOpenPanelConfig {
|
|
2329
|
-
id: string;
|
|
2330
|
-
component: string;
|
|
2331
|
-
title?: string;
|
|
2332
|
-
params?: Record<string, unknown>;
|
|
2333
|
-
}
|
|
2334
|
-
|
|
2335
|
-
export declare function WorkspaceLink({ to, children, className, title, href, onClick }: WorkspaceLinkProps): ReactElement;
|
|
2336
|
-
|
|
2337
|
-
export declare function workspaceLinkCommand(to: WorkspaceLinkTarget): UiCommand;
|
|
2338
|
-
|
|
2339
|
-
export declare function workspaceLinkHref(to: WorkspaceLinkTarget): string;
|
|
2340
|
-
|
|
2341
|
-
export declare interface WorkspaceLinkProps {
|
|
2342
|
-
to: WorkspaceLinkTarget;
|
|
2343
|
-
children: ReactNode;
|
|
2344
|
-
className?: string;
|
|
2345
|
-
title?: string;
|
|
2346
|
-
href?: string;
|
|
2347
|
-
onClick?: (event: MouseEvent_2<HTMLAnchorElement>) => void;
|
|
2348
|
-
}
|
|
2349
|
-
|
|
2350
|
-
export declare type WorkspaceLinkTarget = {
|
|
2351
|
-
kind: "openFile";
|
|
2352
|
-
path: string;
|
|
2353
|
-
mode?: "view" | "edit" | "diff";
|
|
2354
|
-
filesystem?: FilesystemId;
|
|
2355
|
-
} | {
|
|
2356
|
-
kind: "openSurface";
|
|
2357
|
-
surfaceKind: string;
|
|
2358
|
-
target: string;
|
|
2359
|
-
filesystem?: FilesystemId;
|
|
2360
|
-
meta?: Record<string, unknown>;
|
|
2361
|
-
} | {
|
|
2362
|
-
kind: "openPanel";
|
|
2363
|
-
id: string;
|
|
2364
|
-
component: string;
|
|
2365
|
-
title?: string;
|
|
2366
|
-
params?: Record<string, unknown>;
|
|
2367
|
-
} | {
|
|
2368
|
-
kind: "expandToFile";
|
|
2369
|
-
path: string;
|
|
2370
|
-
};
|
|
2371
|
-
|
|
2372
|
-
export declare function WorkspaceLoadingState({ title, description, status, fullscreen, className, }: WorkspaceLoadingStateProps): JSX.Element;
|
|
2373
|
-
|
|
2374
|
-
export declare interface WorkspaceLoadingStateProps {
|
|
2375
|
-
title?: string;
|
|
2376
|
-
description?: string;
|
|
2377
|
-
status?: string;
|
|
2378
|
-
fullscreen?: boolean;
|
|
2379
|
-
className?: string;
|
|
2380
|
-
}
|
|
2381
|
-
|
|
2382
|
-
declare type WorkspacePanelMatch = {
|
|
2383
|
-
id: string;
|
|
2384
|
-
} | {
|
|
2385
|
-
param: string;
|
|
2386
|
-
value: unknown;
|
|
2387
|
-
} | {
|
|
2388
|
-
params: Record<string, unknown>;
|
|
2389
|
-
} | {
|
|
2390
|
-
paramPrefix: string;
|
|
2391
|
-
value: string;
|
|
2392
|
-
params?: Record<string, unknown>;
|
|
2393
|
-
};
|
|
2394
|
-
|
|
2395
|
-
export declare interface WorkspacePluginClient {
|
|
2396
|
-
apiBaseUrl: string;
|
|
2397
|
-
workspaceId?: string;
|
|
2398
|
-
workspaceHeaders(): Record<string, string>;
|
|
2399
|
-
getJson<T = unknown>(path: string, options?: {
|
|
2400
|
-
missingMessage?: string;
|
|
2401
|
-
}): Promise<T>;
|
|
2402
|
-
readJsonFile<T>(path: string, options?: {
|
|
2403
|
-
missingMessage?: string;
|
|
2404
|
-
}): Promise<T>;
|
|
2405
|
-
postJson<T = unknown>(path: string, body?: unknown, options?: {
|
|
2406
|
-
headers?: Record<string, string>;
|
|
2407
|
-
}): Promise<T>;
|
|
2408
|
-
sendAgentPrompt(message: string, options?: {
|
|
2409
|
-
title?: string;
|
|
2410
|
-
noncePrefix?: string;
|
|
2411
|
-
}): Promise<void>;
|
|
2412
|
-
}
|
|
2413
|
-
|
|
2414
|
-
export declare function WorkspacePluginClientProvider({ apiBaseUrl, workspaceId, authHeaders, children, }: WorkspacePluginClientProviderProps): FunctionComponentElement<ProviderProps<WorkspacePluginClient | null>>;
|
|
2415
|
-
|
|
2416
|
-
declare interface WorkspacePluginClientProviderProps {
|
|
2417
|
-
apiBaseUrl: string;
|
|
2418
|
-
workspaceId?: string;
|
|
2419
|
-
authHeaders?: Record<string, string>;
|
|
2420
|
-
children: ReactNode;
|
|
2421
|
-
}
|
|
2422
|
-
|
|
2423
|
-
/**
|
|
2424
|
-
* Built-in plugin events baked into the public workspace event map.
|
|
2425
|
-
*
|
|
2426
|
-
* Filesystem events are declared inline (using EventMeta which is structurally
|
|
2427
|
-
* identical to FilesystemEventMeta) so the keys survive vite's rollupTypes
|
|
2428
|
-
* bundling without importing plugin-domain modules.
|
|
2429
|
-
*
|
|
2430
|
-
* Third-party plugins can extend this interface via declare module augmentation,
|
|
2431
|
-
* though that only works in source compilation — it does not survive dist bundling.
|
|
2432
|
-
*/
|
|
2433
|
-
export declare interface WorkspacePluginEventMap {
|
|
2434
|
-
"filesystem:file.changed": EventMeta & {
|
|
2435
|
-
filesystem?: FilesystemId;
|
|
2436
|
-
path: string;
|
|
2437
|
-
};
|
|
2438
|
-
"filesystem:file.created": EventMeta & {
|
|
2439
|
-
filesystem?: FilesystemId;
|
|
2440
|
-
path: string;
|
|
2441
|
-
kind: "file" | "dir";
|
|
2442
|
-
};
|
|
2443
|
-
"filesystem:file.moved": EventMeta & {
|
|
2444
|
-
filesystem?: FilesystemId;
|
|
2445
|
-
from: string;
|
|
2446
|
-
to: string;
|
|
2447
|
-
};
|
|
2448
|
-
"filesystem:file.deleted": EventMeta & {
|
|
2449
|
-
filesystem?: FilesystemId;
|
|
2450
|
-
path: string;
|
|
2451
|
-
};
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
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): JSX.Element;
|
|
2455
|
-
|
|
2456
|
-
export declare interface WorkspaceProviderProps {
|
|
2457
|
-
children: ReactNode;
|
|
2458
|
-
chatPanel?: WorkspaceChatPanelComponent;
|
|
2459
|
-
/**
|
|
2460
|
-
* Front plugin entries produced by `definePlugin({ id, ... })` from
|
|
2461
|
-
* `@hachej/boring-workspace/plugin`.
|
|
2462
|
-
*/
|
|
2463
|
-
plugins?: BoringFrontFactoryWithId[];
|
|
2464
|
-
capturedPlugins?: CapturedFrontPlugin[];
|
|
2465
|
-
excludeDefaults?: string[];
|
|
2466
|
-
panels?: PanelConfig[];
|
|
2467
|
-
commands?: CommandConfig[];
|
|
2468
|
-
catalogs?: CatalogConfig[];
|
|
2469
|
-
capabilities?: Record<string, boolean>;
|
|
2470
|
-
apiBaseUrl?: string;
|
|
2471
|
-
authHeaders?: Record<string, string>;
|
|
2472
|
-
/** Per-request timeout for the data layer's FetchClient, in ms. */
|
|
2473
|
-
apiTimeout?: number;
|
|
2474
|
-
/** Active chat/session scope shared with plugin providers that need session-scoped data. */
|
|
2475
|
-
activeSessionId?: string | null;
|
|
2476
|
-
/** Session ids that are currently open in chat panes, for plugins that must avoid opening closed-session UI. */
|
|
2477
|
-
openSessionIds?: readonly string[];
|
|
2478
|
-
/** Authoritative chat session ids used to drop stale session-scoped Inbox/attention entries. */
|
|
2479
|
-
attentionSessionIds?: readonly string[];
|
|
2480
|
-
/** False while session data is loading or paginated; prevents pruning valid off-page attention entries. */
|
|
2481
|
-
attentionSessionsAuthoritative?: boolean;
|
|
2482
|
-
defaultTheme?: "light" | "dark" | undefined;
|
|
2483
|
-
onThemeChange?: (theme: "light" | "dark") => void;
|
|
2484
|
-
workspaceId?: string;
|
|
2485
|
-
workspaceLabel?: string;
|
|
2486
|
-
appTitle?: string;
|
|
2487
|
-
storageKey?: string;
|
|
2488
|
-
persistenceEnabled?: boolean;
|
|
2489
|
-
manageDocumentTitle?: boolean;
|
|
2490
|
-
bridgeEndpoint?: string | null;
|
|
2491
|
-
onAuthError?: (statusCode: number) => void;
|
|
2492
|
-
onOpenFile?: (path: string) => void;
|
|
2493
|
-
debug?: boolean;
|
|
2494
|
-
/**
|
|
2495
|
-
* Hot-load dynamically discovered front plugin modules. The current
|
|
2496
|
-
* implementation relies on Vite's /@fs transform endpoint, so it defaults to
|
|
2497
|
-
* dev-only. Production hosts should keep this false until they provide their
|
|
2498
|
-
* own module asset endpoint.
|
|
2499
|
-
*/
|
|
2500
|
-
frontPluginHotReload?: FrontPluginHotReloadMode;
|
|
2501
|
-
fullPageBasePath?: string;
|
|
2502
|
-
commandPaletteSessionSearch?: CommandPaletteSessionSearchConfig;
|
|
2503
|
-
}
|
|
2504
|
-
|
|
2505
|
-
export declare interface WorkspaceShellAnchorRect {
|
|
2506
|
-
x: number;
|
|
2507
|
-
y: number;
|
|
2508
|
-
width: number;
|
|
2509
|
-
height: number;
|
|
2510
|
-
top: number;
|
|
2511
|
-
right: number;
|
|
2512
|
-
bottom: number;
|
|
2513
|
-
left: number;
|
|
2514
|
-
}
|
|
2515
|
-
|
|
2516
|
-
export declare type WorkspaceShellArtifactTarget = {
|
|
2517
|
-
type: "surface";
|
|
2518
|
-
surfaceKind: string;
|
|
2519
|
-
target?: string;
|
|
2520
|
-
params?: Record<string, unknown>;
|
|
2521
|
-
} | {
|
|
2522
|
-
type: "panel";
|
|
2523
|
-
panelComponentId: string;
|
|
2524
|
-
params?: Record<string, unknown>;
|
|
2525
|
-
};
|
|
2526
|
-
|
|
2527
|
-
export declare interface WorkspaceShellCapabilities {
|
|
2528
|
-
openArtifact(target: WorkspaceShellArtifactTarget | null, options?: {
|
|
2529
|
-
sessionId?: string | null;
|
|
2530
|
-
title?: string;
|
|
2531
|
-
instanceId?: string;
|
|
2532
|
-
}): WorkspaceShellCapabilityResult;
|
|
2533
|
-
openDetachedChat(sessionId: string, options?: {
|
|
2534
|
-
anchor?: WorkspaceShellAnchorRect;
|
|
2535
|
-
title?: string;
|
|
2536
|
-
}): WorkspaceShellCapabilityResult;
|
|
2537
|
-
}
|
|
2538
|
-
|
|
2539
|
-
export declare type WorkspaceShellCapabilityResult = {
|
|
2540
|
-
success: true;
|
|
2541
|
-
} | {
|
|
2542
|
-
success: false;
|
|
2543
|
-
reason: "no-artifact" | "open-failed" | "invalid-session" | "placement-failed";
|
|
2544
|
-
message: string;
|
|
2545
|
-
};
|
|
2546
|
-
|
|
2547
|
-
export declare interface WorkspaceSourceConfig<T = any> {
|
|
2548
|
-
id: string;
|
|
2549
|
-
title: string;
|
|
2550
|
-
icon?: ComponentType<{
|
|
2551
|
-
className?: string;
|
|
2552
|
-
}>;
|
|
2553
|
-
component: ComponentType<WorkspaceSourceProps<T>> | (() => Promise<{
|
|
2554
|
-
default: ComponentType<WorkspaceSourceProps<T>>;
|
|
2555
|
-
}>);
|
|
2556
|
-
requiresCapabilities?: string[];
|
|
2557
|
-
chromeless?: boolean;
|
|
2558
|
-
/** Panel id opened in the main workspace when this source is selected. */
|
|
2559
|
-
defaultPanelId?: string;
|
|
2560
|
-
/** Source: "builtin" | "app" */
|
|
2561
|
-
source?: string;
|
|
2562
|
-
pluginId?: string;
|
|
2563
|
-
/** Revision emitted by the runtime plugin asset manager for hot-loaded sources. */
|
|
2564
|
-
pluginRevision?: number;
|
|
2565
|
-
lazy?: boolean;
|
|
2566
|
-
}
|
|
2567
|
-
|
|
2568
|
-
export declare interface WorkspaceSourceOpenPanelConfig {
|
|
2569
|
-
id: string;
|
|
2570
|
-
component: string;
|
|
2571
|
-
title?: string;
|
|
2572
|
-
params?: Record<string, unknown>;
|
|
2573
|
-
}
|
|
2574
|
-
|
|
2575
|
-
/**
|
|
2576
|
-
* Props for workspace source panes hosted in the left workspace rail.
|
|
2577
|
-
* These are not Dockview panels: they receive only source-pane params and
|
|
2578
|
-
* the explicit actions that the source host supports.
|
|
2579
|
-
*/
|
|
2580
|
-
export declare interface WorkspaceSourceProps<T = unknown> {
|
|
2581
|
-
params: T;
|
|
2582
|
-
className?: string;
|
|
2583
|
-
openPanel?: (config: WorkspaceSourceOpenPanelConfig) => void;
|
|
2584
|
-
}
|
|
2585
|
-
|
|
2586
|
-
export declare type WorkspaceSourceRegistration<T = any> = Omit<WorkspaceSourceConfig<T>, 'id'>;
|
|
2587
|
-
|
|
2588
|
-
export declare class WorkspaceSourceRegistry {
|
|
2589
|
-
private sources;
|
|
2590
|
-
private registrationOrder;
|
|
2591
|
-
private capabilities;
|
|
2592
|
-
private listeners;
|
|
2593
|
-
private snapshotCache;
|
|
2594
|
-
private lazyComponentCache;
|
|
2595
|
-
constructor(capabilities?: Record<string, boolean>);
|
|
2596
|
-
register(id: string, config: WorkspaceSourceRegistration): void;
|
|
2597
|
-
unregister(id: string): void;
|
|
2598
|
-
replaceByPluginId(pluginId: string, sources: WorkspaceSourceConfig[]): void;
|
|
2599
|
-
get(id: string): WorkspaceSourceConfig | undefined;
|
|
2600
|
-
has(id: string): boolean;
|
|
2601
|
-
getComponent(sourceId: string): ComponentType<any> | undefined;
|
|
2602
|
-
list(): WorkspaceSourceConfig[];
|
|
2603
|
-
listAll(): WorkspaceSourceConfig[];
|
|
2604
|
-
subscribe: (cb: () => void) => (() => void);
|
|
2605
|
-
getSnapshot: () => readonly WorkspaceSourceConfig[];
|
|
2606
|
-
private getLazyComponent;
|
|
2607
|
-
private emit;
|
|
2608
|
-
private filteredSources;
|
|
2609
|
-
private satisfiesCapabilities;
|
|
2610
|
-
}
|
|
2611
|
-
|
|
2612
|
-
export declare interface WorkspaceSourceRegistryLike {
|
|
2613
|
-
register(id: string, config: WorkspaceSourceRegistration): void;
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
|
-
export declare interface WorkspaceState {
|
|
2617
|
-
hydrationComplete: boolean;
|
|
2618
|
-
layout: unknown | null;
|
|
2619
|
-
sidebar: SidebarState;
|
|
2620
|
-
panelSizes: Record<string, number>;
|
|
2621
|
-
preferences: {
|
|
2622
|
-
theme: "light" | "dark";
|
|
2623
|
-
};
|
|
2624
|
-
panels: PanelState[];
|
|
2625
|
-
activePanel: string | null;
|
|
2626
|
-
activeFile: string | null;
|
|
2627
|
-
visibleFiles: string[];
|
|
2628
|
-
dirtyFiles: Record<string, {
|
|
2629
|
-
panelId: string;
|
|
2630
|
-
savedAt: number | null;
|
|
2631
|
-
}>;
|
|
2632
|
-
notifications: Notification_2[];
|
|
2633
|
-
}
|
|
2634
|
-
|
|
2635
|
-
export declare type WorkspaceStore = WorkspaceState & WorkspaceActions;
|
|
2636
|
-
|
|
2637
|
-
declare type WorkspaceStoreApi = {
|
|
2638
|
-
getState: () => WorkspaceStore;
|
|
2639
|
-
subscribe: (listener: (state: WorkspaceStore, prevState: WorkspaceStore) => void) => () => void;
|
|
2640
|
-
setState: (partial: Partial<WorkspaceStore>) => void;
|
|
2641
|
-
getInitialState: () => WorkspaceStore;
|
|
2642
|
-
};
|
|
2643
|
-
|
|
2644
|
-
export { }
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
declare global {
|
|
2648
|
-
var __BORING_RUNTIME_SINGLETONS__: Record<string, unknown> | undefined;
|
|
2649
|
-
}
|
|
1
|
+
export * from './src/index.js'
|
|
2
|
+
export {}
|