The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): run Windows SSH helpers through the launcher's --run-module
yoniebans197bde96f9cd
diff --git a/apps/desktop/electron/windows-remote-lifecycle.test.ts b/apps/desktop/electron/windows-remote-lifecycle.test.tsindex f5e12e8eb94..188edd41a61 100644--- a/apps/desktop/electron/windows-remote-lifecycle.test.ts+++ b/apps/desktop/electron/windows-remote-lifecycle.test.ts@@ -701,14 +701,15 @@ test('platform detection preserves typed Windows probe failures', async () => {}})-test('helper command uses the fixed remote Python entry point and quotes path data', () => {- const command = helperCommand({ python: "C:\\Program Files\\Hermes's\\python.exe" }, 'inspect', [+test('helper command enters through the launcher module dispatch and quotes path data', () => {+ // The shape update drain and bootstrap rollback rebuild from stored state: no runtime command.+ const command = helperCommand({ hermesPath: "C:\\Program Files\\Hermes's\\bin\\hermes.exe", hermesHome: 'C:\\h', python: '' }, 'inspect', ['C:\\x y\\hermes.exe'])const encoded = command.split(' ').pop()!const script = Buffer.from(encoded, 'base64').toString('utf16le')- assert.match(script, /-m' 'hermes_cli\.windows_ssh_runtime' 'inspect'/)+ assert.match(script, /bin\\hermes\.exe' '--run-module' 'hermes_cli\.windows_ssh_runtime' 'inspect'/)assert.match(script, /Hermes''s/)assert.match(script, /C:\\x y\\hermes\.exe/)})diff --git a/apps/desktop/electron/windows-runtime-command.ts b/apps/desktop/electron/windows-runtime-command.tsindex 478daaa86a3..2bf1bf0cfb3 100644--- a/apps/desktop/electron/windows-runtime-command.ts+++ b/apps/desktop/electron/windows-runtime-command.ts@@ -30,11 +30,10 @@ export function windowsRuntimeProgramArgv(runtime: WindowsRuntime, program: strithrow error}+// Helpers enter through the launcher's own module dispatch, which owns PM activation;+// every caller then needs only the launcher path it already carries.export function windowsHelperArgv(runtime: WindowsRuntime, operation: string, args: string[] = []): string[] {- if (!runtime.runtimeCommand) {return [runtime.python, '-m', 'hermes_cli.windows_ssh_runtime', operation, ...args]}-- return [...windowsRuntimeProgramArgv(runtime,- "import runpy; runpy.run_module('hermes_cli.windows_ssh_runtime', run_name='__main__', alter_sys=True)"), operation, ...args]+ return [runtime.hermesPath, '--run-module', 'hermes_cli.windows_ssh_runtime', operation, ...args]}// Same ancestor/leaf guard as the existing platform and marker probes.