e2e 0.15.2 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.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 +29 -9
- package/dist/agent/action-dispatcher.d.ts +0 -1
- package/dist/agent/action-dispatcher.js +4 -6
- package/dist/agent/action-names.d.ts +0 -1
- package/dist/agent/action-names.js +0 -1
- package/dist/agent/actions.d.ts +32 -24
- package/dist/agent/actions.js +38 -25
- 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 +0 -1
- package/dist/agent/error.js +0 -1
- 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 +2 -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 +0 -1
- package/dist/agent/model/tool-choice.js +0 -1
- package/dist/agent/observation-budget.d.ts +0 -1
- package/dist/agent/observation-budget.js +0 -1
- package/dist/agent/observation-feed.d.ts +5 -7
- package/dist/agent/observation-feed.js +5 -8
- package/dist/agent/observation.d.ts +40 -12
- package/dist/agent/observation.js +109 -60
- 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 +8 -9
- package/dist/agent/point-tap.js +1 -2
- 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 +19 -9
- package/dist/agent/replay.js +11 -15
- package/dist/agent/screen-update.d.ts +0 -1
- package/dist/agent/screen-update.js +0 -1
- package/dist/agent/scroll-target.d.ts +2 -4
- 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 +41 -15
- package/dist/agent/step-cache.js +147 -63
- package/dist/agent/tool-loop.d.ts +0 -1
- package/dist/agent/tool-loop.js +2 -1
- 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 +72 -24
- package/dist/cache/anchors.js +233 -61
- package/dist/cache/context.d.ts +25 -15
- package/dist/cache/context.js +50 -9
- package/dist/cache/decide.d.ts +2 -3
- package/dist/cache/decide.js +4 -7
- package/dist/cache/identity.d.ts +18 -5
- package/dist/cache/identity.js +9 -5
- package/dist/cache/recorder.d.ts +15 -2
- package/dist/cache/recorder.js +36 -24
- package/dist/cache/rekeyed.d.ts +46 -0
- package/dist/cache/rekeyed.js +89 -0
- package/dist/cache/relocate.d.ts +14 -15
- package/dist/cache/relocate.js +33 -26
- package/dist/cache/route.d.ts +32 -34
- package/dist/cache/route.js +94 -51
- package/dist/cache/store.d.ts +6 -1
- package/dist/cache/store.js +21 -2
- package/dist/cache/template.d.ts +0 -1
- package/dist/cache/template.js +0 -1
- package/dist/cache/trace.d.ts +53 -15
- package/dist/cache/trace.js +70 -29
- 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 +10 -11
- 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 +1 -4
- package/dist/cli/init/engines.js +2 -3
- package/dist/cli/init/gateways.d.ts +1 -2
- package/dist/cli/init/gateways.js +11 -2
- 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 +0 -1
- package/dist/cli/init/scaffold.js +0 -1
- package/dist/cli/init/sibling-versions.json +1 -1
- package/dist/cli/init/versions.d.ts +0 -9
- package/dist/cli/init/versions.js +1 -11
- 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 +1 -1
- package/dist/config/resolve.js +33 -2
- 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 +3 -4
- 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 +101 -59
- 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-scope.d.ts +52 -0
- package/dist/expect/poll-scope.js +113 -0
- package/dist/expect/poll.d.ts +0 -1
- package/dist/expect/poll.js +31 -5
- 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 +11 -5
- 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/abandoned.d.ts +11 -0
- package/dist/internal/abandoned.js +23 -0
- 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 +2 -1
- package/dist/internal/brands.js +2 -1
- package/dist/internal/client-identity.d.ts +9 -0
- package/dist/internal/client-identity.js +14 -0
- 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 +7 -5
- package/dist/internal/redact.js +116 -24
- 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 +6 -1
- package/dist/internal/time.js +25 -14
- package/dist/internal/urls.d.ts +9 -6
- package/dist/internal/urls.js +19 -11
- 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 +12 -3
- package/dist/locator/engine.js +8 -4
- 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 +28 -5
- package/dist/mcp/catalog.d.ts +7 -3
- package/dist/mcp/catalog.js +8 -9
- 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 +44 -22
- 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 +3 -24
- package/dist/oauth/cli.d.ts +0 -1
- package/dist/oauth/cli.js +1 -1
- package/dist/oauth/copilot.d.ts +5 -5
- package/dist/oauth/copilot.js +80 -8
- 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 +2 -2
- 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 +2 -2
- package/dist/oauth/opencode-console.d.ts +10 -0
- package/dist/oauth/opencode-console.js +133 -0
- package/dist/oauth/pkce.d.ts +0 -1
- package/dist/oauth/pkce.js +0 -1
- package/dist/oauth/providers/github-copilot.d.ts +12 -1
- package/dist/oauth/providers/github-copilot.js +80 -19
- package/dist/oauth/providers/openai.d.ts +0 -1
- package/dist/oauth/providers/openai.js +1 -2
- package/dist/oauth/providers/opencode-console.d.ts +31 -0
- package/dist/oauth/providers/opencode-console.js +148 -0
- package/dist/oauth/providers/xai.d.ts +0 -1
- package/dist/oauth/providers/xai.js +0 -1
- package/dist/oauth/providers.d.ts +2 -7
- package/dist/oauth/providers.js +3 -8
- package/dist/oauth/responses.d.ts +9 -0
- package/dist/oauth/responses.js +23 -0
- 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 +26 -1
- package/dist/report/build.js +16 -9
- 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 +6 -2
- package/dist/report/failure-text.js +14 -5
- package/dist/report/format.d.ts +10 -6
- package/dist/report/format.js +12 -6
- 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 +11 -13
- 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 +1 -1
- package/dist/report/list.js +38 -19
- 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 +1 -2
- package/dist/report/markdown.js +37 -15
- package/dist/report/outcome.d.ts +0 -1
- package/dist/report/outcome.js +0 -1
- package/dist/report/repeats.d.ts +6 -2
- package/dist/report/repeats.js +12 -4
- 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 +18 -1
- package/dist/run/artifacts.js +68 -2
- 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 +9 -1
- package/dist/run/execute.js +55 -29
- package/dist/run/extended-fixtures.d.ts +0 -1
- package/dist/run/extended-fixtures.js +6 -3
- package/dist/run/failure-evidence.d.ts +0 -1
- package/dist/run/failure-evidence.js +4 -3
- 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 +6 -9
- package/dist/run/in-process.d.ts +2 -1
- package/dist/run/in-process.js +1 -1
- package/dist/run/last-run.d.ts +42 -9
- package/dist/run/last-run.js +121 -15
- 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 +6 -2
- package/dist/run/realm.js +21 -8
- package/dist/run/records.d.ts +16 -1
- package/dist/run/records.js +26 -1
- package/dist/run/retry.d.ts +3 -2
- package/dist/run/retry.js +4 -3
- package/dist/run/runner.d.ts +3 -2
- package/dist/run/runner.js +70 -32
- 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 +2 -1
- package/dist/run/serial.js +8 -6
- 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 -9
- package/dist/run/steps.js +7 -22
- 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 +7 -7
- package/dist/run/worker/handle.d.ts +0 -1
- package/dist/run/worker/handle.js +0 -1
- package/dist/run/worker/protocol.d.ts +2 -1
- package/dist/run/worker/protocol.js +0 -1
- package/dist/run/worker/session.d.ts +2 -1
- package/dist/run/worker/session.js +1 -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 +108 -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 +34 -26
- package/dist/types.js +0 -1
- package/docs/agents.mdx +6 -3
- package/docs/assertions.mdx +94 -0
- package/docs/authentication.mdx +3 -1
- package/docs/browser.mdx +42 -6
- package/docs/cache.mdx +64 -18
- package/docs/ci.mdx +11 -7
- package/docs/debugging.mdx +6 -3
- package/docs/executors.mdx +5 -3
- package/docs/github.mdx +12 -4
- package/docs/{writing-tests.mdx → goals.mdx} +21 -101
- package/docs/index.mdx +4 -4
- package/docs/integrations/kernel.mdx +1 -1
- package/docs/locators.mdx +64 -0
- package/docs/migrate/cypress.mdx +2 -2
- package/docs/migrate/maestro.mdx +2 -2
- package/docs/migrate/playwright.mdx +22 -16
- package/docs/migrate/selenium.mdx +2 -2
- package/docs/mobile.mdx +61 -4
- package/docs/models.mdx +53 -7
- package/docs/physical-devices.mdx +76 -0
- package/docs/quickstart.mdx +4 -3
- package/docs/reference/app.mdx +1 -1
- package/docs/reference/cli.mdx +30 -11
- package/docs/reference/config.mdx +25 -7
- package/docs/reference/engine.mdx +4 -3
- package/docs/reference/environment.mdx +8 -1
- package/docs/reference/errors.mdx +5 -5
- package/docs/reference/expect.mdx +79 -24
- package/docs/reference/mcp.mdx +3 -0
- package/docs/reference/mobile.mdx +23 -13
- package/docs/reference/reporters.mdx +8 -2
- package/docs/reference/screen.mdx +30 -7
- package/docs/reference/test.mdx +11 -4
- package/docs/reference/web.mdx +131 -23
- package/docs/security.mdx +45 -19
- package/docs/subscriptions.mdx +97 -9
- package/docs/telemetry.mdx +48 -6
- package/package.json +18 -4
- package/schema/report-v1.schema.json +14 -1
- package/skills/e2e/SKILL.md +2 -2
- package/skills/e2e/references/agent.md +22 -11
- package/skills/e2e/references/debugging.md +4 -4
- package/skills/e2e/references/mcp.md +3 -0
- package/skills/e2e/references/running.md +13 -8
- package/skills/e2e/references/setup.md +42 -15
- package/skills/e2e/references/writing-tests.md +43 -15
- 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
package/dist/cache/anchors.js
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Anchors: the step's recorded delta.
|
|
3
3
|
*
|
|
4
4
|
* A recording run does not end when its last action commits; it ends when the
|
|
5
5
|
* executor looks at the screen and judges the step done. The trace used to
|
|
6
6
|
* keep only the actions and drop that look, so a replay could run every
|
|
7
7
|
* recorded action mechanically — a fill that never committed, a save that
|
|
8
8
|
* produced an unnamed record — and self-finalize with nothing checking the
|
|
9
|
-
* effect. Anchors restore the check as data: the descriptors of nodes
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* effect. Anchors restore the check as data: the descriptors of nodes the
|
|
10
|
+
* step made appear (`endAnchors`) and of nodes it made vanish
|
|
11
|
+
* (`goneAnchors`), each with the states a step sets on a control it leaves
|
|
12
|
+
* on screen (a switch turned on, a field typed into). They are checked by
|
|
13
|
+
* the relocation vocabulary (`relocate.ts`) with two deliberate differences:
|
|
14
|
+
* every recorded field must be equal, text, value, and states included, and
|
|
15
|
+
* presence is enough, uniqueness is not asked.
|
|
16
|
+
*
|
|
17
|
+
* A replay passes on its own only when the delta happened again: everything
|
|
18
|
+
* that appeared is there, everything that vanished is gone, and at least one
|
|
19
|
+
* of those changes, or the route, actually moved during the replay
|
|
20
|
+
* (`deltaEvidenced`), so a status that already read "Submitted" before a
|
|
21
|
+
* submit that did nothing is no proof. An alert the replay raised that the
|
|
22
|
+
* recording never saw is an outcome the recording did not have, whatever
|
|
23
|
+
* else matched (`deltaHolds`).
|
|
14
24
|
*/
|
|
15
25
|
import { describeTarget } from '../agent/actions.js';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
26
|
+
import { collapseText } from '../internal/text.js';
|
|
27
|
+
import { descriptorTiers, fieldsEqual } from './relocate.js';
|
|
28
|
+
import { bound, MAX_TRACE_ANCHORS, MAX_TRACE_DESCRIPTOR_CHARS, TRACE_ANCHOR_STATES, } from './trace.js';
|
|
18
29
|
/**
|
|
19
30
|
* Every field an anchor records. Unlike target relocation, text is never
|
|
20
31
|
* optional here: for a target, text is a fallback identity and a relabeled
|
|
@@ -25,57 +36,95 @@ import { MAX_TRACE_ANCHORS } from './trace.js';
|
|
|
25
36
|
*/
|
|
26
37
|
const ANCHOR_FIELDS = ['role', 'name', 'text', 'testId', 'placeholder', 'inputPurpose'];
|
|
27
38
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* repeats what the leaves already say — and on a list-heavy screen those
|
|
33
|
-
* repeats would crowd the one status line that names the effect out of the
|
|
34
|
-
* cap.
|
|
39
|
+
* Roles an app announces an outcome in: the ARIA live regions a screen
|
|
40
|
+
* reader reads out on change, and the alert dialog. The app itself says
|
|
41
|
+
* this text reports what just happened, so these are recorded before any
|
|
42
|
+
* other anchor and the cap never crowds them out.
|
|
35
43
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
const ANNOUNCEMENT_ROLES = new Set(['alert', 'alertdialog', 'status']);
|
|
45
|
+
/**
|
|
46
|
+
* The announcements that interrupt: an error, a warning, a confirmation the
|
|
47
|
+
* user must answer. A replay that raises one the recording never saw has
|
|
48
|
+
* another outcome than the recording, so every one that appears is recorded
|
|
49
|
+
* whatever its text, and checked both ways.
|
|
50
|
+
*/
|
|
51
|
+
const ALERT_ROLES = new Set(['alert', 'alertdialog']);
|
|
52
|
+
/**
|
|
53
|
+
* Derives one step's delta between its starting observation and its passing
|
|
54
|
+
* one. Each side is ordered announcements first, then leaves, then
|
|
55
|
+
* containers, each in document order: a container's accessible name is
|
|
56
|
+
* usually the concatenation of its children's, so it repeats what the
|
|
57
|
+
* leaves already say, and on a list-heavy screen those repeats would crowd
|
|
58
|
+
* the one status line that names the effect out of the cap. `routeMoved`
|
|
59
|
+
* says the step ended on another route than it began on, whose counts are
|
|
60
|
+
* that screen's data rather than the step's result (`COUNT_TEXT`).
|
|
61
|
+
*
|
|
62
|
+
* A node counts as gone only when no end node matches its anchor the way
|
|
63
|
+
* `deltaHolds` checks one, on the recorded fields alone: a radio label
|
|
64
|
+
* "Express" the pick replaced with a status reading "Express" vanished, but
|
|
65
|
+
* an anchor of that text would still match the status, and the recording
|
|
66
|
+
* would fail its own check on every replay.
|
|
67
|
+
*/
|
|
68
|
+
export function describeDelta(startNodes, endNodes, routeMoved) {
|
|
69
|
+
const start = projectAnchors(startNodes);
|
|
70
|
+
const end = projectAnchors(endNodes);
|
|
71
|
+
const startKeys = new Set(start.map((anchor) => anchor.key));
|
|
72
|
+
const endKeys = new Set(end.map((anchor) => anchor.key));
|
|
73
|
+
return {
|
|
74
|
+
appeared: deltaSide(end, start, (anchor) => startKeys.has(anchor.key), routeMoved),
|
|
75
|
+
gone: deltaSide(start, end, (anchor) => endKeys.has(anchor.key) || anchorIn(anchor.descriptor, end), routeMoved),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/** The side of the delta `nodes` holds and `other` does not (`inOther`), ordered and capped. */
|
|
79
|
+
function deltaSide(nodes, other, inOther, routeMoved) {
|
|
80
|
+
const otherShapes = new Set(other.map((anchor) => countShape(anchor.descriptor)));
|
|
81
|
+
const volatile = (anchor) => isVolatileAnchor(anchor, (count) => routeMoved || otherShapes.has(countShape(count)));
|
|
43
82
|
const seen = new Set();
|
|
83
|
+
const announcements = [];
|
|
44
84
|
const leaves = [];
|
|
45
85
|
const containers = [];
|
|
46
|
-
for (const
|
|
47
|
-
|
|
48
|
-
if (descriptor === undefined)
|
|
49
|
-
continue;
|
|
50
|
-
const key = anchorKey(descriptor);
|
|
51
|
-
if (before.has(key) || seen.has(key))
|
|
86
|
+
for (const anchor of nodes) {
|
|
87
|
+
if (seen.has(anchor.key) || inOther(anchor))
|
|
52
88
|
continue;
|
|
53
|
-
seen.add(key);
|
|
54
|
-
|
|
89
|
+
seen.add(anchor.key);
|
|
90
|
+
const role = anchor.descriptor.role ?? '';
|
|
91
|
+
(ANNOUNCEMENT_ROLES.has(role) ? announcements : anchor.leaf ? leaves : containers).push(anchor);
|
|
55
92
|
}
|
|
56
|
-
const all = [...leaves, ...containers];
|
|
57
|
-
const stable = all.filter((anchor) => !
|
|
58
|
-
return (stable.length > 0 ? stable : all).slice(0, MAX_TRACE_ANCHORS);
|
|
93
|
+
const all = [...announcements, ...leaves, ...containers];
|
|
94
|
+
const stable = all.filter((anchor) => isAlert(anchor.descriptor) || !volatile(anchor.descriptor));
|
|
95
|
+
return (stable.length > 0 ? stable : all).slice(0, MAX_TRACE_ANCHORS).map((anchor) => anchor.descriptor);
|
|
59
96
|
}
|
|
60
97
|
/**
|
|
61
98
|
* Text that cannot read the same on the next run: a minted key prefix or id,
|
|
62
|
-
* a countdown or age, a date, a clock time, a timing in milliseconds
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
99
|
+
* a countdown or age, a date, a clock time, a timing in milliseconds. An
|
|
100
|
+
* anchor made of it hands every replay off, so it is skipped while some
|
|
101
|
+
* stable anchor exists; with nothing else, the volatile ones stay, because a
|
|
102
|
+
* replay that always hands off is still safer than one that passes on
|
|
103
|
+
* mechanics alone. An alert keeps it, and is compared with these parts read
|
|
104
|
+
* as placeholders (`alertShape`).
|
|
68
105
|
*/
|
|
69
106
|
const VOLATILE_TEXT = [
|
|
70
107
|
/\b(?=[A-Za-z0-9_-]*\d)(?=[A-Za-z0-9_-]*[A-Za-z])[A-Za-z0-9_-]{12,}\b/,
|
|
71
108
|
/\b\d+\s*(?:ms|s|secs?|seconds?|m|mins?|minutes?|h|hrs?|hours?|d|days?|weeks?|months?|years?)\b/i,
|
|
72
|
-
/\b\d+\s*(?:to|-|\u2013)\s*\d+\s+of\s+\d+\b/i,
|
|
73
|
-
/\b\d+\s+(?:results?|items?|rows?|entries|records?|matches|total)\b/i,
|
|
74
109
|
/\b(?:jan|feb|mar|apr|may|jun|jul|aug|sep|sept|oct|nov|dec)[a-z]*\.?\s+\d{1,2}(?:,?\s+\d{4})?\b/i,
|
|
75
110
|
/\b\d{1,2}\s+(?:jan|feb|mar|apr|may|jun|jul|aug|sep|sept|oct|nov|dec)[a-z]*\.?(?:\s+\d{4})?\b/i,
|
|
76
111
|
/\b\d{4}-\d{2}-\d{2}\b/,
|
|
77
112
|
/\b\d{1,2}:\d{2}(?::\d{2})?\b/,
|
|
78
113
|
];
|
|
114
|
+
/**
|
|
115
|
+
* A count that names what it counts: a pagination range, `12 items`, `3
|
|
116
|
+
* records imported`. Such a count is the step's own result when the step
|
|
117
|
+
* made it appear on the screen it acted on, and must read the same again:
|
|
118
|
+
* `0 records imported` is not the import the recording saw. It is the data
|
|
119
|
+
* instead, which the next run, with what an earlier run left behind, reads
|
|
120
|
+
* differently, when the other side of the delta already showed the same
|
|
121
|
+
* text with other numbers (`41 items` became `42 items`), or when the step
|
|
122
|
+
* moved to another route and the count is part of the screen it opened.
|
|
123
|
+
*/
|
|
124
|
+
const COUNT_TEXT = [
|
|
125
|
+
/\b\d+\s*(?:to|-|\u2013)\s*\d+\s+of\s+\d+\b/i,
|
|
126
|
+
/\b\d+\s+(?:results?|items?|rows?|entries|records?|matches|total)\b/i,
|
|
127
|
+
];
|
|
79
128
|
/**
|
|
80
129
|
* A bare number is a badge or a tally, `11` unread, and reads differently
|
|
81
130
|
* once the data changes; it is volatile when it is all the anchor has to say.
|
|
@@ -86,39 +135,162 @@ function isBareNumber(anchor) {
|
|
|
86
135
|
const label = anchor.name ?? anchor.text;
|
|
87
136
|
return label !== undefined && /^\d+$/.test(label) && anchor.testId === undefined && (anchor.name === undefined || anchor.text === undefined || anchor.name === anchor.text);
|
|
88
137
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
138
|
+
/** Whether an anchor's text cannot read the same on the next run; `countIsData` decides an anchor holding a count. */
|
|
139
|
+
function isVolatileAnchor(anchor, countIsData) {
|
|
140
|
+
const texts = [anchor.text, anchor.name, anchor.value].filter((value) => value !== undefined);
|
|
141
|
+
if (isBareNumber(anchor) || texts.some((value) => VOLATILE_TEXT.some((pattern) => pattern.test(value))))
|
|
142
|
+
return true;
|
|
143
|
+
return texts.some((value) => COUNT_TEXT.some((pattern) => pattern.test(value))) && countIsData(anchor);
|
|
144
|
+
}
|
|
145
|
+
/** An anchor with every digit run read as one placeholder: the text a running count keeps while its numbers move. */
|
|
146
|
+
function countShape(anchor) {
|
|
147
|
+
return anchorKey({ ...anchor, ...digitless('name', anchor.name), ...digitless('text', anchor.text), ...digitless('value', anchor.value) });
|
|
148
|
+
}
|
|
149
|
+
function digitless(field, value) {
|
|
150
|
+
return value === undefined ? {} : { [field]: value.replace(/\d+/g, '#') };
|
|
151
|
+
}
|
|
152
|
+
function isAlert(anchor) {
|
|
153
|
+
return anchor.role !== undefined && ALERT_ROLES.has(anchor.role);
|
|
154
|
+
}
|
|
155
|
+
const VOLATILE_SPANS = VOLATILE_TEXT.map((pattern) => new RegExp(pattern.source, `${pattern.flags}g`));
|
|
156
|
+
/**
|
|
157
|
+
* An alert with its volatile parts read as one placeholder each: `Session
|
|
158
|
+
* expires at 17:42` and `Session expires at 17:45` are the same alert, which
|
|
159
|
+
* a replay must neither miss nor mistake for one the recording never saw.
|
|
160
|
+
*/
|
|
161
|
+
function alertShape(anchor) {
|
|
162
|
+
const mask = (text) => VOLATILE_SPANS.reduce((masked, span) => masked.replace(span, '#'), text);
|
|
163
|
+
return {
|
|
164
|
+
...anchor,
|
|
165
|
+
...(anchor.name === undefined ? {} : { name: mask(anchor.name) }),
|
|
166
|
+
...(anchor.text === undefined ? {} : { text: mask(anchor.text) }),
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Whether the recorded end state holds on a fresh observation: every
|
|
171
|
+
* appeared anchor present (some tier of it, `descriptorTiers`, so a test id
|
|
172
|
+
* that churned per render is forgiven when the remaining fields still
|
|
173
|
+
* identify the node, equal on every anchor field and state), no gone anchor
|
|
174
|
+
* present, and no alert on screen that was not on `beforeNodes` and is not
|
|
175
|
+
* one the recording saw appear. Two nodes matching one anchor are the effect
|
|
176
|
+
* twice over, not an ambiguity.
|
|
177
|
+
*/
|
|
178
|
+
export function deltaHolds(delta, nodes, beforeNodes) {
|
|
179
|
+
const live = projectAnchors(nodes);
|
|
180
|
+
const appeared = delta.endAnchors ?? [];
|
|
181
|
+
if (!appeared.every((anchor) => anchorIn(anchor, live)))
|
|
182
|
+
return false;
|
|
183
|
+
if ((delta.goneAnchors ?? []).some((anchor) => anchorIn(anchor, live)))
|
|
184
|
+
return false;
|
|
185
|
+
const before = projectAnchors(beforeNodes).filter((anchor) => isAlert(anchor.descriptor));
|
|
186
|
+
return live.every((anchor) => !isAlert(anchor.descriptor) ||
|
|
187
|
+
before.some((earlier) => anchorIn(anchor.descriptor, [earlier])) ||
|
|
188
|
+
appeared.some((recorded) => anchorIn(recorded, [anchor])));
|
|
92
189
|
}
|
|
93
190
|
/**
|
|
94
|
-
* Whether
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
191
|
+
* Whether the replay itself produced some of the recorded delta, measured
|
|
192
|
+
* from `baselineNodes`, the first screen the replay saw on the route it
|
|
193
|
+
* ended on: an anchor that appeared was absent there, or a gone one was
|
|
194
|
+
* there. Without that, every check `deltaHolds` makes could have held before
|
|
195
|
+
* the actions that should have produced it: the screen already read the
|
|
196
|
+
* outcome, and nothing the replay did is proven to have done anything. A
|
|
197
|
+
* recording with no delta at all is never evidence. Undefined `baselineNodes`
|
|
198
|
+
* means the replay saw no screen on that route before its last action, so
|
|
199
|
+
* that action moved the route, which is the evidence.
|
|
200
|
+
*
|
|
201
|
+
* A control one of the trace's own actions targeted (`inputTargets`) that
|
|
202
|
+
* shows on both sides of the delta, a field typed into or a switch flipped,
|
|
203
|
+
* echoes the input: the replay typed, so the value is there, whatever the
|
|
204
|
+
* step was for. Such echoes are evidence only when the delta holds nothing
|
|
205
|
+
* else; otherwise the rest of the delta must have moved, so a subscribe
|
|
206
|
+
* form typed into on a page that already read "You're subscribed" proves
|
|
207
|
+
* nothing.
|
|
99
208
|
*/
|
|
100
|
-
export function
|
|
101
|
-
|
|
102
|
-
|
|
209
|
+
export function deltaEvidenced(delta, baselineNodes, inputTargets) {
|
|
210
|
+
if (baselineNodes === undefined)
|
|
211
|
+
return true;
|
|
212
|
+
const appeared = delta.endAnchors ?? [];
|
|
213
|
+
const gone = delta.goneAnchors ?? [];
|
|
214
|
+
const targets = new Set(inputTargets.map(identityKey));
|
|
215
|
+
const changed = new Set(appeared.map(identityKey).filter((key) => gone.some((anchor) => identityKey(anchor) === key)));
|
|
216
|
+
const echoes = (anchor) => changed.has(identityKey(anchor)) && targets.has(identityKey(anchor));
|
|
217
|
+
const outcome = [...appeared, ...gone].some((anchor) => !echoes(anchor));
|
|
218
|
+
const counted = (anchor) => !outcome || !echoes(anchor);
|
|
219
|
+
const baseline = projectAnchors(baselineNodes);
|
|
220
|
+
return (appeared.some((anchor) => counted(anchor) && !anchorIn(anchor, baseline)) ||
|
|
221
|
+
gone.some((anchor) => counted(anchor) && anchorIn(anchor, baseline)));
|
|
222
|
+
}
|
|
223
|
+
/** A control's key without what a step sets on it, its value and states: the same control before and after. */
|
|
224
|
+
function identityKey(descriptor) {
|
|
225
|
+
const { value: _value, states: _states, ...control } = descriptor;
|
|
226
|
+
return anchorKey(control);
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Whether some tier of a recorded anchor equals some projected node on every
|
|
230
|
+
* anchor field, and on its value and states exactly: an empty field is not
|
|
231
|
+
* the field filled in, nor an unchecked switch the switch turned on. An
|
|
232
|
+
* alert is compared by its shape (`alertShape`).
|
|
233
|
+
*/
|
|
234
|
+
function anchorIn(anchor, nodes) {
|
|
235
|
+
const states = statesKey(anchor.states);
|
|
236
|
+
const shape = isAlert(anchor) ? alertShape : (descriptor) => descriptor;
|
|
237
|
+
return descriptorTiers(anchor).some((tier) => nodes.some((node) => node.descriptor.value === anchor.value &&
|
|
238
|
+
statesKey(node.descriptor.states) === states &&
|
|
239
|
+
fieldsEqual(shape(tier), shape(node.descriptor), ANCHOR_FIELDS)));
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Anchor projections per observation: a replay checks the same end screen
|
|
243
|
+
* once per poll and the start screen for every check, while the projection
|
|
244
|
+
* of a node is a pure function of the node.
|
|
245
|
+
*/
|
|
246
|
+
const projections = new WeakMap();
|
|
247
|
+
/** Every node of an observation that can serve as an anchor, in document order. */
|
|
248
|
+
function projectAnchors(nodes) {
|
|
249
|
+
const cached = projections.get(nodes);
|
|
250
|
+
if (cached !== undefined)
|
|
251
|
+
return cached;
|
|
252
|
+
const anchors = [];
|
|
253
|
+
for (const node of nodes.values()) {
|
|
254
|
+
const descriptor = anchorDescriptor(node);
|
|
255
|
+
if (descriptor === undefined)
|
|
256
|
+
continue;
|
|
257
|
+
// An alert keyed by its shape: one whose countdown ticked while the step
|
|
258
|
+
// ran stayed on screen, and is on neither side of the delta.
|
|
259
|
+
const key = anchorKey(isAlert(descriptor) ? alertShape(descriptor) : descriptor);
|
|
260
|
+
anchors.push({ descriptor, key, leaf: node.children === undefined || node.children.length === 0 });
|
|
261
|
+
}
|
|
262
|
+
projections.set(nodes, anchors);
|
|
263
|
+
return anchors;
|
|
103
264
|
}
|
|
104
265
|
/** One node's anchor projection, or undefined when it could identify nothing. */
|
|
105
|
-
function anchorDescriptor(node
|
|
106
|
-
const described = describeTarget(node
|
|
266
|
+
function anchorDescriptor(node) {
|
|
267
|
+
const described = describeTarget(node);
|
|
107
268
|
if (described === undefined || descriptorTiers(described).length === 0)
|
|
108
269
|
return undefined;
|
|
109
270
|
const { selector: _selector, ...anchor } = described;
|
|
110
|
-
|
|
271
|
+
const states = TRACE_ANCHOR_STATES.filter((state) => node.states?.[state] === true);
|
|
272
|
+
const value = node.value === undefined || node.states?.secure === true ? '' : collapseText(node.value);
|
|
273
|
+
return {
|
|
274
|
+
...anchor,
|
|
275
|
+
...(value === '' ? {} : { value: bound(value, MAX_TRACE_DESCRIPTOR_CHARS) }),
|
|
276
|
+
...(states.length === 0 ? {} : { states }),
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
function statesKey(states) {
|
|
280
|
+
return states === undefined ? '' : states.join(',');
|
|
111
281
|
}
|
|
112
282
|
/**
|
|
113
283
|
* Set key for one descriptor: its loosest identifying tier over the anchor
|
|
114
|
-
* fields, in fixed order. Keying on the semantic tier
|
|
115
|
-
* the node means an app that mints test ids per
|
|
116
|
-
* unchanged control look new after a re-render and
|
|
117
|
-
* of the capped list; a node only a test id
|
|
284
|
+
* fields, in fixed order, and its states. Keying on the semantic tier
|
|
285
|
+
* whenever it identifies the node means an app that mints test ids per
|
|
286
|
+
* render cannot make every unchanged control look new after a re-render and
|
|
287
|
+
* crowd the real effect out of the capped list; a node only a test id
|
|
288
|
+
* identifies keeps it. The states make a control that changed state a node
|
|
289
|
+
* of the delta on both sides: the switch as it was, gone, and as it is,
|
|
290
|
+
* appeared; the value does the same for a field typed into.
|
|
118
291
|
*/
|
|
119
292
|
function anchorKey(descriptor) {
|
|
120
293
|
const tiers = descriptorTiers(descriptor);
|
|
121
294
|
const loosest = tiers[tiers.length - 1] ?? descriptor;
|
|
122
|
-
return JSON.stringify(ANCHOR_FIELDS.map((field) => loosest[field]));
|
|
295
|
+
return JSON.stringify([...ANCHOR_FIELDS.map((field) => loosest[field]), descriptor.value, statesKey(descriptor.states)]);
|
|
123
296
|
}
|
|
124
|
-
//# sourceMappingURL=anchors.js.map
|
package/dist/cache/context.d.ts
CHANGED
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
* re-records.
|
|
9
9
|
*/
|
|
10
10
|
import type { ResolvedCacheConfig } from '../config/resolve.ts';
|
|
11
|
-
import { type CacheTargetIdentity, type TraceCacheKind } from './identity.ts';
|
|
11
|
+
import { type CacheAgentIdentity, type CacheTargetIdentity, type TraceCacheKind } from './identity.ts';
|
|
12
|
+
import type { StoredRecordings } from './rekeyed.ts';
|
|
12
13
|
import { type CacheStore } from './store.ts';
|
|
13
|
-
import type { ActionTrace } from './trace.ts';
|
|
14
|
+
import type { ActionTrace, TraceProvenance } from './trace.ts';
|
|
14
15
|
import type { JsonValue } from '../types.ts';
|
|
15
16
|
/**
|
|
16
17
|
* One cache entry held back until the attempt confirms or implicates it: a
|
|
@@ -18,7 +19,9 @@ import type { JsonValue } from '../types.ts';
|
|
|
18
19
|
* stands. A kept entry carries no payload, so the replay's expansion of it
|
|
19
20
|
* (every `unique()` slot filled with this run's value) can never be written;
|
|
20
21
|
* confirmed, the file keeps its bytes and `createdAt`, and a committed cache
|
|
21
|
-
* directory stays clean
|
|
22
|
+
* directory stays clean, unless its provenance predates the step's
|
|
23
|
+
* occurrence fields (`recordedFor`, as stored), which the replay proved and
|
|
24
|
+
* are then written in. Unconfirmed, both kinds are evicted alike.
|
|
22
25
|
*/
|
|
23
26
|
export type StagedTrace = {
|
|
24
27
|
readonly keyHash: string;
|
|
@@ -29,34 +32,40 @@ export type StagedTrace = {
|
|
|
29
32
|
readonly trace: ActionTrace;
|
|
30
33
|
} | {
|
|
31
34
|
readonly kind: 'keep';
|
|
35
|
+
readonly recordedFor: TraceProvenance;
|
|
32
36
|
});
|
|
37
|
+
/** One step's claimed key: its hash, and the step it names as an entry records it. */
|
|
38
|
+
export interface ClaimedKey {
|
|
39
|
+
readonly keyHash: string;
|
|
40
|
+
/** The step's identity before redaction; the recorder redacts it on the way to disk. */
|
|
41
|
+
readonly step: TraceProvenance;
|
|
42
|
+
}
|
|
33
43
|
export interface AgentCacheContext {
|
|
34
44
|
readonly mode: 'read-only' | 'read-write';
|
|
35
45
|
readonly store: CacheStore;
|
|
36
|
-
/** Test and target a write is recorded for, as `e2e cache ls` prints them. */
|
|
37
|
-
readonly identity: {
|
|
38
|
-
readonly testId: string;
|
|
39
|
-
readonly targetId: string;
|
|
40
|
-
};
|
|
41
46
|
/** Whether this attempt may replay; writes are governed by `mode` alone. */
|
|
42
47
|
readonly replayEligible: boolean;
|
|
43
48
|
/**
|
|
44
49
|
* A recording that no longer replays fails its step (`REPLAY_STALE`)
|
|
45
50
|
* instead of handing it to the executor, with `advice` on how to re-record
|
|
46
|
-
* it: the knobs to turn off and where the entry lives.
|
|
51
|
+
* it: the knobs to turn off and where the entry lives. `recordings`, set
|
|
52
|
+
* when the store can be listed, finds the recording of a step whose key
|
|
53
|
+
* changed under it, which is stale too rather than missing.
|
|
47
54
|
*/
|
|
48
55
|
readonly strict: false | {
|
|
49
56
|
readonly advice: string;
|
|
57
|
+
readonly recordings?: StoredRecordings;
|
|
50
58
|
};
|
|
51
59
|
/**
|
|
52
|
-
* Claims one step's key
|
|
53
|
-
* the per-attempt occurrence index for its signature, which is
|
|
54
|
-
* test repeat the same instruction and cache each occurrence
|
|
60
|
+
* Claims one step's key. Not a pure derivation: each claim advances
|
|
61
|
+
* the per-attempt occurrence index for its agent and signature, which is
|
|
62
|
+
* what lets a test repeat the same instruction and cache each occurrence
|
|
63
|
+
* separately.
|
|
55
64
|
* Exactly one claim per dispatched step, in execution order — the
|
|
56
65
|
* `StepTraceSession` constructor is the sole caller and owns that
|
|
57
66
|
* invariant structurally.
|
|
58
67
|
*/
|
|
59
|
-
|
|
68
|
+
claimKey(kind: TraceCacheKind, instruction: string, params: Readonly<Record<string, JsonValue>> | undefined, agent: CacheAgentIdentity): ClaimedKey;
|
|
60
69
|
/**
|
|
61
70
|
* Trace writes staged during the attempt. A trace is not trusted the moment
|
|
62
71
|
* its own step passes — the verification step after it is what proves the
|
|
@@ -93,7 +102,7 @@ export interface AttemptSettlement {
|
|
|
93
102
|
* for an interrupted attempt: interruption implicates nothing, so it writes
|
|
94
103
|
* nothing and evicts nothing. An entry a step replayed whole is staged too,
|
|
95
104
|
* so the same rule evicts it when nothing confirmed it; when something did,
|
|
96
|
-
* it is left exactly as it was found.
|
|
105
|
+
* it is left exactly as it was found, but for provenance it lacked.
|
|
97
106
|
*/
|
|
98
107
|
export declare function flushStagedTraces(context: AgentCacheContext, settlement: AttemptSettlement): Promise<void>;
|
|
99
108
|
/**
|
|
@@ -110,5 +119,6 @@ export declare function createAgentCacheContext(options: {
|
|
|
110
119
|
readonly testId: string;
|
|
111
120
|
readonly target: CacheTargetIdentity;
|
|
112
121
|
readonly attemptIndex: number;
|
|
122
|
+
/** The file store's listing under `cache.strict`, shared by the attempts of one worker and target (`storedRecordingsFor`). */
|
|
123
|
+
readonly recordings?: StoredRecordings | undefined;
|
|
113
124
|
}): AgentCacheContext | undefined;
|
|
114
|
-
//# sourceMappingURL=context.d.ts.map
|
package/dist/cache/context.js
CHANGED
|
@@ -38,6 +38,18 @@ function flowOf(trace) {
|
|
|
38
38
|
}),
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Writes the step's full provenance into a kept entry recorded before the
|
|
43
|
+
* occurrence fields were, leaving every other entry untouched. Its replay
|
|
44
|
+
* proved which step it belongs to, and `cache.strict` matches only entries
|
|
45
|
+
* that say so exactly (`rekeyed.ts`).
|
|
46
|
+
*/
|
|
47
|
+
async function completeProvenance(store, keyHash, recordedFor) {
|
|
48
|
+
const existing = await store.read(keyHash);
|
|
49
|
+
if (existing.status !== 'hit' || existing.entry.payload.recordedFor?.callIndex !== undefined)
|
|
50
|
+
return;
|
|
51
|
+
await store.write(keyHash, { ...existing.entry.payload, recordedFor });
|
|
52
|
+
}
|
|
41
53
|
/**
|
|
42
54
|
* Settles the attempt's staged trace writes. A staged trace is confirmed only
|
|
43
55
|
* when a verification step — a deterministic assertion or an agent judgment
|
|
@@ -54,7 +66,7 @@ function flowOf(trace) {
|
|
|
54
66
|
* for an interrupted attempt: interruption implicates nothing, so it writes
|
|
55
67
|
* nothing and evicts nothing. An entry a step replayed whole is staged too,
|
|
56
68
|
* so the same rule evicts it when nothing confirmed it; when something did,
|
|
57
|
-
* it is left exactly as it was found.
|
|
69
|
+
* it is left exactly as it was found, but for provenance it lacked.
|
|
58
70
|
*/
|
|
59
71
|
export async function flushStagedTraces(context, settlement) {
|
|
60
72
|
const staged = context.staged.splice(0);
|
|
@@ -68,7 +80,11 @@ export async function flushStagedTraces(context, settlement) {
|
|
|
68
80
|
await context.store.delete?.(entry.keyHash);
|
|
69
81
|
continue;
|
|
70
82
|
}
|
|
71
|
-
if (entry.kind === 'keep'
|
|
83
|
+
if (entry.kind === 'keep') {
|
|
84
|
+
await completeProvenance(context.store, entry.keyHash, entry.recordedFor);
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
if (await holdsSameFlow(context.store, entry.keyHash, entry.trace))
|
|
72
88
|
continue;
|
|
73
89
|
await context.store.write(entry.keyHash, entry.trace);
|
|
74
90
|
}
|
|
@@ -95,23 +111,49 @@ export function createAgentCacheContext(options) {
|
|
|
95
111
|
writable: mode === 'read-write',
|
|
96
112
|
});
|
|
97
113
|
const project = projectIdentity(options.projectId);
|
|
98
|
-
|
|
114
|
+
// One occurrence count per agent: the agent is part of the key, so another
|
|
115
|
+
// agent's call of the same instruction must not renumber this one's.
|
|
116
|
+
const indexers = new Map();
|
|
117
|
+
const nextCallIndex = (agent, signature) => {
|
|
118
|
+
// Folded like the key folds it (`buildTraceCacheKey`): no context is the empty one.
|
|
119
|
+
const agentKey = canonicalJson([agent.name, agent.context ?? '']);
|
|
120
|
+
const indexer = indexers.get(agentKey) ?? createCallIndexer();
|
|
121
|
+
indexers.set(agentKey, indexer);
|
|
122
|
+
return indexer(signature);
|
|
123
|
+
};
|
|
99
124
|
return {
|
|
100
125
|
mode,
|
|
101
126
|
store,
|
|
102
|
-
identity: { testId: options.testId, targetId: options.target.targetId },
|
|
103
127
|
replayEligible: options.attemptIndex === 0,
|
|
104
|
-
strict: options.cache.strict === false
|
|
105
|
-
|
|
128
|
+
strict: options.cache.strict === false
|
|
129
|
+
? false
|
|
130
|
+
: {
|
|
131
|
+
advice: staleAdvice(options.cache, options.cache.strict, options.projectRoot),
|
|
132
|
+
...(options.recordings === undefined ? {} : { recordings: options.recordings }),
|
|
133
|
+
},
|
|
134
|
+
claimKey: (kind, instruction, params, agent) => {
|
|
106
135
|
const signature = traceCallSignature(kind, instruction, params);
|
|
107
|
-
|
|
136
|
+
const callIndex = nextCallIndex(agent, signature);
|
|
137
|
+
const keyHash = traceCacheKeyHash(buildTraceCacheKey({
|
|
108
138
|
project,
|
|
109
139
|
testId: options.testId,
|
|
110
140
|
target: options.target,
|
|
111
141
|
signature,
|
|
112
|
-
callIndex
|
|
142
|
+
callIndex,
|
|
143
|
+
agent,
|
|
113
144
|
policyVersion: REPLAY_POLICY_VERSION,
|
|
114
145
|
}));
|
|
146
|
+
return {
|
|
147
|
+
keyHash,
|
|
148
|
+
step: {
|
|
149
|
+
testId: options.testId,
|
|
150
|
+
targetId: options.target.targetId,
|
|
151
|
+
instructionDigest: signature.instructionDigest,
|
|
152
|
+
paramsDigest: signature.paramsDigest,
|
|
153
|
+
callIndex,
|
|
154
|
+
agent: agent.name,
|
|
155
|
+
},
|
|
156
|
+
};
|
|
115
157
|
},
|
|
116
158
|
staged: [],
|
|
117
159
|
};
|
|
@@ -133,4 +175,3 @@ function staleAdvice(cache, source, projectRoot) {
|
|
|
133
175
|
const where = relative === '' || relative.startsWith('..') || path.isAbsolute(relative) ? cache.dir : relative;
|
|
134
176
|
return `${run} and commit the changed entry under ${where.split(path.sep).join('/')}`;
|
|
135
177
|
}
|
|
136
|
-
//# sourceMappingURL=context.js.map
|
package/dist/cache/decide.d.ts
CHANGED
|
@@ -31,8 +31,7 @@ export type TraceReplayDecision = {
|
|
|
31
31
|
* not open with a navigate carries a start precondition: the app must be on
|
|
32
32
|
* the screen where the recording began, or the recorded actions would run
|
|
33
33
|
* against a different screen than they were proven on. The screen is its
|
|
34
|
-
* route (`
|
|
35
|
-
*
|
|
34
|
+
* route (`cache/route.ts`), not its URL: the same origin, path, and query,
|
|
35
|
+
* whatever the ids in them.
|
|
36
36
|
*/
|
|
37
37
|
export declare function decideTraceReplay(entry: TraceEntry, currentPath: string | undefined): TraceReplayDecision;
|
|
38
|
-
//# sourceMappingURL=decide.d.ts.map
|
package/dist/cache/decide.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* decision takes an already-trusted entry and answers only the questions the
|
|
8
8
|
* entry alone cannot: is it whole, and is the app where the recording began?
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
10
|
+
import { sameRoute } from './route.js';
|
|
11
11
|
/**
|
|
12
12
|
* Whether a trace establishes its own starting point by navigating first.
|
|
13
13
|
* Such a trace needs no start-path precondition — and a trace with neither
|
|
@@ -21,8 +21,8 @@ export function opensWithNavigate(trace) {
|
|
|
21
21
|
* not open with a navigate carries a start precondition: the app must be on
|
|
22
22
|
* the screen where the recording began, or the recorded actions would run
|
|
23
23
|
* against a different screen than they were proven on. The screen is its
|
|
24
|
-
* route (`
|
|
25
|
-
*
|
|
24
|
+
* route (`cache/route.ts`), not its URL: the same origin, path, and query,
|
|
25
|
+
* whatever the ids in them.
|
|
26
26
|
*/
|
|
27
27
|
export function decideTraceReplay(entry, currentPath) {
|
|
28
28
|
const trace = entry.payload;
|
|
@@ -32,8 +32,5 @@ export function decideTraceReplay(entry, currentPath) {
|
|
|
32
32
|
return { action: 'replay' };
|
|
33
33
|
if (trace.startPath === undefined || currentPath === undefined)
|
|
34
34
|
return { action: 'miss', reason: 'wrong-context' };
|
|
35
|
-
return
|
|
36
|
-
? { action: 'replay' }
|
|
37
|
-
: { action: 'miss', reason: 'wrong-context' };
|
|
35
|
+
return sameRoute(trace.startPath, currentPath) ? { action: 'replay' } : { action: 'miss', reason: 'wrong-context' };
|
|
38
36
|
}
|
|
39
|
-
//# sourceMappingURL=decide.js.map
|
package/dist/cache/identity.d.ts
CHANGED
|
@@ -7,10 +7,13 @@
|
|
|
7
7
|
* contributes only its stable name and purpose, exactly as the executor sees
|
|
8
8
|
* it in the projected params.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* The agent a step runs with is part of the key: its configured name, since
|
|
11
|
+
* two agents of one test (`agent: ['buyer', 'admin']`) act as different
|
|
12
|
+
* people, and a digest of the context it reads, since a test's
|
|
13
|
+
* `agentContext` decides what the step does. The context is digested after
|
|
14
|
+
* redaction, so a registered secret in it contributes its name only. The
|
|
15
|
+
* executor that produced a trace stays provenance on the entry: the agent's
|
|
16
|
+
* name already keeps two configured agents apart.
|
|
14
17
|
*/
|
|
15
18
|
import type { JsonValue } from '../types.ts';
|
|
16
19
|
import { TRACE_SCHEMA_VERSION } from './trace.ts';
|
|
@@ -37,8 +40,18 @@ export interface TraceCacheKey {
|
|
|
37
40
|
readonly instructionDigest: string;
|
|
38
41
|
readonly paramsDigest: string;
|
|
39
42
|
readonly appIdentity: string;
|
|
43
|
+
/** Name of the configured agent the step ran with. */
|
|
44
|
+
readonly agent: string;
|
|
45
|
+
/** SHA-256 of the agent's redacted context (its `context` then the test's `agentContext`), or of the empty string. */
|
|
46
|
+
readonly agentContextDigest: string;
|
|
40
47
|
readonly policyVersion: string;
|
|
41
48
|
}
|
|
49
|
+
/** The agent a step runs with, as the key sees it. */
|
|
50
|
+
export interface CacheAgentIdentity {
|
|
51
|
+
readonly name: string;
|
|
52
|
+
/** The context the agent reads, already redacted. */
|
|
53
|
+
readonly context: string | undefined;
|
|
54
|
+
}
|
|
42
55
|
/** Identity of the target/engine/app a trace was recorded against. */
|
|
43
56
|
export interface CacheTargetIdentity {
|
|
44
57
|
readonly targetId: string;
|
|
@@ -106,8 +119,8 @@ export declare function buildTraceCacheKey(parts: {
|
|
|
106
119
|
readonly target: CacheTargetIdentity;
|
|
107
120
|
readonly signature: TraceCallSignature;
|
|
108
121
|
readonly callIndex: number;
|
|
122
|
+
readonly agent: CacheAgentIdentity;
|
|
109
123
|
readonly policyVersion: string;
|
|
110
124
|
}): TraceCacheKey;
|
|
111
125
|
/** SHA-256/JCS of one key, used as both the entry digest and its file name. */
|
|
112
126
|
export declare function traceCacheKeyHash(key: TraceCacheKey): string;
|
|
113
|
-
//# sourceMappingURL=identity.d.ts.map
|