Make file subtasks return #main value and expose it as plan.result.

Quiet spawn still hides child stdout; workbooks solidify to **returns**, agent-kb lives in the plugin, and multi-step follows OKF file relay rather than print-based answers.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-08-07 17:53:14 +08:00
1 parent fbece725e1
commit d1b33c78c6
55 files changed
+3498 -169

No files matched your search

+17
View File
@@ -39,3 +39,20 @@ description: English filesystem wrappers
+ `path`
**> host_remove path=`path`**
## text_patch
+ `path`
+ `find`
+ `replace`
Exact FIND→REPLACE once in a UTF-8 text file. `find` must match exactly once.
**> host_text_patch path=`path` find=`find` replace=`replace`**
## apply_patch_blocks
+ `path`
+ `text`
Apply plan-style `<<<` / FIND / === / REPLACE / `>>>` blocks from `text` to `path`.
**> host_apply_patch_blocks path=`path` text=`text`**
+5 -1
View File
@@ -11,8 +11,12 @@ description: Concurrent subtasks — file, function, or foreign code
+ `lang`=None
+ `source`=None
+ `stdin`=None
+ `quiet`=True
**> host_subtask_spawn path=`path` fn=`fn` args=`args` code=`code` lang=`lang` source=`source` stdin=`stdin`**
File children are silent by default; set `quiet=False` to inherit parent stdout/stderr.
File `wait` returns `{code, value}` where `value` is the child's `# main` return (not stdout).
**> host_subtask_spawn path=`path` fn=`fn` args=`args` code=`code` lang=`lang` source=`source` stdin=`stdin` quiet=`quiet`**
## poll
+ `id`
+7
View File
@@ -45,3 +45,10 @@ Create a named slot with `placeholder` if missing. Never overwrites an existing
List all output blocks in the entry file (includes `key` when named).
**> host_writeback_list**
## scan_path
+ `path`
List `<!-- marqdo-out … -->` slots in any file (workbook inspection).
**> host_writeback_scan_path path=`path`**
+5 -1
View File
@@ -11,8 +11,12 @@ description: 并发子任务 — 文件、函数或外联代码
+ `语言`=None
+ `源码`=None
+ `输入`=None
+ `静默`=True
**> host_subtask_spawn path=`路径` fn=`函数` args=`参数` code=`代码` lang=`语言` source=`源码` stdin=`输入`**
文件子任务默认静默;`静默=假` 时继承父进程终端输出。
文件 `等待` 返回 `{code, value}`,`value` 为子 `# main` 返回值(不是 stdout)。
**> host_subtask_spawn path=`路径` fn=`函数` args=`参数` code=`代码` lang=`语言` source=`源码` stdin=`输入` quiet=`静默`**
## 探测
+ `id`
+17
View File
@@ -39,3 +39,20 @@ description: 中文文件系统包装
+ `路径`
**> host_remove path=`路径`**
## 文本补丁
+ `路径`
+ `查找`
+ `替换`
对 UTF-8 文本文件做精确 FIND→REPLACE(`查找` 必须唯一匹配一次)。
**> host_text_patch path=`路径` find=`查找` replace=`替换`**
## 应用补丁块
+ `路径`
+ `文本`
解析规划回复中的 `<<<` / FIND / === / REPLACE / `>>>` 块并应用到 `路径`。
**> host_apply_patch_blocks path=`路径` text=`文本`**
+7
View File
@@ -43,3 +43,10 @@ description: 将运行结果写回 .mq.md(Jupyter 式自写回)
## 列出
**> host_writeback_list**
## 扫描路径
+ `路径`
扫描任意文件中的 `<!-- marqdo-out … -->` 槽(工作簿观察)。
**> host_writeback_scan_path path=`路径`**