dsh-vod-devkit 0.5.9 → 0.5.10
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/lib/index.js +20 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -43,6 +43,10 @@ export const Config = z.object({
|
|
|
43
43
|
apiKey: z.string().default('').volatile().role('secret'),
|
|
44
44
|
product: z.string().default('').volatile(),
|
|
45
45
|
confirmWrites: z.boolean().default(true).volatile(),
|
|
46
|
+
// D-dsh-mcp-b-1:B 模式(MCP client 承载工具面)时壳只留 UI 半。
|
|
47
|
+
// 默认 true 保向后兼容(旧 config 无此键 = 仍注册 6 个工具 = 降级形态);
|
|
48
|
+
// 安装器在 MCP 模式(dsh 本体带 @deepseek-ai/dsh-mcp-client)下显式写 false。
|
|
49
|
+
registerTools: z.boolean().default(true).volatile(),
|
|
46
50
|
timeoutSec: z.number().default(30).volatile(),
|
|
47
51
|
receiptGuard: z.string().default('report').volatile(), // D-rguard-1:off|report|enforce,默认 report(零危害只标注)
|
|
48
52
|
});
|
|
@@ -565,6 +569,9 @@ export function apply(ctx, config) {
|
|
|
565
569
|
key: readCfg(config?.apiKey, '') || '',
|
|
566
570
|
product: readCfg(config?.product, '') || '',
|
|
567
571
|
confirmWrites: readCfg(config?.confirmWrites, true) !== false,
|
|
572
|
+
// D-dsh-mcp-b-1:工具面开关。缺省 true(老 config / 降级形态照旧自注册);
|
|
573
|
+
// MCP 模式下安装器写 false,壳只留 UI 半(否则两个 submit 并存)。
|
|
574
|
+
registerTools: readCfg(config?.registerTools, true) !== false,
|
|
568
575
|
timeoutSec: readCfg(config?.timeoutSec, 30),
|
|
569
576
|
receiptGuard: RG_MODES.includes(readCfg(config?.receiptGuard, 'report'))
|
|
570
577
|
? readCfg(config?.receiptGuard, 'report') : 'report',
|
|
@@ -936,7 +943,11 @@ export function apply(ctx, config) {
|
|
|
936
943
|
},
|
|
937
944
|
];
|
|
938
945
|
|
|
939
|
-
|
|
946
|
+
// D-dsh-mcp-b-1:工具面两条路——① MCP client 挂 python server(12 工具、机器级 state、
|
|
947
|
+
// 两段式/ensure 全在);② 壳自注册(6 工具,mcp-client 缺失或显式关闭时的降级形态)。
|
|
948
|
+
// registerTools=false 时壳只提供 UI 半(浏览器按钮),不再注册任何工具。
|
|
949
|
+
const registerShellTools = cfg().registerTools !== false;
|
|
950
|
+
if (registerShellTools) for (const t of tools) ctx.tools.register(t);
|
|
940
951
|
|
|
941
952
|
// 写操作确认:dsh 审批通道(web 端弹确认框),拒绝则不执行
|
|
942
953
|
if (typeof ctx.on === 'function') {
|
|
@@ -958,7 +969,12 @@ export function apply(ctx, config) {
|
|
|
958
969
|
}
|
|
959
970
|
}
|
|
960
971
|
|
|
961
|
-
|
|
962
|
-
(
|
|
963
|
-
|
|
972
|
+
if (registerShellTools) {
|
|
973
|
+
console.log(`[dsh-vod-devkit] Registered ${tools.length} tools, apiBase=${cfg().base}` +
|
|
974
|
+
(cfg().key ? ', key=set' : ', key=none (auto anonymous-token on first submit)') +
|
|
975
|
+
(cfg().product ? `, product=${cfg().product}` : ', product=unset (must be set or passed per call)'));
|
|
976
|
+
} else {
|
|
977
|
+
console.log(`[dsh-vod-devkit] UI only(registerTools=false):工具面由 MCP client 提供`
|
|
978
|
+
+ `(serverName=vod-devkit,工具名 mcp__vod-devkit__vod_*),apiBase=${cfg().base}`);
|
|
979
|
+
}
|
|
964
980
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-vod-devkit",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.10",
|
|
4
4
|
"description": "VOD user-voice collection tools for DeepSeek Harness (dsh). Thin shell over the VOD external HTTP API — mirrors vod-devkit (MCP) collect semantics.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|