Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ members = [
]

[workspace.package]
version = "1.0.0"
version = "1.1.0"
edition = "2021"
license = "AGPL-3.0-only"
rust-version = "1.80"
Expand Down
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,36 @@ box = wd.sandboxes.create(
box.exec("opencode run 'add a regression test'")
```

#### Templates and agent PR runs

```ts
await wd.templates.create({
name: "node-app",
create: {
image: "node-python",
resources: { cpu: 2, memory_mb: 4096, disk_gb: 16 },
startup: {
git: { url: "https://github.com/acme/app.git", ref: "main" },
commands: [{ name: "install", run: "pnpm install --frozen-lockfile" }],
},
},
});
const boxes = await wd.templates.spawn("node-app", { count: 3 });

await wd.secrets.set("OPENAI_API_KEY", process.env.OPENAI_API_KEY!);
await wd.secrets.set("GITHUB_TOKEN", process.env.GITHUB_TOKEN!);
const run = await wd.agentRuns.create({
template: "node-app",
repo: { url: "https://github.com/acme/app.git", ref: "main" },
agent: "codex",
model: "gpt-5",
api_key_secret: "OPENAI_API_KEY",
prompt: "Fix the failing tests and open a small PR.",
github: { token_secret: "GITHUB_TOKEN", draft: true },
});
console.log(run.status_url);
```

#### Network egress policy

```ts
Expand Down
Loading