A browser runtime for running code, syncing files, and streaming lint.
The browser-side runtime layer for running code, keeping files in sync, streaming lint feedback, and coordinating collaborative agent sessions. It gathers sandboxed execution, persistent file handling, streamed diagnostics, writeback helpers, and room-style collaboration transport in one package.
BrowserSandbox gives you a browser execution surface with an edge fallback when local execution is not enough, including local Vitest-style snippet execution for TypeScript companion tests.
Persistent filesystem
PersistentFS keeps a local-first file view and can sync it back to container APIs, so files survive and write back instead of living only in memory.
Streamed lint feedback
StreamedLintClient is built for live diagnostics instead of batch-only lint runs — diagnostics arrive in chunks as you type, not after the run completes.
Agent rooms
AgentRoomClient gives you room snapshots, presence, and task transport in the same package, for room-style collaborative agent sessions.
Plumbing kept close
API route helpers and writeback helpers keep the surrounding plumbing close to the runtime instead of scattering it through app code.
Small, broad surface
BrowserSandbox, PersistentFS, AgentRoomClient, DevWritebackManager, StreamedLintClient, and createApiRoutes — small enough to understand, broad enough for a real browser container experience.
import { PersistentFS } from '@a0n/aeon-container';
const fs = new PersistentFS('container-123', { apiUrl: 'https://halo.place' });
await fs.writeFile('/src/index.ts', 'export const ok = true;');
await fs.syncToBackend();
import { StreamedLintClient } from '@a0n/aeon-container';
const lint = new StreamedLintClient();
const handle = lint.lint({
version: 1,
path: 'src/example.ts',
language: 'typescript',
content: 'const x: any = 1;',
onChunk: (diagnostics) => console.log(diagnostics),
});
// handle.cancel() if needed
FAQ
Common questions
BrowserSandbox, PersistentFS, AgentRoomClient, DevWritebackManager, StreamedLintClient, createApiRoutes, and shared execution and filesystem types from services/types.ts — a single browser container runtime instead of wiring those across separate libraries.
BrowserSandbox has an edge fallback. Set an edge fallback URL with setEdgeFallbackUrl, and execution falls through to the edge when the local browser surface cannot run the snippet.
PersistentFS keeps a local-first file view. Its writeback path is a compressor cascade: a cache-skipping read path, a dirty-only filter on sync, and a parallel batch flush — collapsing network roundtrips when it syncs back to container APIs via syncToBackend.