Commit Graph

5 Commits

Author SHA1 Message Date
07akioni
dabc2ff411 feat: migrate to pnpm 2026-06-16 14:55:37 +08:00
Tianyi Cui
a1eea4d36e docs: note multi-language Code Mode backends in RFC 012
Clarify that the CodeRuntime seam can host backends differing by
language/runtime, not just trust level — e.g. an AssemblyScript/WASM
backend (naturally sandboxed) and a Python backend over CPython or a
more controllable/embeddable interpreter. Note the execution contract
is language-agnostic while SDK codegen/prompt presentation is per-
language, and add these backends to the deferred follow-up list.
2026-06-15 08:37:45 +08:00
Tianyi Cui
1b7c376aec docs: address second-round PR review on RFC 012 (alternatives, framing)
- Add an Alternatives section comparing Code Mode against the narrower
  result-elision/summarization route over native tool-calling (solves
  context-bloat but not composition/round-trips) and against parallel native
  dispatch (a core-loop change that still lacks composition); states why
  Code Mode is chosen and why the new code-execution surface is the price.
- Fix the Problem-section framing: it said the model "can run independent
  calls concurrently," which contradicted the serialize-by-default decision.
  Reworded to "express fan-out, initially serialized until concurrency-safety
  metadata exists" — early win is composition + fewer round-trips, not parallelism.
2026-06-15 01:46:26 +08:00
Tianyi Cui
6d9934103d docs: address PR review on RFC 012 (concurrency, vm guard, prompt budget)
- Concurrency: change from "may serialize" to mandatory serialize-by-default
  via a per-run dispatch queue in the SDK bindings, with a non-overlap test as
  a hard acceptance criterion (the binding shape otherwise makes Promise.all
  dispatch concurrently before the tool contract has concurrency-safety metadata).
- node:vm guard: make it enforceable, not a README warning — CodeRuntime exposes
  safe:boolean, the VM stub throws unless constructed { unsafe:true }, and
  code-mode refuses to register run_code over an unsafe runtime unless separately
  acknowledged (allowUnsafeRuntime); refusal path is tested.
- Prompt budget: drop the "zero prompt tokens" claim (the SDK .d.ts is injected
  into the system prompt, so types do consume context) and add the explicit
  budget/caching tradeoff — Code Mode's saving is on output/round-trips, not the
  input-side tool description.
2026-06-15 01:39:21 +08:00
Tianyi Cui
1cc6e1caf7 docs: add RFC 012 (optional Code Mode for all tools)
Proposes an optional Code Mode where the model writes a TypeScript program
against a generated SDK wrapping every registered tool, instead of emitting
one native tool-call per step. Implemented Cordis-style as a capability-seam
trio (code-runtime interface / code-runtime-vm node:vm reference stub /
code-mode consumer plugin) with zero core-package changes; the hardened
execution substrate is deferred to a follow-up RFC.
2026-06-15 01:20:09 +08:00