Repository navigation
docs: browser execution tool design note - #351
Conversation
Client-executed execute_code tool: Pyodide in a widget worker, LangGraph interrupt/resume on the server, per-community runtime config with lockfile-pinned lazy loading. NEMAR is the first adopter; the design is community-agnostic.
|
Companion NEMAR decision: nemarOrg/nemar-cli#1292 (ADR 0049, supersedes ADR 0025). |
|
First adopter's engine work: sccn/eegprep#324 (eegprep installable under Pyodide, ONNX ICLabel loaded through the runtime's JavaScript library hook). |
Review folded inTwo independent reviewers went over this as a design document. They converged on the same critical findings, which is why I have revised rather than merged as written. The note is now 498 lines and carries a new What this assumes about OSA today section listing ten Phase 0 prerequisites. Corrected inline
The one thing I did not decideThe transport is unresolved and blocks Phase 1. The 120-second wall-clock abort exists independently in Three options are now written up in Open Questions: raise both timeouts, move to a WebSocket, or two-run continuation with no checkpointer at all, which is what CopilotKit and the Vercel AI SDK ship and which dissolves the checkpointer, the sweep and the retention question. That is a design call for @neuromechanist, not something to fold in silently. Also recorded: the QP precedent was cited as de-risking, but QP's agent loop is client-side, so it needed no interrupt, no checkpointer and no resume. It shares the tool contract, not the hard part. |
The file had sections for 0.8.10, 0.8.12, 0.8.14 and 0.8.15 only. The three missing releases are written from the pull requests between their tags (0.8.13: #438, #440, #441, #443; 0.8.11: #418; 0.8.9: #351 to #355 and #359 and #367), so the last seven releases are now all present. Tested: docs only; each entry checked against its pull request's body.
Design note for a community-agnostic, client-executed
execute_codetool: code runs in the user's browser in a Pyodide worker owned by the widget, the agent loop stays in LangGraph on the server, and the two meet throughtool_request/tool_resultevents with interrupt-and-resume. Lazy loading maps auv-style workflow ontoloadPackagesFromImports,micropip, and a per-community pinned lockfile. NEMAR is the first adopter; EEGLAB, HED, and BIDS adopt through configuration.File:
.context/browser-execution-tool-design.mdCompanion decision on the NEMAR side: nemarOrg/nemar-cli ADR 0049 (PR linked in a comment below).
Draft for the owner's review. No code changes. The pr-review-toolkit pass was skipped because this PR is a design document; it will run before the PR leaves draft.