@jidekaixin2dian/dsh-toolgate 0.1.7 → 0.1.8
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 +15 -0
- package/LICENSE +21 -21
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/README.zh.md +5 -5
- package/cordis.patch.yml +5 -5
- package/icon.svg +9 -9
- package/lib/api-payload.js +9 -9
- package/lib/groups.js +58 -58
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.8 — 2026-11-06
|
|
4
|
+
|
|
5
|
+
- 默认固定宿主升级到 DSH rc.5,兼容验证扩展到 **0.2.2-rc.1**(2026-11-04 发布;
|
|
6
|
+
其开发者侧变更——统一右键菜单、设置页图标槽、PTC/工具链重构——均不触及本
|
|
7
|
+
插件的绑定面与行为);保留 rc.2–rc.4 回归。
|
|
8
|
+
- The default pinned host moves to DSH rc.5 and verified coverage extends to
|
|
9
|
+
**0.2.2-rc.1** (released 2026-11-04; its developer-facing changes — unified
|
|
10
|
+
context menu, settings icon slot, PTC/tooling restructuring — do not touch
|
|
11
|
+
this plugin's bound surface or behavior). rc.2–rc.4 regressions are retained.
|
|
12
|
+
- `scripts/host.mjs` 按条目携带完整 tag(0.2.2 行不再复用 `dsh-v0.2.1-` 前缀拼接),
|
|
13
|
+
宿主目录缺失时给出 setup 提示而非 TypeError。
|
|
14
|
+
- `scripts/host.mjs` now carries a full tag per entry (the 0.2.2 line no longer
|
|
15
|
+
fits the `dsh-v0.2.1-<version>` prefix scheme) and reports the setup step when
|
|
16
|
+
the host checkout is missing instead of crashing.
|
|
17
|
+
|
|
3
18
|
## 0.1.7 — 2026-11-02
|
|
4
19
|
|
|
5
20
|
- 修复设置页空白:0.1.6 新增的「项目与反馈」直接读取 `ctx.locale`,而插件未声明 `locale` 服务;较新的宿主对该读取直接抛错(`cannot get property "locale" without inject`),整个 `settings.section` 条目被错误边界吞掉,点进「工具闸门」只剩空白。
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 jidekaixin2dian
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 jidekaixin2dian
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.en.md
CHANGED
|
@@ -28,7 +28,7 @@ Snapshot: **2026-10-29**. GitHub counts release-asset requests, including checks
|
|
|
28
28
|
|
|
29
29
|
## Install and update
|
|
30
30
|
|
|
31
|
-
Requires **DSH >=0.2.1-rc.2 and Node >=24**. CI verifies DSH rc.2 / rc.3 / rc.4.
|
|
31
|
+
Requires **DSH >=0.2.1-rc.2 and Node >=24**. CI verifies DSH rc.2 / rc.3 / rc.4 / rc.5 / 0.2.2-rc.1.
|
|
32
32
|
|
|
33
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.
|
|
34
34
|
|
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Toolgate 是 DeepSeek Harness(DSH)的 MCP、Skill 和上下文预算管理
|
|
|
28
28
|
|
|
29
29
|
## 安装与更新
|
|
30
30
|
|
|
31
|
-
需要 **DSH >=0.2.1-rc.2、Node >=24**;持续验证 DSH rc.2 / rc.3 / rc.4。
|
|
31
|
+
需要 **DSH >=0.2.1-rc.2、Node >=24**;持续验证 DSH rc.2 / rc.3 / rc.4 / rc.5 / 0.2.2-rc.1。
|
|
32
32
|
|
|
33
33
|
在插件市场搜索 **dsh-toolgate**,确认作者为 **jidekaixin2dian**。npm 与 GitHub 来源都支持版本检查;市场识别 npm 包后优先使用 npm,可在「已安装」中检查更新。目录与 registry 数据可能有同步延迟。
|
|
34
34
|
|
package/README.zh.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# 中文说明
|
|
2
|
-
|
|
3
|
-
中文 README 已作为默认文档:[README.md](README.md)。
|
|
4
|
-
|
|
5
|
-
English: [README.en.md](README.en.md)。
|
|
1
|
+
# 中文说明
|
|
2
|
+
|
|
3
|
+
中文 README 已作为默认文档:[README.md](README.md)。
|
|
4
|
+
|
|
5
|
+
English: [README.en.md](README.en.md)。
|
|
6
6
|
|
package/cordis.patch.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Bundle patch: the row loads the host half; `dsh.client` in package.json
|
|
2
|
-
# makes the web app load ./client as the browser half.
|
|
3
|
-
- insert:
|
|
4
|
-
- id: dsh-toolgate
|
|
5
|
-
name: '@jidekaixin2dian/dsh-toolgate'
|
|
1
|
+
# Bundle patch: the row loads the host half; `dsh.client` in package.json
|
|
2
|
+
# makes the web app load ./client as the browser half.
|
|
3
|
+
- insert:
|
|
4
|
+
- id: dsh-toolgate
|
|
5
|
+
name: '@jidekaixin2dian/dsh-toolgate'
|
|
6
6
|
|
package/icon.svg
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" role="img" aria-label="dsh-toolgate">
|
|
2
|
-
<rect width="128" height="128" rx="24" fill="#0f172a"/>
|
|
3
|
-
<rect x="24" y="72" width="14" height="32" rx="3" fill="#38bdf8"/>
|
|
4
|
-
<rect x="46" y="52" width="14" height="52" rx="3" fill="#38bdf8"/>
|
|
5
|
-
<rect x="68" y="34" width="14" height="70" rx="3" fill="#a78bfa"/>
|
|
6
|
-
<rect x="90" y="60" width="14" height="44" rx="3" fill="#38bdf8"/>
|
|
7
|
-
<path d="M22 30h48" stroke="#e2e8f0" stroke-width="5" stroke-linecap="round"/>
|
|
8
|
-
<path d="M60 30l-9-7M60 30l-9 7" stroke="#e2e8f0" stroke-width="4" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" role="img" aria-label="dsh-toolgate">
|
|
2
|
+
<rect width="128" height="128" rx="24" fill="#0f172a"/>
|
|
3
|
+
<rect x="24" y="72" width="14" height="32" rx="3" fill="#38bdf8"/>
|
|
4
|
+
<rect x="46" y="52" width="14" height="52" rx="3" fill="#38bdf8"/>
|
|
5
|
+
<rect x="68" y="34" width="14" height="70" rx="3" fill="#a78bfa"/>
|
|
6
|
+
<rect x="90" y="60" width="14" height="44" rx="3" fill="#38bdf8"/>
|
|
7
|
+
<path d="M22 30h48" stroke="#e2e8f0" stroke-width="5" stroke-linecap="round"/>
|
|
8
|
+
<path d="M60 30l-9-7M60 30l-9 7" stroke="#e2e8f0" stroke-width="4" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9
|
+
</svg>
|
|
10
10
|
|
package/lib/api-payload.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// The settings page posts `{ op, args }` (see `api()` in client.js), while the
|
|
2
|
-
// route handlers read operation fields directly. Accept both shapes so the
|
|
3
|
-
// bundle and the host cannot drift apart again — and so a hand-written probe
|
|
4
|
-
// or a future client that flattens the body still lands on the same fields.
|
|
5
|
-
export function requestArgs(payload) {
|
|
6
|
-
if (!payload || typeof payload !== 'object') return {}
|
|
7
|
-
const args = payload.args
|
|
8
|
-
return args && typeof args === 'object' && !Array.isArray(args) ? args : payload
|
|
9
|
-
}
|
|
1
|
+
// The settings page posts `{ op, args }` (see `api()` in client.js), while the
|
|
2
|
+
// route handlers read operation fields directly. Accept both shapes so the
|
|
3
|
+
// bundle and the host cannot drift apart again — and so a hand-written probe
|
|
4
|
+
// or a future client that flattens the body still lands on the same fields.
|
|
5
|
+
export function requestArgs(payload) {
|
|
6
|
+
if (!payload || typeof payload !== 'object') return {}
|
|
7
|
+
const args = payload.args
|
|
8
|
+
return args && typeof args === 'object' && !Array.isArray(args) ? args : payload
|
|
9
|
+
}
|
|
10
10
|
|
package/lib/groups.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
// Pure grouping rules. Kept dependency-free so node --test can exercise them
|
|
2
|
-
// without loading the DSH host or @deepseek-ai/dsh-tools.
|
|
3
|
-
export const FIXED_LABELS = {
|
|
4
|
-
skills: 'Skill 目录',
|
|
5
|
-
memory: '记忆工具',
|
|
6
|
-
schedule: '定时任务',
|
|
7
|
-
}
|
|
8
|
-
export const CORE_LABEL = '核心工具'
|
|
9
|
-
|
|
10
|
-
export function groupOf(toolName) {
|
|
11
|
-
const n = String(toolName || '')
|
|
12
|
-
if (n.startsWith('mcp__')) {
|
|
13
|
-
const rest = n.slice(5)
|
|
14
|
-
const cut = rest.indexOf('__')
|
|
15
|
-
const server = cut > 0 ? rest.slice(0, cut) : 'other'
|
|
16
|
-
return 'mcp:' + (server.toLowerCase().replace(/[^a-z0-9_-]/g, '_').slice(0, 32) || 'other')
|
|
17
|
-
}
|
|
18
|
-
if (n === 'skill') return 'skills'
|
|
19
|
-
if (n.startsWith('mnemon_')) return 'memory'
|
|
20
|
-
if (n.startsWith('schedule_')) return 'schedule'
|
|
21
|
-
return 'core'
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function labelOf(group) {
|
|
25
|
-
if (group === 'core') return CORE_LABEL
|
|
26
|
-
if (group.startsWith('mcp:')) return 'MCP · ' + group.slice(4)
|
|
27
|
-
return FIXED_LABELS[group] || group
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function normalizeDisabled(value) {
|
|
31
|
-
if (!Array.isArray(value)) return []
|
|
32
|
-
const out = new Set()
|
|
33
|
-
for (const raw of value) {
|
|
34
|
-
let id = String(raw || '').trim().toLowerCase()
|
|
35
|
-
// Migrate the pre-market fixed groups to generic MCP server ids.
|
|
36
|
-
if (id === 'rea') id = 'mcp:rea'
|
|
37
|
-
if (id === 'mcp_other') id = 'mcp:other'
|
|
38
|
-
if (id === 'mcp') {
|
|
39
|
-
out.add('mcp')
|
|
40
|
-
continue
|
|
41
|
-
}
|
|
42
|
-
if (/^mcp:[a-z0-9_-]{1,32}$/.test(id)) {
|
|
43
|
-
out.add(id)
|
|
44
|
-
continue
|
|
45
|
-
}
|
|
46
|
-
if (Object.hasOwn(FIXED_LABELS, id)) out.add(id)
|
|
47
|
-
}
|
|
48
|
-
return [...out]
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function isDisabled(group, disabled) {
|
|
52
|
-
if (group === 'core') return false
|
|
53
|
-
return disabled.includes(group) || (group.startsWith('mcp:') && disabled.includes('mcp'))
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function matchesDisabled(toolName, disabled) {
|
|
57
|
-
return isDisabled(groupOf(toolName), disabled)
|
|
58
|
-
}
|
|
1
|
+
// Pure grouping rules. Kept dependency-free so node --test can exercise them
|
|
2
|
+
// without loading the DSH host or @deepseek-ai/dsh-tools.
|
|
3
|
+
export const FIXED_LABELS = {
|
|
4
|
+
skills: 'Skill 目录',
|
|
5
|
+
memory: '记忆工具',
|
|
6
|
+
schedule: '定时任务',
|
|
7
|
+
}
|
|
8
|
+
export const CORE_LABEL = '核心工具'
|
|
9
|
+
|
|
10
|
+
export function groupOf(toolName) {
|
|
11
|
+
const n = String(toolName || '')
|
|
12
|
+
if (n.startsWith('mcp__')) {
|
|
13
|
+
const rest = n.slice(5)
|
|
14
|
+
const cut = rest.indexOf('__')
|
|
15
|
+
const server = cut > 0 ? rest.slice(0, cut) : 'other'
|
|
16
|
+
return 'mcp:' + (server.toLowerCase().replace(/[^a-z0-9_-]/g, '_').slice(0, 32) || 'other')
|
|
17
|
+
}
|
|
18
|
+
if (n === 'skill') return 'skills'
|
|
19
|
+
if (n.startsWith('mnemon_')) return 'memory'
|
|
20
|
+
if (n.startsWith('schedule_')) return 'schedule'
|
|
21
|
+
return 'core'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function labelOf(group) {
|
|
25
|
+
if (group === 'core') return CORE_LABEL
|
|
26
|
+
if (group.startsWith('mcp:')) return 'MCP · ' + group.slice(4)
|
|
27
|
+
return FIXED_LABELS[group] || group
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function normalizeDisabled(value) {
|
|
31
|
+
if (!Array.isArray(value)) return []
|
|
32
|
+
const out = new Set()
|
|
33
|
+
for (const raw of value) {
|
|
34
|
+
let id = String(raw || '').trim().toLowerCase()
|
|
35
|
+
// Migrate the pre-market fixed groups to generic MCP server ids.
|
|
36
|
+
if (id === 'rea') id = 'mcp:rea'
|
|
37
|
+
if (id === 'mcp_other') id = 'mcp:other'
|
|
38
|
+
if (id === 'mcp') {
|
|
39
|
+
out.add('mcp')
|
|
40
|
+
continue
|
|
41
|
+
}
|
|
42
|
+
if (/^mcp:[a-z0-9_-]{1,32}$/.test(id)) {
|
|
43
|
+
out.add(id)
|
|
44
|
+
continue
|
|
45
|
+
}
|
|
46
|
+
if (Object.hasOwn(FIXED_LABELS, id)) out.add(id)
|
|
47
|
+
}
|
|
48
|
+
return [...out]
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function isDisabled(group, disabled) {
|
|
52
|
+
if (group === 'core') return false
|
|
53
|
+
return disabled.includes(group) || (group.startsWith('mcp:') && disabled.includes('mcp'))
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function matchesDisabled(toolName, disabled) {
|
|
57
|
+
return isDisabled(groupOf(toolName), disabled)
|
|
58
|
+
}
|
|
59
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jidekaixin2dian/dsh-toolgate",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
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",
|