@sparkelf/dsh-client-ui-skill-center 0.2.0-rc.9
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.i18n.yaml +6 -0
- package/README.md +71 -0
- package/README.zh.md +78 -0
- package/lib/client.js +613 -0
- package/lib/index.js +396 -0
- package/lib/types/client/SkillCenterPage.d.ts +23 -0
- package/lib/types/client/SkillCenterPanelIcon.d.ts +17 -0
- package/lib/types/client/api.d.ts +75 -0
- package/lib/types/client/index.d.ts +29 -0
- package/lib/types/client/locales.d.ts +43 -0
- package/lib/types/index.d.ts +155 -0
- package/package.json +65 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
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.i18n.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
|
2
|
+
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
|
+
# after editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write packages/plus/ui-skill-center/README.md
|
|
5
|
+
README.md: 0402b32b8f3fd4b1e290a3036d335ba119db970c
|
|
6
|
+
README.zh.md: 4a1ea41110d11bf7d3de4b91878c27b1d61fa8dc
|
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Sidebar skill center: browse loaded skills by source, toggle model invocation, create and delete skills."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @sparkelf/dsh-client-ui-skill-center
|
|
7
|
+
|
|
8
|
+
English | [中文](README.zh.md)
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
A skill center for the dsh Web sidebar: browses loaded skills grouped by source, enables or disables model invocation, creates skills, and deletes them into a recoverable trash.
|
|
13
|
+
|
|
14
|
+
## What it does
|
|
15
|
+
|
|
16
|
+
- **Sidebar entry** "Skill Center" opens a panel, registered through the official `sidebar.panellist` slot and the keyed `main` page slot — the same slots the Plugins panel uses, so the shell owns the row, label, and selected state.
|
|
17
|
+
- **Skills list**: skills grouped by discovery source (bundled / runtime / `~/.agents/skills` / `~/.dsh/skills` / project `.agents/skills` / project `.dsh/skills` / custom roots), with a search box that filters by name, description, or when-to-use.
|
|
18
|
+
- **Enable / disable**: rewrites `disable-model-invocation` in the skill's YAML frontmatter. The field is edited in place rather than re-serialized, so comments, key order, and the body survive.
|
|
19
|
+
- **Create**: writes a standard `SKILL.md` under the user or project root.
|
|
20
|
+
- **Delete**: moves the skill into a `.trash` sibling directory, where it can be restored.
|
|
21
|
+
|
|
22
|
+
## Table of Contents
|
|
23
|
+
|
|
24
|
+
- [What it does](#what-it-does)
|
|
25
|
+
- [Design](#design)
|
|
26
|
+
- [Install](#install)
|
|
27
|
+
- [Model Experience](#model-experience)
|
|
28
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
29
|
+
|
|
30
|
+
-----
|
|
31
|
+
|
|
32
|
+
## Design
|
|
33
|
+
|
|
34
|
+
Reading goes through the official `ctx.skills` registry, so the catalog and its hot reload are the harness's rather than a second scanner's. The registry's summaries deliberately omit file paths — they are invocation-neutral metadata — so a write resolves the path through `ctx.skills.get()` when an action actually needs to touch a file. `collect()` caches the catalog those calls share, so the resolve is not a second scan.
|
|
35
|
+
|
|
36
|
+
The three writes have no official equivalent; the registry is read-only.
|
|
37
|
+
|
|
38
|
+
Every colour, border, and label weight comes from the shared alias tokens (`--dsw-alias-*`), and the sidebar glyph is `IconSkillOutline16` from `@deepseek-ai/dsh-client-ui-primitives`, so the panel and its row match the official panels beside them.
|
|
39
|
+
|
|
40
|
+
## Install
|
|
41
|
+
|
|
42
|
+
The host half mounts the `/api/dsh-skill-center` route family; the client half registers the sidebar entry and page. Mount both through a profile composition.
|
|
43
|
+
|
|
44
|
+
## Model Experience
|
|
45
|
+
|
|
46
|
+
None, as this package is a Web GUI surface: it registers a sidebar entry and a panel, and contributes no tool, no system-prompt section, and no session event.
|
|
47
|
+
|
|
48
|
+
#### KV Cache effect
|
|
49
|
+
|
|
50
|
+
None; no string this package owns reaches a model request, so a request's cacheable prefix is unaffected by anything the panel does.
|
|
51
|
+
|
|
52
|
+
## Known Limitations and Deferred Work
|
|
53
|
+
|
|
54
|
+
No runtime invariant companion is published. The package owns no durable package-local state: the route handlers read the skill registry and write skill files, and every observable outcome is covered by the route tests.
|
|
55
|
+
|
|
56
|
+
- **Deletion refuses a symlinked skill**: a skill discovered through a symlink has no single owning directory to move, so the delete action is withheld for it.
|
|
57
|
+
- **The list omits file paths**: whether a skill can be deleted is therefore not known until the delete is attempted, which then reports it.
|
|
58
|
+
- **Grouping follows the discovery source label, not the file path**: a provider that reports an unrecognized source lands in the custom group.
|
|
59
|
+
|
|
60
|
+
<a id="dev-note"></a>
|
|
61
|
+
### Dev Note
|
|
62
|
+
|
|
63
|
+
<details>
|
|
64
|
+
<summary>Working context for maintainers, click to expand</summary>
|
|
65
|
+
|
|
66
|
+
This Dev Note is working context for maintainers; shipped behavior, limits, and rationale live in the sections above.
|
|
67
|
+
|
|
68
|
+
- Host routes live under `src`, and the panel lives under `src/client`. The host half reads the catalog through `ctx.skills` and resolves a file path only when a write needs one, because the registry's summaries are invocation-neutral and carry no path.
|
|
69
|
+
- No runtime invariant companion is published because the package owns no durable package-local state; the route tests observe the reads and writes directly.
|
|
70
|
+
|
|
71
|
+
</details>
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "侧边栏技能中心:按来源浏览已加载技能、切换模型调用、新建与删除技能。"
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @sparkelf/dsh-client-ui-skill-center
|
|
7
|
+
|
|
8
|
+
[English](README.md) | 中文
|
|
9
|
+
|
|
10
|
+
<a id="summary"></a>
|
|
11
|
+
## 概述
|
|
12
|
+
|
|
13
|
+
dsh Web 侧边栏的技能中心:按来源分组浏览已加载的技能、启用或停用模型调用、新建技能,并把技能删除到可恢复的回收站。
|
|
14
|
+
|
|
15
|
+
<a id="what-it-does"></a>
|
|
16
|
+
## 功能
|
|
17
|
+
|
|
18
|
+
- **侧边栏入口**「技能中心」打开一个面板,它通过官方 `sidebar.panellist` 槽位与键控的 `main` 页面槽位注册 —— 与「插件」面板用的是同一批槽位,因此行、标签与选中态由外壳负责。
|
|
19
|
+
- **技能列表**:按发现来源分组(系统内置 / 运行时 / `~/.agents/skills` / `~/.dsh/skills` / 项目 `.agents/skills` / 项目 `.dsh/skills` / 自定义目录),并有一个搜索框按名称、描述或何时使用过滤。
|
|
20
|
+
- **启用 / 停用**:改写技能 YAML 前置块里的 `disable-model-invocation`。该字段是就地编辑而非重新序列化,因此注释、键顺序与正文都原样保留。
|
|
21
|
+
- **新建**:在用户级或项目级根目录下写入一个标准的 `SKILL.md`。
|
|
22
|
+
- **删除**:把技能移入同级的 `.trash` 目录,可从中恢复。
|
|
23
|
+
|
|
24
|
+
<a id="table-of-contents"></a>
|
|
25
|
+
## 目录
|
|
26
|
+
|
|
27
|
+
- [功能](#what-it-does)
|
|
28
|
+
- [设计](#design)
|
|
29
|
+
- [安装](#install)
|
|
30
|
+
- [模型体验](#model-experience)
|
|
31
|
+
- [已知限制和延期工作](#known-limitations-and-deferred-work)
|
|
32
|
+
|
|
33
|
+
-----
|
|
34
|
+
|
|
35
|
+
<a id="design"></a>
|
|
36
|
+
## 设计
|
|
37
|
+
|
|
38
|
+
读取走官方的 `ctx.skills` 注册表,因此目录与其热更新属于 harness 本身,而不是第二套扫描器。注册表的摘要有意省略文件路径 —— 它们是调用无关元数据 —— 所以写操作在真正需要触碰文件时通过 `ctx.skills.get()` 解析路径。这些调用共享的目录由 `collect()` 缓存,因此该解析不是第二次全量扫描。
|
|
39
|
+
|
|
40
|
+
三个写操作在官方没有等价物;注册表是只读的。
|
|
41
|
+
|
|
42
|
+
每一个颜色、边框与标签字重都来自共享别名 token(`--dsw-alias-*`),侧边栏图标是 `@deepseek-ai/dsh-client-ui-primitives` 的 `IconSkillOutline16`,因此面板与其行与旁边的官方面板一致。
|
|
43
|
+
|
|
44
|
+
<a id="install"></a>
|
|
45
|
+
## 安装
|
|
46
|
+
|
|
47
|
+
host 半边挂载 `/api/dsh-skill-center` 路由族;client 半边注册侧边栏入口与页面。两者都通过 profile 组合挂载。
|
|
48
|
+
|
|
49
|
+
<a id="model-experience"></a>
|
|
50
|
+
## 模型体验
|
|
51
|
+
|
|
52
|
+
无,因为本包是一个 Web GUI 表面:它注册一个侧边栏入口与一个面板,不贡献任何工具、系统提示段或会话事件。
|
|
53
|
+
|
|
54
|
+
#### KV Cache effect
|
|
55
|
+
|
|
56
|
+
无;本包拥有的任何字符串都不会抵达模型请求,因此请求的可缓存前缀不受该面板任何行为的影响。
|
|
57
|
+
|
|
58
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
59
|
+
## 已知限制和延期工作
|
|
60
|
+
|
|
61
|
+
No runtime invariant companion is published. 本包不拥有任何持久化的包内状态:路由处理器读取技能注册表并写入技能文件,每一个可观察结果都由路由测试覆盖。
|
|
62
|
+
|
|
63
|
+
- **删除会拒绝符号链接的技能**:通过符号链接发现的技能没有唯一归属目录可移动,因此对它不提供删除操作。
|
|
64
|
+
- **列表省略文件路径**:因此某个技能能否删除,要等到删除被尝试时才知道,那时才会报告。
|
|
65
|
+
- **分组跟随发现来源标签,而不是文件路径**:报告了无法识别的来源的提供者会落到自定义分组。
|
|
66
|
+
|
|
67
|
+
<a id="dev-note"></a>
|
|
68
|
+
### 开发备注
|
|
69
|
+
|
|
70
|
+
<details>
|
|
71
|
+
<summary>Working context for maintainers, click to expand</summary>
|
|
72
|
+
|
|
73
|
+
This Dev Note is working context for maintainers; shipped behavior, limits, and rationale live in the sections above.
|
|
74
|
+
|
|
75
|
+
- host 路由位于 `src`,面板位于 `src/client`。host 半边通过 `ctx.skills` 读取目录,只在某个写操作需要时才解析文件路径,因为注册表的摘要属于调用无关元数据,不携带路径。
|
|
76
|
+
- No runtime invariant companion is published because the package owns no durable package-local state; the route tests observe the reads and writes directly.
|
|
77
|
+
|
|
78
|
+
</details>
|