@cannbot-plugin/cannbot-dsh-server 0.0.0-stage → 1.0.0-alpha.5
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/INSTALL.md +20 -0
- package/LICENSE +38 -0
- package/README.md +10 -2
- package/RELEASE.md +42 -0
- package/THIRD_PARTY_NOTICES.md +278 -0
- package/WORKFLOW_PUBLISHING.md +65 -0
- package/bin/initialize-workspace.mjs +13 -0
- package/cordis.patch.yml +19 -0
- package/docs/workbench.md +72 -0
- package/icon.svg +38 -0
- package/lib/client.js +17782 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +8210 -0
- package/lib/initialize-workspace.js +30 -0
- package/lib/workspace-mode-BUX9fB3R.js +1763 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/official-plugins.json +50 -0
- package/package.json +95 -4
- package/workflow-defaults.json +23 -0
package/INSTALL.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# 安装 CANNBot开发工作台
|
|
2
|
+
|
|
3
|
+
在 CANNBot 下载页的 **整包安装** 中选择对应平台。默认安装客户端版。
|
|
4
|
+
|
|
5
|
+
| 系统 | 安装 | 启动 |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Windows x64 | 双击 `CANNBot-Setup.exe`,阅读协议并按向导安装 | 从桌面快捷方式或开始菜单打开 |
|
|
8
|
+
| Linux x64 / arm64 | 在终端运行 `sh CANNBot-Setup.sh`,阅读协议并输入 `AGREE` | 运行 `~/.local/share/cannbot/bin/cannbot` |
|
|
9
|
+
| macOS Intel / Apple 芯片 | 双击 `CANNBot-Setup.pkg`,阅读并确认协议 | 从个人“应用程序”打开 CANNBot |
|
|
10
|
+
|
|
11
|
+
首次使用按界面提示配置模型账号。客户端可在 **服务器** 中建立 SSH 连接,使用与当前客户端匹配的服务器版。
|
|
12
|
+
|
|
13
|
+
**单独部署 Linux 服务器版**
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
sh CANNBot-Setup.sh --edition server
|
|
17
|
+
~/.local/share/cannbot/bin/cannbot-cannbot-server
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
默认安装到 `cannbot-server` profile。指定其他专用 profile 可加 `--profile <名称>`,启动命令以安装器输出为准。
|
package/LICENSE
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
CANN Open Software License Agreement Version 2.0
|
|
2
|
+
|
|
3
|
+
This CANN Open Software License Agreement Version 2.0 (hereinafter referred to as this "Agreement") is a legal agreement between you and Huawei, and it governs your use, modification, or distribution of CANN Open Software (hereinafter referred to as "Software"). Please read this Agreement carefully.
|
|
4
|
+
|
|
5
|
+
If you are entering into this Agreement on behalf of a company or other legal entity, you represent that you have the legal authority to bind that entity to this Agreement, in which case "you" will mean the entity you represent.
|
|
6
|
+
|
|
7
|
+
BY DOWNLOADING, INSTALLING, OR USING THE SOFTWARE, YOU AGREE YOU HAVE FULLY UNDERSTOOD AND ACCEPTED THE TERMS CONTAINED HEREIN. IF YOU DO NOT AGREE TO ANY OF THE TERMS OF THIS AGREEMENT, OR IF YOU DO NOT QUALIFY FOR AGREEING TO THIS AGREEMENT, YOU ARE NOT AUTHORIZED TO AND SHALL NOT DOWNLOAD, INSTALL, OR MAKE ANY USE OF THE SOFTWARE.
|
|
8
|
+
|
|
9
|
+
1. Definition
|
|
10
|
+
|
|
11
|
+
1.1 Software means the APIs, source code files, binaries, and related documents of Compute Architecture for Neural Networks("CANN") that are licensable by Huawei, and provided and licensed under this Agreement.
|
|
12
|
+
|
|
13
|
+
1.2 Huawei AI Processors mean AI chipsets (i) branded with "Ascend", "Kirin"," Yueying" or other brands owned or controlled by Huawei; or (ii) manufactured (including have manufactured), supplied (including have supplied) or designed (including have designed) by Huawei.
|
|
14
|
+
|
|
15
|
+
2. Grant of Intellectual Property Rights
|
|
16
|
+
2.1 Subject to the terms and conditions of this Agreement, including your full compliance thereof, Huawei hereby grants you a limited, worldwide, royalty-free, non-transferable, non-sublicensable, and revocable license for you to (i) download, use, modify, integrate, and distribute the Software or its derivative works for the purpose of developing software solely for use in systems with Huawei AI Processors and/or Software, and (ii) distribute any software developed based upon Software and/or its derivative works solely for use in systems with Huawei AI Processors and/or Software.
|
|
17
|
+
|
|
18
|
+
3. Restrictions
|
|
19
|
+
3.1 You are not authorized to, and shall not use, modify, or distribute this Software or its derivative works for any other purposes than those expressly permitted by this Agreement. You shall not make any use of the Software or its derivative works to develop or distribute any software for use in systems with processors other than Huawei AI Processors. All rights not expressly granted herein are expressly reserved by Huawei.
|
|
20
|
+
|
|
21
|
+
3.2 You are not authorized to, and shall not remove, obscure, or alter any copyright or other notices in this Software or any part of it.
|
|
22
|
+
|
|
23
|
+
3.3 Distribution Restrictions
|
|
24
|
+
You may distribute the Software or its derivative works in any medium, whether in source or executable forms, for the purpose stipulated in Section 2; provided that you provide recipients with a copy of this Agreement, and retain all notices in the Software.
|
|
25
|
+
|
|
26
|
+
4. Disclaimer of Warranty and Limitation of Liability
|
|
27
|
+
THE SOFTWARE IS PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL HUAWEI OR ANY OTHER COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE, IN WHOLE OR IN PART, NO MATTER HOW IT IS CAUSED OR THE LEGAL THEORY IT IS BASED ON, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
28
|
+
|
|
29
|
+
5. Termination
|
|
30
|
+
5.1 This Agreement will continue to apply until terminated by either you or Huawei as described below:
|
|
31
|
+
a.You may terminate this Agreement by ceasing your use of the Software;
|
|
32
|
+
b. Huawei may at any time, terminate this Agreement if: (i) you fail to comply with any term of this Agreement; or (ii) you directly or indirectly initiate any legal proceeding against any individual or entity by alleging that the Software or any part of it infringes your intellectual property rights.
|
|
33
|
+
5.2 By termination, all the rights granted to you under this Agreement are terminated, and you shall cease to use and delete this Software or any derivative works immediately. All rights granted to you under this Agreement shall hereby be void ab initio in the event of termination in accordance with Section 5.1. b above. Huawei reserves the right to pursue any and all legal remedies available to enforce the terms and conditions of this Agreement or to protect Huawei’s intellectual property rights for such breach or violation. All provisions shall survive the termination of this Agreement except for Section 2 and Section 3.3.
|
|
34
|
+
|
|
35
|
+
6. MISCELLANEOUS
|
|
36
|
+
If the application of any provision of this Agreement to any particular facts or circumstances is held to be invalid or unenforceable by a court of competent jurisdiction, then (a) the validity and enforceability of such provision as applied to any other particular facts or circumstances and the validity of other provisions of this Agreement shall not in any way be affected or impaired thereby and (b) such provision shall be enforced to the maximum extent possible so as to affect the intent of the you and Huawei and reformed without further action by you and Huawei to the extent necessary to make such provision valid and enforceable.
|
|
37
|
+
|
|
38
|
+
END OF THE TERMS AND CONDITIONS
|
package/README.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CANNBot 开发工作台
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
面向昇腾算子开发,提供工作流工作区、交互式初始化和会话管理。[安装指南](INSTALL.md) · [工作台用法](docs/workbench.md)
|
|
4
|
+
|
|
5
|
+
| 使用环境 | 创建本机工作流 | SSH 连接 Linux 服务器 | 返回原生工作台 |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| Windows、macOS 客户端 | 可创建空白工作区 | 支持 | 支持 |
|
|
8
|
+
| Linux 客户端 | 支持 | 支持 | 支持 |
|
|
9
|
+
| Linux 服务器版 | 支持 | — | — |
|
|
10
|
+
|
|
11
|
+
三端安装入口默认安装客户端。客户端连接远端时部署配套的 Linux 服务器版,在当前 DSH 窗口中打开。管理员也可以提前安装服务器版。专用界面仅在安装了服务器版的 DSH profile 中生效。工作流按工作区实际所在的操作系统开放。
|
package/RELEASE.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# 发行 CANNBot 开发工作台
|
|
2
|
+
|
|
3
|
+
## 下载入口
|
|
4
|
+
|
|
5
|
+
在 GitCode 发行版上传 Windows、Linux 和 macOS 安装包,社区主页「整包安装」链接到对应附件。三个安装包共用 `master` 分支的 [发布清单](https://api.gitcode.com/api/v5/repos/cann/cannbot/raw/dsh/release/manifest.json?ref=master)。Windows 缺少 DeepSeek Harness 时从官方地址下载安装。
|
|
6
|
+
|
|
7
|
+
## 协议与声明
|
|
8
|
+
|
|
9
|
+
在 `master` 中替换以下 UTF-8 文本,安装器下次打开时会读取新正文。社区下载页也应提供这三个文件及软件来源说明。
|
|
10
|
+
|
|
11
|
+
| 安装器显示 | 替换文件 |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| 用户协议 | [user-agreement.txt](legal/user-agreement.txt) |
|
|
14
|
+
| 隐私政策 | [privacy-policy.txt](legal/privacy-policy.txt) |
|
|
15
|
+
| 开源软件声明 | [open-source-notices.txt](legal/open-source-notices.txt) |
|
|
16
|
+
|
|
17
|
+
首次公开下载前填入正式协议和隐私政策。开源软件声明中保留 CANN-2.0 和随包第三方软件的完整许可文本。
|
|
18
|
+
|
|
19
|
+
## 构建安装器
|
|
20
|
+
|
|
21
|
+
从本目录运行。Windows EXE 在 Windows 构建,macOS PKG 在 macOS 构建。安装器输出到 `dist/`。
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
npm run package:windows
|
|
25
|
+
npm run package:linux
|
|
26
|
+
npm run package:macos
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
三个交付文件分别是 `CANNBot-Setup.exe`、`CANNBot-Setup.sh` 和 `CANNBot-Setup.pkg`。
|
|
30
|
+
|
|
31
|
+
## 更新插件
|
|
32
|
+
|
|
33
|
+
1. 同步更新 `package.json`、`packages/short/package.json`、`packages/short-server/package.json` 的版本,以及两个短包对插件本体的精确版本依赖。
|
|
34
|
+
2. 运行 `npm run pack:plugin`、`node tools/package.mjs --short` 和 `node tools/package.mjs --short-server`。在 `dist/` 中取本次生成的四个归档。
|
|
35
|
+
3. 用 `npm publish <归档路径> --access public --tag next` 先发布两个 `@cannbot-plugin/` 插件本体,再发布 `cannbot-dsh` 和 `cannbot-dsh-server` 短包。
|
|
36
|
+
4. 确认四个固定版本均可下载后,运行 `npm run release:feed`。将生成的 `release/manifest.json` 通过 PR 合入 `master`,现有安装器就会从 npm 下载指定版本。安装验证完成后可单独切换 npm 的 `latest` 标签。
|
|
37
|
+
|
|
38
|
+
客户端在用户点击更新后安装。下次连接 SSH 时,使用当前客户端自带的 Linux 服务器版。兼容的历史 npm 包入口仍可单独使用。
|
|
39
|
+
|
|
40
|
+
## 品牌与许可证
|
|
41
|
+
|
|
42
|
+
CANNBot 使用自有标识。客户端的返回入口使用通用左箭头和“返回原生工作台”。软件来源、版本要求和条款可使用 DSH 名称。保留仓库原有 CANN-2.0 许可证和完整第三方声明。
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
CANNBot DSH contains the DSH adapter and installation code. Official workflow
|
|
4
|
+
resources are copied from the selected CANNBot source and its declared shared
|
|
5
|
+
Skills during source installation or workflow-package construction. This source
|
|
6
|
+
tree does not retain copies of those resources.
|
|
7
|
+
Each generated workflow package retains its CANN Open Software License Agreement
|
|
8
|
+
Version 2.0 and shared Skill license in resources/LICENSE and SKILLS_LICENSE.
|
|
9
|
+
Its workflow.json records the actual source revisions and content hashes.
|
|
10
|
+
Local uncommitted changes are included; revision identifiers alone do not identify
|
|
11
|
+
those changes. Published npm installations obtain resources from workflow packages.
|
|
12
|
+
|
|
13
|
+
Source-declared symlinks are materialized for portable installation. The upstream
|
|
14
|
+
bundler's model-invocation normalization is retained unless the plugin declares
|
|
15
|
+
preserveSkillInvocationPolicy. DSH entry Skill adapters are added for official
|
|
16
|
+
plugins whose primary instructions are AGENTS.md rather than a same-named Skill.
|
|
17
|
+
The original instructions, agents, scripts, hooks and templates are retained.
|
|
18
|
+
|
|
19
|
+
CANNBot's application code remains under the repository's CANN Open Software
|
|
20
|
+
License Agreement Version 2.0. The repository-root LICENSE is copied unchanged
|
|
21
|
+
into the main package and the single-file Windows installer. The component
|
|
22
|
+
notices below supplement it; they do not replace the repository license.
|
|
23
|
+
CANNBot's plugin and installer use the CANNBot logo from this repository.
|
|
24
|
+
|
|
25
|
+
## Code included in the current release
|
|
26
|
+
|
|
27
|
+
| Component | Included code | License |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| NSIS 3.0.4.1 (electron-builder distribution) | Windows installer stub, Modern UI 2, nsDialogs, nsExec, System and zlib decompressor | zlib/libpng |
|
|
30
|
+
| @xterm/xterm 6.0.0 | Embedded initialization terminal in lib/client.js | MIT |
|
|
31
|
+
| yaml 2.9.1 | YAML parser/stringifier in lib/index.js | ISC |
|
|
32
|
+
| Rolldown 1.2.19 | Generated runtime helpers in lib/index.js | MIT; inherited upstream notices retained below |
|
|
33
|
+
| @oxc-project/runtime 0.156.0 | Generated usingCtx disposal helper in lib/index.js | MIT |
|
|
34
|
+
| DSH client build preset | Generated module-loader wrapper and CSS injection glue in lib/client.js | MIT |
|
|
35
|
+
| @cannbot-plugin/cannbot-dsh-install 1.0.0 | packages/install/lib/file-lock.mjs in lib/index.js | Existing component MIT license |
|
|
36
|
+
|
|
37
|
+
The client source map contains CANNBot sources, assets and xterm.js, not bundled React,
|
|
38
|
+
React DOM or DSH UI implementations. Those frameworks, Cordis, Schemastery,
|
|
39
|
+
pacote and workflow catalog/packages are separately installed dependencies and
|
|
40
|
+
retain their own licenses. The Windows EXE uses NSIS Modern UI 2, its standard
|
|
41
|
+
nsDialogs, nsExec and System plug-ins, and the zlib compression module.
|
|
42
|
+
The EXE includes CANNBot's installer scripts, logo and notices. At installation
|
|
43
|
+
time it downloads the CANNBot client package from the release feed. It obtains
|
|
44
|
+
the DSH desktop installer from its official source when needed. Generated
|
|
45
|
+
workflow packages retain their own resource notices
|
|
46
|
+
as described above. Audit after dependency or build-preset changes.
|
|
47
|
+
|
|
48
|
+
## yaml 2.9.1 — ISC
|
|
49
|
+
|
|
50
|
+
Source: https://github.com/eemeli/yaml/tree/v2.9.1
|
|
51
|
+
License: https://raw.githubusercontent.com/eemeli/yaml/v2.9.1/LICENSE
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
Copyright Eemeli Aro <eemeli@gmail.com>
|
|
55
|
+
|
|
56
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
57
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
58
|
+
and this permission notice appear in all copies.
|
|
59
|
+
|
|
60
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
61
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
62
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
63
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
64
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
65
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
66
|
+
THIS SOFTWARE.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Rolldown 1.2.19 — MIT
|
|
70
|
+
|
|
71
|
+
Source: https://github.com/rolldown/rolldown/tree/v1.2.19
|
|
72
|
+
The generated runtime helpers are included, not the compiler itself. The
|
|
73
|
+
compiler's accompanying inherited notices are reproduced without alteration.
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
MIT License
|
|
77
|
+
|
|
78
|
+
Copyright (c) 2024-present VoidZero Inc. & Contributors
|
|
79
|
+
|
|
80
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
81
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
82
|
+
in the Software without restriction, including without limitation the rights
|
|
83
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
84
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
85
|
+
furnished to do so, subject to the following conditions:
|
|
86
|
+
|
|
87
|
+
The above copyright notice and this permission notice shall be included in all
|
|
88
|
+
copies or substantial portions of the Software.
|
|
89
|
+
|
|
90
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
91
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
92
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
93
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
94
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
95
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
96
|
+
SOFTWARE.
|
|
97
|
+
|
|
98
|
+
end of terms and conditions
|
|
99
|
+
|
|
100
|
+
The licenses of externally maintained libraries from which parts of the Software is derived are listed [here](https://github.com/rolldown/rolldown/blob/main/THIRD-PARTY-LICENSE).
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Rolldown upstream third-party notices
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
The MIT License (MIT)
|
|
107
|
+
|
|
108
|
+
Copyright (c) 2017 [these people](https://github.com/rollup/rollup/graphs/contributors)
|
|
109
|
+
|
|
110
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
111
|
+
|
|
112
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
113
|
+
|
|
114
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
MIT License
|
|
119
|
+
|
|
120
|
+
Copyright (c) 2020 Evan Wallace
|
|
121
|
+
|
|
122
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
123
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
124
|
+
in the Software without restriction, including without limitation the rights
|
|
125
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
126
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
127
|
+
furnished to do so, subject to the following conditions:
|
|
128
|
+
|
|
129
|
+
The above copyright notice and this permission notice shall be included in all
|
|
130
|
+
copies or substantial portions of the Software.
|
|
131
|
+
|
|
132
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
133
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
134
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
135
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
136
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
137
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
138
|
+
SOFTWARE.
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## DSH client build preset — MIT
|
|
142
|
+
|
|
143
|
+
Only the emitted module registration and style-injection glue is covered here;
|
|
144
|
+
the DSH application and UI modules remain host-provided. License text from the
|
|
145
|
+
official build-source checkout used by this release:
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
MIT License
|
|
149
|
+
|
|
150
|
+
Copyright (c) 2026 DeepSeek
|
|
151
|
+
|
|
152
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
153
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
154
|
+
in the Software without restriction, including without limitation the rights
|
|
155
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
156
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
157
|
+
furnished to do so, subject to the following conditions:
|
|
158
|
+
|
|
159
|
+
The above copyright notice and this permission notice shall be included in all
|
|
160
|
+
copies or substantial portions of the Software.
|
|
161
|
+
|
|
162
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
163
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
164
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
165
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
166
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
167
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
168
|
+
SOFTWARE.
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## CANNBot installer file-lock helper — MIT
|
|
172
|
+
|
|
173
|
+
The pre-existing installer subpackage has its own license. Its file-lock helper
|
|
174
|
+
is included in the main bundle; this notice preserves that component's terms.
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
MIT License
|
|
178
|
+
|
|
179
|
+
Copyright (c) 2026 CANNBot contributors
|
|
180
|
+
|
|
181
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
182
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
183
|
+
in the Software without restriction, including without limitation the rights
|
|
184
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
185
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
186
|
+
furnished to do so, subject to the following conditions:
|
|
187
|
+
|
|
188
|
+
The above copyright notice and this permission notice shall be included in all
|
|
189
|
+
copies or substantial portions of the Software.
|
|
190
|
+
|
|
191
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
192
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
193
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
194
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
195
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
196
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
197
|
+
SOFTWARE.
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## @oxc-project/runtime 0.156.0 — MIT
|
|
201
|
+
|
|
202
|
+
Source: https://www.npmjs.com/package/@oxc-project/runtime/v/0.156.0
|
|
203
|
+
Only the generated usingCtx helper is present in the host bundle. The complete
|
|
204
|
+
license below is taken from the versioned npm package.
|
|
205
|
+
|
|
206
|
+
```text
|
|
207
|
+
MIT License
|
|
208
|
+
|
|
209
|
+
Copyright (c) 2024-present VoidZero Inc. & Contributors
|
|
210
|
+
Copyright (c) 2023 Boshen
|
|
211
|
+
|
|
212
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
213
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
214
|
+
in the Software without restriction, including without limitation the rights
|
|
215
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
216
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
217
|
+
furnished to do so, subject to the following conditions:
|
|
218
|
+
|
|
219
|
+
The above copyright notice and this permission notice shall be included in all
|
|
220
|
+
copies or substantial portions of the Software.
|
|
221
|
+
|
|
222
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
223
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
224
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
225
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
226
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
227
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
228
|
+
SOFTWARE.
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## @xterm/xterm 6.0.0 — MIT
|
|
232
|
+
|
|
233
|
+
Source: https://github.com/xtermjs/xterm.js/tree/6.0.0
|
|
234
|
+
|
|
235
|
+
```text
|
|
236
|
+
Copyright (c) 2017-2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)
|
|
237
|
+
Copyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com)
|
|
238
|
+
Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/)
|
|
239
|
+
|
|
240
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
241
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
242
|
+
in the Software without restriction, including without limitation the rights
|
|
243
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
244
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
245
|
+
furnished to do so, subject to the following conditions:
|
|
246
|
+
|
|
247
|
+
The above copyright notice and this permission notice shall be included in
|
|
248
|
+
all copies or substantial portions of the Software.
|
|
249
|
+
|
|
250
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
251
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
252
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
253
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
254
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
255
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
256
|
+
THE SOFTWARE.
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## NSIS 3.0.4.1 — zlib/libpng
|
|
260
|
+
|
|
261
|
+
Source: https://github.com/electron-userland/electron-builder-binaries/releases/tag/nsis-3.0.4.1
|
|
262
|
+
|
|
263
|
+
Only the zlib compression module is used in the installer. The build tools
|
|
264
|
+
are not distributed in the EXE.
|
|
265
|
+
|
|
266
|
+
```text
|
|
267
|
+
Copyright (C) 1999-2018 Contributors
|
|
268
|
+
|
|
269
|
+
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
|
|
270
|
+
|
|
271
|
+
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
|
272
|
+
|
|
273
|
+
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
|
274
|
+
|
|
275
|
+
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
|
276
|
+
|
|
277
|
+
3. This notice may not be removed or altered from any source distribution.
|
|
278
|
+
```
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# 独立工作流包的构建与发布
|
|
2
|
+
|
|
3
|
+
主程序:`cannbot-dsh` / `@cannbot-plugin/cannbot-dsh`。
|
|
4
|
+
工作流目录:`@cannbot-plugin/workflow-catalog`。
|
|
5
|
+
内容包:`@cannbot-plugin/workflow-<工作流 ID>`,各包独立版本。
|
|
6
|
+
|
|
7
|
+
## 更新已有工作流
|
|
8
|
+
|
|
9
|
+
先在 CANNBot 源码仓修改内容,准备该源码仓声明的共享 Skills。构建器每次直接读取指定工作区(包含未提交修改),在系统临时目录装配,不维护 `dsh/assets` 副本。正式发布前应提交源码以便追溯。只构建目标工作流:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
node tools/build-workflow-packages.mjs --source /path/to/cannbot --id ops-direct-invoke --version 1.0.1
|
|
13
|
+
npm publish dist/workflow-releases/cannbot-plugin-workflow-ops-direct-invoke-1.0.1.tgz --access public
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
使用 npm 公共仓库和 `latest` 标签。无需改主程序版本,也无需更新目录包。用户可检查并更新这一项,或更新全部未固定的工作流。发布者先在隔离工作区运行包中的初始化器验证后再发布。
|
|
17
|
+
|
|
18
|
+
## 新增工作流
|
|
19
|
+
|
|
20
|
+
工作流目录、清单与 Skill 需符合现有 CANNBot 结构。先将新工作流加入主插件的 `workflow-defaults.json`;构建器和运行时都以该文件作为允许的工作流集合,仅发布目录包不能让旧主插件发现未声明的工作流。准备好资源及默认集合后,构建新内容包和新版本目录包:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
node tools/build-workflow-packages.mjs --source /path/to/cannbot --id new-workflow --version 1.0.0 --catalog true --catalog-version 1.0.5
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
该命令会分别产生新工作流包和目录包;目录版本应高于当前已发布版本。按“内容包、目录包、主插件”的顺序发布,主插件必须包含更新后的 `workflow-defaults.json`,并将目录依赖的最低版本设为包含新增项的版本。同步更新短包对主插件的精确依赖。用户升级主插件后才能发现新增工作流。
|
|
27
|
+
|
|
28
|
+
## 包格式 v1
|
|
29
|
+
|
|
30
|
+
根 `package.json` 声明 `cannbotWorkflow: { "schemaVersion": 1, "id": "..." }`,不声明 npm 安装脚本或额外 npm 依赖。
|
|
31
|
+
`workflow.json` 记录版本、原始源码提交、资源路径、Skill 内容散列与初始化入口;`resources/` 包含物化后的 Skills、agents、模板、脚本和许可证。
|
|
32
|
+
构建器沿用上游 npm 装配方式,将源码专用的 `plugin-sources.json` 转换为包内资源清单。
|
|
33
|
+
|
|
34
|
+
带统一安装器的包保留上游 `script/bin/cannbot.js` 和 `script/lib` 代码,Host 显式调用:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
node <工作流包>/upstream/bin/cannbot.js install <ID> --tool dsh --target <工作目录> --plugin-dir <工作流包>/resources
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
这里使用上游安装器支持的包模式;不需要额外克隆 CANNBot 主仓或共享 Skills 仓。
|
|
41
|
+
初始化声明的外部依赖仍按上游 `plugin-install.json` 准备,因此某些工作流首次初始化仍需要 Git、网络及其运行环境。
|
|
42
|
+
没有统一安装器清单的 `ops-registry-invoke` 保持 Skill 原生自检行为,不伪造 `init.sh`。
|
|
43
|
+
|
|
44
|
+
## 用户侧的版本与回退
|
|
45
|
+
|
|
46
|
+
工作流安装在 `$DSH_HOME/cannbot-dsh-workflows`,与 npm 主程序目录分离。
|
|
47
|
+
下载由 npm 官方 `pacote` 库处理并校验 registry 提供的 SHA-512 完整性;不运行 npm 生命周期脚本。
|
|
48
|
+
新包通过校验后才原子切换该工作流,旧版本目录保留。回退后固定版本,自动同步及“更新全部”不会将它升回去;主动更新这一项即可恢复跟随最新版。
|
|
49
|
+
工作区初始化按“工作区、工作流包版本及完整性”记录,更新无关工作流不会重复初始化当前工作流。
|
|
50
|
+
|
|
51
|
+
已有工作流的内容更新可独立发布;主插件界面、加载机制、包格式协议或 `workflow-defaults.json` 中的允许集合发生变化时,需要发布新的 CANNBot DSH 主插件。
|
|
52
|
+
|
|
53
|
+
## 首次安装依赖
|
|
54
|
+
|
|
55
|
+
目录包的 `dependencies` 声明全部默认工作流,版本使用 `>=1.0.0`,让新用户在 DSH 标准 npm 安装阶段一次获取当时可解析的最新稳定包,并排除历史占位版本。当前主插件依赖目录包 `^1.0.4`。发布目录包前必须确保所有工作流已公开;新增默认工作流需同时更新主插件的 `workflow-defaults.json`、目录及其 `dependencies`,并发布包含这些变化的新主插件。已有工作流发布新版本仍不必重发目录包或主插件。
|
|
56
|
+
|
|
57
|
+
启用时仅从 npm 已安装的依赖准备本地缓存,等待全部完成后才注册工作流能力,不运行 npm 安装脚本,不覆盖缓存内独立升级或固定回退的版本。新版本下载由用户在工作流管理中明确触发。项目级外部依赖依然在选择工作流时按需初始化,不能在未选择项目时提前运行。
|
|
58
|
+
|
|
59
|
+
## 发布主程序
|
|
60
|
+
|
|
61
|
+
客户端、服务器版和各自的 npm 短包按[插件发行步骤](RELEASE.md#更新插件)发布。
|
|
62
|
+
|
|
63
|
+
## 无需发布的源码安装
|
|
64
|
+
|
|
65
|
+
在 `dsh/` 执行 `npm run install:source`,安装器会实时复制父仓库源码到 DSH 工作流缓存。它使用与发布相同的装配、许可证保留和校验逻辑,但跳过工作流 npm 打包与发布。重新安装以内容散列刷新缓存,无需修改版本号。`--repository <GitURL>` 会在本次安装中获取远端源码。
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Copyright (c) 2026 Huawei Technologies Co., Ltd.
|
|
3
|
+
// This program is free software, you can redistribute it and/or modify it under the terms and conditions of
|
|
4
|
+
// CANN Open Software License Agreement Version 2.0 (the "License").
|
|
5
|
+
// Please refer to the License for details. You may not use this file except in compliance with the License.
|
|
6
|
+
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
|
|
7
|
+
// INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
8
|
+
// See LICENSE in the root of the software repository for the full text of the License.
|
|
9
|
+
|
|
10
|
+
import { initializeBeforeLaunch } from '../lib/initialize-workspace.js'
|
|
11
|
+
const [directory, workflow, ...extra] = process.argv.slice(2)
|
|
12
|
+
if (!directory || !workflow || extra.length) throw new Error('Usage: initialize-workspace.mjs <new-empty-directory> <workflow-id>')
|
|
13
|
+
await initializeBeforeLaunch(directory, workflow)
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
- insert:
|
|
2
|
+
- id: cannbot-dsh
|
|
3
|
+
name: '@cannbot-plugin/cannbot-dsh-server'
|
|
4
|
+
- id: ui-settings-account
|
|
5
|
+
config:
|
|
6
|
+
version: 1
|
|
7
|
+
step: done
|
|
8
|
+
purpose: development
|
|
9
|
+
process: detailed
|
|
10
|
+
completion: completed
|
|
11
|
+
usage: detailed
|
|
12
|
+
developerTools: true
|
|
13
|
+
- id: ui-chat
|
|
14
|
+
config:
|
|
15
|
+
transcriptView: detailed
|
|
16
|
+
performanceUsage: detailed
|
|
17
|
+
- id: ui-settings
|
|
18
|
+
config:
|
|
19
|
+
enabled: true
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# 使用工作台
|
|
2
|
+
|
|
3
|
+
客户端首次安装默认进入 CANNBot,之后记住用户选择的模式。原生工作台侧栏的“插件 / 自动化任务 / 更多”列表上方提供 **CANNBot** 入口,使用 CANNBot 图标。CANNBot 模式顶部显示 CANNBot 品牌;同一入口位置显示通用左箭头和 **返回原生工作台**,点击后恢复宿主原有界面。DeepSeek Harness 使用原生项目 / 最近列表,可显示当前 DSH 的全部会话,包括从 CANNBot 启动的会话;CANNBot 侧只显示自己的工作区和从 CANNBot 启动并登记的会话。普通历史会话不会仅因目录相同而进入 CANNBot 列表。切换模式时分别保留导航位置,切换工作区时保留尚未发送的需求和附件。
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness 的侧栏列表、工作区下拉、主页、主会话区和底部工具栏均使用 DSH 原有界面;搜索、添加工作区和原生快捷键继续由 DSH 处理。模式往返切换保留原生列表的搜索和展开状态。CANNBot 侧栏以工作区为单位展示会话,远程工作区的文件夹右下角显示地球标记,不另加搜索框。
|
|
6
|
+
|
|
7
|
+
在 CANNBot 中点击“工作区”右侧的添加图标,依次选择工作流、服务器、父目录,再填写工作区名。只能新建文件夹,不能添加已有目录。工作流默认留空,必须手动选择。Windows 和 macOS 客户端选择三种工作流时会禁用本机并清空已有本机选择。Linux 本机和远端 Linux 工作区均可选四种类型。工作流选项按“工作流 ID:用途描述”显示:`ops-direct-invoke`、`ops-direct-invoke-flash`、`ops-registry-invoke`。空白工作区不预装工作流,供手动配置昇腾项目,列表仅显示工作区名;其他工作区显示“工作流 ID: 工作区名”。一个物理目录只能绑定一种类型。初始化失败可在同一创建窗口中重试。
|
|
8
|
+
|
|
9
|
+
DSH 原生列表可查看普通会话和 CANNBot 会话,CANNBot 列表只显示明确登记的记录。已有目录不会通过创建窗口转换为 CANNBot 工作区。
|
|
10
|
+
|
|
11
|
+
父目录支持下拉浏览、路径输入和 Tab 补全;点击确认或下拉框外部收起列表。创建成功后自动进入新工作区的对话。工作流工作区会询问是否授予当前对话完全权限,用户同意后生效。选择未连接服务器时先确认,再显示固定大小的连接安装日志窗口,顶部可取消连接。首次安装预设“代码与开发”和“完整过程”,跳过模式引导;已有用户设置保留。
|
|
12
|
+
|
|
13
|
+
本机和已连接服务器的工作区、会话行按 DSH 原生布局显示操作:工作区右侧依次是 **⋯、新会话**;已有会话悬停时依次显示 **⋯、归档、置顶**,平时显示更新时间和置顶标记。工作区可重命名或删除;删除只移除工作区登记,保留磁盘文件与历史会话,没有现存工作区的会话不再显示在 CANNBot 列表中。会话菜单支持重命名、置顶 / 取消置顶、分叉、归档和复制 Session ID;置顶项优先显示。顶部 **视图选项** 可选择隐藏、显示或仅显示已归档会话。仍有任务运行时,归档会先要求确认停止任务。
|
|
14
|
+
|
|
15
|
+
启动页标题为“现在,交给CANNBot”,品牌标识不附加 Preview 标签。首页复用 DSH 原生会话输入组件和布局,保留访问权限、模型、推理等级、文件与指令等控件。通过工作区下拉框选择已有工作区,页面只读显示该工作区绑定的工作流;工作流可在创建时选择,也可在工作区菜单中切换;切换成功后旧会话永久冻结,只可查看。工作流示例作为原生输入框的占位提示显示,不添加“例如”前缀,不作为消息自动发送。准备失败会保留需求和文件,可查看原因后重试;发送后进入 DSH 原生会话。工作流更新、回退及日志仍在“插件 → CANNBot DSH”中管理。工作流依赖按所选目录准备,首次初始化可能需要网络、Git、Python 或 Ascend 环境。
|
|
16
|
+
|
|
17
|
+
CANNBot 侧栏的“自动化任务 / 更多”下方提供“服务器”入口,打开后可新增、连接、断开、改备注、拖动排序和删除服务器。服务器行右侧的添加工作区按钮会预选该服务器。已连接服务器的工作区直接显示在左侧工作区列表中。远端内容在 DSH 内嵌打开,点击本机工作区即可切回本机,SSH 隧道继续保留。
|
|
18
|
+
|
|
19
|
+
服务器行的 **⋯ → 编辑备注** 可修改显示名称,未连接时也可使用;清空备注后恢复显示 SSH 别名。备注持久保存在服务器清单,不修改 SSH 连接配置,也不会触发连接。
|
|
20
|
+
|
|
21
|
+
点击“插件”上方的 **返回原生工作台** 恢复宿主原有界面,工作流能力与数据仍保留。较旧 DSH 缺少对应公共接口时,不启用依赖这些接口的新工作台能力。
|
|
22
|
+
|
|
23
|
+
主程序与工作流包分开发布:主程序负责品牌界面、动态菜单和包管理;每个工作流自己的 npm 包包含 Skills、agents、模板、脚本及初始化入口。更新某个工作流不必更新主程序。
|
|
24
|
+
## 在 DSH 中连接 Linux 服务器
|
|
25
|
+
|
|
26
|
+
在 Linux Web 客户端,通过本机回环地址打开工作台,并使用支持分区 Cookie 的浏览器。远端页面在工作台内打开,每个连接使用独立的认证状态。
|
|
27
|
+
|
|
28
|
+
按住服务器行拖动可排序;“⋯ → 删除服务器”移除本机列表记录并断开连接,保留远端文件和会话。本机工作区在工作区列表中显示,不参与服务器排序。
|
|
29
|
+
|
|
30
|
+
1. 配置本机 OpenSSH,使用已有服务器别名或 SSH 命令连接,支持端口和跳板设置。支持密钥与密码认证;需要密码时在 DSH 内输入,仅供本次连接使用,不保存。首次主机指纹确认仍需先在终端执行 `ssh <服务器>`。
|
|
31
|
+
2. 在 CANNBot 侧栏点击“服务器”,再点击管理页右上角“+”,输入 SSH 命令或已有配置别名,并保存连接;也可直接点击已有服务器的连接图标。默认读取本机 `~/.ssh/config`,共享清单保存在 `$DSH_HOME/cannbot-remote/servers.json`。
|
|
32
|
+
3. 首次连接会准备远端 Node.js / DSH、上传客户端携带的 Linux 服务器版并安装所需工作流依赖,然后建立本机 SSH 隧道。远端服务只监听 `127.0.0.1`。源码内容变化即使版本号相同也会同步,不能仅凭旧 npm 包版本相同跳过更新。
|
|
33
|
+
4. 连接成功后,在侧栏直接展开工作区选择会话。首次读取工作区时显示加载状态,并在 30 秒内自动重试暂时失败的读取;持续失败才显示错误和重试入口。服务器行右侧的添加图标打开统一创建窗口,并预选该服务器。页面始终内嵌于 DSH,可通过本机工作区或模式入口切换页面,隧道保持连接。
|
|
34
|
+
5. 鼠标移到服务器行时显示连接图标;已连接时点击同一图标即可断开 SSH 隧道。断开正在查看的服务器会返回本地,远端 DSH 服务和后台任务继续运行;断开其他服务器不切换当前页面。
|
|
35
|
+
|
|
36
|
+
服务器账号同步默认关闭,用户可在连接前对该服务器明确授权。本机存在受支持的 DeepSeek 平台账号登录时,通过 SSH 同步到远端;已有远端登录会保留,不覆盖。API Key 和其他账号凭据不在这项同步范围内。同步不可用或失败会显示状态,连接可继续,随后可在内嵌远端页面登录。
|
|
37
|
+
|
|
38
|
+
SSH 连接会选择与客户端构建标识匹配的服务器版。不同构建使用独立的 DSH profile 和服务端口;切换客户端版本后再次连接,既有远端进程可继续处理原有任务。
|
|
39
|
+
|
|
40
|
+
## 独立更新工作流
|
|
41
|
+
|
|
42
|
+
插件详情页的 **工作流管理** 为每个工作流显示包名、已安装版本和最新版本,可逐项安装、更新、回退,也可 **更新全部工作流**。
|
|
43
|
+
程序启用时加载已经安装的工作流;下载新版本通过详情页明确触发。回退后固定该版本,批量更新不会将它升回去;主动更新这一项即可恢复跟随最新版。
|
|
44
|
+
|
|
45
|
+
目录包是 `@cannbot-plugin/workflow-catalog`;工作流包统一为 `@cannbot-plugin/workflow-<ID>`。默认工作流集合由 `dsh/workflow-defaults.json` 决定,未列入的工作流不会被打包,也不会出现在目录包中;「检查更新」同样只保留该集合内的工作流。发布已有工作流的新版本只需更新对应小包,无需发布主插件。新增默认工作流时,必须更新 `workflow-defaults.json`,依次发布内容包、目录包及包含新集合的主插件;用户升级主插件后才能发现新增项。维护者操作见 [独立工作流发布说明](../WORKFLOW_PUBLISHING.md)。
|
|
46
|
+
|
|
47
|
+
主程序提供 **检查更新** 按钮,并支持 Host 后台一键升级:使用 DSH 官方更新接口,旧版 DSH 通过官方安装、卸载接口串联,失败时尝试恢复原版本。
|
|
48
|
+
|
|
49
|
+
## 使用与初始化
|
|
50
|
+
|
|
51
|
+
- 点击“插件”上方的 **CANNBot** 进入昇腾开发工作台,点击左箭头 **返回原生工作台** 恢复宿主界面。切换不删除工作流 Skills 或历史数据。
|
|
52
|
+
- 创建 CANNBot 工作区时选定工作流,Host 自动准备该目录;后续会话沿用该工作流。统一安装器工作流直接调用包内保留的上游 Node.js 安装器,指定 `--tool dsh --target <工作目录> --plugin-dir <包内资源目录>`;不需要另外克隆 CANNBot 主仓或共享 Skills 仓。
|
|
53
|
+
- 初始化按工作区、工作流包版本和完整性记录,相同版本不重复执行;更新其他工作流不会重复初始化当前工作流。外部依赖仍按上游 `plugin-install.json` 准备,可能需要 Git、网络及声明的运行环境。没有统一安装器的 `ops-registry-invoke` 保持原生 Skill 自检行为。
|
|
54
|
+
- 准备期间可以继续编辑需求,但该工作流准备完成前不会发送任务。失败时保留原选择,并在插件详情提供日志与重试入口。
|
|
55
|
+
- 用户输入框不会显示或加入 `/工作流名称`。发送时通过 DSH 官方 `agent/pre-step` 加载工作流上下文,用户消息、引用和附件保持原样。
|
|
56
|
+
- 本机与远端使用相同的工作区绑定规则;远端目录选择、初始化和会话执行发生在所连接的 Linux 服务器上。
|
|
57
|
+
|
|
58
|
+
## 缓存、校验与回退
|
|
59
|
+
|
|
60
|
+
工作流缓存默认位于 `$DSH_HOME/cannbot-dsh-workflows`,未设置时为 `~/.dsh/cannbot-dsh-workflows`;可用 `CANNBOT_DSH_WORKFLOW_ROOT` 指定其他目录。
|
|
61
|
+
资源包通过 npm 官方 `pacote` 库下载并校验 SHA-512,安装时不运行 npm 生命周期脚本。每个版本安装到独立目录,通过格式与资源检查后原子切换;下载失败继续使用旧版。已安装内容可离线加载,首次工作区初始化仍须满足上游依赖条件。
|
|
62
|
+
|
|
63
|
+
卸载主插件不会自动删除工作流缓存或项目内由上游安装器生成的文件。
|
|
64
|
+
## Python 编排与 DSH 原生执行
|
|
65
|
+
|
|
66
|
+
使用 `harness/workflow-orchestrator` 的工作流通过 `cannbot_workflow_run` 启动:传入工作流包 ID、YAML、需求和可选工作目录。Python 保留依赖调度、并发、重试、回退和裁决逻辑;每个节点由 DSH 原生子 Agent loop 执行并继承会话模型,无需选择 Coding Agent CLI provider。用 `cannbot_workflow_status` 查询,用 `cannbot_workflow_cancel` 停止;审批仍使用 Python 工作流的审批脚本。
|
|
67
|
+
|
|
68
|
+
插件通过 `python3 -c` 导入工作流资源中的 `orchestrator.py`,向其通用函数接口注入执行回调;管道适配代码随插件编译,不增加 Python 入口文件或编排器命令行参数。安装时获取 Python 编排器,`dsh/` 不保存其副本。运行要求 Python 3 和 PyYAML,以及 DSH 的原生 spawn 子 Agent 能力。
|
|
69
|
+
|
|
70
|
+
Linux 也可以先在终端执行 `cannbot-init-workspace <新目录> <工作流 ID>` 回答初始化问卷,再启动对应的 DSH profile。在界面中创建工作区时,工作流问卷使用内嵌交互终端;完成前不会进入可用会话。Linux 本机可直接使用工作流。初始化失败恢复受管 Skills 和配置,项目源文件保留。服务器账号授权同步默认关闭,需对目标服务器明确勾选同意。
|
|
71
|
+
|
|
72
|
+
公开发布配置与验收见 [RELEASE.md](../RELEASE.md)。
|