@bookingcare/infra
v0.4.1
Published
Sandbox execution and persistence for process-isolated agent tools with resource limits
Readme
@bookingcare/infra
Sandbox execution for process-isolated agent tools with resource limits.
Installation
pnpm add @bookingcare/infraUsage
import { createSandbox } from "@bookingcare/infra";
const sandbox = createSandbox({
kind: "local",
workdir: "/workspace",
timeout: 30_000,
maxOutput: 1024 * 1024,
env: {
PATH: "/usr/local/bin:/usr/bin:/bin",
},
});
const result = await sandbox.exec("echo hello");Sandboxed processes do not inherit the parent environment. Pass a safe PATH (and on Windows, SystemRoot/ComSpec) in env when commands need external binaries.
Sandbox also exposes readFile(), writeFile(), and editFile() for workspace-scoped file operations.
Persistence
@bookingcare/infra exports persistence helpers from the root package and the ./persistence subpath.
