e2e 0.15.1 → 0.16.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/README.md +51 -24
- package/dist/.build.json +1 -1
- package/dist/agent/act-validation.d.ts +10 -1
- package/dist/agent/act-validation.js +48 -1
- package/dist/agent/act.d.ts +1 -2
- package/dist/agent/act.js +25 -8
- package/dist/agent/action-dispatcher.d.ts +0 -1
- package/dist/agent/action-dispatcher.js +0 -1
- package/dist/agent/action-names.d.ts +0 -1
- package/dist/agent/action-names.js +0 -1
- package/dist/agent/actions.d.ts +0 -1
- package/dist/agent/actions.js +0 -1
- package/dist/agent/agent-brand.d.ts +0 -1
- package/dist/agent/agent-brand.js +0 -1
- package/dist/agent/ai-sdk.d.ts +7 -1
- package/dist/agent/ai-sdk.js +11 -1
- package/dist/agent/call-options.d.ts +0 -1
- package/dist/agent/call-options.js +0 -1
- package/dist/agent/default-agent.d.ts +0 -1
- package/dist/agent/default-agent.js +0 -1
- package/dist/agent/derived.d.ts +0 -1
- package/dist/agent/derived.js +0 -1
- package/dist/agent/error.d.ts +16 -4
- package/dist/agent/error.js +25 -7
- package/dist/agent/executor.d.ts +0 -1
- package/dist/agent/executor.js +0 -1
- package/dist/agent/index.d.ts +0 -1
- package/dist/agent/index.js +0 -1
- package/dist/agent/interactive-step.d.ts +0 -1
- package/dist/agent/interactive-step.js +0 -1
- package/dist/agent/invocation.d.ts +0 -1
- package/dist/agent/invocation.js +10 -5
- package/dist/agent/ledger.d.ts +0 -1
- package/dist/agent/ledger.js +0 -1
- package/dist/agent/loop-guards.d.ts +0 -1
- package/dist/agent/loop-guards.js +0 -1
- package/dist/agent/model/adapter.d.ts +0 -1
- package/dist/agent/model/adapter.js +0 -1
- package/dist/agent/model/overflow.d.ts +0 -1
- package/dist/agent/model/overflow.js +0 -1
- package/dist/agent/model/provider-hints.d.ts +0 -1
- package/dist/agent/model/provider-hints.js +0 -1
- package/dist/agent/model/schema.d.ts +0 -1
- package/dist/agent/model/schema.js +0 -1
- package/dist/agent/model/sdk.d.ts +0 -1
- package/dist/agent/model/sdk.js +0 -1
- package/dist/agent/model/stall.d.ts +0 -1
- package/dist/agent/model/stall.js +0 -1
- package/dist/agent/model/tool-choice.d.ts +24 -2
- package/dist/agent/model/tool-choice.js +27 -2
- package/dist/agent/observation-budget.d.ts +0 -1
- package/dist/agent/observation-budget.js +0 -1
- package/dist/agent/observation-feed.d.ts +0 -1
- package/dist/agent/observation-feed.js +0 -1
- package/dist/agent/observation.d.ts +0 -1
- package/dist/agent/observation.js +0 -1
- package/dist/agent/operation-queue.d.ts +0 -1
- package/dist/agent/operation-queue.js +0 -1
- package/dist/agent/phases.d.ts +0 -1
- package/dist/agent/phases.js +0 -1
- package/dist/agent/pixels.d.ts +0 -1
- package/dist/agent/pixels.js +0 -1
- package/dist/agent/point-tap.d.ts +0 -1
- package/dist/agent/point-tap.js +0 -1
- package/dist/agent/primitives.d.ts +6 -1
- package/dist/agent/primitives.js +4 -2
- package/dist/agent/prompts.d.ts +0 -1
- package/dist/agent/prompts.js +0 -1
- package/dist/agent/protocol.d.ts +0 -1
- package/dist/agent/protocol.js +0 -1
- package/dist/agent/public.d.ts +0 -1
- package/dist/agent/public.js +0 -1
- package/dist/agent/reading.d.ts +0 -1
- package/dist/agent/reading.js +0 -1
- package/dist/agent/replay.d.ts +0 -1
- package/dist/agent/replay.js +0 -1
- package/dist/agent/screen-update.d.ts +0 -1
- package/dist/agent/screen-update.js +0 -1
- package/dist/agent/scroll-target.d.ts +0 -1
- package/dist/agent/scroll-target.js +0 -1
- package/dist/agent/secrets.d.ts +0 -1
- package/dist/agent/secrets.js +0 -1
- package/dist/agent/settle-policy.d.ts +0 -1
- package/dist/agent/settle-policy.js +0 -1
- package/dist/agent/step-accounting.d.ts +0 -1
- package/dist/agent/step-accounting.js +0 -1
- package/dist/agent/step-cache.d.ts +14 -4
- package/dist/agent/step-cache.js +13 -4
- package/dist/agent/tool-loop.d.ts +0 -1
- package/dist/agent/tool-loop.js +62 -10
- package/dist/agent/tool-output.d.ts +0 -1
- package/dist/agent/tool-output.js +0 -1
- package/dist/agent/tool.d.ts +0 -1
- package/dist/agent/tool.js +0 -1
- package/dist/agent/transcript-compaction.d.ts +0 -1
- package/dist/agent/transcript-compaction.js +0 -1
- package/dist/agent/upload-paths.d.ts +0 -1
- package/dist/agent/upload-paths.js +0 -1
- package/dist/agent/usage.d.ts +0 -1
- package/dist/agent/usage.js +0 -1
- package/dist/cache/anchors.d.ts +0 -1
- package/dist/cache/anchors.js +0 -1
- package/dist/cache/context.d.ts +19 -7
- package/dist/cache/context.js +15 -22
- package/dist/cache/decide.d.ts +0 -1
- package/dist/cache/decide.js +0 -1
- package/dist/cache/identity.d.ts +0 -1
- package/dist/cache/identity.js +0 -1
- package/dist/cache/recorder.d.ts +0 -1
- package/dist/cache/recorder.js +0 -1
- package/dist/cache/relocate.d.ts +0 -1
- package/dist/cache/relocate.js +0 -1
- package/dist/cache/route.d.ts +0 -1
- package/dist/cache/route.js +0 -1
- package/dist/cache/store.d.ts +0 -1
- package/dist/cache/store.js +0 -1
- package/dist/cache/template.d.ts +0 -1
- package/dist/cache/template.js +0 -1
- package/dist/cache/trace.d.ts +0 -1
- package/dist/cache/trace.js +0 -1
- package/dist/cli/bin.d.ts +0 -1
- package/dist/cli/bin.js +0 -1
- package/dist/cli/cache.d.ts +0 -1
- package/dist/cli/cache.js +0 -1
- package/dist/cli/docs-url.d.ts +0 -1
- package/dist/cli/docs-url.js +0 -1
- package/dist/cli/feedback.d.ts +0 -1
- package/dist/cli/feedback.js +0 -1
- package/dist/cli/guide.d.ts +0 -1
- package/dist/cli/guide.js +0 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +2 -3
- package/dist/cli/init/agent-skill.d.ts +0 -1
- package/dist/cli/init/agent-skill.js +0 -1
- package/dist/cli/init/engines.d.ts +0 -1
- package/dist/cli/init/engines.js +0 -1
- package/dist/cli/init/gateways.d.ts +0 -1
- package/dist/cli/init/gateways.js +0 -1
- package/dist/cli/init/mcp-config.d.ts +0 -1
- package/dist/cli/init/mcp-config.js +0 -1
- package/dist/cli/init/package.d.ts +0 -1
- package/dist/cli/init/package.js +0 -1
- package/dist/cli/init/scaffold.d.ts +1 -1
- package/dist/cli/init/scaffold.js +2 -2
- package/dist/cli/init/sibling-versions.json +1 -1
- package/dist/cli/init/versions.d.ts +0 -1
- package/dist/cli/init/versions.js +0 -1
- package/dist/cli/init.d.ts +0 -1
- package/dist/cli/init.js +0 -1
- package/dist/cli/mcp.d.ts +9 -2
- package/dist/cli/mcp.js +14 -2
- package/dist/cli/signals.d.ts +0 -1
- package/dist/cli/signals.js +0 -1
- package/dist/cli/skill.d.ts +0 -1
- package/dist/cli/skill.js +0 -1
- package/dist/cli/telemetry.d.ts +0 -1
- package/dist/cli/telemetry.js +1 -2
- package/dist/cli/wordmark.d.ts +0 -1
- package/dist/cli/wordmark.js +0 -1
- package/dist/collect/collect.d.ts +0 -1
- package/dist/collect/collect.js +3 -2
- package/dist/collect/registry.d.ts +6 -3
- package/dist/collect/registry.js +31 -14
- package/dist/collect/select.d.ts +0 -1
- package/dist/collect/select.js +0 -1
- package/dist/config/agent.d.ts +0 -1
- package/dist/config/agent.js +0 -1
- package/dist/config/app.d.ts +0 -1
- package/dist/config/app.js +0 -1
- package/dist/config/command.d.ts +0 -1
- package/dist/config/command.js +0 -1
- package/dist/config/diagnose.d.ts +0 -1
- package/dist/config/diagnose.js +0 -1
- package/dist/config/esm-hooks.d.ts +0 -1
- package/dist/config/esm-hooks.js +0 -1
- package/dist/config/load.d.ts +0 -1
- package/dist/config/load.js +0 -1
- package/dist/config/resolve.d.ts +0 -1
- package/dist/config/resolve.js +0 -1
- package/dist/config/secrets.d.ts +0 -1
- package/dist/config/secrets.js +0 -1
- package/dist/config/targets.d.ts +0 -1
- package/dist/config/targets.js +0 -1
- package/dist/config/validate.d.ts +0 -1
- package/dist/config/validate.js +0 -1
- package/dist/engine/contract.d.ts +0 -1
- package/dist/engine/contract.js +0 -1
- package/dist/engine/index.d.ts +1 -2
- package/dist/engine/index.js +4 -4
- package/dist/engine/manifest.d.ts +0 -1
- package/dist/engine/manifest.js +0 -1
- package/dist/engine/recording.d.ts +0 -1
- package/dist/engine/recording.js +0 -1
- package/dist/engine/resolve.d.ts +0 -1
- package/dist/engine/resolve.js +0 -1
- package/dist/engine/session.d.ts +0 -1
- package/dist/engine/session.js +0 -1
- package/dist/engine/surface.d.ts +0 -1
- package/dist/engine/surface.js +0 -1
- package/dist/engine/timing.d.ts +0 -1
- package/dist/engine/timing.js +0 -1
- package/dist/expect/async.d.ts +0 -1
- package/dist/expect/async.js +99 -58
- package/dist/expect/attempt.d.ts +0 -1
- package/dist/expect/attempt.js +0 -1
- package/dist/expect/index.d.ts +0 -1
- package/dist/expect/index.js +0 -1
- package/dist/expect/poll.d.ts +0 -1
- package/dist/expect/poll.js +0 -1
- package/dist/expect/soft.d.ts +0 -1
- package/dist/expect/soft.js +0 -1
- package/dist/expect/values.d.ts +0 -1
- package/dist/expect/values.js +1 -2
- package/dist/explore/body.d.ts +0 -1
- package/dist/explore/body.js +0 -1
- package/dist/explore/executor.d.ts +0 -1
- package/dist/explore/executor.js +0 -1
- package/dist/explore/index.d.ts +0 -1
- package/dist/explore/index.js +16 -2
- package/dist/explore/plan.d.ts +0 -1
- package/dist/explore/plan.js +0 -1
- package/dist/explore/progress.d.ts +0 -1
- package/dist/explore/progress.js +0 -1
- package/dist/explore/state.d.ts +0 -1
- package/dist/explore/state.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/internal/ai-trace.d.ts +0 -1
- package/dist/internal/ai-trace.js +0 -1
- package/dist/internal/atomic-write.d.ts +0 -1
- package/dist/internal/atomic-write.js +0 -1
- package/dist/internal/brands.d.ts +0 -1
- package/dist/internal/brands.js +0 -1
- package/dist/internal/debug.d.ts +0 -1
- package/dist/internal/debug.js +0 -1
- package/dist/internal/env.d.ts +0 -1
- package/dist/internal/env.js +0 -1
- package/dist/internal/errors.d.ts +0 -1
- package/dist/internal/errors.js +0 -1
- package/dist/internal/geometry.d.ts +0 -1
- package/dist/internal/geometry.js +0 -1
- package/dist/internal/git.d.ts +0 -1
- package/dist/internal/git.js +0 -1
- package/dist/internal/globs.d.ts +0 -1
- package/dist/internal/globs.js +0 -1
- package/dist/internal/ids.d.ts +0 -1
- package/dist/internal/ids.js +0 -1
- package/dist/internal/json-value.d.ts +0 -1
- package/dist/internal/json-value.js +0 -1
- package/dist/internal/keys.d.ts +0 -1
- package/dist/internal/keys.js +0 -1
- package/dist/internal/node-version.d.ts +0 -1
- package/dist/internal/node-version.js +0 -1
- package/dist/internal/objects.d.ts +0 -1
- package/dist/internal/objects.js +0 -1
- package/dist/internal/options.d.ts +0 -1
- package/dist/internal/options.js +0 -1
- package/dist/internal/package-manager.d.ts +0 -1
- package/dist/internal/package-manager.js +0 -1
- package/dist/internal/package-version.d.ts +0 -1
- package/dist/internal/package-version.js +0 -1
- package/dist/internal/paths.d.ts +0 -1
- package/dist/internal/paths.js +0 -1
- package/dist/internal/realm-slot.d.ts +0 -1
- package/dist/internal/realm-slot.js +0 -1
- package/dist/internal/recording-modes.d.ts +0 -1
- package/dist/internal/recording-modes.js +0 -1
- package/dist/internal/redact.d.ts +0 -1
- package/dist/internal/redact.js +0 -1
- package/dist/internal/regexp.d.ts +0 -1
- package/dist/internal/regexp.js +0 -1
- package/dist/internal/roles.d.ts +0 -1
- package/dist/internal/roles.js +0 -1
- package/dist/internal/skip.d.ts +0 -1
- package/dist/internal/skip.js +0 -1
- package/dist/internal/source.d.ts +0 -1
- package/dist/internal/source.js +0 -1
- package/dist/internal/standard-schema.d.ts +0 -1
- package/dist/internal/standard-schema.js +0 -1
- package/dist/internal/suggest.d.ts +0 -1
- package/dist/internal/suggest.js +0 -1
- package/dist/internal/text.d.ts +8 -1
- package/dist/internal/text.js +13 -2
- package/dist/internal/time.d.ts +0 -1
- package/dist/internal/time.js +0 -1
- package/dist/internal/urls.d.ts +0 -1
- package/dist/internal/urls.js +0 -1
- package/dist/internal/vcs.d.ts +0 -1
- package/dist/internal/vcs.js +0 -1
- package/dist/internal/zip.d.ts +0 -1
- package/dist/internal/zip.js +0 -1
- package/dist/locator/engine.d.ts +0 -1
- package/dist/locator/engine.js +0 -1
- package/dist/locator/expression.d.ts +0 -1
- package/dist/locator/expression.js +0 -1
- package/dist/locator/screen.d.ts +0 -1
- package/dist/locator/screen.js +0 -1
- package/dist/mcp/catalog.d.ts +4 -1
- package/dist/mcp/catalog.js +2 -3
- package/dist/mcp/config.d.ts +0 -1
- package/dist/mcp/config.js +0 -1
- package/dist/mcp/recording.d.ts +0 -1
- package/dist/mcp/recording.js +0 -1
- package/dist/mcp/server.d.ts +8 -1
- package/dist/mcp/server.js +8 -5
- package/dist/mcp/session.d.ts +4 -2
- package/dist/mcp/session.js +43 -21
- package/dist/mcp/sessions.d.ts +2 -1
- package/dist/mcp/sessions.js +5 -2
- package/dist/mcp/tools.d.ts +7 -6
- package/dist/mcp/tools.js +36 -11
- package/dist/mcp/usage.d.ts +61 -0
- package/dist/mcp/usage.js +73 -0
- package/dist/oauth/callback-server.d.ts +0 -1
- package/dist/oauth/callback-server.js +0 -1
- package/dist/oauth/chatgpt.d.ts +0 -1
- package/dist/oauth/chatgpt.js +0 -1
- package/dist/oauth/cli.d.ts +0 -1
- package/dist/oauth/cli.js +0 -1
- package/dist/oauth/copilot.d.ts +0 -1
- package/dist/oauth/copilot.js +0 -1
- package/dist/oauth/device-code.d.ts +0 -1
- package/dist/oauth/device-code.js +0 -1
- package/dist/oauth/errors.d.ts +0 -1
- package/dist/oauth/errors.js +0 -1
- package/dist/oauth/fetch.d.ts +0 -1
- package/dist/oauth/fetch.js +0 -1
- package/dist/oauth/grok.d.ts +0 -1
- package/dist/oauth/grok.js +0 -1
- package/dist/oauth/jwt.d.ts +0 -1
- package/dist/oauth/jwt.js +0 -1
- package/dist/oauth/login.d.ts +0 -1
- package/dist/oauth/login.js +0 -1
- package/dist/oauth/models.d.ts +0 -1
- package/dist/oauth/models.js +0 -1
- package/dist/oauth/pkce.d.ts +0 -1
- package/dist/oauth/pkce.js +0 -1
- package/dist/oauth/providers/github-copilot.d.ts +0 -1
- package/dist/oauth/providers/github-copilot.js +10 -3
- package/dist/oauth/providers/openai.d.ts +0 -1
- package/dist/oauth/providers/openai.js +1 -2
- package/dist/oauth/providers/xai.d.ts +0 -1
- package/dist/oauth/providers/xai.js +0 -1
- package/dist/oauth/providers.d.ts +0 -1
- package/dist/oauth/providers.js +0 -1
- package/dist/oauth/sse.d.ts +0 -1
- package/dist/oauth/sse.js +0 -1
- package/dist/oauth/store.d.ts +0 -1
- package/dist/oauth/store.js +0 -1
- package/dist/oauth/token-endpoint.d.ts +0 -1
- package/dist/oauth/token-endpoint.js +0 -1
- package/dist/oauth/types.d.ts +0 -1
- package/dist/oauth/types.js +0 -1
- package/dist/params.d.ts +0 -1
- package/dist/params.js +0 -1
- package/dist/report/build.d.ts +0 -1
- package/dist/report/build.js +0 -1
- package/dist/report/builtin.d.ts +0 -1
- package/dist/report/builtin.js +0 -1
- package/dist/report/code-frame.d.ts +0 -1
- package/dist/report/code-frame.js +0 -1
- package/dist/report/debug-steps.d.ts +0 -1
- package/dist/report/debug-steps.js +0 -1
- package/dist/report/explore-text.d.ts +0 -1
- package/dist/report/explore-text.js +0 -1
- package/dist/report/failure-text.d.ts +0 -1
- package/dist/report/failure-text.js +0 -1
- package/dist/report/format.d.ts +0 -1
- package/dist/report/format.js +0 -1
- package/dist/report/json.d.ts +0 -1
- package/dist/report/json.js +0 -1
- package/dist/report/junit.d.ts +0 -1
- package/dist/report/junit.js +0 -1
- package/dist/report/list-explore.d.ts +0 -1
- package/dist/report/list-explore.js +0 -1
- package/dist/report/list-model.d.ts +0 -1
- package/dist/report/list-model.js +0 -1
- package/dist/report/list-steps.d.ts +0 -1
- package/dist/report/list-steps.js +0 -1
- package/dist/report/list.d.ts +0 -1
- package/dist/report/list.js +0 -1
- package/dist/report/live-window.d.ts +0 -1
- package/dist/report/live-window.js +0 -1
- package/dist/report/markdown-text.d.ts +0 -1
- package/dist/report/markdown-text.js +0 -1
- package/dist/report/markdown.d.ts +0 -1
- package/dist/report/markdown.js +0 -1
- package/dist/report/outcome.d.ts +0 -1
- package/dist/report/outcome.js +0 -1
- package/dist/report/repeats.d.ts +0 -1
- package/dist/report/repeats.js +0 -1
- package/dist/report/running-tree.d.ts +0 -1
- package/dist/report/running-tree.js +0 -1
- package/dist/report/write.d.ts +0 -1
- package/dist/report/write.js +0 -1
- package/dist/run/app-ports.d.ts +0 -1
- package/dist/run/app-ports.js +0 -1
- package/dist/run/artifacts.d.ts +0 -1
- package/dist/run/artifacts.js +0 -1
- package/dist/run/budget.d.ts +0 -1
- package/dist/run/budget.js +0 -1
- package/dist/run/declared-processes.d.ts +0 -1
- package/dist/run/declared-processes.js +0 -1
- package/dist/run/events.d.ts +0 -1
- package/dist/run/events.js +0 -1
- package/dist/run/execute.d.ts +0 -1
- package/dist/run/execute.js +27 -13
- package/dist/run/extended-fixtures.d.ts +0 -1
- package/dist/run/extended-fixtures.js +0 -1
- package/dist/run/failure-evidence.d.ts +0 -1
- package/dist/run/failure-evidence.js +0 -1
- package/dist/run/fixture-recording.d.ts +0 -1
- package/dist/run/fixture-recording.js +0 -1
- package/dist/run/fixtures.d.ts +0 -1
- package/dist/run/fixtures.js +0 -1
- package/dist/run/in-process.d.ts +0 -1
- package/dist/run/in-process.js +0 -1
- package/dist/run/last-run.d.ts +0 -1
- package/dist/run/last-run.js +0 -1
- package/dist/run/managed-process.d.ts +0 -1
- package/dist/run/managed-process.js +0 -1
- package/dist/run/output.d.ts +0 -1
- package/dist/run/output.js +0 -1
- package/dist/run/process-pool.d.ts +0 -1
- package/dist/run/process-pool.js +0 -1
- package/dist/run/provision.d.ts +0 -1
- package/dist/run/provision.js +0 -1
- package/dist/run/realm.d.ts +2 -1
- package/dist/run/realm.js +1 -2
- package/dist/run/records.d.ts +0 -1
- package/dist/run/records.js +0 -1
- package/dist/run/retry.d.ts +0 -1
- package/dist/run/retry.js +0 -1
- package/dist/run/runner.d.ts +2 -1
- package/dist/run/runner.js +1 -2
- package/dist/run/scheduler.d.ts +0 -1
- package/dist/run/scheduler.js +0 -1
- package/dist/run/secrecy.d.ts +15 -1
- package/dist/run/secrecy.js +27 -2
- package/dist/run/serial.d.ts +0 -1
- package/dist/run/serial.js +0 -1
- package/dist/run/sessions.d.ts +0 -1
- package/dist/run/sessions.js +0 -1
- package/dist/run/standalone.d.ts +0 -1
- package/dist/run/standalone.js +3 -3
- package/dist/run/steps.d.ts +2 -3
- package/dist/run/steps.js +4 -2
- package/dist/run/trace-redaction.d.ts +0 -1
- package/dist/run/trace-redaction.js +0 -1
- package/dist/run/unit-runner.d.ts +0 -1
- package/dist/run/unit-runner.js +0 -1
- package/dist/run/units.d.ts +0 -1
- package/dist/run/units.js +0 -1
- package/dist/run/worker/entry.d.ts +0 -1
- package/dist/run/worker/entry.js +2 -3
- package/dist/run/worker/handle.d.ts +0 -1
- package/dist/run/worker/handle.js +0 -1
- package/dist/run/worker/protocol.d.ts +0 -1
- package/dist/run/worker/protocol.js +0 -1
- package/dist/run/worker/session.d.ts +0 -1
- package/dist/run/worker/session.js +0 -1
- package/dist/run/worker-models.d.ts +0 -1
- package/dist/run/worker-models.js +0 -1
- package/dist/secrets.d.ts +0 -1
- package/dist/secrets.js +0 -1
- package/dist/telemetry/checkout.d.ts +0 -1
- package/dist/telemetry/checkout.js +0 -1
- package/dist/telemetry/environment.d.ts +0 -1
- package/dist/telemetry/environment.js +0 -1
- package/dist/telemetry/events.d.ts +26 -10
- package/dist/telemetry/events.js +107 -13
- package/dist/telemetry/failure-kind.d.ts +0 -1
- package/dist/telemetry/failure-kind.js +0 -1
- package/dist/telemetry/posthog.d.ts +0 -1
- package/dist/telemetry/posthog.js +0 -1
- package/dist/telemetry/project.d.ts +0 -1
- package/dist/telemetry/project.js +0 -1
- package/dist/telemetry/store.d.ts +0 -1
- package/dist/telemetry/store.js +0 -1
- package/dist/telemetry/telemetry.d.ts +19 -8
- package/dist/telemetry/telemetry.js +26 -9
- package/dist/telemetry/token.d.ts +0 -1
- package/dist/telemetry/token.js +0 -1
- package/dist/types.d.ts +26 -24
- package/dist/types.js +0 -1
- package/docs/agent-steps.mdx +126 -0
- package/docs/agents.mdx +217 -0
- package/docs/api-testing.mdx +65 -0
- package/docs/authentication.mdx +345 -0
- package/docs/browser.mdx +440 -0
- package/docs/bug-bash.mdx +90 -0
- package/docs/cache.mdx +306 -0
- package/docs/ci.mdx +210 -0
- package/docs/coding-agents.mdx +183 -0
- package/docs/debugging.mdx +291 -0
- package/docs/executors.mdx +243 -0
- package/docs/explore.mdx +174 -0
- package/docs/github.mdx +184 -0
- package/docs/index.mdx +82 -0
- package/docs/integrations/eas.mdx +216 -0
- package/docs/integrations/index.mdx +24 -0
- package/docs/integrations/kernel.mdx +163 -0
- package/docs/migrate/cypress.mdx +124 -0
- package/docs/migrate/detox.mdx +140 -0
- package/docs/migrate/maestro.mdx +229 -0
- package/docs/migrate/playwright.mdx +430 -0
- package/docs/migrate/selenium.mdx +110 -0
- package/docs/mobile-ci.mdx +567 -0
- package/docs/mobile.mdx +595 -0
- package/docs/models.mdx +241 -0
- package/docs/quickstart.mdx +260 -0
- package/docs/reference/agent.mdx +524 -0
- package/docs/reference/app.mdx +72 -0
- package/docs/reference/cli.mdx +819 -0
- package/docs/reference/config.mdx +986 -0
- package/docs/reference/engine.mdx +1363 -0
- package/docs/reference/environment.mdx +113 -0
- package/docs/reference/errors.mdx +143 -0
- package/docs/reference/expect.mdx +546 -0
- package/docs/reference/mcp.mdx +205 -0
- package/docs/reference/mobile.mdx +522 -0
- package/docs/reference/reporters.mdx +216 -0
- package/docs/reference/screen.mdx +688 -0
- package/docs/reference/test.mdx +449 -0
- package/docs/reference/web.mdx +615 -0
- package/docs/security.mdx +308 -0
- package/docs/starting-your-app.mdx +231 -0
- package/docs/subscriptions.mdx +166 -0
- package/docs/telemetry.mdx +227 -0
- package/docs/tools.mdx +150 -0
- package/docs/viewports.mdx +146 -0
- package/docs/writing-an-engine.mdx +316 -0
- package/docs/writing-tests.mdx +256 -0
- package/package.json +5 -3
- package/skills/e2e/SKILL.md +4 -1
- package/skills/e2e/references/agent.md +3 -1
- package/skills/e2e/references/mcp.md +3 -0
- package/skills/e2e/references/setup.md +19 -4
- package/skills/e2e/references/writing-tests.md +11 -0
- package/dist/agent/act-validation.d.ts.map +0 -1
- package/dist/agent/act-validation.js.map +0 -1
- package/dist/agent/act.d.ts.map +0 -1
- package/dist/agent/act.js.map +0 -1
- package/dist/agent/action-dispatcher.d.ts.map +0 -1
- package/dist/agent/action-dispatcher.js.map +0 -1
- package/dist/agent/action-names.d.ts.map +0 -1
- package/dist/agent/action-names.js.map +0 -1
- package/dist/agent/actions.d.ts.map +0 -1
- package/dist/agent/actions.js.map +0 -1
- package/dist/agent/agent-brand.d.ts.map +0 -1
- package/dist/agent/agent-brand.js.map +0 -1
- package/dist/agent/ai-sdk.d.ts.map +0 -1
- package/dist/agent/ai-sdk.js.map +0 -1
- package/dist/agent/call-options.d.ts.map +0 -1
- package/dist/agent/call-options.js.map +0 -1
- package/dist/agent/default-agent.d.ts.map +0 -1
- package/dist/agent/default-agent.js.map +0 -1
- package/dist/agent/derived.d.ts.map +0 -1
- package/dist/agent/derived.js.map +0 -1
- package/dist/agent/error.d.ts.map +0 -1
- package/dist/agent/error.js.map +0 -1
- package/dist/agent/executor.d.ts.map +0 -1
- package/dist/agent/executor.js.map +0 -1
- package/dist/agent/index.d.ts.map +0 -1
- package/dist/agent/index.js.map +0 -1
- package/dist/agent/interactive-step.d.ts.map +0 -1
- package/dist/agent/interactive-step.js.map +0 -1
- package/dist/agent/invocation.d.ts.map +0 -1
- package/dist/agent/invocation.js.map +0 -1
- package/dist/agent/ledger.d.ts.map +0 -1
- package/dist/agent/ledger.js.map +0 -1
- package/dist/agent/loop-guards.d.ts.map +0 -1
- package/dist/agent/loop-guards.js.map +0 -1
- package/dist/agent/model/adapter.d.ts.map +0 -1
- package/dist/agent/model/adapter.js.map +0 -1
- package/dist/agent/model/overflow.d.ts.map +0 -1
- package/dist/agent/model/overflow.js.map +0 -1
- package/dist/agent/model/provider-hints.d.ts.map +0 -1
- package/dist/agent/model/provider-hints.js.map +0 -1
- package/dist/agent/model/schema.d.ts.map +0 -1
- package/dist/agent/model/schema.js.map +0 -1
- package/dist/agent/model/sdk.d.ts.map +0 -1
- package/dist/agent/model/sdk.js.map +0 -1
- package/dist/agent/model/stall.d.ts.map +0 -1
- package/dist/agent/model/stall.js.map +0 -1
- package/dist/agent/model/tool-choice.d.ts.map +0 -1
- package/dist/agent/model/tool-choice.js.map +0 -1
- package/dist/agent/observation-budget.d.ts.map +0 -1
- package/dist/agent/observation-budget.js.map +0 -1
- package/dist/agent/observation-feed.d.ts.map +0 -1
- package/dist/agent/observation-feed.js.map +0 -1
- package/dist/agent/observation.d.ts.map +0 -1
- package/dist/agent/observation.js.map +0 -1
- package/dist/agent/operation-queue.d.ts.map +0 -1
- package/dist/agent/operation-queue.js.map +0 -1
- package/dist/agent/phases.d.ts.map +0 -1
- package/dist/agent/phases.js.map +0 -1
- package/dist/agent/pixels.d.ts.map +0 -1
- package/dist/agent/pixels.js.map +0 -1
- package/dist/agent/point-tap.d.ts.map +0 -1
- package/dist/agent/point-tap.js.map +0 -1
- package/dist/agent/primitives.d.ts.map +0 -1
- package/dist/agent/primitives.js.map +0 -1
- package/dist/agent/prompts.d.ts.map +0 -1
- package/dist/agent/prompts.js.map +0 -1
- package/dist/agent/protocol.d.ts.map +0 -1
- package/dist/agent/protocol.js.map +0 -1
- package/dist/agent/public.d.ts.map +0 -1
- package/dist/agent/public.js.map +0 -1
- package/dist/agent/reading.d.ts.map +0 -1
- package/dist/agent/reading.js.map +0 -1
- package/dist/agent/replay.d.ts.map +0 -1
- package/dist/agent/replay.js.map +0 -1
- package/dist/agent/screen-update.d.ts.map +0 -1
- package/dist/agent/screen-update.js.map +0 -1
- package/dist/agent/scroll-target.d.ts.map +0 -1
- package/dist/agent/scroll-target.js.map +0 -1
- package/dist/agent/secrets.d.ts.map +0 -1
- package/dist/agent/secrets.js.map +0 -1
- package/dist/agent/settle-policy.d.ts.map +0 -1
- package/dist/agent/settle-policy.js.map +0 -1
- package/dist/agent/step-accounting.d.ts.map +0 -1
- package/dist/agent/step-accounting.js.map +0 -1
- package/dist/agent/step-cache.d.ts.map +0 -1
- package/dist/agent/step-cache.js.map +0 -1
- package/dist/agent/tool-loop.d.ts.map +0 -1
- package/dist/agent/tool-loop.js.map +0 -1
- package/dist/agent/tool-output.d.ts.map +0 -1
- package/dist/agent/tool-output.js.map +0 -1
- package/dist/agent/tool.d.ts.map +0 -1
- package/dist/agent/tool.js.map +0 -1
- package/dist/agent/transcript-compaction.d.ts.map +0 -1
- package/dist/agent/transcript-compaction.js.map +0 -1
- package/dist/agent/upload-paths.d.ts.map +0 -1
- package/dist/agent/upload-paths.js.map +0 -1
- package/dist/agent/usage.d.ts.map +0 -1
- package/dist/agent/usage.js.map +0 -1
- package/dist/cache/anchors.d.ts.map +0 -1
- package/dist/cache/anchors.js.map +0 -1
- package/dist/cache/context.d.ts.map +0 -1
- package/dist/cache/context.js.map +0 -1
- package/dist/cache/decide.d.ts.map +0 -1
- package/dist/cache/decide.js.map +0 -1
- package/dist/cache/identity.d.ts.map +0 -1
- package/dist/cache/identity.js.map +0 -1
- package/dist/cache/recorder.d.ts.map +0 -1
- package/dist/cache/recorder.js.map +0 -1
- package/dist/cache/relocate.d.ts.map +0 -1
- package/dist/cache/relocate.js.map +0 -1
- package/dist/cache/route.d.ts.map +0 -1
- package/dist/cache/route.js.map +0 -1
- package/dist/cache/store.d.ts.map +0 -1
- package/dist/cache/store.js.map +0 -1
- package/dist/cache/template.d.ts.map +0 -1
- package/dist/cache/template.js.map +0 -1
- package/dist/cache/trace.d.ts.map +0 -1
- package/dist/cache/trace.js.map +0 -1
- package/dist/cli/bin.d.ts.map +0 -1
- package/dist/cli/bin.js.map +0 -1
- package/dist/cli/cache.d.ts.map +0 -1
- package/dist/cli/cache.js.map +0 -1
- package/dist/cli/docs-url.d.ts.map +0 -1
- package/dist/cli/docs-url.js.map +0 -1
- package/dist/cli/feedback.d.ts.map +0 -1
- package/dist/cli/feedback.js.map +0 -1
- package/dist/cli/guide.d.ts.map +0 -1
- package/dist/cli/guide.js.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/init/agent-skill.d.ts.map +0 -1
- package/dist/cli/init/agent-skill.js.map +0 -1
- package/dist/cli/init/engines.d.ts.map +0 -1
- package/dist/cli/init/engines.js.map +0 -1
- package/dist/cli/init/gateways.d.ts.map +0 -1
- package/dist/cli/init/gateways.js.map +0 -1
- package/dist/cli/init/mcp-config.d.ts.map +0 -1
- package/dist/cli/init/mcp-config.js.map +0 -1
- package/dist/cli/init/package.d.ts.map +0 -1
- package/dist/cli/init/package.js.map +0 -1
- package/dist/cli/init/scaffold.d.ts.map +0 -1
- package/dist/cli/init/scaffold.js.map +0 -1
- package/dist/cli/init/versions.d.ts.map +0 -1
- package/dist/cli/init/versions.js.map +0 -1
- package/dist/cli/init.d.ts.map +0 -1
- package/dist/cli/init.js.map +0 -1
- package/dist/cli/mcp.d.ts.map +0 -1
- package/dist/cli/mcp.js.map +0 -1
- package/dist/cli/signals.d.ts.map +0 -1
- package/dist/cli/signals.js.map +0 -1
- package/dist/cli/skill.d.ts.map +0 -1
- package/dist/cli/skill.js.map +0 -1
- package/dist/cli/telemetry.d.ts.map +0 -1
- package/dist/cli/telemetry.js.map +0 -1
- package/dist/cli/wordmark.d.ts.map +0 -1
- package/dist/cli/wordmark.js.map +0 -1
- package/dist/collect/collect.d.ts.map +0 -1
- package/dist/collect/collect.js.map +0 -1
- package/dist/collect/registry.d.ts.map +0 -1
- package/dist/collect/registry.js.map +0 -1
- package/dist/collect/select.d.ts.map +0 -1
- package/dist/collect/select.js.map +0 -1
- package/dist/config/agent.d.ts.map +0 -1
- package/dist/config/agent.js.map +0 -1
- package/dist/config/app.d.ts.map +0 -1
- package/dist/config/app.js.map +0 -1
- package/dist/config/command.d.ts.map +0 -1
- package/dist/config/command.js.map +0 -1
- package/dist/config/diagnose.d.ts.map +0 -1
- package/dist/config/diagnose.js.map +0 -1
- package/dist/config/esm-hooks.d.ts.map +0 -1
- package/dist/config/esm-hooks.js.map +0 -1
- package/dist/config/load.d.ts.map +0 -1
- package/dist/config/load.js.map +0 -1
- package/dist/config/resolve.d.ts.map +0 -1
- package/dist/config/resolve.js.map +0 -1
- package/dist/config/secrets.d.ts.map +0 -1
- package/dist/config/secrets.js.map +0 -1
- package/dist/config/targets.d.ts.map +0 -1
- package/dist/config/targets.js.map +0 -1
- package/dist/config/validate.d.ts.map +0 -1
- package/dist/config/validate.js.map +0 -1
- package/dist/engine/contract.d.ts.map +0 -1
- package/dist/engine/contract.js.map +0 -1
- package/dist/engine/index.d.ts.map +0 -1
- package/dist/engine/index.js.map +0 -1
- package/dist/engine/manifest.d.ts.map +0 -1
- package/dist/engine/manifest.js.map +0 -1
- package/dist/engine/recording.d.ts.map +0 -1
- package/dist/engine/recording.js.map +0 -1
- package/dist/engine/resolve.d.ts.map +0 -1
- package/dist/engine/resolve.js.map +0 -1
- package/dist/engine/session.d.ts.map +0 -1
- package/dist/engine/session.js.map +0 -1
- package/dist/engine/surface.d.ts.map +0 -1
- package/dist/engine/surface.js.map +0 -1
- package/dist/engine/timing.d.ts.map +0 -1
- package/dist/engine/timing.js.map +0 -1
- package/dist/expect/async.d.ts.map +0 -1
- package/dist/expect/async.js.map +0 -1
- package/dist/expect/attempt.d.ts.map +0 -1
- package/dist/expect/attempt.js.map +0 -1
- package/dist/expect/index.d.ts.map +0 -1
- package/dist/expect/index.js.map +0 -1
- package/dist/expect/poll.d.ts.map +0 -1
- package/dist/expect/poll.js.map +0 -1
- package/dist/expect/soft.d.ts.map +0 -1
- package/dist/expect/soft.js.map +0 -1
- package/dist/expect/values.d.ts.map +0 -1
- package/dist/expect/values.js.map +0 -1
- package/dist/explore/body.d.ts.map +0 -1
- package/dist/explore/body.js.map +0 -1
- package/dist/explore/executor.d.ts.map +0 -1
- package/dist/explore/executor.js.map +0 -1
- package/dist/explore/index.d.ts.map +0 -1
- package/dist/explore/index.js.map +0 -1
- package/dist/explore/plan.d.ts.map +0 -1
- package/dist/explore/plan.js.map +0 -1
- package/dist/explore/progress.d.ts.map +0 -1
- package/dist/explore/progress.js.map +0 -1
- package/dist/explore/state.d.ts.map +0 -1
- package/dist/explore/state.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/ai-trace.d.ts.map +0 -1
- package/dist/internal/ai-trace.js.map +0 -1
- package/dist/internal/atomic-write.d.ts.map +0 -1
- package/dist/internal/atomic-write.js.map +0 -1
- package/dist/internal/brands.d.ts.map +0 -1
- package/dist/internal/brands.js.map +0 -1
- package/dist/internal/debug.d.ts.map +0 -1
- package/dist/internal/debug.js.map +0 -1
- package/dist/internal/env.d.ts.map +0 -1
- package/dist/internal/env.js.map +0 -1
- package/dist/internal/errors.d.ts.map +0 -1
- package/dist/internal/errors.js.map +0 -1
- package/dist/internal/geometry.d.ts.map +0 -1
- package/dist/internal/geometry.js.map +0 -1
- package/dist/internal/git.d.ts.map +0 -1
- package/dist/internal/git.js.map +0 -1
- package/dist/internal/globs.d.ts.map +0 -1
- package/dist/internal/globs.js.map +0 -1
- package/dist/internal/ids.d.ts.map +0 -1
- package/dist/internal/ids.js.map +0 -1
- package/dist/internal/json-value.d.ts.map +0 -1
- package/dist/internal/json-value.js.map +0 -1
- package/dist/internal/keys.d.ts.map +0 -1
- package/dist/internal/keys.js.map +0 -1
- package/dist/internal/node-version.d.ts.map +0 -1
- package/dist/internal/node-version.js.map +0 -1
- package/dist/internal/objects.d.ts.map +0 -1
- package/dist/internal/objects.js.map +0 -1
- package/dist/internal/options.d.ts.map +0 -1
- package/dist/internal/options.js.map +0 -1
- package/dist/internal/package-manager.d.ts.map +0 -1
- package/dist/internal/package-manager.js.map +0 -1
- package/dist/internal/package-version.d.ts.map +0 -1
- package/dist/internal/package-version.js.map +0 -1
- package/dist/internal/paths.d.ts.map +0 -1
- package/dist/internal/paths.js.map +0 -1
- package/dist/internal/realm-slot.d.ts.map +0 -1
- package/dist/internal/realm-slot.js.map +0 -1
- package/dist/internal/recording-modes.d.ts.map +0 -1
- package/dist/internal/recording-modes.js.map +0 -1
- package/dist/internal/redact.d.ts.map +0 -1
- package/dist/internal/redact.js.map +0 -1
- package/dist/internal/regexp.d.ts.map +0 -1
- package/dist/internal/regexp.js.map +0 -1
- package/dist/internal/roles.d.ts.map +0 -1
- package/dist/internal/roles.js.map +0 -1
- package/dist/internal/skip.d.ts.map +0 -1
- package/dist/internal/skip.js.map +0 -1
- package/dist/internal/source.d.ts.map +0 -1
- package/dist/internal/source.js.map +0 -1
- package/dist/internal/standard-schema.d.ts.map +0 -1
- package/dist/internal/standard-schema.js.map +0 -1
- package/dist/internal/suggest.d.ts.map +0 -1
- package/dist/internal/suggest.js.map +0 -1
- package/dist/internal/text.d.ts.map +0 -1
- package/dist/internal/text.js.map +0 -1
- package/dist/internal/time.d.ts.map +0 -1
- package/dist/internal/time.js.map +0 -1
- package/dist/internal/urls.d.ts.map +0 -1
- package/dist/internal/urls.js.map +0 -1
- package/dist/internal/vcs.d.ts.map +0 -1
- package/dist/internal/vcs.js.map +0 -1
- package/dist/internal/zip.d.ts.map +0 -1
- package/dist/internal/zip.js.map +0 -1
- package/dist/locator/engine.d.ts.map +0 -1
- package/dist/locator/engine.js.map +0 -1
- package/dist/locator/expression.d.ts.map +0 -1
- package/dist/locator/expression.js.map +0 -1
- package/dist/locator/screen.d.ts.map +0 -1
- package/dist/locator/screen.js.map +0 -1
- package/dist/mcp/catalog.d.ts.map +0 -1
- package/dist/mcp/catalog.js.map +0 -1
- package/dist/mcp/config.d.ts.map +0 -1
- package/dist/mcp/config.js.map +0 -1
- package/dist/mcp/recording.d.ts.map +0 -1
- package/dist/mcp/recording.js.map +0 -1
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/session.d.ts.map +0 -1
- package/dist/mcp/session.js.map +0 -1
- package/dist/mcp/sessions.d.ts.map +0 -1
- package/dist/mcp/sessions.js.map +0 -1
- package/dist/mcp/tools.d.ts.map +0 -1
- package/dist/mcp/tools.js.map +0 -1
- package/dist/oauth/callback-server.d.ts.map +0 -1
- package/dist/oauth/callback-server.js.map +0 -1
- package/dist/oauth/chatgpt.d.ts.map +0 -1
- package/dist/oauth/chatgpt.js.map +0 -1
- package/dist/oauth/cli.d.ts.map +0 -1
- package/dist/oauth/cli.js.map +0 -1
- package/dist/oauth/copilot.d.ts.map +0 -1
- package/dist/oauth/copilot.js.map +0 -1
- package/dist/oauth/device-code.d.ts.map +0 -1
- package/dist/oauth/device-code.js.map +0 -1
- package/dist/oauth/errors.d.ts.map +0 -1
- package/dist/oauth/errors.js.map +0 -1
- package/dist/oauth/fetch.d.ts.map +0 -1
- package/dist/oauth/fetch.js.map +0 -1
- package/dist/oauth/grok.d.ts.map +0 -1
- package/dist/oauth/grok.js.map +0 -1
- package/dist/oauth/jwt.d.ts.map +0 -1
- package/dist/oauth/jwt.js.map +0 -1
- package/dist/oauth/login.d.ts.map +0 -1
- package/dist/oauth/login.js.map +0 -1
- package/dist/oauth/models.d.ts.map +0 -1
- package/dist/oauth/models.js.map +0 -1
- package/dist/oauth/pkce.d.ts.map +0 -1
- package/dist/oauth/pkce.js.map +0 -1
- package/dist/oauth/providers/github-copilot.d.ts.map +0 -1
- package/dist/oauth/providers/github-copilot.js.map +0 -1
- package/dist/oauth/providers/openai.d.ts.map +0 -1
- package/dist/oauth/providers/openai.js.map +0 -1
- package/dist/oauth/providers/xai.d.ts.map +0 -1
- package/dist/oauth/providers/xai.js.map +0 -1
- package/dist/oauth/providers.d.ts.map +0 -1
- package/dist/oauth/providers.js.map +0 -1
- package/dist/oauth/sse.d.ts.map +0 -1
- package/dist/oauth/sse.js.map +0 -1
- package/dist/oauth/store.d.ts.map +0 -1
- package/dist/oauth/store.js.map +0 -1
- package/dist/oauth/token-endpoint.d.ts.map +0 -1
- package/dist/oauth/token-endpoint.js.map +0 -1
- package/dist/oauth/types.d.ts.map +0 -1
- package/dist/oauth/types.js.map +0 -1
- package/dist/params.d.ts.map +0 -1
- package/dist/params.js.map +0 -1
- package/dist/report/build.d.ts.map +0 -1
- package/dist/report/build.js.map +0 -1
- package/dist/report/builtin.d.ts.map +0 -1
- package/dist/report/builtin.js.map +0 -1
- package/dist/report/code-frame.d.ts.map +0 -1
- package/dist/report/code-frame.js.map +0 -1
- package/dist/report/debug-steps.d.ts.map +0 -1
- package/dist/report/debug-steps.js.map +0 -1
- package/dist/report/explore-text.d.ts.map +0 -1
- package/dist/report/explore-text.js.map +0 -1
- package/dist/report/failure-text.d.ts.map +0 -1
- package/dist/report/failure-text.js.map +0 -1
- package/dist/report/format.d.ts.map +0 -1
- package/dist/report/format.js.map +0 -1
- package/dist/report/json.d.ts.map +0 -1
- package/dist/report/json.js.map +0 -1
- package/dist/report/junit.d.ts.map +0 -1
- package/dist/report/junit.js.map +0 -1
- package/dist/report/list-explore.d.ts.map +0 -1
- package/dist/report/list-explore.js.map +0 -1
- package/dist/report/list-model.d.ts.map +0 -1
- package/dist/report/list-model.js.map +0 -1
- package/dist/report/list-steps.d.ts.map +0 -1
- package/dist/report/list-steps.js.map +0 -1
- package/dist/report/list.d.ts.map +0 -1
- package/dist/report/list.js.map +0 -1
- package/dist/report/live-window.d.ts.map +0 -1
- package/dist/report/live-window.js.map +0 -1
- package/dist/report/markdown-text.d.ts.map +0 -1
- package/dist/report/markdown-text.js.map +0 -1
- package/dist/report/markdown.d.ts.map +0 -1
- package/dist/report/markdown.js.map +0 -1
- package/dist/report/outcome.d.ts.map +0 -1
- package/dist/report/outcome.js.map +0 -1
- package/dist/report/repeats.d.ts.map +0 -1
- package/dist/report/repeats.js.map +0 -1
- package/dist/report/running-tree.d.ts.map +0 -1
- package/dist/report/running-tree.js.map +0 -1
- package/dist/report/write.d.ts.map +0 -1
- package/dist/report/write.js.map +0 -1
- package/dist/run/app-ports.d.ts.map +0 -1
- package/dist/run/app-ports.js.map +0 -1
- package/dist/run/artifacts.d.ts.map +0 -1
- package/dist/run/artifacts.js.map +0 -1
- package/dist/run/budget.d.ts.map +0 -1
- package/dist/run/budget.js.map +0 -1
- package/dist/run/declared-processes.d.ts.map +0 -1
- package/dist/run/declared-processes.js.map +0 -1
- package/dist/run/events.d.ts.map +0 -1
- package/dist/run/events.js.map +0 -1
- package/dist/run/execute.d.ts.map +0 -1
- package/dist/run/execute.js.map +0 -1
- package/dist/run/extended-fixtures.d.ts.map +0 -1
- package/dist/run/extended-fixtures.js.map +0 -1
- package/dist/run/failure-evidence.d.ts.map +0 -1
- package/dist/run/failure-evidence.js.map +0 -1
- package/dist/run/fixture-recording.d.ts.map +0 -1
- package/dist/run/fixture-recording.js.map +0 -1
- package/dist/run/fixtures.d.ts.map +0 -1
- package/dist/run/fixtures.js.map +0 -1
- package/dist/run/in-process.d.ts.map +0 -1
- package/dist/run/in-process.js.map +0 -1
- package/dist/run/last-run.d.ts.map +0 -1
- package/dist/run/last-run.js.map +0 -1
- package/dist/run/managed-process.d.ts.map +0 -1
- package/dist/run/managed-process.js.map +0 -1
- package/dist/run/output.d.ts.map +0 -1
- package/dist/run/output.js.map +0 -1
- package/dist/run/process-pool.d.ts.map +0 -1
- package/dist/run/process-pool.js.map +0 -1
- package/dist/run/provision.d.ts.map +0 -1
- package/dist/run/provision.js.map +0 -1
- package/dist/run/realm.d.ts.map +0 -1
- package/dist/run/realm.js.map +0 -1
- package/dist/run/records.d.ts.map +0 -1
- package/dist/run/records.js.map +0 -1
- package/dist/run/retry.d.ts.map +0 -1
- package/dist/run/retry.js.map +0 -1
- package/dist/run/runner.d.ts.map +0 -1
- package/dist/run/runner.js.map +0 -1
- package/dist/run/scheduler.d.ts.map +0 -1
- package/dist/run/scheduler.js.map +0 -1
- package/dist/run/secrecy.d.ts.map +0 -1
- package/dist/run/secrecy.js.map +0 -1
- package/dist/run/serial.d.ts.map +0 -1
- package/dist/run/serial.js.map +0 -1
- package/dist/run/sessions.d.ts.map +0 -1
- package/dist/run/sessions.js.map +0 -1
- package/dist/run/standalone.d.ts.map +0 -1
- package/dist/run/standalone.js.map +0 -1
- package/dist/run/steps.d.ts.map +0 -1
- package/dist/run/steps.js.map +0 -1
- package/dist/run/trace-redaction.d.ts.map +0 -1
- package/dist/run/trace-redaction.js.map +0 -1
- package/dist/run/unit-runner.d.ts.map +0 -1
- package/dist/run/unit-runner.js.map +0 -1
- package/dist/run/units.d.ts.map +0 -1
- package/dist/run/units.js.map +0 -1
- package/dist/run/worker/entry.d.ts.map +0 -1
- package/dist/run/worker/entry.js.map +0 -1
- package/dist/run/worker/handle.d.ts.map +0 -1
- package/dist/run/worker/handle.js.map +0 -1
- package/dist/run/worker/protocol.d.ts.map +0 -1
- package/dist/run/worker/protocol.js.map +0 -1
- package/dist/run/worker/session.d.ts.map +0 -1
- package/dist/run/worker/session.js.map +0 -1
- package/dist/run/worker-models.d.ts.map +0 -1
- package/dist/run/worker-models.js.map +0 -1
- package/dist/secrets.d.ts.map +0 -1
- package/dist/secrets.js.map +0 -1
- package/dist/telemetry/checkout.d.ts.map +0 -1
- package/dist/telemetry/checkout.js.map +0 -1
- package/dist/telemetry/environment.d.ts.map +0 -1
- package/dist/telemetry/environment.js.map +0 -1
- package/dist/telemetry/events.d.ts.map +0 -1
- package/dist/telemetry/events.js.map +0 -1
- package/dist/telemetry/failure-kind.d.ts.map +0 -1
- package/dist/telemetry/failure-kind.js.map +0 -1
- package/dist/telemetry/posthog.d.ts.map +0 -1
- package/dist/telemetry/posthog.js.map +0 -1
- package/dist/telemetry/project.d.ts.map +0 -1
- package/dist/telemetry/project.js.map +0 -1
- package/dist/telemetry/store.d.ts.map +0 -1
- package/dist/telemetry/store.js.map +0 -1
- package/dist/telemetry/telemetry.d.ts.map +0 -1
- package/dist/telemetry/telemetry.js.map +0 -1
- package/dist/telemetry/token.d.ts.map +0 -1
- package/dist/telemetry/token.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Browser
|
|
3
|
+
description: The browser engine, its options, and the browser fixture it contributes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`@e2e-dev/web` drives Chromium, Firefox, and WebKit through Playwright.
|
|
7
|
+
A web target names it as its engine, and it contributes the `browser` fixture for
|
|
8
|
+
browser-only work. Import `test` from the package to have `browser` typed.
|
|
9
|
+
|
|
10
|
+
The package declares `playwright` as a peer dependency (`>=1.63.0 <2`) and
|
|
11
|
+
does not install it. An app that already depends on Playwright keeps its
|
|
12
|
+
version; `e2e init` adds `playwright` only to a project that has none.
|
|
13
|
+
|
|
14
|
+
```ts title="e2e.config.ts"
|
|
15
|
+
import type { E2EConfig } from 'e2e';
|
|
16
|
+
import { web } from '@e2e-dev/web';
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
targets: [{ engine: web(), app: { url: 'http://localhost:3000' } }],
|
|
20
|
+
} satisfies E2EConfig;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Options
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
/**
|
|
27
|
+
* Options of the browser engine: how it drives the app. The app itself
|
|
28
|
+
* (its `url`, `environment`, `identity`, and the command that starts it) is
|
|
29
|
+
* the target's `app`.
|
|
30
|
+
*/
|
|
31
|
+
export interface WebOptions {
|
|
32
|
+
/**
|
|
33
|
+
* Browser to launch, `chromium` by default. A `BrowserProvider` leases
|
|
34
|
+
* hosted browsers instead: one per worker slot at `prepare`, or one per
|
|
35
|
+
* attempt, each attached to over CDP and released when its scope ends. A
|
|
36
|
+
* provider implies chromium and excludes `connect`.
|
|
37
|
+
*/
|
|
38
|
+
readonly browser?: BrowserName | BrowserProvider;
|
|
39
|
+
/**
|
|
40
|
+
* Initial viewport of every attempt's page; default 1280 by 720. `null`
|
|
41
|
+
* emulates no size: the page fills the browser window, whatever size the
|
|
42
|
+
* window has (a hosted browser's live view, a headed run), and
|
|
43
|
+
* `browser.setViewport` still fixes one for the rest of the attempt.
|
|
44
|
+
*/
|
|
45
|
+
readonly viewport?: ViewportSize | null;
|
|
46
|
+
/**
|
|
47
|
+
* How the engine's own screencast records an attempt that records video.
|
|
48
|
+
* A browser provider that records (`BrowserProvider.record`) records in
|
|
49
|
+
* its place, and ignores these. Which attempts record is the config's
|
|
50
|
+
* `video`, not an engine option.
|
|
51
|
+
*/
|
|
52
|
+
readonly screencast?: WebScreencastOptions;
|
|
53
|
+
/**
|
|
54
|
+
* Attach to a remote browser over CDP instead of launching locally. Requires
|
|
55
|
+
* the chromium browser (the default). Wired by a hosted-browser engine.
|
|
56
|
+
*/
|
|
57
|
+
readonly connect?: WebConnectOptions;
|
|
58
|
+
/**
|
|
59
|
+
* Headers added to requests within the app's site, including subdomains.
|
|
60
|
+
* Useful for preview-protection tokens. Other sites never receive them.
|
|
61
|
+
* Names are case-insensitive and replace existing headers of the same name.
|
|
62
|
+
* This enables request routing, disables the browser's HTTP cache, and
|
|
63
|
+
* blocks service workers. Playwright traces record request headers.
|
|
64
|
+
*/
|
|
65
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
66
|
+
/**
|
|
67
|
+
* HTTP basic authentication. The browser answers a `401` challenge with
|
|
68
|
+
* these credentials on any origin, matching Playwright's `httpCredentials`.
|
|
69
|
+
*/
|
|
70
|
+
readonly basicAuth?: WebBasicAuth;
|
|
71
|
+
/**
|
|
72
|
+
* The attribute that carries an element's test id: what the `testId` query
|
|
73
|
+
* (`screen.getByTestId`) resolves and what `SemanticNode.testId` reports.
|
|
74
|
+
* Defaults to `data-testid`.
|
|
75
|
+
*/
|
|
76
|
+
readonly testIdAttribute?: string;
|
|
77
|
+
/**
|
|
78
|
+
* The `User-Agent` every attempt's context sends and `navigator.userAgent`
|
|
79
|
+
* reports, for an app that switches into a test mode on a marker in the
|
|
80
|
+
* agent string. Defaults to the browser's own. A `user-agent` entry in
|
|
81
|
+
* `headers` beside it is `INVALID_CONFIG`, and so is a persistent context
|
|
82
|
+
* (`connect.reconnectEndpoint`, or a provider with `scope: 'attempt'`).
|
|
83
|
+
*/
|
|
84
|
+
readonly userAgent?: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** The engine's screencast of the page: the frame size and the JPEG quality of the frames it encodes. */
|
|
88
|
+
export interface WebScreencastOptions {
|
|
89
|
+
/** Frame size in pixels; default the viewport's, or the window's under `viewport: null`. A smaller size makes a smaller file. */
|
|
90
|
+
readonly size?: ViewportSize;
|
|
91
|
+
/** JPEG quality of each captured frame, 0 through 100; Playwright's default when unset. */
|
|
92
|
+
readonly quality?: number;
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The app a web target opens is the target's `app`, not an engine option:
|
|
97
|
+
`targets: [{ engine: web(), app: { url } }]`, documented under
|
|
98
|
+
[the app under test](/reference/config#the-app-under-test). A `web()` target
|
|
99
|
+
needs `app.url` and refuses the device keys (`bundleId`, `appPath`,
|
|
100
|
+
`launchArguments`, `permissions`); `web({ url })` or any other app key on
|
|
101
|
+
`web()` is an unknown key, `INVALID_CONFIG`.
|
|
102
|
+
A target with `app.url` is a `browser` target, so `requires: ['browser']`
|
|
103
|
+
selects web targets.
|
|
104
|
+
|
|
105
|
+
`connect` needs chromium; `cdpEndpoint(signal)` is called once per worker and
|
|
106
|
+
again at an attempt start after a disconnect. A `browser` provider object leases hosted
|
|
107
|
+
browsers and releases them when the run or the attempt ends; see
|
|
108
|
+
[Hosted browsers](/browser#hosted-browsers) for the `BrowserProvider`
|
|
109
|
+
contract and an example provider. `browser: provider` together with
|
|
110
|
+
`connect` is `INVALID_CONFIG`, and so is an option `web()` does not take, or
|
|
111
|
+
an unknown key inside `connect` or `basicAuth`, naming the nearest known key
|
|
112
|
+
when it is a likely typo (`viewprt` is `viewport`) and every key otherwise. `:` is not allowed in the `basicAuth` user name.
|
|
113
|
+
The `basicAuth` password is a string or `secrets.get(name)`: a secret the
|
|
114
|
+
engine resolves when each attempt starts, redacted like any configured one,
|
|
115
|
+
and so is the base64 credential of the `Authorization` header it becomes.
|
|
116
|
+
That protection is text only: unlike a fill, it withholds no screenshot or
|
|
117
|
+
model pixels, so a page that renders the password on screen is not masked in
|
|
118
|
+
them ([Security](/security#secrets)).
|
|
119
|
+
|
|
120
|
+
`headers` and `basicAuth` are how a test reaches a [protected preview](/starting-your-app#protected-previews).
|
|
121
|
+
|
|
122
|
+
`screencast` shapes the recording, not which attempts record: that is the
|
|
123
|
+
config's [`video`](/reference/config#video) mode. `size` takes whole pixels,
|
|
124
|
+
each side at least 1, and `quality` an integer from 0 through 100; anything
|
|
125
|
+
else, or another key, is `INVALID_CONFIG` at config load. The old
|
|
126
|
+
`web({ video })` spelling is `INVALID_CONFIG` naming `screencast`.
|
|
127
|
+
|
|
128
|
+
### Recovering a CDP transport
|
|
129
|
+
|
|
130
|
+
`connect.reconnectEndpoint(signal)` opts into recovery of the same remote
|
|
131
|
+
browser after its CDP transport disconnects. This mode uses the browser's
|
|
132
|
+
persistent default context because Chrome deletes ordinary Playwright contexts
|
|
133
|
+
when their transport detaches.
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
interface WebConnectOptions {
|
|
137
|
+
cdpEndpoint(signal: AbortSignal): string | Promise<string>;
|
|
138
|
+
reconnectEndpoint?(signal: AbortSignal): string | Promise<string>;
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
In this mode, `cdpEndpoint` provisions a fresh, dedicated browser at every
|
|
143
|
+
attempt start, including retries. The engine rejects a browser reused by a
|
|
144
|
+
previous attempt. The remote must have only its default context, and the host
|
|
145
|
+
must delete the browser when the attempt ends. Engine cleanup detaches its
|
|
146
|
+
connection; it does not terminate the host's browser.
|
|
147
|
+
|
|
148
|
+
After a disconnect, the next operation calls `reconnectEndpoint` once, bounded
|
|
149
|
+
by that operation's timeout and abort signal. This resolver must return the
|
|
150
|
+
existing browser's endpoint. The engine verifies the persistent default context
|
|
151
|
+
ID and the original page's target ID. It refuses browsers that do not expose
|
|
152
|
+
the default context ID. A missing page or a different context fails the attempt.
|
|
153
|
+
A URL match is insufficient to select a replacement tab.
|
|
154
|
+
The engine installs secure-field masking before publishing each CDP binding;
|
|
155
|
+
an incompatible Playwright version fails the connection instead of exposing pixels.
|
|
156
|
+
Recovery also requires the original page's frames to retain their closed shadow
|
|
157
|
+
DOM tracking hooks. If a document loaded without that hook while disconnected,
|
|
158
|
+
recovery fails with `ENGINE_FAILURE`: existing closed roots cannot be recovered
|
|
159
|
+
without reloading the application. Mask queries reject any untracked document.
|
|
160
|
+
|
|
161
|
+
Endpoint resolution, CDP attachment, setup, and dispatch share one timeout.
|
|
162
|
+
Exhausting it raises `OPERATION_TIMEOUT`; caller or attempt cancellation raises
|
|
163
|
+
`CANCELLED`. Cancelling a concurrent waiter does not cancel the operation that
|
|
164
|
+
started recovery. Cancelling that recovery owner fails the shared recovery.
|
|
165
|
+
|
|
166
|
+
Recovery clears old node references. Observation-derived `tapAt` calls,
|
|
167
|
+
observation-root swipes, and focused engine keyboard input require a fresh
|
|
168
|
+
engine observation before they resume.
|
|
169
|
+
An observation or locator read started before recovery cannot publish references
|
|
170
|
+
after the connection changes. Each attempt owns its binding and recordings, so
|
|
171
|
+
late cleanup cannot change a later attempt.
|
|
172
|
+
The deterministic `browser.mouse` and `browser.keyboard` fixtures remain available
|
|
173
|
+
without an agent observation. Test code owns its input and can read current
|
|
174
|
+
geometry and focus with `browser.evaluate` before acting.
|
|
175
|
+
|
|
176
|
+
Recovery preserves the page's unsaved state, storage, the attempt's secret
|
|
177
|
+
taint, and the agent ledger. Operations already dispatched
|
|
178
|
+
are never retried. Dialog and route handlers are reattached. Video and trace
|
|
179
|
+
recording resume, but a segment lost during the disconnect cannot be recovered.
|
|
180
|
+
Code using `surfaceOf(engine)` must read its accessors again after recovery;
|
|
181
|
+
previously retained Playwright objects belong to the disconnected transport.
|
|
182
|
+
|
|
183
|
+
Persistent recovery does not support `headers`, `basicAuth`, `userAgent`, `app.clearState`,
|
|
184
|
+
or session state capture and restore. `app.restart` remains available. Omit
|
|
185
|
+
`reconnectEndpoint` to keep ordinary isolated contexts and the existing behavior.
|
|
186
|
+
A `browser` provider with `scope: 'attempt'` rides the same persistent
|
|
187
|
+
context, with the same limits: the lease's `cdpEndpoint` provisions the
|
|
188
|
+
attempt's browser and its `reconnectEndpoint` (else `cdpEndpoint` again)
|
|
189
|
+
reconnects to it. A lease is fresh by the provider's contract, so the engine
|
|
190
|
+
does not compare its context with earlier attempts': a hosted service may
|
|
191
|
+
restore browsers from one snapshot, which gives new browsers the same
|
|
192
|
+
context id.
|
|
193
|
+
|
|
194
|
+
The attempt's first page is the browser's own first tab, navigated to
|
|
195
|
+
`about:blank`, rather than a second tab beside it; a page opened after that,
|
|
196
|
+
such as the one `app.restart` opens, is a new tab.
|
|
197
|
+
|
|
198
|
+
## The active tab
|
|
199
|
+
|
|
200
|
+
`browser` is the whole browser, showing one active tab. What reads or acts on
|
|
201
|
+
a page acts on that tab: `goto`, `reload`, `back`, `forward`, `url`, `title`,
|
|
202
|
+
`waitForURL`, `locator`, `frameLocator`, `evaluate`, `waitForResponse`,
|
|
203
|
+
`waitForDownload`, `keyboard`, `mouse`, the `expect(browser)` matchers, and
|
|
204
|
+
every `screen` query. What belongs to the browser covers every tab:
|
|
205
|
+
`cookies`, `setCookies`, `route`, `unroute`, and `onDialog`. `setViewport`
|
|
206
|
+
sizes the active tab and every tab opened after it.
|
|
207
|
+
|
|
208
|
+
A tab the app opens itself, from a `target="_blank"` link or `window.open`,
|
|
209
|
+
is not followed: the active tab stays the one the attempt opened, so assert
|
|
210
|
+
on what that tab shows, or open the link's URL with `browser.goto`.
|
|
211
|
+
|
|
212
|
+
## The browser fixture
|
|
213
|
+
|
|
214
|
+
```ts
|
|
215
|
+
/**
|
|
216
|
+
* The browser the attempt drives, showing one active tab. Navigation, reads,
|
|
217
|
+
* `locator`, `frameLocator`, `evaluate`, `waitForResponse`, `waitForDownload`,
|
|
218
|
+
* the keyboard and mouse, `expect(browser)`, and `screen` act on the active
|
|
219
|
+
* tab; cookies, routes, and dialog handlers cover the whole browser, every
|
|
220
|
+
* tab included. A tab the app opens itself (a `target="_blank"` link,
|
|
221
|
+
* `window.open`) is not followed: the active tab stays the one the attempt
|
|
222
|
+
* opened.
|
|
223
|
+
*/
|
|
224
|
+
export interface Browser extends Expectable<BrowserExpectation> {
|
|
225
|
+
/** Navigates to an allowed URL. */
|
|
226
|
+
goto(
|
|
227
|
+
url: string,
|
|
228
|
+
options?: {
|
|
229
|
+
waitUntil?: 'load' | 'domcontentloaded' | 'networkidle';
|
|
230
|
+
timeout?: number;
|
|
231
|
+
},
|
|
232
|
+
): Promise<void>;
|
|
233
|
+
/** Reloads the current document. */
|
|
234
|
+
reload(options?: ActionOptions): Promise<void>;
|
|
235
|
+
/** Navigates browser history back once. */
|
|
236
|
+
back(options?: ActionOptions): Promise<void>;
|
|
237
|
+
/** Navigates browser history forward once. */
|
|
238
|
+
forward(options?: ActionOptions): Promise<void>;
|
|
239
|
+
/** Returns the current URL. */
|
|
240
|
+
url(): Promise<string>;
|
|
241
|
+
/** Returns the current title. */
|
|
242
|
+
title(): Promise<string>;
|
|
243
|
+
/** Waits for the current URL to match. */
|
|
244
|
+
waitForURL(url: string | RegExp, options?: { timeout?: number }): Promise<void>;
|
|
245
|
+
/** Creates a web-only CSS or XPath locator. */
|
|
246
|
+
locator(selector: string): Locator;
|
|
247
|
+
/** Creates a screen query scope inside one iframe. */
|
|
248
|
+
frameLocator(selector: string): FrameScreen;
|
|
249
|
+
/** Evaluates trusted test code in the page. */
|
|
250
|
+
evaluate<T extends JsonValue>(fn: string | (() => T | Promise<T>)): Promise<T>;
|
|
251
|
+
/** Evaluates trusted test code with one required JSON-safe argument. */
|
|
252
|
+
evaluate<T extends JsonValue, Arg extends JsonValue>(
|
|
253
|
+
fn: string | ((arg: Arg) => T | Promise<T>),
|
|
254
|
+
arg: Arg,
|
|
255
|
+
): Promise<T>;
|
|
256
|
+
/** Adds an attempt-scoped network route. */
|
|
257
|
+
route(
|
|
258
|
+
pattern: string | RegExp,
|
|
259
|
+
handler: (route: WebRoute) => void | Promise<void>,
|
|
260
|
+
): Promise<void>;
|
|
261
|
+
/** Removes matching attempt-scoped routes. */
|
|
262
|
+
unroute(pattern: string | RegExp): Promise<void>;
|
|
263
|
+
/** Waits for a matching response. */
|
|
264
|
+
waitForResponse(
|
|
265
|
+
pattern: string | RegExp,
|
|
266
|
+
options?: { timeout?: number },
|
|
267
|
+
): Promise<WebResponse>;
|
|
268
|
+
/** Returns cookies visible to the current context. */
|
|
269
|
+
cookies(): Promise<Cookie[]>;
|
|
270
|
+
/** Sets cookies after URL validation. */
|
|
271
|
+
setCookies(cookies: readonly Cookie[]): Promise<void>;
|
|
272
|
+
/** Sets the viewport size. */
|
|
273
|
+
setViewport(size: { width: number; height: number }): Promise<void>;
|
|
274
|
+
/** Registers an attempt-scoped dialog handler and returns an unsubscribe function. */
|
|
275
|
+
onDialog(handler: DialogHandler): Promise<() => Promise<void>>;
|
|
276
|
+
/** Runs a trigger and waits for its download. */
|
|
277
|
+
waitForDownload(
|
|
278
|
+
trigger: () => Promise<void>,
|
|
279
|
+
options?: { timeout?: number },
|
|
280
|
+
): Promise<{ path: string; suggestedFilename: string }>;
|
|
281
|
+
/** Viewport-level keyboard, for whatever has focus. */
|
|
282
|
+
readonly keyboard: {
|
|
283
|
+
/** Sends one key. */
|
|
284
|
+
press(key: string): Promise<void>;
|
|
285
|
+
/** Types plain text. */
|
|
286
|
+
type(text: string): Promise<void>;
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Direct pointer input from test code, independent of agent observations.
|
|
290
|
+
* After CDP recovery, test code can read current geometry with `evaluate`
|
|
291
|
+
* before starting a pointer sequence.
|
|
292
|
+
*/
|
|
293
|
+
readonly mouse: {
|
|
294
|
+
/** Moves the pointer. */
|
|
295
|
+
move(x: number, y: number): Promise<void>;
|
|
296
|
+
/** Scrolls the pointer wheel. */
|
|
297
|
+
wheel(deltaX: number, deltaY: number): Promise<void>;
|
|
298
|
+
/** Presses the primary pointer button. */
|
|
299
|
+
down(): Promise<void>;
|
|
300
|
+
/** Releases the primary pointer button. */
|
|
301
|
+
up(): Promise<void>;
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
| Member | Default timeout |
|
|
307
|
+
| --- | --- |
|
|
308
|
+
| `goto`, `reload`, `back`, `forward` | `config.timeout`, 120000 ms, the same budget `app.open()` uses; `{ timeout }` overrides, capped by the test deadline |
|
|
309
|
+
| `waitForResponse`, `waitForDownload` | `config.actionTimeout`, 30000 ms; `{ timeout }` overrides, capped by the test deadline |
|
|
310
|
+
| `waitForURL` | `config.assertionTimeout`, 5000 ms |
|
|
311
|
+
| `url`, `title`, `evaluate`, `route`, `unroute`, `cookies`, `setCookies`, `setViewport`, `onDialog`, `keyboard.*`, `mouse.*` | `config.actionTimeout`, 30000 ms, not overridable |
|
|
312
|
+
|
|
313
|
+
Every `browser` call is a recorded `browser.<method>` step, except `locator` and
|
|
314
|
+
`frameLocator`: they build a locator without touching the page, and the
|
|
315
|
+
action or assertion on it is the step. A relative URL resolves against the
|
|
316
|
+
target's `app.url`, else `APP_URL_REQUIRED`. Declare `requires: ['browser']`
|
|
317
|
+
in a suite that also runs on other platforms.
|
|
318
|
+
|
|
319
|
+
### Navigation
|
|
320
|
+
|
|
321
|
+
`goto` defaults `waitUntil` to `'load'` and throws `POLICY_DENIED` for a
|
|
322
|
+
`file:`, `data:`, or `javascript:` URL. `waitForURL` polls every 100 ms; a
|
|
323
|
+
relative string resolves against the base URL and matches exactly after
|
|
324
|
+
normalization, a `RegExp` tests the full URL, anything else (a predicate
|
|
325
|
+
function, say) is `INVALID_ARGUMENT`, and a timeout is `ASSERTION_FAILED`. It
|
|
326
|
+
takes `timeout` only: another key, such as Playwright's `waitUntil`, is
|
|
327
|
+
`INVALID_ARGUMENT`. The other navigations throw `ACTION_FAILED`.
|
|
328
|
+
|
|
329
|
+
```ts
|
|
330
|
+
await browser.goto('/dashboard', { waitUntil: 'networkidle' });
|
|
331
|
+
await browser.waitForURL(/\/orders\/\d+$/, { timeout: 15_000 });
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Locators and frames
|
|
335
|
+
|
|
336
|
+
`locator` and `frameLocator`, at the page or inside a frame, throw
|
|
337
|
+
`INVALID_LOCATOR` for an empty selector. `frameLocator` throws
|
|
338
|
+
`LOCATOR_NOT_FOUND` for a missing frame and `LOCATOR_AMBIGUOUS` for several.
|
|
339
|
+
The selector is a Playwright selector: CSS by default, XPath with `xpath=` or
|
|
340
|
+
a leading `//`, and `>>` chains, so
|
|
341
|
+
`browser.locator('[data-testid="row"] >> nth=2 >> [data-testid="conditions"] > div')`
|
|
342
|
+
scopes CSS to one row. A `*` capture before the last part
|
|
343
|
+
(`*css=article >> text=Hello`) is `INVALID_LOCATOR`: use
|
|
344
|
+
`filter({ has })` for an element that contains another.
|
|
345
|
+
|
|
346
|
+
```ts
|
|
347
|
+
const payment = browser.frameLocator('#payment-frame');
|
|
348
|
+
await payment.getByLabel('Card number').fill('4242424242424242');
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
`frameLocator` returns a `FrameScreen`: a `Screen` whose queries answer from
|
|
352
|
+
inside the frame, plus the two web-only escape hatches scoped to it.
|
|
353
|
+
|
|
354
|
+
```ts
|
|
355
|
+
export interface FrameScreen extends Screen {
|
|
356
|
+
/** Creates a web-only CSS or XPath locator inside this frame. */
|
|
357
|
+
locator(selector: string): Locator;
|
|
358
|
+
/** Creates a screen query scope inside an iframe nested in this frame. */
|
|
359
|
+
frameLocator(selector: string): FrameScreen;
|
|
360
|
+
}
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
Reach for the frame's `locator` only when the control has no accessible
|
|
364
|
+
name, label, placeholder, or test id; the [browser guide](/browser#reach-into-an-iframe)
|
|
365
|
+
shows when that applies.
|
|
366
|
+
|
|
367
|
+
Every `screen` query searches its scope and each closed shadow root the page
|
|
368
|
+
attached under it, with Playwright's own role, name, text, label, and
|
|
369
|
+
attribute matching and each node found once, so a control the observed tree
|
|
370
|
+
lists inside a closed root resolves and takes actions and reads. `locator`,
|
|
371
|
+
`frameLocator`, and `filter({ hasText })` keep Playwright's reach and stop at
|
|
372
|
+
a closed root; the [browser guide](/browser#shadow-dom) has the details.
|
|
373
|
+
|
|
374
|
+
### evaluate
|
|
375
|
+
|
|
376
|
+
The function runs in the page and cannot access variables from the test.
|
|
377
|
+
It is serialized by its source and inlined into the page, so it must not
|
|
378
|
+
close over anything outside its own body; helpers declared inside the body
|
|
379
|
+
work. Pass outside values through `arg`. Both `arg` and the return value
|
|
380
|
+
must be `JsonValue`, otherwise the call fails with `INVALID_ARGUMENT`.
|
|
381
|
+
|
|
382
|
+
An exception in the evaluated code is `EVALUATE_FAILED` with its message. A
|
|
383
|
+
Playwright timeout is `ACTION_FAILED`; a closed page or lost context is
|
|
384
|
+
`ENGINE_FAILURE`.
|
|
385
|
+
|
|
386
|
+
```ts
|
|
387
|
+
const count = await browser.evaluate(() => document.querySelectorAll('li').length);
|
|
388
|
+
const flag = await browser.evaluate(
|
|
389
|
+
(name: string) => window.localStorage.getItem(name),
|
|
390
|
+
'featureFlags',
|
|
391
|
+
);
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Routing
|
|
395
|
+
|
|
396
|
+
`route`, `unroute`, and `waitForResponse` take a string pattern (`*` within a
|
|
397
|
+
path segment, `**` across `/`) or a `RegExp`, both tested against the full
|
|
398
|
+
URL; a predicate function is `INVALID_ARGUMENT`. A route survives
|
|
399
|
+
`app.restart()`, `app.clearState()`, and session restore.
|
|
400
|
+
The handler must decide exactly once with `fulfill`, `continue`, or `abort`;
|
|
401
|
+
deciding twice or not at all is `ACTION_FAILED`, as is a `waitForResponse`
|
|
402
|
+
that nothing matches inside the deadline. The response resolves once its body
|
|
403
|
+
is known: `url`, `status`, and `headers` are always readable, and a body the
|
|
404
|
+
browser could not read (a connection reset short of the declared
|
|
405
|
+
`Content-Length`, a request the page aborted, or a redirect, whose body the
|
|
406
|
+
browser never keeps) rejects `text()` and `json()` with `ACTION_FAILED`
|
|
407
|
+
instead of an empty string. A genuinely empty body reads as `''`. A handler
|
|
408
|
+
that throws (a failed `expect` on the request, say) fails the next step with
|
|
409
|
+
that error, or the attempt at its end when no step follows; a handler still
|
|
410
|
+
running then gets the cleanup budget to finish. One that outlives the budget
|
|
411
|
+
fails the attempt with `CLEANUP_TIMEOUT`, and whatever it throws afterwards is
|
|
412
|
+
dropped.
|
|
413
|
+
|
|
414
|
+
```ts
|
|
415
|
+
await browser.route('**/api/quote', async (route) => {
|
|
416
|
+
await route.fulfill({ json: { cents: 4200 } });
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
const response = await browser.waitForResponse('**/api/orders');
|
|
420
|
+
expect(response.status).toBe(201);
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
```ts
|
|
424
|
+
/** `json` or `body`, never both; neither fulfills with an empty body. */
|
|
425
|
+
export type RouteFulfillResponse = {
|
|
426
|
+
status?: number;
|
|
427
|
+
headers?: Record<string, string>;
|
|
428
|
+
} & (
|
|
429
|
+
| { json: JsonValue; body?: never }
|
|
430
|
+
| { body: string; json?: never }
|
|
431
|
+
| { body?: never; json?: never }
|
|
432
|
+
);
|
|
433
|
+
|
|
434
|
+
export interface WebRoute {
|
|
435
|
+
/** The intercepted request. */
|
|
436
|
+
readonly request: {
|
|
437
|
+
readonly url: string;
|
|
438
|
+
readonly method: string;
|
|
439
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
440
|
+
readonly postData?: string;
|
|
441
|
+
};
|
|
442
|
+
/** Fulfills the intercepted request once. */
|
|
443
|
+
fulfill(response: RouteFulfillResponse): Promise<void>;
|
|
444
|
+
/** Continues the intercepted request once. */
|
|
445
|
+
continue(): Promise<void>;
|
|
446
|
+
/** Aborts the intercepted request once. */
|
|
447
|
+
abort(): Promise<void>;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export interface WebResponse {
|
|
451
|
+
/** Response URL. */
|
|
452
|
+
readonly url: string;
|
|
453
|
+
/** HTTP status. */
|
|
454
|
+
readonly status: number;
|
|
455
|
+
/** Response headers, lower-cased names. */
|
|
456
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
457
|
+
/** Parses the response body as JSON. */
|
|
458
|
+
json<T = unknown>(): Promise<T>;
|
|
459
|
+
/** Reads the response body as text. */
|
|
460
|
+
text(): Promise<string>;
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
### Cookies and viewport
|
|
465
|
+
|
|
466
|
+
`setCookies` validates every cookie before setting any; an unparseable
|
|
467
|
+
target or a forbidden scheme is `POLICY_DENIED` and nothing is set. For the
|
|
468
|
+
`domain` form the scheme follows the base URL and a leading `.` is stripped.
|
|
469
|
+
`setViewport` records the new size on the report. It works before the first
|
|
470
|
+
navigation too, as Playwright's `setViewportSize` does: the next `app.open`
|
|
471
|
+
loads at that size, so a phone-sized test never renders the desktop layout first.
|
|
472
|
+
The size holds for the rest of the attempt, through `app.restart()` and
|
|
473
|
+
`app.clearState()`.
|
|
474
|
+
|
|
475
|
+
```ts
|
|
476
|
+
export interface CookieFields {
|
|
477
|
+
/** Cookie name. */
|
|
478
|
+
name: string;
|
|
479
|
+
/** Cookie value. */
|
|
480
|
+
value: string;
|
|
481
|
+
/** Unix timestamp in whole seconds. */
|
|
482
|
+
expires?: number;
|
|
483
|
+
/** HttpOnly flag. */
|
|
484
|
+
httpOnly?: boolean;
|
|
485
|
+
/** Secure flag. */
|
|
486
|
+
secure?: boolean;
|
|
487
|
+
/** SameSite attribute. */
|
|
488
|
+
sameSite?: 'Strict' | 'Lax' | 'None';
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/** `url`, or `domain` with an optional `path`, never both. */
|
|
492
|
+
export type Cookie = CookieFields &
|
|
493
|
+
(
|
|
494
|
+
| { url: string; domain?: never; path?: never }
|
|
495
|
+
| { url?: never; domain: string; path?: string }
|
|
496
|
+
);
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
```ts
|
|
500
|
+
await browser.setCookies([{ url: 'http://localhost:3000', name: 'tz', value: 'UTC' }]);
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
### Dialogs and downloads
|
|
504
|
+
|
|
505
|
+
A function handler must call `accept` or `dismiss`; one that does neither
|
|
506
|
+
has the dialog dismissed and fails the next step with `APP_NOT_OPEN`, as an
|
|
507
|
+
unhandled dialog does. One that throws fails the next step, or the attempt at
|
|
508
|
+
its end when no step follows, with its error: a failed `expect` stays
|
|
509
|
+
`ASSERTION_FAILED`, an unclassified throw is `ENGINE_FAILURE`.
|
|
510
|
+
`waitForDownload` registers the file as a `download`
|
|
511
|
+
artifact and throws `ACTION_FAILED` when it does not complete in time. A
|
|
512
|
+
trigger that resolves in time but starts no download fails with
|
|
513
|
+
`no download started within <n>ms; the trigger resolved after <m>ms`, where
|
|
514
|
+
the wait includes the trigger's own time. A trigger still running at the
|
|
515
|
+
timeout fails with the step timeout, and one that throws with its own error.
|
|
516
|
+
On a hosted browser the file comes back through the provider's
|
|
517
|
+
[`downloads`](/browser#downloads-on-the-provider).
|
|
518
|
+
|
|
519
|
+
```ts
|
|
520
|
+
/** A native dialog as a test's handler sees it. */
|
|
521
|
+
export interface Dialog {
|
|
522
|
+
/** The dialog's text. */
|
|
523
|
+
readonly message: string;
|
|
524
|
+
/** Accepts the dialog once. */
|
|
525
|
+
accept(text?: string): Promise<void>;
|
|
526
|
+
/** Dismisses the dialog once. */
|
|
527
|
+
dismiss(): Promise<void>;
|
|
528
|
+
}
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
```ts
|
|
532
|
+
const off = await browser.onDialog('accept');
|
|
533
|
+
await screen.getByRole('button', 'Delete').tap();
|
|
534
|
+
await off();
|
|
535
|
+
|
|
536
|
+
const file = await browser.waitForDownload(() =>
|
|
537
|
+
screen.getByRole('link', 'Export CSV').tap(),
|
|
538
|
+
);
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
### keyboard and mouse
|
|
542
|
+
|
|
543
|
+
Both namespaces are viewport-level. Prefer `locator.press` and
|
|
544
|
+
`locator.fill` when a target exists. `keyboard.type` takes plain text only,
|
|
545
|
+
never a `Secret`.
|
|
546
|
+
|
|
547
|
+
### JsonValue
|
|
548
|
+
|
|
549
|
+
```ts
|
|
550
|
+
/** A JSON scalar. */
|
|
551
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
552
|
+
|
|
553
|
+
/** Data that survives JSON serialization. */
|
|
554
|
+
export type JsonValue =
|
|
555
|
+
| JsonPrimitive
|
|
556
|
+
| { readonly [key: string]: JsonValue }
|
|
557
|
+
| readonly JsonValue[];
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
## Semantic capture recovery
|
|
561
|
+
|
|
562
|
+
When the semantic reader times out, agent observations can recover using a
|
|
563
|
+
fresh viewport screenshot. Playwright runs a new secure-field mask sweep
|
|
564
|
+
across every reachable frame, including open and closed shadow roots. Every
|
|
565
|
+
mask probe must succeed. The observation explicitly reports unavailable
|
|
566
|
+
semantics and clears earlier node references.
|
|
567
|
+
|
|
568
|
+
Recovery requires time left in the operation budget and permission from the
|
|
569
|
+
runner. `act` permits it before a secret fill; judgments also require
|
|
570
|
+
`vision: true` or `'only'`. Failed masking, cancellation, and hard engine
|
|
571
|
+
errors still stop the observation.
|
|
572
|
+
|
|
573
|
+
When fallback is permitted, the reader reserves one quarter of the remaining
|
|
574
|
+
observation budget, capped at two seconds, for the screenshot. The deadline
|
|
575
|
+
covers the page walk, metadata and element readback, and nested frames.
|
|
576
|
+
Semantic metadata crosses the Playwright connection as one JSON string to
|
|
577
|
+
reduce serialization overhead. Actions still use the live element handles
|
|
578
|
+
captured with that metadata. Pages that replace `JSON.stringify` or add
|
|
579
|
+
`toJSON` methods to object or array prototypes use structured transfer.
|
|
580
|
+
Cleanup does not wait for stalled protocol replies. An abandoned reader
|
|
581
|
+
cannot reuse node IDs or publish handles over a newer observation.
|
|
582
|
+
|
|
583
|
+
## Exported types
|
|
584
|
+
|
|
585
|
+
`WebOptions`, `WebScreencastOptions`, `WebConnectOptions`, `WebBasicAuth`, `BrowserName`,
|
|
586
|
+
`BrowserProvider`, `BrowserProviderScope`, `BrowserRequest`, `BrowserLease`,
|
|
587
|
+
`BrowserReleaseContext`, `BrowserProviderDownloads`, `BrowserDownloadContext`,
|
|
588
|
+
`PlaywrightLiveSurface`, `Browser`, `FrameScreen`,
|
|
589
|
+
`BrowserExpectation`, `WebRoute`, `RouteFulfillResponse`, `WebResponse`,
|
|
590
|
+
`Cookie`, `CookieFields`, `Dialog`, and `DialogHandler` are exported from the
|
|
591
|
+
package for typing config helpers and fixtures. The runtime exports are
|
|
592
|
+
`web`, [`surfaceOf`](#surfaceof), and `test`, `describe`, `beforeEach`,
|
|
593
|
+
`afterEach`, `beforeAll`, and `afterAll`, typed with the `browser` fixture.
|
|
594
|
+
|
|
595
|
+
## expect(browser)
|
|
596
|
+
|
|
597
|
+
`expect(browser)` returns the `BrowserExpectation` the engine attaches: `toHaveURL`,
|
|
598
|
+
`toHaveTitle`, and `toHaveClass`. See [browser matchers](/reference/expect#browser-matchers).
|
|
599
|
+
|
|
600
|
+
## surfaceOf
|
|
601
|
+
|
|
602
|
+
```ts
|
|
603
|
+
import { web, surfaceOf } from '@e2e-dev/web';
|
|
604
|
+
|
|
605
|
+
const engine = web();
|
|
606
|
+
const live = surfaceOf(engine); // PlaywrightLiveSurface | undefined
|
|
607
|
+
live!.page(); // the Page of the current attempt
|
|
608
|
+
live!.context(); // its BrowserContext
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
Use `surfaceOf(handle)` in a [custom executor](/executors#driving-the-page-yourself)
|
|
612
|
+
to access the current Playwright page and context directly. It returns
|
|
613
|
+
`undefined` for a handle from another package. The accessors throw
|
|
614
|
+
`INVALID_STATE` outside an active attempt. Direct Playwright calls are not
|
|
615
|
+
recorded as steps.
|