@jidekaixin2dian/dsh-toolgate 0.1.5 → 0.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.7 — 2026-11-02
4
+
5
+ - 修复设置页空白:0.1.6 新增的「项目与反馈」直接读取 `ctx.locale`,而插件未声明 `locale` 服务;较新的宿主对该读取直接抛错(`cannot get property "locale" without inject`),整个 `settings.section` 条目被错误边界吞掉,点进「工具闸门」只剩空白。
6
+ - 在 `inject` 中声明 `locale`,并将该读取包在 `try/catch` 里回退到 `navigator.language`,与其他可选服务读取保持一致。
7
+ - Fix blank settings page: the 0.1.6 project/feedback block read `ctx.locale` without declaring the service. Newer hosts throw on that read, the whole `settings.section` entry is swallowed by the error boundary, and the Toolgate page renders empty. `locale` is now declared and the read falls back to `navigator.language`.
8
+ - 新增 3 项客户端渲染回归测试,覆盖「宿主拒绝 locale 服务」时设置页仍渲染,以及中英文文案跟随语言。
9
+
10
+ ## 0.1.6 — 2026-10-31
11
+
12
+ - 设置页新增「项目与反馈」入口,在预算、MCP、Skills 页面均可打开对应 GitHub 项目或新建反馈;页面加载失败时也保留入口。
13
+ - Add project and issue links across settings tabs, including when the main settings panel fails to load.
14
+
3
15
  ## 0.1.5 — 2026-10-28
4
16
 
5
17
  - 发布与更新维护:明确 npm 安装、GitHub 来源迁移、市场检测与重启步骤;保留既有运行时行为。
package/README.en.md CHANGED
@@ -1,24 +1,36 @@
1
- # Toolgate
1
+ # Toolgate · 工具闸门
2
2
 
3
3
  **Bring only the tools you need into the next prompt.**
4
4
 
5
- [中文](README.md) · [Marketplace](https://awesome-dsh-plugin.com/p/jidekaixin2dian/dsh-toolgate/) · [Download](https://github.com/jidekaixin2dian/dsh-toolgate/releases/latest) · [Changelog](CHANGELOG.md)
5
+ [中文](README.md) · [npm](https://www.npmjs.com/package/@jidekaixin2dian/dsh-toolgate/v/0.1.7) · [Marketplace](https://awesome-dsh-plugin.com/p/jidekaixin2dian/dsh-toolgate/) · [Download](https://github.com/jidekaixin2dian/dsh-toolgate/releases/latest) · [Changelog](CHANGELOG.md)
6
6
 
7
- Manage MCP servers, skills and tool visibility in one DSH settings page. Hide schemas by server and restore them when needed; MCP processes keep running.
7
+ Toolgate is an MCP server, skill and context-budget management plugin for DeepSeek Harness (DSH). Have many MCP servers installed but only a few relevant to the task? Hide tool definitions by server in one settings page and restore them when needed; configuration stays in place and MCP processes keep running.
8
8
 
9
9
  ![Tool grouping illustration; example counts are not measured savings](assets/readme-schema-v2.svg)
10
10
 
11
+ ## Three jobs, one settings page
12
+
11
13
  | Tab | What it does |
12
14
  |---|---|
13
15
  | Budget | Estimate context usage, hide groups / all MCP / the largest group, restore tools |
14
16
  | MCP servers | Add, edit, enable, disable and remove stdio or streamable-http servers |
15
17
  | Skills | Search, create and toggle by Session workspace; move eligible local skills to trash |
16
18
 
19
+ For example, hide MCP tool groups unrelated to a coding task to change the tool definitions supplied with the next prompt, then restore them when needed. The page estimates tokens from schema and description length; the estimate is not a measurement of cost or speed. Settings-page budgets apply to all sessions and subagents; permitted session overrides affect only that session.
20
+
21
+ ## Downloads
22
+
23
+ | GitHub release assets · all releases | npm 0.1.5 · past 7 days |
24
+ |---|---|
25
+ | [**471 downloads**](https://api.github.com/repos/jidekaixin2dian/dsh-toolgate/releases?per_page=100) | [**126 downloads**](https://api.npmjs.org/versions/@jidekaixin2dian%2Fdsh-toolgate/last-week) |
26
+
27
+ Snapshot: **2026-10-29**. GitHub counts release-asset requests, including checksums; npm counts downloads of the named version. Requests can include repeat installs and automation, so these are not unique-user counts and the two columns are not added together. Click a number for its live source.
28
+
17
29
  ## Install and update
18
30
 
19
31
  Requires **DSH >=0.2.1-rc.2 and Node >=24**. CI verifies DSH rc.2 / rc.3 / rc.4.
20
32
 
21
- Search for **dsh-toolgate**, author **jidekaixin2dian**, in the marketplace. Both npm and GitHub sources support version checks. Once the catalog recognizes the npm package it prefers npm; existing users can check under installed plugins. Catalog mappings may take time to refresh.
33
+ Search for **dsh-toolgate**, author **jidekaixin2dian**, in the marketplace. Both npm and GitHub sources support version checks. Once the catalog recognizes the npm package it prefers npm; existing users can check under installed plugins. Catalog and registry data may take time to refresh.
22
34
 
23
35
  Alternatively, quit DSH and run the same command to install or update, then reopen it:
24
36
 
@@ -57,6 +69,8 @@ Existing `.tgz` or local installations can use the same command in the same prof
57
69
 
58
70
  ## Boundaries
59
71
 
72
+ **Project and feedback** at the bottom of every settings tab opens this plugin's GitHub repository or a new issue.
73
+
60
74
  - Hiding tools is context budgeting, **not a permission sandbox**. MCP processes keep running; permitted Session overrides can restore tools.
61
75
  - Token estimates use schema / description length. Neither estimates nor illustrated counts establish cost or latency savings.
62
76
  - Some dynamically scoped tools cannot be hidden; use their manager to unload them. Skill ZIP / folder import is not implemented.
package/README.md CHANGED
@@ -1,24 +1,36 @@
1
- # Toolgate · 工具闸门
1
+ # 工具闸门 · Toolgate
2
2
 
3
3
  **让下一轮 prompt 只带需要的工具。**
4
4
 
5
- [English](README.en.md) · [插件市场](https://awesome-dsh-plugin.com/p/jidekaixin2dian/dsh-toolgate/) · [下载](https://github.com/jidekaixin2dian/dsh-toolgate/releases/latest) · [更新记录](CHANGELOG.md)
5
+ [English](README.en.md) · [npm](https://www.npmjs.com/package/@jidekaixin2dian/dsh-toolgate/v/0.1.7) · [插件市场](https://awesome-dsh-plugin.com/p/jidekaixin2dian/dsh-toolgate/) · [下载](https://github.com/jidekaixin2dian/dsh-toolgate/releases/latest) · [更新记录](CHANGELOG.md)
6
6
 
7
- 在 DSH 的一个设置页里管理 MCP 服务器、Skill 和工具可见性。按服务器隐藏整组工具 schema,需要时再恢复,MCP 进程继续运行。
7
+ Toolgate 是 DeepSeek Harness(DSH)的 MCP、Skill 和上下文预算管理插件。装了很多 MCP,却只有少数工具与当前任务有关?在同一个设置页按服务器隐藏不需要的工具定义,需要时再恢复;配置保留,MCP 进程继续运行。
8
8
 
9
9
  ![工具分组示意,示例数量不代表实测节省](assets/readme-schema-v2.svg)
10
10
 
11
+ ## 一处管理三件事
12
+
11
13
  | 页面 | 你可以做什么 |
12
14
  |---|---|
13
15
  | 预算 | 查看估算占用,隐藏单组、全部 MCP 或最大组,恢复工具 |
14
16
  | MCP 服务器 | 新增、编辑、启停、删除服务器;支持 stdio 与 streamable-http |
15
17
  | Skills | 按会话工作区搜索、新建、启停;可删除的本地 Skill 移到回收目录 |
16
18
 
19
+ 例如,可以在写代码时隐藏与任务无关的 MCP 工具组,下一轮再交给模型的工具定义就会变化;需要时恢复。页面按工具 schema 和描述长度估算 token,占用与实际费用或速度不是同一指标。设置页预算作用于所有会话和子代理,允许的会话覆盖只影响当前会话。
20
+
21
+ ## 下载情况
22
+
23
+ | GitHub Release 资源 · 历史累计 | npm 0.1.5 · 近 7 日 |
24
+ |---|---|
25
+ | [**471 次下载**](https://api.github.com/repos/jidekaixin2dian/dsh-toolgate/releases?per_page=100) | [**126 次下载**](https://api.npmjs.org/versions/@jidekaixin2dian%2Fdsh-toolgate/last-week) |
26
+
27
+ 统计快照:**2026-10-29**。GitHub 包含安装包、校验文件等资源请求;npm 仅统计表中版本。下载可能包含重复安装和自动化请求,不代表独立用户数,两列不相加。点击数字可查看实时来源。
28
+
17
29
  ## 安装与更新
18
30
 
19
31
  需要 **DSH >=0.2.1-rc.2、Node >=24**;持续验证 DSH rc.2 / rc.3 / rc.4。
20
32
 
21
- 在插件市场搜索 **dsh-toolgate**,确认作者为 **jidekaixin2dian**。npm 与 GitHub 来源都支持版本检查;市场识别 npm 包后优先使用 npm,可在「已安装」中检查更新。目录映射可能稍后刷新。
33
+ 在插件市场搜索 **dsh-toolgate**,确认作者为 **jidekaixin2dian**。npm 与 GitHub 来源都支持版本检查;市场识别 npm 包后优先使用 npm,可在「已安装」中检查更新。目录与 registry 数据可能有同步延迟。
22
34
 
23
35
  也可完全退出 DSH 后执行以下命令;再次执行即可更新,随后重新打开 DSH:
24
36
 
@@ -59,6 +71,8 @@ toolgate action=reset
59
71
 
60
72
  ## 使用边界
61
73
 
74
+ 设置页底部的「项目与反馈」可打开本插件的 GitHub 项目或新建反馈,在三个标签页中都能找到。
75
+
62
76
  - 工具隐藏用于上下文预算,**不是权限沙箱**。MCP 进程不会因此停止;默认允许的会话覆盖可以恢复工具。
63
77
  - token 数与示意图都不代表实际费用或速度收益;token 仅按 schema / 描述长度估算。
64
78
  - agent 作用域中的部分动态工具无法隐藏,请用对应管理器卸载。Skill ZIP / 文件夹导入尚未实现。
package/lib/client.js CHANGED
@@ -55,6 +55,11 @@ const factory = (require) => {
55
55
  '.cb-input{font:inherit;font-size:12px;padding:4px 6px;border-radius:5px;border:1px solid var(--dsw-alias-border-l2, rgba(128,128,128,.5));background:transparent;color:inherit;width:100%;box-sizing:border-box}',
56
56
  '.cb-input textarea,.cb-form textarea{font-family:Consolas,monospace;min-height:44px;resize:vertical}',
57
57
  '.cb-search{font-size:12px;padding:5px 8px;border-radius:6px;border:1px solid var(--dsw-alias-border-l2, rgba(128,128,128,.5));background:transparent;color:inherit;width:100%;box-sizing:border-box}',
58
+ '.cb-section{display:flex;flex-direction:column;gap:16px;color:inherit}',
59
+ '.cb-project{margin:0 2px;padding:14px 0 4px;border-top:1px solid var(--dsw-alias-border-l2,rgba(128,128,128,.25));font-size:13px;line-height:1.6}',
60
+ '.cb-project h3{margin:0 0 4px;font-size:13px;font-weight:600}.cb-project p{margin:0;font-size:12px;opacity:.7}',
61
+ '.cb-project-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.cb-project-link{display:inline-flex;align-items:center;gap:7px;margin:0;padding:6px 10px;border:1px solid var(--dsw-alias-border-l2,rgba(128,128,128,.35));border-radius:7px;background:var(--dsw-alias-bg-layer-2,transparent);color:inherit;text-decoration:none;font-size:12px}',
62
+ '.cb-project-link svg{width:15px;height:15px;flex:none;opacity:.75}.cb-project-link:hover{border-color:currentColor}.cb-project-link:focus-visible{outline:2px solid var(--dsw-alias-brand,#367bf5);outline-offset:2px}',
58
63
  ].join('')
59
64
 
60
65
  function ensureCss() {
@@ -365,6 +370,24 @@ const factory = (require) => {
365
370
  React.createElement('button', { className: 'cb-btn danger', title: s.deletable ? '' : '该来源只读', disabled: !!busy || !s.deletable, onClick: () => remove(s) }, '删除')))))
366
371
  }
367
372
 
373
+ function ProjectLinks() {
374
+ // A direct read of an undeclared service throws on newer hosts
375
+ // ("cannot get property \"locale\" without inject"), and this component
376
+ // shares the settings section with the main page: one throw blanks both.
377
+ let language
378
+ try { language = pageCtx?.locale?.language?.getSnapshot?.() } catch { language = undefined }
379
+ language = language || (typeof navigator === 'undefined' ? 'zh' : navigator.language)
380
+ const zh = /^zh\b/i.test(language)
381
+ const title = zh ? '项目与反馈' : 'Project and feedback'
382
+ const icon = path => React.createElement('svg', { viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1.8, strokeLinecap: 'round', strokeLinejoin: 'round', 'aria-hidden': true }, React.createElement('path', { d: path }))
383
+ return React.createElement('section', { className: 'cb-project', 'aria-label': title },
384
+ React.createElement('h3', null, title),
385
+ React.createElement('p', null, zh ? '有问题或想法?欢迎在 GitHub 留言,一起把工具闸门做得更好。' : 'Found a problem or have an idea? Help make Toolgate better on GitHub.'),
386
+ React.createElement('div', { className: 'cb-project-links' },
387
+ React.createElement('a', { className: 'cb-project-link', href: 'https://github.com/jidekaixin2dian/dsh-toolgate', target: '_blank', rel: 'noopener noreferrer' }, icon('m9 8-4 4 4 4m6-8 4 4-4 4'), zh ? 'GitHub 项目' : 'GitHub project'),
388
+ React.createElement('a', { className: 'cb-project-link', href: 'https://github.com/jidekaixin2dian/dsh-toolgate/issues/new', target: '_blank', rel: 'noopener noreferrer' }, icon('M6 4h12a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-7l-5 4v-4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M8 9h8M8 13h5'), zh ? '反馈问题' : 'Report an issue')))
389
+ }
390
+
368
391
  function Page() {
369
392
  const [status, setStatus] = React.useState(null)
370
393
  const [error, setError] = React.useState(null)
@@ -495,7 +518,7 @@ const factory = (require) => {
495
518
 
496
519
  module.exports = {
497
520
  name: 'dsh-toolgate-client',
498
- inject: ['timer'],
521
+ inject: ['timer', 'locale'],
499
522
  apply(ctx) {
500
523
  pageCtx = ctx
501
524
  ensureCss()
@@ -503,7 +526,9 @@ const factory = (require) => {
503
526
  if (!slots) return
504
527
  slots.inject('settings.section', () => slots.register(
505
528
  { name: 'settings.section', id: 'toolgate', order: 18, label: '工具闸门' },
506
- () => React.createElement(PageBoundary, null, React.createElement(Page))))
529
+ () => React.createElement('div', { className: 'cb-section' },
530
+ React.createElement(PageBoundary, null, React.createElement(Page)),
531
+ React.createElement(ProjectLinks))))
507
532
  },
508
533
  }
509
534
  return module.exports
package/locale/en.json CHANGED
@@ -1,7 +1,6 @@
1
- {
2
- "meta": {
3
- "title": "Toolgate",
4
- "description": "Manage MCP servers and skills in DeepSeek Harness, and control which tools enter the next prompt."
5
- }
6
- }
7
-
1
+ {
2
+ "meta": {
3
+ "title": "Toolgate · 工具闸门",
4
+ "description": "Manage MCP servers and skills in one place; hide or restore groups of tool definitions to control what enters the next prompt."
5
+ }
6
+ }
package/locale/zh.json CHANGED
@@ -1,7 +1,6 @@
1
- {
2
- "meta": {
3
- "title": "工具闸门",
4
- "description": "管理 MCP 服务器与 Skill,并控制下一轮 prompt 带入哪些工具。"
5
- }
6
- }
7
-
1
+ {
2
+ "meta": {
3
+ "title": "工具闸门 · Toolgate",
4
+ "description": "集中管理 MCP 服务器和 Skill,按组隐藏或恢复工具定义,控制下一轮 prompt 的工具占用。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jidekaixin2dian/dsh-toolgate",
3
- "version": "0.1.5",
4
- "description": "Manage MCP servers and skills in DeepSeek Harness, and control which tools enter the next prompt. Budget changes need no config edit or restart.",
3
+ "version": "0.1.7",
4
+ "description": "Manage MCP servers and skills in one place; hide or restore groups of tool definitions to control what enters the next prompt.",
5
5
  "icon": "icon.svg",
6
6
  "type": "module",
7
7
  "main": "lib/index.js",