browxai 0.7.0
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 +21 -0
- package/README.md +139 -0
- package/THIRD_PARTY_NOTICES.md +45 -0
- package/dist/cli/chrome.d.ts +1 -0
- package/dist/cli/chrome.js +130 -0
- package/dist/cli/command-registry.d.ts +15 -0
- package/dist/cli/command-registry.js +35 -0
- package/dist/cli/doctor-plugins.d.ts +18 -0
- package/dist/cli/doctor-plugins.js +338 -0
- package/dist/cli/doctor.d.ts +9 -0
- package/dist/cli/doctor.js +407 -0
- package/dist/cli/init.d.ts +1 -0
- package/dist/cli/init.js +200 -0
- package/dist/cli/register-commands.d.ts +1 -0
- package/dist/cli/register-commands.js +22 -0
- package/dist/cli/serve.d.ts +14 -0
- package/dist/cli/serve.js +151 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +129 -0
- package/dist/engine/adapters/adb.d.ts +72 -0
- package/dist/engine/adapters/adb.js +200 -0
- package/dist/engine/adapters/android-cdp.d.ts +54 -0
- package/dist/engine/adapters/android-cdp.js +110 -0
- package/dist/engine/adapters/android.engine.d.ts +1 -0
- package/dist/engine/adapters/android.engine.js +31 -0
- package/dist/engine/adapters/chromium.engine.d.ts +1 -0
- package/dist/engine/adapters/chromium.engine.js +44 -0
- package/dist/engine/adapters/firefox.engine.d.ts +1 -0
- package/dist/engine/adapters/firefox.engine.js +43 -0
- package/dist/engine/adapters/playwright-chromium.d.ts +43 -0
- package/dist/engine/adapters/playwright-chromium.js +56 -0
- package/dist/engine/adapters/playwright-firefox.d.ts +52 -0
- package/dist/engine/adapters/playwright-firefox.js +97 -0
- package/dist/engine/adapters/playwright-webkit.d.ts +40 -0
- package/dist/engine/adapters/playwright-webkit.js +79 -0
- package/dist/engine/adapters/safari/bidi-client.d.ts +46 -0
- package/dist/engine/adapters/safari/bidi-client.js +130 -0
- package/dist/engine/adapters/safari/launch.d.ts +56 -0
- package/dist/engine/adapters/safari/launch.js +104 -0
- package/dist/engine/adapters/safari/webdriver-client.d.ts +102 -0
- package/dist/engine/adapters/safari/webdriver-client.js +175 -0
- package/dist/engine/adapters/safari.engine.d.ts +1 -0
- package/dist/engine/adapters/safari.engine.js +52 -0
- package/dist/engine/adapters/safaridriver-hybrid.d.ts +56 -0
- package/dist/engine/adapters/safaridriver-hybrid.js +127 -0
- package/dist/engine/adapters/webkit.engine.d.ts +1 -0
- package/dist/engine/adapters/webkit.engine.js +47 -0
- package/dist/engine/capabilities.d.ts +53 -0
- package/dist/engine/capabilities.js +122 -0
- package/dist/engine/capability-registry.d.ts +9 -0
- package/dist/engine/capability-registry.js +20 -0
- package/dist/engine/index.d.ts +18 -0
- package/dist/engine/index.js +14 -0
- package/dist/engine/register-engines.d.ts +5 -0
- package/dist/engine/register-engines.js +16 -0
- package/dist/engine/registry.d.ts +145 -0
- package/dist/engine/registry.js +67 -0
- package/dist/engine/select.d.ts +48 -0
- package/dist/engine/select.js +128 -0
- package/dist/engine/session-cdp.d.ts +13 -0
- package/dist/engine/session-cdp.js +22 -0
- package/dist/engine/tool-gate.d.ts +19 -0
- package/dist/engine/tool-gate.js +226 -0
- package/dist/engine/types.d.ts +71 -0
- package/dist/engine/types.js +16 -0
- package/dist/helper/bridge.d.ts +48 -0
- package/dist/helper/bridge.js +200 -0
- package/dist/helper/browx-page.d.ts +1 -0
- package/dist/helper/browx-page.js +47 -0
- package/dist/helper/overlay-hide.d.ts +9 -0
- package/dist/helper/overlay-hide.js +49 -0
- package/dist/helper/stealth.d.ts +10 -0
- package/dist/helper/stealth.js +88 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +15 -0
- package/dist/page/a11y.d.ts +81 -0
- package/dist/page/a11y.js +219 -0
- package/dist/page/action-substrate.d.ts +64 -0
- package/dist/page/action-substrate.js +118 -0
- package/dist/page/actionresult-blocks.d.ts +99 -0
- package/dist/page/actionresult-blocks.js +144 -0
- package/dist/page/actionresult-shape.d.ts +48 -0
- package/dist/page/actionresult-shape.js +155 -0
- package/dist/page/actionresult-types.d.ts +368 -0
- package/dist/page/actionresult-types.js +4 -0
- package/dist/page/actionresult.d.ts +4 -0
- package/dist/page/actionresult.js +299 -0
- package/dist/page/actions-probe.d.ts +32 -0
- package/dist/page/actions-probe.js +294 -0
- package/dist/page/actions-scroll.d.ts +40 -0
- package/dist/page/actions-scroll.js +53 -0
- package/dist/page/actions.d.ts +132 -0
- package/dist/page/actions.js +453 -0
- package/dist/page/archive-assets.d.ts +39 -0
- package/dist/page/archive-assets.js +187 -0
- package/dist/page/archive.d.ts +47 -0
- package/dist/page/archive.js +349 -0
- package/dist/page/asset-export.d.ts +122 -0
- package/dist/page/asset-export.js +376 -0
- package/dist/page/await_network.d.ts +16 -0
- package/dist/page/await_network.js +23 -0
- package/dist/page/bbox.d.ts +37 -0
- package/dist/page/bbox.js +115 -0
- package/dist/page/canvas-capture.d.ts +82 -0
- package/dist/page/canvas-capture.js +257 -0
- package/dist/page/canvas-diff.d.ts +51 -0
- package/dist/page/canvas-diff.js +131 -0
- package/dist/page/canvas-gesture.d.ts +53 -0
- package/dist/page/canvas-gesture.js +167 -0
- package/dist/page/canvas-transform.d.ts +96 -0
- package/dist/page/canvas-transform.js +150 -0
- package/dist/page/canvas.d.ts +8 -0
- package/dist/page/canvas.js +50 -0
- package/dist/page/capture-substrate.d.ts +111 -0
- package/dist/page/capture-substrate.js +139 -0
- package/dist/page/clipboard.d.ts +25 -0
- package/dist/page/clipboard.js +50 -0
- package/dist/page/clock.d.ts +36 -0
- package/dist/page/clock.js +167 -0
- package/dist/page/compose.d.ts +55 -0
- package/dist/page/compose.js +169 -0
- package/dist/page/console.d.ts +39 -0
- package/dist/page/console.js +73 -0
- package/dist/page/coverage.d.ts +97 -0
- package/dist/page/coverage.js +280 -0
- package/dist/page/dom-export.d.ts +41 -0
- package/dist/page/dom-export.js +193 -0
- package/dist/page/dom-walk.d.ts +91 -0
- package/dist/page/dom-walk.js +267 -0
- package/dist/page/dom_diff.d.ts +48 -0
- package/dist/page/dom_diff.js +121 -0
- package/dist/page/downloads.d.ts +80 -0
- package/dist/page/downloads.js +244 -0
- package/dist/page/drop-files.d.ts +78 -0
- package/dist/page/drop-files.js +310 -0
- package/dist/page/element-export-discovery.d.ts +64 -0
- package/dist/page/element-export-discovery.js +346 -0
- package/dist/page/element-export.d.ts +46 -0
- package/dist/page/element-export.js +251 -0
- package/dist/page/emulation-substrate.d.ts +53 -0
- package/dist/page/emulation-substrate.js +87 -0
- package/dist/page/emulation.d.ts +60 -0
- package/dist/page/emulation.js +162 -0
- package/dist/page/export-playwright-script.d.ts +47 -0
- package/dist/page/export-playwright-script.js +304 -0
- package/dist/page/extract-resolve.d.ts +22 -0
- package/dist/page/extract-resolve.js +341 -0
- package/dist/page/extract-schema.d.ts +20 -0
- package/dist/page/extract-schema.js +200 -0
- package/dist/page/extract-types.d.ts +127 -0
- package/dist/page/extract-types.js +8 -0
- package/dist/page/extract-warnings.d.ts +8 -0
- package/dist/page/extract-warnings.js +56 -0
- package/dist/page/extract.d.ts +9 -0
- package/dist/page/extract.js +174 -0
- package/dist/page/fill-form.d.ts +58 -0
- package/dist/page/fill-form.js +261 -0
- package/dist/page/find.d.ts +158 -0
- package/dist/page/find.js +470 -0
- package/dist/page/frames.d.ts +45 -0
- package/dist/page/frames.js +133 -0
- package/dist/page/generate-locator.d.ts +57 -0
- package/dist/page/generate-locator.js +136 -0
- package/dist/page/gestures.d.ts +128 -0
- package/dist/page/gestures.js +198 -0
- package/dist/page/har.d.ts +91 -0
- package/dist/page/har.js +174 -0
- package/dist/page/heap.d.ts +97 -0
- package/dist/page/heap.js +285 -0
- package/dist/page/inspect.d.ts +34 -0
- package/dist/page/inspect.js +75 -0
- package/dist/page/layout-thrash.d.ts +34 -0
- package/dist/page/layout-thrash.js +232 -0
- package/dist/page/learning.d.ts +21 -0
- package/dist/page/learning.js +84 -0
- package/dist/page/locator.d.ts +54 -0
- package/dist/page/locator.js +142 -0
- package/dist/page/memory-diff.d.ts +48 -0
- package/dist/page/memory-diff.js +105 -0
- package/dist/page/network-mask.d.ts +8 -0
- package/dist/page/network-mask.js +18 -0
- package/dist/page/network-playwright.d.ts +96 -0
- package/dist/page/network-playwright.js +353 -0
- package/dist/page/network-substrate-select.d.ts +18 -0
- package/dist/page/network-substrate-select.js +32 -0
- package/dist/page/network-substrate.d.ts +109 -0
- package/dist/page/network-substrate.js +161 -0
- package/dist/page/network-ws.d.ts +46 -0
- package/dist/page/network-ws.js +113 -0
- package/dist/page/network.d.ts +194 -0
- package/dist/page/network.js +415 -0
- package/dist/page/overflow-detect.d.ts +102 -0
- package/dist/page/overflow-detect.js +449 -0
- package/dist/page/pdf.d.ts +69 -0
- package/dist/page/pdf.js +109 -0
- package/dist/page/perf-audit-analysers.d.ts +40 -0
- package/dist/page/perf-audit-analysers.js +369 -0
- package/dist/page/perf-audit-runner.d.ts +20 -0
- package/dist/page/perf-audit-runner.js +195 -0
- package/dist/page/perf-audit-types.d.ts +41 -0
- package/dist/page/perf-audit-types.js +5 -0
- package/dist/page/perf-audit.d.ts +37 -0
- package/dist/page/perf-audit.js +377 -0
- package/dist/page/perf.d.ts +127 -0
- package/dist/page/perf.js +373 -0
- package/dist/page/plan.d.ts +192 -0
- package/dist/page/plan.js +308 -0
- package/dist/page/point_probe.d.ts +46 -0
- package/dist/page/point_probe.js +99 -0
- package/dist/page/recording.d.ts +67 -0
- package/dist/page/recording.js +172 -0
- package/dist/page/refs.d.ts +92 -0
- package/dist/page/refs.js +134 -0
- package/dist/page/regions.d.ts +23 -0
- package/dist/page/regions.js +32 -0
- package/dist/page/routes.d.ts +40 -0
- package/dist/page/routes.js +87 -0
- package/dist/page/safari-actions.d.ts +12 -0
- package/dist/page/safari-actions.js +144 -0
- package/dist/page/sample.d.ts +64 -0
- package/dist/page/sample.js +216 -0
- package/dist/page/screenshot-on.d.ts +51 -0
- package/dist/page/screenshot-on.js +150 -0
- package/dist/page/screenshot-save.d.ts +36 -0
- package/dist/page/screenshot-save.js +53 -0
- package/dist/page/screenshot-schedule.d.ts +50 -0
- package/dist/page/screenshot-schedule.js +155 -0
- package/dist/page/script-substrate.d.ts +32 -0
- package/dist/page/script-substrate.js +47 -0
- package/dist/page/seed-random.d.ts +45 -0
- package/dist/page/seed-random.js +144 -0
- package/dist/page/set-of-marks.d.ts +96 -0
- package/dist/page/set-of-marks.js +245 -0
- package/dist/page/shadow.d.ts +136 -0
- package/dist/page/shadow.js +400 -0
- package/dist/page/shortcut.d.ts +50 -0
- package/dist/page/shortcut.js +147 -0
- package/dist/page/snapshot-substrate-safari.d.ts +30 -0
- package/dist/page/snapshot-substrate-safari.js +84 -0
- package/dist/page/snapshot-substrate-select.d.ts +24 -0
- package/dist/page/snapshot-substrate-select.js +34 -0
- package/dist/page/snapshot-substrate.d.ts +58 -0
- package/dist/page/snapshot-substrate.js +135 -0
- package/dist/page/snapshot.d.ts +24 -0
- package/dist/page/snapshot.js +162 -0
- package/dist/page/solve-captcha.d.ts +76 -0
- package/dist/page/solve-captcha.js +286 -0
- package/dist/page/storage-substrate-types.d.ts +221 -0
- package/dist/page/storage-substrate-types.js +6 -0
- package/dist/page/storage-substrate.d.ts +215 -0
- package/dist/page/storage-substrate.js +280 -0
- package/dist/page/structural.d.ts +9 -0
- package/dist/page/structural.js +152 -0
- package/dist/page/substrate-bundle-safari.d.ts +8 -0
- package/dist/page/substrate-bundle-safari.js +42 -0
- package/dist/page/substrate-bundle.d.ts +6 -0
- package/dist/page/substrate-bundle.js +53 -0
- package/dist/page/text_search.d.ts +44 -0
- package/dist/page/text_search.js +90 -0
- package/dist/page/upload.d.ts +28 -0
- package/dist/page/upload.js +62 -0
- package/dist/page/verify.d.ts +63 -0
- package/dist/page/verify.js +451 -0
- package/dist/page/video.d.ts +115 -0
- package/dist/page/video.js +169 -0
- package/dist/page/visibility.d.ts +22 -0
- package/dist/page/visibility.js +94 -0
- package/dist/page/watch.d.ts +29 -0
- package/dist/page/watch.js +99 -0
- package/dist/page/workers.d.ts +126 -0
- package/dist/page/workers.js +490 -0
- package/dist/page/ws-interactive.d.ts +82 -0
- package/dist/page/ws-interactive.js +318 -0
- package/dist/plugin/cli.d.ts +45 -0
- package/dist/plugin/cli.js +496 -0
- package/dist/plugin/command-registry.d.ts +9 -0
- package/dist/plugin/command-registry.js +23 -0
- package/dist/plugin/depgraph.d.ts +37 -0
- package/dist/plugin/depgraph.js +186 -0
- package/dist/plugin/manifest.d.ts +182 -0
- package/dist/plugin/manifest.js +219 -0
- package/dist/plugin/package-manager.d.ts +22 -0
- package/dist/plugin/package-manager.js +40 -0
- package/dist/plugin/resolver.d.ts +85 -0
- package/dist/plugin/resolver.js +166 -0
- package/dist/plugin/runtime.d.ts +77 -0
- package/dist/plugin/runtime.js +402 -0
- package/dist/plugin/types.d.ts +113 -0
- package/dist/plugin/types.js +4 -0
- package/dist/policy/confirm.d.ts +76 -0
- package/dist/policy/confirm.js +162 -0
- package/dist/policy/origin.d.ts +17 -0
- package/dist/policy/origin.js +79 -0
- package/dist/sdk/client.d.ts +21 -0
- package/dist/sdk/client.js +174 -0
- package/dist/sdk/index.d.ts +32 -0
- package/dist/sdk/index.js +61 -0
- package/dist/sdk/plugin-types.d.ts +33 -0
- package/dist/sdk/plugin-types.js +22 -0
- package/dist/sdk/registry.d.ts +17 -0
- package/dist/sdk/registry.js +94 -0
- package/dist/sdk/socket-transport.d.ts +20 -0
- package/dist/sdk/socket-transport.js +90 -0
- package/dist/sdk/tool-types.d.ts +634 -0
- package/dist/sdk/tool-types.js +28 -0
- package/dist/sdk/transport-in-process.d.ts +21 -0
- package/dist/sdk/transport-in-process.js +44 -0
- package/dist/sdk/transport-registry.d.ts +19 -0
- package/dist/sdk/transport-registry.js +31 -0
- package/dist/sdk/transport-socket.d.ts +12 -0
- package/dist/sdk/transport-socket.js +77 -0
- package/dist/sdk/transport-stdio-child.d.ts +10 -0
- package/dist/sdk/transport-stdio-child.js +47 -0
- package/dist/sdk/transport.d.ts +10 -0
- package/dist/sdk/transport.js +35 -0
- package/dist/sdk/types.d.ts +176 -0
- package/dist/sdk/types.js +10 -0
- package/dist/server.d.ts +33 -0
- package/dist/server.js +327 -0
- package/dist/session/artifacts.d.ts +52 -0
- package/dist/session/artifacts.js +177 -0
- package/dist/session/byob-attach.d.ts +26 -0
- package/dist/session/byob-attach.js +187 -0
- package/dist/session/byob.d.ts +8 -0
- package/dist/session/byob.js +20 -0
- package/dist/session/cache-storage.d.ts +100 -0
- package/dist/session/cache-storage.js +166 -0
- package/dist/session/device-emu.d.ts +149 -0
- package/dist/session/device-emu.js +545 -0
- package/dist/session/device.d.ts +14 -0
- package/dist/session/device.js +44 -0
- package/dist/session/dialog.d.ts +62 -0
- package/dist/session/dialog.js +164 -0
- package/dist/session/emulation.d.ts +69 -0
- package/dist/session/emulation.js +168 -0
- package/dist/session/extensions.d.ts +113 -0
- package/dist/session/extensions.js +237 -0
- package/dist/session/fs-picker.d.ts +144 -0
- package/dist/session/fs-picker.js +666 -0
- package/dist/session/idb-storage.d.ts +86 -0
- package/dist/session/idb-storage.js +229 -0
- package/dist/session/incognito.d.ts +3 -0
- package/dist/session/incognito.js +20 -0
- package/dist/session/launch-options.d.ts +41 -0
- package/dist/session/launch-options.js +200 -0
- package/dist/session/managed.d.ts +3 -0
- package/dist/session/managed.js +16 -0
- package/dist/session/metrics.d.ts +45 -0
- package/dist/session/metrics.js +75 -0
- package/dist/session/notification.d.ts +122 -0
- package/dist/session/notification.js +426 -0
- package/dist/session/permission.d.ts +144 -0
- package/dist/session/permission.js +600 -0
- package/dist/session/playwright-post-wire.d.ts +8 -0
- package/dist/session/playwright-post-wire.js +148 -0
- package/dist/session/policy-buffer.d.ts +21 -0
- package/dist/session/policy-buffer.js +47 -0
- package/dist/session/profile-snapshot.d.ts +11 -0
- package/dist/session/profile-snapshot.js +53 -0
- package/dist/session/registry.d.ts +365 -0
- package/dist/session/registry.js +98 -0
- package/dist/session/safari-post-wire.d.ts +8 -0
- package/dist/session/safari-post-wire.js +28 -0
- package/dist/session/safari-session.d.ts +10 -0
- package/dist/session/safari-session.js +39 -0
- package/dist/session/storage.d.ts +148 -0
- package/dist/session/storage.js +350 -0
- package/dist/session/types.d.ts +113 -0
- package/dist/session/types.js +5 -0
- package/dist/session/wedge.d.ts +15 -0
- package/dist/session/wedge.js +41 -0
- package/dist/tools/action-core-tools.d.ts +13 -0
- package/dist/tools/action-core-tools.js +156 -0
- package/dist/tools/action-form-tools.d.ts +12 -0
- package/dist/tools/action-form-tools.js +179 -0
- package/dist/tools/action-gesture-tools.d.ts +9 -0
- package/dist/tools/action-gesture-tools.js +115 -0
- package/dist/tools/action-history-tools.d.ts +8 -0
- package/dist/tools/action-history-tools.js +67 -0
- package/dist/tools/action-tool.d.ts +42 -0
- package/dist/tools/action-tool.js +58 -0
- package/dist/tools/action-tools.d.ts +20 -0
- package/dist/tools/action-tools.js +28 -0
- package/dist/tools/batch-act-tools.d.ts +10 -0
- package/dist/tools/batch-act-tools.js +276 -0
- package/dist/tools/batch-human-tools.d.ts +8 -0
- package/dist/tools/batch-human-tools.js +148 -0
- package/dist/tools/canvas-tools.d.ts +40 -0
- package/dist/tools/canvas-tools.js +368 -0
- package/dist/tools/capture-report-diagnostics-tools.d.ts +7 -0
- package/dist/tools/capture-report-diagnostics-tools.js +318 -0
- package/dist/tools/capture-report-element-export-tools.d.ts +8 -0
- package/dist/tools/capture-report-element-export-tools.js +197 -0
- package/dist/tools/capture-report-export-tools.d.ts +8 -0
- package/dist/tools/capture-report-export-tools.js +246 -0
- package/dist/tools/capture-report-marks-tools.d.ts +9 -0
- package/dist/tools/capture-report-marks-tools.js +221 -0
- package/dist/tools/capture-report-upload-tools.d.ts +8 -0
- package/dist/tools/capture-report-upload-tools.js +277 -0
- package/dist/tools/config-approval-tools.d.ts +8 -0
- package/dist/tools/config-approval-tools.js +166 -0
- package/dist/tools/deep-coverage-tools.d.ts +8 -0
- package/dist/tools/deep-coverage-tools.js +325 -0
- package/dist/tools/deep-determinism-tools.d.ts +8 -0
- package/dist/tools/deep-determinism-tools.js +276 -0
- package/dist/tools/deep-perf-tools.d.ts +19 -0
- package/dist/tools/deep-perf-tools.js +324 -0
- package/dist/tools/device-emulation-tools.d.ts +9 -0
- package/dist/tools/device-emulation-tools.js +137 -0
- package/dist/tools/extensions-batch-tools.d.ts +18 -0
- package/dist/tools/extensions-batch-tools.js +24 -0
- package/dist/tools/extensions-rebuild.d.ts +22 -0
- package/dist/tools/extensions-rebuild.js +208 -0
- package/dist/tools/extensions-tools.d.ts +2 -0
- package/dist/tools/extensions-tools.js +331 -0
- package/dist/tools/forms-fill-tools.d.ts +8 -0
- package/dist/tools/forms-fill-tools.js +109 -0
- package/dist/tools/forms-plan-tools.d.ts +7 -0
- package/dist/tools/forms-plan-tools.js +159 -0
- package/dist/tools/forms-recording-mode-tools.d.ts +8 -0
- package/dist/tools/forms-recording-mode-tools.js +71 -0
- package/dist/tools/forms-recording-tools.d.ts +14 -0
- package/dist/tools/forms-recording-tools.js +22 -0
- package/dist/tools/forms-refs-tools.d.ts +8 -0
- package/dist/tools/forms-refs-tools.js +90 -0
- package/dist/tools/gesture-coord-tools.d.ts +8 -0
- package/dist/tools/gesture-coord-tools.js +168 -0
- package/dist/tools/gesture-emulation-tools.d.ts +8 -0
- package/dist/tools/gesture-emulation-tools.js +135 -0
- package/dist/tools/gesture-network-tools.d.ts +17 -0
- package/dist/tools/gesture-network-tools.js +27 -0
- package/dist/tools/gesture-route-tools.d.ts +8 -0
- package/dist/tools/gesture-route-tools.js +142 -0
- package/dist/tools/gesture-websocket-tools.d.ts +8 -0
- package/dist/tools/gesture-websocket-tools.js +122 -0
- package/dist/tools/gesture-worker-tools.d.ts +9 -0
- package/dist/tools/gesture-worker-tools.js +200 -0
- package/dist/tools/host-build.d.ts +76 -0
- package/dist/tools/host-build.js +516 -0
- package/dist/tools/host.d.ts +287 -0
- package/dist/tools/host.js +1 -0
- package/dist/tools/input-tools.d.ts +10 -0
- package/dist/tools/input-tools.js +176 -0
- package/dist/tools/live-emulation-tools.d.ts +9 -0
- package/dist/tools/live-emulation-tools.js +353 -0
- package/dist/tools/plugin-runtime.d.ts +36 -0
- package/dist/tools/plugin-runtime.js +274 -0
- package/dist/tools/read-observe-buffer-tools.d.ts +9 -0
- package/dist/tools/read-observe-buffer-tools.js +385 -0
- package/dist/tools/read-observe-capture-tools.d.ts +12 -0
- package/dist/tools/read-observe-capture-tools.js +376 -0
- package/dist/tools/read-observe-dom-tools.d.ts +8 -0
- package/dist/tools/read-observe-dom-tools.js +308 -0
- package/dist/tools/read-observe-extract-tools.d.ts +8 -0
- package/dist/tools/read-observe-extract-tools.js +232 -0
- package/dist/tools/read-observe-verify-tools.d.ts +8 -0
- package/dist/tools/read-observe-verify-tools.js +316 -0
- package/dist/tools/schemas.d.ts +29 -0
- package/dist/tools/schemas.js +58 -0
- package/dist/tools/secrets-captcha-tools.d.ts +9 -0
- package/dist/tools/secrets-captcha-tools.js +231 -0
- package/dist/tools/session-dialog-permission-tools.d.ts +9 -0
- package/dist/tools/session-dialog-permission-tools.js +287 -0
- package/dist/tools/session-lifecycle-tools.d.ts +8 -0
- package/dist/tools/session-lifecycle-tools.js +314 -0
- package/dist/tools/session-notification-device-tools.d.ts +9 -0
- package/dist/tools/session-notification-device-tools.js +156 -0
- package/dist/tools/session-policy-tools.d.ts +16 -0
- package/dist/tools/session-policy-tools.js +22 -0
- package/dist/tools/session-registry.d.ts +28 -0
- package/dist/tools/session-registry.js +427 -0
- package/dist/tools/storage-artifact-har-video-tools.d.ts +8 -0
- package/dist/tools/storage-artifact-har-video-tools.js +311 -0
- package/dist/tools/storage-cache-idb-tools.d.ts +8 -0
- package/dist/tools/storage-cache-idb-tools.js +347 -0
- package/dist/tools/storage-state-cookies-tools.d.ts +8 -0
- package/dist/tools/storage-state-cookies-tools.js +223 -0
- package/dist/tools/storage-tools.d.ts +17 -0
- package/dist/tools/storage-tools.js +25 -0
- package/dist/tools/storage-web-auth-tools.d.ts +10 -0
- package/dist/tools/storage-web-auth-tools.js +230 -0
- package/dist/tools/tool-metadata.d.ts +8 -0
- package/dist/tools/tool-metadata.js +185 -0
- package/dist/util/batch.d.ts +83 -0
- package/dist/util/batch.js +191 -0
- package/dist/util/capabilities.d.ts +504 -0
- package/dist/util/capabilities.js +254 -0
- package/dist/util/config-store.d.ts +103 -0
- package/dist/util/config-store.js +206 -0
- package/dist/util/config.d.ts +11 -0
- package/dist/util/config.js +28 -0
- package/dist/util/credentials.d.ts +136 -0
- package/dist/util/credentials.js +622 -0
- package/dist/util/deadline.d.ts +22 -0
- package/dist/util/deadline.js +62 -0
- package/dist/util/diagnostics.d.ts +161 -0
- package/dist/util/diagnostics.js +579 -0
- package/dist/util/egress-sanitiser.d.ts +29 -0
- package/dist/util/egress-sanitiser.js +52 -0
- package/dist/util/failure.d.ts +8 -0
- package/dist/util/failure.js +50 -0
- package/dist/util/flake-check.d.ts +109 -0
- package/dist/util/flake-check.js +342 -0
- package/dist/util/invariant.d.ts +25 -0
- package/dist/util/invariant.js +66 -0
- package/dist/util/logging.d.ts +6 -0
- package/dist/util/logging.js +12 -0
- package/dist/util/predicates.d.ts +62 -0
- package/dist/util/predicates.js +340 -0
- package/dist/util/secrets.d.ts +104 -0
- package/dist/util/secrets.js +219 -0
- package/dist/util/tokens.d.ts +6 -0
- package/dist/util/tokens.js +24 -0
- package/dist/util/url-sanitizer.d.ts +19 -0
- package/dist/util/url-sanitizer.js +70 -0
- package/dist/util/version.d.ts +2 -0
- package/dist/util/version.js +21 -0
- package/dist/util/workspace.d.ts +7 -0
- package/dist/util/workspace.js +22 -0
- package/package.json +120 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { estimateTokens } from "../util/tokens.js";
|
|
2
|
+
import { requireCdp } from "../engine/session-cdp.js";
|
|
3
|
+
import { SESSION_ARG } from "./schemas.js";
|
|
4
|
+
/**
|
|
5
|
+
* Worker-visibility tools: workers_list / worker_message_send /
|
|
6
|
+
* worker_messages_read / sw_intercept_fetch / sw_unintercept_fetch — make Web +
|
|
7
|
+
* Service Workers (otherwise off-grid) observable and drivable. Split out of
|
|
8
|
+
* `gesture-network-tools` by cohesive family (RFC 0004 P3 / D3 SRP); registered
|
|
9
|
+
* through the shared `ToolHost` seam in the same source order.
|
|
10
|
+
*/
|
|
11
|
+
export function registerGestureWorkerTools(host) {
|
|
12
|
+
const { z, register, gateCheck, engineGate, entryFor } = host;
|
|
13
|
+
// ---- Workers visibility -----------------------------------------
|
|
14
|
+
// Web Workers + Service Workers are invisible to the rest of the surface —
|
|
15
|
+
// `network_read` shows page fetches; an SW that responds from its cache is
|
|
16
|
+
// a silent participant. The Worker IPC channel (postMessage) is similarly
|
|
17
|
+
// off-grid. This family makes both visible:
|
|
18
|
+
// • `workers_list` — enumerate live workers (Web + SW)
|
|
19
|
+
// • `worker_message_send` — postMessage to a worker (action)
|
|
20
|
+
// • `worker_messages_read` — drain FROM-worker messages (read)
|
|
21
|
+
// • `sw_intercept_fetch` — fulfil SW-handled requests (action)
|
|
22
|
+
// Web Worker discovery uses a page-side `Worker` constructor wrapper (same
|
|
23
|
+
// shape as the WS family); SW discovery uses CDP `Target.setAutoAttach` +
|
|
24
|
+
// `ServiceWorker.enable` on the session's top-level CDP. See
|
|
25
|
+
// src/page/workers.ts for the full design.
|
|
26
|
+
register("workers_list", {
|
|
27
|
+
capability: "read",
|
|
28
|
+
description: 'Enumerate live workers in this session. Returns `[{workerId, type, url, state?}]` where `workerId` is a stable per-session id (`ww-N` for Web Workers, `sw-N` for Service Workers) the agent passes back to `worker_message_send` / `worker_messages_read`. `type` filters the list (`"web"`, `"service"`, or `"all"` — the default). Web Worker discovery requires the page-side wrapper to have been installed BEFORE the worker was constructed (eagerly done at session creation when `read` is on). Service Worker `state` is one of `stopped`/`starting`/`running`/`stopping`. Capability: `read`.',
|
|
29
|
+
inputSchema: {
|
|
30
|
+
type: z
|
|
31
|
+
.enum(["web", "service", "all"])
|
|
32
|
+
.optional()
|
|
33
|
+
.describe('Filter by worker type. Default `"all"`.'),
|
|
34
|
+
...SESSION_ARG,
|
|
35
|
+
},
|
|
36
|
+
}, async ({ type, session }) => {
|
|
37
|
+
const g = gateCheck("workers_list");
|
|
38
|
+
if (g)
|
|
39
|
+
return g;
|
|
40
|
+
const e = await entryFor(session);
|
|
41
|
+
try {
|
|
42
|
+
const list = await e.workers.list(e.session.page(), requireCdp(e.session), type ?? "all");
|
|
43
|
+
const body = { ok: true, workers: list, tokensEstimate: 0 };
|
|
44
|
+
body.tokensEstimate = estimateTokens(JSON.stringify(body));
|
|
45
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
const body = {
|
|
49
|
+
ok: false,
|
|
50
|
+
error: err instanceof Error ? err.message : String(err),
|
|
51
|
+
tokensEstimate: 0,
|
|
52
|
+
};
|
|
53
|
+
body.tokensEstimate = estimateTokens(JSON.stringify(body));
|
|
54
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
register("worker_message_send", {
|
|
58
|
+
capability: "action",
|
|
59
|
+
description: "`postMessage` to a worker. `workerId` is the id from `workers_list` (`ww-N` for Web Workers, `sw-N` for Service Workers). For Web Workers, calls the real (unwrapped) `Worker.prototype.postMessage` so the worker's `onmessage` sees a real event — not a synthetic one. For Service Workers, dispatches a `MessageEvent` into the SW global via CDP `Runtime.evaluate` on the SW's attached session. Binary `MessagePort` transfer is not supported — `message` is a string. Capability: `action`.",
|
|
60
|
+
inputSchema: {
|
|
61
|
+
workerId: z.string().describe("Worker id from `workers_list`, e.g. `ww-1` or `sw-1`."),
|
|
62
|
+
message: z
|
|
63
|
+
.string()
|
|
64
|
+
.describe("Payload to send. Strings only — structured-clone / `MessagePort` transfer not supported in MVP."),
|
|
65
|
+
...SESSION_ARG,
|
|
66
|
+
},
|
|
67
|
+
}, async ({ workerId, message, session }) => {
|
|
68
|
+
const g = gateCheck("worker_message_send");
|
|
69
|
+
if (g)
|
|
70
|
+
return g;
|
|
71
|
+
const e = await entryFor(session);
|
|
72
|
+
try {
|
|
73
|
+
const r = await e.workers.sendMessage(e.session.page(), requireCdp(e.session), {
|
|
74
|
+
workerId,
|
|
75
|
+
message,
|
|
76
|
+
});
|
|
77
|
+
const body = { ...r, tokensEstimate: 0 };
|
|
78
|
+
body.tokensEstimate = estimateTokens(JSON.stringify(body));
|
|
79
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
const body = {
|
|
83
|
+
ok: false,
|
|
84
|
+
workerId,
|
|
85
|
+
error: err instanceof Error ? err.message : String(err),
|
|
86
|
+
tokensEstimate: 0,
|
|
87
|
+
};
|
|
88
|
+
body.tokensEstimate = estimateTokens(JSON.stringify(body));
|
|
89
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
register("worker_messages_read", {
|
|
93
|
+
capability: "read",
|
|
94
|
+
description: "Drain buffered messages FROM workers since the last read. Returns `[{workerId, data, at}]`. `workerId` filters: omit to drain ALL workers; pass `ww-N` for one Web Worker, `sw-N` for one Service Worker. Each call drains (removes) the returned messages — re-reads return only what arrived since. The page-side ring is capped at 500 entries / 4 KiB per payload; entries past the cap are evicted oldest-first. Capability: `read`.",
|
|
95
|
+
inputSchema: {
|
|
96
|
+
workerId: z
|
|
97
|
+
.string()
|
|
98
|
+
.optional()
|
|
99
|
+
.describe("Drain only this worker's messages. Omit to drain ALL workers."),
|
|
100
|
+
...SESSION_ARG,
|
|
101
|
+
},
|
|
102
|
+
}, async ({ workerId, session }) => {
|
|
103
|
+
const g = gateCheck("worker_messages_read");
|
|
104
|
+
if (g)
|
|
105
|
+
return g;
|
|
106
|
+
const e = await entryFor(session);
|
|
107
|
+
try {
|
|
108
|
+
const messages = await e.workers.readMessages(e.session.page(), workerId !== undefined ? { workerId } : {});
|
|
109
|
+
const body = { ok: true, messages, tokensEstimate: 0 };
|
|
110
|
+
body.tokensEstimate = estimateTokens(JSON.stringify(body));
|
|
111
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
const body = {
|
|
115
|
+
ok: false,
|
|
116
|
+
error: err instanceof Error ? err.message : String(err),
|
|
117
|
+
tokensEstimate: 0,
|
|
118
|
+
};
|
|
119
|
+
body.tokensEstimate = estimateTokens(JSON.stringify(body));
|
|
120
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
register("sw_intercept_fetch", {
|
|
124
|
+
capability: "action",
|
|
125
|
+
deep: true,
|
|
126
|
+
description: "Register a fetch interceptor for Service-Worker-handled requests. `pattern` is a glob matched against the intercepted request URL (`*` = single path segment, `**` = any — same shape as `route` / `ws_intercept`). `response` is the canned reply: `{status?, body?, contentType?, headers?}` (defaults: 200, empty body, `application/json`). Fires only when the SW's `fetch` handler actually runs — i.e. the SW chose to intercept the request — which separates SW-mediated traffic from page-direct traffic. Re-add of the same pattern replaces the prior entry. Per-session; lost on session close. Capability: `action`.",
|
|
127
|
+
inputSchema: {
|
|
128
|
+
pattern: z
|
|
129
|
+
.string()
|
|
130
|
+
.describe("Glob matched against the intercepted request URL, e.g. `https://api.example/**`."),
|
|
131
|
+
response: z
|
|
132
|
+
.object({
|
|
133
|
+
status: z.number().int().min(100).max(599).optional(),
|
|
134
|
+
body: z.string().optional(),
|
|
135
|
+
contentType: z.string().optional(),
|
|
136
|
+
headers: z.record(z.string()).optional(),
|
|
137
|
+
})
|
|
138
|
+
.describe('Canned response. Defaults: status 200, body "", contentType application/json.'),
|
|
139
|
+
...SESSION_ARG,
|
|
140
|
+
},
|
|
141
|
+
}, async ({ pattern, response, session }) => {
|
|
142
|
+
const g = gateCheck("sw_intercept_fetch");
|
|
143
|
+
if (g)
|
|
144
|
+
return g;
|
|
145
|
+
const e = await entryFor(session);
|
|
146
|
+
const eg = engineGate("sw_intercept_fetch", e);
|
|
147
|
+
if (eg)
|
|
148
|
+
return eg;
|
|
149
|
+
try {
|
|
150
|
+
const r = await e.workers.addFetchIntercept(requireCdp(e.session), { pattern, response });
|
|
151
|
+
const body = { ok: true, ...r, tokensEstimate: 0 };
|
|
152
|
+
body.tokensEstimate = estimateTokens(JSON.stringify(body));
|
|
153
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
154
|
+
}
|
|
155
|
+
catch (err) {
|
|
156
|
+
const body = {
|
|
157
|
+
ok: false,
|
|
158
|
+
error: err instanceof Error ? err.message : String(err),
|
|
159
|
+
tokensEstimate: 0,
|
|
160
|
+
};
|
|
161
|
+
body.tokensEstimate = estimateTokens(JSON.stringify(body));
|
|
162
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
register("sw_unintercept_fetch", {
|
|
166
|
+
capability: "action",
|
|
167
|
+
deep: true,
|
|
168
|
+
description: "Remove a `sw_intercept_fetch` interceptor (by exact `pattern`), or — with no `pattern` — every SW fetch interceptor this session installed. Capability: `action`.",
|
|
169
|
+
inputSchema: {
|
|
170
|
+
pattern: z
|
|
171
|
+
.string()
|
|
172
|
+
.optional()
|
|
173
|
+
.describe("Omit to clear ALL of this session's SW fetch interceptors."),
|
|
174
|
+
...SESSION_ARG,
|
|
175
|
+
},
|
|
176
|
+
}, async ({ pattern, session }) => {
|
|
177
|
+
const g = gateCheck("sw_unintercept_fetch");
|
|
178
|
+
if (g)
|
|
179
|
+
return g;
|
|
180
|
+
const e = await entryFor(session);
|
|
181
|
+
const eg = engineGate("sw_unintercept_fetch", e);
|
|
182
|
+
if (eg)
|
|
183
|
+
return eg;
|
|
184
|
+
try {
|
|
185
|
+
const r = await e.workers.removeFetchIntercept(requireCdp(e.session), pattern !== undefined ? { pattern } : {});
|
|
186
|
+
const body = { ok: true, ...r, tokensEstimate: 0 };
|
|
187
|
+
body.tokensEstimate = estimateTokens(JSON.stringify(body));
|
|
188
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
189
|
+
}
|
|
190
|
+
catch (err) {
|
|
191
|
+
const body = {
|
|
192
|
+
ok: false,
|
|
193
|
+
error: err instanceof Error ? err.message : String(err),
|
|
194
|
+
tokensEstimate: 0,
|
|
195
|
+
};
|
|
196
|
+
body.tokensEstimate = estimateTokens(JSON.stringify(body));
|
|
197
|
+
return { content: [{ type: "text", text: JSON.stringify(body, null, 2) }] };
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { type SessionRegistry } from "../session/registry.js";
|
|
3
|
+
import type { RefRegistry } from "../page/refs.js";
|
|
4
|
+
import type { Workspace } from "../util/workspace.js";
|
|
5
|
+
import { type DiagnosticsRecorder } from "../util/diagnostics.js";
|
|
6
|
+
import type { ConfigStore, ResolvedConfig } from "../util/config-store.js";
|
|
7
|
+
import { type CapabilityConfig, type ConfirmHook } from "../util/capabilities.js";
|
|
8
|
+
import type { BrowxConfig } from "../util/config.js";
|
|
9
|
+
import type { PluginRecord } from "../plugin/types.js";
|
|
10
|
+
import type { OriginPolicy } from "../policy/origin.js";
|
|
11
|
+
import type { ApprovalStore } from "../policy/confirm.js";
|
|
12
|
+
import type { CredentialProvider, CredentialsConfig } from "../util/credentials.js";
|
|
13
|
+
import type { StartOptions } from "../server.js";
|
|
14
|
+
import type { ToolHost, ToolResponse } from "./host.js";
|
|
15
|
+
/** The createServer locals the host's closures close over. Each field is the
|
|
16
|
+
* exact local `createServer` built before the host literal; the closures move
|
|
17
|
+
* into `buildHost` verbatim and reach these through `deps`. */
|
|
18
|
+
export interface HostDeps {
|
|
19
|
+
/** The raw MCP server — `register` wires each tool onto its surface. */
|
|
20
|
+
server: McpServer;
|
|
21
|
+
/** The in-process handler side-table `register` populates and `batch` dispatches. */
|
|
22
|
+
toolHandlers: Record<string, (args: unknown) => Promise<ToolResponse>>;
|
|
23
|
+
/** The per-session registry — entry lookup + peek for wedge/metrics/diagnostics. */
|
|
24
|
+
registry: SessionRegistry;
|
|
25
|
+
/** Resolved server config (test attributes, timeouts, …). */
|
|
26
|
+
config: BrowxConfig;
|
|
27
|
+
/** Layered config store — the live source for re-resolvable settings. */
|
|
28
|
+
configStore: ConfigStore;
|
|
29
|
+
/** The once-resolved config snapshot taken at server start. */
|
|
30
|
+
resolvedConfig: ResolvedConfig;
|
|
31
|
+
/** Resolved capability policy (active set + warnings). */
|
|
32
|
+
caps: CapabilityConfig;
|
|
33
|
+
/** Confirm-required hooks (origin/byob confirm gating). */
|
|
34
|
+
confirmHooks: ReadonlySet<ConfirmHook>;
|
|
35
|
+
/** Origin allow/blocklist policy. */
|
|
36
|
+
originPolicy: OriginPolicy;
|
|
37
|
+
/** Session-independent pre-approval store. */
|
|
38
|
+
approvals: ApprovalStore;
|
|
39
|
+
/** Whether this server attached to an existing browser (BYOB). */
|
|
40
|
+
isByob: boolean;
|
|
41
|
+
/** Resolved workspace (root dir for file-io-bound captures and archives). */
|
|
42
|
+
workspace: Workspace;
|
|
43
|
+
/** The diagnostics JSONL recorder. */
|
|
44
|
+
diagnostics: DiagnosticsRecorder;
|
|
45
|
+
/** The credentials provider resolved once at server start. */
|
|
46
|
+
credentialsResolved: {
|
|
47
|
+
provider: CredentialProvider;
|
|
48
|
+
config: CredentialsConfig;
|
|
49
|
+
};
|
|
50
|
+
/** Live loaded-plugin records — assigned after the host is built; read lazily. */
|
|
51
|
+
pluginRecords: () => ReadonlyArray<PluginRecord>;
|
|
52
|
+
/** The server start options. */
|
|
53
|
+
startOptions: StartOptions;
|
|
54
|
+
/** Structured one-liner alongside an element screenshot. */
|
|
55
|
+
describeTarget: (loc: import("playwright-core").Locator, refs: RefRegistry, target: {
|
|
56
|
+
ref: string;
|
|
57
|
+
} | {
|
|
58
|
+
selector: string;
|
|
59
|
+
} | {
|
|
60
|
+
coords: {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
};
|
|
64
|
+
}) => Promise<string>;
|
|
65
|
+
/** Narrow wire target args to a resolved `ActionTarget`. */
|
|
66
|
+
asTarget: ToolHost["asTarget"];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The composition heart: assemble the shared helper closures + the `ToolHost`
|
|
70
|
+
* literal `createServer` hands to each `registerXxxTools(host)` module. Every
|
|
71
|
+
* closure body is byte-identical to the inline `createServer` version; the
|
|
72
|
+
* createServer locals they close over arrive through `deps`, and the
|
|
73
|
+
* intra-block references between closures (register → noteWedgeOutcome, the
|
|
74
|
+
* `*For` ports → ctxFor, …) stay as-is because they all move together.
|
|
75
|
+
*/
|
|
76
|
+
export declare function buildHost(deps: HostDeps): ToolHost;
|