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:
1 parent
fbece725e1
commit
d1b33c78c6
55 files changed
+3498
-169
No files matched your search
@@ -60,6 +60,10 @@ enum Commands {
|
||||
/// Feed `input` from a text file (one line per call), instead of / after the terminal.
|
||||
#[arg(long, value_name = "FILE")]
|
||||
stdin_file: Option<PathBuf>,
|
||||
|
||||
/// Write `# main` return value as JSON (used by file subtasks).
|
||||
#[arg(long, value_name = "FILE")]
|
||||
emit_result: Option<PathBuf>,
|
||||
},
|
||||
/// Browse `.mq.md` structure + execution (live server or static output)
|
||||
View {
|
||||
@@ -177,6 +181,7 @@ fn try_main() -> Result<i32> {
|
||||
trace_eval,
|
||||
dump_all,
|
||||
stdin_file,
|
||||
emit_result,
|
||||
} => {
|
||||
let path = file.unwrap_or_else(|| PathBuf::from("index.mq.md"));
|
||||
let stdin_lines = match stdin_file {
|
||||
@@ -186,6 +191,7 @@ fn try_main() -> Result<i32> {
|
||||
let mut opts = if dump_all {
|
||||
RunOptions {
|
||||
stdin_lines: stdin_lines.clone(),
|
||||
emit_result: emit_result.clone(),
|
||||
..RunOptions::dump_all()
|
||||
}
|
||||
} else {
|
||||
@@ -198,6 +204,7 @@ fn try_main() -> Result<i32> {
|
||||
trace_eval,
|
||||
backend: backend.into(),
|
||||
stdin_lines,
|
||||
emit_result,
|
||||
..RunOptions::default()
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user