@openvulcan/dsh-vulcancode 0.0.0-stage → 0.4.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.md +86 -2
- package/assets/openvulcan-icon.svg +33 -0
- package/cordis.patch.yml +17 -0
- package/node_modules/@openvulcan/dsh-decision-guard/LICENSE +21 -0
- package/node_modules/@openvulcan/dsh-decision-guard/README.md +14 -0
- package/node_modules/@openvulcan/dsh-decision-guard/assets/decision-guard-icon.png +0 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/calls.d.ts +40 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/calls.js +150 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/client.js +2193 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/decide.d.ts +90 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/decide.js +108 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/index.d.ts +129 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/index.js +572 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/intent.d.ts +22 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/intent.js +77 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/panel.d.ts +158 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/panel.js +340 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/records.d.ts +133 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/records.js +186 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/review.d.ts +55 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/review.js +202 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/session-state.d.ts +62 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/session-state.js +155 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/version.d.ts +2 -0
- package/node_modules/@openvulcan/dsh-decision-guard/lib/version.js +4 -0
- package/node_modules/@openvulcan/dsh-decision-guard/package.json +68 -0
- package/node_modules/@openvulcan/dsh-vulcan-account/LICENSE +21 -0
- package/node_modules/@openvulcan/dsh-vulcan-account/assets/account-icon.png +0 -0
- package/node_modules/@openvulcan/dsh-vulcan-account/lib/client.js +565 -0
- package/node_modules/@openvulcan/dsh-vulcan-account/lib/index.d.ts +92 -0
- package/node_modules/@openvulcan/dsh-vulcan-account/lib/index.js +194 -0
- package/node_modules/@openvulcan/dsh-vulcan-account/package.json +57 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/LICENSE +21 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/assets/answers-icon.png +0 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/assets/prompts/answer-mode-interactive.md +79 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/assets/prompts/answer-mode-standard.md +1 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/answer-model.d.ts +258 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/answer-model.js +698 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/client.js +671 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/fences.d.ts +29 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/fences.js +70 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/index.d.ts +19 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/index.js +52 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/limits.d.ts +9 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/limits.js +9 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/prompt.d.ts +22 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/prompt.js +39 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/reply-format.d.ts +20 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/reply-format.js +17 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/session-state.d.ts +66 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/lib/session-state.js +118 -0
- package/node_modules/@openvulcan/dsh-vulcan-answers/package.json +59 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/LICENSE +21 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/assets/luaskills-icon.svg +1 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/client.js +940 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/constants.d.ts +46 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/constants.js +51 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/engine.d.ts +55 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/engine.js +149 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/hub.d.ts +49 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/hub.js +116 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/index.d.ts +26 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/index.js +276 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/protocol.d.ts +65 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/protocol.js +2 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/runtime.d.ts +111 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/runtime.js +281 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/sdk-install.d.ts +26 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/sdk-install.js +87 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/settings.d.ts +79 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/settings.js +165 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/skills.d.ts +34 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/skills.js +61 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/tools.d.ts +59 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/tools.js +107 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/worker.d.ts +10 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/worker.js +140 -0
- package/node_modules/@openvulcan/dsh-vulcan-luaskills/package.json +57 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/LICENSE +21 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/assets/markdown-memory-guide.md +21 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/assets/memory-curator/SKILL.md +31 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/assets/memory-icon.png +0 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/client.js +1090 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/index.d.ts +30 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/index.js +240 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/inject.d.ts +30 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/inject.js +46 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/constants.d.ts +23 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/constants.js +25 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/document.d.ts +108 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/document.js +373 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/errors.d.ts +14 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/errors.js +31 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/index.d.ts +196 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/index.js +204 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/operations.d.ts +92 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/operations.js +472 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/package.d.ts +126 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/package.js +553 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/registry.d.ts +56 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/registry.js +182 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/scope.d.ts +13 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/scope.js +24 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/search.d.ts +65 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/search.js +227 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/snapshot.d.ts +34 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/snapshot.js +171 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/store.d.ts +72 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/store.js +250 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/timestamp.d.ts +6 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/timestamp.js +12 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/tokens.d.ts +8 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/tokens.js +38 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/page.d.ts +132 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/page.js +235 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/project.d.ts +14 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/project.js +27 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/settings.d.ts +29 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/lib/settings.js +62 -0
- package/node_modules/@openvulcan/dsh-vulcan-memory/package.json +63 -0
- package/node_modules/@openvulcan/dsh-vulcan-style/LICENSE +21 -0
- package/node_modules/@openvulcan/dsh-vulcan-style/assets/style-icon.png +0 -0
- package/node_modules/@openvulcan/dsh-vulcan-style/lib/client.js +1061 -0
- package/node_modules/@openvulcan/dsh-vulcan-style/lib/index.d.ts +34 -0
- package/node_modules/@openvulcan/dsh-vulcan-style/lib/index.js +42 -0
- package/node_modules/@openvulcan/dsh-vulcan-style/package.json +51 -0
- package/node_modules/@openvulcan/openvulcan-account/LICENSE +21 -0
- package/node_modules/@openvulcan/openvulcan-account/lib/account.d.ts +140 -0
- package/node_modules/@openvulcan/openvulcan-account/lib/account.js +347 -0
- package/node_modules/@openvulcan/openvulcan-account/lib/index.d.ts +1 -0
- package/node_modules/@openvulcan/openvulcan-account/lib/index.js +1 -0
- package/node_modules/@openvulcan/openvulcan-account/package.json +29 -0
- package/node_modules/@openvulcan/vulcan-decision/LICENSE +21 -0
- package/node_modules/@openvulcan/vulcan-decision/README.md +23 -0
- package/node_modules/@openvulcan/vulcan-decision/bin/vulcan-decision.js +4 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/cli.d.ts +5 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/cli.js +267 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/cloud/edge.d.ts +211 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/cloud/edge.js +594 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/download.d.ts +36 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/download.js +99 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/engine.d.ts +37 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/engine.js +39 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/hardware.d.ts +105 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/hardware.js +207 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/home.d.ts +26 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/home.js +54 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/index.d.ts +17 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/index.js +17 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/local/engine.d.ts +54 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/local/engine.js +157 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/local/models.d.ts +126 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/local/models.js +261 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/local/packs.d.ts +102 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/local/packs.js +195 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/local/worker.d.ts +61 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/local/worker.js +123 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/protocol.d.ts +74 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/protocol.js +31 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/render.d.ts +15 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/render.js +33 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/version.d.ts +2 -0
- package/node_modules/@openvulcan/vulcan-decision/lib/version.js +4 -0
- package/node_modules/@openvulcan/vulcan-decision/package.json +40 -0
- package/node_modules/@openvulcan/vulcan-decision/python/vulcan_decision_worker.py +363 -0
- package/node_modules/@openvulcan/vulcan-decision/runtime-packs/onnx-cpu.json +627 -0
- package/node_modules/@openvulcan/vulcan-decision/runtime-packs/onnx-cuda.json +423 -0
- package/node_modules/@openvulcan/vulcan-decision/runtime-packs/torch-cpu.json +1047 -0
- package/node_modules/@openvulcan/vulcan-decision/runtime-packs/torch-cu128.json +647 -0
- package/package.json +53 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenVulcan
|
|
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.md
CHANGED
|
@@ -1,3 +1,87 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/openvulcan-logo-dark.svg">
|
|
5
|
+
<img src="docs/assets/openvulcan-logo-light.svg" alt="OpenVulcan" width="360">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
8
|
+
# dsh-vulcancode
|
|
9
|
+
|
|
10
|
+
**把 VulcanCode 的体验带进 DeepSeek Harness(dsh)**
|
|
11
|
+
|
|
12
|
+
[](LICENSE)
|
|
13
|
+
|
|
14
|
+
**简体中文** | [English](README.en.md)
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 关于项目
|
|
21
|
+
|
|
22
|
+
dsh-vulcancode 是 DeepSeek Harness(dsh)的一组社区插件,安装一个包即可得到 VulcanCode 的几项核心能力。
|
|
23
|
+
适配 dsh `0.2.1-rc.2` 及以上、`0.3.0` 以下:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
dsh plugin add @openvulcan/dsh-vulcancode
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
本项目与 DeepSeek 无关联,dsh 是 DeepSeek 的产品。
|
|
30
|
+
|
|
31
|
+
| 组成 | 作用 |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| OpenVulcan 账号 | 登录一次,套件内各插件共用;凭据保存在 dsh 的凭据存储中。设置位于「设置 › OpenVulcan 账号」 |
|
|
34
|
+
| 自动审批(Vulcan Decision) | 每次工具调用前由专用判定模型判断放行、需确认或拦下;未放行的可交复核 LLM,再询问你或拒绝 |
|
|
35
|
+
| 交互式回答 | 模型可以用 VulcanCode 的 `ui-*` 组件作答,在对话中渲染;启用后默认开启,可按会话关闭 |
|
|
36
|
+
| LuaSkills | 技能以工具形式提供给 AI,默认技能 codekit(代码导航);运行库约 190 MB,在「设置 › LuaSkills」中按需安装,装好即自动接入。侧栏的 LuaSkills 页面管理已装技能并连接 LuaSkills Hub |
|
|
37
|
+
| Vulcan 界面风格 | VulcanCode 的主题、直角与配色 |
|
|
38
|
+
| 长期记忆 | VulcanCode 的 Markdown 长期记忆:AI 用 `memory_outline`、`memory_search`、`memory_write` 维护用户画像、空间记忆与项目记忆,每次会话开始时注入一份快照。侧栏的「长期记忆」页面可编辑、调整注入预算,并导入导出 |
|
|
39
|
+
|
|
40
|
+
> **我们承诺:云端命令判定模型永久免费提供。**(2026 年 10 月 27 日)
|
|
41
|
+
|
|
42
|
+
## 使用
|
|
43
|
+
|
|
44
|
+
1. 安装后重启 dsh,打开「设置 › OpenVulcan 账号」,选择国际站或中国站登录。
|
|
45
|
+
2. 打开「设置 › 自动审批」,在权限选择器中选择“自动审查”,或把接入方式改为“独立开关”。不登录也可以改用本机
|
|
46
|
+
模型判定。
|
|
47
|
+
3. 需要 LuaSkills 时,打开「设置 › LuaSkills」点击安装运行库,进度显示在页面上,完成后技能工具自动出现。
|
|
48
|
+
4. 交互式回答、界面风格和长期记忆安装即生效,可在各自的设置或侧栏页面中调整。
|
|
49
|
+
|
|
50
|
+
## 自动审批的边界
|
|
51
|
+
|
|
52
|
+
- 它防的是 AI 执行命令时的**失误**,不防 AI **刻意绕过**(例如先写一个脚本再运行它)。
|
|
53
|
+
- 任何错误都不会被当作放行;无人值守的会话从不询问你,复核未放行即拒绝。
|
|
54
|
+
- 自动审批只降低事故概率,不保证拒绝一切风险;请同时使用沙箱、Git 与备份。
|
|
55
|
+
|
|
56
|
+
## 包结构
|
|
57
|
+
|
|
58
|
+
| 包 | 说明 |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| `@openvulcan/dsh-vulcancode` | 套件本体,dsh 安装的唯一入口,其余包都打包在内 |
|
|
61
|
+
| `@openvulcan/dsh-vulcan-account` | OpenVulcan 账号插件,向其他插件提供 `openvulcanAccount` 服务 |
|
|
62
|
+
| `@openvulcan/dsh-decision-guard` | 自动审批插件 |
|
|
63
|
+
| `@openvulcan/dsh-vulcan-answers` | 交互式回答插件 |
|
|
64
|
+
| `@openvulcan/dsh-vulcan-luaskills` | LuaSkills 插件:运行库安装、技能工具、VM 设置与 Hub |
|
|
65
|
+
| `@openvulcan/dsh-vulcan-style` | 界面风格插件 |
|
|
66
|
+
| `@openvulcan/dsh-vulcan-memory` | 长期记忆插件:记忆工具、会话快照注入、memory-curator 技能与记忆页面 |
|
|
67
|
+
| `@openvulcan/vulcan-decision` | 判定引擎与命令行 `vulcan-decision` |
|
|
68
|
+
| `@openvulcan/openvulcan-account` | OpenVulcan 账号库:登录、刷新与凭据存储接口 |
|
|
69
|
+
|
|
70
|
+
## 开发
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
pnpm install
|
|
74
|
+
pnpm run build
|
|
75
|
+
pnpm run test
|
|
76
|
+
pnpm run pack:dsh # 生成 dist/openvulcan-dsh-vulcancode-<版本>.tgz
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
本地安装打包结果:`dsh plugin add ./dist/openvulcan-dsh-vulcancode-<版本>.tgz`。
|
|
80
|
+
|
|
81
|
+
## 致谢
|
|
82
|
+
|
|
83
|
+
感谢 [LINUX DO](https://linux.do/) 社区的支持与交流。
|
|
84
|
+
|
|
85
|
+
## 许可
|
|
86
|
+
|
|
87
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" shape-rendering="geometricPrecision">
|
|
2
|
+
<rect x="0" y="0" width="1024" height="1024" rx="220" fill="#0B0D10"/>
|
|
3
|
+
<rect x="2" y="2" width="1020" height="1020" rx="218" fill="none" stroke="#FFFFFF" stroke-opacity="0.0784" stroke-width="2"/>
|
|
4
|
+
<rect x="6" y="6" width="1012" height="1012" rx="214" fill="none" stroke="#000000" stroke-opacity="0.0706" stroke-width="1"/>
|
|
5
|
+
<svg x="200.135" y="172.032" width="623.731" height="696.320" viewBox="32 29 232 259" preserveAspectRatio="xMidYMid meet">
|
|
6
|
+
<defs>
|
|
7
|
+
<linearGradient id="k2" x1="0%" y1="100%" x2="100%" y2="0%">
|
|
8
|
+
<stop offset="0%" stop-color="#FF6527"/>
|
|
9
|
+
<stop offset="100%" stop-color="#F44E1C"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
</defs>
|
|
12
|
+
<g id="vulcan-symbol">
|
|
13
|
+
<path d="M 2 0
|
|
14
|
+
L 84 0
|
|
15
|
+
C 88 0 91 1 95 5
|
|
16
|
+
L 153 76
|
|
17
|
+
C 159 83 159 95 153 102
|
|
18
|
+
L 95 173
|
|
19
|
+
C 91 177 88 178 84 178
|
|
20
|
+
L 2 178
|
|
21
|
+
L 78 89
|
|
22
|
+
Z" fill="#FFFFFF" transform="translate(30 110)"/>
|
|
23
|
+
<path d="M 73 0
|
|
24
|
+
C 64 14 51 28 38 40
|
|
25
|
+
C 21 55 7 68 2 87
|
|
26
|
+
C -2 107 8 129 25 150
|
|
27
|
+
C 39 134 53 119 67 107
|
|
28
|
+
C 82 95 91 79 93 60
|
|
29
|
+
C 95 40 86 18 73 0
|
|
30
|
+
Z" fill="url(#k2)" transform="translate(169 29)"/>
|
|
31
|
+
</g>
|
|
32
|
+
</svg>
|
|
33
|
+
</svg>
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
- insert:
|
|
2
|
+
- id: dsh-vulcancode
|
|
3
|
+
name: cordis:group
|
|
4
|
+
group: true
|
|
5
|
+
config:
|
|
6
|
+
- id: openvulcan-account
|
|
7
|
+
name: '@openvulcan/dsh-vulcan-account'
|
|
8
|
+
- id: vulcan-decision-guard
|
|
9
|
+
name: '@openvulcan/dsh-decision-guard'
|
|
10
|
+
- id: vulcan-style
|
|
11
|
+
name: '@openvulcan/dsh-vulcan-style'
|
|
12
|
+
- id: vulcan-answers
|
|
13
|
+
name: '@openvulcan/dsh-vulcan-answers'
|
|
14
|
+
- id: vulcan-luaskills
|
|
15
|
+
name: '@openvulcan/dsh-vulcan-luaskills'
|
|
16
|
+
- id: vulcan-memory
|
|
17
|
+
name: '@openvulcan/dsh-vulcan-memory'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenVulcan
|
|
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.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# @openvulcan/dsh-decision-guard
|
|
2
|
+
|
|
3
|
+
Vulcan Decision 自动审批插件,属于 [dsh-vulcancode](https://github.com/OpenVulcan/dsh-vulcancode) 套件,随套件
|
|
4
|
+
安装,不单独安装:
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
dsh plugin add @openvulcan/dsh-vulcancode
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
The Vulcan Decision auto approval plugin, part of the
|
|
11
|
+
[dsh-vulcancode](https://github.com/OpenVulcan/dsh-vulcancode) suite. It is installed with the suite, not on
|
|
12
|
+
its own.
|
|
13
|
+
|
|
14
|
+
License: MIT
|
|
Binary file
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translate dsh tool calls into what the decision model reads.
|
|
3
|
+
*
|
|
4
|
+
* The model was trained on a fixed set of tool shapes (`shell_command`, `write_file`, `edit_file`,
|
|
5
|
+
* `create_file`, `read_file`, ...). dsh's own tools are translated into those shapes using only
|
|
6
|
+
* facts the call carries; nothing is guessed. Other tools, including MCP tools, are passed with
|
|
7
|
+
* their own name and arguments.
|
|
8
|
+
*/
|
|
9
|
+
/** What to do with one call before the model sees it. */
|
|
10
|
+
export type Translation =
|
|
11
|
+
/** Judge the call with the model, rendered as this tool and arguments. */
|
|
12
|
+
{
|
|
13
|
+
readonly kind: 'judge';
|
|
14
|
+
readonly tool: string;
|
|
15
|
+
readonly arguments: Readonly<Record<string, unknown>>;
|
|
16
|
+
}
|
|
17
|
+
/** Run it without asking the model; see {@link AllowReason}. */
|
|
18
|
+
| {
|
|
19
|
+
readonly kind: 'allow';
|
|
20
|
+
readonly reason: AllowReason;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* - `internal`: a dsh tool whose only effect stays inside the harness (todos, goals, questions,
|
|
24
|
+
* agent messages, job and terminal reads).
|
|
25
|
+
* - `project-edit`: a file edit inside the project, which the model's release notes let hosts
|
|
26
|
+
* allow directly.
|
|
27
|
+
* - `project-read`: a read or search inside the project.
|
|
28
|
+
*/
|
|
29
|
+
export type AllowReason = 'internal' | 'project-edit' | 'project-read';
|
|
30
|
+
/**
|
|
31
|
+
* @param name - tool name as dsh reports it.
|
|
32
|
+
* @param args - tool arguments as dsh reports them.
|
|
33
|
+
* @param project - the session's working directory, when known.
|
|
34
|
+
*/
|
|
35
|
+
export declare function translateCall(name: string, args: unknown, project: string | undefined): Translation;
|
|
36
|
+
/**
|
|
37
|
+
* Whether `target` lies inside the project. A project at a filesystem root or the home directory
|
|
38
|
+
* covers too much to count, and repository metadata (`.git`, where hooks live) never counts.
|
|
39
|
+
*/
|
|
40
|
+
export declare function insideProject(project: string | undefined, target: string): boolean;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translate dsh tool calls into what the decision model reads.
|
|
3
|
+
*
|
|
4
|
+
* The model was trained on a fixed set of tool shapes (`shell_command`, `write_file`, `edit_file`,
|
|
5
|
+
* `create_file`, `read_file`, ...). dsh's own tools are translated into those shapes using only
|
|
6
|
+
* facts the call carries; nothing is guessed. Other tools, including MCP tools, are passed with
|
|
7
|
+
* their own name and arguments.
|
|
8
|
+
*/
|
|
9
|
+
import os from 'node:os';
|
|
10
|
+
import path from 'node:path';
|
|
11
|
+
import { INTENT_TOOL } from './decide.js';
|
|
12
|
+
/** dsh tools whose effects stay inside the harness; every other tool is judged. */
|
|
13
|
+
const INTERNAL_TOOLS = new Set([
|
|
14
|
+
'ask_user_question',
|
|
15
|
+
'cordis_inspect_list',
|
|
16
|
+
'cordis_inspect_query',
|
|
17
|
+
'create_goal',
|
|
18
|
+
// Vulcan Decision's own intent tool only records a statement for the reviewer.
|
|
19
|
+
INTENT_TOOL,
|
|
20
|
+
'get_goal',
|
|
21
|
+
'update_goal',
|
|
22
|
+
'job_list',
|
|
23
|
+
'job_output',
|
|
24
|
+
'list_agents',
|
|
25
|
+
'list_subagent_models',
|
|
26
|
+
'present',
|
|
27
|
+
'send_message',
|
|
28
|
+
'session_event_read',
|
|
29
|
+
'session_event_search',
|
|
30
|
+
'session_event_trace',
|
|
31
|
+
'session_search',
|
|
32
|
+
'session_trace',
|
|
33
|
+
'skill',
|
|
34
|
+
'team_task_create',
|
|
35
|
+
'team_task_get',
|
|
36
|
+
'team_task_list',
|
|
37
|
+
'team_task_update',
|
|
38
|
+
'terminal_list',
|
|
39
|
+
'terminal_read',
|
|
40
|
+
'todo_write',
|
|
41
|
+
'wait_agent',
|
|
42
|
+
'web_search',
|
|
43
|
+
'working_directory',
|
|
44
|
+
]);
|
|
45
|
+
/**
|
|
46
|
+
* @param name - tool name as dsh reports it.
|
|
47
|
+
* @param args - tool arguments as dsh reports them.
|
|
48
|
+
* @param project - the session's working directory, when known.
|
|
49
|
+
*/
|
|
50
|
+
export function translateCall(name, args, project) {
|
|
51
|
+
if (INTERNAL_TOOLS.has(name))
|
|
52
|
+
return { kind: 'allow', reason: 'internal' };
|
|
53
|
+
const record = isRecord(args) ? args : undefined;
|
|
54
|
+
if (record === undefined)
|
|
55
|
+
return { kind: 'judge', tool: name, arguments: { arguments: args } };
|
|
56
|
+
const text = (key) => typeof record[key] === 'string' ? record[key] : undefined;
|
|
57
|
+
switch (name) {
|
|
58
|
+
case 'bash':
|
|
59
|
+
case 'pwsh':
|
|
60
|
+
return shell(text('command'), text('workdir'), name === 'bash' ? 'bash' : 'powershell', project, name, record);
|
|
61
|
+
case 'terminal_send': {
|
|
62
|
+
// Text typed into a terminal session runs like a command in that terminal's shell.
|
|
63
|
+
const command = text('text');
|
|
64
|
+
return command === undefined ? passThrough(name, record) : judge('shell_command', { command });
|
|
65
|
+
}
|
|
66
|
+
case 'write':
|
|
67
|
+
return fileChange('write_file', text('file_path'), project, name, record);
|
|
68
|
+
case 'edit':
|
|
69
|
+
return fileChange('edit_file', text('file_path'), project, name, record);
|
|
70
|
+
case 'str_replace_editor': {
|
|
71
|
+
const command = text('command');
|
|
72
|
+
if (command === 'view')
|
|
73
|
+
return fileRead(text('path'), project, name, record);
|
|
74
|
+
if (command === 'create')
|
|
75
|
+
return fileChange('create_file', text('path'), project, name, record);
|
|
76
|
+
if (command === 'str_replace' || command === 'insert')
|
|
77
|
+
return fileChange('edit_file', text('path'), project, name, record);
|
|
78
|
+
return passThrough(name, record);
|
|
79
|
+
}
|
|
80
|
+
case 'read':
|
|
81
|
+
case 'read_image':
|
|
82
|
+
return fileRead(text('file_path'), project, name, record);
|
|
83
|
+
case 'glob':
|
|
84
|
+
case 'grep':
|
|
85
|
+
case 'lsp':
|
|
86
|
+
// Searches default to the session workspace.
|
|
87
|
+
return fileRead(text('path') ?? '.', project, name, record);
|
|
88
|
+
default:
|
|
89
|
+
return passThrough(name, record);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function shell(command, workdir, shellName, project, name, record) {
|
|
93
|
+
if (command === undefined)
|
|
94
|
+
return passThrough(name, record);
|
|
95
|
+
// A working directory is stated only when the call names one; a persistent shell's current
|
|
96
|
+
// directory is shell state the call does not carry.
|
|
97
|
+
const cwd = workdir === undefined ? undefined : resolveIn(project, workdir);
|
|
98
|
+
return judge('shell_command', { command, ...cwd === undefined ? {} : { cwd }, shell: shellName });
|
|
99
|
+
}
|
|
100
|
+
function fileChange(tool, file, project, name, record) {
|
|
101
|
+
if (file === undefined)
|
|
102
|
+
return passThrough(name, record);
|
|
103
|
+
if (insideProject(project, file))
|
|
104
|
+
return { kind: 'allow', reason: 'project-edit' };
|
|
105
|
+
// Only the target path is judged; file bodies are never sent to the model.
|
|
106
|
+
return judge(tool, { path: file });
|
|
107
|
+
}
|
|
108
|
+
function fileRead(file, project, name, record) {
|
|
109
|
+
if (file === undefined)
|
|
110
|
+
return passThrough(name, record);
|
|
111
|
+
if (insideProject(project, file))
|
|
112
|
+
return { kind: 'allow', reason: 'project-read' };
|
|
113
|
+
return judge('read_file', { path: file });
|
|
114
|
+
}
|
|
115
|
+
function judge(tool, args) {
|
|
116
|
+
return { kind: 'judge', tool, arguments: args };
|
|
117
|
+
}
|
|
118
|
+
function passThrough(name, record) {
|
|
119
|
+
return judge(name, record);
|
|
120
|
+
}
|
|
121
|
+
/** Absolute form of a path the tool resolves against the session workspace. */
|
|
122
|
+
function resolveIn(project, target) {
|
|
123
|
+
if (path.isAbsolute(target))
|
|
124
|
+
return target;
|
|
125
|
+
return project === undefined ? undefined : path.resolve(project, target);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Whether `target` lies inside the project. A project at a filesystem root or the home directory
|
|
129
|
+
* covers too much to count, and repository metadata (`.git`, where hooks live) never counts.
|
|
130
|
+
*/
|
|
131
|
+
export function insideProject(project, target) {
|
|
132
|
+
if (project === undefined || project === '')
|
|
133
|
+
return false;
|
|
134
|
+
const root = path.resolve(project);
|
|
135
|
+
if (path.parse(root).root === root || sameDir(root, os.homedir()))
|
|
136
|
+
return false;
|
|
137
|
+
const relative = path.relative(root, path.resolve(root, target));
|
|
138
|
+
if (relative === '')
|
|
139
|
+
return true;
|
|
140
|
+
const segments = relative.split(/[\\/]/);
|
|
141
|
+
if (segments[0] === '..' || path.isAbsolute(relative))
|
|
142
|
+
return false;
|
|
143
|
+
return !segments.some(segment => segment.toLowerCase() === '.git');
|
|
144
|
+
}
|
|
145
|
+
function sameDir(a, b) {
|
|
146
|
+
return path.relative(path.resolve(a), path.resolve(b)) === '';
|
|
147
|
+
}
|
|
148
|
+
function isRecord(value) {
|
|
149
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
150
|
+
}
|