huaweicloud-devkit 1.1.0-next.10 → 1.1.0-next.12
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/package.json +1 -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/openclaw.plugin.json +1 -1
- package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +15 -14
- package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +1 -1
- package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +1 -1
- package/plugins/huaweicloud-core/src/search-market.mjs +1 -0
- package/plugins/huaweicloud-core/src/setup-cli.mjs +40 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
|
-
"version": "1.1.0-next.
|
|
3
|
+
"version": "1.1.0-next.12",
|
|
4
4
|
"description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"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.0-next.
|
|
20
|
+
"version": "1.1.0-next.12",
|
|
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.0-next.
|
|
23
|
+
"version": "1.1.0-next.12",
|
|
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.0-next.
|
|
20
|
+
"version": "1.1.0-next.12",
|
|
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.0-next.
|
|
3
|
+
"version": "1.1.0-next.12",
|
|
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.0-next.
|
|
3
|
+
"version": "1.1.0-next.12",
|
|
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",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
3
|
"id": "huaweicloud-devkit",
|
|
4
4
|
"displayName": "HuaweiCloud DevKit",
|
|
5
|
-
"version": "1.1.0-next.
|
|
5
|
+
"version": "1.1.0-next.12",
|
|
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.",
|
|
@@ -8,7 +8,7 @@ version: 1
|
|
|
8
8
|
|
|
9
9
|
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
10
|
|
|
11
|
-
Always run `hcloud BSS <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
11
|
+
Always run `hcloud BSS <Operation> --help --cli-region=cn-north-1` before constructing commands to discover exact parameter names and requirements.
|
|
12
12
|
|
|
13
13
|
## Overview
|
|
14
14
|
|
|
@@ -16,22 +16,23 @@ Domain expertise for billing queries (BSS). Covers cost tracking, bill details,
|
|
|
16
16
|
|
|
17
17
|
## Critical Warnings
|
|
18
18
|
|
|
19
|
-
| Trap | Why
|
|
20
|
-
| -------------------------- |
|
|
21
|
-
| Bills delayed ~24h | Yesterday's costs may not appear until the next day
|
|
22
|
-
| BSS Admin role needed | IAM user must have BSS Administrator or Finance role
|
|
23
|
-
| Currency conversion varies | Cross-region costs use daily exchange rates
|
|
19
|
+
| Trap | Why |
|
|
20
|
+
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| Bills delayed ~24h | Yesterday's costs may not appear until the next day |
|
|
22
|
+
| BSS Admin role needed | IAM user must have BSS Administrator or Finance role |
|
|
23
|
+
| Currency conversion varies | Cross-region costs use daily exchange rates |
|
|
24
|
+
| Region fixed to cn-north-1 | BSS operations only support `--cli-region=cn-north-1` in KooCLI. This is a KooCLI metadata limitation — the billing data itself covers all regions. |
|
|
24
25
|
|
|
25
26
|
## Common Workflows
|
|
26
27
|
|
|
27
|
-
| Task | Operation
|
|
28
|
-
| -------------------- |
|
|
29
|
-
| List costs | `ListCosts --cli-region
|
|
30
|
-
| List customer bills | `
|
|
31
|
-
| List resource usage | `ListResourceUsage --cli-region
|
|
32
|
-
| List sub-customers | `ListConsumeSubCustomers --cli-region
|
|
33
|
-
| Show account balance | `ShowCustomerAccountBalances --cli-region
|
|
34
|
-
| List conversions | `ListConversions --cli-region
|
|
28
|
+
| Task | Operation |
|
|
29
|
+
| -------------------- | ---------------------------------------------------------------------- |
|
|
30
|
+
| List costs | `ListCosts --cli-region=cn-north-1 --project_id=<p>` |
|
|
31
|
+
| List customer bills | `ListCustomerBillsFeeRecords --cli-region=cn-north-1 --project_id=<p>` |
|
|
32
|
+
| List resource usage | `ListResourceUsage --cli-region=cn-north-1 --project_id=<p>` |
|
|
33
|
+
| List sub-customers | `ListConsumeSubCustomers --cli-region=cn-north-1 --project_id=<p>` |
|
|
34
|
+
| Show account balance | `ShowCustomerAccountBalances --cli-region=cn-north-1 --project_id=<p>` |
|
|
35
|
+
| List conversions | `ListConversions --cli-region=cn-north-1 --project_id=<p>` |
|
|
35
36
|
|
|
36
37
|
Discover exact parameters with `--help` before executing any command. All BSS operations are read-only.
|
|
37
38
|
|
|
@@ -69,7 +69,7 @@ secret_value = client.get_secret(secret_id="my-secret")
|
|
|
69
69
|
|
|
70
70
|
# hcloud (for approved automation only)
|
|
71
71
|
|
|
72
|
-
hcloud CSMS
|
|
72
|
+
hcloud CSMS DownloadSecretBlob --secret_name=<name>
|
|
73
73
|
|
|
74
74
|
# WARNING: Output goes to stdout. Pipe directly, never capture in agent.
|
|
75
75
|
|
|
@@ -43,7 +43,7 @@ Domain expertise for Huawei Cloud Virtual Private Cloud (VPC). Covers VPC/subnet
|
|
|
43
43
|
| SG rule | hcloud VPC CreateSecurityGroupRule --security_group_rule.security_group_id=<id> --security_group_rule.direction=<direction> --security_group_rule.protocol=<protocol> --security_group_rule.multiport=<port> --security_group_rule.remote_ip_prefix=<cidr> | references/security-group.md |
|
|
44
44
|
| Create EIP | hcloud EIP CreatePublicip --publicip.type=<type> --bandwidth.size=<size> --bandwidth.share_type=<share-type> --bandwidth.name=<name> | Run `hcloud EIP CreatePublicip --help` to confirm valid type values per region |
|
|
45
45
|
| Bind EIP to ECS | 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` |
|
|
46
|
-
| Unbind EIP | hcloud EIP
|
|
46
|
+
| Unbind EIP | hcloud EIP DisassociatePublicips --publicip_id=<id> | references/eip.md |
|
|
47
47
|
| Delete EIP | hcloud EIP DeletePublicip --publicip_id=<id> | references/eip.md |
|
|
48
48
|
| List EIPs | hcloud EIP ListPublicips | |
|
|
49
49
|
| NAT gateway | hcloud NAT CreateNatGateway --nat.name=<name> --nat.spec=<spec> --router_id=<vpc-id> --internal_network_id=<subnet-id> | Run `hcloud NAT CreateNatGateway --help` for available spec values |
|
|
@@ -171,6 +171,7 @@ export async function searchMarketplace(query = '', category = '') {
|
|
|
171
171
|
description: truncate(skill.description),
|
|
172
172
|
triggers: (skill.triggers || []).slice(0, 5),
|
|
173
173
|
matched,
|
|
174
|
+
installCommand: `npx skills add huaweicloud/huaweicloud-skills --skill ${skill.name}`,
|
|
174
175
|
});
|
|
175
176
|
}
|
|
176
177
|
results.sort((a, b) => b.score - a.score);
|
|
@@ -2070,26 +2070,19 @@ function removeHermesHooksConfigBlock() {
|
|
|
2070
2070
|
const configPath = hermesConfigFile();
|
|
2071
2071
|
if (!existsSync(configPath)) return;
|
|
2072
2072
|
const lines = readFileSync(configPath, 'utf8').split(/\r?\n/);
|
|
2073
|
+
let inHooksBlock = false;
|
|
2073
2074
|
const out = [];
|
|
2074
|
-
let skip = false;
|
|
2075
2075
|
for (const line of lines) {
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
}
|
|
2080
|
-
if (skip) {
|
|
2081
|
-
if (line.trim() === '') continue;
|
|
2082
|
-
if (/^\s{2,}/.test(line) && line.trim() !== '') continue;
|
|
2083
|
-
skip = false;
|
|
2084
|
-
}
|
|
2085
|
-
if (line.trim() === 'hooks:') {
|
|
2086
|
-
continue;
|
|
2087
|
-
}
|
|
2088
|
-
if (line.trim() === 'pre_tool_call:') {
|
|
2076
|
+
const trimmed = line.trim();
|
|
2077
|
+
if (trimmed === 'hooks:' && !inHooksBlock) {
|
|
2078
|
+
inHooksBlock = true;
|
|
2089
2079
|
continue;
|
|
2090
2080
|
}
|
|
2091
|
-
if (
|
|
2092
|
-
|
|
2081
|
+
if (inHooksBlock) {
|
|
2082
|
+
if (trimmed === '' || line.startsWith(' ') || line.startsWith('\t')) {
|
|
2083
|
+
continue;
|
|
2084
|
+
}
|
|
2085
|
+
inHooksBlock = false;
|
|
2093
2086
|
}
|
|
2094
2087
|
out.push(line);
|
|
2095
2088
|
}
|
|
@@ -2186,6 +2179,36 @@ async function updateHermes() {
|
|
|
2186
2179
|
function uninstallHermes() {
|
|
2187
2180
|
const skillsDir = hermesSkillsDir();
|
|
2188
2181
|
let removed = 0;
|
|
2182
|
+
|
|
2183
|
+
// 1. Remove hook config from config.yaml (before deleting script files)
|
|
2184
|
+
removeHermesHooksConfigBlock();
|
|
2185
|
+
console.log(' Hooks config removed');
|
|
2186
|
+
|
|
2187
|
+
// 2. Clean shell-hooks-allowlist.json (remove approved hook references)
|
|
2188
|
+
const hermesHome = hermesHomeDir();
|
|
2189
|
+
const allowlistPath = join(hermesHome, 'shell-hooks-allowlist.json');
|
|
2190
|
+
if (existsSync(allowlistPath)) {
|
|
2191
|
+
try {
|
|
2192
|
+
const allowlist = JSON.parse(readFileSync(allowlistPath, 'utf8'));
|
|
2193
|
+
const before = (allowlist.approvals || []).length;
|
|
2194
|
+
allowlist.approvals = (allowlist.approvals || []).filter((a) =>
|
|
2195
|
+
typeof a === 'string' ? !a.includes('huaweicloud-safety.py') : true,
|
|
2196
|
+
);
|
|
2197
|
+
if (allowlist.approvals.length < before) {
|
|
2198
|
+
writeFileSync(allowlistPath, JSON.stringify(allowlist, null, 2));
|
|
2199
|
+
console.log(` Removed ${before - allowlist.approvals.length} hook approvals from allowlist`);
|
|
2200
|
+
}
|
|
2201
|
+
} catch {
|
|
2202
|
+
removeIfExists(allowlistPath);
|
|
2203
|
+
console.log(' Removed hook allowlist file');
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
// 3. Remove MCP config from config.yaml
|
|
2208
|
+
removeHermesMcpConfigBlock();
|
|
2209
|
+
console.log(' MCP config removed');
|
|
2210
|
+
|
|
2211
|
+
// 4. Remove skills (file deletion comes after config cleanup)
|
|
2189
2212
|
if (existsSync(skillsDir)) {
|
|
2190
2213
|
for (const entry of readdirSync(skillsDir, { withFileTypes: true })) {
|
|
2191
2214
|
if (entry.name.startsWith('huawei')) {
|
|
@@ -2202,11 +2225,10 @@ function uninstallHermes() {
|
|
|
2202
2225
|
} catch {}
|
|
2203
2226
|
}
|
|
2204
2227
|
|
|
2228
|
+
// 5. Remove plugin directory (hook script files deleted last)
|
|
2205
2229
|
if (removeIfExists(hermesPluginsDir())) {
|
|
2206
2230
|
console.log(' Removed MCP server, safety policy and hooks');
|
|
2207
2231
|
}
|
|
2208
|
-
removeHermesMcpConfigBlock();
|
|
2209
|
-
removeHermesHooksConfigBlock();
|
|
2210
2232
|
}
|
|
2211
2233
|
|
|
2212
2234
|
function hermesStatus() {
|