The open source AI video agent: turns any coding agent into a video agent, with an editor to change anything it makes.
Desktop: DeepSeek Harness's Windows shim, which runs a script inside its app's archive, is run as it is (#237)
riverisbuildingc141418eea74
diff --git a/.changeset/dsh-asar-shim.md b/.changeset/dsh-asar-shim.mdnew file mode 100644index 0000000..6605f9f--- /dev/null+++ b/.changeset/dsh-asar-shim.md@@ -0,0 +1,5 @@+---+"@openfilm/desktop": patch+---++DeepSeek Harness's app for Windows starts in the chat: its `dsh.cmd` runs a script inside the app's own archive on the app itself, so the chat now runs that shim as it is instead of the script it names, which ended at once.diff --git a/apps/desktop/src/agent-installation.mjs b/apps/desktop/src/agent-installation.mjsindex 5a9b1fe..fdf4252 100644--- a/apps/desktop/src/agent-installation.mjs+++ b/apps/desktop/src/agent-installation.mjs@@ -333,6 +333,9 @@ export function cmdTarget(cmd, depth = 0) {/* a package that runs on a Node of its own (Cursor's agent: its native parts are built for it), not one npm may putbeside the shim: the shim itself, which starts that Node */if (named.some((rel) => /[\\/]node\.exe$/i.test(rel))) return null;+ /* an app that runs a script inside its own archive on its own runtime (DeepSeek Harness: `ELECTRON_RUN_AS_NODE=1`,+ then its .exe on `…\app.asar\…\cli.js`): neither the script nor the app starts without the rest of the shim */+ if (named.some((rel) => /\.asar(?:[\\/]|$)/i.test(rel))) return null;const rels = named.filter((rel) => !/(?:^|[\\/])node\.exe$/i.test(rel)).sort((a, b) => scriptFirst(a) - scriptFirst(b));diff --git a/apps/desktop/src/agent-installation.test.mjs b/apps/desktop/src/agent-installation.test.mjsindex 6089c9d..62df813 100644--- a/apps/desktop/src/agent-installation.test.mjs+++ b/apps/desktop/src/agent-installation.test.mjs@@ -373,6 +373,16 @@ test("Cursor's agent counts only in its own folder (or Homebrew's cursor-cli), wassert.equal(detectAgentInstallation('cursor', { home, env: { PATH: '' }, pathDirs: [join(home, 'bin'), links], applicationDirs: [] }).cli, join(links, 'cursor-agent'));});+test("DeepSeek Harness's Windows shim runs a script inside its app's archive on the app itself: the shim, never what it names (#190)", () => {+ const app = mkdtempSync(join(tmpdir(), 'of-dsh-'));+ put(join(app, 'DeepSeek Harness.exe'));+ put(join(app, 'resources', 'app.asar', 'dsh', 'node_modules', '@deepseek-ai', 'dsh-desktop-host', 'lib', 'cli.js'));+ const bin = join(app, 'resources', 'runtime', 'cli', 'bin');+ const shim = put(join(bin, 'dsh.cmd'), '@echo off\r\nsetlocal DisableDelayedExpansion\r\nset "ELECTRON_RUN_AS_NODE=1"\r\n"%~dp0..\\..\\..\\..\\DeepSeek Harness.exe" --expose-internals "%~dp0..\\..\\..\\app.asar\\dsh\\node_modules\\@deepseek-ai\\dsh-desktop-host\\lib\\cli.js" %*\r\nexit /b %errorlevel%\r\n');+ assert.equal(cmdTarget(shim), null);+ assert.equal(findExecutable('dsh', [], { PATH: bin }, { win: true }), shim);+});+test("Cursor's agent on Windows: found in %LOCALAPPDATA%\\cursor-agent, started by its own shim, which runs its own Node", () => {if (process.platform === 'win32') return;const home = mkdtempSync(join(tmpdir(), 'of-home-'));