feat(foreign): structured invoke, presets, probe and config
F0/F1: safe execution core (exec gate, bounded IO, process-group timeout), structured invoke records, run options, 15 language presets, register/unset/probe/config, view stderr/exit/ms, and node/bash gold tests.
This commit is contained in:
1 parent
c21a28c3bc
commit
e32ff8f6b3
21 files changed
+2301
-282
No files matched your search
+11
-2
@@ -1625,13 +1625,22 @@ pub fn layout(title: &str, nav: &str, main: &str) -> String {
|
||||
}})
|
||||
.then(function (r) {{ return r.json(); }})
|
||||
.then(function (data) {{
|
||||
var parts = [];
|
||||
if (data.stdout) parts.push(data.stdout);
|
||||
if (data.stderr) parts.push("[stderr]\n" + data.stderr);
|
||||
if (data.error) parts.push(data.error);
|
||||
var meta = [];
|
||||
if (typeof data.code === "number") meta.push("exit " + data.code);
|
||||
if (typeof data.ms === "number") meta.push(data.ms + "ms");
|
||||
if (data.timed_out) meta.push("timed out");
|
||||
if (data.truncated) meta.push("truncated");
|
||||
if (meta.length) parts.push("— " + meta.join(" · "));
|
||||
if (data.ok) {{
|
||||
out.classList.remove("err");
|
||||
out.textContent = data.stdout === "" ? "(no stdout)" : data.stdout;
|
||||
}} else {{
|
||||
out.classList.add("err");
|
||||
out.textContent = data.error || "foreign run failed";
|
||||
}}
|
||||
out.textContent = parts.length ? parts.join("\n\n") : "(no output)";
|
||||
}})
|
||||
.catch(function (e) {{
|
||||
out.classList.add("err");
|
||||
|
||||
Reference in new issue
Block a user