feat: add pure ssh2 remote operations

This commit is contained in:
云服务部-叶林立
2026-08-21 19:51:43 +08:00
parent d3bf562189
commit 0ac50eb581
62 changed files with 3701 additions and 47 deletions
@@ -189,6 +189,28 @@ describe("buildToolAskPayload", () => {
),
).toBeUndefined();
});
test("carries a registered shell alias preview as authorization evidence", () => {
const formatter = makeFormatter({
get: (name) =>
name === "ssh_bash"
? () => "SSH target 'packaging-server' in remote cwd '/srv/build'"
: undefined,
});
const payload = buildPayload({
check: toolResult("bash", { command: "rm -rf dist" }),
surface: "bash",
invokedToolName: "ssh_bash",
input: { command: "rm -rf dist" },
formatter,
});
expect(findEvidence(payload, "input")).toEqual({
label: "input",
text: "SSH target 'packaging-server' in remote cwd '/srv/build'",
detail: null,
});
});
});
describe("mcp", () => {