huaweicloud-devkit 1.0.2-next.3 → 1.0.3-dev.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.
Files changed (97) hide show
  1. package/.agents/plugins/marketplace.json +20 -20
  2. package/LICENSE +201 -201
  3. package/README.md +139 -163
  4. package/README.zh-CN.md +139 -161
  5. package/bin/setup.cjs +8 -8
  6. package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
  7. package/integrations/opencode/opencode.json +14 -14
  8. package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
  9. package/package.json +44 -47
  10. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +44 -44
  11. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +43 -43
  12. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +44 -44
  13. package/plugins/huaweicloud-core/.mcp.json +15 -15
  14. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +44 -44
  15. package/plugins/huaweicloud-core/hooks/hooks.json +26 -26
  16. package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +136 -136
  17. package/plugins/huaweicloud-core/safety/policy.json +99 -99
  18. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +199 -199
  19. package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +164 -164
  20. package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -48
  21. package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -50
  22. package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +101 -101
  23. package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +90 -90
  24. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +190 -190
  25. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +124 -124
  26. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -55
  27. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -70
  28. package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +56 -56
  29. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +97 -97
  30. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +29 -29
  31. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +23 -23
  32. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +185 -185
  33. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +133 -133
  34. package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -31
  35. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +55 -55
  36. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
  37. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +131 -131
  38. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +58 -58
  39. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +71 -71
  40. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -119
  41. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -142
  42. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -56
  43. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +65 -65
  44. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -111
  45. package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +122 -122
  46. package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +56 -56
  47. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -65
  48. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +127 -133
  49. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +49 -49
  50. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +26 -26
  51. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +100 -100
  52. package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +40 -40
  53. package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -56
  54. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +224 -224
  55. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +134 -139
  56. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -69
  57. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +84 -84
  58. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +76 -76
  59. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +59 -59
  60. package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +50 -50
  61. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -63
  62. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +56 -56
  63. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -4
  64. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +47 -51
  65. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -4
  66. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +128 -128
  67. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -4
  68. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +95 -110
  69. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -4
  70. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +19 -19
  71. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +27 -27
  72. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +60 -60
  73. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -4
  74. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -83
  75. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -4
  76. package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +87 -105
  77. package/plugins/huaweicloud-core/src/auth/credentials.mjs +95 -95
  78. package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
  79. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +265 -265
  80. package/plugins/huaweicloud-core/src/mcp-server.mjs +129 -129
  81. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +137 -137
  82. package/plugins/huaweicloud-core/src/safety-policy.mjs +302 -302
  83. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +87 -91
  84. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +153 -162
  85. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +105 -112
  86. package/plugins/huaweicloud-core/src/search-market.mjs +169 -174
  87. package/plugins/huaweicloud-core/src/setup-cli.mjs +1594 -2017
  88. package/plugins/huaweicloud-core/src/tools.mjs +993 -1008
  89. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +427 -427
  90. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +132 -132
  91. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +227 -227
  92. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +202 -202
  93. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +158 -158
  94. package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
  95. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
  96. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +0 -155
  97. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +0 -87
package/README.md CHANGED
@@ -1,163 +1,139 @@
1
- # HuaweiCloud DevKit
2
-
3
- [![Discussions](https://img.shields.io/badge/Discussions-Join%20the%20discussion-blue)](https://github.com/huaweicloud/huaweicloud-devkit/discussions)
4
- [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
5
- [![CI](https://github.com/huaweicloud/huaweicloud-devkit/actions/workflows/ci.yml/badge.svg)](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, and DeepSeek Harness (DSH).
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
- ### Other Agents
112
-
113
- For agents that support the Model Context Protocol (MCP):
114
-
115
- ```json
116
- {
117
- "mcp": {
118
- "huaweicloud-devkit": {
119
- "type": "local",
120
- "command": ["node", "<path>/plugins/huaweicloud-core/src/mcp-server.mjs"],
121
- "enabled": true
122
- }
123
- }
124
- }
125
- ```
126
-
127
- Then install:
128
-
129
- ```bash
130
- npx --yes huaweicloud-devkit install
131
- ```
132
-
133
- > **Prerequisite:** Node.js >= 20. Run `npx huaweicloud-devkit auth init` for unified credentials.
134
-
135
- ## What It Does
136
-
137
- - **Guided cloud operations** — agents get step-by-step guidance for 20+ Huawei Cloud services (ECS, OBS, VPC, RDS, GaussDB, FunctionGraph, APIG, CCE, and more)
138
- - **Safety-first execution** — all write operations require explicit user approval; credentials and secrets are automatically redacted from output
139
- - **Pre-execution risk checks** public exposure, credential leaks, and destructive operations are caught before they run
140
- - **Regional awareness** — auto-discovers available regions and checks service availability before creating resources
141
-
142
- ## Supported Services
143
-
144
- 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.
145
-
146
- ## Documentation
147
-
148
- - [Architecture](docs/architecture.md)
149
- - [Safety Model](docs/safety-model.md)
150
- - [Hook Rule Model](docs/hook-rule-model.md)
151
- - [DeepSeek Harness Integration](docs/dsh-integration.md)
152
- - [Changelog](docs/CHANGELOG.md)
153
- - [KooCLI official docs](https://support.huaweicloud.com/qs-hcli/hcli_02_003.html)
154
-
155
- ## Contributors
156
-
157
- <a href="https://github.com/huaweicloud/huaweicloud-devkit/graphs/contributors">
158
- <img src="https://contrib.rocks/image?repo=huaweicloud/huaweicloud-devkit" />
159
- </a>
160
-
161
- ## License
162
-
163
- This project is licensed under the Apache-2.0 License. See [LICENSE](LICENSE).
1
+ # HuaweiCloud DevKit
2
+
3
+ [![Discussions](https://img.shields.io/badge/Discussions-Join%20the%20discussion-blue)](https://github.com/huaweicloud/huaweicloud-devkit/discussions)
4
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
5
+ [![CI](https://github.com/huaweicloud/huaweicloud-devkit/actions/workflows/ci.yml/badge.svg)](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, and WorkBuddy.
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
+ ### Other Agents
89
+
90
+ For agents that support the Model Context Protocol (MCP):
91
+
92
+ ```json
93
+ {
94
+ "mcp": {
95
+ "huaweicloud-devkit": {
96
+ "type": "local",
97
+ "command": ["node", "<path>/plugins/huaweicloud-core/src/mcp-server.mjs"],
98
+ "enabled": true
99
+ }
100
+ }
101
+ }
102
+ ```
103
+
104
+ Then install:
105
+
106
+ ```bash
107
+ npx --yes huaweicloud-devkit install
108
+ ```
109
+
110
+ > **Prerequisite:** Node.js >= 20. Run `npx huaweicloud-devkit auth init` for unified credentials.
111
+
112
+ ## What It Does
113
+
114
+ - **Guided cloud operations** — agents get step-by-step guidance for 20+ Huawei Cloud services (ECS, OBS, VPC, RDS, GaussDB, FunctionGraph, APIG, CCE, and more)
115
+ - **Safety-first execution** — all write operations require explicit user approval; credentials and secrets are automatically redacted from output
116
+ - **Pre-execution risk checks** — public exposure, credential leaks, and destructive operations are caught before they run
117
+ - **Regional awareness** — auto-discovers available regions and checks service availability before creating resources
118
+
119
+ ## Supported Services
120
+
121
+ 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.
122
+
123
+ ## Documentation
124
+
125
+ - [Architecture](docs/architecture.md)
126
+ - [Safety Model](docs/safety-model.md)
127
+ - [Hook Rule Model](docs/hook-rule-model.md)
128
+ - [Changelog](docs/CHANGELOG.md)
129
+ - [KooCLI official docs](https://support.huaweicloud.com/qs-hcli/hcli_02_003.html)
130
+
131
+ ## Contributors
132
+
133
+ <a href="https://github.com/huaweicloud/huaweicloud-devkit/graphs/contributors">
134
+ <img src="https://contrib.rocks/image?repo=huaweicloud/huaweicloud-devkit" />
135
+ </a>
136
+
137
+ ## License
138
+
139
+ This project is licensed under the Apache-2.0 License. See [LICENSE](LICENSE).
package/README.zh-CN.md CHANGED
@@ -1,161 +1,139 @@
1
- # HuaweiCloud DevKit
2
-
3
- [![参与讨论](https://img.shields.io/badge/参与讨论-Join%20the%20discussion-blue)](https://github.com/huaweicloud/huaweicloud-devkit/discussions)
4
- [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
5
- [![CI](https://github.com/huaweicloud/huaweicloud-devkit/actions/workflows/ci.yml/badge.svg)](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)。
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
- ### 其他 Agent
110
-
111
- 支持 MCP 协议的 Agent,手动配置:
112
-
113
- ```json
114
- {
115
- "mcp": {
116
- "huaweicloud-devkit": {
117
- "type": "local",
118
- "command": ["node", "<路径>/plugins/huaweicloud-core/src/mcp-server.mjs"],
119
- "enabled": true
120
- }
121
- }
122
- }
123
- ```
124
-
125
- 然后安装:
126
-
127
- ```bash
128
- npx --yes huaweicloud-devkit install
129
- ```
130
-
131
- > **前置条件:** Node.js >= 20。执行 `npx huaweicloud-devkit auth init` 完成统一认证。
132
-
133
- ## 功能特性
134
-
135
- - **引导式云操作** — Agent 获得 20+ 华为云服务的分步操作指引(ECS、OBS、VPC、RDS、GaussDB、FunctionGraph、APIG、CCE 等)
136
- - **安全优先执行** — 所有写操作需用户明确批准;凭证和密钥自动脱敏
137
- - **执行前风险检查** — 公网暴露、凭证泄露、破坏性操作在执行前即被拦截
138
- - **区域感知** — 自动发现可用区域,创建资源前检查服务可用性
139
-
140
- ## 支持的服务
141
-
142
- ECS、OBS、VPC、IAM、RDS、GaussDB、FunctionGraph、APIG、CCE、SMN/DMS、ModelArts、Cloud Eye、CTS、DEW、Billing、CBR、WAF/AAD、DDS/DCS、Deployment,以及入门指南。
143
-
144
- ## 文档
145
-
146
- - [架构](docs/architecture.md)
147
- - [安全模型](docs/safety-model.md)
148
- - [Hook 规则模型](docs/hook-rule-model.md)
149
- - [DeepSeek Harness 集成](docs/dsh-integration.md)
150
- - [变更记录](docs/CHANGELOG.md)
151
- - [KooCLI 官方文档](https://support.huaweicloud.com/qs-hcli/hcli_02_003.html)
152
-
153
- ## 贡献者
154
-
155
- <a href="https://github.com/huaweicloud/huaweicloud-devkit/graphs/contributors">
156
- <img src="https://contrib.rocks/image?repo=huaweicloud/huaweicloud-devkit" />
157
- </a>
158
-
159
- ## 许可证
160
-
161
- 本项目基于 Apache-2.0 许可证发布。详见 [LICENSE](LICENSE)。
1
+ # HuaweiCloud DevKit
2
+
3
+ [![参与讨论](https://img.shields.io/badge/参与讨论-Join%20the%20discussion-blue)](https://github.com/huaweicloud/huaweicloud-devkit/discussions)
4
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
5
+ [![CI](https://github.com/huaweicloud/huaweicloud-devkit/actions/workflows/ci.yml/badge.svg)](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
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
+ ### 其他 Agent
89
+
90
+ 支持 MCP 协议的 Agent,手动配置:
91
+
92
+ ```json
93
+ {
94
+ "mcp": {
95
+ "huaweicloud-devkit": {
96
+ "type": "local",
97
+ "command": ["node", "<路径>/plugins/huaweicloud-core/src/mcp-server.mjs"],
98
+ "enabled": true
99
+ }
100
+ }
101
+ }
102
+ ```
103
+
104
+ 然后安装:
105
+
106
+ ```bash
107
+ npx --yes huaweicloud-devkit install
108
+ ```
109
+
110
+ > **前置条件:** Node.js >= 20。执行 `npx huaweicloud-devkit auth init` 完成统一认证。
111
+
112
+ ## 功能特性
113
+
114
+ - **引导式云操作** — Agent 获得 20+ 华为云服务的分步操作指引(ECS、OBS、VPC、RDS、GaussDB、FunctionGraph、APIG、CCE 等)
115
+ - **安全优先执行** — 所有写操作需用户明确批准;凭证和密钥自动脱敏
116
+ - **执行前风险检查** — 公网暴露、凭证泄露、破坏性操作在执行前即被拦截
117
+ - **区域感知** — 自动发现可用区域,创建资源前检查服务可用性
118
+
119
+ ## 支持的服务
120
+
121
+ ECS、OBS、VPC、IAM、RDS、GaussDB、FunctionGraph、APIG、CCE、SMN/DMS、ModelArts、Cloud Eye、CTS、DEW、Billing、CBR、WAF/AAD、DDS/DCS、Deployment,以及入门指南。
122
+
123
+ ## 文档
124
+
125
+ - [架构](docs/architecture.md)
126
+ - [安全模型](docs/safety-model.md)
127
+ - [Hook 规则模型](docs/hook-rule-model.md)
128
+ - [变更记录](docs/CHANGELOG.md)
129
+ - [KooCLI 官方文档](https://support.huaweicloud.com/qs-hcli/hcli_02_003.html)
130
+
131
+ ## 贡献者
132
+
133
+ <a href="https://github.com/huaweicloud/huaweicloud-devkit/graphs/contributors">
134
+ <img src="https://contrib.rocks/image?repo=huaweicloud/huaweicloud-devkit" />
135
+ </a>
136
+
137
+ ## 许可证
138
+
139
+ 本项目基于 Apache-2.0 许可证发布。详见 [LICENSE](LICENSE)。
package/bin/setup.cjs CHANGED
@@ -1,8 +1,8 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
- const path = require('path');
4
- const fileUrl = require('url').pathToFileURL(path.join(__dirname, '..', 'plugins', 'huaweicloud-core', 'src', 'setup-cli.mjs')).href;
5
- import(fileUrl).catch(e => {
6
- console.error(e.message);
7
- process.exit(1);
8
- });
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ const path = require('path');
4
+ const fileUrl = require('url').pathToFileURL(path.join(__dirname, '..', 'plugins', 'huaweicloud-core', 'src', 'setup-cli.mjs')).href;
5
+ import(fileUrl).catch(e => {
6
+ console.error(e.message);
7
+ process.exit(1);
8
+ });
@@ -1,14 +1,14 @@
1
- ---
2
- description: Self-check Huawei Cloud DevKit readiness — hcloud, MCP, skills, auth.
3
- ---
4
-
5
- Use HuaweiCloud Devkit tools and skills to perform a comprehensive readiness check:
6
-
7
- 1. Check if KooCLI `hcloud` is installed: `huaweicloud_check_cli`. If not, guide user to install.
8
- 2. Check if hcloud has active credentials: `hcloud configure list` (redacted).
9
- 3. List installed skills via `huaweicloud_search_docs` or count directories in `~/.config/opencode/skills/`.
10
- 4. Verify MCP server is reachable by calling any read-only tool.
11
- 5. Summarize: installed (OK) vs missing (action needed).
12
- 6. Do not print AK/SK, tokens, passwords, credential files, or raw profile secrets.
13
-
14
- If MCP tools are unavailable (fresh install), run `npx huaweicloud-devkit doctor` in terminal.
1
+ ---
2
+ description: Self-check Huawei Cloud DevKit readiness — hcloud, MCP, skills, auth.
3
+ ---
4
+
5
+ Use HuaweiCloud Devkit tools and skills to perform a comprehensive readiness check:
6
+
7
+ 1. Check if KooCLI `hcloud` is installed: `huaweicloud_check_cli`. If not, guide user to install.
8
+ 2. Check if hcloud has active credentials: `hcloud configure list` (redacted).
9
+ 3. List installed skills via `huaweicloud_search_docs` or count directories in `~/.config/opencode/skills/`.
10
+ 4. Verify MCP server is reachable by calling any read-only tool.
11
+ 5. Summarize: installed (OK) vs missing (action needed).
12
+ 6. Do not print AK/SK, tokens, passwords, credential files, or raw profile secrets.
13
+
14
+ If MCP tools are unavailable (fresh install), run `npx huaweicloud-devkit doctor` in terminal.