journey-evals 0.1.0__tar.gz

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.
Files changed (129) hide show
  1. journey_evals-0.1.0/.env.example +21 -0
  2. journey_evals-0.1.0/.github/workflows/qa.yml +153 -0
  3. journey_evals-0.1.0/.gitignore +38 -0
  4. journey_evals-0.1.0/AGENTS.md +16 -0
  5. journey_evals-0.1.0/LICENSE +29 -0
  6. journey_evals-0.1.0/NOTICE +37 -0
  7. journey_evals-0.1.0/PKG-INFO +470 -0
  8. journey_evals-0.1.0/README.md +443 -0
  9. journey_evals-0.1.0/docs/demo-video.md +204 -0
  10. journey_evals-0.1.0/docs/design.md +33 -0
  11. journey_evals-0.1.0/docs/flights-measurement.json +238 -0
  12. journey_evals-0.1.0/docs/flights-prepared-measurement.json +176 -0
  13. journey_evals-0.1.0/docs/full-speed-measurement.json +895 -0
  14. journey_evals-0.1.0/docs/guide.md +1492 -0
  15. journey_evals-0.1.0/docs/measurement.json +92 -0
  16. journey_evals-0.1.0/docs/performance-prepared.md +42 -0
  17. journey_evals-0.1.0/docs/performance.md +55 -0
  18. journey_evals-0.1.0/docs/release-checklist.md +117 -0
  19. journey_evals-0.1.0/examples/__init__.py +1 -0
  20. journey_evals-0.1.0/examples/admin.html +298 -0
  21. journey_evals-0.1.0/examples/admin.js +212 -0
  22. journey_evals-0.1.0/examples/admin_app.py +397 -0
  23. journey_evals-0.1.0/examples/agent-eval-concierge-blunt.json +35 -0
  24. journey_evals-0.1.0/examples/agent-eval-concierge.json +42 -0
  25. journey_evals-0.1.0/examples/agent-eval-final-sale.json +37 -0
  26. journey_evals-0.1.0/examples/agent-eval-refund.json +44 -0
  27. journey_evals-0.1.0/examples/agent-eval-travel-multiturn.json +72 -0
  28. journey_evals-0.1.0/examples/agent-eval.json +29 -0
  29. journey_evals-0.1.0/examples/agent_graph.py +31 -0
  30. journey_evals-0.1.0/examples/flight.html +491 -0
  31. journey_evals-0.1.0/examples/flight.js +135 -0
  32. journey_evals-0.1.0/examples/flight_app.py +266 -0
  33. journey_evals-0.1.0/examples/flights.py +68 -0
  34. journey_evals-0.1.0/examples/journeys/flight-booking-back.json +201 -0
  35. journey_evals-0.1.0/examples/journeys/flight-booking-matrix.json +230 -0
  36. journey_evals-0.1.0/examples/journeys/flight-booking-narrow.json +207 -0
  37. journey_evals-0.1.0/examples/journeys/flight-booking.json +229 -0
  38. journey_evals-0.1.0/examples/journeys/plan-downgrade.json +149 -0
  39. journey_evals-0.1.0/examples/journeys/revenue-freshness.json +146 -0
  40. journey_evals-0.1.0/examples/journeys/workspace-deletion.json +155 -0
  41. journey_evals-0.1.0/examples/journeys/workspace-subscription.json +203 -0
  42. journey_evals-0.1.0/examples/langchain_concierge_agent.py +104 -0
  43. journey_evals-0.1.0/examples/langchain_demo_agent.py +63 -0
  44. journey_evals-0.1.0/examples/langchain_travel_agent.py +99 -0
  45. journey_evals-0.1.0/examples/run.py +15 -0
  46. journey_evals-0.1.0/examples/subscription.html +378 -0
  47. journey_evals-0.1.0/examples/subscription_app.py +172 -0
  48. journey_evals-0.1.0/jev_ultrafast/__init__.py +22 -0
  49. journey_evals-0.1.0/jev_ultrafast/agent.py +208 -0
  50. journey_evals-0.1.0/jev_ultrafast/browser.py +236 -0
  51. journey_evals-0.1.0/jev_ultrafast/demo.py +145 -0
  52. journey_evals-0.1.0/jev_ultrafast/limits.py +11 -0
  53. journey_evals-0.1.0/jev_ultrafast/model.py +261 -0
  54. journey_evals-0.1.0/jev_ultrafast/questions.py +37 -0
  55. journey_evals-0.1.0/jev_ultrafast/snapshot.js +108 -0
  56. journey_evals-0.1.0/jev_ultrafast/static/app.js +244 -0
  57. journey_evals-0.1.0/jev_ultrafast/static/fixture.html +507 -0
  58. journey_evals-0.1.0/jev_ultrafast/static/index.html +144 -0
  59. journey_evals-0.1.0/jev_ultrafast/static/style.css +737 -0
  60. journey_evals-0.1.0/journey_evals/__init__.py +32 -0
  61. journey_evals-0.1.0/journey_evals/agent_console.py +180 -0
  62. journey_evals-0.1.0/journey_evals/agent_evals.py +1073 -0
  63. journey_evals-0.1.0/journey_evals/app/booking.html +89 -0
  64. journey_evals-0.1.0/journey_evals/app/pricing.py +12 -0
  65. journey_evals-0.1.0/journey_evals/app2/pricing.py +7 -0
  66. journey_evals-0.1.0/journey_evals/app2/signup.html +144 -0
  67. journey_evals-0.1.0/journey_evals/browser_checks.py +441 -0
  68. journey_evals-0.1.0/journey_evals/browsers.py +96 -0
  69. journey_evals-0.1.0/journey_evals/cli.py +742 -0
  70. journey_evals-0.1.0/journey_evals/comparator.py +257 -0
  71. journey_evals-0.1.0/journey_evals/console.py +563 -0
  72. journey_evals-0.1.0/journey_evals/contracts.py +873 -0
  73. journey_evals-0.1.0/journey_evals/evaluation.py +633 -0
  74. journey_evals-0.1.0/journey_evals/evaluators.py +102 -0
  75. journey_evals-0.1.0/journey_evals/evidence.py +167 -0
  76. journey_evals-0.1.0/journey_evals/feasibility.py +338 -0
  77. journey_evals-0.1.0/journey_evals/fixture.py +166 -0
  78. journey_evals-0.1.0/journey_evals/framework.py +165 -0
  79. journey_evals-0.1.0/journey_evals/isolation.py +189 -0
  80. journey_evals-0.1.0/journey_evals/live.py +355 -0
  81. journey_evals-0.1.0/journey_evals/overhead.py +92 -0
  82. journey_evals-0.1.0/journey_evals/paths.py +62 -0
  83. journey_evals-0.1.0/journey_evals/reliability.py +370 -0
  84. journey_evals-0.1.0/journey_evals/repair.py +403 -0
  85. journey_evals-0.1.0/journey_evals/report.py +475 -0
  86. journey_evals-0.1.0/journey_evals/runner.py +999 -0
  87. journey_evals-0.1.0/journey_evals/screening.py +217 -0
  88. journey_evals-0.1.0/journey_evals/static/agent-console.css +150 -0
  89. journey_evals-0.1.0/journey_evals/static/agent-console.html +42 -0
  90. journey_evals-0.1.0/journey_evals/static/agent-console.js +169 -0
  91. journey_evals-0.1.0/journey_evals/static/console.css +670 -0
  92. journey_evals-0.1.0/journey_evals/static/console.html +87 -0
  93. journey_evals-0.1.0/journey_evals/static/console.js +564 -0
  94. journey_evals-0.1.0/journey_evals/subscription.py +496 -0
  95. journey_evals-0.1.0/journey_evals/telemetry.js +266 -0
  96. journey_evals-0.1.0/pyproject.toml +78 -0
  97. journey_evals-0.1.0/scripts/build_npm.py +70 -0
  98. journey_evals-0.1.0/scripts/calibrate.py +227 -0
  99. journey_evals-0.1.0/scripts/check_guards.py +265 -0
  100. journey_evals-0.1.0/scripts/drive_admin_fixture.py +101 -0
  101. journey_evals-0.1.0/scripts/measure_flights.py +70 -0
  102. journey_evals-0.1.0/scripts/record_flights.py +75 -0
  103. journey_evals-0.1.0/scripts/render_demo.py +138 -0
  104. journey_evals-0.1.0/scripts/render_docs_media.py +141 -0
  105. journey_evals-0.1.0/scripts/render_fixture.py +58 -0
  106. journey_evals-0.1.0/scripts/report_calibration.py +154 -0
  107. journey_evals-0.1.0/scripts/smoke.py +57 -0
  108. journey_evals-0.1.0/scripts/smoke_e2e.py +164 -0
  109. journey_evals-0.1.0/scripts/sweep.py +155 -0
  110. journey_evals-0.1.0/scripts/verify_new_tests.py +77 -0
  111. journey_evals-0.1.0/tests/test_admin_fixture.py +211 -0
  112. journey_evals-0.1.0/tests/test_agent.py +498 -0
  113. journey_evals-0.1.0/tests/test_agent_console.py +177 -0
  114. journey_evals-0.1.0/tests/test_agent_evals.py +701 -0
  115. journey_evals-0.1.0/tests/test_cli.py +421 -0
  116. journey_evals-0.1.0/tests/test_console.py +461 -0
  117. journey_evals-0.1.0/tests/test_contracts.py +398 -0
  118. journey_evals-0.1.0/tests/test_evaluation.py +532 -0
  119. journey_evals-0.1.0/tests/test_evaluators.py +64 -0
  120. journey_evals-0.1.0/tests/test_feasibility.py +388 -0
  121. journey_evals-0.1.0/tests/test_fixture_markup.py +294 -0
  122. journey_evals-0.1.0/tests/test_fixtures.py +111 -0
  123. journey_evals-0.1.0/tests/test_langchain_demo.py +99 -0
  124. journey_evals-0.1.0/tests/test_npm_package.py +70 -0
  125. journey_evals-0.1.0/tests/test_report.py +286 -0
  126. journey_evals-0.1.0/tests/test_runner.py +523 -0
  127. journey_evals-0.1.0/tests/test_second_app.py +155 -0
  128. journey_evals-0.1.0/tests/test_viewports.py +359 -0
  129. journey_evals-0.1.0/uv.lock +371 -0
@@ -0,0 +1,21 @@
1
+ # Use one Jev key name. journey-evals maps JEV_API_KEY in process; do not configure conflicting values.
2
+ JEV_API_KEY=
3
+ TYPESAFE_API_KEY=
4
+ TYPESAFE_MODEL=jev-1.13.0
5
+ # Agent evaluations use the same evaluator configuration by default. The key is removed from the
6
+ # environment while the target graph is imported and executed.
7
+
8
+ # Required for TYPE_TEXT. OpenAI-compatible helper; credentials stay server-side and are never
9
+ # passed to browser child processes. Every *_API_KEY, *_KEY, *_TOKEN and *_SECRET value in the
10
+ # environment is redacted from artifacts before they are written.
11
+ TEXT_MODEL_API_KEY=
12
+ TEXT_MODEL_BASE_URL=https://openrouter.ai/api/v1
13
+ TEXT_MODEL=inception/mercury-2.5
14
+ TEXT_MODEL_REASONING=none
15
+ # Optional. Azure's v1 surface wants max_completion_tokens and reasoning_effort rather than
16
+ # max_tokens and a reasoning object. Detected from the endpoint when unset; set it explicitly to
17
+ # override. Accepts openai or azure.
18
+ # TEXT_MODEL_DIALECT=azure
19
+
20
+ # Journey-specific values to redact are declared in the journey's own "redact" list, not here,
21
+ # so they travel with the journey rather than with the machine.
@@ -0,0 +1,153 @@
1
+ # Two trust levels, deliberately separated.
2
+ #
3
+ # `contracts` runs for every push and pull request, including forks. It has no secrets, makes no
4
+ # model calls, and never reaches the network: it proves the contracts, evaluators, report shape,
5
+ # and browser guards still hold. A fork PR can run it safely because there is nothing to steal.
6
+ #
7
+ # `live` runs the real model-backed journey. It is gated on the `live-qa` environment so a
8
+ # maintainer approves each run before any credential is issued. It is deliberately *not* wired to
9
+ # `pull_request_target` and does not consume artifacts from an untrusted job: doing either would
10
+ # execute fork-authored code with repository credentials in scope.
11
+ name: qa
12
+
13
+ on:
14
+ push:
15
+ branches: ["**"]
16
+ pull_request:
17
+ workflow_dispatch:
18
+ inputs:
19
+ live:
20
+ description: "Also run the live model-backed journey"
21
+ type: boolean
22
+ default: false
23
+
24
+ permissions:
25
+ contents: read
26
+
27
+ concurrency:
28
+ group: qa-${{ github.workflow }}-${{ github.ref }}
29
+ cancel-in-progress: true
30
+
31
+ jobs:
32
+ contracts:
33
+ name: offline contracts and browser guards
34
+ runs-on: ubuntu-latest
35
+ timeout-minutes: 25
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+ with:
39
+ persist-credentials: false
40
+
41
+ - uses: actions/setup-python@v5
42
+ with:
43
+ python-version: "3.12"
44
+
45
+ - uses: actions/setup-node@v4
46
+ with:
47
+ node-version: "22"
48
+
49
+ - name: Install
50
+ run: |
51
+ python -m pip install --upgrade pip
52
+ python -m pip install -e . ruff pytest
53
+
54
+ - name: Lint
55
+ run: ruff check .
56
+
57
+ - name: Parse browser sources
58
+ run: |
59
+ node --check journey_evals/telemetry.js
60
+ node --check journey_evals/snapshot.js
61
+ node --check journey_evals/static/app.js
62
+ node --check journey_evals/static/console.js
63
+ node --check examples/flight.js
64
+
65
+ - name: Offline tests
66
+ run: pytest -q --junitxml=artifacts/ci/pytest.xml
67
+
68
+ # The guards drive a real browser against loopback fixtures and make no model calls, so they
69
+ # are safe on untrusted code and still catch the evidence-collection regressions that unit
70
+ # tests cannot see.
71
+ - name: Browser guards
72
+ run: |
73
+ python -m journey_evals.feasibility preflight || true
74
+ python scripts/check_guards.py
75
+
76
+ - uses: actions/upload-artifact@v4
77
+ if: always()
78
+ with:
79
+ name: contracts-${{ github.run_id }}
80
+ path: artifacts/ci
81
+ retention-days: 14
82
+ if-no-files-found: ignore
83
+
84
+ live:
85
+ name: live journey (advisory)
86
+ needs: contracts
87
+ # Never runs automatically on a pull request. Fork code must not reach these credentials.
88
+ if: >-
89
+ github.event_name == 'workflow_dispatch' && inputs.live &&
90
+ github.event.repository.fork == false
91
+ runs-on: ubuntu-latest
92
+ timeout-minutes: 45
93
+ environment: live-qa
94
+ steps:
95
+ - uses: actions/checkout@v4
96
+ with:
97
+ persist-credentials: false
98
+
99
+ - uses: actions/setup-python@v5
100
+ with:
101
+ python-version: "3.12"
102
+
103
+ - name: Install
104
+ run: |
105
+ python -m pip install --upgrade pip
106
+ python -m pip install -e .
107
+
108
+ - name: Readiness
109
+ run: python -m journey_evals.feasibility preflight
110
+
111
+ # Advisory mode. Semantic evaluators are not calibrated on a corpus large enough to gate a
112
+ # merge, so a finding is published rather than enforced. A runner error is still a failure:
113
+ # "the tool could not run" and "the application is fine" are not the same statement.
114
+ - name: Flight journey
115
+ id: journey
116
+ env:
117
+ JEV_API_KEY: ${{ secrets.JEV_API_KEY }}
118
+ TYPESAFE_API_KEY: ${{ secrets.TYPESAFE_API_KEY }}
119
+ TYPESAFE_MODEL: ${{ vars.TYPESAFE_MODEL }}
120
+ TEXT_MODEL: ${{ vars.TEXT_MODEL }}
121
+ TEXT_MODEL_BASE_URL: ${{ vars.TEXT_MODEL_BASE_URL }}
122
+ TEXT_MODEL_API_KEY: ${{ secrets.TEXT_MODEL_API_KEY }}
123
+ run: |
124
+ set +e
125
+ python -m journey_evals.cli run \
126
+ --journey examples/journeys/flight-booking.json \
127
+ --out artifacts/ci/live
128
+ echo "code=$?" >> "$GITHUB_OUTPUT"
129
+ set -e
130
+
131
+ - name: Publish result
132
+ if: always()
133
+ run: |
134
+ code="${{ steps.journey.outputs.code }}"
135
+ python - <<'PY' >> "$GITHUB_STEP_SUMMARY"
136
+ import json, pathlib
137
+ for report in sorted(pathlib.Path("artifacts/ci/live").glob("*/report.json")):
138
+ data = json.loads(report.read_text())
139
+ print(f"### {data.get('journey_id')} - {data['result']}")
140
+ print(f"- goal: `{data['goal_status']}`, execution: `{data.get('execution_status')}`")
141
+ for finding in data["findings"]:
142
+ print(f"- **{finding['severity']}** {finding['title']} ({finding['confirmation']})")
143
+ PY
144
+ # 3 is a runner/execution error: the tool failed, which is never advisory.
145
+ if [ "$code" = "3" ]; then exit 1; fi
146
+
147
+ - uses: actions/upload-artifact@v4
148
+ if: always()
149
+ with:
150
+ name: live-${{ github.run_id }}
151
+ path: artifacts/ci/live
152
+ retention-days: 14
153
+ if-no-files-found: ignore
@@ -0,0 +1,38 @@
1
+ .env
2
+ .env.*
3
+ !.env.example
4
+ .venv/
5
+ __pycache__/
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ .DS_Store
9
+
10
+ # Campaign evidence is bulky: browser screenshots, per-journey application copies and full run
11
+ # folders stay local. The receipts that gates actually read are small, so they are tracked, which
12
+ # is what lets another machine resume a checkpoint instead of re-spending the budget to reproduce it.
13
+ artifacts/*
14
+ !artifacts/feasibility/
15
+ artifacts/feasibility/*
16
+ !artifacts/feasibility/checkpoints/
17
+ !artifacts/feasibility/screening/
18
+ !artifacts/feasibility/overhead/
19
+ !artifacts/feasibility/reliability/
20
+ !artifacts/feasibility/budget.json
21
+ !artifacts/feasibility/cap-raise-0.10-to-0.40.json
22
+ !artifacts/feasibility/budget-before-cap-raise.json
23
+ !artifacts/feasibility/cp4-source-revalidation.json
24
+ !artifacts/feasibility/live/
25
+ artifacts/feasibility/live/*
26
+ !artifacts/feasibility/live/summary/
27
+ artifacts/visuals/
28
+
29
+ *.egg-info/
30
+
31
+ dist/
32
+ .tools/
33
+
34
+ # The npm shim's private Python environment and packed tarballs
35
+ npm/.venv/
36
+ npm/*.tgz
37
+ npm/LICENSE
38
+ npm/vendor/*.whl
@@ -0,0 +1,16 @@
1
+ # Jev Ultrafast
2
+
3
+ Read README.md before editing. Keep the loop small: page -> indexed elements -> operation + target -> execution.
4
+
5
+ - The input is one natural-language goal. Do not add site-specific plans or hardcoded field values.
6
+ - TypeSafe chooses an operation and operation-specific target heads in one request. Consume only the selected operation's target.
7
+ - Targets must map to observed elements and supported operations. Never let the model emit selectors or executable code.
8
+ - TYPE_TEXT invokes the text LLM. Cache a stale retry's value only while its entire helper input is identical.
9
+ - Never retry a browser mutation. Log execution before observing its result.
10
+ - Screenshots are optional; the model does not consume them. Keep demonstration footage at its original speed.
11
+ - Keep credentials server-side and .env ignored. Tests must not call paid APIs.
12
+ - Verify actual final outcomes independently. A DONE choice is not proof of success.
13
+ - Keep examples, README claims, raw evidence, and model-call counts consistent.
14
+ - Do not commit or push unless the user requests it.
15
+
16
+ Checks: uv run ruff check ., uv run pytest, node --check jev_ultrafast/static/app.js, node --check journey_evals/static/console.js, uv build.
@@ -0,0 +1,29 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Browser Use
4
+ Copyright (c) 2026 Pratyush Garg
5
+
6
+ This project began as a fork of browser-use/jev-ultrafast, which is MIT
7
+ licensed. The `jev_ultrafast` package is that upstream work, kept under its own
8
+ name; the `journey_evals` package and everything built around it are this
9
+ project's own contribution. Both are covered by the terms below, and the
10
+ upstream copyright notice is retained as that licence requires. See NOTICE for
11
+ the full provenance.
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
@@ -0,0 +1,37 @@
1
+ Journey Evals
2
+ Copyright (c) 2026 Pratyush Garg
3
+
4
+ This product includes software developed by Browser Use.
5
+
6
+ jev_ultrafast/
7
+ Copyright (c) 2026 Browser Use
8
+ https://github.com/browser-use/jev-ultrafast
9
+ Licensed under the MIT License.
10
+
11
+ The `jev_ultrafast` package is the browser agent this project was built around:
12
+ the actor loop, the CDP adapter, the model transport and the prompts. It was
13
+ imported from browser-use/jev-ultrafast at commit
14
+ 452c1ad2dd628008f1d5608f28158d76e49e6cc0 and is kept under its own name rather
15
+ than absorbed, so that its provenance stays visible in the source tree.
16
+
17
+ It has since been modified in this fork. The changes are limited and are
18
+ recorded in the Git history; the most substantial is that `jev_ultrafast/model.py`
19
+ now carries a provider's 4xx response body into the raised error, because that
20
+ body is often the only available diagnosis of a rejected request.
21
+
22
+ The `journey_evals` package -- the journey and agent evaluation runtime, the
23
+ reporting and evidence model, the budgeting, the consoles and the command line
24
+ interface -- is this project's own work.
25
+
26
+ Both are distributed under the MIT License. See LICENSE.
27
+
28
+ ---
29
+
30
+ Third-party runtime dependencies are installed from their own distributions and
31
+ are not vendored here. They carry their own licences:
32
+
33
+ browser-harness https://github.com/browser-use/browser-harness
34
+ httpx https://github.com/encode/httpx
35
+
36
+ The optional `langchain-demo` extra, used only by the example agents under
37
+ `examples/`, additionally installs langchain, langgraph and langchain-openai.