@onenightcarnival/dsh-toolkit 0.0.0-stage → 0.9.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 ADDED
@@ -0,0 +1,18 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 onenightcarnival
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial
12
+ portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,130 @@
1
- # Temporary Holding Version
1
+ # @onenightcarnival/dsh-toolkit
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **English** | [中文](README.zh.md)
4
+
5
+ Integrated plugin package for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), containing nine modules. Each module retains its standalone panels, tools, settings, data files and API paths.
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ # npm
11
+ dsh plugin --profile web add @onenightcarnival/dsh-toolkit@<version>
12
+ # or the release file
13
+ dsh plugin --profile web add file:./onenightcarnival-dsh-toolkit-<version>.tgz
14
+ ```
15
+
16
+ Desktop entry: Plugins → Config center… → Plugins, by npm package name or Install from .tgz.
17
+
18
+ The integrated package and standalone plugins are mutually exclusive. Runtime compatibility: [repository guide](../../README.md#runtime-compatibility).
19
+
20
+ ## Module configuration
21
+
22
+ | Key | Module | Configuration |
23
+ |---|---|---|
24
+ | `rdb` | Relational databases | [RDB](../rdb/README.md) |
25
+ | `s3` | Object storage | [S3](../s3/README.md) |
26
+ | `http` | HTTP API client | [HTTP](../http/README.md) |
27
+ | `otel` | Observability | [OTel](../otel/README.md) |
28
+ | `browser` | Browser control | [Browser bridge](../browser-bridge/README.md#config) |
29
+ | `subscriptions` | AI subscriptions | [Subscriptions](../subscriptions/README.md) |
30
+ | `memory` | Career memory | [Memory](../memory/README.md) |
31
+ | `configCenter` | Configuration center | [Config center](../config-center/README.md#config) |
32
+ | `gateway` | API gateway | [API gateway](../gateway/README.md#panel) |
33
+
34
+ Web profile plugin ID: `toolkit`. Configuration file: `~/.dsh/profiles/web/cordis.patch.yml`.
35
+
36
+ | Value | Behavior |
37
+ |---|---|
38
+ | Omitted or `{}` | Enabled with default configuration |
39
+ | Configuration object | Enabled; configuration passed to the standalone plugin |
40
+ | `false` | Host module and corresponding UI disabled |
41
+
42
+ An override replaces the entire `config` object; retained custom values must be included. This configuration disables OTel, sets browser discovery to port `43189`, and uses defaults for the remaining modules:
43
+
44
+ ```yaml
45
+ - id: toolkit
46
+ config:
47
+ otel: false
48
+ browser:
49
+ discoveryPort: 43189
50
+ ```
51
+
52
+ ## Mount flow
53
+
54
+ ```text
55
+ config → host modules → GET /api/dsh-toolkit/modules → corresponding client plugins
56
+ ```
57
+
58
+ Mount order: `rdb → s3 → http → otel → browser → subscriptions → configCenter → memory → gateway`. The endpoint returns the modules enabled by configuration:
59
+
60
+ ```json
61
+ {"rdb":true,"s3":true,"http":true,"otel":false,"browser":true,"subscriptions":true,"configCenter":true,"memory":true,"gateway":true}
62
+ ```
63
+
64
+ | Request | Response |
65
+ |---|---|
66
+ | `GET /api/dsh-toolkit/modules` | `200`, module boolean map, `Cache-Control: no-store` |
67
+ | Other methods | `405`, empty JSON object |
68
+
69
+ ## Sidebar entries
70
+
71
+ The toolkit stores the pin state of the shell sidebar. Pinning and unpinning use the shell's own controls and cover the sidebar entries of all plugins, including third-party plugins such as SSH and the task board:
72
+
73
+ | Action | Place |
74
+ |---|---|
75
+ | Unpin | The unpin button on an entry row of the expanded sidebar |
76
+ | Pin | The pin button on an unpinned entry in the **More** menu |
77
+ | Open an unpinned entry | Its row in the **More** menu |
78
+
79
+ | Moment | Behaviour |
80
+ |---|---|
81
+ | Start | Once the sidebar registers, the stored unpinned entries move from the sidebar into the **More** menu |
82
+ | Pin or unpin | The current unpinned set is saved at once |
83
+ | Failed save | The sidebar returns to the last saved state; the console logs a warning |
84
+
85
+ Features and data of an unpinned entry stay unchanged. The Plugins entry is always pinned. The pin state is read from the inject face of the shell's `sidebar` slot entry; a shell without that face keeps no stored pin state.
86
+
87
+ Toolkit module entries:
88
+
89
+ | Entry | Module | Entry ID |
90
+ |---|---|---|
91
+ | Database | `rdb` | `rdb` |
92
+ | S3 | `s3` | `s3` |
93
+ | HTTP | `http` | `http` |
94
+ | MCP | `configCenter` | `dsh-config-center-mcp` |
95
+ | Memory | `memory` | `memory` |
96
+ | Skills | `configCenter` | `dsh-config-center-skills` |
97
+ | AI subscriptions | `subscriptions` | `subscriptions` |
98
+ | API gateway | `gateway` | `gateway` |
99
+
100
+ Entry IDs of uninstalled plugins stay in the setting; a reinstalled plugin stays unpinned.
101
+
102
+ The setting is stored as `hiddenSidebarPanels` in `dsh-toolkit.json` in the active profile directory, for example `~/.dsh/profiles/web/dsh-toolkit.json`:
103
+
104
+ ```json
105
+ {"hiddenSidebarPanels":["rdb","task-board"]}
106
+ ```
107
+
108
+ | Request | Response |
109
+ |---|---|
110
+ | `GET /api/dsh-toolkit/sidebar` | `200`, `{"hidden":[unpinned entry ID…]}` |
111
+ | `PUT /api/dsh-toolkit/sidebar` with body `{"hidden":[…]}` | `200`, the saved structure; IDs must be 1–128 printable characters, at most 200, otherwise `400`; non-loopback or cross-site requests return `403` |
112
+ | Other methods | `405`, empty JSON object |
113
+
114
+ ## Structure
115
+
116
+ | File | Responsibility |
117
+ |---|---|
118
+ | `src/index.ts` | Host module mounting, module map endpoint and sidebar preferences endpoint |
119
+ | `src/client.ts` | Client plugin mounting from the host map, sidebar pin persistence, settings nav icons |
120
+ | `src/modules.ts` | Module order, map type, entry ID constraints and API paths |
121
+ | `src/preferences.ts` | `dsh-toolkit.json` in the profile directory |
122
+ | `src/client/sidebar.ts` | Unpinned entry set and save requests |
123
+ | `src/client/pins.ts` | Two-way sync between the shell sidebar's pin state and the stored set |
124
+ | `src/client/section-icons.tsx` | Settings nav icons of Observability, Environment dependencies and Local logs (`settings.section.icon` slot, registered by section id) |
125
+ | `src/typert.ts` | OTel typert manifest registered under the toolkit package name |
126
+ | `build.mjs` | Host and client builds from the nine modules' sources |
127
+
128
+ ## License
129
+
130
+ MIT. Third-party notices: `THIRD_PARTY_LICENSES.txt` in the package, generated by the build from the bundled modules.
package/README.zh.md ADDED
@@ -0,0 +1,130 @@
1
+ # @onenightcarnival/dsh-toolkit
2
+
3
+ [English](README.md) | **中文**
4
+
5
+ [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的集成插件包,包含九个模块。各模块保留独立插件的面板、工具、设置、数据文件和 API 路径。
6
+
7
+ ## 安装
8
+
9
+ ```sh
10
+ # npm
11
+ dsh plugin --profile web add @onenightcarnival/dsh-toolkit@<版本>
12
+ # 或 Release 附件
13
+ dsh plugin --profile web add file:./onenightcarnival-dsh-toolkit-<版本>.tgz
14
+ ```
15
+
16
+ 桌面版入口:插件 → 配置中心… → 插件,按 npm 包名或「从 .tgz 安装」。
17
+
18
+ 集成包与独立插件互斥。运行时兼容性见[仓库说明](../../README.zh.md#运行时兼容性)。
19
+
20
+ ## 模块配置
21
+
22
+ | 配置键 | 模块 | 配置参考 |
23
+ |---|---|---|
24
+ | `rdb` | 关系数据库 | [RDB](../rdb/README.zh.md) |
25
+ | `s3` | 对象存储 | [S3](../s3/README.zh.md) |
26
+ | `http` | HTTP API 请求 | [HTTP](../http/README.zh.md) |
27
+ | `otel` | 可观测上报 | [OTel](../otel/README.md) |
28
+ | `browser` | 浏览器操作 | [Browser bridge](../browser-bridge/README.zh.md#配置) |
29
+ | `subscriptions` | AI 订阅 | [Subscriptions](../subscriptions/README.zh.md) |
30
+ | `memory` | 履历式记忆 | [Memory](../memory/README.zh.md) |
31
+ | `gateway` | API 网关 | [API 网关](../gateway/README.zh.md#面板) |
32
+ | `configCenter` | 配置中心 | [Config center](../config-center/README.zh.md#配置) |
33
+
34
+ web profile 插件 ID:`toolkit`。配置文件:`~/.dsh/profiles/web/cordis.patch.yml`。
35
+
36
+ | 配置值 | 行为 |
37
+ |---|---|
38
+ | 省略或 `{}` | 启用模块,使用默认配置 |
39
+ | 配置对象 | 启用模块,配置传入对应独立插件 |
40
+ | `false` | 禁用宿主模块及对应界面 |
41
+
42
+ 覆盖操作替换整段 `config`,已有自定义值需一并列出。以下配置禁用 OTel,浏览器发现端口为 `43189`,其余模块使用默认配置:
43
+
44
+ ```yaml
45
+ - id: toolkit
46
+ config:
47
+ otel: false
48
+ browser:
49
+ discoveryPort: 43189
50
+ ```
51
+
52
+ ## 挂载流程
53
+
54
+ ```text
55
+ config → 宿主挂载模块 → GET /api/dsh-toolkit/modules → 客户端挂载对应界面
56
+ ```
57
+
58
+ 模块按 `rdb → s3 → http → otel → browser → subscriptions → configCenter → memory → gateway` 顺序挂载。接口返回配置启用的模块清单:
59
+
60
+ ```json
61
+ {"rdb":true,"s3":true,"http":true,"otel":false,"browser":true,"subscriptions":true,"configCenter":true,"memory":true,"gateway":true}
62
+ ```
63
+
64
+ | 请求 | 响应 |
65
+ |---|---|
66
+ | `GET /api/dsh-toolkit/modules` | `200`,模块布尔值映射,`Cache-Control: no-store` |
67
+ | 其他方法 | `405`,空 JSON 对象 |
68
+
69
+ ## 侧栏入口
70
+
71
+ 集成包保存宿主侧栏的固定状态。固定与取消固定使用宿主自带的控件,适用于全部插件的侧栏入口(含 SSH、任务看板等第三方插件):
72
+
73
+ | 操作 | 位置 |
74
+ |---|---|
75
+ | 取消固定 | 侧栏展开时入口行上的取消固定按钮 |
76
+ | 固定 | 「更多」菜单中未固定入口上的固定按钮 |
77
+ | 打开未固定的入口 | 「更多」菜单中的入口行 |
78
+
79
+ | 时机 | 行为 |
80
+ |---|---|
81
+ | 启动 | 侧栏注册后,已保存的未固定入口从侧栏移入「更多」菜单 |
82
+ | 固定或取消固定 | 当前未固定集合立即保存 |
83
+ | 保存失败 | 侧栏恢复到上一次保存的状态,控制台记录警告 |
84
+
85
+ 未固定入口的功能与数据不受影响。「插件」入口始终固定。固定状态取自宿主 `sidebar` 槽位注册项的注入对象;宿主不提供该对象时不保存固定状态。
86
+
87
+ toolkit 模块入口:
88
+
89
+ | 入口 | 模块 | 入口 ID |
90
+ |---|---|---|
91
+ | 数据库 | `rdb` | `rdb` |
92
+ | S3 | `s3` | `s3` |
93
+ | HTTP | `http` | `http` |
94
+ | MCP | `configCenter` | `dsh-config-center-mcp` |
95
+ | 记忆 | `memory` | `memory` |
96
+ | 技能 | `configCenter` | `dsh-config-center-skills` |
97
+ | AI 订阅 | `subscriptions` | `subscriptions` |
98
+ | API 网关 | `gateway` | `gateway` |
99
+
100
+ 已卸载插件的入口 ID 保留在设置中,重新安装后保持未固定。
101
+
102
+ 设置保存在当前 profile 目录的 `dsh-toolkit.json`(`hiddenSidebarPanels`),例如 `~/.dsh/profiles/web/dsh-toolkit.json`:
103
+
104
+ ```json
105
+ {"hiddenSidebarPanels":["rdb","task-board"]}
106
+ ```
107
+
108
+ | 请求 | 响应 |
109
+ |---|---|
110
+ | `GET /api/dsh-toolkit/sidebar` | `200`,`{"hidden":[未固定的入口 ID…]}` |
111
+ | `PUT /api/dsh-toolkit/sidebar`,请求体 `{"hidden":[…]}` | `200`,保存后的同一结构;ID 须为 1–128 个可打印字符,最多 200 个,否则返回 `400`;非回环或跨站请求返回 `403` |
112
+ | 其他方法 | `405`,空 JSON 对象 |
113
+
114
+ ## 结构
115
+
116
+ | 文件 | 职责 |
117
+ |---|---|
118
+ | `src/index.ts` | 宿主模块挂载、模块清单接口与侧栏设置接口 |
119
+ | `src/client.ts` | 按宿主清单挂载客户端插件、保存侧栏固定状态、注册设置页导航图标 |
120
+ | `src/modules.ts` | 模块顺序、清单类型、入口 ID 约束与 API 路径 |
121
+ | `src/preferences.ts` | profile 目录内的 `dsh-toolkit.json` 读写 |
122
+ | `src/client/sidebar.ts` | 未固定入口集合与保存请求 |
123
+ | `src/client/pins.ts` | 宿主侧栏固定状态与已保存集合的双向同步 |
124
+ | `src/client/section-icons.tsx` | 可观测、环境依赖、本机日志设置页的导航图标(`settings.section.icon` 槽位,按设置页 id 注册) |
125
+ | `src/typert.ts` | 以集成包名注册 OTel typert 清单 |
126
+ | `build.mjs` | 九个模块源码的宿主与客户端构建 |
127
+
128
+ ## 许可
129
+
130
+ MIT。第三方声明:安装包内的 `THIRD_PARTY_LICENSES.txt`,由构建按实际打包的模块生成。