huaweicloud-devkit 1.0.2-next.2 → 1.0.2-next.20

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 +65 -51
  3. package/README.zh-CN.md +65 -49
  4. package/bin/setup.cjs +5 -3
  5. package/integrations/opencode/opencode.json +1 -4
  6. package/package.json +61 -44
  7. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +3 -16
  8. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +3 -16
  9. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +3 -16
  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 +3 -17
  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-cloud-find-skills/SKILL.md +13 -12
  23. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +64 -17
  24. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +20 -20
  25. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +31 -31
  26. package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +21 -20
  27. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +39 -30
  28. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +8 -1
  29. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +6 -0
  30. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +39 -36
  31. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +15 -4
  32. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +11 -9
  33. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +13 -13
  34. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +40 -39
  35. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +12 -10
  36. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +21 -20
  37. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +19 -19
  38. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +20 -20
  39. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +27 -23
  40. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +27 -27
  41. package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +65 -39
  42. package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +9 -9
  43. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +25 -25
  44. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +45 -44
  45. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +19 -19
  46. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +12 -7
  47. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +13 -12
  48. package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +4 -4
  49. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +63 -58
  50. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +127 -42
  51. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +26 -26
  52. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +39 -39
  53. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +13 -12
  54. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +20 -19
  55. package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +15 -15
  56. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +18 -18
  57. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +13 -13
  58. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +3 -3
  59. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +17 -1
  60. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +3 -3
  61. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +27 -1
  62. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +3 -3
  63. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +56 -53
  64. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +3 -3
  65. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +6 -6
  66. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +15 -1
  67. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +0 -1
  68. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +3 -3
  69. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +33 -33
  70. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +3 -3
  71. package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +108 -5
  72. package/plugins/huaweicloud-core/src/auth/credentials.mjs +77 -4
  73. package/plugins/huaweicloud-core/src/auth/service.mjs +1 -1
  74. package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
  75. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +25 -7
  76. package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
  77. package/plugins/huaweicloud-core/src/mcp-server.mjs +30 -3
  78. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +20 -102
  79. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +11 -4
  80. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +4 -1
  81. package/plugins/huaweicloud-core/src/safety-policy.mjs +122 -68
  82. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +9 -9
  83. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +24 -26
  84. package/plugins/huaweicloud-core/src/sandbox/sandbox-file-server.py +45 -0
  85. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +503 -8
  86. package/plugins/huaweicloud-core/src/search-market.mjs +46 -12
  87. package/plugins/huaweicloud-core/src/setup-cli.mjs +1251 -181
  88. package/plugins/huaweicloud-core/src/tools.mjs +590 -118
  89. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +72 -38
  90. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +10 -5
  91. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +12 -15
  92. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +12 -16
  93. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +46 -31
  94. package/plugins/huaweicloud-core/src/ws-exec/hwlink-tunnel-channel.mjs +267 -0
  95. package/plugins/huaweicloud-core/src/ws-exec/index.js +3 -0
  96. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +9 -5
@@ -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-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
+ ]
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, WorkBuddy, and DeepSeek Harness (DSH).
11
+ Supports OpenCode, CodeArts Agent, WorkBuddy, DeepSeek Harness (DSH), and OfficeAce.
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.
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.
26
20
 
27
- ```bash
28
- npx --yes huaweicloud-devkit doctor # self-check
29
- npx --yes huaweicloud-devkit status # show status
30
- npx --yes huaweicloud-devkit update # update
31
- npx --yes huaweicloud-devkit uninstall # uninstall
32
- ```
33
-
34
- ### Codex
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: clear npx cache to remove old version residue
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,60 +60,90 @@ 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.
87
-
88
69
  ### DeepSeek Harness (DSH)
89
70
 
90
71
  ```bash
91
72
  npx --yes huaweicloud-devkit install --target dsh
92
73
  ```
93
74
 
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.
75
+ **Restart the DSH session** after installation.
98
76
 
99
77
  ```bash
100
- npx --yes huaweicloud-devkit doctor
78
+ npx --yes huaweicloud-devkit doctor --target dsh
101
79
  npx --yes huaweicloud-devkit status --target dsh
102
80
  npx --yes huaweicloud-devkit update --target dsh
103
81
  npx --yes huaweicloud-devkit uninstall --target dsh
104
82
  ```
105
83
 
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`.
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
+ ```
110
100
 
111
101
  ### Other Agents
112
102
 
113
- For agents that support the Model Context Protocol (MCP):
103
+ Any agent that supports MCP can use the standard config:
114
104
 
115
105
  ```json
116
106
  {
117
- "mcp": {
107
+ "mcpServers": {
118
108
  "huaweicloud-devkit": {
119
- "type": "local",
120
- "command": ["node", "<path>/plugins/huaweicloud-core/src/mcp-server.mjs"],
121
- "enabled": true
109
+ "command": "npx",
110
+ "args": ["-y", "-p", "huaweicloud-devkit@next", "huaweicloud-devkit-mcp"]
122
111
  }
123
112
  }
124
113
  }
125
114
  ```
126
115
 
127
- Then install:
116
+ No installation required — `npx` handles everything.
117
+
118
+ > Set `HW_ACCESS_KEY`/`HW_SECRET_KEY` in the MCP config `env` field for project-level credentials.
119
+
120
+ ### Install KooCLI
121
+
122
+ ```bash
123
+ npx --yes huaweicloud-devkit install-hcloud
124
+ ```
125
+
126
+ ### Configure Credentials
127
+
128
+ ```bash
129
+ npx --yes huaweicloud-devkit auth init
130
+ ```
131
+
132
+ Synchronizes AK/SK to KooCLI, OBS, and sandbox APIs in one step.
133
+
134
+ ### Install All Agents
135
+
136
+ ```bash
137
+ npx --yes huaweicloud-devkit install --target all
138
+ ```
139
+
140
+ ### Update All Agents
128
141
 
129
142
  ```bash
130
- npx --yes huaweicloud-devkit install
143
+ npx --yes huaweicloud-devkit update --target all
131
144
  ```
132
145
 
133
- > **Prerequisite:** Node.js >= 20. Run `npx huaweicloud-devkit auth init` for unified credentials.
146
+ `update` is incremental it refreshes installed files without touching your config.
134
147
 
135
148
  ## What It Does
136
149
 
@@ -138,6 +151,7 @@ npx --yes huaweicloud-devkit install
138
151
  - **Safety-first execution** — all write operations require explicit user approval; credentials and secrets are automatically redacted from output
139
152
  - **Pre-execution risk checks** — public exposure, credential leaks, and destructive operations are caught before they run
140
153
  - **Regional awareness** — auto-discovers available regions and checks service availability before creating resources
154
+ - **Sandbox (DevStation)** — temporary cloud runtime for web app deployment with instant public URL preview
141
155
 
142
156
  ## Supported Services
143
157
 
package/README.zh-CN.md CHANGED
@@ -8,46 +8,32 @@
8
8
 
9
9
  帮助 AI 编码助手安全、准确地使用华为云——一站式集成云知识、CLI 工具和安全护栏。
10
10
 
11
- 支持 OpenCode、Codex、码道(CodeArts Agent)、WorkBuddy、DeepSeek Harness(DSH)。
11
+ 支持 OpenCode、码道(CodeArts Agent)、WorkBuddy、DeepSeek Harness(DSH)、OfficeAce。
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。安装后**重启会话**。
19
+ > 省略 `--target` 时,安装器会自动检测机器上的 agent,检测到多个时**全部安装**。建议始终指定 `--target` 以明确安装目标。
26
20
 
27
- ```bash
28
- npx --yes huaweicloud-devkit doctor # 自检
29
- npx --yes huaweicloud-devkit status # 查看状态
30
- npx --yes huaweicloud-devkit update # 更新
31
- npx --yes huaweicloud-devkit uninstall # 卸载
32
- ```
33
-
34
- ### Codex
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: 清理 npx 缓存避免旧版残留
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,58 +60,90 @@ 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。
87
-
88
69
  ### DeepSeek Harness(DSH)
89
70
 
90
71
  ```bash
91
72
  npx --yes huaweicloud-devkit install --target dsh
92
73
  ```
93
74
 
94
- 安装器会把 Skills 写入 `$DSH_HOME/skills`,把 MCP Server 和安全策略写入
95
- `$DSH_HOME/huaweicloud-plugins`,并自动维护
96
- `$DSH_HOME/profiles/web/cordis.patch.yml`。安装后**重启 DSH 会话**。
75
+ 安装后**重启 DSH 会话**。
97
76
 
98
77
  ```bash
99
- npx --yes huaweicloud-devkit doctor
78
+ npx --yes huaweicloud-devkit doctor --target dsh
100
79
  npx --yes huaweicloud-devkit status --target dsh
101
80
  npx --yes huaweicloud-devkit update --target dsh
102
81
  npx --yes huaweicloud-devkit uninstall --target dsh
103
82
  ```
104
83
 
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`。
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
+ ```
108
100
 
109
101
  ### 其他 Agent
110
102
 
111
- 支持 MCP 协议的 Agent,手动配置:
103
+ 任何支持 MCP 协议的 Agent,直接使用标准 MCP 配置:
112
104
 
113
105
  ```json
114
106
  {
115
- "mcp": {
107
+ "mcpServers": {
116
108
  "huaweicloud-devkit": {
117
- "type": "local",
118
- "command": ["node", "<路径>/plugins/huaweicloud-core/src/mcp-server.mjs"],
119
- "enabled": true
109
+ "command": "npx",
110
+ "args": ["-y", "-p", "huaweicloud-devkit@next", "huaweicloud-devkit-mcp"]
120
111
  }
121
112
  }
122
113
  }
123
114
  ```
124
115
 
125
- 然后安装:
116
+ 无需预安装 — `npx` 自动处理一切。
117
+
118
+ > 项目级 AK/SK 可通过 MCP 配置的 `env` 字段设置 `HW_ACCESS_KEY`/`HW_SECRET_KEY`。
119
+
120
+ ### 安装 KooCLI
121
+
122
+ ```bash
123
+ npx --yes huaweicloud-devkit install-hcloud
124
+ ```
125
+
126
+ ### 配置凭据
127
+
128
+ ```bash
129
+ npx --yes huaweicloud-devkit auth init
130
+ ```
131
+
132
+ 一步同步 AK/SK 到 KooCLI、OBS 和沙箱接口。
133
+
134
+ ### 安装所有 Agent
135
+
136
+ ```bash
137
+ npx --yes huaweicloud-devkit install --target all
138
+ ```
139
+
140
+ ### 更新所有 Agent
126
141
 
127
142
  ```bash
128
- npx --yes huaweicloud-devkit install
143
+ npx --yes huaweicloud-devkit update --target all
129
144
  ```
130
145
 
131
- > **前置条件:** Node.js >= 20。执行 `npx huaweicloud-devkit auth init` 完成统一认证。
146
+ `update` 是增量更新——只刷新已安装的文件,不动配置文件。
132
147
 
133
148
  ## 功能特性
134
149
 
@@ -136,6 +151,7 @@ npx --yes huaweicloud-devkit install
136
151
  - **安全优先执行** — 所有写操作需用户明确批准;凭证和密钥自动脱敏
137
152
  - **执行前风险检查** — 公网暴露、凭证泄露、破坏性操作在执行前即被拦截
138
153
  - **区域感知** — 自动发现可用区域,创建资源前检查服务可用性
154
+ - **沙箱(DevStation)** — 临时云端运行环境,部署 Web 应用并即刻获得公网预览地址
139
155
 
140
156
  ## 支持的服务
141
157
 
package/bin/setup.cjs CHANGED
@@ -1,8 +1,10 @@
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 => {
3
+ const path = require('node:path');
4
+ const fileUrl = require('node:url').pathToFileURL(
5
+ path.join(__dirname, '..', 'plugins', 'huaweicloud-core', 'src', 'setup-cli.mjs'),
6
+ ).href;
7
+ import(fileUrl).catch((e) => {
6
8
  console.error(e.message);
7
9
  process.exit(1);
8
10
  });
@@ -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,46 +1,63 @@
1
1
  {
2
- "name": "huaweicloud-devkit",
3
- "version": "1.0.2-next.2",
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
- "dsh",
37
- "deepseek-harness",
38
- "mcp",
39
- "koocli",
40
- "hcloud"
41
- ],
42
- "license": "Apache-2.0",
43
- "engines": {
44
- "node": ">=20"
45
- }
2
+ "name": "huaweicloud-devkit",
3
+ "version": "1.0.2-next.20",
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-n": "^18.3.0",
40
+ "globals": "^17.11.0",
41
+ "markdownlint-cli2": "^0.23.2",
42
+ "prettier": "^3.9.6"
43
+ },
44
+ "keywords": [
45
+ "huaweicloud",
46
+ "huawei-cloud",
47
+ "agent",
48
+ "codex",
49
+ "opencode",
50
+ "officeace",
51
+ "office-claw",
52
+ "workbuddy",
53
+ "dsh",
54
+ "deepseek-harness",
55
+ "mcp",
56
+ "koocli",
57
+ "hcloud"
58
+ ],
59
+ "license": "Apache-2.0",
60
+ "engines": {
61
+ "node": ">=22"
62
+ }
46
63
  }
@@ -5,10 +5,7 @@
5
5
  "longDescription": "HuaweiCloud Devkit helps coding agents choose and use Huawei Cloud Skills, KooCLI, APIs, SDKs, and MCP tools with less context, safer command execution, and more accurate cloud implementation decisions.",
6
6
  "developerName": "HuaweiCloud Mate",
7
7
  "category": "Cloud",
8
- "capabilities": [
9
- "Read",
10
- "Interactive"
11
- ],
8
+ "capabilities": ["Read", "Interactive"],
12
9
  "websiteURL": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
13
10
  "brandColor": "#C7000B",
14
11
  "defaultPrompt": [
@@ -20,7 +17,7 @@
20
17
  "mcpServers": "./.mcp.json",
21
18
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
22
19
  "skills": "./skills/",
23
- "version": "1.0.2-next.2",
20
+ "version": "1.0.2-next.20",
24
21
  "author": {
25
22
  "name": "HuaweiCloud Mate",
26
23
  "url": "https://github.com/huaweicloud"
@@ -30,15 +27,5 @@
30
27
  "homepage": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
31
28
  "repository": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
32
29
  "license": "Apache-2.0",
33
- "keywords": [
34
- "huaweicloud",
35
- "huawei-cloud",
36
- "koocli",
37
- "hcloud",
38
- "agent",
39
- "mcp",
40
- "api",
41
- "sdk",
42
- "skills"
43
- ]
30
+ "keywords": ["huaweicloud", "huawei-cloud", "koocli", "hcloud", "agent", "mcp", "api", "sdk", "skills"]
44
31
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huaweicloud-core",
3
- "version": "1.0.2-next.2",
3
+ "version": "1.0.2-next.20",
4
4
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
5
5
  "author": {
6
6
  "name": "HuaweiCloud Mate",
@@ -9,17 +9,7 @@
9
9
  "homepage": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
10
10
  "repository": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
11
11
  "license": "Apache-2.0",
12
- "keywords": [
13
- "huaweicloud",
14
- "huawei-cloud",
15
- "koocli",
16
- "hcloud",
17
- "agent",
18
- "mcp",
19
- "api",
20
- "sdk",
21
- "skills"
22
- ],
12
+ "keywords": ["huaweicloud", "huawei-cloud", "koocli", "hcloud", "agent", "mcp", "api", "sdk", "skills"],
23
13
  "skills": "./skills/",
24
14
  "mcpServers": "./.mcp.json",
25
15
  "interface": {
@@ -28,10 +18,7 @@
28
18
  "longDescription": "HuaweiCloud Devkit helps coding agents choose and use Huawei Cloud Skills, KooCLI, APIs, SDKs, and MCP tools with less context, safer command execution, and more accurate cloud implementation decisions.",
29
19
  "developerName": "HuaweiCloud Mate",
30
20
  "category": "Cloud",
31
- "capabilities": [
32
- "Read",
33
- "Interactive"
34
- ],
21
+ "capabilities": ["Read", "Interactive"],
35
22
  "websiteURL": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
36
23
  "brandColor": "#C7000B",
37
24
  "defaultPrompt": [