First Release of Claw3D (#11)

Co-authored-by: iamlukethedev <iamlukethedev@users.noreply.github.com>
This commit is contained in:
Luke The Dev
2026-03-19 23:14:04 -05:00
committed by GitHub
parent 5ea96b2650
commit 4fa4f13558
431 changed files with 105438 additions and 14 deletions
+58
View File
@@ -0,0 +1,58 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import { runSshJson } from "@/lib/ssh/gateway-host";
import { removeSkillOverSsh } from "@/lib/ssh/skills-remove";
vi.mock("@/lib/ssh/gateway-host", () => ({
runSshJson: vi.fn(),
}));
describe("skills remove ssh executor", () => {
const mockedRunSshJson = vi.mocked(runSshJson);
beforeEach(() => {
mockedRunSshJson.mockReset();
});
it("removes skill files via ssh", () => {
mockedRunSshJson.mockReturnValueOnce({
removed: true,
removedPath: "/home/ubuntu/.openclaw/skills/github",
source: "openclaw-managed",
});
const result = removeSkillOverSsh({
sshTarget: "me@host",
request: {
skillKey: "github",
source: "openclaw-managed",
baseDir: "/home/ubuntu/.openclaw/skills/github",
workspaceDir: "/home/ubuntu/.openclaw/workspace-main",
managedSkillsDir: "/home/ubuntu/.openclaw/skills",
},
});
expect(result).toEqual({
removed: true,
removedPath: "/home/ubuntu/.openclaw/skills/github",
source: "openclaw-managed",
});
expect(runSshJson).toHaveBeenCalledWith(
expect.objectContaining({
sshTarget: "me@host",
argv: [
"bash",
"-s",
"--",
"github",
"openclaw-managed",
"/home/ubuntu/.openclaw/skills/github",
"/home/ubuntu/.openclaw/workspace-main",
"/home/ubuntu/.openclaw/skills",
],
label: "remove skill (github)",
input: expect.stringContaining('python3 - "$1" "$2" "$3" "$4" "$5"'),
})
);
});
});