@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.
- package/dist/chunk-N2LMMVL4.js +427 -0
- package/dist/cli/index.cjs +38 -37
- package/dist/cli/index.d.cts +3 -1
- package/dist/cli/index.d.ts +3 -1
- package/dist/cli/index.js +29 -28
- package/dist/index.cjs +54 -54
- package/dist/index.d.cts +111 -7
- package/dist/index.d.ts +111 -7
- package/dist/index.js +38 -38
- package/dist/{types-DlpTxdR_.d.cts → types-CMEpx9QI.d.cts} +313 -5
- package/dist/{types-DlpTxdR_.d.ts → types-CMEpx9QI.d.ts} +313 -5
- package/hosted-error-codes.json +6 -0
- package/package.json +5 -5
- package/skills/evolve-evals/references/cli-reference/analysis.mdx +69 -0
- package/skills/evolve-evals/references/cli-reference/check.mdx +86 -0
- package/skills/evolve-evals/references/cli-reference/dataset.mdx +13 -0
- package/skills/evolve-evals/references/cli-reference/run.mdx +6 -0
- package/skills/evolve-evals/references/cli-reference/trial.mdx +71 -2
- package/skills/evolve-evals/references/core-concepts/trial-outputs.mdx +14 -0
- package/skills/evolve-evals/references/sdk/python.mdx +22 -0
- package/skills/evolve-evals/references/sdk/typescript.mdx +22 -0
- package/skills/evolve-evals/references/sdk-reference/analyses.mdx +70 -0
- package/skills/evolve-evals/references/sdk-reference/checks.mdx +105 -4
- package/skills/evolve-evals/references/sdk-reference/datasets.mdx +40 -0
- package/skills/evolve-evals/references/sdk-reference/errors.mdx +11 -0
- package/skills/evolve-evals/references/sdk-reference/jobs.mdx +1 -1
- package/skills/evolve-evals/references/sdk-reference/trials.mdx +70 -0
- package/spec/openapi.yaml +3021 -360
- package/dist/chunk-JS2UTK2I.js +0 -427
|
@@ -230,3 +230,73 @@ description: "Read, download, and act on single trials."
|
|
|
230
230
|
```
|
|
231
231
|
</Tab>
|
|
232
232
|
</Tabs>
|
|
233
|
+
|
|
234
|
+
## filesystem(trialId: string)
|
|
235
|
+
|
|
236
|
+
<Tabs>
|
|
237
|
+
<Tab title="TypeScript">
|
|
238
|
+
```ts
|
|
239
|
+
filesystem(trialId: string): RunFilesystem
|
|
240
|
+
|
|
241
|
+
interface RunFilesystem {
|
|
242
|
+
status(): Promise<FilesystemStatus>
|
|
243
|
+
list(options?: { path?: string; source?: "live" | "capture"; cursor?: string; limit?: number }): Promise<FilesystemListing>
|
|
244
|
+
read(path: string, options?: { source?: "live" | "capture"; range?: TrialFileRange }): Promise<Buffer>
|
|
245
|
+
search(options: { q: string; path?: string; regex?: boolean; limit?: number; source?: "live" | "capture" }): Promise<FilesystemSearchResult>
|
|
246
|
+
changes(options?: { source?: "live" | "capture"; phase?: "setup" | "agent" | "verifier" | "all"; cursor?: string; limit?: number }): Promise<FilesystemChanges>
|
|
247
|
+
archive(options?: { path?: string; source?: "live" | "capture" }): Promise<Buffer>
|
|
248
|
+
archive(options: { path?: string; source?: "live" | "capture"; to: string }): Promise<string>
|
|
249
|
+
watch(paths: string[]): Promise<FilesystemWatchResult>
|
|
250
|
+
events(options?: { lastEventId?: string; signal?: AbortSignal }): AsyncIterableIterator<FilesystemStreamEvent>
|
|
251
|
+
logs(options: { stream: SandboxLogStream; cursor?: string; limit?: number }): Promise<SandboxLogLines>
|
|
252
|
+
logEvents(options?: { lastEventId?: string; signal?: AbortSignal }): AsyncIterableIterator<SandboxLogEvent>
|
|
253
|
+
procs(): Promise<SandboxProcs>
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
The trial'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`.
|
|
258
|
+
|
|
259
|
+
`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`).
|
|
260
|
+
|
|
261
|
+
`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.
|
|
262
|
+
|
|
263
|
+
```ts
|
|
264
|
+
const fs = trials().filesystem(trial.id);
|
|
265
|
+
const { state } = await fs.status();
|
|
266
|
+
for (const entry of (await fs.list({ path: "/app/work" })).entries) console.log(entry.name, entry.changed);
|
|
267
|
+
const main = (await fs.read("/app/work/main.py")).toString("utf8");
|
|
268
|
+
for await (const frame of fs.events()) if (frame.event === "fs") console.log(frame.data.path, frame.data.type);
|
|
269
|
+
```
|
|
270
|
+
</Tab>
|
|
271
|
+
<Tab title="Python">
|
|
272
|
+
```python
|
|
273
|
+
def filesystem(self, trial_id: str) -> RunFilesystem
|
|
274
|
+
|
|
275
|
+
class RunFilesystem:
|
|
276
|
+
async def status(self) -> FilesystemStatus
|
|
277
|
+
async def list(self, *, path="/", source=None, cursor=None, limit=None) -> FilesystemListing
|
|
278
|
+
async def read(self, path, *, source=None, start=None, end=None, suffix=None) -> bytes
|
|
279
|
+
async def search(self, q, *, path="/", regex=False, limit=None, source=None) -> FilesystemSearchResult
|
|
280
|
+
async def changes(self, *, source=None, phase=None, cursor=None, limit=None) -> FilesystemChanges
|
|
281
|
+
async def archive(self, *, path="/", source=None, to=None) # bytes, or the saved path with to=
|
|
282
|
+
async def watch(self, paths) -> FilesystemWatchResult
|
|
283
|
+
def events(self, *, last_event_id=None) -> AsyncIterator[FilesystemStreamEvent]
|
|
284
|
+
async def logs(self, stream, *, cursor=None, limit=None) -> SandboxLogLines
|
|
285
|
+
def log_events(self, *, last_event_id=None) -> AsyncIterator[SandboxLogEvent]
|
|
286
|
+
async def procs(self) -> SandboxProcs
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
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.
|
|
290
|
+
|
|
291
|
+
```python
|
|
292
|
+
fs = trials().filesystem(trial.id)
|
|
293
|
+
print((await fs.status()).state)
|
|
294
|
+
for entry in (await fs.list(path="/app/work")).entries:
|
|
295
|
+
print(entry.name, entry.changed)
|
|
296
|
+
main = (await fs.read("/app/work/main.py")).decode()
|
|
297
|
+
async for frame in fs.events():
|
|
298
|
+
if frame.event == "fs":
|
|
299
|
+
print(frame.data["path"], frame.data["type"])
|
|
300
|
+
```
|
|
301
|
+
</Tab>
|
|
302
|
+
</Tabs>
|