dsh-baton-mcp 0.6.6 → 0.6.7
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/host/lib/client.js +26 -5
- package/host/package.json +2 -2
- package/package.json +1 -1
- package/server.json +2 -2
package/host/lib/client.js
CHANGED
|
@@ -152,11 +152,12 @@ window.__ModuleLoader__.load({
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
function
|
|
156
|
-
const rpcId =
|
|
155
|
+
function senderFrom(source) {
|
|
156
|
+
const rpcId = source?.rpcId
|
|
157
157
|
const m = typeof rpcId === 'string' ? RPC_RE.exec(rpcId) : null
|
|
158
158
|
return m ? m[1] : null
|
|
159
159
|
}
|
|
160
|
+
const senderOf = (node) => senderFrom(node?.data?.source)
|
|
160
161
|
const nameOf = (sender) => NAMES[sender] ?? sender.charAt(0).toUpperCase() + sender.slice(1)
|
|
161
162
|
|
|
162
163
|
// Sender marks, drawn in the label's text colour like ChatGPT's own "sent from another chat" line.
|
|
@@ -198,24 +199,44 @@ window.__ModuleLoader__.load({
|
|
|
198
199
|
function DshBatonUserMessage(props) {
|
|
199
200
|
const Inner = shipped(ctx, key, DshBatonUserMessage)
|
|
200
201
|
if (!Inner) return null
|
|
202
|
+
// Harness 0.2.2 hands each renderer the chain renderer of its own registration; a wrapper
|
|
203
|
+
// has none to pass on, so the shipped renderer gets one that draws nothing.
|
|
204
|
+
const inner = h(Inner, props.renderSlotChain ? props : { ...props, renderSlotChain: () => null })
|
|
201
205
|
const sender = senderOf(props.node)
|
|
202
|
-
if (!sender) return
|
|
206
|
+
if (!sender) return inner
|
|
203
207
|
return h('div', { style: { display: 'flex', flexDirection: 'column' } },
|
|
204
208
|
h(Label, { sender, text: t('sentFrom', { name: nameOf(sender) }) }),
|
|
205
|
-
|
|
209
|
+
inner)
|
|
206
210
|
}
|
|
207
211
|
return DshBatonUserMessage
|
|
208
212
|
}
|
|
209
213
|
|
|
214
|
+
// Harness 0.2.2 and later: the chat declares a seat above each user message (BEFORE) and
|
|
215
|
+
// hands it the message's source, so the label sits there and the user renderer is left alone.
|
|
216
|
+
// Steering messages do not get that seat, so they keep the wrapper.
|
|
217
|
+
const BEFORE = 'conversation.chat.user.before'
|
|
218
|
+
const seatsBefore = (e) => e?.options?.key === 'user' && !!(e.children?.[BEFORE] ?? e.options?.children?.[BEFORE])
|
|
219
|
+
function beforeLabel(t) {
|
|
220
|
+
return function DshBatonSender({ matched }) {
|
|
221
|
+
return h(Label, { sender: matched, text: t('sentFrom', { name: nameOf(matched) }) })
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
210
225
|
module.exports.name = 'dsh-baton-host'
|
|
211
226
|
module.exports.inject = ['slots', 'locale']
|
|
212
227
|
module.exports.apply = function apply(ctx) {
|
|
213
228
|
ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'dsh-baton: dictionaries')
|
|
214
229
|
const t = ctx.locale.bind(NS)
|
|
215
230
|
ctx.slots.inject(SLOT, function* () {
|
|
231
|
+
const seated = ctx.slots.entries(SLOT).some(seatsBefore)
|
|
216
232
|
// locale 'chat': the shipped renderer reads its strings through the `t` it is handed.
|
|
217
|
-
for (const key of KEYS)
|
|
233
|
+
for (const key of KEYS) {
|
|
234
|
+
if (key === 'user' && seated) continue
|
|
235
|
+
yield ctx.slots.register({ name: SLOT, key, priority: PRIORITY, locale: 'chat' }, wrapperFor(ctx, key, t))
|
|
236
|
+
}
|
|
218
237
|
})
|
|
238
|
+
// Runs only in a Harness that declares the seat; older ones never declare it.
|
|
239
|
+
ctx.slots.inject(BEFORE, () => ctx.slots.register({ name: BEFORE, select: ({ source }) => senderFrom(source) }, beforeLabel(t)))
|
|
219
240
|
ctx.slots.inject('plugins.bundle.activation', () => ctx.slots.register({ name: 'plugins.bundle.activation', key: PACKAGE, locale: NS }, wrapActivation(t)))
|
|
220
241
|
ctx.slots.inject('plugins.bundle.config', () => ctx.slots.register({ name: 'plugins.bundle.config', key: PACKAGE, locale: NS }, wrapDetails(t)))
|
|
221
242
|
}
|
package/host/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-baton-host",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "DeepSeek Harness plugin for dsh-baton: hand coding tasks from Claude Code or Codex to DeepSeek Harness on your machine. Adding it is the whole install: it registers the dsh-baton MCP server for Claude Code and Codex, runs each task live in the Harness window, wakes the main agent when the run ends and hands back the changed files, the project's own test results and a requirement-by-requirement checklist.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"LICENSE"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"dsh-baton-mcp": "0.6.
|
|
23
|
+
"dsh-baton-mcp": "0.6.7"
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dsh": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-baton-mcp",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"mcpName": "io.github.JialaoLiu/dsh-baton",
|
|
5
5
|
"description": "Pass the baton from Claude Code, Codex or any MCP client to a local DeepSeek Harness: an MCP server that hands off tasks, continues a specific session, shows the run live in Harness and hands the result back when it is done.",
|
|
6
6
|
"type": "module",
|
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"url": "https://github.com/JialaoLiu/dsh-baton",
|
|
8
8
|
"source": "github"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.6.
|
|
10
|
+
"version": "0.6.7",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "dsh-baton-mcp",
|
|
15
|
-
"version": "0.6.
|
|
15
|
+
"version": "0.6.7",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
}
|