@nathan-adk/dsh-rea-lazy 0.0.0-stage → 1.0.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 +62 -2
- package/catalog/mcp-rea.json +1 -0
- package/cordis.patch.yml +67 -0
- package/package.json +38 -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,63 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @nathan-adk/dsh-rea-lazy
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
REA 在 DeepSeek Harness(DSH)里的**按需启动配置层** —— DSH 侧专用,目标是消除 REA 常驻进程、节省后台 token。
|
|
4
|
+
|
|
5
|
+
## 这是什么(DSH 侧解决的问题)
|
|
6
|
+
|
|
7
|
+
REA 是一个功能强大的逆向工程 MCP 工具集(263 个工具)。把它以常规 MCP 方式接入 DSH,会带来两个问题:
|
|
8
|
+
|
|
9
|
+
1. **常驻烧 token**:263 个工具的完整 schema(约 670 KB)会在每轮请求都进入系统提示词。
|
|
10
|
+
2. **进程常驻**:MCP 客户端可能在启动时就拉起 `rea` 进程,即使你根本没做逆向任务。
|
|
11
|
+
|
|
12
|
+
本包解决的正是这两个问题:它沿用 DSH 生态已有的**能力目录(capability catalog)**机制,把 REA 的 263 个工具变成可搜索的紧凑索引,并保证 `rea` 进程**只在你真正调用某个 REA 工具时才启动**,空闲 5 分钟自动断开。平时:没有 rea 进程、没有额外 token 消耗。
|
|
13
|
+
|
|
14
|
+
## 沿用了 REA 的哪些东西
|
|
15
|
+
|
|
16
|
+
本包是**纯配置层(configuration-only bundle)**,不含任何 REA 代码,不修改、不重新分发 REA:
|
|
17
|
+
|
|
18
|
+
- 沿用上游 [REA](https://github.com/morluto/rea) 的 `rea mcp` 标准输入输出接口(由使用者自行安装 `rea-agents`)。
|
|
19
|
+
- 沿用上游 [`@kirkchinese/dsh-capability-catalog`](https://github.com/kirkchinese/dsh-capability-catalog) 的懒加载能力目录(search / describe / call 三个元工具)。
|
|
20
|
+
- 沿用上游 [`@kirkchinese/dsh-rea`](https://github.com/kirkchinese/dsh-capability-catalog) 整理的 14 个能力族与工具匹配规则(本包的 `cordis.patch.yml` 中完整重述了这些族配置,便于独立安装;这些规则源自上游的 MIT 授权文件 `families.yml`)。
|
|
21
|
+
- 随包附带一份由 REA `tools/list` 生成的工具目录缓存(`catalog/mcp-rea.json`,263 个工具),使启动与空闲期间都无需连接 REA 服务。
|
|
22
|
+
|
|
23
|
+
上述上游项目均按其各自的 MIT 许可证授权,版权归各自作者所有。
|
|
24
|
+
|
|
25
|
+
## 对 REA 造成了什么影响
|
|
26
|
+
|
|
27
|
+
- **无代码修改**:不对 REA 仓库、npm 包或运行时文件做任何改动。
|
|
28
|
+
- **无侵入启动**:本包配置的 `rea` 服务在缓存命中且 TTL(10 年)未过期时不会被自动拉起;只有在 DSH 中真正 `capability_call` 某个 REA 工具时才启动,空闲 5 分钟自动断开。
|
|
29
|
+
- **独立数据**:工具目录缓存写在你机器的 DSH 数据目录(`$DSH_HOME/capability-catalog`),不写入 REA 安装目录。
|
|
30
|
+
- **可逆**:卸载本包只是移除这一行插件配置,不影响 REA 本身或你已有的任何数据。
|
|
31
|
+
|
|
32
|
+
**如果本包对 REA 或你的环境造成了任何影响,或者你希望我们停止发布、删除相关内容,可以直接联系我们(GitHub: Nathan-ADK),我们会立即配合处理/下架。**
|
|
33
|
+
|
|
34
|
+
## 安装
|
|
35
|
+
|
|
36
|
+
前置条件:
|
|
37
|
+
1. 已安装 DSH 的能力目录包:`@kirkchinese/dsh-capability-catalog`(本包依赖它)。
|
|
38
|
+
2. REA 可执行文件 `rea` 在你的 PATH 上(例如 `npm install -g rea-agents`)。
|
|
39
|
+
3. 安装本包后,**首次使用前请先让能力目录完成一次 REA 工具发现**(详见下文「首次发现」)。
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
dsh plugin add @nathan-adk/dsh-capability-catalog
|
|
43
|
+
dsh plugin add @nathan-adk/dsh-rea-lazy
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 首次发现(一次性)
|
|
47
|
+
|
|
48
|
+
为了让 `rea` 工具出现在能力目录里,需要生成一次与本机 `rea` 命令匹配的缓存。本包内置的缓存以 `rea mcp` 为启动身份;如果你的 `rea` 命令解析结果不同,首次搜索不到 REA 工具时,在 DSH 中触发一次能力目录的重新发现(discovery),它会自动生成匹配本机的缓存,此后不再需要。
|
|
49
|
+
|
|
50
|
+
## 工作方式
|
|
51
|
+
|
|
52
|
+
- 常驻工具只有 3 个目录元工具:`capability_search` / `capability_describe` / `capability_call`。
|
|
53
|
+
- 263 个 REA 工具不注册为原生工具,只在目录里有紧凑索引(族名 + 工具名 + 参数大小)。
|
|
54
|
+
- 工具 schema 只有在 `capability_describe` 之后才进入上下文。
|
|
55
|
+
- 调用链固定 search → describe → call,一次只调一项,不会一次性挂载全部工具。
|
|
56
|
+
|
|
57
|
+
## 卸载
|
|
58
|
+
|
|
59
|
+
在 DSH 插件管理里移除 `@nathan-adk/dsh-rea-lazy` 即可。如需彻底清理缓存,可删除 `$DSH_HOME/capability-catalog/mcp-rea.json`。
|
|
60
|
+
|
|
61
|
+
## 许可
|
|
62
|
+
|
|
63
|
+
MIT —— 仅覆盖本配置包本身;上游 REA 与能力目录项目归各自作者所有并遵循各自 MIT 许可。
|