dsh-plugin-tool-management 0.22.3 → 0.22.4

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.
@@ -4,20 +4,15 @@
4
4
  // 根本用不上。关掉某几个工具,它们整份不进请求(不是"把描述写短点"那种省);面板
5
5
  // (118 个 op)与注入通道完全不受影响。
6
6
  //
7
- // 出厂**默认就关着二十条**(整张表 26 条,每轮实发 6 条)—— 名单、判据与代价见下面
7
+ // 出厂**默认就关着十八条**(整张表 24 条,每轮实发 6 条)—— 名单、判据与代价见下面
8
8
  // `DEFAULT_HIDDEN_TOOLS`;用户自己额外关的与出厂关的在合计那句里分开报。
9
9
  //
10
10
  // 实测数字(口径:宿主 `recordToolSize` 的 `ceil(JSON.stringify(header.tools).length / 4) + 4`,
11
- // 即**字符数 / 4**;界面「模型工具表」那行合计与逐条 ≈tok 就是这份,逐条相加与整份数组
12
- // 的算法差不到 1%):
13
- // · 重测:二十条隐藏 ≈**5,213 tok**(≈20,852 字符),默认可见那六条 ≈**1,547 tok**
14
- // (0.21.5 又动了默认可见的两条:`mcp_manager_switch` 补 38 字符的场景锁豁免说明(+10),
15
- // `subagent_manager_list` 补正文文件路径的说明(+14),同一口径现为 **1,571**;
16
- // 隐藏那二十条没动,仍是 5,213)。
17
- // 比 10-18 那份(16,743 字符 ≈4,186)涨了两成 —— 会话作用域这轮给工具描述加了"写本对话
18
- // 还是全局""`scope` 参数""租约"这些句子,名单一个字没变。
19
- // 那次实测的名单里还没有 `memory_manager_search`(它自己 ≈70 tok 未计入)。
20
- // · 10-18 那轮 A/B(同一次请求里把十九条逐个打开,前后各跑两轮)净少 **4,119 / 4,197 tok**,
11
+ // 即**字符数 / 4**;`header.tools` 里只有 name / description / parameters —— 官方的
12
+ // `projectToolSchema` 不投影 output / execute,那几个不进请求。界面「模型工具表」那行
13
+ // 合计与逐条 ≈tok 就是这份):
14
+ // · 十八条隐藏 ≈**4,524 tok**,默认可见那六条 ≈**1,536 tok**,全开 ≈**6,055 tok**。
15
+ // · A/B 实测(同一次请求里把十九条逐个打开,前后各跑两轮)净少 **4,119 / 4,197 tok**,
21
16
  // 对照当天那份合计 4,186 略低是正常的(边界按 ceil 逐个算、四条一合并就省下那几个 +4),
22
17
  // 所以它们是**净节省的下界**,不是"省了多少"的上界。**那对数量的是当天那份描述** ——
23
18
  // 描述一改就得重测,新的净省要在真实环境跑 A/B,这里不拿估算冒充实测。
@@ -28,9 +23,9 @@
28
23
  // 所以"工具表 / 注入"这两个数不是同一把尺子,跨语言比大小会得出错的结论。
29
24
  // 口径本身是**宿主的**(`recordToolSize`),我们改不了;能做的只是知道它偏在哪。
30
25
  //
31
- // 当前环境(查过,复述)**没有 BPE 分词器可实测**:306 个官方包里零个
32
- // 词表文件,本机 python site-packages 里也没有 tiktoken / transformers。所以 5,213 只是
33
- // **按宿主的尺子**量出来的数,真 BPE 值按上面那条经验约低一成(≈4,7xx)—— 没有实测,别当实测引用。
26
+ // 当前环境**没有 BPE 分词器可实测**:官方包里零个词表文件,本机也没有 tiktoken /
27
+ // transformers。所以上面那些只是**按宿主的尺子**量出来的数,真 BPE 值按上面那条经验约低一成 ——
28
+ // 没有实测,别当实测引用。
34
29
  //
35
30
  // 本文件只放纯逻辑(normalize / 分域分组 / 体积汇总)。落盘与 TTL 缓存在 index.ts,与
36
31
  // 注入设置(`inject-settings.json`)走同一套写法。
@@ -45,27 +40,40 @@
45
40
  // · 工具执行门禁(关掉的工具即便被点到也不执行 —— 可见性半边失败时仍有这一半);
46
41
  // · 注入通道与两个目录:目录里「用 `skill_manager_list` 查」这类句子在工具关掉后就是假的。
47
42
  import { INJECT_DOMAIN_KEYS, domainOfTool } from '../context-inject.js';
43
+ import { LEGACY_TOOL_NAME_MAP } from '../legacy-tool-names.js';
44
+ import { CONTROL_TOOL_NAME } from './deps.js';
48
45
  /**
49
- * 出厂默认关掉的**二十条**:整张表 26 条,关掉后**每轮实发 6 条**。
46
+ * 出厂默认关掉的**十七条**:整张表 24 条,关掉后**每轮实发 7 条**。
50
47
  *
51
48
  * 判据只有一条:**这些信息或动作常态下由注入段与面板承担,
52
- * 平时也用不到模型自己伸手**。三组:
53
- * · **写侧五条** —— 三个 `*_save`(MCP / 技能 / 人设:配置本体在面板上改)+ 提示词两条
54
- * (这一族只有两条,而当前生效的那份本来就在 `Current prompt` 注入段里)。
55
- * · **读侧三条** —— 两个 `*_list`(MCP / 技能)+ `memory_manager_read`。会话开头注入的那几段
56
- * 目录已经写了当前有什么,模型不必每轮再带一份查询工具。
57
- * · **场景三条 + 开关三条** —— 场景一族(建 / 勾档案 / 进入退出)与 `skill` / `memory` /
58
- * `subagent` 三个 `_switch`(用户:「平时使用也很少」)。启停在面板上都有同款,注入段也
59
- * 写着当前开着哪些。**`mcp_manager_switch` 刻意留着**:它是"这台先给我关了"这条最常用的
60
- * 临时动作的唯一入口,也是 MCP 域留下来的一条腿。
49
+ * 平时也用不到模型自己伸手**。分五组:
50
+ * · **写侧五条** —— 三个 `*_save`(MCP / 技能 / 人设:配置本体在面板上改)+
51
+ * `prompt_manager_apply`(当前生效的那份本来就在 `Current prompt` 注入段里)+
52
+ * `plugin_manager_remove`(删除进回收站可恢复,但常态下由面板承担)。
53
+ * · **读侧六条** —— `mcp_manager_list` / `skill_manager_list` / `prompt_manager_list` /
54
+ * `scene_manager_list` 四个清单 + `memory_manager_read` + `memory_manager_search`。
55
+ * 会话开头注入的那几段目录已经写了当前有什么,模型不必每轮再带一份查询工具。
56
+ * · **切场一条** —— `scene_manager_switch`:进入 / 退出场景。
57
+ * · **开关三条** —— `skill` / `memory` / `subagent` 三个 `_switch`(用户:「平时使用也很少」)。
58
+ * 启停在面板上都有同款,注入段也写着当前开着哪些。**`mcp_manager_switch` 刻意留着**:
59
+ * 它是"这台先给我关了"这条最常用的临时动作的唯一入口,也是 MCP 域留下来的一条腿。
60
+ * · **建档两条** —— `scene_manager_save`(场景记录)+ `scene_manager_archive`(档案段:
61
+ * 进入时开哪些 MCP / 技能 / 人设)。配置本体在面板上改;档案的勾选集机器自己算得出来
62
+ * (`capture`),模型逐项填反而容易填错。
61
63
  *
62
- * 判据与上面那条"注入段承担"不同 —— 人设域**没有官方载体兜底**:MCP / 技能 / 记忆三个域的
63
- * 目录即便被压制型预设压掉,也各自还有一条常驻发现路径,而人设目录一旦不注入,模型手里就
64
- * 只剩 `subagent_manager_run` 一条可见工具、**无从知道任何人设名**(死路:有工具、没输入)。
65
- * 它只有 42 tok,买的是把"注入段是唯一发现路径"这个单点消掉。
64
+ * 人设域**没有官方载体兜底**:MCP / 技能 / 记忆三个域即便目录被压制型预设压掉,也各自还留着
65
+ * 一条常驻发现路径(各自的 list 工具),而人设目录一旦不注入,模型手里就只剩
66
+ * `subagent_manager_run` —— 人设的 id 就是名字,`run` 报错时会把当前可委派的那几个列出来,
67
+ * 但那要先猜错一次。这条清单工具(≈165 tok/轮)**默认关**:常态下人设目录已经在注入段里,
68
+ * 它只是那份的**全量版**(停用的、场景外的、每个人设正文在哪),要全量清单时模型自己就能
69
+ * 打开它(控制面工具那条永远在)。
66
70
  *
67
71
  * 技能 / 人设"是常问的,但它**低频于"读现状 + 拨开关 + 建改定义"**那批,而且面板每个域都有
68
- * 删除入口 —— 默认关、要用时在「兼容」页勾上(与另外十四条同一条纪律,不额外付 token)。
72
+ * 删除入口 —— 默认关、要用时在「兼容」页勾上(与另外十七条同一条纪律,不额外付 token)。
73
+ *
74
+ * 关掉的这些**模型自己也能打开**:`tool_manager_tools`(每轮常驻的那一条)能按对话
75
+ * 打开任意一条被关掉的工具,列清单时给出名字、一句话用途与 ≈token。这条工具不在
76
+ * 这份名单里 —— 它是唯一的回头路,自己关掉自己的话就再也开不回来了。
69
77
  *
70
78
  * ⚠️ 关掉的是**能力**,不是"冗余",代价如实记在这里(要拿回来就在「兼容」页勾,或整批换:
71
79
  * 「恢复方案」):注入的目录是**筛过的视图**(MCP 段只列可用/曾可用的、人设目录只列本场景
@@ -83,25 +91,23 @@ export const DEFAULT_HIDDEN_TOOLS = Object.freeze([
83
91
  'scene_manager_list',
84
92
  'scene_manager_switch',
85
93
  'scene_manager_save',
86
- 'scene_manager_remove',
94
+ 'scene_manager_archive',
87
95
  'memory_manager_read',
88
96
  'memory_manager_search',
89
97
  'memory_manager_switch',
90
- 'memory_manager_remove',
91
98
  'mcp_manager_list',
92
99
  'mcp_manager_save',
93
100
  'skill_manager_list',
94
101
  'skill_manager_switch',
95
102
  'skill_manager_save',
96
- 'skill_manager_remove',
103
+ 'subagent_manager_list',
97
104
  'subagent_manager_switch',
98
105
  'subagent_manager_save',
99
- 'subagent_manager_remove',
100
106
  'prompt_manager_list',
101
107
  'prompt_manager_apply',
102
- 'prompt_manager_remove',
108
+ 'plugin_manager_remove',
103
109
  ]);
104
- /** 出厂默认那份设置:二十条不发(名单与理由见上面),方案清单是空的。 */
110
+ /** 出厂默认那份设置:十八条不发(名单与理由见上面),方案清单是空的。 */
105
111
  export const DEFAULT_TOOL_TABLE_SETTINGS = { hidden: [...DEFAULT_HIDDEN_TOOLS], presets: [] };
106
112
  /** 方案名上限(与 MCP 备注那类输入同风格:短到能在一行里读,长了也没人看)。 */
107
113
  export const PRESET_NAME_MAX_LENGTH = 40;
@@ -190,9 +196,9 @@ export function classifyToolTableSettings(raw) {
190
196
  return { ok: true, value: normalizeToolTableSettings(raw) };
191
197
  }
192
198
  /**
193
- * 旧工具名 → 新工具名迁移表(两轮改名累积)。
199
+ * 旧工具名 → 新工具名迁移表(几轮改名累积)。
194
200
  *
195
- * 为什么必须有它:`tool-table.json` 存的是**用户点名关掉的那些工具**。五族并成 17 条
201
+ * 为什么必须有它:`tool-table.json` 存的是**用户点名关掉的那些工具**。几族并成 17 条
196
202
  * 之后,旧名在新表里根本不存在 —— 不迁移的话,用户"关掉了某条"的意图会在新名字上**静默失效**
197
203
  * (那条工具照旧每轮发出去,而他以为早就关了)。
198
204
  *
@@ -201,26 +207,11 @@ export function classifyToolTableSettings(raw) {
201
207
  *
202
208
  * 只翻译**认识的名字**,其余原样保留:我们无法区分"用户的旧名"与"别的插件的工具名",
203
209
  * 误删别人的条目比留着一条死名更糟。
210
+ *
211
+ * 表本身放在根目录那一叶(`src/legacy-tool-names.ts`):它还有两个使用方在更低的层
212
+ * (会话侧车、场景快照),那些层不能反向引本文件。
204
213
  */
205
- export const LEGACY_TOOL_NAME_MAP = Object.freeze({
206
- // 记忆族:只把 write + update 并成一条 `save`,名字本身没动 —— 所以只有这两条要迁移。
207
- // (开发中途曾把整族改叫 `scene_memory_manager_*`,但那个名字**从未发布**,用户侧
208
- // 不可能有它,因此不存在需要从它迁回来的数据。)
209
- memory_manager_write: 'memory_manager_save',
210
- memory_manager_update: 'memory_manager_save',
211
- mcp_manager_set_enabled: 'mcp_manager_switch',
212
- mcp_manager_restart: 'mcp_manager_switch',
213
- mcp_manager_add: 'mcp_manager_save',
214
- skill_manager_create: 'skill_manager_save',
215
- subagent_manager_create: 'subagent_manager_save',
216
- subagent_manager_update: 'subagent_manager_save',
217
- // 「拨一个开关」六域同形 —— `_set_enabled` → `_switch`(与 `mcp_manager_set_enabled`
218
- // → `mcp_manager_switch` 同一条路)。**改的只是名字,参数不动**(仍是 `enabled` 布尔),
219
- // 所以这里是一对一翻译、不涉及语义合并。
220
- memory_manager_set_enabled: 'memory_manager_switch',
221
- skill_manager_set_enabled: 'skill_manager_switch',
222
- subagent_manager_set_enabled: 'subagent_manager_switch',
223
- });
214
+ export { LEGACY_TOOL_NAME_MAP } from '../legacy-tool-names.js';
224
215
  /**
225
216
  * 把一份设置里的旧工具名翻译成新名(**幂等**:已经全是新名时 `changed` 为 false、原样返回)。
226
217
  * 翻译后按新名去重(两条旧名并成同一条 save 时只留一份)。
@@ -286,6 +277,47 @@ export function estimateTok(bytes) {
286
277
  return 0;
287
278
  return Math.ceil(value / CHARS_PER_TOKEN);
288
279
  }
280
+ /**
281
+ * 一句话用途的字符上限(模型看「这条工具能干什么」时用)。
282
+ *
283
+ * 为什么截:整段描述在模型读 schema 时已经在上下文里,重复贴一遍只是把回执撑大;
284
+ * 清单是**按需**调用,一次贴二十条整段描述就是几千字符。
285
+ */
286
+ export const TOOL_SUMMARY_MAX = 180;
287
+ /**
288
+ * 从工具描述里取一句话用途:第一行非空行,截到 {@link TOOL_SUMMARY_MAX}。
289
+ *
290
+ * 各工具描述的组织惯例是「是什么 → 怎么做 → 何时用」,首句就是「是什么」。
291
+ * 空描述返回空串(那一条在清单里就只留名字)。
292
+ */
293
+ export function summarizeToolDescription(description) {
294
+ const text = String(description ?? '');
295
+ const line = text.split('\n').find((l) => l.trim() !== '') ?? '';
296
+ const trimmed = line.trim();
297
+ return trimmed.length > TOOL_SUMMARY_MAX ? trimmed.slice(0, TOOL_SUMMARY_MAX - 1) + '…' : trimmed;
298
+ }
299
+ /**
300
+ * 逐条改一份关停名单:返回新的名单(不改动入参)。
301
+ *
302
+ * 为什么要有「改一格」而不只有「整份替换」:整份替换要先**读出**当前名单再算差量,
303
+ * 而那次读与后面那次写之间有窗口 —— 两个写者(面板、模型)各拿一份旧名单写回时,
304
+ * 后写的会把先写的覆盖掉(丢更新)。逐条改可以在写锁里现读现改,窗口消失。
305
+ *
306
+ * `hidden: true` = 关掉(进名单),`false` = 打开(出名单)。
307
+ */
308
+ export function applyToolTableToggles(current, toggles) {
309
+ const out = current.slice();
310
+ for (const t of toggles) {
311
+ const i = out.indexOf(t.name);
312
+ if (t.hidden) {
313
+ if (i < 0)
314
+ out.push(t.name);
315
+ }
316
+ else if (i >= 0)
317
+ out.splice(i, 1);
318
+ }
319
+ return out;
320
+ }
289
321
  /**
290
322
  * 纯函数:把注册时量到的体积按域分组,标出哪些被关掉,给出四档合计。
291
323
  *
@@ -300,7 +332,10 @@ export function estimateTok(bytes) {
300
332
  export function buildToolTableReport(rows, hidden, carrierHidden = []) {
301
333
  const off = new Set(hidden.map((name) => String(name)));
302
334
  const carried = new Set(carrierHidden.map((name) => String(name)));
335
+ // 「控制」组排在最前:它是**管着这张表的那一条工具**,放在末尾的「其它」组里
336
+ // 等于把它放到离它要控制的东西最远的地方。
303
337
  const buckets = new Map();
338
+ buckets.set('control', []);
304
339
  for (const key of INJECT_DOMAIN_KEYS)
305
340
  buckets.set(key, []);
306
341
  for (const row of rows) {
@@ -309,7 +344,7 @@ export function buildToolTableReport(rows, hidden, carrierHidden = []) {
309
344
  continue;
310
345
  // 认不出前缀的工具归到 `other` 而不是丢掉:丢掉 = 它在界面上根本不出现,
311
346
  // 于是"没登记的域"就永远关不掉,而且没人看得出来(静默降级)。
312
- const key = domainOfTool(name) ?? 'other';
347
+ const key = name === CONTROL_TOOL_NAME ? 'control' : (domainOfTool(name) ?? 'other');
313
348
  let list = buckets.get(key);
314
349
  if (list === undefined) {
315
350
  list = [];
package/lib/trash-id.js CHANGED
@@ -4,8 +4,9 @@
4
4
  // 引 `hub.ts` 取这个函数 —— 那正好把 剥层拆掉的那个运行时环重新接上(见 core.ts
5
5
  // 头部的层注释)。放到这一叶模块里,两边都只向下引,不产生环。
6
6
  //
7
- // 形状:时间戳 base36 + uuid 前 8 位。统一它不是为了审美 —— 五个域的 `*_manager_remove` 都按
8
- // `action=list` 给出的 id 做 restore,模型跨域操作时认得这一种形状就够。此前技能域另写了一套
7
+ // 形状:时间戳 base36 + uuid 前 8 位。统一它不是为了审美 —— 五个域的删除都走同一条
8
+ // `plugin_manager_remove`,都按 `action=list` 给出的 id 做 restore,模型跨域操作时
9
+ // 认得这一种形状就够。此前技能域另写了一套
9
10
  // `${Date.now()}-${randomUUID()}`(十进制时间戳 + 完整 uuid),拿到的是另一种长相。
10
11
  //
11
12
  // 读写都是**向后兼容**的:读侧只校验「单个合法路径段」(`entryPath` / `isValidSegment`),
package/package.json CHANGED
@@ -1,152 +1,152 @@
1
- {
2
- "name": "dsh-plugin-tool-management",
3
- "version": "0.22.3",
4
- "description": "一个设置面板,统一管理 MCP、技能、记忆、子智能体、提示词和归档会话;可自定义搭配场景,一个场景即可切换整个环境;Agent也能帮你操作这个插件。",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/ouli-1242/dsh-plugin-tool-management"
8
- },
9
- "type": "module",
10
- "main": "lib/index.js",
11
- "exports": {
12
- ".": "./lib/index.js",
13
- "./client": "./lib/client.js",
14
- "./workspace": "./lib/sessions/workspace.js",
15
- "./locale/*.json": "./locale/*.json",
16
- "./package.json": "./package.json"
17
- },
18
- "files": [
19
- "lib",
20
- "locale",
21
- "cordis.patch.yml",
22
- "README.md",
23
- "README_EN.md",
24
- "CHANGELOG.md",
25
- "LICENSE",
26
- "screenshots.json",
27
- "docs/images",
28
- "docs/UPDATE.md"
29
- ],
30
- "engines": {
31
- "dsh": ">=0.2.2-rc.1 <0.2.3",
32
- "node": ">=24.9"
33
- },
34
- "publishConfig": {
35
- "registry": "https://registry.npmjs.org",
36
- "access": "public"
37
- },
38
- "scripts": {
39
- "build": "tsc -p tsconfig.json && node scripts/sync-client.mjs && node scripts/sync-profile.mjs",
40
- "prepublishOnly": "npm run build && npm run lint && npm run typecheck:client && node --test test/client-exports.test.mjs",
41
- "lint": "node --check lib/client.js && node --check lib/index.js",
42
- "typecheck:client": "node scripts/sync-client.mjs && tsc -p tsconfig.client.json",
43
- "check:i18n": "node scripts/check-i18n.mjs lib/client.js",
44
- "check:host": "node scripts/host-deps.mjs && node scripts/doctor.mjs",
45
- "check:strict": "node scripts/check-strict.mjs",
46
- "host-deps": "node scripts/host-deps.mjs --fix",
47
- "doctor": "node scripts/doctor.mjs",
48
- "test": "npm run build && npm run check:i18n && npm run typecheck:client && node --test test/contracts.test.mjs test/client-exports.test.mjs",
49
- "sync:profile": "node scripts/sync-profile.mjs"
50
- },
51
- "keywords": [
52
- "dsh",
53
- "deepseek-harness",
54
- "skill",
55
- "skills",
56
- "mcp",
57
- "mcp-server",
58
- "plugin",
59
- "cordis"
60
- ],
61
- "dsh": {
62
- "bundle": {
63
- "patch": "./cordis.patch.yml"
64
- },
65
- "client": {
66
- "platform": "web",
67
- "inject": [
68
- "@deepseek-ai/dsh-client-locale",
69
- "@deepseek-ai/dsh-client-ui-input-trigger"
70
- ]
71
- }
72
- },
73
- "icon": "./docs/images/logo.png",
74
- "peerDependencies": {
75
- "@deepseek-ai/cordis": "^4.0.2",
76
- "@deepseek-ai/dsh-agent-preset-registry": ">=0.2.2-rc.1 <0.2.3",
77
- "@deepseek-ai/dsh-llm": ">=0.2.2-rc.1 <0.2.3",
78
- "@deepseek-ai/dsh-session": ">=0.2.2-rc.1 <0.2.3",
79
- "@deepseek-ai/dsh-session-projection-cache": ">=0.2.2-rc.1 <0.2.3",
80
- "@deepseek-ai/dsh-settings": ">=0.2.2-rc.1 <0.2.3",
81
- "@deepseek-ai/dsh-spill-local": ">=0.2.2-rc.1 <0.2.3",
82
- "@deepseek-ai/dsh-storage-domain": ">=0.2.2-rc.1 <0.2.3",
83
- "@deepseek-ai/dsh-subagent-fork-in-process": ">=0.2.2-rc.1 <0.2.3",
84
- "@deepseek-ai/dsh-subagent-spawn-in-process": ">=0.2.2-rc.1 <0.2.3",
85
- "@deepseek-ai/dsh-tools": ">=0.2.2-rc.1 <0.2.3",
86
- "@deepseek-ai/dsh-workspace": ">=0.2.2-rc.1 <0.2.3",
87
- "react": "^18.2.0"
88
- },
89
- "peerDependenciesMeta": {
90
- "@deepseek-ai/cordis": {
91
- "optional": true
92
- },
93
- "@deepseek-ai/dsh-agent-preset-registry": {
94
- "optional": true
95
- },
96
- "@deepseek-ai/dsh-llm": {
97
- "optional": true
98
- },
99
- "@deepseek-ai/dsh-session": {
100
- "optional": true
101
- },
102
- "@deepseek-ai/dsh-session-projection-cache": {
103
- "optional": true
104
- },
105
- "@deepseek-ai/dsh-settings": {
106
- "optional": true
107
- },
108
- "@deepseek-ai/dsh-spill-local": {
109
- "optional": true
110
- },
111
- "@deepseek-ai/dsh-storage-domain": {
112
- "optional": true
113
- },
114
- "@deepseek-ai/dsh-subagent-fork-in-process": {
115
- "optional": true
116
- },
117
- "@deepseek-ai/dsh-subagent-spawn-in-process": {
118
- "optional": true
119
- },
120
- "@deepseek-ai/dsh-tools": {
121
- "optional": true
122
- },
123
- "@deepseek-ai/dsh-workspace": {
124
- "optional": true
125
- }
126
- },
127
- "devDependencies": {
128
- "@deepseek-ai/cordis": "^4.1.0",
129
- "@deepseek-ai/dsh-agent-preset-registry": "^0.2.2-rc.1",
130
- "@deepseek-ai/dsh-llm": "^0.2.2-rc.1",
131
- "@deepseek-ai/dsh-session": "^0.2.2-rc.1",
132
- "@deepseek-ai/dsh-session-projection-cache": "^0.2.2-rc.1",
133
- "@deepseek-ai/dsh-settings": "^0.2.2-rc.1",
134
- "@deepseek-ai/dsh-spill-local": "^0.2.2-rc.1",
135
- "@deepseek-ai/dsh-storage-domain": "^0.2.2-rc.1",
136
- "@deepseek-ai/dsh-subagent-fork-in-process": "^0.2.2-rc.1",
137
- "@deepseek-ai/dsh-subagent-spawn-in-process": "^0.2.2-rc.1",
138
- "@deepseek-ai/dsh-tools": "^0.2.2-rc.1",
139
- "@deepseek-ai/dsh-workspace": "^0.2.2-rc.1",
140
- "@types/js-yaml": "^4.0.9",
141
- "@types/node": "^24.0.0",
142
- "@types/semver": "^7.7.0",
143
- "react": "^18.2.0",
144
- "typescript": "^6.0.0"
145
- },
146
- "license": "MIT",
147
- "dependencies": {
148
- "fflate": "^0.8.3",
149
- "js-yaml": "^4.3.2",
150
- "semver": "^7.7.2"
151
- }
152
- }
1
+ {
2
+ "name": "dsh-plugin-tool-management",
3
+ "version": "0.22.4",
4
+ "description": "一个设置面板,统一管理 MCP、技能、记忆、子智能体、提示词和归档会话;可自定义搭配场景,一个场景即可切换整个环境;Agent也能帮你操作这个插件。",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/ouli-1242/dsh-plugin-tool-management"
8
+ },
9
+ "type": "module",
10
+ "main": "lib/index.js",
11
+ "exports": {
12
+ ".": "./lib/index.js",
13
+ "./client": "./lib/client.js",
14
+ "./workspace": "./lib/sessions/workspace.js",
15
+ "./locale/*.json": "./locale/*.json",
16
+ "./package.json": "./package.json"
17
+ },
18
+ "files": [
19
+ "lib",
20
+ "locale",
21
+ "cordis.patch.yml",
22
+ "README.md",
23
+ "README_EN.md",
24
+ "CHANGELOG.md",
25
+ "LICENSE",
26
+ "screenshots.json",
27
+ "docs/images",
28
+ "docs/UPDATE.md"
29
+ ],
30
+ "engines": {
31
+ "dsh": ">=0.2.2-rc.1 <0.2.3",
32
+ "node": ">=24.9"
33
+ },
34
+ "publishConfig": {
35
+ "registry": "https://registry.npmjs.org",
36
+ "access": "public"
37
+ },
38
+ "scripts": {
39
+ "build": "tsc -p tsconfig.json && node scripts/sync-client.mjs && node scripts/sync-profile.mjs",
40
+ "prepublishOnly": "npm run build && npm run lint && npm run typecheck:client && node --test test/client-exports.test.mjs",
41
+ "lint": "node --check lib/client.js && node --check lib/index.js",
42
+ "typecheck:client": "node scripts/sync-client.mjs && tsc -p tsconfig.client.json",
43
+ "check:i18n": "node scripts/check-i18n.mjs lib/client.js",
44
+ "check:host": "node scripts/host-deps.mjs && node scripts/doctor.mjs",
45
+ "check:strict": "node scripts/check-strict.mjs",
46
+ "host-deps": "node scripts/host-deps.mjs --fix",
47
+ "doctor": "node scripts/doctor.mjs",
48
+ "test": "npm run build && npm run check:i18n && npm run typecheck:client && node --test test/contracts.test.mjs test/client-exports.test.mjs",
49
+ "sync:profile": "node scripts/sync-profile.mjs"
50
+ },
51
+ "keywords": [
52
+ "dsh",
53
+ "deepseek-harness",
54
+ "skill",
55
+ "skills",
56
+ "mcp",
57
+ "mcp-server",
58
+ "plugin",
59
+ "cordis"
60
+ ],
61
+ "dsh": {
62
+ "bundle": {
63
+ "patch": "./cordis.patch.yml"
64
+ },
65
+ "client": {
66
+ "platform": "web",
67
+ "inject": [
68
+ "@deepseek-ai/dsh-client-locale",
69
+ "@deepseek-ai/dsh-client-ui-input-trigger"
70
+ ]
71
+ }
72
+ },
73
+ "icon": "./docs/images/logo.png",
74
+ "peerDependencies": {
75
+ "@deepseek-ai/cordis": "^4.0.2",
76
+ "@deepseek-ai/dsh-agent-preset-registry": ">=0.2.2-rc.1 <0.2.3",
77
+ "@deepseek-ai/dsh-llm": ">=0.2.2-rc.1 <0.2.3",
78
+ "@deepseek-ai/dsh-session": ">=0.2.2-rc.1 <0.2.3",
79
+ "@deepseek-ai/dsh-session-projection-cache": ">=0.2.2-rc.1 <0.2.3",
80
+ "@deepseek-ai/dsh-settings": ">=0.2.2-rc.1 <0.2.3",
81
+ "@deepseek-ai/dsh-spill-local": ">=0.2.2-rc.1 <0.2.3",
82
+ "@deepseek-ai/dsh-storage-domain": ">=0.2.2-rc.1 <0.2.3",
83
+ "@deepseek-ai/dsh-subagent-fork-in-process": ">=0.2.2-rc.1 <0.2.3",
84
+ "@deepseek-ai/dsh-subagent-spawn-in-process": ">=0.2.2-rc.1 <0.2.3",
85
+ "@deepseek-ai/dsh-tools": ">=0.2.2-rc.1 <0.2.3",
86
+ "@deepseek-ai/dsh-workspace": ">=0.2.2-rc.1 <0.2.3",
87
+ "react": "^18.2.0"
88
+ },
89
+ "peerDependenciesMeta": {
90
+ "@deepseek-ai/cordis": {
91
+ "optional": true
92
+ },
93
+ "@deepseek-ai/dsh-agent-preset-registry": {
94
+ "optional": true
95
+ },
96
+ "@deepseek-ai/dsh-llm": {
97
+ "optional": true
98
+ },
99
+ "@deepseek-ai/dsh-session": {
100
+ "optional": true
101
+ },
102
+ "@deepseek-ai/dsh-session-projection-cache": {
103
+ "optional": true
104
+ },
105
+ "@deepseek-ai/dsh-settings": {
106
+ "optional": true
107
+ },
108
+ "@deepseek-ai/dsh-spill-local": {
109
+ "optional": true
110
+ },
111
+ "@deepseek-ai/dsh-storage-domain": {
112
+ "optional": true
113
+ },
114
+ "@deepseek-ai/dsh-subagent-fork-in-process": {
115
+ "optional": true
116
+ },
117
+ "@deepseek-ai/dsh-subagent-spawn-in-process": {
118
+ "optional": true
119
+ },
120
+ "@deepseek-ai/dsh-tools": {
121
+ "optional": true
122
+ },
123
+ "@deepseek-ai/dsh-workspace": {
124
+ "optional": true
125
+ }
126
+ },
127
+ "devDependencies": {
128
+ "@deepseek-ai/cordis": "^4.1.0",
129
+ "@deepseek-ai/dsh-agent-preset-registry": "^0.2.2-rc.1",
130
+ "@deepseek-ai/dsh-llm": "^0.2.2-rc.1",
131
+ "@deepseek-ai/dsh-session": "^0.2.2-rc.1",
132
+ "@deepseek-ai/dsh-session-projection-cache": "^0.2.2-rc.1",
133
+ "@deepseek-ai/dsh-settings": "^0.2.2-rc.1",
134
+ "@deepseek-ai/dsh-spill-local": "^0.2.2-rc.1",
135
+ "@deepseek-ai/dsh-storage-domain": "^0.2.2-rc.1",
136
+ "@deepseek-ai/dsh-subagent-fork-in-process": "^0.2.2-rc.1",
137
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "^0.2.2-rc.1",
138
+ "@deepseek-ai/dsh-tools": "^0.2.2-rc.1",
139
+ "@deepseek-ai/dsh-workspace": "^0.2.2-rc.1",
140
+ "@types/js-yaml": "^4.0.9",
141
+ "@types/node": "^24.0.0",
142
+ "@types/semver": "^7.7.0",
143
+ "react": "^18.2.0",
144
+ "typescript": "^6.0.0"
145
+ },
146
+ "license": "MIT",
147
+ "dependencies": {
148
+ "fflate": "^0.8.3",
149
+ "js-yaml": "^4.3.2",
150
+ "semver": "^7.7.2"
151
+ }
152
+ }