feat(foreign): support raw stdin and per-cell inputs

Session eval now carries raw stdin, and the Python/Node workers temporarily replace program stdin during evaluation. foreign.session accepts an inputs table; view exposes per-cell stdin and Run All sends a per-cell input map. Stateless and persistent cells share the same input semantics.
This commit is contained in:
cflmy committed 2026-10-18 14:36:47 +08:00
1 parent a7266185b2
commit c85f1a2829
8 files changed
+303 -19

No files matched your search

+2 -1
View File
@@ -59,7 +59,8 @@ fn static_page_data(
let Ok(mut session) = DocumentSession::open(abs, &root.root) else {
return (out, None);
};
let Ok(summary) = session.run_all_with_stdin(false, Some(stdin)) else {
let page_stdin = if stdin.trim().is_empty() { None } else { Some(stdin) };
let Ok(summary) = session.run_all_with_stdin(false, page_stdin) else {
session.close();
return (out, None);
};