@dotdance/dsh-skill-scope 0.0.0-stage → 0.2.0
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/LICENSE +21 -0
- package/README.en.md +99 -0
- package/README.md +98 -2
- package/cordis.patch.yml +3 -0
- package/lib/client.js +1369 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +2157 -0
- package/package.json +76 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-skill-scope contributors
|
|
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
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# dsh-skill-scope: a Skill and MCP control panel for DSH
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
**One-click toggles for skills and MCP at both global and project scope**
|
|
12
|
+
|
|
13
|
+
**English** · [简体中文](README.md)
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
dsh plugin --profile web add @dotdance/dsh-skill-scope
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Replace `--profile web` with the name of your own profile.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## The problem it solves
|
|
28
|
+
|
|
29
|
+
The more you install in DSH, the longer the list your agent has to read every turn.
|
|
30
|
+
|
|
31
|
+
- Your user-level skill directory accumulates **N+ skills**, of which only a few help the task at hand.
|
|
32
|
+
- Every MCP server pushes **all of its tools** into the model's tool table, even when none are used this turn.
|
|
33
|
+
- A coding project and a writing workspace need **entirely different** skills and MCP servers.
|
|
34
|
+
- You want "this project uses only these capabilities", but there is no switch for that — an installed skill is globally visible.
|
|
35
|
+
|
|
36
|
+
The cost is not cosmetic. It is real:
|
|
37
|
+
|
|
38
|
+
| Cost | Why |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| **Burned tokens** | The skill list and the MCP tool table re-enter context every turn; the more you install, the higher the fixed per-turn overhead |
|
|
41
|
+
| **Diluted attention** | Too many candidates make the model likelier to pick the wrong tool or miss the relevant one |
|
|
42
|
+
| **An unclean context** | Unrelated capabilities mixed into the prompt make results harder to predict and harder to debug |
|
|
43
|
+
| **Cross-project contamination** | A capability only project A needs keeps occupying space in project B |
|
|
44
|
+
|
|
45
|
+
**dsh-skill-scope exists for exactly this**: it turns "which skills and MCP servers the model can call" into a set of
|
|
46
|
+
visible, clickable switches, managed separately at **global** and **per-workspace** scope.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## What it does
|
|
51
|
+
|
|
52
|
+
### 1. The global panel — switch off everything no project needs
|
|
53
|
+
|
|
54
|
+
Click **Global Skills** in the left sidebar to open a native main-view page listing everything at the
|
|
55
|
+
**global layer**, skills and MCP servers alike. Anything you switch off here **applies to every workspace**, and is a hard ceiling.
|
|
56
|
+
|
|
57
|
+

|
|
58
|
+
|
|
59
|
+
The red circles above mark the two entry points: **Global Skills** in the left sidebar, and **Workspace Skills** at the bottom right of the input box.
|
|
60
|
+
|
|
61
|
+
- The row at the top is a **view filter** (All / Enabled / Disabled) — it only filters the list, it changes no switch.
|
|
62
|
+
- The search box **filters both the Skill and the MCP sections**, live as you type.
|
|
63
|
+
- The list groups and collapses by source, so even a long inventory stays navigable.
|
|
64
|
+
|
|
65
|
+
### 2. The project panel — keep only what this one project needs
|
|
66
|
+
|
|
67
|
+
In a **new session**, click **Workspace Skills** at the bottom right of the input box to open the project-scoped overlay (it floats above the current view):
|
|
68
|
+
|
|
69
|
+

|
|
70
|
+
|
|
71
|
+
The panel title states that it affects `default-workspace` only, and the lower part groups items by source: in this example the `.agents` directory contributes 35 of them.
|
|
72
|
+
|
|
73
|
+
- Items switched off globally **never reach this list at all**, so a shorter list than the global panel is expected, not lost data.
|
|
74
|
+
- Changes **apply only to new sessions in this project** and affect no other project.
|
|
75
|
+
|
|
76
|
+
### 3. The key rule: global is a hard ceiling, projects can only narrow further
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
Every skill and MCP server on disk
|
|
80
|
+
│
|
|
81
|
+
▼
|
|
82
|
+
┌─────────────────────┐
|
|
83
|
+
│ Global (hard cap) │ off = no project can use it
|
|
84
|
+
└─────────────────────┘
|
|
85
|
+
│ what remains
|
|
86
|
+
▼
|
|
87
|
+
┌─────────────────────┐
|
|
88
|
+
│ Project (narrow) │ can only switch more off;
|
|
89
|
+
└─────────────────────┘ cannot re-enable a globally disabled item
|
|
90
|
+
│
|
|
91
|
+
▼
|
|
92
|
+
The set the model actually sees this turn
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Off is not deleted: manual invocation always remains
|
|
96
|
+
|
|
97
|
+
Switching a skill off only disables its **automatic invocation by the model**. You can still call it by typing `/name` in a session.
|
|
98
|
+
|
|
99
|
+
---
|
package/README.md
CHANGED
|
@@ -1,3 +1,99 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# dsh-skill-scope: DSH Skill 与 MCP 管控面板
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
**全局 + 项目粒度 skill/mcp 一键启停**
|
|
12
|
+
|
|
13
|
+
[English](README.en.md) · **简体中文**
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 安装
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
dsh plugin --profile web add @dotdance/dsh-skill-scope
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`--profile web` 换成你自己的 profile 名即可。
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## 它解决什么问题
|
|
28
|
+
|
|
29
|
+
你在 DSH 里装得越多,Agent 每一轮要读的清单就越长。
|
|
30
|
+
|
|
31
|
+
- 用户级 Skill 目录里堆了 **N+ Skill**,其中能帮到当前这个任务的只有几个。
|
|
32
|
+
- 每个 MCP server 都会把它的**全部工具**塞进模型的工具表,哪怕这一轮一个都用不上。
|
|
33
|
+
- 写代码的工程和写文章的工作区,需要的 Skill 和 MCP **根本不是同一套**。
|
|
34
|
+
- 你想「这个项目就用这几个能力」,但官方没有给任何开关——Skill 装上就是全局可见。
|
|
35
|
+
|
|
36
|
+
后果不是"不好看",而是实打实的成本:
|
|
37
|
+
|
|
38
|
+
| 代价 | 说明 |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| **烧 Token** | Skill 目录与 MCP 工具表每一轮都要重新进上下文,装的越多,每一轮固定开销越大 |
|
|
41
|
+
| **注意力被稀释** | 候选太多,模型更容易选错工具、漏掉真正相关的那个 |
|
|
42
|
+
| **上下文不干净** | 无关能力混进提示词,结果更难预测,调试更难 |
|
|
43
|
+
| **工程之间互相污染** | A 项目的专用能力,在 B 项目里也一直占着位置 |
|
|
44
|
+
|
|
45
|
+
**dsh-skill-scope 就是为这件事做的**:把「模型能调用哪些 Skill 与 MCP」变成一组
|
|
46
|
+
看得见、点得动的开关,并按**全局**和**本工作区**两个粒度分别管理。
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 它能做什么
|
|
51
|
+
|
|
52
|
+
### 1. 全局面板——一次收掉所有工程都不需要的能力
|
|
53
|
+
|
|
54
|
+
点左侧栏的「**全局 Skills**」,打开一个原生主界面页面,列出**全局层**的全部 Skill 与 MCP server。
|
|
55
|
+
在这里关掉的名字,**对所有工作区生效**,是硬上限。
|
|
56
|
+
|
|
57
|
+

|
|
58
|
+
|
|
59
|
+
上图红圈标出两个入口:左侧栏的 **Global Skills**,和输入框右下角的 **Workspace Skills**。
|
|
60
|
+
|
|
61
|
+
- 顶部一排是**视图切换**(全部 / 已启用 / 已禁用)——它只筛列表,不改任何开关。
|
|
62
|
+
- 搜索框**同时筛 Skill 与 MCP 两段**,输入即过滤。
|
|
63
|
+
- 列表按来源分组折叠,长清单也能快速定位。
|
|
64
|
+
|
|
65
|
+
### 2. 本工程面板——只给这一个项目留要用的能力
|
|
66
|
+
|
|
67
|
+
在**新会话**的输入框右下角点「**工作区 Skills**」,打开本工程弹层(浮动在当前界面之上):
|
|
68
|
+
|
|
69
|
+

|
|
70
|
+
|
|
71
|
+
图中列表标题写明「只影响 default-workspace」,下半部分按来源分组:本例里 `.agents` 目录贡献 35 项。
|
|
72
|
+
|
|
73
|
+
- 被全局关掉的项**根本不进这个列表**,所以列表比全局面板短是正常的,不是丢数据。
|
|
74
|
+
- 改动**只对本工程的新会话生效**,不影响别的项目。
|
|
75
|
+
|
|
76
|
+
### 3. 关键规则:全局是硬上限,工程只能往下收
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
磁盘上的全部 Skill 与 MCP
|
|
80
|
+
│
|
|
81
|
+
▼
|
|
82
|
+
┌─────────────────────┐
|
|
83
|
+
│ 全局层(硬上限) │ 关掉 = 任何工程都用不了
|
|
84
|
+
└─────────────────────┘
|
|
85
|
+
│ 剩下的
|
|
86
|
+
▼
|
|
87
|
+
┌─────────────────────┐
|
|
88
|
+
│ 工程层(再收窄) │ 只能继续关,不能把全局关掉的打开
|
|
89
|
+
└─────────────────────┘
|
|
90
|
+
│
|
|
91
|
+
▼
|
|
92
|
+
这一轮模型真正看得见的集合
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 关掉 ≠ 删掉:手动调用永远还在
|
|
96
|
+
|
|
97
|
+
关掉一个 Skill 只把它的**模型自动调用**关掉。你仍然可以在会话里手敲 `/名字` 调用它。
|
|
98
|
+
|
|
99
|
+
---
|
package/cordis.patch.yml
ADDED