@zoraxylia/dsh-codex-adapter 0.1.10 → 0.1.11
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 +38 -1
- package/lib/server.mjs +1 -1
- package/package.json +1 -1
- package/src/client/index.tsx +18 -2
- package/src/server.mjs +1 -1
package/lib/client.js
CHANGED
|
@@ -406,6 +406,7 @@ const COPY = {
|
|
|
406
406
|
integrations: "集成",
|
|
407
407
|
collapse: "折叠",
|
|
408
408
|
expand: "展开",
|
|
409
|
+
doneAt: (t) => `已更新 · ${t}`,
|
|
409
410
|
installed: "已安装",
|
|
410
411
|
notInstalled: "未安装",
|
|
411
412
|
hud: "HUD 段",
|
|
@@ -575,6 +576,7 @@ const COPY = {
|
|
|
575
576
|
integrations: "Integrations",
|
|
576
577
|
collapse: "Collapse",
|
|
577
578
|
expand: "Expand",
|
|
579
|
+
doneAt: (t) => `Updated · ${t}`,
|
|
578
580
|
installed: "installed",
|
|
579
581
|
notInstalled: "not installed",
|
|
580
582
|
hud: "HUD segment",
|
|
@@ -1002,6 +1004,7 @@ function WorkersPanel({ ctx }) {
|
|
|
1002
1004
|
label: x.trust === "system" && copy.builtInPresetNames[x.id] || x.name || x.id
|
|
1003
1005
|
}))], [presetRoster, copy]);
|
|
1004
1006
|
const [notice, setNotice] = (0, react.useState)("");
|
|
1007
|
+
const [rowNote, setRowNote] = (0, react.useState)({});
|
|
1005
1008
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
1006
1009
|
const [provForm, setProvForm] = (0, react.useState)(null);
|
|
1007
1010
|
const [modelAdd, setModelAdd] = (0, react.useState)(null);
|
|
@@ -1181,14 +1184,35 @@ function WorkersPanel({ ctx }) {
|
|
|
1181
1184
|
if (confirmName && !window.confirm(copy.confirmRestore(confirmName))) return;
|
|
1182
1185
|
setBusy(true);
|
|
1183
1186
|
setNotice(copy.working);
|
|
1187
|
+
setRowNote((m) => ({
|
|
1188
|
+
...m,
|
|
1189
|
+
[target]: {
|
|
1190
|
+
kind: "working",
|
|
1191
|
+
text: copy.working
|
|
1192
|
+
}
|
|
1193
|
+
}));
|
|
1184
1194
|
try {
|
|
1185
1195
|
const r = await post("/install", { target });
|
|
1186
1196
|
if (r.ok === false) throw new Error(r.error);
|
|
1187
1197
|
setNotice((r.actions ?? []).join(";"));
|
|
1198
|
+
setRowNote((m) => ({
|
|
1199
|
+
...m,
|
|
1200
|
+
[target]: {
|
|
1201
|
+
kind: "ok",
|
|
1202
|
+
text: copy.doneAt((/* @__PURE__ */ new Date()).toLocaleTimeString())
|
|
1203
|
+
}
|
|
1204
|
+
}));
|
|
1188
1205
|
const s = await get("/install/status");
|
|
1189
1206
|
if (s.ok) setStatus(s.status);
|
|
1190
1207
|
} catch (e) {
|
|
1191
1208
|
setNotice(String(e?.message ?? e));
|
|
1209
|
+
setRowNote((m) => ({
|
|
1210
|
+
...m,
|
|
1211
|
+
[target]: {
|
|
1212
|
+
kind: "error",
|
|
1213
|
+
text: String(e?.message ?? e)
|
|
1214
|
+
}
|
|
1215
|
+
}));
|
|
1192
1216
|
} finally {
|
|
1193
1217
|
setBusy(false);
|
|
1194
1218
|
}
|
|
@@ -1490,7 +1514,7 @@ function WorkersPanel({ ctx }) {
|
|
|
1490
1514
|
onClick: () => {
|
|
1491
1515
|
act(installTarget);
|
|
1492
1516
|
},
|
|
1493
|
-
children: copy.update
|
|
1517
|
+
children: rowNote[installTarget]?.kind === "working" ? copy.working : copy.update
|
|
1494
1518
|
}),
|
|
1495
1519
|
installed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1496
1520
|
style: {
|
|
@@ -1503,6 +1527,19 @@ function WorkersPanel({ ctx }) {
|
|
|
1503
1527
|
act(uninstallTarget, name);
|
|
1504
1528
|
},
|
|
1505
1529
|
children: copy.restore
|
|
1530
|
+
}),
|
|
1531
|
+
rowNote[installTarget] && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1532
|
+
style: {
|
|
1533
|
+
fontSize: 11.5,
|
|
1534
|
+
maxWidth: 260,
|
|
1535
|
+
overflow: "hidden",
|
|
1536
|
+
textOverflow: "ellipsis",
|
|
1537
|
+
whiteSpace: "nowrap",
|
|
1538
|
+
opacity: rowNote[installTarget].kind === "working" ? .6 : .85,
|
|
1539
|
+
color: rowNote[installTarget].kind === "error" ? "#e5484d" : void 0
|
|
1540
|
+
},
|
|
1541
|
+
title: rowNote[installTarget].text,
|
|
1542
|
+
children: rowNote[installTarget].text
|
|
1506
1543
|
})
|
|
1507
1544
|
]
|
|
1508
1545
|
});
|
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.
|
|
15072
|
+
var server = new McpServer({ name: "dsh-adapter", version: "0.1.11" });
|
|
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.
|
|
3
|
+
"version": "0.1.11",
|
|
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/client/index.tsx
CHANGED
|
@@ -89,6 +89,7 @@ const COPY = {
|
|
|
89
89
|
intro: 'Claude Code / Codex 可以给 DSH agent 分派任务,在宿主里显示为原生子代理、进度可见。配置派发默认值、执行方式,以及接入视觉与生图能力,一键装进宿主。',
|
|
90
90
|
integrations: '集成',
|
|
91
91
|
collapse: '折叠', expand: '展开',
|
|
92
|
+
doneAt: (t: string) => `已更新 · ${t}`,
|
|
92
93
|
installed: '已安装', notInstalled: '未安装', hud: 'HUD 段',
|
|
93
94
|
install: '安装', update: '更新', restore: '还原',
|
|
94
95
|
confirmRestore: (name: string) => `确定从 ${name} 移除 dsh-adapter 集成?(settings 会先备份)`,
|
|
@@ -182,6 +183,7 @@ const COPY = {
|
|
|
182
183
|
intro: 'Claude Code / Codex can dispatch tasks to DSH agents and see them as native subagents in the host with live progress. Configure dispatch defaults, execution mode, and vision / image-generation access, then install into the host in one click.',
|
|
183
184
|
integrations: 'Integrations',
|
|
184
185
|
collapse: 'Collapse', expand: 'Expand',
|
|
186
|
+
doneAt: (t: string) => `Updated · ${t}`,
|
|
185
187
|
installed: 'installed', notInstalled: 'not installed', hud: 'HUD segment',
|
|
186
188
|
install: 'Install', update: 'Update', restore: 'Restore',
|
|
187
189
|
confirmRestore: (name: string) => `Remove the dsh-adapter integration from ${name}? (settings are backed up first)`,
|
|
@@ -407,6 +409,8 @@ function WorkersPanel({ ctx }: { ctx: any }) {
|
|
|
407
409
|
})),
|
|
408
410
|
], [presetRoster, copy]);
|
|
409
411
|
const [notice, setNotice] = useState('');
|
|
412
|
+
// Per-integration feedback, rendered next to the button that was pressed.
|
|
413
|
+
const [rowNote, setRowNote] = useState<Record<string, { kind: 'working' | 'ok' | 'error'; text: string }>>({});
|
|
410
414
|
const [busy, setBusy] = useState(false);
|
|
411
415
|
const [provForm, setProvForm] = useState<{
|
|
412
416
|
originalId?: string; name: string; type: 'api' | 'cli'; models: string;
|
|
@@ -543,12 +547,17 @@ function WorkersPanel({ ctx }: { ctx: any }) {
|
|
|
543
547
|
const act = useCallback(async (target: string, confirmName?: string) => {
|
|
544
548
|
if (confirmName && !window.confirm(copy.confirmRestore(confirmName))) return;
|
|
545
549
|
setBusy(true); setNotice(copy.working);
|
|
550
|
+
setRowNote((m) => ({ ...m, [target]: { kind: 'working', text: copy.working } }));
|
|
546
551
|
try {
|
|
547
552
|
const r = await post('/install', { target });
|
|
548
553
|
if (r.ok === false) throw new Error(r.error);
|
|
549
554
|
setNotice((r.actions ?? []).join(';'));
|
|
555
|
+
setRowNote((m) => ({ ...m, [target]: { kind: 'ok', text: copy.doneAt(new Date().toLocaleTimeString()) } }));
|
|
550
556
|
const s = await get('/install/status'); if (s.ok) setStatus(s.status);
|
|
551
|
-
} catch (e: any) {
|
|
557
|
+
} catch (e: any) {
|
|
558
|
+
setNotice(String(e?.message ?? e));
|
|
559
|
+
setRowNote((m) => ({ ...m, [target]: { kind: 'error', text: String(e?.message ?? e) } }));
|
|
560
|
+
} finally { setBusy(false); }
|
|
552
561
|
}, [post, get, copy]);
|
|
553
562
|
|
|
554
563
|
const applyPatch = useCallback((patch: Record<string, any>) => {
|
|
@@ -697,8 +706,15 @@ function WorkersPanel({ ctx }: { ctx: any }) {
|
|
|
697
706
|
{extra}
|
|
698
707
|
<span style={{ flex: 1 }} />
|
|
699
708
|
{!installed && <button style={S.btn} title={tips.install} disabled={busy} onClick={() => { void act(installTarget); }}>{copy.install}</button>}
|
|
700
|
-
{installed && <button style={S.btn} title={tips.update} disabled={busy} onClick={() => { void act(installTarget); }}>{copy.update}</button>}
|
|
709
|
+
{installed && <button style={S.btn} title={tips.update} disabled={busy} onClick={() => { void act(installTarget); }}>{rowNote[installTarget]?.kind === 'working' ? copy.working : copy.update}</button>}
|
|
701
710
|
{installed && <button style={{ ...S.btn, opacity: 0.75 }} title={tips.restore} disabled={busy} onClick={() => { void act(uninstallTarget, name); }}>{copy.restore}</button>}
|
|
711
|
+
{rowNote[installTarget] && (
|
|
712
|
+
<span style={{
|
|
713
|
+
fontSize: 11.5, maxWidth: 260, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap',
|
|
714
|
+
opacity: rowNote[installTarget].kind === 'working' ? 0.6 : 0.85,
|
|
715
|
+
color: rowNote[installTarget].kind === 'error' ? '#e5484d' : undefined,
|
|
716
|
+
}} title={rowNote[installTarget].text}>{rowNote[installTarget].text}</span>
|
|
717
|
+
)}
|
|
702
718
|
</div>
|
|
703
719
|
);
|
|
704
720
|
|
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.11' });
|
|
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).');
|