Agent Runtime Execution
The Agent can execute JavaScript or TypeScript without a Runtime Module. Guidance and the user task tell the Agent what to do; the Agent writes or selects code and runs it through pedelec-ts-runtime inside the Workspace.
Guidance / user task ↓ Agent ↓writes or selects JS/TS ↓ pedelec-ts-runtime ↓ WorkspacePedelec Desktop manages a pinned Deno runtime. Users do not need to install Node.js, Bun, or Deno themselves. pedelec-ts-runtime is the canonical Agent-facing JS/TS runtime. If it is unavailable, the Agent should report the failure instead of silently falling back to Node.js, Bun, raw Deno, or another runtime. Execution stays within the Workspace security boundary.
Keep a script in the Workspace
Section titled “Keep a script in the Workspace”pedelec-ts-runtime --thread-id <thread-id> run scripts/task.tsA file-backed script fits multi-step work, code worth inspecting or retaining, and existing Workspace scripts. For example, an Agent might scan project files and generate a manifest, generate files from a template, or perform a one-time file migration.
Run short code from stdin
Section titled “Run short code from stdin”pedelec-ts-runtime --thread-id <thread-id> run -Provide the script on stdin. This suits short glue or one-off transformations without a disposable source file. Examples include normalizing several JSON files, combining selected fields from structured files, or validating data before the Agent continues. The exact shell template can vary by Agent host.
When repeated or domain-specific logic deserves a stable API, move its implementation into a Runtime Module and let the Agent author only orchestration code.
Legacy CLI alias
Section titled “Legacy CLI alias”pedelec-deno is a supported legacy alias with identical validation and Thread mode:
pedelec-deno --thread-id <thread-id> run scripts/task.tsprintf 'console.log("stdin-ok");' | pedelec-ts-runtime --thread-id <thread-id> run -printf 'console.log("stdin-ok");' | pedelec-deno --thread-id <thread-id> run -PowerShell stdin example (works with either command name):
'console.log("stdin-ok");' | pedelec-ts-runtime --thread-id <thread-id> run -Neither command permits eval, permission flags, or shell syntax inside its argument list. The Thread’s stored mode controls permissions for both file and stdin execution.