Originally created by: riki137
What
Adds a --json flag to the three read commands so an AI agent or script can drive RunWisp headless without scraping column-aligned text.
runwisp status --json — live snapshot: daemon health, a system summary, and every task with its last run (exit code, timing, duration_ms, and precomputed failed/missed flags). Unreachable daemon → {"healthy": false, "error": …} + exit 1.
runwisp list --json — offline JSON mirror of the config table (stays config-only, like the human view).
runwisp validate --json — valid flag + counts + errors/warnings arrays. A broken config still exits non-zero and emits the JSON error document to stdout (human copy goes to stderr).
Every document carries "schema_version": 1 as an additive-only compatibility promise. Default (flagless) output is byte-for-byte unchanged.
Notes / decisions
- Last-run state lives in
status --json (the daemon-connected command); list stays offline by design (local-first invariant), so it carries config only — not last-run exit codes.
validate --json errors expose message only. location is reserved-but-empty: the config layer bakes task/field/line into the message string, and surfacing structured locations would need an internal/config error-type refactor (out of scope).
Tests
- Golden tests (
-update harness + testdata/*.golden.json) lock all three JSON shapes; the status golden is made deterministic via a fake daemon with fixed data.
- Failure-path tests assert non-zero exit + valid JSON for bad-config
validate and unreachable status.
bun run ci passes (unit + e2e). Manually verified end-to-end against a live daemon.
Docs
- New "Machine-readable output" section in
operations/cli.mdx with an example response per command.
CHANGELOG.md entry under Unreleased → Added.
Originally posted by: cloudflare-workers-and-pages[bot]
Deploying runwisp-docs with
Cloudflare Pages
71c12a5View logs
Originally posted by: sonarqubecloud[bot]
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
94.6% Coverage on New Code
0.0% Duplication on New Code
See analysis details on SonarQube Cloud