@zoraxylia/dsh-codex-adapter 0.1.16 → 0.1.17
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 +52 -45
- package/lib/server.mjs +1 -1
- package/package.json +1 -1
- package/src/client/index.tsx +27 -21
- package/src/server.mjs +1 -1
package/lib/client.js
CHANGED
|
@@ -1038,12 +1038,27 @@ function WorkersPanel({ ctx }) {
|
|
|
1038
1038
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
1039
1039
|
const [historyRows, setHistoryRows] = (0, react.useState)([]);
|
|
1040
1040
|
const [historyAgg, setHistoryAgg] = (0, react.useState)(null);
|
|
1041
|
-
const [historyCollapsed, setHistoryCollapsed] = (0, react.useState)(true);
|
|
1042
1041
|
const [provForm, setProvForm] = (0, react.useState)(null);
|
|
1043
1042
|
const [modelAdd, setModelAdd] = (0, react.useState)(null);
|
|
1044
1043
|
const [testResult, setTestResult] = (0, react.useState)(null);
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1044
|
+
const TABS = [
|
|
1045
|
+
"integrations",
|
|
1046
|
+
"config",
|
|
1047
|
+
"history"
|
|
1048
|
+
];
|
|
1049
|
+
const [tab, setTab] = (0, react.useState)(() => {
|
|
1050
|
+
try {
|
|
1051
|
+
const saved = localStorage.getItem("dsh-adapter-tab");
|
|
1052
|
+
return TABS.includes(saved ?? "") ? saved : "config";
|
|
1053
|
+
} catch {
|
|
1054
|
+
return "config";
|
|
1055
|
+
}
|
|
1056
|
+
});
|
|
1057
|
+
(0, react.useEffect)(() => {
|
|
1058
|
+
try {
|
|
1059
|
+
localStorage.setItem("dsh-adapter-tab", tab);
|
|
1060
|
+
} catch {}
|
|
1061
|
+
}, [tab]);
|
|
1047
1062
|
/**
|
|
1048
1063
|
* The panel is served from disk on every load, but the hub's routes are
|
|
1049
1064
|
* registered at instance boot — after an upgrade the new UI can call a route
|
|
@@ -1588,38 +1603,6 @@ function WorkersPanel({ ctx }) {
|
|
|
1588
1603
|
]
|
|
1589
1604
|
});
|
|
1590
1605
|
/** Clickable section header that toggles its section's collapsed state. */
|
|
1591
|
-
const sectionHeader = (text, collapsed, toggle) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1592
|
-
role: "button",
|
|
1593
|
-
tabIndex: 0,
|
|
1594
|
-
"aria-expanded": !collapsed,
|
|
1595
|
-
title: collapsed ? copy.expand : copy.collapse,
|
|
1596
|
-
onClick: toggle,
|
|
1597
|
-
onKeyDown: (e) => {
|
|
1598
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
1599
|
-
e.preventDefault();
|
|
1600
|
-
toggle();
|
|
1601
|
-
}
|
|
1602
|
-
},
|
|
1603
|
-
style: {
|
|
1604
|
-
...S.section,
|
|
1605
|
-
display: "flex",
|
|
1606
|
-
alignItems: "center",
|
|
1607
|
-
gap: 6,
|
|
1608
|
-
cursor: "pointer",
|
|
1609
|
-
userSelect: "none"
|
|
1610
|
-
},
|
|
1611
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1612
|
-
"aria-hidden": "true",
|
|
1613
|
-
style: {
|
|
1614
|
-
fontSize: 11,
|
|
1615
|
-
width: 12,
|
|
1616
|
-
flexShrink: 0,
|
|
1617
|
-
textAlign: "center",
|
|
1618
|
-
opacity: .85
|
|
1619
|
-
},
|
|
1620
|
-
children: collapsed ? "▸" : "▾"
|
|
1621
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: text })]
|
|
1622
|
-
});
|
|
1623
1606
|
const rows = jobsLoaded ? displayJobs(jobs, ghosts) : [];
|
|
1624
1607
|
const groups = groupJobs(rows);
|
|
1625
1608
|
const locks = workspaceLocks(rows);
|
|
@@ -1829,8 +1812,35 @@ function WorkersPanel({ ctx }) {
|
|
|
1829
1812
|
style: { opacity: .75 },
|
|
1830
1813
|
children: copy.intro
|
|
1831
1814
|
}),
|
|
1832
|
-
|
|
1833
|
-
|
|
1815
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1816
|
+
style: {
|
|
1817
|
+
display: "flex",
|
|
1818
|
+
gap: 2,
|
|
1819
|
+
borderBottom: "1px solid rgba(128,128,128,0.2)",
|
|
1820
|
+
marginTop: 2
|
|
1821
|
+
},
|
|
1822
|
+
children: [
|
|
1823
|
+
["integrations", copy.integrations],
|
|
1824
|
+
["config", copy.globalConfig],
|
|
1825
|
+
["history", copy.history]
|
|
1826
|
+
].map(([key, label]) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1827
|
+
type: "button",
|
|
1828
|
+
onClick: () => setTab(key),
|
|
1829
|
+
style: {
|
|
1830
|
+
padding: "6px 12px",
|
|
1831
|
+
fontSize: 12.5,
|
|
1832
|
+
border: "none",
|
|
1833
|
+
background: "transparent",
|
|
1834
|
+
cursor: "pointer",
|
|
1835
|
+
color: tab === key ? "inherit" : "rgba(128,128,128,0.85)",
|
|
1836
|
+
fontWeight: tab === key ? 600 : 400,
|
|
1837
|
+
borderBottom: tab === key ? "2px solid #4c8dff" : "2px solid transparent",
|
|
1838
|
+
marginBottom: -1
|
|
1839
|
+
},
|
|
1840
|
+
children: label
|
|
1841
|
+
}, key))
|
|
1842
|
+
}),
|
|
1843
|
+
tab === "integrations" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1834
1844
|
style: {
|
|
1835
1845
|
display: "flex",
|
|
1836
1846
|
flexDirection: "column",
|
|
@@ -1873,8 +1883,7 @@ function WorkersPanel({ ctx }) {
|
|
|
1873
1883
|
})
|
|
1874
1884
|
]
|
|
1875
1885
|
}),
|
|
1876
|
-
|
|
1877
|
-
!globalConfigCollapsed && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [config && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
1886
|
+
tab === "config" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [config && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
1878
1887
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1879
1888
|
style: S.group,
|
|
1880
1889
|
children: copy.groupDispatch
|
|
@@ -2527,8 +2536,7 @@ function WorkersPanel({ ctx }) {
|
|
|
2527
2536
|
},
|
|
2528
2537
|
children: notice
|
|
2529
2538
|
}),
|
|
2530
|
-
|
|
2531
|
-
!historyCollapsed && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2539
|
+
tab === "history" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2532
2540
|
style: {
|
|
2533
2541
|
display: "flex",
|
|
2534
2542
|
flexDirection: "column",
|
|
@@ -2691,11 +2699,10 @@ function WorkersPanel({ ctx }) {
|
|
|
2691
2699
|
})
|
|
2692
2700
|
})]
|
|
2693
2701
|
}),
|
|
2694
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2702
|
+
tab === "history" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2695
2703
|
style: S.section,
|
|
2696
2704
|
children: copy.jobs
|
|
2697
|
-
}),
|
|
2698
|
-
!jobsLoaded || groups.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2705
|
+
}), !jobsLoaded || groups.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2699
2706
|
style: { opacity: .55 },
|
|
2700
2707
|
children: copy.empty
|
|
2701
2708
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -2742,7 +2749,7 @@ function WorkersPanel({ ctx }) {
|
|
|
2742
2749
|
}, workspaceKey(group.cwd))) })
|
|
2743
2750
|
]
|
|
2744
2751
|
})
|
|
2745
|
-
}),
|
|
2752
|
+
})] }),
|
|
2746
2753
|
hoverTask && (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2747
2754
|
style: {
|
|
2748
2755
|
position: "fixed",
|
package/lib/server.mjs
CHANGED
|
@@ -15072,7 +15072,7 @@ function describeBindings(config = {}) {
|
|
|
15072
15072
|
}
|
|
15073
15073
|
|
|
15074
15074
|
// src/server.mjs
|
|
15075
|
-
var server = new McpServer({ name: "dsh-adapter", version: "0.1.
|
|
15075
|
+
var server = new McpServer({ name: "dsh-adapter", version: "0.1.17" });
|
|
15076
15076
|
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
15077
|
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
15078
|
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.17",
|
|
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
|
@@ -424,7 +424,6 @@ function WorkersPanel({ ctx }: { ctx: any }) {
|
|
|
424
424
|
const [busy, setBusy] = useState(false);
|
|
425
425
|
const [historyRows, setHistoryRows] = useState<any[]>([]);
|
|
426
426
|
const [historyAgg, setHistoryAgg] = useState<any>(null);
|
|
427
|
-
const [historyCollapsed, setHistoryCollapsed] = useState(true);
|
|
428
427
|
const [provForm, setProvForm] = useState<{
|
|
429
428
|
originalId?: string; name: string; type: 'api' | 'cli'; models: string;
|
|
430
429
|
base_url: string; api_key: string; imagegen_model: string;
|
|
@@ -432,8 +431,15 @@ function WorkersPanel({ ctx }: { ctx: any }) {
|
|
|
432
431
|
} | null>(null);
|
|
433
432
|
const [modelAdd, setModelAdd] = useState<string | null>(null);
|
|
434
433
|
const [testResult, setTestResult] = useState<{ key: string; ok?: boolean; steps?: any[]; error?: string; busy: boolean } | null>(null);
|
|
435
|
-
const [
|
|
436
|
-
|
|
434
|
+
const TABS = ['integrations', 'config', 'history'] as const;
|
|
435
|
+
type TabKey = (typeof TABS)[number];
|
|
436
|
+
const [tab, setTab] = useState<TabKey>(() => {
|
|
437
|
+
try {
|
|
438
|
+
const saved = localStorage.getItem('dsh-adapter-tab');
|
|
439
|
+
return (TABS as readonly string[]).includes(saved ?? '') ? (saved as TabKey) : 'config';
|
|
440
|
+
} catch { return 'config'; }
|
|
441
|
+
});
|
|
442
|
+
useEffect(() => { try { localStorage.setItem('dsh-adapter-tab', tab); } catch { /* private mode */ } }, [tab]);
|
|
437
443
|
// Deliberately no default dispatch-target select here: CLI backends stay
|
|
438
444
|
// opt-in per call via the worker argument (see the read-only workerOptIn
|
|
439
445
|
// card below). Re-adding a default would silently re-route every
|
|
@@ -739,18 +745,6 @@ function WorkersPanel({ ctx }: { ctx: any }) {
|
|
|
739
745
|
);
|
|
740
746
|
|
|
741
747
|
/** Clickable section header that toggles its section's collapsed state. */
|
|
742
|
-
const sectionHeader = (text: string, collapsed: boolean, toggle: () => void) => (
|
|
743
|
-
<div
|
|
744
|
-
role="button" tabIndex={0} aria-expanded={!collapsed}
|
|
745
|
-
title={collapsed ? copy.expand : copy.collapse}
|
|
746
|
-
onClick={toggle}
|
|
747
|
-
onKeyDown={(e: any) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); toggle(); } }}
|
|
748
|
-
style={{ ...S.section, display: 'flex', alignItems: 'center', gap: 6, cursor: 'pointer', userSelect: 'none' as const }}
|
|
749
|
-
>
|
|
750
|
-
<span aria-hidden="true" style={{ fontSize: 11, width: 12, flexShrink: 0, textAlign: 'center' as const, opacity: 0.85 }}>{collapsed ? '▸' : '▾'}</span>
|
|
751
|
-
<span>{text}</span>
|
|
752
|
-
</div>
|
|
753
|
-
);
|
|
754
748
|
|
|
755
749
|
// --- jobs board (WPC10; workspace groups + lock badges: WPC13) ------------
|
|
756
750
|
const rows = jobsLoaded ? displayJobs(jobs, ghosts) : [];
|
|
@@ -824,8 +818,20 @@ function WorkersPanel({ ctx }: { ctx: any }) {
|
|
|
824
818
|
<div style={{ fontSize: 19, fontWeight: 600, marginBottom: -2 }}>{copy.title}</div>
|
|
825
819
|
<div style={{ opacity: 0.75 }}>{copy.intro}</div>
|
|
826
820
|
|
|
827
|
-
{
|
|
828
|
-
|
|
821
|
+
<div style={{ display: 'flex', gap: 2, borderBottom: '1px solid rgba(128,128,128,0.2)', marginTop: 2 }}>
|
|
822
|
+
{([['integrations', copy.integrations], ['config', copy.globalConfig], ['history', copy.history]] as const).map(([key, label]) => (
|
|
823
|
+
<button key={key} type="button" onClick={() => setTab(key)}
|
|
824
|
+
style={{
|
|
825
|
+
padding: '6px 12px', fontSize: 12.5, border: 'none', background: 'transparent', cursor: 'pointer',
|
|
826
|
+
color: tab === key ? 'inherit' : 'rgba(128,128,128,0.85)',
|
|
827
|
+
fontWeight: tab === key ? 600 : 400,
|
|
828
|
+
borderBottom: tab === key ? '2px solid #4c8dff' : '2px solid transparent',
|
|
829
|
+
marginBottom: -1,
|
|
830
|
+
}}>{label}</button>
|
|
831
|
+
))}
|
|
832
|
+
</div>
|
|
833
|
+
|
|
834
|
+
{tab === 'integrations' && (
|
|
829
835
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
|
830
836
|
{integrationRow('Claude Code', !!status?.claude?.installed,
|
|
831
837
|
status?.claude?.installed ? <span style={S.chip(!!status?.claude?.hud)}>{copy.hud}</span> : null,
|
|
@@ -849,8 +855,7 @@ function WorkersPanel({ ctx }: { ctx: any }) {
|
|
|
849
855
|
</div>
|
|
850
856
|
)}
|
|
851
857
|
|
|
852
|
-
{
|
|
853
|
-
{!globalConfigCollapsed && (<>
|
|
858
|
+
{tab === 'config' && (<>
|
|
854
859
|
{config && (<>
|
|
855
860
|
<div style={S.group}>{copy.groupDispatch}</div>
|
|
856
861
|
{block(copy.cardDispatch, (<>
|
|
@@ -1048,8 +1053,7 @@ function WorkersPanel({ ctx }: { ctx: any }) {
|
|
|
1048
1053
|
|
|
1049
1054
|
{notice !== '' && <div style={{ fontSize: 12, opacity: 0.8, whiteSpace: 'pre-wrap' }}>{notice}</div>}
|
|
1050
1055
|
|
|
1051
|
-
{
|
|
1052
|
-
{!historyCollapsed && (
|
|
1056
|
+
{tab === 'history' && (
|
|
1053
1057
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
|
1054
1058
|
<div style={{ display: 'flex', gap: 14, alignItems: 'center', flexWrap: 'wrap', fontSize: 12 }}>
|
|
1055
1059
|
<span>{copy.historyTotal}: <b>{historyAgg?.total ?? 0}</b></span>
|
|
@@ -1099,6 +1103,7 @@ function WorkersPanel({ ctx }: { ctx: any }) {
|
|
|
1099
1103
|
</div>
|
|
1100
1104
|
)}
|
|
1101
1105
|
|
|
1106
|
+
{tab === 'history' && (<>
|
|
1102
1107
|
<div style={S.section}>{copy.jobs}</div>
|
|
1103
1108
|
{!jobsLoaded || groups.length === 0 ? (
|
|
1104
1109
|
<div style={{ opacity: 0.55 }}>{copy.empty}</div>
|
|
@@ -1123,6 +1128,7 @@ function WorkersPanel({ ctx }: { ctx: any }) {
|
|
|
1123
1128
|
</table>
|
|
1124
1129
|
</div>
|
|
1125
1130
|
)}
|
|
1131
|
+
</>)}
|
|
1126
1132
|
{hoverTask && createPortal(
|
|
1127
1133
|
<div style={{
|
|
1128
1134
|
position: 'fixed', right: hoverTask.right, zIndex: 9999,
|
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.17' });
|
|
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).');
|