tabwright 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aria-snapshot.d.ts +0 -1
- package/dist/aria-snapshot.js +9 -1
- package/dist/assets/cursors/screen-studio/pointer-macos-tahoe-data-url.d.ts +0 -1
- package/dist/assets/cursors/screen-studio/pointer-macos-tahoe-data-url.js +0 -1
- package/dist/bippy.js +1 -1
- package/dist/browser-config.d.ts +0 -1
- package/dist/browser-config.js +0 -1
- package/dist/browser-install.d.ts +0 -1
- package/dist/browser-install.js +0 -1
- package/dist/browser-launch.d.ts +0 -1
- package/dist/browser-launch.js +0 -1
- package/dist/builtin-capabilities.d.ts +0 -1
- package/dist/builtin-capabilities.js +0 -1
- package/dist/capability-agent-skill.d.ts +0 -1
- package/dist/capability-agent-skill.js +0 -1
- package/dist/capability-auth-state.d.ts +0 -1
- package/dist/capability-auth-state.js +0 -1
- package/dist/capability-auth.d.ts +0 -1
- package/dist/capability-auth.js +0 -1
- package/dist/capability-options.d.ts +0 -1
- package/dist/capability-options.js +0 -1
- package/dist/capability-package.d.ts +0 -1
- package/dist/capability-package.js +0 -1
- package/dist/capability-registry.d.ts +0 -1
- package/dist/capability-registry.js +0 -1
- package/dist/capability-runner.d.ts +0 -1
- package/dist/capability-runner.js +0 -1
- package/dist/capability-studio.d.ts +0 -1
- package/dist/capability-studio.js +0 -1
- package/dist/cdp-log.d.ts +0 -1
- package/dist/cdp-log.js +0 -1
- package/dist/cdp-relay.d.ts +0 -1
- package/dist/cdp-relay.js +0 -1
- package/dist/cdp-session.d.ts +0 -1
- package/dist/cdp-session.js +0 -1
- package/dist/cdp-types.d.ts +0 -1
- package/dist/cdp-types.js +0 -1
- package/dist/chrome-discovery.d.ts +0 -1
- package/dist/chrome-discovery.js +0 -1
- package/dist/clean-html.d.ts +0 -1
- package/dist/clean-html.js +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +9 -2
- package/dist/cloud-client.d.ts +0 -1
- package/dist/cloud-client.js +0 -1
- package/dist/create-logger.d.ts +0 -1
- package/dist/create-logger.js +0 -1
- package/dist/debugger-examples-types.d.ts +0 -1
- package/dist/debugger-examples-types.js +0 -1
- package/dist/debugger-examples.d.ts +0 -1
- package/dist/debugger-examples.js +0 -1
- package/dist/debugger.d.ts +0 -1
- package/dist/debugger.js +0 -1
- package/dist/diff-utils.d.ts +0 -1
- package/dist/diff-utils.js +0 -1
- package/dist/doctor.d.ts +0 -1
- package/dist/doctor.js +5 -7
- package/dist/editor-examples.d.ts +0 -1
- package/dist/editor-examples.js +0 -1
- package/dist/editor.d.ts +0 -1
- package/dist/editor.js +0 -1
- package/dist/env-compat.d.ts +0 -1
- package/dist/env-compat.js +0 -1
- package/dist/executor.d.ts +0 -1
- package/dist/executor.js +1 -2
- package/dist/extension/background.js +7 -3
- package/dist/extension/manifest.json +1 -1
- package/dist/ghost-browser.d.ts +0 -1
- package/dist/ghost-browser.js +0 -1
- package/dist/ghost-cursor-controller.d.ts +0 -1
- package/dist/ghost-cursor-controller.js +0 -1
- package/dist/ghost-cursor.d.ts +0 -1
- package/dist/ghost-cursor.js +0 -1
- package/dist/htmlrewrite.d.ts +0 -1
- package/dist/htmlrewrite.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/kill-port.d.ts +0 -1
- package/dist/kill-port.js +0 -1
- package/dist/kitty-graphics.d.ts +0 -1
- package/dist/kitty-graphics.js +0 -1
- package/dist/mcp.d.ts +0 -1
- package/dist/mcp.js +0 -1
- package/dist/package-paths.d.ts +0 -1
- package/dist/package-paths.js +0 -1
- package/dist/page-markdown.d.ts +0 -1
- package/dist/page-markdown.js +0 -1
- package/dist/performance-examples.d.ts +0 -1
- package/dist/performance-examples.js +0 -1
- package/dist/playwright-import.d.ts +0 -1
- package/dist/playwright-import.js +0 -1
- package/dist/product-paths.d.ts +0 -1
- package/dist/product-paths.js +0 -1
- package/dist/protocol.d.ts +0 -1
- package/dist/protocol.js +0 -1
- package/dist/react-source.d.ts +0 -1
- package/dist/react-source.js +0 -1
- package/dist/readability.js +1 -1
- package/dist/relay-client.d.ts +0 -1
- package/dist/relay-client.js +0 -1
- package/dist/relay-state.d.ts +0 -1
- package/dist/relay-state.js +0 -1
- package/dist/replay-ai-index.d.ts +0 -1
- package/dist/replay-ai-index.js +0 -1
- package/dist/replay-eval.d.ts +0 -1
- package/dist/replay-eval.js +0 -1
- package/dist/replay-handoff.d.ts +0 -1
- package/dist/replay-handoff.js +0 -1
- package/dist/replay-workflow-compiler.d.ts +0 -1
- package/dist/replay-workflow-compiler.js +0 -1
- package/dist/rrweb-recording-relay.d.ts +0 -1
- package/dist/rrweb-recording-relay.js +0 -1
- package/dist/rrweb-recording.d.ts +0 -1
- package/dist/rrweb-recording.js +0 -1
- package/dist/scoped-fs.d.ts +0 -1
- package/dist/scoped-fs.js +0 -1
- package/dist/selector-generator.js +1 -1
- package/dist/start-relay-server.d.ts +0 -1
- package/dist/start-relay-server.js +0 -1
- package/dist/styles-examples.d.ts +0 -1
- package/dist/styles-examples.js +0 -1
- package/dist/styles.d.ts +0 -1
- package/dist/styles.js +0 -1
- package/dist/tabwright-agent-skill.d.ts +0 -1
- package/dist/tabwright-agent-skill.js +0 -1
- package/dist/test-declarations.d.ts +0 -1
- package/dist/test-declarations.js +0 -1
- package/dist/utils.d.ts +0 -1
- package/dist/utils.js +2 -2
- package/dist/wait-for-page-load.d.ts +0 -1
- package/dist/wait-for-page-load.js +0 -1
- package/dist/workflow-capability.d.ts +0 -1
- package/dist/workflow-capability.js +0 -1
- package/package.json +9 -4
- package/readme.md +35 -0
- package/dist/aria-snapshot.d.ts.map +0 -1
- package/dist/aria-snapshot.js.map +0 -1
- package/dist/aria-snapshot.test.d.ts +0 -2
- package/dist/aria-snapshot.test.d.ts.map +0 -1
- package/dist/aria-snapshot.test.js +0 -270
- package/dist/aria-snapshot.test.js.map +0 -1
- package/dist/aria-snapshot.unit.test.d.ts +0 -2
- package/dist/aria-snapshot.unit.test.d.ts.map +0 -1
- package/dist/aria-snapshot.unit.test.js +0 -542
- package/dist/aria-snapshot.unit.test.js.map +0 -1
- package/dist/assets/cursors/screen-studio/pointer-macos-tahoe-data-url.d.ts.map +0 -1
- package/dist/assets/cursors/screen-studio/pointer-macos-tahoe-data-url.js.map +0 -1
- package/dist/browser-config.d.ts.map +0 -1
- package/dist/browser-config.js.map +0 -1
- package/dist/browser-install.d.ts.map +0 -1
- package/dist/browser-install.js.map +0 -1
- package/dist/browser-launch.d.ts.map +0 -1
- package/dist/browser-launch.js.map +0 -1
- package/dist/builtin-capabilities.d.ts.map +0 -1
- package/dist/builtin-capabilities.js.map +0 -1
- package/dist/capability-agent-skill.d.ts.map +0 -1
- package/dist/capability-agent-skill.js.map +0 -1
- package/dist/capability-auth-state.d.ts.map +0 -1
- package/dist/capability-auth-state.js.map +0 -1
- package/dist/capability-auth.d.ts.map +0 -1
- package/dist/capability-auth.js.map +0 -1
- package/dist/capability-cli-confirmation.test.d.ts +0 -2
- package/dist/capability-cli-confirmation.test.d.ts.map +0 -1
- package/dist/capability-cli-confirmation.test.js +0 -79
- package/dist/capability-cli-confirmation.test.js.map +0 -1
- package/dist/capability-options.d.ts.map +0 -1
- package/dist/capability-options.js.map +0 -1
- package/dist/capability-options.test.d.ts +0 -2
- package/dist/capability-options.test.d.ts.map +0 -1
- package/dist/capability-options.test.js +0 -81
- package/dist/capability-options.test.js.map +0 -1
- package/dist/capability-package.d.ts.map +0 -1
- package/dist/capability-package.js.map +0 -1
- package/dist/capability-package.test.d.ts +0 -2
- package/dist/capability-package.test.d.ts.map +0 -1
- package/dist/capability-package.test.js +0 -179
- package/dist/capability-package.test.js.map +0 -1
- package/dist/capability-registry.d.ts.map +0 -1
- package/dist/capability-registry.js.map +0 -1
- package/dist/capability-registry.test.d.ts +0 -2
- package/dist/capability-registry.test.d.ts.map +0 -1
- package/dist/capability-registry.test.js +0 -1683
- package/dist/capability-registry.test.js.map +0 -1
- package/dist/capability-runner.d.ts.map +0 -1
- package/dist/capability-runner.js.map +0 -1
- package/dist/capability-search-relevance.test.d.ts +0 -2
- package/dist/capability-search-relevance.test.d.ts.map +0 -1
- package/dist/capability-search-relevance.test.js +0 -67
- package/dist/capability-search-relevance.test.js.map +0 -1
- package/dist/capability-studio.d.ts.map +0 -1
- package/dist/capability-studio.js.map +0 -1
- package/dist/capability-studio.test.d.ts +0 -2
- package/dist/capability-studio.test.d.ts.map +0 -1
- package/dist/capability-studio.test.js +0 -41
- package/dist/capability-studio.test.js.map +0 -1
- package/dist/cdp-log.d.ts.map +0 -1
- package/dist/cdp-log.js.map +0 -1
- package/dist/cdp-log.test.d.ts +0 -2
- package/dist/cdp-log.test.d.ts.map +0 -1
- package/dist/cdp-log.test.js +0 -109
- package/dist/cdp-log.test.js.map +0 -1
- package/dist/cdp-relay.d.ts.map +0 -1
- package/dist/cdp-relay.js.map +0 -1
- package/dist/cdp-session.d.ts.map +0 -1
- package/dist/cdp-session.js.map +0 -1
- package/dist/cdp-types.d.ts.map +0 -1
- package/dist/cdp-types.js.map +0 -1
- package/dist/channel-owner-inspect.test.d.ts +0 -2
- package/dist/channel-owner-inspect.test.d.ts.map +0 -1
- package/dist/channel-owner-inspect.test.js +0 -75
- package/dist/channel-owner-inspect.test.js.map +0 -1
- package/dist/chrome-discovery.d.ts.map +0 -1
- package/dist/chrome-discovery.js.map +0 -1
- package/dist/chrome-discovery.test.d.ts +0 -2
- package/dist/chrome-discovery.test.d.ts.map +0 -1
- package/dist/chrome-discovery.test.js +0 -41
- package/dist/chrome-discovery.test.js.map +0 -1
- package/dist/clean-html.d.ts.map +0 -1
- package/dist/clean-html.js.map +0 -1
- package/dist/cli-help.test.d.ts +0 -2
- package/dist/cli-help.test.d.ts.map +0 -1
- package/dist/cli-help.test.js +0 -98
- package/dist/cli-help.test.js.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/cloud-client.d.ts.map +0 -1
- package/dist/cloud-client.js.map +0 -1
- package/dist/create-logger.d.ts.map +0 -1
- package/dist/create-logger.js.map +0 -1
- package/dist/debugger-examples-types.d.ts.map +0 -1
- package/dist/debugger-examples-types.js.map +0 -1
- package/dist/debugger-examples.d.ts.map +0 -1
- package/dist/debugger-examples.js.map +0 -1
- package/dist/debugger.d.ts.map +0 -1
- package/dist/debugger.js.map +0 -1
- package/dist/diff-utils.d.ts.map +0 -1
- package/dist/diff-utils.js.map +0 -1
- package/dist/diff-utils.test.d.ts +0 -2
- package/dist/diff-utils.test.d.ts.map +0 -1
- package/dist/diff-utils.test.js +0 -137
- package/dist/diff-utils.test.js.map +0 -1
- package/dist/doctor.d.ts.map +0 -1
- package/dist/doctor.js.map +0 -1
- package/dist/doctor.test.d.ts +0 -2
- package/dist/doctor.test.d.ts.map +0 -1
- package/dist/doctor.test.js +0 -208
- package/dist/doctor.test.js.map +0 -1
- package/dist/editor-examples.d.ts.map +0 -1
- package/dist/editor-examples.js.map +0 -1
- package/dist/editor.d.ts.map +0 -1
- package/dist/editor.js.map +0 -1
- package/dist/env-compat.d.ts.map +0 -1
- package/dist/env-compat.js.map +0 -1
- package/dist/executor.d.ts.map +0 -1
- package/dist/executor.js.map +0 -1
- package/dist/executor.unit.test.d.ts +0 -2
- package/dist/executor.unit.test.d.ts.map +0 -1
- package/dist/executor.unit.test.js +0 -143
- package/dist/executor.unit.test.js.map +0 -1
- package/dist/extension-connection.test.d.ts +0 -2
- package/dist/extension-connection.test.d.ts.map +0 -1
- package/dist/extension-connection.test.js +0 -708
- package/dist/extension-connection.test.js.map +0 -1
- package/dist/extension-icon-warning.test.d.ts +0 -2
- package/dist/extension-icon-warning.test.d.ts.map +0 -1
- package/dist/extension-icon-warning.test.js +0 -33
- package/dist/extension-icon-warning.test.js.map +0 -1
- package/dist/ghost-browser.d.ts.map +0 -1
- package/dist/ghost-browser.js.map +0 -1
- package/dist/ghost-cursor-controller.d.ts.map +0 -1
- package/dist/ghost-cursor-controller.js.map +0 -1
- package/dist/ghost-cursor.d.ts.map +0 -1
- package/dist/ghost-cursor.js.map +0 -1
- package/dist/htmlrewrite.d.ts.map +0 -1
- package/dist/htmlrewrite.js.map +0 -1
- package/dist/htmlrewrite.test.d.ts +0 -2
- package/dist/htmlrewrite.test.d.ts.map +0 -1
- package/dist/htmlrewrite.test.js +0 -7975
- package/dist/htmlrewrite.test.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/kill-port.d.ts.map +0 -1
- package/dist/kill-port.js.map +0 -1
- package/dist/kitty-graphics.d.ts.map +0 -1
- package/dist/kitty-graphics.js.map +0 -1
- package/dist/kitty-graphics.test.d.ts +0 -2
- package/dist/kitty-graphics.test.d.ts.map +0 -1
- package/dist/kitty-graphics.test.js +0 -125
- package/dist/kitty-graphics.test.js.map +0 -1
- package/dist/locator-selector.test.d.ts +0 -2
- package/dist/locator-selector.test.d.ts.map +0 -1
- package/dist/locator-selector.test.js +0 -98
- package/dist/locator-selector.test.js.map +0 -1
- package/dist/mcp-client.d.ts +0 -20
- package/dist/mcp-client.d.ts.map +0 -1
- package/dist/mcp-client.js +0 -56
- package/dist/mcp-client.js.map +0 -1
- package/dist/mcp.d.ts.map +0 -1
- package/dist/mcp.js.map +0 -1
- package/dist/on-mouse-action.test.d.ts +0 -2
- package/dist/on-mouse-action.test.d.ts.map +0 -1
- package/dist/on-mouse-action.test.js +0 -180
- package/dist/on-mouse-action.test.js.map +0 -1
- package/dist/options-page.test.d.ts +0 -2
- package/dist/options-page.test.d.ts.map +0 -1
- package/dist/options-page.test.js +0 -773
- package/dist/options-page.test.js.map +0 -1
- package/dist/package-paths.d.ts.map +0 -1
- package/dist/package-paths.js.map +0 -1
- package/dist/page-markdown.d.ts.map +0 -1
- package/dist/page-markdown.js.map +0 -1
- package/dist/performance-examples.d.ts.map +0 -1
- package/dist/performance-examples.js.map +0 -1
- package/dist/playwright-import.d.ts.map +0 -1
- package/dist/playwright-import.js.map +0 -1
- package/dist/popup-relocation.test.d.ts +0 -7
- package/dist/popup-relocation.test.d.ts.map +0 -1
- package/dist/popup-relocation.test.js +0 -139
- package/dist/popup-relocation.test.js.map +0 -1
- package/dist/product-paths.d.ts.map +0 -1
- package/dist/product-paths.js.map +0 -1
- package/dist/product-paths.test.d.ts +0 -2
- package/dist/product-paths.test.d.ts.map +0 -1
- package/dist/product-paths.test.js +0 -39
- package/dist/product-paths.test.js.map +0 -1
- package/dist/protocol.d.ts.map +0 -1
- package/dist/protocol.js.map +0 -1
- package/dist/protocol.test.d.ts +0 -2
- package/dist/protocol.test.d.ts.map +0 -1
- package/dist/protocol.test.js +0 -31
- package/dist/protocol.test.js.map +0 -1
- package/dist/react-source.d.ts.map +0 -1
- package/dist/react-source.js.map +0 -1
- package/dist/relay-client.d.ts.map +0 -1
- package/dist/relay-client.js.map +0 -1
- package/dist/relay-client.test.d.ts +0 -2
- package/dist/relay-client.test.d.ts.map +0 -1
- package/dist/relay-client.test.js +0 -305
- package/dist/relay-client.test.js.map +0 -1
- package/dist/relay-core.test.d.ts +0 -2
- package/dist/relay-core.test.d.ts.map +0 -1
- package/dist/relay-core.test.js +0 -1427
- package/dist/relay-core.test.js.map +0 -1
- package/dist/relay-navigation.test.d.ts +0 -2
- package/dist/relay-navigation.test.d.ts.map +0 -1
- package/dist/relay-navigation.test.js +0 -661
- package/dist/relay-navigation.test.js.map +0 -1
- package/dist/relay-session.test.d.ts +0 -2
- package/dist/relay-session.test.d.ts.map +0 -1
- package/dist/relay-session.test.js +0 -1121
- package/dist/relay-session.test.js.map +0 -1
- package/dist/relay-state.d.ts.map +0 -1
- package/dist/relay-state.js.map +0 -1
- package/dist/relay-state.test.d.ts +0 -2
- package/dist/relay-state.test.d.ts.map +0 -1
- package/dist/relay-state.test.js +0 -594
- package/dist/relay-state.test.js.map +0 -1
- package/dist/replay-ai-index.d.ts.map +0 -1
- package/dist/replay-ai-index.js.map +0 -1
- package/dist/replay-ai-index.test.d.ts +0 -2
- package/dist/replay-ai-index.test.d.ts.map +0 -1
- package/dist/replay-ai-index.test.js +0 -255
- package/dist/replay-ai-index.test.js.map +0 -1
- package/dist/replay-cli.test.d.ts +0 -2
- package/dist/replay-cli.test.d.ts.map +0 -1
- package/dist/replay-cli.test.js +0 -275
- package/dist/replay-cli.test.js.map +0 -1
- package/dist/replay-eval.d.ts.map +0 -1
- package/dist/replay-eval.js.map +0 -1
- package/dist/replay-handoff.d.ts.map +0 -1
- package/dist/replay-handoff.js.map +0 -1
- package/dist/replay-handoff.test.d.ts +0 -2
- package/dist/replay-handoff.test.d.ts.map +0 -1
- package/dist/replay-handoff.test.js +0 -123
- package/dist/replay-handoff.test.js.map +0 -1
- package/dist/replay-workflow-compiler.d.ts.map +0 -1
- package/dist/replay-workflow-compiler.js.map +0 -1
- package/dist/replay-workflow-compiler.test.d.ts +0 -2
- package/dist/replay-workflow-compiler.test.d.ts.map +0 -1
- package/dist/replay-workflow-compiler.test.js +0 -223
- package/dist/replay-workflow-compiler.test.js.map +0 -1
- package/dist/rrweb-recording-relay.d.ts.map +0 -1
- package/dist/rrweb-recording-relay.js.map +0 -1
- package/dist/rrweb-recording-relay.test.d.ts +0 -2
- package/dist/rrweb-recording-relay.test.d.ts.map +0 -1
- package/dist/rrweb-recording-relay.test.js +0 -85
- package/dist/rrweb-recording-relay.test.js.map +0 -1
- package/dist/rrweb-recording.d.ts.map +0 -1
- package/dist/rrweb-recording.js.map +0 -1
- package/dist/scoped-fs.d.ts.map +0 -1
- package/dist/scoped-fs.js.map +0 -1
- package/dist/scoped-fs.test.d.ts +0 -5
- package/dist/scoped-fs.test.d.ts.map +0 -1
- package/dist/scoped-fs.test.js +0 -73
- package/dist/scoped-fs.test.js.map +0 -1
- package/dist/skill-stub.test.d.ts +0 -2
- package/dist/skill-stub.test.d.ts.map +0 -1
- package/dist/skill-stub.test.js +0 -22
- package/dist/skill-stub.test.js.map +0 -1
- package/dist/snapshot-tools.test.d.ts +0 -2
- package/dist/snapshot-tools.test.d.ts.map +0 -1
- package/dist/snapshot-tools.test.js +0 -856
- package/dist/snapshot-tools.test.js.map +0 -1
- package/dist/start-relay-server.d.ts.map +0 -1
- package/dist/start-relay-server.js.map +0 -1
- package/dist/styles-examples.d.ts.map +0 -1
- package/dist/styles-examples.js.map +0 -1
- package/dist/styles.d.ts.map +0 -1
- package/dist/styles.js.map +0 -1
- package/dist/tabwright-agent-skill.d.ts.map +0 -1
- package/dist/tabwright-agent-skill.js.map +0 -1
- package/dist/tabwright-agent-skill.test.d.ts +0 -2
- package/dist/tabwright-agent-skill.test.d.ts.map +0 -1
- package/dist/tabwright-agent-skill.test.js +0 -51
- package/dist/tabwright-agent-skill.test.js.map +0 -1
- package/dist/test-declarations.d.ts.map +0 -1
- package/dist/test-declarations.js.map +0 -1
- package/dist/test-utils.d.ts +0 -69
- package/dist/test-utils.d.ts.map +0 -1
- package/dist/test-utils.js +0 -448
- package/dist/test-utils.js.map +0 -1
- package/dist/test-utils.test.d.ts +0 -2
- package/dist/test-utils.test.d.ts.map +0 -1
- package/dist/test-utils.test.js +0 -55
- package/dist/test-utils.test.js.map +0 -1
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js.map +0 -1
- package/dist/wait-for-page-load.d.ts.map +0 -1
- package/dist/wait-for-page-load.js.map +0 -1
- package/dist/workflow-capability.d.ts.map +0 -1
- package/dist/workflow-capability.js.map +0 -1
- package/dist/workflow-script-flow.test.d.ts +0 -2
- package/dist/workflow-script-flow.test.d.ts.map +0 -1
- package/dist/workflow-script-flow.test.js +0 -285
- package/dist/workflow-script-flow.test.js.map +0 -1
- package/src/__snapshots__/x.com.processed.html +0 -1003
- package/src/__snapshots__/x.com.processed.withStyles.html +0 -2720
- package/src/a11y-client.ts +0 -241
- package/src/aria-snapshot.test.ts +0 -311
- package/src/aria-snapshot.ts +0 -1681
- package/src/aria-snapshot.unit.test.ts +0 -615
- package/src/aria-snapshots/github-interactive.txt +0 -193
- package/src/aria-snapshots/github-raw.txt +0 -309
- package/src/aria-snapshots/hackernews-interactive.txt +0 -477
- package/src/aria-snapshots/hackernews-raw.txt +0 -428
- package/src/aria-snapshots/prosemirror-interactive.txt +0 -66
- package/src/aria-snapshots/prosemirror-raw.txt +0 -145
- package/src/assets/aria-labels-hacker-news.png +0 -0
- package/src/assets/aria-labels-old-reddit.png +0 -0
- package/src/assets/cursors/screen-studio/pointer-macos-tahoe-data-url.ts +0 -5
- package/src/assets/cursors/screen-studio/pointer-macos-tahoe.svg +0 -18
- package/src/assets/x.com.html +0 -32946
- package/src/browser-config.ts +0 -179
- package/src/browser-install.ts +0 -284
- package/src/browser-launch.ts +0 -75
- package/src/builtin-capabilities.ts +0 -2765
- package/src/capability-agent-skill.ts +0 -305
- package/src/capability-auth-state.ts +0 -197
- package/src/capability-auth.ts +0 -249
- package/src/capability-cli-confirmation.test.ts +0 -90
- package/src/capability-options.test.ts +0 -89
- package/src/capability-options.ts +0 -57
- package/src/capability-package.test.ts +0 -204
- package/src/capability-package.ts +0 -555
- package/src/capability-registry.test.ts +0 -1905
- package/src/capability-registry.ts +0 -1234
- package/src/capability-runner.ts +0 -801
- package/src/capability-search-relevance.test.ts +0 -73
- package/src/capability-studio.test.ts +0 -45
- package/src/capability-studio.ts +0 -641
- package/src/cdp-log.test.ts +0 -131
- package/src/cdp-log.ts +0 -112
- package/src/cdp-relay.ts +0 -2944
- package/src/cdp-session.ts +0 -77
- package/src/cdp-types.ts +0 -158
- package/src/channel-owner-inspect.test.ts +0 -94
- package/src/chrome-discovery.test.ts +0 -50
- package/src/chrome-discovery.ts +0 -220
- package/src/clean-html.ts +0 -141
- package/src/cli-help.test.ts +0 -123
- package/src/cli.ts +0 -3181
- package/src/cloud-client.ts +0 -179
- package/src/create-logger.ts +0 -38
- package/src/debugger-examples-types.ts +0 -16
- package/src/debugger-examples.ts +0 -66
- package/src/debugger.ts +0 -708
- package/src/diff-utils.test.ts +0 -152
- package/src/diff-utils.ts +0 -70
- package/src/doctor.test.ts +0 -244
- package/src/doctor.ts +0 -321
- package/src/editor-examples.ts +0 -158
- package/src/editor.ts +0 -426
- package/src/env-compat.ts +0 -28
- package/src/executor.ts +0 -1824
- package/src/executor.unit.test.ts +0 -168
- package/src/extension-connection.test.ts +0 -855
- package/src/extension-icon-warning.test.ts +0 -45
- package/src/ghost-browser.ts +0 -149
- package/src/ghost-cursor-client.ts +0 -494
- package/src/ghost-cursor-controller.ts +0 -129
- package/src/ghost-cursor.ts +0 -123
- package/src/htmlrewrite.test.ts +0 -8008
- package/src/htmlrewrite.ts +0 -390
- package/src/index.ts +0 -53
- package/src/kill-port.ts +0 -219
- package/src/kitty-graphics.test.ts +0 -139
- package/src/kitty-graphics.ts +0 -79
- package/src/locator-selector.test.ts +0 -119
- package/src/mcp-client.ts +0 -78
- package/src/mcp.ts +0 -629
- package/src/on-mouse-action.test.ts +0 -226
- package/src/options-page.test.ts +0 -839
- package/src/package-paths.ts +0 -38
- package/src/page-markdown.ts +0 -240
- package/src/performance-examples.ts +0 -186
- package/src/playwright-import.ts +0 -59
- package/src/popup-relocation.test.ts +0 -163
- package/src/product-paths.test.ts +0 -47
- package/src/product-paths.ts +0 -28
- package/src/protocol.test.ts +0 -52
- package/src/protocol.ts +0 -351
- package/src/react-source.ts +0 -379
- package/src/relay-client.test.ts +0 -375
- package/src/relay-client.ts +0 -572
- package/src/relay-core.test.ts +0 -1603
- package/src/relay-navigation.test.ts +0 -790
- package/src/relay-session.test.ts +0 -1375
- package/src/relay-state.test.ts +0 -729
- package/src/relay-state.ts +0 -561
- package/src/replay-ai-index.test.ts +0 -278
- package/src/replay-ai-index.ts +0 -872
- package/src/replay-cli.test.ts +0 -325
- package/src/replay-eval.ts +0 -1039
- package/src/replay-handoff.test.ts +0 -163
- package/src/replay-handoff.ts +0 -109
- package/src/replay-workflow-compiler.test.ts +0 -250
- package/src/replay-workflow-compiler.ts +0 -700
- package/src/resource.md +0 -409
- package/src/rrweb-recording-relay.test.ts +0 -99
- package/src/rrweb-recording-relay.ts +0 -400
- package/src/rrweb-recording.ts +0 -322
- package/src/scoped-fs.test.ts +0 -80
- package/src/scoped-fs.ts +0 -420
- package/src/skill-stub.test.ts +0 -24
- package/src/snapshot-tools.test.ts +0 -1017
- package/src/snapshots/hacker-news-accessibility-full.md +0 -81
- package/src/snapshots/hacker-news-accessibility-interactive.md +0 -43
- package/src/snapshots/page-markdown-output.txt +0 -16
- package/src/snapshots/shadcn-ui-accessibility-full.md +0 -201
- package/src/snapshots/shadcn-ui-accessibility-interactive.md +0 -109
- package/src/start-relay-server.ts +0 -69
- package/src/styles-examples.ts +0 -84
- package/src/styles.ts +0 -343
- package/src/tabwright-agent-skill.test.ts +0 -61
- package/src/tabwright-agent-skill.ts +0 -105
- package/src/test-declarations.ts +0 -13
- package/src/test-utils.test.ts +0 -70
- package/src/test-utils.ts +0 -566
- package/src/utils.ts +0 -78
- package/src/wait-for-page-load.ts +0 -198
- package/src/workflow-capability.ts +0 -417
- package/src/workflow-script-flow.test.ts +0 -388
package/src/scoped-fs.ts
DELETED
|
@@ -1,420 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs'
|
|
2
|
-
import path from 'node:path'
|
|
3
|
-
import os from 'node:os'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* A sandboxed fs wrapper that restricts all file operations to allowed directories.
|
|
7
|
-
* Any attempt to access files outside the allowed directories will throw an EPERM error.
|
|
8
|
-
*
|
|
9
|
-
* By default, allows access to:
|
|
10
|
-
* - The base directory captured when the sandbox is created
|
|
11
|
-
* - /tmp
|
|
12
|
-
* - os.tmpdir()
|
|
13
|
-
*
|
|
14
|
-
* This is used in the MCP VM context to prevent agents from accessing sensitive system files.
|
|
15
|
-
*/
|
|
16
|
-
export class ScopedFS {
|
|
17
|
-
private allowedDirs: string[]
|
|
18
|
-
private baseDir: string
|
|
19
|
-
|
|
20
|
-
constructor(allowedDirs?: string[], baseDir?: string) {
|
|
21
|
-
this.baseDir = path.resolve(baseDir || process.cwd())
|
|
22
|
-
|
|
23
|
-
// Default allowed directories: session cwd, /tmp, os.tmpdir()
|
|
24
|
-
const defaultDirs = [this.baseDir, '/tmp', os.tmpdir()]
|
|
25
|
-
|
|
26
|
-
// Use provided dirs or defaults, resolve all to absolute paths
|
|
27
|
-
const dirs = allowedDirs ?? defaultDirs
|
|
28
|
-
this.allowedDirs = [...new Set(dirs.map((d) => path.resolve(d)))]
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Check if a resolved path is within any of the allowed directories.
|
|
33
|
-
*/
|
|
34
|
-
private isPathAllowed(resolved: string): boolean {
|
|
35
|
-
return this.allowedDirs.some((dir) => {
|
|
36
|
-
return resolved === dir || resolved.startsWith(dir + path.sep)
|
|
37
|
-
})
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Resolve a path and ensure it stays within allowed directories.
|
|
42
|
-
* Throws EPERM if the resolved path escapes the sandbox.
|
|
43
|
-
*/
|
|
44
|
-
private resolvePath(filePath: string): string {
|
|
45
|
-
// If it's an absolute path, use it directly
|
|
46
|
-
// If it's relative, resolve from the session cwd captured when the sandbox was created.
|
|
47
|
-
const resolved = path.isAbsolute(filePath) ? path.resolve(filePath) : path.resolve(this.baseDir, filePath)
|
|
48
|
-
|
|
49
|
-
if (!this.isPathAllowed(resolved)) {
|
|
50
|
-
const error = new Error(
|
|
51
|
-
`EPERM: operation not permitted, access outside allowed directories: ${filePath}`,
|
|
52
|
-
) as NodeJS.ErrnoException
|
|
53
|
-
error.code = 'EPERM'
|
|
54
|
-
error.errno = -1
|
|
55
|
-
error.syscall = 'access'
|
|
56
|
-
error.path = filePath
|
|
57
|
-
throw error
|
|
58
|
-
}
|
|
59
|
-
return resolved
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Sync methods
|
|
63
|
-
|
|
64
|
-
readFileSync = (filePath: fs.PathOrFileDescriptor, options?: any): any => {
|
|
65
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
66
|
-
return fs.readFileSync(resolved, options)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
writeFileSync = (filePath: fs.PathOrFileDescriptor, data: any, options?: any): void => {
|
|
70
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
71
|
-
fs.writeFileSync(resolved, data, options)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
appendFileSync = (filePath: fs.PathOrFileDescriptor, data: any, options?: any): void => {
|
|
75
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
76
|
-
fs.appendFileSync(resolved, data, options)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
readdirSync = (dirPath: fs.PathLike, options?: any): any => {
|
|
80
|
-
const resolved = this.resolvePath(dirPath.toString())
|
|
81
|
-
return fs.readdirSync(resolved, options)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
mkdirSync = (dirPath: fs.PathLike, options?: any): any => {
|
|
85
|
-
const resolved = this.resolvePath(dirPath.toString())
|
|
86
|
-
return fs.mkdirSync(resolved, options)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
rmdirSync = (dirPath: fs.PathLike, options?: any): void => {
|
|
90
|
-
const resolved = this.resolvePath(dirPath.toString())
|
|
91
|
-
fs.rmdirSync(resolved, options)
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
unlinkSync = (filePath: fs.PathLike): void => {
|
|
95
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
96
|
-
fs.unlinkSync(resolved)
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
statSync = (filePath: fs.PathLike, options?: any): any => {
|
|
100
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
101
|
-
return fs.statSync(resolved, options)
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
lstatSync = (filePath: fs.PathLike, options?: any): any => {
|
|
105
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
106
|
-
return fs.lstatSync(resolved, options)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
existsSync = (filePath: fs.PathLike): boolean => {
|
|
110
|
-
try {
|
|
111
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
112
|
-
return fs.existsSync(resolved)
|
|
113
|
-
} catch {
|
|
114
|
-
return false
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
accessSync = (filePath: fs.PathLike, mode?: number): void => {
|
|
119
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
120
|
-
fs.accessSync(resolved, mode)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
copyFileSync = (src: fs.PathLike, dest: fs.PathLike, mode?: number): void => {
|
|
124
|
-
const resolvedSrc = this.resolvePath(src.toString())
|
|
125
|
-
const resolvedDest = this.resolvePath(dest.toString())
|
|
126
|
-
fs.copyFileSync(resolvedSrc, resolvedDest, mode)
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
renameSync = (oldPath: fs.PathLike, newPath: fs.PathLike): void => {
|
|
130
|
-
const resolvedOld = this.resolvePath(oldPath.toString())
|
|
131
|
-
const resolvedNew = this.resolvePath(newPath.toString())
|
|
132
|
-
fs.renameSync(resolvedOld, resolvedNew)
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
chmodSync = (filePath: fs.PathLike, mode: fs.Mode): void => {
|
|
136
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
137
|
-
fs.chmodSync(resolved, mode)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
chownSync = (filePath: fs.PathLike, uid: number, gid: number): void => {
|
|
141
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
142
|
-
fs.chownSync(resolved, uid, gid)
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
utimesSync = (filePath: fs.PathLike, atime: fs.TimeLike, mtime: fs.TimeLike): void => {
|
|
146
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
147
|
-
fs.utimesSync(resolved, atime, mtime)
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
realpathSync = (filePath: fs.PathLike, options?: any): any => {
|
|
151
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
152
|
-
const real = fs.realpathSync(resolved, options)
|
|
153
|
-
// Verify the real path is also within allowed directories (handles symlinks)
|
|
154
|
-
const realStr = real.toString()
|
|
155
|
-
if (!this.isPathAllowed(realStr)) {
|
|
156
|
-
const error = new Error(
|
|
157
|
-
`EPERM: operation not permitted, realpath escapes allowed directories`,
|
|
158
|
-
) as NodeJS.ErrnoException
|
|
159
|
-
error.code = 'EPERM'
|
|
160
|
-
throw error
|
|
161
|
-
}
|
|
162
|
-
return real
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
readlinkSync = (filePath: fs.PathLike, options?: any): any => {
|
|
166
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
167
|
-
return fs.readlinkSync(resolved, options)
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
symlinkSync = (target: fs.PathLike, linkPath: fs.PathLike, type?: fs.symlink.Type | null): void => {
|
|
171
|
-
const resolvedLink = this.resolvePath(linkPath.toString())
|
|
172
|
-
// Target is relative to link location, resolve it to check bounds
|
|
173
|
-
const linkDir = path.dirname(resolvedLink)
|
|
174
|
-
const resolvedTarget = path.resolve(linkDir, target.toString())
|
|
175
|
-
if (!this.isPathAllowed(resolvedTarget)) {
|
|
176
|
-
const error = new Error(
|
|
177
|
-
`EPERM: operation not permitted, symlink target outside allowed directories`,
|
|
178
|
-
) as NodeJS.ErrnoException
|
|
179
|
-
error.code = 'EPERM'
|
|
180
|
-
throw error
|
|
181
|
-
}
|
|
182
|
-
fs.symlinkSync(target, resolvedLink, type)
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
rmSync = (filePath: fs.PathLike, options?: fs.RmOptions): void => {
|
|
186
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
187
|
-
fs.rmSync(resolved, options)
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// Async callback methods
|
|
191
|
-
|
|
192
|
-
readFile = (filePath: any, ...args: any[]): void => {
|
|
193
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
194
|
-
;(fs.readFile as any)(resolved, ...args)
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
writeFile = (filePath: any, data: any, ...args: any[]): void => {
|
|
198
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
199
|
-
;(fs.writeFile as any)(resolved, data, ...args)
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
appendFile = (filePath: any, data: any, ...args: any[]): void => {
|
|
203
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
204
|
-
;(fs.appendFile as any)(resolved, data, ...args)
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
readdir = (dirPath: any, ...args: any[]): void => {
|
|
208
|
-
const resolved = this.resolvePath(dirPath.toString())
|
|
209
|
-
;(fs.readdir as any)(resolved, ...args)
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
mkdir = (dirPath: any, ...args: any[]): void => {
|
|
213
|
-
const resolved = this.resolvePath(dirPath.toString())
|
|
214
|
-
;(fs.mkdir as any)(resolved, ...args)
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
rmdir = (dirPath: any, ...args: any[]): void => {
|
|
218
|
-
const resolved = this.resolvePath(dirPath.toString())
|
|
219
|
-
;(fs.rmdir as any)(resolved, ...args)
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
unlink = (filePath: any, callback: any): void => {
|
|
223
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
224
|
-
fs.unlink(resolved, callback)
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
stat = (filePath: any, ...args: any[]): void => {
|
|
228
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
229
|
-
;(fs.stat as any)(resolved, ...args)
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
lstat = (filePath: any, ...args: any[]): void => {
|
|
233
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
234
|
-
;(fs.lstat as any)(resolved, ...args)
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
access = (filePath: any, ...args: any[]): void => {
|
|
238
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
239
|
-
;(fs.access as any)(resolved, ...args)
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
copyFile = (src: any, dest: any, ...args: any[]): void => {
|
|
243
|
-
const resolvedSrc = this.resolvePath(src.toString())
|
|
244
|
-
const resolvedDest = this.resolvePath(dest.toString())
|
|
245
|
-
;(fs.copyFile as any)(resolvedSrc, resolvedDest, ...args)
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
rename = (oldPath: any, newPath: any, callback: any): void => {
|
|
249
|
-
const resolvedOld = this.resolvePath(oldPath.toString())
|
|
250
|
-
const resolvedNew = this.resolvePath(newPath.toString())
|
|
251
|
-
fs.rename(resolvedOld, resolvedNew, callback)
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
chmod = (filePath: any, mode: any, callback: any): void => {
|
|
255
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
256
|
-
fs.chmod(resolved, mode, callback)
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
chown = (filePath: any, uid: any, gid: any, callback: any): void => {
|
|
260
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
261
|
-
fs.chown(resolved, uid, gid, callback)
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
rm = (filePath: any, ...args: any[]): void => {
|
|
265
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
266
|
-
;(fs.rm as any)(resolved, ...args)
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
exists = (filePath: any, callback: any): void => {
|
|
270
|
-
try {
|
|
271
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
272
|
-
fs.exists(resolved, callback)
|
|
273
|
-
} catch {
|
|
274
|
-
callback(false)
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
// Stream methods
|
|
279
|
-
|
|
280
|
-
createReadStream = (filePath: fs.PathLike, options?: any): fs.ReadStream => {
|
|
281
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
282
|
-
return fs.createReadStream(resolved, options)
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
createWriteStream = (filePath: fs.PathLike, options?: any): fs.WriteStream => {
|
|
286
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
287
|
-
return fs.createWriteStream(resolved, options)
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
// Watch methods
|
|
291
|
-
|
|
292
|
-
watch = (filePath: any, ...args: any[]): fs.FSWatcher => {
|
|
293
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
294
|
-
return (fs.watch as any)(resolved, ...args)
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
watchFile = (filePath: any, ...args: any[]): fs.StatWatcher => {
|
|
298
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
299
|
-
return (fs.watchFile as any)(resolved, ...args)
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
unwatchFile = (filePath: any, listener?: any): void => {
|
|
303
|
-
const resolved = this.resolvePath(filePath.toString())
|
|
304
|
-
fs.unwatchFile(resolved, listener)
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
// Promise-based API (fs.promises equivalent)
|
|
308
|
-
get promises() {
|
|
309
|
-
const self = this
|
|
310
|
-
return {
|
|
311
|
-
readFile: async (filePath: fs.PathLike, options?: any) => {
|
|
312
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
313
|
-
return fs.promises.readFile(resolved, options)
|
|
314
|
-
},
|
|
315
|
-
writeFile: async (filePath: fs.PathLike, data: any, options?: any) => {
|
|
316
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
317
|
-
return fs.promises.writeFile(resolved, data, options)
|
|
318
|
-
},
|
|
319
|
-
appendFile: async (filePath: fs.PathLike, data: any, options?: any) => {
|
|
320
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
321
|
-
return fs.promises.appendFile(resolved, data, options)
|
|
322
|
-
},
|
|
323
|
-
readdir: async (dirPath: fs.PathLike, options?: any) => {
|
|
324
|
-
const resolved = self.resolvePath(dirPath.toString())
|
|
325
|
-
return fs.promises.readdir(resolved, options)
|
|
326
|
-
},
|
|
327
|
-
mkdir: async (dirPath: fs.PathLike, options?: any) => {
|
|
328
|
-
const resolved = self.resolvePath(dirPath.toString())
|
|
329
|
-
return fs.promises.mkdir(resolved, options)
|
|
330
|
-
},
|
|
331
|
-
rmdir: async (dirPath: fs.PathLike, options?: any) => {
|
|
332
|
-
const resolved = self.resolvePath(dirPath.toString())
|
|
333
|
-
return fs.promises.rmdir(resolved, options)
|
|
334
|
-
},
|
|
335
|
-
unlink: async (filePath: fs.PathLike) => {
|
|
336
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
337
|
-
return fs.promises.unlink(resolved)
|
|
338
|
-
},
|
|
339
|
-
stat: async (filePath: fs.PathLike, options?: any) => {
|
|
340
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
341
|
-
return fs.promises.stat(resolved, options)
|
|
342
|
-
},
|
|
343
|
-
lstat: async (filePath: fs.PathLike, options?: any) => {
|
|
344
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
345
|
-
return fs.promises.lstat(resolved, options)
|
|
346
|
-
},
|
|
347
|
-
access: async (filePath: fs.PathLike, mode?: number) => {
|
|
348
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
349
|
-
return fs.promises.access(resolved, mode)
|
|
350
|
-
},
|
|
351
|
-
copyFile: async (src: fs.PathLike, dest: fs.PathLike, mode?: number) => {
|
|
352
|
-
const resolved = self.resolvePath(src.toString())
|
|
353
|
-
const resolvedDest = self.resolvePath(dest.toString())
|
|
354
|
-
return fs.promises.copyFile(resolved, resolvedDest, mode)
|
|
355
|
-
},
|
|
356
|
-
rename: async (oldPath: fs.PathLike, newPath: fs.PathLike) => {
|
|
357
|
-
const resolvedOld = self.resolvePath(oldPath.toString())
|
|
358
|
-
const resolvedNew = self.resolvePath(newPath.toString())
|
|
359
|
-
return fs.promises.rename(resolvedOld, resolvedNew)
|
|
360
|
-
},
|
|
361
|
-
chmod: async (filePath: fs.PathLike, mode: fs.Mode) => {
|
|
362
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
363
|
-
return fs.promises.chmod(resolved, mode)
|
|
364
|
-
},
|
|
365
|
-
chown: async (filePath: fs.PathLike, uid: number, gid: number) => {
|
|
366
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
367
|
-
return fs.promises.chown(resolved, uid, gid)
|
|
368
|
-
},
|
|
369
|
-
rm: async (filePath: fs.PathLike, options?: fs.RmOptions) => {
|
|
370
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
371
|
-
return fs.promises.rm(resolved, options)
|
|
372
|
-
},
|
|
373
|
-
realpath: async (filePath: fs.PathLike, options?: any) => {
|
|
374
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
375
|
-
const real = await fs.promises.realpath(resolved, options)
|
|
376
|
-
const realStr = real.toString()
|
|
377
|
-
if (!self.isPathAllowed(realStr)) {
|
|
378
|
-
const error = new Error(
|
|
379
|
-
`EPERM: operation not permitted, realpath escapes allowed directories`,
|
|
380
|
-
) as NodeJS.ErrnoException
|
|
381
|
-
error.code = 'EPERM'
|
|
382
|
-
throw error
|
|
383
|
-
}
|
|
384
|
-
return real
|
|
385
|
-
},
|
|
386
|
-
readlink: async (filePath: fs.PathLike, options?: any) => {
|
|
387
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
388
|
-
return fs.promises.readlink(resolved, options)
|
|
389
|
-
},
|
|
390
|
-
symlink: async (target: fs.PathLike, linkPath: fs.PathLike, type?: string) => {
|
|
391
|
-
const resolvedLink = self.resolvePath(linkPath.toString())
|
|
392
|
-
const linkDir = path.dirname(resolvedLink)
|
|
393
|
-
const resolvedTarget = path.resolve(linkDir, target.toString())
|
|
394
|
-
if (!self.isPathAllowed(resolvedTarget)) {
|
|
395
|
-
const error = new Error(
|
|
396
|
-
`EPERM: operation not permitted, symlink target outside allowed directories`,
|
|
397
|
-
) as NodeJS.ErrnoException
|
|
398
|
-
error.code = 'EPERM'
|
|
399
|
-
throw error
|
|
400
|
-
}
|
|
401
|
-
return fs.promises.symlink(target, resolvedLink, type as any)
|
|
402
|
-
},
|
|
403
|
-
utimes: async (filePath: fs.PathLike, atime: fs.TimeLike, mtime: fs.TimeLike) => {
|
|
404
|
-
const resolved = self.resolvePath(filePath.toString())
|
|
405
|
-
return fs.promises.utimes(resolved, atime, mtime)
|
|
406
|
-
},
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
// Constants passthrough
|
|
411
|
-
constants = fs.constants
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Create a scoped fs instance with allowed directories.
|
|
416
|
-
* Defaults to the captured base directory, /tmp, and os.tmpdir() if no directories specified.
|
|
417
|
-
*/
|
|
418
|
-
export function createScopedFS(allowedDirs?: string[], baseDir?: string): ScopedFS {
|
|
419
|
-
return new ScopedFS(allowedDirs, baseDir)
|
|
420
|
-
}
|
package/src/skill-stub.test.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs'
|
|
2
|
-
import path from 'node:path'
|
|
3
|
-
import { fileURLToPath } from 'node:url'
|
|
4
|
-
import { describe, expect, test } from 'vitest'
|
|
5
|
-
|
|
6
|
-
const currentDir = path.dirname(fileURLToPath(import.meta.url))
|
|
7
|
-
const skillPath = path.resolve(currentDir, '..', '..', 'skills', 'tabwright', 'SKILL.md')
|
|
8
|
-
|
|
9
|
-
describe('Tabwright installed skill', () => {
|
|
10
|
-
test('keeps the mandatory browser protocol compact and self-contained', () => {
|
|
11
|
-
const content = fs.readFileSync(skillPath, 'utf-8')
|
|
12
|
-
const words = content.split(/\s+/).filter((word) => {
|
|
13
|
-
return word.length > 0
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
expect(words.length).toBeLessThan(2500)
|
|
17
|
-
expect(content).toContain('## Browser Core Protocol')
|
|
18
|
-
expect(content).toContain('Never reuse an existing session')
|
|
19
|
-
expect(content).toContain('Never call `browser.close()` or `context.close()`')
|
|
20
|
-
expect(content).toContain("tabwright skill | rg -n -C 20")
|
|
21
|
-
expect(content).toContain("tabwright skill | Select-String")
|
|
22
|
-
expect(content).not.toContain('Read the ENTIRE output')
|
|
23
|
-
})
|
|
24
|
-
})
|