@e2edev/e2e 0.2.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/LICENSE +21 -0
- package/README.md +104 -0
- package/dist/agent/act-validation.d.ts +27 -0
- package/dist/agent/act-validation.d.ts.map +1 -0
- package/dist/agent/act-validation.js +121 -0
- package/dist/agent/act-validation.js.map +1 -0
- package/dist/agent/act.d.ts +27 -0
- package/dist/agent/act.d.ts.map +1 -0
- package/dist/agent/act.js +775 -0
- package/dist/agent/act.js.map +1 -0
- package/dist/agent/actions.d.ts +66 -0
- package/dist/agent/actions.d.ts.map +1 -0
- package/dist/agent/actions.js +82 -0
- package/dist/agent/actions.js.map +1 -0
- package/dist/agent/ai-sdk.d.ts +16 -0
- package/dist/agent/ai-sdk.d.ts.map +1 -0
- package/dist/agent/ai-sdk.js +59 -0
- package/dist/agent/ai-sdk.js.map +1 -0
- package/dist/agent/call-options.d.ts +10 -0
- package/dist/agent/call-options.d.ts.map +1 -0
- package/dist/agent/call-options.js +28 -0
- package/dist/agent/call-options.js.map +1 -0
- package/dist/agent/default-agent.d.ts +22 -0
- package/dist/agent/default-agent.d.ts.map +1 -0
- package/dist/agent/default-agent.js +354 -0
- package/dist/agent/default-agent.js.map +1 -0
- package/dist/agent/error.d.ts +53 -0
- package/dist/agent/error.d.ts.map +1 -0
- package/dist/agent/error.js +94 -0
- package/dist/agent/error.js.map +1 -0
- package/dist/agent/executor.d.ts +238 -0
- package/dist/agent/executor.d.ts.map +1 -0
- package/dist/agent/executor.js +56 -0
- package/dist/agent/executor.js.map +1 -0
- package/dist/agent/index.d.ts +15 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +304 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/invocation.d.ts +194 -0
- package/dist/agent/invocation.d.ts.map +1 -0
- package/dist/agent/invocation.js +389 -0
- package/dist/agent/invocation.js.map +1 -0
- package/dist/agent/ledger.d.ts +24 -0
- package/dist/agent/ledger.d.ts.map +1 -0
- package/dist/agent/ledger.js +48 -0
- package/dist/agent/ledger.js.map +1 -0
- package/dist/agent/loop-guards.d.ts +35 -0
- package/dist/agent/loop-guards.d.ts.map +1 -0
- package/dist/agent/loop-guards.js +110 -0
- package/dist/agent/loop-guards.js.map +1 -0
- package/dist/agent/model/adapter.d.ts +97 -0
- package/dist/agent/model/adapter.d.ts.map +1 -0
- package/dist/agent/model/adapter.js +40 -0
- package/dist/agent/model/adapter.js.map +1 -0
- package/dist/agent/model/router.d.ts +36 -0
- package/dist/agent/model/router.d.ts.map +1 -0
- package/dist/agent/model/router.js +45 -0
- package/dist/agent/model/router.js.map +1 -0
- package/dist/agent/model/schema.d.ts +16 -0
- package/dist/agent/model/schema.d.ts.map +1 -0
- package/dist/agent/model/schema.js +37 -0
- package/dist/agent/model/schema.js.map +1 -0
- package/dist/agent/model/sdk.d.ts +28 -0
- package/dist/agent/model/sdk.d.ts.map +1 -0
- package/dist/agent/model/sdk.js +258 -0
- package/dist/agent/model/sdk.js.map +1 -0
- package/dist/agent/observation.d.ts +70 -0
- package/dist/agent/observation.d.ts.map +1 -0
- package/dist/agent/observation.js +174 -0
- package/dist/agent/observation.js.map +1 -0
- package/dist/agent/phases.d.ts +71 -0
- package/dist/agent/phases.d.ts.map +1 -0
- package/dist/agent/phases.js +124 -0
- package/dist/agent/phases.js.map +1 -0
- package/dist/agent/prompts.d.ts +40 -0
- package/dist/agent/prompts.d.ts.map +1 -0
- package/dist/agent/prompts.js +104 -0
- package/dist/agent/prompts.js.map +1 -0
- package/dist/agent/protocol.d.ts +31 -0
- package/dist/agent/protocol.d.ts.map +1 -0
- package/dist/agent/protocol.js +67 -0
- package/dist/agent/protocol.js.map +1 -0
- package/dist/agent/public.d.ts +12 -0
- package/dist/agent/public.d.ts.map +1 -0
- package/dist/agent/public.js +12 -0
- package/dist/agent/public.js.map +1 -0
- package/dist/agent/replay.d.ts +61 -0
- package/dist/agent/replay.d.ts.map +1 -0
- package/dist/agent/replay.js +185 -0
- package/dist/agent/replay.js.map +1 -0
- package/dist/agent/secrets.d.ts +22 -0
- package/dist/agent/secrets.d.ts.map +1 -0
- package/dist/agent/secrets.js +63 -0
- package/dist/agent/secrets.js.map +1 -0
- package/dist/agent/step-cache.d.ts +156 -0
- package/dist/agent/step-cache.d.ts.map +1 -0
- package/dist/agent/step-cache.js +301 -0
- package/dist/agent/step-cache.js.map +1 -0
- package/dist/agent/tool-loop.d.ts +51 -0
- package/dist/agent/tool-loop.d.ts.map +1 -0
- package/dist/agent/tool-loop.js +331 -0
- package/dist/agent/tool-loop.js.map +1 -0
- package/dist/agent/tool.d.ts +39 -0
- package/dist/agent/tool.d.ts.map +1 -0
- package/dist/agent/tool.js +52 -0
- package/dist/agent/tool.js.map +1 -0
- package/dist/backend/contract.d.ts +186 -0
- package/dist/backend/contract.d.ts.map +1 -0
- package/dist/backend/contract.js +65 -0
- package/dist/backend/contract.js.map +1 -0
- package/dist/backend/index.d.ts +316 -0
- package/dist/backend/index.d.ts.map +1 -0
- package/dist/backend/index.js +219 -0
- package/dist/backend/index.js.map +1 -0
- package/dist/backend/session.d.ts +23 -0
- package/dist/backend/session.d.ts.map +1 -0
- package/dist/backend/session.js +213 -0
- package/dist/backend/session.js.map +1 -0
- package/dist/backend/surface.d.ts +83 -0
- package/dist/backend/surface.d.ts.map +1 -0
- package/dist/backend/surface.js +11 -0
- package/dist/backend/surface.js.map +1 -0
- package/dist/cache/anchors.d.ts +37 -0
- package/dist/cache/anchors.d.ts.map +1 -0
- package/dist/cache/anchors.js +89 -0
- package/dist/cache/anchors.js.map +1 -0
- package/dist/cache/context.d.ts +74 -0
- package/dist/cache/context.d.ts.map +1 -0
- package/dist/cache/context.js +82 -0
- package/dist/cache/context.js.map +1 -0
- package/dist/cache/decide.d.ts +42 -0
- package/dist/cache/decide.d.ts.map +1 -0
- package/dist/cache/decide.js +47 -0
- package/dist/cache/decide.js.map +1 -0
- package/dist/cache/identity.d.ts +113 -0
- package/dist/cache/identity.d.ts.map +1 -0
- package/dist/cache/identity.js +109 -0
- package/dist/cache/identity.js.map +1 -0
- package/dist/cache/recorder.d.ts +76 -0
- package/dist/cache/recorder.d.ts.map +1 -0
- package/dist/cache/recorder.js +143 -0
- package/dist/cache/recorder.js.map +1 -0
- package/dist/cache/relocate.d.ts +69 -0
- package/dist/cache/relocate.d.ts.map +1 -0
- package/dist/cache/relocate.js +125 -0
- package/dist/cache/relocate.js.map +1 -0
- package/dist/cache/store.d.ts +68 -0
- package/dist/cache/store.d.ts.map +1 -0
- package/dist/cache/store.js +106 -0
- package/dist/cache/store.js.map +1 -0
- package/dist/cache/trace.d.ts +146 -0
- package/dist/cache/trace.d.ts.map +1 -0
- package/dist/cache/trace.js +249 -0
- package/dist/cache/trace.js.map +1 -0
- package/dist/cli/bin.d.ts +3 -0
- package/dist/cli/bin.d.ts.map +1 -0
- package/dist/cli/bin.js +4 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +108 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.d.ts +6 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +101 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/collect/collect.d.ts +44 -0
- package/dist/collect/collect.d.ts.map +1 -0
- package/dist/collect/collect.js +89 -0
- package/dist/collect/collect.js.map +1 -0
- package/dist/collect/registry.d.ts +47 -0
- package/dist/collect/registry.d.ts.map +1 -0
- package/dist/collect/registry.js +262 -0
- package/dist/collect/registry.js.map +1 -0
- package/dist/collect/select.d.ts +54 -0
- package/dist/collect/select.d.ts.map +1 -0
- package/dist/collect/select.js +230 -0
- package/dist/collect/select.js.map +1 -0
- package/dist/config/agent.d.ts +91 -0
- package/dist/config/agent.d.ts.map +1 -0
- package/dist/config/agent.js +232 -0
- package/dist/config/agent.js.map +1 -0
- package/dist/config/load.d.ts +23 -0
- package/dist/config/load.d.ts.map +1 -0
- package/dist/config/load.js +75 -0
- package/dist/config/load.js.map +1 -0
- package/dist/config/resolve.d.ts +94 -0
- package/dist/config/resolve.d.ts.map +1 -0
- package/dist/config/resolve.js +500 -0
- package/dist/config/resolve.js.map +1 -0
- package/dist/config/validate.d.ts +6 -0
- package/dist/config/validate.d.ts.map +1 -0
- package/dist/config/validate.js +21 -0
- package/dist/config/validate.js.map +1 -0
- package/dist/credentials.d.ts +7 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/credentials.js +42 -0
- package/dist/credentials.js.map +1 -0
- package/dist/expect/async.d.ts +5 -0
- package/dist/expect/async.d.ts.map +1 -0
- package/dist/expect/async.js +186 -0
- package/dist/expect/async.js.map +1 -0
- package/dist/expect/index.d.ts +7 -0
- package/dist/expect/index.d.ts.map +1 -0
- package/dist/expect/index.js +23 -0
- package/dist/expect/index.js.map +1 -0
- package/dist/expect/values.d.ts +4 -0
- package/dist/expect/values.d.ts.map +1 -0
- package/dist/expect/values.js +108 -0
- package/dist/expect/values.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/ai-trace.d.ts +151 -0
- package/dist/internal/ai-trace.d.ts.map +1 -0
- package/dist/internal/ai-trace.js +360 -0
- package/dist/internal/ai-trace.js.map +1 -0
- package/dist/internal/brands.d.ts +9 -0
- package/dist/internal/brands.d.ts.map +1 -0
- package/dist/internal/brands.js +9 -0
- package/dist/internal/brands.js.map +1 -0
- package/dist/internal/debug.d.ts +43 -0
- package/dist/internal/debug.d.ts.map +1 -0
- package/dist/internal/debug.js +102 -0
- package/dist/internal/debug.js.map +1 -0
- package/dist/internal/errors.d.ts +98 -0
- package/dist/internal/errors.d.ts.map +1 -0
- package/dist/internal/errors.js +212 -0
- package/dist/internal/errors.js.map +1 -0
- package/dist/internal/globs.d.ts +29 -0
- package/dist/internal/globs.d.ts.map +1 -0
- package/dist/internal/globs.js +126 -0
- package/dist/internal/globs.js.map +1 -0
- package/dist/internal/ids.d.ts +32 -0
- package/dist/internal/ids.d.ts.map +1 -0
- package/dist/internal/ids.js +124 -0
- package/dist/internal/ids.js.map +1 -0
- package/dist/internal/json-value.d.ts +15 -0
- package/dist/internal/json-value.d.ts.map +1 -0
- package/dist/internal/json-value.js +61 -0
- package/dist/internal/json-value.js.map +1 -0
- package/dist/internal/package-version.d.ts +6 -0
- package/dist/internal/package-version.d.ts.map +1 -0
- package/dist/internal/package-version.js +14 -0
- package/dist/internal/package-version.js.map +1 -0
- package/dist/internal/realm-slot.d.ts +13 -0
- package/dist/internal/realm-slot.d.ts.map +1 -0
- package/dist/internal/realm-slot.js +23 -0
- package/dist/internal/realm-slot.js.map +1 -0
- package/dist/internal/redact.d.ts +33 -0
- package/dist/internal/redact.d.ts.map +1 -0
- package/dist/internal/redact.js +56 -0
- package/dist/internal/redact.js.map +1 -0
- package/dist/internal/regexp.d.ts +10 -0
- package/dist/internal/regexp.d.ts.map +1 -0
- package/dist/internal/regexp.js +27 -0
- package/dist/internal/regexp.js.map +1 -0
- package/dist/internal/text.d.ts +39 -0
- package/dist/internal/text.d.ts.map +1 -0
- package/dist/internal/text.js +66 -0
- package/dist/internal/text.js.map +1 -0
- package/dist/internal/time.d.ts +37 -0
- package/dist/internal/time.d.ts.map +1 -0
- package/dist/internal/time.js +91 -0
- package/dist/internal/time.js.map +1 -0
- package/dist/internal/trace.d.ts +18 -0
- package/dist/internal/trace.d.ts.map +1 -0
- package/dist/internal/trace.js +46 -0
- package/dist/internal/trace.js.map +1 -0
- package/dist/internal/urls.d.ts +31 -0
- package/dist/internal/urls.d.ts.map +1 -0
- package/dist/internal/urls.js +95 -0
- package/dist/internal/urls.js.map +1 -0
- package/dist/locator/engine.d.ts +65 -0
- package/dist/locator/engine.d.ts.map +1 -0
- package/dist/locator/engine.js +164 -0
- package/dist/locator/engine.js.map +1 -0
- package/dist/locator/expression.d.ts +19 -0
- package/dist/locator/expression.d.ts.map +1 -0
- package/dist/locator/expression.js +85 -0
- package/dist/locator/expression.js.map +1 -0
- package/dist/locator/screen.d.ts +36 -0
- package/dist/locator/screen.d.ts.map +1 -0
- package/dist/locator/screen.js +281 -0
- package/dist/locator/screen.js.map +1 -0
- package/dist/report/build.d.ts +214 -0
- package/dist/report/build.d.ts.map +1 -0
- package/dist/report/build.js +346 -0
- package/dist/report/build.js.map +1 -0
- package/dist/report/code-frame.d.ts +20 -0
- package/dist/report/code-frame.d.ts.map +1 -0
- package/dist/report/code-frame.js +73 -0
- package/dist/report/code-frame.js.map +1 -0
- package/dist/report/debug-steps.d.ts +14 -0
- package/dist/report/debug-steps.d.ts.map +1 -0
- package/dist/report/debug-steps.js +85 -0
- package/dist/report/debug-steps.js.map +1 -0
- package/dist/report/list.d.ts +80 -0
- package/dist/report/list.d.ts.map +1 -0
- package/dist/report/list.js +372 -0
- package/dist/report/list.js.map +1 -0
- package/dist/report/live-status.d.ts +51 -0
- package/dist/report/live-status.d.ts.map +1 -0
- package/dist/report/live-status.js +162 -0
- package/dist/report/live-status.js.map +1 -0
- package/dist/report/write.d.ts +4 -0
- package/dist/report/write.d.ts.map +1 -0
- package/dist/report/write.js +13 -0
- package/dist/report/write.js.map +1 -0
- package/dist/run/app-process.d.ts +18 -0
- package/dist/run/app-process.d.ts.map +1 -0
- package/dist/run/app-process.js +112 -0
- package/dist/run/app-process.js.map +1 -0
- package/dist/run/artifacts.d.ts +51 -0
- package/dist/run/artifacts.d.ts.map +1 -0
- package/dist/run/artifacts.js +114 -0
- package/dist/run/artifacts.js.map +1 -0
- package/dist/run/events.d.ts +100 -0
- package/dist/run/events.d.ts.map +1 -0
- package/dist/run/events.js +59 -0
- package/dist/run/events.js.map +1 -0
- package/dist/run/execute.d.ts +119 -0
- package/dist/run/execute.d.ts.map +1 -0
- package/dist/run/execute.js +555 -0
- package/dist/run/execute.js.map +1 -0
- package/dist/run/fixtures.d.ts +40 -0
- package/dist/run/fixtures.d.ts.map +1 -0
- package/dist/run/fixtures.js +408 -0
- package/dist/run/fixtures.js.map +1 -0
- package/dist/run/in-process.d.ts +24 -0
- package/dist/run/in-process.d.ts.map +1 -0
- package/dist/run/in-process.js +120 -0
- package/dist/run/in-process.js.map +1 -0
- package/dist/run/public.d.ts +19 -0
- package/dist/run/public.d.ts.map +1 -0
- package/dist/run/public.js +11 -0
- package/dist/run/public.js.map +1 -0
- package/dist/run/realm.d.ts +52 -0
- package/dist/run/realm.d.ts.map +1 -0
- package/dist/run/realm.js +101 -0
- package/dist/run/realm.js.map +1 -0
- package/dist/run/records.d.ts +87 -0
- package/dist/run/records.d.ts.map +1 -0
- package/dist/run/records.js +3 -0
- package/dist/run/records.js.map +1 -0
- package/dist/run/retry.d.ts +18 -0
- package/dist/run/retry.d.ts.map +1 -0
- package/dist/run/retry.js +33 -0
- package/dist/run/retry.js.map +1 -0
- package/dist/run/runner.d.ts +49 -0
- package/dist/run/runner.d.ts.map +1 -0
- package/dist/run/runner.js +375 -0
- package/dist/run/runner.js.map +1 -0
- package/dist/run/scheduler.d.ts +45 -0
- package/dist/run/scheduler.d.ts.map +1 -0
- package/dist/run/scheduler.js +512 -0
- package/dist/run/scheduler.js.map +1 -0
- package/dist/run/serial.d.ts +52 -0
- package/dist/run/serial.d.ts.map +1 -0
- package/dist/run/serial.js +247 -0
- package/dist/run/serial.js.map +1 -0
- package/dist/run/sessions.d.ts +54 -0
- package/dist/run/sessions.d.ts.map +1 -0
- package/dist/run/sessions.js +221 -0
- package/dist/run/sessions.js.map +1 -0
- package/dist/run/steps.d.ts +196 -0
- package/dist/run/steps.d.ts.map +1 -0
- package/dist/run/steps.js +151 -0
- package/dist/run/steps.js.map +1 -0
- package/dist/run/unit-runner.d.ts +30 -0
- package/dist/run/unit-runner.d.ts.map +1 -0
- package/dist/run/unit-runner.js +11 -0
- package/dist/run/unit-runner.js.map +1 -0
- package/dist/run/units.d.ts +50 -0
- package/dist/run/units.d.ts.map +1 -0
- package/dist/run/units.js +103 -0
- package/dist/run/units.js.map +1 -0
- package/dist/run/worker/entry.d.ts +8 -0
- package/dist/run/worker/entry.d.ts.map +1 -0
- package/dist/run/worker/entry.js +137 -0
- package/dist/run/worker/entry.js.map +1 -0
- package/dist/run/worker/handle.d.ts +10 -0
- package/dist/run/worker/handle.d.ts.map +1 -0
- package/dist/run/worker/handle.js +74 -0
- package/dist/run/worker/handle.js.map +1 -0
- package/dist/run/worker/protocol.d.ts +129 -0
- package/dist/run/worker/protocol.d.ts.map +1 -0
- package/dist/run/worker/protocol.js +18 -0
- package/dist/run/worker/protocol.js.map +1 -0
- package/dist/run/worker/session.d.ts +69 -0
- package/dist/run/worker/session.d.ts.map +1 -0
- package/dist/run/worker/session.js +123 -0
- package/dist/run/worker/session.js.map +1 -0
- package/dist/types.d.ts +630 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/package.json +91 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TesterArmy, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# e2e
|
|
2
|
+
|
|
3
|
+
The `e2e` SDK, runner, and CLI for agentic end-to-end testing. Full
|
|
4
|
+
documentation: [e2e.docs.buildwithfern.com](https://e2e.docs.buildwithfern.com).
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
pnpm add -D e2e@beta @e2edev/playwright@beta
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
e2e init
|
|
14
|
+
APP_URL=http://localhost:3000 e2e run
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```ts title="e2e.config.ts"
|
|
18
|
+
import { defineConfig } from '@e2edev/e2e';
|
|
19
|
+
import { playwright } from '@e2edev/playwright';
|
|
20
|
+
|
|
21
|
+
export default defineConfig({
|
|
22
|
+
app: { url: process.env.APP_URL ?? 'http://localhost:3000' },
|
|
23
|
+
targets: [{ name: 'web', platform: 'web', backend: playwright() }],
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { test } from '@e2edev/playwright';
|
|
29
|
+
import { expect } from '@e2edev/e2e';
|
|
30
|
+
|
|
31
|
+
test('user signs in', async ({ app, screen, web }) => {
|
|
32
|
+
await app.open('/login');
|
|
33
|
+
await screen.getByLabel('Email').fill('user@example.test');
|
|
34
|
+
await screen.getByRole('button', { name: 'Sign in' }).tap();
|
|
35
|
+
await expect(web).toHaveURL('/dashboard');
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The runner itself knows no platform: every target names the backend that
|
|
40
|
+
drives it, and `@e2edev/playwright` is the browser one. Missing Playwright
|
|
41
|
+
browsers are downloaded on first run. To provision them ahead of time (for
|
|
42
|
+
example in a CI image), run `npx playwright install chromium`.
|
|
43
|
+
|
|
44
|
+
Run files in parallel with `--workers`, or set `workers` in the config.
|
|
45
|
+
|
|
46
|
+
## Agent steps
|
|
47
|
+
|
|
48
|
+
Deterministic tests need no model. Agent steps — `agent.act`, `assert`,
|
|
49
|
+
`waitFor`, and `extract` — require one:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
export default defineConfig({
|
|
53
|
+
agent: { model: 'anthropic/claude-sonnet-4.5' },
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
E2E_MODEL=openai/gpt-5.4-mini E2E_MODEL_API_KEY=... e2e run
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
A `provider/model-id` string goes through the
|
|
62
|
+
[Vercel AI Gateway](https://vercel.com/docs/ai-gateway). To use a provider
|
|
63
|
+
directly, pass any AI SDK model instance instead:
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
import { openai } from '@ai-sdk/openai';
|
|
67
|
+
|
|
68
|
+
export default defineConfig({
|
|
69
|
+
agent: { model: openai('gpt-5.4-mini') },
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Screenshots, raw HTML, cookies, headers, and registered secret values are never
|
|
74
|
+
sent to the model.
|
|
75
|
+
|
|
76
|
+
The adaptive trace cache (`trace-1`) replays a passing `agent.act()` step's
|
|
77
|
+
recorded actions zero-turn on the next run, diverging to the live agent
|
|
78
|
+
mid-step whenever the app no longer matches the recording, or whenever the
|
|
79
|
+
recorded actions ran but the recorded end state is not on screen again. An
|
|
80
|
+
entry is written only after a later assertion confirms the step's outcome. It
|
|
81
|
+
is on by default (`read-write`; CI forces the file store to `read-only`, while
|
|
82
|
+
a host-supplied store keeps its configured mode) — opt out with
|
|
83
|
+
`cache: 'off'` or per run with `--no-cache`. Entries live under
|
|
84
|
+
`.e2e/cache/` or in any custom `TraceCacheStore`. Judgments (`assert`,
|
|
85
|
+
`waitFor`, `extract`) are never cached — every judgment is made fresh, per
|
|
86
|
+
run, from a fresh observation.
|
|
87
|
+
|
|
88
|
+
`e2e run --ai-trace` records every model call of the run — prompt, tool
|
|
89
|
+
definitions, response, usage, cost — to `.e2e/ai-trace.json`, one run per
|
|
90
|
+
agent step, in the AI SDK devtools database shape. Open it with
|
|
91
|
+
[unbox-ai](https://github.com/tester-army/unbox-ai):
|
|
92
|
+
`npx unbox-ai .e2e/ai-trace.json`.
|
|
93
|
+
|
|
94
|
+
## Current limitations
|
|
95
|
+
|
|
96
|
+
- `agent.act` structured output (`options.schema`) and vision evidence
|
|
97
|
+
(`options.vision`) reject with `UNSUPPORTED_CAPABILITY`.
|
|
98
|
+
- The HTML reporter and video artifacts are not available.
|
|
99
|
+
- Reported steps carry no source locations.
|
|
100
|
+
- iOS and Android need a backend package; none ships in this repo yet.
|
|
101
|
+
|
|
102
|
+
## Contributing
|
|
103
|
+
|
|
104
|
+
See [CONTRIBUTING.md](https://github.com/tester-army/e2e/blob/main/CONTRIBUTING.md).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input and verdict validation for the act dispatch (spec 02, 16). Pure
|
|
3
|
+
* functions with no dispatch state: everything a step's arguments and an
|
|
4
|
+
* executor's verdict must satisfy before the harness trusts them.
|
|
5
|
+
*/
|
|
6
|
+
import type { AgentOptions, AgentParams, JsonValue, Secret } from '../types.ts';
|
|
7
|
+
import { type StepVerdict } from './executor.ts';
|
|
8
|
+
/** Normalizes and bounds the instruction per spec 02. */
|
|
9
|
+
export declare function validateInstruction(instruction: string, api: string): string;
|
|
10
|
+
/** Options the socket does not support yet fail loudly, like `schema` does. */
|
|
11
|
+
export declare function rejectUnsupportedActOptions(options: AgentOptions | undefined): void;
|
|
12
|
+
/**
|
|
13
|
+
* Validates parameters and returns an inert, secret-free snapshot plus the
|
|
14
|
+
* declared secrets. A `Secret` value is projected to
|
|
15
|
+
* `{ kind: 'secret', name, purpose }` — its plaintext never enters the
|
|
16
|
+
* snapshot, the prompt, or any log — and is fillable only through
|
|
17
|
+
* `actions.typeSecret`. The JSON round-trip is deliberate: it bounds the
|
|
18
|
+
* canonical size (spec 02) and freezes what the executor sees, so a getter
|
|
19
|
+
* or proxy cannot change values — or run code — during later serialization.
|
|
20
|
+
*/
|
|
21
|
+
export declare function validateParams(params: AgentParams | undefined): {
|
|
22
|
+
projected: Readonly<Record<string, JsonValue>> | undefined;
|
|
23
|
+
secrets: ReadonlyMap<string, Secret>;
|
|
24
|
+
};
|
|
25
|
+
/** Closes the verdict grammar: the executor cannot invent statuses or codes. */
|
|
26
|
+
export declare function validateVerdict(verdict: unknown, executorName: string): StepVerdict;
|
|
27
|
+
//# sourceMappingURL=act-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"act-validation.d.ts","sourceRoot":"","sources":["../../src/agent/act-validation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAkB,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEhG,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAWlE,yDAAyD;AACzD,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAa5E;AAED,+EAA+E;AAC/E,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI,CAUnF;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG;IAC/D,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC;IAC3D,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC,CAoBA;AAqBD,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,WAAW,CAqCnF"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input and verdict validation for the act dispatch (spec 02, 16). Pure
|
|
3
|
+
* functions with no dispatch state: everything a step's arguments and an
|
|
4
|
+
* executor's verdict must satisfy before the harness trusts them.
|
|
5
|
+
*/
|
|
6
|
+
import { ConfigurationError, TestError } from '../internal/errors.js';
|
|
7
|
+
import { validateJsonValue } from '../internal/json-value.js';
|
|
8
|
+
import { isSecret } from '../locator/screen.js';
|
|
9
|
+
import { AgentError, CATEGORY_BY_CODE } from './error.js';
|
|
10
|
+
import { BLOCKABLE_CODES } from './executor.js';
|
|
11
|
+
const MAX_SUMMARY_CHARS = 2_000;
|
|
12
|
+
/** Spec 02: instructions are 1 through 8 KiB UTF-8 after NFC. */
|
|
13
|
+
const MAX_INSTRUCTION_BYTES = 8_192;
|
|
14
|
+
/** Spec 02: canonical non-secret parameters are capped at 64 KiB, 32 levels. */
|
|
15
|
+
const MAX_PARAMS_BYTES = 65_536;
|
|
16
|
+
const MAX_PARAMS_DEPTH = 32;
|
|
17
|
+
/** Normalizes and bounds the instruction per spec 02. */
|
|
18
|
+
export function validateInstruction(instruction, api) {
|
|
19
|
+
if (typeof instruction !== 'string' || instruction.trim() === '') {
|
|
20
|
+
throw new TestError('INVALID_ARGUMENT', `${api} requires a non-empty instruction`);
|
|
21
|
+
}
|
|
22
|
+
const normalized = instruction.normalize('NFC');
|
|
23
|
+
const bytes = new TextEncoder().encode(normalized).byteLength;
|
|
24
|
+
if (bytes > MAX_INSTRUCTION_BYTES) {
|
|
25
|
+
throw new TestError('INVALID_ARGUMENT', `${api} instruction is ${bytes} bytes; the maximum is ${MAX_INSTRUCTION_BYTES}`);
|
|
26
|
+
}
|
|
27
|
+
return normalized;
|
|
28
|
+
}
|
|
29
|
+
/** Options the socket does not support yet fail loudly, like `schema` does. */
|
|
30
|
+
export function rejectUnsupportedActOptions(options) {
|
|
31
|
+
if (options === undefined)
|
|
32
|
+
return;
|
|
33
|
+
const unsupported = (name) => {
|
|
34
|
+
throw new ConfigurationError('UNSUPPORTED_CAPABILITY', `agent.act ${name} is not part of this milestone`);
|
|
35
|
+
};
|
|
36
|
+
if ('schema' in options && options.schema !== undefined)
|
|
37
|
+
unsupported('structured output (options.schema)');
|
|
38
|
+
if (options.vision !== undefined)
|
|
39
|
+
unsupported('vision evidence (options.vision)');
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Validates parameters and returns an inert, secret-free snapshot plus the
|
|
43
|
+
* declared secrets. A `Secret` value is projected to
|
|
44
|
+
* `{ kind: 'secret', name, purpose }` — its plaintext never enters the
|
|
45
|
+
* snapshot, the prompt, or any log — and is fillable only through
|
|
46
|
+
* `actions.typeSecret`. The JSON round-trip is deliberate: it bounds the
|
|
47
|
+
* canonical size (spec 02) and freezes what the executor sees, so a getter
|
|
48
|
+
* or proxy cannot change values — or run code — during later serialization.
|
|
49
|
+
*/
|
|
50
|
+
export function validateParams(params) {
|
|
51
|
+
if (params === undefined)
|
|
52
|
+
return { projected: undefined, secrets: new Map() };
|
|
53
|
+
if (typeof params !== 'object' || params === null || Array.isArray(params)) {
|
|
54
|
+
throw new TestError('INVALID_ARGUMENT', 'agent.act params must be a plain object');
|
|
55
|
+
}
|
|
56
|
+
const secrets = new Map();
|
|
57
|
+
const projectedRaw = projectSecrets(params, secrets, new Set());
|
|
58
|
+
validateJsonValue(projectedRaw, 'agent.act params', { maxDepth: MAX_PARAMS_DEPTH });
|
|
59
|
+
const canonical = JSON.stringify(projectedRaw);
|
|
60
|
+
const bytes = new TextEncoder().encode(canonical).byteLength;
|
|
61
|
+
if (bytes > MAX_PARAMS_BYTES) {
|
|
62
|
+
throw new TestError('INVALID_ARGUMENT', `agent.act params are ${bytes} canonical bytes; the maximum is ${MAX_PARAMS_BYTES}`);
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
projected: JSON.parse(canonical),
|
|
66
|
+
secrets,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** Replaces every Secret leaf with its placeholder, collecting the originals. */
|
|
70
|
+
function projectSecrets(value, secrets, seen) {
|
|
71
|
+
if (isSecret(value)) {
|
|
72
|
+
secrets.set(value.name, value);
|
|
73
|
+
return { kind: 'secret', name: value.name, purpose: value.purpose };
|
|
74
|
+
}
|
|
75
|
+
if (typeof value !== 'object' || value === null)
|
|
76
|
+
return value;
|
|
77
|
+
if (seen.has(value)) {
|
|
78
|
+
throw new TestError('INVALID_ARGUMENT', 'agent.act params contains a cycle');
|
|
79
|
+
}
|
|
80
|
+
seen.add(value);
|
|
81
|
+
if (Array.isArray(value)) {
|
|
82
|
+
return value.map((entry) => projectSecrets(entry, secrets, seen));
|
|
83
|
+
}
|
|
84
|
+
return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, projectSecrets(entry, secrets, seen)]));
|
|
85
|
+
}
|
|
86
|
+
/** Closes the verdict grammar: the executor cannot invent statuses or codes. */
|
|
87
|
+
export function validateVerdict(verdict, executorName) {
|
|
88
|
+
const invalid = (issue) => {
|
|
89
|
+
throw new AgentError('MODEL_OUTPUT_INVALID', `executor "${executorName}" returned an invalid verdict: ${issue}`);
|
|
90
|
+
};
|
|
91
|
+
if (typeof verdict !== 'object' || verdict === null)
|
|
92
|
+
return invalid('not an object');
|
|
93
|
+
const candidate = verdict;
|
|
94
|
+
const status = candidate['status'];
|
|
95
|
+
if (status !== 'passed' && status !== 'failed' && status !== 'blocked') {
|
|
96
|
+
return invalid(`status must be passed, failed, or blocked, got ${JSON.stringify(status)}`);
|
|
97
|
+
}
|
|
98
|
+
const summary = candidate['summary'];
|
|
99
|
+
if (typeof summary !== 'string' || summary.trim() === '') {
|
|
100
|
+
return invalid('summary must be a non-empty string');
|
|
101
|
+
}
|
|
102
|
+
const errorCode = candidate['errorCode'];
|
|
103
|
+
if (errorCode !== undefined) {
|
|
104
|
+
if (typeof errorCode !== 'string' || !(errorCode in CATEGORY_BY_CODE)) {
|
|
105
|
+
return invalid(`unknown errorCode ${JSON.stringify(errorCode)}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const code = errorCode;
|
|
109
|
+
if (status === 'passed' && code !== undefined) {
|
|
110
|
+
return invalid('a passed verdict cannot carry an errorCode');
|
|
111
|
+
}
|
|
112
|
+
if (status === 'blocked' && (code === undefined || !BLOCKABLE_CODES.has(code))) {
|
|
113
|
+
return invalid(`blocked requires a blockable errorCode (one of ${[...BLOCKABLE_CODES].join(', ')})`);
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
status,
|
|
117
|
+
summary: summary.trim().slice(0, MAX_SUMMARY_CHARS),
|
|
118
|
+
...(code === undefined ? {} : { errorCode: code }),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=act-validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"act-validation.js","sourceRoot":"","sources":["../../src/agent/act-validation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAoB,MAAM,eAAe,CAAC;AAElE,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAEhC,iEAAiE;AACjE,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAEpC,gFAAgF;AAChF,MAAM,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-0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Harness-owned dispatch of one `agent.act()` step (RFC0001, layer 3).
|
|
3
|
+
*
|
|
4
|
+
* The harness opens the step, owns the deadline, the action budget, origin
|
|
5
|
+
* policy, observation redaction, and recording — then hands the step to the
|
|
6
|
+
* configured executor and maps its verdict back onto the runner's error
|
|
7
|
+
* taxonomy. The executor never touches the backend: everything bottoms out in
|
|
8
|
+
* the context built here, on the same accounting core (phases.ts) the
|
|
9
|
+
* locate/judgment tier runs on. Trace-cache participation — replay, live
|
|
10
|
+
* recording, staging — lives beside the dispatch in `StepTraceSession`.
|
|
11
|
+
*/
|
|
12
|
+
import type { AgentOptions, AgentParams, AgentResult } from '../types.ts';
|
|
13
|
+
import type { AgentContext } from './invocation.ts';
|
|
14
|
+
/** Runs one `agent.act()` call as a harness-dispatched executor step. */
|
|
15
|
+
export declare function runActStep(runtime: AgentContext, instruction: string, params: AgentParams | undefined, options: AgentOptions | undefined): Promise<AgentResult>;
|
|
16
|
+
/**
|
|
17
|
+
* Runs one `agent.assert()` call through the executor socket. Used when a
|
|
18
|
+
* custom executor is configured: the brain that plans flows also judges
|
|
19
|
+
* assertions, so swapping brains swaps all the thinking. The built-in
|
|
20
|
+
* single-judgment tier remains the default-path implementation.
|
|
21
|
+
*/
|
|
22
|
+
export declare function runAssertStep(runtime: AgentContext, assertion: string, options: {
|
|
23
|
+
timeout?: number;
|
|
24
|
+
vision?: unknown;
|
|
25
|
+
screenshot?: boolean;
|
|
26
|
+
} | undefined): Promise<void>;
|
|
27
|
+
//# sourceMappingURL=act.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"act.d.ts","sourceRoot":"","sources":["../../src/agent/act.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,OAAO,KAAK,EAEV,YAAY,EACZ,WAAW,EACX,WAAW,EAKZ,MAAM,aAAa,CAAC;AAkBrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA6BpD,yEAAyE;AACzE,wBAAsB,UAAU,CAC9B,OAAO,EAAE,YAAY,EACrB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,WAAW,GAAG,SAAS,EAC/B,OAAO,EAAE,YAAY,GAAG,SAAS,GAChC,OAAO,CAAC,WAAW,CAAC,CAgBtB;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,GAChF,OAAO,CAAC,IAAI,CAAC,CAqBf"}
|