feat: add per-session agent sandbox

This commit is contained in:
Peter Steinberger
2026-01-03 21:35:44 +01:00
parent 7bad9f3fbd
commit 3b075dff8a
20 changed files with 1134 additions and 36 deletions

View File

@@ -132,7 +132,16 @@ class WizardSessionPrompter implements WizardPrompter {
placeholder: params.placeholder,
executor: "client",
});
const value = String(res ?? "");
const value =
res === null || res === undefined
? ""
: typeof res === "string"
? res
: typeof res === "number" ||
typeof res === "boolean" ||
typeof res === "bigint"
? String(res)
: "";
const error = params.validate?.(value);
if (error) {
throw new Error(error);