Documentation
¶
Rendered for js/wasm
Overview ¶
js is a honey WASM plugin that runs a user JavaScript snippet in an embedded goja interpreter, exposing a capability-gated host API (remote_exec, kv, log).
Action "run" config:
{ "code": "<javascript>", "args": {<object>}, "timeout_ms": <int> }
The script's completion value becomes the step's stdout (a string passes through verbatim, anything else is JSON-encoded) for env_from / loop_from. Without --execute the step runs in dry-run: the script is evaluated but side-effecting host calls (remote_exec, kv.put) are no-ops.
Build: GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o plugin.wasm .
Directories
¶
| Path | Synopsis |
|---|---|
|
Package jsrun holds the pure, host-testable core of the js plugin: it runs a user JavaScript snippet in an embedded goja interpreter, exposing a narrow, capability-gated host API (remote_exec, kv, log) injected by the caller.
|
Package jsrun holds the pure, host-testable core of the js plugin: it runs a user JavaScript snippet in an embedded goja interpreter, exposing a narrow, capability-gated host API (remote_exec, kv, log) injected by the caller. |
Click to show internal directories.
Click to hide internal directories.