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,316 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Writing an engine
|
|
3
|
+
description: Implement the e2e engine contract for another UI platform.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
An engine connects `screen`, `app`, and agent calls to a UI platform through
|
|
7
|
+
the `e2e/engine` contract. Use it to support a desktop app, a TV, or another
|
|
8
|
+
platform.
|
|
9
|
+
|
|
10
|
+
The existing `@e2e-dev/web` and `@e2e-dev/mobile` packages use the
|
|
11
|
+
same public `defineEngine` API. Read their implementations alongside this
|
|
12
|
+
guide for complete examples.
|
|
13
|
+
|
|
14
|
+
## The ownership boundary
|
|
15
|
+
|
|
16
|
+
The runner manages tests and policy. The engine observes and controls the UI.
|
|
17
|
+
|
|
18
|
+
| Concern | Owner |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| Collection, targets, retries, hooks, sessions | runner |
|
|
21
|
+
| Query polling and strict single-match cardinality | runner |
|
|
22
|
+
| Assertion polling, step recording, timeouts | runner |
|
|
23
|
+
| One immediate query, one node read | engine |
|
|
24
|
+
| One node's actionability and input dispatch | engine |
|
|
25
|
+
| Agent planning, prompts, budgets, ledger | runner |
|
|
26
|
+
| Tool authorization and secret resolution | runner |
|
|
27
|
+
| Process, page, and device mechanics | engine |
|
|
28
|
+
| Source masking of secure observations | engine |
|
|
29
|
+
| Defense-in-depth redaction | runner |
|
|
30
|
+
|
|
31
|
+
`locate` must return the current matches immediately, including an empty
|
|
32
|
+
array when nothing matches. Do not add query retries or reject multiple
|
|
33
|
+
matches. The runner handles polling and single-match checks.
|
|
34
|
+
|
|
35
|
+
## The shape of an engine
|
|
36
|
+
|
|
37
|
+
Return a handle from `defineEngine`. It validates the manifest and determines
|
|
38
|
+
the engine's capabilities when the config loads.
|
|
39
|
+
|
|
40
|
+
This skeleton assumes a `createClient` adapter for your platform. Its nodes
|
|
41
|
+
must follow the semantic tree contract described below.
|
|
42
|
+
|
|
43
|
+
```ts title="src/index.ts"
|
|
44
|
+
import { ConfigurationError, defineEngine, resolveExpression, type EngineHandle } from 'e2e/engine';
|
|
45
|
+
|
|
46
|
+
export function hyperdrive(options: { device: string }): EngineHandle {
|
|
47
|
+
const client = createClient(options);
|
|
48
|
+
let bundleId = '';
|
|
49
|
+
return defineEngine({
|
|
50
|
+
name: 'hyperdrive',
|
|
51
|
+
version: '1.0.0',
|
|
52
|
+
spiVersion: 1,
|
|
53
|
+
platform: 'ios',
|
|
54
|
+
validateApp(app, { targetName }) {
|
|
55
|
+
if (app.bundleId === undefined) {
|
|
56
|
+
throw new ConfigurationError('INVALID_CONFIG', `target "${targetName}" needs app.bundleId`);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
async init(info) {
|
|
60
|
+
bundleId = info.app.bundleId!;
|
|
61
|
+
await client.boot();
|
|
62
|
+
},
|
|
63
|
+
async dispose(context) { await client.shutdown({ signal: context.signal }); },
|
|
64
|
+
async observe() {
|
|
65
|
+
const screen = await client.snapshot();
|
|
66
|
+
return {
|
|
67
|
+
location: screen.title,
|
|
68
|
+
// One root with a stable id: `perform(root, swipe)` is the viewport swipe.
|
|
69
|
+
root: { ref: { id: 'root', revision: '' }, role: 'window', children: screen.nodes },
|
|
70
|
+
viewport: screen.viewport,
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
async locate(expression) {
|
|
74
|
+
const screen = await client.snapshot();
|
|
75
|
+
return resolveExpression(expression, screen.nodes);
|
|
76
|
+
},
|
|
77
|
+
actions: ['tap', 'fill', 'swipe'],
|
|
78
|
+
async perform(ref, action) {
|
|
79
|
+
switch (action.kind) {
|
|
80
|
+
case 'tap': return client.tap(ref.id);
|
|
81
|
+
case 'fill': return client.type(ref.id, action.value);
|
|
82
|
+
case 'swipe': return client.scroll(ref.id === 'root' ? undefined : ref.id, action.direction);
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
session: {
|
|
86
|
+
async back() { await client.back(); },
|
|
87
|
+
async restart() { await client.relaunch(bundleId); },
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```ts title="e2e.config.ts"
|
|
94
|
+
targets: [{ name: 'phone', engine: hyperdrive({ device: 'iPhone 16' }), app: { bundleId: 'com.example.app' } }],
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
`version` is required and forms part of the replay cache key. Change it when
|
|
98
|
+
engine behavior changes. With `perform`, also declare `actions` to list the
|
|
99
|
+
supported action kinds. `locate` answers `screen` queries; the exported
|
|
100
|
+
`resolveExpression` applies the standard query rules to a semantic tree.
|
|
101
|
+
The app under test is the target's `app`, not an engine option:
|
|
102
|
+
`validateApp` checks it at config load, and `prepare` and `init` receive it
|
|
103
|
+
as `info.app`. `session` provides methods to open or
|
|
104
|
+
restart it.
|
|
105
|
+
|
|
106
|
+
## What an engine is not
|
|
107
|
+
|
|
108
|
+
Engines drive user interfaces. Use fixtures for supporting services such as
|
|
109
|
+
an inbox, a database, or a test API. Add those through
|
|
110
|
+
[`test.extend`](/reference/test#your-own-fixtures).
|
|
111
|
+
|
|
112
|
+
<Note>
|
|
113
|
+
Import shared types and helpers from `e2e/engine`, and declare `e2e` as a
|
|
114
|
+
peer dependency so the engine and runner share their error classes.
|
|
115
|
+
The public exports include errors, text and URL matching, assertion polling,
|
|
116
|
+
JSON validation, and cancellation helpers. There is no internal subpath.
|
|
117
|
+
</Note>
|
|
118
|
+
|
|
119
|
+
## Capabilities
|
|
120
|
+
|
|
121
|
+
Implement the optional methods your platform supports. Their presence
|
|
122
|
+
determines the available capabilities. Calls to unsupported capabilities
|
|
123
|
+
fail with `UNSUPPORTED_CAPABILITY`. A useful engine starts with these:
|
|
124
|
+
|
|
125
|
+
| Member | Unlocks |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| `observe(context, options?)` | Agent observations and the replay cache |
|
|
128
|
+
| `perform(ref, action, context)` + `actions` | Node actions of the declared kinds, including viewport scrolling through `swipe` |
|
|
129
|
+
| `locate(expression, context)` | `screen`, `Locator`, and `expect(locator)` |
|
|
130
|
+
| `validateApp(app, info)` | A config-load check of the target's `app`: throw `INVALID_CONFIG` naming `info.targetName` for a field the platform needs or cannot drive. [Reference](/reference/engine#app) |
|
|
131
|
+
| `session.{open?,back?,restart?,reset?}` | `app.open()`, `app.back()`, `app.restart()`, `app.clearState()`, and the agent's `navigate` and `back` verbs |
|
|
132
|
+
|
|
133
|
+
Pointer actions, the keyboard, saved state, artifacts, and contributed
|
|
134
|
+
fixtures are optional capabilities of their own; the
|
|
135
|
+
[engine reference](/reference/engine#capabilities) lists every member.
|
|
136
|
+
|
|
137
|
+
`actions`, `location`, `pointer`, and `keyboard` require `observe`. The agent
|
|
138
|
+
receives only tools supported by the engine and the step's declared
|
|
139
|
+
credentials: each action kind you declare unlocks its verb (`hover` the
|
|
140
|
+
`hover` tool, `dragTo` the `drag` tool, `setInputFiles` the `upload` tool,
|
|
141
|
+
`check` with `uncheck` the `check` tool, and so on; the
|
|
142
|
+
[engine reference](/reference/engine#capabilities) lists the mapping).
|
|
143
|
+
Agent and locator actions both reach `perform` as a
|
|
144
|
+
`LocatorAction`. Throw `UNSUPPORTED_CAPABILITY` if a particular node cannot
|
|
145
|
+
support an otherwise declared action.
|
|
146
|
+
|
|
147
|
+
The agent's `scroll` and `screen.swipe()` call
|
|
148
|
+
`perform(root, { kind: 'swipe' })`. Keep the root id stable across observations.
|
|
149
|
+
A swipe on another node scrolls within that node.
|
|
150
|
+
|
|
151
|
+
Use the exported `parseKey` to interpret `press` keys such as `Enter` or
|
|
152
|
+
`ControlOrMeta+a`. The runner rejects invalid spellings with `INVALID_ARGUMENT`.
|
|
153
|
+
Map valid keys to your platform and throw `UNSUPPORTED_CAPABILITY` for keys
|
|
154
|
+
it cannot send. See the [key grammar](/reference/engine#keys).
|
|
155
|
+
|
|
156
|
+
An observation may include `location`, such as a URL, screen title, or window
|
|
157
|
+
name. The runner anchors replay cache entries on it and applies origin
|
|
158
|
+
checks when it parses as a URL.
|
|
159
|
+
|
|
160
|
+
`session.open` receives a URL already resolved by the runner. After `restart`
|
|
161
|
+
or `reset`, the runner reopens the configured address through `open`. If your
|
|
162
|
+
engine has no `open` method, relaunch the app within those hooks.
|
|
163
|
+
|
|
164
|
+
There is no separate secure-fill capability flag. Before dispatching a
|
|
165
|
+
secret fill, the runner checks the declared credential, current
|
|
166
|
+
observation, and compatible editable field. The engine receives a
|
|
167
|
+
`fill` action with `sensitive: true` and must handle it securely or throw
|
|
168
|
+
`UNSUPPORTED_CAPABILITY`. The runner then stops taking screenshots; see
|
|
169
|
+
[screenshots after a secret fill](/security#screenshots-after-a-secret-fill).
|
|
170
|
+
|
|
171
|
+
An engine option can take a secret too, such as a password the engine sends
|
|
172
|
+
the app. Accept `string | Secret` (tell them apart with `isSecret` from
|
|
173
|
+
`e2e/engine`), list each handle in the engine's `secrets`, and read the value
|
|
174
|
+
in `startAttempt` through `context.resolveSecret(secret)`. The config load
|
|
175
|
+
rejects a name no secret has, and the runner redacts the value from the
|
|
176
|
+
moment it resolves. When the app sees the value in another form (a header
|
|
177
|
+
that encodes it), return that form from `resolveSecret(secret, { derived })`
|
|
178
|
+
so it is redacted under the same name. The protection is text only: a
|
|
179
|
+
session whose engine resolved a secret keeps its screenshots and pixels. A config calls `secrets.get()` before any run exists, so
|
|
180
|
+
the handle is a reference by name until then.
|
|
181
|
+
|
|
182
|
+
### Lifecycle
|
|
183
|
+
|
|
184
|
+
In the order they run:
|
|
185
|
+
|
|
186
|
+
- `prepare`: once per target in the runner process. Install runtimes here;
|
|
187
|
+
the `env` it returns reaches every worker.
|
|
188
|
+
- `init`: once per worker before its first attempt. Boot devices here.
|
|
189
|
+
- `startAttempt`: before each attempt. Create the test's UI.
|
|
190
|
+
- `settleAttempt`: after the body and again after teardown. Throw the error
|
|
191
|
+
of a test callback no step awaited, such as a dialog handler.
|
|
192
|
+
- `endAttempt`: after each attempt. Clean up the test's UI; it also runs
|
|
193
|
+
after a failed start, so make it idempotent.
|
|
194
|
+
- `dispose`: at worker shutdown, even if `init` never ran.
|
|
195
|
+
- `finish`: once per target after the last worker is gone, whenever
|
|
196
|
+
`prepare` ran. Release what `prepare` acquired.
|
|
197
|
+
|
|
198
|
+
Use `info.env` for spawned processes and `info.log` to report progress. The
|
|
199
|
+
[engine reference](/reference/engine#lifecycle) has each hook's arguments and
|
|
200
|
+
budgets.
|
|
201
|
+
|
|
202
|
+
### Nodes and refs
|
|
203
|
+
|
|
204
|
+
`observe` returns a `SemanticNode` tree. `locate` returns the nodes matching
|
|
205
|
+
an expression. Assign ids that stay unique for the UI's lifetime and keep
|
|
206
|
+
the root id stable. The runner assigns revisions and checks staleness.
|
|
207
|
+
When `perform` receives `{ id, revision }`, look up the id and throw
|
|
208
|
+
`NODE_STALE` if the node no longer exists. When a match leaves the UI while
|
|
209
|
+
`locate` reads it, throw a retryable `NODE_STALE` too, never a node read from
|
|
210
|
+
what is gone: a removed element reports no size, and a node read from it would
|
|
211
|
+
pass `toBeHidden` while its replacement is on screen. The runner re-resolves
|
|
212
|
+
within the caller's deadline.
|
|
213
|
+
|
|
214
|
+
Limit snapshot size if the platform can return an unbounded tree. Set
|
|
215
|
+
`truncated` when the limit cuts off nodes so the runner knows the listing
|
|
216
|
+
is incomplete. Use the platform's accessible names for nodes.
|
|
217
|
+
|
|
218
|
+
Put test identifiers in `testId`, whether they come from a document attribute,
|
|
219
|
+
an iOS accessibility identifier, an Android resource id, or a desktop
|
|
220
|
+
automation id. The `testId` query matches only that field.
|
|
221
|
+
|
|
222
|
+
### Vision-only surfaces
|
|
223
|
+
|
|
224
|
+
For a UI without a semantic tree, return a childless `root` and `pixels`
|
|
225
|
+
from `observe`. Implement `performAt` and declare the supported kinds in
|
|
226
|
+
`pointerActions`.
|
|
227
|
+
|
|
228
|
+
The agent receives the screenshot and can act through tools such as `tap_at`.
|
|
229
|
+
The runner passes points to `performAt` when no listed node occupies them.
|
|
230
|
+
Coordinate actions replay only at the recorded viewport size, and the runner
|
|
231
|
+
checks the recorded end state before accepting a replay.
|
|
232
|
+
|
|
233
|
+
### Keyboard
|
|
234
|
+
|
|
235
|
+
Implement `keyboard` to type into a control after the agent focuses it.
|
|
236
|
+
`keyboard.type` must deliver the text as a person typing would, through the
|
|
237
|
+
platform's keyboard path, so that key events reach the app where the platform
|
|
238
|
+
has them: a browser engine dispatches `keydown`, `keypress`, `input`, and
|
|
239
|
+
`keyup` per character; a device engine sends the text through the device
|
|
240
|
+
keyboard. Inserting the value without keystrokes is not a compliant
|
|
241
|
+
implementation. It must throw `NOT_ACTIONABLE` when no editable control has
|
|
242
|
+
focus. Omit `dismiss` on platforms without an on-screen keyboard. The same
|
|
243
|
+
hook, after the `focus` action, is what `locator.pressSequentially` types
|
|
244
|
+
through; the harness composes the two and asks nothing more of the engine.
|
|
245
|
+
|
|
246
|
+
### State is a credential
|
|
247
|
+
|
|
248
|
+
A `state` snapshot can contain authentication data such as cookies and tokens.
|
|
249
|
+
The runner encrypts it with a per-run key, binds it to the run, target,
|
|
250
|
+
engine, and app identity, and deletes it after the run.
|
|
251
|
+
|
|
252
|
+
Do not persist, cache, log, or include snapshots in errors. `restore` must
|
|
253
|
+
replace the app's entire persisted state instead of merging into it.
|
|
254
|
+
|
|
255
|
+
### Errors
|
|
256
|
+
|
|
257
|
+
Throw `EngineError` with a code from the
|
|
258
|
+
[engine reference](/reference/engine). Only `NODE_STALE` and `FRAME_NOT_FOUND`
|
|
259
|
+
can be retryable. Use `ACTION_MAY_HAVE_COMMITTED` when an action may already
|
|
260
|
+
have taken effect so the runner does not repeat it.
|
|
261
|
+
|
|
262
|
+
`INVALID_STATE` maps to `APP_NOT_OPEN`, and `UNSUPPORTED_CAPABILITY` is a
|
|
263
|
+
configuration error. Unknown errors become infrastructure failures.
|
|
264
|
+
|
|
265
|
+
## Contributed fixtures
|
|
266
|
+
|
|
267
|
+
Engines can contribute fixtures such as `browser` or `device`. Wrap their methods
|
|
268
|
+
with `context.fixture` to record calls as `<fixture>.<method>` steps with
|
|
269
|
+
their own artifacts and failures.
|
|
270
|
+
|
|
271
|
+
```ts
|
|
272
|
+
fixtures: {
|
|
273
|
+
device: (context) => context.fixture('device', {
|
|
274
|
+
async setNetwork(state: 'online' | 'offline') { await client.network(state); },
|
|
275
|
+
async home() { await client.home(); },
|
|
276
|
+
}, {
|
|
277
|
+
setNetwork: { kind: 'resource', label: (state) => state },
|
|
278
|
+
home: { kind: 'resource' },
|
|
279
|
+
}),
|
|
280
|
+
},
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
```ts title="tests/fixtures.ts"
|
|
284
|
+
import { test as base } from 'e2e';
|
|
285
|
+
import type { Device } from 'e2e-engine-hyperdrive';
|
|
286
|
+
|
|
287
|
+
export const test = base.extend<{ device: Device }>();
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
The fixture context provides URL policy checks, timeouts, operation budgets,
|
|
291
|
+
artifact attachment, and factories for locators and assertions. For example,
|
|
292
|
+
`expectable(target, factory)` adds matchers for `expect(fixture)`. See the
|
|
293
|
+
[engine reference](/reference/engine) for the full context.
|
|
294
|
+
|
|
295
|
+
## Ship a tool pack
|
|
296
|
+
|
|
297
|
+
Platform operations the action vocabulary lacks can ship as a pack of
|
|
298
|
+
[project tools](/tools) built with `defineTool`, with `platforms` set so each
|
|
299
|
+
tool is offered only on compatible targets. `@e2e-dev/mobile/tools` is one
|
|
300
|
+
example.
|
|
301
|
+
|
|
302
|
+
## Verify it
|
|
303
|
+
|
|
304
|
+
Run a test file against your engine. Check lifecycle order, observations,
|
|
305
|
+
actions, errors, and unsupported capabilities.
|
|
306
|
+
[`engine-contract.test.ts`](https://github.com/tester-army/e2e/blob/main/packages/e2e/tests/integration/engine-contract.test.ts)
|
|
307
|
+
demonstrates the runner's contract and provides examples for these checks.
|
|
308
|
+
|
|
309
|
+
<CardGroup cols={2}>
|
|
310
|
+
<Card title="Engine contract" icon="gear" href="/reference/engine">
|
|
311
|
+
Every type and hook of `e2e/engine`.
|
|
312
|
+
</Card>
|
|
313
|
+
<Card title="Mobile engine reference" icon="mobile-screen" href="/reference/mobile">
|
|
314
|
+
A complete device engine to read alongside.
|
|
315
|
+
</Card>
|
|
316
|
+
</CardGroup>
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Writing tests
|
|
3
|
+
description: Goals, checks, extraction, and the deterministic APIs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use agent calls for goals and questions about the screen. Use `screen` and
|
|
7
|
+
`expect` when you know the exact action or value to check. A test can freely mix both.
|
|
8
|
+
|
|
9
|
+
```ts title="tests/todos.e2e.ts"
|
|
10
|
+
import { test, expect } from 'e2e';
|
|
11
|
+
|
|
12
|
+
test('todos survive a filter round-trip', async ({ app, agent, screen }) => {
|
|
13
|
+
await app.open('/todos');
|
|
14
|
+
|
|
15
|
+
await agent.act('add todos "Buy milk" and "Walk the dog", complete the first');
|
|
16
|
+
await agent.assert('only one todo remains open');
|
|
17
|
+
|
|
18
|
+
await screen.getByRole('tab', 'Done').tap();
|
|
19
|
+
await expect(screen.getByTestId('todo')).toHaveCount(1);
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Goals: `agent.act`
|
|
24
|
+
|
|
25
|
+
Give `act` one goal. The agent chooses and performs the actions, then returns
|
|
26
|
+
when the goal passes or throws when it fails.
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
await agent.act('complete checkout with the test card');
|
|
30
|
+
await agent.act('invite {email} as an editor', { params: { email: 'ada@example.test' } });
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Pass values through `params` so the agent uses your test data. For passwords,
|
|
34
|
+
use a `Secret`, this prevents the model from seeing your secrets. See [Signing in](/authentication).
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import { credentials } from 'e2e';
|
|
38
|
+
|
|
39
|
+
const member = credentials.user('member');
|
|
40
|
+
await agent.act('Sign in', {
|
|
41
|
+
params: { username: member.username, password: member.password },
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
<Tip>
|
|
46
|
+
**Write instructions as you would say them out loud**
|
|
47
|
+
|
|
48
|
+
Name what is visible and prefer the exact wording on screen. One goal per
|
|
49
|
+
call. The flow inside a goal is the model's job; the order of goals is yours.
|
|
50
|
+
</Tip>
|
|
51
|
+
|
|
52
|
+
For a value that changes on every run, wrap it in `unique()` so the
|
|
53
|
+
[replay cache](/cache#what-must-match) can still replay the step:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
import { expect, unique } from 'e2e';
|
|
57
|
+
|
|
58
|
+
const email = `ada+${Date.now()}@example.test`;
|
|
59
|
+
await agent.act('sign up with email {email}', { params: { email: unique(email) } });
|
|
60
|
+
await expect(screen.getByText(email)).toBeVisible();
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
If a goal fails, check the report and make the instruction more specific.
|
|
64
|
+
Use the labels on screen. Put vocabulary shared by several goals in the
|
|
65
|
+
agent's `context`; see [Agents and personas](/agents).
|
|
66
|
+
|
|
67
|
+
A step can pass, fail, or be blocked by something such as missing credentials.
|
|
68
|
+
[How agent steps work](/agent-steps#how-a-step-ends) explains the verdicts and
|
|
69
|
+
exit codes.
|
|
70
|
+
|
|
71
|
+
## Checks: `assert`, `waitFor`, `extract`
|
|
72
|
+
|
|
73
|
+
`assert` checks a statement against the current screen. A false statement
|
|
74
|
+
fails with `ASSERTION_FAILED`. If the screen does not provide enough evidence,
|
|
75
|
+
it fails with `ASSERTION_INCONCLUSIVE`.
|
|
76
|
+
|
|
77
|
+
The judging model sees the statement and the current screen. It does not see
|
|
78
|
+
earlier steps or the acting agent's summaries.
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
await agent.assert('the dashboard shows a trial badge');
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`assert` checks the screen now. Use `waitFor` when the condition may become true
|
|
85
|
+
later. It polls the screen and only calls the model when the observation changes.
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
await agent.waitFor('the export finishes and a download link appears', {
|
|
89
|
+
interval: 500,
|
|
90
|
+
timeout: 120_000,
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`extract` reads structured data from the screen. Provide a
|
|
95
|
+
[Standard Schema](https://standardschema.dev) validator, such as Zod, to define
|
|
96
|
+
the result.
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
import { z } from 'zod';
|
|
100
|
+
|
|
101
|
+
const data = await agent.extract('every todo title and how many remain', {
|
|
102
|
+
schema: z.object({ titles: z.array(z.string()), remaining: z.number().int() }),
|
|
103
|
+
});
|
|
104
|
+
expect(data.titles).toContain('Buy milk');
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
<Tip>
|
|
108
|
+
For model-generated descriptions, check the relevant meaning rather than the
|
|
109
|
+
entire sentence. Use a locator assertion when the exact text matters.
|
|
110
|
+
</Tip>
|
|
111
|
+
|
|
112
|
+
### Judging pixels
|
|
113
|
+
|
|
114
|
+
By default, judgments read a redacted text snapshot of the screen. Add
|
|
115
|
+
`vision: true` for visual checks, such as charts or layout. Use
|
|
116
|
+
`vision: 'only'` to judge the screenshot alone.
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
await agent.assert('the chart trends upward', { vision: true });
|
|
120
|
+
await agent.assert('the search form is not covered by a banner', { vision: 'only' });
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
`act` requests screenshots itself when it needs them, so it has no `vision`
|
|
124
|
+
option. On supported engines, it can tap and type at points in the image:
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
await agent.act('enter the code 3141 on the drawn keypad and press OK');
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Images add input tokens. Screenshots are withheld for the rest of an attempt
|
|
131
|
+
after a secret is filled. The [agent reference](/reference/agent#vision)
|
|
132
|
+
lists the modes and restrictions.
|
|
133
|
+
|
|
134
|
+
## Deterministic APIs: `screen` and `expect`
|
|
135
|
+
|
|
136
|
+
Use locators to interact with known controls and check exact values.
|
|
137
|
+
An `expect` after `act` checks the exact result. It is also what lets the
|
|
138
|
+
[replay cache](/cache) record the step and keep it.
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
// Semantic queries: role and name first, label second, test ID last.
|
|
142
|
+
await screen.getByRole('button', 'Sign in').tap();
|
|
143
|
+
await screen.getByLabel('Email').fill('ada@example.test');
|
|
144
|
+
await screen.getByTestId('todo').first().tap();
|
|
145
|
+
|
|
146
|
+
// Scope into a row, gesture like a user:
|
|
147
|
+
const row = screen.getByRole('listitem').filter({ hasText: 'Design review' });
|
|
148
|
+
await row.getByRole('button', 'Archive').tap();
|
|
149
|
+
await screen.swipe({ direction: 'up', momentum: 'fast' });
|
|
150
|
+
|
|
151
|
+
// Coordinates, for what the tree does not list:
|
|
152
|
+
await screen.getByRole('image', 'Seat map').tap({ position: { x: 120, y: 48 } });
|
|
153
|
+
await screen.swipe({ from: { x: 300, y: 400 }, to: { x: 40, y: 400 } });
|
|
154
|
+
|
|
155
|
+
// Polling assertions:
|
|
156
|
+
await expect(screen.getByRole('status')).toHaveText('2 remaining');
|
|
157
|
+
await expect(screen.getByRole('heading', 'Dashboard')).toBeVisible();
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Actions and single-node reads or assertions fail when a query matches more
|
|
161
|
+
than one node. Narrow it with `.filter()`, `.first()`, or `.nth()`.
|
|
162
|
+
Locator assertions retry until they pass or time out. Direct reads such as
|
|
163
|
+
`textContent()` do not retry a mismatched value.
|
|
164
|
+
|
|
165
|
+
Use the `browser` fixture for browser features such as routes, cookies, dialogs,
|
|
166
|
+
frames, and downloads; see [Working with the browser](/browser). The
|
|
167
|
+
[screen reference](/reference/screen) lists every query and action.
|
|
168
|
+
|
|
169
|
+
Share setup and cleanup through `test.extend`. A fixture can create a test
|
|
170
|
+
workspace before the test and delete it afterward, including when the test
|
|
171
|
+
fails. See [Your own fixtures](/reference/test#your-own-fixtures).
|
|
172
|
+
|
|
173
|
+
## Tests without a screen
|
|
174
|
+
|
|
175
|
+
A test that takes only `app` calls no model and drives no screen. Use it to
|
|
176
|
+
check your API with `fetch` in the same run as UI tests. See
|
|
177
|
+
[Testing APIs](/api-testing).
|
|
178
|
+
|
|
179
|
+
## Structure
|
|
180
|
+
|
|
181
|
+
```ts
|
|
182
|
+
import { beforeEach, describe, test } from 'e2e';
|
|
183
|
+
|
|
184
|
+
describe('billing', { tags: ['billing'] }, () => {
|
|
185
|
+
beforeEach(async ({ app }) => { await app.open('/billing'); });
|
|
186
|
+
|
|
187
|
+
test('upgrades', { retries: 2, timeout: 60_000 }, async ({ agent }) => {
|
|
188
|
+
await agent.act('upgrade to Pro');
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
test.skip('not ready yet', async () => {});
|
|
193
|
+
test.only('just this one while I work', async () => {}); // rejected in CI
|
|
194
|
+
|
|
195
|
+
test('needs two organizations', async ({ app }) => {
|
|
196
|
+
test.skip((await countOrganizations()) < 2, 'one organization: nothing to switch to');
|
|
197
|
+
await app.open('/organizations');
|
|
198
|
+
});
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
`test.skip(condition, reason)` inside a body throws when the condition holds:
|
|
202
|
+
the test stops at that line and is reported `skipped`, as in Playwright. Call
|
|
203
|
+
it before the first step when it guards a precondition.
|
|
204
|
+
|
|
205
|
+
`describe` and the hooks are also `test.describe`, `test.beforeEach`, and so
|
|
206
|
+
on. A `beforeEach` imported from `e2e` sees the core fixtures; import
|
|
207
|
+
`test`, `describe`, and the hooks from `@e2e-dev/web` (or `@e2e-dev/mobile`)
|
|
208
|
+
to have `browser` (or `device`) typed from one import, and use
|
|
209
|
+
`test.beforeEach` on a `test` you extended with your own fixtures.
|
|
210
|
+
|
|
211
|
+
Common options include `timeout`, `retries`, and `tags`. Use `session` for
|
|
212
|
+
state from a setup test, `agentContext` for extra instructions, and `agent`
|
|
213
|
+
to choose a configured [agent](/agents). `trace` and `video` record one test
|
|
214
|
+
without recording the suite; see [Watch it happen](/debugging#watch-it-happen).
|
|
215
|
+
Group options apply to their tests. The [test reference](/reference/test)
|
|
216
|
+
lists all options and defaults.
|
|
217
|
+
|
|
218
|
+
Each test runs in its own attempt. Prepare the app data it needs through
|
|
219
|
+
fixtures or hooks. When a flow must span several tests, mark the group
|
|
220
|
+
`{ serial: true }`. Members share app state, run in order on one worker,
|
|
221
|
+
and retry as a whole.
|
|
222
|
+
|
|
223
|
+
## Run one test
|
|
224
|
+
|
|
225
|
+
<CodeGroup>
|
|
226
|
+
```bash npm
|
|
227
|
+
npx e2e run tests/signup.e2e.ts:12 # the test declared at line 12
|
|
228
|
+
npx e2e run --grep checkout # tests whose title matches
|
|
229
|
+
npx e2e run --target web # one target, by name
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
```bash pnpm
|
|
233
|
+
pnpm exec e2e run tests/signup.e2e.ts:12 # the test declared at line 12
|
|
234
|
+
pnpm exec e2e run --grep checkout # tests whose title matches
|
|
235
|
+
pnpm exec e2e run --target web # one target, by name
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
```bash bun
|
|
239
|
+
bunx e2e run tests/signup.e2e.ts:12 # the test declared at line 12
|
|
240
|
+
bunx e2e run --grep checkout # tests whose title matches
|
|
241
|
+
bunx e2e run --target web # one target, by name
|
|
242
|
+
```
|
|
243
|
+
</CodeGroup>
|
|
244
|
+
|
|
245
|
+
The [CLI reference](/reference/cli#e2e-run) lists every flag.
|
|
246
|
+
|
|
247
|
+
## Next
|
|
248
|
+
|
|
249
|
+
<CardGroup cols={2}>
|
|
250
|
+
<Card title="Signing in" icon="key" href="/authentication">
|
|
251
|
+
Sessions and secrets.
|
|
252
|
+
</Card>
|
|
253
|
+
<Card title="Agents and personas" icon="users" href="/agents">
|
|
254
|
+
Several agents in one suite, and running a flow as each of them.
|
|
255
|
+
</Card>
|
|
256
|
+
</CardGroup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "e2e",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "SDK, runner, and CLI for agentic end-to-end testing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"e2e",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"files": [
|
|
71
71
|
"dist",
|
|
72
|
+
"docs",
|
|
72
73
|
"schema/*.schema.json",
|
|
73
74
|
"skills",
|
|
74
75
|
"NOTICE"
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
"dependencies": {
|
|
77
78
|
"@ai-sdk/provider": "4.0.18",
|
|
78
79
|
"@clack/prompts": "1.8.1",
|
|
79
|
-
"@modelcontextprotocol/
|
|
80
|
+
"@modelcontextprotocol/server": "2.2.0",
|
|
80
81
|
"@vitest/expect": "5.0.2",
|
|
81
82
|
"commander": "15.0.0",
|
|
82
83
|
"picocolors": "1.1.1",
|
|
@@ -108,7 +109,8 @@
|
|
|
108
109
|
"@ai-sdk/openai": "4.0.71",
|
|
109
110
|
"@ai-sdk/openai-compatible": "3.0.53",
|
|
110
111
|
"@ai-sdk/xai": "5.0.4",
|
|
111
|
-
"@e2e-dev/web": "0.11.
|
|
112
|
+
"@e2e-dev/web": "0.11.2",
|
|
113
|
+
"@modelcontextprotocol/client": "2.2.0",
|
|
112
114
|
"@openrouter/ai-sdk-provider": "3.1.0",
|
|
113
115
|
"@types/node": "26.6.2",
|
|
114
116
|
"@types/pngjs": "6.0.5",
|
package/skills/e2e/SKILL.md
CHANGED
|
@@ -58,7 +58,10 @@ test('a member upgrades to Pro', async ({ app, agent, screen, browser }) => {
|
|
|
58
58
|
|
|
59
59
|
Read the topic for the job before writing code. The files sit next to this
|
|
60
60
|
one; the installed CLI prints the same text with `npx e2e guide <topic>`
|
|
61
|
-
(`e2e guide` alone prints this page).
|
|
61
|
+
(`e2e guide` alone prints this page). For anything the topics do not cover,
|
|
62
|
+
the full documentation ships in the `docs/` directory of the installed `e2e`
|
|
63
|
+
package (`node_modules/e2e/docs` in a single-package project); a link such as
|
|
64
|
+
`/reference/cli` is `docs/reference/cli.mdx`.
|
|
62
65
|
|
|
63
66
|
| Topic | File | Read it when |
|
|
64
67
|
| --- | --- | --- |
|
|
@@ -250,7 +250,9 @@ matches. Misses and hand-offs use the model; `agent.assert`,
|
|
|
250
250
|
and share replays with CI and teammates (CI stays `read-only` unless
|
|
251
251
|
`cache: 'read-write'` is set).
|
|
252
252
|
- A failing run evicts the entries it implicates; `--no-cache` rules the
|
|
253
|
-
cache out of a failure.
|
|
253
|
+
cache out of a failure. A cancelled run and a failure where no model
|
|
254
|
+
answered (`MODEL_PROVIDER_FAILED`, `MODEL_UNAVAILABLE`) implicate nothing
|
|
255
|
+
and evict nothing.
|
|
254
256
|
- With committed recordings, `--strict-cache` in CI fails a recording that
|
|
255
257
|
no longer replays with `REPLAY_STALE` instead of quietly spending model
|
|
256
258
|
calls every run; re-record locally and commit. Unrecorded steps still run
|
|
@@ -20,6 +20,9 @@ Or declare it in the client's project config (`.mcp.json` for Claude Code,
|
|
|
20
20
|
{ "mcpServers": { "e2e": { "command": "npx", "args": ["e2e", "mcp"] } } }
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
No model is needed: without the optional `ai` package, sessions open and the
|
|
24
|
+
deterministic tools work.
|
|
25
|
+
|
|
23
26
|
Flags: `--config <path>` names the default config file, `--target <name>`
|
|
24
27
|
fixes the target every session opens on, `--headless` hides the browser or
|
|
25
28
|
simulator (sessions are headed by default outside CI), `--max-sessions <n>`
|