tabwright 1.0.0 → 2.0.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/dist/agent-skills/tabwright/SKILL.md +3 -0
- 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 +5 -5
- 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/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 +47 -2
- 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 +10 -56
- 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 +10 -6
- package/dist/extension/manifest.json +1 -1
- package/dist/extension/options.js +1 -1
- package/dist/extension/rrweb-recorder.js +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 +4 -4
- 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 +2 -2
- 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 +8 -4
- package/readme.md +43 -0
- package/src/skill.md +5 -2
- 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 +0 -28
- package/dist/builtin-capabilities.d.ts.map +0 -1
- package/dist/builtin-capabilities.js +0 -2673
- 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/agent-skills/conan-config/SKILL.md +0 -141
- package/src/agent-skills/conan-config/agents/openai.yaml +0 -4
- 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
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { describe, expect, test } from 'vitest'
|
|
2
|
-
import { buildKittySequence, canEmitKittyGraphics } from './kitty-graphics.js'
|
|
3
|
-
|
|
4
|
-
// Minimal valid PNG (1x1 transparent pixel) as base64
|
|
5
|
-
const TINY_PNG_B64 =
|
|
6
|
-
'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=='
|
|
7
|
-
|
|
8
|
-
describe('kitty-graphics', () => {
|
|
9
|
-
describe('canEmitKittyGraphics', () => {
|
|
10
|
-
test('returns false when AGENT_GRAPHICS is not set', () => {
|
|
11
|
-
const prev = process.env.AGENT_GRAPHICS
|
|
12
|
-
delete process.env.AGENT_GRAPHICS
|
|
13
|
-
expect(canEmitKittyGraphics()).toBe(false)
|
|
14
|
-
if (prev !== undefined) {
|
|
15
|
-
process.env.AGENT_GRAPHICS = prev
|
|
16
|
-
}
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
test('returns true when AGENT_GRAPHICS=kitty', () => {
|
|
20
|
-
const prev = process.env.AGENT_GRAPHICS
|
|
21
|
-
process.env.AGENT_GRAPHICS = 'kitty'
|
|
22
|
-
expect(canEmitKittyGraphics()).toBe(true)
|
|
23
|
-
if (prev !== undefined) {
|
|
24
|
-
process.env.AGENT_GRAPHICS = prev
|
|
25
|
-
} else {
|
|
26
|
-
delete process.env.AGENT_GRAPHICS
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
test('returns true when AGENT_GRAPHICS contains kitty among others', () => {
|
|
31
|
-
const prev = process.env.AGENT_GRAPHICS
|
|
32
|
-
process.env.AGENT_GRAPHICS = 'kitty,iterm2'
|
|
33
|
-
expect(canEmitKittyGraphics()).toBe(true)
|
|
34
|
-
if (prev !== undefined) {
|
|
35
|
-
process.env.AGENT_GRAPHICS = prev
|
|
36
|
-
} else {
|
|
37
|
-
delete process.env.AGENT_GRAPHICS
|
|
38
|
-
}
|
|
39
|
-
})
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
describe('buildKittySequence', () => {
|
|
43
|
-
test('small payload produces single escape sequence', () => {
|
|
44
|
-
const result = buildKittySequence({ base64: 'AAAA' })
|
|
45
|
-
expect(result).toMatchInlineSnapshot(`"_Ga=T,f=100;AAAA\\"`)
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
test('sequence starts with APC and ends with ST', () => {
|
|
49
|
-
const result = buildKittySequence({ base64: 'AAAA' })
|
|
50
|
-
expect(result.startsWith('\x1b_G')).toBe(true)
|
|
51
|
-
expect(result.endsWith('\x1b\\')).toBe(true)
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
test('real PNG base64 produces valid sequence', () => {
|
|
55
|
-
const result = buildKittySequence({ base64: TINY_PNG_B64 })
|
|
56
|
-
// Should be a single chunk (small payload)
|
|
57
|
-
expect(result).toContain('a=T,f=100')
|
|
58
|
-
expect(result).toContain(TINY_PNG_B64)
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
test('large payload is chunked at 4096 bytes', () => {
|
|
62
|
-
// Create a payload larger than 4096 bytes
|
|
63
|
-
const bigPayload = 'A'.repeat(10000)
|
|
64
|
-
const result = buildKittySequence({ base64: bigPayload })
|
|
65
|
-
|
|
66
|
-
// Should have multiple escape sequences
|
|
67
|
-
// First chunk: a=T,f=100,m=1
|
|
68
|
-
expect(result).toContain('a=T,f=100,m=1')
|
|
69
|
-
// Last chunk: m=0
|
|
70
|
-
expect(result).toContain('\x1b_Gm=0;')
|
|
71
|
-
// Should NOT contain single-shot a=T,f=100; (without m=)
|
|
72
|
-
expect(result).not.toMatch(/a=T,f=100;/)
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
test('three-chunk payload has correct structure', () => {
|
|
76
|
-
// 9000 bytes = 3 chunks: 4096 + 4096 + 808
|
|
77
|
-
const payload = 'B'.repeat(9000)
|
|
78
|
-
const result = buildKittySequence({ base64: payload })
|
|
79
|
-
|
|
80
|
-
const sequences = result.split('\x1b\\').filter(Boolean)
|
|
81
|
-
expect(sequences.length).toBe(3)
|
|
82
|
-
|
|
83
|
-
// First: a=T,f=100,m=1
|
|
84
|
-
expect(sequences[0]).toContain('a=T,f=100,m=1')
|
|
85
|
-
// Middle: m=1
|
|
86
|
-
expect(sequences[1]).toContain('\x1b_Gm=1;')
|
|
87
|
-
// Last: m=0
|
|
88
|
-
expect(sequences[2]).toContain('\x1b_Gm=0;')
|
|
89
|
-
})
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
describe('round-trip with kitty-graphics-agent parser', () => {
|
|
93
|
-
test('emitted sequence can be parsed back to extract the image', async () => {
|
|
94
|
-
// Dynamically import the parser to test round-trip
|
|
95
|
-
let extractKittyGraphics: typeof import('kitty-graphics-agent/parser').extractKittyGraphics
|
|
96
|
-
try {
|
|
97
|
-
const mod = await import('kitty-graphics-agent/parser')
|
|
98
|
-
extractKittyGraphics = mod.extractKittyGraphics
|
|
99
|
-
} catch {
|
|
100
|
-
// kitty-graphics-agent not installed, skip
|
|
101
|
-
console.log('kitty-graphics-agent not installed, skipping round-trip test')
|
|
102
|
-
return
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const sequence = buildKittySequence({ base64: TINY_PNG_B64 })
|
|
106
|
-
const output = `some text before\n${sequence}\nsome text after`
|
|
107
|
-
const result = extractKittyGraphics(output)
|
|
108
|
-
|
|
109
|
-
expect(result.cleanedOutput).toMatchInlineSnapshot(`
|
|
110
|
-
"some text before
|
|
111
|
-
|
|
112
|
-
some text after"
|
|
113
|
-
`)
|
|
114
|
-
expect(result.images.length).toBe(1)
|
|
115
|
-
expect(result.images[0].mime).toBe('image/png')
|
|
116
|
-
expect(result.images[0].data).toBe(TINY_PNG_B64)
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
test('chunked sequence round-trips correctly', async () => {
|
|
120
|
-
let extractKittyGraphics: typeof import('kitty-graphics-agent/parser').extractKittyGraphics
|
|
121
|
-
try {
|
|
122
|
-
const mod = await import('kitty-graphics-agent/parser')
|
|
123
|
-
extractKittyGraphics = mod.extractKittyGraphics
|
|
124
|
-
} catch {
|
|
125
|
-
console.log('kitty-graphics-agent not installed, skipping round-trip test')
|
|
126
|
-
return
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const bigPayload = 'A'.repeat(10000)
|
|
130
|
-
const sequence = buildKittySequence({ base64: bigPayload })
|
|
131
|
-
const result = extractKittyGraphics(sequence)
|
|
132
|
-
|
|
133
|
-
expect(result.cleanedOutput).toBe('')
|
|
134
|
-
expect(result.images.length).toBe(1)
|
|
135
|
-
expect(result.images[0].mime).toBe('image/png')
|
|
136
|
-
expect(result.images[0].data).toBe(bigPayload)
|
|
137
|
-
})
|
|
138
|
-
})
|
|
139
|
-
})
|
package/src/kitty-graphics.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
// Kitty Graphics Protocol emitter for CLI output.
|
|
2
|
-
// Emits base64-encoded PNG images as APC escape sequences so agents with
|
|
3
|
-
// kitty-graphics-agent (or compatible parsers) can extract and pass them
|
|
4
|
-
// to LLMs as media parts.
|
|
5
|
-
//
|
|
6
|
-
// Protocol format:
|
|
7
|
-
// \x1b_G<control_data>;<base64_payload>\x1b\\
|
|
8
|
-
//
|
|
9
|
-
// Only emits when AGENT_GRAPHICS env var contains 'kitty', signaling that
|
|
10
|
-
// an agent is intercepting stdout and can handle Kitty Graphics Protocol.
|
|
11
|
-
// See: https://github.com/remorses/kitty-graphics-agent
|
|
12
|
-
|
|
13
|
-
// Kitty spec recommends max 4096 bytes per chunk payload
|
|
14
|
-
const CHUNK_SIZE = 4096
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Check if the current environment supports Kitty Graphics Protocol output.
|
|
18
|
-
* Returns true when AGENT_GRAPHICS=kitty is set (agent is intercepting stdout).
|
|
19
|
-
*/
|
|
20
|
-
export function canEmitKittyGraphics(): boolean {
|
|
21
|
-
return process.env.AGENT_GRAPHICS?.includes('kitty') ?? false
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Emit a PNG image to stdout using the Kitty Graphics Protocol.
|
|
26
|
-
* The image is chunked per the spec (4096 bytes per chunk).
|
|
27
|
-
*
|
|
28
|
-
* Only call this when canEmitKittyGraphics() returns true.
|
|
29
|
-
*/
|
|
30
|
-
export function emitKittyImage({ base64 }: { base64: string }): void {
|
|
31
|
-
const chunks = splitIntoChunks(base64, CHUNK_SIZE)
|
|
32
|
-
|
|
33
|
-
if (chunks.length === 1) {
|
|
34
|
-
// Single chunk: no chunked transfer needed
|
|
35
|
-
process.stdout.write(`\x1b_Ga=T,f=100;${chunks[0]}\x1b\\`)
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Multi-chunk: first chunk has full control data + m=1,
|
|
40
|
-
// continuation chunks have only m=1, last chunk has m=0
|
|
41
|
-
for (let i = 0; i < chunks.length; i++) {
|
|
42
|
-
const isFirst = i === 0
|
|
43
|
-
const isLast = i === chunks.length - 1
|
|
44
|
-
const control = isFirst ? 'a=T,f=100,m=1' : isLast ? 'm=0' : 'm=1'
|
|
45
|
-
process.stdout.write(`\x1b_G${control};${chunks[i]}\x1b\\`)
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function splitIntoChunks(str: string, size: number): string[] {
|
|
50
|
-
if (str.length <= size) {
|
|
51
|
-
return [str]
|
|
52
|
-
}
|
|
53
|
-
const chunks: string[] = []
|
|
54
|
-
for (let i = 0; i < str.length; i += size) {
|
|
55
|
-
chunks.push(str.slice(i, i + size))
|
|
56
|
-
}
|
|
57
|
-
return chunks
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Build the raw Kitty Graphics escape sequence string for a PNG image.
|
|
62
|
-
* Useful for testing without writing to stdout.
|
|
63
|
-
*/
|
|
64
|
-
export function buildKittySequence({ base64 }: { base64: string }): string {
|
|
65
|
-
const chunks = splitIntoChunks(base64, CHUNK_SIZE)
|
|
66
|
-
|
|
67
|
-
if (chunks.length === 1) {
|
|
68
|
-
return `\x1b_Ga=T,f=100;${chunks[0]}\x1b\\`
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const parts: string[] = []
|
|
72
|
-
for (let i = 0; i < chunks.length; i++) {
|
|
73
|
-
const isFirst = i === 0
|
|
74
|
-
const isLast = i === chunks.length - 1
|
|
75
|
-
const control = isFirst ? 'a=T,f=100,m=1' : isLast ? 'm=0' : 'm=1'
|
|
76
|
-
parts.push(`\x1b_G${control};${chunks[i]}\x1b\\`)
|
|
77
|
-
}
|
|
78
|
-
return parts.join('')
|
|
79
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
// Tests for Locator.selector() — verifies the raw selector strings returned
|
|
2
|
-
// by various locator creation methods (getByRole, locator, getByText, etc.)
|
|
3
|
-
|
|
4
|
-
import { describe, it, expect, beforeAll, afterAll } from 'vitest'
|
|
5
|
-
import { chromium, type Page, type Browser } from '@xmorse/playwright-core'
|
|
6
|
-
import { getLocalChromeExecutable } from './test-utils.js'
|
|
7
|
-
|
|
8
|
-
const HTML = `<!DOCTYPE html>
|
|
9
|
-
<html>
|
|
10
|
-
<body>
|
|
11
|
-
<div id="main">
|
|
12
|
-
<button>Submit</button>
|
|
13
|
-
<button>Cancel</button>
|
|
14
|
-
<button class="primary">Save</button>
|
|
15
|
-
<input type="text" placeholder="Enter name" />
|
|
16
|
-
<input type="email" placeholder="Enter email" />
|
|
17
|
-
<a href="/about">About Us</a>
|
|
18
|
-
<h1>Page Title</h1>
|
|
19
|
-
<p>Some paragraph text</p>
|
|
20
|
-
<div class="card">
|
|
21
|
-
<span>Card content</span>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="card">
|
|
24
|
-
<span>Another card</span>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="card">
|
|
27
|
-
<span>Third card</span>
|
|
28
|
-
</div>
|
|
29
|
-
<label for="age">Age</label>
|
|
30
|
-
<input id="age" type="number" />
|
|
31
|
-
<img alt="Logo" src="/logo.png" />
|
|
32
|
-
<div data-testid="dashboard">Dashboard</div>
|
|
33
|
-
</div>
|
|
34
|
-
</body>
|
|
35
|
-
</html>`
|
|
36
|
-
|
|
37
|
-
describe('Locator.selector()', () => {
|
|
38
|
-
let browser: Browser
|
|
39
|
-
let page: Page
|
|
40
|
-
|
|
41
|
-
beforeAll(async () => {
|
|
42
|
-
const chromeExecutable = getLocalChromeExecutable()
|
|
43
|
-
browser = await chromium.launch(
|
|
44
|
-
chromeExecutable ? { executablePath: chromeExecutable, headless: true } : { channel: 'chromium', headless: true },
|
|
45
|
-
)
|
|
46
|
-
const context = await browser.newContext()
|
|
47
|
-
page = await context.newPage()
|
|
48
|
-
await page.setContent(HTML)
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
afterAll(async () => {
|
|
52
|
-
await browser.close()
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
it('CSS selectors', () => {
|
|
56
|
-
expect(page.locator('#main').selector()).toMatchInlineSnapshot(`"#main"`)
|
|
57
|
-
expect(page.locator('.card').selector()).toMatchInlineSnapshot(`".card"`)
|
|
58
|
-
expect(page.locator('button').selector()).toMatchInlineSnapshot(`"button"`)
|
|
59
|
-
expect(page.locator('div.card > span').selector()).toMatchInlineSnapshot(`"div.card > span"`)
|
|
60
|
-
expect(page.locator('#main .card:first-child').selector()).toMatchInlineSnapshot(`"#main .card:first-child"`)
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
it('getByRole', () => {
|
|
64
|
-
expect(page.getByRole('button').selector()).toMatchInlineSnapshot(`"internal:role=button"`)
|
|
65
|
-
expect(page.getByRole('button', { name: 'Submit' }).selector()).toMatchInlineSnapshot(`"internal:role=button[name="Submit"i]"`)
|
|
66
|
-
expect(page.getByRole('link').selector()).toMatchInlineSnapshot(`"internal:role=link"`)
|
|
67
|
-
expect(page.getByRole('heading').selector()).toMatchInlineSnapshot(`"internal:role=heading"`)
|
|
68
|
-
expect(page.getByRole('textbox').selector()).toMatchInlineSnapshot(`"internal:role=textbox"`)
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
it('getByText', () => {
|
|
72
|
-
expect(page.getByText('Submit').selector()).toMatchInlineSnapshot(`"internal:text="Submit"i"`)
|
|
73
|
-
expect(page.getByText('Some paragraph').selector()).toMatchInlineSnapshot(`"internal:text="Some paragraph"i"`)
|
|
74
|
-
expect(page.getByText(/card/i).selector()).toMatchInlineSnapshot(`"internal:text=/card/i"`)
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
it('getByPlaceholder', () => {
|
|
78
|
-
expect(page.getByPlaceholder('Enter name').selector()).toMatchInlineSnapshot(`"internal:attr=[placeholder="Enter name"i]"`)
|
|
79
|
-
expect(page.getByPlaceholder('Enter email').selector()).toMatchInlineSnapshot(`"internal:attr=[placeholder="Enter email"i]"`)
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
it('getByLabel', () => {
|
|
83
|
-
expect(page.getByLabel('Age').selector()).toMatchInlineSnapshot(`"internal:label="Age"i"`)
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
it('getByAltText', () => {
|
|
87
|
-
expect(page.getByAltText('Logo').selector()).toMatchInlineSnapshot(`"internal:attr=[alt="Logo"i]"`)
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
it('getByTestId', () => {
|
|
91
|
-
expect(page.getByTestId('dashboard').selector()).toMatchInlineSnapshot(`"internal:testid=[data-testid="dashboard"s]"`)
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
it('chained locators', () => {
|
|
95
|
-
expect(page.locator('#main').locator('.card').selector()).toMatchInlineSnapshot(`"#main >> .card"`)
|
|
96
|
-
expect(page.locator('.card').first().selector()).toMatchInlineSnapshot(`".card >> nth=0"`)
|
|
97
|
-
expect(page.locator('.card').last().selector()).toMatchInlineSnapshot(`".card >> nth=-1"`)
|
|
98
|
-
expect(page.locator('.card').nth(1).selector()).toMatchInlineSnapshot(`".card >> nth=1"`)
|
|
99
|
-
})
|
|
100
|
-
|
|
101
|
-
it('filtered locators', () => {
|
|
102
|
-
expect(page.locator('button').filter({ hasText: 'Save' }).selector()).toMatchInlineSnapshot(`"button >> internal:has-text="Save"i"`)
|
|
103
|
-
expect(page.locator('div').filter({ has: page.locator('span') }).selector()).toMatchInlineSnapshot(`"div >> internal:has="span""`)
|
|
104
|
-
expect(page.locator('button').filter({ hasNotText: 'Cancel' }).selector()).toMatchInlineSnapshot(`"button >> internal:has-not-text="Cancel"i"`)
|
|
105
|
-
})
|
|
106
|
-
|
|
107
|
-
it('described locators', () => {
|
|
108
|
-
expect(page.locator('button').describe('main action button').selector()).toMatchInlineSnapshot(`"button >> internal:describe="main action button""`)
|
|
109
|
-
})
|
|
110
|
-
|
|
111
|
-
it('combined with and/or', () => {
|
|
112
|
-
expect(
|
|
113
|
-
page.locator('button').and(page.locator('.primary')).selector(),
|
|
114
|
-
).toMatchInlineSnapshot(`"button >> internal:and=".primary""`)
|
|
115
|
-
expect(
|
|
116
|
-
page.locator('button').or(page.locator('a')).selector(),
|
|
117
|
-
).toMatchInlineSnapshot(`"button >> internal:or="a""`)
|
|
118
|
-
})
|
|
119
|
-
})
|
package/src/mcp-client.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { Client } from '@modelcontextprotocol/sdk/client/index.js'
|
|
2
|
-
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'
|
|
3
|
-
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js'
|
|
4
|
-
import { Stream } from 'node:stream'
|
|
5
|
-
import path from 'node:path'
|
|
6
|
-
import url from 'node:url'
|
|
7
|
-
|
|
8
|
-
const __filename = url.fileURLToPath(import.meta.url)
|
|
9
|
-
|
|
10
|
-
export interface CreateTransportOptions {
|
|
11
|
-
clientName?: string
|
|
12
|
-
port?: number
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export async function createTransport({ args = [], port }: { args?: string[]; port?: number } = {}): Promise<{
|
|
16
|
-
transport: Transport
|
|
17
|
-
stderr: Stream | null
|
|
18
|
-
}> {
|
|
19
|
-
const env: Record<string, string> = {
|
|
20
|
-
...(process.env as Record<string, string>),
|
|
21
|
-
DEBUG: 'tabwright:mcp:test',
|
|
22
|
-
DEBUG_COLORS: '0',
|
|
23
|
-
DEBUG_HIDE_DATE: '1',
|
|
24
|
-
}
|
|
25
|
-
if (port) {
|
|
26
|
-
env.PLAYWRITER_PORT = String(port)
|
|
27
|
-
}
|
|
28
|
-
const transport = new StdioClientTransport({
|
|
29
|
-
command: 'pnpm',
|
|
30
|
-
args: ['vite-node', path.join(path.dirname(__filename), 'cli.ts'), ...args],
|
|
31
|
-
cwd: path.join(path.dirname(__filename), '..'),
|
|
32
|
-
stderr: 'pipe',
|
|
33
|
-
env,
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
transport,
|
|
38
|
-
stderr: transport.stderr!,
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export async function createMCPClient(options?: CreateTransportOptions): Promise<{
|
|
43
|
-
client: Client
|
|
44
|
-
stderr: string
|
|
45
|
-
cleanup: () => Promise<void>
|
|
46
|
-
}> {
|
|
47
|
-
const client = new Client({
|
|
48
|
-
name: options?.clientName ?? 'test',
|
|
49
|
-
version: '1.0.0',
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
const { transport, stderr } = await createTransport({ port: options?.port })
|
|
53
|
-
|
|
54
|
-
let stderrBuffer = ''
|
|
55
|
-
stderr?.on('data', (data) => {
|
|
56
|
-
process.stderr.write(data)
|
|
57
|
-
|
|
58
|
-
stderrBuffer += data.toString()
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
await client.connect(transport)
|
|
62
|
-
await client.ping()
|
|
63
|
-
|
|
64
|
-
const cleanup = async () => {
|
|
65
|
-
try {
|
|
66
|
-
await client.close()
|
|
67
|
-
} catch (e) {
|
|
68
|
-
console.error('Error during MCP client cleanup:', e)
|
|
69
|
-
// Ignore errors during cleanup
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return {
|
|
74
|
-
client,
|
|
75
|
-
stderr: stderrBuffer,
|
|
76
|
-
cleanup,
|
|
77
|
-
}
|
|
78
|
-
}
|