Some checks failed
CI / lint-and-test (push) Has been cancelled
Move content to correct locations: - AGENTS.md → .agents/AGENTS.md (with orchestrator reference update) - third_party/docs/ (8 reference docs) → wiki/concepts/ - manuals/ (12 Node-RED docs) → wiki/manuals/ Delete 23 unreferenced one-off scripts from scripts/ (keeping 5 active). Delete stale Dockerfile.e2e, docker-compose.e2e.yml, test/e2e/. Remove empty third_party/ directory. Root is now: README, CLAUDE.md, LICENSE, package.json, Makefile, Dockerfile, docker-compose.yml, docker/, scripts/ (5), nodes/, wiki/, plus dotfiles (.agents, .claude, .gitea). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.1 KiB
1.1 KiB
Node-RED Runtime Node JS Manual (EVOLV Summary)
Based on: https://nodered.org/docs/creating-nodes/node-js
Input Handler Contract
- Node-RED calls runtime handlers as
function(msg, send, done). - For compatibility, custom nodes should support fallback behavior when
sendis not provided. - Use
done()on successful completion anddone(err)on failure.
Output Routing Rules
- For single-output nodes:
send(msg)sends on output 1. - For multi-output nodes: pass an array with one slot per output, for example:
[msg, null, null]=> output 1 only[null, msg, null]=> output 2 only
- Always construct the outbound message first, then send it.
EVOLV Runtime Pattern
Recommended runtime input structure for src/nodeClass.js:
- Normalize
sendfallback. - Wrap
switch(msg.topic)intry/catch. - Route response messages to explicit output index with array format.
- Call
done()/done(err)consistently.
Common Failure Mode
- Sending a bare object in a multi-output context can hide intended port routing.
- In EVOLV nodes with 3 outputs (
process,dbase,parent), use explicit arrays for deterministic wiring behavior.