Agent Context
Agent context for the inbrowser monorepo
Repo shape, conventions, and invariants for agents working across the monorepo.
Repo shape
Eight packages under packages/:
@inbrowser/model— sharedModelClientcontract, cloud provider factories/adapters, and opt-in on-device LLM engine (/local). Independent; no internal deps.@inbrowser/resumable— pure resumable streaming-job engine. No internal deps.@inbrowser/relay— resumable LLM relay. Depends on@inbrowser/resumableand@inbrowser/model.@inbrowser/workspace— lightweight browser workspace runtime (OPFS/memory files,esbuild-wasmcompile-and-mount preview, jailed shell, snapshots, local git, package import maps). Independent; no internal deps.@inbrowser/sandbox— binds workspace capabilities into agent-facing tools, chronological events, checkpoints, and artifacts. Depends on@inbrowser/workspace.@inbrowser/node— browser-isolated Node.js22.18container runtime (Web Worker kernel and guest processes, POSIX VFS overSharedArrayBuffer+Atomics, Service Worker HTTP/SSE/WebSocket preview,node:sqlite, WASM codecs, and 3-originSandboxContainer). Independent; zero runtime npm dependencies.@inbrowser/driver— 1-RTT browser UI observation, transactional action execution, silent/GPU visual capture, agent tool surface (/tools), and optional real-CDP backend (/puppeteer) for live<iframe>previews,MessagePortchannels, and@inbrowser/nodecontainers. Independent; zero core runtime npm dependencies.@inbrowser/agent— browser-safe agent runtime + Node CLI. Depends on@inbrowser/modeland@inbrowser/sandbox.
Conventions
- Bun for install / scripts / workspace orchestration. Workspaces are declared in the root
package.json. - TypeScript with shared
tsconfig.base.json. Per-packagetsconfig.jsonextends the base. - Biome for lint + format. One tool; configured at the root (
biome.json). - Pre-release. No backwards-compat shims, no
Legacy*aliases, no schemaVersion migrations. Pick the cleanest shape and update consumers in lockstep. - Skills live in
.agents/skills/at the repo root (dev-facing) and inpackages/<name>/skills/(bundled into the npm artifact via the package’sfilesfield).
Don’t
- Don’t add
.claude/skills/symlinks. - Don’t write new packages without first checking whether the code belongs in one of the existing packages.
- Don’t fold packages into another — each package boundary matches an explicit dependency and runtime isolation seam.
Status
Pre-1.0. Packages publish independently under @inbrowser/* (0.4.2 across resumable, relay, workspace, sandbox, node, driver, agent; 0.5.0 on model).