(cwd: string)
| 1676 | // Helper to create bash tool with SSH runtime configuration |
| 1677 | // Note: These tests check redundant cd detection logic only - they don't actually execute via SSH |
| 1678 | function createTestBashToolWithSSH(cwd: string) { |
| 1679 | const tempDir = new TestTempDir("test-bash-ssh"); |
| 1680 | const sshConfig = { |
| 1681 | type: "ssh" as const, |
| 1682 | host: "test-host", |
| 1683 | srcBaseDir: "/remote/base", |
| 1684 | }; |
| 1685 | const sshRuntime = createRuntime(sshConfig); |
| 1686 | |
| 1687 | // Pre-mark connection as healthy to skip actual SSH probe in tests |
| 1688 | sshConnectionPool.markHealthy(sshConfig); |
| 1689 | |
| 1690 | const tool = createBashTool({ |
| 1691 | ...getTestDeps(), |
| 1692 | cwd, |
| 1693 | runtime: sshRuntime, |
| 1694 | runtimeTempDir: tempDir.path, |
| 1695 | }); |
| 1696 | |
| 1697 | return { |
| 1698 | tool, |
| 1699 | [Symbol.dispose]() { |
| 1700 | tempDir[Symbol.dispose](); |
| 1701 | }, |
| 1702 | }; |
| 1703 | } |
| 1704 | |
| 1705 | it("should reject redundant cd when command cds to working directory", async () => { |
| 1706 | const remoteCwd = "/remote/workspace/project/branch"; |
no test coverage detected