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

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 (123) hide show
  1. package/.agents/plugins/marketplace.json +18 -18
  2. package/README.md +164 -38
  3. package/README.zh-CN.md +162 -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-server.mjs +117 -4
  98. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +20 -102
  99. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +11 -4
  100. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +4 -1
  101. package/plugins/huaweicloud-core/src/safety-policy.mjs +123 -68
  102. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +48 -12
  103. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +25 -26
  104. package/plugins/huaweicloud-core/src/sandbox/sandbox-file-server.py +45 -0
  105. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +943 -10
  106. package/plugins/huaweicloud-core/src/sandbox/uninstall-cleanup.mjs +50 -0
  107. package/plugins/huaweicloud-core/src/search-market.mjs +49 -14
  108. package/plugins/huaweicloud-core/src/setup-cli.mjs +3090 -497
  109. package/plugins/huaweicloud-core/src/telemetry/agent-detect.mjs +40 -0
  110. package/plugins/huaweicloud-core/src/telemetry/agent-registry.mjs +328 -0
  111. package/plugins/huaweicloud-core/src/telemetry/telemetry.mjs +378 -0
  112. package/plugins/huaweicloud-core/src/tools.mjs +1272 -146
  113. package/plugins/huaweicloud-core/src/update-check.mjs +383 -0
  114. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +72 -38
  115. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +10 -5
  116. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +13 -16
  117. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +12 -16
  118. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +46 -31
  119. package/plugins/huaweicloud-core/src/ws-exec/hwlink-tunnel-channel.mjs +268 -0
  120. package/plugins/huaweicloud-core/src/ws-exec/index.js +3 -0
  121. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +40 -13
  122. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +0 -190
  123. 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,55 @@
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.
13
+
14
+ ## Cursor Directory Plugin
15
+
16
+ This repository also acts as an [Open Plugins](https://open-plugins.com) package for the [Cursor Directory](https://cursor.directory) marketplace. The root-level `plugin.json`, `mcp.json`, `skills/`, and `rules/` files are used **only** for Cursor Directory repository-scan discovery and are **not** shipped in the npm tarball (the `package.json` `files` whitelist excludes them). The npm package's manifests live under `plugins/huaweicloud-core/`.
17
+
18
+ The `mcp.json` MCP server launches via `npx -y -p huaweicloud-devkit huaweicloud-devkit-mcp`, which tracks the npm `latest` tag. During pre-release this may differ from the manifest `version`; it can be pinned after a stable release.
12
19
 
13
20
  ## Prerequisites
14
21
 
15
- - Node.js >= 20
22
+ - Node.js >= 22
23
+
24
+ > **China mainland users**: If you experience slow downloads or connection issues with the default npm registry, configure the Huawei Cloud npm mirror:
25
+ >
26
+ > ```bash
27
+ > npm config set registry https://mirrors.huaweicloud.com/repository/npm/
28
+ > ```
29
+ >
30
+ > Restore the default registry: `npm config delete registry`
16
31
 
17
32
  ## Quick Start
18
33
 
34
+ > 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.
35
+
36
+ ```bash
37
+ npx --yes huaweicloud-devkit version # print the installed plugin version per agent
38
+ npx --yes huaweicloud-devkit uninstall --target all --clean-global # also remove KooCLI + OBS config
39
+ ```
40
+
19
41
  ### OpenCode
20
42
 
21
43
  ```bash
22
- npx --yes huaweicloud-devkit install
44
+ npx --yes huaweicloud-devkit install --target opencode
23
45
  ```
24
46
 
25
- Installs the DevKit into OpenCode automatically. **Restart the session** after installation.
47
+ **Restart the session** after installation.
26
48
 
27
49
  ```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
50
+ npx --yes huaweicloud-devkit doctor --target opencode
51
+ npx --yes huaweicloud-devkit status --target opencode
52
+ npx --yes huaweicloud-devkit update --target opencode
53
+ npx --yes huaweicloud-devkit uninstall --target opencode
54
+ rm -rf ~/.npm/_npx/ # Linux/macOS only; Windows path TBD
32
55
  ```
33
56
 
34
57
  ### Codex
@@ -37,16 +60,16 @@ npx --yes huaweicloud-devkit uninstall # uninstall
37
60
  npx --yes huaweicloud-devkit install --target codex
38
61
  ```
39
62
 
40
- > The Codex CLI must be installed first.
63
+ **Restart the Codex session** after installation.
41
64
 
42
65
  ```bash
43
- npx --yes huaweicloud-devkit doctor # self-check
66
+ npx --yes huaweicloud-devkit doctor --target codex
44
67
  npx --yes huaweicloud-devkit status --target codex
45
- npx --yes huaweicloud-devkit update --target codex # update
68
+ npx --yes huaweicloud-devkit update --target codex
46
69
  npx --yes huaweicloud-devkit uninstall --target codex
47
70
  ```
48
71
 
49
- > **Codex Desktop** (Windows): use `--target codex-desktop` with the same commands.
72
+ > **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
73
 
51
74
  ### CodeArts Agent
52
75
 
@@ -57,16 +80,30 @@ npx --yes huaweicloud-devkit install --target codearts
57
80
  **Restart the session** after installation.
58
81
 
59
82
  ```bash
60
- npx --yes huaweicloud-devkit install-hcloud # install KooCLI
61
- npx --yes huaweicloud-devkit doctor # self-check
83
+ npx --yes huaweicloud-devkit doctor --target codearts
62
84
  npx --yes huaweicloud-devkit status --target codearts
63
85
  npx --yes huaweicloud-devkit update --target codearts
64
86
  npx --yes huaweicloud-devkit uninstall --target codearts
65
87
  ```
66
88
 
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.
89
+ > **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).
90
+
91
+ ### CodeArts Work
92
+
93
+ ```bash
94
+ npx --yes huaweicloud-devkit install --target codearts-work
95
+ ```
96
+
97
+ **Restart the session** after installation.
98
+
99
+ ```bash
100
+ npx --yes huaweicloud-devkit doctor --target codearts-work
101
+ npx --yes huaweicloud-devkit status --target codearts-work
102
+ npx --yes huaweicloud-devkit update --target codearts-work
103
+ npx --yes huaweicloud-devkit uninstall --target codearts-work
104
+ ```
105
+
106
+ > **CodeArts Work** (CodeArts Space, appId: `com.codearts.work`) uses user-level config at `%USERPROFILE%\.codeartswork\`. No project-level `.codeartswork` directory is created.
70
107
 
71
108
  ### WorkBuddy
72
109
 
@@ -77,60 +114,148 @@ npx --yes huaweicloud-devkit install --target workbuddy
77
114
  **Restart the session** after installation.
78
115
 
79
116
  ```bash
80
- npx --yes huaweicloud-devkit doctor
117
+ npx --yes huaweicloud-devkit doctor --target workbuddy
81
118
  npx --yes huaweicloud-devkit status --target workbuddy
82
- npx --yes huaweicloud-devkit update --target workbuddy # update
119
+ npx --yes huaweicloud-devkit update --target workbuddy
83
120
  npx --yes huaweicloud-devkit uninstall --target workbuddy
84
121
  ```
85
122
 
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
123
  ### DeepSeek Harness (DSH)
89
124
 
90
125
  ```bash
91
126
  npx --yes huaweicloud-devkit install --target dsh
92
127
  ```
93
128
 
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.
129
+ **Restart the DSH session** after installation.
98
130
 
99
131
  ```bash
100
- npx --yes huaweicloud-devkit doctor
132
+ npx --yes huaweicloud-devkit doctor --target dsh
101
133
  npx --yes huaweicloud-devkit status --target dsh
102
134
  npx --yes huaweicloud-devkit update --target dsh
103
135
  npx --yes huaweicloud-devkit uninstall --target dsh
104
136
  ```
105
137
 
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`.
138
+ > 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`.
139
+
140
+ ### OfficeAce
141
+
142
+ ```bash
143
+ npx --yes huaweicloud-devkit install --target officeace
144
+ ```
145
+
146
+ **Restart OfficeAce** after installation.
147
+
148
+ ```bash
149
+ npx --yes huaweicloud-devkit doctor --target officeace
150
+ npx --yes huaweicloud-devkit status --target officeace
151
+ npx --yes huaweicloud-devkit update --target officeace
152
+ npx --yes huaweicloud-devkit uninstall --target officeace
153
+ ```
154
+
155
+ ### Hermes
156
+
157
+ ```bash
158
+ npx --yes huaweicloud-devkit install --target hermes
159
+ ```
160
+
161
+ **Restart the Hermes session** after installation.
162
+
163
+ ```bash
164
+ npx --yes huaweicloud-devkit doctor --target hermes
165
+ npx --yes huaweicloud-devkit status --target hermes
166
+ npx --yes huaweicloud-devkit update --target hermes
167
+ npx --yes huaweicloud-devkit uninstall --target hermes
168
+ ```
169
+
170
+ > **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.
171
+ > **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.
172
+ > **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.
173
+ > **Windows**: See [docs/hermes-windows.md](docs/hermes-windows.md) for known issues and workarounds.
174
+
175
+ ### OpenClaw
176
+
177
+ ```bash
178
+ # Recommended (ClawHub)
179
+ openclaw plugins install clawhub:huaweicloud-devkit
180
+ openclaw plugins uninstall huaweicloud-devkit
181
+ openclaw plugins update huaweicloud-devkit
182
+ ```
183
+
184
+ **Restart OpenClaw** after installation. If prompted for security risk acknowledgment, add `--acknowledge-clawhub-risk`.
185
+
186
+ ```bash
187
+ # Or via npx
188
+ npx --yes huaweicloud-devkit install --target openclaw
189
+ npx --yes huaweicloud-devkit status --target openclaw
190
+ npx --yes huaweicloud-devkit update --target openclaw
191
+ npx --yes huaweicloud-devkit uninstall --target openclaw
192
+ rm -rf ~/.npm/_npx/ # Linux/macOS only; Windows path TBD
193
+ ```
194
+
195
+ ### AtomCode
196
+
197
+ ```bash
198
+ npx --yes huaweicloud-devkit install --target atomcode
199
+ ```
200
+
201
+ **Restart the AtomCode session** after installation.
202
+
203
+ ```bash
204
+ npx --yes huaweicloud-devkit doctor --target atomcode
205
+ npx --yes huaweicloud-devkit status --target atomcode
206
+ npx --yes huaweicloud-devkit update --target atomcode
207
+ npx --yes huaweicloud-devkit uninstall --target atomcode
208
+ ```
110
209
 
111
210
  ### Other Agents
112
211
 
113
- For agents that support the Model Context Protocol (MCP):
212
+ Any agent that supports MCP can use the standard config:
114
213
 
115
214
  ```json
116
215
  {
117
- "mcp": {
216
+ "mcpServers": {
118
217
  "huaweicloud-devkit": {
119
- "type": "local",
120
- "command": ["node", "<path>/plugins/huaweicloud-core/src/mcp-server.mjs"],
121
- "enabled": true
218
+ "command": "npx",
219
+ "args": ["-y", "-p", "huaweicloud-devkit", "huaweicloud-devkit-mcp"]
122
220
  }
123
221
  }
124
222
  }
125
223
  ```
126
224
 
127
- Then install:
225
+ No installation required — `npx` handles everything.
226
+
227
+ > Set `HW_ACCESS_KEY`/`HW_SECRET_KEY` in the MCP config `env` field for project-level credentials.
228
+
229
+ ### Install KooCLI
230
+
231
+ ```bash
232
+ npx --yes huaweicloud-devkit install-hcloud
233
+ ```
234
+
235
+ ### Configure Credentials
236
+
237
+ ```bash
238
+ npx --yes huaweicloud-devkit auth init
239
+ ```
240
+
241
+ Synchronizes AK/SK to KooCLI, OBS, and sandbox APIs in one step.
242
+
243
+ ### Install All Agents
244
+
245
+ ```bash
246
+ npx --yes huaweicloud-devkit install --target all
247
+ ```
248
+
249
+ ### Update All Agents
128
250
 
129
251
  ```bash
130
- npx --yes huaweicloud-devkit install
252
+ npx huaweicloud-devkit version
253
+ npx --yes huaweicloud-devkit@latest update --target all
131
254
  ```
132
255
 
133
- > **Prerequisite:** Node.js >= 20. Run `npx huaweicloud-devkit auth init` for unified credentials.
256
+ `update` is incremental — it refreshes installed files without touching your
257
+ config. Always keep `@latest` so npm fetches the newest version instead of a
258
+ locally cached older one.
134
259
 
135
260
  ## What It Does
136
261
 
@@ -138,6 +263,7 @@ npx --yes huaweicloud-devkit install
138
263
  - **Safety-first execution** — all write operations require explicit user approval; credentials and secrets are automatically redacted from output
139
264
  - **Pre-execution risk checks** — public exposure, credential leaks, and destructive operations are caught before they run
140
265
  - **Regional awareness** — auto-discovers available regions and checks service availability before creating resources
266
+ - **Sandbox (DevStation)** — temporary cloud runtime for web app deployment with instant public URL preview
141
267
 
142
268
  ## Supported Services
143
269
 
package/README.zh-CN.md CHANGED
@@ -3,32 +3,55 @@
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。
13
+
14
+ ## Cursor Directory 插件
15
+
16
+ 本仓库同时作为 [Open Plugins](https://open-plugins.com) 包挂载到 [Cursor Directory](https://cursor.directory) 市场。根目录的 `plugin.json`、`mcp.json`、`skills/`、`rules/` 仅用于 Cursor Directory 的仓库扫描发现,**不会**打入 npm 包(`package.json` 的 `files` 白名单未包含它们)。npm 包的 manifests 位于 `plugins/huaweicloud-core/`。
17
+
18
+ `mcp.json` 中的 MCP 服务通过 `npx -y -p huaweicloud-devkit huaweicloud-devkit-mcp` 启动,跟踪的是 npm 的 `latest` tag。预发布阶段可能与 manifest 中的 `version` 不一致,稳定发版后可以固定版本。
12
19
 
13
20
  ## 前置条件
14
21
 
15
- - Node.js >= 20
22
+ - Node.js >= 22
23
+
24
+ > **国内用户**:使用默认 npm 镜像时可能遇到下载缓慢或连接失败的问题,建议配置华为云 npm 镜像:
25
+ >
26
+ > ```bash
27
+ > npm config set registry https://mirrors.huaweicloud.com/repository/npm/
28
+ > ```
29
+ >
30
+ > 恢复默认镜像:`npm config delete registry`
16
31
 
17
32
  ## 快速开始
18
33
 
34
+ > 省略 `--target` 时,安装器会自动检测机器上的 agent,检测到多个时**全部安装**。建议始终指定 `--target` 以明确安装目标。
35
+
36
+ ```bash
37
+ npx --yes huaweicloud-devkit version # 查看各 agent 已安装的插件版本
38
+ npx --yes huaweicloud-devkit uninstall --target all --clean-global # 一并删除 KooCLI 与 OBS 配置
39
+ ```
40
+
19
41
  ### OpenCode
20
42
 
21
43
  ```bash
22
- npx --yes huaweicloud-devkit install
44
+ npx --yes huaweicloud-devkit install --target opencode
23
45
  ```
24
46
 
25
- 自动安装 DevKit。安装后**重启会话**。
47
+ 安装后**重启会话**。
26
48
 
27
49
  ```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 # 卸载
50
+ npx --yes huaweicloud-devkit doctor --target opencode
51
+ npx --yes huaweicloud-devkit status --target opencode
52
+ npx --yes huaweicloud-devkit update --target opencode
53
+ npx --yes huaweicloud-devkit uninstall --target opencode
54
+ rm -rf ~/.npm/_npx/ # 仅 Linux/macOS;Windows 路径待确认
32
55
  ```
33
56
 
34
57
  ### Codex
@@ -37,16 +60,16 @@ npx --yes huaweicloud-devkit uninstall # 卸载
37
60
  npx --yes huaweicloud-devkit install --target codex
38
61
  ```
39
62
 
40
- > 需要先安装 Codex CLI。
63
+ 安装后**重启 Codex 会话**。
41
64
 
42
65
  ```bash
43
- npx --yes huaweicloud-devkit doctor # 自检
66
+ npx --yes huaweicloud-devkit doctor --target codex
44
67
  npx --yes huaweicloud-devkit status --target codex
45
- npx --yes huaweicloud-devkit update --target codex # 更新
68
+ npx --yes huaweicloud-devkit update --target codex
46
69
  npx --yes huaweicloud-devkit uninstall --target codex
47
70
  ```
48
71
 
49
- > **Codex Desktop**(Windows):将 `--target codex` 换成 `--target codex-desktop`,命令相同。
72
+ > **需要 Codex CLI** — `codex` 命令必须在 PATH 中。若 Codex 通过 WindowsApps(Microsoft Store)安装,请使用 `--target codex-desktop` 替代。运行 `codex --version` 验证 CLI 可用性。
50
73
 
51
74
  ### CodeArts Agent(码道)
52
75
 
@@ -57,16 +80,30 @@ npx --yes huaweicloud-devkit install --target codearts
57
80
  安装后**重启会话**。
58
81
 
59
82
  ```bash
60
- npx --yes huaweicloud-devkit install-hcloud # 安装 KooCLI
61
- npx --yes huaweicloud-devkit doctor # 自检
83
+ npx --yes huaweicloud-devkit doctor --target codearts
62
84
  npx --yes huaweicloud-devkit status --target codearts
63
85
  npx --yes huaweicloud-devkit update --target codearts
64
86
  npx --yes huaweicloud-devkit uninstall --target codearts
65
87
  ```
66
88
 
67
- > **沙箱模式**:码道默认沙箱模式会阻止 KooCLI 运行。`install-hcloud` 自动检测并给出指引——请在码道外终端安装使用 KooCLI,或在码道设置中关闭沙箱模式(设置 → 权限 → Bash 模式)。
68
- >
69
- > **认证**:执行 `npx huaweicloud-devkit auth init`,统一配置 KooCLI、OBS 和沙箱接口所需的 AK/SK。
89
+ > **沙箱模式**:码道默认沙箱模式会阻止 KooCLI 运行。`install-hcloud` 自动检测并给出指引——请在码道外终端安装使用 KooCLI,或在码道设置中关闭沙箱模式(设置 → 对话流 → 智能体 终端命令运行模式 → 自动运行)。
90
+
91
+ ### CodeArts Work(码道工作空间)
92
+
93
+ ```bash
94
+ npx --yes huaweicloud-devkit install --target codearts-work
95
+ ```
96
+
97
+ 安装后**重启会话**。
98
+
99
+ ```bash
100
+ npx --yes huaweicloud-devkit doctor --target codearts-work
101
+ npx --yes huaweicloud-devkit status --target codearts-work
102
+ npx --yes huaweicloud-devkit update --target codearts-work
103
+ npx --yes huaweicloud-devkit uninstall --target codearts-work
104
+ ```
105
+
106
+ > **CodeArts Work**(工作空间,appId: `com.codearts.work`)使用用户级配置 `%USERPROFILE%\.codeartswork\`,不创建项目级目录。
70
107
 
71
108
  ### WorkBuddy
72
109
 
@@ -77,58 +114,146 @@ npx --yes huaweicloud-devkit install --target workbuddy
77
114
  安装后**重启会话**。
78
115
 
79
116
  ```bash
80
- npx --yes huaweicloud-devkit doctor
117
+ npx --yes huaweicloud-devkit doctor --target workbuddy
81
118
  npx --yes huaweicloud-devkit status --target workbuddy
82
- npx --yes huaweicloud-devkit update --target workbuddy # 更新
119
+ npx --yes huaweicloud-devkit update --target workbuddy
83
120
  npx --yes huaweicloud-devkit uninstall --target workbuddy
84
121
  ```
85
122
 
86
- > **更新机制**:`update` 按 agent 增量更新,只刷新必要文件、不动你的配置文件。`update --target all` 可一次更新所有已安装的 agent。
87
-
88
123
  ### DeepSeek Harness(DSH)
89
124
 
90
125
  ```bash
91
126
  npx --yes huaweicloud-devkit install --target dsh
92
127
  ```
93
128
 
94
- 安装器会把 Skills 写入 `$DSH_HOME/skills`,把 MCP Server 和安全策略写入
95
- `$DSH_HOME/huaweicloud-plugins`,并自动维护
96
- `$DSH_HOME/profiles/web/cordis.patch.yml`。安装后**重启 DSH 会话**。
129
+ 安装后**重启 DSH 会话**。
97
130
 
98
131
  ```bash
99
- npx --yes huaweicloud-devkit doctor
132
+ npx --yes huaweicloud-devkit doctor --target dsh
100
133
  npx --yes huaweicloud-devkit status --target dsh
101
134
  npx --yes huaweicloud-devkit update --target dsh
102
135
  npx --yes huaweicloud-devkit uninstall --target dsh
103
136
  ```
104
137
 
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`。
138
+ > DSH V1 通过 `@deepseek-ai/dsh-mcp-client` 复用现有 MCP Server。如果安装器提示客户端未检测到,请执行:`npx @deepseek-ai/dsh plugin --profile web add @deepseek-ai/dsh-mcp-client`。
139
+
140
+ ### OfficeAce
141
+
142
+ ```bash
143
+ npx --yes huaweicloud-devkit install --target officeace
144
+ ```
145
+
146
+ 安装后**重启 OfficeAce**。
147
+
148
+ ```bash
149
+ npx --yes huaweicloud-devkit doctor --target officeace
150
+ npx --yes huaweicloud-devkit status --target officeace
151
+ npx --yes huaweicloud-devkit update --target officeace
152
+ npx --yes huaweicloud-devkit uninstall --target officeace
153
+ ```
154
+
155
+ ### Hermes
156
+
157
+ ```bash
158
+ npx --yes huaweicloud-devkit install --target hermes
159
+ ```
160
+
161
+ 安装后**重启 Hermes 会话**。
162
+
163
+ ```bash
164
+ npx --yes huaweicloud-devkit doctor --target hermes
165
+ npx --yes huaweicloud-devkit status --target hermes
166
+ npx --yes huaweicloud-devkit update --target hermes
167
+ npx --yes huaweicloud-devkit uninstall --target hermes
168
+ ```
169
+
170
+ > **卸载说明**:Linux 上卸载后执行 `rm -rf ~/.npm/_npx/* && npm cache clean --force` 确保下次全新安装。Windows 上先关闭所有 Hermes 会话(释放文件锁),卸载后检查 `%LOCALAPPDATA%\hermes\config.yaml` 是否有 YAML 损坏,如有残留文件手动删除 `%LOCALAPPDATA%\hermes\huaweicloud-plugins`。
171
+ > **安全钩子(Safety hooks)**:安装器会在 `config.yaml` 中写入 shell hooks 配置(`hooks.pre_tool_call`),拦截不安全的终端命令,如读取凭据文件、导出环境变量、未审批的 `hcloud` 写操作。Hermes 首次使用时会弹出同意提示,可批准或设置 `hooks_auto_accept: true` 自动批准。
172
+ > **MCP Python SDK**:安装器会自动安装 Hermes 所需的 `mcp` Python 包。如果 doctor 显示 `[FAIL] Hermes MCP Python SDK`,手动执行 `pip3 install mcp`。
173
+ > **Windows**:参见 [docs/hermes-windows.md](docs/hermes-windows.md) 了解已知问题和解决方法。
174
+
175
+ ### OpenClaw
176
+
177
+ ```bash
178
+ # 推荐方式 (ClawHub)
179
+ openclaw plugins install clawhub:huaweicloud-devkit
180
+ openclaw plugins uninstall huaweicloud-devkit
181
+ openclaw plugins update huaweicloud-devkit
182
+ ```
183
+
184
+ 安装后**重启 OpenClaw**。如提示安全风险确认,加 `--acknowledge-clawhub-risk`。
185
+
186
+ ```bash
187
+ # 或通过 npx
188
+ npx --yes huaweicloud-devkit install --target openclaw
189
+ npx --yes huaweicloud-devkit status --target openclaw
190
+ npx --yes huaweicloud-devkit update --target openclaw
191
+ npx --yes huaweicloud-devkit uninstall --target openclaw
192
+ rm -rf ~/.npm/_npx/ # 仅 Linux/macOS;Windows 路径待确认
193
+ ```
194
+
195
+ ### AtomCode
196
+
197
+ ```bash
198
+ npx --yes huaweicloud-devkit install --target atomcode
199
+ ```
200
+
201
+ 安装后**重启 AtomCode 会话**。
202
+
203
+ ```bash
204
+ npx --yes huaweicloud-devkit doctor --target atomcode
205
+ npx --yes huaweicloud-devkit status --target atomcode
206
+ npx --yes huaweicloud-devkit update --target atomcode
207
+ npx --yes huaweicloud-devkit uninstall --target atomcode
208
+ ```
108
209
 
109
210
  ### 其他 Agent
110
211
 
111
- 支持 MCP 协议的 Agent,手动配置:
212
+ 任何支持 MCP 协议的 Agent,直接使用标准 MCP 配置:
112
213
 
113
214
  ```json
114
215
  {
115
- "mcp": {
216
+ "mcpServers": {
116
217
  "huaweicloud-devkit": {
117
- "type": "local",
118
- "command": ["node", "<路径>/plugins/huaweicloud-core/src/mcp-server.mjs"],
119
- "enabled": true
218
+ "command": "npx",
219
+ "args": ["-y", "-p", "huaweicloud-devkit", "huaweicloud-devkit-mcp"]
120
220
  }
121
221
  }
122
222
  }
123
223
  ```
124
224
 
125
- 然后安装:
225
+ 无需预安装 — `npx` 自动处理一切。
226
+
227
+ > 项目级 AK/SK 可通过 MCP 配置的 `env` 字段设置 `HW_ACCESS_KEY`/`HW_SECRET_KEY`。
228
+
229
+ ### 安装 KooCLI
230
+
231
+ ```bash
232
+ npx --yes huaweicloud-devkit install-hcloud
233
+ ```
234
+
235
+ ### 配置凭据
236
+
237
+ ```bash
238
+ npx --yes huaweicloud-devkit auth init
239
+ ```
240
+
241
+ 一步同步 AK/SK 到 KooCLI、OBS 和沙箱接口。
242
+
243
+ ### 安装所有 Agent
244
+
245
+ ```bash
246
+ npx --yes huaweicloud-devkit install --target all
247
+ ```
248
+
249
+ ### 更新所有 Agent
126
250
 
127
251
  ```bash
128
- npx --yes huaweicloud-devkit install
252
+ npx huaweicloud-devkit version
253
+ npx --yes huaweicloud-devkit@latest update --target all
129
254
  ```
130
255
 
131
- > **前置条件:** Node.js >= 20。执行 `npx huaweicloud-devkit auth init` 完成统一认证。
256
+ `update` 是增量更新——只刷新已安装的文件,不动配置文件。请务必保留 `@latest`,确保 npm 获取最新版本而非本地缓存的旧版本。
132
257
 
133
258
  ## 功能特性
134
259
 
@@ -136,6 +261,7 @@ npx --yes huaweicloud-devkit install
136
261
  - **安全优先执行** — 所有写操作需用户明确批准;凭证和密钥自动脱敏
137
262
  - **执行前风险检查** — 公网暴露、凭证泄露、破坏性操作在执行前即被拦截
138
263
  - **区域感知** — 自动发现可用区域,创建资源前检查服务可用性
264
+ - **沙箱(DevStation)** — 临时云端运行环境,部署 Web 应用并即刻获得公网预览地址
139
265
 
140
266
  ## 支持的服务
141
267