@forgeax/interface 0.4.1
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/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +111 -0
- package/dist/package/browser/App.css +192 -0
- package/dist/package/browser/App.d.ts +11 -0
- package/dist/package/browser/App.js +11 -0
- package/dist/package/browser/ApplicationDetachedShell.d.ts +13 -0
- package/dist/package/browser/ApplicationDetachedShell.js +10 -0
- package/dist/package/browser/ApplicationShell.d.ts +19 -0
- package/dist/package/browser/ApplicationShell.js +62 -0
- package/dist/package/browser/app-kit.d.ts +1 -0
- package/dist/package/browser/app-kit.js +4 -0
- package/dist/package/browser/appHostBootstrap.d.ts +16 -0
- package/dist/package/browser/appHostBootstrap.js +145 -0
- package/dist/package/browser/application.d.ts +35 -0
- package/dist/package/browser/application.js +64 -0
- package/dist/package/browser/assets/icons/agent-icon.png +0 -0
- package/dist/package/browser/assets/icons/at.svg +3 -0
- package/dist/package/browser/assets/icons/chevron-collapse.svg +3 -0
- package/dist/package/browser/assets/icons/chevron-expand.svg +3 -0
- package/dist/package/browser/assets/icons/chevron-up.svg +3 -0
- package/dist/package/browser/assets/icons/close-x.svg +3 -0
- package/dist/package/browser/assets/icons/close.svg +3 -0
- package/dist/package/browser/assets/icons/copy.svg +4 -0
- package/dist/package/browser/assets/icons/edit.svg +3 -0
- package/dist/package/browser/assets/icons/fullscreen.svg +3 -0
- package/dist/package/browser/assets/icons/pause.svg +4 -0
- package/dist/package/browser/assets/icons/play.svg +3 -0
- package/dist/package/browser/assets/icons/select.svg +3 -0
- package/dist/package/browser/assets/icons/sendMessage-enable.svg +4 -0
- package/dist/package/browser/assets/icons/sendMessage.svg +4 -0
- package/dist/package/browser/assets/icons/status-done.svg +11 -0
- package/dist/package/browser/assets/icons/status-running.svg +10 -0
- package/dist/package/browser/assets/icons/status-waiting.svg +10 -0
- package/dist/package/browser/assets/icons/tool-execute-script.svg +3 -0
- package/dist/package/browser/assets/icons/tool-other.svg +10 -0
- package/dist/package/browser/assets/icons/tool-read-file.svg +3 -0
- package/dist/package/browser/assets/icons/tool-resource-search.svg +3 -0
- package/dist/package/browser/assets/icons/tool-task-todo.svg +4 -0
- package/dist/package/browser/assets/icons/tool-write-file.svg +3 -0
- package/dist/package/browser/boot/SettingsSection.d.ts +14 -0
- package/dist/package/browser/boot/SettingsSection.js +82 -0
- package/dist/package/browser/boot/broadcast.d.ts +2 -0
- package/dist/package/browser/boot/broadcast.js +32 -0
- package/dist/package/browser/boot/driver.d.ts +22 -0
- package/dist/package/browser/boot/driver.js +47 -0
- package/dist/package/browser/boot/store.d.ts +29 -0
- package/dist/package/browser/boot/store.js +114 -0
- package/dist/package/browser/boot/themes.d.ts +19 -0
- package/dist/package/browser/boot/themes.js +21 -0
- package/dist/package/browser/boot/types.d.ts +22 -0
- package/dist/package/browser/boot/types.js +30 -0
- package/dist/package/browser/brand/BrandProvider.d.ts +19 -0
- package/dist/package/browser/brand/BrandProvider.js +35 -0
- package/dist/package/browser/brand/index.d.ts +4 -0
- package/dist/package/browser/brand/index.js +3 -0
- package/dist/package/browser/brand/runtime.d.ts +17 -0
- package/dist/package/browser/brand/runtime.js +71 -0
- package/dist/package/browser/brand/types.d.ts +77 -0
- package/dist/package/browser/brand/types.js +9 -0
- package/dist/package/browser/components/ActivityRail/ActivityRail.css +294 -0
- package/dist/package/browser/components/ActivityRail/ActivityRail.d.ts +2 -0
- package/dist/package/browser/components/ActivityRail/ActivityRail.js +164 -0
- package/dist/package/browser/components/ActivityRail/activity-rail-model.d.ts +18 -0
- package/dist/package/browser/components/ActivityRail/activity-rail-model.js +144 -0
- package/dist/package/browser/components/AgentAvatar/AgentAvatar.d.ts +17 -0
- package/dist/package/browser/components/AgentAvatar/AgentAvatar.js +50 -0
- package/dist/package/browser/components/BuildBadge/BuildBadge.d.ts +1 -0
- package/dist/package/browser/components/BuildBadge/BuildBadge.js +279 -0
- package/dist/package/browser/components/Bus/BusAdminPanel.css +2425 -0
- package/dist/package/browser/components/Bus/BusAdminPanel.d.ts +2 -0
- package/dist/package/browser/components/Bus/BusAdminPanel.js +1385 -0
- package/dist/package/browser/components/Bus/CapabilityOverview.d.ts +3 -0
- package/dist/package/browser/components/Bus/CapabilityOverview.js +50 -0
- package/dist/package/browser/components/ChatColumn/ChatColumn.d.ts +2 -0
- package/dist/package/browser/components/ChatColumn/ChatColumn.js +18 -0
- package/dist/package/browser/components/ChatColumn/SessionTabStrip.d.ts +1 -0
- package/dist/package/browser/components/ChatColumn/SessionTabStrip.js +103 -0
- package/dist/package/browser/components/ChatColumn/useChatWidth.d.ts +5 -0
- package/dist/package/browser/components/ChatColumn/useChatWidth.js +13 -0
- package/dist/package/browser/components/CommandPalette/CommandPalette.css +199 -0
- package/dist/package/browser/components/CommandPalette/CommandPalette.d.ts +2 -0
- package/dist/package/browser/components/CommandPalette/CommandPalette.js +242 -0
- package/dist/package/browser/components/Confirm/ConfirmDialog.d.ts +2 -0
- package/dist/package/browser/components/Confirm/ConfirmDialog.js +113 -0
- package/dist/package/browser/components/ContextMenu/ContextMenu.d.ts +10 -0
- package/dist/package/browser/components/ContextMenu/ContextMenu.js +218 -0
- package/dist/package/browser/components/ContextMenu/menuRegistry.d.ts +18 -0
- package/dist/package/browser/components/ContextMenu/menuRegistry.js +152 -0
- package/dist/package/browser/components/DetachedSurface.d.ts +20 -0
- package/dist/package/browser/components/DetachedSurface.js +102 -0
- package/dist/package/browser/components/DockShell/DockPanelHost.d.ts +4 -0
- package/dist/package/browser/components/DockShell/DockPanelHost.js +7 -0
- package/dist/package/browser/components/DockShell/DockRegion.d.ts +7 -0
- package/dist/package/browser/components/DockShell/DockRegion.js +315 -0
- package/dist/package/browser/components/DockShell/DockShell.css +1018 -0
- package/dist/package/browser/components/DockShell/DockTab.d.ts +3 -0
- package/dist/package/browser/components/DockShell/DockTab.js +139 -0
- package/dist/package/browser/components/DockShell/ExtensionHostPanel.d.ts +9 -0
- package/dist/package/browser/components/DockShell/ExtensionHostPanel.js +68 -0
- package/dist/package/browser/components/DockShell/ExtensionRuntimeFrame.d.ts +14 -0
- package/dist/package/browser/components/DockShell/ExtensionRuntimeFrame.js +56 -0
- package/dist/package/browser/components/DockShell/PanelWindowingBoundary.d.ts +6 -0
- package/dist/package/browser/components/DockShell/PanelWindowingBoundary.js +9 -0
- package/dist/package/browser/components/DockShell/chatDockAnimation.d.ts +45 -0
- package/dist/package/browser/components/DockShell/chatDockAnimation.js +101 -0
- package/dist/package/browser/components/DockShell/chatDockFullscreen.d.ts +17 -0
- package/dist/package/browser/components/DockShell/chatDockFullscreen.js +22 -0
- package/dist/package/browser/components/DockShell/chatDockLayout.d.ts +10 -0
- package/dist/package/browser/components/DockShell/chatDockLayout.js +11 -0
- package/dist/package/browser/components/DockShell/compact-empty-dock-groups.d.ts +16 -0
- package/dist/package/browser/components/DockShell/compact-empty-dock-groups.js +28 -0
- package/dist/package/browser/components/DockShell/crossInstanceDrop.d.ts +1 -0
- package/dist/package/browser/components/DockShell/crossInstanceDrop.js +1 -0
- package/dist/package/browser/components/DockShell/dockResetEpoch.d.ts +2 -0
- package/dist/package/browser/components/DockShell/dockResetEpoch.js +13 -0
- package/dist/package/browser/components/DockShell/dockTitle.d.ts +12 -0
- package/dist/package/browser/components/DockShell/dockTitle.js +36 -0
- package/dist/package/browser/components/DockShell/dockviewRegistry.d.ts +1 -0
- package/dist/package/browser/components/DockShell/dockviewRegistry.js +1 -0
- package/dist/package/browser/components/DockShell/edgeDrawer.d.ts +24 -0
- package/dist/package/browser/components/DockShell/edgeDrawer.js +1144 -0
- package/dist/package/browser/components/DockShell/edgePinStore.d.ts +12 -0
- package/dist/package/browser/components/DockShell/edgePinStore.js +37 -0
- package/dist/package/browser/components/DockShell/extension-editor-bridge.d.ts +13 -0
- package/dist/package/browser/components/DockShell/extension-editor-bridge.js +100 -0
- package/dist/package/browser/components/DockShell/extension-runtime-selection.d.ts +8 -0
- package/dist/package/browser/components/DockShell/extension-runtime-selection.js +6 -0
- package/dist/package/browser/components/DockShell/extensionRuntime.d.ts +17 -0
- package/dist/package/browser/components/DockShell/extensionRuntime.js +84 -0
- package/dist/package/browser/components/DockShell/footer-panel-visibility.d.ts +7 -0
- package/dist/package/browser/components/DockShell/footer-panel-visibility.js +43 -0
- package/dist/package/browser/components/DockShell/footer-panels.d.ts +2 -0
- package/dist/package/browser/components/DockShell/footer-panels.js +7 -0
- package/dist/package/browser/components/DockShell/panelRegistry.d.ts +37 -0
- package/dist/package/browser/components/DockShell/panelRegistry.js +126 -0
- package/dist/package/browser/components/DockShell/panelRenderers.d.ts +325 -0
- package/dist/package/browser/components/DockShell/panelRenderers.js +25 -0
- package/dist/package/browser/components/DockShell/panelTabCommands.d.ts +18 -0
- package/dist/package/browser/components/DockShell/panelTabCommands.js +133 -0
- package/dist/package/browser/components/DockShell/panelWindowing.d.ts +32 -0
- package/dist/package/browser/components/DockShell/panelWindowing.js +42 -0
- package/dist/package/browser/components/DockShell/regions.d.ts +1 -0
- package/dist/package/browser/components/DockShell/regions.js +1 -0
- package/dist/package/browser/components/DockShell/resolveRegion.d.ts +1 -0
- package/dist/package/browser/components/DockShell/resolveRegion.js +1 -0
- package/dist/package/browser/components/DockShell/sanitizeDockLayout.d.ts +3 -0
- package/dist/package/browser/components/DockShell/sanitizeDockLayout.js +46 -0
- package/dist/package/browser/components/DockShell/sideEdgeMove.d.ts +1 -0
- package/dist/package/browser/components/DockShell/sideEdgeMove.js +1 -0
- package/dist/package/browser/components/DockShell/studioTabMenuProvider.d.ts +13 -0
- package/dist/package/browser/components/DockShell/studioTabMenuProvider.js +39 -0
- package/dist/package/browser/components/DockShell/tabContextMenu.d.ts +29 -0
- package/dist/package/browser/components/DockShell/tabContextMenu.js +68 -0
- package/dist/package/browser/components/DockShell/ueDrag/controller.d.ts +80 -0
- package/dist/package/browser/components/DockShell/ueDrag/controller.js +785 -0
- package/dist/package/browser/components/DockShell/ueDrag/geometry.d.ts +94 -0
- package/dist/package/browser/components/DockShell/ueDrag/geometry.js +217 -0
- package/dist/package/browser/components/DockShell/ueDrag/overlay.d.ts +32 -0
- package/dist/package/browser/components/DockShell/ueDrag/overlay.js +206 -0
- package/dist/package/browser/components/DockShell/ueDrag/ueDrag.css +199 -0
- package/dist/package/browser/components/DockShell/useAuxBarWidth.d.ts +5 -0
- package/dist/package/browser/components/DockShell/useAuxBarWidth.js +13 -0
- package/dist/package/browser/components/Drawer/DrawerHostView.css +143 -0
- package/dist/package/browser/components/Drawer/DrawerHostView.d.ts +19 -0
- package/dist/package/browser/components/Drawer/DrawerHostView.js +93 -0
- package/dist/package/browser/components/Drawer/DrawerLauncher.d.ts +12 -0
- package/dist/package/browser/components/Drawer/DrawerLauncher.js +22 -0
- package/dist/package/browser/components/Drawer/useDrawerStore.d.ts +15 -0
- package/dist/package/browser/components/Drawer/useDrawerStore.js +80 -0
- package/dist/package/browser/components/ErrorBoundary.d.ts +55 -0
- package/dist/package/browser/components/ErrorBoundary.js +131 -0
- package/dist/package/browser/components/ExtensionHost/ExtensionIframeHost.d.ts +28 -0
- package/dist/package/browser/components/ExtensionHost/ExtensionIframeHost.js +179 -0
- package/dist/package/browser/components/ExtensionHost/NativeExtensionHost.d.ts +14 -0
- package/dist/package/browser/components/ExtensionHost/NativeExtensionHost.js +152 -0
- package/dist/package/browser/components/Feedback/FeedbackPanel.css +640 -0
- package/dist/package/browser/components/Feedback/FeedbackPanel.d.ts +8 -0
- package/dist/package/browser/components/Feedback/FeedbackPanel.js +118 -0
- package/dist/package/browser/components/Feedback/PassiveFeedback.css +179 -0
- package/dist/package/browser/components/Feedback/PassiveFeedback.d.ts +2 -0
- package/dist/package/browser/components/Feedback/PassiveFeedback.js +218 -0
- package/dist/package/browser/components/Feedback/collect.d.ts +15 -0
- package/dist/package/browser/components/Feedback/collect.js +80 -0
- package/dist/package/browser/components/Feedback/store.d.ts +61 -0
- package/dist/package/browser/components/Feedback/store.js +174 -0
- package/dist/package/browser/components/LangSwitcher/LangSwitcher.css +78 -0
- package/dist/package/browser/components/LangSwitcher/LangSwitcher.d.ts +14 -0
- package/dist/package/browser/components/LangSwitcher/LangSwitcher.js +44 -0
- package/dist/package/browser/components/MainArea/ConsolePanel.d.ts +1 -0
- package/dist/package/browser/components/MainArea/ConsolePanel.js +16 -0
- package/dist/package/browser/components/MainArea/MainArea.css +2130 -0
- package/dist/package/browser/components/MainArea/MainArea.d.ts +2 -0
- package/dist/package/browser/components/MainArea/MainArea.js +20 -0
- package/dist/package/browser/components/MainArea/StandaloneExtensionIframe.d.ts +25 -0
- package/dist/package/browser/components/MainArea/StandaloneExtensionIframe.js +155 -0
- package/dist/package/browser/components/MainArea/SurfacePanels.d.ts +3 -0
- package/dist/package/browser/components/MainArea/SurfacePanels.js +27 -0
- package/dist/package/browser/components/MainArea/TelemetryViewer.css +122 -0
- package/dist/package/browser/components/MainArea/TelemetryViewer.d.ts +36 -0
- package/dist/package/browser/components/MainArea/TelemetryViewer.js +116 -0
- package/dist/package/browser/components/MenuBar/MenuBar.css +186 -0
- package/dist/package/browser/components/MenuBar/MenuBar.d.ts +27 -0
- package/dist/package/browser/components/MenuBar/MenuBar.js +286 -0
- package/dist/package/browser/components/MenuBar/index.d.ts +1 -0
- package/dist/package/browser/components/MenuBar/index.js +1 -0
- package/dist/package/browser/components/MenuBar/menubar-open-state.d.ts +8 -0
- package/dist/package/browser/components/MenuBar/menubar-open-state.js +11 -0
- package/dist/package/browser/components/MenuBar/menubar-surface.d.ts +30 -0
- package/dist/package/browser/components/MenuBar/menubar-surface.js +201 -0
- package/dist/package/browser/components/ModelPicker/index.d.ts +1 -0
- package/dist/package/browser/components/ModelPicker/index.js +1 -0
- package/dist/package/browser/components/ModelPicker/useModelCatalog.d.ts +22 -0
- package/dist/package/browser/components/ModelPicker/useModelCatalog.js +100 -0
- package/dist/package/browser/components/Onboarding/ConnectModelPrompt.d.ts +2 -0
- package/dist/package/browser/components/Onboarding/ConnectModelPrompt.js +40 -0
- package/dist/package/browser/components/Onboarding/Onboarding.css +232 -0
- package/dist/package/browser/components/Onboarding/OnboardingController.d.ts +10 -0
- package/dist/package/browser/components/Onboarding/OnboardingController.js +549 -0
- package/dist/package/browser/components/Onboarding/connect-selection.d.ts +17 -0
- package/dist/package/browser/components/Onboarding/connect-selection.js +18 -0
- package/dist/package/browser/components/Onboarding/home-transition.d.ts +9 -0
- package/dist/package/browser/components/Onboarding/home-transition.js +20 -0
- package/dist/package/browser/components/Onboarding/index.d.ts +4 -0
- package/dist/package/browser/components/Onboarding/index.js +3 -0
- package/dist/package/browser/components/Onboarding/prepareTourShell.d.ts +5 -0
- package/dist/package/browser/components/Onboarding/prepareTourShell.js +11 -0
- package/dist/package/browser/components/Onboarding/project-name.d.ts +17 -0
- package/dist/package/browser/components/Onboarding/project-name.js +29 -0
- package/dist/package/browser/components/Onboarding/types.d.ts +31 -0
- package/dist/package/browser/components/Onboarding/types.js +77 -0
- package/dist/package/browser/components/PageTabs/PageTabStrip.css +221 -0
- package/dist/package/browser/components/PageTabs/PageTabStrip.d.ts +3 -0
- package/dist/package/browser/components/PageTabs/PageTabStrip.js +214 -0
- package/dist/package/browser/components/PageTabs/openablePageTypes.d.ts +9 -0
- package/dist/package/browser/components/PageTabs/openablePageTypes.js +13 -0
- package/dist/package/browser/components/PanelShell/PanelShell.css +517 -0
- package/dist/package/browser/components/PanelShell/PanelShell.d.ts +7 -0
- package/dist/package/browser/components/PanelShell/PanelShell.js +459 -0
- package/dist/package/browser/components/Resize/ResizeHandle.d.ts +1 -0
- package/dist/package/browser/components/Resize/ResizeHandle.js +1 -0
- package/dist/package/browser/components/SceneBackground/SceneBackground.d.ts +2 -0
- package/dist/package/browser/components/SceneBackground/SceneBackground.js +5 -0
- package/dist/package/browser/components/SchemaForm/SchemaForm.css +138 -0
- package/dist/package/browser/components/SchemaForm/SchemaForm.d.ts +17 -0
- package/dist/package/browser/components/SchemaForm/SchemaForm.js +86 -0
- package/dist/package/browser/components/SchemaForm/schema-form-utils.d.ts +30 -0
- package/dist/package/browser/components/SchemaForm/schema-form-utils.js +51 -0
- package/dist/package/browser/components/SettingsPrimitives.d.ts +24 -0
- package/dist/package/browser/components/SettingsPrimitives.js +145 -0
- package/dist/package/browser/components/Sidebar/BusHealthLamp.d.ts +1 -0
- package/dist/package/browser/components/Sidebar/BusHealthLamp.js +72 -0
- package/dist/package/browser/components/Sidebar/FilesPanel.d.ts +1 -0
- package/dist/package/browser/components/Sidebar/FilesPanel.js +234 -0
- package/dist/package/browser/components/Sidebar/Sidebar.css +1393 -0
- package/dist/package/browser/components/Sidebar/Sidebar.d.ts +3 -0
- package/dist/package/browser/components/Sidebar/Sidebar.js +8 -0
- package/dist/package/browser/components/Sidebar/sidebar-types.d.ts +18 -0
- package/dist/package/browser/components/Sidebar/sidebar-types.js +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/SlotDebugOverlay.d.ts +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/SlotDebugOverlay.js +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/hashHue.d.ts +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/hashHue.js +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/index.d.ts +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/index.js +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/isSlotDebugEnabled.d.ts +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/isSlotDebugEnabled.js +1 -0
- package/dist/package/browser/components/StatusBar/FatalBanner.d.ts +25 -0
- package/dist/package/browser/components/StatusBar/FatalBanner.js +52 -0
- package/dist/package/browser/components/StatusBar/GlobalStatusBar.css +304 -0
- package/dist/package/browser/components/StatusBar/InfoPanel.css +174 -0
- package/dist/package/browser/components/StatusBar/InfoPanel.d.ts +19 -0
- package/dist/package/browser/components/StatusBar/InfoPanel.js +128 -0
- package/dist/package/browser/components/StatusBar/StatusChip.css +52 -0
- package/dist/package/browser/components/StatusBar/StatusChip.d.ts +40 -0
- package/dist/package/browser/components/StatusBar/StatusChip.js +13 -0
- package/dist/package/browser/components/StatusBar/StripHostView.d.ts +2 -0
- package/dist/package/browser/components/StatusBar/StripHostView.js +91 -0
- package/dist/package/browser/components/StatusBar/StripPopover.css +58 -0
- package/dist/package/browser/components/StatusBar/StripPopover.d.ts +16 -0
- package/dist/package/browser/components/StatusBar/StripPopover.js +15 -0
- package/dist/package/browser/components/StatusBar/feeds/PulseFeeds.d.ts +16 -0
- package/dist/package/browser/components/StatusBar/feeds/PulseFeeds.js +88 -0
- package/dist/package/browser/components/StatusBar/footer/CheckpointsDrawer.d.ts +4 -0
- package/dist/package/browser/components/StatusBar/footer/CheckpointsDrawer.js +77 -0
- package/dist/package/browser/components/StatusBar/footer/DiagnosticsPopover.d.ts +4 -0
- package/dist/package/browser/components/StatusBar/footer/DiagnosticsPopover.js +108 -0
- package/dist/package/browser/components/StatusBar/footer/EventsDrawer.d.ts +14 -0
- package/dist/package/browser/components/StatusBar/footer/EventsDrawer.js +25 -0
- package/dist/package/browser/components/StatusBar/footer/ForgeaxBuildPopover.d.ts +4 -0
- package/dist/package/browser/components/StatusBar/footer/ForgeaxBuildPopover.js +62 -0
- package/dist/package/browser/components/StatusBar/footer/footer.css +178 -0
- package/dist/package/browser/components/StatusBar/healthBridge.d.ts +38 -0
- package/dist/package/browser/components/StatusBar/healthBridge.js +245 -0
- package/dist/package/browser/components/StatusBar/healthStore.d.ts +80 -0
- package/dist/package/browser/components/StatusBar/healthStore.js +129 -0
- package/dist/package/browser/components/StatusBar/useStatusItem.d.ts +10 -0
- package/dist/package/browser/components/StatusBar/useStatusItem.js +35 -0
- package/dist/package/browser/components/Surfaces/SurfaceKeepAlive.css +34 -0
- package/dist/package/browser/components/Surfaces/SurfaceKeepAliveLayer.d.ts +3 -0
- package/dist/package/browser/components/Surfaces/SurfaceKeepAliveLayer.js +218 -0
- package/dist/package/browser/components/Surfaces/SurfaceOverlay.css +160 -0
- package/dist/package/browser/components/Surfaces/SurfaceOverlay.d.ts +9 -0
- package/dist/package/browser/components/Surfaces/SurfaceOverlay.js +144 -0
- package/dist/package/browser/components/TopBar/AndroidPackageDialog.d.ts +23 -0
- package/dist/package/browser/components/TopBar/AndroidPackageDialog.js +115 -0
- package/dist/package/browser/components/TopBar/FsBrowser.css +156 -0
- package/dist/package/browser/components/TopBar/FsBrowser.d.ts +8 -0
- package/dist/package/browser/components/TopBar/FsBrowser.js +93 -0
- package/dist/package/browser/components/TopBar/GameSwitcher.d.ts +29 -0
- package/dist/package/browser/components/TopBar/GameSwitcher.js +157 -0
- package/dist/package/browser/components/TopBar/IosPackageDialog.d.ts +23 -0
- package/dist/package/browser/components/TopBar/IosPackageDialog.js +115 -0
- package/dist/package/browser/components/TopBar/ProjectSwitcher.d.ts +3 -0
- package/dist/package/browser/components/TopBar/ProjectSwitcher.js +41 -0
- package/dist/package/browser/components/TopBar/PublishOnboarding.css +133 -0
- package/dist/package/browser/components/TopBar/PublishOnboarding.d.ts +10 -0
- package/dist/package/browser/components/TopBar/PublishOnboarding.js +144 -0
- package/dist/package/browser/components/TopBar/SessionSwitcher.d.ts +2 -0
- package/dist/package/browser/components/TopBar/SessionSwitcher.js +124 -0
- package/dist/package/browser/components/TopBar/TopBar.css +1672 -0
- package/dist/package/browser/components/TopBar/TopBar.d.ts +2 -0
- package/dist/package/browser/components/TopBar/TopBar.js +606 -0
- package/dist/package/browser/components/TopBar/publish-options.d.ts +20 -0
- package/dist/package/browser/components/TopBar/publish-options.js +28 -0
- package/dist/package/browser/components/TourOverlay/TourOverlay.css +122 -0
- package/dist/package/browser/components/TourOverlay/TourOverlay.d.ts +26 -0
- package/dist/package/browser/components/TourOverlay/TourOverlay.js +233 -0
- package/dist/package/browser/components/TourOverlay/index.d.ts +2 -0
- package/dist/package/browser/components/TourOverlay/index.js +1 -0
- package/dist/package/browser/components/ownership.d.ts +7 -0
- package/dist/package/browser/components/ownership.js +7 -0
- package/dist/package/browser/components/ui/SearchableMenu.css +143 -0
- package/dist/package/browser/components/ui/SearchableMenu.d.ts +30 -0
- package/dist/package/browser/components/ui/SearchableMenu.js +40 -0
- package/dist/package/browser/components/ui/alert-dialog.d.ts +20 -0
- package/dist/package/browser/components/ui/alert-dialog.js +38 -0
- package/dist/package/browser/components/ui/button.d.ts +11 -0
- package/dist/package/browser/components/ui/button.js +33 -0
- package/dist/package/browser/components/ui/checkbox.d.ts +4 -0
- package/dist/package/browser/components/ui/checkbox.js +8 -0
- package/dist/package/browser/components/ui/command.d.ts +74 -0
- package/dist/package/browser/components/ui/command.js +20 -0
- package/dist/package/browser/components/ui/dialog.d.ts +21 -0
- package/dist/package/browser/components/ui/dialog.js +34 -0
- package/dist/package/browser/components/ui/dropdown-menu.d.ts +18 -0
- package/dist/package/browser/components/ui/dropdown-menu.js +30 -0
- package/dist/package/browser/components/ui/input.d.ts +3 -0
- package/dist/package/browser/components/ui/input.js +8 -0
- package/dist/package/browser/components/ui/label.d.ts +4 -0
- package/dist/package/browser/components/ui/label.js +7 -0
- package/dist/package/browser/components/ui/popover.d.ts +7 -0
- package/dist/package/browser/components/ui/popover.js +10 -0
- package/dist/package/browser/components/ui/select.d.ts +11 -0
- package/dist/package/browser/components/ui/select.js +31 -0
- package/dist/package/browser/components/ui/tabs.d.ts +7 -0
- package/dist/package/browser/components/ui/tabs.js +12 -0
- package/dist/package/browser/components/ui/textarea.d.ts +3 -0
- package/dist/package/browser/components/ui/textarea.js +8 -0
- package/dist/package/browser/components/ui/tooltip.d.ts +7 -0
- package/dist/package/browser/components/ui/tooltip.js +10 -0
- package/dist/package/browser/core/app-shell/catalog-page-extensions.d.ts +28 -0
- package/dist/package/browser/core/app-shell/catalog-page-extensions.js +234 -0
- package/dist/package/browser/core/app-shell/derive-panel-renderers.d.ts +2 -0
- package/dist/package/browser/core/app-shell/derive-panel-renderers.js +17 -0
- package/dist/package/browser/core/app-shell/host.d.ts +31 -0
- package/dist/package/browser/core/app-shell/host.js +188 -0
- package/dist/package/browser/core/app-shell/index.d.ts +7 -0
- package/dist/package/browser/core/app-shell/index.js +8 -0
- package/dist/package/browser/core/app-shell/logger.d.ts +2 -0
- package/dist/package/browser/core/app-shell/logger.js +6 -0
- package/dist/package/browser/core/app-shell/ownership.d.ts +7 -0
- package/dist/package/browser/core/app-shell/ownership.js +7 -0
- package/dist/package/browser/core/app-shell/react/HostProvider.d.ts +10 -0
- package/dist/package/browser/core/app-shell/react/HostProvider.js +35 -0
- package/dist/package/browser/core/app-shell/surface-extension.d.ts +17 -0
- package/dist/package/browser/core/app-shell/surface-extension.js +33 -0
- package/dist/package/browser/core/app-shell/types.d.ts +176 -0
- package/dist/package/browser/core/app-shell/types.js +1 -0
- package/dist/package/browser/core/contextual-keybindings.d.ts +71 -0
- package/dist/package/browser/core/contextual-keybindings.js +198 -0
- package/dist/package/browser/core/extension-foundation/bus.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/bus.js +3 -0
- package/dist/package/browser/core/extension-foundation/capabilities.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/capabilities.js +3 -0
- package/dist/package/browser/core/extension-foundation/commands.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/commands.js +3 -0
- package/dist/package/browser/core/extension-foundation/context-keys.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/context-keys.js +3 -0
- package/dist/package/browser/core/extension-foundation/contribution-registry.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/contribution-registry.js +3 -0
- package/dist/package/browser/core/extension-foundation/errors.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/errors.js +3 -0
- package/dist/package/browser/core/extension-foundation/index.d.ts +8 -0
- package/dist/package/browser/core/extension-foundation/index.js +9 -0
- package/dist/package/browser/core/extension-foundation/loader.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/loader.js +3 -0
- package/dist/package/browser/core/extension-foundation/storage.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/storage.js +3 -0
- package/dist/package/browser/core/extension-foundation/types.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/types.js +1 -0
- package/dist/package/browser/core/extensions/builtin-commands.d.ts +2 -0
- package/dist/package/browser/core/extensions/builtin-commands.js +256 -0
- package/dist/package/browser/core/extensions/builtin-menus.d.ts +2 -0
- package/dist/package/browser/core/extensions/builtin-menus.js +252 -0
- package/dist/package/browser/core/extensions/chrome-drawer.d.ts +3 -0
- package/dist/package/browser/core/extensions/chrome-drawer.js +45 -0
- package/dist/package/browser/core/extensions/chrome-statusbar.d.ts +6 -0
- package/dist/package/browser/core/extensions/chrome-statusbar.js +26 -0
- package/dist/package/browser/core/extensions/detached-agents-browser.d.ts +3 -0
- package/dist/package/browser/core/extensions/detached-agents-browser.js +9 -0
- package/dist/package/browser/core/extensions/detached-files-browser.d.ts +3 -0
- package/dist/package/browser/core/extensions/detached-files-browser.js +6 -0
- package/dist/package/browser/core/extensions/editor-commands.d.ts +2 -0
- package/dist/package/browser/core/extensions/editor-commands.js +182 -0
- package/dist/package/browser/core/extensions/foundation-bus.d.ts +2 -0
- package/dist/package/browser/core/extensions/foundation-bus.js +3 -0
- package/dist/package/browser/core/extensions/foundation-commands.d.ts +2 -0
- package/dist/package/browser/core/extensions/foundation-commands.js +6 -0
- package/dist/package/browser/core/extensions/foundation-storage.d.ts +2 -0
- package/dist/package/browser/core/extensions/foundation-storage.js +3 -0
- package/dist/package/browser/core/extensions/host-commands.d.ts +18 -0
- package/dist/package/browser/core/extensions/host-commands.js +52 -0
- package/dist/package/browser/core/extensions/observability.d.ts +14 -0
- package/dist/package/browser/core/extensions/observability.js +18 -0
- package/dist/package/browser/core/extensions/panels-chat.d.ts +2 -0
- package/dist/package/browser/core/extensions/panels-chat.js +41 -0
- package/dist/package/browser/core/extensions/panels-editor.d.ts +8 -0
- package/dist/package/browser/core/extensions/panels-editor.js +26 -0
- package/dist/package/browser/core/extensions/panels-viewport.d.ts +2 -0
- package/dist/package/browser/core/extensions/panels-viewport.js +20 -0
- package/dist/package/browser/core/extensions/session-client.d.ts +29 -0
- package/dist/package/browser/core/extensions/session-client.js +42 -0
- package/dist/package/browser/core/extensions/slots-corner-agent-picker.d.ts +5 -0
- package/dist/package/browser/core/extensions/slots-corner-agent-picker.js +6 -0
- package/dist/package/browser/core/extensions/slots-main-area-body.d.ts +3 -0
- package/dist/package/browser/core/extensions/slots-main-area-body.js +6 -0
- package/dist/package/browser/core/extensions/slots-sidebar-agents.d.ts +3 -0
- package/dist/package/browser/core/extensions/slots-sidebar-agents.js +6 -0
- package/dist/package/browser/core/extensions/studio-domain-clients.d.ts +12 -0
- package/dist/package/browser/core/extensions/studio-domain-clients.js +15 -0
- package/dist/package/browser/core/extensions/surfaces-scene-editor.d.ts +3 -0
- package/dist/package/browser/core/extensions/surfaces-scene-editor.js +6 -0
- package/dist/package/browser/core/extensions/trajectory.d.ts +2 -0
- package/dist/package/browser/core/extensions/trajectory.js +50 -0
- package/dist/package/browser/core/page-navigation.d.ts +1 -0
- package/dist/package/browser/core/page-navigation.js +1 -0
- package/dist/package/browser/core/page-platform/activity.d.ts +4 -0
- package/dist/package/browser/core/page-platform/activity.js +46 -0
- package/dist/package/browser/core/page-platform/dockview-layout.d.ts +7 -0
- package/dist/package/browser/core/page-platform/dockview-layout.js +63 -0
- package/dist/package/browser/core/page-platform/index.d.ts +8 -0
- package/dist/package/browser/core/page-platform/index.js +8 -0
- package/dist/package/browser/core/page-platform/layout-store.d.ts +18 -0
- package/dist/package/browser/core/page-platform/layout-store.js +54 -0
- package/dist/package/browser/core/page-platform/page-dirty-probe.d.ts +1 -0
- package/dist/package/browser/core/page-platform/page-dirty-probe.js +4 -0
- package/dist/package/browser/core/page-platform/registry.d.ts +3 -0
- package/dist/package/browser/core/page-platform/registry.js +194 -0
- package/dist/package/browser/core/page-platform/resource-editor.d.ts +3 -0
- package/dist/package/browser/core/page-platform/resource-editor.js +74 -0
- package/dist/package/browser/core/page-platform/session.d.ts +10 -0
- package/dist/package/browser/core/page-platform/session.js +327 -0
- package/dist/package/browser/core/page-platform/types.d.ts +242 -0
- package/dist/package/browser/core/page-platform/types.js +10 -0
- package/dist/package/browser/core/panels/context-expression.d.ts +1 -0
- package/dist/package/browser/core/panels/context-expression.js +1 -0
- package/dist/package/browser/core/panels/drawer.d.ts +23 -0
- package/dist/package/browser/core/panels/drawer.js +1 -0
- package/dist/package/browser/core/panels/index.d.ts +7 -0
- package/dist/package/browser/core/panels/index.js +7 -0
- package/dist/package/browser/core/panels/panel-action-registry.d.ts +6 -0
- package/dist/package/browser/core/panels/panel-action-registry.js +62 -0
- package/dist/package/browser/core/panels/panel-control-registry.d.ts +6 -0
- package/dist/package/browser/core/panels/panel-control-registry.js +54 -0
- package/dist/package/browser/core/panels/resolve-panel-action-state.d.ts +10 -0
- package/dist/package/browser/core/panels/resolve-panel-action-state.js +9 -0
- package/dist/package/browser/core/panels/strip.d.ts +40 -0
- package/dist/package/browser/core/panels/strip.js +1 -0
- package/dist/package/browser/core/panels/types.d.ts +143 -0
- package/dist/package/browser/core/panels/types.js +1 -0
- package/dist/package/browser/i18n/index.d.ts +50 -0
- package/dist/package/browser/i18n/index.js +207 -0
- package/dist/package/browser/i18n/locales/en.json +1959 -0
- package/dist/package/browser/i18n/locales/zh.json +1959 -0
- package/dist/package/browser/index.d.ts +2 -0
- package/dist/package/browser/index.js +2 -0
- package/dist/package/browser/lib/a11y-summary.d.ts +17 -0
- package/dist/package/browser/lib/a11y-summary.js +66 -0
- package/dist/package/browser/lib/action-dom-discovery.d.ts +2 -0
- package/dist/package/browser/lib/action-dom-discovery.js +84 -0
- package/dist/package/browser/lib/action-registry.d.ts +94 -0
- package/dist/package/browser/lib/action-registry.js +210 -0
- package/dist/package/browser/lib/aegis.d.ts +40 -0
- package/dist/package/browser/lib/aegis.js +230 -0
- package/dist/package/browser/lib/agent-catalog-url.d.ts +9 -0
- package/dist/package/browser/lib/agent-catalog-url.js +24 -0
- package/dist/package/browser/lib/agent-cli-provider.d.ts +10 -0
- package/dist/package/browser/lib/agent-cli-provider.js +81 -0
- package/dist/package/browser/lib/ai-intents.d.ts +30 -0
- package/dist/package/browser/lib/ai-intents.js +52 -0
- package/dist/package/browser/lib/broadcast-stream.d.ts +17 -0
- package/dist/package/browser/lib/broadcast-stream.js +163 -0
- package/dist/package/browser/lib/browser-prefs-sync.d.ts +16 -0
- package/dist/package/browser/lib/browser-prefs-sync.js +151 -0
- package/dist/package/browser/lib/builtin-actions.d.ts +2 -0
- package/dist/package/browser/lib/builtin-actions.js +558 -0
- package/dist/package/browser/lib/bus.d.ts +25 -0
- package/dist/package/browser/lib/bus.js +71 -0
- package/dist/package/browser/lib/checkpoint-api.d.ts +54 -0
- package/dist/package/browser/lib/checkpoint-api.js +41 -0
- package/dist/package/browser/lib/cli-providers.d.ts +33 -0
- package/dist/package/browser/lib/cli-providers.js +61 -0
- package/dist/package/browser/lib/command-palette-store.d.ts +5 -0
- package/dist/package/browser/lib/command-palette-store.js +22 -0
- package/dist/package/browser/lib/composer-bridge.d.ts +103 -0
- package/dist/package/browser/lib/composer-bridge.js +448 -0
- package/dist/package/browser/lib/dashboard-api.d.ts +104 -0
- package/dist/package/browser/lib/dashboard-api.js +125 -0
- package/dist/package/browser/lib/deep-link-bus.d.ts +10 -0
- package/dist/package/browser/lib/deep-link-bus.js +35 -0
- package/dist/package/browser/lib/dialog.d.ts +40 -0
- package/dist/package/browser/lib/dialog.js +103 -0
- package/dist/package/browser/lib/editor-facts-bus.d.ts +27 -0
- package/dist/package/browser/lib/editor-facts-bus.js +25 -0
- package/dist/package/browser/lib/extension-api.d.ts +140 -0
- package/dist/package/browser/lib/extension-api.js +90 -0
- package/dist/package/browser/lib/file-activity-stream.d.ts +54 -0
- package/dist/package/browser/lib/file-activity-stream.js +123 -0
- package/dist/package/browser/lib/file-family.d.ts +15 -0
- package/dist/package/browser/lib/file-family.js +25 -0
- package/dist/package/browser/lib/game-templates.d.ts +7 -0
- package/dist/package/browser/lib/game-templates.js +15 -0
- package/dist/package/browser/lib/global-shortcuts.d.ts +121 -0
- package/dist/package/browser/lib/global-shortcuts.js +551 -0
- package/dist/package/browser/lib/logSink.d.ts +16 -0
- package/dist/package/browser/lib/logSink.js +128 -0
- package/dist/package/browser/lib/lucide-icon.d.ts +5 -0
- package/dist/package/browser/lib/lucide-icon.js +20 -0
- package/dist/package/browser/lib/menu-registry.d.ts +113 -0
- package/dist/package/browser/lib/menu-registry.js +197 -0
- package/dist/package/browser/lib/model-config.d.ts +89 -0
- package/dist/package/browser/lib/model-config.js +72 -0
- package/dist/package/browser/lib/model-prefs.d.ts +5 -0
- package/dist/package/browser/lib/model-prefs.js +53 -0
- package/dist/package/browser/lib/model-route/index.d.ts +81 -0
- package/dist/package/browser/lib/model-route/index.js +175 -0
- package/dist/package/browser/lib/narrative-copilot.d.ts +20 -0
- package/dist/package/browser/lib/narrative-copilot.js +105 -0
- package/dist/package/browser/lib/native-menu-bridge.d.ts +37 -0
- package/dist/package/browser/lib/native-menu-bridge.js +151 -0
- package/dist/package/browser/lib/page-tab-icons.d.ts +21 -0
- package/dist/package/browser/lib/page-tab-icons.js +64 -0
- package/dist/package/browser/lib/panel-tab-icons.d.ts +21 -0
- package/dist/package/browser/lib/panel-tab-icons.js +49 -0
- package/dist/package/browser/lib/passive-feedback.d.ts +50 -0
- package/dist/package/browser/lib/passive-feedback.js +171 -0
- package/dist/package/browser/lib/perception-stream.d.ts +27 -0
- package/dist/package/browser/lib/perception-stream.js +42 -0
- package/dist/package/browser/lib/platform/index.d.ts +14 -0
- package/dist/package/browser/lib/platform/index.js +13 -0
- package/dist/package/browser/lib/platform/runtime.d.ts +22 -0
- package/dist/package/browser/lib/platform/runtime.js +42 -0
- package/dist/package/browser/lib/platform/shell-adapter.d.ts +24 -0
- package/dist/package/browser/lib/platform/shell-adapter.js +74 -0
- package/dist/package/browser/lib/platform/surface-windowing.d.ts +4 -0
- package/dist/package/browser/lib/platform/surface-windowing.js +16 -0
- package/dist/package/browser/lib/platform/surface.d.ts +13 -0
- package/dist/package/browser/lib/platform/surface.js +27 -0
- package/dist/package/browser/lib/platform/use-surface-windowing.d.ts +1 -0
- package/dist/package/browser/lib/platform/use-surface-windowing.js +6 -0
- package/dist/package/browser/lib/platform/window-manager.d.ts +2 -0
- package/dist/package/browser/lib/platform/window-manager.js +82 -0
- package/dist/package/browser/lib/project-context.d.ts +4 -0
- package/dist/package/browser/lib/project-context.js +42 -0
- package/dist/package/browser/lib/project.d.ts +5 -0
- package/dist/package/browser/lib/project.js +8 -0
- package/dist/package/browser/lib/recent-games.d.ts +24 -0
- package/dist/package/browser/lib/recent-games.js +50 -0
- package/dist/package/browser/lib/repair-builtin-menus.d.ts +6 -0
- package/dist/package/browser/lib/repair-builtin-menus.js +18 -0
- package/dist/package/browser/lib/reply-language.d.ts +9 -0
- package/dist/package/browser/lib/reply-language.js +11 -0
- package/dist/package/browser/lib/resilient-polling.d.ts +9 -0
- package/dist/package/browser/lib/resilient-polling.js +16 -0
- package/dist/package/browser/lib/session-time.d.ts +8 -0
- package/dist/package/browser/lib/session-time.js +40 -0
- package/dist/package/browser/lib/shell-live-data.d.ts +12 -0
- package/dist/package/browser/lib/shell-live-data.js +66 -0
- package/dist/package/browser/lib/sse.d.ts +5 -0
- package/dist/package/browser/lib/sse.js +42 -0
- package/dist/package/browser/lib/storageKeys.d.ts +70 -0
- package/dist/package/browser/lib/storageKeys.js +89 -0
- package/dist/package/browser/lib/surface-store.d.ts +38 -0
- package/dist/package/browser/lib/surface-store.js +62 -0
- package/dist/package/browser/lib/surface.d.ts +56 -0
- package/dist/package/browser/lib/surface.js +225 -0
- package/dist/package/browser/lib/surfaceAnchors.d.ts +16 -0
- package/dist/package/browser/lib/surfaceAnchors.js +76 -0
- package/dist/package/browser/lib/surfaceKeepAliveLayout.d.ts +7 -0
- package/dist/package/browser/lib/surfaceKeepAliveLayout.js +12 -0
- package/dist/package/browser/lib/telemetry-test-prelude.d.ts +0 -0
- package/dist/package/browser/lib/telemetry-test-prelude.js +14 -0
- package/dist/package/browser/lib/text-edit-actions.d.ts +14 -0
- package/dist/package/browser/lib/text-edit-actions.js +184 -0
- package/dist/package/browser/lib/trace.d.ts +34 -0
- package/dist/package/browser/lib/trace.js +273 -0
- package/dist/package/browser/lib/trustedOrigins.d.ts +4 -0
- package/dist/package/browser/lib/trustedOrigins.js +36 -0
- package/dist/package/browser/lib/ui-action-highlight.d.ts +2 -0
- package/dist/package/browser/lib/ui-action-highlight.js +93 -0
- package/dist/package/browser/lib/ui-bridge.d.ts +2 -0
- package/dist/package/browser/lib/ui-bridge.js +224 -0
- package/dist/package/browser/lib/ui-screenshot.d.ts +31 -0
- package/dist/package/browser/lib/ui-screenshot.js +155 -0
- package/dist/package/browser/lib/ui-trajectory.d.ts +47 -0
- package/dist/package/browser/lib/ui-trajectory.js +99 -0
- package/dist/package/browser/lib/use-bus-snapshot.d.ts +3 -0
- package/dist/package/browser/lib/use-bus-snapshot.js +13 -0
- package/dist/package/browser/lib/use-extension-manifest.d.ts +19 -0
- package/dist/package/browser/lib/use-extension-manifest.js +67 -0
- package/dist/package/browser/lib/useConfirmToast.d.ts +26 -0
- package/dist/package/browser/lib/useConfirmToast.js +120 -0
- package/dist/package/browser/lib/utils.d.ts +2 -0
- package/dist/package/browser/lib/utils.js +5 -0
- package/dist/package/browser/lib/vag-action-bridge.d.ts +2 -0
- package/dist/package/browser/lib/vag-action-bridge.js +130 -0
- package/dist/package/browser/main.d.ts +1 -0
- package/dist/package/browser/main.js +157 -0
- package/dist/package/browser/store-parts/domain-clients.d.ts +149 -0
- package/dist/package/browser/store-parts/domain-clients.js +17 -0
- package/dist/package/browser/store-parts/observability.d.ts +4 -0
- package/dist/package/browser/store-parts/observability.js +35 -0
- package/dist/package/browser/store-parts/persistence.d.ts +40 -0
- package/dist/package/browser/store-parts/persistence.js +245 -0
- package/dist/package/browser/store-parts/session-client.d.ts +73 -0
- package/dist/package/browser/store-parts/session-client.js +17 -0
- package/dist/package/browser/store-parts/session-pick.d.ts +8 -0
- package/dist/package/browser/store-parts/session-pick.js +21 -0
- package/dist/package/browser/store-parts/shell.d.ts +5 -0
- package/dist/package/browser/store-parts/shell.js +37 -0
- package/dist/package/browser/store.d.ts +455 -0
- package/dist/package/browser/store.js +890 -0
- package/dist/package/browser/styles/forgeax-preview/agent-avatar.css +69 -0
- package/dist/package/browser/styles/forgeax-preview/aliases.css +21 -0
- package/dist/package/browser/styles/forgeax-preview/chat-popover.css +141 -0
- package/dist/package/browser/styles/forgeax-preview/chat-session.css +896 -0
- package/dist/package/browser/styles/forgeax-preview/composer-port.css +531 -0
- package/dist/package/browser/styles/forgeax-preview/design-tokens.css +25 -0
- package/dist/package/browser/styles/forgeax-preview/index.css +9 -0
- package/dist/package/browser/styles/forgeax-preview/scene-fx.css +117 -0
- package/dist/package/browser/styles/forgeax-preview/shell-layout.css +280 -0
- package/dist/package/browser/styles/forgeax-preview/shell-skin.css +128 -0
- package/dist/package/browser/styles/foundation.tokens.json +2755 -0
- package/dist/package/browser/styles/global.css +196 -0
- package/dist/package/browser/styles/motion.css +558 -0
- package/dist/package/browser/styles/plugin-token-bridge.css +19 -0
- package/dist/package/browser/styles/primitive.css +197 -0
- package/dist/package/browser/styles/semantic.tokens.json +1524 -0
- package/dist/package/browser/styles/tokens.css +304 -0
- package/dist/package/node/App.js +11 -0
- package/dist/package/node/ApplicationDetachedShell.js +10 -0
- package/dist/package/node/ApplicationShell.js +62 -0
- package/dist/package/node/app-kit.js +4 -0
- package/dist/package/node/appHostBootstrap.js +145 -0
- package/dist/package/node/application.js +64 -0
- package/dist/package/node/boot/SettingsSection.js +82 -0
- package/dist/package/node/boot/broadcast.js +32 -0
- package/dist/package/node/boot/driver.js +47 -0
- package/dist/package/node/boot/store.js +114 -0
- package/dist/package/node/boot/themes.js +21 -0
- package/dist/package/node/boot/types.js +30 -0
- package/dist/package/node/brand/BrandProvider.js +35 -0
- package/dist/package/node/brand/index.js +3 -0
- package/dist/package/node/brand/runtime.js +71 -0
- package/dist/package/node/brand/types.js +9 -0
- package/dist/package/node/components/ActivityRail/ActivityRail.js +164 -0
- package/dist/package/node/components/ActivityRail/activity-rail-model.js +144 -0
- package/dist/package/node/components/AgentAvatar/AgentAvatar.js +50 -0
- package/dist/package/node/components/BuildBadge/BuildBadge.js +279 -0
- package/dist/package/node/components/Bus/BusAdminPanel.js +1385 -0
- package/dist/package/node/components/Bus/CapabilityOverview.js +50 -0
- package/dist/package/node/components/ChatColumn/ChatColumn.js +18 -0
- package/dist/package/node/components/ChatColumn/SessionTabStrip.js +103 -0
- package/dist/package/node/components/ChatColumn/useChatWidth.js +13 -0
- package/dist/package/node/components/CommandPalette/CommandPalette.js +242 -0
- package/dist/package/node/components/Confirm/ConfirmDialog.js +113 -0
- package/dist/package/node/components/ContextMenu/ContextMenu.js +218 -0
- package/dist/package/node/components/ContextMenu/menuRegistry.js +152 -0
- package/dist/package/node/components/DetachedSurface.js +102 -0
- package/dist/package/node/components/DockShell/DockPanelHost.js +7 -0
- package/dist/package/node/components/DockShell/DockRegion.js +315 -0
- package/dist/package/node/components/DockShell/DockTab.js +139 -0
- package/dist/package/node/components/DockShell/ExtensionHostPanel.js +68 -0
- package/dist/package/node/components/DockShell/ExtensionRuntimeFrame.js +56 -0
- package/dist/package/node/components/DockShell/PanelWindowingBoundary.js +9 -0
- package/dist/package/node/components/DockShell/chatDockAnimation.js +101 -0
- package/dist/package/node/components/DockShell/chatDockFullscreen.js +22 -0
- package/dist/package/node/components/DockShell/chatDockLayout.js +11 -0
- package/dist/package/node/components/DockShell/compact-empty-dock-groups.js +28 -0
- package/dist/package/node/components/DockShell/crossInstanceDrop.js +1 -0
- package/dist/package/node/components/DockShell/dockResetEpoch.js +13 -0
- package/dist/package/node/components/DockShell/dockTitle.js +36 -0
- package/dist/package/node/components/DockShell/dockviewRegistry.js +1 -0
- package/dist/package/node/components/DockShell/edgeDrawer.js +1144 -0
- package/dist/package/node/components/DockShell/edgePinStore.js +37 -0
- package/dist/package/node/components/DockShell/extension-editor-bridge.js +100 -0
- package/dist/package/node/components/DockShell/extension-runtime-selection.js +6 -0
- package/dist/package/node/components/DockShell/extensionRuntime.js +84 -0
- package/dist/package/node/components/DockShell/footer-panel-visibility.js +43 -0
- package/dist/package/node/components/DockShell/footer-panels.js +7 -0
- package/dist/package/node/components/DockShell/panelRegistry.js +126 -0
- package/dist/package/node/components/DockShell/panelRenderers.js +25 -0
- package/dist/package/node/components/DockShell/panelTabCommands.js +133 -0
- package/dist/package/node/components/DockShell/panelWindowing.js +42 -0
- package/dist/package/node/components/DockShell/regions.js +1 -0
- package/dist/package/node/components/DockShell/resolveRegion.js +1 -0
- package/dist/package/node/components/DockShell/sanitizeDockLayout.js +46 -0
- package/dist/package/node/components/DockShell/sideEdgeMove.js +1 -0
- package/dist/package/node/components/DockShell/studioTabMenuProvider.js +39 -0
- package/dist/package/node/components/DockShell/tabContextMenu.js +68 -0
- package/dist/package/node/components/DockShell/ueDrag/controller.js +785 -0
- package/dist/package/node/components/DockShell/ueDrag/geometry.js +217 -0
- package/dist/package/node/components/DockShell/ueDrag/overlay.js +206 -0
- package/dist/package/node/components/DockShell/useAuxBarWidth.js +13 -0
- package/dist/package/node/components/Drawer/DrawerHostView.js +93 -0
- package/dist/package/node/components/Drawer/DrawerLauncher.js +22 -0
- package/dist/package/node/components/Drawer/useDrawerStore.js +80 -0
- package/dist/package/node/components/ErrorBoundary.js +131 -0
- package/dist/package/node/components/ExtensionHost/ExtensionIframeHost.js +179 -0
- package/dist/package/node/components/ExtensionHost/NativeExtensionHost.js +152 -0
- package/dist/package/node/components/Feedback/FeedbackPanel.js +118 -0
- package/dist/package/node/components/Feedback/PassiveFeedback.js +218 -0
- package/dist/package/node/components/Feedback/collect.js +80 -0
- package/dist/package/node/components/Feedback/store.js +174 -0
- package/dist/package/node/components/LangSwitcher/LangSwitcher.js +44 -0
- package/dist/package/node/components/MainArea/ConsolePanel.js +16 -0
- package/dist/package/node/components/MainArea/MainArea.js +20 -0
- package/dist/package/node/components/MainArea/StandaloneExtensionIframe.js +155 -0
- package/dist/package/node/components/MainArea/SurfacePanels.js +27 -0
- package/dist/package/node/components/MainArea/TelemetryViewer.js +116 -0
- package/dist/package/node/components/MenuBar/MenuBar.js +286 -0
- package/dist/package/node/components/MenuBar/index.js +1 -0
- package/dist/package/node/components/MenuBar/menubar-open-state.js +11 -0
- package/dist/package/node/components/MenuBar/menubar-surface.js +201 -0
- package/dist/package/node/components/ModelPicker/index.js +1 -0
- package/dist/package/node/components/ModelPicker/useModelCatalog.js +100 -0
- package/dist/package/node/components/Onboarding/ConnectModelPrompt.js +40 -0
- package/dist/package/node/components/Onboarding/OnboardingController.js +549 -0
- package/dist/package/node/components/Onboarding/connect-selection.js +18 -0
- package/dist/package/node/components/Onboarding/home-transition.js +20 -0
- package/dist/package/node/components/Onboarding/index.js +3 -0
- package/dist/package/node/components/Onboarding/prepareTourShell.js +11 -0
- package/dist/package/node/components/Onboarding/project-name.js +29 -0
- package/dist/package/node/components/Onboarding/types.js +77 -0
- package/dist/package/node/components/PageTabs/PageTabStrip.js +214 -0
- package/dist/package/node/components/PageTabs/openablePageTypes.js +13 -0
- package/dist/package/node/components/PanelShell/PanelShell.js +459 -0
- package/dist/package/node/components/Resize/ResizeHandle.js +1 -0
- package/dist/package/node/components/SceneBackground/SceneBackground.js +5 -0
- package/dist/package/node/components/SchemaForm/SchemaForm.js +86 -0
- package/dist/package/node/components/SchemaForm/schema-form-utils.js +51 -0
- package/dist/package/node/components/SettingsPrimitives.js +145 -0
- package/dist/package/node/components/Sidebar/BusHealthLamp.js +72 -0
- package/dist/package/node/components/Sidebar/FilesPanel.js +234 -0
- package/dist/package/node/components/Sidebar/Sidebar.js +8 -0
- package/dist/package/node/components/Sidebar/sidebar-types.js +1 -0
- package/dist/package/node/components/SlotDebugOverlay/SlotDebugOverlay.js +1 -0
- package/dist/package/node/components/SlotDebugOverlay/hashHue.js +1 -0
- package/dist/package/node/components/SlotDebugOverlay/index.js +1 -0
- package/dist/package/node/components/SlotDebugOverlay/isSlotDebugEnabled.js +1 -0
- package/dist/package/node/components/StatusBar/FatalBanner.js +52 -0
- package/dist/package/node/components/StatusBar/InfoPanel.js +128 -0
- package/dist/package/node/components/StatusBar/StatusChip.js +13 -0
- package/dist/package/node/components/StatusBar/StripHostView.js +91 -0
- package/dist/package/node/components/StatusBar/StripPopover.js +15 -0
- package/dist/package/node/components/StatusBar/feeds/PulseFeeds.js +88 -0
- package/dist/package/node/components/StatusBar/footer/CheckpointsDrawer.js +77 -0
- package/dist/package/node/components/StatusBar/footer/DiagnosticsPopover.js +108 -0
- package/dist/package/node/components/StatusBar/footer/EventsDrawer.js +25 -0
- package/dist/package/node/components/StatusBar/footer/ForgeaxBuildPopover.js +62 -0
- package/dist/package/node/components/StatusBar/healthBridge.js +245 -0
- package/dist/package/node/components/StatusBar/healthStore.js +129 -0
- package/dist/package/node/components/StatusBar/useStatusItem.js +35 -0
- package/dist/package/node/components/Surfaces/SurfaceKeepAliveLayer.js +218 -0
- package/dist/package/node/components/Surfaces/SurfaceOverlay.js +144 -0
- package/dist/package/node/components/TopBar/AndroidPackageDialog.js +115 -0
- package/dist/package/node/components/TopBar/FsBrowser.js +93 -0
- package/dist/package/node/components/TopBar/GameSwitcher.js +157 -0
- package/dist/package/node/components/TopBar/IosPackageDialog.js +115 -0
- package/dist/package/node/components/TopBar/ProjectSwitcher.js +41 -0
- package/dist/package/node/components/TopBar/PublishOnboarding.js +144 -0
- package/dist/package/node/components/TopBar/SessionSwitcher.js +124 -0
- package/dist/package/node/components/TopBar/TopBar.js +606 -0
- package/dist/package/node/components/TopBar/publish-options.js +28 -0
- package/dist/package/node/components/TourOverlay/TourOverlay.js +233 -0
- package/dist/package/node/components/TourOverlay/index.js +1 -0
- package/dist/package/node/components/ownership.js +7 -0
- package/dist/package/node/components/ui/SearchableMenu.js +40 -0
- package/dist/package/node/components/ui/alert-dialog.js +38 -0
- package/dist/package/node/components/ui/button.js +33 -0
- package/dist/package/node/components/ui/checkbox.js +8 -0
- package/dist/package/node/components/ui/command.js +20 -0
- package/dist/package/node/components/ui/dialog.js +34 -0
- package/dist/package/node/components/ui/dropdown-menu.js +30 -0
- package/dist/package/node/components/ui/input.js +8 -0
- package/dist/package/node/components/ui/label.js +7 -0
- package/dist/package/node/components/ui/popover.js +10 -0
- package/dist/package/node/components/ui/select.js +31 -0
- package/dist/package/node/components/ui/tabs.js +12 -0
- package/dist/package/node/components/ui/textarea.js +8 -0
- package/dist/package/node/components/ui/tooltip.js +10 -0
- package/dist/package/node/core/app-shell/catalog-page-extensions.js +234 -0
- package/dist/package/node/core/app-shell/derive-panel-renderers.js +17 -0
- package/dist/package/node/core/app-shell/host.js +188 -0
- package/dist/package/node/core/app-shell/index.js +8 -0
- package/dist/package/node/core/app-shell/logger.js +6 -0
- package/dist/package/node/core/app-shell/ownership.js +7 -0
- package/dist/package/node/core/app-shell/react/HostProvider.js +35 -0
- package/dist/package/node/core/app-shell/surface-extension.js +33 -0
- package/dist/package/node/core/app-shell/types.js +1 -0
- package/dist/package/node/core/contextual-keybindings.js +198 -0
- package/dist/package/node/core/extension-foundation/bus.js +3 -0
- package/dist/package/node/core/extension-foundation/capabilities.js +3 -0
- package/dist/package/node/core/extension-foundation/commands.js +3 -0
- package/dist/package/node/core/extension-foundation/context-keys.js +3 -0
- package/dist/package/node/core/extension-foundation/contribution-registry.js +3 -0
- package/dist/package/node/core/extension-foundation/errors.js +3 -0
- package/dist/package/node/core/extension-foundation/index.js +9 -0
- package/dist/package/node/core/extension-foundation/loader.js +3 -0
- package/dist/package/node/core/extension-foundation/storage.js +3 -0
- package/dist/package/node/core/extension-foundation/types.js +1 -0
- package/dist/package/node/core/extensions/builtin-commands.js +256 -0
- package/dist/package/node/core/extensions/builtin-menus.js +252 -0
- package/dist/package/node/core/extensions/chrome-drawer.js +45 -0
- package/dist/package/node/core/extensions/chrome-statusbar.js +26 -0
- package/dist/package/node/core/extensions/detached-agents-browser.js +9 -0
- package/dist/package/node/core/extensions/detached-files-browser.js +6 -0
- package/dist/package/node/core/extensions/editor-commands.js +182 -0
- package/dist/package/node/core/extensions/foundation-bus.js +3 -0
- package/dist/package/node/core/extensions/foundation-commands.js +6 -0
- package/dist/package/node/core/extensions/foundation-storage.js +3 -0
- package/dist/package/node/core/extensions/host-commands.js +52 -0
- package/dist/package/node/core/extensions/observability.js +18 -0
- package/dist/package/node/core/extensions/panels-chat.js +41 -0
- package/dist/package/node/core/extensions/panels-editor.js +26 -0
- package/dist/package/node/core/extensions/panels-viewport.js +20 -0
- package/dist/package/node/core/extensions/session-client.js +42 -0
- package/dist/package/node/core/extensions/slots-corner-agent-picker.js +6 -0
- package/dist/package/node/core/extensions/slots-main-area-body.js +6 -0
- package/dist/package/node/core/extensions/slots-sidebar-agents.js +6 -0
- package/dist/package/node/core/extensions/studio-domain-clients.js +15 -0
- package/dist/package/node/core/extensions/surfaces-scene-editor.js +6 -0
- package/dist/package/node/core/extensions/trajectory.js +50 -0
- package/dist/package/node/core/page-navigation.js +1 -0
- package/dist/package/node/core/page-platform/activity.js +46 -0
- package/dist/package/node/core/page-platform/dockview-layout.js +63 -0
- package/dist/package/node/core/page-platform/index.js +8 -0
- package/dist/package/node/core/page-platform/layout-store.js +54 -0
- package/dist/package/node/core/page-platform/page-dirty-probe.js +4 -0
- package/dist/package/node/core/page-platform/registry.js +194 -0
- package/dist/package/node/core/page-platform/resource-editor.js +74 -0
- package/dist/package/node/core/page-platform/session.js +327 -0
- package/dist/package/node/core/page-platform/types.js +10 -0
- package/dist/package/node/core/panels/context-expression.js +1 -0
- package/dist/package/node/core/panels/drawer.js +1 -0
- package/dist/package/node/core/panels/index.js +7 -0
- package/dist/package/node/core/panels/panel-action-registry.js +62 -0
- package/dist/package/node/core/panels/panel-control-registry.js +54 -0
- package/dist/package/node/core/panels/resolve-panel-action-state.js +9 -0
- package/dist/package/node/core/panels/strip.js +1 -0
- package/dist/package/node/core/panels/types.js +1 -0
- package/dist/package/node/i18n/index.js +207 -0
- package/dist/package/node/i18n/locales/en.json +1959 -0
- package/dist/package/node/i18n/locales/zh.json +1959 -0
- package/dist/package/node/index.js +2 -0
- package/dist/package/node/lib/a11y-summary.js +66 -0
- package/dist/package/node/lib/action-dom-discovery.js +84 -0
- package/dist/package/node/lib/action-registry.js +210 -0
- package/dist/package/node/lib/aegis.js +230 -0
- package/dist/package/node/lib/agent-catalog-url.js +24 -0
- package/dist/package/node/lib/agent-cli-provider.js +81 -0
- package/dist/package/node/lib/ai-intents.js +52 -0
- package/dist/package/node/lib/broadcast-stream.js +163 -0
- package/dist/package/node/lib/browser-prefs-sync.js +151 -0
- package/dist/package/node/lib/builtin-actions.js +558 -0
- package/dist/package/node/lib/bus.js +71 -0
- package/dist/package/node/lib/checkpoint-api.js +41 -0
- package/dist/package/node/lib/cli-providers.js +61 -0
- package/dist/package/node/lib/command-palette-store.js +22 -0
- package/dist/package/node/lib/composer-bridge.js +448 -0
- package/dist/package/node/lib/dashboard-api.js +125 -0
- package/dist/package/node/lib/deep-link-bus.js +35 -0
- package/dist/package/node/lib/dialog.js +103 -0
- package/dist/package/node/lib/editor-facts-bus.js +25 -0
- package/dist/package/node/lib/extension-api.js +90 -0
- package/dist/package/node/lib/file-activity-stream.js +123 -0
- package/dist/package/node/lib/file-family.js +25 -0
- package/dist/package/node/lib/game-templates.js +15 -0
- package/dist/package/node/lib/global-shortcuts.js +551 -0
- package/dist/package/node/lib/logSink.js +128 -0
- package/dist/package/node/lib/lucide-icon.js +20 -0
- package/dist/package/node/lib/menu-registry.js +197 -0
- package/dist/package/node/lib/model-config.js +72 -0
- package/dist/package/node/lib/model-prefs.js +53 -0
- package/dist/package/node/lib/model-route/index.js +175 -0
- package/dist/package/node/lib/narrative-copilot.js +105 -0
- package/dist/package/node/lib/native-menu-bridge.js +151 -0
- package/dist/package/node/lib/page-tab-icons.js +64 -0
- package/dist/package/node/lib/panel-tab-icons.js +49 -0
- package/dist/package/node/lib/passive-feedback.js +171 -0
- package/dist/package/node/lib/perception-stream.js +42 -0
- package/dist/package/node/lib/platform/index.js +13 -0
- package/dist/package/node/lib/platform/runtime.js +42 -0
- package/dist/package/node/lib/platform/shell-adapter.js +74 -0
- package/dist/package/node/lib/platform/surface-windowing.js +16 -0
- package/dist/package/node/lib/platform/surface.js +27 -0
- package/dist/package/node/lib/platform/use-surface-windowing.js +6 -0
- package/dist/package/node/lib/platform/window-manager.js +82 -0
- package/dist/package/node/lib/project-context.js +42 -0
- package/dist/package/node/lib/project.js +8 -0
- package/dist/package/node/lib/recent-games.js +50 -0
- package/dist/package/node/lib/repair-builtin-menus.js +18 -0
- package/dist/package/node/lib/reply-language.js +11 -0
- package/dist/package/node/lib/resilient-polling.js +16 -0
- package/dist/package/node/lib/session-time.js +40 -0
- package/dist/package/node/lib/shell-live-data.js +66 -0
- package/dist/package/node/lib/sse.js +42 -0
- package/dist/package/node/lib/storageKeys.js +89 -0
- package/dist/package/node/lib/surface-store.js +62 -0
- package/dist/package/node/lib/surface.js +225 -0
- package/dist/package/node/lib/surfaceAnchors.js +76 -0
- package/dist/package/node/lib/surfaceKeepAliveLayout.js +12 -0
- package/dist/package/node/lib/telemetry-test-prelude.js +14 -0
- package/dist/package/node/lib/text-edit-actions.js +184 -0
- package/dist/package/node/lib/trace.js +273 -0
- package/dist/package/node/lib/trustedOrigins.js +36 -0
- package/dist/package/node/lib/ui-action-highlight.js +93 -0
- package/dist/package/node/lib/ui-bridge.js +224 -0
- package/dist/package/node/lib/ui-screenshot.js +155 -0
- package/dist/package/node/lib/ui-trajectory.js +99 -0
- package/dist/package/node/lib/use-bus-snapshot.js +13 -0
- package/dist/package/node/lib/use-extension-manifest.js +67 -0
- package/dist/package/node/lib/useConfirmToast.js +120 -0
- package/dist/package/node/lib/utils.js +5 -0
- package/dist/package/node/lib/vag-action-bridge.js +130 -0
- package/dist/package/node/main.js +157 -0
- package/dist/package/node/store-parts/domain-clients.js +17 -0
- package/dist/package/node/store-parts/observability.js +35 -0
- package/dist/package/node/store-parts/persistence.js +245 -0
- package/dist/package/node/store-parts/session-client.js +17 -0
- package/dist/package/node/store-parts/session-pick.js +21 -0
- package/dist/package/node/store-parts/shell.js +37 -0
- package/dist/package/node/store.js +890 -0
- package/dist/package/node/styles/foundation.tokens.json +2755 -0
- package/dist/package/node/styles/semantic.tokens.json +1524 -0
- package/dist/package/packages/design/styles/fx-bridge.css +25 -0
- package/dist/package/packages/design/styles/primitive.css +199 -0
- package/dist/package/packages/design/styles/semantic.css +262 -0
- package/dist/package/packages/design/theme.d.ts +15 -0
- package/dist/package/packages/design/theme.js +31 -0
- package/dist/package/packages/design/tokens.css +14 -0
- package/package.json +145 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
/** builtin-actions —— 首批高频 action 登记(产品 AI 化 P0,方案 §6)。
|
|
2
|
+
*
|
|
3
|
+
* 内容层:这里是**产品专属内容**(interface 知道自己有哪些功能),机制归 action-registry。
|
|
4
|
+
* 每条 action 就是包一层 zustand store action / forgeax-bridge REST——按钮与 AI 走同一条
|
|
5
|
+
* 路(Derive 不 Duplicate)。capability 如实声明:它是编排层 trust-gate 的权限输入,
|
|
6
|
+
* delete 类(session.close)会弹用户确认卡,这是有意的。
|
|
7
|
+
*
|
|
8
|
+
* surface 口径(方案 §5):纯视图操作 'ui';背后是 server REST 的标 'both'(headless
|
|
9
|
+
* 等价路径 P1 接线,声明先行,UI run() 已经就是调同一 HTTP API,server 是行为 SSOT)。
|
|
10
|
+
*/
|
|
11
|
+
import { registerAction, registerStateSlice } from './action-registry.js';
|
|
12
|
+
import { getSessionClient } from '../store-parts/session-client.js';
|
|
13
|
+
import { useShellStore, tabLabel } from '../store.js';
|
|
14
|
+
import { openExtensionPage, resolveRegisteredOverlayId } from '../core/page-navigation.js';
|
|
15
|
+
import { useHealthStore } from '../components/StatusBar/healthStore.js';
|
|
16
|
+
import { getBrowserConsole, clearBrowserConsole } from '../components/StatusBar/healthBridge.js';
|
|
17
|
+
import { listExtensions, pickLang } from './extension-api.js';
|
|
18
|
+
import { getStudioProjectClient } from '../store-parts/domain-clients.js';
|
|
19
|
+
let registered = false;
|
|
20
|
+
async function readRoleRoster() {
|
|
21
|
+
const response = await fetch('/api/tools/call', {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
headers: { 'content-type': 'application/json' },
|
|
24
|
+
body: JSON.stringify({ toolId: 'team:list_roles', caller: { kind: 'user' }, args: {} }),
|
|
25
|
+
});
|
|
26
|
+
const data = (await response.json().catch(() => ({})));
|
|
27
|
+
if (!response.ok || data.ok === false) {
|
|
28
|
+
return { ok: false, reason: data.error ?? `list roles failed (HTTP ${response.status})` };
|
|
29
|
+
}
|
|
30
|
+
const roles = Array.isArray(data.result?.roles)
|
|
31
|
+
? data.result.roles.filter((role) => !!role && typeof role === 'object')
|
|
32
|
+
: [];
|
|
33
|
+
return {
|
|
34
|
+
ok: true,
|
|
35
|
+
count: typeof data.result?.count === 'number' ? data.result.count : roles.length,
|
|
36
|
+
roles,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/** bootUiBridge 调用一次(幂等)。 */
|
|
40
|
+
export function registerBuiltinActions() {
|
|
41
|
+
if (registered)
|
|
42
|
+
return;
|
|
43
|
+
registered = true;
|
|
44
|
+
const st = () => useShellStore.getState();
|
|
45
|
+
// ── 视图 / 布局(纯 UI)──────────────────────────────────────────────────
|
|
46
|
+
registerAction({
|
|
47
|
+
id: 'panel.toggle_sidebar',
|
|
48
|
+
title: '折叠/展开侧栏',
|
|
49
|
+
description: 'Toggle the left sidebar collapsed state.',
|
|
50
|
+
capability: 'write',
|
|
51
|
+
surface: 'ui',
|
|
52
|
+
run: () => {
|
|
53
|
+
st().toggleSidebar();
|
|
54
|
+
return { status: 'completed', stateDigest: { sidebarCollapsed: st().sidebarCollapsed } };
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
registerAction({
|
|
58
|
+
id: 'panel.toggle_chatpanel',
|
|
59
|
+
title: '折叠/展开聊天面板',
|
|
60
|
+
description: 'Toggle the chat panel collapsed state.',
|
|
61
|
+
capability: 'write',
|
|
62
|
+
surface: 'ui',
|
|
63
|
+
run: () => {
|
|
64
|
+
st().toggleChatpanel();
|
|
65
|
+
return { status: 'completed', stateDigest: { chatpanelCollapsed: st().chatpanelCollapsed } };
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
registerAction({
|
|
69
|
+
id: 'app.set_fullscreen',
|
|
70
|
+
title: '沉浸模式',
|
|
71
|
+
description: 'Enter or exit fullscreen (immersive) mode which hides all chrome around the main area.',
|
|
72
|
+
schema: { type: 'object', properties: { value: { type: 'boolean' } }, required: ['value'] },
|
|
73
|
+
capability: 'write',
|
|
74
|
+
surface: 'ui',
|
|
75
|
+
run: (args) => {
|
|
76
|
+
st().setFullscreen(args.value);
|
|
77
|
+
return { status: 'completed', stateDigest: { fullscreen: st().fullscreen } };
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
// 扩展页面发现与打开:AI 和人共用 Page navigation。
|
|
81
|
+
registerAction({
|
|
82
|
+
id: 'extension.list',
|
|
83
|
+
title: '列出扩展页面',
|
|
84
|
+
description: 'List installed extensions that contribute pages. Returns { count, plugins:[{id,name,description}] }.',
|
|
85
|
+
capability: 'read',
|
|
86
|
+
firstClass: true,
|
|
87
|
+
surface: 'ui',
|
|
88
|
+
run: async () => {
|
|
89
|
+
const { items } = await listExtensions();
|
|
90
|
+
// 2026-08-06 外审 B5:此前这里带 railPinned/railNote —— 判据是一张手维护的
|
|
91
|
+
// 14-slug 表,而 rail 的真实可达性 = manifest 的 contributes.activities ∩ 每浏览
|
|
92
|
+
// 器 localStorage 的 pin 集,与那张表毫无关系。默认(无 localStorage)全部
|
|
93
|
+
// pinned,note 却断言"都看不到"并禁止 agent 说出正确答案 —— 用单一账源下
|
|
94
|
+
// 否定结论 + 手维护副本必然腐烂,两条都是本打样自己立的反面不变式。删除;
|
|
95
|
+
// 可达性交给真投影(将来 rail 接入 surface 总线后由它现算),不再猜。
|
|
96
|
+
const plugins = items
|
|
97
|
+
.filter((p) => (p.contributes?.pages?.length ?? 0) > 0)
|
|
98
|
+
.map((p) => ({
|
|
99
|
+
id: p.id,
|
|
100
|
+
name: pickLang(p.displayName, 'zh', p.id),
|
|
101
|
+
description: p.description ? pickLang(p.description, 'zh', '') : '',
|
|
102
|
+
}));
|
|
103
|
+
return { status: 'completed', stateDigest: { count: plugins.length, plugins } };
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
registerAction({
|
|
107
|
+
id: 'extension.open',
|
|
108
|
+
title: '打开扩展页面',
|
|
109
|
+
description: 'Open the Page contributed by a specific extension id. Discover valid ids via extension.list.',
|
|
110
|
+
schema: { type: 'object', properties: { extensionId: { type: 'string' } }, required: ['extensionId'] },
|
|
111
|
+
capability: 'write',
|
|
112
|
+
firstClass: true,
|
|
113
|
+
surface: 'ui',
|
|
114
|
+
// 命令面板把 extensionId 变成「现有插件」下拉,免瞎填。
|
|
115
|
+
choices: {
|
|
116
|
+
extensionId: async () => (await listExtensions()).items.filter((p) => (p.contributes?.pages?.length ?? 0) > 0).map((p) => p.id),
|
|
117
|
+
},
|
|
118
|
+
run: async (args) => {
|
|
119
|
+
const extensionId = args.extensionId;
|
|
120
|
+
await openExtensionPage(extensionId);
|
|
121
|
+
return { status: 'completed', stateDigest: { extensionId } };
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
// 角色桥(插件桥的「角色版」:人和 AI 同一条路造/用/看角色)。role.create 是**唯一**创建
|
|
125
|
+
// 路径 —— AI 经 ui_act_role_create / ui_invoke 调,人经 ⌘K / 按钮 pill 调;背后是 server
|
|
126
|
+
// 执行器 team:create_role(对 AI 隐藏),经 /api/tools/call(caller:user)落 agent-pack 到
|
|
127
|
+
// 用户安装/项目专属 extension source、reloadPlugins,新角色 ~5s 内自动进名单(roster 轮询 +1)。治理靠 trust-gate
|
|
128
|
+
// 的 delegate 闸(capability 如实声明)。role.list 让 AI 能告诉用户「有哪些角色」并防重名;
|
|
129
|
+
// role.open 打开角色页 / 把某角色绑到当前会话展示其详情。
|
|
130
|
+
registerAction({
|
|
131
|
+
id: 'role.create',
|
|
132
|
+
title: '创建新角色',
|
|
133
|
+
description: 'Mint a NEW teammate/agent role when no existing role in the roster fits. Args: id (single segment [a-zA-Z0-9_-]) + persona (markdown: who they are / what they are good at / when to delegate to them / what they produce) + optional displayName / role / avatar / color / scope("global"|"project") / tools(host-tool allow globs). The new role persists and joins the roster (delegate_to_subagent can then dispatch it). Duplicate ids are rejected, never overwritten.',
|
|
134
|
+
schema: {
|
|
135
|
+
type: 'object',
|
|
136
|
+
properties: {
|
|
137
|
+
id: { type: 'string', description: '单段 [a-zA-Z0-9_-];如 "level-designer"' },
|
|
138
|
+
persona: { type: 'string', description: '角色 markdown:是谁 / 擅长什么 / 何时被派 / 产出什么' },
|
|
139
|
+
displayName: {
|
|
140
|
+
type: 'object',
|
|
141
|
+
properties: { zh: { type: 'string' }, en: { type: 'string' } },
|
|
142
|
+
},
|
|
143
|
+
role: { type: 'string', description: "定位,如 'pillar' / 'artist' / 'peer'" },
|
|
144
|
+
avatar: { type: 'string', description: 'emoji / 单字符' },
|
|
145
|
+
color: { type: 'string', description: '#hex' },
|
|
146
|
+
scope: { type: 'string', enum: ['global', 'project'] },
|
|
147
|
+
tools: { type: 'array', items: { type: 'string' } },
|
|
148
|
+
},
|
|
149
|
+
required: ['id', 'persona'],
|
|
150
|
+
},
|
|
151
|
+
capability: 'delegate',
|
|
152
|
+
firstClass: true,
|
|
153
|
+
surface: 'both',
|
|
154
|
+
timeoutMs: 15000,
|
|
155
|
+
run: async (args) => {
|
|
156
|
+
const r = await fetch('/api/tools/call', {
|
|
157
|
+
method: 'POST',
|
|
158
|
+
headers: { 'content-type': 'application/json' },
|
|
159
|
+
body: JSON.stringify({ toolId: 'team:create_role', caller: { kind: 'user' }, args }),
|
|
160
|
+
});
|
|
161
|
+
const data = (await r.json().catch(() => ({})));
|
|
162
|
+
if (!r.ok || data.ok === false) {
|
|
163
|
+
return { status: 'rejected', reason: data.error ?? `create role failed (HTTP ${r.status})` };
|
|
164
|
+
}
|
|
165
|
+
const res = data.result ?? {};
|
|
166
|
+
return { status: 'completed', stateDigest: { id: res.id ?? args.id, scope: res.scope } };
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
registerAction({
|
|
170
|
+
id: 'role.list',
|
|
171
|
+
title: '列出角色',
|
|
172
|
+
description: 'List all currently dispatchable roles (plugin agents + built-ins). Use this to tell the user which roles exist / check for duplicates before role.create. Returns { count, roles:[{id,role,displayName,source}] }.',
|
|
173
|
+
capability: 'read',
|
|
174
|
+
firstClass: true,
|
|
175
|
+
surface: 'both',
|
|
176
|
+
run: async () => {
|
|
177
|
+
const roster = await readRoleRoster();
|
|
178
|
+
if (!roster.ok)
|
|
179
|
+
return { status: 'rejected', reason: roster.reason };
|
|
180
|
+
return { status: 'completed', stateDigest: { count: roster.count, roles: roster.roles } };
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
registerAction({
|
|
184
|
+
id: 'role.open',
|
|
185
|
+
title: '打开角色页',
|
|
186
|
+
description: "Open the roles/team surface. With no args it switches to the AI workspace (where the roster lives). With { id } it also binds that role to the current chat session so its persona detail is shown. Use this to show the user the team or a specific teammate.",
|
|
187
|
+
schema: { type: 'object', properties: { id: { type: 'string' } } },
|
|
188
|
+
capability: 'read',
|
|
189
|
+
firstClass: true,
|
|
190
|
+
surface: 'ui',
|
|
191
|
+
run: async (args) => {
|
|
192
|
+
const id = typeof args.id === 'string' && args.id.trim() ? args.id.trim() : '';
|
|
193
|
+
const state = st();
|
|
194
|
+
const activeTab = id
|
|
195
|
+
? state.tabs.find((tab) => tab.sid === state.activeSid)
|
|
196
|
+
: undefined;
|
|
197
|
+
const targetSid = activeTab?.sid;
|
|
198
|
+
if (id && !activeTab) {
|
|
199
|
+
return { status: 'rejected', reason: 'role.open with id requires an active chat session' };
|
|
200
|
+
}
|
|
201
|
+
if (id) {
|
|
202
|
+
const roster = await readRoleRoster();
|
|
203
|
+
if (!roster.ok) {
|
|
204
|
+
return { status: 'rejected', reason: `role.open could not read the current roster: ${roster.reason}` };
|
|
205
|
+
}
|
|
206
|
+
const roleExists = roster.roles.some((role) => role.id === id);
|
|
207
|
+
if (!roleExists) {
|
|
208
|
+
return { status: 'rejected', reason: `role.open could not find role "${id}" in the current roster` };
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
await openExtensionPage('@forgeax/studio-agents');
|
|
212
|
+
if (id) {
|
|
213
|
+
const currentState = st();
|
|
214
|
+
const targetTab = currentState.tabs.find((tab) => tab.sid === targetSid);
|
|
215
|
+
if (!targetTab) {
|
|
216
|
+
return { status: 'rejected', reason: 'role.open target session no longer exists' };
|
|
217
|
+
}
|
|
218
|
+
st().setTabAgent(targetTab.sid, id); // 固定调用开始时的会话,避免 await 期间切 tab 后绑错对象。
|
|
219
|
+
if (st().tabs.find((tab) => tab.sid === targetTab.sid)?.agentId !== id) {
|
|
220
|
+
return { status: 'rejected', reason: 'role.open could not bind the role to the target chat session' };
|
|
221
|
+
}
|
|
222
|
+
return { status: 'completed', stateDigest: { opened: id, boundSid: targetTab.sid, activeWorkspace: 'ai' } };
|
|
223
|
+
}
|
|
224
|
+
return { status: 'completed', stateDigest: { activeWorkspace: 'ai' } };
|
|
225
|
+
},
|
|
226
|
+
});
|
|
227
|
+
registerAction({
|
|
228
|
+
id: 'overlay.open',
|
|
229
|
+
title: '打开浮层',
|
|
230
|
+
description: "Open an overlay by id (e.g. 'settings'). Optional param selects a section inside it.",
|
|
231
|
+
schema: {
|
|
232
|
+
type: 'object',
|
|
233
|
+
properties: { id: { type: 'string' }, param: { type: 'string' } },
|
|
234
|
+
required: ['id'],
|
|
235
|
+
},
|
|
236
|
+
capability: 'write',
|
|
237
|
+
surface: 'ui',
|
|
238
|
+
run: (args) => {
|
|
239
|
+
const requestedId = args.id;
|
|
240
|
+
const overlayId = resolveRegisteredOverlayId(requestedId);
|
|
241
|
+
if (!overlayId) {
|
|
242
|
+
return { status: 'rejected', reason: `overlay.open could not find registered overlay "${requestedId}"` };
|
|
243
|
+
}
|
|
244
|
+
st().openOverlay(overlayId, typeof args.param === 'string' ? args.param : undefined);
|
|
245
|
+
if (st().activeOverlay !== overlayId) {
|
|
246
|
+
return { status: 'rejected', reason: `overlay.open could not activate overlay "${overlayId}"` };
|
|
247
|
+
}
|
|
248
|
+
return { status: 'completed', stateDigest: { activeOverlay: overlayId } };
|
|
249
|
+
},
|
|
250
|
+
});
|
|
251
|
+
registerAction({
|
|
252
|
+
id: 'overlay.close',
|
|
253
|
+
title: '关闭浮层',
|
|
254
|
+
description: 'Close the currently open overlay, if any.',
|
|
255
|
+
capability: 'write',
|
|
256
|
+
surface: 'ui',
|
|
257
|
+
run: () => {
|
|
258
|
+
st().closeOverlay();
|
|
259
|
+
return { status: 'completed' };
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
// ── 日志类(瞬态,清空不算删除用户数据)────────────────────────────────────
|
|
263
|
+
registerAction({
|
|
264
|
+
id: 'console.clear',
|
|
265
|
+
title: '清空控制台',
|
|
266
|
+
description: "Clear a collected console buffer. source:'browser' (default) clears the studio-shell browser console buffer PLUS the cross-tier health entries (fatal region banners are preserved). source:'game' clears the in-app game/editor console (store.consoleLog). Neither touches the raw browser DevTools buffer.",
|
|
267
|
+
schema: { type: 'object', properties: { source: { type: 'string', enum: ['browser', 'game'] } } },
|
|
268
|
+
capability: 'write',
|
|
269
|
+
surface: 'ui',
|
|
270
|
+
run: (args) => {
|
|
271
|
+
const source = args.source === 'game' ? 'game' : 'browser';
|
|
272
|
+
if (source === 'game') {
|
|
273
|
+
const cleared = st().consoleLog.length;
|
|
274
|
+
st().clearConsole();
|
|
275
|
+
return { status: 'completed', stateDigest: { source, cleared } };
|
|
276
|
+
}
|
|
277
|
+
const cleared = getBrowserConsole().length + useHealthStore.getState().entries.length;
|
|
278
|
+
clearBrowserConsole();
|
|
279
|
+
useHealthStore.getState().clear(); // 只清 entries;fatal 横幅由 clearFatal 单独管,不受影响
|
|
280
|
+
return { status: 'completed', stateDigest: { source, cleared } }; // 回报清了几条,避免「点了没反应」
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
// AI 可读控制台(方案「让 AI 感知」的补全)。区分两个**不同**的东西:
|
|
284
|
+
// - source:'browser'(默认)→ 读 useHealthStore:studio 外壳已采集的**浏览器控制台/健康流**
|
|
285
|
+
// (shell 的 console.error/console.warn + window.onerror + unhandledrejection + iframe 转发的
|
|
286
|
+
// forgeax:health / VAG_CONSOLE 报错),跨端汇聚,也落盘 .forgeax/logs/info.jsonl。
|
|
287
|
+
// ⚠ 现采集只含 error/warn/health 级别,不含 shell 的 console.log/info(要全量需扩采集)。
|
|
288
|
+
// - source:'game' → 读 store.consoleLog:引擎/编辑器 iframe 的**游戏控制台**全量流。
|
|
289
|
+
// 两者都不是浏览器 DevTools 的原始缓冲(网页读不到),'browser' 是产品自采集的最接近者。
|
|
290
|
+
registerAction({
|
|
291
|
+
id: 'console.read',
|
|
292
|
+
title: '读取控制台',
|
|
293
|
+
description: "Read the studio's collected console feed. source:'browser' (default) = the full studio-shell browser console (ALL levels: log/info/warn/error/debug, captured into a 500-entry ring buffer) merged with cross-tier iframe/health signals (window.onerror, unhandled rejections, forwarded play/edit/plugin/engine health). source:'game' = the in-app game/editor console stream. Params: source ('browser'|'game'), level (filter), limit (default 50, max 200). Returns { source, total, count, lines } in the result. This is the studio's own captured console (a web page cannot read the raw browser DevTools buffer directly).",
|
|
294
|
+
schema: {
|
|
295
|
+
type: 'object',
|
|
296
|
+
properties: {
|
|
297
|
+
source: { type: 'string', enum: ['browser', 'game'] },
|
|
298
|
+
level: { type: 'string' },
|
|
299
|
+
limit: { type: 'number' },
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
capability: 'read',
|
|
303
|
+
firstClass: true, // 让模型直接看到这条读工具,免一次 snapshot 发现
|
|
304
|
+
surface: 'ui',
|
|
305
|
+
run: (args) => {
|
|
306
|
+
const source = args.source === 'game' ? 'game' : 'browser';
|
|
307
|
+
const level = typeof args.level === 'string' ? args.level : undefined;
|
|
308
|
+
const limit = Math.min(typeof args.limit === 'number' && args.limit > 0 ? Math.floor(args.limit) : 50, 200);
|
|
309
|
+
if (source === 'game') {
|
|
310
|
+
const all = st().consoleLog;
|
|
311
|
+
const f = level ? all.filter((l) => l.level === level) : all;
|
|
312
|
+
const lines = f.slice(-limit).map((l) => ({ level: l.level, text: l.text, ts: l.ts }));
|
|
313
|
+
return { status: 'completed', stateDigest: { source, total: all.length, count: lines.length, lines } };
|
|
314
|
+
}
|
|
315
|
+
// browser: 外壳全量 console(browserConsole,所有 level)+ 跨端 iframe/health
|
|
316
|
+
// (healthStore,去掉与外壳 console-error/warn 重复的),按 ts 合并取尾部。
|
|
317
|
+
const shell = getBrowserConsole().map((e) => ({
|
|
318
|
+
level: e.level,
|
|
319
|
+
source: 'shell',
|
|
320
|
+
code: undefined,
|
|
321
|
+
text: e.text,
|
|
322
|
+
ts: e.ts,
|
|
323
|
+
...(e.repeat ? { repeat: e.repeat } : {}),
|
|
324
|
+
}));
|
|
325
|
+
const health = useHealthStore
|
|
326
|
+
.getState()
|
|
327
|
+
.entries.filter((e) => !(e.source === 'shell' && (e.code === 'console-error' || e.code === 'console-warn')))
|
|
328
|
+
.map((e) => ({ level: e.level, source: e.source, code: e.code, text: e.message, ts: e.ts }));
|
|
329
|
+
let merged = [...shell, ...health].sort((a, b) => a.ts - b.ts);
|
|
330
|
+
if (level)
|
|
331
|
+
merged = merged.filter((e) => e.level === level);
|
|
332
|
+
const lines = merged.slice(-limit);
|
|
333
|
+
return { status: 'completed', stateDigest: { source, total: merged.length, count: lines.length, lines } };
|
|
334
|
+
},
|
|
335
|
+
});
|
|
336
|
+
registerAction({
|
|
337
|
+
id: 'network.clear',
|
|
338
|
+
title: '清空网络日志',
|
|
339
|
+
description: 'Clear the in-app network log panel (store.networkLog). NOT the browser DevTools network tab.',
|
|
340
|
+
capability: 'write',
|
|
341
|
+
surface: 'ui',
|
|
342
|
+
run: () => {
|
|
343
|
+
const cleared = st().networkLog.length;
|
|
344
|
+
st().clearNetwork();
|
|
345
|
+
return { status: 'completed', stateDigest: { cleared } };
|
|
346
|
+
},
|
|
347
|
+
});
|
|
348
|
+
// ── 会话(背后是 server REST → surface 'both',server 是行为 SSOT)──────────
|
|
349
|
+
registerAction({
|
|
350
|
+
id: 'session.switch',
|
|
351
|
+
title: '切换会话',
|
|
352
|
+
description: 'Switch the active chat session to the given sid (see the session.tabs state slice for candidates).',
|
|
353
|
+
schema: { type: 'object', properties: { sid: { type: 'string' } }, required: ['sid'] },
|
|
354
|
+
capability: 'write',
|
|
355
|
+
firstClass: true, // P1-9:高频 action 派生一等 ToolSpec(ui_act_*)
|
|
356
|
+
surface: 'ui',
|
|
357
|
+
timeoutMs: 15_000,
|
|
358
|
+
run: async (args) => {
|
|
359
|
+
await st().switchToSession(args.sid);
|
|
360
|
+
return { status: 'completed', stateDigest: { activeSid: st().activeSid } };
|
|
361
|
+
},
|
|
362
|
+
});
|
|
363
|
+
registerAction({
|
|
364
|
+
id: 'session.create',
|
|
365
|
+
title: '新建会话',
|
|
366
|
+
description: 'Create a new chat session (optionally named) and switch to it.',
|
|
367
|
+
schema: { type: 'object', properties: { displayName: { type: 'string' } } },
|
|
368
|
+
capability: 'write',
|
|
369
|
+
firstClass: true, // P1-9:高频 action 派生一等 ToolSpec(ui_act_*)
|
|
370
|
+
surface: 'both',
|
|
371
|
+
timeoutMs: 20_000,
|
|
372
|
+
run: async (args) => {
|
|
373
|
+
const { sid } = await getSessionClient().createSession(typeof args.displayName === 'string' ? { displayName: args.displayName } : undefined);
|
|
374
|
+
await st().refreshSessions();
|
|
375
|
+
await st().switchToSession(sid);
|
|
376
|
+
return { status: 'completed', stateDigest: { activeSid: sid } };
|
|
377
|
+
},
|
|
378
|
+
});
|
|
379
|
+
registerAction({
|
|
380
|
+
id: 'session.close',
|
|
381
|
+
title: '关闭会话',
|
|
382
|
+
description: 'Close (delete) a chat session by sid. Destructive: the session and its history are removed from disk.',
|
|
383
|
+
schema: { type: 'object', properties: { sid: { type: 'string' } }, required: ['sid'] },
|
|
384
|
+
capability: 'delete', // 如实声明:编排层会弹确认卡
|
|
385
|
+
firstClass: true, // P1-9:高频 action 派生一等 ToolSpec(ui_act_*)
|
|
386
|
+
surface: 'both',
|
|
387
|
+
timeoutMs: 15_000,
|
|
388
|
+
run: async (args) => {
|
|
389
|
+
const sid = args.sid;
|
|
390
|
+
const result = await st().closeSession(sid);
|
|
391
|
+
if (result.status === 'not-deleted') {
|
|
392
|
+
return {
|
|
393
|
+
status: 'rejected',
|
|
394
|
+
reason: `session.close could not delete session "${sid}": ${result.error.message}`,
|
|
395
|
+
stateDigest: { code: result.error.code, activeSid: result.activeSid },
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
if (st().tabs.some((tab) => tab.sid === sid)) {
|
|
399
|
+
return {
|
|
400
|
+
status: 'completed',
|
|
401
|
+
stateDigest: {
|
|
402
|
+
deleted: true,
|
|
403
|
+
activeSid: result.activeSid,
|
|
404
|
+
localStateConsistent: false,
|
|
405
|
+
warning: {
|
|
406
|
+
code: 'SESSION_DELETE_READBACK_FAILED',
|
|
407
|
+
message: `Session "${sid}" was deleted on the server but local state still contains it`,
|
|
408
|
+
},
|
|
409
|
+
recovery: 'Refresh sessions before continuing. Do not retry the deletion.',
|
|
410
|
+
},
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
if (result.status === 'deleted-without-active-session') {
|
|
414
|
+
return {
|
|
415
|
+
status: 'completed',
|
|
416
|
+
stateDigest: {
|
|
417
|
+
deleted: true,
|
|
418
|
+
activeSid: null,
|
|
419
|
+
replacementReady: false,
|
|
420
|
+
warning: result.error,
|
|
421
|
+
recovery: 'Create or refresh a session before continuing chat work. Do not retry the deletion.',
|
|
422
|
+
},
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
return { status: 'completed', stateDigest: { deleted: true, activeSid: result.activeSid } };
|
|
426
|
+
},
|
|
427
|
+
});
|
|
428
|
+
registerAction({
|
|
429
|
+
id: 'session.rename',
|
|
430
|
+
title: '重命名会话',
|
|
431
|
+
description: 'Persistent session rename is not available in this Studio version; this action rejects instead of changing only the temporary tab label.',
|
|
432
|
+
schema: {
|
|
433
|
+
type: 'object',
|
|
434
|
+
properties: { sid: { type: 'string' }, displayName: { type: 'string' } },
|
|
435
|
+
required: ['sid', 'displayName'],
|
|
436
|
+
},
|
|
437
|
+
capability: 'write',
|
|
438
|
+
surface: 'both',
|
|
439
|
+
available: () => 'Persistent session rename is not available in this Studio version',
|
|
440
|
+
run: () => ({
|
|
441
|
+
status: 'rejected',
|
|
442
|
+
reason: 'Persistent session rename is not available in this Studio version',
|
|
443
|
+
}),
|
|
444
|
+
});
|
|
445
|
+
registerAction({
|
|
446
|
+
id: 'sessions.refresh',
|
|
447
|
+
title: '刷新会话列表',
|
|
448
|
+
description: 'Re-fetch the session list from the server.',
|
|
449
|
+
capability: 'read',
|
|
450
|
+
surface: 'both',
|
|
451
|
+
run: async () => {
|
|
452
|
+
const result = await st().refreshSessions();
|
|
453
|
+
if (result.status === 'failed') {
|
|
454
|
+
return {
|
|
455
|
+
status: 'rejected',
|
|
456
|
+
reason: `sessions.refresh could not read the server session list: ${result.error.message}`,
|
|
457
|
+
stateDigest: { code: result.error.code },
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
if (result.status === 'superseded') {
|
|
461
|
+
return {
|
|
462
|
+
status: 'rejected',
|
|
463
|
+
reason: 'sessions.refresh was superseded by a newer game selection',
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
return { status: 'completed', stateDigest: { tabs: st().tabs.length, serverCount: result.count } };
|
|
467
|
+
},
|
|
468
|
+
});
|
|
469
|
+
registerAction({
|
|
470
|
+
id: 'sessions.list',
|
|
471
|
+
title: '列出会话',
|
|
472
|
+
description: 'List chat sessions of the current game scope. Returns sid/displayName rows in stateDigest.',
|
|
473
|
+
capability: 'read',
|
|
474
|
+
surface: 'both',
|
|
475
|
+
run: async () => {
|
|
476
|
+
const rows = await getSessionClient().fetchSessionList(st().activeGameSlug ?? undefined);
|
|
477
|
+
return {
|
|
478
|
+
status: 'completed',
|
|
479
|
+
stateDigest: rows.map((s) => ({ sid: s.sid, displayName: s.displayName ?? null })),
|
|
480
|
+
};
|
|
481
|
+
},
|
|
482
|
+
});
|
|
483
|
+
registerAction({
|
|
484
|
+
id: 'game.switch',
|
|
485
|
+
title: '切换游戏',
|
|
486
|
+
description: 'Select the active game (project) by slug. Every open Studio page follows the server authority.',
|
|
487
|
+
schema: { type: 'object', properties: { slug: { type: 'string' } }, required: ['slug'] },
|
|
488
|
+
capability: 'write',
|
|
489
|
+
firstClass: true, // P1-9:高频 action 派生一等 ToolSpec(ui_act_*)
|
|
490
|
+
surface: 'both',
|
|
491
|
+
timeoutMs: 20_000,
|
|
492
|
+
// 命令面板把 slug 变成「现有游戏」下拉,避免瞎填触发 server 404。
|
|
493
|
+
choices: {
|
|
494
|
+
slug: async () => {
|
|
495
|
+
const result = await getStudioProjectClient().listProjects();
|
|
496
|
+
return result.games.map((project) => project.slug);
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
run: async (args) => {
|
|
500
|
+
const switched = await st().setActiveGame(args.slug);
|
|
501
|
+
const runtime = st().activeGameRuntime;
|
|
502
|
+
return {
|
|
503
|
+
status: 'completed',
|
|
504
|
+
stateDigest: {
|
|
505
|
+
activeGameSlug: st().activeGameSlug,
|
|
506
|
+
runtimeStatus: runtime.status,
|
|
507
|
+
...(switched.warning ? { warning: switched.warning } : {}),
|
|
508
|
+
},
|
|
509
|
+
};
|
|
510
|
+
},
|
|
511
|
+
});
|
|
512
|
+
registerAction({
|
|
513
|
+
id: 'game.create',
|
|
514
|
+
title: '新建游戏',
|
|
515
|
+
description: 'Create a NEW game (project) from the template and give it its own dedicated chat session. Args: slug (required, 1-41 chars lowercase ASCII/digits/hyphens, must start with a letter/digit — e.g. "neon-runner") + optional name (display name) + optional brief (one line describing what game to make, recorded in FORGE.md for later). Fails with 409 if the slug already exists — use game.switch for existing games; list existing slugs to avoid collisions. NOTE: this does NOT switch the UI to the new game (switching mid-turn would break the active chat channel). Tell the user the game is ready and to open it from the top-bar game switcher; game.switch will land on its dedicated session.',
|
|
516
|
+
schema: {
|
|
517
|
+
type: 'object',
|
|
518
|
+
properties: {
|
|
519
|
+
slug: { type: 'string', description: '1-41 位小写字母/数字/连字符,首位字母或数字;如 "neon-runner"' },
|
|
520
|
+
name: { type: 'string', description: '显示名(可选,缺省用 slug)' },
|
|
521
|
+
brief: { type: 'string', description: '一句话说明要做什么游戏(可选,写进 FORGE.md)' },
|
|
522
|
+
},
|
|
523
|
+
required: ['slug'],
|
|
524
|
+
},
|
|
525
|
+
capability: 'write',
|
|
526
|
+
firstClass: true,
|
|
527
|
+
surface: 'both',
|
|
528
|
+
timeoutMs: 20_000,
|
|
529
|
+
run: async (args) => {
|
|
530
|
+
const slug = String(args.slug ?? '').trim();
|
|
531
|
+
const data = await getStudioProjectClient().createProject({
|
|
532
|
+
slug,
|
|
533
|
+
name: typeof args.name === 'string' ? args.name : slug,
|
|
534
|
+
brief: typeof args.brief === 'string' ? args.brief : '',
|
|
535
|
+
});
|
|
536
|
+
if (!data.ok) {
|
|
537
|
+
return { status: 'rejected', reason: data.error ?? 'create game failed' };
|
|
538
|
+
}
|
|
539
|
+
return {
|
|
540
|
+
status: 'completed',
|
|
541
|
+
stateDigest: {
|
|
542
|
+
slug,
|
|
543
|
+
session: data.session?.sid ?? null,
|
|
544
|
+
hint: '新游戏已建好并配了独立会话;从顶栏游戏切换器切过去即可开始做',
|
|
545
|
+
},
|
|
546
|
+
};
|
|
547
|
+
},
|
|
548
|
+
});
|
|
549
|
+
// ── 状态摘要片(评审 2.5:注册式 derive,禁手写台账)────────────────────────
|
|
550
|
+
registerStateSlice('app.layout', () => ({
|
|
551
|
+
fullscreen: st().fullscreen,
|
|
552
|
+
sidebarCollapsed: st().sidebarCollapsed,
|
|
553
|
+
chatpanelCollapsed: st().chatpanelCollapsed,
|
|
554
|
+
}));
|
|
555
|
+
registerStateSlice('game.active', () => st().activeGameSlug);
|
|
556
|
+
registerStateSlice('session.active', () => st().activeSid);
|
|
557
|
+
registerStateSlice('session.tabs', () => st().tabs.slice(0, 20).map((t) => ({ sid: t.sid, label: tabLabel(t) })));
|
|
558
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// interface 跨-app 事件总线 primitive —— 纯机制,零 app 语义。
|
|
2
|
+
//
|
|
3
|
+
// 设计意图(R5 store 收敛):interface 是可复用 AppKit foundation,不认识任何上层 app 的 topic。
|
|
4
|
+
// 各 app 通过 TS declaration merging 往 `BusTopics` 里登记自己的 topic → payload
|
|
5
|
+
// 类型;interface 只提供 publish / subscribe 机制本身。这样「新增 app 不改 foundation」——app 自带
|
|
6
|
+
// 自己的 topic 声明即可。
|
|
7
|
+
//
|
|
8
|
+
// 两种用法:
|
|
9
|
+
// 1. 意图 (fire-and-forget):`publish('overlay:open', { id })` → 当前订阅者收到,
|
|
10
|
+
// 不留存。用于跨 app 导航/深链意图(原 store 里的 ~14 个 pending* 槽)。
|
|
11
|
+
// 2. 只读真值快照:`publish('sessions:changed', snap, { retain: true })` → 留存最近
|
|
12
|
+
// 一次值;之后 subscribe 的新订阅者**立即**收到该值。用于 owner app 广播共享真值、
|
|
13
|
+
// 其他 app 存只读副本(原 store 里 tabs / liveAgents 等跨 app 读的状态)。
|
|
14
|
+
//
|
|
15
|
+
// HMR 安全:handler 表 + retained 表挂在 globalThis 上,模块被重新求值时不丢订阅、
|
|
16
|
+
// 不丢最近快照。
|
|
17
|
+
const _BUS_FLAG = '__FORGEAX_BUS__';
|
|
18
|
+
const _gt = globalThis;
|
|
19
|
+
const _bus = _gt[_BUS_FLAG] ?? (_gt[_BUS_FLAG] = { handlers: new Map(), retained: new Map() });
|
|
20
|
+
/** 发布一条 topic。
|
|
21
|
+
* @param opts.retain 留存本次 payload;之后新订阅者会立即收到(快照语义)。默认 false(纯意图)。 */
|
|
22
|
+
export function publish(topic, payload, opts) {
|
|
23
|
+
if (opts?.retain)
|
|
24
|
+
_bus.retained.set(topic, payload);
|
|
25
|
+
const set = _bus.handlers.get(topic);
|
|
26
|
+
if (!set)
|
|
27
|
+
return;
|
|
28
|
+
for (const h of [...set]) {
|
|
29
|
+
try {
|
|
30
|
+
h(payload);
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
console.warn(`[bus] handler for "${topic}" threw`, err);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/** 订阅一条 topic,返回 unsubscribe。
|
|
38
|
+
* 若该 topic 有 retained 快照,handler 会被**同步立即**调用一次(补齐当前值)。 */
|
|
39
|
+
export function subscribe(topic, handler) {
|
|
40
|
+
const h = handler;
|
|
41
|
+
let set = _bus.handlers.get(topic);
|
|
42
|
+
if (!set) {
|
|
43
|
+
set = new Set();
|
|
44
|
+
_bus.handlers.set(topic, set);
|
|
45
|
+
}
|
|
46
|
+
set.add(h);
|
|
47
|
+
if (_bus.retained.has(topic)) {
|
|
48
|
+
try {
|
|
49
|
+
h(_bus.retained.get(topic));
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
console.warn(`[bus] replay for "${topic}" threw`, err);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return () => {
|
|
56
|
+
const s = _bus.handlers.get(topic);
|
|
57
|
+
if (s) {
|
|
58
|
+
s.delete(h);
|
|
59
|
+
if (s.size === 0)
|
|
60
|
+
_bus.handlers.delete(topic);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/** 读取某 topic 最近一次 retained 快照(无则 undefined)。给「订阅前先取一次当前值」用。 */
|
|
65
|
+
export function peek(topic) {
|
|
66
|
+
return _bus.retained.get(topic);
|
|
67
|
+
}
|
|
68
|
+
/** 清掉某 topic 的 retained 快照(owner app 卸载共享真值时用)。 */
|
|
69
|
+
export function clearRetained(topic) {
|
|
70
|
+
_bus.retained.delete(topic);
|
|
71
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** checkpoint-api —— checkpoint 回退点的 REST 包装(server api/sessions.ts 路由)。
|
|
2
|
+
* 与 forgeax-bridge 同款风格:不持状态,调用方显式传 sid。 */
|
|
3
|
+
async function post(url, body) {
|
|
4
|
+
const r = await fetch(url, {
|
|
5
|
+
method: "POST",
|
|
6
|
+
headers: { "content-type": "application/json" },
|
|
7
|
+
body: JSON.stringify(body),
|
|
8
|
+
});
|
|
9
|
+
if (!r.ok) {
|
|
10
|
+
let detail;
|
|
11
|
+
try {
|
|
12
|
+
detail = (await r.json()).error ?? `HTTP ${r.status}`;
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
detail = `HTTP ${r.status}`;
|
|
16
|
+
}
|
|
17
|
+
throw new Error(detail);
|
|
18
|
+
}
|
|
19
|
+
return (await r.json());
|
|
20
|
+
}
|
|
21
|
+
export async function fetchCheckpoints(sid, signal) {
|
|
22
|
+
const r = await fetch(`/api/sessions/${encodeURIComponent(sid)}/checkpoints`, { signal });
|
|
23
|
+
if (!r.ok)
|
|
24
|
+
throw new Error(`GET checkpoints ${r.status}`);
|
|
25
|
+
return (await r.json());
|
|
26
|
+
}
|
|
27
|
+
export function rewindPreview(sid, msgId) {
|
|
28
|
+
return post(`/api/sessions/${encodeURIComponent(sid)}/rewind/preview`, { msgId });
|
|
29
|
+
}
|
|
30
|
+
export function rewindTo(sid, msgId, mode) {
|
|
31
|
+
return post(`/api/sessions/${encodeURIComponent(sid)}/rewind`, { msgId, mode });
|
|
32
|
+
}
|
|
33
|
+
export function rewindCancel(sid, boundaryId) {
|
|
34
|
+
return post(`/api/sessions/${encodeURIComponent(sid)}/rewind/cancel`, { boundaryId });
|
|
35
|
+
}
|
|
36
|
+
export function rewindOverwriteDirty(sid, boundaryId) {
|
|
37
|
+
return post(`/api/sessions/${encodeURIComponent(sid)}/rewind/overwrite-dirty`, { boundaryId });
|
|
38
|
+
}
|
|
39
|
+
export function rewindUndoOverwrite(sid, boundaryId) {
|
|
40
|
+
return post(`/api/sessions/${encodeURIComponent(sid)}/rewind/undo-overwrite`, { boundaryId });
|
|
41
|
+
}
|