@zoraxylia/dsh-codex-adapter 0.1.1 → 0.1.2

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.1",
3
+ "version": "0.1.2",
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
@@ -15059,7 +15059,7 @@ function describeBindings(config = {}) {
15059
15059
  }
15060
15060
 
15061
15061
  // src/server.mjs
15062
- var server = new McpServer({ name: "dsh-adapter", version: "0.1.1" });
15062
+ var server = new McpServer({ name: "dsh-adapter", version: "0.1.2" });
15063
15063
  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.");
15064
15064
  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).");
15065
15065
  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.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "main": "./src/hub/index.mjs",
6
6
  "description": "DeepSeek Harness plugin: dispatch work to DSH agents from Claude Code / Codex, as native subagents with live progress",
package/src/hub/index.mjs CHANGED
@@ -377,6 +377,27 @@ export async function apply(ctx) {
377
377
  const webServer = webCtx.webServer;
378
378
  const disposers = [];
379
379
 
380
+ // The desktop host binds an OS-assigned port on every launch, so a fixed
381
+ // hub_url goes stale after each restart and the host-side MCP shim falls
382
+ // back to standalone mode. Publish this instance's origin into the shared
383
+ // config instead; a hub_url that names another machine is left untouched.
384
+ const syncHubUrl = (attempt = 0) => {
385
+ try {
386
+ const origin = webServer.getOrigin?.();
387
+ const current = readGlobalConfig();
388
+ const isLocal = /^https?:\/\/(127\.0\.0\.1|localhost|\[::1\]):\d+$/.test(current.hub_url ?? '');
389
+ if (origin && (!current.hub_url || isLocal) && current.hub_url !== origin) {
390
+ writeGlobalConfig({ hub_url: origin });
391
+ ctx.logger?.info?.('dsh-adapter: hub_url synced to ' + origin);
392
+ }
393
+ } catch (err) {
394
+ // getOrigin() throws until the listener is bound; retry briefly.
395
+ if (attempt < 3) { setTimeout(() => syncHubUrl(attempt + 1), 1500).unref?.(); return; }
396
+ ctx.logger?.warn?.('dsh-adapter: hub_url sync skipped: ' + (err?.message ?? err));
397
+ }
398
+ };
399
+ syncHubUrl();
400
+
380
401
  disposers.push(webServer.register({
381
402
  kind: 'exact', path: `${ROUTE_BASE}/worker-probe`,
382
403
  handler: async (req, res) => {
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.1' });
15
+ const server = new McpServer({ name: 'dsh-adapter', version: '0.1.2' });
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).');