@zoraxylia/dsh-codex-adapter 0.1.18 → 0.1.19
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.
- package/.claude-plugin/plugin.json +1 -1
- package/lib/client.js +21 -2
- package/lib/server.mjs +7 -5
- package/package.json +1 -1
- package/src/hub-client.mjs +12 -4
- package/src/server.mjs +1 -1
package/lib/client.js
CHANGED
|
@@ -1541,7 +1541,17 @@ function WorkersPanel({ ctx }) {
|
|
|
1541
1541
|
}) : fields]
|
|
1542
1542
|
});
|
|
1543
1543
|
const integrationRow = (name, installed, extra, installTarget, uninstallTarget, tips) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1544
|
-
style:
|
|
1544
|
+
style: {
|
|
1545
|
+
...S.card,
|
|
1546
|
+
transition: "background 120ms ease",
|
|
1547
|
+
borderRadius: 8
|
|
1548
|
+
},
|
|
1549
|
+
onMouseEnter: (e) => {
|
|
1550
|
+
e.currentTarget.style.background = "rgba(128,128,128,0.06)";
|
|
1551
|
+
},
|
|
1552
|
+
onMouseLeave: (e) => {
|
|
1553
|
+
e.currentTarget.style.background = "transparent";
|
|
1554
|
+
},
|
|
1545
1555
|
children: [
|
|
1546
1556
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1547
1557
|
style: {
|
|
@@ -2713,7 +2723,16 @@ function WorkersPanel({ ctx }) {
|
|
|
2713
2723
|
const secs = Number.isFinite(start) && Number.isFinite(end) && end >= start ? ((end - start) / 1e3).toFixed(1) + "s" : "—";
|
|
2714
2724
|
const color = r.status === "failed" ? "#e5484d" : r.status === "done" ? "#3fb950" : void 0;
|
|
2715
2725
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", {
|
|
2716
|
-
style: {
|
|
2726
|
+
style: {
|
|
2727
|
+
borderTop: "1px solid rgba(128,128,128,0.14)",
|
|
2728
|
+
transition: "background 120ms ease"
|
|
2729
|
+
},
|
|
2730
|
+
onMouseEnter: (e) => {
|
|
2731
|
+
e.currentTarget.style.background = "rgba(128,128,128,0.05)";
|
|
2732
|
+
},
|
|
2733
|
+
onMouseLeave: (e) => {
|
|
2734
|
+
e.currentTarget.style.background = "transparent";
|
|
2735
|
+
},
|
|
2717
2736
|
children: [
|
|
2718
2737
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
2719
2738
|
style: {
|
package/lib/server.mjs
CHANGED
|
@@ -14483,13 +14483,15 @@ function pluginEnv(suffix, options = {}) {
|
|
|
14483
14483
|
}
|
|
14484
14484
|
|
|
14485
14485
|
// src/hub-client.mjs
|
|
14486
|
-
|
|
14487
|
-
|
|
14486
|
+
function apiBase() {
|
|
14487
|
+
const base = (pluginEnv("ADAPTER_HUB") ?? readGlobalConfig().hub_url ?? "").replace(/\/+$/, "");
|
|
14488
|
+
return `${base}/_dsh/dsh-adapter`;
|
|
14489
|
+
}
|
|
14488
14490
|
var lastProbe = { at: 0, ok: false };
|
|
14489
14491
|
async function hubAvailable() {
|
|
14490
14492
|
if (Date.now() - lastProbe.at < 1e4) return lastProbe.ok;
|
|
14491
14493
|
try {
|
|
14492
|
-
const res = await fetch(`${
|
|
14494
|
+
const res = await fetch(`${apiBase()}/ping`, { signal: AbortSignal.timeout(800) });
|
|
14493
14495
|
const body = await res.json();
|
|
14494
14496
|
lastProbe = { at: Date.now(), ok: res.ok && body?.service === "dsh-adapter-hub" };
|
|
14495
14497
|
} catch {
|
|
@@ -14498,7 +14500,7 @@ async function hubAvailable() {
|
|
|
14498
14500
|
return lastProbe.ok;
|
|
14499
14501
|
}
|
|
14500
14502
|
async function call(path, init) {
|
|
14501
|
-
const res = await fetch(`${
|
|
14503
|
+
const res = await fetch(`${apiBase()}${path}`, init);
|
|
14502
14504
|
const body = await res.json();
|
|
14503
14505
|
if (!res.ok || body.ok === false) throw new Error(body.error ?? `hub request failed (${res.status})`);
|
|
14504
14506
|
return body;
|
|
@@ -15072,7 +15074,7 @@ function describeBindings(config = {}) {
|
|
|
15072
15074
|
}
|
|
15073
15075
|
|
|
15074
15076
|
// src/server.mjs
|
|
15075
|
-
var server = new McpServer({ name: "dsh-adapter", version: "0.1.
|
|
15077
|
+
var server = new McpServer({ name: "dsh-adapter", version: "0.1.19" });
|
|
15076
15078
|
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.");
|
|
15077
15079
|
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).");
|
|
15078
15080
|
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.
|
|
3
|
+
"version": "0.1.19",
|
|
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.",
|
package/src/hub-client.mjs
CHANGED
|
@@ -5,15 +5,23 @@
|
|
|
5
5
|
import { readGlobalConfig } from './install/install.mjs';
|
|
6
6
|
import { pluginEnv } from './plugin-env.mjs';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Resolved per call: DSH picks a fresh port on every launch and the hub URL is
|
|
10
|
+
* synced into the config afterwards, so a long-lived MCP process must not pin
|
|
11
|
+
* the value it saw at startup (that made the desktop/CLI session report the
|
|
12
|
+
* hub as unreachable after one DSH restart, then fall into standalone mode).
|
|
13
|
+
*/
|
|
14
|
+
function apiBase() {
|
|
15
|
+
const base = (pluginEnv('ADAPTER_HUB') ?? readGlobalConfig().hub_url ?? '').replace(/\/+$/, '');
|
|
16
|
+
return `${base}/_dsh/dsh-adapter`;
|
|
17
|
+
}
|
|
10
18
|
|
|
11
19
|
let lastProbe = { at: 0, ok: false };
|
|
12
20
|
|
|
13
21
|
export async function hubAvailable() {
|
|
14
22
|
if (Date.now() - lastProbe.at < 10_000) return lastProbe.ok;
|
|
15
23
|
try {
|
|
16
|
-
const res = await fetch(`${
|
|
24
|
+
const res = await fetch(`${apiBase()}/ping`, { signal: AbortSignal.timeout(800) });
|
|
17
25
|
const body = await res.json();
|
|
18
26
|
lastProbe = { at: Date.now(), ok: res.ok && body?.service === 'dsh-adapter-hub' };
|
|
19
27
|
} catch {
|
|
@@ -23,7 +31,7 @@ export async function hubAvailable() {
|
|
|
23
31
|
}
|
|
24
32
|
|
|
25
33
|
async function call(path, init) {
|
|
26
|
-
const res = await fetch(`${
|
|
34
|
+
const res = await fetch(`${apiBase()}${path}`, init);
|
|
27
35
|
const body = await res.json();
|
|
28
36
|
if (!res.ok || body.ok === false) throw new Error(body.error ?? `hub request failed (${res.status})`);
|
|
29
37
|
return body;
|
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.
|
|
15
|
+
const server = new McpServer({ name: 'dsh-adapter', version: '0.1.19' });
|
|
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).');
|