Conversation
…ition The model-facing tool is a framework-agnostic definition (name, description, plain JSON Schema, run) with zero framework dependencies; the AI SDK tool is a few-line shim over it, and pi/MCP wrappers are the same pattern. The description is generated from the grant set. In-session built-ins, neither recorded: help() renders grants, methods, docs, and data snapshots from the cell's injected shapes (replayed cells see the snapshot they were recorded under, so committed help() calls survive revocation and restart); emit(value) publishes ordered structured results alongside the cell value — replayed cells' emits are discarded like their console output, oversized or unclonable values degrade to their rendering, and past the per-cell cap emit throws instead of dropping. renderJsResultText() gives every text-only shim one shared rendering.
dofs deliberately EEXISTs mkdir("/") even with recursive, but writeFile
unconditionally mkdir'd the parent — so writing any file directly under
the workspace root failed. Pre-existing on main since f1cf132; caught
while exercising workspaceFs through the durable REPL playground.
Regression covered in the fs capability replay test.
…tion First minutes of real playground use produced exactly the predicted model mistake: calling a capability without await and failing on the returned Promise. help() now renders every method as `await cap.m(…)`, the overview states calls are asynchronous, and the generated tool description says so too.
|
|
Thanks for your interest in Cloudflare Computer. This repository does not accept unsolicited pull requests. Please use one of the accepted contribution paths instead:
If a maintainer asked you to open this pull request, they can add the |
Makes the REPL usable by agents.
createJsToolDefinition(): a framework-agnosticjstool (name, description, JSON Schema,run), plus a thin AI SDK adapter.help()documents the granted capabilities;emit(value)returns structured results.writeFilein the workspace runtime and makes help text say capability calls must be awaited.