huaweicloud-devkit 1.0.2-dev.9 → 1.0.2-next.10
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/.agents/plugins/marketplace.json +20 -20
- package/LICENSE +201 -201
- package/README.md +178 -138
- package/README.zh-CN.md +176 -138
- package/bin/setup.cjs +10 -8
- package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
- package/integrations/opencode/opencode.json +11 -14
- package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
- package/package.json +60 -44
- package/plugins/huaweicloud-core/.claude-plugin/plugin.json +31 -44
- package/plugins/huaweicloud-core/.codex-plugin/plugin.json +30 -43
- package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +31 -44
- package/plugins/huaweicloud-core/.mcp.json +13 -15
- package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +31 -44
- package/plugins/huaweicloud-core/hooks/hooks.json +26 -26
- package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +136 -136
- package/plugins/huaweicloud-core/safety/policy.json +76 -100
- package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +227 -199
- package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +164 -164
- package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -48
- package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -50
- package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +103 -101
- package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +90 -90
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +191 -190
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +171 -124
- package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -55
- package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -70
- package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +57 -56
- package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +106 -97
- package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +36 -29
- package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +29 -23
- package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +188 -185
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +144 -133
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -31
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +57 -55
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +132 -131
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +60 -58
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +72 -71
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -119
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -142
- package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +69 -65
- package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -111
- package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +148 -122
- package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -65
- package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +134 -127
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +49 -49
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +31 -26
- package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +101 -100
- package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +40 -40
- package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +229 -224
- package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +173 -134
- package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -69
- package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +84 -84
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +77 -76
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +60 -59
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +50 -50
- package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -63
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +56 -56
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +56 -47
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +138 -128
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +111 -96
- package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +20 -20
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +30 -28
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +59 -60
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -83
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +54 -1
- package/plugins/huaweicloud-core/src/auth/credentials.mjs +103 -95
- package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
- package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
- package/plugins/huaweicloud-core/src/hcloud-cli.mjs +283 -265
- package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
- package/plugins/huaweicloud-core/src/mcp-server.mjs +130 -129
- package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +68 -0
- package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +94 -0
- package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +140 -137
- package/plugins/huaweicloud-core/src/safety-policy.mjs +356 -302
- package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +86 -87
- package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +150 -153
- package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +196 -105
- package/plugins/huaweicloud-core/src/search-market.mjs +208 -169
- package/plugins/huaweicloud-core/src/setup-cli.mjs +2622 -1594
- package/plugins/huaweicloud-core/src/tools.mjs +463 -111
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +447 -427
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +128 -132
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +215 -227
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +189 -202
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +164 -158
- package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
- package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
package/README.md
CHANGED
|
@@ -1,138 +1,178 @@
|
|
|
1
|
-
# HuaweiCloud DevKit
|
|
2
|
-
|
|
3
|
-
[](https://github.com/huaweicloud/huaweicloud-devkit/discussions)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://github.com/huaweicloud/huaweicloud-devkit/actions/workflows/ci.yml)
|
|
6
|
+
|
|
7
|
+
**[中文](README.zh-CN.md) | English**
|
|
8
|
+
|
|
9
|
+
Help AI coding agents use Huawei Cloud safely and accurately — a single integration that gives agents cloud knowledge, CLI tooling, and safety guardrails.
|
|
10
|
+
|
|
11
|
+
Supports OpenCode, Codex, CodeArts Agent, WorkBuddy, DeepSeek Harness (DSH), and OfficeAce.
|
|
12
|
+
|
|
13
|
+
## Prerequisites
|
|
14
|
+
|
|
15
|
+
- Node.js >= 20
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
### OpenCode
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx --yes huaweicloud-devkit install
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Installs the DevKit into OpenCode automatically. **Restart the session** after installation.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx --yes huaweicloud-devkit doctor # self-check
|
|
29
|
+
npx --yes huaweicloud-devkit status # show status
|
|
30
|
+
npx --yes huaweicloud-devkit update # update
|
|
31
|
+
npx --yes huaweicloud-devkit uninstall # uninstall
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Codex
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx --yes huaweicloud-devkit install --target codex
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
> The Codex CLI must be installed first.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx --yes huaweicloud-devkit doctor # self-check
|
|
44
|
+
npx --yes huaweicloud-devkit status --target codex
|
|
45
|
+
npx --yes huaweicloud-devkit update --target codex # update
|
|
46
|
+
npx --yes huaweicloud-devkit uninstall --target codex
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
> **Codex Desktop** (Windows): use `--target codex-desktop` with the same commands.
|
|
50
|
+
|
|
51
|
+
### CodeArts Agent
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx --yes huaweicloud-devkit install --target codearts
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Restart the session** after installation.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx --yes huaweicloud-devkit install-hcloud # install KooCLI
|
|
61
|
+
npx --yes huaweicloud-devkit doctor # self-check
|
|
62
|
+
npx --yes huaweicloud-devkit status --target codearts
|
|
63
|
+
npx --yes huaweicloud-devkit update --target codearts
|
|
64
|
+
npx --yes huaweicloud-devkit uninstall --target codearts
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
> **Sandbox mode**: CodeArts defaults to sandbox mode which blocks KooCLI. `install-hcloud` detects this and shows how to resolve it — install KooCLI outside the sandbox terminal, or disable sandbox mode in CodeArts settings (Settings → Permissions → Bash mode).
|
|
68
|
+
>
|
|
69
|
+
> **Authentication**: Run `npx huaweicloud-devkit auth init` to configure unified AK/SK credentials for KooCLI, OBS, and sandbox APIs.
|
|
70
|
+
|
|
71
|
+
### WorkBuddy
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx --yes huaweicloud-devkit install --target workbuddy
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Restart the session** after installation.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx --yes huaweicloud-devkit doctor
|
|
81
|
+
npx --yes huaweicloud-devkit status --target workbuddy
|
|
82
|
+
npx --yes huaweicloud-devkit update --target workbuddy # update
|
|
83
|
+
npx --yes huaweicloud-devkit uninstall --target workbuddy
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
> **Updating**: `update` is incremental per agent — it refreshes only the installed files and leaves your config untouched. Use `update --target all` to update every installed agent at once.
|
|
87
|
+
|
|
88
|
+
### DeepSeek Harness (DSH)
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx --yes huaweicloud-devkit install --target dsh
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The installer copies Skills to `$DSH_HOME/skills`, installs the MCP server and
|
|
95
|
+
safety policy under `$DSH_HOME/huaweicloud-plugins`, and maintains
|
|
96
|
+
`$DSH_HOME/profiles/web/cordis.patch.yml`. **Restart the DSH session** after
|
|
97
|
+
installation.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npx --yes huaweicloud-devkit doctor
|
|
101
|
+
npx --yes huaweicloud-devkit status --target dsh
|
|
102
|
+
npx --yes huaweicloud-devkit update --target dsh
|
|
103
|
+
npx --yes huaweicloud-devkit uninstall --target dsh
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
> DSH V1 reuses the existing MCP server through
|
|
107
|
+
> `@deepseek-ai/dsh-mcp-client`. If the installer reports that the DSH MCP
|
|
108
|
+
> client is not detected, run:
|
|
109
|
+
> `npx @deepseek-ai/dsh plugin --profile web add @deepseek-ai/dsh-mcp-client`.
|
|
110
|
+
|
|
111
|
+
### OfficeAce
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npx --yes huaweicloud-devkit install --target officeace
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Restart OfficeAce** after installation.
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npx --yes huaweicloud-devkit doctor
|
|
121
|
+
npx --yes huaweicloud-devkit status --target officeace
|
|
122
|
+
npx --yes huaweicloud-devkit update --target officeace
|
|
123
|
+
npx --yes huaweicloud-devkit uninstall --target officeace
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Other Agents
|
|
127
|
+
|
|
128
|
+
For agents that support the Model Context Protocol (MCP):
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"mcp": {
|
|
133
|
+
"huaweicloud-devkit": {
|
|
134
|
+
"type": "local",
|
|
135
|
+
"command": ["node", "<path>/plugins/huaweicloud-core/src/mcp-server.mjs"],
|
|
136
|
+
"enabled": true
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Then install:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
npx --yes huaweicloud-devkit install
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
> **Prerequisite:** Node.js >= 20. Run `npx huaweicloud-devkit auth init` for unified credentials.
|
|
149
|
+
|
|
150
|
+
## What It Does
|
|
151
|
+
|
|
152
|
+
- **Guided cloud operations** — agents get step-by-step guidance for 20+ Huawei Cloud services (ECS, OBS, VPC, RDS, GaussDB, FunctionGraph, APIG, CCE, and more)
|
|
153
|
+
- **Safety-first execution** — all write operations require explicit user approval; credentials and secrets are automatically redacted from output
|
|
154
|
+
- **Pre-execution risk checks** — public exposure, credential leaks, and destructive operations are caught before they run
|
|
155
|
+
- **Regional awareness** — auto-discovers available regions and checks service availability before creating resources
|
|
156
|
+
|
|
157
|
+
## Supported Services
|
|
158
|
+
|
|
159
|
+
ECS, OBS, VPC, IAM, RDS, GaussDB, FunctionGraph, APIG, CCE, SMN/DMS, ModelArts, Cloud Eye, CTS, DEW, Billing, CBR, WAF/AAD, DDS/DCS, Deployment, and Getting Started guides.
|
|
160
|
+
|
|
161
|
+
## Documentation
|
|
162
|
+
|
|
163
|
+
- [Architecture](docs/architecture.md)
|
|
164
|
+
- [Safety Model](docs/safety-model.md)
|
|
165
|
+
- [Hook Rule Model](docs/hook-rule-model.md)
|
|
166
|
+
- [DeepSeek Harness Integration](docs/dsh-integration.md)
|
|
167
|
+
- [Changelog](docs/CHANGELOG.md)
|
|
168
|
+
- [KooCLI official docs](https://support.huaweicloud.com/qs-hcli/hcli_02_003.html)
|
|
169
|
+
|
|
170
|
+
## Contributors
|
|
171
|
+
|
|
172
|
+
<a href="https://github.com/huaweicloud/huaweicloud-devkit/graphs/contributors">
|
|
173
|
+
<img src="https://contrib.rocks/image?repo=huaweicloud/huaweicloud-devkit" />
|
|
174
|
+
</a>
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
This project is licensed under the Apache-2.0 License. See [LICENSE](LICENSE).
|
package/README.zh-CN.md
CHANGED
|
@@ -1,138 +1,176 @@
|
|
|
1
|
-
# HuaweiCloud DevKit
|
|
2
|
-
|
|
3
|
-
[](https://github.com/huaweicloud/huaweicloud-devkit/discussions)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://github.com/huaweicloud/huaweicloud-devkit/actions/workflows/ci.yml)
|
|
6
|
+
|
|
7
|
+
**中文 | [English](README.md)**
|
|
8
|
+
|
|
9
|
+
帮助 AI 编码助手安全、准确地使用华为云——一站式集成云知识、CLI 工具和安全护栏。
|
|
10
|
+
|
|
11
|
+
支持 OpenCode、Codex、码道(CodeArts Agent)、WorkBuddy、DeepSeek Harness(DSH)、OfficeAce。
|
|
12
|
+
|
|
13
|
+
## 前置条件
|
|
14
|
+
|
|
15
|
+
- Node.js >= 20
|
|
16
|
+
|
|
17
|
+
## 快速开始
|
|
18
|
+
|
|
19
|
+
### OpenCode
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx --yes huaweicloud-devkit install
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
自动安装 DevKit。安装后**重启会话**。
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx --yes huaweicloud-devkit doctor # 自检
|
|
29
|
+
npx --yes huaweicloud-devkit status # 查看状态
|
|
30
|
+
npx --yes huaweicloud-devkit update # 更新
|
|
31
|
+
npx --yes huaweicloud-devkit uninstall # 卸载
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Codex
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx --yes huaweicloud-devkit install --target codex
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
> 需要先安装 Codex CLI。
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx --yes huaweicloud-devkit doctor # 自检
|
|
44
|
+
npx --yes huaweicloud-devkit status --target codex
|
|
45
|
+
npx --yes huaweicloud-devkit update --target codex # 更新
|
|
46
|
+
npx --yes huaweicloud-devkit uninstall --target codex
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
> **Codex Desktop**(Windows):将 `--target codex` 换成 `--target codex-desktop`,命令相同。
|
|
50
|
+
|
|
51
|
+
### CodeArts Agent(码道)
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx --yes huaweicloud-devkit install --target codearts
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
安装后**重启会话**。
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx --yes huaweicloud-devkit install-hcloud # 安装 KooCLI
|
|
61
|
+
npx --yes huaweicloud-devkit doctor # 自检
|
|
62
|
+
npx --yes huaweicloud-devkit status --target codearts
|
|
63
|
+
npx --yes huaweicloud-devkit update --target codearts
|
|
64
|
+
npx --yes huaweicloud-devkit uninstall --target codearts
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
> **沙箱模式**:码道默认沙箱模式会阻止 KooCLI 运行。`install-hcloud` 自动检测并给出指引——请在码道外终端安装使用 KooCLI,或在码道设置中关闭沙箱模式(设置 → 权限 → Bash 模式)。
|
|
68
|
+
>
|
|
69
|
+
> **认证**:执行 `npx huaweicloud-devkit auth init`,统一配置 KooCLI、OBS 和沙箱接口所需的 AK/SK。
|
|
70
|
+
|
|
71
|
+
### WorkBuddy
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx --yes huaweicloud-devkit install --target workbuddy
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
安装后**重启会话**。
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx --yes huaweicloud-devkit doctor
|
|
81
|
+
npx --yes huaweicloud-devkit status --target workbuddy
|
|
82
|
+
npx --yes huaweicloud-devkit update --target workbuddy # 更新
|
|
83
|
+
npx --yes huaweicloud-devkit uninstall --target workbuddy
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
> **更新机制**:`update` 按 agent 增量更新,只刷新必要文件、不动你的配置文件。`update --target all` 可一次更新所有已安装的 agent。
|
|
87
|
+
|
|
88
|
+
### DeepSeek Harness(DSH)
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx --yes huaweicloud-devkit install --target dsh
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
安装器会把 Skills 写入 `$DSH_HOME/skills`,把 MCP Server 和安全策略写入
|
|
95
|
+
`$DSH_HOME/huaweicloud-plugins`,并自动维护
|
|
96
|
+
`$DSH_HOME/profiles/web/cordis.patch.yml`。安装后**重启 DSH 会话**。
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npx --yes huaweicloud-devkit doctor
|
|
100
|
+
npx --yes huaweicloud-devkit status --target dsh
|
|
101
|
+
npx --yes huaweicloud-devkit update --target dsh
|
|
102
|
+
npx --yes huaweicloud-devkit uninstall --target dsh
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
> DSH V1 通过 `@deepseek-ai/dsh-mcp-client` 复用现有 MCP Server。
|
|
106
|
+
> 如果安装器提示 DSH MCP 客户端未检测到,请按提示执行
|
|
107
|
+
> `npx @deepseek-ai/dsh plugin --profile web add @deepseek-ai/dsh-mcp-client`。
|
|
108
|
+
|
|
109
|
+
### OfficeAce
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npx --yes huaweicloud-devkit install --target officeace
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
安装后**重启 OfficeAce**。
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npx --yes huaweicloud-devkit doctor
|
|
119
|
+
npx --yes huaweicloud-devkit status --target officeace
|
|
120
|
+
npx --yes huaweicloud-devkit update --target officeace
|
|
121
|
+
npx --yes huaweicloud-devkit uninstall --target officeace
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### 其他 Agent
|
|
125
|
+
|
|
126
|
+
支持 MCP 协议的 Agent,手动配置:
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"mcp": {
|
|
131
|
+
"huaweicloud-devkit": {
|
|
132
|
+
"type": "local",
|
|
133
|
+
"command": ["node", "<路径>/plugins/huaweicloud-core/src/mcp-server.mjs"],
|
|
134
|
+
"enabled": true
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
然后安装:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npx --yes huaweicloud-devkit install
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
> **前置条件:** Node.js >= 20。执行 `npx huaweicloud-devkit auth init` 完成统一认证。
|
|
147
|
+
|
|
148
|
+
## 功能特性
|
|
149
|
+
|
|
150
|
+
- **引导式云操作** — Agent 获得 20+ 华为云服务的分步操作指引(ECS、OBS、VPC、RDS、GaussDB、FunctionGraph、APIG、CCE 等)
|
|
151
|
+
- **安全优先执行** — 所有写操作需用户明确批准;凭证和密钥自动脱敏
|
|
152
|
+
- **执行前风险检查** — 公网暴露、凭证泄露、破坏性操作在执行前即被拦截
|
|
153
|
+
- **区域感知** — 自动发现可用区域,创建资源前检查服务可用性
|
|
154
|
+
|
|
155
|
+
## 支持的服务
|
|
156
|
+
|
|
157
|
+
ECS、OBS、VPC、IAM、RDS、GaussDB、FunctionGraph、APIG、CCE、SMN/DMS、ModelArts、Cloud Eye、CTS、DEW、Billing、CBR、WAF/AAD、DDS/DCS、Deployment,以及入门指南。
|
|
158
|
+
|
|
159
|
+
## 文档
|
|
160
|
+
|
|
161
|
+
- [架构](docs/architecture.md)
|
|
162
|
+
- [安全模型](docs/safety-model.md)
|
|
163
|
+
- [Hook 规则模型](docs/hook-rule-model.md)
|
|
164
|
+
- [DeepSeek Harness 集成](docs/dsh-integration.md)
|
|
165
|
+
- [变更记录](docs/CHANGELOG.md)
|
|
166
|
+
- [KooCLI 官方文档](https://support.huaweicloud.com/qs-hcli/hcli_02_003.html)
|
|
167
|
+
|
|
168
|
+
## 贡献者
|
|
169
|
+
|
|
170
|
+
<a href="https://github.com/huaweicloud/huaweicloud-devkit/graphs/contributors">
|
|
171
|
+
<img src="https://contrib.rocks/image?repo=huaweicloud/huaweicloud-devkit" />
|
|
172
|
+
</a>
|
|
173
|
+
|
|
174
|
+
## 许可证
|
|
175
|
+
|
|
176
|
+
本项目基于 Apache-2.0 许可证发布。详见 [LICENSE](LICENSE)。
|
package/bin/setup.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const fileUrl = require('url').pathToFileURL(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
const path = require('node:path');
|
|
4
|
+
const fileUrl = require('node:url').pathToFileURL(
|
|
5
|
+
path.join(__dirname, '..', 'plugins', 'huaweicloud-core', 'src', 'setup-cli.mjs'),
|
|
6
|
+
).href;
|
|
7
|
+
import(fileUrl).catch((e) => {
|
|
8
|
+
console.error(e.message);
|
|
9
|
+
process.exit(1);
|
|
10
|
+
});
|