mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
fix(pi-ssh): harden remote execution and search
This commit is contained in:
@@ -24,10 +24,17 @@ test("search routing narrows files before requesting matching line numbers", ()
|
||||
test("SSH connection routing requires an explicit named host and concrete task", () => {
|
||||
const section = buildToolRoutingSection(["ssh_connect"]);
|
||||
assert.match(section, /only when the user explicitly names an imported host/);
|
||||
assert.match(section, /Connect before calling other ssh_\* tools/);
|
||||
assert.match(section, /separate step and wait for success before calling other ssh_\* tools/);
|
||||
assert.match(section, /never infer or substitute a different host/);
|
||||
});
|
||||
|
||||
test("remote cwd routing separates persistent workspace changes from shell commands", () => {
|
||||
const section = buildToolRoutingSection(["ssh_cd", "ssh_bash"]);
|
||||
assert.match(section, /call it as a separate step and wait for success/);
|
||||
assert.match(section, /relative ssh_read\/ssh_write\/ssh_edit\/ssh_find\/ssh_grep/);
|
||||
assert.match(section, /intentionally temporary, command-local directory change/);
|
||||
});
|
||||
|
||||
test("remote search routing uses structured bounded SSH tools", () => {
|
||||
const section = buildToolRoutingSection(["ssh_find", "ssh_grep"]);
|
||||
assert.match(section, /use ssh_find to narrow remote file paths before ssh_grep/);
|
||||
|
||||
Reference in New Issue
Block a user