huaweicloud-devkit 1.1.2-next.0 → 1.1.2-next.2

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 (125) hide show
  1. package/.agents/plugins/marketplace.json +18 -18
  2. package/README.md +182 -38
  3. package/README.zh-CN.md +180 -36
  4. package/bin/dsh-postinstall.cjs +77 -0
  5. package/bin/setup.cjs +7 -4
  6. package/cordis.patch.yml +13 -0
  7. package/integrations/atomcode/hooks/huaweicloud-telemetry.js +181 -0
  8. package/integrations/atomcode/hooks.json +9 -0
  9. package/integrations/dsh/hook-plugin.mjs +148 -0
  10. package/integrations/hermes/hooks/huaweicloud-telemetry.py +238 -0
  11. package/integrations/hermes/manifest.yaml +43 -0
  12. package/integrations/opencode/hooks/skill-tracker.js +115 -0
  13. package/integrations/opencode/opencode.json +1 -4
  14. package/integrations/workbuddy/hooks/telemetry-tracker.py +226 -0
  15. package/package.json +74 -43
  16. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +4 -17
  17. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +23 -33
  18. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +4 -17
  19. package/plugins/huaweicloud-core/.hermes-plugin/plugin.json +30 -0
  20. package/plugins/huaweicloud-core/.mcp.json +2 -5
  21. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +4 -18
  22. package/plugins/huaweicloud-core/assets/icon.png +0 -0
  23. package/plugins/huaweicloud-core/assets/logo-dark.png +0 -0
  24. package/plugins/huaweicloud-core/assets/logo.png +0 -0
  25. package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +104 -28
  26. package/plugins/huaweicloud-core/openclaw.plugin.json +20 -0
  27. package/plugins/huaweicloud-core/safety/policy.json +75 -99
  28. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +196 -35
  29. package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +38 -34
  30. package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +21 -20
  31. package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +19 -19
  32. package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +38 -32
  33. package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +30 -30
  34. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +20 -20
  35. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +31 -31
  36. package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +21 -20
  37. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +40 -31
  38. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +8 -1
  39. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +6 -0
  40. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +45 -37
  41. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +57 -6
  42. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +11 -9
  43. package/plugins/huaweicloud-core/skills/huawei-ecs/references/hc-activity.md +27 -0
  44. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +13 -13
  45. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +44 -39
  46. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +12 -10
  47. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +21 -20
  48. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +19 -19
  49. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +20 -20
  50. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +27 -23
  51. package/plugins/huaweicloud-core/skills/huawei-iac/SKILL.md +93 -0
  52. package/plugins/huaweicloud-core/skills/huawei-iac/references/architectures.md +83 -0
  53. package/plugins/huaweicloud-core/skills/huawei-iac/references/resource-catalog.md +107 -0
  54. package/plugins/huaweicloud-core/skills/huawei-iac/references/state-file.md +104 -0
  55. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +30 -30
  56. package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +65 -39
  57. package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +9 -9
  58. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +33 -25
  59. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +46 -45
  60. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +19 -19
  61. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +12 -7
  62. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +13 -12
  63. package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +4 -4
  64. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +71 -61
  65. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +776 -44
  66. package/plugins/huaweicloud-core/skills/huawei-sandbox/references/framework-commands.md +84 -0
  67. package/plugins/huaweicloud-core/skills/huawei-sandbox/references/nginx-templates.md +100 -0
  68. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +36 -29
  69. package/plugins/huaweicloud-core/skills/huawei-voucher/SKILL.md +57 -0
  70. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +39 -39
  71. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +22 -15
  72. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +20 -19
  73. package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +15 -15
  74. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +23 -20
  75. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +13 -13
  76. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +3 -3
  77. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +21 -2
  78. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +3 -3
  79. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +30 -4
  80. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +3 -3
  81. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +68 -54
  82. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +3 -3
  83. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +6 -6
  84. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +15 -1
  85. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +0 -1
  86. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +3 -3
  87. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +36 -34
  88. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +3 -3
  89. package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +142 -5
  90. package/plugins/huaweicloud-core/src/auth/credentials.mjs +217 -5
  91. package/plugins/huaweicloud-core/src/auth/reconcile.mjs +174 -0
  92. package/plugins/huaweicloud-core/src/auth/service.mjs +57 -2
  93. package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
  94. package/plugins/huaweicloud-core/src/detect-framework.mjs +366 -0
  95. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +203 -16
  96. package/plugins/huaweicloud-core/src/icon-library.mjs +176 -0
  97. package/plugins/huaweicloud-core/src/mcp-protocol.mjs +88 -0
  98. package/plugins/huaweicloud-core/src/mcp-server-remote.mjs +107 -0
  99. package/plugins/huaweicloud-core/src/mcp-server.mjs +154 -99
  100. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +20 -102
  101. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +11 -4
  102. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +4 -1
  103. package/plugins/huaweicloud-core/src/safety-policy.mjs +123 -68
  104. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +48 -12
  105. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +25 -26
  106. package/plugins/huaweicloud-core/src/sandbox/sandbox-file-server.py +45 -0
  107. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +943 -10
  108. package/plugins/huaweicloud-core/src/sandbox/uninstall-cleanup.mjs +50 -0
  109. package/plugins/huaweicloud-core/src/search-market.mjs +49 -14
  110. package/plugins/huaweicloud-core/src/setup-cli.mjs +3091 -498
  111. package/plugins/huaweicloud-core/src/telemetry/agent-detect.mjs +40 -0
  112. package/plugins/huaweicloud-core/src/telemetry/agent-registry.mjs +328 -0
  113. package/plugins/huaweicloud-core/src/telemetry/telemetry.mjs +378 -0
  114. package/plugins/huaweicloud-core/src/tools.mjs +1272 -146
  115. package/plugins/huaweicloud-core/src/update-check.mjs +383 -0
  116. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +72 -38
  117. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +10 -5
  118. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +13 -16
  119. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +12 -16
  120. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +46 -31
  121. package/plugins/huaweicloud-core/src/ws-exec/hwlink-tunnel-channel.mjs +268 -0
  122. package/plugins/huaweicloud-core/src/ws-exec/index.js +3 -0
  123. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +40 -13
  124. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +0 -190
  125. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +0 -124
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-functiongraph
3
- description: "Use when creating, deploying, or managing serverless functions on FunctionGraph. Covers triggers (APIG/OBS/timer/SMN), cold start, reserved concurrency. Triggers: FunctionGraph, serverless, function, Lambda, trigger. NOT for: CCE containers (use huawei-cce)."
3
+ description: 'Use when creating, deploying, or managing serverless functions on FunctionGraph. Covers triggers (APIG/OBS/timer/SMN), cold start, reserved concurrency. Triggers: FunctionGraph, serverless, function, Lambda, trigger. NOT for: CCE containers (use huawei-cce).'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -8,6 +8,10 @@ version: 1
8
8
 
9
9
  **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
10
 
11
+ ## Deployment Routing Guard
12
+
13
+ If this skill was reached via a DEPLOYMENT intent ("部署/搭建/上线一个应用/接口" - the function is part of an application deployment), this is a cloud resource purchase: load `huawei-iac` first for orchestration (mandatory cost+balance gate, batch approval, session state, ordered destroy), then return here for the exact function/trigger commands. Direct function operations (query/update/debug an existing function) do not need iac.
14
+
11
15
  ## Overview
12
16
 
13
17
  Domain expertise for Huawei Cloud FunctionGraph. Covers function lifecycle, code deployment, trigger configuration, and troubleshooting.
@@ -20,16 +24,16 @@ Domain expertise for Huawei Cloud FunctionGraph. Covers function lifecycle, code
20
24
 
21
25
  ## Critical Warnings
22
26
 
23
- | Trap | Why |
24
- |------|-----|
25
- | Service name is `FunctionGraph` | NOT `FGS`. KooCLI 7.x uses the full service name |
26
- | CLI requires `project_id` | Get it: `hcloud IAM KeystoneListProjects` or extract from URN `urn:fss:<region>:<project_id>:...` |
27
- | Cold start 100ms-2s | Reserve concurrency for latency-sensitive workloads |
28
- | Max execution 900s | Use ECS/CCE for long-running tasks |
29
- | Env vars plaintext | Use DEW for secrets |
30
- | **ZIP upload is unreliable** | `CreateFunction --code_type=zip --code_filename=xxx.zip` succeeds even with a nonexistent file — the function is created with empty code. Prefer `code_type=inline` for simple functions. If using zip, verify `code_size` > placeholder after creation and run `InvokeFunction` to confirm output. |
31
- | **DeleteFunction strip `:latest`** | Passing `urn:fss:...:function:xxx:latest` causes FSS.0400. Strip `:latest` suffix (DeleteFunction only — UpdateApiV2 needs the full URN). |
32
- | **DeleteFunctionTrigger does NOT cascade** | Deleting a DEDICATEDGATEWAY trigger leaves the API in APIG. Manually clean up: `hcloud APIG DeleteApiV2 --instance_id=<id> --api_id=<api-id>`. |
27
+ | Trap | Why |
28
+ | ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
+ | Service name is `FunctionGraph` | NOT `FGS`. KooCLI 7.x uses the full service name |
30
+ | CLI requires `project_id` | Get it: `hcloud IAM KeystoneListProjects` or extract from URN `urn:fss:<region>:<project_id>:...` |
31
+ | Cold start 100ms-2s | Reserve concurrency for latency-sensitive workloads |
32
+ | Max execution 900s | Use ECS/CCE for long-running tasks |
33
+ | Env vars plaintext | Use DEW for secrets |
34
+ | **ZIP upload is unreliable** | `CreateFunction --code_type=zip --code_filename=xxx.zip` succeeds even with a nonexistent file — the function is created with empty code. Prefer `code_type=inline` for simple functions. If using zip, verify `code_size` > placeholder after creation and run `InvokeFunction` to confirm output. |
35
+ | **DeleteFunction strip `:latest`** | Passing `urn:fss:...:function:xxx:latest` causes FSS.0400. Strip `:latest` suffix (DeleteFunction only — UpdateApiV2 needs the full URN). |
36
+ | **DeleteFunctionTrigger does NOT cascade** | Deleting a DEDICATEDGATEWAY trigger leaves the API in APIG. Manually clean up: `hcloud APIG DeleteApiV2 --instance_id=<id> --api_id=<api-id>`. |
33
37
 
34
38
  ## Prerequisites
35
39
 
@@ -42,13 +46,13 @@ hcloud FunctionGraph --help # confirm service is available
42
46
 
43
47
  If you see `FSS.0403 Forbidden`, the user needs these permissions:
44
48
 
45
- | Operation | Required Permission |
46
- |-----------|---------------------|
49
+ | Operation | Required Permission |
50
+ | --------------- | --------------------------------------- |
47
51
  | Create function | `functiongraph:function:createFunction` |
48
- | List functions | `functiongraph:function:list` |
52
+ | List functions | `functiongraph:function:list` |
49
53
  | Delete function | `functiongraph:function:deleteFunction` |
50
- | Invoke function | `functiongraph:function:invoke` |
51
- | Create trigger | `functiongraph:trigger:*` |
54
+ | Invoke function | `functiongraph:function:invoke` |
55
+ | Create trigger | `functiongraph:trigger:*` |
52
56
 
53
57
  Grant via IAM console (`FunctionGraph FullAccess` role) or ask project admin.
54
58
 
@@ -56,18 +60,19 @@ Grant via IAM console (`FunctionGraph FullAccess` role) or ask project admin.
56
60
 
57
61
  Always discover parameters with `--help` before executing. These are the correct operation names:
58
62
 
59
- | Task | Operation | Gotchas |
60
- |------|-----------|---------|
61
- | List functions | `ListFunctions` | |
62
- | Show function | `ShowFunctionConfig` | |
63
- | Create function | `CreateFunction` | references/create-function.md |
64
- | Delete function | `DeleteFunction` | Strip `:latest` from URN |
65
- | Invoke function | `InvokeFunction` | Requires body param (`--name=<value>` becomes event body). Use `--x_cff_request_version=v0` for raw output, `v1` for APIG-wrapped. |
66
- | Create trigger | `CreateFunctionTrigger` | references/triggers.md |
67
- | List triggers | `ListFunctionTriggers` | |
68
- | Delete trigger | `DeleteFunctionTrigger` | |
63
+ | Task | Operation | Gotchas |
64
+ | --------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
65
+ | List functions | `ListFunctions` | |
66
+ | Show function | `ShowFunctionConfig` | |
67
+ | Create function | `CreateFunction` | references/create-function.md |
68
+ | Delete function | `DeleteFunction` | Strip `:latest` from URN |
69
+ | Invoke function | `InvokeFunction` | Requires body param (`--name=<value>` becomes event body). Use `--x_cff_request_version=v0` for raw output, `v1` for APIG-wrapped. |
70
+ | Create trigger | `CreateFunctionTrigger` | references/triggers.md |
71
+ | List triggers | `ListFunctionTriggers` | |
72
+ | Delete trigger | `DeleteFunctionTrigger` | |
69
73
 
70
74
  Discover exact parameters:
75
+
71
76
  ```bash
72
77
  hcloud FunctionGraph CreateFunction --help
73
78
  hcloud FunctionGraph CreateFunctionTrigger --help
@@ -83,19 +88,19 @@ See `references/deploy-workflow.md` for a step-by-step example with code templat
83
88
 
84
89
  ## Troubleshooting
85
90
 
86
- | Error | Root Cause -> Fix |
87
- |-------|------------------|
88
- | `不支持的服务名称:FGS` | Use `FunctionGraph`, not `FGS` |
89
- | `不支持的operation:CreateTrigger` | Use `CreateFunctionTrigger` |
90
- | `FSS.0403` / Forbidden | Missing IAM permissions — see IAM Permissions above |
91
- | `缺少必填参数:{*}` on Invoke | Add body param: `--name=<value>` |
92
- | APIG/EOM trigger error | `trigger_type_code=APIG` deprecated — use `DEDICATEDGATEWAY` |
93
- | `event_data` parse error | Use dotted format: `--event_data.key=value`, NOT JSON string |
94
- | FSS.1078 / code upload fails | `--code_filename` is filename-only, no path. `cd` to zip directory first |
95
- | DeleteFunction with `:latest` | Strip `:latest` version suffix from URN |
96
- | Code too large | Inline limit 10KB — use `zip`/`obs` code type |
97
- | Cold start slow | Set reserved instances for critical functions |
98
- | Auth failure | Run `npx huaweicloud-devkit auth init` |
91
+ | Error | Root Cause -> Fix |
92
+ | --------------------------------- | ------------------------------------------------------------------------ |
93
+ | `不支持的服务名称:FGS` | Use `FunctionGraph`, not `FGS` |
94
+ | `不支持的operation:CreateTrigger` | Use `CreateFunctionTrigger` |
95
+ | `FSS.0403` / Forbidden | Missing IAM permissions — see IAM Permissions above |
96
+ | `缺少必填参数:{*}` on Invoke | Add body param: `--name=<value>` |
97
+ | APIG/EOM trigger error | `trigger_type_code=APIG` deprecated — use `DEDICATEDGATEWAY` |
98
+ | `event_data` parse error | Use dotted format: `--event_data.key=value`, NOT JSON string |
99
+ | FSS.1078 / code upload fails | `--code_filename` is filename-only, no path. `cd` to zip directory first |
100
+ | DeleteFunction with `:latest` | Strip `:latest` version suffix from URN |
101
+ | Code too large | Inline limit 10KB — use `zip`/`obs` code type |
102
+ | Cold start slow | Set reserved instances for critical functions |
103
+ | Auth failure | Run `npx huaweicloud-devkit auth init` |
99
104
 
100
105
  ## Security Considerations
101
106
 
@@ -22,6 +22,7 @@ When APIG calls FunctionGraph via DEDICATEDGATEWAY trigger, the event structure
22
22
  `event["body"]` is Base64 encoded. You MUST decode it:
23
23
 
24
24
  **Python handler template:**
25
+
25
26
  ```python
26
27
  import json, base64
27
28
 
@@ -38,18 +39,19 @@ def handler(event, context):
38
39
  ```
39
40
 
40
41
  **Node.js handler template:**
42
+
41
43
  ```js
42
44
  exports.handler = async (event, context) => {
43
- let body = event.body || "";
44
- if (event.isBase64Encoded) {
45
- body = Buffer.from(body, "base64").toString("utf8");
46
- }
47
- const data = body ? JSON.parse(body) : {};
48
- return {
49
- statusCode: 200,
50
- body: JSON.stringify({ message: "ok", received: data }),
51
- headers: { "Content-Type": "application/json" }
52
- };
45
+ let body = event.body || '';
46
+ if (event.isBase64Encoded) {
47
+ body = Buffer.from(body, 'base64').toString('utf8');
48
+ }
49
+ const data = body ? JSON.parse(body) : {};
50
+ return {
51
+ statusCode: 200,
52
+ body: JSON.stringify({ message: 'ok', received: data }),
53
+ headers: { 'Content-Type': 'application/json' },
54
+ };
53
55
  };
54
56
  ```
55
57
 
@@ -2,14 +2,14 @@
2
2
 
3
3
  ## Runtime Options
4
4
 
5
- | Runtime | Handler Format | Example |
6
- |---------|---------------|---------|
7
- | Python3.9 | `index.handler` | `def handler(event, context): return {"statusCode": 200}` |
8
- | Python3.10 | `index.handler` | Same as 3.9 |
9
- | Node.js 18 | `index.handler` | `exports.handler = async (event, context) => ({statusCode: 200})` |
10
- | Java 8/11/17 | `com.example.Handler::handleRequest` | Java class method |
11
- | Go 1.x | `handler` | Go function name |
12
- | C# (.NET Core) | `CsharpDemo::CsharpDemo.Function::Handler` | Namespace.Class::Method |
5
+ | Runtime | Handler Format | Example |
6
+ | -------------- | ------------------------------------------ | ----------------------------------------------------------------- |
7
+ | Python3.9 | `index.handler` | `def handler(event, context): return {"statusCode": 200}` |
8
+ | Python3.10 | `index.handler` | Same as 3.9 |
9
+ | Node.js 18 | `index.handler` | `exports.handler = async (event, context) => ({statusCode: 200})` |
10
+ | Java 8/11/17 | `com.example.Handler::handleRequest` | Java class method |
11
+ | Go 1.x | `handler` | Go function name |
12
+ | C# (.NET Core) | `CsharpDemo::CsharpDemo.Function::Handler` | Namespace.Class::Method |
13
13
 
14
14
  ## Create Function (inline)
15
15
 
@@ -26,13 +26,13 @@ hcloud FunctionGraph CreateFunction \
26
26
  --cli-region=<region>
27
27
  ```
28
28
 
29
- | Param | Required | Range/Default |
30
- |-------|----------|---------------|
31
- | `--func_name` | Yes | 1-60 chars |
32
- | `--runtime` | Yes | See runtime options above |
33
- | `--handler` | Yes | Per runtime |
34
- | `--memory_size` | No | 128-4096 MB, default 128 |
35
- | `--timeout` | No | 1-900s, default 3 |
29
+ | Param | Required | Range/Default |
30
+ | --------------- | -------- | ------------------------- |
31
+ | `--func_name` | Yes | 1-60 chars |
32
+ | `--runtime` | Yes | See runtime options above |
33
+ | `--handler` | Yes | Per runtime |
34
+ | `--memory_size` | No | 128-4096 MB, default 128 |
35
+ | `--timeout` | No | 1-900s, default 3 |
36
36
 
37
37
  ## ZIP Upload Warning
38
38
 
@@ -49,11 +49,11 @@ Grant `FunctionGraph FullAccess` role or custom policy.
49
49
 
50
50
  ## Error Codes
51
51
 
52
- | Error | Root Cause -> Fix |
53
- |-------|-------------------|
54
- | FSS.0400 | `:latest` suffix on URN. Strip it |
55
- | FSS.1417 | Missing DEDICATEDGATEWAY params |
56
- | FSS.0403 | Insufficient IAM permission |
52
+ | Error | Root Cause -> Fix |
53
+ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
54
+ | FSS.0400 | `:latest` suffix on URN. Strip it |
55
+ | FSS.1417 | Missing DEDICATEDGATEWAY params |
56
+ | FSS.0403 | Insufficient IAM permission |
57
57
  | FSS.1020 | Missing `--app_xrole` when binding VPC. Create IAM agency with `trust_domain_name=functiongraph`. See `huawei-iam` skill → Agencies section |
58
58
 
59
59
  ## VPC + Agency Configuration
@@ -68,4 +68,5 @@ hcloud IAM GrantRoleToAgency --agency_name=<name> --role_id=<role-id>
68
68
  # 3. Use in CreateFunction
69
69
  hcloud FunctionGraph CreateFunction --func_vpc.vpc_id=<vpc> --func_vpc.subnet_id=<subnet> --app_xrole=<name> ...
70
70
  ```
71
+
71
72
  | QuotaExceeded | Max 10 functions per project per region |
@@ -16,12 +16,12 @@ KooCLI uses **dotted key-value format**, NOT JSON strings:
16
16
 
17
17
  ## Trigger Types
18
18
 
19
- | Type | `--trigger_type_code` | Notes |
20
- |------|----------------------|-------|
21
- | APIG Dedicated | `DEDICATEDGATEWAY` | Use this, not `APIG` (deprecated). Requires APIG instance. |
22
- | Timer / Cron | `TIMER` | Simplest trigger for testing. No APIG dependency. |
23
- | OBS | `OBS` | Event when objects created/deleted in bucket |
24
- | SMN | `SMN` | Message notification trigger |
19
+ | Type | `--trigger_type_code` | Notes |
20
+ | -------------- | --------------------- | ---------------------------------------------------------- |
21
+ | APIG Dedicated | `DEDICATEDGATEWAY` | Use this, not `APIG` (deprecated). Requires APIG instance. |
22
+ | Timer / Cron | `TIMER` | Simplest trigger for testing. No APIG dependency. |
23
+ | OBS | `OBS` | Event when objects created/deleted in bucket |
24
+ | SMN | `SMN` | Message notification trigger |
25
25
 
26
26
  ## TIMER Trigger (Simple Testing)
27
27
 
@@ -46,22 +46,22 @@ hcloud FunctionGraph CreateFunctionTrigger \
46
46
 
47
47
  These are labeled optional by `--help` but are **required** for DEDICATEDGATEWAY:
48
48
 
49
- | Param | Note |
50
- |-------|------|
51
- | `--event_data.protocol` | `HTTPS` or `HTTP` or `BOTH` |
52
- | `--event_data.sl_domain` | Subdomain from APIG instance (e.g. `xxxx.apic.<region>.huaweicloudapis.com`) |
53
- | `--event_data.env_name` | API environment name (`RELEASE`) |
54
- | `--event_data.env_id` | API environment ID |
55
- | `--event_data.instance_id` | APIG dedicated instance ID |
56
- | `--event_data.group_id` | API group ID |
57
- | `--event_data.name` | API name — **hyphens (`-`) are DISALLOWED**. Use underscores (`_`) instead. |
49
+ | Param | Note |
50
+ | -------------------------- | ---------------------------------------------------------------------------- |
51
+ | `--event_data.protocol` | `HTTPS` or `HTTP` or `BOTH` |
52
+ | `--event_data.sl_domain` | Subdomain from APIG instance (e.g. `xxxx.apic.<region>.huaweicloudapis.com`) |
53
+ | `--event_data.env_name` | API environment name (`RELEASE`) |
54
+ | `--event_data.env_id` | API environment ID |
55
+ | `--event_data.instance_id` | APIG dedicated instance ID |
56
+ | `--event_data.group_id` | API group ID |
57
+ | `--event_data.name` | API name — **hyphens (`-`) are DISALLOWED**. Use underscores (`_`) instead. |
58
58
 
59
59
  ### Error Mapping
60
60
 
61
- | Error | Root Cause → Fix |
62
- |-------|-----------------|
63
- | FSS.1417 | Missing `instance_id`, `group_id`, `protocol`, `env_name`, or `env_id`. These are labeled optional but REQUIRED. |
64
- | API name regex fail | Rename API — remove hyphens (`-`), use `[a-zA-Z0-9_]+` only. |
61
+ | Error | Root Cause → Fix |
62
+ | ------------------- | ---------------------------------------------------------------------------------------------------------------- |
63
+ | FSS.1417 | Missing `instance_id`, `group_id`, `protocol`, `env_name`, or `env_id`. These are labeled optional but REQUIRED. |
64
+ | API name regex fail | Rename API — remove hyphens (`-`), use `[a-zA-Z0-9_]+` only. |
65
65
 
66
66
  ### Example
67
67
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-gaussdb
3
- description: "Use when creating or managing GaussDB distributed database on Huawei Cloud. Covers GaussDB(for MySQL), GaussDB(for openGauss), sharding, HTAP. Triggers: GaussDB, distributed database, sharding, openGauss, HTAP. NOT for: single RDS (use huawei-rds)."
3
+ description: 'Use when creating or managing GaussDB distributed database on Huawei Cloud. Covers GaussDB(for MySQL), GaussDB(for openGauss), sharding, HTAP. Triggers: GaussDB, distributed database, sharding, openGauss, HTAP. NOT for: single RDS (use huawei-rds).'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -16,34 +16,34 @@ Domain expertise for GaussDB. Covers instance lifecycle, databases, backups, con
16
16
 
17
17
  ## Critical Warnings
18
18
 
19
- | Trap | Why |
20
- |------|-----|
21
- | Shard key permanent | Once set, shard key cannot be changed |
22
- | Minimum nodes | Distributed GaussDB requires at least 3 nodes for production |
23
- | Engine version pinned | MySQL-compatible vs openGauss are separate products |
19
+ | Trap | Why |
20
+ | --------------------- | ------------------------------------------------------------ |
21
+ | Shard key permanent | Once set, shard key cannot be changed |
22
+ | Minimum nodes | Distributed GaussDB requires at least 3 nodes for production |
23
+ | Engine version pinned | MySQL-compatible vs openGauss are separate products |
24
24
 
25
25
  ## Common Workflows
26
26
 
27
- | Task | Operation |
28
- |------|-----------|
29
- | List instances | `ListInstances --cli-region=<r> --project_id=<p>` |
30
- | Show instance | `ShowInstance --cli-region=<r> --project_id=<p>` |
31
- | List flavors | `ListFlavors --cli-region=<r> --project_id=<p>` |
32
- | Create instance | `CreateInstance --cli-region=<r> --project_id=<p>` |
33
- | Delete instance | `DeleteInstance --cli-region=<r> --project_id=<p>` |
34
- | Create backup | `CreateGaussMySqlBackup --cli-region=<r> --project_id=<p>` |
35
- | Add readonly node | `AddReadonlyNode --cli-region=<r> --project_id=<p>` |
36
- | Add shard | `AddShardingNode --cli-region=<r> --project_id=<p>` |
37
- | Manage database | `AddDatabasePermission --cli-region=<r> --project_id=<p>` |
27
+ | Task | Operation |
28
+ | ----------------- | ---------------------------------------------------------- |
29
+ | List instances | `ListInstances --cli-region=<r> --project_id=<p>` |
30
+ | Show instance | `ShowInstance --cli-region=<r> --project_id=<p>` |
31
+ | List flavors | `ListFlavors --cli-region=<r> --project_id=<p>` |
32
+ | Create instance | `CreateInstance --cli-region=<r> --project_id=<p>` |
33
+ | Delete instance | `DeleteInstance --cli-region=<r> --project_id=<p>` |
34
+ | Create backup | `CreateGaussMySqlBackup --cli-region=<r> --project_id=<p>` |
35
+ | Add readonly node | `AddReadonlyNode --cli-region=<r> --project_id=<p>` |
36
+ | Add shard | `AddShardingNode --cli-region=<r> --project_id=<p>` |
37
+ | Manage database | `AddDatabasePermission --cli-region=<r> --project_id=<p>` |
38
38
 
39
39
  Discover exact parameters with `--help` before executing any command.
40
40
 
41
41
  ## Troubleshooting
42
42
 
43
- | Error | Fix |
44
- |-------|-----|
43
+ | Error | Fix |
44
+ | ----------------------- | ------------------------------------------------- |
45
45
  | Instance creation fails | Check VPC/subnet availability and flavor capacity |
46
- | Connection refused | SG missing database port |
46
+ | Connection refused | SG missing database port |
47
47
 
48
48
  ## Security
49
49
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-getting-started
3
- description: "Use when starting fresh with Huawei Cloud or KooCLI, installing prerequisites, setting up authentication, or exploring what is possible. Triggers: getting started, first time, setup, install, explore, quickstart, beginner, tutorial. NOT for: specific service operations (use huawei-ecs, huawei-obs, etc.)."
3
+ description: 'Use when starting fresh with Huawei Cloud or KooCLI, installing prerequisites, setting up authentication, or exploring what is possible. Triggers: getting started, first time, setup, install, explore, quickstart, beginner, tutorial. NOT for: specific service operations (use huawei-ecs, huawei-obs, etc.).'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -10,13 +10,14 @@ version: 1
10
10
 
11
11
  ## KooCLI Installation
12
12
 
13
- | OS | Command |
14
- |----|---------|
15
- | Windows (PowerShell) | See https://support.huaweicloud.com/qs-hcli/hcli_02_003.html for MSI download |
16
- | Linux | curl -LO "https://hwcloudcli.obs.cn-north-1.myhuaweicloud.com/cli/latest/hcloud_install.sh" && bash hcloud_install.sh |
17
- | macOS | curl -LO "https://hwcloudcli.obs.cn-north-1.myhuaweicloud.com/cli/latest/hcloud_install.sh" && bash hcloud_install.sh |
13
+ | OS | Command |
14
+ | -------------------- | --------------------------------------------------------------------------------------------------------------------- |
15
+ | Windows (PowerShell) | See https://support.huaweicloud.com/qs-hcli/hcli_02_003.html for MSI download |
16
+ | Linux | curl -LO "https://hwcloudcli.obs.cn-north-1.myhuaweicloud.com/cli/latest/hcloud_install.sh" && bash hcloud_install.sh |
17
+ | macOS | curl -LO "https://hwcloudcli.obs.cn-north-1.myhuaweicloud.com/cli/latest/hcloud_install.sh" && bash hcloud_install.sh |
18
18
 
19
19
  ## First-Time Setup
20
+
20
21
  1. **Install KooCLI** using command above
21
22
  2. **Accept privacy policy** (first run only): KooCLI requires one-time privacy agreement. Run `hcloud version` to read the agreement, then respond `y` to accept. Do not pipe `echo "y" |` — you must review the terms first.
22
23
  3. **Configure credentials (unified)**: `npx huaweicloud-devkit auth init` — prefer this over `hcloud configure init`, which only covers KooCLI.
@@ -38,28 +39,31 @@ hcloud configure list
38
39
  ```
39
40
 
40
41
  ## Critical Warnings
41
- | Trap | Why |
42
- |------|-----|
43
- | AK/SK must be kept secret | Never commit to git or share |
44
- | Default region applies to all commands | Override with --cli-region= per command |
45
- | Some services region-specific | Not all services available in all regions |
46
- | Privacy policy blocks first run | Run `hcloud version` to read and accept the agreement. Review the terms before responding `y` |
42
+
43
+ | Trap | Why |
44
+ | -------------------------------------- | --------------------------------------------------------------------------------------------- |
45
+ | AK/SK must be kept secret | Never commit to git or share |
46
+ | Default region applies to all commands | Override with --cli-region= per command |
47
+ | Some services region-specific | Not all services available in all regions |
48
+ | Privacy policy blocks first run | Run `hcloud version` to read and accept the agreement. Review the terms before responding `y` |
47
49
 
48
50
  ## What Can I Do? (Quick Index)
49
- | Goal | Skill |
50
- |------|-------|
51
- | Create a VM | huawei-ecs |
52
- | Store files | huawei-obs |
51
+
52
+ | Goal | Skill |
53
+ | ----------------- | --------------------------- |
54
+ | Create a VM | huawei-ecs |
55
+ | Store files | huawei-obs |
53
56
  | Set up a database | huawei-rds / huawei-gaussdb |
54
- | Create a network | huawei-vpc |
55
- | Manage access | huawei-iam |
56
- | Deploy an app | huawei-deployment |
57
- | Run containers | huawei-cce |
58
- | Build an API | huawei-apig |
59
- | Run serverless | huawei-functiongraph |
60
- | Monitor resources | huawei-cloud-eye |
57
+ | Create a network | huawei-vpc |
58
+ | Manage access | huawei-iam |
59
+ | Deploy an app | huawei-deployment |
60
+ | Run containers | huawei-cce |
61
+ | Build an API | huawei-apig |
62
+ | Run serverless | huawei-functiongraph |
63
+ | Monitor resources | huawei-cloud-eye |
61
64
 
62
65
  ## Pro Tips
66
+
63
67
  - Use `hcloud <Service> --help` to discover operations (see huaweicloud-capability-discovery)
64
68
  - Prepend `hcloud configure set --cli-region=<r>` to avoid per-command region flags
65
69
  - Pipe sensitive output through IAM with `--cli-output-format=json`
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: huawei-iac
3
+ description: 'Use whenever the user wants to DEPLOY, host, or purchase anything on Huawei Cloud that creates billable resources: application deployments (部署应用到华为云, deploy my app, 上线, 搭建), architecture proposals, cost estimation, multi-resource provisioning (VPC, subnet, security group, ECS, EIP, RDS, OBS, CDN, DNS, FunctionGraph, CCE, GaussDB and more), session-scoped state tracking, and reverse-order destroy. Trigger words: 部署, 部署到华为云, 上线, 购买, 搭建, 开通, 成本估算, 多少钱, 销毁, deploy, deploy to Huawei Cloud, provision, purchase, architecture, hosting. Reusing an existing VPC does NOT make it single-resource - any purchase (ECS, EIP, disk, keypair, rules) must pass the cost+balance gate here. NOT for: sandbox preview (huawei-sandbox - free, no purchase), read-only or lifecycle operations on EXISTING resources (query/reboot/resize/delete - use the service skill directly).'
4
+ version: 1
5
+ ---
6
+
7
+ # Huawei Cloud IaC Orchestration
8
+
9
+ **STOP - Do not answer from general knowledge.** Follow the 8-stage workflow below in strict order.
10
+
11
+ Always run `hcloud <Service> <Operation> --help` before constructing commands to discover exact parameter names and requirements.
12
+
13
+ ## Scope and Routing Guard
14
+
15
+ - This skill orchestrates the **purchase lifecycle of ALL supported resources**: proposal → pricing → provisioning → destroy, across every service in the plugin catalog.
16
+ - **Web app deployment keeps sandbox as the first choice** (see `huaweicloud-core` Deployment Target Options). Route here only when the user wants billed, long-term, or multi-resource cloud infrastructure, or explicitly asks for an architecture + cost proposal.
17
+ - Single-resource tasks go directly to the service skill. This skill adds value for **multi-resource orchestration, mandatory cost gating, and ordered destroy**.
18
+
19
+ ## Workflow (strict order)
20
+
21
+ **Proactive by design**: any deployment intent ("部署一个博客", "搭一套环境", "买个服务器") automatically triggers stages 1-5 BEFORE anything is created. The user NEVER needs to ask for an architecture proposal, cost estimate, or risk warnings - they are built into the flow. Only stages 6-8 (create / verify / manage) wait for explicit user confirmation at the approval gates.
22
+
23
+ | Stage | What happens | Hard rule |
24
+ | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
+ | 1. Scale assessment | **FIRST inspect the project code** (clone remote repos to a temp dir, or read the local path): tech stack, data services (Redis/MySQL/SQLite...), build artifacts, existing Dockerfile/k8s manifests → then classify or ask scale | **NEVER present deployment options (sandbox/ECS/OBS...) before the codebase has been inspected** - options without code analysis are guesses. If scale is not stated or clearly inferable, ASK - present the 3 tiers as options with what each includes and its monthly cost band (see `references/architectures.md`), and let the user choose. Never assume a tier. The scale question and the hosting-target question are SEPARATE questions on separate axes. FunctionGraph filesystem is ephemeral - never recommend SQLite/local files for persistent data |
26
+ | 2. Frontend hosting choice | Present BOTH options: (a) OBS+CDN+DNS custom domain, (b) ECS+EIP | For SPA/static frontends (Vue/React dist), **OBS hosting must always appear as an option** with cost comparison against same-host Nginx - do not silently merge the frontend into a compute node. For option (a) three prerequisites: domain ownership verification (CDN requires a DNS record or file upload first - `CDN.00010185` otherwise), ICP filing check, DNS hosting check; domain registration link: https://www.huaweicloud.com/product/domain.html |
27
+ | 3. Architecture proposal | ASCII topology tree with dependencies | User confirms before continuing. **Architecture decision points must be surfaced as explicit choices, never silently made**: (a) app depends on Redis/MySQL/Kafka etc. → managed service (DCS/RDS/DMS, billed) vs same-host install (cheap, ops burden) - state the trade-off and ask; (b) repo ships a Dockerfile / SWR image / k8s manifests → offer container path (Docker on ECS or CCE) alongside source-build path; (c) frontend hosting layer (Nginx same-host vs OBS+CDN). Silent defaults here are a correctness failure |
28
+ | 4. Parameter discovery | `ListFlavors` / `ListImages` / `huaweicloud_list_regions` | Never hardcode flavor/image names |
29
+ | 5. Cost + balance gate | Price every resource via BSS `ListOnDemandResourceRatings`, then query balance | Balance = 0 → the FIRST message must state: "您的余额为 0,按时长计费的资源(ECS/EIP/RDS 等)需要交保证金,金额约 1~5 元人民币不等。保证金与余额是两个概念——它是可退还的押金,且是代金券正常使用的前提"。官方解释(用户追问"为什么冻结保证金"时引用):https://support.huaweicloud.com/price-eip/faq_eip_0033.html (开通按需资源时冻结一定金额作为保证金;金额规则详见 https://support.huaweicloud.com/billing_faq/billing_faq_6200009.html )。充值入口:https://account.huaweicloud.com/usercenter/?region=cn-north-4#/userindex/balanceRecharge 。Remedy priority: (1) FIRST claim the one-time incentive voucher (huaweicloud_voucher_status → huaweicloud_voucher_claim) to offset usage fees; (2) then instruct the user to pay the refundable deposit (top-up via the link above) so the voucher applies and orders pass (otherwise `Ecs.7000`); (3) free-tier resources (FunctionGraph, small OBS) may proceed meanwhile without deposit. Balance > 0 → report how long it can sustain (balance ÷ monthly estimate). **权限降级(实测)**:IAM 用户无 `billing:balance:view` 时余额查询报 `CBC.0151` → 不阻塞流程,明确告知"余额无法程序化查询,请自行核对;若下单报 Ecs.7000 即余额/保证金不足",领券后继续。定价编码逐服务查证,见 `references/resource-catalog.md` § Pricing |
30
+ | 6. Provision | deployment_id, session state, batch approval, ordered creation | See "Provisioning Rules" below |
31
+ | 7. Verify | `curl -I` the site / API; expect 200 | DNS CNAME may take minutes to propagate - not an error |
32
+ | 8. Manage | Session-scoped status query and destroy | See "Destroy Rules" below |
33
+
34
+ ## Provisioning Rules (Stage 6)
35
+
36
+ 1. Generate `deployment_id` (`d-xxx`), initialize the session state file (path and schema: `references/state-file.md`).
37
+ 2. **Batch approval: show the RESOURCE LIST (name / type / purpose), never the raw commands.** After the user approves, execute each resource via `huaweicloud_run_approved_command`. Never execute anything outside the approved list.
38
+ 3. Create in dependency-topological order (network → compute/db → bindings). After each success, extract the resource ID and write it to state immediately.
39
+ 4. Any failure: stop immediately, mark state `partial`, report the error, offer destroy of already-created resources. No automatic rollback.
40
+
41
+ ## Destroy Rules (Stage 8, current session only)
42
+
43
+ Preconditions - all required:
44
+
45
+ 1. Session state file exists and contains the deployment_id (state dies with the session; a fresh session cannot destroy past deployments - direct the user to the console instead).
46
+ 2. Status is `deployed` or `partial` (`destroyed` is terminal).
47
+ 3. The user explicitly names the target deployment. Ambiguous "delete it" → list deployments and ask. Never guess.
48
+ 4. Every delete command still goes through plan → approve → run.
49
+
50
+ Execution: show the to-be-deleted list for final confirmation → delete in **reverse creation order** → a "resource not found" error counts as already deleted, continue → mark `destroyed`. OBS: upload paths like `assets/style.css` auto-create folder-marker objects that outlive the files - prefer one recursive sweep `hcloud OBS rm obs://<bucket>/ -r -f` over per-object deletes, then delete the bucket (a non-empty bucket fails with 409 `BucketNotEmpty`). CDN: disable then delete. DNS: delete the record set (only if hosted in Huawei Cloud DNS).
51
+
52
+ ## Critical Warnings
53
+
54
+ | Trap | Why / Rule |
55
+ | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
56
+ | Stale `securityToken` poisons every hcloud call | Symptom: every API returns `APIGW.0301 Incorrect IAM authentication information` while OBS/obsutil still works. `configure set` refuses empty values and auth-sync never clears the field. Fix: `hcloud configure delete --cli-profile=default`, then re-run auth init with AK/SK only (no token) |
57
+ | OBS writes bypass the REST write-prefix policy | `mb` / `cp` / `rm` / `chattri` are obsutil-style commands. ALWAYS route them through `huaweicloud_plan_cli_command` → approval → `huaweicloud_run_approved_command`. Never treat them as read-only |
58
+ | `OBS mb` flag rules differ from cp/rm | `mb` does NOT accept `-f` (flag parse error) and REQUIRES explicit `-location=<region>` even with a regional endpoint (else `IllegalLocationConstraintException`) |
59
+ | Duplicate `OBS mb` is idempotent success | Same-account same-name bucket creation returns success, not an error - never treat a second create as failure. OBS deletes are also idempotent (deleting a nonexistent object succeeds) |
60
+ | Bucket ACL does not cascade to objects | Every uploaded object needs `-acl=public-read` at upload time (`-f` IS valid on cp/rm) |
61
+ | OBS static website bucket name must equal the domain | e.g. bucket `www.example.com` for domain `www.example.com` |
62
+ | VPC v3 API differs from older docs | v3 `CreateSecurityGroup` has NO `vpc_id` (account-scoped); `CreateSecurityGroupRule` uses `multiport=80` not `port_range_min/max`; `DeleteSubnet` requires `vpc_id` too. Always `--help` first |
63
+ | Public exposure is auto-blocked | Risk rules deny `0.0.0.0/0` port rules at plan time. For test/dev use a narrower `remote_ip_prefix` (e.g. the VPC CIDR) or get user consent for a documented exception |
64
+ | ECS CreateServers hidden required params | Besides flavor/image/nics/az it also needs `--server.vpcid` and `--server.root_volume.volumetype` - order submission fails without them |
65
+ | FunctionGraph runtime/code enums are strict | runtime must be exact (`Node.js18.15`, `Python3.9`, `Go1.x`, ...); inline code is the PAIR `--package=default --code_type=inline` (`--package=inline` → `FSS.1006`); TIMER triggers use `--event_data.schedule_type=Rate --event_data.schedule=1m` (`@every` style → `FSS.1109`); DeleteFunction takes `--function_urn` WITHOUT `:latest` |
66
+ | Zero balance blocks order submission | ECS creation fails with `Ecs.7000 Insufficient account balance` when cash + voucher accounts are 0. This is the stage-5 gate materialized: stop, mark `partial`, tell the user pay-by-duration resources need a deposit. Free-tier resources (FunctionGraph, small OBS) DO work at 0 balance - the gate applies to order-submission resources only |
67
+ | CDN mainland acceleration requires ICP filing | Unregistered domains cannot go live on CDN - check before stage 3. CDN create ALSO requires domain ownership verification first (`CDN.00010185 Verify domain ownership failed` - user must add a DNS record or upload a verification file) |
68
+ | CDN is a global service in KooCLI | CDN operations only accept `--cli-region=cn-north-1` or `ap-southeast-1` - never the resource region |
69
+ | OBS static website hosting has NO CLI path | `chattri` only sets ACL/storage-class; obsutil has no website command. Options: console setup, or CDN OBS-origin with `--domain.sources.1.enable_obs_web_hosting=1`. Without website hosting, verify via direct object URLs (still public HTTP 200) |
70
+ | DNS hosting location | `hcloud DNS ListPublicZones` decides: hosted in Huawei Cloud → auto-create CNAME record set; hosted elsewhere → output the CNAME value for manual setup at the user's DNS provider |
71
+ | EIP bills when idle; stopped ECS still bills | Include in cost estimate; destroy unattached EIPs |
72
+ | ECS delete defaults leak resources | `--delete_publicip` and `--delete_volume` are false by default - set `true` when tearing down |
73
+ | EIP binding type is non-obvious | `--publicip.associate_instance_type=PORT` (not INSTANCE) |
74
+ | State is session-only | Temp-dir file, dies with the session. Never promise cross-session deploy management |
75
+ | State file must be UTF-8 WITHOUT BOM | PowerShell `Set-Content -Encoding utf8` adds a BOM that breaks JSON parsers - write state with Node or another BOM-less writer |
76
+ | HTTPS needs a certificate | CDN serves plain HTTP by default; SSL cert (upload or SCM) required for HTTPS |
77
+
78
+ ## MCP Tools
79
+
80
+ - `huaweicloud_plan_cli_command` → classify and plan each write command
81
+ - `huaweicloud_run_approved_command` → execute after explicit approval (approvedCommand must match the planned command exactly - use the `command` field verbatim, never retype it)
82
+ - `huaweicloud_run_readonly_command` → discovery (flavors, images, zones, prices)
83
+ - `huaweicloud_list_regions` / `huaweicloud_get_regional_availability` → region intent
84
+ - `huaweicloud_hook_check_deploy_plan` → risk-check the plan before approval
85
+ - Balance and pricing: `huawei-billing` skill. Balance operation (BSS is pinned to cn-north-1 in KooCLI): `hcloud BSS ShowCustomerAccountBalances --cli-region=cn-north-1 --cli-domain-id=<domain_id>`. Global services (BSS/IAM) require `--cli-domain-id` per call or in the profile - if unknown, extract it from any resource response's `tenant_id` field (e.g. a VPC create response), or from the profile's domainId once configured
86
+
87
+ ## Cross-Skill References
88
+
89
+ - Per-resource commands: `huawei-vpc` (VPC / subnet / security group / EIP), `huawei-ecs`, `huawei-rds`, `huawei-gaussdb`, `huawei-dds-dcs`, `huawei-cce`, `huawei-obs`, `huawei-functiongraph`, `huawei-apig`, `huawei-smn-dms`, `huawei-cbr`, `huawei-cloud-eye`, `huawei-cts`, `huawei-dew`, `huawei-modelarts`, `huawei-waf-aad`, `huawei-iam`
90
+ - **CDN and DNS have no dedicated skill** - discover operations with `hcloud CDN <Operation> --help` and `hcloud DNS <Operation> --help`
91
+ - Full purchase catalog: `references/resource-catalog.md`
92
+ - Architecture templates by scale: `references/architectures.md`
93
+ - State file spec: `references/state-file.md`