Skip to content

feat/durable repl js tool - #158

Closed
ben-reitz wants to merge 3 commits into
feat/durable-repl-capabilitiesfrom
feat/durable-repl-js-tool
Closed

ben-reitz wants to merge 3 commits into
feat/durable-repl-capabilitiesfrom
feat/durable-repl-js-tool

Conversation

@ben-reitz

Copy link
Copy Markdown

Thanks for your interest in Cloudflare Computer.

This repository does not accept unsolicited pull requests. Please open one of the accepted contribution types instead:

Maintainers may close pull requests that do not come from an approved collaborator. If a maintainer asked you to open this pull request, they can add the allow-pr label and reopen it.

…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.
@changeset-bot

changeset-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5784d23

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

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 allow-pr label and reopen it.

@github-actions github-actions Bot closed this Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant