[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81333":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":17,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":15,"starSnapshotCount":15,"syncStatus":13,"lastSyncTime":35,"discoverSource":36},81333,"cloudbox","acoyfellow\u002Fcloudbox","acoyfellow","Synthetic cloud computers for training and evaluating long-horizon agents on Cloudflare. Persona → filesystem → artifacts → collaborators → simulation → retrospective.","https:\u002F\u002Fcloudbox.coey.dev",null,"TypeScript",43,2,42,0,1,3,44.03,"MIT License",false,"main",true,[24,25,26,27,28,29,30,31],"agent-evaluation","ai-agents","alchemy","cloudflare","cloudflare-workers","durable-objects","eval","synthetic-data","2026-06-12 04:01:32","# Cloudbox\n\n[![check](https:\u002F\u002Fgithub.com\u002Facoyfellow\u002Fcloudbox\u002Factions\u002Fworkflows\u002Fcheck.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Facoyfellow\u002Fcloudbox\u002Factions\u002Fworkflows\u002Fcheck.yml)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-black.svg)](.\u002FLICENSE)\n\n[![Deploy to Cloudflare](https:\u002F\u002Fdeploy.workers.cloudflare.com\u002Fbutton)](https:\u002F\u002Fdeploy.workers.cloudflare.com\u002F?url=https:\u002F\u002Fgithub.com\u002Facoyfellow\u002Fcloudbox)\n\nCloudbox is a deploy-your-own Cloudflare Worker that hands an agent a real Linux box on a real repo and records what happens: receipts, artifacts, grades, and a replayable trail.\n\nIt is designed to move people from:\n\n```txt\nhomepage → demo → docs → source → deploy to Cloudflare\n```\n\n## Try it\n\n- Live app: https:\u002F\u002Fcloudbox.coey.dev\n- Demo: https:\u002F\u002Fcloudbox.coey.dev\u002Fdemo\n- Docs: https:\u002F\u002Fcloudbox.coey.dev\u002Fdocs\n- Source: https:\u002F\u002Fgithub.com\u002Facoyfellow\u002Fcloudbox\n- Deploy: https:\u002F\u002Fdeploy.workers.cloudflare.com\u002F?url=https:\u002F\u002Fgithub.com\u002Facoyfellow\u002Fcloudbox\n\n## Quickstart\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Facoyfellow\u002Fcloudbox\ncd cloudbox\npnpm install\npnpm run dev\n```\n\nOpen the local URL and click **Demo**.\n\n## Deploy your own\n\nCloudbox is built to be your Cloudbox. You fork, you deploy, you own the data plane. Cloudflare resources are provisioned through `alchemy.run.ts`:\n\n- Worker for the web app and API\n- `CloudboxRunner` Durable Object that fronts a Cloudflare Container (`cloudbox-runner`) for real execution\n- `ComputerDO` Durable Object namespace for per-workspace state and receipts\n- R2 bucket for artifacts\n- D1 database for indexes and migrations\n- Static assets for the Astro app\n- Optional custom domain\n\nThe intended production path is GitHub Actions + Cloudflare. Use the Deploy button above, or fork and set these GitHub environment secrets:\n\n```txt\nCLOUDFLARE_ACCOUNT_ID\nCLOUDFLARE_API_TOKEN\nALCHEMY_PASSWORD\nALCHEMY_STATE_TOKEN\nCLOUDBOX_API_TOKEN\nCLOUDBOX_D1_DATABASE_ID\n```\n\n> Status: the GitHub Actions deploy path is verified for this repo. The one-click Deploy to Cloudflare button is the public funnel and should be treated as experimental from a fresh external account until tested.\n\nThe Cloudflare API token needs:\n\n```txt\nAccount read\nWorkers Scripts edit\nWorkers Tail read\nWorkers Containers read\u002Fwrite\nD1 edit\nR2 edit\nSecrets Store edit\nZone read\u002Fedit if using a custom domain\n```\n\nProduction resource names:\n\n```txt\nWorker:          cloudbox\nContainer:       cloudbox-runner\nRunner DO class: CloudboxRunner\nRunner container app: cloudbox-runner-v2\nWorkspace DO:    ComputerDO (CLOUDBOX_COMPUTER)\nD1:              cloudbox-prod\nR2:              cloudbox-artifacts\nState store:     alchemy-state-store\n```\n\nRunner sizing is configurable at deploy time:\n\n```txt\nCLOUDBOX_RUNNER_INSTANCE_TYPE=standard   # or the largest instance type your account supports\nCLOUDBOX_RUNNER_MAX_INSTANCES=2\n```\n\nUse GitHub environment variables for sizing. The workflow defaults production to `standard`; local Alchemy fallback is `lite`.\n\n## What a run looks like\n\nA run gives an agent a clean Linux container, a public repo, commands, verification, and an artifact to return. Cloudbox records the trail.\n\n```sh\ncurl -s https:\u002F\u002Fcloudbox.coey.dev\u002Fapi\u002Fruns \\\n  -H \"authorization: Bearer $CLOUDBOX_API_TOKEN\" \\\n  -H \"content-type: application\u002Fjson\" \\\n  -d '{\n    \"repo\": \"https:\u002F\u002Fgithub.com\u002Facoyfellow\u002Fcloudbox\",\n    \"commands\": [\"pnpm install --ignore-scripts\"],\n    \"verify\": [\"pnpm run build\", \"pnpm run test\"],\n    \"artifact\": \"HANDOFF.md\"\n  }'\n```\n\nThe response includes:\n\n- `runId` — stable id for looking up the run later when D1 is bound\n- `ok` — verification passed\n- `receipts` — per-step clone\u002Fcommand\u002Fverify events with exit codes, stdout, stderr, timestamps\n- `runnerReceipts` — container lifecycle events (boot, request, error) from the `CloudboxRunner` DO\n- `artifact` — `{ path, content }` of the requested file\n- `diff` — patch summary of changes made by the run\n\n## North star: steer a run while it is alive\n\nCloudbox should stay centered on **runs**, not become a separate generic remote-development product. Today a run is clean, bounded, and proof-producing: clone a repo, execute commands, verify, return receipts and an artifact.\n\nThe next scope is to make that same run temporarily interactive:\n\n- keep the repo filesystem available long enough for follow-up reads, writes, and commands\n- let a human and an agent steer the same remote computer through CLI or MCP\n- optionally start a dev process such as `bun run dev` and expose a secure preview URL for fast iteration\n- close the run back into Cloudbox's existing proof model: receipts, diff, artifact, and a shareable trail\n\nThat north star extends `\u002Fapi\u002Fruns`; it should not require Cloudbox to fork into a separate `\u002Fapi\u002Fworkspaces` product.\n\n## Bring your agent\n\nCloudbox is agent-agnostic. Anything that can POST JSON can drive it. Patterns:\n\n- **HTTP only** — your agent posts to `\u002Fapi\u002Fruns` and reads back receipts + artifact. No SDK required.\n- **Workspace protocol** — agents that want files, ask\u002Fsubmit semantics, and grading drive `\u002Fapi\u002Fc\u002F:id\u002F*` after materializing a `ComputerSpec`.\n- **Think integration** — `createCloudboxTools()` from `src\u002Fthink.ts` exposes `env_list \u002F env_read \u002F env_write \u002F env_ask \u002F env_submit` to a Think loop.\n- **Any framework** — OpenAI SDK, AI SDK, Mastra, custom — the API is just JSON.\n\nSee `docs\u002Frecipes` for examples.\n\n## Demo flow\n\nThe hosted demo runs a public GitHub repo in Cloudbox and shows the proof trail:\n\n1. runner lifecycle receipts from the `CloudboxRunner` Container\n2. clone\u002Frun\u002Fverify\u002Fdiff receipts from the repo task\n3. one returned artifact for human inspection\n\nRun the local proof scripts:\n\n```sh\npnpm run demo:fast\npnpm run demo:browser\n```\n\n## Recipes\n\n### Fix a bug\n\nUse `reproduce`, `fix`, and `verify` so the result proves both failure and repair.\n\n```json\n{\n  \"repo\": \"https:\u002F\u002Fgithub.com\u002Fyou\u002Fapp\",\n  \"commands\": [\"npm test -- checkout || true\"],\n  \"verify\": [\"npm test -- checkout\", \"npm run build\"],\n  \"artifact\": \"HANDOFF.md\"\n}\n```\n\n### Upgrade dependencies\n\n```json\n{\n  \"repo\": \"https:\u002F\u002Fgithub.com\u002Fyou\u002Fapp\",\n  \"commands\": [\"pnpm up\"],\n  \"verify\": [\"pnpm run build\", \"pnpm test\"],\n  \"artifact\": \"UPGRADE.md\"\n}\n```\n\n### Investigate flakes\n\n```json\n{\n  \"repo\": \"https:\u002F\u002Fgithub.com\u002Fyou\u002Fapp\",\n  \"commands\": [\"npm run test:browser -- --repeat 5 || true\"],\n  \"verify\": [\"npm run test:browser -- --repeat 5\"],\n  \"artifact\": \"FLAKE_REPORT.md\"\n}\n```\n\n## How it works\n\nCloudbox has two layers:\n\n1. **Control plane** — Worker routes, `ComputerDO` for workspaces, R2 artifacts, D1 indexes, receipt grading.\n2. **Runner** — `CloudboxRunner` Durable Object wraps a Cloudflare Container that clones repos, runs commands, verifies, captures diff, and returns artifacts. Container lifecycle events flow back as `runnerReceipts`.\n\nThe container image is in `runner\u002FDockerfile` and ships with `git`, `node`, `bun`, and `pnpm` preinstalled.\n\n## API reference\n\nWorkspace protocol (per-`ComputerSpec`):\n\n```sh\nPOST \u002Fapi\u002Fcomputers\nPOST \u002Fapi\u002Fbrief\nGET  \u002Fapi\u002Fc\u002F:id\u002Flist\nGET  \u002Fapi\u002Fc\u002F:id\u002Fread?path=README.md\nPOST \u002Fapi\u002Fc\u002F:id\u002Fask\nPOST \u002Fapi\u002Fc\u002F:id\u002Fwrite\nPOST \u002Fapi\u002Fc\u002F:id\u002Fsubmit\nGET  \u002Fapi\u002Fc\u002F:id\u002Freceipts\nGET  \u002Fapi\u002Fc\u002F:id\u002Fgrade\nGET  \u002Fapi\u002Fc\u002F:id\u002Fspec\n```\n\nReal repo runs (Container-backed):\n\n```sh\nPOST \u002Fapi\u002Fruns\nGET  \u002Fapi\u002Fruns\u002Frecent   # when D1 is bound\nGET  \u002Fapi\u002Fruns\u002F:runId   # when D1 is bound\n```\n\n```ts\ntype RunInput = {\n  repo: string;          \u002F\u002F public GitHub HTTPS repo\n  commands?: string[];   \u002F\u002F setup \u002F change \u002F reproduce commands\n  verify?: string[];     \u002F\u002F verification commands\n  artifact?: string;     \u002F\u002F file to return, e.g. HANDOFF.md\n  timeoutMs?: number;\n};\n```\n\nAuthenticated with `Authorization: Bearer $CLOUDBOX_API_TOKEN` (when the secret is set).\n\n## Tooling story\n\n- **pnpm** is the recommended package manager for installing Cloudbox and for CI. GitHub Actions uses `pnpm install --no-frozen-lockfile --ignore-scripts`.\n- **Bun** is still required by the Alchemy\u002Fdevelopment scripts and by the runner image. Install Bun ≥ 1.3 and Node ≥ 22.\n- The runner container ships with `git`, `node`, `bun`, and `pnpm`; recipe examples lean on pnpm, but your repo can run whatever commands it needs.\n\n## Development\n\n```sh\npnpm run build\npnpm run typecheck\npnpm run test\npnpm run demo:fast\npnpm run demo:browser\npnpm run runner:test\n```\n\n## Status\n\nCloudbox is early. The deployed app, demo, receipts, artifacts, grading, deploy path, Cloudflare Container runner path, and shareable public run pages are in the repo. Real repo runs go through `POST \u002Fapi\u002Fruns` and execute in the `CloudboxRunner` container. The next product step is interactive runs: preserving the same proof model while a human and an agent can steer files, commands, and an optional secure dev preview before the run closes.\n\n## Research lineage\n\nCloudbox is inspired by computer-use research, but the product is real repo work for agents and humans: short feedback loops, visible receipts, Cloudflare Container execution, and proof you can inspect.\n\n## License\n\nMIT\n","Cloudbox 是一个基于 Cloudflare Workers 的项目，用于在合成的云环境中训练和评估长周期代理。它通过为代理提供真实的 Linux 环境和代码仓库，并记录所有操作过程（包括收据、工件、评分及可回放的操作轨迹）来实现这一目标。核心功能和技术特点包括使用 TypeScript 编写，集成 Cloudflare Workers 和 Durable Objects 以确保高性能与持久性存储，同时利用 R2 和 D1 分别进行文件管理和数据索引。适用于需要对 AI 代理进行测试或希望在可控环境下运行复杂计算任务的场景，如研究机构、开发者团队等。","2026-06-11 04:04:39","CREATED_QUERY"]