accrete
Docs / Explanation / How accrete works

Explanation

How accrete works

accrete is one Worker with three Durable Objects, an R2 bucket, and a container class.

The parts

A tool call

  1. The workspace asks the registry for the tool.
  2. Hit: the runner loads the bundle by hash, checks the hash, and runs it. Placement built-tool, 0 container-seconds.
  3. Miss: the builder container builds the bundle and compares its output with the real CLI on the check case. On a byte-for-byte match, the registry stores it. On a mismatch, the build is rejected and nothing is stored.

Why the check matters

Bundling a CLI for an isolate changes its environment: no real file system, no process.exit, no eval. Some tools break quietly. The native-output check catches that before any agent uses the tool, so a lifted tool is either the same as the real one on the check case, or it does not exist.

Why content hashes

A tool is immutable once registered. The runner refuses a bundle whose bytes do not match the stored hash. A new package version is a new tool. You can always tell which exact code produced an output from the hash in the log.

Edit this page