@nathan-adk/dsh-rea-lazy 0.0.0-stage → 1.1.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 +27 -0
- package/README.md +55 -2
- package/catalog/mcp-rea.json +1 -0
- package/cordis.patch.yml +8 -0
- package/lib/index.js +267 -0
- package/package.json +40 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nathan-ADK
|
|
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.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
This package is a configuration layer for DeepSeek Harness. It does not modify
|
|
25
|
+
or redistribute the upstream REA (https://github.com/morluto/rea) or
|
|
26
|
+
@kirkchinese/dsh-capability-catalog / @kirkchinese/dsh-rea packages, which
|
|
27
|
+
remain under their respective MIT licenses and respective authors.
|
package/README.md
CHANGED
|
@@ -1,3 +1,56 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @nathan-adk/dsh-rea-lazy
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
REA 在 DeepSeek Harness(DSH)里的**按需启动配置层** —— DSH 侧专用。让 REA 的 263 个工具保持可搜索,但 `rea` 进程平时不运行、不烧后台 token。
|
|
4
|
+
|
|
5
|
+
## 工作原理(v1.1.0 起自动探测)
|
|
6
|
+
|
|
7
|
+
插件激活时自动探测本机 REA,按以下优先级:
|
|
8
|
+
|
|
9
|
+
1. 环境变量 `REA_COMMAND` —— 手动指定完整命令(最高优先级)
|
|
10
|
+
2. PATH 上的 `rea` 命令(标准 `npm install -g rea-agents` 安装)
|
|
11
|
+
3. 本机 `rea-agents/scripts/rea.mjs`(用当前 Node 运行时启动)
|
|
12
|
+
|
|
13
|
+
探测到后把 REA 注册到 `@kirkchinese/dsh-capability-catalog`,配置:
|
|
14
|
+
- `catalogTtlMs`: 10 年 —— 目录缓存一旦生成就永不因陈旧而重新发现
|
|
15
|
+
- `idleDisconnectMs`: 5 分钟 —— 调用完空闲即断开
|
|
16
|
+
- `enabled: true` —— 工具留在目录里可搜索
|
|
17
|
+
|
|
18
|
+
**没有硬编码路径,任何电脑都能用。** 目录缓存由首次发现自动生成(会短暂启动一次 rea),之后不再自动启动。
|
|
19
|
+
|
|
20
|
+
## 沿用了哪些上游项目
|
|
21
|
+
|
|
22
|
+
本包是薄配置层,不改、不重新分发上游:
|
|
23
|
+
|
|
24
|
+
- [REA](https://github.com/morluto/rea) 的 `rea mcp` 标准输入输出接口(使用者自行安装 `rea-agents`)
|
|
25
|
+
- [`@kirkchinese/dsh-capability-catalog`](https://github.com/kirkchinese/dsh-capability-catalog) 的懒加载能力目录(search / describe / call)
|
|
26
|
+
- [`@kirkchinese/dsh-rea`](https://github.com/kirkchinese/dsh-capability-catalog) 整理的 14 个能力族与工具匹配规则(内联在引导插件中,源自其 MIT 授权的 `families.yml`)
|
|
27
|
+
|
|
28
|
+
上游项目均按其各自 MIT 许可授权,版权归各自作者。
|
|
29
|
+
|
|
30
|
+
## 对 REA 的影响 / 删除声明
|
|
31
|
+
|
|
32
|
+
- 不修改 REA 仓库、npm 包或运行时文件
|
|
33
|
+
- 不自动常驻:缓存命中后 `rea mcp` 只在真正 `capability_call` 工具时启动,空闲 5 分钟断开
|
|
34
|
+
- 缓存写在 DSH 数据目录(`$DSH_HOME/capability-catalog`),不碰 REA 安装目录
|
|
35
|
+
- 卸载本包只是移除这一行插件配置,可逆、无残留
|
|
36
|
+
|
|
37
|
+
**如果本包对 REA 或你的环境造成任何影响,或希望我们停止发布/删除相关内容,可直接联系 GitHub: Nathan-ADK,我们会立即配合处理或下架。**
|
|
38
|
+
|
|
39
|
+
## 安装
|
|
40
|
+
|
|
41
|
+
前置:先装能力目录 `@kirkchinese/dsh-capability-catalog`(本包依赖它的服务)。REA 可装可不装到 PATH —— 本包会自动探测;若探测不到,设 `REA_COMMAND` 即可。
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
dsh plugin add @nathan-adk/dsh-capability-catalog
|
|
45
|
+
dsh plugin add @nathan-adk/dsh-rea-lazy
|
|
46
|
+
# 可选:REA_COMMAND="node /path/to/rea.mjs mcp"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 排障
|
|
50
|
+
|
|
51
|
+
- 目录里看不到 REA 工具 → 确认能力目录已装;若自动探测失败,设 `REA_COMMAND` 后重启 DSH。
|
|
52
|
+
- 首次使用会短暂启动一次 rea 建立目录缓存(属预期);此后不再自动启动。
|
|
53
|
+
|
|
54
|
+
## 许可
|
|
55
|
+
|
|
56
|
+
MIT —— 仅覆盖本配置层;上游 REA 与能力目录归各自作者所有。
|