Skip to content

v0.2.0

Choose a tag to compare

@ggoodman ggoodman released this 23 Jul 11:17
d330984

Boot a connected Sandbox runtime directly

createSandboxNodeRuntime() now boots and returns a ready, persistent code-mode
runtime. The caller still chooses and owns the Sandbox; the runtime owns only
the Node.js 24 process running inside it:

await using runtime = await createSandboxNodeRuntime(
  {
    sandbox,
    cwd: "/workspace",
    nodePath: "/usr/bin/node",
  },
  bootSignal,
);

const client = createClient({ runtime, toolbox });

One runner can serve multiple concurrent executions. Cancelling one execution
does not stop the runtime or its other work, and disposing the runtime does not
close the caller-owned Sandbox.

Run ordinary ESM agent programs

Programs are now TypeScript-flavoured ECMAScript modules with native static
imports and a callable default export:

import { basename } from "node:path";

export default async function ({ codemode, console }: AgentProgramScope) {
  const result = await codemode.lookup({
    name: basename("/workspace/example.txt"),
  });
  console.log(result);
}

Static imports resolve from the configured guest working directory. Only the
console passed to the default export is captured, with stdout/stderr
provenance; ambient process output remains ordinary guest output.

Migrating from v0.1.0

This is an intentionally breaking release with no compatibility layer:

  • Replace Node24Runtime, runtime hosts, Runtime.start(), and termination
    methods with the async createSandboxNodeRuntime(options, bootSignal)
    factory and Runtime async disposal.
  • Replace expression-shaped programs with ESM containing a callable default
    export that receives { codemode, console }.
  • Use @torkbot/code-mode@^0.3.1.