dsh-m 0.2.7 → 0.2.9

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/host.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { createRequire } from 'node:module';
2
2
  import Schema from '@deepseek-ai/schemastery';
3
- import { withMutationLock } from './core/market.js';
4
3
  import { createApiDispatcher } from './core/host-api.js';
5
4
  import { bindLoaderHost } from './core/live-plugin.js';
6
5
  import { createRegistryController } from './core/registry-controller.js';
@@ -36,7 +35,7 @@ export function apply(ctx, config) {
36
35
  // 本地 API:单路由 + method 分发(防护与状态映射在 core/host-api.ts)
37
36
  ctx.inject(['webServer'], (c) => {
38
37
  const server = c.webServer;
39
- const handleApi = createApiDispatcher({ controller, pkg, onMutation: withMutationLock });
38
+ const handleApi = createApiDispatcher({ controller, pkg });
40
39
  server.register({
41
40
  kind: 'exact',
42
41
  path: '/dshm',
package/lib/tools.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineTool } from '@deepseek-ai/dsh-tools';
2
2
  import { installTimeoutMs } from './core/env.js';
3
- import { installFromRegistry, listInstalledWithMeta, listMarket, uninstallPlugin, upgradePlugin, withMutationLock, } from './core/market.js';
3
+ import { installFromRegistry, listInstalledWithMeta, listMarket, uninstallPlugin, upgradePlugin, } from './core/market.js';
4
4
  import { scheduleRestart } from './core/restart.js';
5
5
  export const CATEGORY_LABELS = {
6
6
  market: '市场',
@@ -163,7 +163,7 @@ export function registerTools(ctx, cfg, deps = {}) {
163
163
  if (!id)
164
164
  throw new Error('缺少收录 id');
165
165
  const version = typeof args.version === 'string' && args.version.trim() ? args.version.trim() : undefined;
166
- return cloneJson(await withMutationLock(() => m.installFromRegistry(id, cfg, { version, namespace: 'host' })));
166
+ return cloneJson(await m.installFromRegistry(id, cfg, { version, namespace: 'host' }));
167
167
  },
168
168
  }));
169
169
  ctx.tools.register(defineTool({
@@ -188,7 +188,7 @@ export function registerTools(ctx, cfg, deps = {}) {
188
188
  const target = String(args.pkg || '').trim();
189
189
  if (!target)
190
190
  throw new Error('缺少 pkg');
191
- return cloneJson(await withMutationLock(() => m.uninstallPlugin(target, cfg, { namespace: 'host' })));
191
+ return cloneJson(await m.uninstallPlugin(target, cfg, { namespace: 'host' }));
192
192
  },
193
193
  }));
194
194
  ctx.tools.register(defineTool({
@@ -247,7 +247,7 @@ export function registerTools(ctx, cfg, deps = {}) {
247
247
  const target = String(args.pkg || '').trim();
248
248
  if (!target)
249
249
  throw new Error('缺少 pkg');
250
- return cloneJson(await withMutationLock(() => m.upgradePlugin(target, cfg, { namespace: 'host' })));
250
+ return cloneJson(await m.upgradePlugin(target, cfg, { namespace: 'host' }));
251
251
  },
252
252
  }));
253
253
  ctx.tools.register(defineTool({
@@ -319,7 +319,10 @@ function renderList(out) {
319
319
  }
320
320
  function renderInstall(out) {
321
321
  const extra = out.usedAllowAllBuilds ? '注意:该插件执行了构建脚本(已按策略放行)。' : '';
322
- return `✅ ${out.pkg} 已安装(${out.spec})。${extra}需要重启 DSH Web 生效——告知用户并询问是否 dshm_restart。不要打印安装命令。`;
322
+ const heals = out.healActions?.length
323
+ ? `安装过程含 ${out.healActions.length} 步自愈(${out.healActions.map((h) => h.code).join('、')})。`
324
+ : '';
325
+ return `✅ ${out.pkg} 已安装(${out.spec})。${extra}${heals}需要重启 DSH Web 生效——告知用户并询问是否 dshm_restart。不要打印安装命令。`;
323
326
  }
324
327
  function renderUninstall(out) {
325
328
  const parts = [`✅ ${out.pkg} 已卸载。`];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-m",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "DSH Marketplace — 个人自用的 DeepSeek Harness 插件市场:收录、安装、卸载、升级 DSH 插件",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/registry.json CHANGED
@@ -67,6 +67,39 @@
67
67
  "github": "liustack/modsearch",
68
68
  "homepage": "https://github.com/liustack/modsearch"
69
69
  },
70
+ {
71
+ "id": "dsh-docs-panel",
72
+ "name": "DSH Docs Panel",
73
+ "description": "DSH 侧边栏里的「全局文档」:全局 Markdown 笔记,任何工作区随时可读,支持大纲跳转与一键转编辑器。(需先安装 dsh-better-sidebar ≥0.4.0)",
74
+ "category": "ui",
75
+ "tags": ["文档", "Markdown", "侧边栏", "需 better-sidebar"],
76
+ "source": "npm",
77
+ "npm": "dsh-docs-panel",
78
+ "github": "mlosun/dsh-docs-panel",
79
+ "homepage": "https://github.com/mlosun/dsh-docs-panel"
80
+ },
81
+ {
82
+ "id": "dsh-server-deck",
83
+ "name": "DSH Server Deck",
84
+ "description": "服务器卡片仪表盘:实时状态/CPU/内存/磁盘 + 趋势记录与可视化(1h/24h/7d/30d),点卡片进入 xterm 交互终端。可选集成 dsh-better-sidebar:装后注册为侧边栏「服务器」页签,装载顺序无关。",
85
+ "category": "tools",
86
+ "tags": ["服务器", "监控", "终端", "推荐 better-sidebar"],
87
+ "source": "npm",
88
+ "npm": "dsh-server-deck",
89
+ "github": "meyaomiao/dsh-server-deck",
90
+ "homepage": "https://github.com/meyaomiao/dsh-server-deck"
91
+ },
92
+ {
93
+ "id": "dsh-flowglass",
94
+ "name": "DSH Flowglass",
95
+ "description": "流镜:实时会话流程图插件,把当前会话画成三列泳道,展示工具调用、并行分组与子代理分支,支持逐层钻取。可选集成 dsh-better-sidebar:装后注册为按会话隔离的侧边栏 Tab。",
96
+ "category": "ui",
97
+ "tags": ["可视化", "流程图", "会话", "推荐 better-sidebar"],
98
+ "source": "npm",
99
+ "npm": "dsh-flowglass",
100
+ "github": "Iwctwbh/dsh-flowglass",
101
+ "homepage": "https://github.com/Iwctwbh/dsh-flowglass"
102
+ },
70
103
  {
71
104
  "id": "dsh-auth",
72
105
  "name": "DSH Auth",