jsValToValue now recursively converts JS arrays/objects (the "json" wire
type) into native hbrt arrays/hashes, so PRG can Len()/index/hb_HGetDef the
results of npm methods (e.g. os.cpus()[1]:model). Strings/numbers/booleans/
buffers unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
FN_REQUIRE now returns a module OBJECT; PRG calls npm methods directly
(oQR:toString(args), oQR:__end__()) exactly like Node and the C++ fivenode
TFNModule. At require, the bridge enumerates the module's method names and
registers each as a class method whose closure proxies the call to the
persistent node sidecar (Promise auto-awaited). Native PRG args → JS;
results string/number/boolean/buffer/json. Pure Go glue, no C/CGO.
Replaces the FN_CALL(handle,...) functional API.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Faithful Go port of the C++ fivenode Require() mechanism: persistent node
sidecar + JSON handle protocol (require→handle, call→method with auto-await
Promise, end), driven by pure-Go glue (os/exec + stdio). No C/CGO, not
`node -e` string eval. NODE_PATH points at the app's node_modules.
PRG: FN_REQUIRE / FN_CALL / FN_END / FN_LASTERROR.
Replaces the earlier nodertl (NODE_EVAL string-eval), removed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>