Give the plan loop actionable observation (source excerpts, stderr/stdout tails) and short stop rules so the parent can inspect children and use stdlib helpers instead of inventing long patches. Co-authored-by: Cursor <cursoragent@cursor.com>
554 B
554 B
title: quiet file subtask captures stdout/stderr
lib/subtask.mq.md lib/json.mq.md
main
*id = > subtask.spawn path=subtask-child-print.mq.md *
*waited = > subtask.wait id=id *
*code = > json.get value=waited key=code *
*val = > json.get value=waited key=value *
*stdout = > json.get value=waited key=stdout *
code== 0val== "child_ok" 1.stdoutprint text=quiet-io-ok 2. * print text=quiet-io-no-stdout
-
> print text=quiet-io-bad-value
print text=quiet-io-fail