@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,37 @@
|
|
|
1
|
+
export interface CdpFrame {
|
|
2
|
+
id: string;
|
|
3
|
+
url: string;
|
|
4
|
+
securityOrigin: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CdpResource {
|
|
7
|
+
url: string;
|
|
8
|
+
type: string;
|
|
9
|
+
mimeType: string;
|
|
10
|
+
contentLength?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface CdpFrameResourceTree {
|
|
13
|
+
frame: CdpFrame;
|
|
14
|
+
childFrames?: CdpFrameResourceTree[];
|
|
15
|
+
resources: CdpResource[];
|
|
16
|
+
}
|
|
17
|
+
/** MIME types that represent text content and should be decoded from base64 */
|
|
18
|
+
export declare const TEXT_MIME_PREFIXES: string[];
|
|
19
|
+
export declare const TEXT_MIME_EXACT: Set<string>;
|
|
20
|
+
export declare const isTextMimeType: (mimeType: string) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Find the frameId that owns a resource URL by walking the CDP resource tree.
|
|
23
|
+
* Returns the frame ID or null if the resource is not found in any frame.
|
|
24
|
+
*/
|
|
25
|
+
export declare const findFrameForResource: (tree: CdpFrameResourceTree, targetUrl: string) => {
|
|
26
|
+
frameId: string;
|
|
27
|
+
mimeType: string;
|
|
28
|
+
} | null;
|
|
29
|
+
/**
|
|
30
|
+
* Manages Chrome debugger attach/detach lifecycle for commands that need CDP access.
|
|
31
|
+
* Reuses an existing debugger session (from network capture) if one is active,
|
|
32
|
+
* otherwise temporarily attaches and detaches in the finally block.
|
|
33
|
+
*/
|
|
34
|
+
export declare const withDebugger: <T>(tabId: number, fn: () => Promise<T>) => Promise<T>;
|
|
35
|
+
export declare const handleBrowserListResources: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
36
|
+
export declare const handleBrowserGetResourceContent: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
37
|
+
//# sourceMappingURL=resource-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-commands.d.ts","sourceRoot":"","sources":["../../src/browser-commands/resource-commands.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,QAAQ,CAAC;IAChB,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC,SAAS,EAAE,WAAW,EAAE,CAAC;CAC1B;AAED,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB,UAAY,CAAC;AAC5C,eAAO,MAAM,eAAe,aAO1B,CAAC;AAEH,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,KAAG,OAGjD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,MAAM,oBAAoB,EAC1B,WAAW,MAAM,KAChB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAa1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAU,CAAC,EAAE,OAAO,MAAM,EAAE,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,CAAC,CAuBpF,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,IAAI,MAAM,GAAG,MAAM,KAClB,OAAO,CAAC,IAAI,CAwCd,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAC1C,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,IAAI,MAAM,GAAG,MAAM,KAClB,OAAO,CAAC,IAAI,CAuDd,CAAC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { requireStringParam, requireTabId, sendErrorResult, sendSuccessResult, sendValidationError, } from './helpers.js';
|
|
2
|
+
import { CDP_VERSION } from '../constants.js';
|
|
3
|
+
import { isCapturing } from '../network-capture.js';
|
|
4
|
+
import { sanitizeErrorMessage } from '../sanitize-error.js';
|
|
5
|
+
import { toErrorMessage } from '@opentabs-dev/shared';
|
|
6
|
+
/** MIME types that represent text content and should be decoded from base64 */
|
|
7
|
+
export const TEXT_MIME_PREFIXES = ['text/'];
|
|
8
|
+
export const TEXT_MIME_EXACT = new Set([
|
|
9
|
+
'application/javascript',
|
|
10
|
+
'application/json',
|
|
11
|
+
'application/xml',
|
|
12
|
+
'application/xhtml+xml',
|
|
13
|
+
'application/x-javascript',
|
|
14
|
+
'application/ecmascript',
|
|
15
|
+
]);
|
|
16
|
+
export const isTextMimeType = (mimeType) => {
|
|
17
|
+
if (TEXT_MIME_PREFIXES.some(prefix => mimeType.startsWith(prefix)))
|
|
18
|
+
return true;
|
|
19
|
+
return TEXT_MIME_EXACT.has(mimeType);
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Find the frameId that owns a resource URL by walking the CDP resource tree.
|
|
23
|
+
* Returns the frame ID or null if the resource is not found in any frame.
|
|
24
|
+
*/
|
|
25
|
+
export const findFrameForResource = (tree, targetUrl) => {
|
|
26
|
+
for (const r of tree.resources) {
|
|
27
|
+
if (r.url === targetUrl) {
|
|
28
|
+
return { frameId: tree.frame.id, mimeType: r.mimeType };
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (tree.childFrames) {
|
|
32
|
+
for (const child of tree.childFrames) {
|
|
33
|
+
const found = findFrameForResource(child, targetUrl);
|
|
34
|
+
if (found)
|
|
35
|
+
return found;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Manages Chrome debugger attach/detach lifecycle for commands that need CDP access.
|
|
42
|
+
* Reuses an existing debugger session (from network capture) if one is active,
|
|
43
|
+
* otherwise temporarily attaches and detaches in the finally block.
|
|
44
|
+
*/
|
|
45
|
+
export const withDebugger = async (tabId, fn) => {
|
|
46
|
+
const alreadyAttached = isCapturing(tabId);
|
|
47
|
+
if (!alreadyAttached) {
|
|
48
|
+
try {
|
|
49
|
+
await chrome.debugger.attach({ tabId }, CDP_VERSION);
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
const msg = toErrorMessage(err);
|
|
53
|
+
throw new Error(msg.includes('Another debugger')
|
|
54
|
+
? 'Failed to attach debugger — another debugger (e.g., DevTools) is already attached. ' +
|
|
55
|
+
'Close DevTools or enable network capture first (browser_enable_network_capture) ' +
|
|
56
|
+
'so this tool can reuse the existing debugger session.'
|
|
57
|
+
: `Failed to attach debugger: ${sanitizeErrorMessage(msg)}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
return await fn();
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
if (!alreadyAttached) {
|
|
65
|
+
await chrome.debugger.detach({ tabId }).catch(() => { });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
export const handleBrowserListResources = async (params, id) => {
|
|
70
|
+
try {
|
|
71
|
+
const tabId = requireTabId(params, id);
|
|
72
|
+
if (tabId === null)
|
|
73
|
+
return;
|
|
74
|
+
const typeFilter = typeof params.type === 'string' ? params.type : undefined;
|
|
75
|
+
await withDebugger(tabId, async () => {
|
|
76
|
+
await chrome.debugger.sendCommand({ tabId }, 'Page.enable');
|
|
77
|
+
const treeResult = (await chrome.debugger.sendCommand({ tabId }, 'Page.getResourceTree'));
|
|
78
|
+
const frames = [];
|
|
79
|
+
const resources = [];
|
|
80
|
+
const walk = (node) => {
|
|
81
|
+
frames.push({ url: node.frame.url, securityOrigin: node.frame.securityOrigin });
|
|
82
|
+
for (const r of node.resources) {
|
|
83
|
+
if (typeFilter && r.type !== typeFilter)
|
|
84
|
+
continue;
|
|
85
|
+
resources.push({
|
|
86
|
+
url: r.url,
|
|
87
|
+
type: r.type,
|
|
88
|
+
mimeType: r.mimeType,
|
|
89
|
+
contentLength: r.contentLength ?? -1,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (node.childFrames) {
|
|
93
|
+
for (const child of node.childFrames)
|
|
94
|
+
walk(child);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
walk(treeResult.frameTree);
|
|
98
|
+
resources.sort((a, b) => a.type.localeCompare(b.type) || a.url.localeCompare(b.url));
|
|
99
|
+
sendSuccessResult(id, { frames, resources });
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
sendErrorResult(id, err);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
export const handleBrowserGetResourceContent = async (params, id) => {
|
|
107
|
+
try {
|
|
108
|
+
const tabId = requireTabId(params, id);
|
|
109
|
+
if (tabId === null)
|
|
110
|
+
return;
|
|
111
|
+
const url = requireStringParam(params, 'url', id);
|
|
112
|
+
if (url === null)
|
|
113
|
+
return;
|
|
114
|
+
const maxLength = typeof params.maxLength === 'number' ? params.maxLength : 500_000;
|
|
115
|
+
await withDebugger(tabId, async () => {
|
|
116
|
+
await chrome.debugger.sendCommand({ tabId }, 'Page.enable');
|
|
117
|
+
// Get the resource tree to find which frame owns the requested resource
|
|
118
|
+
const treeResult = (await chrome.debugger.sendCommand({ tabId }, 'Page.getResourceTree'));
|
|
119
|
+
const match = findFrameForResource(treeResult.frameTree, url);
|
|
120
|
+
if (!match) {
|
|
121
|
+
sendValidationError(id, `Resource not found in page: ${url}. Use browser_list_resources to find valid resource URLs.`);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const contentResult = (await chrome.debugger.sendCommand({ tabId }, 'Page.getResourceContent', {
|
|
125
|
+
frameId: match.frameId,
|
|
126
|
+
url,
|
|
127
|
+
}));
|
|
128
|
+
let content = contentResult.content;
|
|
129
|
+
let base64Encoded = contentResult.base64Encoded;
|
|
130
|
+
// Decode base64 text resources to UTF-8 strings
|
|
131
|
+
if (base64Encoded && isTextMimeType(match.mimeType)) {
|
|
132
|
+
try {
|
|
133
|
+
content = new TextDecoder().decode(Uint8Array.from(atob(content), c => c.charCodeAt(0)));
|
|
134
|
+
base64Encoded = false;
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
// Decoding failed — return base64 as-is
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
// Truncate text content that exceeds maxLength
|
|
141
|
+
let truncated = false;
|
|
142
|
+
if (!base64Encoded && content.length > maxLength) {
|
|
143
|
+
content = content.slice(0, maxLength) + '... (truncated)';
|
|
144
|
+
truncated = true;
|
|
145
|
+
}
|
|
146
|
+
sendSuccessResult(id, { url, content, base64Encoded, mimeType: match.mimeType, truncated });
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
catch (err) {
|
|
150
|
+
sendErrorResult(id, err);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
//# sourceMappingURL=resource-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-commands.js","sourceRoot":"","sources":["../../src/browser-commands/resource-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAqBtD,+EAA+E;AAC/E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAO,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IACrC,wBAAwB;IACxB,kBAAkB;IAClB,iBAAiB;IACjB,uBAAuB;IACvB,0BAA0B;IAC1B,wBAAwB;CACzB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAW,EAAE;IAC1D,IAAI,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAChF,OAAO,eAAe,CAAC,GAAG,C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AC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBACzF,aAAa,GAAG,KAAK,CAAC;gBACxB,CAAC;gBAAC,MAAM,CAAC;oBACP,wCAAwC;gBAC1C,CAAC;YACH,CAAC;YAED,+CAA+C;YAC/C,IAAI,SAAS,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;gBACjD,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,iBAAiB,CAAC;gBAC1D,SAAS,GAAG,IAAI,CAAC;YACnB,CAAC;YAED,iBAAiB,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;QAC9F,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,eAAe,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-command.d.ts","sourceRoot":"","sources":["../../src/browser-commands/scroll-command.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,mBAAmB,GAAU,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CA0I5G,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { extractScriptResult, requireTabId, sendErrorResult, sendSuccessResult, sendValidationError, } from './helpers.js';
|
|
2
|
+
import { TEXT_PREVIEW_MAX_LENGTH } from '../constants.js';
|
|
3
|
+
export const handleBrowserScroll = async (params, id) => {
|
|
4
|
+
try {
|
|
5
|
+
const tabId = requireTabId(params, id);
|
|
6
|
+
if (tabId === null)
|
|
7
|
+
return;
|
|
8
|
+
const selector = typeof params.selector === 'string' && params.selector.length > 0 ? params.selector : null;
|
|
9
|
+
const direction = typeof params.direction === 'string' ? params.direction : null;
|
|
10
|
+
if (direction !== null &&
|
|
11
|
+
direction !== 'up' &&
|
|
12
|
+
direction !== 'down' &&
|
|
13
|
+
direction !== 'left' &&
|
|
14
|
+
direction !== 'right') {
|
|
15
|
+
sendValidationError(id, `Invalid direction: "${direction}". Must be one of: up, down, left, right`);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const distance = typeof params.distance === 'number' ? params.distance : null;
|
|
19
|
+
const position = typeof params.position === 'object' && params.position !== null
|
|
20
|
+
? params.position
|
|
21
|
+
: null;
|
|
22
|
+
const container = typeof params.container === 'string' && params.container.length > 0 ? params.container : null;
|
|
23
|
+
const results = await chrome.scripting.executeScript({
|
|
24
|
+
target: { tabId },
|
|
25
|
+
world: 'MAIN',
|
|
26
|
+
func: (sel, dir, dist, pos, ctr, maxPreview) => {
|
|
27
|
+
// Resolve scroll target (container or page)
|
|
28
|
+
let scrollEl = null;
|
|
29
|
+
if (ctr) {
|
|
30
|
+
scrollEl = document.querySelector(ctr);
|
|
31
|
+
if (!scrollEl)
|
|
32
|
+
return { error: `Container not found: ${ctr}` };
|
|
33
|
+
}
|
|
34
|
+
// Helper to get scroll metrics from the scroll target
|
|
35
|
+
const getMetrics = () => {
|
|
36
|
+
if (scrollEl) {
|
|
37
|
+
return {
|
|
38
|
+
scrollPosition: { x: scrollEl.scrollLeft, y: scrollEl.scrollTop },
|
|
39
|
+
scrollSize: { width: scrollEl.scrollWidth, height: scrollEl.scrollHeight },
|
|
40
|
+
viewportSize: { width: scrollEl.clientWidth, height: scrollEl.clientHeight },
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
scrollPosition: { x: window.scrollX, y: window.scrollY },
|
|
45
|
+
scrollSize: {
|
|
46
|
+
width: document.documentElement.scrollWidth,
|
|
47
|
+
height: document.documentElement.scrollHeight,
|
|
48
|
+
},
|
|
49
|
+
viewportSize: { width: window.innerWidth, height: window.innerHeight },
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
// Mode 1: scroll element into view
|
|
53
|
+
if (sel) {
|
|
54
|
+
const el = document.querySelector(sel);
|
|
55
|
+
if (!el)
|
|
56
|
+
return { error: `Element not found: ${sel}` };
|
|
57
|
+
el.scrollIntoView({ behavior: 'instant', block: 'center' });
|
|
58
|
+
const text = (el.textContent || '').trim().slice(0, maxPreview);
|
|
59
|
+
return {
|
|
60
|
+
scrolledTo: { tagName: el.tagName.toLowerCase(), text },
|
|
61
|
+
...getMetrics(),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
// Mode 2: relative scroll by direction
|
|
65
|
+
if (dir) {
|
|
66
|
+
const metrics = getMetrics();
|
|
67
|
+
const defaultVertical = metrics.viewportSize.height;
|
|
68
|
+
const defaultHorizontal = metrics.viewportSize.width;
|
|
69
|
+
let dx = 0;
|
|
70
|
+
let dy = 0;
|
|
71
|
+
if (dir === 'down')
|
|
72
|
+
dy = dist ?? defaultVertical;
|
|
73
|
+
else if (dir === 'up')
|
|
74
|
+
dy = -(dist ?? defaultVertical);
|
|
75
|
+
else if (dir === 'right')
|
|
76
|
+
dx = dist ?? defaultHorizontal;
|
|
77
|
+
else if (dir === 'left')
|
|
78
|
+
dx = -(dist ?? defaultHorizontal);
|
|
79
|
+
if (scrollEl) {
|
|
80
|
+
scrollEl.scrollBy({ left: dx, top: dy, behavior: 'instant' });
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
window.scrollBy({ left: dx, top: dy, behavior: 'instant' });
|
|
84
|
+
}
|
|
85
|
+
return getMetrics();
|
|
86
|
+
}
|
|
87
|
+
// Mode 3: absolute scroll to position
|
|
88
|
+
if (pos) {
|
|
89
|
+
const opts = { behavior: 'instant' };
|
|
90
|
+
if (pos.x !== undefined)
|
|
91
|
+
opts.left = pos.x;
|
|
92
|
+
if (pos.y !== undefined)
|
|
93
|
+
opts.top = pos.y;
|
|
94
|
+
if (scrollEl) {
|
|
95
|
+
scrollEl.scrollTo(opts);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
window.scrollTo(opts);
|
|
99
|
+
}
|
|
100
|
+
return getMetrics();
|
|
101
|
+
}
|
|
102
|
+
// No scroll target specified — return current position
|
|
103
|
+
return getMetrics();
|
|
104
|
+
},
|
|
105
|
+
args: [
|
|
106
|
+
selector,
|
|
107
|
+
direction,
|
|
108
|
+
distance,
|
|
109
|
+
position
|
|
110
|
+
? {
|
|
111
|
+
x: position.x,
|
|
112
|
+
y: position.y,
|
|
113
|
+
}
|
|
114
|
+
: null,
|
|
115
|
+
container,
|
|
116
|
+
TEXT_PREVIEW_MAX_LENGTH,
|
|
117
|
+
],
|
|
118
|
+
});
|
|
119
|
+
const result = extractScriptResult(results, id);
|
|
120
|
+
if (!result)
|
|
121
|
+
return;
|
|
122
|
+
sendSuccessResult(id, {
|
|
123
|
+
...(result.scrolledTo !== undefined ? { scrolledTo: result.scrolledTo } : {}),
|
|
124
|
+
scrollPosition: result.scrollPosition,
|
|
125
|
+
scrollSize: result.scrollSize,
|
|
126
|
+
viewportSize: result.viewportSize,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
sendErrorResult(id, err);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=scroll-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-command.js","sourceRoot":"","sources":["../../src/browser-commands/scroll-command.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EAAE,MAA+B,EAAE,EAAmB,EAAiB,EAAE;IA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OAAO;QACpB,iBAAiB,CAAC,EAAE,EAAE;YACpB,GAAG,CAAC,MAAM,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7E,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,YAAY,EAAE,MAAM,CAAC,YAAY;SAClC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,eAAe,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Lists all open Chrome tabs with their IDs, URLs, titles, active state, and window IDs. */
|
|
2
|
+
export declare const handleBrowserListTabs: (id: string | number) => Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* Opens a new Chrome tab with the specified URL.
|
|
5
|
+
* @param params - Expects `{ url: string }`. Rejects blocked URL schemes (javascript:, data:, etc.).
|
|
6
|
+
* @returns The new tab's ID, title, URL, and window ID.
|
|
7
|
+
*/
|
|
8
|
+
export declare const handleBrowserOpenTab: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Closes a Chrome tab by its ID.
|
|
11
|
+
* @param params - Expects `{ tabId: number }`.
|
|
12
|
+
* @returns `{ ok: true }` on success.
|
|
13
|
+
*/
|
|
14
|
+
export declare const handleBrowserCloseTab: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Navigates an existing tab to a new URL.
|
|
17
|
+
* @param params - Expects `{ tabId: number, url: string }`. Rejects blocked URL schemes.
|
|
18
|
+
* @returns The tab's ID, title, and navigated URL.
|
|
19
|
+
*/
|
|
20
|
+
export declare const handleBrowserNavigateTab: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Activates a tab and brings its window to the foreground.
|
|
23
|
+
* @param params - Expects `{ tabId: number }`.
|
|
24
|
+
* @returns The focused tab's ID, title, URL, and active state.
|
|
25
|
+
*/
|
|
26
|
+
export declare const handleBrowserFocusTab: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves detailed metadata for a single tab including status, favicon URL, and incognito state.
|
|
29
|
+
* @param params - Expects `{ tabId: number }`.
|
|
30
|
+
* @returns Tab metadata: ID, title, URL, status, active, windowId, favIconUrl, and incognito.
|
|
31
|
+
*/
|
|
32
|
+
export declare const handleBrowserGetTabInfo: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
33
|
+
//# sourceMappingURL=tab-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-commands.d.ts","sourceRoot":"","sources":["../../src/browser-commands/tab-commands.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,eAAO,MAAM,qBAAqB,GAAU,IAAI,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAc7E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAU,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAS7G,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAU,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAS9G,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GAAU,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAWjH,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAU,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAc9G,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAAU,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAkBhH,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { requireTabId, requireUrl, sendErrorResult, sendSuccessResult, sendValidationError } from './helpers.js';
|
|
2
|
+
/** Lists all open Chrome tabs with their IDs, URLs, titles, active state, and window IDs. */
|
|
3
|
+
export const handleBrowserListTabs = async (id) => {
|
|
4
|
+
try {
|
|
5
|
+
const tabs = await chrome.tabs.query({});
|
|
6
|
+
const result = tabs.map(tab => ({
|
|
7
|
+
id: tab.id,
|
|
8
|
+
title: tab.title ?? '',
|
|
9
|
+
url: tab.url ?? '',
|
|
10
|
+
active: tab.active,
|
|
11
|
+
windowId: tab.windowId,
|
|
12
|
+
}));
|
|
13
|
+
sendSuccessResult(id, result);
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
sendErrorResult(id, err);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Opens a new Chrome tab with the specified URL.
|
|
21
|
+
* @param params - Expects `{ url: string }`. Rejects blocked URL schemes (javascript:, data:, etc.).
|
|
22
|
+
* @returns The new tab's ID, title, URL, and window ID.
|
|
23
|
+
*/
|
|
24
|
+
export const handleBrowserOpenTab = async (params, id) => {
|
|
25
|
+
try {
|
|
26
|
+
const url = requireUrl(params, id);
|
|
27
|
+
if (url === null)
|
|
28
|
+
return;
|
|
29
|
+
const tab = await chrome.tabs.create({ url });
|
|
30
|
+
sendSuccessResult(id, { id: tab.id, title: tab.title ?? '', url: tab.url ?? url, windowId: tab.windowId });
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
sendErrorResult(id, err);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Closes a Chrome tab by its ID.
|
|
38
|
+
* @param params - Expects `{ tabId: number }`.
|
|
39
|
+
* @returns `{ ok: true }` on success.
|
|
40
|
+
*/
|
|
41
|
+
export const handleBrowserCloseTab = async (params, id) => {
|
|
42
|
+
try {
|
|
43
|
+
const tabId = requireTabId(params, id);
|
|
44
|
+
if (tabId === null)
|
|
45
|
+
return;
|
|
46
|
+
await chrome.tabs.remove(tabId);
|
|
47
|
+
sendSuccessResult(id, { ok: true });
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
sendErrorResult(id, err);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Navigates an existing tab to a new URL.
|
|
55
|
+
* @param params - Expects `{ tabId: number, url: string }`. Rejects blocked URL schemes.
|
|
56
|
+
* @returns The tab's ID, title, and navigated URL.
|
|
57
|
+
*/
|
|
58
|
+
export const handleBrowserNavigateTab = async (params, id) => {
|
|
59
|
+
try {
|
|
60
|
+
const tabId = requireTabId(params, id);
|
|
61
|
+
if (tabId === null)
|
|
62
|
+
return;
|
|
63
|
+
const url = requireUrl(params, id);
|
|
64
|
+
if (url === null)
|
|
65
|
+
return;
|
|
66
|
+
const tab = await chrome.tabs.update(tabId, { url });
|
|
67
|
+
sendSuccessResult(id, { id: tab?.id ?? tabId, title: tab?.title ?? '', url: tab?.url ?? url });
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
sendErrorResult(id, err);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Activates a tab and brings its window to the foreground.
|
|
75
|
+
* @param params - Expects `{ tabId: number }`.
|
|
76
|
+
* @returns The focused tab's ID, title, URL, and active state.
|
|
77
|
+
*/
|
|
78
|
+
export const handleBrowserFocusTab = async (params, id) => {
|
|
79
|
+
try {
|
|
80
|
+
const tabId = requireTabId(params, id);
|
|
81
|
+
if (tabId === null)
|
|
82
|
+
return;
|
|
83
|
+
const tab = await chrome.tabs.update(tabId, { active: true });
|
|
84
|
+
if (!tab) {
|
|
85
|
+
sendValidationError(id, `Tab ${tabId} not found`);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
await chrome.windows.update(tab.windowId, { focused: true });
|
|
89
|
+
sendSuccessResult(id, { id: tab.id, title: tab.title ?? '', url: tab.url ?? '', active: true });
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
sendErrorResult(id, err);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Retrieves detailed metadata for a single tab including status, favicon URL, and incognito state.
|
|
97
|
+
* @param params - Expects `{ tabId: number }`.
|
|
98
|
+
* @returns Tab metadata: ID, title, URL, status, active, windowId, favIconUrl, and incognito.
|
|
99
|
+
*/
|
|
100
|
+
export const handleBrowserGetTabInfo = async (params, id) => {
|
|
101
|
+
try {
|
|
102
|
+
const tabId = requireTabId(params, id);
|
|
103
|
+
if (tabId === null)
|
|
104
|
+
return;
|
|
105
|
+
const tab = await chrome.tabs.get(tabId);
|
|
106
|
+
sendSuccessResult(id, {
|
|
107
|
+
id: tab.id,
|
|
108
|
+
title: tab.title ?? '',
|
|
109
|
+
url: tab.url ?? '',
|
|
110
|
+
status: tab.status ?? '',
|
|
111
|
+
active: tab.active,
|
|
112
|
+
windowId: tab.windowId,
|
|
113
|
+
favIconUrl: tab.favIconUrl ?? '',
|
|
114
|
+
incognito: tab.incognito,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
catch (err) {
|
|
118
|
+
sendErrorResult(id, err);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=tab-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-commands.js","sourceRoot":"","sources":["../../src/browser-commands/tab-commands.ts"],"names":[],"mappings":"AAAA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,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACvC,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO;QAC3B,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACzC,iBAAiB,CAAC,EAAE,EAAE;YACpB,EAAE,EAAE,GAAG,CAAC,EAAE;YACV,KAAK,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE;YACtB,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE;YAClB,MAAM,EAAE,GAAG,CAAC,MAAM,IAAI,EAAE;YACxB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,EAAE;YAChC,SAAS,EAAE,GAAG,CAAC,SAAS;SACzB,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,eAAe,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const handleBrowserListTabs: (id: string | number) => Promise<void>;
|
|
2
|
+
export declare const handleBrowserOpenTab: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
3
|
+
export declare const handleBrowserCloseTab: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
4
|
+
export declare const handleBrowserNavigateTab: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
5
|
+
export declare const handleBrowserFocusTab: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
6
|
+
export declare const handleBrowserGetTabInfo: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
7
|
+
export declare const handleBrowserScreenshotTab: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
8
|
+
export declare const handleBrowserGetTabContent: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
9
|
+
export declare const handleBrowserGetPageHtml: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
10
|
+
export declare const handleBrowserGetStorage: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
11
|
+
export declare const handleBrowserClickElement: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
12
|
+
export declare const handleBrowserTypeText: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
13
|
+
export declare const handleBrowserSelectOption: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
14
|
+
export declare const handleBrowserWaitForElement: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
15
|
+
export declare const handleBrowserQueryElements: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
16
|
+
export declare const handleBrowserGetCookies: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
17
|
+
export declare const handleBrowserSetCookie: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
18
|
+
export declare const handleBrowserDeleteCookies: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
19
|
+
export declare const handleBrowserExecuteScript: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
20
|
+
export declare const handleBrowserEnableNetworkCapture: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
21
|
+
export declare const handleBrowserGetNetworkRequests: (params: Record<string, unknown>, id: string | number) => void;
|
|
22
|
+
export declare const handleBrowserDisableNetworkCapture: (params: Record<string, unknown>, id: string | number) => void;
|
|
23
|
+
export declare const handleBrowserGetConsoleLogs: (params: Record<string, unknown>, id: string | number) => void;
|
|
24
|
+
export declare const handleBrowserClearConsoleLogs: (params: Record<string, unknown>, id: string | number) => void;
|
|
25
|
+
export declare const handleBrowserPressKey: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
26
|
+
export declare const handleBrowserScroll: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
27
|
+
export declare const handleBrowserHoverElement: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
28
|
+
export declare const handleBrowserHandleDialog: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
29
|
+
export declare const handleBrowserListResources: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
30
|
+
export declare const handleBrowserGetResourceContent: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
31
|
+
export declare const handleExtensionGetState: (id: string | number) => Promise<void>;
|
|
32
|
+
export declare const handleExtensionGetLogs: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
33
|
+
export declare const handleExtensionGetSidePanel: (id: string | number) => Promise<void>;
|
|
34
|
+
export declare const handleExtensionCheckAdapter: (params: Record<string, unknown>, id: string | number) => Promise<void>;
|
|
35
|
+
export declare const handleExtensionForceReconnect: (id: string | number) => Promise<void>;
|
|
36
|
+
//# sourceMappingURL=browser-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-commands.d.ts","sourceRoot":"","sources":["../src/browser-commands.ts"],"names":[],"mappings":"AA2GA,eAAO,MAAM,qBAAqB,GAAU,IAAI,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAkB7E,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAU,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CA+B7G,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAU,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAgB9G,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAU,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,IAAI,CAoCjH,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAU,QAAQ,MAAM,CAAC,MAAM,EAAE,O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