huaweicloud-devkit 1.0.3-dev.0 → 1.1.0-next.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 (96) hide show
  1. package/.agents/plugins/marketplace.json +18 -18
  2. package/README.md +114 -41
  3. package/README.zh-CN.md +114 -41
  4. package/bin/setup.cjs +7 -4
  5. package/integrations/opencode/opencode.json +1 -4
  6. package/package.json +63 -42
  7. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +4 -17
  8. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +4 -17
  9. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +4 -17
  10. package/plugins/huaweicloud-core/.hermes-plugin/plugin.json +30 -0
  11. package/plugins/huaweicloud-core/.mcp.json +2 -5
  12. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +4 -18
  13. package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +32 -9
  14. package/plugins/huaweicloud-core/openclaw.plugin.json +20 -0
  15. package/plugins/huaweicloud-core/safety/policy.json +75 -99
  16. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +41 -13
  17. package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +34 -34
  18. package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +18 -18
  19. package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +19 -19
  20. package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +34 -32
  21. package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +30 -30
  22. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +20 -20
  23. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +31 -31
  24. package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +21 -20
  25. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +39 -30
  26. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +8 -1
  27. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +6 -0
  28. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +39 -36
  29. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +15 -4
  30. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +11 -9
  31. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +13 -13
  32. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +40 -39
  33. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +12 -10
  34. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +21 -20
  35. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +19 -19
  36. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +20 -20
  37. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +27 -23
  38. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +27 -27
  39. package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +65 -39
  40. package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +9 -9
  41. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +33 -25
  42. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +51 -44
  43. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +19 -19
  44. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +12 -7
  45. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +13 -12
  46. package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +4 -4
  47. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +63 -58
  48. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +128 -42
  49. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +26 -26
  50. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +39 -39
  51. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +13 -12
  52. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +20 -19
  53. package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +15 -15
  54. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +18 -18
  55. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +13 -13
  56. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +3 -3
  57. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +25 -2
  58. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +3 -3
  59. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +27 -1
  60. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +3 -3
  61. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +65 -47
  62. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +3 -3
  63. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +6 -6
  64. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +15 -1
  65. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +0 -1
  66. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +3 -3
  67. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +33 -33
  68. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +3 -3
  69. package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +134 -2
  70. package/plugins/huaweicloud-core/src/auth/credentials.mjs +77 -4
  71. package/plugins/huaweicloud-core/src/auth/service.mjs +2 -1
  72. package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
  73. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +27 -8
  74. package/plugins/huaweicloud-core/src/icon-library.mjs +176 -0
  75. package/plugins/huaweicloud-core/src/mcp-server.mjs +31 -3
  76. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +73 -0
  77. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +94 -0
  78. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +4 -1
  79. package/plugins/huaweicloud-core/src/safety-policy.mjs +123 -68
  80. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +14 -10
  81. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +35 -27
  82. package/plugins/huaweicloud-core/src/sandbox/sandbox-file-server.py +45 -0
  83. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +526 -8
  84. package/plugins/huaweicloud-core/src/search-market.mjs +55 -16
  85. package/plugins/huaweicloud-core/src/setup-cli.mjs +1942 -206
  86. package/plugins/huaweicloud-core/src/tools.mjs +678 -131
  87. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +72 -38
  88. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +10 -5
  89. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +13 -16
  90. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +12 -16
  91. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +46 -31
  92. package/plugins/huaweicloud-core/src/ws-exec/hwlink-tunnel-channel.mjs +268 -0
  93. package/plugins/huaweicloud-core/src/ws-exec/index.js +3 -0
  94. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +11 -5
  95. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +0 -190
  96. 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
+ "name": "huaweicloud-devkit",
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
+ ]
20
20
  }
package/README.md CHANGED
@@ -8,46 +8,32 @@
8
8
 
9
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
10
 
11
- Supports OpenCode, Codex, CodeArts Agent, and WorkBuddy.
11
+ Supports OpenCode, CodeArts Agent, WorkBuddy, DeepSeek Harness (DSH), OfficeAce, OpenClaw, and AtomCode.
12
12
 
13
13
  ## Prerequisites
14
14
 
15
- - Node.js >= 20
15
+ - Node.js >= 22
16
16
 
17
17
  ## Quick Start
18
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
- ```
19
+ > 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.
33
20
 
34
- ### Codex
21
+ ### OpenCode
35
22
 
36
23
  ```bash
37
- npx --yes huaweicloud-devkit install --target codex
24
+ npx --yes huaweicloud-devkit install --target opencode
38
25
  ```
39
26
 
40
- > The Codex CLI must be installed first.
27
+ **Restart the session** after installation.
41
28
 
42
29
  ```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
30
+ npx --yes huaweicloud-devkit doctor --target opencode
31
+ npx --yes huaweicloud-devkit status --target opencode
32
+ npx --yes huaweicloud-devkit update --target opencode
33
+ npx --yes huaweicloud-devkit uninstall --target opencode
34
+ rm -rf ~/.npm/_npx/ # Linux/macOS only; Windows path TBD
47
35
  ```
48
36
 
49
- > **Codex Desktop** (Windows): use `--target codex-desktop` with the same commands.
50
-
51
37
  ### CodeArts Agent
52
38
 
53
39
  ```bash
@@ -57,16 +43,13 @@ npx --yes huaweicloud-devkit install --target codearts
57
43
  **Restart the session** after installation.
58
44
 
59
45
  ```bash
60
- npx --yes huaweicloud-devkit install-hcloud # install KooCLI
61
- npx --yes huaweicloud-devkit doctor # self-check
46
+ npx --yes huaweicloud-devkit doctor --target codearts
62
47
  npx --yes huaweicloud-devkit status --target codearts
63
48
  npx --yes huaweicloud-devkit update --target codearts
64
49
  npx --yes huaweicloud-devkit uninstall --target codearts
65
50
  ```
66
51
 
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 → PermissionsBash mode).
68
- >
69
- > **Authentication**: Run `npx huaweicloud-devkit auth init` to configure unified AK/SK credentials for KooCLI, OBS, and sandbox APIs.
52
+ > **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 → ChatsAgents Terminal Command Running Mode → Auto Running).
70
53
 
71
54
  ### WorkBuddy
72
55
 
@@ -77,37 +60,125 @@ npx --yes huaweicloud-devkit install --target workbuddy
77
60
  **Restart the session** after installation.
78
61
 
79
62
  ```bash
80
- npx --yes huaweicloud-devkit doctor
63
+ npx --yes huaweicloud-devkit doctor --target workbuddy
81
64
  npx --yes huaweicloud-devkit status --target workbuddy
82
- npx --yes huaweicloud-devkit update --target workbuddy # update
65
+ npx --yes huaweicloud-devkit update --target workbuddy
83
66
  npx --yes huaweicloud-devkit uninstall --target workbuddy
84
67
  ```
85
68
 
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.
69
+ ### DeepSeek Harness (DSH)
70
+
71
+ ```bash
72
+ npx --yes huaweicloud-devkit install --target dsh
73
+ ```
74
+
75
+ **Restart the DSH session** after installation.
76
+
77
+ ```bash
78
+ npx --yes huaweicloud-devkit doctor --target dsh
79
+ npx --yes huaweicloud-devkit status --target dsh
80
+ npx --yes huaweicloud-devkit update --target dsh
81
+ npx --yes huaweicloud-devkit uninstall --target dsh
82
+ ```
83
+
84
+ > 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`.
85
+
86
+ ### OfficeAce
87
+
88
+ ```bash
89
+ npx --yes huaweicloud-devkit install --target officeace
90
+ ```
91
+
92
+ **Restart OfficeAce** after installation.
93
+
94
+ ```bash
95
+ npx --yes huaweicloud-devkit doctor --target officeace
96
+ npx --yes huaweicloud-devkit status --target officeace
97
+ npx --yes huaweicloud-devkit update --target officeace
98
+ npx --yes huaweicloud-devkit uninstall --target officeace
99
+ ```
100
+
101
+ ### OpenClaw
102
+
103
+ ```bash
104
+ # Recommended (ClawHub)
105
+ openclaw plugins install clawhub:huaweicloud-devkit
106
+ openclaw plugins uninstall huaweicloud-devkit
107
+ openclaw plugins update huaweicloud-devkit
108
+ ```
109
+
110
+ **Restart OpenClaw** after installation. If prompted for security risk acknowledgment, add `--acknowledge-clawhub-risk`.
111
+
112
+ ```bash
113
+ # Or via npx
114
+ npx --yes huaweicloud-devkit install --target openclaw
115
+ npx --yes huaweicloud-devkit status --target openclaw
116
+ npx --yes huaweicloud-devkit update --target openclaw
117
+ npx --yes huaweicloud-devkit uninstall --target openclaw
118
+ rm -rf ~/.npm/_npx/ # Linux/macOS only; Windows path TBD
119
+ ```
120
+
121
+ ### AtomCode
122
+
123
+ ```bash
124
+ npx --yes huaweicloud-devkit install --target atomcode
125
+ ```
126
+
127
+ **Restart the AtomCode session** after installation.
128
+
129
+ ```bash
130
+ npx --yes huaweicloud-devkit doctor --target atomcode
131
+ npx --yes huaweicloud-devkit status --target atomcode
132
+ npx --yes huaweicloud-devkit update --target atomcode
133
+ npx --yes huaweicloud-devkit uninstall --target atomcode
134
+ ```
87
135
 
88
136
  ### Other Agents
89
137
 
90
- For agents that support the Model Context Protocol (MCP):
138
+ Any agent that supports MCP can use the standard config:
91
139
 
92
140
  ```json
93
141
  {
94
- "mcp": {
142
+ "mcpServers": {
95
143
  "huaweicloud-devkit": {
96
- "type": "local",
97
- "command": ["node", "<path>/plugins/huaweicloud-core/src/mcp-server.mjs"],
98
- "enabled": true
144
+ "command": "npx",
145
+ "args": ["-y", "-p", "huaweicloud-devkit", "huaweicloud-devkit-mcp"]
99
146
  }
100
147
  }
101
148
  }
102
149
  ```
103
150
 
104
- Then install:
151
+ No installation required — `npx` handles everything.
152
+
153
+ > Set `HW_ACCESS_KEY`/`HW_SECRET_KEY` in the MCP config `env` field for project-level credentials.
154
+
155
+ ### Install KooCLI
156
+
157
+ ```bash
158
+ npx --yes huaweicloud-devkit install-hcloud
159
+ ```
160
+
161
+ ### Configure Credentials
162
+
163
+ ```bash
164
+ npx --yes huaweicloud-devkit auth init
165
+ ```
166
+
167
+ Synchronizes AK/SK to KooCLI, OBS, and sandbox APIs in one step.
168
+
169
+ ### Install All Agents
170
+
171
+ ```bash
172
+ npx --yes huaweicloud-devkit install --target all
173
+ ```
174
+
175
+ ### Update All Agents
105
176
 
106
177
  ```bash
107
- npx --yes huaweicloud-devkit install
178
+ npx --yes huaweicloud-devkit update --target all
108
179
  ```
109
180
 
110
- > **Prerequisite:** Node.js >= 20. Run `npx huaweicloud-devkit auth init` for unified credentials.
181
+ `update` is incremental it refreshes installed files without touching your config.
111
182
 
112
183
  ## What It Does
113
184
 
@@ -115,6 +186,7 @@ npx --yes huaweicloud-devkit install
115
186
  - **Safety-first execution** — all write operations require explicit user approval; credentials and secrets are automatically redacted from output
116
187
  - **Pre-execution risk checks** — public exposure, credential leaks, and destructive operations are caught before they run
117
188
  - **Regional awareness** — auto-discovers available regions and checks service availability before creating resources
189
+ - **Sandbox (DevStation)** — temporary cloud runtime for web app deployment with instant public URL preview
118
190
 
119
191
  ## Supported Services
120
192
 
@@ -125,6 +197,7 @@ ECS, OBS, VPC, IAM, RDS, GaussDB, FunctionGraph, APIG, CCE, SMN/DMS, ModelArts,
125
197
  - [Architecture](docs/architecture.md)
126
198
  - [Safety Model](docs/safety-model.md)
127
199
  - [Hook Rule Model](docs/hook-rule-model.md)
200
+ - [DeepSeek Harness Integration](docs/dsh-integration.md)
128
201
  - [Changelog](docs/CHANGELOG.md)
129
202
  - [KooCLI official docs](https://support.huaweicloud.com/qs-hcli/hcli_02_003.html)
130
203
 
package/README.zh-CN.md CHANGED
@@ -8,46 +8,32 @@
8
8
 
9
9
  帮助 AI 编码助手安全、准确地使用华为云——一站式集成云知识、CLI 工具和安全护栏。
10
10
 
11
- 支持 OpenCode、Codex、码道(CodeArts Agent)、WorkBuddy。
11
+ 支持 OpenCode、码道(CodeArts Agent)、WorkBuddy、DeepSeek Harness(DSH)、OfficeAce、OpenClaw、AtomCode
12
12
 
13
13
  ## 前置条件
14
14
 
15
- - Node.js >= 20
15
+ - Node.js >= 22
16
16
 
17
17
  ## 快速开始
18
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
- ```
19
+ > 省略 `--target` 时,安装器会自动检测机器上的 agent,检测到多个时**全部安装**。建议始终指定 `--target` 以明确安装目标。
33
20
 
34
- ### Codex
21
+ ### OpenCode
35
22
 
36
23
  ```bash
37
- npx --yes huaweicloud-devkit install --target codex
24
+ npx --yes huaweicloud-devkit install --target opencode
38
25
  ```
39
26
 
40
- > 需要先安装 Codex CLI。
27
+ 安装后**重启会话**。
41
28
 
42
29
  ```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
30
+ npx --yes huaweicloud-devkit doctor --target opencode
31
+ npx --yes huaweicloud-devkit status --target opencode
32
+ npx --yes huaweicloud-devkit update --target opencode
33
+ npx --yes huaweicloud-devkit uninstall --target opencode
34
+ rm -rf ~/.npm/_npx/ # 仅 Linux/macOS;Windows 路径待确认
47
35
  ```
48
36
 
49
- > **Codex Desktop**(Windows):将 `--target codex` 换成 `--target codex-desktop`,命令相同。
50
-
51
37
  ### CodeArts Agent(码道)
52
38
 
53
39
  ```bash
@@ -57,16 +43,13 @@ npx --yes huaweicloud-devkit install --target codearts
57
43
  安装后**重启会话**。
58
44
 
59
45
  ```bash
60
- npx --yes huaweicloud-devkit install-hcloud # 安装 KooCLI
61
- npx --yes huaweicloud-devkit doctor # 自检
46
+ npx --yes huaweicloud-devkit doctor --target codearts
62
47
  npx --yes huaweicloud-devkit status --target codearts
63
48
  npx --yes huaweicloud-devkit update --target codearts
64
49
  npx --yes huaweicloud-devkit uninstall --target codearts
65
50
  ```
66
51
 
67
- > **沙箱模式**:码道默认沙箱模式会阻止 KooCLI 运行。`install-hcloud` 自动检测并给出指引——请在码道外终端安装使用 KooCLI,或在码道设置中关闭沙箱模式(设置 → 权限Bash 模式)。
68
- >
69
- > **认证**:执行 `npx huaweicloud-devkit auth init`,统一配置 KooCLI、OBS 和沙箱接口所需的 AK/SK。
52
+ > **沙箱模式**:码道默认沙箱模式会阻止 KooCLI 运行。`install-hcloud` 自动检测并给出指引——请在码道外终端安装使用 KooCLI,或在码道设置中关闭沙箱模式(设置 → 对话流智能体 终端命令运行模式 → 自动运行)。
70
53
 
71
54
  ### WorkBuddy
72
55
 
@@ -77,37 +60,125 @@ npx --yes huaweicloud-devkit install --target workbuddy
77
60
  安装后**重启会话**。
78
61
 
79
62
  ```bash
80
- npx --yes huaweicloud-devkit doctor
63
+ npx --yes huaweicloud-devkit doctor --target workbuddy
81
64
  npx --yes huaweicloud-devkit status --target workbuddy
82
- npx --yes huaweicloud-devkit update --target workbuddy # 更新
65
+ npx --yes huaweicloud-devkit update --target workbuddy
83
66
  npx --yes huaweicloud-devkit uninstall --target workbuddy
84
67
  ```
85
68
 
86
- > **更新机制**:`update` 按 agent 增量更新,只刷新必要文件、不动你的配置文件。`update --target all` 可一次更新所有已安装的 agent。
69
+ ### DeepSeek Harness(DSH)
70
+
71
+ ```bash
72
+ npx --yes huaweicloud-devkit install --target dsh
73
+ ```
74
+
75
+ 安装后**重启 DSH 会话**。
76
+
77
+ ```bash
78
+ npx --yes huaweicloud-devkit doctor --target dsh
79
+ npx --yes huaweicloud-devkit status --target dsh
80
+ npx --yes huaweicloud-devkit update --target dsh
81
+ npx --yes huaweicloud-devkit uninstall --target dsh
82
+ ```
83
+
84
+ > DSH V1 通过 `@deepseek-ai/dsh-mcp-client` 复用现有 MCP Server。如果安装器提示客户端未检测到,请执行:`npx @deepseek-ai/dsh plugin --profile web add @deepseek-ai/dsh-mcp-client`。
85
+
86
+ ### OfficeAce
87
+
88
+ ```bash
89
+ npx --yes huaweicloud-devkit install --target officeace
90
+ ```
91
+
92
+ 安装后**重启 OfficeAce**。
93
+
94
+ ```bash
95
+ npx --yes huaweicloud-devkit doctor --target officeace
96
+ npx --yes huaweicloud-devkit status --target officeace
97
+ npx --yes huaweicloud-devkit update --target officeace
98
+ npx --yes huaweicloud-devkit uninstall --target officeace
99
+ ```
100
+
101
+ ### OpenClaw
102
+
103
+ ```bash
104
+ # 推荐方式 (ClawHub)
105
+ openclaw plugins install clawhub:huaweicloud-devkit
106
+ openclaw plugins uninstall huaweicloud-devkit
107
+ openclaw plugins update huaweicloud-devkit
108
+ ```
109
+
110
+ 安装后**重启 OpenClaw**。如提示安全风险确认,加 `--acknowledge-clawhub-risk`。
111
+
112
+ ```bash
113
+ # 或通过 npx
114
+ npx --yes huaweicloud-devkit install --target openclaw
115
+ npx --yes huaweicloud-devkit status --target openclaw
116
+ npx --yes huaweicloud-devkit update --target openclaw
117
+ npx --yes huaweicloud-devkit uninstall --target openclaw
118
+ rm -rf ~/.npm/_npx/ # 仅 Linux/macOS;Windows 路径待确认
119
+ ```
120
+
121
+ ### AtomCode
122
+
123
+ ```bash
124
+ npx --yes huaweicloud-devkit install --target atomcode
125
+ ```
126
+
127
+ 安装后**重启 AtomCode 会话**。
128
+
129
+ ```bash
130
+ npx --yes huaweicloud-devkit doctor --target atomcode
131
+ npx --yes huaweicloud-devkit status --target atomcode
132
+ npx --yes huaweicloud-devkit update --target atomcode
133
+ npx --yes huaweicloud-devkit uninstall --target atomcode
134
+ ```
87
135
 
88
136
  ### 其他 Agent
89
137
 
90
- 支持 MCP 协议的 Agent,手动配置:
138
+ 任何支持 MCP 协议的 Agent,直接使用标准 MCP 配置:
91
139
 
92
140
  ```json
93
141
  {
94
- "mcp": {
142
+ "mcpServers": {
95
143
  "huaweicloud-devkit": {
96
- "type": "local",
97
- "command": ["node", "<路径>/plugins/huaweicloud-core/src/mcp-server.mjs"],
98
- "enabled": true
144
+ "command": "npx",
145
+ "args": ["-y", "-p", "huaweicloud-devkit", "huaweicloud-devkit-mcp"]
99
146
  }
100
147
  }
101
148
  }
102
149
  ```
103
150
 
104
- 然后安装:
151
+ 无需预安装 — `npx` 自动处理一切。
152
+
153
+ > 项目级 AK/SK 可通过 MCP 配置的 `env` 字段设置 `HW_ACCESS_KEY`/`HW_SECRET_KEY`。
154
+
155
+ ### 安装 KooCLI
156
+
157
+ ```bash
158
+ npx --yes huaweicloud-devkit install-hcloud
159
+ ```
160
+
161
+ ### 配置凭据
162
+
163
+ ```bash
164
+ npx --yes huaweicloud-devkit auth init
165
+ ```
166
+
167
+ 一步同步 AK/SK 到 KooCLI、OBS 和沙箱接口。
168
+
169
+ ### 安装所有 Agent
170
+
171
+ ```bash
172
+ npx --yes huaweicloud-devkit install --target all
173
+ ```
174
+
175
+ ### 更新所有 Agent
105
176
 
106
177
  ```bash
107
- npx --yes huaweicloud-devkit install
178
+ npx --yes huaweicloud-devkit update --target all
108
179
  ```
109
180
 
110
- > **前置条件:** Node.js >= 20。执行 `npx huaweicloud-devkit auth init` 完成统一认证。
181
+ `update` 是增量更新——只刷新已安装的文件,不动配置文件。
111
182
 
112
183
  ## 功能特性
113
184
 
@@ -115,6 +186,7 @@ npx --yes huaweicloud-devkit install
115
186
  - **安全优先执行** — 所有写操作需用户明确批准;凭证和密钥自动脱敏
116
187
  - **执行前风险检查** — 公网暴露、凭证泄露、破坏性操作在执行前即被拦截
117
188
  - **区域感知** — 自动发现可用区域,创建资源前检查服务可用性
189
+ - **沙箱(DevStation)** — 临时云端运行环境,部署 Web 应用并即刻获得公网预览地址
118
190
 
119
191
  ## 支持的服务
120
192
 
@@ -125,6 +197,7 @@ ECS、OBS、VPC、IAM、RDS、GaussDB、FunctionGraph、APIG、CCE、SMN/DMS、M
125
197
  - [架构](docs/architecture.md)
126
198
  - [安全模型](docs/safety-model.md)
127
199
  - [Hook 规则模型](docs/hook-rule-model.md)
200
+ - [DeepSeek Harness 集成](docs/dsh-integration.md)
128
201
  - [变更记录](docs/CHANGELOG.md)
129
202
  - [KooCLI 官方文档](https://support.huaweicloud.com/qs-hcli/hcli_02_003.html)
130
203
 
package/bin/setup.cjs CHANGED
@@ -1,8 +1,11 @@
1
1
  #!/usr/bin/env node
2
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);
3
+ const path = require('node:path');
4
+ const fileUrl = require('node:url').pathToFileURL(
5
+ path.join(__dirname, '..', 'plugins', 'huaweicloud-core', 'src', 'setup-cli.mjs'),
6
+ ).href;
7
+
8
+ import(fileUrl).catch((error) => {
9
+ console.error(error.message);
7
10
  process.exit(1);
8
11
  });
@@ -4,10 +4,7 @@
4
4
  "mcp": {
5
5
  "huaweicloud-devkit": {
6
6
  "type": "local",
7
- "command": [
8
- "node",
9
- "<绝对路径>/plugins/huaweicloud-core/src/mcp-server.mjs"
10
- ],
7
+ "command": ["node", "<绝对路径>/plugins/huaweicloud-core/src/mcp-server.mjs"],
11
8
  "enabled": true
12
9
  }
13
10
  }
package/package.json CHANGED
@@ -1,44 +1,65 @@
1
1
  {
2
- "name": "huaweicloud-devkit",
3
- "version": "1.0.3-dev.0",
4
- "description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
5
- "type": "module",
6
- "files": [
7
- "bin",
8
- ".agents",
9
- "plugins/huaweicloud-core",
10
- "integrations/opencode"
11
- ],
12
- "bin": {
13
- "huaweicloud-devkit": "./bin/setup.cjs"
14
- },
15
- "repository": {
16
- "type": "git",
17
- "url": "https://github.com/huaweicloud/HuaweiCloud-Devkit.git"
18
- },
19
- "scripts": {
20
- "test": "node --test",
21
- "lint:md": "markdownlint-cli2 \"**/*.md\" \"#node_modules\" \"#.git\" \"#test/**\" \"#docs/**\"",
22
- "lint": "npm run lint:md",
23
- "validate": "node ./scripts/validate-package.mjs",
24
- "postinstall": "node -e \"console.log('\\nHuaweiCloud DevKit installed. Run: npx huaweicloud-devkit install\\n')\""
25
- },
26
- "devDependencies": {
27
- "markdownlint-cli2": "^0.23.2"
28
- },
29
- "keywords": [
30
- "huaweicloud",
31
- "huawei-cloud",
32
- "agent",
33
- "codex",
34
- "opencode",
35
- "workbuddy",
36
- "mcp",
37
- "koocli",
38
- "hcloud"
39
- ],
40
- "license": "Apache-2.0",
41
- "engines": {
42
- "node": ">=20"
43
- }
2
+ "name": "huaweicloud-devkit",
3
+ "version": "1.1.0-next.0",
4
+ "description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
5
+ "type": "module",
6
+ "files": [
7
+ "bin",
8
+ ".agents",
9
+ "plugins/huaweicloud-core",
10
+ "integrations/opencode"
11
+ ],
12
+ "bin": {
13
+ "huaweicloud-devkit": "./bin/setup.cjs",
14
+ "huaweicloud-devkit-mcp": "./plugins/huaweicloud-core/src/mcp-server.mjs"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/huaweicloud/huaweicloud-devkit.git"
19
+ },
20
+ "scripts": {
21
+ "test": "node --test",
22
+ "format": "prettier --write .",
23
+ "format:check": "prettier --check .",
24
+ "lint:md": "markdownlint-cli2 \"**/*.md\" \"#node_modules\" \"#.git\" \"#test/**\" \"#docs/**\"",
25
+ "lint:js": "eslint .",
26
+ "lint": "npm run lint:md && npm run lint:js",
27
+ "validate": "node ./scripts/validate-package.mjs",
28
+ "pack:verify": "node ./scripts/pack-verify.mjs",
29
+ "postinstall": "node -e \"console.log('\\nHuaweiCloud DevKit installed. Run: npx huaweicloud-devkit install\\n')\""
30
+ },
31
+ "dependencies": {
32
+ "better-sqlite3": "^13.0.3",
33
+ "undici": "^8.10.0"
34
+ },
35
+ "devDependencies": {
36
+ "@eslint/js": "^10.0.1",
37
+ "eslint": "^10.8.1",
38
+ "eslint-config-prettier": "^10.1.8",
39
+ "eslint-plugin-import-x": "^4.17.1",
40
+ "eslint-plugin-n": "^18.3.0",
41
+ "eslint-plugin-unicorn": "^73.0.0",
42
+ "globals": "^17.11.0",
43
+ "markdownlint-cli2": "^0.23.2",
44
+ "prettier": "^3.9.6"
45
+ },
46
+ "keywords": [
47
+ "huaweicloud",
48
+ "huawei-cloud",
49
+ "agent",
50
+ "codex",
51
+ "opencode",
52
+ "officeace",
53
+ "office-claw",
54
+ "workbuddy",
55
+ "dsh",
56
+ "deepseek-harness",
57
+ "mcp",
58
+ "koocli",
59
+ "hcloud"
60
+ ],
61
+ "license": "Apache-2.0",
62
+ "engines": {
63
+ "node": ">=22"
64
+ }
44
65
  }