feat: add elevated bash mode

This commit is contained in:
Peter Steinberger committed 2026-01-04 05:15:59 +00:00
1 parent b978cc4e91
commit fe0b3500cc
29 files changed
+509 -7

No files matched your search

+13
View File
@@ -119,6 +119,19 @@ describe("bash tool backgrounding", () => {
expect(status).toBe("failed");
});
it("rejects elevated requests when not allowed", async () => {
const customBash = createBashTool({
elevated: { enabled: true, allowed: false, defaultLevel: "off" },
});
await expect(
customBash.execute("call1", {
command: "echo hi",
elevated: true,
}),
).rejects.toThrow("elevated is not available right now.");
});
it("logs line-based slices and defaults to last lines", async () => {
const result = await bashTool.execute("call1", {
command: