dsh-cloudq 0.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 +21 -0
- package/README.md +89 -0
- package/assets/cloudq.png +0 -0
- package/cordis.patch.yml +5 -0
- package/lib/client.js +3405 -0
- package/lib/index.js +910 -0
- package/lib/types/client/index.d.ts +4 -0
- package/lib/types/index.d.ts +13 -0
- package/package.json +119 -0
- package/skills/cloudq/SKILL.md +359 -0
- package/skills/cloudq/references/api/CloudQChatCompletions.md +178 -0
- package/skills/cloudq/scripts/check_env.py +811 -0
- package/skills/cloudq/scripts/cleanup.py +419 -0
- package/skills/cloudq/scripts/create_role.py +281 -0
- package/skills/cloudq/scripts/credential_manager.py +554 -0
- package/skills/cloudq/scripts/login.py +410 -0
- package/skills/cloudq/scripts/login_url.py +404 -0
- package/skills/cloudq/scripts/logout.py +36 -0
- package/skills/cloudq/scripts/save_ak.py +156 -0
- package/skills/cloudq/scripts/tcloud_api.py +329 -0
- package/skills/cloudq/scripts/tcloud_async_task.py +345 -0
- package/skills/cloudq/scripts/tcloud_sse_api.py +765 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tencent Cloud
|
|
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
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# dsh-cloudq
|
|
2
|
+
|
|
3
|
+
面向 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的 CloudQ 集成插件。插件为 Web Profile 提供 CloudQ 模式,内置 `cloudq` Skill,并提供 CloudQ 用量、架构视图、本地凭证配置和插件管理能力。
|
|
4
|
+
|
|
5
|
+
## 环境要求
|
|
6
|
+
|
|
7
|
+
- Node.js `>=22.19.0`
|
|
8
|
+
- DeepSeek Harness `0.1.1-rc.2` 或兼容的更高 `0.1.x` 版本
|
|
9
|
+
- `dsh plugin` 命令可调用 `pnpm`
|
|
10
|
+
- 可通过 `python3` 命令运行 Python 3
|
|
11
|
+
- macOS 或 Linux
|
|
12
|
+
|
|
13
|
+
## 安装
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
dsh plugin --profile web add dsh-cloudq
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
安装完成后重启 Web Profile:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
dsh --profile web
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
打开 DSH 输出的访问地址,即可在对话输入区和侧边栏看到 CloudQ 入口。也可以通过 `/cloudq` 显式调用内置 Skill。
|
|
26
|
+
|
|
27
|
+
## 升级与卸载
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
dsh plugin --profile web update dsh-cloudq
|
|
31
|
+
dsh plugin --profile web remove dsh-cloudq
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
修改已安装的插件后,需要重启 Web Profile。
|
|
35
|
+
|
|
36
|
+
## 凭证配置
|
|
37
|
+
|
|
38
|
+
设置卡片支持 CloudQ OAuth 流程,也支持手动配置腾讯云 `SecretId` 和 `SecretKey`。
|
|
39
|
+
|
|
40
|
+
- 凭证保存在本机 `~/.tencent-cloudq/credential.json`,文件权限仅允许当前用户访问。
|
|
41
|
+
- 敏感凭证通过标准输入传递给 Python 辅助脚本,不会放入命令行参数。
|
|
42
|
+
- 浏览器接口仅返回凭证状态和脱敏标识,不返回凭证内容或本地凭证路径。
|
|
43
|
+
- 可通过退出登录操作删除本地凭证。
|
|
44
|
+
|
|
45
|
+
请遵循最小权限原则,只授予 CloudQ 操作所需的权限。内置 Skill 可以调用云管理的读写操作,请在批准前检查每项操作的具体内容。
|
|
46
|
+
|
|
47
|
+
## 安全机制
|
|
48
|
+
|
|
49
|
+
- Host API 只接受来自回环地址的同源请求。
|
|
50
|
+
- JSON 请求体大小限制为 64 KiB。
|
|
51
|
+
- Python 辅助脚本的输出大小受到限制,非预期的内部错误不会返回到浏览器。
|
|
52
|
+
- 远程数据通过 DOM 文本节点渲染,不使用 HTML 注入。
|
|
53
|
+
- 下载链接必须使用 HTTPS。
|
|
54
|
+
- npm 包不包含凭证、Token 或本地环境文件。
|
|
55
|
+
|
|
56
|
+
如需报告安全问题,请通过 [GitHub Issues](https://github.com/TencentCloud/cloudq-for-dsh/issues) 提交,且不要附带真实凭证。
|
|
57
|
+
|
|
58
|
+
## 本地开发
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
pnpm install
|
|
62
|
+
pnpm run lint
|
|
63
|
+
pnpm run typecheck
|
|
64
|
+
pnpm run test:all
|
|
65
|
+
pnpm run build
|
|
66
|
+
pnpm run check:client
|
|
67
|
+
npm pack --dry-run --registry=https://registry.npmjs.org/
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
npm 包内包含预构建的 Host 和 Web Client 产物、Bundle Patch、CloudQ 运行时图标以及内置 Skill。用户从 Registry 安装时不需要执行构建脚本。
|
|
71
|
+
|
|
72
|
+
## 目录结构
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
src/ Host 与 Web Client 源码
|
|
76
|
+
skills/cloudq/ 内置 CloudQ Skill 与 Python 辅助脚本
|
|
77
|
+
assets/cloudq.png Host 提供的运行时图标
|
|
78
|
+
scripts/ 构建和发布检查脚本
|
|
79
|
+
tests/ 单元测试、集成测试与包契约测试
|
|
80
|
+
cordis.patch.yml DSH Bundle 配置层
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## 发布
|
|
84
|
+
|
|
85
|
+
源码在 [TencentCloud/cloudq-for-dsh](https://github.com/TencentCloud/cloudq-for-dsh) 完成评审和版本管理。只有仓库检查与安装包冒烟测试全部通过后,才可将 npm 版本发布到官方 Registry。
|
|
86
|
+
|
|
87
|
+
## 许可证
|
|
88
|
+
|
|
89
|
+
本项目采用 MIT 许可证,详情请参阅 [`LICENSE`](LICENSE)。
|
|
Binary file
|