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>
25 lines
554 B
Markdown
25 lines
554 B
Markdown
---
|
|
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 *
|
|
|
|
1. `code` == 0
|
|
1. `val` == "child_ok"
|
|
1. `stdout`
|
|
> print text=quiet-io-ok
|
|
2. *
|
|
> print text=quiet-io-no-stdout
|
|
2. *
|
|
> print text=quiet-io-bad-value
|
|
2. *
|
|
> print text=quiet-io-fail
|