@hachej/boring-workspace 0.1.71 → 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 +4 -4
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export declare const DEFAULT_BOOT_PRELOAD_PATHS: string[];
|
|
2
|
+
export type WorkspaceRuntimeDependenciesWarmupStatus = {
|
|
3
|
+
state: "preparing" | "ready" | "failed";
|
|
4
|
+
message?: string;
|
|
5
|
+
requirement?: string;
|
|
6
|
+
};
|
|
7
|
+
export type WorkspaceWarmupStatus = {
|
|
8
|
+
status: "preparing";
|
|
9
|
+
requirement?: "workspace-fs" | "sandbox-exec" | "ui-bridge";
|
|
10
|
+
message?: string;
|
|
11
|
+
runtimeDependencies?: WorkspaceRuntimeDependenciesWarmupStatus;
|
|
12
|
+
} | {
|
|
13
|
+
status: "ready";
|
|
14
|
+
runtimeDependencies?: WorkspaceRuntimeDependenciesWarmupStatus;
|
|
15
|
+
} | {
|
|
16
|
+
status: "failed";
|
|
17
|
+
message: string;
|
|
18
|
+
requirement?: "workspace-fs" | "sandbox-exec" | "ui-bridge";
|
|
19
|
+
runtimeDependencies?: WorkspaceRuntimeDependenciesWarmupStatus;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Convert an absolute filesystem path into a workspace-relative one when it
|
|
23
|
+
* lives inside `workspaceRoot`. The workspace HTTP file API (`/api/v1/files`,
|
|
24
|
+
* tree, etc.) is relative-only and rejects absolute paths with a 403 — but the
|
|
25
|
+
* agent's tool inputs (read/write/edit) surface absolute paths. Clicking such
|
|
26
|
+
* a path to open it in the workbench therefore needs this translation.
|
|
27
|
+
*
|
|
28
|
+
* Already-relative paths and absolute paths that fall outside the root are
|
|
29
|
+
* returned unchanged (the latter will legitimately 403). The workspace root
|
|
30
|
+
* itself maps to ".".
|
|
31
|
+
*/
|
|
32
|
+
export declare function relativizeWorkspacePath(path: string, workspaceRoot: string | null | undefined): string;
|
|
33
|
+
export declare function preloadUrl(apiBaseUrl: string | null | undefined, path: string): string;
|
|
34
|
+
export declare function workspaceRequestHeaders(workspaceId: string, headers?: Record<string, string>): Record<string, string>;
|
|
35
|
+
export declare function treePreloadDir(path: string): string | null;
|
|
36
|
+
export declare function seedTreePreloadFromBody(apiBaseUrl: string | null | undefined, workspaceId: string, path: string, body: {
|
|
37
|
+
entries?: unknown;
|
|
38
|
+
} | null): void;
|
|
39
|
+
export interface WorkspaceReadyError {
|
|
40
|
+
code?: unknown;
|
|
41
|
+
retryable?: unknown;
|
|
42
|
+
requirement?: unknown;
|
|
43
|
+
}
|
|
44
|
+
export interface WarmupPreparingResult {
|
|
45
|
+
requirement?: "workspace-fs" | "sandbox-exec" | "ui-bridge";
|
|
46
|
+
}
|
|
47
|
+
export declare function parseWorkspaceReadyError(payload: unknown): WorkspaceReadyError | null;
|
|
48
|
+
export declare function parseRetryableWarmupPreparing(payload: unknown): WarmupPreparingResult | null;
|
|
49
|
+
export declare function isAgentRuntimeWarmupPath(path: string): boolean;
|
|
50
|
+
export declare function isReadyStatusPath(path: string): boolean;
|
|
51
|
+
export declare function resolveBootPreloadPaths(preloadPaths: string[], provisionWorkspace: boolean): string[];
|
|
52
|
+
export declare function errorMessageFromPayload(payload: unknown): string | null;
|
|
53
|
+
export interface ReadyStatusWarmupSnapshot {
|
|
54
|
+
state?: string;
|
|
55
|
+
message?: string;
|
|
56
|
+
chatState?: string;
|
|
57
|
+
workspaceState?: string;
|
|
58
|
+
runtimeDependenciesState?: string;
|
|
59
|
+
runtimeDependenciesMessage?: string;
|
|
60
|
+
runtimeDependenciesRequirement?: string;
|
|
61
|
+
}
|
|
62
|
+
export declare function parseReadyStatusSse(payload: unknown): ReadyStatusWarmupSnapshot | null;
|
|
63
|
+
export declare function readyStatusSupportsWorkspaceUse(status: ReadyStatusWarmupSnapshot | null): boolean;
|
|
64
|
+
export declare function readResponsePayload(response: Response): Promise<unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { WORKSPACE_BRIDGE_DISABLED_ENV, WORKSPACE_BRIDGE_REFRESH_TOKEN_ENV, WORKSPACE_BRIDGE_TOKEN_ENV, WORKSPACE_BRIDGE_TOKEN_URL_ENV, WORKSPACE_BRIDGE_URL_ENV, WorkspaceBridgeErrorCode, WorkspaceBridgeCallFailure, WorkspaceBridgeCallRequest, WorkspaceBridgeCallResponse, WorkspaceBridgeCallSuccess, WorkspaceBridgeError } from '../shared/workspace-bridge-rpc';
|
|
2
|
+
export { WORKSPACE_BRIDGE_DISABLED_ENV, WORKSPACE_BRIDGE_REFRESH_TOKEN_ENV, WORKSPACE_BRIDGE_TOKEN_ENV, WORKSPACE_BRIDGE_TOKEN_URL_ENV, WORKSPACE_BRIDGE_URL_ENV, WorkspaceBridgeErrorCode, type WorkspaceBridgeCallFailure, type WorkspaceBridgeCallRequest, type WorkspaceBridgeCallResponse, type WorkspaceBridgeCallSuccess, type WorkspaceBridgeError, };
|
|
3
|
+
export declare enum WorkspaceBridgeClientErrorCode {
|
|
4
|
+
Config = "WORKSPACE_BRIDGE_CLIENT_CONFIG_ERROR",
|
|
5
|
+
InvalidResponse = "WORKSPACE_BRIDGE_INVALID_RESPONSE",
|
|
6
|
+
Transport = "WORKSPACE_BRIDGE_TRANSPORT_ERROR",
|
|
7
|
+
Timeout = "WORKSPACE_BRIDGE_TIMEOUT",
|
|
8
|
+
Aborted = "WORKSPACE_BRIDGE_ABORTED",
|
|
9
|
+
HttpError = "WORKSPACE_BRIDGE_HTTP_ERROR"
|
|
10
|
+
}
|
|
11
|
+
export interface WorkspaceBridgeTokenProviderContext {
|
|
12
|
+
/** True when the previous attempt failed with a 401 and the client is retrying once. */
|
|
13
|
+
refresh: boolean;
|
|
14
|
+
/** Aborts when the per-attempt timeout or caller AbortSignal fires. */
|
|
15
|
+
signal?: AbortSignal;
|
|
16
|
+
}
|
|
17
|
+
export type WorkspaceBridgeTokenProvider = (context: WorkspaceBridgeTokenProviderContext) => string | Promise<string>;
|
|
18
|
+
export type WorkspaceBridgeClientToken = string | WorkspaceBridgeTokenProvider;
|
|
19
|
+
export interface WorkspaceBridgeClientOptions {
|
|
20
|
+
url: string;
|
|
21
|
+
token: WorkspaceBridgeClientToken;
|
|
22
|
+
fetch?: typeof fetch;
|
|
23
|
+
/** Default per-attempt timeout. Defaults to 30s. */
|
|
24
|
+
defaultTimeoutMs?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface WorkspaceBridgeClientCallOptions {
|
|
27
|
+
requestId?: string;
|
|
28
|
+
idempotencyKey?: string;
|
|
29
|
+
timeoutMs?: number;
|
|
30
|
+
signal?: AbortSignal;
|
|
31
|
+
}
|
|
32
|
+
export declare class WorkspaceBridgeClientConfigError extends Error {
|
|
33
|
+
readonly code = WorkspaceBridgeClientErrorCode.Config;
|
|
34
|
+
readonly missingVar?: string;
|
|
35
|
+
constructor(message: string, options?: {
|
|
36
|
+
missingVar?: string;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export declare class WorkspaceBridgeClientError extends Error {
|
|
40
|
+
readonly code: WorkspaceBridgeErrorCode | WorkspaceBridgeClientErrorCode;
|
|
41
|
+
readonly status?: number;
|
|
42
|
+
readonly requestId?: string;
|
|
43
|
+
constructor(message: string, options: {
|
|
44
|
+
code: WorkspaceBridgeErrorCode | WorkspaceBridgeClientErrorCode;
|
|
45
|
+
status?: number;
|
|
46
|
+
requestId?: string;
|
|
47
|
+
cause?: unknown;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export declare class WorkspaceBridgeClient {
|
|
51
|
+
readonly url: string;
|
|
52
|
+
private readonly token;
|
|
53
|
+
private readonly fetchImpl;
|
|
54
|
+
private readonly defaultTimeoutMs;
|
|
55
|
+
constructor(options: WorkspaceBridgeClientOptions);
|
|
56
|
+
static fromEnv(env?: Record<string, string | undefined>, options?: {
|
|
57
|
+
fetch?: typeof fetch;
|
|
58
|
+
token?: WorkspaceBridgeClientToken;
|
|
59
|
+
defaultTimeoutMs?: number;
|
|
60
|
+
}): WorkspaceBridgeClient;
|
|
61
|
+
call<TOutput = unknown, TInput = unknown>(op: string, input: TInput, options?: WorkspaceBridgeClientCallOptions): Promise<TOutput>;
|
|
62
|
+
private callOnce;
|
|
63
|
+
private resolveToken;
|
|
64
|
+
private shouldRetryWithFreshToken;
|
|
65
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BoringFrontFactoryWithId } from '../../shared/plugins/frontFactory';
|
|
2
|
+
declare global {
|
|
3
|
+
var __BORING_RUNTIME_SINGLETONS__: Record<string, unknown> | undefined;
|
|
4
|
+
}
|
|
5
|
+
export interface RegisterAgentPluginOptions {
|
|
6
|
+
apiBaseUrl?: string;
|
|
7
|
+
workspaceId?: string;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
authHeaders?: Record<string, string>;
|
|
10
|
+
importFront?: (frontUrl: string, revision: number) => Promise<{
|
|
11
|
+
default?: BoringFrontFactoryWithId;
|
|
12
|
+
}>;
|
|
13
|
+
frontImportRetry?: {
|
|
14
|
+
attempts?: number;
|
|
15
|
+
delayMs?: number;
|
|
16
|
+
};
|
|
17
|
+
reportFrontError?: (report: FrontErrorReport) => void;
|
|
18
|
+
}
|
|
19
|
+
export interface FrontErrorReport {
|
|
20
|
+
pluginId: string;
|
|
21
|
+
revision: number;
|
|
22
|
+
message: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function appendFrontImportRevision(frontUrl: string, revision: number, cacheBust?: string | number): string;
|
|
26
|
+
export declare function useAgentPluginHotReload(options: RegisterAgentPluginOptions): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser event emitted after the runtime plugin registry applies a load/unload
|
|
3
|
+
* event. Keep literal in sync with @hachej/boring-agent's composer listener;
|
|
4
|
+
* do not import from agent here because workspace base front code must stay
|
|
5
|
+
* agent-free.
|
|
6
|
+
*/
|
|
7
|
+
export declare const WORKSPACE_AGENT_PLUGINS_RELOADED_EVENT = "boring-ui:agent-plugins-reloaded";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare const WORKSPACE_ATTENTION_ACTION_EVENT: "boring-workspace:attention-action";
|
|
3
|
+
export type WorkspaceAttentionBlockerAction = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export type WorkspaceAttentionSessionBadge = {
|
|
8
|
+
/** Stable badge kind for data attributes and plugin-specific styling hooks. */
|
|
9
|
+
kind: string;
|
|
10
|
+
/** Short text rendered on the session row, e.g. "question", "review", "approval". */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Visual tone only; semantics are owned by the plugin-specific kind/reason. */
|
|
13
|
+
tone?: "attention" | "danger" | "neutral" | "warning";
|
|
14
|
+
/** Higher priority wins when several plugins mark the same session. */
|
|
15
|
+
priority?: number;
|
|
16
|
+
};
|
|
17
|
+
export type WorkspaceAttentionInboxMetadata = {
|
|
18
|
+
kind: "question" | "review" | "approval" | "notice";
|
|
19
|
+
sourceLabel: string;
|
|
20
|
+
createdAt?: string | number | Date;
|
|
21
|
+
updatedAt?: string | number | Date;
|
|
22
|
+
priority?: number;
|
|
23
|
+
};
|
|
24
|
+
export type WorkspaceAttentionFocusMetadata = {
|
|
25
|
+
/** Close the workbench left pane when this blocker becomes active for the current session. */
|
|
26
|
+
closeWorkbenchLeftPane?: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type WorkspaceAttentionBlocker = {
|
|
29
|
+
id: string;
|
|
30
|
+
/** Plugin/domain-specific reason, e.g. "ask-user.question" or "pr-review.review". */
|
|
31
|
+
reason: string;
|
|
32
|
+
surfaceKind?: string;
|
|
33
|
+
target?: string;
|
|
34
|
+
label?: string;
|
|
35
|
+
sessionId?: string;
|
|
36
|
+
/** Optional generic session-row badge contributed by the plugin that owns this attention. */
|
|
37
|
+
sessionBadge?: WorkspaceAttentionSessionBadge;
|
|
38
|
+
/**
|
|
39
|
+
* Remove this blocker once its workspace chat session disappears from the
|
|
40
|
+
* authoritative session list. Leave unset for external inbox items whose
|
|
41
|
+
* `sessionId` is a source/thread identifier rather than a local chat id.
|
|
42
|
+
*/
|
|
43
|
+
pruneWhenSessionMissing?: boolean;
|
|
44
|
+
/** Explicit inbox projection metadata. New inbox-aware plugins should provide this instead of relying on reason parsing. */
|
|
45
|
+
inbox?: WorkspaceAttentionInboxMetadata;
|
|
46
|
+
/** Optional shell focus behavior requested by the plugin that owns this blocker. */
|
|
47
|
+
focus?: WorkspaceAttentionFocusMetadata;
|
|
48
|
+
actions?: WorkspaceAttentionBlockerAction[];
|
|
49
|
+
};
|
|
50
|
+
export type WorkspaceAttentionActionDetail = {
|
|
51
|
+
blockerId: string;
|
|
52
|
+
actionId: string;
|
|
53
|
+
blocker: WorkspaceAttentionBlocker;
|
|
54
|
+
sessionId?: string;
|
|
55
|
+
};
|
|
56
|
+
export declare function emitWorkspaceAttentionAction(detail: WorkspaceAttentionActionDetail): void;
|
|
57
|
+
export declare function workspaceAttentionSessionBadgeForBlocker(blocker: Pick<WorkspaceAttentionBlocker, "reason" | "sessionBadge">): WorkspaceAttentionSessionBadge | null;
|
|
58
|
+
export interface WorkspaceAttentionContextValue {
|
|
59
|
+
blockers: WorkspaceAttentionBlocker[];
|
|
60
|
+
addBlocker: (blocker: WorkspaceAttentionBlocker) => void;
|
|
61
|
+
removeBlocker: (id: string) => void;
|
|
62
|
+
}
|
|
63
|
+
export type WorkspaceAttentionProviderProps = {
|
|
64
|
+
children: ReactNode;
|
|
65
|
+
/** Authoritative set of existing chat sessions. Blockers that opt into pruning outside this set are stale and removed. */
|
|
66
|
+
knownSessionIds?: readonly string[];
|
|
67
|
+
/** Keep false while sessions are still loading/paginated so valid blockers are not pruned early. */
|
|
68
|
+
knownSessionsAuthoritative?: boolean;
|
|
69
|
+
};
|
|
70
|
+
export declare function useWorkspaceAttention(): WorkspaceAttentionContextValue;
|
|
71
|
+
export declare function WorkspaceAttentionProvider({ children, knownSessionIds, knownSessionsAuthoritative }: WorkspaceAttentionProviderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { WORKSPACE_ATTENTION_ACTION_EVENT, WorkspaceAttentionProvider, emitWorkspaceAttentionAction, useWorkspaceAttention, workspaceAttentionSessionBadgeForBlocker, } from './WorkspaceAttentionProvider';
|
|
2
|
+
export type { WorkspaceAttentionActionDetail, WorkspaceAttentionBlocker, WorkspaceAttentionBlockerAction, WorkspaceAttentionContextValue, WorkspaceAttentionProviderProps, WorkspaceAttentionSessionBadge, WorkspaceAttentionFocusMetadata, } from './WorkspaceAttentionProvider';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { MouseEvent, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { FilesystemId } from '../../shared/types/filesystem';
|
|
3
|
+
import { UiCommand } from './types';
|
|
4
|
+
export type WorkspaceLinkTarget = {
|
|
5
|
+
kind: "openFile";
|
|
6
|
+
path: string;
|
|
7
|
+
mode?: "view" | "edit" | "diff";
|
|
8
|
+
filesystem?: FilesystemId;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "openSurface";
|
|
11
|
+
surfaceKind: string;
|
|
12
|
+
target: string;
|
|
13
|
+
filesystem?: FilesystemId;
|
|
14
|
+
meta?: Record<string, unknown>;
|
|
15
|
+
} | {
|
|
16
|
+
kind: "openPanel";
|
|
17
|
+
id: string;
|
|
18
|
+
component: string;
|
|
19
|
+
title?: string;
|
|
20
|
+
params?: Record<string, unknown>;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "expandToFile";
|
|
23
|
+
path: string;
|
|
24
|
+
};
|
|
25
|
+
export interface WorkspaceLinkProps {
|
|
26
|
+
to: WorkspaceLinkTarget;
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
title?: string;
|
|
30
|
+
href?: string;
|
|
31
|
+
onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare function workspaceLinkCommand(to: WorkspaceLinkTarget): UiCommand;
|
|
34
|
+
export declare function workspaceLinkHref(to: WorkspaceLinkTarget): string;
|
|
35
|
+
export declare function WorkspaceLink({ to, children, className, title, href, onClick }: WorkspaceLinkProps): ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { WorkspaceBridge, CausedBy } from './types';
|
|
2
|
+
import { WorkspaceStore, PanelState } from '../store/types';
|
|
3
|
+
export interface UIStatePut {
|
|
4
|
+
v: 1;
|
|
5
|
+
causedBy: CausedBy;
|
|
6
|
+
openPanels: PanelState[];
|
|
7
|
+
activePanel: string | null;
|
|
8
|
+
activeFile: string | null;
|
|
9
|
+
visibleFiles: string[];
|
|
10
|
+
dirtyFiles: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface BridgeClientOptions {
|
|
13
|
+
endpoint: string;
|
|
14
|
+
bridge: WorkspaceBridge;
|
|
15
|
+
store: StoreApi;
|
|
16
|
+
authToken?: string;
|
|
17
|
+
pollMode?: boolean;
|
|
18
|
+
pollInterval?: number;
|
|
19
|
+
onAuthError?: (statusCode: number) => void;
|
|
20
|
+
onVersionMismatch?: (version: number) => void;
|
|
21
|
+
onConnectionChange?: (connected: boolean) => void;
|
|
22
|
+
}
|
|
23
|
+
type StoreApi = {
|
|
24
|
+
getState: () => WorkspaceStore;
|
|
25
|
+
subscribe: (listener: (state: WorkspaceStore, prev: WorkspaceStore) => void) => () => void;
|
|
26
|
+
};
|
|
27
|
+
export interface BridgeClient {
|
|
28
|
+
connect(): void;
|
|
29
|
+
disconnect(): void;
|
|
30
|
+
pushState(causedBy: CausedBy): void;
|
|
31
|
+
}
|
|
32
|
+
export declare function createBridgeClient(options: BridgeClientOptions): BridgeClient;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WorkspaceStore } from '../store/types';
|
|
2
|
+
import { WorkspaceBridge } from './types';
|
|
3
|
+
type StoreApi = {
|
|
4
|
+
getState: () => WorkspaceStore;
|
|
5
|
+
subscribe: (listener: (state: WorkspaceStore, prev: WorkspaceStore) => void) => () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function createBridge(store: StoreApi): WorkspaceBridge;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { createBridge } from './createBridge';
|
|
2
|
+
export { createBridgeClient } from './client';
|
|
3
|
+
export { dispatchUiCommand, WORKSPACE_COMMAND_NOTIFY_EVENT, WORKSPACE_SURFACE_OPEN_SKIPPED_EVENT } from './uiCommandDispatcher';
|
|
4
|
+
export { UI_COMMAND_EVENT, postUiCommand } from './uiCommandBus';
|
|
5
|
+
export { WorkspaceLink, workspaceLinkCommand, workspaceLinkHref } from './WorkspaceLink';
|
|
6
|
+
export type { WorkspaceLinkProps, WorkspaceLinkTarget } from './WorkspaceLink';
|
|
7
|
+
export { startUiCommandStream } from './uiCommandStream';
|
|
8
|
+
export type { BridgeClient, BridgeClientOptions, UIStatePut } from './client';
|
|
9
|
+
export type { DispatchContext } from './uiCommandDispatcher';
|
|
10
|
+
export type { UiCommand } from './types';
|
|
11
|
+
export type { WorkspaceBridge, FileTreeBridge, BridgeEventMap, CommandResult, DynamicPaneConfig, Unsubscribe, CausedBy, } from './types';
|
|
12
|
+
export { openFileSchema, openPanelSchema, closePanelSchema, notificationSchema, navigateToLineSchema, expandToFileSchema, MAX_PANELS, } from './validation';
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { WorkspaceState, PanelState } from '../store/types';
|
|
2
|
+
import { FilesystemId } from '../../shared/types/filesystem';
|
|
3
|
+
export interface CommandResult {
|
|
4
|
+
seq: number;
|
|
5
|
+
status: "ok" | "error";
|
|
6
|
+
error?: {
|
|
7
|
+
code: string;
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface UiCommand {
|
|
12
|
+
v?: number;
|
|
13
|
+
seq?: number;
|
|
14
|
+
kind: string;
|
|
15
|
+
params: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface BridgeEventMap {
|
|
18
|
+
"panel:opened": {
|
|
19
|
+
panelId: string;
|
|
20
|
+
params: Record<string, unknown>;
|
|
21
|
+
};
|
|
22
|
+
"panel:closed": {
|
|
23
|
+
panelId: string;
|
|
24
|
+
};
|
|
25
|
+
"panel:activated": {
|
|
26
|
+
panelId: string;
|
|
27
|
+
previousPanelId: string | null;
|
|
28
|
+
};
|
|
29
|
+
"file:opened": {
|
|
30
|
+
path: string;
|
|
31
|
+
mode: "view" | "edit" | "diff";
|
|
32
|
+
filesystem?: FilesystemId;
|
|
33
|
+
};
|
|
34
|
+
"file:saved": {
|
|
35
|
+
path: string;
|
|
36
|
+
};
|
|
37
|
+
"file:dirty": {
|
|
38
|
+
path: string;
|
|
39
|
+
dirty: boolean;
|
|
40
|
+
};
|
|
41
|
+
"sidebar:toggled": {
|
|
42
|
+
collapsed: boolean;
|
|
43
|
+
};
|
|
44
|
+
"tree:expand": {
|
|
45
|
+
path: string;
|
|
46
|
+
};
|
|
47
|
+
"notification:shown": {
|
|
48
|
+
message: string;
|
|
49
|
+
level: "info" | "warn" | "error";
|
|
50
|
+
};
|
|
51
|
+
"pane:error": {
|
|
52
|
+
panelId: string;
|
|
53
|
+
error: string;
|
|
54
|
+
stack?: string;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export type Unsubscribe = () => void;
|
|
58
|
+
export interface DynamicPaneConfig {
|
|
59
|
+
id: string;
|
|
60
|
+
component: string;
|
|
61
|
+
params?: Record<string, unknown>;
|
|
62
|
+
title?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface WorkspaceBridge {
|
|
65
|
+
getOpenPanels(): PanelState[];
|
|
66
|
+
getActiveFile(): string | null;
|
|
67
|
+
getDirtyFiles(): string[];
|
|
68
|
+
getVisibleFiles(): string[];
|
|
69
|
+
openFile(path: string, opts?: {
|
|
70
|
+
mode?: "view" | "edit" | "diff";
|
|
71
|
+
filesystem?: FilesystemId;
|
|
72
|
+
}): Promise<CommandResult>;
|
|
73
|
+
openPanel(config: DynamicPaneConfig): Promise<CommandResult>;
|
|
74
|
+
closePanel(id: string): Promise<CommandResult>;
|
|
75
|
+
closeWorkbenchLeftPane(): Promise<CommandResult>;
|
|
76
|
+
showNotification(msg: string, level?: "info" | "warn" | "error"): Promise<CommandResult>;
|
|
77
|
+
navigateToLine(file: string, line: number): Promise<CommandResult>;
|
|
78
|
+
expandToFile(path: string): Promise<CommandResult>;
|
|
79
|
+
markDirty(path: string): void;
|
|
80
|
+
markClean(path: string): void;
|
|
81
|
+
subscribe<K extends keyof BridgeEventMap>(event: K, handler: (data: BridgeEventMap[K]) => void): Unsubscribe;
|
|
82
|
+
select<T>(selector: (state: WorkspaceState) => T, handler: (value: T) => void): Unsubscribe;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The minimal slice of {@link WorkspaceBridge} a file tree needs: click-to-open
|
|
86
|
+
* (`openFile`), initial selection (`getActiveFile`), reactive reveal (`select`,
|
|
87
|
+
* plus optional `subscribe`). Lives here (core bridge layer) — not in the
|
|
88
|
+
* filesystem plugin — so core chrome (WorkbenchLeftPane) can forward a
|
|
89
|
+
* surface-backed adapter without importing a plugin module.
|
|
90
|
+
*/
|
|
91
|
+
export type FileTreeBridge = Pick<WorkspaceBridge, "openFile" | "getActiveFile" | "select"> & Partial<Pick<WorkspaceBridge, "subscribe">>;
|
|
92
|
+
export type CausedBy = "user" | "agent" | "restore";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SurfaceShellApi } from '../chrome/artifact-surface/SurfaceShell';
|
|
2
|
+
import { UiCommand } from './types';
|
|
3
|
+
import { SurfaceOpenRequest } from '../../shared/types/surface';
|
|
4
|
+
/**
|
|
5
|
+
* Browser CustomEvent name dispatched on `window` when a `showNotification`
|
|
6
|
+
* UI command is dispatched from the server. Keep in sync with
|
|
7
|
+
* `WORKSPACE_COMMAND_NOTIFY_EVENT` in `@hachej/boring-agent/shared`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const WORKSPACE_COMMAND_NOTIFY_EVENT = "boring-ui:command-notify";
|
|
10
|
+
export declare const WORKSPACE_SURFACE_OPEN_SKIPPED_EVENT = "boring-workspace:surface-open-skipped";
|
|
11
|
+
export interface DispatchContext {
|
|
12
|
+
/**
|
|
13
|
+
* Imperative handle to the workbench surface. Function (getter) so a
|
|
14
|
+
* late SurfaceShell mount, or any later swap, is picked up without
|
|
15
|
+
* restarting the transport. Returns null when the surface isn't ready.
|
|
16
|
+
*/
|
|
17
|
+
surface: () => SurfaceShellApi | null;
|
|
18
|
+
/** Read the current open/closed state of the workbench pane. */
|
|
19
|
+
isWorkbenchOpen: () => boolean;
|
|
20
|
+
/** Toggle the workbench pane open. Must be a no-op when already open. */
|
|
21
|
+
openWorkbench: () => void;
|
|
22
|
+
/** Open the workbench sources/file-tree pane. Must be a no-op when already open. */
|
|
23
|
+
openWorkbenchSources?: () => void;
|
|
24
|
+
/** Close the workbench pane when a command opened it only for an ephemeral task. */
|
|
25
|
+
closeWorkbench?: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Park an op that couldn't run because the surface never mounted within the
|
|
28
|
+
* retry budget (collapsed surface / warmup overlay). The host flushes parked
|
|
29
|
+
* ops when the SurfaceShell next becomes ready. Without this the op is
|
|
30
|
+
* silently dropped.
|
|
31
|
+
*/
|
|
32
|
+
enqueue?: (run: (surface: SurfaceShellApi) => void) => void;
|
|
33
|
+
/** Optional host policy hook for surface requests that are only relevant in a visible/open context. */
|
|
34
|
+
shouldOpenSurface?: (request: SurfaceOpenRequest) => boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Apply a single agent-issued UI command. Pure function: takes a command
|
|
38
|
+
* + a context with the surface handle and returns nothing. Unknown kinds
|
|
39
|
+
* are silently ignored — the agent and frontend can drift on supported
|
|
40
|
+
* commands without breaking the chat. Known-but-unhandled kinds
|
|
41
|
+
* (navigateToLine, showNotification, closePanel) are accepted-but-no-op
|
|
42
|
+
* so the contract surface stays additive.
|
|
43
|
+
*/
|
|
44
|
+
export declare function dispatchUiCommand(cmd: UiCommand, ctx: DispatchContext): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { DispatchContext } from './uiCommandDispatcher';
|
|
2
|
+
export type { DispatchContext } from './uiCommandDispatcher';
|
|
3
|
+
export type { UiCommand } from './types';
|
|
4
|
+
export { dispatchUiCommand } from './uiCommandDispatcher';
|
|
5
|
+
export interface StreamOptions {
|
|
6
|
+
/** Endpoint base — usually "" for same-origin (vite proxy forwards). */
|
|
7
|
+
endpoint?: string;
|
|
8
|
+
/** Dispatch context — surface getter, workbench-open getter, opener. */
|
|
9
|
+
ctx: DispatchContext;
|
|
10
|
+
/** Query params appended to SSE/poll URLs, e.g. workspace scoping. */
|
|
11
|
+
query?: Record<string, string | number | boolean | null | undefined>;
|
|
12
|
+
/**
|
|
13
|
+
* Inject EventSource for tests. Defaults to `globalThis.EventSource`.
|
|
14
|
+
* Pass `null` to force the polling fallback unconditionally (useful when
|
|
15
|
+
* a test runner defines a broken stub).
|
|
16
|
+
*/
|
|
17
|
+
eventSourceCtor?: typeof EventSource | null;
|
|
18
|
+
/** Inject fetch for the polling fallback. Defaults to global fetch. */
|
|
19
|
+
fetcher?: typeof fetch;
|
|
20
|
+
/** Polling cadence when on the fallback path. */
|
|
21
|
+
pollIntervalMs?: number;
|
|
22
|
+
/** Backoff between SSE reconnect attempts (linear). */
|
|
23
|
+
reconnectDelayMs?: number;
|
|
24
|
+
/** Max reconnect attempts before giving up and falling back to polling. */
|
|
25
|
+
maxReconnects?: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Open the bridge command channel. Returns a cleanup function that closes
|
|
29
|
+
* any active EventSource AND stops any pending poll. Safe to call from
|
|
30
|
+
* useEffect.
|
|
31
|
+
*
|
|
32
|
+
* Strategy:
|
|
33
|
+
* 1. If EventSource is available, open it and listen for `command` events.
|
|
34
|
+
* 2. On error, reconnect up to `maxReconnects` times with linear backoff.
|
|
35
|
+
* 3. If EventSource is unavailable OR reconnects exhausted, fall back to
|
|
36
|
+
* polling. The fallback is sticky for the lifetime of this call —
|
|
37
|
+
* we don't try to upgrade back to SSE because the most likely cause
|
|
38
|
+
* of repeated SSE failure (proxy stripping event-stream) won't fix
|
|
39
|
+
* itself in-session.
|
|
40
|
+
*/
|
|
41
|
+
export declare function startUiCommandStream(opts: StreamOptions): () => void;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const MAX_PANELS = 50;
|
|
3
|
+
export declare const openFileSchema: z.ZodObject<{
|
|
4
|
+
path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
5
|
+
mode: z.ZodOptional<z.ZodEnum<["view", "edit", "diff"]>>;
|
|
6
|
+
filesystem: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
path: string;
|
|
9
|
+
filesystem?: string | undefined;
|
|
10
|
+
mode?: "view" | "edit" | "diff" | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
path: string;
|
|
13
|
+
filesystem?: string | undefined;
|
|
14
|
+
mode?: "view" | "edit" | "diff" | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const openPanelSchema: z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
component: z.ZodString;
|
|
19
|
+
params: z.ZodEffects<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>, Record<string, unknown> | undefined, Record<string, unknown> | undefined>;
|
|
20
|
+
title: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
id: string;
|
|
23
|
+
component: string;
|
|
24
|
+
title?: string | undefined;
|
|
25
|
+
params?: Record<string, unknown> | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
id: string;
|
|
28
|
+
component: string;
|
|
29
|
+
title?: string | undefined;
|
|
30
|
+
params?: Record<string, unknown> | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const closePanelSchema: z.ZodObject<{
|
|
33
|
+
id: z.ZodString;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
id: string;
|
|
36
|
+
}, {
|
|
37
|
+
id: string;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const notificationSchema: z.ZodObject<{
|
|
40
|
+
msg: z.ZodString;
|
|
41
|
+
level: z.ZodOptional<z.ZodEnum<["info", "warn", "error"]>>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
msg: string;
|
|
44
|
+
level?: "error" | "info" | "warn" | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
msg: string;
|
|
47
|
+
level?: "error" | "info" | "warn" | undefined;
|
|
48
|
+
}>;
|
|
49
|
+
export declare const navigateToLineSchema: z.ZodObject<{
|
|
50
|
+
file: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
51
|
+
line: z.ZodNumber;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
line: number;
|
|
54
|
+
file: string;
|
|
55
|
+
}, {
|
|
56
|
+
line: number;
|
|
57
|
+
file: string;
|
|
58
|
+
}>;
|
|
59
|
+
export declare const expandToFileSchema: z.ZodObject<{
|
|
60
|
+
path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
path: string;
|
|
63
|
+
}, {
|
|
64
|
+
path: string;
|
|
65
|
+
}>;
|
|
66
|
+
export { MAX_PANELS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|