@getdiff/cloud
v0.1.0
Published
Cloud development environment for GetDiff — sandboxed agent sessions with pluggable backends
Maintainers
Readme
@getdiff/cloud
Cloud development environment for the GetDiff SDK — sandboxed agent sessions with pluggable backends.
Run agents in isolated cloud containers. Every session gets its own sandbox with repo access, build tools, and test runners.
Install
npm install @getdiff/cloudQuick Start
import { startServer } from "@getdiff/cloud";
const { server, orchestrator } = await startServer({
port: 3000,
});
// Session API now available at http://localhost:3000Session API
Every agent session is addressable via URL.
POST /api/v1/sessions Create a new session
GET /api/v1/sessions List sessions
GET /api/v1/sessions/:id Session metadata and status
DELETE /api/v1/sessions/:id Tear down the environment
POST /api/v1/sessions/:id/approve Approve a pending action
WS /api/v1/sessions/:id/stream Real-time event streamBackends
E2B (default)
Cloud sandboxes via E2B. Fast startup, filesystem snapshots for warm restart.
export E2B_API_KEY=...Docker (self-hosted)
Run sandboxes in local Docker containers. Good for development and self-hosting.
import { startServer, Orchestrator, DockerBackend } from "@getdiff/cloud";
const { server } = await startServer({
orchestrator: new Orchestrator({ backend: new DockerBackend() }),
port: 3000,
});GitHub Integration
The agent interacts with GitHub like a developer — pushes branches, creates PRs, reads CI status. Preview environments (Vercel, Netlify) come for free via GitHub deploy hooks.
import { startServer, Orchestrator, E2BBackend, AppTokenProvider } from "@getdiff/cloud";
const orchestrator = new Orchestrator({
backend: new E2BBackend(),
tokenProvider: new AppTokenProvider({
appId: process.env.GITHUB_APP_ID!,
privateKey: process.env.GITHUB_PRIVATE_KEY!,
}),
});
const { server } = await startServer({ orchestrator });For a simple personal access token instead of a GitHub App:
import { StaticTokenProvider } from "@getdiff/cloud";
const orchestrator = new Orchestrator({
backend: new E2BBackend(),
tokenProvider: new StaticTokenProvider(process.env.GITHUB_TOKEN!),
});License
MIT
