fix(exec): default implicit target to auto

This commit is contained in:
Peter Steinberger
2026-03-30 05:59:08 +09:00
parent d014f173f1
commit 276ccd2583
28 changed files with 216 additions and 110 deletions

View File

@@ -251,14 +251,13 @@ describe("exec host env validation", () => {
}
});
it("defaults implicit exec host to gateway when sandbox runtime is unavailable", async () => {
it("routes implicit auto host to gateway when sandbox runtime is unavailable", async () => {
const tool = createExecTool({ security: "full", ask: "off" });
const result = await tool.execute("call1", {
command: "echo ok",
});
const output = normalizeText(result.content.find((c) => c.type === "text")?.text);
expect(output).toContain("ok");
expect(normalizeText(result.content.find((c) => c.type === "text")?.text)).toBe("ok");
});
it("fails closed when sandbox host is explicitly configured without sandbox runtime", async () => {
@@ -268,6 +267,6 @@ describe("exec host env validation", () => {
tool.execute("call1", {
command: "echo ok",
}),
).rejects.toThrow(/sandbox runtime is unavailable/);
).rejects.toThrow(/requires a sandbox runtime/);
});
});