@evolvingmachines/evolve 0.0.60 → 0.0.61

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 (29) hide show
  1. package/dist/chunk-N2LMMVL4.js +427 -0
  2. package/dist/cli/index.cjs +38 -37
  3. package/dist/cli/index.d.cts +3 -1
  4. package/dist/cli/index.d.ts +3 -1
  5. package/dist/cli/index.js +29 -28
  6. package/dist/index.cjs +54 -54
  7. package/dist/index.d.cts +111 -7
  8. package/dist/index.d.ts +111 -7
  9. package/dist/index.js +38 -38
  10. package/dist/{types-DlpTxdR_.d.cts → types-CMEpx9QI.d.cts} +313 -5
  11. package/dist/{types-DlpTxdR_.d.ts → types-CMEpx9QI.d.ts} +313 -5
  12. package/hosted-error-codes.json +6 -0
  13. package/package.json +5 -5
  14. package/skills/evolve-evals/references/cli-reference/analysis.mdx +69 -0
  15. package/skills/evolve-evals/references/cli-reference/check.mdx +86 -0
  16. package/skills/evolve-evals/references/cli-reference/dataset.mdx +13 -0
  17. package/skills/evolve-evals/references/cli-reference/run.mdx +6 -0
  18. package/skills/evolve-evals/references/cli-reference/trial.mdx +71 -2
  19. package/skills/evolve-evals/references/core-concepts/trial-outputs.mdx +14 -0
  20. package/skills/evolve-evals/references/sdk/python.mdx +22 -0
  21. package/skills/evolve-evals/references/sdk/typescript.mdx +22 -0
  22. package/skills/evolve-evals/references/sdk-reference/analyses.mdx +70 -0
  23. package/skills/evolve-evals/references/sdk-reference/checks.mdx +105 -4
  24. package/skills/evolve-evals/references/sdk-reference/datasets.mdx +40 -0
  25. package/skills/evolve-evals/references/sdk-reference/errors.mdx +11 -0
  26. package/skills/evolve-evals/references/sdk-reference/jobs.mdx +1 -1
  27. package/skills/evolve-evals/references/sdk-reference/trials.mdx +70 -0
  28. package/spec/openapi.yaml +3021 -360
  29. package/dist/chunk-JS2UTK2I.js +0 -427
@@ -17,6 +17,7 @@ evolve check ./tasks \
17
17
  -i 'abs-*' \
18
18
  -l 5 \
19
19
  --watch
20
+ evolve check --show-defaults
20
21
  ```
21
22
 
22
23
  ## Options
@@ -25,6 +26,10 @@ evolve check ./tasks \
25
26
  Check a published dataset's tasks instead of a local path. The checker reads the version's retained task package, and the job page's CHECK tab lists these checks by task.
26
27
  </ParamField>
27
28
 
29
+ <ParamField path="--name" type="name">
30
+ A name for the check, Harbor's `--job-name`. Omitted, the accept timestamp in Harbor's shape, `YYYY-MM-DD__HH-MM-SS`.
31
+ </ParamField>
32
+
28
33
  <ParamField path="-m, --model" type="name" default="openrouter/deepseek/deepseek-v4.1-flash">
29
34
  Model the checker runs. `fireworks/deepseek-v4.1-flash` is the same model on its Fireworks route. Must be on the `claude` roster.
30
35
  </ParamField>
@@ -45,6 +50,10 @@ evolve check ./tasks \
45
50
  Sandbox provider the checker runs on. Defaults to the platform's analysis default.
46
51
  </ParamField>
47
52
 
53
+ <ParamField path="--show-defaults">
54
+ Print the defaults a check runs under when you name none: model, effort, provider, the rubric's criteria and the built-in prompt template, then exit. With `--json`, one object. Takes no path and no other check flag.
55
+ </ParamField>
56
+
48
57
  <ParamField path="-n, --n-concurrent" type="n">
49
58
  Max concurrent task checks, beneath the organization's ceiling. Defaults to the ceiling.
50
59
  </ParamField>
@@ -93,8 +102,13 @@ List your task quality checks, newest first.
93
102
  Filter by check status: `queued`, `running`, `completed`.
94
103
  </ParamField>
95
104
 
105
+ <ParamField path="-d, --dataset" type="name[@version]">
106
+ Only checks on this dataset. A bare name is every version, `name@version` one version. A value with an empty half (`name@`, `@version`) is refused as `invalid_input` on `dataset`.
107
+ </ParamField>
108
+
96
109
  ```bash
97
110
  evolve check list --status running
111
+ evolve check list --dataset terminal-bench-4@4.0
98
112
  ```
99
113
 
100
114
  ### check show
@@ -144,3 +158,75 @@ Save a check as a check folder (`check_report.json` plus one folder per task) by
144
158
  ```bash
145
159
  evolve check download 3f9a1c2e-… -o checks/
146
160
  ```
161
+
162
+ ## check files
163
+
164
+ A task check's run, by its task check id (`results[].id` on `evolve check show`).
165
+
166
+
167
+ ```bash
168
+ evolve check files <status|ls|cat|search|changes|archive> <task-check-id> [path] [options]
169
+ ```
170
+
171
+ The run's file system: while the box runs, `files` reads it as it changes; after the run, the same commands read the kept tree. `files status` says which you get.
172
+
173
+ - `files status <task-check-id>` — `live`, `captured`, `capturing` (the kept tree is still being written) or `none`; the box, how change events arrive (`watcher`), and the capture record (`ready`, `incomplete` with what was left out, or `failed`).
174
+ - `files ls <task-check-id> [path]` — one folder, sorted by name (default `/`). Each row shows the type, mode, size, mtime and name; `created (agent)` or `modified (verifier)` marks what the run changed and when, `image only` marks a file the run never touched (it lists but does not open on the kept tree).
175
+ - `files cat <task-check-id> <path>` — the raw bytes of one file, to stdout. `--range bytes=a-b` (or `bytes=a-`, `bytes=-n`) reads a slice.
176
+ - `files search <task-check-id> <text>` — every line matching the text, as `path:line: snippet`. `--path` narrows the search to one folder (the whole box takes seconds); `--regex` treats the text as a pattern; a `(truncated)` note means there was more.
177
+ - `files changes <task-check-id>` — the files the run created, modified or removed, with the phase (`--phase agent|verifier`).
178
+ - `files archive <task-check-id>` — a `.tar.gz` of one subtree (`--path`, default the whole tree) to stdout, or saved under `-o <dir>`. The kept tree's archive lists the files it does not carry in `MANIFEST.tsv`; while the box runs, a subtree too large to read out in time is refused (`feature_unsupported`).
179
+
180
+ <ParamField path="--source" type="live|capture">
181
+ Force the source. Without it, whichever the run has. A source that is not there is refused with `filesystem_state`.
182
+ </ParamField>
183
+
184
+ <ParamField path="-l, --limit" type="n">
185
+ Page size on `ls`, `search` and `changes` (`ls`, `changes` default 500; `search` default 200; max 1000).
186
+ </ParamField>
187
+
188
+ <ParamField path="--cursor" type="c">
189
+ Resume a paged `ls` or `changes` after the previous page's `next_cursor`.
190
+ </ParamField>
191
+
192
+ ```bash
193
+ evolve check files ls 3f9a1c2e-… /app/work
194
+ evolve check files search 3f9a1c2e-… 'permission denied' --path /app/work
195
+ evolve check files archive 3f9a1c2e-… --path /app/work -o archives/
196
+ ```
197
+
198
+ ## check logs
199
+
200
+ ```bash
201
+ evolve check logs <task-check-id> --stream <name> [--follow] [options]
202
+ ```
203
+
204
+ The box's own streams: `agent` (the harness's stdout and stderr), `verifier` and `system` (the box's system log, only when the job asked for it with `--system-log`); `setup` and `metrics` are named but not recorded today, so their pages are empty and say why. One page by default; `--follow` keeps printing lines as they arrive while the box lives, and returns once it is gone.
205
+
206
+ <ParamField path="--stream" type="name" required>
207
+ `agent`, `verifier`, `system`, `setup` or `metrics`.
208
+ </ParamField>
209
+
210
+ <ParamField path="-f, --follow">
211
+ Keep printing new lines while the box lives.
212
+ </ParamField>
213
+
214
+ <ParamField path="-l, --limit" type="n" default="1000">
215
+ Lines per page, max 1000.
216
+ </ParamField>
217
+
218
+ <ParamField path="--cursor" type="seq">
219
+ Resume after this line.
220
+ </ParamField>
221
+
222
+ ```bash
223
+ evolve check logs 3f9a1c2e-… --stream agent --follow
224
+ ```
225
+
226
+ ## check procs
227
+
228
+ ```bash
229
+ evolve check procs <task-check-id>
230
+ ```
231
+
232
+ The processes running in the box right now. Live only: once the box is gone the command is refused with `filesystem_state`.
@@ -122,6 +122,19 @@ Download the original corpus package. Owner only.
122
122
  Directory to save into. Defaults to the current directory.
123
123
  </ParamField>
124
124
 
125
+ ## dataset files
126
+
127
+ ```bash
128
+ evolve dataset files <status|ls|cat> <name@version> <task> [path] [options]
129
+ ```
130
+
131
+ A published task's files, exactly as the platform stored them and as every trial ran against them: `files ls` lists one folder of the task directory (default `/`: `instruction.md`, `task.toml`, `environment/`, `tests/`), `files cat` prints one file's bytes (`--range bytes=a-b` reads a slice), `files status` says whether the version keeps its package (`package_retained`). A version imported before packages were kept is refused with `task_package_not_retained`. The version must be named: `name@version`.
132
+
133
+ ```bash
134
+ evolve dataset files ls my-swe@1.0 abs-1 /tests
135
+ evolve dataset files cat my-swe@1.0 abs-1 /tests/test.sh
136
+ ```
137
+
125
138
  ## dataset activate
126
139
 
127
140
  ```bash
@@ -143,6 +143,12 @@ Each of these applies to every arm of the job.
143
143
  Reasoning effort the analyzer runs at. Defaults to the per-model default: `high` on `openrouter/deepseek/deepseek-v4.1-flash`, `max` on `glm-5.3-flash`. Implies `--analyze`.
144
144
  </ParamField>
145
145
 
146
+ ## Sandbox logs
147
+
148
+ <ParamField path="--system-log">
149
+ Record the box's own system log beside the streams every run keeps (`agent`, `verifier`). Read it back with `evolve trial logs --stream system`. Off by default.
150
+ </ParamField>
151
+
146
152
  ## Timeouts
147
153
 
148
154
  <ParamField path="--timeout-multiplier" type="x" default="1.0">
@@ -19,7 +19,7 @@ evolve trial show <trial-id>
19
19
 
20
20
  Show one trial in full detail: its status, reward, `tokens`, `spent` and `spent (judge)` rows, `gpu compute (est.)` on a GPU trial, the exception when it failed, and its latest analysis with the verdicts, the summary and the typed failure. An uploaded trial prints its provider as `ported` and its reported figures apart from the metered ones.
21
21
 
22
- There is no `trial files` or `trial read` verb; listing and reading a trial's stored files is SDK-only, `trials().files()` and `file()`.
22
+ The run's own files are under [`trial files`](#trial-files); the platform's stored artifacts (session files, the verifier log) are SDK-only, `trials().files()` and `file()`.
23
23
 
24
24
  ## trial trace
25
25
 
@@ -70,7 +70,7 @@ Save a trial as its trial tree plus `evolve.json`, or stream one artifact to std
70
70
  </ParamField>
71
71
 
72
72
  <ParamField path="--stream" type="artifact">
73
- Print one artifact to stdout instead of saving: `trace-parsed`, `verifier`, `trace-stdout`, `trace-stderr`, `trace-atif` (the ATIF trajectory), `trajectory` (reserved: the harness-native session file) or `agent-home`.
73
+ Print one artifact to stdout instead of saving: `trace-parsed`, `verifier`, `trace-stdout`, `trace-stderr`, `trace-atif` (the ATIF trajectory), `trajectory` (reserved: the harness-native session file), `agent-home`, or `filesystem` (the run's file system as one `.tar.gz`, raw bytes — pipe it to a file; the same archive as `trial files archive`).
74
74
  </ParamField>
75
75
 
76
76
  <ParamField path="--cursor" type="seq">
@@ -85,6 +85,75 @@ Save a trial as its trial tree plus `evolve.json`, or stream one artifact to std
85
85
  evolve trial download d1a10c4e-… --stream trace-stdout
86
86
  ```
87
87
 
88
+ ## trial files
89
+
90
+ ```bash
91
+ evolve trial files <status|ls|cat|search|changes|archive> <trial-id> [path] [options]
92
+ ```
93
+
94
+ The run's file system: while the box runs, `files` reads it as it changes; after the run, the same commands read the kept tree. `files status` says which you get.
95
+
96
+ - `files status <trial-id>` — `live`, `captured`, `capturing` (the kept tree is still being written) or `none`; the box, how change events arrive (`watcher`), and the capture record (`ready`, `incomplete` with what was left out, or `failed`).
97
+ - `files ls <trial-id> [path]` — one folder, sorted by name (default `/`). Each row shows the type, mode, size, mtime and name; `created (agent)` or `modified (verifier)` marks what the run changed and when, `image only` marks a file the run never touched (it lists but does not open on the kept tree).
98
+ - `files cat <trial-id> <path>` — the raw bytes of one file, to stdout. `--range bytes=a-b` (or `bytes=a-`, `bytes=-n`) reads a slice.
99
+ - `files search <trial-id> <text>` — every line matching the text, as `path:line: snippet`. `--path` narrows the search to one folder (the whole box takes seconds); `--regex` treats the text as a pattern; a `(truncated)` note means there was more.
100
+ - `files changes <trial-id>` — the files the run created, modified or removed, with the phase (`--phase agent|verifier`).
101
+ - `files archive <trial-id>` — a `.tar.gz` of one subtree (`--path`, default the whole tree) to stdout, or saved under `-o <dir>`. The kept tree's archive lists the files it does not carry in `MANIFEST.tsv`; while the box runs, a subtree too large to read out in time is refused (`feature_unsupported`).
102
+
103
+ <ParamField path="--source" type="live|capture">
104
+ Force the source. Without it, whichever the run has. A source that is not there is refused with `filesystem_state`.
105
+ </ParamField>
106
+
107
+ <ParamField path="-l, --limit" type="n">
108
+ Page size on `ls`, `search` and `changes` (`ls`, `changes` default 500; `search` default 200; max 1000).
109
+ </ParamField>
110
+
111
+ <ParamField path="--cursor" type="c">
112
+ Resume a paged `ls` or `changes` after the previous page's `next_cursor`.
113
+ </ParamField>
114
+
115
+ ```bash
116
+ evolve trial files ls d1a10c4e-… /app/work
117
+ evolve trial files search d1a10c4e-… 'permission denied' --path /app/work
118
+ evolve trial files archive d1a10c4e-… --path /app/work -o archives/
119
+ ```
120
+
121
+ ## trial logs
122
+
123
+ ```bash
124
+ evolve trial logs <trial-id> --stream <name> [--follow] [options]
125
+ ```
126
+
127
+ The box's own streams: `agent` (the harness's stdout and stderr), `verifier` and `system` (the box's system log, only when the job asked for it with `--system-log`); `setup` and `metrics` are named but not recorded today, so their pages are empty and say why. One page by default; `--follow` keeps printing lines as they arrive while the box lives, and returns once it is gone.
128
+
129
+ <ParamField path="--stream" type="name" required>
130
+ `agent`, `verifier`, `system`, `setup` or `metrics`.
131
+ </ParamField>
132
+
133
+ <ParamField path="-f, --follow">
134
+ Keep printing new lines while the box lives.
135
+ </ParamField>
136
+
137
+ <ParamField path="-l, --limit" type="n" default="1000">
138
+ Lines per page, max 1000.
139
+ </ParamField>
140
+
141
+ <ParamField path="--cursor" type="seq">
142
+ Resume after this line.
143
+ </ParamField>
144
+
145
+ ```bash
146
+ evolve trial logs d1a10c4e-… --stream agent --follow
147
+ ```
148
+
149
+ ## trial procs
150
+
151
+ ```bash
152
+ evolve trial procs <trial-id>
153
+ ```
154
+
155
+ The processes running in the box right now. Live only: once the box is gone the command is refused with `filesystem_state`.
156
+
88
157
  ## trial retry
89
158
 
90
159
  ```bash
@@ -101,3 +101,17 @@ evolve trial download <trial-id> --stream verifier
101
101
  ```
102
102
 
103
103
  From the SDK, `trials().artifact(id, "verifier")` returns the same text, and `null` when the trial never stored it.
104
+
105
+ ## The run's file system
106
+
107
+ Beyond the artifacts above, every trial's whole file system can be browsed: while the box runs you read it live, and after the run you read the kept tree — the files the run created or modified, with the files it never touched listed but held only by the image. The same reads work on analysis runs and task checks, and a published task's own files can be read from its package.
108
+
109
+ ```bash
110
+ evolve trial files status <trial-id>
111
+ evolve trial files ls <trial-id> /app/work
112
+ evolve trial files cat <trial-id> /app/work/main.py
113
+ evolve trial files changes <trial-id>
114
+ evolve trial files archive <trial-id> --path /app/work -o archives/
115
+ ```
116
+
117
+ The box's own streams are read the same way: `evolve trial logs <trial-id> --stream agent --follow` prints the harness's output as it arrives; `verifier` once the verifier ran, `system` when the job was started with `--system-log`; `setup` and `metrics` are named but not recorded today, so their pages are empty and say why. `evolve trial procs <trial-id>` lists the box's processes while it runs. From the SDK it is `trials().filesystem(id)`; see the [SDK reference](/sdk-reference/trials#filesystem).
@@ -124,6 +124,28 @@ async for dataset in catalog.list():
124
124
  version = await catalog.get("terminal-bench-4@4.0")
125
125
  ```
126
126
 
127
+ ## Browse the run's files
128
+
129
+ Every trial has a file system you can read while the box runs and after it is gone, plus its sandbox logs and process list. `filesystem(id)` returns one object for all of it.
130
+
131
+ ```python
132
+ fs = t.filesystem(trial_id)
133
+ print((await fs.status()).state) # "live" | "captured" | "capturing" | "none"
134
+
135
+ folder = await fs.list(path="/app/work")
136
+ main = (await fs.read("/app/work/main.py")).decode()
137
+ hits = await fs.search("permission denied", path="/app/work")
138
+ changed = await fs.changes()
139
+ await fs.archive(path="/app/work", to="./archives")
140
+
141
+ async for frame in fs.events():
142
+ if frame.event == "fs":
143
+ print(frame.data["type"], frame.data["path"])
144
+ agent_log = await fs.logs("agent")
145
+ ```
146
+
147
+ Analysis runs (`analyses().filesystem(id)`) and task checks (`checks().task_filesystem(check_id, task_check_id)`) have the same surface; a published task's own files are `datasets().task_files("name@version", task)`.
148
+
127
149
  ## Everything else
128
150
 
129
151
  `analyses()`, `checks()`, `skills()`, `agents()`, `auth()` and `orgs()` are built the same way. `meta()` fetches the platform's capability document, the live list of harnesses, models and limits, and needs no key. `hosted()` builds every client from one configuration.
@@ -128,6 +128,28 @@ for await (const dataset of catalog.list()) {
128
128
  const version = await catalog.get("terminal-bench-4@4.0");
129
129
  ```
130
130
 
131
+ ## Browse the run's files
132
+
133
+ Every trial has a file system you can read while the box runs and after it is gone, plus its sandbox logs and process list. `filesystem(id)` returns one object for all of it.
134
+
135
+ ```ts
136
+ const fs = t.filesystem(trialId);
137
+ console.log((await fs.status()).state); // "live" | "captured" | "capturing" | "none"
138
+
139
+ const folder = await fs.list({ path: "/app/work" });
140
+ const main = (await fs.read("/app/work/main.py")).toString("utf8");
141
+ const hits = await fs.search({ q: "permission denied", path: "/app/work" });
142
+ const changed = await fs.changes();
143
+ await fs.archive({ path: "/app/work", to: "./archives" });
144
+
145
+ for await (const frame of fs.events()) {
146
+ if (frame.event === "fs") console.log(frame.data.type, frame.data.path);
147
+ }
148
+ const agentLog = await fs.logs({ stream: "agent" });
149
+ ```
150
+
151
+ Analysis runs (`analyses().filesystem(id)`) and task checks (`checks().taskFilesystem(checkId, taskCheckId)`) have the same surface; a published task's own files are `datasets().taskFiles("name@version", task)`.
152
+
131
153
  ## Everything else
132
154
 
133
155
  `analyses()`, `checks()`, `skills()`, `agents()`, `auth()` and `orgs()` are built the same way. `meta()` fetches the platform's capability document, the live list of harnesses, models and limits, and needs no key. `hosted()` builds every client from one configuration.
@@ -123,3 +123,73 @@ description: "Read trace-analysis runs."
123
123
  ```
124
124
  </Tab>
125
125
  </Tabs>
126
+
127
+ ## filesystem(analysisId: string)
128
+
129
+ <Tabs>
130
+ <Tab title="TypeScript">
131
+ ```ts
132
+ filesystem(analysisId: string): RunFilesystem
133
+
134
+ interface RunFilesystem {
135
+ status(): Promise<FilesystemStatus>
136
+ list(options?: { path?: string; source?: "live" | "capture"; cursor?: string; limit?: number }): Promise<FilesystemListing>
137
+ read(path: string, options?: { source?: "live" | "capture"; range?: TrialFileRange }): Promise<Buffer>
138
+ search(options: { q: string; path?: string; regex?: boolean; limit?: number; source?: "live" | "capture" }): Promise<FilesystemSearchResult>
139
+ changes(options?: { source?: "live" | "capture"; phase?: "setup" | "agent" | "verifier" | "all"; cursor?: string; limit?: number }): Promise<FilesystemChanges>
140
+ archive(options?: { path?: string; source?: "live" | "capture" }): Promise<Buffer>
141
+ archive(options: { path?: string; source?: "live" | "capture"; to: string }): Promise<string>
142
+ watch(paths: string[]): Promise<FilesystemWatchResult>
143
+ events(options?: { lastEventId?: string; signal?: AbortSignal }): AsyncIterableIterator<FilesystemStreamEvent>
144
+ logs(options: { stream: SandboxLogStream; cursor?: string; limit?: number }): Promise<SandboxLogLines>
145
+ logEvents(options?: { lastEventId?: string; signal?: AbortSignal }): AsyncIterableIterator<SandboxLogEvent>
146
+ procs(): Promise<SandboxProcs>
147
+ }
148
+ ```
149
+
150
+ The analysis run's file system, sandbox logs and process list. While the box runs, every read sees it as it changes; after the run, the same reads answer from the kept tree. `status()` says which (`state`: `live`, `captured`, `capturing`, `none`), and `source` on a read forces one — a source that is not there is refused with `filesystem_state`.
151
+
152
+ `list` pages one folder by name; each entry says whether the run created or modified it and in which phase, and on the kept tree `captured: false` marks a file the run never touched (it lists but does not open — `not_captured`). `read` answers raw bytes, a slice with `range`. `search` finds text under a folder, or over the whole box when `path` is `/` (seconds); `truncated` says there was more. `changes` is the flat list of what the run created, modified or removed. `archive` is a `.tar.gz` of one subtree, in memory or saved under `to`; while the box runs, a subtree too large to read out in time is refused (`feature_unsupported`).
153
+
154
+ `events` yields change frames while the box lives (`state`, then one `fs` per change with its `seq`, `path` and `type`); on a provider without a native watcher, `watch(paths)` declares the folders you have open so their changes are reported (at most 8). `logs` pages one stream — `agent`, `verifier`, or `system` when the job asked for it; `setup` and `metrics` are named but not recorded today, so their page is empty with a `reason` — and `logEvents` follows every stream while the box lives. `procs` is the live process list.
155
+
156
+ ```ts
157
+ const fs = analyses().filesystem(analysis.id);
158
+ const { state } = await fs.status();
159
+ for (const entry of (await fs.list({ path: "/app/work" })).entries) console.log(entry.name, entry.changed);
160
+ const main = (await fs.read("/app/work/main.py")).toString("utf8");
161
+ for await (const frame of fs.events()) if (frame.event === "fs") console.log(frame.data.path, frame.data.type);
162
+ ```
163
+ </Tab>
164
+ <Tab title="Python">
165
+ ```python
166
+ def filesystem(self, analysis_id: str) -> RunFilesystem
167
+
168
+ class RunFilesystem:
169
+ async def status(self) -> FilesystemStatus
170
+ async def list(self, *, path="/", source=None, cursor=None, limit=None) -> FilesystemListing
171
+ async def read(self, path, *, source=None, start=None, end=None, suffix=None) -> bytes
172
+ async def search(self, q, *, path="/", regex=False, limit=None, source=None) -> FilesystemSearchResult
173
+ async def changes(self, *, source=None, phase=None, cursor=None, limit=None) -> FilesystemChanges
174
+ async def archive(self, *, path="/", source=None, to=None) # bytes, or the saved path with to=
175
+ async def watch(self, paths) -> FilesystemWatchResult
176
+ def events(self, *, last_event_id=None) -> AsyncIterator[FilesystemStreamEvent]
177
+ async def logs(self, stream, *, cursor=None, limit=None) -> SandboxLogLines
178
+ def log_events(self, *, last_event_id=None) -> AsyncIterator[SandboxLogEvent]
179
+ async def procs(self) -> SandboxProcs
180
+ ```
181
+
182
+ The same surface, the same words: `status().state` says whether the reads answer from the running box (`live`) or the kept tree (`captured`); `source=` forces one. `read` answers bytes, a slice with `start`/`end` or `suffix`. `events` and `log_events` are async iterators over the live streams.
183
+
184
+ ```python
185
+ fs = analyses().filesystem(analysis.id)
186
+ print((await fs.status()).state)
187
+ for entry in (await fs.list(path="/app/work")).entries:
188
+ print(entry.name, entry.changed)
189
+ main = (await fs.read("/app/work/main.py")).decode()
190
+ async for frame in fs.events():
191
+ if frame.event == "fs":
192
+ print(frame.data["path"], frame.data["type"])
193
+ ```
194
+ </Tab>
195
+ </Tabs>
@@ -10,7 +10,7 @@ description: "Start and read task quality checks."
10
10
  <Tabs>
11
11
  <Tab title="TypeScript">
12
12
  ```ts
13
- create(input: { source: { directory: string } | { dataset: string }; model_name?: string; rubric?: Rubric; prompt?: string; reasoning_effort?: string; sandbox_provider?: EvalSandboxProvider; n_concurrent?: number; include_task_names?: string[]; exclude_task_names?: string[]; n_tasks?: number; onUploadProgress?: (sentBytes: number, totalBytes: number) => void }): Promise<Check>
13
+ create(input: { source: { directory: string } | { dataset: string }; name?: string; model_name?: string; rubric?: Rubric; prompt?: string; reasoning_effort?: string; sandbox_provider?: EvalSandboxProvider; n_concurrent?: number; include_task_names?: string[]; exclude_task_names?: string[]; n_tasks?: number; onUploadProgress?: (sentBytes: number, totalBytes: number) => void }): Promise<Check>
14
14
  ```
15
15
 
16
16
  Check a local task directory or a directory of them, uploaded as one archive (`upload_too_large` past the published ceiling), or a published dataset, nothing uploaded. Returns the accepted check with one `queued` result per task; an empty selection is refused with `no_checkable_tasks`, and a dataset version resolves as for a job (`dataset_not_found`, `no_active_version`, `version_not_ready`). A check on a dataset version also appears on every job spanning it, as `check` on `jobs().tasks()` rows.
@@ -25,6 +25,7 @@ description: "Start and read task quality checks."
25
25
  directory: Optional[str] = None,
26
26
  *,
27
27
  dataset: Optional[str] = None,
28
+ name=None,
28
29
  model_name=None,
29
30
  rubric: Optional[Rubric] = None,
30
31
  prompt=None,
@@ -52,14 +53,15 @@ description: "Start and read task quality checks."
52
53
  <Tab title="TypeScript">
53
54
  ```ts
54
55
  get(checkId: string): Promise<Check>
55
- list(options?: { scope?: "my" | "shared"; status?: CheckStatus[]; limit?: number; cursor?: string }): CheckList
56
+ list(options?: { scope?: "my" | "shared"; status?: CheckStatus[]; dataset?: string; limit?: number; cursor?: string }): CheckList
56
57
  watch(checkId: string, options?: { onProgress?: (check: Check) => void; signal?: AbortSignal; pollIntervalMs?: number }): Promise<Check>
57
58
  ```
58
59
 
59
- One check with its per-task results, your checks, or a poll until every task settled.
60
+ One check with its per-task results, your checks, or a poll until every task settled. `dataset` keeps only the checks on one dataset: a bare name is every version, `name@version` one version.
60
61
 
61
62
  ```ts
62
63
  const done = await checks().watch(check.id);
64
+ const onTb4 = await checks().list({ dataset: "terminal-bench-4@4.0" });
63
65
  ```
64
66
  </Tab>
65
67
  <Tab title="Python">
@@ -69,6 +71,7 @@ description: "Start and read task quality checks."
69
71
  *,
70
72
  scope: Optional[JobListScope] = None,
71
73
  status: Optional[List[CheckStatus]] = None,
74
+ dataset: Optional[str] = None,
72
75
  limit: Optional[int] = None,
73
76
  cursor: Optional[str] = None,
74
77
  )
@@ -81,10 +84,38 @@ description: "Start and read task quality checks."
81
84
  ) -> Check
82
85
  ```
83
86
 
84
- One check with its per-task results, your checks, or a poll until every task settled.
87
+ One check with its per-task results, your checks, or a poll until every task settled. `dataset` keeps only the checks on one dataset: a bare name is every version, `name@version` one version.
85
88
 
86
89
  ```python
87
90
  done = await checks().watch(check.id)
91
+ on_tb4 = await checks().list(dataset="terminal-bench-4@4.0")
92
+ ```
93
+ </Tab>
94
+ </Tabs>
95
+
96
+ ## defaults
97
+
98
+ <Tabs>
99
+ <Tab title="TypeScript">
100
+ ```ts
101
+ defaults(): Promise<CheckDefaults>
102
+ ```
103
+
104
+ The defaults a check runs under when you name none: `model_name`, `reasoning_effort`, `sandbox_provider`, the platform's `rubric`, and `prompt`, the built-in check prompt as a template with `{task_path}`, `{file_tree}` and `{criteria_guidance}` unrendered. Edit the rubric or the prompt from here and pass it to `create`; passed back unchanged, they run exactly as the defaults do, and the check records them as named, so a later change of the platform default does not move it.
105
+
106
+ ```ts
107
+ const { rubric } = await checks().defaults();
108
+ ```
109
+ </Tab>
110
+ <Tab title="Python">
111
+ ```python
112
+ async def defaults() -> CheckDefaults
113
+ ```
114
+
115
+ The defaults a check runs under when you name none: `model_name`, `reasoning_effort`, `sandbox_provider`, the platform's `rubric`, and `prompt`, the built-in check prompt as a template with `{task_path}`, `{file_tree}` and `{criteria_guidance}` unrendered. Edit the rubric or the prompt from here and pass it to `create`; passed back unchanged, they run exactly as the defaults do, and the check records them as named, so a later change of the platform default does not move it.
116
+
117
+ ```python
118
+ rubric = (await checks().defaults())["rubric"]
88
119
  ```
89
120
  </Tab>
90
121
  </Tabs>
@@ -164,3 +195,73 @@ description: "Start and read task quality checks."
164
195
  ```
165
196
  </Tab>
166
197
  </Tabs>
198
+
199
+ ## taskFilesystem(checkId: string, taskCheckId: string)
200
+
201
+ <Tabs>
202
+ <Tab title="TypeScript">
203
+ ```ts
204
+ taskFilesystem(checkId: string, taskCheckId: string): RunFilesystem
205
+
206
+ interface RunFilesystem {
207
+ status(): Promise<FilesystemStatus>
208
+ list(options?: { path?: string; source?: "live" | "capture"; cursor?: string; limit?: number }): Promise<FilesystemListing>
209
+ read(path: string, options?: { source?: "live" | "capture"; range?: TrialFileRange }): Promise<Buffer>
210
+ search(options: { q: string; path?: string; regex?: boolean; limit?: number; source?: "live" | "capture" }): Promise<FilesystemSearchResult>
211
+ changes(options?: { source?: "live" | "capture"; phase?: "setup" | "agent" | "verifier" | "all"; cursor?: string; limit?: number }): Promise<FilesystemChanges>
212
+ archive(options?: { path?: string; source?: "live" | "capture" }): Promise<Buffer>
213
+ archive(options: { path?: string; source?: "live" | "capture"; to: string }): Promise<string>
214
+ watch(paths: string[]): Promise<FilesystemWatchResult>
215
+ events(options?: { lastEventId?: string; signal?: AbortSignal }): AsyncIterableIterator<FilesystemStreamEvent>
216
+ logs(options: { stream: SandboxLogStream; cursor?: string; limit?: number }): Promise<SandboxLogLines>
217
+ logEvents(options?: { lastEventId?: string; signal?: AbortSignal }): AsyncIterableIterator<SandboxLogEvent>
218
+ procs(): Promise<SandboxProcs>
219
+ }
220
+ ```
221
+
222
+ The task check's file system, sandbox logs and process list. While the box runs, every read sees it as it changes; after the run, the same reads answer from the kept tree. `status()` says which (`state`: `live`, `captured`, `capturing`, `none`), and `source` on a read forces one — a source that is not there is refused with `filesystem_state`.
223
+
224
+ `list` pages one folder by name; each entry says whether the run created or modified it and in which phase, and on the kept tree `captured: false` marks a file the run never touched (it lists but does not open — `not_captured`). `read` answers raw bytes, a slice with `range`. `search` finds text under a folder, or over the whole box when `path` is `/` (seconds); `truncated` says there was more. `changes` is the flat list of what the run created, modified or removed. `archive` is a `.tar.gz` of one subtree, in memory or saved under `to`; while the box runs, a subtree too large to read out in time is refused (`feature_unsupported`).
225
+
226
+ `events` yields change frames while the box lives (`state`, then one `fs` per change with its `seq`, `path` and `type`); on a provider without a native watcher, `watch(paths)` declares the folders you have open so their changes are reported (at most 8). `logs` pages one stream — `agent`, `verifier`, or `system` when the job asked for it; `setup` and `metrics` are named but not recorded today, so their page is empty with a `reason` — and `logEvents` follows every stream while the box lives. `procs` is the live process list.
227
+
228
+ ```ts
229
+ const fs = checks().taskFilesystem(check.id, check.results[0].id);
230
+ const { state } = await fs.status();
231
+ for (const entry of (await fs.list({ path: "/app/work" })).entries) console.log(entry.name, entry.changed);
232
+ const main = (await fs.read("/app/work/main.py")).toString("utf8");
233
+ for await (const frame of fs.events()) if (frame.event === "fs") console.log(frame.data.path, frame.data.type);
234
+ ```
235
+ </Tab>
236
+ <Tab title="Python">
237
+ ```python
238
+ def task_filesystem(self, check_id: str, task_check_id: str) -> RunFilesystem
239
+
240
+ class RunFilesystem:
241
+ async def status(self) -> FilesystemStatus
242
+ async def list(self, *, path="/", source=None, cursor=None, limit=None) -> FilesystemListing
243
+ async def read(self, path, *, source=None, start=None, end=None, suffix=None) -> bytes
244
+ async def search(self, q, *, path="/", regex=False, limit=None, source=None) -> FilesystemSearchResult
245
+ async def changes(self, *, source=None, phase=None, cursor=None, limit=None) -> FilesystemChanges
246
+ async def archive(self, *, path="/", source=None, to=None) # bytes, or the saved path with to=
247
+ async def watch(self, paths) -> FilesystemWatchResult
248
+ def events(self, *, last_event_id=None) -> AsyncIterator[FilesystemStreamEvent]
249
+ async def logs(self, stream, *, cursor=None, limit=None) -> SandboxLogLines
250
+ def log_events(self, *, last_event_id=None) -> AsyncIterator[SandboxLogEvent]
251
+ async def procs(self) -> SandboxProcs
252
+ ```
253
+
254
+ The same surface, the same words: `status().state` says whether the reads answer from the running box (`live`) or the kept tree (`captured`); `source=` forces one. `read` answers bytes, a slice with `start`/`end` or `suffix`. `events` and `log_events` are async iterators over the live streams.
255
+
256
+ ```python
257
+ fs = checks().task_filesystem(check["id"], check["results"][0]["id"])
258
+ print((await fs.status()).state)
259
+ for entry in (await fs.list(path="/app/work")).entries:
260
+ print(entry.name, entry.changed)
261
+ main = (await fs.read("/app/work/main.py")).decode()
262
+ async for frame in fs.events():
263
+ if frame.event == "fs":
264
+ print(frame.data["path"], frame.data["type"])
265
+ ```
266
+ </Tab>
267
+ </Tabs>
@@ -90,6 +90,46 @@ description: "The catalog: list, read, publish, download, activate, delete."
90
90
  </Tab>
91
91
  </Tabs>
92
92
 
93
+ ## taskFiles
94
+
95
+ <Tabs>
96
+ <Tab title="TypeScript">
97
+ ```ts
98
+ taskFiles(ref: string, taskName: string): TaskPackageFiles
99
+
100
+ interface TaskPackageFiles {
101
+ status(): Promise<TaskPackageFilesystemStatus>
102
+ list(options?: { path?: string; cursor?: string; limit?: number }): Promise<FilesystemListing>
103
+ read(path: string, options?: { range?: TrialFileRange }): Promise<Buffer>
104
+ }
105
+ ```
106
+
107
+ A published task's files, exactly as the platform stored them and as every trial ran against them: `list` pages one folder of the task directory (`/` holds `instruction.md`, `task.toml`, `environment/`, `tests/`), `read` answers one file's bytes. `ref` must name the version (`name@version`); a version imported before packages were kept is refused with `task_package_not_retained` (`status().package_retained` says so first).
108
+
109
+ ```ts
110
+ const files = datasets().taskFiles("my-swe@1.0", "abs-1");
111
+ const tests = await files.list({ path: "/tests" });
112
+ const script = (await files.read("/tests/test.sh")).toString("utf8");
113
+ ```
114
+ </Tab>
115
+ <Tab title="Python">
116
+ ```python
117
+ def task_files(self, ref: str, task_name: str) -> TaskPackageFiles
118
+
119
+ class TaskPackageFiles:
120
+ async def status(self) -> TaskPackageFilesystemStatus
121
+ async def list(self, *, path="/", cursor=None, limit=None) -> FilesystemListing
122
+ async def read(self, path, *, start=None, end=None, suffix=None) -> bytes
123
+ ```
124
+
125
+ ```python
126
+ files = datasets().task_files("my-swe@1.0", "abs-1")
127
+ tests = await files.list(path="/tests")
128
+ script = (await files.read("/tests/test.sh")).decode()
129
+ ```
130
+ </Tab>
131
+ </Tabs>
132
+
93
133
  ## preflight
94
134
 
95
135
  <Tabs>
@@ -88,6 +88,17 @@ Grouped by the door that returns them. The HTTP status is stated where it is fix
88
88
  | `insufficient_credits` | 402. The account's credit balance is zero at job create, resume or retry. |
89
89
  | `quota_exceeded` | 429, no retry delay. The organization's `max_queued_trials` would be crossed. `details` carry `quota`, `limit`, `used`, `requested` and `org`. The CLI prints `Launch quota exceeded:` and exits 2. |
90
90
 
91
+ ### Files and logs
92
+
93
+ | Code | When |
94
+ | --- | --- |
95
+ | `not_found` | 404. A path the run's file system does not hold. |
96
+ | `not_captured` | 404. A read of a file on the kept tree that the run never touched; only the image holds it. |
97
+ | `filesystem_state` | 409. `source=live` while the box is gone, or `source=capture` before the kept tree exists; `details.state` says what the run has. |
98
+ | `feature_unsupported` | 422. The provider or the run's shape has no live view of what was asked; `details.cause` names it. |
99
+ | `provider_unreachable` | 503. The box's provider did not answer; wait `retryAfterSec`. |
100
+ | `task_package_not_retained` | 409. The dataset version keeps no task package, so its task files cannot be served. |
101
+
91
102
  ### Input
92
103
 
93
104
  | Code | When |
@@ -16,7 +16,7 @@ description: "Start, follow, and derive jobs."
16
16
  ): Promise<Job>
17
17
  ```
18
18
 
19
- `JobCreate`: `datasets` (selectors: `name`, optional `version`, `task_names`, `exclude_task_names`, `n_tasks`), `agents` (arms: `name`, `model_name`, optional `version`, `reasoning_effort`, `kwargs`, `preset`, `skills`), and optional `job_name`, `n_attempts`, `n_concurrent_trials` (1 to 150), `max_trial_spend_usd`, `sandbox_provider`, `retry`, `analyze`, the five `*_timeout_multiplier` fields, `verifier_env` (`REWARDKIT_JUDGE` and `REWARDKIT_MODEL` only) and `secrets`. `agent_env` is in the shape but refused by the server.
19
+ `JobCreate`: `datasets` (selectors: `name`, optional `version`, `task_names`, `exclude_task_names`, `n_tasks`), `agents` (arms: `name`, `model_name`, optional `version`, `reasoning_effort`, `kwargs`, `preset`, `skills`), and optional `job_name`, `n_attempts`, `n_concurrent_trials` (1 to 150), `max_trial_spend_usd`, `sandbox_provider`, `retry`, `analyze`, `system_log` (record the box's own system log stream beside `agent`, `verifier`, `setup` and `metrics`; off by default), the five `*_timeout_multiplier` fields, `verifier_env` (`REWARDKIT_JUDGE` and `REWARDKIT_MODEL` only) and `secrets`. `agent_env` is in the shape but refused by the server.
20
20
 
21
21
  The response is the [Job](/sdk-reference/types#job), with the resolved `max_trial_spend_usd`, `worst_case_spend_usd`, `retry`, `analyze` and multipliers. `options.idempotencyKey` makes a repeated call return the same job, with `idempotent_replay` true; a different request under a used key is refused with `idempotency_key_reused`.
22
22