Skip to content

Add code mode for composing session tools with JavaScript - #115

Merged
lukebuehler merged 16 commits into
mainfrom
codemode
Oct 8, 2026
Merged

lukebuehler merged 16 commits into
mainfrom
codemode

Conversation

@lukebuehler

Copy link
Copy Markdown
Contributor

Code mode lets the model compose its existing session tools in a single JavaScript call: run independent work in parallel, loop over results, pass data between tools, and return only the useful output.

  • Add the QuickJS-based codemode crate and code_execute, with async tool calls, execution limits, cancellation, and reports of partial outcomes. A dedicated Temporal workflow routes effects through the session's existing tool machinery without replaying the whole script.
  • Support ordinary tools, native and discoverable MCP tools, environment jobs, sub-agents, and promise controls. Expose available output JSON Schemas alongside tool descriptions.
  • Add shared content references and ordinary blob tools, reference-based file writes, environment file references, and persisted web-fetch bodies. Provide text(), media(), and file() helpers; expose UTF-8 process output as text while retaining binary output.
  • Add the Code mode feature and advanced limits to the UI, distinct transcript styling, generated API/workflow contracts, and a dedicated user guide.

Validation:

  • Workspace Clippy with all targets and warnings denied.
  • Unit suites for codemode, harness, temporal-workflow, and tools.
  • Full npm run check, including generated-artifact checks, typechecking, consumer tests, and production/demo builds.
  • Documentation tests, Astro diagnostics, build, and link validation.
  • Earlier implementation validation included native and Temporal live suites, actual-model execution, MCP discovery, jobs/sub-agents, media/file output, and worker-loss recovery; those credentialed suites were not rerun when opening this PR.

@lukebuehler
lukebuehler merged commit 98ae69c into main Oct 8, 2026
5 checks passed
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