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

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 +81 -51
  3. package/README.zh-CN.md +81 -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 +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-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 +510 -10
  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 +600 -122
  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,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-vpc
3
- description: "Use when creating, configuring, or managing VPC networks, subnets, security groups, EIPs, NAT gateways, VPN connections, or network ACLs on Huawei Cloud. Triggers on: VPC, subnet, security group, EIP, NAT, VPN, network ACL, route table, bandwidth. NOT for: DNS or CDN configuration."
3
+ description: 'Use when creating, configuring, or managing VPC networks, subnets, security groups, EIPs, NAT gateways, VPN connections, or network ACLs on Huawei Cloud. Triggers on: VPC, subnet, security group, EIP, NAT, VPN, network ACL, route table, bandwidth. NOT for: DNS or CDN configuration.'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -18,50 +18,50 @@ Domain expertise for Huawei Cloud Virtual Private Cloud (VPC). Covers VPC/subnet
18
18
 
19
19
  ## Critical Warnings
20
20
 
21
- | Trap | Why |
22
- |------|-----|
23
- | VPC CIDR cannot change | Once set, VPC CIDR block is immutable |
24
- | Security group stateful | SG rules are stateful. Return traffic auto-allowed |
25
- | Network ACL stateless | ACL rules must allow both inbound AND outbound |
26
- | EIP bills when idle | Unbound EIP still charges. Release when unused |
27
- | Subnet AZ binding | Subnet tied to single AZ. Cross-AZ needs multiple subnets |
28
- | EIP PER type needs `--bandwidth.name` | PER bandwidth requires explicit name; `--help` marks it optional but it's required |
29
- | **VPC params need nested prefix** | KooCLI 7.x VPC API uses `--vpc.<param>`, `--subnet.<param>`, `--security_group.<param>`. Example: `--vpc.name=xxx` NOT `--name=xxx` |
30
- | **Security group needs no vpc_id** | VPC v3 API `CreateSecurityGroup` does NOT accept `vpc_id`. Security groups are region-level, not VPC-bound |
31
- | Subnet DNS empty → ECS no DNS | DNS params (`--subnet.primary_dns`, `--subnet.secondary_dns`) marked optional but empty default breaks cloud-init domain resolution — `yum`/`apt` installs fail silently. Always set both. Common DNS IPs: cn-north-4 (100.125.1.250 / 100.125.1.251), cn-north-1 (100.125.1.250 / 100.125.129.250), cn-east-3 (100.125.1.250 / 100.125.129.250), ap-southeast-3 (100.125.1.250 / 100.125.128.250) |
32
- | SCP blocks 0.0.0.0/0 SG rules | If `CreateSecurityGroupRule` with `--remote_ip_prefix=0.0.0.0/0` fails with `SYS.0403`, an org-level SCP policy is denying wide-open rules. Narrow to a specific CIDR range (e.g., your office IP) instead |
33
- | **VPC tags use `*` separator** | VPC tag format: `--vpc.tags.1=env*test` (asterisk between key and value). NOT `--vpc.tags.1.key=env` (ECS-style). This is different from ECS `--server.metadata.key=value` |
21
+ | Trap | Why |
22
+ | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
23
+ | VPC CIDR cannot change | Once set, VPC CIDR block is immutable |
24
+ | Security group stateful | SG rules are stateful. Return traffic auto-allowed |
25
+ | Network ACL stateless | ACL rules must allow both inbound AND outbound |
26
+ | EIP bills when idle | Unbound EIP still charges. Release when unused |
27
+ | Subnet AZ binding | Subnet tied to single AZ. Cross-AZ needs multiple subnets |
28
+ | EIP PER type needs `--bandwidth.name` | PER bandwidth requires explicit name; `--help` marks it optional but it's required |
29
+ | **VPC params need nested prefix** | KooCLI 7.x VPC API uses `--vpc.<param>`, `--subnet.<param>`, `--security_group.<param>`. Example: `--vpc.name=xxx` NOT `--name=xxx` |
30
+ | **Security group needs no vpc_id** | VPC v3 API `CreateSecurityGroup` does NOT accept `vpc_id`. Security groups are region-level, not VPC-bound |
31
+ | Subnet DNS empty → ECS no DNS | DNS params (`--subnet.primary_dns`, `--subnet.secondary_dns`) marked optional but empty default breaks cloud-init domain resolution — `yum`/`apt` installs fail silently. Always set both. Common DNS IPs: cn-north-4 (100.125.1.250 / 100.125.1.251), cn-north-1 (100.125.1.250 / 100.125.129.250), cn-east-3 (100.125.1.250 / 100.125.129.250), ap-southeast-3 (100.125.1.250 / 100.125.128.250) |
32
+ | SCP blocks 0.0.0.0/0 SG rules | If `CreateSecurityGroupRule` with `--remote_ip_prefix=0.0.0.0/0` fails with `SYS.0403`, an org-level SCP policy is denying wide-open rules. Narrow to a specific CIDR range (e.g., your office IP) instead |
33
+ | **VPC tags use `*` separator** | VPC tag format: `--vpc.tags.1=env*test` (asterisk between key and value). NOT `--vpc.tags.1.key=env` (ECS-style). This is different from ECS `--server.metadata.key=value` |
34
34
 
35
35
  ## Common Workflows
36
36
 
37
- | Task | Command | Steps |
38
- |------|---------|-------|
39
- | Create VPC | hcloud VPC CreateVpc --vpc.name=<name> --vpc.cidr=<cidr> | CIDR must not conflict with existing VPCs. Run `hcloud VPC ListVpcs` first |
40
- | Create subnet | hcloud VPC CreateSubnet --subnet.name=<name> --subnet.vpc_id=<id> --subnet.cidr=<cidr> --subnet.gateway_ip=<gw> --subnet.primary_dns=<dns1> --subnet.secondary_dns=<dns2> --subnet.availability_zone=<az> | Subnet CIDR must be a subset of the VPC CIDR. DNS addresses vary by region — see Critical Warnings for common values |
41
- | Update subnet | hcloud VPC UpdateSubnet --subnet_id=<id> --subnet.dnsList.1=<dns1> --subnet.dnsList.2=<dns2> | Fix DNS after creation. Restart ECS after updating DNS for cloud-init to pick up changes |
42
- | Security group | hcloud VPC CreateSecurityGroup --security_group.name=<name> | references/security-group.md |
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
- | 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
- | 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 DisassociatePublicip --publicip_id=<id> | references/eip.md |
47
- | Delete EIP | hcloud EIP DeletePublicip --publicip_id=<id> | references/eip.md |
48
- | List EIPs | hcloud EIP ListPublicips | |
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 |
37
+ | Task | Command | Steps |
38
+ | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
39
+ | Create VPC | hcloud VPC CreateVpc --vpc.name=<name> --vpc.cidr=<cidr> | CIDR must not conflict with existing VPCs. Run `hcloud VPC ListVpcs` first |
40
+ | Create subnet | hcloud VPC CreateSubnet --subnet.name=<name> --subnet.vpc_id=<id> --subnet.cidr=<cidr> --subnet.gateway_ip=<gw> --subnet.primary_dns=<dns1> --subnet.secondary_dns=<dns2> --subnet.availability_zone=<az> | Subnet CIDR must be a subset of the VPC CIDR. DNS addresses vary by region — see Critical Warnings for common values |
41
+ | Update subnet | hcloud VPC UpdateSubnet --subnet_id=<id> --subnet.dnsList.1=<dns1> --subnet.dnsList.2=<dns2> | Fix DNS after creation. Restart ECS after updating DNS for cloud-init to pick up changes |
42
+ | Security group | hcloud VPC CreateSecurityGroup --security_group.name=<name> | references/security-group.md |
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
+ | 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
+ | 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 DisassociatePublicip --publicip_id=<id> | references/eip.md |
47
+ | Delete EIP | hcloud EIP DeletePublicip --publicip_id=<id> | references/eip.md |
48
+ | List EIPs | hcloud EIP ListPublicips | |
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 |
50
50
 
51
51
  ## Troubleshooting
52
52
 
53
- | Error | Root Cause -> Fix |
54
- |-------|------------------|
55
- | Cannot reach instance | SG missing rule or no EIP -> Add SG rule / Bind EIP |
56
- | Subnet CIDR conflict | Overlapping with existing subnets -> Choose non-overlapping CIDR |
57
- | NAT gateway no internet | Route table missing default route -> Add 0.0.0.0/0 via NAT |
58
- | EIP quota exceeded | Check actual quota: `hcloud EIP ListPublicips --cli-region=<r>` to see current usage. Default varies by account (typically 5-10) |
59
- | EIP.7905 | Run `hcloud EIP ListPublicips --cli-region=<r>` first to check current usage |
60
- | VPC.0301: Bandwidth name invalid | PER type requires `--bandwidth.name`, even though `--help` marks it optional |
61
- | EIP has no public IP after binding | May need AddIngressEipV2 for ELB-type resources (see huawei-apig) |
62
- | ECS cloud-init fails silently (port 80/443 closed) | Subnet likely has no DNS. Check `hcloud VPC ShowSubnet --subnet_id=<id>` → `dnsList` empty? Rebuild subnet with `--subnet.primary_dns=<dns1> --subnet.secondary_dns=<dns2>`. DNS addresses per region: `hcloud VPC CreateSubnet --help` |
63
- | VPC.0209: Subnet still used | Subnet has dependent resources (ECS/RDS) — delete instances first, then subnet |
64
- | SYS.0403 / SCP deny | Service Control Policy explicitly denies this operation — contact org admin to adjust SCP, or use an account/region without the restriction. If SSH is blocked, bootstrap via cloud-init user_data instead: see `huawei-ecs` — no SSH needed |
53
+ | Error | Root Cause -> Fix |
54
+ | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
55
+ | Cannot reach instance | SG missing rule or no EIP -> Add SG rule / Bind EIP |
56
+ | Subnet CIDR conflict | Overlapping with existing subnets -> Choose non-overlapping CIDR |
57
+ | NAT gateway no internet | Route table missing default route -> Add 0.0.0.0/0 via NAT |
58
+ | EIP quota exceeded | Check actual quota: `hcloud EIP ListPublicips --cli-region=<r>` to see current usage. Default varies by account (typically 5-10) |
59
+ | EIP.7905 | Run `hcloud EIP ListPublicips --cli-region=<r>` first to check current usage |
60
+ | VPC.0301: Bandwidth name invalid | PER type requires `--bandwidth.name`, even though `--help` marks it optional |
61
+ | EIP has no public IP after binding | May need AddIngressEipV2 for ELB-type resources (see huawei-apig) |
62
+ | ECS cloud-init fails silently (port 80/443 closed) | Subnet likely has no DNS. Check `hcloud VPC ShowSubnet --subnet_id=<id>` → `dnsList` empty? Rebuild subnet with `--subnet.primary_dns=<dns1> --subnet.secondary_dns=<dns2>`. DNS addresses per region: `hcloud VPC CreateSubnet --help` |
63
+ | VPC.0209: Subnet still used | Subnet has dependent resources (ECS/RDS) — delete instances first, then subnet |
64
+ | SYS.0403 / SCP deny | Service Control Policy explicitly denies this operation — contact org admin to adjust SCP, or use an account/region without the restriction. If SSH is blocked, bootstrap via cloud-init user_data instead: see `huawei-ecs` — no SSH needed |
65
65
 
66
66
  ## Security Considerations
67
67
 
@@ -4,15 +4,16 @@
4
4
 
5
5
  Subnets without DNS configuration will fail cloud-init. Use these DNS addresses:
6
6
 
7
- | Region | Primary DNS | Secondary DNS |
8
- |--------|------------|---------------|
9
- | cn-north-1 | 100.125.1.250 | 100.125.129.250 |
10
- | cn-north-4 | 100.125.1.250 | 100.125.129.250 |
11
- | cn-east-3 | 100.125.1.250 | 100.125.129.250 |
12
- | cn-south-1 | 100.125.1.250 | 100.125.129.250 |
7
+ | Region | Primary DNS | Secondary DNS |
8
+ | -------------- | ------------- | --------------- |
9
+ | cn-north-1 | 100.125.1.250 | 100.125.129.250 |
10
+ | cn-north-4 | 100.125.1.250 | 100.125.129.250 |
11
+ | cn-east-3 | 100.125.1.250 | 100.125.129.250 |
12
+ | cn-south-1 | 100.125.1.250 | 100.125.129.250 |
13
13
  | ap-southeast-3 | 100.125.1.250 | 100.125.129.250 |
14
14
 
15
15
  **Subnet create with DNS**:
16
+
16
17
  ```bash
17
18
  hcloud VPC CreateSubnet \
18
19
  --subnet.name=<name> \
@@ -28,12 +29,12 @@ hcloud VPC CreateSubnet \
28
29
 
29
30
  KooCLI 7.x VPC API requires nested prefixes:
30
31
 
31
- | Resource | Create Param Prefix | Example |
32
- |----------|---------------------|---------|
33
- | VPC | `--vpc.` | `--vpc.name=my-vpc --vpc.cidr=192.168.0.0/16` |
34
- | Subnet | `--subnet.` | `--subnet.name=web --subnet.vpc_id=<id> --subnet.cidr=192.168.1.0/24` |
35
- | Security Group | `--security_group.` | `--security_group.name=sg-web` |
36
- | SG Rule | `--security_group_rule.` | `--security_group_rule.direction=ingress` |
32
+ | Resource | Create Param Prefix | Example |
33
+ | -------------- | ------------------------ | --------------------------------------------------------------------- |
34
+ | VPC | `--vpc.` | `--vpc.name=my-vpc --vpc.cidr=192.168.0.0/16` |
35
+ | Subnet | `--subnet.` | `--subnet.name=web --subnet.vpc_id=<id> --subnet.cidr=192.168.1.0/24` |
36
+ | Security Group | `--security_group.` | `--security_group.name=sg-web` |
37
+ | SG Rule | `--security_group_rule.` | `--security_group_rule.direction=ingress` |
37
38
 
38
39
  ## EIP Management
39
40
 
@@ -19,6 +19,7 @@ Security group params use `--security_group.` prefix. Rules use `--security_grou
19
19
  ## Create Security Group Rule
20
20
 
21
21
  Complete example with nested prefix:
22
+
22
23
  ```bash
23
24
  hcloud VPC CreateSecurityGroupRule \
24
25
  --security_group_rule.security_group_id=<sg-id> \
@@ -32,28 +33,28 @@ hcloud VPC CreateSecurityGroupRule \
32
33
 
33
34
  ## Stateful vs Stateless
34
35
 
35
- | Feature | Security Group | Network ACL |
36
- |---------|---------------|-------------|
37
- | Stateful? | Yes — return traffic auto-allowed | No — must allow both directions |
38
- | Applied to | ECS instance NIC | Subnet |
39
- | Rules | Allow only | Allow and Deny |
40
- | Default | Deny all inbound, allow all outbound | Allow all |
36
+ | Feature | Security Group | Network ACL |
37
+ | ---------- | ------------------------------------ | ------------------------------- |
38
+ | Stateful? | Yes — return traffic auto-allowed | No — must allow both directions |
39
+ | Applied to | ECS instance NIC | Subnet |
40
+ | Rules | Allow only | Allow and Deny |
41
+ | Default | Deny all inbound, allow all outbound | Allow all |
41
42
 
42
43
  ## Common Rules Reference
43
44
 
44
- | Direction | Protocol | Port | Source | Purpose |
45
- |-----------|----------|------|--------|---------|
46
- | Ingress | TCP | 22 | <office-ip>/32 | SSH |
47
- | Ingress | TCP | 80 | 0.0.0.0/0 | HTTP |
48
- | Ingress | TCP | 443 | 0.0.0.0/0 | HTTPS |
49
- | Ingress | TCP | 3306 | <sg-app-id> | MySQL from app |
50
- | Ingress | TCP | 6379 | <sg-app-id> | Redis from app |
51
- | Egress | ALL | ALL | 0.0.0.0/0 | Outbound default |
45
+ | Direction | Protocol | Port | Source | Purpose |
46
+ | --------- | -------- | ---- | -------------- | ---------------- |
47
+ | Ingress | TCP | 22 | <office-ip>/32 | SSH |
48
+ | Ingress | TCP | 80 | 0.0.0.0/0 | HTTP |
49
+ | Ingress | TCP | 443 | 0.0.0.0/0 | HTTPS |
50
+ | Ingress | TCP | 3306 | <sg-app-id> | MySQL from app |
51
+ | Ingress | TCP | 6379 | <sg-app-id> | Redis from app |
52
+ | Egress | ALL | ALL | 0.0.0.0/0 | Outbound default |
52
53
 
53
54
  ## Common Errors
54
55
 
55
- | Error | Root Cause -> Fix |
56
- |-------|-------------------|
57
- | Cannot SSH | Default SG denies all inbound. Add port 22 rule |
58
- | Rule not effective | SG assigned to wrong instance. Verify NIC attachment |
59
- | `[USE_ERROR]不正确的参数:vpc_id` | Security groups don't need vpc_id. Remove it |
56
+ | Error | Root Cause -> Fix |
57
+ | -------------------------------- | ---------------------------------------------------- |
58
+ | Cannot SSH | Default SG denies all inbound. Add port 22 rule |
59
+ | Rule not effective | SG assigned to wrong instance. Verify NIC attachment |
60
+ | `[USE_ERROR]不正确的参数:vpc_id` | Security groups don't need vpc_id. Remove it |
@@ -26,25 +26,25 @@ hcloud VPC CreateSubnet --vpc_id=xxx
26
26
 
27
27
  ## Key Constraints
28
28
 
29
- | Constraint | Detail |
30
- |-----------|--------|
29
+ | Constraint | Detail |
30
+ | ------------------------- | -------------------------------------------------------------- |
31
31
  | Subnet bound to single AZ | Cross-AZ needs multiple subnets. AZ code format: `cn-south-1a` |
32
- | CIDR must not overlap | Cannot overlap with other subnets in same VPC |
33
- | Gateway IP auto-assigned | Default is first IP in CIDR range (e.g., 192.168.1.1 for /24) |
34
- | 5 IPs reserved per subnet | First 4 + broadcast reserved by platform |
32
+ | CIDR must not overlap | Cannot overlap with other subnets in same VPC |
33
+ | Gateway IP auto-assigned | Default is first IP in CIDR range (e.g., 192.168.1.1 for /24) |
34
+ | 5 IPs reserved per subnet | First 4 + broadcast reserved by platform |
35
35
 
36
36
  ## Common Errors
37
37
 
38
- | Error | Root Cause -> Fix |
39
- |-------|-------------------|
40
- | `[USE_ERROR]不正确的参数:name` | Missing nested prefix. Use `--vpc.name=` or `--subnet.name=` |
41
- | CIDR overlap | Subnet CIDR must be within VPC CIDR and not overlap others |
42
- | AZ not found | Use `hcloud ECS NovaListAvailabilityZones --cli-region=<r>` to list valid AZ codes |
38
+ | Error | Root Cause -> Fix |
39
+ | ------------------------------ | ---------------------------------------------------------------------------------- |
40
+ | `[USE_ERROR]不正确的参数:name` | Missing nested prefix. Use `--vpc.name=` or `--subnet.name=` |
41
+ | CIDR overlap | Subnet CIDR must be within VPC CIDR and not overlap others |
42
+ | AZ not found | Use `hcloud ECS NovaListAvailabilityZones --cli-region=<r>` to list valid AZ codes |
43
43
 
44
44
  ## CIDR Planning Reference
45
45
 
46
- | Environment | VPC CIDR | Subnet CIDR |
47
- |------------|----------|-------------|
48
- | Dev | 192.168.0.0/16 | 192.168.1.0/24 |
49
- | Staging | 10.0.0.0/16 | 10.0.1.0/24 |
50
- | Production | 172.16.0.0/16 | 172.16.1.0/24 (public) + 172.16.2.0/24 (private) |
46
+ | Environment | VPC CIDR | Subnet CIDR |
47
+ | ----------- | -------------- | ------------------------------------------------ |
48
+ | Dev | 192.168.0.0/16 | 192.168.1.0/24 |
49
+ | Staging | 10.0.0.0/16 | 10.0.1.0/24 |
50
+ | Production | 172.16.0.0/16 | 172.16.1.0/24 (public) + 172.16.2.0/24 (private) |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-waf-aad
3
- description: "Use when configuring Web Application Firewall (WAF) policies/rules, or Anti-DDoS (AAD) protection on Huawei Cloud. Triggers: WAF, AAD, firewall, DDoS, web protection, IP blacklist, rate limiting, CC attack. NOT for: security groups (use huawei-vpc), CTS audit (use huawei-cts)."
3
+ description: 'Use when configuring Web Application Firewall (WAF) policies/rules, or Anti-DDoS (AAD) protection on Huawei Cloud. Triggers: WAF, AAD, firewall, DDoS, web protection, IP blacklist, rate limiting, CC attack. NOT for: security groups (use huawei-vpc), CTS audit (use huawei-cts).'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -16,25 +16,25 @@ Domain expertise for WAF and Anti-DDoS. Covers WAF policy/rules, AAD protection,
16
16
 
17
17
  ## Critical Warnings
18
18
 
19
- | Trap | Why |
20
- |------|-----|
21
- | WAF needs CNAME redirect | DNS must point to WAF endpoint, not server IP |
22
- | Premium instance required | Cloud WAF needs a dedicated/premium WAF instance |
19
+ | Trap | Why |
20
+ | -------------------------- | ----------------------------------------------------------------- |
21
+ | WAF needs CNAME redirect | DNS must point to WAF endpoint, not server IP |
22
+ | Premium instance required | Cloud WAF needs a dedicated/premium WAF instance |
23
23
  | AAD Standard vs Enterprise | Standard protects single IP. Enterprise protects entire IP ranges |
24
- | Rule order matters | WAF rules evaluated top-to-bottom within a policy |
24
+ | Rule order matters | WAF rules evaluated top-to-bottom within a policy |
25
25
 
26
26
  ## Common Workflows
27
27
 
28
28
  ### WAF
29
29
 
30
- | Task | Operation |
31
- |------|-----------|
32
- | List WAF instances | `ListInstances --cli-region=<r> --project_id=<p>` |
33
- | List policies | `ListPolicies --cli-region=<r> --project_id=<p>` |
34
- | Create custom rule | `BatchCreateCustomRule --cli-region=<r> --project_id=<p>` |
30
+ | Task | Operation |
31
+ | ------------------- | --------------------------------------------------------------- |
32
+ | List WAF instances | `ListInstances --cli-region=<r> --project_id=<p>` |
33
+ | List policies | `ListPolicies --cli-region=<r> --project_id=<p>` |
34
+ | Create custom rule | `BatchCreateCustomRule --cli-region=<r> --project_id=<p>` |
35
35
  | Create IP blacklist | `BatchCreateWhiteblackipRule --cli-region=<r> --project_id=<p>` |
36
- | Create CC rule | `BatchCreateCcRule --cli-region=<r> --project_id=<p>` |
37
- | Create geo rule | `BatchCreateGeoIpRule --cli-region=<r> --project_id=<p>` |
36
+ | Create CC rule | `BatchCreateCcRule --cli-region=<r> --project_id=<p>` |
37
+ | Create geo rule | `BatchCreateGeoIpRule --cli-region=<r> --project_id=<p>` |
38
38
 
39
39
  ### AAD
40
40
 
@@ -45,11 +45,11 @@ hcloud AAD CreateInstance --cli-region=<r> --project_id=<p>
45
45
 
46
46
  ## Troubleshooting
47
47
 
48
- | Error | Fix |
49
- |-------|-----|
50
- | Website unreachable after WAF | Check CNAME record points to WAF endpoint |
51
- | WAF blocking legitimate traffic | Check rules order, adjust false positive settings |
52
- | AAD not responding | Standard AAD only protects single EIP. Check EIP binding |
48
+ | Error | Fix |
49
+ | ------------------------------- | -------------------------------------------------------- |
50
+ | Website unreachable after WAF | Check CNAME record points to WAF endpoint |
51
+ | WAF blocking legitimate traffic | Check rules order, adjust false positive settings |
52
+ | AAD not responding | Standard AAD only protects single EIP. Check EIP binding |
53
53
 
54
54
  ## Security
55
55
 
@@ -11,12 +11,12 @@ Use this skill when the deliverable is application code, API integration, or pre
11
11
 
12
12
  ## Critical Warnings
13
13
 
14
- | Trap | Why |
15
- |------|-----|
16
- | `project_id` in path for most services | Many Huawei Cloud APIs require `project_id` in the URL path. Get it from IAM or KooCLI profile |
17
- | Pagination is not automatic | APIs return paginated results. Always check for `next_marker` or `page_info` to avoid partial data |
18
- | AK/SK signing algorithm | Huawei Cloud uses HMAC-SHA256 signing with specific header ordering. Use SDK, don't implement manually |
19
- | Endpoint varies by service and region | Always verify at https://developer.huaweicloud.com/endpoint |
14
+ | Trap | Why |
15
+ | ---------------------------------------- | --------------------------------------------------------------------------------------------------------- |
16
+ | `project_id` in path for most services | Many Huawei Cloud APIs require `project_id` in the URL path. Get it from IAM or KooCLI profile |
17
+ | Pagination is not automatic | APIs return paginated results. Always check for `next_marker` or `page_info` to avoid partial data |
18
+ | AK/SK signing algorithm | Huawei Cloud uses HMAC-SHA256 signing with specific header ordering. Use SDK, don't implement manually |
19
+ | Endpoint varies by service and region | Always verify at https://developer.huaweicloud.com/endpoint |
20
20
  | Error response in `body` not HTTP status | Many errors return HTTP 200 with error details in the JSON body. Check `error_code` or `error_msg` fields |
21
21
 
22
22
  ## API Workflow
@@ -38,13 +38,13 @@ Use this skill when the deliverable is application code, API integration, or pre
38
38
 
39
39
  ## Troubleshooting
40
40
 
41
- | Error | Root Cause -> Fix |
42
- |-------|-------------------|
43
- | Invalid project_id | Wrong or missing project_id in URL path. Use `hcloud IAM KeystoneListProjects` or KooCLI profile |
44
- | 401/AuthFailure | Expired AK/SK or wrong signing algorithm. Regenerate AK/SK or check SDK version |
45
- | 403/Forbidden | IAM permission missing. Check user/role has required action permissions |
46
- | Empty results | Pagination missing — add `limit` and check `marker` |
47
- | Endpoint not reachable | Wrong region/service endpoint. Verify at developer.huaweicloud.com/endpoint |
41
+ | Error | Root Cause -> Fix |
42
+ | ---------------------- | ------------------------------------------------------------------------------------------------ |
43
+ | Invalid project_id | Wrong or missing project_id in URL path. Use `hcloud IAM KeystoneListProjects` or KooCLI profile |
44
+ | 401/AuthFailure | Expired AK/SK or wrong signing algorithm. Regenerate AK/SK or check SDK version |
45
+ | 403/Forbidden | IAM permission missing. Check user/role has required action permissions |
46
+ | Empty results | Pagination missing — add `limit` and check `marker` |
47
+ | Endpoint not reachable | Wrong region/service endpoint. Verify at developer.huaweicloud.com/endpoint |
48
48
 
49
49
  ## Terraform Priority
50
50
 
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "Huawei Cloud API And SDK"
3
- short_description: "Build correct Huawei Cloud API requests and SDK integrations."
4
- default_prompt: "Use $huaweicloud-api-and-sdk to plan this Huawei Cloud API or SDK integration."
2
+ display_name: 'Huawei Cloud API And SDK'
3
+ short_description: 'Build correct Huawei Cloud API requests and SDK integrations.'
4
+ default_prompt: 'Use $huaweicloud-api-and-sdk to plan this Huawei Cloud API or SDK integration.'
@@ -5,7 +5,6 @@ description: Discover Huawei Cloud capabilities for an agent task. Use when the
5
5
 
6
6
  # Huawei Cloud Capability Discovery
7
7
 
8
-
9
8
  **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
9
 
11
10
  Use this skill to turn vague developer intent into a precise Huawei Cloud capability path.
@@ -21,6 +20,23 @@ Use this skill to turn vague developer intent into a precise Huawei Cloud capabi
21
20
  7. Prefer MCP only when an approved Huawei Cloud MCP tool exists for the needed operation.
22
21
  8. Treat Terraform as a secondary V1 path for reviewed IaC, not the default.
23
22
  9. When no built-in devkit skill matches, browse the community skill marketplace at https://github.com/huaweicloud/huaweicloud-skills. Fetch the index from https://raw.githubusercontent.com/huaweicloud/huaweicloud-skills/master/skills-index/index.json.
23
+ 10. When the deliverable is a PPT, architecture diagram (draw.io), or frontend page that needs official Huawei Cloud service logos, use the `huaweicloud_get_service_icon` MCP tool to get logo URLs from the official Icons library instead of guessing or hotlinking unofficial images.
24
+
25
+ ## Scenario Routing
26
+
27
+ Match the scenario before picking a service. For "deploy a web app" requests, layer the recommendation instead of defaulting to a production service:
28
+
29
+ | Scenario | Recommended path |
30
+ | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
31
+ | hello world / prototype / demo / temporary preview (free, quick try) | `huawei-sandbox` first — temporary runtime + public URL, ~8h validity, zero billed resources |
32
+ | production / long-term / custom domain / high availability | `huawei-functiongraph` / `huawei-ecs` (or `huawei-cce` for containers) |
33
+
34
+ Route to the sandbox when the developer signals free/quick preview intent ("免费", "快速", "预览", "hello world", "原型", "演示"); route to production services only when production-grade hosting is explicitly required.
35
+
36
+ ## Official Service Logos
37
+
38
+ - Use `huaweicloud_get_service_icon` with the service name, alias, or Chinese name (e.g. `ecs`, `obs`, `modelarts`, `对象存储`). It returns the official CDN logo URL (`logo.source_url`), category, and product page link from https://open.huaweicloud.com/openplatform/icons.html.
39
+ - Prefer `logo.source_url` for web deliverables and the Icons library search page for browsing; do not scrape logos from third-party sites.
24
40
 
25
41
  ## Deployment Target Options
26
42
 
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "Huawei Cloud Capability Discovery"
3
- short_description: "Find the right Huawei Cloud capability path for a developer task."
4
- default_prompt: "Use $huaweicloud-capability-discovery to route this scenario to Huawei Cloud capabilities."
2
+ display_name: 'Huawei Cloud Capability Discovery'
3
+ short_description: 'Find the right Huawei Cloud capability path for a developer task.'
4
+ default_prompt: 'Use $huaweicloud-capability-discovery to route this scenario to Huawei Cloud capabilities.'
@@ -5,7 +5,6 @@ description: Safe Huawei Cloud KooCLI usage and authentication guidance. Use whe
5
5
 
6
6
  # Huawei Cloud CLI And Auth
7
7
 
8
-
9
8
  **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
9
 
11
10
  Use KooCLI `hcloud` for local inspection and reviewed operations. Never ask the user to paste AK/SK, SK, tokens, passwords, or credential files into chat.
@@ -15,16 +14,21 @@ Use KooCLI `hcloud` for local inspection and reviewed operations. Never ask the
15
14
  Official guide: `https://support.huaweicloud.com/qs-hcli/hcli_02_003.html`.
16
15
 
17
16
  ### Windows
17
+
18
18
  1. Download and unzip: `https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-windows-amd64.zip`
19
19
  2. Extract to `%USERPROFILE%\hcloud`, add to user `PATH`
20
20
  3. Verify: `hcloud version`
21
21
 
22
22
  ### Linux (amd64 / arm64)
23
+
23
24
  One-liner (recommended):
25
+
24
26
  ```bash
25
27
  curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y
26
28
  ```
29
+
27
30
  Or manual download:
31
+
28
32
  ```bash
29
33
  # amd64
30
34
  curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz"
@@ -33,15 +37,20 @@ tar -zxvf huaweicloud-cli-linux-amd64.tar.gz
33
37
  curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-arm64.tar.gz"
34
38
  tar -zxvf huaweicloud-cli-linux-arm64.tar.gz
35
39
  ```
40
+
36
41
  Move to PATH: `mv $(pwd)/hcloud ~/.local/bin/`
37
42
  Verify: `hcloud version`
38
43
 
39
44
  ### macOS (amd64 / arm64)
45
+
40
46
  One-liner (recommended):
47
+
41
48
  ```bash
42
49
  curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y
43
50
  ```
51
+
44
52
  Or manual download:
53
+
45
54
  ```bash
46
55
  # amd64
47
56
  curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-mac-amd64.tar.gz"
@@ -50,6 +59,7 @@ tar -zxvf huaweicloud-cli-mac-amd64.tar.gz
50
59
  curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-mac-arm64.tar.gz"
51
60
  tar -zxvf huaweicloud-cli-mac-arm64.tar.gz
52
61
  ```
62
+
53
63
  Move to PATH: `mv $(pwd)/hcloud /usr/local/bin/`
54
64
  Verify: `hcloud version`
55
65
 
@@ -111,8 +121,24 @@ hcloud <Service> <ListOp> --cli-output=json --cli-query "items[?status=='ACTIVE'
111
121
  hcloud <Service> <Op> --cli-debug=true
112
122
  ```
113
123
 
124
+ ## Credential Resolution Priority
125
+
126
+ Credentials are resolved in this order (highest priority first):
127
+
128
+ | Priority | Source | Mechanism | Persistence |
129
+ | -------- | ----------------------- | ---------------------------------------------------------- | ------------------------------- |
130
+ | 1 | Runtime credentials | `huaweicloud_auth_init` tool | Memory (cleared on MCP restart) |
131
+ | 2 | Environment variables | `HW_ACCESS_KEY` / `HW_SECRET_KEY` | MCP process lifetime |
132
+ | 3 | CodeArts project config | `.codeartsdoer/mcp/mcp_settings.json` (project, then user) | File |
133
+ | 4 | Global config file | `~/.config/huaweicloud/credentials.json` | Permanent |
134
+ | 5 | KooCLI profile | `~/.hcloud/config.json` (KooCLI only) | Permanent |
135
+
136
+ When switching accounts within the same Agent session, use `huaweicloud_auth_init` to set runtime credentials. This overrides all other sources for the current MCP process.
137
+
114
138
  ## Preferred Toolkit Tools
115
139
 
140
+ - `huaweicloud_auth_init`
141
+ - `huaweicloud_auth_status`
116
142
  - `huaweicloud_check_cli`
117
143
  - `huaweicloud_show_profile_redacted`
118
144
  - `huaweicloud_plan_cli_command`
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "Huawei Cloud CLI And Auth"
3
- short_description: "Use KooCLI safely without exposing credentials."
4
- default_prompt: "Use $huaweicloud-cli-and-auth to check KooCLI setup safely."
2
+ display_name: 'Huawei Cloud CLI And Auth'
3
+ short_description: 'Use KooCLI safely without exposing credentials.'
4
+ default_prompt: 'Use $huaweicloud-cli-and-auth to check KooCLI setup safely.'