huaweicloud-devkit 1.1.2-next.0 → 1.1.2-next.2

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 (125) hide show
  1. package/.agents/plugins/marketplace.json +18 -18
  2. package/README.md +182 -38
  3. package/README.zh-CN.md +180 -36
  4. package/bin/dsh-postinstall.cjs +77 -0
  5. package/bin/setup.cjs +7 -4
  6. package/cordis.patch.yml +13 -0
  7. package/integrations/atomcode/hooks/huaweicloud-telemetry.js +181 -0
  8. package/integrations/atomcode/hooks.json +9 -0
  9. package/integrations/dsh/hook-plugin.mjs +148 -0
  10. package/integrations/hermes/hooks/huaweicloud-telemetry.py +238 -0
  11. package/integrations/hermes/manifest.yaml +43 -0
  12. package/integrations/opencode/hooks/skill-tracker.js +115 -0
  13. package/integrations/opencode/opencode.json +1 -4
  14. package/integrations/workbuddy/hooks/telemetry-tracker.py +226 -0
  15. package/package.json +74 -43
  16. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +4 -17
  17. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +23 -33
  18. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +4 -17
  19. package/plugins/huaweicloud-core/.hermes-plugin/plugin.json +30 -0
  20. package/plugins/huaweicloud-core/.mcp.json +2 -5
  21. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +4 -18
  22. package/plugins/huaweicloud-core/assets/icon.png +0 -0
  23. package/plugins/huaweicloud-core/assets/logo-dark.png +0 -0
  24. package/plugins/huaweicloud-core/assets/logo.png +0 -0
  25. package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +104 -28
  26. package/plugins/huaweicloud-core/openclaw.plugin.json +20 -0
  27. package/plugins/huaweicloud-core/safety/policy.json +75 -99
  28. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +196 -35
  29. package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +38 -34
  30. package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +21 -20
  31. package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +19 -19
  32. package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +38 -32
  33. package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +30 -30
  34. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +20 -20
  35. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +31 -31
  36. package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +21 -20
  37. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +40 -31
  38. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +8 -1
  39. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +6 -0
  40. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +45 -37
  41. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +57 -6
  42. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +11 -9
  43. package/plugins/huaweicloud-core/skills/huawei-ecs/references/hc-activity.md +27 -0
  44. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +13 -13
  45. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +44 -39
  46. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +12 -10
  47. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +21 -20
  48. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +19 -19
  49. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +20 -20
  50. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +27 -23
  51. package/plugins/huaweicloud-core/skills/huawei-iac/SKILL.md +93 -0
  52. package/plugins/huaweicloud-core/skills/huawei-iac/references/architectures.md +83 -0
  53. package/plugins/huaweicloud-core/skills/huawei-iac/references/resource-catalog.md +107 -0
  54. package/plugins/huaweicloud-core/skills/huawei-iac/references/state-file.md +104 -0
  55. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +30 -30
  56. package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +65 -39
  57. package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +9 -9
  58. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +33 -25
  59. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +46 -45
  60. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +19 -19
  61. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +12 -7
  62. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +13 -12
  63. package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +4 -4
  64. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +71 -61
  65. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +776 -44
  66. package/plugins/huaweicloud-core/skills/huawei-sandbox/references/framework-commands.md +84 -0
  67. package/plugins/huaweicloud-core/skills/huawei-sandbox/references/nginx-templates.md +100 -0
  68. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +36 -29
  69. package/plugins/huaweicloud-core/skills/huawei-voucher/SKILL.md +57 -0
  70. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +39 -39
  71. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +22 -15
  72. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +20 -19
  73. package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +15 -15
  74. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +23 -20
  75. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +13 -13
  76. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +3 -3
  77. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +21 -2
  78. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +3 -3
  79. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +30 -4
  80. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +3 -3
  81. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +68 -54
  82. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +3 -3
  83. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +6 -6
  84. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +15 -1
  85. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +0 -1
  86. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +3 -3
  87. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +36 -34
  88. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +3 -3
  89. package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +142 -5
  90. package/plugins/huaweicloud-core/src/auth/credentials.mjs +217 -5
  91. package/plugins/huaweicloud-core/src/auth/reconcile.mjs +174 -0
  92. package/plugins/huaweicloud-core/src/auth/service.mjs +57 -2
  93. package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
  94. package/plugins/huaweicloud-core/src/detect-framework.mjs +366 -0
  95. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +203 -16
  96. package/plugins/huaweicloud-core/src/icon-library.mjs +176 -0
  97. package/plugins/huaweicloud-core/src/mcp-protocol.mjs +88 -0
  98. package/plugins/huaweicloud-core/src/mcp-server-remote.mjs +107 -0
  99. package/plugins/huaweicloud-core/src/mcp-server.mjs +154 -99
  100. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +20 -102
  101. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +11 -4
  102. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +4 -1
  103. package/plugins/huaweicloud-core/src/safety-policy.mjs +123 -68
  104. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +48 -12
  105. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +25 -26
  106. package/plugins/huaweicloud-core/src/sandbox/sandbox-file-server.py +45 -0
  107. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +943 -10
  108. package/plugins/huaweicloud-core/src/sandbox/uninstall-cleanup.mjs +50 -0
  109. package/plugins/huaweicloud-core/src/search-market.mjs +49 -14
  110. package/plugins/huaweicloud-core/src/setup-cli.mjs +3091 -498
  111. package/plugins/huaweicloud-core/src/telemetry/agent-detect.mjs +40 -0
  112. package/plugins/huaweicloud-core/src/telemetry/agent-registry.mjs +328 -0
  113. package/plugins/huaweicloud-core/src/telemetry/telemetry.mjs +378 -0
  114. package/plugins/huaweicloud-core/src/tools.mjs +1272 -146
  115. package/plugins/huaweicloud-core/src/update-check.mjs +383 -0
  116. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +72 -38
  117. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +10 -5
  118. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +13 -16
  119. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +12 -16
  120. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +46 -31
  121. package/plugins/huaweicloud-core/src/ws-exec/hwlink-tunnel-channel.mjs +268 -0
  122. package/plugins/huaweicloud-core/src/ws-exec/index.js +3 -0
  123. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +40 -13
  124. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +0 -190
  125. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +0 -124
@@ -1,20 +1,20 @@
1
1
  {
2
- "name": "huaweicloud-devkit",
3
- "interface": {
4
- "displayName": "HuaweiCloud Devkit"
5
- },
6
- "plugins": [
7
- {
8
- "name": "huaweicloud-core",
9
- "source": {
10
- "source": "local",
11
- "path": "./plugins/huaweicloud-core"
12
- },
13
- "policy": {
14
- "installation": "AVAILABLE",
15
- "authentication": "ON_USE"
16
- },
17
- "category": "Cloud"
18
- }
19
- ]
2
+ "name": "huaweicloud-devkit",
3
+ "interface": {
4
+ "displayName": "HuaweiCloud Devkit"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "policy": {
9
+ "installation": "INSTALLED_BY_DEFAULT",
10
+ "authentication": "ON_USE"
11
+ },
12
+ "category": "Cloud",
13
+ "name": "huaweicloud-devkit",
14
+ "source": {
15
+ "path": "./plugins/huaweicloud-core",
16
+ "source": "local"
17
+ }
18
+ }
19
+ ]
20
20
  }
package/README.md CHANGED
@@ -3,32 +3,49 @@
3
3
  [![Discussions](https://img.shields.io/badge/Discussions-Join%20the%20discussion-blue)](https://github.com/huaweicloud/huaweicloud-devkit/discussions)
4
4
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
5
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
+ [![Beta](https://img.shields.io/badge/beta-v1.1.0-orange)](https://github.com/huaweicloud/huaweicloud-devkit)
6
7
 
7
8
  **[中文](README.zh-CN.md) | English**
8
9
 
9
10
  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
 
11
- Supports OpenCode, Codex, CodeArts Agent, WorkBuddy, and DeepSeek Harness (DSH).
12
+ Supports OpenCode, Codex, CodeArts Agent, WorkBuddy, DeepSeek Harness (DSH), OfficeAce, Hermes, OpenClaw, and AtomCode.
12
13
 
13
14
  ## Prerequisites
14
15
 
15
- - Node.js >= 20
16
+ - Node.js >= 22
17
+
18
+ > **China mainland users**: If you experience slow downloads or connection issues with the default npm registry, configure the Huawei Cloud npm mirror:
19
+ >
20
+ > ```bash
21
+ > npm config set registry https://mirrors.huaweicloud.com/repository/npm/
22
+ > ```
23
+ >
24
+ > Restore the default registry: `npm config delete registry`
16
25
 
17
26
  ## Quick Start
18
27
 
28
+ > If `--target` is omitted, the installer auto-detects agents on your machine. When multiple agents are detected, **all of them** will be installed. Specify `--target` to control which agent receives the install.
29
+
30
+ ```bash
31
+ npx --yes huaweicloud-devkit version # print the installed plugin version per agent
32
+ npx --yes huaweicloud-devkit uninstall --target all --clean-global # also remove KooCLI + OBS config
33
+ ```
34
+
19
35
  ### OpenCode
20
36
 
21
37
  ```bash
22
- npx --yes huaweicloud-devkit install
38
+ npx --yes huaweicloud-devkit install --target opencode
23
39
  ```
24
40
 
25
- Installs the DevKit into OpenCode automatically. **Restart the session** after installation.
41
+ **Restart the session** after installation.
26
42
 
27
43
  ```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
44
+ npx --yes huaweicloud-devkit doctor --target opencode
45
+ npx --yes huaweicloud-devkit status --target opencode
46
+ npx --yes huaweicloud-devkit update --target opencode
47
+ npx --yes huaweicloud-devkit uninstall --target opencode
48
+ rm -rf ~/.npm/_npx/ # Linux/macOS only; Windows path TBD
32
49
  ```
33
50
 
34
51
  ### Codex
@@ -37,16 +54,16 @@ npx --yes huaweicloud-devkit uninstall # uninstall
37
54
  npx --yes huaweicloud-devkit install --target codex
38
55
  ```
39
56
 
40
- > The Codex CLI must be installed first.
57
+ **Restart the Codex session** after installation.
41
58
 
42
59
  ```bash
43
- npx --yes huaweicloud-devkit doctor # self-check
60
+ npx --yes huaweicloud-devkit doctor --target codex
44
61
  npx --yes huaweicloud-devkit status --target codex
45
- npx --yes huaweicloud-devkit update --target codex # update
62
+ npx --yes huaweicloud-devkit update --target codex
46
63
  npx --yes huaweicloud-devkit uninstall --target codex
47
64
  ```
48
65
 
49
- > **Codex Desktop** (Windows): use `--target codex-desktop` with the same commands.
66
+ > **Requires Codex CLI** — the `codex` command must be in PATH. If Codex is installed via WindowsApps (Microsoft Store), use `--target codex-desktop` instead. Run `codex --version` to verify CLI availability.
50
67
 
51
68
  ### CodeArts Agent
52
69
 
@@ -57,16 +74,30 @@ npx --yes huaweicloud-devkit install --target codearts
57
74
  **Restart the session** after installation.
58
75
 
59
76
  ```bash
60
- npx --yes huaweicloud-devkit install-hcloud # install KooCLI
61
- npx --yes huaweicloud-devkit doctor # self-check
77
+ npx --yes huaweicloud-devkit doctor --target codearts
62
78
  npx --yes huaweicloud-devkit status --target codearts
63
79
  npx --yes huaweicloud-devkit update --target codearts
64
80
  npx --yes huaweicloud-devkit uninstall --target codearts
65
81
  ```
66
82
 
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.
83
+ > **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 → Chats → Agents Terminal Command Running Mode → Auto Running).
84
+
85
+ ### CodeArts Work
86
+
87
+ ```bash
88
+ npx --yes huaweicloud-devkit install --target codearts-work
89
+ ```
90
+
91
+ **Restart the session** after installation.
92
+
93
+ ```bash
94
+ npx --yes huaweicloud-devkit doctor --target codearts-work
95
+ npx --yes huaweicloud-devkit status --target codearts-work
96
+ npx --yes huaweicloud-devkit update --target codearts-work
97
+ npx --yes huaweicloud-devkit uninstall --target codearts-work
98
+ ```
99
+
100
+ > **CodeArts Work** (CodeArts Space, appId: `com.codearts.work`) uses user-level config at `%USERPROFILE%\.codeartswork\`. No project-level `.codeartswork` directory is created.
70
101
 
71
102
  ### WorkBuddy
72
103
 
@@ -77,60 +108,172 @@ npx --yes huaweicloud-devkit install --target workbuddy
77
108
  **Restart the session** after installation.
78
109
 
79
110
  ```bash
80
- npx --yes huaweicloud-devkit doctor
111
+ npx --yes huaweicloud-devkit doctor --target workbuddy
81
112
  npx --yes huaweicloud-devkit status --target workbuddy
82
- npx --yes huaweicloud-devkit update --target workbuddy # update
113
+ npx --yes huaweicloud-devkit update --target workbuddy
83
114
  npx --yes huaweicloud-devkit uninstall --target workbuddy
84
115
  ```
85
116
 
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
117
  ### DeepSeek Harness (DSH)
89
118
 
90
119
  ```bash
91
120
  npx --yes huaweicloud-devkit install --target dsh
92
121
  ```
93
122
 
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.
123
+ **Restart the DSH session** after installation.
98
124
 
99
125
  ```bash
100
- npx --yes huaweicloud-devkit doctor
126
+ npx --yes huaweicloud-devkit doctor --target dsh
101
127
  npx --yes huaweicloud-devkit status --target dsh
102
128
  npx --yes huaweicloud-devkit update --target dsh
103
129
  npx --yes huaweicloud-devkit uninstall --target dsh
104
130
  ```
105
131
 
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`.
132
+ > DSH V1 reuses the existing MCP server through `@deepseek-ai/dsh-mcp-client`. If the installer reports that the client is not detected, run: `npx @deepseek-ai/dsh plugin --profile web add @deepseek-ai/dsh-mcp-client`.
133
+
134
+ ### OfficeAce
135
+
136
+ ```bash
137
+ npx --yes huaweicloud-devkit install --target officeace
138
+ ```
139
+
140
+ **Restart OfficeAce** after installation.
141
+
142
+ ```bash
143
+ npx --yes huaweicloud-devkit doctor --target officeace
144
+ npx --yes huaweicloud-devkit status --target officeace
145
+ npx --yes huaweicloud-devkit update --target officeace
146
+ npx --yes huaweicloud-devkit uninstall --target officeace
147
+ ```
148
+
149
+ ### Hermes
150
+
151
+ ```bash
152
+ npx --yes huaweicloud-devkit install --target hermes
153
+ ```
154
+
155
+ **Restart the Hermes session** after installation.
156
+
157
+ ```bash
158
+ npx --yes huaweicloud-devkit doctor --target hermes
159
+ npx --yes huaweicloud-devkit status --target hermes
160
+ npx --yes huaweicloud-devkit update --target hermes
161
+ npx --yes huaweicloud-devkit uninstall --target hermes
162
+ ```
163
+
164
+ > **Uninstall notes**: On Linux, run `rm -rf ~/.npm/_npx/* && npm cache clean --force` after uninstall to ensure a clean slate. On Windows, close all Hermes sessions first to release file locks, then after uninstall check `%LOCALAPPDATA%\hermes\config.yaml` for YAML corruption and manually remove `%LOCALAPPDATA%\hermes\huaweicloud-plugins` if any files remain.
165
+ > **Safety hooks**: The installer configures Hermes shell hooks (`config.yaml` → `hooks.pre_tool_call`) to intercept unsafe terminal commands such as credential file reads, environment variable dumps, and unapproved `hcloud` write operations. Hermes shows a consent prompt the first time; approve it or set `hooks_auto_accept: true` in `config.yaml` to auto-accept.
166
+ > **MCP Python SDK**: The installer automatically installs the `mcp` Python package required by Hermes for MCP tool discovery. If you see `[FAIL] Hermes MCP Python SDK` in `doctor`, run `pip3 install mcp` manually.
167
+ > **Windows**: See [docs/hermes-windows.md](docs/hermes-windows.md) for known issues and workarounds.
168
+
169
+ ### OpenClaw
170
+
171
+ ```bash
172
+ # Recommended (ClawHub)
173
+ openclaw plugins install clawhub:huaweicloud-devkit
174
+ openclaw plugins uninstall huaweicloud-devkit
175
+ openclaw plugins update huaweicloud-devkit
176
+ ```
177
+
178
+ **Restart OpenClaw** after installation. If prompted for security risk acknowledgment, add `--acknowledge-clawhub-risk`.
179
+
180
+ ```bash
181
+ # Or via npx
182
+ npx --yes huaweicloud-devkit install --target openclaw
183
+ npx --yes huaweicloud-devkit status --target openclaw
184
+ npx --yes huaweicloud-devkit update --target openclaw
185
+ npx --yes huaweicloud-devkit uninstall --target openclaw
186
+ rm -rf ~/.npm/_npx/ # Linux/macOS only; Windows path TBD
187
+ ```
188
+
189
+ ### AtomCode
190
+
191
+ ```bash
192
+ npx --yes huaweicloud-devkit install --target atomcode
193
+ ```
194
+
195
+ **Restart the AtomCode session** after installation.
196
+
197
+ ```bash
198
+ npx --yes huaweicloud-devkit doctor --target atomcode
199
+ npx --yes huaweicloud-devkit status --target atomcode
200
+ npx --yes huaweicloud-devkit update --target atomcode
201
+ npx --yes huaweicloud-devkit uninstall --target atomcode
202
+ ```
110
203
 
111
204
  ### Other Agents
112
205
 
113
- For agents that support the Model Context Protocol (MCP):
206
+ Any agent that supports MCP can use the standard config:
114
207
 
115
208
  ```json
116
209
  {
117
- "mcp": {
210
+ "mcpServers": {
118
211
  "huaweicloud-devkit": {
119
- "type": "local",
120
- "command": ["node", "<path>/plugins/huaweicloud-core/src/mcp-server.mjs"],
121
- "enabled": true
212
+ "command": "npx",
213
+ "args": ["-y", "-p", "huaweicloud-devkit", "huaweicloud-devkit-mcp"]
122
214
  }
123
215
  }
124
216
  }
125
217
  ```
126
218
 
127
- Then install:
219
+ No installation required — `npx` handles everything.
220
+
221
+ > Set `HW_ACCESS_KEY`/`HW_SECRET_KEY` in the MCP config `env` field for project-level credentials.
222
+
223
+ #### Connecting over Remote (HTTP)
224
+
225
+ If your agent supports `type: "remote"` (Streamable HTTP) instead of stdio, start the devkit remote MCP server locally first:
226
+
227
+ ```bash
228
+ npx --yes huaweicloud-devkit-mcp --transport remote
229
+ ```
230
+
231
+ It listens on `127.0.0.1:9528` by default (no conflict with the IACMCPServer port 9527). Then connect with a remote config (opencode example):
232
+
233
+ ```jsonc
234
+ {
235
+ "mcp": {
236
+ "huaweicloud-devkit": {
237
+ "type": "remote",
238
+ "url": "http://localhost:9528",
239
+ "enabled": true,
240
+ },
241
+ },
242
+ }
243
+ ```
244
+
245
+ > Use `--port <port>` if 9528 is taken and update `url` accordingly; add `--host 0.0.0.0` for LAN access. The remote server has no built-in auth — do not expose it anonymously to the public internet.
246
+
247
+ ### Install KooCLI
248
+
249
+ ```bash
250
+ npx --yes huaweicloud-devkit install-hcloud
251
+ ```
252
+
253
+ ### Configure Credentials
254
+
255
+ ```bash
256
+ npx --yes huaweicloud-devkit auth init
257
+ ```
258
+
259
+ Synchronizes AK/SK to KooCLI, OBS, and sandbox APIs in one step.
260
+
261
+ ### Install All Agents
262
+
263
+ ```bash
264
+ npx --yes huaweicloud-devkit install --target all
265
+ ```
266
+
267
+ ### Update All Agents
128
268
 
129
269
  ```bash
130
- npx --yes huaweicloud-devkit install
270
+ npx huaweicloud-devkit version
271
+ npx --yes huaweicloud-devkit@latest update --target all
131
272
  ```
132
273
 
133
- > **Prerequisite:** Node.js >= 20. Run `npx huaweicloud-devkit auth init` for unified credentials.
274
+ `update` is incremental — it refreshes installed files without touching your
275
+ config. Always keep `@latest` so npm fetches the newest version instead of a
276
+ locally cached older one.
134
277
 
135
278
  ## What It Does
136
279
 
@@ -138,6 +281,7 @@ npx --yes huaweicloud-devkit install
138
281
  - **Safety-first execution** — all write operations require explicit user approval; credentials and secrets are automatically redacted from output
139
282
  - **Pre-execution risk checks** — public exposure, credential leaks, and destructive operations are caught before they run
140
283
  - **Regional awareness** — auto-discovers available regions and checks service availability before creating resources
284
+ - **Sandbox (DevStation)** — temporary cloud runtime for web app deployment with instant public URL preview
141
285
 
142
286
  ## Supported Services
143
287
 
package/README.zh-CN.md CHANGED
@@ -3,32 +3,49 @@
3
3
  [![参与讨论](https://img.shields.io/badge/参与讨论-Join%20the%20discussion-blue)](https://github.com/huaweicloud/huaweicloud-devkit/discussions)
4
4
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
5
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
+ [![Beta](https://img.shields.io/badge/beta-v1.1.0-orange)](https://github.com/huaweicloud/huaweicloud-devkit)
6
7
 
7
8
  **中文 | [English](README.md)**
8
9
 
9
10
  帮助 AI 编码助手安全、准确地使用华为云——一站式集成云知识、CLI 工具和安全护栏。
10
11
 
11
- 支持 OpenCode、Codex、码道(CodeArts Agent)、WorkBuddy、DeepSeek Harness(DSH)。
12
+ 支持 OpenCode、Codex、码道(CodeArts Agent)、WorkBuddy、DeepSeek Harness(DSH)、OfficeAce、Hermes、OpenClaw、AtomCode。
12
13
 
13
14
  ## 前置条件
14
15
 
15
- - Node.js >= 20
16
+ - Node.js >= 22
17
+
18
+ > **国内用户**:使用默认 npm 镜像时可能遇到下载缓慢或连接失败的问题,建议配置华为云 npm 镜像:
19
+ >
20
+ > ```bash
21
+ > npm config set registry https://mirrors.huaweicloud.com/repository/npm/
22
+ > ```
23
+ >
24
+ > 恢复默认镜像:`npm config delete registry`
16
25
 
17
26
  ## 快速开始
18
27
 
28
+ > 省略 `--target` 时,安装器会自动检测机器上的 agent,检测到多个时**全部安装**。建议始终指定 `--target` 以明确安装目标。
29
+
30
+ ```bash
31
+ npx --yes huaweicloud-devkit version # 查看各 agent 已安装的插件版本
32
+ npx --yes huaweicloud-devkit uninstall --target all --clean-global # 一并删除 KooCLI 与 OBS 配置
33
+ ```
34
+
19
35
  ### OpenCode
20
36
 
21
37
  ```bash
22
- npx --yes huaweicloud-devkit install
38
+ npx --yes huaweicloud-devkit install --target opencode
23
39
  ```
24
40
 
25
- 自动安装 DevKit。安装后**重启会话**。
41
+ 安装后**重启会话**。
26
42
 
27
43
  ```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 # 卸载
44
+ npx --yes huaweicloud-devkit doctor --target opencode
45
+ npx --yes huaweicloud-devkit status --target opencode
46
+ npx --yes huaweicloud-devkit update --target opencode
47
+ npx --yes huaweicloud-devkit uninstall --target opencode
48
+ rm -rf ~/.npm/_npx/ # 仅 Linux/macOS;Windows 路径待确认
32
49
  ```
33
50
 
34
51
  ### Codex
@@ -37,16 +54,16 @@ npx --yes huaweicloud-devkit uninstall # 卸载
37
54
  npx --yes huaweicloud-devkit install --target codex
38
55
  ```
39
56
 
40
- > 需要先安装 Codex CLI。
57
+ 安装后**重启 Codex 会话**。
41
58
 
42
59
  ```bash
43
- npx --yes huaweicloud-devkit doctor # 自检
60
+ npx --yes huaweicloud-devkit doctor --target codex
44
61
  npx --yes huaweicloud-devkit status --target codex
45
- npx --yes huaweicloud-devkit update --target codex # 更新
62
+ npx --yes huaweicloud-devkit update --target codex
46
63
  npx --yes huaweicloud-devkit uninstall --target codex
47
64
  ```
48
65
 
49
- > **Codex Desktop**(Windows):将 `--target codex` 换成 `--target codex-desktop`,命令相同。
66
+ > **需要 Codex CLI** — `codex` 命令必须在 PATH 中。若 Codex 通过 WindowsApps(Microsoft Store)安装,请使用 `--target codex-desktop` 替代。运行 `codex --version` 验证 CLI 可用性。
50
67
 
51
68
  ### CodeArts Agent(码道)
52
69
 
@@ -57,16 +74,30 @@ npx --yes huaweicloud-devkit install --target codearts
57
74
  安装后**重启会话**。
58
75
 
59
76
  ```bash
60
- npx --yes huaweicloud-devkit install-hcloud # 安装 KooCLI
61
- npx --yes huaweicloud-devkit doctor # 自检
77
+ npx --yes huaweicloud-devkit doctor --target codearts
62
78
  npx --yes huaweicloud-devkit status --target codearts
63
79
  npx --yes huaweicloud-devkit update --target codearts
64
80
  npx --yes huaweicloud-devkit uninstall --target codearts
65
81
  ```
66
82
 
67
- > **沙箱模式**:码道默认沙箱模式会阻止 KooCLI 运行。`install-hcloud` 自动检测并给出指引——请在码道外终端安装使用 KooCLI,或在码道设置中关闭沙箱模式(设置 → 权限 → Bash 模式)。
68
- >
69
- > **认证**:执行 `npx huaweicloud-devkit auth init`,统一配置 KooCLI、OBS 和沙箱接口所需的 AK/SK。
83
+ > **沙箱模式**:码道默认沙箱模式会阻止 KooCLI 运行。`install-hcloud` 自动检测并给出指引——请在码道外终端安装使用 KooCLI,或在码道设置中关闭沙箱模式(设置 → 对话流 → 智能体 终端命令运行模式 → 自动运行)。
84
+
85
+ ### CodeArts Work(码道工作空间)
86
+
87
+ ```bash
88
+ npx --yes huaweicloud-devkit install --target codearts-work
89
+ ```
90
+
91
+ 安装后**重启会话**。
92
+
93
+ ```bash
94
+ npx --yes huaweicloud-devkit doctor --target codearts-work
95
+ npx --yes huaweicloud-devkit status --target codearts-work
96
+ npx --yes huaweicloud-devkit update --target codearts-work
97
+ npx --yes huaweicloud-devkit uninstall --target codearts-work
98
+ ```
99
+
100
+ > **CodeArts Work**(工作空间,appId: `com.codearts.work`)使用用户级配置 `%USERPROFILE%\.codeartswork\`,不创建项目级目录。
70
101
 
71
102
  ### WorkBuddy
72
103
 
@@ -77,58 +108,170 @@ npx --yes huaweicloud-devkit install --target workbuddy
77
108
  安装后**重启会话**。
78
109
 
79
110
  ```bash
80
- npx --yes huaweicloud-devkit doctor
111
+ npx --yes huaweicloud-devkit doctor --target workbuddy
81
112
  npx --yes huaweicloud-devkit status --target workbuddy
82
- npx --yes huaweicloud-devkit update --target workbuddy # 更新
113
+ npx --yes huaweicloud-devkit update --target workbuddy
83
114
  npx --yes huaweicloud-devkit uninstall --target workbuddy
84
115
  ```
85
116
 
86
- > **更新机制**:`update` 按 agent 增量更新,只刷新必要文件、不动你的配置文件。`update --target all` 可一次更新所有已安装的 agent。
87
-
88
117
  ### DeepSeek Harness(DSH)
89
118
 
90
119
  ```bash
91
120
  npx --yes huaweicloud-devkit install --target dsh
92
121
  ```
93
122
 
94
- 安装器会把 Skills 写入 `$DSH_HOME/skills`,把 MCP Server 和安全策略写入
95
- `$DSH_HOME/huaweicloud-plugins`,并自动维护
96
- `$DSH_HOME/profiles/web/cordis.patch.yml`。安装后**重启 DSH 会话**。
123
+ 安装后**重启 DSH 会话**。
97
124
 
98
125
  ```bash
99
- npx --yes huaweicloud-devkit doctor
126
+ npx --yes huaweicloud-devkit doctor --target dsh
100
127
  npx --yes huaweicloud-devkit status --target dsh
101
128
  npx --yes huaweicloud-devkit update --target dsh
102
129
  npx --yes huaweicloud-devkit uninstall --target dsh
103
130
  ```
104
131
 
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`。
132
+ > DSH V1 通过 `@deepseek-ai/dsh-mcp-client` 复用现有 MCP Server。如果安装器提示客户端未检测到,请执行:`npx @deepseek-ai/dsh plugin --profile web add @deepseek-ai/dsh-mcp-client`。
133
+
134
+ ### OfficeAce
135
+
136
+ ```bash
137
+ npx --yes huaweicloud-devkit install --target officeace
138
+ ```
139
+
140
+ 安装后**重启 OfficeAce**。
141
+
142
+ ```bash
143
+ npx --yes huaweicloud-devkit doctor --target officeace
144
+ npx --yes huaweicloud-devkit status --target officeace
145
+ npx --yes huaweicloud-devkit update --target officeace
146
+ npx --yes huaweicloud-devkit uninstall --target officeace
147
+ ```
148
+
149
+ ### Hermes
150
+
151
+ ```bash
152
+ npx --yes huaweicloud-devkit install --target hermes
153
+ ```
154
+
155
+ 安装后**重启 Hermes 会话**。
156
+
157
+ ```bash
158
+ npx --yes huaweicloud-devkit doctor --target hermes
159
+ npx --yes huaweicloud-devkit status --target hermes
160
+ npx --yes huaweicloud-devkit update --target hermes
161
+ npx --yes huaweicloud-devkit uninstall --target hermes
162
+ ```
163
+
164
+ > **卸载说明**:Linux 上卸载后执行 `rm -rf ~/.npm/_npx/* && npm cache clean --force` 确保下次全新安装。Windows 上先关闭所有 Hermes 会话(释放文件锁),卸载后检查 `%LOCALAPPDATA%\hermes\config.yaml` 是否有 YAML 损坏,如有残留文件手动删除 `%LOCALAPPDATA%\hermes\huaweicloud-plugins`。
165
+ > **安全钩子(Safety hooks)**:安装器会在 `config.yaml` 中写入 shell hooks 配置(`hooks.pre_tool_call`),拦截不安全的终端命令,如读取凭据文件、导出环境变量、未审批的 `hcloud` 写操作。Hermes 首次使用时会弹出同意提示,可批准或设置 `hooks_auto_accept: true` 自动批准。
166
+ > **MCP Python SDK**:安装器会自动安装 Hermes 所需的 `mcp` Python 包。如果 doctor 显示 `[FAIL] Hermes MCP Python SDK`,手动执行 `pip3 install mcp`。
167
+ > **Windows**:参见 [docs/hermes-windows.md](docs/hermes-windows.md) 了解已知问题和解决方法。
168
+
169
+ ### OpenClaw
170
+
171
+ ```bash
172
+ # 推荐方式 (ClawHub)
173
+ openclaw plugins install clawhub:huaweicloud-devkit
174
+ openclaw plugins uninstall huaweicloud-devkit
175
+ openclaw plugins update huaweicloud-devkit
176
+ ```
177
+
178
+ 安装后**重启 OpenClaw**。如提示安全风险确认,加 `--acknowledge-clawhub-risk`。
179
+
180
+ ```bash
181
+ # 或通过 npx
182
+ npx --yes huaweicloud-devkit install --target openclaw
183
+ npx --yes huaweicloud-devkit status --target openclaw
184
+ npx --yes huaweicloud-devkit update --target openclaw
185
+ npx --yes huaweicloud-devkit uninstall --target openclaw
186
+ rm -rf ~/.npm/_npx/ # 仅 Linux/macOS;Windows 路径待确认
187
+ ```
188
+
189
+ ### AtomCode
190
+
191
+ ```bash
192
+ npx --yes huaweicloud-devkit install --target atomcode
193
+ ```
194
+
195
+ 安装后**重启 AtomCode 会话**。
196
+
197
+ ```bash
198
+ npx --yes huaweicloud-devkit doctor --target atomcode
199
+ npx --yes huaweicloud-devkit status --target atomcode
200
+ npx --yes huaweicloud-devkit update --target atomcode
201
+ npx --yes huaweicloud-devkit uninstall --target atomcode
202
+ ```
108
203
 
109
204
  ### 其他 Agent
110
205
 
111
- 支持 MCP 协议的 Agent,手动配置:
206
+ 任何支持 MCP 协议的 Agent,直接使用标准 MCP 配置:
112
207
 
113
208
  ```json
114
209
  {
115
- "mcp": {
210
+ "mcpServers": {
116
211
  "huaweicloud-devkit": {
117
- "type": "local",
118
- "command": ["node", "<路径>/plugins/huaweicloud-core/src/mcp-server.mjs"],
119
- "enabled": true
212
+ "command": "npx",
213
+ "args": ["-y", "-p", "huaweicloud-devkit", "huaweicloud-devkit-mcp"]
120
214
  }
121
215
  }
122
216
  }
123
217
  ```
124
218
 
125
- 然后安装:
219
+ 无需预安装 — `npx` 自动处理一切。
220
+
221
+ > 项目级 AK/SK 可通过 MCP 配置的 `env` 字段设置 `HW_ACCESS_KEY`/`HW_SECRET_KEY`。
222
+
223
+ #### 通过 Remote(HTTP)连接
224
+
225
+ 若 Agent 支持 `type: "remote"`(Streamable HTTP)而非 stdio,可在本地先启动 devkit 的远程 MCP 服务器:
226
+
227
+ ```bash
228
+ npx --yes huaweicloud-devkit-mcp --transport remote
229
+ ```
230
+
231
+ 默认监听 `127.0.0.1:9528`(与预置的 IACMCPServer 端口 9527 不冲突)。随后以远程方式连接(以 opencode 为例):
232
+
233
+ ```jsonc
234
+ {
235
+ "mcp": {
236
+ "huaweicloud-devkit": {
237
+ "type": "remote",
238
+ "url": "http://localhost:9528",
239
+ "enabled": true,
240
+ },
241
+ },
242
+ }
243
+ ```
244
+
245
+ > 端口被占用时用 `--port <端口>` 换端口,`url` 同步修改;需要局域网访问时加 `--host 0.0.0.0`。remote 服务器不内置鉴权,请勿匿名暴露到公网。
246
+
247
+ ### 安装 KooCLI
248
+
249
+ ```bash
250
+ npx --yes huaweicloud-devkit install-hcloud
251
+ ```
252
+
253
+ ### 配置凭据
254
+
255
+ ```bash
256
+ npx --yes huaweicloud-devkit auth init
257
+ ```
258
+
259
+ 一步同步 AK/SK 到 KooCLI、OBS 和沙箱接口。
260
+
261
+ ### 安装所有 Agent
262
+
263
+ ```bash
264
+ npx --yes huaweicloud-devkit install --target all
265
+ ```
266
+
267
+ ### 更新所有 Agent
126
268
 
127
269
  ```bash
128
- npx --yes huaweicloud-devkit install
270
+ npx huaweicloud-devkit version
271
+ npx --yes huaweicloud-devkit@latest update --target all
129
272
  ```
130
273
 
131
- > **前置条件:** Node.js >= 20。执行 `npx huaweicloud-devkit auth init` 完成统一认证。
274
+ `update` 是增量更新——只刷新已安装的文件,不动配置文件。请务必保留 `@latest`,确保 npm 获取最新版本而非本地缓存的旧版本。
132
275
 
133
276
  ## 功能特性
134
277
 
@@ -136,6 +279,7 @@ npx --yes huaweicloud-devkit install
136
279
  - **安全优先执行** — 所有写操作需用户明确批准;凭证和密钥自动脱敏
137
280
  - **执行前风险检查** — 公网暴露、凭证泄露、破坏性操作在执行前即被拦截
138
281
  - **区域感知** — 自动发现可用区域,创建资源前检查服务可用性
282
+ - **沙箱(DevStation)** — 临时云端运行环境,部署 Web 应用并即刻获得公网预览地址
139
283
 
140
284
  ## 支持的服务
141
285