@evolvingmachines/evolve 0.0.65 → 0.0.66
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-DK2MGUPB.js → chunk-RFLMRPGK.js} +5 -5
- package/dist/cli/index.cjs +39 -39
- package/dist/cli/index.d.cts +3 -3
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.js +30 -30
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/{types-B_qmzlMk.d.cts → types-84M4J_Vm.d.cts} +11 -44
- package/dist/{types-B_qmzlMk.d.ts → types-84M4J_Vm.d.ts} +11 -44
- package/package.json +4 -4
- package/skills/create-adapter/SKILL.md +71 -26
- package/skills/create-task/SKILL.md +124 -66
- package/skills/evolve/SKILL.md +37 -20
- package/skills/evolve-evals/SKILL.md +142 -69
- package/skills/evolve-evals/references/cli-reference/agent.md +76 -0
- package/skills/evolve-evals/references/cli-reference/analysis.md +78 -0
- package/skills/evolve-evals/references/cli-reference/analyze.md +95 -0
- package/skills/evolve-evals/references/cli-reference/auth.md +96 -0
- package/skills/evolve-evals/references/cli-reference/check.md +156 -0
- package/skills/evolve-evals/references/cli-reference/dataset.md +154 -0
- package/skills/evolve-evals/references/cli-reference/filesystem.md +168 -0
- package/skills/evolve-evals/references/cli-reference/index.md +149 -0
- package/skills/evolve-evals/references/cli-reference/job.md +198 -0
- package/skills/evolve-evals/references/cli-reference/run.md +187 -0
- package/skills/evolve-evals/references/cli-reference/secrets.md +77 -0
- package/skills/evolve-evals/references/cli-reference/session.md +56 -0
- package/skills/evolve-evals/references/cli-reference/skill.md +52 -0
- package/skills/evolve-evals/references/cli-reference/skills.md +85 -0
- package/skills/evolve-evals/references/cli-reference/trial.md +115 -0
- package/skills/evolve-evals/references/cli-reference/upload.md +72 -0
- package/skills/evolve-evals/references/core-concepts/agents.md +96 -0
- package/skills/evolve-evals/references/core-concepts/analyze.md +143 -0
- package/skills/evolve-evals/references/core-concepts/check.md +116 -0
- package/skills/evolve-evals/references/core-concepts/compatibility.md +39 -0
- package/skills/evolve-evals/references/core-concepts/compose.md +103 -0
- package/skills/evolve-evals/references/core-concepts/datasets.md +234 -0
- package/skills/evolve-evals/references/core-concepts/index.md +52 -0
- package/skills/evolve-evals/references/core-concepts/jobs.md +223 -0
- package/skills/evolve-evals/references/core-concepts/models.md +73 -0
- package/skills/evolve-evals/references/core-concepts/multi-step.md +93 -0
- package/skills/evolve-evals/references/core-concepts/rewardkit.md +341 -0
- package/skills/evolve-evals/references/core-concepts/sandboxes.md +73 -0
- package/skills/evolve-evals/references/core-concepts/secrets.md +86 -0
- package/skills/evolve-evals/references/core-concepts/sharing.md +81 -0
- package/skills/evolve-evals/references/core-concepts/skills.md +100 -0
- package/skills/evolve-evals/references/core-concepts/task-config.md +169 -0
- package/skills/evolve-evals/references/core-concepts/task-environment.md +127 -0
- package/skills/evolve-evals/references/core-concepts/task-reference.md +191 -0
- package/skills/evolve-evals/references/core-concepts/task-verifiers.md +209 -0
- package/skills/evolve-evals/references/core-concepts/tasks.md +90 -0
- package/skills/evolve-evals/references/core-concepts/teams.md +128 -0
- package/skills/evolve-evals/references/core-concepts/trial-outputs.md +225 -0
- package/skills/evolve-evals/references/core-concepts/trials.md +129 -0
- package/skills/evolve-evals/references/core-concepts/upload-sdk-session.md +240 -0
- package/skills/evolve-evals/references/core-concepts/upload.md +166 -0
- package/skills/evolve-evals/references/dashboard/checks.md +54 -0
- package/skills/evolve-evals/references/dashboard/datasets.md +65 -0
- package/skills/evolve-evals/references/dashboard/jobs.md +106 -0
- package/skills/evolve-evals/references/dashboard/traces.md +54 -0
- package/skills/evolve-evals/references/dashboard/trial-viewer.md +77 -0
- package/skills/evolve-evals/references/getting-started/first-task.md +228 -0
- package/skills/evolve-evals/references/getting-started/installation.md +79 -0
- package/skills/evolve-evals/references/getting-started/quick-start.md +100 -0
- package/skills/evolve-evals/references/index.md +58 -0
- package/skills/evolve-evals/references/sdk/http.md +110 -0
- package/skills/evolve-evals/references/sdk/python.md +108 -0
- package/skills/evolve-evals/references/sdk/typescript.md +104 -0
- package/skills/evolve-evals/references/sdk-reference/agents.md +75 -0
- package/skills/evolve-evals/references/sdk-reference/analyses.md +124 -0
- package/skills/evolve-evals/references/sdk-reference/auth.md +171 -0
- package/skills/evolve-evals/references/sdk-reference/checks.md +145 -0
- package/skills/evolve-evals/references/sdk-reference/datasets.md +170 -0
- package/skills/evolve-evals/references/sdk-reference/error-codes.md +231 -0
- package/skills/evolve-evals/references/sdk-reference/errors.md +98 -0
- package/skills/evolve-evals/references/sdk-reference/filesystem.md +166 -0
- package/skills/evolve-evals/references/sdk-reference/index.md +161 -0
- package/skills/evolve-evals/references/sdk-reference/jobs.md +250 -0
- package/skills/evolve-evals/references/sdk-reference/meta.md +54 -0
- package/skills/evolve-evals/references/sdk-reference/methods/agents.md +154 -0
- package/skills/evolve-evals/references/sdk-reference/methods/analyses.md +211 -0
- package/skills/evolve-evals/references/sdk-reference/methods/auth.md +257 -0
- package/skills/evolve-evals/references/sdk-reference/methods/checks.md +460 -0
- package/skills/evolve-evals/references/sdk-reference/methods/datasets.md +687 -0
- package/skills/evolve-evals/references/sdk-reference/methods/filesystem.md +527 -0
- package/skills/evolve-evals/references/sdk-reference/methods/jobs.md +1021 -0
- package/skills/evolve-evals/references/sdk-reference/methods/meta.md +209 -0
- package/skills/evolve-evals/references/sdk-reference/methods/secrets.md +157 -0
- package/skills/evolve-evals/references/sdk-reference/methods/skills.md +125 -0
- package/skills/evolve-evals/references/sdk-reference/methods/trials.md +371 -0
- package/skills/evolve-evals/references/sdk-reference/secrets.md +104 -0
- package/skills/evolve-evals/references/sdk-reference/skills.md +66 -0
- package/skills/evolve-evals/references/sdk-reference/trials.md +164 -0
- package/skills/evolve-evals/references/sdk-reference/types.md +1249 -0
- package/skills/publish/SKILL.md +103 -79
- package/skills/rewardkit/SKILL.md +78 -23
- package/spec/openapi.yaml +19 -74
- package/skills/evolve-evals/references/cli-reference/agent.mdx +0 -79
- package/skills/evolve-evals/references/cli-reference/analysis.mdx +0 -160
- package/skills/evolve-evals/references/cli-reference/analyze.mdx +0 -84
- package/skills/evolve-evals/references/cli-reference/auth.mdx +0 -133
- package/skills/evolve-evals/references/cli-reference/check.mdx +0 -263
- package/skills/evolve-evals/references/cli-reference/dataset.mdx +0 -151
- package/skills/evolve-evals/references/cli-reference/index.mdx +0 -108
- package/skills/evolve-evals/references/cli-reference/job.mdx +0 -278
- package/skills/evolve-evals/references/cli-reference/run.mdx +0 -204
- package/skills/evolve-evals/references/cli-reference/secrets.mdx +0 -95
- package/skills/evolve-evals/references/cli-reference/skill.mdx +0 -61
- package/skills/evolve-evals/references/cli-reference/skills.mdx +0 -81
- package/skills/evolve-evals/references/cli-reference/trial.mdx +0 -181
- package/skills/evolve-evals/references/cli-reference/upload.mdx +0 -36
- package/skills/evolve-evals/references/core-concepts/agents.mdx +0 -106
- package/skills/evolve-evals/references/core-concepts/analyze.mdx +0 -86
- package/skills/evolve-evals/references/core-concepts/check.mdx +0 -64
- package/skills/evolve-evals/references/core-concepts/datasets.mdx +0 -138
- package/skills/evolve-evals/references/core-concepts/index.mdx +0 -42
- package/skills/evolve-evals/references/core-concepts/jobs.mdx +0 -151
- package/skills/evolve-evals/references/core-concepts/models.mdx +0 -68
- package/skills/evolve-evals/references/core-concepts/sandboxes.mdx +0 -52
- package/skills/evolve-evals/references/core-concepts/secrets.mdx +0 -41
- package/skills/evolve-evals/references/core-concepts/sharing.mdx +0 -35
- package/skills/evolve-evals/references/core-concepts/skills.mdx +0 -42
- package/skills/evolve-evals/references/core-concepts/tasks.mdx +0 -216
- package/skills/evolve-evals/references/core-concepts/teams.mdx +0 -36
- package/skills/evolve-evals/references/core-concepts/trial-outputs.mdx +0 -117
- package/skills/evolve-evals/references/core-concepts/trials.mdx +0 -103
- package/skills/evolve-evals/references/core-concepts/upload.mdx +0 -93
- package/skills/evolve-evals/references/dashboard/checks.mdx +0 -21
- package/skills/evolve-evals/references/dashboard/datasets.mdx +0 -24
- package/skills/evolve-evals/references/dashboard/jobs.mdx +0 -65
- package/skills/evolve-evals/references/dashboard/traces.mdx +0 -17
- package/skills/evolve-evals/references/dashboard/trial-viewer.mdx +0 -30
- package/skills/evolve-evals/references/getting-started/installation.mdx +0 -56
- package/skills/evolve-evals/references/getting-started/quick-start.mdx +0 -94
- package/skills/evolve-evals/references/index.mdx +0 -48
- package/skills/evolve-evals/references/sdk/python.mdx +0 -161
- package/skills/evolve-evals/references/sdk/typescript.mdx +0 -163
- package/skills/evolve-evals/references/sdk-reference/agents.mdx +0 -108
- package/skills/evolve-evals/references/sdk-reference/analyses.mdx +0 -222
- package/skills/evolve-evals/references/sdk-reference/auth.mdx +0 -116
- package/skills/evolve-evals/references/sdk-reference/checks.mdx +0 -300
- package/skills/evolve-evals/references/sdk-reference/datasets.mdx +0 -346
- package/skills/evolve-evals/references/sdk-reference/errors.mdx +0 -210
- package/skills/evolve-evals/references/sdk-reference/index.mdx +0 -60
- package/skills/evolve-evals/references/sdk-reference/jobs.mdx +0 -822
- package/skills/evolve-evals/references/sdk-reference/meta.mdx +0 -52
- package/skills/evolve-evals/references/sdk-reference/skills.mdx +0 -69
- package/skills/evolve-evals/references/sdk-reference/trials.mdx +0 -302
- package/skills/evolve-evals/references/sdk-reference/types.mdx +0 -274
- package/skills/evolve-evals/references/snippets/global-options.mdx +0 -13
- package/skills/evolve-evals/references/snippets/list-flags.mdx +0 -23
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "agents"
|
|
3
|
-
description: "Register and manage your own agents."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
`agents()` returns the registered-agents client. A registered agent's name works in a job's `agents[].name` like a built-in.
|
|
7
|
-
|
|
8
|
-
## create
|
|
9
|
-
|
|
10
|
-
<Tabs>
|
|
11
|
-
<Tab title="TypeScript">
|
|
12
|
-
```ts
|
|
13
|
-
create(input: { name: string; org?: string; run_command: string; env?: Record<string, string> } & ({ install_script: string } | { directory: string })): Promise<Agent>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Register an agent from an install script's text, or from a local directory. `run_command` runs with `sh -c` at the task's working directory; what it can rely on, and the registration limit, are on [agents](/core-concepts/agents#register-your-own-agent). The registration belongs to you and to an organization (`org`, a slug or id; omitted, the client's `org` default, else your personal one): its members may name the agent in their own jobs, and only you can change or delete it. A name stays unique per person, so two teammates may each register their own `acme-cli`.
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
const agent = await agents().create({
|
|
20
|
-
name: "acme-cli",
|
|
21
|
-
install_script: "curl -fsSL https://acme.dev/install.sh | sh",
|
|
22
|
-
run_command: "acme-cli --headless",
|
|
23
|
-
});
|
|
24
|
-
```
|
|
25
|
-
</Tab>
|
|
26
|
-
<Tab title="Python">
|
|
27
|
-
```python
|
|
28
|
-
async def create(
|
|
29
|
-
*,
|
|
30
|
-
name: str,
|
|
31
|
-
install_script: Optional[str] = None,
|
|
32
|
-
directory: Optional[str] = None,
|
|
33
|
-
run_command: str,
|
|
34
|
-
env: Optional[Dict[str, str]] = None,
|
|
35
|
-
org: Optional[str] = None,
|
|
36
|
-
) -> Agent
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Register an agent from an install script's text, or from a local directory. `run_command` runs with `sh -c` at the task's working directory; what it can rely on, and the registration limit, are on [agents](/core-concepts/agents#register-your-own-agent). The registration belongs to you and to an organization (`org`, a slug or id; omitted, the client's `org` default, else your personal one): its members may name the agent in their own jobs, and only you can change or delete it. A name stays unique per person, so two teammates may each register their own `acme-cli`.
|
|
40
|
-
|
|
41
|
-
```python
|
|
42
|
-
agent = await agents().create(
|
|
43
|
-
name="acme-cli",
|
|
44
|
-
install_script="curl -fsSL https://acme.dev/install.sh | sh",
|
|
45
|
-
run_command="acme-cli --headless",
|
|
46
|
-
)
|
|
47
|
-
```
|
|
48
|
-
</Tab>
|
|
49
|
-
</Tabs>
|
|
50
|
-
|
|
51
|
-
## list, get, upsert, delete
|
|
52
|
-
|
|
53
|
-
<Tabs>
|
|
54
|
-
<Tab title="TypeScript">
|
|
55
|
-
```ts
|
|
56
|
-
list(options?: { scope?: "my" | "shared" | "org"; limit?: number; cursor?: string }): AgentList
|
|
57
|
-
get(name: string): Promise<Agent>
|
|
58
|
-
upsert(
|
|
59
|
-
name: string,
|
|
60
|
-
input: { run_command: string; env?: Record<string, string> } & ({ install_script: string } | { directory: string }),
|
|
61
|
-
): Promise<Agent>
|
|
62
|
-
delete(name: string): Promise<void>
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Registered agents, one agent, replace one without a gap, or delete one. `scope` is the lists' own vocabulary: `"my"` (yours, the default), `"shared"` (your organizations' other members') or `"org"` (every registration in your organizations, yours included); `get` takes a name, which is yours by construction. Past jobs keep the agent they recorded. `upsert` creates when the name is free and replaces when it is not, consuming no new slot; it is a full replacement, so an omitted `env` becomes empty.
|
|
66
|
-
|
|
67
|
-
```ts
|
|
68
|
-
await agents().upsert(
|
|
69
|
-
"acme-cli",
|
|
70
|
-
{
|
|
71
|
-
install_script: "curl -fsSL https://acme.dev/install.sh | sh",
|
|
72
|
-
run_command: "acme-cli --headless --v2",
|
|
73
|
-
},
|
|
74
|
-
);
|
|
75
|
-
```
|
|
76
|
-
</Tab>
|
|
77
|
-
<Tab title="Python">
|
|
78
|
-
```python
|
|
79
|
-
def list(
|
|
80
|
-
*,
|
|
81
|
-
scope: Optional[Literal['my', 'shared', 'org']] = None,
|
|
82
|
-
limit: Optional[int] = None,
|
|
83
|
-
cursor: Optional[str] = None,
|
|
84
|
-
)
|
|
85
|
-
async def get(name: str) -> Agent
|
|
86
|
-
async def upsert(
|
|
87
|
-
name: str,
|
|
88
|
-
*,
|
|
89
|
-
run_command: str,
|
|
90
|
-
install_script: Optional[str] = None,
|
|
91
|
-
directory: Optional[str] = None,
|
|
92
|
-
env: Optional[Dict[str, str]] = None,
|
|
93
|
-
org: Optional[str] = None,
|
|
94
|
-
) -> Agent
|
|
95
|
-
async def delete(name: str) -> None
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Registered agents, one agent, replace one without a gap, or delete one. `scope` is the lists' own vocabulary: `"my"` (yours, the default), `"shared"` (your organizations' other members') or `"org"` (every registration in your organizations, yours included); `get` takes a name, which is yours by construction. Past jobs keep the agent they recorded. `upsert` creates when the name is free and replaces when it is not, consuming no new slot; it is a full replacement, so an omitted `env` becomes empty.
|
|
99
|
-
|
|
100
|
-
```python
|
|
101
|
-
await agents().upsert(
|
|
102
|
-
"acme-cli",
|
|
103
|
-
install_script="curl -fsSL https://acme.dev/install.sh | sh",
|
|
104
|
-
run_command="acme-cli --headless --v2",
|
|
105
|
-
)
|
|
106
|
-
```
|
|
107
|
-
</Tab>
|
|
108
|
-
</Tabs>
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "analyses"
|
|
3
|
-
description: "Read trace-analysis runs."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
`analyses()` returns the analyses client. Analyses are started from a job, with `jobs().analyze()`; this client reads them back.
|
|
7
|
-
|
|
8
|
-
## list
|
|
9
|
-
|
|
10
|
-
<Tabs>
|
|
11
|
-
<Tab title="TypeScript">
|
|
12
|
-
```ts
|
|
13
|
-
list(options?: { scope?: "my" | "shared" | "org"; job?: string; status?: AnalysisStatus[]; limit?: number; cursor?: string }): AnalysisList
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Analysis runs, newest first, each naming the trial, job and task it judged.
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
for await (const a of analyses().list({
|
|
20
|
-
job: job.id,
|
|
21
|
-
status: ["failed"],
|
|
22
|
-
})) {
|
|
23
|
-
console.log(a.id, a.label);
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
</Tab>
|
|
27
|
-
<Tab title="Python">
|
|
28
|
-
```python
|
|
29
|
-
def list(
|
|
30
|
-
*,
|
|
31
|
-
scope: Optional[JobListScope] = None,
|
|
32
|
-
job: Optional[str] = None,
|
|
33
|
-
status: Optional[List[AnalysisStatus]] = None,
|
|
34
|
-
limit: Optional[int] = None,
|
|
35
|
-
cursor: Optional[str] = None,
|
|
36
|
-
)
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Analysis runs, newest first, each naming the trial, job and task it judged.
|
|
40
|
-
|
|
41
|
-
```python
|
|
42
|
-
async for a in analyses().list(
|
|
43
|
-
job=job.id,
|
|
44
|
-
status=["failed"],
|
|
45
|
-
):
|
|
46
|
-
print(a["id"], a["label"])
|
|
47
|
-
```
|
|
48
|
-
</Tab>
|
|
49
|
-
</Tabs>
|
|
50
|
-
|
|
51
|
-
## get, transcript, artifact
|
|
52
|
-
|
|
53
|
-
<Tabs>
|
|
54
|
-
<Tab title="TypeScript">
|
|
55
|
-
```ts
|
|
56
|
-
get(analysisId: string): Promise<TrialAnalysis>
|
|
57
|
-
transcript(
|
|
58
|
-
analysisId: string,
|
|
59
|
-
options?: { since?: number },
|
|
60
|
-
): Promise<AnalysisTranscript>
|
|
61
|
-
artifact(
|
|
62
|
-
analysisId: string,
|
|
63
|
-
stream: "trace-stdout" | "trace-stderr",
|
|
64
|
-
): Promise<string | null>
|
|
65
|
-
artifact(
|
|
66
|
-
analysisId: string,
|
|
67
|
-
stream: "agent-home",
|
|
68
|
-
): Promise<Record<string, string> | null>
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
The verdict document for every analysis, failed ones included, the analyzer's own transcript (everything after `since` in one read), or one stored artifact; an analysis has no verifier log and no trajectory. A run opens to its job's creator and every member of the organization; any other id answers `analysis_not_found` (`trial_not_found` from `transcript`).
|
|
72
|
-
|
|
73
|
-
```ts
|
|
74
|
-
const verdict = await analyses().get("a0a1b2c3-…");
|
|
75
|
-
```
|
|
76
|
-
</Tab>
|
|
77
|
-
<Tab title="Python">
|
|
78
|
-
The Python client has `list` and `download` only. Read a verdict from the analyzed trial: `(await trials().get(trial_id)).analysis`.
|
|
79
|
-
</Tab>
|
|
80
|
-
</Tabs>
|
|
81
|
-
|
|
82
|
-
## defaults
|
|
83
|
-
|
|
84
|
-
<Tabs>
|
|
85
|
-
<Tab title="TypeScript">
|
|
86
|
-
```ts
|
|
87
|
-
defaults(): Promise<AnalyzeDefaults>
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
The defaults an analysis runs under when you name none: `model_name`, `reasoning_effort`, `sandbox_provider`, the platform's `rubric`, and `prompt`, the built-in analyze prompt as a template with `{trial_path}`, `{task_section}` and `{criteria_guidance}` unrendered. Edit the rubric or the prompt from here and pass it to `jobs().analyze()`; passed back unchanged, they run exactly as the defaults do, and the analysis records them as named, so a later change of the platform default does not move it.
|
|
91
|
-
|
|
92
|
-
```ts
|
|
93
|
-
const { rubric } = await analyses().defaults();
|
|
94
|
-
```
|
|
95
|
-
</Tab>
|
|
96
|
-
<Tab title="Python">
|
|
97
|
-
```python
|
|
98
|
-
async def defaults() -> AnalyzeDefaults
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
The defaults an analysis runs under when you name none: `model_name`, `reasoning_effort`, `sandbox_provider`, the platform's `rubric`, and `prompt`, the built-in analyze prompt as a template with `{trial_path}`, `{task_section}` and `{criteria_guidance}` unrendered. Edit the rubric or the prompt from here and pass it to `jobs().analyze()`; passed back unchanged, they run exactly as the defaults do, and the analysis records them as named, so a later change of the platform default does not move it.
|
|
102
|
-
|
|
103
|
-
```python
|
|
104
|
-
rubric = (await analyses().defaults())["rubric"]
|
|
105
|
-
```
|
|
106
|
-
</Tab>
|
|
107
|
-
</Tabs>
|
|
108
|
-
|
|
109
|
-
## download
|
|
110
|
-
|
|
111
|
-
<Tabs>
|
|
112
|
-
<Tab title="TypeScript">
|
|
113
|
-
```ts
|
|
114
|
-
download(analysisId: string): Promise<Buffer>
|
|
115
|
-
download(
|
|
116
|
-
analysisId: string,
|
|
117
|
-
options: { to: string },
|
|
118
|
-
): Promise<string>
|
|
119
|
-
download(
|
|
120
|
-
analysisId: string,
|
|
121
|
-
options: { stream: true },
|
|
122
|
-
): Promise<ReadableStream<Uint8Array>>
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
The run as one `.tar.gz`, `analyze-<analyzed trial>__<7 chars>/`: a trial tree of the analyzer's own run, with `artifacts/analysis.json` on a completed run. The bytes, the saved file's path, or a stream. `analysis_not_terminal` while the run is queued or running.
|
|
126
|
-
|
|
127
|
-
```ts
|
|
128
|
-
const path = await analyses().download(
|
|
129
|
-
"a0a1b2c3-…",
|
|
130
|
-
{ to: "./analyses" },
|
|
131
|
-
);
|
|
132
|
-
```
|
|
133
|
-
</Tab>
|
|
134
|
-
<Tab title="Python">
|
|
135
|
-
```python
|
|
136
|
-
async def download(
|
|
137
|
-
analysis_id: str,
|
|
138
|
-
*,
|
|
139
|
-
to: Optional[str] = None,
|
|
140
|
-
)
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
The run as one `.tar.gz`, `analyze-<analyzed trial>__<7 chars>/`: the bytes, or with `to` the saved file's path. `analysis_not_found` for an id you cannot read, `analysis_not_terminal` while the run is queued or running.
|
|
144
|
-
|
|
145
|
-
```python
|
|
146
|
-
path = await analyses().download(
|
|
147
|
-
"a0a1b2c3-…",
|
|
148
|
-
to="./analyses",
|
|
149
|
-
)
|
|
150
|
-
```
|
|
151
|
-
</Tab>
|
|
152
|
-
</Tabs>
|
|
153
|
-
|
|
154
|
-
## filesystem(analysisId: string)
|
|
155
|
-
|
|
156
|
-
<Tabs>
|
|
157
|
-
<Tab title="TypeScript">
|
|
158
|
-
```ts
|
|
159
|
-
filesystem(analysisId: string): RunFilesystem
|
|
160
|
-
|
|
161
|
-
interface RunFilesystem {
|
|
162
|
-
status(): Promise<FilesystemStatus>
|
|
163
|
-
list(options?: { path?: string; source?: "live" | "capture"; cursor?: string; limit?: number }): Promise<FilesystemListing>
|
|
164
|
-
read(path: string, options?: { source?: "live" | "capture"; range?: TrialFileRange }): Promise<Buffer>
|
|
165
|
-
search(options: { q: string; path?: string; regex?: boolean; limit?: number; source?: "live" | "capture" }): Promise<FilesystemSearchResult>
|
|
166
|
-
changes(options?: { source?: "live" | "capture"; phase?: "setup" | "agent" | "verifier" | "all"; cursor?: string; limit?: number }): Promise<FilesystemChanges>
|
|
167
|
-
archive(options?: { path?: string; source?: "live" | "capture" }): Promise<Buffer>
|
|
168
|
-
archive(options: { path?: string; source?: "live" | "capture"; to: string }): Promise<string>
|
|
169
|
-
watch(paths: string[]): Promise<FilesystemWatchResult>
|
|
170
|
-
events(options?: { lastEventId?: string; signal?: AbortSignal }): AsyncIterableIterator<FilesystemStreamEvent>
|
|
171
|
-
logs(options: { stream: SandboxLogStream; cursor?: string; limit?: number }): Promise<SandboxLogLines>
|
|
172
|
-
logEvents(options?: { lastEventId?: string; signal?: AbortSignal }): AsyncIterableIterator<SandboxLogEvent>
|
|
173
|
-
procs(): Promise<SandboxProcs>
|
|
174
|
-
}
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
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`.
|
|
178
|
-
|
|
179
|
-
`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`).
|
|
180
|
-
|
|
181
|
-
`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.
|
|
182
|
-
|
|
183
|
-
```ts
|
|
184
|
-
const fs = analyses().filesystem(analysis.id);
|
|
185
|
-
const { state } = await fs.status();
|
|
186
|
-
for (const entry of (await fs.list({ path: "/app/work" })).entries) console.log(entry.name, entry.changed);
|
|
187
|
-
const main = (await fs.read("/app/work/main.py")).toString("utf8");
|
|
188
|
-
for await (const frame of fs.events()) if (frame.event === "fs") console.log(frame.data.path, frame.data.type);
|
|
189
|
-
```
|
|
190
|
-
</Tab>
|
|
191
|
-
<Tab title="Python">
|
|
192
|
-
```python
|
|
193
|
-
def filesystem(self, analysis_id: str) -> RunFilesystem
|
|
194
|
-
|
|
195
|
-
class RunFilesystem:
|
|
196
|
-
async def status(self) -> FilesystemStatus
|
|
197
|
-
async def list(self, *, path="/", source=None, cursor=None, limit=None) -> FilesystemListing
|
|
198
|
-
async def read(self, path, *, source=None, start=None, end=None, suffix=None) -> bytes
|
|
199
|
-
async def search(self, q, *, path="/", regex=False, limit=None, source=None) -> FilesystemSearchResult
|
|
200
|
-
async def changes(self, *, source=None, phase=None, cursor=None, limit=None) -> FilesystemChanges
|
|
201
|
-
async def archive(self, *, path="/", source=None, to=None) # bytes, or the saved path with to=
|
|
202
|
-
async def watch(self, paths) -> FilesystemWatchResult
|
|
203
|
-
def events(self, *, last_event_id=None) -> AsyncIterator[FilesystemStreamEvent]
|
|
204
|
-
async def logs(self, stream, *, cursor=None, limit=None) -> SandboxLogLines
|
|
205
|
-
def log_events(self, *, last_event_id=None) -> AsyncIterator[SandboxLogEvent]
|
|
206
|
-
async def procs(self) -> SandboxProcs
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
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.
|
|
210
|
-
|
|
211
|
-
```python
|
|
212
|
-
fs = analyses().filesystem(analysis.id)
|
|
213
|
-
print((await fs.status()).state)
|
|
214
|
-
for entry in (await fs.list(path="/app/work")).entries:
|
|
215
|
-
print(entry.name, entry.changed)
|
|
216
|
-
main = (await fs.read("/app/work/main.py")).decode()
|
|
217
|
-
async for frame in fs.events():
|
|
218
|
-
if frame.event == "fs":
|
|
219
|
-
print(frame.data["path"], frame.data["type"])
|
|
220
|
-
```
|
|
221
|
-
</Tab>
|
|
222
|
-
</Tabs>
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "auth and orgs"
|
|
3
|
-
description: "Who you are, and your organizations."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
`auth()` returns the identity client, `orgs()` the organizations client. Every job, dataset and analysis belongs to an organization: your personal one unless you name another. Name it per call (`org` on `jobs().start()` and `datasets().publish()`) or once for a client (`HostedClientConfig.org`); the call's own value wins.
|
|
7
|
-
|
|
8
|
-
## auth.status
|
|
9
|
-
|
|
10
|
-
<Tabs>
|
|
11
|
-
<Tab title="TypeScript">
|
|
12
|
-
```ts
|
|
13
|
-
status(): Promise<AuthStatus>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
The caller and the API key in use: `user_id`, `email`, and `key` with `id`, `label`, `created_at` and `last_used_at`. The key's secret is never returned, and `last_used_at` is always null today.
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
const me = await auth().status();
|
|
20
|
-
```
|
|
21
|
-
</Tab>
|
|
22
|
-
<Tab title="Python">
|
|
23
|
-
```python
|
|
24
|
-
async def status() -> AuthStatus
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
The caller and the API key in use. The key's secret is never returned.
|
|
28
|
-
|
|
29
|
-
```python
|
|
30
|
-
me = await auth().status()
|
|
31
|
-
```
|
|
32
|
-
</Tab>
|
|
33
|
-
</Tabs>
|
|
34
|
-
|
|
35
|
-
## orgs.list, orgs.get
|
|
36
|
-
|
|
37
|
-
<Tabs>
|
|
38
|
-
<Tab title="TypeScript">
|
|
39
|
-
```ts
|
|
40
|
-
list(): Promise<Organization[]>
|
|
41
|
-
get(org: string): Promise<OrganizationDetail>
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
The organizations you belong to, or one organization with your role, its members, its quota and live usage.
|
|
45
|
-
|
|
46
|
-
```ts
|
|
47
|
-
const org = await orgs().get("acme");
|
|
48
|
-
```
|
|
49
|
-
</Tab>
|
|
50
|
-
<Tab title="Python">
|
|
51
|
-
```python
|
|
52
|
-
async def list() -> List[Organization]
|
|
53
|
-
async def get(org: str) -> OrganizationDetail
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
The organizations you belong to, or one organization with your role, its members, its quota and live usage.
|
|
57
|
-
|
|
58
|
-
```python
|
|
59
|
-
org = await orgs().get("acme")
|
|
60
|
-
```
|
|
61
|
-
</Tab>
|
|
62
|
-
</Tabs>
|
|
63
|
-
|
|
64
|
-
## orgs.create, orgs.invite, orgs.join, orgs.members
|
|
65
|
-
|
|
66
|
-
<Tabs>
|
|
67
|
-
<Tab title="TypeScript">
|
|
68
|
-
```ts
|
|
69
|
-
create(name: string, options?: { displayName?: string }): Promise<Organization>
|
|
70
|
-
invite(org: string): Promise<OrgInviteCreated>
|
|
71
|
-
join(token: string): Promise<OrgJoined>
|
|
72
|
-
members(org: string): Promise<OrgMember[]>
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Create an organization (you become its owner; the name is its slug), mint an invite token for one you own (the token is in the response once), join the organization a token names (`already_member` says whether you were in it already), or list an organization's members with their `email` and `role`.
|
|
76
|
-
|
|
77
|
-
```ts
|
|
78
|
-
const org = await orgs().create("acme", { displayName: "Acme Corp" });
|
|
79
|
-
const invite = await orgs().invite("acme");
|
|
80
|
-
// send invite.token to a teammate, who runs:
|
|
81
|
-
const joined = await orgs().join(invite.token);
|
|
82
|
-
const members = await orgs().members("acme");
|
|
83
|
-
```
|
|
84
|
-
</Tab>
|
|
85
|
-
<Tab title="Python">
|
|
86
|
-
```python
|
|
87
|
-
async def create(name: str, *, display_name: str | None = None) -> Organization
|
|
88
|
-
async def invite(org: str) -> OrgInviteCreated
|
|
89
|
-
async def join(token: str) -> OrgJoined
|
|
90
|
-
async def members(org: str) -> List[OrgMember]
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
The same four verbs: create an organization, mint an invite token for one you own, join with a token, list members.
|
|
94
|
-
|
|
95
|
-
```python
|
|
96
|
-
org = await orgs().create("acme", display_name="Acme Corp")
|
|
97
|
-
invite = await orgs().invite("acme")
|
|
98
|
-
joined = await orgs().join(invite.token)
|
|
99
|
-
members = await orgs().members("acme")
|
|
100
|
-
```
|
|
101
|
-
</Tab>
|
|
102
|
-
</Tabs>
|
|
103
|
-
|
|
104
|
-
## Quota and usage
|
|
105
|
-
|
|
106
|
-
`quota` is nine ceilings, each the value the platform administrator set or the fleet default; only the administrator's dashboard sets them, never a key or the SDK.
|
|
107
|
-
|
|
108
|
-
- `max_queued_trials`: the one that refuses. A job whose trials would not fit is refused with `quota_exceeded`.
|
|
109
|
-
- `max_concurrent_trials`, `max_concurrent_imports`, `max_concurrent_analyses` (trace analyses and task checks under one count): work beyond them waits.
|
|
110
|
-
- `monthly_budget_usd`: model spend allowed per UTC calendar month; a trial it refuses settles `BUDGET` with `team:` in its message. Null means no monthly budget.
|
|
111
|
-
- `max_concurrent_sandboxes_e2b`, `_daytona`, `_modal`: the organization's sandboxes in flight per provider, trials, analyses, regrade verifiers and managed sessions together; work beyond one waits, and an organization with no value of its own reads the platform's fleet ceiling.
|
|
112
|
-
- `max_concurrent_sessions`: managed-agent sessions open at once; recorded, not yet enforced.
|
|
113
|
-
|
|
114
|
-
A `0` pauses that kind of work: creates are refused at `max_queued_trials` 0, work waits at 0 on the concurrency ceilings, and `monthly_budget_usd` 0 pauses all model spend for the month.
|
|
115
|
-
|
|
116
|
-
`usage` is the live load: `in_flight_trials`, `queued_trials`, `in_flight_imports`, `in_flight_analyses`, `active_sessions` (the organization's managed-agent sessions not yet ended), and `month_spend_usd` with `month_spend_as_of`, the month-to-date model spend as of that time (UTC calendar month, reset on the 1st); it may lag by a few minutes. It is null, never 0, when no reading is held; `evolve auth org show` prints `unavailable` then.
|