@plurnk/plurnk-execs-jq
v2.0.1
Published
jq runtime executor for plurnk-service's exec scheme — shells the system jq binary to filter or transform JSON.
Maintainers
Readme
@plurnk/plurnk-execs-jq
jq runtime executor for plurnk-service's exec scheme. Drives jq by shelling the system jq binary to filter/transform JSON — no third-party JSON-filter library.
A @plurnk/plurnk-execs-* sibling built on the plurnk-execs framework.
Invocation model
The body is the jq program and defaults to . when empty. The optional target
is the data source. Without one, jq receives -n (null input), so the program
is self-contained.
| Heading / body | Runs | Purpose |
| --------------------------------------------------------------------- | --------------------------------- | ---------------------------------- |
| jq{"a":1} | jq -n '{"a":1}' | Construct or validate inline JSON. |
| jq[1,2,3] \| add | jq -n '[1,2,3] \| add' | Compute without input. |
| jq (data.json).users[].name | jq '.users[].name' data.json | Filter a file. |
| jq (data.json) | jq '.' data.json | Apply identity to a file. |
| jq (sqlite:///a3b7c921#results).[] \| .name | Consumer materializes the target. | Filter a prior runtime's output. |
Output streams to #results as application/jsonl: one compact JSON value per
line ({§executor-output-address}).
Effect & availability
- Disabled by default. Set
PLURNK_EXECS_JQ=1in the environment cascade to enable it. effect— inline/-nispure; a target data source isread. Both bypass the human proposal gate, then stream on the same next-turn path as every execution ({§executor-effect}).probe—jqon PATH (jq --version).- Errors return RFC 9457 Problems (
jq-error,spawn-failed) in the terminal operation result.
jq is a leaf process, so cancellation is a plain signal kill; it needs no process-group handling.
Tests
test:lint, test:unit. jq-dependent tests auto-skip where jq is absent.
