Diagram: Stateless pipeline across runtimes
Runtime roles and extension mapping
Runtime auto-detection is extension-based.
.ts maps to Bun, while Deno uses .mts to avoid ambiguity.Choose an orchestration mode
Pattern 1: stateless chaining (recommended default)
Run each step in an isolated execution and pass structured output forward viastdin.
Pattern 2: same request shape across interfaces
Use tabs when demonstrating equivalent CLI, library, and API usage.- CLI
- Library
- API
Pattern 3: compare implementations across runtimes
Useful for performance comparisons or parity testing.Diagram: Persistent sessions per runtime
Pattern 4: persistent workflows by runtime
Persistent containers are runtime-bound. For stateful polyglot systems, use one persistent engine/session per runtime.Runtime selection and overrides
- CLI auto-detect by extension
- CLI explicit override
- Library explicit runtime
- API explicit runtime
Cross-runtime code generation pattern
Generate code in one runtime and execute in another.Remote multi-runtime orchestrator
For centralized orchestration, use dedicated remote sessions per runtime role.Reuse a stable
sessionId per runtime role when you need cross-call state in remote workflows. Rotate session IDs per job for strict isolation.Design rules for polyglot systems
- keep cross-runtime handoff format explicit (JSON, CSV, newline-delimited text)
- keep each step deterministic and small
- isolate heavyweight dependencies to the runtime that needs them
- pre-bake dependencies for stable production latency
- use explicit runtime selection when extension detection is ambiguous
Related pages
Runtime reference
Runtime capabilities, extensions, and package behavior.
Execution guide
Request fields, modes, streaming, and file I/O semantics.
Packages and images
Pre-bake dependencies for repeatable multi-runtime pipelines.
Remote server and client
Session-based orchestration across centralized infrastructure.
Option mapping
Exact CLI, config, API, and library mapping for options and flags.