name: nodejs-runtime description: Node.js runtime providers, app-executor sidecar, and graph execution API in packages/node and packages/app-executor
Activation
This skill triggers when editing these files:
packages/node/src/**packages/app-executor/bin/**packages/app-executor/scripts/**
Keywords: NodeNativeApi, NodeMCPProvider, NodeDatasetProvider, NodeCodeRunner, createProcessor, startDebuggerServer, app-executor, runGraph
You are working on the Node.js runtime layer of Rivet — providers that back ProcessContext, the public execution API, and the Tauri sidecar executor.
Key Files
packages/node/src/api.ts—createProcessor()andrunGraph(); wraps core with Node defaultspackages/node/src/native/NodeNativeApi.ts— File I/O;exec()intentionally throws "Not Implemented"packages/node/src/native/NodeMCPProvider.ts— MCP via@modelcontextprotocol/sdk; create→connect→call→close per requestpackages/node/src/native/NodeDatasetProvider.ts— ExtendsInMemoryDatasetProvider; write-through with optional.saveflagpackages/node/src/native/NodeCodeRunner.ts—AsyncFunctionwith injectedrequire,process,fetch,Rivet,contextpackages/node/src/debugger.ts— WebSocket debugger server; partial outputs throttled to 100ms per nodepackages/node/src/index.ts— Re-exports all of@ironclad/rivet-coreplus node-specific exportspackages/app-executor/bin/executor.mts— Sidecar: WebSocket server receivingset-dynamic-data+runmessages
Key Concepts
- Provider injection:
createProcessor()defaultsnativeApi,mcpProvider,codeRunnerto Node implementations if not supplied; always setsprocessor.executor = 'nodejs' - Plugin env injection:
createProcessor()auto-populatespluginEnvfromprocess.envfor any plugin config key withpullEnvironmentVariable - Sidecar execution:
app-executoris compiled via esbuild+pkg to native binaries indist/app-executor-{target}; receives project+settings dynamically over WebSocket - Dataset persistence: Pass
{ save: true }toNodeDatasetProvider; every mutation callssave()after the parent method. UsefromProjectFile()to auto-resolve.rivet-datasibling files - MCP transports: HTTP uses StreamableHTTP with SSE fallback; STDIO spawns subprocess — client lifecycle is per-call (not shared)
Critical Rules
packages/node/src/index.tsmust re-export@ironclad/rivet-coreentirely — consumers use@ironclad/rivet-nodeas their sole import- New providers must implement the interface from
packages/core/src/model/ProcessContext.tsexactly NodeCodeRunnerusescreateRequire(import.meta.url)— do not use barerequire; the file is ESMapp-executorplugins are loaded from appdata paths (~/.local/share/com.ironcladapp.rivet/plugins/{pkg}-{tag}/package) — do not hardcode paths- Debugger event broadcasting must remain throttled; removing the 100ms partial-output limit causes UI flooding
References
- Patterns:
.claude/skills/packages/skill.md
Last Updated: 2026-04-19