reeval-python 0.20.0__tar.gz → 0.22.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.
- {reeval_python-0.20.0 → reeval_python-0.22.0}/PKG-INFO +13 -1
- {reeval_python-0.20.0 → reeval_python-0.22.0}/README.md +12 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/pyproject.toml +1 -1
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/_wire.py +170 -26
- reeval_python-0.22.0/src/reeval_python/binaries.json +55 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/context.py +68 -17
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/declare.py +2 -2
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/expect.py +21 -2
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/options.py +3 -1
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/types.py +3 -2
- reeval_python-0.22.0/tests/context/exec-env.eval.py +11 -0
- reeval_python-0.22.0/tests/context/exec-env.sync.eval.py +11 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/stdio_host.py +7 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_api.py +1 -1
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_patterns.py +30 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_runner_attempts.py +24 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_runner_misuse.py +25 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/uv.lock +1 -1
- reeval_python-0.20.0/src/reeval_python/binaries.json +0 -55
- {reeval_python-0.20.0 → reeval_python-0.22.0}/.gitignore +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/CHANGELOG.md +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/LICENSE +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/package.json +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/__init__.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/__main__.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/aio.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/checks.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/cli.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/environment.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/errors.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/py.typed +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/runner.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/src/reeval_python/wire.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/abort.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/abort.sync.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/exec-retries.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/exec-retries.sync.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/exec.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/exec.sync.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/expect-fail.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/expect-fail.sync.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/expect.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/expect.sync.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/files.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/files.sync.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/judge.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/judge.sync.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/observe.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/observe.sync.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/record.async.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/record.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/send.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/send.sync.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/stay-within.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/sync-async.async.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/context/sync-async.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/best-of.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/cases.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/compare-questions.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/compare-variants.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/egress-cascade.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/environment-extend.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/environment-plugin-marketplace.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/environment-plugins.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/environment-traits.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/groups-skip-todo.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/observe.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/questions-attempts.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/questions-group.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/questions-state.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/revision.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/declare/tags.eval.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/runner_process.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_checks.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_cli.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_conformance_context.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_conformance_declare.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_load.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_python_wheels.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_runner_checks.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_runner_isolation.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_runner_json.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_runner_sdk.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_runner_stdio.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_source.py +0 -0
- {reeval_python-0.20.0 → reeval_python-0.22.0}/tests/test_types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: reeval-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.22.0
|
|
4
4
|
Summary: Python authoring SDK for reeval (*.eval.py eval files)
|
|
5
5
|
Project-URL: Homepage, https://reeval.ai
|
|
6
6
|
Project-URL: Repository, https://github.com/invertase/reeval
|
|
@@ -135,6 +135,14 @@ import re
|
|
|
135
135
|
expect(c.turns[0]).to_have_run(re.compile(r"^(npm|pnpm) t(est)?$"))
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
+
`to_have_run(program=…, args=…)` matches the program a shell call ran instead of the whole command
|
|
139
|
+
line, after env assignments, `timeout`, `sudo` and package runners such as `npx`, so
|
|
140
|
+
`cat genkit.config.ts` doesn't count as running `genkit`:
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
expect(c).to_have_run(program="genkit", args=re.compile(r"^flow:run\b"))
|
|
144
|
+
```
|
|
145
|
+
|
|
138
146
|
Use snake_case on the context (`read_file`, `write_file`, `file`) and on matchers (`to_succeed`,
|
|
139
147
|
`to_pass`, `to_equal`, `to_contain`, …). Matcher failures raise `ReevalAssertionError`.
|
|
140
148
|
|
|
@@ -185,6 +193,10 @@ the last try. Use it for a check that can fail on a transient, such as a test th
|
|
|
185
193
|
`expect(c.exec("pytest -q tests/hidden", retries=2)).to_succeed()`. Any non-zero exit retries,
|
|
186
194
|
and the record and output say `passed on try 2 of 3`.
|
|
187
195
|
|
|
196
|
+
`c.exec(cmd, env={"EXPECTED": "42"})` sets variables for that command only, over the
|
|
197
|
+
environment's, in the background and in `expect.poll` too. A value named like a secret
|
|
198
|
+
(`*_TOKEN`, `*_KEY`, …) is masked in everything reeval writes.
|
|
199
|
+
|
|
188
200
|
`expect.poll` retries a matcher until it passes, every `interval` until `timeout` (one second by
|
|
189
201
|
default). Hand it a function that returns one `c.read_file(…)` or `c.exec(…)`, and reeval reads or
|
|
190
202
|
runs it again on each try; it works the same in both kinds of body. Check the output with the
|
|
@@ -111,6 +111,14 @@ import re
|
|
|
111
111
|
expect(c.turns[0]).to_have_run(re.compile(r"^(npm|pnpm) t(est)?$"))
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
+
`to_have_run(program=…, args=…)` matches the program a shell call ran instead of the whole command
|
|
115
|
+
line, after env assignments, `timeout`, `sudo` and package runners such as `npx`, so
|
|
116
|
+
`cat genkit.config.ts` doesn't count as running `genkit`:
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
expect(c).to_have_run(program="genkit", args=re.compile(r"^flow:run\b"))
|
|
120
|
+
```
|
|
121
|
+
|
|
114
122
|
Use snake_case on the context (`read_file`, `write_file`, `file`) and on matchers (`to_succeed`,
|
|
115
123
|
`to_pass`, `to_equal`, `to_contain`, …). Matcher failures raise `ReevalAssertionError`.
|
|
116
124
|
|
|
@@ -161,6 +169,10 @@ the last try. Use it for a check that can fail on a transient, such as a test th
|
|
|
161
169
|
`expect(c.exec("pytest -q tests/hidden", retries=2)).to_succeed()`. Any non-zero exit retries,
|
|
162
170
|
and the record and output say `passed on try 2 of 3`.
|
|
163
171
|
|
|
172
|
+
`c.exec(cmd, env={"EXPECTED": "42"})` sets variables for that command only, over the
|
|
173
|
+
environment's, in the background and in `expect.poll` too. A value named like a secret
|
|
174
|
+
(`*_TOKEN`, `*_KEY`, …) is masked in everything reeval writes.
|
|
175
|
+
|
|
164
176
|
`expect.poll` retries a matcher until it passes, every `interval` until `timeout` (one second by
|
|
165
177
|
default). Hand it a function that returns one `c.read_file(…)` or `c.exec(…)`, and reeval reads or
|
|
166
178
|
runs it again on each try; it works the same in both kinds of body. Check the output with the
|
|
@@ -91,14 +91,15 @@ class AttemptCallSend(TypedDict):
|
|
|
91
91
|
prompt: str
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
# `c.exec(command, { background?, retries?, interval? })`: a command in the sandbox.
|
|
95
|
-
# with its exit code and output (the last try, with `retries`), or with a handle when it
|
|
96
|
-
# the background.
|
|
94
|
+
# `c.exec(command, { background?, env?, retries?, interval? })`: a command in the sandbox.
|
|
95
|
+
# Replies with its exit code and output (the last try, with `retries`), or with a handle when it
|
|
96
|
+
# runs in the background.
|
|
97
97
|
class AttemptCallExec(TypedDict):
|
|
98
98
|
# Leave it running and reply with its handle, not its output.
|
|
99
99
|
background: NotRequired[bool]
|
|
100
100
|
# A shell command, run in the workspace.
|
|
101
101
|
command: str
|
|
102
|
+
env: NotRequired[ExecEnv]
|
|
102
103
|
# Milliseconds to wait before each extra try. Default 1000.
|
|
103
104
|
interval: NotRequired[float]
|
|
104
105
|
op: Literal["exec"]
|
|
@@ -429,14 +430,24 @@ BoatSandboxDescriptorApiKey = TypedDict(
|
|
|
429
430
|
class BoatSandboxDescriptor(TypedDict):
|
|
430
431
|
# The host variable with the Boat API key, read on the host only.
|
|
431
432
|
apiKey: BoatSandboxDescriptorApiKey
|
|
433
|
+
# The attempts one machine runs at once, each as a user of its own with its own home (which
|
|
434
|
+
# each sees at `/home/reeval`), workspace and egress gateway. The harness installs once per
|
|
435
|
+
# machine, and every other slot's home gets its own copy of the install. Default 1. A
|
|
436
|
+
# harness whose bridge takes a fixed port in the machine (Claude Code, OpenCode, Goose, fx,
|
|
437
|
+
# Grok Build) runs one per machine.
|
|
438
|
+
attemptsPerMachine: NotRequired[int]
|
|
432
439
|
# Cell id; defaults to `boat`, or `boat:<type>` with a `type`.
|
|
433
440
|
id: NotRequired[str]
|
|
434
441
|
kind: Literal["boat"]
|
|
435
|
-
# The most Boat
|
|
442
|
+
# The most attempts on Boat at once, across the run: machines times `attemptsPerMachine`.
|
|
436
443
|
maxConcurrent: NotRequired[float]
|
|
437
444
|
# The start of every sandbox name reeval gives Boat, so a run's cleanup finds only its own:
|
|
438
445
|
# lowercase letters, digits and dashes.
|
|
439
446
|
prefix: str
|
|
447
|
+
# A machine takes another of the run's attempts once one ends, instead of being deleted: its
|
|
448
|
+
# user's processes, cron jobs and files are removed and its home put back as it was after
|
|
449
|
+
# the harness installed, which isn't installed again. Default false, one attempt per slot.
|
|
450
|
+
reuse: NotRequired[bool]
|
|
440
451
|
# The machine size. Default `small`.
|
|
441
452
|
type: NotRequired[Literal["small", "default", "large", "xlarge"]]
|
|
442
453
|
|
|
@@ -766,6 +777,10 @@ DockerSandboxDescriptor = TypedDict(
|
|
|
766
777
|
Duration: TypeAlias = "float | str"
|
|
767
778
|
|
|
768
779
|
|
|
780
|
+
# One policy for the whole attempt, or one per phase.
|
|
781
|
+
Egress: TypeAlias = "EgressPolicy | PhasedEgress"
|
|
782
|
+
|
|
783
|
+
|
|
769
784
|
class EgressPolicyAllow(TypedDict):
|
|
770
785
|
allow: list[str]
|
|
771
786
|
|
|
@@ -805,8 +820,9 @@ class EnvironmentLayer(TypedDict):
|
|
|
805
820
|
|
|
806
821
|
# What an eval runs in: the declarative, phased spec of one environment.
|
|
807
822
|
class EnvironmentSpec(TypedDict):
|
|
808
|
-
# Replaces the inherited policy
|
|
809
|
-
|
|
823
|
+
# Replaces the inherited policy, per phase: a plain policy sets both, `{ setup, agent }` the
|
|
824
|
+
# phases it names. An `extend` child's replaces its parent's the same way.
|
|
825
|
+
egress: NotRequired[Egress]
|
|
810
826
|
# Variables and secrets for the sandbox, merged by name over the parent's.
|
|
811
827
|
env: NotRequired[EnvVars]
|
|
812
828
|
# Workspace-relative, or `~/` for home.
|
|
@@ -879,9 +895,9 @@ class EvalOptionsDataCompare(TypedDict):
|
|
|
879
895
|
capture: NotRequired[CaptureOptions]
|
|
880
896
|
# Environments to run side by side; `control` is what each variant is measured against.
|
|
881
897
|
compare: EvalOptionsDataCompareCompare
|
|
882
|
-
# Where the sandbox may connect. Replaces the inherited policy: config, profile
|
|
883
|
-
# the environment, then groups and the eval.
|
|
884
|
-
egress: NotRequired[Literal["allow-all", "deny-all", "proxy"] | EvalOptionsDataCompareEgressAllow]
|
|
898
|
+
# Where the sandbox may connect. Replaces the inherited policy, per phase: config, profile
|
|
899
|
+
# defaults, the environment, then groups and the eval.
|
|
900
|
+
egress: NotRequired[PhasedEgress | Literal["allow-all", "deny-all", "proxy"] | EvalOptionsDataCompareEgressAllow]
|
|
885
901
|
# Variables and secrets for the sandbox, merged by name down the cascade.
|
|
886
902
|
env: NotRequired[EnvVars]
|
|
887
903
|
# How each cell's attempts decide its outcome; default `'all'`.
|
|
@@ -952,9 +968,9 @@ class EvalOptionsData2(TypedDict):
|
|
|
952
968
|
# Screenshot defaults for `c.capture()`. Shallow-merged; `viewport` and `model` replace the
|
|
953
969
|
# value.
|
|
954
970
|
capture: NotRequired[CaptureOptions]
|
|
955
|
-
# Where the sandbox may connect. Replaces the inherited policy: config, profile
|
|
956
|
-
# the environment, then groups and the eval.
|
|
957
|
-
egress: NotRequired[Literal["allow-all", "deny-all", "proxy"] | EvalOptionsData2EgressAllow]
|
|
971
|
+
# Where the sandbox may connect. Replaces the inherited policy, per phase: config, profile
|
|
972
|
+
# defaults, the environment, then groups and the eval.
|
|
973
|
+
egress: NotRequired[PhasedEgress | Literal["allow-all", "deny-all", "proxy"] | EvalOptionsData2EgressAllow]
|
|
958
974
|
# Variables and secrets for the sandbox, merged by name down the cascade.
|
|
959
975
|
env: NotRequired[EnvVars]
|
|
960
976
|
# What this group or eval runs in: one environment, or a list, each its own cell beside each
|
|
@@ -1002,6 +1018,13 @@ class EvalOptionsData2(TypedDict):
|
|
|
1002
1018
|
EvalOptionsData: TypeAlias = "EvalOptionsDataCompare | EvalOptionsData2"
|
|
1003
1019
|
|
|
1004
1020
|
|
|
1021
|
+
# Variables `c.exec` sets for one command, over the environment's own. A value whose name looks
|
|
1022
|
+
# like a secret's (`KEY`, `TOKEN`, `SECRET`, `PASSWORD`, `CREDENTIAL`) is masked in everything
|
|
1023
|
+
# reeval writes, as a host variable's is. The host value of a secret the environment brokers
|
|
1024
|
+
# goes in as its placeholder, which the gateway swaps back on that secret's hosts.
|
|
1025
|
+
ExecEnv: TypeAlias = "dict[str, str]"
|
|
1026
|
+
|
|
1027
|
+
|
|
1005
1028
|
class ExecResult(TypedDict):
|
|
1006
1029
|
exitCode: int
|
|
1007
1030
|
stderr: str
|
|
@@ -1009,6 +1032,7 @@ class ExecResult(TypedDict):
|
|
|
1009
1032
|
|
|
1010
1033
|
|
|
1011
1034
|
class FakeHarnessDescriptorToolsItem(TypedDict):
|
|
1035
|
+
durationMs: NotRequired[float | None]
|
|
1012
1036
|
input: Any
|
|
1013
1037
|
ok: NotRequired[bool | None]
|
|
1014
1038
|
output: Any
|
|
@@ -1032,12 +1056,23 @@ class FakeHarnessDescriptorWithSkill(TypedDict):
|
|
|
1032
1056
|
|
|
1033
1057
|
# A canned agent for tests and dry runs, made by `fakeHarness()` in `reeval/harness`.
|
|
1034
1058
|
class FakeHarnessDescriptor(TypedDict):
|
|
1059
|
+
# A shell command the fake agent runs as its session starts, once per sandbox, as a real
|
|
1060
|
+
# adapter's bootstrap installs its CLI: `tart()` bakes it into the image it clones, as it
|
|
1061
|
+
# does a real harness's, so an attempt there finds it done.
|
|
1062
|
+
bootstrap: NotRequired[str]
|
|
1035
1063
|
# In Docker, broker the key of the agent `layout` names (`OPENAI_API_KEY` for `codex`,
|
|
1036
|
-
# Cursor's when unset) on that agent's endpoints, as its adapter does
|
|
1037
|
-
#
|
|
1038
|
-
#
|
|
1039
|
-
#
|
|
1064
|
+
# Cursor's when unset) on that agent's endpoints, as its adapter does; OpenCode, Goose and
|
|
1065
|
+
# pi take their model's provider's key, so with their layouts it's `FAKE_AGENT_API_KEY`, on
|
|
1066
|
+
# no endpoint. The key stays on the host, and `exec` steps get a placeholder in its
|
|
1067
|
+
# variable, which the egress gateway swaps in on those endpoints when sent as
|
|
1068
|
+
# `Authorization: Bearer <placeholder>`, and refuses on any other request. For an agent
|
|
1069
|
+
# whose bridge is a server in the sandbox (Claude Code, OpenCode, Goose, fx, Grok Build), it
|
|
1070
|
+
# also serves on the session's first exposed port and reaches it from the host, as that
|
|
1071
|
+
# adapter's start does.
|
|
1040
1072
|
brokers: NotRequired[Literal[True]]
|
|
1073
|
+
# US dollars the fake agent says every turn cost, as a harness that reports its cost does; 0
|
|
1074
|
+
# reports none.
|
|
1075
|
+
costUsd: NotRequired[float]
|
|
1041
1076
|
# Simulated turn length, honors the abort signal.
|
|
1042
1077
|
delayMs: NotRequired[float]
|
|
1043
1078
|
# Requested reasoning effort, recorded as `effort` on the cell. Use `servedModel` for what
|
|
@@ -1084,7 +1119,8 @@ class FakeHarnessDescriptor(TypedDict):
|
|
|
1084
1119
|
# The fake agent's final message on every turn; default `Done.`.
|
|
1085
1120
|
text: NotRequired[str]
|
|
1086
1121
|
# Tool calls the fake agent reports on every turn, before writing files. `ok` defaults to
|
|
1087
|
-
# true; null reports a call whose result never came.
|
|
1122
|
+
# true; null reports a call whose result never came. `durationMs` defaults to 0; null
|
|
1123
|
+
# reports a call whose end the harness never said.
|
|
1088
1124
|
tools: NotRequired[list[FakeHarnessDescriptorToolsItem]]
|
|
1089
1125
|
# Each turn's recorded agent time, exactly, whatever the wall clock says: a test can compare
|
|
1090
1126
|
# agent time without scheduling jitter, which four runs a side can tell apart.
|
|
@@ -1149,7 +1185,8 @@ class FakeScriptStepRefuseKey(TypedDict):
|
|
|
1149
1185
|
# the command's stdout, `write` as file edits, and `reply` is the turn's final message. `mcp`
|
|
1150
1186
|
# (`'<server>/<tool>'`) starts the environment's stdio MCP server in the sandbox, as an agent
|
|
1151
1187
|
# would, and calls the tool with no arguments; it's reported as `mcp__<server>__<tool>`. `error`
|
|
1152
|
-
# ends the turn there with status `error` and that message, as a provider error would
|
|
1188
|
+
# ends the turn there with status `error` and that message, as a provider error would; one
|
|
1189
|
+
# worded as a provider's credit, quota or rate limit makes the attempt an infra error.
|
|
1153
1190
|
# `refuseKey` ends it as the model API rejecting the key in that variable would, which makes the
|
|
1154
1191
|
# attempt an infra error.
|
|
1155
1192
|
FakeScriptStep: TypeAlias = "FakeScriptStepExec | FakeScriptStepWrite | FakeScriptStepReply | FakeScriptStepMcp | FakeScriptStepError | FakeScriptStepRefuseKey"
|
|
@@ -1212,8 +1249,9 @@ class GitWorkspace(TypedDict):
|
|
|
1212
1249
|
url: str
|
|
1213
1250
|
|
|
1214
1251
|
|
|
1215
|
-
# Goose through `@reeval/harness-goose` (`goose acp`), made by `goose()`. It runs
|
|
1216
|
-
#
|
|
1252
|
+
# Goose through `@reeval/harness-goose` (`goose acp`), made by `goose()`. It runs a model on its
|
|
1253
|
+
# provider's key, and reads each turn's usage from Goose's `usage_ledger` (its ACP server counts
|
|
1254
|
+
# one call).
|
|
1217
1255
|
class GooseHarnessDescriptor(TypedDict):
|
|
1218
1256
|
# Reasoning effort as `GOOSE_THINKING_EFFORT`, e.g. `off`, `low`, `medium`, `high` or `max`.
|
|
1219
1257
|
effort: NotRequired[str]
|
|
@@ -1227,7 +1265,8 @@ class GooseHarnessDescriptor(TypedDict):
|
|
|
1227
1265
|
kind: Literal["goose"]
|
|
1228
1266
|
# The most Goose attempts at once, across the run, e.g. for the key's rate limits.
|
|
1229
1267
|
maxConcurrent: NotRequired[float]
|
|
1230
|
-
#
|
|
1268
|
+
# `<provider>/<model>`: Goose's `google`, `anthropic`, `openai` or `xai` provider on its own
|
|
1269
|
+
# key, or the gateway's id on `vercel()` and `openrouter()`, e.g. `google/gemini-3.8-flash`.
|
|
1231
1270
|
model: str
|
|
1232
1271
|
# How long the harness's session may take to become ready (its bootstrap and first session)
|
|
1233
1272
|
# before the attempt is an infra error, after one retry; default 90s.
|
|
@@ -1410,6 +1449,7 @@ class MatcherSubjectValue(TypedDict):
|
|
|
1410
1449
|
|
|
1411
1450
|
|
|
1412
1451
|
class MatcherSubjectExec(TypedDict):
|
|
1452
|
+
env: NotRequired[ExecEnv]
|
|
1413
1453
|
# A command reeval runs, for its `ExecResult`; again on each try when polled.
|
|
1414
1454
|
exec: str
|
|
1415
1455
|
# The command's `ExecResult` when the runner already ran it: reeval checks that instead of
|
|
@@ -1498,9 +1538,17 @@ class Pattern(TypedDict):
|
|
|
1498
1538
|
regexp: str
|
|
1499
1539
|
|
|
1500
1540
|
|
|
1501
|
-
#
|
|
1502
|
-
#
|
|
1503
|
-
#
|
|
1541
|
+
# An egress policy per phase of the attempt: `setup` covers its files and setup steps, `agent`
|
|
1542
|
+
# the harness's start, every turn and every check after them. A phase it leaves unset keeps the
|
|
1543
|
+
# policy it inherits.
|
|
1544
|
+
class PhasedEgress(TypedDict):
|
|
1545
|
+
agent: NotRequired[EgressPolicy]
|
|
1546
|
+
setup: NotRequired[EgressPolicy]
|
|
1547
|
+
|
|
1548
|
+
|
|
1549
|
+
# pi through `@reeval/harness-pi` (`pi --mode json` in the sandbox), made by `pi()`. It runs a
|
|
1550
|
+
# model on its provider's key and reports each model call's tokens. It takes stdio and HTTP MCP
|
|
1551
|
+
# servers, not SSE ones.
|
|
1504
1552
|
class PiHarnessDescriptor(TypedDict):
|
|
1505
1553
|
# Reasoning effort, passed as pi's `--thinking` (the CLI's name). Values are whatever that
|
|
1506
1554
|
# flag takes, e.g. `off`, `minimal`, `low`, `medium`, `high`, `xhigh` or `max`.
|
|
@@ -1514,7 +1562,9 @@ class PiHarnessDescriptor(TypedDict):
|
|
|
1514
1562
|
kind: Literal["pi"]
|
|
1515
1563
|
# The most pi attempts at once, across the run, e.g. for the key's rate limits.
|
|
1516
1564
|
maxConcurrent: NotRequired[float]
|
|
1517
|
-
#
|
|
1565
|
+
# `<provider>/<model>`: one of pi's providers whose key it sends in a header on a fixed
|
|
1566
|
+
# host, or the gateway's id on `vercel()` and `openrouter()`, e.g.
|
|
1567
|
+
# `google/gemini-3.8-flash`.
|
|
1518
1568
|
model: str
|
|
1519
1569
|
# How long the harness's session may take to become ready (its bootstrap and first session)
|
|
1520
1570
|
# before the attempt is an infra error, after one retry; default 90s.
|
|
@@ -1807,6 +1857,32 @@ class SnapshotOptions(TypedDict):
|
|
|
1807
1857
|
SubstituteIn: TypeAlias = "Literal[\"header\", \"query\", \"body\"]"
|
|
1808
1858
|
|
|
1809
1859
|
|
|
1860
|
+
class TartHostHost(TypedDict):
|
|
1861
|
+
# The host name, address or `~/.ssh/config` alias.
|
|
1862
|
+
host: str
|
|
1863
|
+
# The private key `ssh -i` takes: absolute, or `~/…`; the agent's or the config's when
|
|
1864
|
+
# unset.
|
|
1865
|
+
identityFile: NotRequired[str]
|
|
1866
|
+
# The SSH port; `ssh`'s own (the config's, or 22) when unset.
|
|
1867
|
+
port: NotRequired[float]
|
|
1868
|
+
# The login user; `ssh`'s own (the config's, or this machine's user) when unset.
|
|
1869
|
+
user: NotRequired[str]
|
|
1870
|
+
# The most of reeval's macOS VMs it runs at once: 1 or 2, and 2 when unset.
|
|
1871
|
+
vms: NotRequired[float]
|
|
1872
|
+
|
|
1873
|
+
|
|
1874
|
+
# A Mac that runs `tart()`'s VMs over SSH: an SSH destination, or its parts.
|
|
1875
|
+
TartHost: TypeAlias = "TartHostHost | str"
|
|
1876
|
+
|
|
1877
|
+
|
|
1878
|
+
class TartSandboxDescriptorHostsItemHost(TypedDict):
|
|
1879
|
+
host: str
|
|
1880
|
+
identityFile: NotRequired[str]
|
|
1881
|
+
port: NotRequired[int]
|
|
1882
|
+
user: NotRequired[str]
|
|
1883
|
+
vms: NotRequired[int]
|
|
1884
|
+
|
|
1885
|
+
|
|
1810
1886
|
# Reach the VM over SSH when its Tart Guest Agent doesn't answer `tart exec`: as `user` (`admin`
|
|
1811
1887
|
# when unset), with `key`, a private key the image trusts, absolute or relative to the file it's
|
|
1812
1888
|
# written in.
|
|
@@ -1819,6 +1895,13 @@ class TartSandboxDescriptorSsh(TypedDict):
|
|
|
1819
1895
|
class TartSandboxDescriptor(TypedDict):
|
|
1820
1896
|
# CPUs each clone gets; the image's when unset.
|
|
1821
1897
|
cpus: NotRequired[int]
|
|
1898
|
+
# Macs that run the VMs instead of this machine, each one plain `ssh` reaches without a
|
|
1899
|
+
# prompt (an `~/.ssh/config` alias, the agent or a key file; no passwords): `'mac-studio'`,
|
|
1900
|
+
# `'elliot@mac-mini.local'`, `'ssh://ci@10.0.0.5:2222'` or `{ host, user?, port?,
|
|
1901
|
+
# identityFile?, vms? }`. reeval runs `tart` on each over SSH and keeps the egress gateway,
|
|
1902
|
+
# and every key, here. Each host needs the image; preflight bakes the harness onto it there.
|
|
1903
|
+
# This machine when unset.
|
|
1904
|
+
hosts: NotRequired[list[str | TartSandboxDescriptorHostsItemHost]]
|
|
1822
1905
|
# Cell id; defaults to `tart:<image>`, the image's last path segment.
|
|
1823
1906
|
id: NotRequired[str]
|
|
1824
1907
|
# The VM each attempt clones: an OCI image such as
|
|
@@ -1860,6 +1943,9 @@ class TranscriptEventFileEdit(TypedDict):
|
|
|
1860
1943
|
# Line counts, or null when the harness didn't send the content (e.g. deletes).
|
|
1861
1944
|
added: float | None
|
|
1862
1945
|
atMs: float
|
|
1946
|
+
# Set when the harness never reported the call's end, so `durationMs` runs to the next
|
|
1947
|
+
# event's `atMs` (the turn's end for the last).
|
|
1948
|
+
durationInferred: NotRequired[Literal[True]]
|
|
1863
1949
|
durationMs: float | None
|
|
1864
1950
|
# `write` is a whole-file write whose result doesn't say whether the file existed before
|
|
1865
1951
|
# (Antigravity's, fx's, Goose's, Grok Build's and pi's write tools, for example).
|
|
@@ -1878,6 +1964,9 @@ class TranscriptEventFileEdit(TypedDict):
|
|
|
1878
1964
|
|
|
1879
1965
|
class TranscriptEventWebSearch(TypedDict):
|
|
1880
1966
|
atMs: float
|
|
1967
|
+
# Set when the harness never reported the call's end, so `durationMs` runs to the next
|
|
1968
|
+
# event's `atMs` (the turn's end for the last).
|
|
1969
|
+
durationInferred: NotRequired[Literal[True]]
|
|
1881
1970
|
durationMs: float | None
|
|
1882
1971
|
# Whether the search succeeded. Absent means it did; null means the harness never reported
|
|
1883
1972
|
# its result.
|
|
@@ -1897,6 +1986,9 @@ class TranscriptEventWebSearch(TypedDict):
|
|
|
1897
1986
|
|
|
1898
1987
|
class TranscriptEventWebFetch(TypedDict):
|
|
1899
1988
|
atMs: float
|
|
1989
|
+
# Set when the harness never reported the call's end, so `durationMs` runs to the next
|
|
1990
|
+
# event's `atMs` (the turn's end for the last).
|
|
1991
|
+
durationInferred: NotRequired[Literal[True]]
|
|
1900
1992
|
durationMs: float | None
|
|
1901
1993
|
# Whether the fetch succeeded; null when the harness never reported its result.
|
|
1902
1994
|
ok: bool | None
|
|
@@ -1911,13 +2003,33 @@ class TranscriptEventWebFetch(TypedDict):
|
|
|
1911
2003
|
url: str
|
|
1912
2004
|
|
|
1913
2005
|
|
|
2006
|
+
# Set when `output` is only part of the output, with a line where the rest was cut:
|
|
2007
|
+
# `transcript.jsonl` keeps the first 96K and last 16K characters of one past 128K (of its JSON,
|
|
2008
|
+
# for structured output), and the harness adapter keeps the first and last 512 KiB of a saved
|
|
2009
|
+
# output past 1 MiB. `bytes` is the whole output's size in UTF-8.
|
|
2010
|
+
class TranscriptEventToolOutputTruncated(TypedDict):
|
|
2011
|
+
bytes: float
|
|
2012
|
+
|
|
2013
|
+
|
|
1914
2014
|
class TranscriptEventTool(TypedDict):
|
|
1915
2015
|
atMs: float
|
|
2016
|
+
# Set when the harness never reported the call's end, so `durationMs` runs to the next
|
|
2017
|
+
# event's `atMs` (the turn's end for the last).
|
|
2018
|
+
durationInferred: NotRequired[Literal[True]]
|
|
1916
2019
|
durationMs: float | None
|
|
1917
2020
|
input: Any
|
|
1918
2021
|
# Whether the call succeeded; null when the harness never reported its result.
|
|
1919
2022
|
ok: bool | None
|
|
1920
2023
|
output: Any
|
|
2024
|
+
# Set when `output` is only part of the output, with a line where the rest was cut:
|
|
2025
|
+
# `transcript.jsonl` keeps the first 96K and last 16K characters of one past 128K (of its
|
|
2026
|
+
# JSON, for structured output), and the harness adapter keeps the first and last 512 KiB of
|
|
2027
|
+
# a saved output past 1 MiB. `bytes` is the whole output's size in UTF-8.
|
|
2028
|
+
outputTruncated: NotRequired[TranscriptEventToolOutputTruncated]
|
|
2029
|
+
# What `output` holds: `model`, the result as the harness gave it to the model; `full`, the
|
|
2030
|
+
# tool's whole output, which can be more than the model saw (the harness cut it for the
|
|
2031
|
+
# model, or saved it to a file and gave the model a pointer, which reeval read).
|
|
2032
|
+
outputView: NotRequired[Literal["model", "full"]]
|
|
1921
2033
|
# True when a shell-like tool or edit ran at least two minutes.
|
|
1922
2034
|
stalled: NotRequired[bool]
|
|
1923
2035
|
# The `toolCallId` of the subagent call whose agent made this call; absent for the agent's
|
|
@@ -1943,12 +2055,38 @@ class TranscriptEventRetry(TypedDict):
|
|
|
1943
2055
|
type: Literal["retry"]
|
|
1944
2056
|
|
|
1945
2057
|
|
|
2058
|
+
class TranscriptEventModelCall(TypedDict):
|
|
2059
|
+
atMs: float
|
|
2060
|
+
durationMs: float
|
|
2061
|
+
# Milliseconds from the call's start to its response body's first byte; null when none came.
|
|
2062
|
+
firstByteMs: float | None
|
|
2063
|
+
# The model that served it, from its request or response; null when neither named one.
|
|
2064
|
+
model: str | None
|
|
2065
|
+
# `POST api.anthropic.com/v1/messages`: the method, host and path.
|
|
2066
|
+
request: str
|
|
2067
|
+
# `main` for one of the agent's own steps, `side` for a call its CLI made around them: a
|
|
2068
|
+
# session title, a web search's own model call, Antigravity's Flash Lite calls. A call is
|
|
2069
|
+
# `main` when its tokens are one of the turn's steps' as the harness reported them.
|
|
2070
|
+
# Otherwise it's `side` when its request declared at most one tool while another call in the
|
|
2071
|
+
# attempt declared more, or when another model served it than served the turn's other calls,
|
|
2072
|
+
# and `main` when neither holds. Absent in records from before roles.
|
|
2073
|
+
role: NotRequired[Literal["main", "side"]]
|
|
2074
|
+
# The response's HTTP status; null when none came.
|
|
2075
|
+
status: float | None
|
|
2076
|
+
# Set on a call that carries the whole turn (Cursor's), so it isn't counted as model time.
|
|
2077
|
+
stream: NotRequired[Literal[True]]
|
|
2078
|
+
ts: str
|
|
2079
|
+
type: Literal["model-call"]
|
|
2080
|
+
# The tokens its response body named; null when it named none (Cursor's are protobuf).
|
|
2081
|
+
usage: TokenUsage | None
|
|
2082
|
+
|
|
2083
|
+
|
|
1946
2084
|
# Normalized agent events. Each tool call is one event, merged with its result; `durationMs` is
|
|
1947
2085
|
# wall time until the result arrived (Cursor's own `completed_at_ms` can be earlier). Null when
|
|
1948
2086
|
# the harness never reported the end. Long shell or edit calls set `stalled: true`. A call the
|
|
1949
2087
|
# harness never reported a result for (the turn ended or was cut short first) has `ok: null`: it
|
|
1950
2088
|
# isn't known to have failed, and no failure count includes it.
|
|
1951
|
-
TranscriptEvent: TypeAlias = "TranscriptEvent1 | TranscriptEventFileEdit | TranscriptEventWebSearch | TranscriptEventWebFetch | TranscriptEventTool | TranscriptEventError | TranscriptEventRetry"
|
|
2089
|
+
TranscriptEvent: TypeAlias = "TranscriptEvent1 | TranscriptEventFileEdit | TranscriptEventWebSearch | TranscriptEventWebFetch | TranscriptEventTool | TranscriptEventError | TranscriptEventRetry | TranscriptEventModelCall"
|
|
1952
2090
|
|
|
1953
2091
|
|
|
1954
2092
|
# A turn as data, as a record or another language's runner carries it: `Turn` without its
|
|
@@ -2035,23 +2173,29 @@ CAMEL_KEYS: frozenset[str] = frozenset(
|
|
|
2035
2173
|
{
|
|
2036
2174
|
"apiKey",
|
|
2037
2175
|
"atMs",
|
|
2176
|
+
"attemptsPerMachine",
|
|
2038
2177
|
"bestOf",
|
|
2039
2178
|
"cacheRead",
|
|
2040
2179
|
"cacheWrite",
|
|
2041
2180
|
"caseJson",
|
|
2042
2181
|
"costUsd",
|
|
2043
2182
|
"delayMs",
|
|
2183
|
+
"durationInferred",
|
|
2044
2184
|
"durationMs",
|
|
2045
2185
|
"exitCode",
|
|
2046
2186
|
"failWith",
|
|
2047
2187
|
"failedRequests",
|
|
2048
2188
|
"finalUrl",
|
|
2189
|
+
"firstByteMs",
|
|
2049
2190
|
"flakeRate",
|
|
2191
|
+
"identityFile",
|
|
2050
2192
|
"ignoreAbort",
|
|
2051
2193
|
"matchedBy",
|
|
2052
2194
|
"maxConcurrent",
|
|
2053
2195
|
"mediaType",
|
|
2054
2196
|
"minLift",
|
|
2197
|
+
"outputTruncated",
|
|
2198
|
+
"outputView",
|
|
2055
2199
|
"passRate",
|
|
2056
2200
|
"providerOptions",
|
|
2057
2201
|
"readFile",
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.22.0",
|
|
3
|
+
"binaries": {
|
|
4
|
+
"linux-x64": {
|
|
5
|
+
"name": "reeval-0.22.0-linux-x64",
|
|
6
|
+
"sha256": "ab1bf102e34a20eeab7a478fae6eeff5f856a48a87ceb0ea01d7771395db2cf2",
|
|
7
|
+
"size": 88720864
|
|
8
|
+
},
|
|
9
|
+
"linux-arm64": {
|
|
10
|
+
"name": "reeval-0.22.0-linux-arm64",
|
|
11
|
+
"sha256": "95adb99a1bed10abf6ebb48810aa1306121225a0f283470c9e53049a3f385ddd",
|
|
12
|
+
"size": 88721704
|
|
13
|
+
},
|
|
14
|
+
"linux-x64-musl": {
|
|
15
|
+
"name": "reeval-0.22.0-linux-x64-musl",
|
|
16
|
+
"sha256": "d8a062765dd0f4551b36c1fdd7d8f93c4edbd49f76a1027be546e59811bc7d28",
|
|
17
|
+
"size": 82691632
|
|
18
|
+
},
|
|
19
|
+
"linux-arm64-musl": {
|
|
20
|
+
"name": "reeval-0.22.0-linux-arm64-musl",
|
|
21
|
+
"sha256": "9663ccea1de09dd0e0d010158b5ff79e6e452e4f7dced0c5d56d1a44b1b222d3",
|
|
22
|
+
"size": 81857744
|
|
23
|
+
},
|
|
24
|
+
"darwin-x64": {
|
|
25
|
+
"name": "reeval-0.22.0-darwin-x64",
|
|
26
|
+
"sha256": "fe3fca95a7876674e3f853870e5f68c182ea9bb2a8a6206f58d28ff68c383361",
|
|
27
|
+
"size": 76738832
|
|
28
|
+
},
|
|
29
|
+
"darwin-arm64": {
|
|
30
|
+
"name": "reeval-0.22.0-darwin-arm64",
|
|
31
|
+
"sha256": "476629a99eb60d3f3852cb0de7a6e5023282e47bcf6f14e882174c35f119ae15",
|
|
32
|
+
"size": 69690354
|
|
33
|
+
},
|
|
34
|
+
"windows-x64": {
|
|
35
|
+
"name": "reeval-0.22.0-windows-x64.exe",
|
|
36
|
+
"sha256": "349b31f6966206ad780c8294fd6c8475d65c08215aef6a38833955cf6f232d03",
|
|
37
|
+
"size": 93495296
|
|
38
|
+
},
|
|
39
|
+
"linux-x64-baseline": {
|
|
40
|
+
"name": "reeval-0.22.0-linux-x64-baseline",
|
|
41
|
+
"sha256": "c7d0b693639103a647b0b2d349f9bbe9e61723805a65d2e7a34923d0e2b65bd7",
|
|
42
|
+
"size": 88720864
|
|
43
|
+
},
|
|
44
|
+
"linux-x64-musl-baseline": {
|
|
45
|
+
"name": "reeval-0.22.0-linux-x64-musl-baseline",
|
|
46
|
+
"sha256": "05cdd1aa36d826ba2884b551b800ffd454452ab40c4c3394f240f6e82ba06da6",
|
|
47
|
+
"size": 82691632
|
|
48
|
+
},
|
|
49
|
+
"windows-x64-baseline": {
|
|
50
|
+
"name": "reeval-0.22.0-windows-x64-baseline.exe",
|
|
51
|
+
"sha256": "1345745fb9798c04c03a6c85f1fdea9a6f3cefb27dbcf119b61d957f3f8772f0",
|
|
52
|
+
"size": 93495296
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|