@opentabs-dev/browser-extension 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/background-log-state.d.ts +10 -0
- package/dist/background-log-state.d.ts.map +1 -0
- package/dist/background-log-state.js +11 -0
- package/dist/background-log-state.js.map +1 -0
- package/dist/background-message-handlers.d.ts +41 -0
- package/dist/background-message-handlers.d.ts.map +1 -0
- package/dist/background-message-handlers.js +214 -0
- package/dist/background-message-handlers.js.map +1 -0
- package/dist/background.d.ts +2 -0
- package/dist/background.d.ts.map +1 -0
- package/dist/background.js +3780 -0
- package/dist/background.js.map +1 -0
- package/dist/bg-log-state.d.ts +10 -0
- package/dist/bg-log-state.d.ts.map +1 -0
- package/dist/bg-log-state.js +11 -0
- package/dist/bg-log-state.js.map +1 -0
- package/dist/browser-commands/content-commands.d.ts +25 -0
- package/dist/browser-commands/content-commands.d.ts.map +1 -0
- package/dist/browser-commands/content-commands.js +166 -0
- package/dist/browser-commands/content-commands.js.map +1 -0
- package/dist/browser-commands/cookie-commands.d.ts +14 -0
- package/dist/browser-commands/cookie-commands.d.ts.map +1 -0
- package/dist/browser-commands/cookie-commands.js +99 -0
- package/dist/browser-commands/cookie-commands.js.map +1 -0
- package/dist/browser-commands/extension-commands.d.ts +12 -0
- package/dist/browser-commands/extension-commands.d.ts.map +1 -0
- package/dist/browser-commands/extension-commands.js +386 -0
- package/dist/browser-commands/extension-commands.js.map +1 -0
- package/dist/browser-commands/helpers.d.ts +35 -0
- package/dist/browser-commands/helpers.d.ts.map +1 -0
- package/dist/browser-commands/helpers.js +121 -0
- package/dist/browser-commands/helpers.js.map +1 -0
- package/dist/browser-commands/index.d.ts +11 -0
- package/dist/browser-commands/index.d.ts.map +1 -0
- package/dist/browser-commands/index.js +10 -0
- package/dist/browser-commands/index.js.map +1 -0
- package/dist/browser-commands/interaction-commands.d.ts +23 -0
- package/dist/browser-commands/interaction-commands.d.ts.map +1 -0
- package/dist/browser-commands/interaction-commands.js +353 -0
- package/dist/browser-commands/interaction-commands.js.map +1 -0
- package/dist/browser-commands/key-press-command.d.ts +2 -0
- package/dist/browser-commands/key-press-command.d.ts.map +1 -0
- package/dist/browser-commands/key-press-command.js +144 -0
- package/dist/browser-commands/key-press-command.js.map +1 -0
- package/dist/browser-commands/network-commands.d.ts +6 -0
- package/dist/browser-commands/network-commands.d.ts.map +1 -0
- package/dist/browser-commands/network-commands.js +69 -0
- package/dist/browser-commands/network-commands.js.map +1 -0
- package/dist/browser-commands/resource-commands.d.ts +37 -0
- package/dist/browser-commands/resource-commands.d.ts.map +1 -0
- package/dist/browser-commands/resource-commands.js +153 -0
- package/dist/browser-commands/resource-commands.js.map +1 -0
- package/dist/browser-commands/scroll-command.d.ts +2 -0
- package/dist/browser-commands/scroll-command.d.ts.map +1 -0
- package/dist/browser-commands/scroll-command.js +133 -0
- package/dist/browser-commands/scroll-command.js.map +1 -0
- package/dist/browser-commands/tab-commands.d.ts +33 -0
- package/dist/browser-commands/tab-commands.d.ts.map +1 -0
- package/dist/browser-commands/tab-commands.js +121 -0
- package/dist/browser-commands/tab-commands.js.map +1 -0
- package/dist/browser-commands.d.ts +36 -0
- package/dist/browser-commands.d.ts.map +1 -0
- package/dist/browser-commands.js +1931 -0
- package/dist/browser-commands.js.map +1 -0
- package/dist/confirmation-badge.d.ts +17 -0
- package/dist/confirmation-badge.d.ts.map +1 -0
- package/dist/confirmation-badge.js +64 -0
- package/dist/confirmation-badge.js.map +1 -0
- package/dist/constants.d.ts +79 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +79 -0
- package/dist/constants.js.map +1 -0
- package/dist/dispatch-helpers.d.ts +61 -0
- package/dist/dispatch-helpers.d.ts.map +1 -0
- package/dist/dispatch-helpers.js +149 -0
- package/dist/dispatch-helpers.js.map +1 -0
- package/dist/extension-messages.d.ts +146 -0
- package/dist/extension-messages.d.ts.map +1 -0
- package/dist/extension-messages.js +2 -0
- package/dist/extension-messages.js.map +1 -0
- package/dist/iife-injection.d.ts +55 -0
- package/dist/iife-injection.d.ts.map +1 -0
- package/dist/iife-injection.js +474 -0
- package/dist/iife-injection.js.map +1 -0
- package/dist/json-rpc-errors.d.ts +8 -0
- package/dist/json-rpc-errors.d.ts.map +1 -0
- package/dist/json-rpc-errors.js +8 -0
- package/dist/json-rpc-errors.js.map +1 -0
- package/dist/known-methods.d.ts +19 -0
- package/dist/known-methods.d.ts.map +1 -0
- package/dist/known-methods.js +68 -0
- package/dist/known-methods.js.map +1 -0
- package/dist/log-collector.d.ts +45 -0
- package/dist/log-collector.d.ts.map +1 -0
- package/dist/log-collector.js +99 -0
- package/dist/log-collector.js.map +1 -0
- package/dist/message-router.d.ts +28 -0
- package/dist/message-router.d.ts.map +1 -0
- package/dist/message-router.js +367 -0
- package/dist/message-router.js.map +1 -0
- package/dist/messaging.d.ts +15 -0
- package/dist/messaging.d.ts.map +1 -0
- package/dist/messaging.js +41 -0
- package/dist/messaging.js.map +1 -0
- package/dist/network-capture.d.ts +56 -0
- package/dist/network-capture.d.ts.map +1 -0
- package/dist/network-capture.js +374 -0
- package/dist/network-capture.js.map +1 -0
- package/dist/offscreen/index.d.ts +16 -0
- package/dist/offscreen/index.d.ts.map +1 -0
- package/dist/offscreen/index.js +549 -0
- package/dist/offscreen/index.js.map +1 -0
- package/dist/plugin-storage.d.ts +19 -0
- package/dist/plugin-storage.d.ts.map +1 -0
- package/dist/plugin-storage.js +100 -0
- package/dist/plugin-storage.js.map +1 -0
- package/dist/rate-limiter.d.ts +18 -0
- package/dist/rate-limiter.d.ts.map +1 -0
- package/dist/rate-limiter.js +53 -0
- package/dist/rate-limiter.js.map +1 -0
- package/dist/resource-prompt-dispatch.d.ts +14 -0
- package/dist/resource-prompt-dispatch.d.ts.map +1 -0
- package/dist/resource-prompt-dispatch.js +195 -0
- package/dist/resource-prompt-dispatch.js.map +1 -0
- package/dist/sanitize-error.d.ts +8 -0
- package/dist/sanitize-error.d.ts.map +1 -0
- package/dist/sanitize-error.js +25 -0
- package/dist/sanitize-error.js.map +1 -0
- package/dist/sanitize-svg.d.ts +20 -0
- package/dist/sanitize-svg.d.ts.map +1 -0
- package/dist/sanitize-svg.js +296 -0
- package/dist/sanitize-svg.js.map +1 -0
- package/dist/side-panel/App.d.ts +3 -0
- package/dist/side-panel/App.d.ts.map +1 -0
- package/dist/side-panel/App.js +147 -0
- package/dist/side-panel/App.js.map +1 -0
- package/dist/side-panel/bridge.d.ts +50 -0
- package/dist/side-panel/bridge.d.ts.map +1 -0
- package/dist/side-panel/bridge.js +113 -0
- package/dist/side-panel/bridge.js.map +1 -0
- package/dist/side-panel/components/ConfirmationDialog.d.ts +16 -0
- package/dist/side-panel/components/ConfirmationDialog.d.ts.map +1 -0
- package/dist/side-panel/components/ConfirmationDialog.js +39 -0
- package/dist/side-panel/components/ConfirmationDialog.js.map +1 -0
- package/dist/side-panel/components/EmptyStates.d.ts +8 -0
- package/dist/side-panel/components/EmptyStates.d.ts.map +1 -0
- package/dist/side-panel/components/EmptyStates.js +40 -0
- package/dist/side-panel/components/EmptyStates.js.map +1 -0
- package/dist/side-panel/components/ErrorBoundary.d.ts +23 -0
- package/dist/side-panel/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/side-panel/components/ErrorBoundary.js +28 -0
- package/dist/side-panel/components/ErrorBoundary.js.map +1 -0
- package/dist/side-panel/components/FailedPluginCard.d.ts +6 -0
- package/dist/side-panel/components/FailedPluginCard.d.ts.map +1 -0
- package/dist/side-panel/components/FailedPluginCard.js +9 -0
- package/dist/side-panel/components/FailedPluginCard.js.map +1 -0
- package/dist/side-panel/components/Footer.d.ts +3 -0
- package/dist/side-panel/components/Footer.d.ts.map +1 -0
- package/dist/side-panel/components/Footer.js +32 -0
- package/dist/side-panel/components/Footer.js.map +1 -0
- package/dist/side-panel/components/Header.d.ts +5 -0
- package/dist/side-panel/components/Header.d.ts.map +1 -0
- package/dist/side-panel/components/Header.js +6 -0
- package/dist/side-panel/components/Header.js.map +1 -0
- package/dist/side-panel/components/PluginCard.d.ts +10 -0
- package/dist/side-panel/components/PluginCard.d.ts.map +1 -0
- package/dist/side-panel/components/PluginCard.js +50 -0
- package/dist/side-panel/components/PluginCard.js.map +1 -0
- package/dist/side-panel/components/PluginIcon.d.ts +21 -0
- package/dist/side-panel/components/PluginIcon.d.ts.map +1 -0
- package/dist/side-panel/components/PluginIcon.js +48 -0
- package/dist/side-panel/components/PluginIcon.js.map +1 -0
- package/dist/side-panel/components/PluginList.d.ts +11 -0
- package/dist/side-panel/components/PluginList.d.ts.map +1 -0
- package/dist/side-panel/components/PluginList.js +17 -0
- package/dist/side-panel/components/PluginList.js.map +1 -0
- package/dist/side-panel/components/ToolIcon.d.ts +7 -0
- package/dist/side-panel/components/ToolIcon.d.ts.map +1 -0
- package/dist/side-panel/components/ToolIcon.js +8 -0
- package/dist/side-panel/components/ToolIcon.js.map +1 -0
- package/dist/side-panel/components/ToolRow.d.ts +11 -0
- package/dist/side-panel/components/ToolRow.d.ts.map +1 -0
- package/dist/side-panel/components/ToolRow.js +8 -0
- package/dist/side-panel/components/ToolRow.js.map +1 -0
- package/dist/side-panel/components/VersionMismatchBanner.d.ts +3 -0
- package/dist/side-panel/components/VersionMismatchBanner.d.ts.map +1 -0
- package/dist/side-panel/components/VersionMismatchBanner.js +5 -0
- package/dist/side-panel/components/VersionMismatchBanner.js.map +1 -0
- package/dist/side-panel/components/retro/Accordion.d.ts +8 -0
- package/dist/side-panel/components/retro/Accordion.d.ts.map +1 -0
- package/dist/side-panel/components/retro/Accordion.js +15 -0
- package/dist/side-panel/components/retro/Accordion.js.map +1 -0
- package/dist/side-panel/components/retro/Alert.d.ts +25 -0
- package/dist/side-panel/components/retro/Alert.d.ts.map +1 -0
- package/dist/side-panel/components/retro/Alert.js +33 -0
- package/dist/side-panel/components/retro/Alert.js.map +1 -0
- package/dist/side-panel/components/retro/Badge.d.ts +15 -0
- package/dist/side-panel/components/retro/Badge.d.ts.map +1 -0
- package/dist/side-panel/components/retro/Badge.js +23 -0
- package/dist/side-panel/components/retro/Badge.js.map +1 -0
- package/dist/side-panel/components/retro/Button.d.ts +13 -0
- package/dist/side-panel/components/retro/Button.d.ts.map +1 -0
- package/dist/side-panel/components/retro/Button.js +33 -0
- package/dist/side-panel/components/retro/Button.js.map +1 -0
- package/dist/side-panel/components/retro/Empty.d.ts +31 -0
- package/dist/side-panel/components/retro/Empty.d.ts.map +1 -0
- package/dist/side-panel/components/retro/Empty.js +25 -0
- package/dist/side-panel/components/retro/Empty.js.map +1 -0
- package/dist/side-panel/components/retro/Input.d.ts +8 -0
- package/dist/side-panel/components/retro/Input.d.ts.map +1 -0
- package/dist/side-panel/components/retro/Input.js +7 -0
- package/dist/side-panel/components/retro/Input.js.map +1 -0
- package/dist/side-panel/components/retro/Loader.d.ts +14 -0
- package/dist/side-panel/components/retro/Loader.d.ts.map +1 -0
- package/dist/side-panel/components/retro/Loader.js +30 -0
- package/dist/side-panel/components/retro/Loader.js.map +1 -0
- package/dist/side-panel/components/retro/Menu.d.ts +9 -0
- package/dist/side-panel/components/retro/Menu.d.ts.map +1 -0
- package/dist/side-panel/components/retro/Menu.js +17 -0
- package/dist/side-panel/components/retro/Menu.js.map +1 -0
- package/dist/side-panel/components/retro/NumberStepper.d.ts +18 -0
- package/dist/side-panel/components/retro/NumberStepper.d.ts.map +1 -0
- package/dist/side-panel/components/retro/NumberStepper.js +38 -0
- package/dist/side-panel/components/retro/NumberStepper.js.map +1 -0
- package/dist/side-panel/components/retro/Progress.d.ts +9 -0
- package/dist/side-panel/components/retro/Progress.d.ts.map +1 -0
- package/dist/side-panel/components/retro/Progress.js +6 -0
- package/dist/side-panel/components/retro/Progress.js.map +1 -0
- package/dist/side-panel/components/retro/Switch.d.ts +4 -0
- package/dist/side-panel/components/retro/Switch.d.ts.map +1 -0
- package/dist/side-panel/components/retro/Switch.js +6 -0
- package/dist/side-panel/components/retro/Switch.js.map +1 -0
- package/dist/side-panel/components/retro/Text.d.ts +11 -0
- package/dist/side-panel/components/retro/Text.d.ts.map +1 -0
- package/dist/side-panel/components/retro/Text.js +28 -0
- package/dist/side-panel/components/retro/Text.js.map +1 -0
- package/dist/side-panel/components/retro/Tooltip.d.ts +12 -0
- package/dist/side-panel/components/retro/Tooltip.d.ts.map +1 -0
- package/dist/side-panel/components/retro/Tooltip.js +32 -0
- package/dist/side-panel/components/retro/Tooltip.js.map +1 -0
- package/dist/side-panel/constants.d.ts +5 -0
- package/dist/side-panel/constants.d.ts.map +1 -0
- package/dist/side-panel/constants.js +5 -0
- package/dist/side-panel/constants.js.map +1 -0
- package/dist/side-panel/hooks/useServerNotifications.d.ts +21 -0
- package/dist/side-panel/hooks/useServerNotifications.d.ts.map +1 -0
- package/dist/side-panel/hooks/useServerNotifications.js +93 -0
- package/dist/side-panel/hooks/useServerNotifications.js.map +1 -0
- package/dist/side-panel/hooks/useTheme.d.ts +8 -0
- package/dist/side-panel/hooks/useTheme.d.ts.map +1 -0
- package/dist/side-panel/hooks/useTheme.js +30 -0
- package/dist/side-panel/hooks/useTheme.js.map +1 -0
- package/dist/side-panel/index.d.ts +2 -0
- package/dist/side-panel/index.d.ts.map +1 -0
- package/dist/side-panel/index.js +12 -0
- package/dist/side-panel/index.js.map +1 -0
- package/dist/side-panel/lib/cn.d.ts +3 -0
- package/dist/side-panel/lib/cn.d.ts.map +1 -0
- package/dist/side-panel/lib/cn.js +4 -0
- package/dist/side-panel/lib/cn.js.map +1 -0
- package/dist/side-panel/lib/utils.d.ts +3 -0
- package/dist/side-panel/lib/utils.d.ts.map +1 -0
- package/dist/side-panel/lib/utils.js +4 -0
- package/dist/side-panel/lib/utils.js.map +1 -0
- package/dist/side-panel/side-panel.js +78034 -0
- package/dist/side-panel/styles.css +2 -0
- package/dist/side-panel-state.d.ts +11 -0
- package/dist/side-panel-state.d.ts.map +1 -0
- package/dist/side-panel-state.js +38 -0
- package/dist/side-panel-state.js.map +1 -0
- package/dist/side-panel-toggle.d.ts +3 -0
- package/dist/side-panel-toggle.d.ts.map +1 -0
- package/dist/side-panel-toggle.js +31 -0
- package/dist/side-panel-toggle.js.map +1 -0
- package/dist/tab-matching.d.ts +51 -0
- package/dist/tab-matching.d.ts.map +1 -0
- package/dist/tab-matching.js +160 -0
- package/dist/tab-matching.js.map +1 -0
- package/dist/tab-state.d.ts +56 -0
- package/dist/tab-state.d.ts.map +1 -0
- package/dist/tab-state.js +282 -0
- package/dist/tab-state.js.map +1 -0
- package/dist/tool-dispatch.d.ts +19 -0
- package/dist/tool-dispatch.d.ts.map +1 -0
- package/dist/tool-dispatch.js +336 -0
- package/dist/tool-dispatch.js.map +1 -0
- package/dist/types.d.ts +82 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/icons/icon-128.png +0 -0
- package/icons/icon-16.png +0 -0
- package/icons/icon-32.png +0 -0
- package/icons/icon-48.png +0 -0
- package/icons/icon.svg +6 -0
- package/manifest.json +38 -0
- package/offscreen/offscreen.html +10 -0
- package/package.json +49 -0
- package/side-panel/dark-mode.js +29 -0
- package/side-panel/fonts/archivo-black-latin.woff2 +0 -0
- package/side-panel/fonts/space-grotesk-latin.woff2 +0 -0
- package/side-panel/fonts/space-mono-400-latin.woff2 +0 -0
- package/side-panel/fonts/space-mono-700-latin.woff2 +0 -0
- package/side-panel/fonts.css +34 -0
- package/side-panel/side-panel.html +16 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Background script log collector instance.
|
|
3
|
+
*
|
|
4
|
+
* Extracted to a separate module so both background.ts and browser-commands.ts
|
|
5
|
+
* can access the log collector without circular imports (background.ts imports
|
|
6
|
+
* message-router.ts which imports browser-commands.ts).
|
|
7
|
+
*/
|
|
8
|
+
declare const bgLogCollector: import("./log-collector.js").LogCollector;
|
|
9
|
+
export { bgLogCollector };
|
|
10
|
+
//# sourceMappingURL=background-log-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"background-log-state.d.ts","sourceRoot":"","sources":["../src/background-log-state.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,QAAA,MAAM,cAAc,2CAAoC,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Background script log collector instance.
|
|
3
|
+
*
|
|
4
|
+
* Extracted to a separate module so both background.ts and browser-commands.ts
|
|
5
|
+
* can access the log collector without circular imports (background.ts imports
|
|
6
|
+
* message-router.ts which imports browser-commands.ts).
|
|
7
|
+
*/
|
|
8
|
+
import { installLogCollector } from './log-collector.js';
|
|
9
|
+
const bgLogCollector = installLogCollector('background');
|
|
10
|
+
export { bgLogCollector };
|
|
11
|
+
//# sourceMappingURL=background-log-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"background-log-state.js","sourceRoot":"","sources":["../src/background-log-state.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,cAAc,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Restore wsConnected from chrome.storage.session on service worker wake */
|
|
2
|
+
declare const restoreWsConnectedState: () => void;
|
|
3
|
+
/** Handler signature for background message dispatch */
|
|
4
|
+
type MessageHandler = (message: Record<string, unknown>, sendResponse: (response: unknown) => void) => void;
|
|
5
|
+
/** Handle offscreen:getUrl — return the WebSocket URL derived from user-configured port */
|
|
6
|
+
declare const handleOffscreenGetUrl: MessageHandler;
|
|
7
|
+
/** Handle ws:state — WebSocket connection state changed */
|
|
8
|
+
declare const handleWsState: MessageHandler;
|
|
9
|
+
/** Handle ws:message — relay a JSON-RPC message from the MCP server */
|
|
10
|
+
declare const handleWsMessage: MessageHandler;
|
|
11
|
+
/** Handle bg:send — send a JSON-RPC message to the MCP server */
|
|
12
|
+
declare const handleBgSend: MessageHandler;
|
|
13
|
+
/** Handle bg:getConnectionState — query WebSocket connection state */
|
|
14
|
+
declare const handleBgGetConnectionState: MessageHandler;
|
|
15
|
+
/**
|
|
16
|
+
* Handle plugin:logs — forward batched plugin log entries to the MCP server.
|
|
17
|
+
* Validates the entries array at runtime because this message originates from
|
|
18
|
+
* content scripts which can send arbitrary data.
|
|
19
|
+
*/
|
|
20
|
+
declare const handlePluginLogs: MessageHandler;
|
|
21
|
+
/**
|
|
22
|
+
* Handle tool:progress — forward tool progress notifications to the MCP server.
|
|
23
|
+
* Validates dispatchId/progress/total at runtime because this message originates
|
|
24
|
+
* from content scripts which can send arbitrary data.
|
|
25
|
+
*/
|
|
26
|
+
declare const handleToolProgress: MessageHandler;
|
|
27
|
+
/** Handle sp:confirmationResponse — forward confirmation response to the MCP server */
|
|
28
|
+
declare const handleSpConfirmationResponse: MessageHandler;
|
|
29
|
+
/** Handle sp:confirmationTimeout — confirmation timed out without user response */
|
|
30
|
+
declare const handleSpConfirmationTimeout: MessageHandler;
|
|
31
|
+
/** Handle port-changed — relay port change to offscreen document for reconnect */
|
|
32
|
+
declare const handlePortChanged: MessageHandler;
|
|
33
|
+
/**
|
|
34
|
+
* Register the chrome.runtime.onMessage listener that dispatches internal
|
|
35
|
+
* messages to the appropriate handler via the background dispatch map.
|
|
36
|
+
*/
|
|
37
|
+
declare const initBackgroundMessageHandlers: () => void;
|
|
38
|
+
/** Exported handler names for testing (mirrors methodHandlerNames in message-router.ts) */
|
|
39
|
+
declare const backgroundHandlerNames: readonly string[];
|
|
40
|
+
export { backgroundHandlerNames, handleBgGetConnectionState, handleBgSend, handleOffscreenGetUrl, handlePluginLogs, handlePortChanged, handleSpConfirmationResponse, handleSpConfirmationTimeout, handleToolProgress, handleWsMessage, handleWsState, initBackgroundMessageHandlers, restoreWsConnectedState, };
|
|
41
|
+
//# sourceMappingURL=background-message-handlers.d.ts.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,EACf,aAAa,EACb,6BAA6B,EAC7B,uBAAuB,GACxB,CAAC"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { clearAllConfirmationBadges, clearConfirmationBadge } from './confirmation-badge.js';
|
|
2
|
+
import { buildWsUrl, SERVER_PORT_KEY, WS_CONNECTED_KEY } from './constants.js';
|
|
3
|
+
import { handleServerMessage } from './message-router.js';
|
|
4
|
+
import { forwardToSidePanel, sendToServer } from './messaging.js';
|
|
5
|
+
import { clearTabStateCache } from './tab-state.js';
|
|
6
|
+
import { notifyDispatchProgress } from './tool-dispatch.js';
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
// WebSocket connection state
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
/**
|
|
11
|
+
* In-memory cache of wsConnected. Authoritative state is in chrome.storage.session
|
|
12
|
+
* so it survives MV3 service worker suspension. This cache avoids async reads
|
|
13
|
+
* on every message handler invocation.
|
|
14
|
+
*/
|
|
15
|
+
let wsConnected = false;
|
|
16
|
+
/** Tracks the reason for the last WebSocket disconnection */
|
|
17
|
+
let lastDisconnectReason;
|
|
18
|
+
/** Restore wsConnected from chrome.storage.session on service worker wake */
|
|
19
|
+
const restoreWsConnectedState = () => {
|
|
20
|
+
chrome.storage.session
|
|
21
|
+
.get(WS_CONNECTED_KEY)
|
|
22
|
+
.then(data => {
|
|
23
|
+
if (typeof data[WS_CONNECTED_KEY] === 'boolean') {
|
|
24
|
+
wsConnected = data[WS_CONNECTED_KEY];
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
.catch(() => {
|
|
28
|
+
// storage.session may not be available in all contexts
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
/** Persist wsConnected to chrome.storage.session */
|
|
32
|
+
const persistWsConnected = (connected) => {
|
|
33
|
+
wsConnected = connected;
|
|
34
|
+
chrome.storage.session.set({ [WS_CONNECTED_KEY]: connected }).catch(() => {
|
|
35
|
+
// Best-effort persistence
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
/** Handle offscreen:getUrl — return the WebSocket URL derived from user-configured port */
|
|
39
|
+
const handleOffscreenGetUrl = (_message, sendResponse) => {
|
|
40
|
+
(async () => {
|
|
41
|
+
const stored = await chrome.storage.local
|
|
42
|
+
.get(SERVER_PORT_KEY)
|
|
43
|
+
.catch(() => ({}));
|
|
44
|
+
const port = typeof stored[SERVER_PORT_KEY] === 'number' && stored[SERVER_PORT_KEY] > 0 ? stored[SERVER_PORT_KEY] : undefined;
|
|
45
|
+
const url = port ? buildWsUrl(port) : undefined;
|
|
46
|
+
sendResponse({ url });
|
|
47
|
+
})().catch(() => {
|
|
48
|
+
sendResponse({ url: undefined });
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
/** Handle ws:state — WebSocket connection state changed */
|
|
52
|
+
const handleWsState = (message, sendResponse) => {
|
|
53
|
+
const wasConnected = wsConnected;
|
|
54
|
+
const nowConnected = message.connected;
|
|
55
|
+
persistWsConnected(nowConnected);
|
|
56
|
+
lastDisconnectReason = nowConnected ? undefined : message.disconnectReason;
|
|
57
|
+
forwardToSidePanel({
|
|
58
|
+
type: 'sp:connectionState',
|
|
59
|
+
data: {
|
|
60
|
+
connected: nowConnected,
|
|
61
|
+
disconnectReason: lastDisconnectReason,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
if (!nowConnected && wasConnected) {
|
|
65
|
+
clearTabStateCache();
|
|
66
|
+
clearAllConfirmationBadges();
|
|
67
|
+
}
|
|
68
|
+
sendResponse({ ok: true });
|
|
69
|
+
};
|
|
70
|
+
/** Handle ws:message — relay a JSON-RPC message from the MCP server */
|
|
71
|
+
const handleWsMessage = (message, sendResponse) => {
|
|
72
|
+
handleServerMessage(message.data);
|
|
73
|
+
sendResponse({ ok: true });
|
|
74
|
+
};
|
|
75
|
+
/** Handle bg:send — send a JSON-RPC message to the MCP server */
|
|
76
|
+
const handleBgSend = (message, sendResponse) => {
|
|
77
|
+
sendToServer(message.data);
|
|
78
|
+
sendResponse({ ok: true });
|
|
79
|
+
};
|
|
80
|
+
/** Handle bg:getConnectionState — query WebSocket connection state */
|
|
81
|
+
const handleBgGetConnectionState = (_message, sendResponse) => {
|
|
82
|
+
sendResponse({
|
|
83
|
+
connected: wsConnected,
|
|
84
|
+
disconnectReason: wsConnected ? undefined : lastDisconnectReason,
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Handle plugin:logs — forward batched plugin log entries to the MCP server.
|
|
89
|
+
* Validates the entries array at runtime because this message originates from
|
|
90
|
+
* content scripts which can send arbitrary data.
|
|
91
|
+
*/
|
|
92
|
+
const handlePluginLogs = (message, sendResponse) => {
|
|
93
|
+
const entries = message.entries;
|
|
94
|
+
if (wsConnected && Array.isArray(entries)) {
|
|
95
|
+
const plugin = message.plugin;
|
|
96
|
+
for (const entry of entries) {
|
|
97
|
+
if (typeof entry !== 'object' || entry === null)
|
|
98
|
+
continue;
|
|
99
|
+
const e = entry;
|
|
100
|
+
sendToServer({
|
|
101
|
+
jsonrpc: '2.0',
|
|
102
|
+
method: 'plugin.log',
|
|
103
|
+
params: {
|
|
104
|
+
plugin,
|
|
105
|
+
level: e.level,
|
|
106
|
+
message: e.message,
|
|
107
|
+
data: e.data,
|
|
108
|
+
ts: e.ts,
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
sendResponse({ ok: true });
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Handle tool:progress — forward tool progress notifications to the MCP server.
|
|
117
|
+
* Validates dispatchId/progress/total at runtime because this message originates
|
|
118
|
+
* from content scripts which can send arbitrary data.
|
|
119
|
+
*/
|
|
120
|
+
const handleToolProgress = (message, sendResponse) => {
|
|
121
|
+
const dispatchId = message.dispatchId;
|
|
122
|
+
const progress = message.progress;
|
|
123
|
+
const total = message.total;
|
|
124
|
+
if (wsConnected && typeof dispatchId === 'string' && typeof progress === 'number' && typeof total === 'number') {
|
|
125
|
+
sendToServer({
|
|
126
|
+
jsonrpc: '2.0',
|
|
127
|
+
method: 'tool.progress',
|
|
128
|
+
params: {
|
|
129
|
+
dispatchId,
|
|
130
|
+
progress,
|
|
131
|
+
total,
|
|
132
|
+
message: typeof message.message === 'string' ? message.message : undefined,
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
if (typeof dispatchId === 'string') {
|
|
137
|
+
notifyDispatchProgress(dispatchId);
|
|
138
|
+
}
|
|
139
|
+
sendResponse({ ok: true });
|
|
140
|
+
};
|
|
141
|
+
/** Handle sp:confirmationResponse — forward confirmation response to the MCP server */
|
|
142
|
+
const handleSpConfirmationResponse = (message, sendResponse) => {
|
|
143
|
+
if (wsConnected) {
|
|
144
|
+
sendToServer({
|
|
145
|
+
jsonrpc: '2.0',
|
|
146
|
+
method: 'confirmation.response',
|
|
147
|
+
params: message.data,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
clearConfirmationBadge();
|
|
151
|
+
sendResponse({ ok: true });
|
|
152
|
+
};
|
|
153
|
+
/** Handle sp:confirmationTimeout — confirmation timed out without user response */
|
|
154
|
+
const handleSpConfirmationTimeout = (_message, sendResponse) => {
|
|
155
|
+
clearConfirmationBadge();
|
|
156
|
+
sendResponse({ ok: true });
|
|
157
|
+
};
|
|
158
|
+
/** Handle port-changed — relay port change to offscreen document for reconnect */
|
|
159
|
+
const handlePortChanged = (message, sendResponse) => {
|
|
160
|
+
chrome.runtime.sendMessage(message).catch(() => {
|
|
161
|
+
// Offscreen may not be ready yet
|
|
162
|
+
});
|
|
163
|
+
sendResponse({ ok: true });
|
|
164
|
+
};
|
|
165
|
+
// ---------------------------------------------------------------------------
|
|
166
|
+
// Dispatch map and listener registration
|
|
167
|
+
// ---------------------------------------------------------------------------
|
|
168
|
+
const backgroundHandlers = new Map([
|
|
169
|
+
['offscreen:getUrl', handleOffscreenGetUrl],
|
|
170
|
+
['ws:state', handleWsState],
|
|
171
|
+
['ws:message', handleWsMessage],
|
|
172
|
+
['bg:send', handleBgSend],
|
|
173
|
+
['bg:getConnectionState', handleBgGetConnectionState],
|
|
174
|
+
['plugin:logs', handlePluginLogs],
|
|
175
|
+
['tool:progress', handleToolProgress],
|
|
176
|
+
['sp:confirmationResponse', handleSpConfirmationResponse],
|
|
177
|
+
['sp:confirmationTimeout', handleSpConfirmationTimeout],
|
|
178
|
+
['port-changed', handlePortChanged],
|
|
179
|
+
]);
|
|
180
|
+
// Message types that must originate from extension contexts (offscreen document,
|
|
181
|
+
// side panel, popup) — never from ISOLATED-world content scripts on web pages.
|
|
182
|
+
const EXTENSION_ONLY_TYPES = new Set([
|
|
183
|
+
'offscreen:getUrl',
|
|
184
|
+
'ws:state',
|
|
185
|
+
'ws:message',
|
|
186
|
+
'bg:send',
|
|
187
|
+
'bg:getConnectionState',
|
|
188
|
+
'offscreen:getLogs',
|
|
189
|
+
]);
|
|
190
|
+
/**
|
|
191
|
+
* Register the chrome.runtime.onMessage listener that dispatches internal
|
|
192
|
+
* messages to the appropriate handler via the background dispatch map.
|
|
193
|
+
*/
|
|
194
|
+
const initBackgroundMessageHandlers = () => {
|
|
195
|
+
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
|
196
|
+
// Guard: reject extension-only messages from non-extension senders.
|
|
197
|
+
if (EXTENSION_ONLY_TYPES.has(message.type) && sender.id !== chrome.runtime.id) {
|
|
198
|
+
console.warn(`[opentabs] Rejected ${message.type} from unauthorized sender:`, sender.id ?? sender.url);
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
const handler = backgroundHandlers.get(message.type);
|
|
202
|
+
if (handler) {
|
|
203
|
+
handler(message, sendResponse);
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
// Messages handled by other listeners (offscreen, side panel) — return false
|
|
207
|
+
// so Chrome doesn't keep the message channel open.
|
|
208
|
+
return false;
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
/** Exported handler names for testing (mirrors methodHandlerNames in message-router.ts) */
|
|
212
|
+
const backgroundHandlerNames = [...backgroundHandlers.keys()];
|
|
213
|
+
export { backgroundHandlerNames, handleBgGetConnectionState, handleBgSend, handleOffscreenGetUrl, handlePluginLogs, handlePortChanged, handleSpConfirmationResponse, handleSpConfirmationTimeout, handleToolProgress, handleWsMessage, handleWsState, initBackgroundMessageHandlers, restoreWsConnectedState, };
|
|
214
|
+
//# sourceMappingURL=background-message-handlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"background-message-handlers.js","sourceRoot":"","sources":["../src/background-message-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,8EAA8E;AAC9E,6BAA6B;AAC7B,8EAA8E;AAE9E;;;;GAIG;AACH,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB,6DAA6D;AAC7D,IAAI,oBAAkD,CAAC;AAEvD,6EAA6E;AAC7E,MAAM,uBAAuB,GAAG,GAAS,EAAE;IACzC,MAAM,CAAC,OAAO,CAAC,OAAO;SACnB,GAAG,CAAC,gBAAgB,CAAC;SACrB,IAAI,CAAC,IAAI,CAAC,EAAE;QACX,IAAI,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,SAAS,EAAE,CAAC;YAChD,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACvC,CAAC;IACH,CAAC,CAAC;SACD,KAAK,CAA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