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,144 @@
|
|
|
1
|
+
import type { BrowserContext, Page } from "playwright-core";
|
|
2
|
+
export type PolicyMode = "allow" | "deny" | "raise" | "ask-human";
|
|
3
|
+
/** Canonical name set for v1. Aligned with Playwright/Chromium permission names.
|
|
4
|
+
* USB/Bluetooth/HID are deliberately NOT in v1 ('s `device-emulation`).
|
|
5
|
+
* Re-exported in `permission_state` tool docs + tool-reference.md. */
|
|
6
|
+
export declare const SUPPORTED_PERMISSIONS: readonly ["camera", "microphone", "geolocation", "notifications", "clipboard-read", "clipboard-write", "midi", "midi-sysex", "payment-handler", "background-sync", "accelerometer", "gyroscope", "magnetometer"];
|
|
7
|
+
export type SupportedPermission = (typeof SUPPORTED_PERMISSIONS)[number];
|
|
8
|
+
/** Public, runtime-mutable shape. Top-level `mode` is the default; the
|
|
9
|
+
* per-permission override map wins when present. */
|
|
10
|
+
export interface PermissionPolicy {
|
|
11
|
+
mode: PolicyMode;
|
|
12
|
+
perPermission?: Partial<Record<SupportedPermission, PolicyMode>>;
|
|
13
|
+
}
|
|
14
|
+
/** One captured permission request, exposed on `ActionResult.permissionRequests[]`. */
|
|
15
|
+
export interface PermissionRecord {
|
|
16
|
+
permission: SupportedPermission;
|
|
17
|
+
/** origin of the page that made the request; undefined when not parseable. */
|
|
18
|
+
origin?: string;
|
|
19
|
+
/** What the server actually did. `"raised"` means the wrapper rejected
|
|
20
|
+
* AND the policy was `raise`, so the action will be marked failed. */
|
|
21
|
+
handledAs: "allowed" | "denied" | "raised" | "asked-human";
|
|
22
|
+
/** epoch ms — used by the action-window slice. */
|
|
23
|
+
ts: number;
|
|
24
|
+
}
|
|
25
|
+
/** Hint emitted on `ActionResult.failure.hint` when `raise` mode fired.
|
|
26
|
+
* Stable, agent-facing string — referenced in docs/tool-reference.md. */
|
|
27
|
+
export declare const UNHANDLED_PERMISSION_HINT: string;
|
|
28
|
+
/** BYOB warning surfaced when policy is set on `attached` sessions. CDP
|
|
29
|
+
* `Browser.setPermission` mutates the human's Chrome and is not cleanly
|
|
30
|
+
* revertable on detach — same posture class as the BYOB emulation warning. */
|
|
31
|
+
export declare const BYOB_PERMISSION_WARNING: string;
|
|
32
|
+
/** Mutable per-session state. The page-side check binding reads `current(name)`
|
|
33
|
+
* on every request, so a `set_permission_policy` call takes effect on the
|
|
34
|
+
* very next request without page reload. */
|
|
35
|
+
export declare class PermissionPolicyState {
|
|
36
|
+
private policy;
|
|
37
|
+
/** Bounded record ring (shared `PolicyRecordBuffer` — the hard cap so a chatty
|
|
38
|
+
* page can't grow this without bound; the per-action slice is the only
|
|
39
|
+
* consumer, older records are noise). */
|
|
40
|
+
private readonly records;
|
|
41
|
+
/** Contexts we've already installed the init-script + binding on. Idempotent
|
|
42
|
+
* install guard — BYOB reconnect / context rebuild MUST not double-wire. */
|
|
43
|
+
private wired;
|
|
44
|
+
constructor(initial?: PermissionPolicy, cap?: number);
|
|
45
|
+
/** Resolved policy snapshot. */
|
|
46
|
+
current(): PermissionPolicy;
|
|
47
|
+
/** Effective mode for a single permission — per-permission map wins, else
|
|
48
|
+
* top-level. Unknown permissions fall through to top-level (we still want
|
|
49
|
+
* a deterministic answer for whatever the page asked for). */
|
|
50
|
+
modeFor(name: string): PolicyMode;
|
|
51
|
+
set(next: PermissionPolicy): PermissionPolicy;
|
|
52
|
+
/** Append a request record. Caps the buffer at `cap`. */
|
|
53
|
+
record(rec: PermissionRecord): void;
|
|
54
|
+
/** Slice records with `ts >= since`. Used by the action-window. */
|
|
55
|
+
since(since: number): PermissionRecord[];
|
|
56
|
+
/** True if any record in `[since, now]` was handled in `raise` mode.
|
|
57
|
+
* When true, the action-window flips the result to `ok:false`. */
|
|
58
|
+
raisedSince(since: number): boolean;
|
|
59
|
+
/** Has this context already been wired? Idempotent install guard. */
|
|
60
|
+
hasContext(c: BrowserContext): boolean;
|
|
61
|
+
/** Mark a context as wired. */
|
|
62
|
+
markContext(c: BrowserContext): void;
|
|
63
|
+
}
|
|
64
|
+
/** Parse the spec's compact string form for the top-level mode, or accept the
|
|
65
|
+
* object form. Idempotent. */
|
|
66
|
+
export declare function parsePermissionPolicyArg(v: string | PermissionPolicy | undefined): PermissionPolicy;
|
|
67
|
+
/** Map a canonical permission name to the CDP `Browser.setPermission`
|
|
68
|
+
* descriptor name. */
|
|
69
|
+
export declare function cdpPermissionName(p: SupportedPermission): string;
|
|
70
|
+
/** Compute the CDP setting (granted/denied) for a permission given the active
|
|
71
|
+
* policy. `raise` / `deny` → "denied"; `allow` → "granted"; `ask-human` →
|
|
72
|
+
* "prompt" (CDP returns to the page-script wrapper which then asks the human).
|
|
73
|
+
*
|
|
74
|
+
* Kept as a pure function so registry.test.ts can assert the mapping without
|
|
75
|
+
* launching Chromium. */
|
|
76
|
+
export declare function cdpSettingFor(mode: PolicyMode): "granted" | "denied" | "prompt";
|
|
77
|
+
/** Bridge callback type. The server-side binding wires this to await-human
|
|
78
|
+
* (when the policy is `ask-human`); the page-side wrapper script consults it
|
|
79
|
+
* before deciding whether to call through. Returns the decision the wrapper
|
|
80
|
+
* should enact: `"allow"` calls through, `"deny"` throws NotAllowedError. */
|
|
81
|
+
export type PermissionAskHandler = (permission: SupportedPermission, origin: string | undefined) => Promise<"allow" | "deny">;
|
|
82
|
+
/** Init script that wraps the page-side permission APIs. Stringified so it can
|
|
83
|
+
* be passed to `addInitScript` and `page.evaluate`. Keep browser-only JS — no
|
|
84
|
+
* TS-only syntax. Re-injected on `framenavigated` (idempotent: guards on
|
|
85
|
+
* `window.__browx_permission_installed`).
|
|
86
|
+
*
|
|
87
|
+
* The wrappers consult `window.__browx_permission_check({permission, origin})`
|
|
88
|
+
* (an exposeBinding callable from page context) — it returns `"allow" |
|
|
89
|
+
* "deny"`. The server's binding implementation records the request + (for
|
|
90
|
+
* `ask-human`) blocks on the bridge before answering. */
|
|
91
|
+
export declare const PERMISSION_PAGE_SCRIPT = "(() => {\n if (window.__browx_permission_installed) return;\n window.__browx_permission_installed = true;\n // Detect whether the exposeBinding is available. If not (BYOB multi-attach\n // clobber, or the binding install failed), the wrappers fall back to\n // call-through \u2014 the CDP setPermission baseline still enforces grant/deny.\n function check(permission) {\n try {\n if (typeof window.__browx_permission_check === \"function\") {\n return Promise.resolve(window.__browx_permission_check(JSON.stringify({\n permission: permission, origin: location.origin,\n })));\n }\n } catch (_) {}\n return Promise.resolve(\"allow\");\n }\n function notAllowed(msg) {\n var e = new Error(msg || \"permission denied by browxai permissionPolicy\");\n try { e.name = \"NotAllowedError\"; } catch (_) {}\n return e;\n }\n\n // --- navigator.mediaDevices.getUserMedia (camera + microphone) ---\n try {\n var md = navigator.mediaDevices;\n if (md && typeof md.getUserMedia === \"function\") {\n var origGUM = md.getUserMedia.bind(md);\n md.getUserMedia = function (constraints) {\n var wantsVideo = !!(constraints && constraints.video);\n var wantsAudio = !!(constraints && constraints.audio);\n var perm = wantsVideo ? \"camera\" : (wantsAudio ? \"microphone\" : \"camera\");\n return check(perm).then(function (decision) {\n if (decision === \"deny\") return Promise.reject(notAllowed(\"Permission denied\"));\n return origGUM(constraints);\n });\n };\n }\n } catch (_) {}\n\n // --- navigator.geolocation (getCurrentPosition + watchPosition) ---\n // watchPosition is long-lived (the callback may fire many times) \u2014 we gate\n // the *initial* permission check at watch-installation time, then if allowed\n // pass through to the native API which itself manages the callback stream.\n try {\n var geo = navigator.geolocation;\n if (geo && typeof geo.getCurrentPosition === \"function\") {\n var origGet = geo.getCurrentPosition.bind(geo);\n geo.getCurrentPosition = function (success, error, options) {\n check(\"geolocation\").then(function (decision) {\n if (decision === \"deny\") {\n if (typeof error === \"function\") {\n try { error({ code: 1, message: \"User denied geolocation\", PERMISSION_DENIED: 1, POSITION_UNAVAILABLE: 2, TIMEOUT: 3 }); } catch (_) {}\n }\n return;\n }\n try { origGet(success, error, options); } catch (e) {\n if (typeof error === \"function\") { try { error(e); } catch (_) {} }\n }\n });\n };\n }\n if (geo && typeof geo.watchPosition === \"function\") {\n var origWatch = geo.watchPosition.bind(geo);\n // Return a synthetic watch id when denied so callers calling\n // clearWatch(id) still see a valid (no-op) integer. Native ids are\n // small positive integers; we use negatives starting at -1 to avoid\n // colliding with any in-flight native watch.\n var synthCounter = 0;\n geo.watchPosition = function (success, error, options) {\n var pending = true;\n var synthId = --synthCounter;\n check(\"geolocation\").then(function (decision) {\n pending = false;\n if (decision === \"deny\") {\n if (typeof error === \"function\") {\n try { error({ code: 1, message: \"User denied geolocation\", PERMISSION_DENIED: 1, POSITION_UNAVAILABLE: 2, TIMEOUT: 3 }); } catch (_) {}\n }\n return;\n }\n // Allowed \u2014 install the native watch. We've already returned the\n // synthetic id to the caller; the native id is held internally and\n // proxied through clearWatch below.\n try {\n var nativeId = origWatch(success, error, options);\n geo.__browx_watch_map = geo.__browx_watch_map || {};\n geo.__browx_watch_map[synthId] = nativeId;\n } catch (e) {\n if (typeof error === \"function\") { try { error(e); } catch (_) {} }\n }\n });\n return synthId;\n };\n var origClear = typeof geo.clearWatch === \"function\" ? geo.clearWatch.bind(geo) : null;\n if (origClear) {\n geo.clearWatch = function (id) {\n var map = geo.__browx_watch_map || {};\n if (id in map) {\n try { origClear(map[id]); } catch (_) {}\n delete map[id];\n return;\n }\n try { origClear(id); } catch (_) {}\n };\n }\n }\n } catch (_) {}\n\n // --- Notification.requestPermission ---\n try {\n if (typeof Notification !== \"undefined\" && typeof Notification.requestPermission === \"function\") {\n var origReq = Notification.requestPermission.bind(Notification);\n Notification.requestPermission = function (cb) {\n return check(\"notifications\").then(function (decision) {\n var result = decision === \"deny\" ? \"denied\" : \"granted\";\n if (decision === \"deny\") {\n try { Object.defineProperty(Notification, \"permission\", { get: function () { return \"denied\"; }, configurable: true }); } catch (_) {}\n if (typeof cb === \"function\") { try { cb(result); } catch (_) {} }\n return result;\n }\n // Allowed \u2014 delegate to native; the CDP setPermission baseline has\n // already pre-granted, so the native call resolves immediately.\n try {\n var r = origReq(cb);\n return r && typeof r.then === \"function\" ? r : Promise.resolve(result);\n } catch (_) {\n return result;\n }\n });\n };\n }\n } catch (_) {}\n\n // --- navigator.clipboard (read / write / readText / writeText) ---\n try {\n var clip = navigator.clipboard;\n if (clip) {\n var wrap = function (name, perm) {\n var orig = typeof clip[name] === \"function\" ? clip[name].bind(clip) : null;\n if (!orig) return;\n clip[name] = function () {\n var args = arguments;\n return check(perm).then(function (decision) {\n if (decision === \"deny\") return Promise.reject(notAllowed(\"Clipboard \" + name + \" denied\"));\n return orig.apply(null, args);\n });\n };\n };\n wrap(\"read\", \"clipboard-read\");\n wrap(\"readText\", \"clipboard-read\");\n wrap(\"write\", \"clipboard-write\");\n wrap(\"writeText\", \"clipboard-write\");\n }\n } catch (_) {}\n\n // --- navigator.permissions.query \u2014 read-side. Force the wrapper's view of\n // state through us so a query() honoured a \"raise\" policy returns \"denied\"\n // (matching the wrapper rejection) and a \"ask-human\" returns \"prompt\" (the\n // native query would otherwise see the CDP \"prompt\" setting and skip our\n // recording). Falls back to native when the queried name isn't one we govern.\n try {\n var permsApi = navigator.permissions;\n if (permsApi && typeof permsApi.query === \"function\") {\n var origQuery = permsApi.query.bind(permsApi);\n permsApi.query = function (desc) {\n var name = desc && desc.name;\n // pass through to native \u2014 we don't override the query result, just\n // record that the page asked, so the next ActionResult shows it. The\n // native value still reflects the CDP-set state (granted/denied/prompt).\n if (typeof window.__browx_permission_observe === \"function\") {\n try { window.__browx_permission_observe(JSON.stringify({ permission: name, origin: location.origin })); } catch (_) {}\n }\n return origQuery(desc);\n };\n }\n } catch (_) {}\n})();";
|
|
92
|
+
/** Server-side wire-up. Installs:
|
|
93
|
+
* - `__browx_permission_check` exposeBinding: synchronous-from-page consult
|
|
94
|
+
* that records the request, runs the ask-human handler if the policy is
|
|
95
|
+
* `ask-human`, and returns the resolved decision (`"allow"` / `"deny"`).
|
|
96
|
+
* - `__browx_permission_observe` exposeBinding: read-side notice that the
|
|
97
|
+
* page called `navigator.permissions.query` (no decision returned).
|
|
98
|
+
* - The page-side init script (see above), re-injected by Playwright on
|
|
99
|
+
* every new document via `addInitScript`.
|
|
100
|
+
*
|
|
101
|
+
* Idempotent on the same context (the state's `WeakSet<BrowserContext>` guard).
|
|
102
|
+
* Errors during install are logged and swallowed — the CDP setPermission baseline
|
|
103
|
+
* still enforces grant/deny even when the in-page wrappers fail to wire.
|
|
104
|
+
*/
|
|
105
|
+
export declare function attachPermissionPolicy(context: BrowserContext, state: PermissionPolicyState, askHandler: PermissionAskHandler): Promise<void>;
|
|
106
|
+
/** Apply the policy's baseline by computing the set of permissions that should
|
|
107
|
+
* be GRANTED (mode `allow`) and routing them through Playwright's
|
|
108
|
+
* `context.grantPermissions`. Permissions in `deny`/`raise`/`ask-human` are
|
|
109
|
+
* NOT granted — the in-page wrapper rejects them at request time before the
|
|
110
|
+
* native code runs.
|
|
111
|
+
*
|
|
112
|
+
* Why not CDP `Browser.setPermission` directly: the underlying CDP method
|
|
113
|
+
* takes a W3C PermissionDescriptor name (e.g. `geolocation`, `camera`) and
|
|
114
|
+
* the descriptor schema varies by Chromium build. Playwright's
|
|
115
|
+
* `grantPermissions` carries the canonical mapping (see Playwright's
|
|
116
|
+
* `webPermissionToProtocol`) and falls back across Chromium versions —
|
|
117
|
+
* delegating means we don't have to track the protocol versions ourselves.
|
|
118
|
+
*
|
|
119
|
+
* Note: `clearPermissions` first then `grantPermissions` is the Playwright
|
|
120
|
+
* idiom for "REPLACE the granted set" (the underlying CDP call is
|
|
121
|
+
* `Browser.resetPermissions` + `Browser.grantPermissions`). Both are
|
|
122
|
+
* context-wide on Chromium so the policy applies to every page.
|
|
123
|
+
*
|
|
124
|
+
* Best-effort: errors are logged and don't throw — the in-page wrapper still
|
|
125
|
+
* enforces grant/deny even if the baseline application fails. Re-applied on
|
|
126
|
+
* `set_permission_policy` and re-attach paths. */
|
|
127
|
+
export declare function applyCdpBaseline(context: BrowserContext, state: PermissionPolicyState): Promise<void>;
|
|
128
|
+
/** Read-side via the page's native `navigator.permissions.query` (W3C
|
|
129
|
+
* Permissions API). Returns `{ [name]: "granted"|"denied"|"prompt"|"unknown" }`.
|
|
130
|
+
* Per-permission errors populate the entry with `"unknown"` so the caller
|
|
131
|
+
* sees a deterministic shape.
|
|
132
|
+
*
|
|
133
|
+
* Why the Permissions API and not CDP `Browser.getPermissionState`: the CDP
|
|
134
|
+
* method's PermissionDescriptor schema varies across Chromium builds and
|
|
135
|
+
* several of our supported names (e.g. `clipboard-write` → `clipboardSan…`)
|
|
136
|
+
* don't map cleanly. The Permissions API takes the canonical web spec name
|
|
137
|
+
* directly and is supported across versions. The state it reports reflects
|
|
138
|
+
* whatever the CDP-level baseline set, so it's the right read-side mirror
|
|
139
|
+
* for `applyCdpBaseline`.
|
|
140
|
+
*
|
|
141
|
+
* Note: the in-page wrapper script is a no-op for query() (passes through);
|
|
142
|
+
* it doesn't override the resulting state, so this read is the canonical
|
|
143
|
+
* browser-reported state, not a wrapper-side guess. */
|
|
144
|
+
export declare function readPermissionStates(context: BrowserContext, page: Page, names: SupportedPermission[], origin?: string): Promise<Record<string, "granted" | "denied" | "prompt" | "unknown">>;
|