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-apig
3
- description: "Use when creating or managing API Gateway (APIG). Covers API creation, throttling, auth (IAM/APP/basic), CORS, publishing, instance management. Triggers: APIG, API gateway, throttling, publish API. NOT for: FunctionGraph triggers (use huawei-functiongraph)."
3
+ description: 'Use when creating or managing API Gateway (APIG). Covers API creation, throttling, auth (IAM/APP/basic), CORS, publishing, instance management. Triggers: APIG, API gateway, throttling, publish API. NOT for: FunctionGraph triggers (use huawei-functiongraph).'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -16,16 +16,16 @@ Always discover parameters with `hcloud APIG <Operation> --help` before executin
16
16
 
17
17
  ## Critical Warnings
18
18
 
19
- | Trap | Why |
20
- |------|-----|
21
- | API group region-locked | Cannot move across regions |
22
- | Throttling per-API default | Use app-level quotas for per-user limits |
23
- | CORS must be explicit | OPTIONS preflight fails until configured |
24
- | `BASIC` spec has no public IP | Use `PROFESSIONAL` + `elb` provider for public access |
25
- | Instance creation takes 5-15min | Long-running async operation. State is **Running** (NOT "SUCCESS"). Poll with `ListInstancesV2`, wait for `status == "Running"` |
26
- | `sl_domain` is from API **Group** | NOT from Instance. Get it from `CreateApiGroupV2` or `ListApiGroupsV2` response |
27
- | API name must NOT have hyphens | `[a-zA-Z0-9_]+` only. Hyphens cause regex validation failure |
28
- | VPC params need prefix | `--vpc.name=<n>` / `--subnet.vpc_id=<id>` / `--security_group.name=<n>` with KooCLI 7.x |
19
+ | Trap | Why |
20
+ | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
21
+ | API group region-locked | Cannot move across regions |
22
+ | Throttling per-API default | Use app-level quotas for per-user limits |
23
+ | CORS must be explicit | OPTIONS preflight fails until configured |
24
+ | `BASIC` spec has no public IP | Use `PROFESSIONAL` + `elb` provider for public access |
25
+ | Instance creation takes 5-15min | Long-running async operation. State is **Running** (NOT "SUCCESS"). Poll with `ListInstancesV2`, wait for `status == "Running"` |
26
+ | `sl_domain` is from API **Group** | NOT from Instance. Get it from `CreateApiGroupV2` or `ListApiGroupsV2` response |
27
+ | API name must NOT have hyphens | `[a-zA-Z0-9_]+` only. Hyphens cause regex validation failure |
28
+ | VPC params need prefix | `--vpc.name=<n>` / `--subnet.vpc_id=<id>` / `--security_group.name=<n>` with KooCLI 7.x |
29
29
 
30
30
  ## Instance Management
31
31
 
@@ -43,14 +43,14 @@ hcloud APIG CreateInstanceV2 --help
43
43
 
44
44
  Key gotchas when creating:
45
45
 
46
- | Param | Note |
47
- |-------|------|
48
- | `--spec_id` | `BASIC` (no public access), `PROFESSIONAL` (requires `--loadbalancer_provider`) |
49
- | `--loadbalancer_provider` | `elb` for public access (supports `AddIngressEipV2`), `lvs` for internal only (supports `AddEipV2`) |
50
- | `--enterprise_project_id` | **Required** for enterprise accounts. Use `"0"` for default project |
51
- | `--available_zone_ids` | Use AZ code like `ap-southeast-3a`, NOT UUID from `ListAvailableZonesV2` |
52
- | `--vpc_id`, `--subnet_id` | Must exist in the target region |
53
- | `--security_group_id` | **Required**. Create a security group first via `VPC CreateSecurityGroup` (VPC v3 API — no `vpc_id` param needed) |
46
+ | Param | Note |
47
+ | ------------------------- | ----------------------------------------------------------------------------------------------------------------- |
48
+ | `--spec_id` | `BASIC` (no public access), `PROFESSIONAL` (requires `--loadbalancer_provider`) |
49
+ | `--loadbalancer_provider` | `elb` for public access (supports `AddIngressEipV2`), `lvs` for internal only (supports `AddEipV2`) |
50
+ | `--enterprise_project_id` | **Required** for enterprise accounts. Use `"0"` for default project |
51
+ | `--available_zone_ids` | Use AZ code like `ap-southeast-3a`, NOT UUID from `ListAvailableZonesV2` |
52
+ | `--vpc_id`, `--subnet_id` | Must exist in the target region |
53
+ | `--security_group_id` | **Required**. Create a security group first via `VPC CreateSecurityGroup` (VPC v3 API — no `vpc_id` param needed) |
54
54
 
55
55
  ### Add Public Access (ELB Provider Only)
56
56
 
@@ -89,9 +89,9 @@ Wait for `eip_address` to show a valid IP (may take up to 2 minutes). If `eip_ad
89
89
  hcloud APIG CreateApiGroupV2 --instance_id=<id> --name=<n>
90
90
  ```
91
91
 
92
- | Param | Note |
93
- |-------|------|
94
- | `--name` | Group name (required) |
92
+ | Param | Note |
93
+ | ---------- | ---------------------- |
94
+ | `--name` | Group name (required) |
95
95
  | `--remark` | Description (optional) |
96
96
 
97
97
  ## API Management
@@ -120,18 +120,18 @@ hcloud APIG CreateThrottlingPolicyV2 --name=<n> --api_call_limits=1000
120
120
 
121
121
  ## Common Workflows
122
122
 
123
- | Task | Operation |
124
- |------|-----------|
125
- | List instances | `ListInstancesV2` |
126
- | Create instance | `CreateInstanceV2` |
127
- | Delete instance | `DeleteInstancesV2` |
128
- | Add public EIP | `AddIngressEipV2` |
129
- | Create API group | `CreateApiGroupV2` |
130
- | Create API | `CreateApiV2` |
131
- | Update API | `UpdateApiV2` — change auth mode, path, etc. |
132
- | List APIs | `ListApisV2` |
133
- | Publish | `BatchPublishOrOfflineApiV2` |
134
- | List APIs | `ListApisV2` |
123
+ | Task | Operation |
124
+ | ---------------- | -------------------------------------------- |
125
+ | List instances | `ListInstancesV2` |
126
+ | Create instance | `CreateInstanceV2` |
127
+ | Delete instance | `DeleteInstancesV2` |
128
+ | Add public EIP | `AddIngressEipV2` |
129
+ | Create API group | `CreateApiGroupV2` |
130
+ | Create API | `CreateApiV2` |
131
+ | Update API | `UpdateApiV2` — change auth mode, path, etc. |
132
+ | List APIs | `ListApisV2` |
133
+ | Publish | `BatchPublishOrOfflineApiV2` |
134
+ | List APIs | `ListApisV2` |
135
135
 
136
136
  ## FunctionGraph Integration
137
137
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-billing
3
- description: "Use when querying bills, costs, resource usage, or billing details on Huawei Cloud (BSS). Triggers: billing, BSS, cost, bill, expense, usage report, resource usage, budget. NOT for: resource management (use huawei-ecs etc.), creating resources."
3
+ description: 'Use when querying bills, costs, resource usage, or billing details on Huawei Cloud (BSS). Triggers: billing, BSS, cost, bill, expense, usage report, resource usage, budget. NOT for: resource management (use huawei-ecs etc.), creating resources.'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -16,32 +16,32 @@ 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
24
 
25
25
  ## Common Workflows
26
26
 
27
- | Task | Operation |
28
- |------|-----------|
29
- | List costs | `ListCosts --cli-region=<r> --project_id=<p>` |
30
- | List customer bills | `ListCustomerBills --cli-region=<r> --project_id=<p>` |
31
- | List resource usage | `ListResourceUsage --cli-region=<r> --project_id=<p>` |
32
- | List sub-customers | `ListConsumeSubCustomers --cli-region=<r> --project_id=<p>` |
27
+ | Task | Operation |
28
+ | -------------------- | --------------------------------------------------------------- |
29
+ | List costs | `ListCosts --cli-region=<r> --project_id=<p>` |
30
+ | List customer bills | `ListCustomerBills --cli-region=<r> --project_id=<p>` |
31
+ | List resource usage | `ListResourceUsage --cli-region=<r> --project_id=<p>` |
32
+ | List sub-customers | `ListConsumeSubCustomers --cli-region=<r> --project_id=<p>` |
33
33
  | Show account balance | `ShowCustomerAccountBalances --cli-region=<r> --project_id=<p>` |
34
- | List conversions | `ListConversions --cli-region=<r> --project_id=<p>` |
34
+ | List conversions | `ListConversions --cli-region=<r> --project_id=<p>` |
35
35
 
36
36
  Discover exact parameters with `--help` before executing any command. All BSS operations are read-only.
37
37
 
38
38
  ## Troubleshooting
39
39
 
40
- | Error | Fix |
41
- |-------|-----|
42
- | Access denied | User needs BSS Administrator or Finance role |
43
- | No data returned | Check time range (bills have ~24h delay). Verify project_id |
44
- | Enterprise account restrictions | Some APIs require enterprise real-name authentication |
40
+ | Error | Fix |
41
+ | ------------------------------- | ----------------------------------------------------------- |
42
+ | Access denied | User needs BSS Administrator or Finance role |
43
+ | No data returned | Check time range (bills have ~24h delay). Verify project_id |
44
+ | Enterprise account restrictions | Some APIs require enterprise real-name authentication |
45
45
 
46
46
  ## Cross-Skill References
47
47
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-cbr
3
- description: "Use when creating or managing Cloud Backup and Recovery (CBR) vaults, backups, and restore operations on Huawei Cloud. Triggers: CBR, backup, restore, vault, snapshot, disaster recovery. NOT for: OBS object versioning (use huawei-obs), RDS automated backups (use huawei-rds)."
3
+ description: 'Use when creating or managing Cloud Backup and Recovery (CBR) vaults, backups, and restore operations on Huawei Cloud. Triggers: CBR, backup, restore, vault, snapshot, disaster recovery. NOT for: OBS object versioning (use huawei-obs), RDS automated backups (use huawei-rds).'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -16,33 +16,33 @@ Domain expertise for Cloud Backup and Recovery. Covers vaults, backups, restore
16
16
 
17
17
  ## Critical Warnings
18
18
 
19
- | Trap | Why |
20
- |------|-----|
21
- | Vault binds single resource type | Server vault != disk vault != file system vault |
22
- | Restore needs instance stop | Most VM restore requires the target instance to be stopped first |
23
- | Backup storage incurs charges | Retention policies affect storage costs |
19
+ | Trap | Why |
20
+ | -------------------------------- | ---------------------------------------------------------------- |
21
+ | Vault binds single resource type | Server vault != disk vault != file system vault |
22
+ | Restore needs instance stop | Most VM restore requires the target instance to be stopped first |
23
+ | Backup storage incurs charges | Retention policies affect storage costs |
24
24
 
25
25
  ## Common Workflows
26
26
 
27
- | Task | Operation |
28
- |------|-----------|
29
- | List vaults | `ListVaults --cli-region=<r> --project_id=<p>` |
30
- | Create vault | `CreateVault --cli-region=<r> --project_id=<p>` |
31
- | Create backup policy | `CreatePolicy --cli-region=<r> --project_id=<p>` |
32
- | Create checkpoint | `CreateCheckpoint --cli-region=<r> --project_id=<p>` |
33
- | Add resource to vault | `AddVaultResource --cli-region=<r> --project_id=<p>` |
34
- | Batch update vault | `BatchUpdateVault --cli-region=<r> --project_id=<p>` |
27
+ | Task | Operation |
28
+ | -------------------------- | ------------------------------------------------------------ |
29
+ | List vaults | `ListVaults --cli-region=<r> --project_id=<p>` |
30
+ | Create vault | `CreateVault --cli-region=<r> --project_id=<p>` |
31
+ | Create backup policy | `CreatePolicy --cli-region=<r> --project_id=<p>` |
32
+ | Create checkpoint | `CreateCheckpoint --cli-region=<r> --project_id=<p>` |
33
+ | Add resource to vault | `AddVaultResource --cli-region=<r> --project_id=<p>` |
34
+ | Batch update vault | `BatchUpdateVault --cli-region=<r> --project_id=<p>` |
35
35
  | Create organization policy | `CreateOrganizationPolicy --cli-region=<r> --project_id=<p>` |
36
36
 
37
37
  Discover exact parameters with `--help` before executing any command.
38
38
 
39
39
  ## Troubleshooting
40
40
 
41
- | Error | Fix |
42
- |-------|-----|
43
- | Backup creation fails | Check instance is running and agent is online |
44
- | Restore fails | Ensure target instance is stopped before restore |
45
- | Vault full | Increase vault capacity or adjust retention policy |
41
+ | Error | Fix |
42
+ | --------------------- | -------------------------------------------------- |
43
+ | Backup creation fails | Check instance is running and agent is online |
44
+ | Restore fails | Ensure target instance is stopped before restore |
45
+ | Vault full | Increase vault capacity or adjust retention policy |
46
46
 
47
47
  ## Cross-Skill References
48
48
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-cce
3
- description: "Use when creating or managing CCE Kubernetes clusters. Covers cluster creation, node pools, SWR registry, autoscaling. Triggers: CCE, Kubernetes, K8s, cluster, node pool, container, SWR. NOT for: serverless functions (use huawei-functiongraph), serverless containers (use huawei-cce for CCI redirect)."
3
+ description: 'Use when creating or managing CCE Kubernetes clusters. Covers cluster creation, node pools, SWR registry, autoscaling. Triggers: CCE, Kubernetes, K8s, cluster, node pool, container, SWR. NOT for: serverless functions (use huawei-functiongraph), serverless containers (use huawei-cce for CCI redirect).'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -16,32 +16,33 @@ Domain expertise for CCE (Cloud Container Engine) and SWR (Software Repository f
16
16
 
17
17
  ## Critical Warnings
18
18
 
19
- | Trap | Why |
20
- |------|-----|
21
- | **KooCLI 7.x: CreateCluster/CreateNodePool broken** | OPENAPI_ERROR in KooCLI 7.2.12. Use `CreateAutopilotCluster` for serverless, or Python SDK for VM clusters |
22
- | Cluster type immutable | Cannot change hybrid/traditional after creation |
23
- | Master managed by Huawei | No SSH to master. Use kubectl or kubectl-cce |
24
- | Network model affects pod IP | VPC network gives pods VPC IPs |
25
- | Addon ops use UID not name | `ShowAddonInstance` returns `metadata.uid` for install/uninstall/update |
26
- | SWR enterprise instance costs | `postPaid` billing. One-time activation at console required |
19
+ | Trap | Why |
20
+ | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | **Huawei Cloud API returns errors one field at a time** | When creating clusters/services with multiple invalid fields, the API reports only the first error, not all errors at once. After fixing one field and resubmitting, the next call reveals the next error — iterating N times for N bad fields. This compounds with long cluster creation times (~10 min). To avoid this loop, run `hcloud CCE <Operation> --help` and validate every parameter with its constraints before the first call. Use `--cli-jsonInput` with a validated JSON file to reduce reformatting overhead between retries. |
22
+ | **KooCLI 7.x: CreateCluster/CreateNodePool broken** | OPENAPI_ERROR in KooCLI 7.2.12. Use `CreateAutopilotCluster` for serverless, or Python SDK for VM clusters |
23
+ | Cluster type immutable | Cannot change hybrid/traditional after creation |
24
+ | Master managed by Huawei | No SSH to master. Use kubectl or kubectl-cce |
25
+ | Network model affects pod IP | VPC network gives pods VPC IPs |
26
+ | Addon ops use UID not name | `ShowAddonInstance` returns `metadata.uid` for install/uninstall/update |
27
+ | SWR enterprise instance costs | `postPaid` billing. One-time activation at console required |
27
28
 
28
29
  ## Common Workflows
29
30
 
30
- | Task | Operation | Service |
31
- |------|-----------|---------|
32
- | List clusters | `ListClusters` | CCE |
33
- | Create cluster | `CreateCluster` | CCE |
34
- | Delete cluster | `DeleteCluster` | CCE |
35
- | Hibernate cluster | `HibernateCluster` | CCE |
36
- | List node pools | `ListNodePools` | CCE |
37
- | Create node pool | `CreateNodePool` | CCE |
38
- | List nodes | `ListNodes` | CCE |
39
- | Get kubeconfig | `CreateKubernetesClusterCert` | CCE |
40
- | List addons | `ListAddonInstances` | CCE |
41
- | Docker login (SWR) | `CreateAuthorizationToken` | SWR |
42
- | Create SWR org | `CreateNamespace` | SWR |
43
- | Create SWR repo | `CreateRepo` | SWR |
44
- | List repos | `ListReposDetails` | SWR |
31
+ | Task | Operation | Service |
32
+ | ------------------ | ----------------------------- | ------- |
33
+ | List clusters | `ListClusters` | CCE |
34
+ | Create cluster | `CreateCluster` | CCE |
35
+ | Delete cluster | `DeleteCluster` | CCE |
36
+ | Hibernate cluster | `HibernateCluster` | CCE |
37
+ | List node pools | `ListNodePools` | CCE |
38
+ | Create node pool | `CreateNodePool` | CCE |
39
+ | List nodes | `ListNodes` | CCE |
40
+ | Get kubeconfig | `CreateKubernetesClusterCert` | CCE |
41
+ | List addons | `ListAddonInstances` | CCE |
42
+ | Docker login (SWR) | `CreateAuthorizationToken` | SWR |
43
+ | Create SWR org | `CreateNamespace` | SWR |
44
+ | Create SWR repo | `CreateRepo` | SWR |
45
+ | List repos | `ListReposDetails` | SWR |
45
46
 
46
47
  ## SWR Image Push Workflow
47
48
 
@@ -75,14 +76,15 @@ See `hcloud CCI --help` for full operation list.
75
76
 
76
77
  ## Troubleshooting
77
78
 
78
- | Error | Fix |
79
- |-------|-----|
80
- | kubectl connection refused | Verify cluster Running; use `kubectl cce` (no EIP needed) |
81
- | Node pool creation failed | Check VPC/subnet availability and flavor capacity |
82
- | Docker push 401 | Re-run `CreateAuthorizationToken` (token expired) |
83
- | SVCSTG.SWR.4030170 | Missing `sts::createServiceBearerToken` IAM permission. Grant SWR Admin role or add policy |
84
- | Addon install fails | Use `metadata.uid` from `ShowAddonInstance`, not name |
85
- | `kubectl cce` not found | Install plugin: `kubectl cce` uses AK/SK, no kubeconfig required |
79
+ | Error | Fix |
80
+ | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
81
+ | kubectl connection refused | Verify cluster Running; use `kubectl cce` (no EIP needed) |
82
+ | Node pool creation failed | Check VPC/subnet availability and flavor capacity |
83
+ | Docker push 401 | Re-run `CreateAuthorizationToken` (token expired) |
84
+ | SVCSTG.SWR.4030170 | Missing `sts::createServiceBearerToken` IAM permission. Grant SWR Admin role or add policy |
85
+ | Addon install fails | Use `metadata.uid` from `ShowAddonInstance`, not name |
86
+ | `kubectl cce` not found | Install plugin: `kubectl cce` uses AK/SK, no kubeconfig required |
87
+ | Serial field-by-field API errors | The API reports errors one field at a time. Fix a field, retry, get the next error — each cycle ~10 min for cluster operations. Mitigation: validate all parameters against `--help` constraints before the first call; use `--cli-jsonInput` for faster retries. |
86
88
 
87
89
  ## Security Considerations
88
90
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-cloud-eye
3
- description: "Use when setting up monitoring, alarms, dashboards, or event rules on Huawei Cloud Eye (CES). Triggers: Cloud Eye, CES, monitoring, alarm, metrics, dashboard, event monitoring. NOT for: CTS audit logs (use huawei-cts), AAD anti-DDoS (use huawei-waf-aad)."
3
+ description: 'Use when setting up monitoring, alarms, dashboards, or event rules on Huawei Cloud Eye (CES). Triggers: Cloud Eye, CES, monitoring, alarm, metrics, dashboard, event monitoring. NOT for: CTS audit logs (use huawei-cts), AAD anti-DDoS (use huawei-waf-aad).'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -16,13 +16,13 @@ Domain expertise for Cloud Eye (CES). Covers metric queries, alarm rules, dashbo
16
16
 
17
17
  ## Critical Warnings
18
18
 
19
- | Trap | Why |
20
- |------|-----|
21
- | Telescope agent required for detailed metrics | Without agent: only basic CPU/network metrics. Memory, disk require agent installation on ECS |
22
- | Alarm needs SMN topic first | Alarm notifications fail silently without a configured SMN topic |
23
- | Cost metrics incur charges | Custom metrics and high-frequency alarms have billing implications |
24
- | CES endpoint may vary by region | Some older regions use different endpoint URLs. Check `https://developer.huaweicloud.com/endpoint?CES` |
25
- | Metric granularity minimum 300s | Free tier has 5-minute minimum. Higher resolution requires paid tier |
19
+ | Trap | Why |
20
+ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
21
+ | Telescope agent required for detailed metrics | Without agent: only basic CPU/network metrics. Memory, disk require agent installation on ECS |
22
+ | Alarm needs SMN topic first | Alarm notifications fail silently without a configured SMN topic |
23
+ | Cost metrics incur charges | Custom metrics and high-frequency alarms have billing implications |
24
+ | CES endpoint may vary by region | Some older regions use different endpoint URLs. Check `https://developer.huaweicloud.com/endpoint?CES` |
25
+ | Metric granularity minimum 300s | Free tier has 5-minute minimum. Higher resolution requires paid tier |
26
26
 
27
27
  ## Prerequisites
28
28
 
@@ -32,15 +32,15 @@ Domain expertise for Cloud Eye (CES). Covers metric queries, alarm rules, dashbo
32
32
 
33
33
  ## Common Workflows
34
34
 
35
- | Task | Operation |
36
- |------|-----------|
37
- | List metrics | `ListMetrics --cli-region=<r> --project_id=<p>` |
38
- | Get metric data | `BatchListMetricData --cli-region=<r> --project_id=<p>` |
39
- | List alarms | `ListAlarms --cli-region=<r> --project_id=<p>` |
40
- | Create alarm | `CreateAlarm` (see below) |
41
- | Delete alarm | `BatchDeleteAlarmRules --cli-region=<r> --project_id=<p>` |
42
- | List dashboards | `ListDashboardWidgets --cli-region=<r> --project_id=<p>` |
43
- | Create dashboard | `CreateDashboard --cli-region=<r> --project_id=<p>` |
35
+ | Task | Operation |
36
+ | ---------------- | --------------------------------------------------------- |
37
+ | List metrics | `ListMetrics --cli-region=<r> --project_id=<p>` |
38
+ | Get metric data | `BatchListMetricData --cli-region=<r> --project_id=<p>` |
39
+ | List alarms | `ListAlarms --cli-region=<r> --project_id=<p>` |
40
+ | Create alarm | `CreateAlarm` (see below) |
41
+ | Delete alarm | `BatchDeleteAlarmRules --cli-region=<r> --project_id=<p>` |
42
+ | List dashboards | `ListDashboardWidgets --cli-region=<r> --project_id=<p>` |
43
+ | Create dashboard | `CreateDashboard --cli-region=<r> --project_id=<p>` |
44
44
 
45
45
  ## Create Alarm Rule — Param Structure
46
46
 
@@ -57,14 +57,14 @@ hcloud CES CreateAlarm --help
57
57
 
58
58
  For metric alarms use **symbols** (NOT words like `gt`/`lt`):
59
59
 
60
- | Value | Meaning |
61
- |-------|---------|
62
- | `>` | Greater than |
63
- | `>=` | Greater than or equal |
64
- | `<` | Less than |
65
- | `<=` | Less than or equal |
66
- | `=` | Equal |
67
- | `!=` | Not equal |
60
+ | Value | Meaning |
61
+ | ----- | --------------------- |
62
+ | `>` | Greater than |
63
+ | `>=` | Greater than or equal |
64
+ | `<` | Less than |
65
+ | `<=` | Less than or equal |
66
+ | `=` | Equal |
67
+ | `!=` | Not equal |
68
68
 
69
69
  For event alarms: `cycle_decrease`, `cycle_increase`, `cycle_wave`.
70
70
 
@@ -72,11 +72,11 @@ For event alarms: `cycle_decrease`, `cycle_increase`, `cycle_wave`.
72
72
 
73
73
  ## Troubleshooting
74
74
 
75
- | Error | Fix |
76
- |-------|-----|
77
- | No metric data | Telescope agent not installed or ECS stopped. Install agent for detailed metrics |
78
- | Alarm not triggering | Check metric period (minimum 300s), verify condition threshold |
79
- | CES network timeout in region | Some regions may have CES endpoint issues. Try a different region |
75
+ | Error | Fix |
76
+ | ----------------------------- | -------------------------------------------------------------------------------- |
77
+ | No metric data | Telescope agent not installed or ECS stopped. Install agent for detailed metrics |
78
+ | Alarm not triggering | Check metric period (minimum 300s), verify condition threshold |
79
+ | CES network timeout in region | Some regions may have CES endpoint issues. Try a different region |
80
80
 
81
81
  ## Security
82
82
 
@@ -6,6 +6,7 @@ description: |
6
6
 
7
7
  > [!IMPORTANT]
8
8
  > **For any Huawei Cloud query or management task:**
9
+ >
9
10
  > 1. **Search** — use this skill (`huawei-cloud-find-skills`) to find the relevant Skill.
10
11
  > 2. **Install** — install the matched Skill (see [Step 3](#step-3-install-skill)).
11
12
  > 3. **Execute** — follow the installed Skill's instructions to fulfill the request.
@@ -36,7 +37,7 @@ This skill enables users to:
36
37
 
37
38
  ## Prerequisites
38
39
 
39
- - **Node.js >= 20** must be installed
40
+ - **Node.js >= 22** must be installed
40
41
  - **Network access** to `gitcode.com` (API v5 for index) and `github.com` / `raw.githubusercontent.com` (for skill details)
41
42
 
42
43
  ### Step 0: Check Python Environment
@@ -80,7 +81,6 @@ SKILLS_INDEX_URL=https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index
80
81
  SKILLS_CN_EN_MAP_URL=https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/cn-en-map.json?ref=main
81
82
  ```
82
83
 
83
-
84
84
  ## Core Workflow
85
85
 
86
86
  ### Step 1: Search Skills
@@ -98,6 +98,7 @@ node scripts/search-skills.mjs -c <category>
98
98
  → [scripts/search-skills.mjs](scripts/search-skills.mjs) (Node.js — cross-platform)
99
99
 
100
100
  **What the script does**:
101
+
101
102
  1. Fetches `index.json` and `cn-en-map.json` via HTTP GET from GitCode API v5 (auto-decodes base64 content)
102
103
  2. Expands keywords via `cn-en-map.json` (bidirectional CN↔EN, e.g., "ECS" → "ECS, 弹性云服务器, 云服务器")
103
104
  3. Scores each skill: name match **+10**, trigger match **+8**, description match **+5**, service match **+3**
@@ -137,19 +138,18 @@ If all installation attempts fail, report the error message to the user. Do NOT
137
138
 
138
139
  ## Parameters
139
140
 
140
- | Parameter | Required/Optional | Description | Default |
141
- |-----------|-------------------|-------------|---------|
142
- | `Keyword` | Optional | Search keyword (matched against name, description, triggers, service) | None |
143
- | `Category` | Optional | Category code for filtering (e.g., "computing", "storage", "network") | None |
144
- | `skill-name` | Required (Step 3) | Exact skill name for installing | None |
145
-
141
+ | Parameter | Required/Optional | Description | Default |
142
+ | ------------ | ----------------- | --------------------------------------------------------------------- | ------- |
143
+ | `Keyword` | Optional | Search keyword (matched against name, description, triggers, service) | None |
144
+ | `Category` | Optional | Category code for filtering (e.g., "computing", "storage", "network") | None |
145
+ | `skill-name` | Required (Step 3) | Exact skill name for installing | None |
146
146
 
147
147
  ## Reference Documentation
148
148
 
149
- | Document | Description |
150
- |----------|-------------|
151
- | GitCode API v5 `index.json` | Skill index fetched via HTTP GET (base64 decoded) |
152
- | GitCode API v5 `cn-en-map.json` | Chinese-English keyword mapping fetched via HTTP GET (base64 decoded) |
149
+ | Document | Description |
150
+ | ---------------------------------------------------- | ------------------------------------------------------------------------------------- |
151
+ | GitCode API v5 `index.json` | Skill index fetched via HTTP GET (base64 decoded) |
152
+ | GitCode API v5 `cn-en-map.json` | Chinese-English keyword mapping fetched via HTTP GET (base64 decoded) |
153
153
  | [scripts/search-skills.py](scripts/search-skills.py) | Search script (Python) — fetches from GitCode API v5, expands keywords, scores, sorts |
154
154
 
155
155
  ## Search Heuristics
@@ -176,6 +176,7 @@ If all installation attempts fail, report the error message to the user. Do NOT
176
176
 
177
177
  **Cause**: Keywords don't match any skill
178
178
  **Solution**:
179
+
179
180
  1. Try broader keywords
180
181
  2. Switch between Chinese and English keywords (e.g., "对象存储" → "obs")
181
182
  3. List all skills: `python scripts/search-skills.py -c "computing"`
@@ -1,17 +1,47 @@
1
- #!/usr/bin/env node
2
1
  import { Buffer } from 'node:buffer';
3
2
 
4
- const INDEX_URL = 'https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/index.json?ref=main';
5
- const CN_EN_MAP_URL = 'https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/cn-en-map.json?ref=main';
3
+ const INDEX_URL =
4
+ 'https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/index.json?ref=main';
5
+ const CN_EN_MAP_URL =
6
+ 'https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/cn-en-map.json?ref=main';
6
7
 
7
8
  const GENERIC_KEYWORDS = new Set([
8
- '华为云', 'huawei', 'huawei cloud', '云', 'cloud', '技能', 'skill', 'skills',
9
- '所有', 'all', '全部', '有什么', '有哪些', '相关', '列表', 'list',
10
- '查找', '搜索', '发现', '浏览', 'find', 'search', 'discover', 'browse',
11
- 'show', 'explore', 'agent', '市场', 'market', '类目', 'category', '安装', 'install',
9
+ '华为云',
10
+ 'huawei',
11
+ 'huawei cloud',
12
+ '',
13
+ 'cloud',
14
+ '技能',
15
+ 'skill',
16
+ 'skills',
17
+ '所有',
18
+ 'all',
19
+ '全部',
20
+ '有什么',
21
+ '有哪些',
22
+ '相关',
23
+ '列表',
24
+ 'list',
25
+ '查找',
26
+ '搜索',
27
+ '发现',
28
+ '浏览',
29
+ 'find',
30
+ 'search',
31
+ 'discover',
32
+ 'browse',
33
+ 'show',
34
+ 'explore',
35
+ 'agent',
36
+ '市场',
37
+ 'market',
38
+ '类目',
39
+ 'category',
40
+ '安装',
41
+ 'install',
12
42
  ]);
13
43
 
14
- async function fetchJson(url, label) {
44
+ async function fetchJson(url, _label) {
15
45
  const resp = await fetch(url, { headers: { 'User-Agent': 'huaweicloud-devkit/1.0' } });
16
46
  const data = await resp.json();
17
47
  if (data?.encoding === 'base64' && data.content) {
@@ -56,7 +86,10 @@ function scoreSkill(skill, specificKws, genericKws) {
56
86
  else if (tl.some((t) => t.includes(k))) s += 8;
57
87
  else if (dl.includes(k)) s += 5;
58
88
  else if (sl.includes(k)) s += 3;
59
- if (s > 0) { total += s; matched.push(kw); }
89
+ if (s > 0) {
90
+ total += s;
91
+ matched.push(kw);
92
+ }
60
93
  }
61
94
  for (const kw of genericKws) {
62
95
  const k = kw.toLowerCase();
@@ -65,7 +98,10 @@ function scoreSkill(skill, specificKws, genericKws) {
65
98
  else if (tl.some((t) => t.includes(k))) s += 4;
66
99
  else if (dl.includes(k)) s += 2;
67
100
  else if (sl.includes(k)) s += 1;
68
- if (s > 0) { total += s; matched.push(kw); }
101
+ if (s > 0) {
102
+ total += s;
103
+ matched.push(kw);
104
+ }
69
105
  }
70
106
  if (!specificKws.length && total === 0) {
71
107
  total = 1;
@@ -76,15 +112,16 @@ function scoreSkill(skill, specificKws, genericKws) {
76
112
  }
77
113
 
78
114
  async function main() {
79
- const keyword = process.argv.slice(2).filter((a) => !a.startsWith('-')).join(' ') || '';
115
+ const keyword =
116
+ process.argv
117
+ .slice(2)
118
+ .filter((a) => !a.startsWith('-'))
119
+ .join(' ') || '';
80
120
  const catIdx = process.argv.indexOf('-c');
81
121
  const category = catIdx >= 0 ? process.argv[catIdx + 1] || '' : '';
82
122
 
83
123
  try {
84
- const [idx, cnEnMap] = await Promise.all([
85
- fetchJson(INDEX_URL, 'index'),
86
- fetchJson(CN_EN_MAP_URL, 'cn-en-map'),
87
- ]);
124
+ const [idx, cnEnMap] = await Promise.all([fetchJson(INDEX_URL, 'index'), fetchJson(CN_EN_MAP_URL, 'cn-en-map')]);
88
125
 
89
126
  if (!keyword && !category) {
90
127
  console.log(`Categories: ${(idx.categories || []).join(', ')}`);
@@ -101,7 +138,15 @@ async function main() {
101
138
  const [score, matched] = scoreSkill(skill, specificKws, genericKws);
102
139
  if (hasSpecific && score === 0) continue;
103
140
  const desc = (skill.description || '').slice(0, 150);
104
- results.push({ score, name: skill.name, category: skill.category, service: skill.service, description: desc + (skill.description?.length > 150 ? '...' : ''), triggers: (skill.triggers || []).slice(0, 5), matched });
141
+ results.push({
142
+ score,
143
+ name: skill.name,
144
+ category: skill.category,
145
+ service: skill.service,
146
+ description: desc + (skill.description?.length > 150 ? '...' : ''),
147
+ triggers: (skill.triggers || []).slice(0, 5),
148
+ matched,
149
+ });
105
150
  }
106
151
  results.sort((a, b) => b.score - a.score);
107
152
 
@@ -112,7 +157,9 @@ async function main() {
112
157
 
113
158
  console.log(`Found ${results.length} skill(s):`);
114
159
  for (const r of results) {
115
- console.log(` [${r.score}pts] ${r.name} (${r.category}/${r.service})${r.matched.length ? ' matched: ' + r.matched.join(',') : ''}`);
160
+ console.log(
161
+ ` [${r.score}pts] ${r.name} (${r.category}/${r.service})${r.matched.length ? ' matched: ' + r.matched.join(',') : ''}`,
162
+ );
116
163
  console.log(` ${r.description}`);
117
164
  }
118
165
  } catch (e) {