@zoraxylia/dsh-codex-adapter 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-adapter",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Dispatch subtasks to DeepSeek Harness (DSH) agents as native subagents with live progress",
5
5
  "author": {
6
6
  "name": "zx-yk"
package/lib/server.mjs CHANGED
@@ -15069,7 +15069,7 @@ function describeBindings(config = {}) {
15069
15069
  }
15070
15070
 
15071
15071
  // src/server.mjs
15072
- var server = new McpServer({ name: "dsh-adapter", version: "0.1.12" });
15072
+ var server = new McpServer({ name: "dsh-adapter", version: "0.1.13" });
15073
15073
  var tierSchema = external_exports.enum(["flash", "pro"]).optional().describe("Worker model tier. flash = mechanical, well-scoped work (single-file edits, lookups, formatting); pro = multi-file changes, debugging, design judgment. Omit to use the session default. Ignored when worker= is set.");
15074
15074
  var effortSchema = external_exports.enum(["off", "high", "max"]).optional().describe("Reasoning effort for the worker. Omit to use the session default. With worker= it only applies when passed explicitly and the profile supports it (agy maps to low/medium/high).");
15075
15075
  var workerSchema = external_exports.string().optional().describe('Named CLI worker profile (e.g. "agy" or "grok"). Explicit opt-in only: set it when the user explicitly asks for that external coding CLI, never as a default. When set, dispatch bypasses tier/mode and runs the task through that CLI; the profile pins backend\xD7model\xD7effort. See dsh_worker_config output, worker_profiles field, for the available profiles.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoraxylia/dsh-codex-adapter",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "type": "module",
5
5
  "main": "./src/hub/index.mjs",
6
6
  "description": "Dispatch tasks from Claude Code / Codex to DSH agents as native subagents with live progress; configure dispatch defaults, execution mode, and vision / image-generation access, installed into the host in one click.",
@@ -6,6 +6,7 @@ import { readFileSync, writeFileSync, mkdirSync, copyFileSync, existsSync, readd
6
6
  import { dirname, join, resolve, relative } from 'node:path';
7
7
  import { fileURLToPath } from 'node:url';
8
8
  import { homedir } from 'node:os';
9
+ import { execFileSync } from 'node:child_process';
9
10
 
10
11
  const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..', '..');
11
12
  const MARKETPLACE_NAME = 'dsh-adapter';
@@ -285,12 +286,24 @@ export async function installClaudeCode({ home = homedir(), statusline = false }
285
286
  * the worker tools without spawning a subagent first. */
286
287
  function codexMcpBlock(serverPath) {
287
288
  return '[mcp_servers.dsh-adapter]\n'
288
- + 'command = "node"\n'
289
+ + `command = ${tomlString(resolveNodeBinary())}\n`
289
290
  + `args = [${tomlString(serverPath)}]\n`
290
291
  + 'default_tools_approval_mode = "approve"\n'
291
292
  + 'tool_timeout_sec = 3600\n';
292
293
  }
293
294
 
295
+ /** Absolute node path: a GUI client's PATH often lacks the shim a terminal
296
+ * has, so "node" is not a safe launcher for the registered server. */
297
+ function resolveNodeBinary() {
298
+ try {
299
+ const which = process.platform === 'win32' ? 'where' : 'which';
300
+ const out = execFileSync(which, ['node'], { encoding: 'utf8', timeout: 5000 });
301
+ const first = out.split(/\r?\n/).map((line) => line.trim()).filter(Boolean)[0];
302
+ if (first && existsSync(first)) return first;
303
+ } catch { /* fall back below */ }
304
+ return 'node';
305
+ }
306
+
294
307
  function upsertCodexMcp(text, serverPath) {
295
308
  const block = codexMcpBlock(serverPath);
296
309
  const lines = text.split(/\r?\n/);
@@ -344,7 +357,7 @@ export function installCodex({ home = homedir(), scope } = {}) {
344
357
  const next = upsertCodexMcp(before, join(ROOT, 'src', 'server.mjs'));
345
358
  if (next !== before) {
346
359
  writeFileSync(configFile, next);
347
- actions.push('mcp: registered dsh-adapter globally (approve, 3600s)');
360
+ actions.push('mcp: registered dsh-adapter globally (approve, 3600s) — restart Codex to load it');
348
361
  } else {
349
362
  actions.push('mcp: dsh-adapter already registered');
350
363
  }
package/src/server.mjs CHANGED
@@ -12,7 +12,7 @@ import { acquireCwdLock, releaseCwdLockByJobId, updateCwdLockHolder, getCwdLocks
12
12
  import { resolveWorkerCwd } from './paths.mjs';
13
13
  import { detectOrchestrator } from './process-info.mjs';
14
14
 
15
- const server = new McpServer({ name: 'dsh-adapter', version: '0.1.12' });
15
+ const server = new McpServer({ name: 'dsh-adapter', version: '0.1.13' });
16
16
 
17
17
  const tierSchema = z.enum(['flash', 'pro']).optional().describe('Worker model tier. flash = mechanical, well-scoped work (single-file edits, lookups, formatting); pro = multi-file changes, debugging, design judgment. Omit to use the session default. Ignored when worker= is set.');
18
18
  const effortSchema = z.enum(['off', 'high', 'max']).optional().describe('Reasoning effort for the worker. Omit to use the session default. With worker= it only applies when passed explicitly and the profile supports it (agy maps to low/medium/high).');