@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,224 @@
|
|
|
1
|
+
/** ui-bridge —— UI 语义操作层的 interface 侧运输层:lease + manifest push + ui_* 应答。
|
|
2
|
+
*
|
|
3
|
+
* 对端(编排层 @forgeax/orchestrator):
|
|
4
|
+
* - POST /:sid/ui-lease 获焦 acquire / 心跳续期(displace 语义,「最后获焦 tab」持有)
|
|
5
|
+
* - POST /:sid/ui-manifest registry 变更时 push 可序列化 manifest(**必须持 lease**——
|
|
6
|
+
* manifest 是 trust-gate 的权限输入,声明与执行方必须同源)
|
|
7
|
+
* - perception:query(WS) kind = ui_snapshot / ui_invoke / ui_screenshot → 本模块应答
|
|
8
|
+
* - POST /:sid/perception-reply 带 leaseId 回灌(server 校验;非持有者的回灌被拒)
|
|
9
|
+
*
|
|
10
|
+
* 多标签规则(评审 2.7,P0 定死):最后获焦的 tab 持 lease,WS 心跳续期;收到 ui_* 查询
|
|
11
|
+
* 且本 tab 可见而无 lease 时机会式 acquire(单 tab 断续场景自愈;两 tab 同可见时后
|
|
12
|
+
* acquire 者胜,server 只认现任 leaseId,不会双应答)。
|
|
13
|
+
*/
|
|
14
|
+
import { installWindowMessageObservation } from '@forgeax/app-shell/react';
|
|
15
|
+
import { getSessionClient, hasSessionClient } from '../store-parts/session-client';
|
|
16
|
+
import { buildManifest, dispatchAction, onRegistryChange, snapshotActions, snapshotState, } from './action-registry';
|
|
17
|
+
import { registerBuiltinActions } from './builtin-actions';
|
|
18
|
+
import { startActionDomDiscovery } from './action-dom-discovery';
|
|
19
|
+
import { installUiActionHighlight } from './ui-action-highlight';
|
|
20
|
+
import { installVagActionBridge } from './vag-action-bridge';
|
|
21
|
+
import { buildA11ySummary } from './a11y-summary';
|
|
22
|
+
import { captureUiScreenshot } from './ui-screenshot';
|
|
23
|
+
import { isTrustedMessageOrigin } from './trustedOrigins';
|
|
24
|
+
import { useShellStore } from '../store';
|
|
25
|
+
const clientId = (() => {
|
|
26
|
+
try {
|
|
27
|
+
return crypto.randomUUID();
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return `tab-${Math.random().toString(36).slice(2)}`;
|
|
31
|
+
}
|
|
32
|
+
})();
|
|
33
|
+
const leases = new Map();
|
|
34
|
+
/** 见过的 sid(store activeSid + 收到过 ui_* 查询的)——心跳续期的范围。 */
|
|
35
|
+
const knownSids = new Set();
|
|
36
|
+
function holdingLease(sid) {
|
|
37
|
+
const l = leases.get(sid);
|
|
38
|
+
return l && l.expiresAt > Date.now() ? l.leaseId : null;
|
|
39
|
+
}
|
|
40
|
+
async function acquireLease(sid, opts = {}) {
|
|
41
|
+
try {
|
|
42
|
+
const r = await fetch(`/api/sessions/${encodeURIComponent(sid)}/ui-lease`, {
|
|
43
|
+
method: 'POST',
|
|
44
|
+
headers: { 'content-type': 'application/json' },
|
|
45
|
+
body: JSON.stringify({ clientId }),
|
|
46
|
+
});
|
|
47
|
+
const j = (await r.json().catch(() => ({})));
|
|
48
|
+
if (!j.ok || typeof j.leaseId !== 'string')
|
|
49
|
+
return null;
|
|
50
|
+
leases.set(sid, { leaseId: j.leaseId, expiresAt: Date.now() + (j.ttlMs ?? 30_000) });
|
|
51
|
+
knownSids.add(sid);
|
|
52
|
+
// 每次 acquire 成功都重推 manifest(幂等整表替换,payload 很小)。顺序约束:trust-gate
|
|
53
|
+
// 的查表在 invoke 往返**之前**发生,manifest 必须先于第一次 ui_invoke 到位,否则
|
|
54
|
+
// fail-closed ask;「只在首次推」曾在会话切换场景留下一次竞态缺口(e2e Test D),
|
|
55
|
+
// 无条件重推把这类缺口整类消掉。skipPush 防 pushManifest→acquireLease 递归。
|
|
56
|
+
if (!opts.skipPush)
|
|
57
|
+
void pushManifest(sid);
|
|
58
|
+
return j.leaseId;
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async function pushManifest(sid) {
|
|
65
|
+
const leaseId = holdingLease(sid) ?? (await acquireLease(sid, { skipPush: true }));
|
|
66
|
+
if (!leaseId)
|
|
67
|
+
return; // 拿不到 lease(别的 tab 持有)→ 不推,由持有者推
|
|
68
|
+
try {
|
|
69
|
+
await fetch(`/api/sessions/${encodeURIComponent(sid)}/ui-manifest`, {
|
|
70
|
+
method: 'POST',
|
|
71
|
+
headers: { 'content-type': 'application/json' },
|
|
72
|
+
body: JSON.stringify({ leaseId, actions: buildManifest() }),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
/* fail-soft:下次 registry 变更 / lease 续期再推 */
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async function answerUiQuery(evt) {
|
|
80
|
+
if (evt.event.type !== 'perception:query')
|
|
81
|
+
return;
|
|
82
|
+
const p = evt.event.payload;
|
|
83
|
+
const kind = p.kind;
|
|
84
|
+
if (kind !== 'ui_snapshot' && kind !== 'ui_invoke' && kind !== 'ui_screenshot')
|
|
85
|
+
return; // world/frame 归 preview surface
|
|
86
|
+
if (typeof p.reqId !== 'string')
|
|
87
|
+
return;
|
|
88
|
+
const sid = evt.sid;
|
|
89
|
+
knownSids.add(sid);
|
|
90
|
+
// lease 检查:非持有者不应答。本 tab 可见而无 lease → 机会式 acquire(displace)。
|
|
91
|
+
let leaseId = holdingLease(sid);
|
|
92
|
+
if (!leaseId && typeof document !== 'undefined' && document.visibilityState === 'visible') {
|
|
93
|
+
leaseId = await acquireLease(sid);
|
|
94
|
+
}
|
|
95
|
+
if (!leaseId)
|
|
96
|
+
return;
|
|
97
|
+
let snapshot;
|
|
98
|
+
if (kind === 'ui_snapshot') {
|
|
99
|
+
const q = (p.query ?? {});
|
|
100
|
+
const detail = typeof q.detail === 'string' ? q.detail : undefined;
|
|
101
|
+
snapshot = {
|
|
102
|
+
actions: snapshotActions(detail, Array.isArray(q.ids) ? q.ids.filter((x) => typeof x === 'string') : undefined),
|
|
103
|
+
state: snapshotState(),
|
|
104
|
+
// P1-13 a11y 兜底:未注册区域的只读定向摘要(detail:'a11y' 按需拉,默认不带)。
|
|
105
|
+
...(detail === 'a11y' ? { a11y: buildA11ySummary() } : {}),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
else if (kind === 'ui_screenshot') {
|
|
109
|
+
// P3 兜底证据:DOM→canvas 栅格化(失败 fail-soft captured:false,见 ui-screenshot.ts)。
|
|
110
|
+
snapshot = await captureUiScreenshot(p.query);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
const q = (p.query ?? {});
|
|
114
|
+
if (typeof q.actionId !== 'string' || !q.actionId) {
|
|
115
|
+
snapshot = { status: 'rejected', reason: 'ui_invoke requires actionId (string)' };
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
snapshot = await dispatchAction(q.actionId, q.args && typeof q.args === 'object' ? q.args : {}, { source: 'ai' });
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
try {
|
|
122
|
+
await fetch(`/api/sessions/${encodeURIComponent(sid)}/perception-reply`, {
|
|
123
|
+
method: 'POST',
|
|
124
|
+
headers: { 'content-type': 'application/json' },
|
|
125
|
+
body: JSON.stringify({ reqId: p.reqId, snapshot, leaseId }),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
/* fail-soft:server 侧超时兜底 */
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// ─── 全局快捷键的 iframe→host 接收器(todo 004)──────────────────────────────
|
|
133
|
+
// 焦点在 iframe 内时,命令面板(⌘K)/ useGlobalShortcuts 的顶层监听拿不到按键。
|
|
134
|
+
// 各 iframe 内装 `installShortcutForwarder`(权威在 @forgeax/extension-platform/transport,消费方 vendor)
|
|
135
|
+
// 把白名单键 postMessage 上来;此处校验 origin 后在顶层重放 → 现有监听自动统一处理。
|
|
136
|
+
// 常量与 Extension Platform transport 的 shortcut forwarder 保持一致;
|
|
137
|
+
// Interface 不静态依赖 transport 实现,因此在边界内联。
|
|
138
|
+
const FORGEAX_FORWARD_KEY = 'FORGEAX_FORWARD_KEY';
|
|
139
|
+
let shortcutReceiverInstalled = false;
|
|
140
|
+
function installShortcutReceiver() {
|
|
141
|
+
if (shortcutReceiverInstalled || typeof window === 'undefined')
|
|
142
|
+
return;
|
|
143
|
+
shortcutReceiverInstalled = true;
|
|
144
|
+
const onMessage = (e) => {
|
|
145
|
+
if (!isTrustedMessageOrigin(e.origin) || !e.data || typeof e.data !== 'object')
|
|
146
|
+
return;
|
|
147
|
+
const d = e.data;
|
|
148
|
+
if (d.type !== FORGEAX_FORWARD_KEY || typeof d.key !== 'string')
|
|
149
|
+
return;
|
|
150
|
+
// 在顶层重放 keydown → CommandPalette(window keydown)+ useGlobalShortcuts(capture)
|
|
151
|
+
// 都在 window 上监听,dispatch 到 window 即 AT_TARGET 触发两者。合成事件 target=window,
|
|
152
|
+
// isTypingTarget 返回 false,故 Esc / Ctrl+/ 等 allowInInput 键也照常。
|
|
153
|
+
window.dispatchEvent(new KeyboardEvent('keydown', {
|
|
154
|
+
key: d.key,
|
|
155
|
+
code: typeof d.code === 'string' ? d.code : '',
|
|
156
|
+
keyCode: typeof d.keyCode === 'number' ? d.keyCode : 0,
|
|
157
|
+
metaKey: !!d.metaKey,
|
|
158
|
+
ctrlKey: !!d.ctrlKey,
|
|
159
|
+
shiftKey: !!d.shiftKey,
|
|
160
|
+
altKey: !!d.altKey,
|
|
161
|
+
bubbles: true,
|
|
162
|
+
cancelable: true,
|
|
163
|
+
}));
|
|
164
|
+
};
|
|
165
|
+
void installWindowMessageObservation({ target: window, onMessage });
|
|
166
|
+
}
|
|
167
|
+
// ─── boot ───────────────────────────────────────────────────────────────────
|
|
168
|
+
let booted = false;
|
|
169
|
+
let repushTimer = null;
|
|
170
|
+
/** main.tsx 调用一次(幂等):登记内置 action + DOM 发现 + lease 生命周期 + 查询应答。 */
|
|
171
|
+
export function bootUiBridge() {
|
|
172
|
+
if (booted || typeof window === 'undefined')
|
|
173
|
+
return;
|
|
174
|
+
booted = true;
|
|
175
|
+
registerBuiltinActions();
|
|
176
|
+
startActionDomDiscovery();
|
|
177
|
+
installUiActionHighlight(); // P1-11:AI 派发时闪高亮 / 浮标
|
|
178
|
+
installVagActionBridge(); // P1-12:iframe 内 action 经 VAG_ACTION_* 接入注册表
|
|
179
|
+
installShortcutReceiver(); // todo 004:iframe 内全局快捷键(⌘K 等)转发上来,顶层重放
|
|
180
|
+
// ui_* 查询应答(onSessionEvent 按 key 幂等,HMR 安全;world/frame 由 perception-stream 继续中转)。
|
|
181
|
+
if (hasSessionClient()) {
|
|
182
|
+
getSessionClient().onSessionEvent('ui-bridge', (evt) => void answerUiQuery(evt));
|
|
183
|
+
}
|
|
184
|
+
// registry 变更 → debounce 重推 manifest(只推本 tab 持 lease 的 sid)。
|
|
185
|
+
onRegistryChange(() => {
|
|
186
|
+
if (repushTimer)
|
|
187
|
+
clearTimeout(repushTimer);
|
|
188
|
+
repushTimer = setTimeout(() => {
|
|
189
|
+
repushTimer = null;
|
|
190
|
+
for (const sid of knownSids)
|
|
191
|
+
if (holdingLease(sid))
|
|
192
|
+
void pushManifest(sid);
|
|
193
|
+
}, 300);
|
|
194
|
+
});
|
|
195
|
+
// 获焦 / 可见 → acquire(displace:「最后获焦 tab」成为权威 surface)。
|
|
196
|
+
const onFocus = () => {
|
|
197
|
+
const sid = useShellStore.getState().activeSid;
|
|
198
|
+
if (sid)
|
|
199
|
+
void acquireLease(sid);
|
|
200
|
+
};
|
|
201
|
+
window.addEventListener('focus', onFocus);
|
|
202
|
+
document.addEventListener('visibilitychange', () => {
|
|
203
|
+
if (document.visibilityState === 'visible')
|
|
204
|
+
onFocus();
|
|
205
|
+
});
|
|
206
|
+
// activeSid 变化 → 对新会话建 lease + 推 manifest。
|
|
207
|
+
let lastSid = null;
|
|
208
|
+
useShellStore.subscribe((state) => {
|
|
209
|
+
const sid = state.activeSid ?? null;
|
|
210
|
+
if (sid && sid !== lastSid) {
|
|
211
|
+
lastSid = sid;
|
|
212
|
+
void acquireLease(sid);
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
onFocus(); // boot 时若已可见,立即建 lease
|
|
216
|
+
// 心跳续期(TTL 30s → 每 10s;仅本 tab 可见时续,失焦让位给获焦 tab)。
|
|
217
|
+
setInterval(() => {
|
|
218
|
+
if (document.visibilityState !== 'visible')
|
|
219
|
+
return;
|
|
220
|
+
for (const sid of knownSids)
|
|
221
|
+
if (holdingLease(sid))
|
|
222
|
+
void acquireLease(sid);
|
|
223
|
+
}, 10_000);
|
|
224
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** ui-screenshot —— `ui_screenshot`(方案 P3)的 interface 侧应答:web 形态 DOM→canvas
|
|
2
|
+
* 兜底截屏(零依赖,foreignObject 栅格化路线)。
|
|
3
|
+
*
|
|
4
|
+
* 定位是**兜底证据,不是主感知通道**(主通道 = ui_snapshot 的文本 manifest + 状态摘要),
|
|
5
|
+
* 故一切失败都 fail-soft 成 `{ captured:false, reason }`(契约 description 已叮嘱模型
|
|
6
|
+
* 勿重试)。已知呈现局限(SVG-as-image 上下文**不加载任何外部资源**):
|
|
7
|
+
* - webfont 回退系统字体;<img> / 跨源 iframe / GPU 合成 canvas 呈空白;
|
|
8
|
+
* - WebKit(桌面 WKWebView)对 foreignObject→canvas 有已知渲染缺陷 → 大概率走
|
|
9
|
+
* fail-soft 分支;Tauri 原生截屏是后续增强(方案 P3 注)。
|
|
10
|
+
*
|
|
11
|
+
* target 解析:'app'(默认)= document.body;'panel:<id>' = DockPanelHost 的结构标记
|
|
12
|
+
* `[data-fx-slot="DockPanel:<id>"]`(其外壳 display:contents 量不出 rect,故实际
|
|
13
|
+
* 量测/序列化首个元素子节点)。
|
|
14
|
+
*/
|
|
15
|
+
export interface ScreenshotOk {
|
|
16
|
+
dataUrl: string;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
target: string;
|
|
20
|
+
note: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ScreenshotFail {
|
|
23
|
+
captured: false;
|
|
24
|
+
reason: string;
|
|
25
|
+
target?: string;
|
|
26
|
+
}
|
|
27
|
+
/** 解析截屏目标元素;认不出 → null(调用方回 captured:false)。 */
|
|
28
|
+
export declare function resolveScreenshotTarget(target: string): HTMLElement | null;
|
|
29
|
+
/** 应答 `ui_screenshot` 查询:成功 `{ dataUrl, width, height, target, note }`,
|
|
30
|
+
* 失败一律 `{ captured:false, reason }`(fail-soft,勿重试语义由契约承担)。 */
|
|
31
|
+
export declare function captureUiScreenshot(query: unknown): Promise<ScreenshotOk | ScreenshotFail>;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/** ui-screenshot —— `ui_screenshot`(方案 P3)的 interface 侧应答:web 形态 DOM→canvas
|
|
2
|
+
* 兜底截屏(零依赖,foreignObject 栅格化路线)。
|
|
3
|
+
*
|
|
4
|
+
* 定位是**兜底证据,不是主感知通道**(主通道 = ui_snapshot 的文本 manifest + 状态摘要),
|
|
5
|
+
* 故一切失败都 fail-soft 成 `{ captured:false, reason }`(契约 description 已叮嘱模型
|
|
6
|
+
* 勿重试)。已知呈现局限(SVG-as-image 上下文**不加载任何外部资源**):
|
|
7
|
+
* - webfont 回退系统字体;<img> / 跨源 iframe / GPU 合成 canvas 呈空白;
|
|
8
|
+
* - WebKit(桌面 WKWebView)对 foreignObject→canvas 有已知渲染缺陷 → 大概率走
|
|
9
|
+
* fail-soft 分支;Tauri 原生截屏是后续增强(方案 P3 注)。
|
|
10
|
+
*
|
|
11
|
+
* target 解析:'app'(默认)= document.body;'panel:<id>' = DockPanelHost 的结构标记
|
|
12
|
+
* `[data-fx-slot="DockPanel:<id>"]`(其外壳 display:contents 量不出 rect,故实际
|
|
13
|
+
* 量测/序列化首个元素子节点)。
|
|
14
|
+
*/
|
|
15
|
+
/** 长边上限:压 payload,同时贴近视觉模型的甜点分辨率。 */
|
|
16
|
+
const MAX_EDGE = 1568;
|
|
17
|
+
const JPEG_QUALITY = 0.85;
|
|
18
|
+
/** 解析截屏目标元素;认不出 → null(调用方回 captured:false)。 */
|
|
19
|
+
export function resolveScreenshotTarget(target) {
|
|
20
|
+
if (target === 'app')
|
|
21
|
+
return document.body;
|
|
22
|
+
if (target.startsWith('panel:')) {
|
|
23
|
+
const id = target.slice('panel:'.length);
|
|
24
|
+
const host = document.querySelector(`[data-fx-slot="DockPanel:${CSS.escape(id)}"]`);
|
|
25
|
+
if (!(host instanceof HTMLElement))
|
|
26
|
+
return null;
|
|
27
|
+
// 外壳 display:contents(见 DockPanelHost)→ 用首个元素子节点量测/序列化。
|
|
28
|
+
const body = host.firstElementChild;
|
|
29
|
+
return body instanceof HTMLElement ? body : host;
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
/** 汇总同源样式表文本(跨源 cssRules 读取会抛 → 跳过;外链字体反正不加载)。 */
|
|
34
|
+
function collectSameOriginCss() {
|
|
35
|
+
const chunks = [];
|
|
36
|
+
for (const sheet of Array.from(document.styleSheets)) {
|
|
37
|
+
try {
|
|
38
|
+
for (const rule of Array.from(sheet.cssRules))
|
|
39
|
+
chunks.push(rule.cssText);
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
/* 跨源样式表 → 跳过(对应区域回退无样式,兜底证据可接受) */
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// <style> 内容走 CDATA 包裹,CSS 里理论上不会出现的终结子串防御性剔除。
|
|
46
|
+
return chunks.join('\n').replaceAll(']]>', '');
|
|
47
|
+
}
|
|
48
|
+
/** 克隆并去掉序列化无意义/有害的活性节点(script 不该出现在图里;其余空白节点保留占位)。 */
|
|
49
|
+
function cloneForSerialization(el, width, height) {
|
|
50
|
+
const clone = el.cloneNode(true);
|
|
51
|
+
for (const s of Array.from(clone.querySelectorAll('script')))
|
|
52
|
+
s.remove();
|
|
53
|
+
if (el === document.body) {
|
|
54
|
+
// A nested <body> is invalid XHTML and breaks the percentage-height chain
|
|
55
|
+
// used by the Studio shell. Replace it with an explicitly sized body-like
|
|
56
|
+
// root so shorter dock columns do not expose transparent bands.
|
|
57
|
+
const bodyRoot = document.createElement('div');
|
|
58
|
+
bodyRoot.className = clone.className;
|
|
59
|
+
for (const child of Array.from(clone.childNodes))
|
|
60
|
+
bodyRoot.appendChild(child);
|
|
61
|
+
const style = getComputedStyle(el);
|
|
62
|
+
Object.assign(bodyRoot.style, {
|
|
63
|
+
position: 'relative',
|
|
64
|
+
width: `${width}px`,
|
|
65
|
+
height: `${height}px`,
|
|
66
|
+
margin: '0',
|
|
67
|
+
padding: '0',
|
|
68
|
+
overflow: 'hidden',
|
|
69
|
+
color: style.color,
|
|
70
|
+
background: style.background,
|
|
71
|
+
fontFamily: style.fontFamily,
|
|
72
|
+
fontSize: style.fontSize,
|
|
73
|
+
lineHeight: style.lineHeight,
|
|
74
|
+
});
|
|
75
|
+
return bodyRoot;
|
|
76
|
+
}
|
|
77
|
+
return clone;
|
|
78
|
+
}
|
|
79
|
+
function captureBackground(el) {
|
|
80
|
+
let current = el;
|
|
81
|
+
while (current) {
|
|
82
|
+
const color = getComputedStyle(current).backgroundColor;
|
|
83
|
+
if (color && color !== 'transparent' && color !== 'rgba(0, 0, 0, 0)')
|
|
84
|
+
return color;
|
|
85
|
+
current = current.parentElement;
|
|
86
|
+
}
|
|
87
|
+
const bodyColor = getComputedStyle(document.body).backgroundColor;
|
|
88
|
+
return bodyColor && bodyColor !== 'transparent' ? bodyColor : '#0d0d0d';
|
|
89
|
+
}
|
|
90
|
+
/** 栅格化图片加载超时:UI 侧必须先于编排层的通道超时(15s)给出确定答复。 */
|
|
91
|
+
const RASTER_TIMEOUT_MS = 5_000;
|
|
92
|
+
function loadImage(src) {
|
|
93
|
+
return new Promise((resolve, reject) => {
|
|
94
|
+
const img = new Image();
|
|
95
|
+
const timer = setTimeout(() => reject(new Error('svg rasterization timed out')), RASTER_TIMEOUT_MS);
|
|
96
|
+
img.onload = () => {
|
|
97
|
+
clearTimeout(timer);
|
|
98
|
+
resolve(img);
|
|
99
|
+
};
|
|
100
|
+
img.onerror = () => {
|
|
101
|
+
clearTimeout(timer);
|
|
102
|
+
reject(new Error('svg rasterization failed to load'));
|
|
103
|
+
};
|
|
104
|
+
img.src = src;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/** 应答 `ui_screenshot` 查询:成功 `{ dataUrl, width, height, target, note }`,
|
|
108
|
+
* 失败一律 `{ captured:false, reason }`(fail-soft,勿重试语义由契约承担)。 */
|
|
109
|
+
export async function captureUiScreenshot(query) {
|
|
110
|
+
const q = (query ?? {});
|
|
111
|
+
const target = typeof q.target === 'string' && q.target ? q.target : 'app';
|
|
112
|
+
const el = resolveScreenshotTarget(target);
|
|
113
|
+
if (!el) {
|
|
114
|
+
return { captured: false, reason: `unknown target "${target}" — use 'app' or 'panel:<id>'`, target };
|
|
115
|
+
}
|
|
116
|
+
try {
|
|
117
|
+
const rect = el.getBoundingClientRect();
|
|
118
|
+
const w = Math.max(1, Math.ceil(rect.width || el.scrollWidth));
|
|
119
|
+
const h = Math.max(1, Math.ceil(rect.height || el.scrollHeight));
|
|
120
|
+
const scale = Math.min(1, MAX_EDGE / Math.max(w, h));
|
|
121
|
+
const outW = Math.max(1, Math.round(w * scale));
|
|
122
|
+
const outH = Math.max(1, Math.round(h * scale));
|
|
123
|
+
const css = collectSameOriginCss();
|
|
124
|
+
const xhtml = new XMLSerializer().serializeToString(cloneForSerialization(el, w, h));
|
|
125
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}">` +
|
|
126
|
+
`<foreignObject width="100%" height="100%">` +
|
|
127
|
+
`<div xmlns="http://www.w3.org/1999/xhtml"><style><![CDATA[${css}]]></style>${xhtml}</div>` +
|
|
128
|
+
`</foreignObject></svg>`;
|
|
129
|
+
const img = await loadImage(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`);
|
|
130
|
+
const canvas = document.createElement('canvas');
|
|
131
|
+
canvas.width = outW;
|
|
132
|
+
canvas.height = outH;
|
|
133
|
+
const ctx = canvas.getContext('2d');
|
|
134
|
+
if (!ctx)
|
|
135
|
+
return { captured: false, reason: 'canvas 2d context unavailable', target };
|
|
136
|
+
ctx.fillStyle = captureBackground(el); // JPEG has no alpha; match the live surface instead of flashing white.
|
|
137
|
+
ctx.fillRect(0, 0, outW, outH);
|
|
138
|
+
ctx.drawImage(img, 0, 0, outW, outH);
|
|
139
|
+
// 栅格失败/污染(toDataURL 抛 SecurityError)都会落到 catch → fail-soft。
|
|
140
|
+
const dataUrl = canvas.toDataURL('image/jpeg', JPEG_QUALITY);
|
|
141
|
+
if (!dataUrl.startsWith('data:image/')) {
|
|
142
|
+
return { captured: false, reason: 'canvas produced no image data', target };
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
dataUrl,
|
|
146
|
+
width: outW,
|
|
147
|
+
height: outH,
|
|
148
|
+
target,
|
|
149
|
+
note: 'best-effort DOM rasterization: external images/fonts and embedded frames/canvases may render blank',
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
catch (e) {
|
|
153
|
+
return { captured: false, reason: `capture failed: ${e.message}`, target };
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** ui-trajectory —— 记录「页面上发生过哪些操作」的滚动轨迹(人 + AI 同一张表),
|
|
2
|
+
* 作为 AI 可观察上下文出墙(ui_snapshot 的 `ui.trajectory` 片 + `trajectory.read` 工具)。
|
|
3
|
+
*
|
|
4
|
+
* 数据源 = action-registry 的**唯一**派发入口 `dispatchAction`,它每次派发都发
|
|
5
|
+
* `UI_ACTION_DISPATCH_EVENT`(人点按钮 / AI 经 ui_invoke,两条路都走它)。这里订阅它,
|
|
6
|
+
* 落进一个定长环形缓冲。与 lib/ui-action-highlight.ts 互补:那边只闪「AI 那条」并丢弃
|
|
7
|
+
* 人的操作;这里**两者都留**,因为 AI 要理解上下文就得看到用户刚才做了什么。
|
|
8
|
+
*
|
|
9
|
+
* 可序列化:entry 只含原始标量 / 浅裁剪后的 args,过得了 snapshotState 的 JSON 出墙。
|
|
10
|
+
* 隐私:credential 级 action 的 args 整体打码(不把密钥类入参喂进 AI 上下文)。 */
|
|
11
|
+
export interface TrajectoryEntry {
|
|
12
|
+
/** 单调自增序号(即使同毫秒也可稳定排序 / 去重)。 */
|
|
13
|
+
seq: number;
|
|
14
|
+
/** Date.now() 毫秒时间戳。 */
|
|
15
|
+
ts: number;
|
|
16
|
+
/** action id('domain.verb')。 */
|
|
17
|
+
id: string;
|
|
18
|
+
/** 人读标题(从注册表 derive;action 已注销则缺省)。 */
|
|
19
|
+
title?: string;
|
|
20
|
+
/** 谁触发的。 */
|
|
21
|
+
source: 'human' | 'ai';
|
|
22
|
+
/** 权限分级(从注册表 derive)。 */
|
|
23
|
+
capability?: string;
|
|
24
|
+
/** 浅裁剪后的入参(credential 级打码;缺省 = 无参)。 */
|
|
25
|
+
args?: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
/** 环形缓冲上限 == 单次 read 上限(供工具的 limit 收敛 + tool 描述出墙)。 */
|
|
28
|
+
export declare const TRAJECTORY_MAX = 200;
|
|
29
|
+
/** 记录一条轨迹。跳过 `trajectory.*` 自省读写,避免 AI 拉轨迹时污染轨迹本身。 */
|
|
30
|
+
export declare function recordTrajectory(detail: {
|
|
31
|
+
id: string;
|
|
32
|
+
source: 'human' | 'ai';
|
|
33
|
+
args?: Record<string, unknown>;
|
|
34
|
+
}): void;
|
|
35
|
+
/** 读取轨迹尾部(oldest→newest)。source 过滤按「谁触发」。 */
|
|
36
|
+
export declare function readTrajectory(opts?: {
|
|
37
|
+
limit?: number;
|
|
38
|
+
source?: 'human' | 'ai';
|
|
39
|
+
}): {
|
|
40
|
+
total: number;
|
|
41
|
+
count: number;
|
|
42
|
+
entries: TrajectoryEntry[];
|
|
43
|
+
};
|
|
44
|
+
/** 清空缓冲,返回清掉的条数。 */
|
|
45
|
+
export declare function clearTrajectory(): number;
|
|
46
|
+
/** 订阅派发事件开始记录(幂等:重复调返回同一退订)。返回退订函数。 */
|
|
47
|
+
export declare function startTrajectoryRecording(): () => void;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/** ui-trajectory —— 记录「页面上发生过哪些操作」的滚动轨迹(人 + AI 同一张表),
|
|
2
|
+
* 作为 AI 可观察上下文出墙(ui_snapshot 的 `ui.trajectory` 片 + `trajectory.read` 工具)。
|
|
3
|
+
*
|
|
4
|
+
* 数据源 = action-registry 的**唯一**派发入口 `dispatchAction`,它每次派发都发
|
|
5
|
+
* `UI_ACTION_DISPATCH_EVENT`(人点按钮 / AI 经 ui_invoke,两条路都走它)。这里订阅它,
|
|
6
|
+
* 落进一个定长环形缓冲。与 lib/ui-action-highlight.ts 互补:那边只闪「AI 那条」并丢弃
|
|
7
|
+
* 人的操作;这里**两者都留**,因为 AI 要理解上下文就得看到用户刚才做了什么。
|
|
8
|
+
*
|
|
9
|
+
* 可序列化:entry 只含原始标量 / 浅裁剪后的 args,过得了 snapshotState 的 JSON 出墙。
|
|
10
|
+
* 隐私:credential 级 action 的 args 整体打码(不把密钥类入参喂进 AI 上下文)。 */
|
|
11
|
+
import { installCustomEventObservation } from '@forgeax/app-shell/react';
|
|
12
|
+
import { getAction, UI_ACTION_DISPATCH_EVENT } from './action-registry';
|
|
13
|
+
// 环形缓冲容量 == `trajectory.read` 单次可拉上限(readTrajectory 用它收敛 limit)。
|
|
14
|
+
// 二者本就相等,故一个常量封两处:内存占用,以及 AI 一次拉取的**最坏上下文体积**
|
|
15
|
+
// (SNAPSHOT_TAIL 20 条随每次 ui_snapshot 出墙不受此限;这里管的是按需 read 的天花板)。
|
|
16
|
+
// 定 200:近 200 条操作足够 AI 理解上下文,同时把最坏一次拉取从 ~500 条压到 ~200 条。
|
|
17
|
+
const MAX = 200;
|
|
18
|
+
const buffer = [];
|
|
19
|
+
let seq = 0;
|
|
20
|
+
let stop = null;
|
|
21
|
+
/** 环形缓冲上限 == 单次 read 上限(供工具的 limit 收敛 + tool 描述出墙)。 */
|
|
22
|
+
export const TRAJECTORY_MAX = MAX;
|
|
23
|
+
/** 浅裁剪 args:长字符串截断、嵌套结构降级为占位、credential 级整体打码。 */
|
|
24
|
+
function redactArgs(args, capability) {
|
|
25
|
+
if (!args || Object.keys(args).length === 0)
|
|
26
|
+
return undefined;
|
|
27
|
+
if (capability === 'credential')
|
|
28
|
+
return { redacted: true };
|
|
29
|
+
const out = {};
|
|
30
|
+
for (const [k, v] of Object.entries(args)) {
|
|
31
|
+
if (typeof v === 'string')
|
|
32
|
+
out[k] = v.length > 120 ? `${v.slice(0, 120)}…` : v;
|
|
33
|
+
else if (v === null || typeof v === 'number' || typeof v === 'boolean')
|
|
34
|
+
out[k] = v;
|
|
35
|
+
else
|
|
36
|
+
out[k] = Array.isArray(v) ? `[array:${v.length}]` : `[${typeof v}]`;
|
|
37
|
+
}
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
/** 记录一条轨迹。跳过 `trajectory.*` 自省读写,避免 AI 拉轨迹时污染轨迹本身。 */
|
|
41
|
+
export function recordTrajectory(detail) {
|
|
42
|
+
if (!detail || typeof detail.id !== 'string')
|
|
43
|
+
return;
|
|
44
|
+
if (detail.id.startsWith('trajectory.'))
|
|
45
|
+
return;
|
|
46
|
+
const def = getAction(detail.id);
|
|
47
|
+
const entry = {
|
|
48
|
+
seq: ++seq,
|
|
49
|
+
ts: Date.now(),
|
|
50
|
+
id: detail.id,
|
|
51
|
+
source: detail.source === 'ai' ? 'ai' : 'human',
|
|
52
|
+
};
|
|
53
|
+
if (def?.title)
|
|
54
|
+
entry.title = def.title;
|
|
55
|
+
if (def?.capability)
|
|
56
|
+
entry.capability = def.capability;
|
|
57
|
+
const args = redactArgs(detail.args, def?.capability);
|
|
58
|
+
if (args)
|
|
59
|
+
entry.args = args;
|
|
60
|
+
buffer.push(entry);
|
|
61
|
+
if (buffer.length > MAX)
|
|
62
|
+
buffer.splice(0, buffer.length - MAX);
|
|
63
|
+
}
|
|
64
|
+
/** 读取轨迹尾部(oldest→newest)。source 过滤按「谁触发」。 */
|
|
65
|
+
export function readTrajectory(opts = {}) {
|
|
66
|
+
const src = opts.source === 'human' || opts.source === 'ai' ? opts.source : undefined;
|
|
67
|
+
const filtered = src ? buffer.filter((e) => e.source === src) : buffer;
|
|
68
|
+
const limit = Math.min(opts.limit && opts.limit > 0 ? Math.floor(opts.limit) : 50, MAX);
|
|
69
|
+
const entries = filtered.slice(-limit);
|
|
70
|
+
return { total: filtered.length, count: entries.length, entries };
|
|
71
|
+
}
|
|
72
|
+
/** 清空缓冲,返回清掉的条数。 */
|
|
73
|
+
export function clearTrajectory() {
|
|
74
|
+
const n = buffer.length;
|
|
75
|
+
buffer.length = 0;
|
|
76
|
+
return n;
|
|
77
|
+
}
|
|
78
|
+
/** 订阅派发事件开始记录(幂等:重复调返回同一退订)。返回退订函数。 */
|
|
79
|
+
export function startTrajectoryRecording() {
|
|
80
|
+
if (typeof window === 'undefined')
|
|
81
|
+
return () => { };
|
|
82
|
+
if (stop)
|
|
83
|
+
return stop;
|
|
84
|
+
const onDispatch = (e) => {
|
|
85
|
+
const d = e.detail;
|
|
86
|
+
if (d)
|
|
87
|
+
recordTrajectory(d);
|
|
88
|
+
};
|
|
89
|
+
const disposeDispatchObservation = installCustomEventObservation({
|
|
90
|
+
target: window,
|
|
91
|
+
eventType: UI_ACTION_DISPATCH_EVENT,
|
|
92
|
+
onEvent: onDispatch,
|
|
93
|
+
});
|
|
94
|
+
stop = () => {
|
|
95
|
+
disposeDispatchObservation();
|
|
96
|
+
stop = null;
|
|
97
|
+
};
|
|
98
|
+
return stop;
|
|
99
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// interface bus 的 React 读侧 —— 订阅某 topic 的 retained 快照,随 owner 发布重渲染。
|
|
2
|
+
//
|
|
3
|
+
// 配套 `bus.ts`:owner app 用 `publish(topic, snap, { retain: true })` 广播只读真值,
|
|
4
|
+
// 壳骨架 / 其他 app 用 `useBusSnapshot(topic)` 读一份响应式只读副本 —— 无需直读
|
|
5
|
+
// owner 的 store(保持 interface foundation 对 app 领域态零知识)。
|
|
6
|
+
//
|
|
7
|
+
// 注意:owner 每次变更必须发布**新的对象引用**(快照语义),否则 useSyncExternalStore
|
|
8
|
+
// 认为未变、不重渲染。返回 `undefined` 表示 owner 尚未发布过(消费者自行 `?? 缺省`)。
|
|
9
|
+
import { useSyncExternalStore } from 'react';
|
|
10
|
+
import { peek, subscribe } from './bus';
|
|
11
|
+
export function useBusSnapshot(topic) {
|
|
12
|
+
return useSyncExternalStore((onChange) => subscribe(topic, () => onChange()), () => peek(topic), () => peek(topic));
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ExtensionInfo } from './extension-api';
|
|
2
|
+
/** Match the canonical manifest identity. Legacy ids are migrated before
|
|
3
|
+
* opening a Page; the runtime host never carries an alias path. */
|
|
4
|
+
export declare function manifestMatchesId(m: ExtensionInfo, id: string): boolean;
|
|
5
|
+
/** Fetches the bus manifest for a single plugin id, with retry/polling so a
|
|
6
|
+
* transient miss (busy server, manifest still settling, bus reload window)
|
|
7
|
+
* self-heals instead of leaving the panel stuck until the user switches tabs.
|
|
8
|
+
*
|
|
9
|
+
* - First attempt rides the shared 2s cache → instant on tab switch-back.
|
|
10
|
+
* - Subsequent attempts force a fresh fetch (every POLL_MS) so a manifest that
|
|
11
|
+
* just gained `entry.standalone` is picked up live.
|
|
12
|
+
* - Polling stops once we have a usable manifest (standalone present) or after
|
|
13
|
+
* MAX_ATTEMPTS (the plugin genuinely ships no standalone entry — e.g. the
|
|
14
|
+
* inline extension panel — so there is nothing more to wait for).
|
|
15
|
+
*
|
|
16
|
+
* Extracted from ExtensionHostPanel so the keep-alive layer can
|
|
17
|
+
* share one implementation (single source of truth for manifest resolution).
|
|
18
|
+
*/
|
|
19
|
+
export declare function useExtensionManifest(extensionId: string): ExtensionInfo | null | 'loading';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { createRestartableTimeoutTaskLifecycle } from '@forgeax/app-shell/react';
|
|
3
|
+
import { listExtensionsShared } from './extension-api';
|
|
4
|
+
/** Match the canonical manifest identity. Legacy ids are migrated before
|
|
5
|
+
* opening a Page; the runtime host never carries an alias path. */
|
|
6
|
+
export function manifestMatchesId(m, id) {
|
|
7
|
+
return m.id === id;
|
|
8
|
+
}
|
|
9
|
+
/** Fetches the bus manifest for a single plugin id, with retry/polling so a
|
|
10
|
+
* transient miss (busy server, manifest still settling, bus reload window)
|
|
11
|
+
* self-heals instead of leaving the panel stuck until the user switches tabs.
|
|
12
|
+
*
|
|
13
|
+
* - First attempt rides the shared 2s cache → instant on tab switch-back.
|
|
14
|
+
* - Subsequent attempts force a fresh fetch (every POLL_MS) so a manifest that
|
|
15
|
+
* just gained `entry.standalone` is picked up live.
|
|
16
|
+
* - Polling stops once we have a usable manifest (standalone present) or after
|
|
17
|
+
* MAX_ATTEMPTS (the plugin genuinely ships no standalone entry — e.g. the
|
|
18
|
+
* inline extension panel — so there is nothing more to wait for).
|
|
19
|
+
*
|
|
20
|
+
* Extracted from ExtensionHostPanel so the keep-alive layer can
|
|
21
|
+
* share one implementation (single source of truth for manifest resolution).
|
|
22
|
+
*/
|
|
23
|
+
export function useExtensionManifest(extensionId) {
|
|
24
|
+
const [info, setInfo] = useState('loading');
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (!extensionId) {
|
|
27
|
+
setInfo(null);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
let cancelled = false;
|
|
31
|
+
let attempts = 0;
|
|
32
|
+
const MAX_ATTEMPTS = 15; // ~22s at POLL_MS — covers cold start / scan windows
|
|
33
|
+
const POLL_MS = 1500;
|
|
34
|
+
setInfo('loading');
|
|
35
|
+
const tick = async () => {
|
|
36
|
+
attempts += 1;
|
|
37
|
+
try {
|
|
38
|
+
const res = await listExtensionsShared({ force: attempts > 1 });
|
|
39
|
+
if (cancelled)
|
|
40
|
+
return;
|
|
41
|
+
const found = res.items.find((p) => manifestMatchesId(p, extensionId)) ?? null;
|
|
42
|
+
setInfo(found);
|
|
43
|
+
if (found?.frontendUrl || found?.entry?.standalone || found?.entry?.frontend || attempts >= MAX_ATTEMPTS)
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
if (cancelled)
|
|
48
|
+
return;
|
|
49
|
+
if (attempts >= MAX_ATTEMPTS) {
|
|
50
|
+
setInfo(null);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
retry.schedule();
|
|
55
|
+
};
|
|
56
|
+
const retry = createRestartableTimeoutTaskLifecycle({
|
|
57
|
+
delayMs: POLL_MS,
|
|
58
|
+
task: () => { void tick(); },
|
|
59
|
+
});
|
|
60
|
+
void tick();
|
|
61
|
+
return () => {
|
|
62
|
+
cancelled = true;
|
|
63
|
+
retry.dispose();
|
|
64
|
+
};
|
|
65
|
+
}, [extensionId]);
|
|
66
|
+
return info;
|
|
67
|
+
}
|