huaweicloud-devkit 1.1.2-next.2 → 1.1.2-next.4
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.
- package/README.md +22 -0
- package/README.zh-CN.md +22 -0
- package/integrations/hermes/skills-snapshot.json +175 -0
- package/package.json +3 -1
- package/plugins/huaweicloud-core/.claude-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.codex-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.hermes-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/hooks/hooks.json +2 -2
- package/plugins/huaweicloud-core/hooks/huaweicloud-safety.mjs +56 -0
- package/plugins/huaweicloud-core/openclaw.plugin.json +1 -1
- package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +1 -1
- package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +6 -7
- package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +7 -6
- package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +1 -1
- package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +1 -1
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +3 -1
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +10 -10
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +2 -2
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +1 -1
- package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +15 -9
- package/plugins/huaweicloud-core/skills/huawei-iac/SKILL.md +1 -1
- package/plugins/huaweicloud-core/skills/huawei-iac/references/resource-catalog.md +1 -1
- package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +3 -3
- package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +15 -15
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +1 -1
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +18 -16
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +1 -1
- package/plugins/huaweicloud-core/src/auth/credentials.mjs +6 -2
- package/plugins/huaweicloud-core/src/auth/reconcile.mjs +30 -6
- package/plugins/huaweicloud-core/src/auth/service.mjs +16 -22
- package/plugins/huaweicloud-core/src/hcloud-cli.mjs +16 -10
- package/plugins/huaweicloud-core/src/hcloud-probe.mjs +154 -0
- package/plugins/huaweicloud-core/src/koocli-version.mjs +47 -0
- package/plugins/huaweicloud-core/src/safety-policy.mjs +17 -5
- package/plugins/huaweicloud-core/src/setup-cli.mjs +196 -134
- package/plugins/huaweicloud-core/src/tools.mjs +16 -17
package/README.md
CHANGED
|
@@ -57,14 +57,36 @@ npx --yes huaweicloud-devkit install --target codex
|
|
|
57
57
|
**Restart the Codex session** after installation.
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
+
codex plugin list # verify huaweicloud-devkit@huaweicloud-devkit is installed and enabled
|
|
60
61
|
npx --yes huaweicloud-devkit doctor --target codex
|
|
61
62
|
npx --yes huaweicloud-devkit status --target codex
|
|
62
63
|
npx --yes huaweicloud-devkit update --target codex
|
|
63
64
|
npx --yes huaweicloud-devkit uninstall --target codex
|
|
64
65
|
```
|
|
65
66
|
|
|
67
|
+
Then mention `@huaweicloud-devkit` in Codex or describe your Huawei Cloud task directly.
|
|
68
|
+
|
|
66
69
|
> **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.
|
|
67
70
|
|
|
71
|
+
### Codex Desktop
|
|
72
|
+
|
|
73
|
+
Use this target when the Codex CLI is unavailable or when Codex is installed through WindowsApps on Windows.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npx --yes huaweicloud-devkit install --target codex-desktop
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Restart the Codex Desktop session** after installation.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx --yes huaweicloud-devkit doctor --target codex-desktop
|
|
83
|
+
npx --yes huaweicloud-devkit status --target codex-desktop
|
|
84
|
+
npx --yes huaweicloud-devkit update --target codex-desktop
|
|
85
|
+
npx --yes huaweicloud-devkit uninstall --target codex-desktop
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Then mention `@huaweicloud-devkit` in a new Codex Desktop task or describe your Huawei Cloud task directly.
|
|
89
|
+
|
|
68
90
|
### CodeArts Agent
|
|
69
91
|
|
|
70
92
|
```bash
|
package/README.zh-CN.md
CHANGED
|
@@ -57,14 +57,36 @@ npx --yes huaweicloud-devkit install --target codex
|
|
|
57
57
|
安装后**重启 Codex 会话**。
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
+
codex plugin list # 验证 huaweicloud-devkit@huaweicloud-devkit 已安装并启用
|
|
60
61
|
npx --yes huaweicloud-devkit doctor --target codex
|
|
61
62
|
npx --yes huaweicloud-devkit status --target codex
|
|
62
63
|
npx --yes huaweicloud-devkit update --target codex
|
|
63
64
|
npx --yes huaweicloud-devkit uninstall --target codex
|
|
64
65
|
```
|
|
65
66
|
|
|
67
|
+
随后在 Codex 中提及 `@huaweicloud-devkit`,或直接描述华为云任务。
|
|
68
|
+
|
|
66
69
|
> **需要 Codex CLI** — `codex` 命令必须在 PATH 中。若 Codex 通过 WindowsApps(Microsoft Store)安装,请使用 `--target codex-desktop` 替代。运行 `codex --version` 验证 CLI 可用性。
|
|
67
70
|
|
|
71
|
+
### Codex Desktop
|
|
72
|
+
|
|
73
|
+
当 Codex CLI 不可用,或 Windows 上通过 WindowsApps 安装 Codex 时,使用此目标。
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npx --yes huaweicloud-devkit install --target codex-desktop
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
安装后**重启 Codex Desktop 会话**。
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx --yes huaweicloud-devkit doctor --target codex-desktop
|
|
83
|
+
npx --yes huaweicloud-devkit status --target codex-desktop
|
|
84
|
+
npx --yes huaweicloud-devkit update --target codex-desktop
|
|
85
|
+
npx --yes huaweicloud-devkit uninstall --target codex-desktop
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
随后在新的 Codex Desktop 任务中提及 `@huaweicloud-devkit`,或直接描述华为云任务。
|
|
89
|
+
|
|
68
90
|
### CodeArts Agent(码道)
|
|
69
91
|
|
|
70
92
|
```bash
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hermes_version": "0.1.0",
|
|
3
|
+
"exported_at": "2026-09-07T00:00:00Z",
|
|
4
|
+
"skills": [
|
|
5
|
+
{
|
|
6
|
+
"name": "huawei-apig",
|
|
7
|
+
"source": "official",
|
|
8
|
+
"identifier": "official/huaweicloud/huawei-apig",
|
|
9
|
+
"category": "huaweicloud"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "huawei-billing",
|
|
13
|
+
"source": "official",
|
|
14
|
+
"identifier": "official/huaweicloud/huawei-billing",
|
|
15
|
+
"category": "huaweicloud"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "huawei-cbr",
|
|
19
|
+
"source": "official",
|
|
20
|
+
"identifier": "official/huaweicloud/huawei-cbr",
|
|
21
|
+
"category": "huaweicloud"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "huawei-cce",
|
|
25
|
+
"source": "official",
|
|
26
|
+
"identifier": "official/huaweicloud/huawei-cce",
|
|
27
|
+
"category": "huaweicloud"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "huawei-cloud-eye",
|
|
31
|
+
"source": "official",
|
|
32
|
+
"identifier": "official/huaweicloud/huawei-cloud-eye",
|
|
33
|
+
"category": "huaweicloud"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "huawei-cloud-find-skills",
|
|
37
|
+
"source": "official",
|
|
38
|
+
"identifier": "official/huaweicloud/huawei-cloud-find-skills",
|
|
39
|
+
"category": "huaweicloud"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "huawei-cts",
|
|
43
|
+
"source": "official",
|
|
44
|
+
"identifier": "official/huaweicloud/huawei-cts",
|
|
45
|
+
"category": "huaweicloud"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "huawei-dds-dcs",
|
|
49
|
+
"source": "official",
|
|
50
|
+
"identifier": "official/huaweicloud/huawei-dds-dcs",
|
|
51
|
+
"category": "huaweicloud"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "huawei-deployment",
|
|
55
|
+
"source": "official",
|
|
56
|
+
"identifier": "official/huaweicloud/huawei-deployment",
|
|
57
|
+
"category": "huaweicloud"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "huawei-dew",
|
|
61
|
+
"source": "official",
|
|
62
|
+
"identifier": "official/huaweicloud/huawei-dew",
|
|
63
|
+
"category": "huaweicloud"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "huawei-ecs",
|
|
67
|
+
"source": "official",
|
|
68
|
+
"identifier": "official/huaweicloud/huawei-ecs",
|
|
69
|
+
"category": "huaweicloud"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "huawei-functiongraph",
|
|
73
|
+
"source": "official",
|
|
74
|
+
"identifier": "official/huaweicloud/huawei-functiongraph",
|
|
75
|
+
"category": "huaweicloud"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "huawei-gaussdb",
|
|
79
|
+
"source": "official",
|
|
80
|
+
"identifier": "official/huaweicloud/huawei-gaussdb",
|
|
81
|
+
"category": "huaweicloud"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "huawei-getting-started",
|
|
85
|
+
"source": "official",
|
|
86
|
+
"identifier": "official/huaweicloud/huawei-getting-started",
|
|
87
|
+
"category": "huaweicloud"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "huawei-iam",
|
|
91
|
+
"source": "official",
|
|
92
|
+
"identifier": "official/huaweicloud/huawei-iam",
|
|
93
|
+
"category": "huaweicloud"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "huawei-modelarts",
|
|
97
|
+
"source": "official",
|
|
98
|
+
"identifier": "official/huaweicloud/huawei-modelarts",
|
|
99
|
+
"category": "huaweicloud"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "huawei-obs",
|
|
103
|
+
"source": "official",
|
|
104
|
+
"identifier": "official/huaweicloud/huawei-obs",
|
|
105
|
+
"category": "huaweicloud"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "huawei-rds",
|
|
109
|
+
"source": "official",
|
|
110
|
+
"identifier": "official/huaweicloud/huawei-rds",
|
|
111
|
+
"category": "huaweicloud"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "huawei-sandbox",
|
|
115
|
+
"source": "official",
|
|
116
|
+
"identifier": "official/huaweicloud/huawei-sandbox",
|
|
117
|
+
"category": "huaweicloud"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "huawei-smn-dms",
|
|
121
|
+
"source": "official",
|
|
122
|
+
"identifier": "official/huaweicloud/huawei-smn-dms",
|
|
123
|
+
"category": "huaweicloud"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "huawei-vpc",
|
|
127
|
+
"source": "official",
|
|
128
|
+
"identifier": "official/huaweicloud/huawei-vpc",
|
|
129
|
+
"category": "huaweicloud"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "huawei-waf-aad",
|
|
133
|
+
"source": "official",
|
|
134
|
+
"identifier": "official/huaweicloud/huawei-waf-aad",
|
|
135
|
+
"category": "huaweicloud"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "huaweicloud-api-and-sdk",
|
|
139
|
+
"source": "official",
|
|
140
|
+
"identifier": "official/huaweicloud/huaweicloud-api-and-sdk",
|
|
141
|
+
"category": "huaweicloud"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "huaweicloud-capability-discovery",
|
|
145
|
+
"source": "official",
|
|
146
|
+
"identifier": "official/huaweicloud/huaweicloud-capability-discovery",
|
|
147
|
+
"category": "huaweicloud"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "huaweicloud-cli-and-auth",
|
|
151
|
+
"source": "official",
|
|
152
|
+
"identifier": "official/huaweicloud/huaweicloud-cli-and-auth",
|
|
153
|
+
"category": "huaweicloud"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "huaweicloud-core",
|
|
157
|
+
"source": "official",
|
|
158
|
+
"identifier": "official/huaweicloud/huaweicloud-core",
|
|
159
|
+
"category": "huaweicloud"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "huaweicloud-safety",
|
|
163
|
+
"source": "official",
|
|
164
|
+
"identifier": "official/huaweicloud/huaweicloud-safety",
|
|
165
|
+
"category": "huaweicloud"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "huaweicloud-troubleshooting",
|
|
169
|
+
"source": "official",
|
|
170
|
+
"identifier": "official/huaweicloud/huaweicloud-troubleshooting",
|
|
171
|
+
"category": "huaweicloud"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"taps": []
|
|
175
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
|
-
"
|
|
3
|
+
"mcpName": "io.github.huaweicloud/huaweicloud-devkit",
|
|
4
|
+
"version": "1.1.2-next.4",
|
|
5
|
+
"kooCliVersion": "7.2.12",
|
|
4
6
|
"description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
|
|
5
7
|
"type": "module",
|
|
6
8
|
"files": [
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"mcpServers": "./.mcp.json",
|
|
18
18
|
"description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
|
|
19
19
|
"skills": "./skills/",
|
|
20
|
-
"version": "1.1.2-next.
|
|
20
|
+
"version": "1.1.2-next.4",
|
|
21
21
|
"author": {
|
|
22
22
|
"name": "HuaweiCloud Mate",
|
|
23
23
|
"url": "https://github.com/huaweicloud"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"mcpServers": "./.mcp.json",
|
|
21
21
|
"description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
|
|
22
22
|
"skills": "./skills/",
|
|
23
|
-
"version": "1.1.2-next.
|
|
23
|
+
"version": "1.1.2-next.4",
|
|
24
24
|
"author": {
|
|
25
25
|
"name": "HuaweiCloud Mate",
|
|
26
26
|
"url": "https://github.com/huaweicloud"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"mcpServers": "./.mcp.json",
|
|
18
18
|
"description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
|
|
19
19
|
"skills": "./skills/",
|
|
20
|
-
"version": "1.1.2-next.
|
|
20
|
+
"version": "1.1.2-next.4",
|
|
21
21
|
"author": {
|
|
22
22
|
"name": "HuaweiCloud Mate",
|
|
23
23
|
"url": "https://github.com/huaweicloud"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
|
-
"version": "1.1.2-next.
|
|
3
|
+
"version": "1.1.2-next.4",
|
|
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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
|
-
"version": "1.1.2-next.
|
|
3
|
+
"version": "1.1.2-next.4",
|
|
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",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
9
|
-
"command": "
|
|
9
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/huaweicloud-safety.mjs\"",
|
|
10
10
|
"timeout": 5
|
|
11
11
|
}
|
|
12
12
|
]
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"hooks": [
|
|
17
17
|
{
|
|
18
18
|
"type": "command",
|
|
19
|
-
"command": "
|
|
19
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/huaweicloud-safety.mjs\"",
|
|
20
20
|
"timeout": 5
|
|
21
21
|
}
|
|
22
22
|
]
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
|
|
3
|
+
import { classifyTextCommand } from '../src/safety-policy.mjs';
|
|
4
|
+
|
|
5
|
+
const DENY_PREFIX = 'Huawei Cloud safety hook blocked this action: ';
|
|
6
|
+
|
|
7
|
+
function commandText(toolInput) {
|
|
8
|
+
if (typeof toolInput === 'string') return toolInput;
|
|
9
|
+
if (toolInput && typeof toolInput === 'object') {
|
|
10
|
+
const values = [];
|
|
11
|
+
for (const key of ['command', 'cmd', 'script', 'args', 'arguments']) {
|
|
12
|
+
const value = toolInput[key];
|
|
13
|
+
if (Array.isArray(value)) values.push(value.map(String).join(' '));
|
|
14
|
+
else if (value !== undefined && value !== null) values.push(String(value));
|
|
15
|
+
}
|
|
16
|
+
if (values.length > 0) return values.join('\n');
|
|
17
|
+
return JSON.stringify(toolInput);
|
|
18
|
+
}
|
|
19
|
+
return JSON.stringify(toolInput);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function deny(reason) {
|
|
23
|
+
process.stdout.write(
|
|
24
|
+
JSON.stringify({
|
|
25
|
+
hookSpecificOutput: {
|
|
26
|
+
hookEventName: 'PreToolUse',
|
|
27
|
+
permissionDecision: 'deny',
|
|
28
|
+
permissionDecisionReason: DENY_PREFIX + reason,
|
|
29
|
+
},
|
|
30
|
+
}) + '\n',
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function readStdin() {
|
|
35
|
+
try {
|
|
36
|
+
return readFileSync(0, 'utf8');
|
|
37
|
+
} catch {
|
|
38
|
+
return '';
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function main() {
|
|
43
|
+
const input = readStdin();
|
|
44
|
+
let data;
|
|
45
|
+
try {
|
|
46
|
+
data = JSON.parse(input);
|
|
47
|
+
} catch {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const text = commandText(data.tool_input ?? {});
|
|
52
|
+
const result = classifyTextCommand(text);
|
|
53
|
+
if (result.decision === 'deny') deny(result.reason);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
main();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
3
|
"id": "huaweicloud-devkit",
|
|
4
4
|
"displayName": "HuaweiCloud DevKit",
|
|
5
|
-
"version": "1.1.2-next.
|
|
5
|
+
"version": "1.1.2-next.4",
|
|
6
6
|
"family": "bundle-plugin",
|
|
7
7
|
"bundleFormat": "codex",
|
|
8
8
|
"description": "Guide coding agents to use Huawei Cloud safely — KooCLI, APIs, SDKs, 28 MCP tools, skills, and safety guardrails.",
|
|
@@ -119,7 +119,7 @@ hcloud APIG BatchPublishOrOfflineApiV2 \
|
|
|
119
119
|
## Throttling
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
|
-
hcloud APIG
|
|
122
|
+
hcloud APIG CreateRequestThrottlingPolicyV2 --instance_id=<id> --name=<n> --api_call_limits=1000
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
## Common Workflows
|
|
@@ -31,16 +31,15 @@ Domain expertise for Huawei Cloud Data Encryption Workshop (DEW). Covers CSMS fo
|
|
|
31
31
|
| Operation | Description |
|
|
32
32
|
| ------------------ | ------------------------------------------------------ |
|
|
33
33
|
| ListSecrets | List all secrets (names only, no values) |
|
|
34
|
-
|
|
|
34
|
+
| ShowSecret | Get secret metadata (rotation config, KMS key, status) |
|
|
35
35
|
| ListSecretVersions | List version IDs and stages (no values) |
|
|
36
36
|
|
|
37
37
|
### Secret Value (blocked by policy — use runtime injection)
|
|
38
38
|
|
|
39
|
-
| Operation
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
| ShowSecretVersion
|
|
43
|
-
| GetSecretValue | Blocked. Use MCP proxy resolve pattern |
|
|
39
|
+
| Operation | Safe Alternative |
|
|
40
|
+
| ------------------ | --------------------------------------------- |
|
|
41
|
+
| DownloadSecretBlob | Use {{resolve:csms:secret-id}} in IaC or SDK |
|
|
42
|
+
| ShowSecretVersion | Use runtime injection, never in agent context |
|
|
44
43
|
|
|
45
44
|
## KMS Operations
|
|
46
45
|
|
|
@@ -80,7 +79,7 @@ hcloud CSMS DownloadSecretBlob --secret_name=<name>
|
|
|
80
79
|
| Error | Root Cause -> Fix |
|
|
81
80
|
| -------------------- | --------------------------------------------------------------------------- |
|
|
82
81
|
| Secret not found | Wrong region or project -> Verify secret ARN includes region/project |
|
|
83
|
-
| AccessDenied on CSMS | Missing IAM CSMS policy -> Add csms:
|
|
82
|
+
| AccessDenied on CSMS | Missing IAM CSMS policy -> Add csms:ShowSecret + kms:Decrypt |
|
|
84
83
|
| KMS key disabled | Key scheduled for deletion or manually disabled -> Enable or create new key |
|
|
85
84
|
| Rotation stuck | Lambda/Python function error -> Check rotation function logs |
|
|
86
85
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Create Secret
|
|
4
4
|
|
|
5
|
-
hcloud CSMS CreateSecret --
|
|
5
|
+
hcloud CSMS CreateSecret --name=prod-db-password --secret_string='{"password":"CHANGE_ME"}'
|
|
6
6
|
|
|
7
7
|
## List Secrets (metadata only)
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ hcloud CSMS ListSecrets
|
|
|
10
10
|
|
|
11
11
|
## Describe Secret
|
|
12
12
|
|
|
13
|
-
hcloud CSMS
|
|
13
|
+
hcloud CSMS ShowSecret --secret_name=prod-db-password
|
|
14
14
|
|
|
15
15
|
## List Versions
|
|
16
16
|
|
|
@@ -25,12 +25,13 @@ Use: data.huaweicloud_csms_secret.db.secret_string
|
|
|
25
25
|
|
|
26
26
|
## Rotation
|
|
27
27
|
|
|
28
|
-
- Enable auto-rotation: hcloud CSMS
|
|
29
|
-
-
|
|
28
|
+
- Enable auto-rotation: `hcloud CSMS UpdateSecret --secret_name=<name> --auto_rotation=true --rotation_period=<days> --rotation_func_urn=<fn>` (or set at CreateSecret time)
|
|
29
|
+
- Trigger rotation now: `hcloud CSMS RotateSecret --secret_name=<name>`
|
|
30
|
+
- Rotation function ARN: provide a FunctionGraph rotation function to generate new secret values
|
|
30
31
|
|
|
31
32
|
## Policy Rules
|
|
32
33
|
|
|
33
|
-
- hcloud CSMS
|
|
34
|
+
- hcloud CSMS DownloadSecretBlob -> BLOCKED (use runtime injection)
|
|
34
35
|
- hcloud CSMS ShowSecretVersion -> BLOCKED
|
|
35
36
|
- hcloud CSMS ListSecrets -> ALLOWED (metadata only)
|
|
36
|
-
- hcloud CSMS
|
|
37
|
+
- hcloud CSMS ShowSecret -> ALLOWED (metadata only)
|
|
@@ -24,6 +24,6 @@ Use SDK with KMS client in application runtime.
|
|
|
24
24
|
|
|
25
25
|
## Key Deletion
|
|
26
26
|
|
|
27
|
-
- Schedule: hcloud KMS
|
|
27
|
+
- Schedule: hcloud KMS DeleteKey --key_id=<key-id> --pending_days=7
|
|
28
28
|
- Cancel during pending window: hcloud KMS CancelKeyDeletion --key_id=<key-id>
|
|
29
29
|
- WARNING: After deletion window passes, data encrypted with this key is UNRECOVERABLE
|
|
@@ -59,7 +59,7 @@ Flavor families are **region-dependent**. Always run `hcloud ECS ListFlavors --c
|
|
|
59
59
|
| Find by name | See "How to search for instances" below | |
|
|
60
60
|
| Bind EIP | hcloud EIP AssociatePublicips --publicip_id=<id> --publicip.associate_instance_id=<port-id> --publicip.associate_instance_type=PORT | Get port ID from `hcloud ECS ListServersDetails --server_id=<id>` → `OS-EXT-IPS:port_id` |
|
|
61
61
|
| Security group rule | hcloud VPC CreateSecurityGroupRule --security_group_id=<id> --direction=<direction> --protocol=<protocol> | references/sg.md |
|
|
62
|
-
| Attach disk | hcloud
|
|
62
|
+
| Attach disk | hcloud ECS AttachServerVolume --server_id=<id> --volumeAttachment.volumeId=<id> | references/evs.md |
|
|
63
63
|
| Delete instance | hcloud ECS DeleteServers --servers.1.id=<id> --delete_publicip=true --delete_volume=true | references/create-instance.md |
|
|
64
64
|
| Reboot instance | hcloud ECS BatchRebootServers --reboot.servers.1.id=<id> --reboot.type=SOFT | NOT `RebootServer` — that operation does not exist |
|
|
65
65
|
| HC活动部署 | 按量付费购买ECS+Nginx部署后端服务 | references/hc-activity.md |
|
|
@@ -18,9 +18,11 @@ hcloud EVS CreateVolume \
|
|
|
18
18
|
## Attach to ECS
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
hcloud
|
|
21
|
+
hcloud ECS AttachServerVolume --server_id=<ecs-id> --volumeAttachment.volumeId=<vol-id>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
> The attach operation lives under `ECS` (not `EVS`), and the volume id uses the nested `--volumeAttachment.volumeId` parameter.
|
|
25
|
+
|
|
24
26
|
## List / Delete
|
|
25
27
|
|
|
26
28
|
```bash
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
## 错误码映射
|
|
6
6
|
|
|
7
|
-
| 错误 | 根因 | 修复
|
|
8
|
-
| --------------------------------------- | ------------------------------- |
|
|
9
|
-
| `Ecs.0005` flavor-image 不匹配 | 镜像虚拟化类型与规格不兼容 | 检查 image `__support_amd`/`__support_xen` 与 flavor `os_extra_specs`。BareMetal 镜像不兼容标准 ECS 规格
|
|
10
|
-
| `[USE_ERROR]不正确的参数:imagetype` | 参数名错误 | KooCLI 使用双下划线前缀:`--__imagetype=gold`(不是 `--imagetype`)
|
|
11
|
-
| `[USE_ERROR]不正确的参数:chargingMode` | 参数路径错误 | 计费模式参数路径:`--server.extendparam.chargingMode=postPaid`。不传默认按需付费
|
|
12
|
-
| `[USE_ERROR]不正确的参数:__support_amd` | 参数无效 | `IMS ListImages` 某些版本不支持此过滤。去掉该参数,使用 client-side 过滤
|
|
13
|
-
| Cannot SSH | 安全组未开放22端口 或 未绑定EIP | 1) 添加入方向规则 tcp 22。2) `hcloud EIP
|
|
14
|
-
| Flavor unavailable | 区域不支持该规格 | `hcloud ECS ListFlavors --cli-region=<r>` 先查。不硬编码 s6/m6 等规格名
|
|
15
|
-
| Insufficient resources | AZ 库存不足 | 换规格、换 AZ、或等待资源释放
|
|
16
|
-
| AuthFailure | AK/SK 过期或无效 | `npx huaweicloud-devkit auth init` 重新配置统一凭据
|
|
7
|
+
| 错误 | 根因 | 修复 |
|
|
8
|
+
| --------------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
9
|
+
| `Ecs.0005` flavor-image 不匹配 | 镜像虚拟化类型与规格不兼容 | 检查 image `__support_amd`/`__support_xen` 与 flavor `os_extra_specs`。BareMetal 镜像不兼容标准 ECS 规格 |
|
|
10
|
+
| `[USE_ERROR]不正确的参数:imagetype` | 参数名错误 | KooCLI 使用双下划线前缀:`--__imagetype=gold`(不是 `--imagetype`) |
|
|
11
|
+
| `[USE_ERROR]不正确的参数:chargingMode` | 参数路径错误 | 计费模式参数路径:`--server.extendparam.chargingMode=postPaid`。不传默认按需付费 |
|
|
12
|
+
| `[USE_ERROR]不正确的参数:__support_amd` | 参数无效 | `IMS ListImages` 某些版本不支持此过滤。去掉该参数,使用 client-side 过滤 |
|
|
13
|
+
| Cannot SSH | 安全组未开放22端口 或 未绑定EIP | 1) 添加入方向规则 tcp 22。2) `hcloud EIP AssociatePublicips --publicip_id=<id> --publicip.associate_instance_id=<port-id> --publicip.associate_instance_type=PORT` |
|
|
14
|
+
| Flavor unavailable | 区域不支持该规格 | `hcloud ECS ListFlavors --cli-region=<r>` 先查。不硬编码 s6/m6 等规格名 |
|
|
15
|
+
| Insufficient resources | AZ 库存不足 | 换规格、换 AZ、或等待资源释放 |
|
|
16
|
+
| AuthFailure | AK/SK 过期或无效 | `npx huaweicloud-devkit auth init` 重新配置统一凭据 |
|
|
17
17
|
|
|
18
18
|
## 创建失败诊断流程
|
|
19
19
|
|
|
@@ -62,9 +62,9 @@ To access VPC-internal resources from FunctionGraph:
|
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
64
|
# 1. Create agency (see huawei-iam skill)
|
|
65
|
-
hcloud IAM CreateAgency --
|
|
65
|
+
hcloud IAM CreateAgency --agency.name=<name> --agency.trust_domain_name=functiongraph --agency.domain_id=<id>
|
|
66
66
|
# 2. Grant role (e.g., VPC Administrator)
|
|
67
|
-
hcloud IAM
|
|
67
|
+
hcloud IAM AssociateAgencyWithDomainPermission --agency_id=<id> --domain_id=<id> --role_id=<role-id>
|
|
68
68
|
# 3. Use in CreateFunction
|
|
69
69
|
hcloud FunctionGraph CreateFunction --func_vpc.vpc_id=<vpc> --func_vpc.subnet_id=<subnet> --app_xrole=<name> ...
|
|
70
70
|
```
|
|
@@ -10,11 +10,15 @@ version: 1
|
|
|
10
10
|
|
|
11
11
|
## KooCLI Installation
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
13
|
+
This plugin is paired with **KooCLI v7.2.12**. Install the pinned version:
|
|
14
|
+
|
|
15
|
+
| OS | Command |
|
|
16
|
+
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| Windows (PowerShell) | See https://support.huaweicloud.com/qs-hcli/hcli_02_003.html for MSI download |
|
|
18
|
+
| Linux | curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/7.2.12/huaweicloud-cli-linux-amd64.tar.gz" && tar -zxvf huaweicloud-cli-linux-amd64.tar.gz |
|
|
19
|
+
| macOS | curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/7.2.12/huaweicloud-cli-mac-amd64.tar.gz" && tar -zxvf huaweicloud-cli-mac-amd64.tar.gz |
|
|
20
|
+
|
|
21
|
+
> See `huaweicloud-cli-and-auth` skill for arm64 variants and the one-liner (latest) option.
|
|
18
22
|
|
|
19
23
|
## First-Time Setup
|
|
20
24
|
|
|
@@ -24,20 +28,22 @@ version: 1
|
|
|
24
28
|
4. **Verify**: `hcloud configure list` to confirm profile, then `hcloud ECS ListServersDetails --cli-region=cn-north-4`
|
|
25
29
|
5. For detailed auth guidance, see `huaweicloud-cli-and-auth` skill
|
|
26
30
|
|
|
27
|
-
> **Security**: Never pass AK/SK as command-line arguments (`--ak=...`). Always use `npx huaweicloud-devkit auth init` (unified, interactive
|
|
31
|
+
> **Security**: Never pass AK/SK as command-line arguments (`--ak=...`). Always use `npx huaweicloud-devkit auth init` (unified, interactive) or `hcloud configure init` (KooCLI only) to avoid secrets in shell history.
|
|
28
32
|
|
|
29
33
|
### Non-Interactive Setup (Agent/CI Environments)
|
|
30
34
|
|
|
31
|
-
When the interactive TUI is unavailable (Agent tools, CI/CD),
|
|
35
|
+
When the interactive TUI is unavailable (Agent tools, CI/CD), configure credentials outside agent chat using the unified entry point:
|
|
32
36
|
|
|
33
37
|
```bash
|
|
34
38
|
# User executes in their terminal (NOT in agent chat):
|
|
35
|
-
|
|
39
|
+
npx huaweicloud-devkit auth init
|
|
36
40
|
|
|
37
|
-
# Agent verifies:
|
|
41
|
+
# Agent verifies through redacted tooling only:
|
|
38
42
|
hcloud configure list
|
|
39
43
|
```
|
|
40
44
|
|
|
45
|
+
> Do **not** instruct the user to run `hcloud configure set --cli-access-key=... --cli-secret-key=...` — AK/SK would enter shell history. Use `npx huaweicloud-devkit auth init` instead.
|
|
46
|
+
|
|
41
47
|
## Critical Warnings
|
|
42
48
|
|
|
43
49
|
| Trap | Why |
|
|
@@ -34,7 +34,7 @@ Always run `hcloud <Service> <Operation> --help` before constructing commands to
|
|
|
34
34
|
## Provisioning Rules (Stage 6)
|
|
35
35
|
|
|
36
36
|
1. Generate `deployment_id` (`d-xxx`), initialize the session state file (path and schema: `references/state-file.md`).
|
|
37
|
-
2. **Batch approval: show the RESOURCE LIST (name / type / purpose), never the raw commands.** After the user approves, execute each resource via `huaweicloud_run_approved_command
|
|
37
|
+
2. **Batch approval: show the RESOURCE LIST (name / type / purpose), never the raw commands.** Present the numbered manifest BEFORE any `huaweicloud_plan_cli_command` call and get ONE explicit list-level approval. After the user approves the manifest, execute each resource via `huaweicloud_plan_cli_command` → `huaweicloud_run_approved_command` without re-asking list-level consent (per-command approval tokens are still required by the tool gate). Never execute anything outside the approved list.
|
|
38
38
|
3. Create in dependency-topological order (network → compute/db → bindings). After each success, extract the resource ID and write it to state immediately.
|
|
39
39
|
4. Any failure: stop immediately, mark state `partial`, report the error, offer destroy of already-created resources. No automatic rollback.
|
|
40
40
|
|
|
@@ -22,7 +22,7 @@ Every resource type the orchestration flow can purchase, bind, and destroy. This
|
|
|
22
22
|
| Resource | Create | Delete | Skill | Depends on |
|
|
23
23
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ---------- | -------------------------------------------------------------------------- |
|
|
24
24
|
| ECS instance | `hcloud ECS CreateServers --server.name=<n> --server.flavorRef=<id> --server.imageRef=<id> --server.vpcid=<id> --server.nics.1.subnet_id=<id> --server.security_groups.1.id=<id> --server.availability_zone=<az> --server.root_volume.volumetype=<type>` (hidden required: `vpcid` + `root_volume.volumetype`; check flavor family vs image arch, e.g. kc1 = ARM needs an ARM image) | `hcloud ECS DeleteServers --servers.1.id=<id> --delete_publicip=true --delete_volume=true` | huawei-ecs | VPC + Subnet + SG. Set both delete flags true on teardown or EIP/disk leak |
|
|
25
|
-
| EVS data disk | `hcloud EVS CreateVolume` | `hcloud EVS DeleteVolume` | huawei-ecs | - (attach with `hcloud
|
|
25
|
+
| EVS data disk | `hcloud EVS CreateVolume` | `hcloud EVS DeleteVolume` | huawei-ecs | - (attach with `hcloud ECS AttachServerVolume`) |
|
|
26
26
|
|
|
27
27
|
## Databases
|
|
28
28
|
|