@civilization/deepseek-harness-skill-mcp 0.3.0 → 0.3.1
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/README.md +11 -2
- package/package.json +8 -8
- package/src/catalog.js +19 -8
package/README.md
CHANGED
|
@@ -88,10 +88,11 @@ Skill 页面支持:
|
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
### 2. 接管与安全拦截机制
|
|
91
|
-
-
|
|
91
|
+
- **自动归类**:自动扫描运行时注册的所有工具,先按 Harness 自带工具名单识别核心工具(归入 `系统核心工具 (Builtin)`),再按命名规则归属第三方插件(如 `session_*_autotask` 归属于 `dsh-autotask`,`drawio_*` 归属于 `dsh-drawio`,`browser_*` 归属于 `dsh-playwright`,`mcp__*` 归属于对应 MCP 服务)。
|
|
92
92
|
- **单调守卫拦截 (`ctx.tools.guard`)**:当工具被配置为禁用时,Cordis 单调守卫将在工具调用前拦截并返回友好提示(`【Skill Catalog 接管】工具 "..." 当前已被禁用`),杜绝 Agent 越权或误调用。
|
|
93
93
|
- **瀑布流预检查 (`tools/pre-execute`)**:在调度层提前做出 `deny` 决策。
|
|
94
|
-
- **核心工具保护**:PTC
|
|
94
|
+
- **核心工具保护**:Harness 自带的核心工具(`read`、`write`、`edit`、`bash`、`glob`、`grep`、`str_replace_editor`、`job_*`、`skill`、`todo_write`、`web_search` 等)一律标记为受保护,开关禁用;PTC 核心传输通道(`run_code`)与内部 catalog 控制工具同样受保护。因此本面板的启停只作用于插件与 MCP 工具,不会让 Agent 失去读写文件或执行命令的基本能力。
|
|
95
|
+
- **名单维护**:核心工具名单随 Harness 版本变化(当前对齐 0.2.0-rc.2 的 `dsh-tool-*`/`dsh-schedule` 包)。若 Harness 新增或改名了自带工具,需同步 `src/catalog.js` 的 `builtinToolNames`,否则新工具会被当成插件工具并允许禁用。
|
|
95
96
|
|
|
96
97
|
### 3. Web 界面操作
|
|
97
98
|
设置中心的“**工具接管**”页面提供:
|
|
@@ -195,6 +196,14 @@ pnpm run web
|
|
|
195
196
|
|
|
196
197
|
浏览器端 `/` 候选缓存失效兼容逻辑会使用公开的 `connection/reset` 客户端事件;服务端通过注入 `webServer` 与 `connection` 双重挂载 `/extensions` 路由并由 Cordis effect 托管生命周期,防止动态请求掉入前端静态资源的 405 fallback。自动测试验证 Host/RPC、HTTP 桥接和浏览器 bundle 构建,但没有在本仓库内启动完整 Harness Web 做端到端菜单点击验证。外部文件改动仍依赖 filesystem provider 先完成 watcher 失效,必要时可在变更后点击管理页“刷新”。
|
|
197
198
|
|
|
199
|
+
## Harness 版本兼容
|
|
200
|
+
|
|
201
|
+
当前版本在 DeepSeek Harness **0.2.0-rc.2** 上验证:`pnpm test`(33 项)与 `pnpm run build` 通过,并逐项核对了所用公开接口——`tools.register/get/schemas/guard`、`tools/pre-execute` 的 `deny` 决策、`skills.register/snapshot`、`webServer.register(kind: 'prefix')`、服务端 `connection.rpc.handle` 与浏览器端 `connection.rpc.call`、`settings.section` 槽位、`locale.register/bind`、`connection/reset` 事件、客户端 bundle 的 `window.__ModuleLoader__.load({ id, factory })` 格式。
|
|
202
|
+
|
|
203
|
+
- `peerDependencies` 只声明**下界**(`@deepseek-ai/dsh-tools: >=0.1.5-rc.2`,无上界),以便跟随 Harness 的快速迭代:Harness 的插件兼容性判定用运行时版本比对这些范围。代价是不再对未来的破坏性变更做“响亮拒绝”,且**不保证前序版本**。
|
|
204
|
+
- `@deepseek-ai/dsh-mcp-client` 与 `@deepseek-ai/dsh-skill-filesystem` 作为 `dependencies` 固定在 `0.2.0-rc.2`:插件只用它们的 `Config` 校验/规范化托管配置行(真正的连接由 Harness 自带的同名插件完成)。Schemastery 对象对未知字段**透传**,已实测 0.2.0 新增的 `maxInstructionBytes` 在旧 schema 下也不会被丢弃;但若未来 Harness 改的是必填约束或字段语义,这个固定版本会成为陈旧校验源,届时应同步升级。
|
|
205
|
+
- 工具目录的核心工具名单同样是版本相关数据,见上文“名单维护”。
|
|
206
|
+
|
|
198
207
|
## 发布
|
|
199
208
|
|
|
200
209
|
推送和 Pull Request 会运行构建与测试。推送与 `package.json` 版本一致的 `v*` 标签后,GitHub Actions 会从 `NPM_TOKEN` Actions Secret 发布 npm 包并附带 provenance。例如发布 `0.1.0`:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@civilization/deepseek-harness-skill-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Skill path and MCP server management for DeepSeek Harness Web",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -51,21 +51,21 @@
|
|
|
51
51
|
},
|
|
52
52
|
"packageManager": "pnpm@10.33.0",
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@deepseek-ai/dsh-mcp-client": "0.
|
|
55
|
-
"@deepseek-ai/dsh-skill-filesystem": "0.
|
|
54
|
+
"@deepseek-ai/dsh-mcp-client": "0.2.0-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-skill-filesystem": "0.2.0-rc.2",
|
|
56
56
|
"@deepseek-ai/schemastery": "3.18.2",
|
|
57
57
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
58
58
|
"yaml": "^2.9.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
62
|
-
"@deepseek-ai/dsh-tools": "
|
|
62
|
+
"@deepseek-ai/dsh-tools": ">=0.1.5-rc.2"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@deepseek-ai/cordis": "4.0.
|
|
66
|
-
"@deepseek-ai/dsh-skill": "0.
|
|
67
|
-
"@deepseek-ai/dsh-system-prompt": "0.
|
|
68
|
-
"@deepseek-ai/dsh-tools": "0.
|
|
65
|
+
"@deepseek-ai/cordis": "4.0.4",
|
|
66
|
+
"@deepseek-ai/dsh-skill": "0.2.0-rc.2",
|
|
67
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
|
|
68
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.2",
|
|
69
69
|
"esbuild": "^0.28.2",
|
|
70
70
|
"react": "^19.2.8"
|
|
71
71
|
}
|
package/src/catalog.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
/** Plugin tool discovery, classification, and execution takeover management. */
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Tool names shipped by the Harness runtime itself, verified against the
|
|
5
|
+
* `dsh-tool-*`/`dsh-schedule` packages of DSH 0.2.0-rc.2. Core tools are listed,
|
|
6
|
+
* grouped as `Builtin`, and protected from execution takeover, so a stale entry
|
|
7
|
+
* here is a correctness bug rather than cosmetics: unknown core tools would be
|
|
8
|
+
* labelled as plugins and become disableable. Refresh this set when a Harness
|
|
9
|
+
* release adds or renames a bundled tool.
|
|
10
|
+
*/
|
|
4
11
|
const builtinToolNames = new Set([
|
|
5
|
-
'
|
|
6
|
-
'
|
|
7
|
-
'
|
|
8
|
-
'
|
|
9
|
-
'
|
|
10
|
-
'
|
|
12
|
+
'ask_user_question', 'bash', 'pwsh', 'read', 'read_image', 'write', 'edit', 'str_replace_editor',
|
|
13
|
+
'glob', 'grep', 'present', 'skill', 'todo_write',
|
|
14
|
+
'create_goal', 'get_goal', 'update_goal',
|
|
15
|
+
'job_list', 'job_output', 'job_kill',
|
|
16
|
+
'subagent', 'subagent_fork', 'list_agents', 'list_subagent_models', 'send_message', 'interrupt_agent',
|
|
17
|
+
'web_fetch', 'web_search', 'load_workspace_dependencies', 'ralph', 'workflow',
|
|
18
|
+
'schedule_create', 'schedule_delete', 'schedule_list', 'schedule_update',
|
|
19
|
+
'cordis_inspect_list', 'cordis_inspect_query',
|
|
11
20
|
])
|
|
12
21
|
|
|
13
22
|
/**
|
|
@@ -111,7 +120,9 @@ export function buildToolCatalog(ctx, catalogConfig = {}) {
|
|
|
111
120
|
groupName: classification.name,
|
|
112
121
|
isPlugin: classification.isPlugin,
|
|
113
122
|
enabled,
|
|
114
|
-
|
|
123
|
+
// Takeover targets plugin-registered tools only: disabling a bundled core
|
|
124
|
+
// tool from this panel could leave the agent unable to read or edit files.
|
|
125
|
+
canToggle: classification.isPlugin && schema.name !== 'run_code' && !schema.name.startsWith('extensions_catalog_'),
|
|
115
126
|
}
|
|
116
127
|
})
|
|
117
128
|
|