Skip to content

Releases

v0.1.1

Choose a tag to compare

@MZULALI MZULALI released this 11 Sep 22:44

Follow-up to 0.1.0. The 0.1.0 tag stays where it is.

  • The worker no longer inherits the parent's environment. It gets PATH, HOME, locale and temp-dir variables; anything a tool needs is passed through the new workerEnv option.
  • Node's permission model is on by default (permissions: true): file access limited to the package, toolhost's dir, and the workspace; child processes only when exec is on; no native addons. Network is not restricted. Turn it off with permissions: false if a tool must read or spawn outside those bounds.
  • Arguments are validated against the tool's schema before a call reaches the worker (invalid_arguments, with each problem spelled out). Off with validateArgs: false.
  • README: what the permission model does and does not cover, why toolhost is not a sandbox and what to use instead, and why it is not on npm.

Install: npm install github:MZULALI/toolhost#v0.1.1

v0.1.0

Choose a tag to compare

@MZULALI MZULALI released this 11 Sep 22:00

First release.

An LLM calls create_tool with a name, a JSON Schema, and a function body. toolhost parses the body with acorn and rejects anything that would add top-level code, saves it to SQLite with full history, writes it as an ES module, and restarts a forked worker that loads it. The tool is callable on the model's next turn. Every error is a ToolError with a stable code and a message the model can act on.

What is in 0.1.0:

  • Five model-facing tools: create, update (including restore from history), delete, list, read.
  • A supervised worker: serialised and coalesced restarts, drain before replace, crash backoff, rollback of a change whose worker fails to start.
  • The worker does not inherit the parent's environment; workerEnv passes what a tool needs. Opt-in permissions: true runs it under Node's permission model.
  • Arguments are validated against the tool's schema before a call reaches the worker.
  • ctx helpers confined to the workspace by real path, exec off by default, fetchJson with timeout and size cap.
  • Adapters for Anthropic, OpenAI Responses, OpenAI Chat, and the Vercel AI SDK, each with a runnable example.
  • TypeScript, Node 22.18+, one dependency.

Known limits: not a sandbox by default; network is unrestricted even with permissions; a double-forked daemon can outlive the worker. See the README's "Not a sandbox" section.

Install: npm install github:MZULALI/toolhost#v0.1.0