huaweicloud-devkit 1.0.2-dev.9 → 1.0.2-next.10

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 (99) hide show
  1. package/.agents/plugins/marketplace.json +20 -20
  2. package/LICENSE +201 -201
  3. package/README.md +178 -138
  4. package/README.zh-CN.md +176 -138
  5. package/bin/setup.cjs +10 -8
  6. package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
  7. package/integrations/opencode/opencode.json +11 -14
  8. package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
  9. package/package.json +60 -44
  10. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +31 -44
  11. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +30 -43
  12. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +31 -44
  13. package/plugins/huaweicloud-core/.mcp.json +13 -15
  14. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +31 -44
  15. package/plugins/huaweicloud-core/hooks/hooks.json +26 -26
  16. package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +136 -136
  17. package/plugins/huaweicloud-core/safety/policy.json +76 -100
  18. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +227 -199
  19. package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +164 -164
  20. package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -48
  21. package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -50
  22. package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +103 -101
  23. package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +90 -90
  24. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +191 -190
  25. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +171 -124
  26. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -55
  27. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -70
  28. package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +57 -56
  29. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +106 -97
  30. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +36 -29
  31. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +29 -23
  32. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +188 -185
  33. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +144 -133
  34. package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -31
  35. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +57 -55
  36. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
  37. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +132 -131
  38. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +60 -58
  39. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +72 -71
  40. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -119
  41. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -142
  42. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -56
  43. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +69 -65
  44. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -111
  45. package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +148 -122
  46. package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +56 -56
  47. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -65
  48. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +134 -127
  49. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +49 -49
  50. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +31 -26
  51. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +101 -100
  52. package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +40 -40
  53. package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -56
  54. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +229 -224
  55. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +173 -134
  56. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -69
  57. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +84 -84
  58. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +77 -76
  59. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +60 -59
  60. package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +50 -50
  61. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -63
  62. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +56 -56
  63. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -4
  64. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +56 -47
  65. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -4
  66. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +138 -128
  67. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -4
  68. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +111 -96
  69. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -4
  70. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +20 -20
  71. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +30 -28
  72. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +59 -60
  73. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -4
  74. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -83
  75. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -4
  76. package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +54 -1
  77. package/plugins/huaweicloud-core/src/auth/credentials.mjs +103 -95
  78. package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
  79. package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
  80. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +283 -265
  81. package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
  82. package/plugins/huaweicloud-core/src/mcp-server.mjs +130 -129
  83. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +68 -0
  84. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +94 -0
  85. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +140 -137
  86. package/plugins/huaweicloud-core/src/safety-policy.mjs +356 -302
  87. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +86 -87
  88. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +150 -153
  89. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +196 -105
  90. package/plugins/huaweicloud-core/src/search-market.mjs +208 -169
  91. package/plugins/huaweicloud-core/src/setup-cli.mjs +2622 -1594
  92. package/plugins/huaweicloud-core/src/tools.mjs +463 -111
  93. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +447 -427
  94. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +128 -132
  95. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +215 -227
  96. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +189 -202
  97. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +164 -158
  98. package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
  99. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
@@ -1,128 +1,138 @@
1
- ---
2
- name: huaweicloud-cli-and-auth
3
- description: Safe Huawei Cloud KooCLI usage and authentication guidance. Use when working with hcloud, KooCLI, profiles, AK/SK, regions, projects, endpoints, CLI output, credential errors, or local Huawei Cloud account context.
4
- ---
5
-
6
- # Huawei Cloud CLI And Auth
7
-
8
-
9
- **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
-
11
- Use KooCLI `hcloud` for local inspection and reviewed operations. Never ask the user to paste AK/SK, SK, tokens, passwords, or credential files into chat.
12
-
13
- ## Install KooCLI
14
-
15
- Official guide: `https://support.huaweicloud.com/qs-hcli/hcli_02_003.html`.
16
-
17
- ### Windows
18
- 1. Download and unzip: `https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-windows-amd64.zip`
19
- 2. Extract to `%USERPROFILE%\hcloud`, add to user `PATH`
20
- 3. Verify: `hcloud version`
21
-
22
- ### Linux (amd64 / arm64)
23
- One-liner (recommended):
24
- ```bash
25
- curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y
26
- ```
27
- Or manual download:
28
- ```bash
29
- # amd64
30
- curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz"
31
- tar -zxvf huaweicloud-cli-linux-amd64.tar.gz
32
- # arm64
33
- curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-arm64.tar.gz"
34
- tar -zxvf huaweicloud-cli-linux-arm64.tar.gz
35
- ```
36
- Move to PATH: `mv $(pwd)/hcloud ~/.local/bin/`
37
- Verify: `hcloud version`
38
-
39
- ### macOS (amd64 / arm64)
40
- One-liner (recommended):
41
- ```bash
42
- curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y
43
- ```
44
- Or manual download:
45
- ```bash
46
- # amd64
47
- curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-mac-amd64.tar.gz"
48
- tar -zxvf huaweicloud-cli-mac-amd64.tar.gz
49
- # arm64 (Apple Silicon)
50
- curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-mac-arm64.tar.gz"
51
- tar -zxvf huaweicloud-cli-mac-arm64.tar.gz
52
- ```
53
- Move to PATH: `mv $(pwd)/hcloud /usr/local/bin/`
54
- Verify: `hcloud version`
55
-
56
- Agent processes find executables through `PATH`. If OpenCode/Codex cannot find `hcloud`, restart after updating `PATH`, or set `HCLOUD_BIN`.
57
-
58
- ## Configure Credentials Outside Chat
59
-
60
- **NEVER let AK/SK enter shell history. This is the #1 credential leak vector.**
61
-
62
- - Create AK/SK in the Huawei Cloud console under `My Credentials -> Access Keys`.
63
- - **Unified credentials** (preferred): `npx huaweicloud-devkit auth init`. This is the DevKit's primary auth path; `hcloud configure init` only covers KooCLI.
64
- - **KooCLI only, interactive** (SAFE): `hcloud configure init` — prompts for AK/SK via terminal input. Values do NOT enter shell history.
65
- - **Non-interactive** (DANGEROUS — AK/SK in shell history): `hcloud configure set --cli-access-key=<AK> --cli-secret-key=<SK> --cli-region=<region>`. Only use in ephemeral CI/CD shells. User must execute outside agent chat.
66
- - If MCP is available, use `huaweicloud_show_profile_redacted` to check status without ever seeing credentials.
67
- - Never paste AK/SK, passwords, tokens, or profile files into the agent conversation.
68
- - KooCLI stores credentials in `~/.hcloud/config.json`, NOT environment variables. `HCLOUD_ACCESS_KEY` / `HCLOUD_SECRET_KEY` / `HCLOUD_REGION` env vars are NOT read by KooCLI 7.x.
69
-
70
- ## Safe Flow
71
-
72
- 1. Check whether `hcloud` is installed.
73
- 2. **KooCLI first-run privacy agreement**: On a fresh KooCLI install, `hcloud` blocks with `同意并继续使用(y)/不同意并退出(N)` and fails with `[USE_ERROR]您输入的是无效字符` in non-interactive mode. Detection: check command output for these strings. Ask the user: "KooCLI needs to accept its privacy agreement. May I accept it on your behalf?" If the user agrees, run `huaweicloud_run_readonly_command` with `args=["version"]` and `stdin="y\n"`. This accepts the agreement once, after which hcloud works normally.
74
- 3. Ask the user to configure credentials outside the agent conversation when setup is needed.
75
- 4. Inspect profile and region only through redacted tooling.
76
- 5. Discover exact operation names with `hcloud <Service> --help` before guessing. Example: ECS instance listing is commonly `ECS ListServersDetails`; ECS creation is commonly `ECS CreateServers`; image lookup may be under `IMS GlanceShowImage`.
77
- 6. Use `--cli-output=json` for machine-readable responses when supported.
78
- 7. For resource operations, include `--cli-region`, `--cli-profile`, and service-specific project information when required.
79
- 8. Classify every command before running it:
80
- - Read-only: `List*`, `Show*`, `Get*`, `Describe*`.
81
- - Write: `Create*`, `Delete*`, `Update*`, `Resize*`, `Start*`, `Stop*`, `Authorize*`, and similar.
82
- - Secret: any operation returning secret string, binary secret, token, or password.
83
- 9. For write operations, show the exact command and ask for explicit approval.
84
-
85
- ## KooCLI Syntax Notes
86
-
87
- - Prefer `--param=value`; KooCLI 7.x may reject some space-separated parameter forms.
88
- - Array-style parameters use 1-based indexes, for example `--server.nics.1.subnet_id=<subnet-id>`, not `.0`.
89
- - For ECS creation, first inspect help: `hcloud ECS CreateServers --help`.
90
- - Minimal create shape to refine after help lookup:
91
-
92
- ```bash
93
- hcloud ECS CreateServers --cli-region=<region> --server.name=<name> --server.flavorRef=<flavor-id> --server.imageRef=<image-id> --server.nics.1.subnet_id=<subnet-id> --server.root_volume.volumetype=<type>
94
- ```
95
-
96
- If a command needs an `adminPass` or other password field, do not leave plaintext secrets in shell history. Prefer local-only input or runtime injection.
97
-
98
- ## Output Formatting
99
-
100
- ```bash
101
- # JSON format (recommended for Agent)
102
- hcloud <Service> <Op> --cli-output=json
103
-
104
- # Table format (manual viewing)
105
- hcloud <Service> <Op> --cli-output=table
106
-
107
- # JMESPath filtering (extract specific fields)
108
- hcloud <Service> <ListOp> --cli-output=json --cli-query "items[?status=='ACTIVE'].{ID:id,Name:name}"
109
-
110
- # Debug mode (when commands fail)
111
- hcloud <Service> <Op> --cli-debug=true
112
- ```
113
-
114
- ## Preferred Toolkit Tools
115
-
116
- - `huaweicloud_check_cli`
117
- - `huaweicloud_show_profile_redacted`
118
- - `huaweicloud_plan_cli_command`
119
- - `huaweicloud_run_readonly_command`
120
- - `huaweicloud_list_operations`
121
- - `huaweicloud_run_approved_command`
122
-
123
- ## Do Not Run Directly
124
-
125
- - Raw `hcloud configure show/list/get/export` in agent tools.
126
- - Commands reading `.hcloud` or `.huaweicloud` files.
127
- - Commands dumping cloud credential environment variables.
128
- - Secret value reads such as CSMS `ShowSecretVersion`.
1
+ ---
2
+ name: huaweicloud-cli-and-auth
3
+ description: Safe Huawei Cloud KooCLI usage and authentication guidance. Use when working with hcloud, KooCLI, profiles, AK/SK, regions, projects, endpoints, CLI output, credential errors, or local Huawei Cloud account context.
4
+ ---
5
+
6
+ # Huawei Cloud CLI And Auth
7
+
8
+ **STOP - Do not answer from general knowledge.** Follow the procedure below.
9
+
10
+ Use KooCLI `hcloud` for local inspection and reviewed operations. Never ask the user to paste AK/SK, SK, tokens, passwords, or credential files into chat.
11
+
12
+ ## Install KooCLI
13
+
14
+ Official guide: `https://support.huaweicloud.com/qs-hcli/hcli_02_003.html`.
15
+
16
+ ### Windows
17
+
18
+ 1. Download and unzip: `https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-windows-amd64.zip`
19
+ 2. Extract to `%USERPROFILE%\hcloud`, add to user `PATH`
20
+ 3. Verify: `hcloud version`
21
+
22
+ ### Linux (amd64 / arm64)
23
+
24
+ One-liner (recommended):
25
+
26
+ ```bash
27
+ curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y
28
+ ```
29
+
30
+ Or manual download:
31
+
32
+ ```bash
33
+ # amd64
34
+ curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz"
35
+ tar -zxvf huaweicloud-cli-linux-amd64.tar.gz
36
+ # arm64
37
+ curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-arm64.tar.gz"
38
+ tar -zxvf huaweicloud-cli-linux-arm64.tar.gz
39
+ ```
40
+
41
+ Move to PATH: `mv $(pwd)/hcloud ~/.local/bin/`
42
+ Verify: `hcloud version`
43
+
44
+ ### macOS (amd64 / arm64)
45
+
46
+ One-liner (recommended):
47
+
48
+ ```bash
49
+ curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y
50
+ ```
51
+
52
+ Or manual download:
53
+
54
+ ```bash
55
+ # amd64
56
+ curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-mac-amd64.tar.gz"
57
+ tar -zxvf huaweicloud-cli-mac-amd64.tar.gz
58
+ # arm64 (Apple Silicon)
59
+ curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-mac-arm64.tar.gz"
60
+ tar -zxvf huaweicloud-cli-mac-arm64.tar.gz
61
+ ```
62
+
63
+ Move to PATH: `mv $(pwd)/hcloud /usr/local/bin/`
64
+ Verify: `hcloud version`
65
+
66
+ Agent processes find executables through `PATH`. If OpenCode/Codex cannot find `hcloud`, restart after updating `PATH`, or set `HCLOUD_BIN`.
67
+
68
+ ## Configure Credentials Outside Chat
69
+
70
+ **NEVER let AK/SK enter shell history. This is the #1 credential leak vector.**
71
+
72
+ - Create AK/SK in the Huawei Cloud console under `My Credentials -> Access Keys`.
73
+ - **Unified credentials** (preferred): `npx huaweicloud-devkit auth init`. This is the DevKit's primary auth path; `hcloud configure init` only covers KooCLI.
74
+ - **KooCLI only, interactive** (SAFE): `hcloud configure init` prompts for AK/SK via terminal input. Values do NOT enter shell history.
75
+ - **Non-interactive** (DANGEROUS AK/SK in shell history): `hcloud configure set --cli-access-key=<AK> --cli-secret-key=<SK> --cli-region=<region>`. Only use in ephemeral CI/CD shells. User must execute outside agent chat.
76
+ - If MCP is available, use `huaweicloud_show_profile_redacted` to check status without ever seeing credentials.
77
+ - Never paste AK/SK, passwords, tokens, or profile files into the agent conversation.
78
+ - KooCLI stores credentials in `~/.hcloud/config.json`, NOT environment variables. `HCLOUD_ACCESS_KEY` / `HCLOUD_SECRET_KEY` / `HCLOUD_REGION` env vars are NOT read by KooCLI 7.x.
79
+
80
+ ## Safe Flow
81
+
82
+ 1. Check whether `hcloud` is installed.
83
+ 2. **KooCLI first-run privacy agreement**: On a fresh KooCLI install, `hcloud` blocks with `同意并继续使用(y)/不同意并退出(N)` and fails with `[USE_ERROR]您输入的是无效字符` in non-interactive mode. Detection: check command output for these strings. Ask the user: "KooCLI needs to accept its privacy agreement. May I accept it on your behalf?" If the user agrees, run `huaweicloud_run_readonly_command` with `args=["version"]` and `stdin="y\n"`. This accepts the agreement once, after which hcloud works normally.
84
+ 3. Ask the user to configure credentials outside the agent conversation when setup is needed.
85
+ 4. Inspect profile and region only through redacted tooling.
86
+ 5. Discover exact operation names with `hcloud <Service> --help` before guessing. Example: ECS instance listing is commonly `ECS ListServersDetails`; ECS creation is commonly `ECS CreateServers`; image lookup may be under `IMS GlanceShowImage`.
87
+ 6. Use `--cli-output=json` for machine-readable responses when supported.
88
+ 7. For resource operations, include `--cli-region`, `--cli-profile`, and service-specific project information when required.
89
+ 8. Classify every command before running it:
90
+ - Read-only: `List*`, `Show*`, `Get*`, `Describe*`.
91
+ - Write: `Create*`, `Delete*`, `Update*`, `Resize*`, `Start*`, `Stop*`, `Authorize*`, and similar.
92
+ - Secret: any operation returning secret string, binary secret, token, or password.
93
+ 9. For write operations, show the exact command and ask for explicit approval.
94
+
95
+ ## KooCLI Syntax Notes
96
+
97
+ - Prefer `--param=value`; KooCLI 7.x may reject some space-separated parameter forms.
98
+ - Array-style parameters use 1-based indexes, for example `--server.nics.1.subnet_id=<subnet-id>`, not `.0`.
99
+ - For ECS creation, first inspect help: `hcloud ECS CreateServers --help`.
100
+ - Minimal create shape to refine after help lookup:
101
+
102
+ ```bash
103
+ hcloud ECS CreateServers --cli-region=<region> --server.name=<name> --server.flavorRef=<flavor-id> --server.imageRef=<image-id> --server.nics.1.subnet_id=<subnet-id> --server.root_volume.volumetype=<type>
104
+ ```
105
+
106
+ If a command needs an `adminPass` or other password field, do not leave plaintext secrets in shell history. Prefer local-only input or runtime injection.
107
+
108
+ ## Output Formatting
109
+
110
+ ```bash
111
+ # JSON format (recommended for Agent)
112
+ hcloud <Service> <Op> --cli-output=json
113
+
114
+ # Table format (manual viewing)
115
+ hcloud <Service> <Op> --cli-output=table
116
+
117
+ # JMESPath filtering (extract specific fields)
118
+ hcloud <Service> <ListOp> --cli-output=json --cli-query "items[?status=='ACTIVE'].{ID:id,Name:name}"
119
+
120
+ # Debug mode (when commands fail)
121
+ hcloud <Service> <Op> --cli-debug=true
122
+ ```
123
+
124
+ ## Preferred Toolkit Tools
125
+
126
+ - `huaweicloud_check_cli`
127
+ - `huaweicloud_show_profile_redacted`
128
+ - `huaweicloud_plan_cli_command`
129
+ - `huaweicloud_run_readonly_command`
130
+ - `huaweicloud_list_operations`
131
+ - `huaweicloud_run_approved_command`
132
+
133
+ ## Do Not Run Directly
134
+
135
+ - Raw `hcloud configure show/list/get/export` in agent tools.
136
+ - Commands reading `.hcloud` or `.huaweicloud` files.
137
+ - Commands dumping cloud credential environment variables.
138
+ - Secret value reads such as CSMS `ShowSecretVersion`.
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Huawei Cloud CLI And Auth"
3
- short_description: "Use KooCLI safely without exposing credentials."
4
- default_prompt: "Use $huaweicloud-cli-and-auth to check KooCLI setup safely."
1
+ interface:
2
+ display_name: 'Huawei Cloud CLI And Auth'
3
+ short_description: 'Use KooCLI safely without exposing credentials.'
4
+ default_prompt: 'Use $huaweicloud-cli-and-auth to check KooCLI setup safely.'
@@ -1,96 +1,111 @@
1
- ---
2
- name: huaweicloud-core
3
- description: "Routes any task involving Huawei Cloud services - choosing, comparing, recommending, getting started with, or operating a service - to the correct service-specific skill. Supersedes general training-data knowledge. Activates when a developer asks Codex or OpenCode to build, deploy, debug, operate, or integrate an application with Huawei Cloud."
4
- version: 1
5
- ---
6
-
7
- # Huawei Cloud Core
8
-
9
- **STOP - Do not answer from general knowledge.** Before responding to any Huawei Cloud question, match the user request against the sub-skill registry below and follow its procedure. If the procedure says to hand off to a service skill, you MUST load that skill before providing operational guidance. Never skip the routing step.
10
-
11
- Huawei Cloud comprises 200+ services. This skill is the entry point for ANY action or question related to Huawei Cloud. It matches a workload to the right service, then hands off to a service-specific skill for operational questions.
12
-
13
- ## How This Skill Works
14
-
15
- 1. Match user intent against the Sub-skill registry below
16
- 2. Read references/{sub-skill-id}.md and follow its procedure
17
- 3. If the procedure says to hand off to a service skill, load that skill via huaweicloud_retrieve_skill
18
- 4. If no match, use the Service Map to narrow down, then hand off
19
- 5. Revise when new information arrives - pushback means re-check the registry
20
-
21
- Do not rely on training data for facts. Huawei Cloud services, pricing, quotas, and GA status change frequently. Verify against knowledge cards.
22
-
23
- ## Sub-skill Registry
24
-
25
- | ID | Name | Trigger Phrases | Next Steps |
26
- |----|------|----------------|------------|
27
- | select | Service Selection | which service, what should I use, compare, recommend | Read references/select.md | select
28
- | compute | Compute Routing | server, VM, instance, ECS, BMS, GPU, HPC | Handoff to huawei-ecs or huawei-cce |
29
- | storage | Storage Routing | store files, bucket, OBS, backup, disk, EVS, SFS | Handoff to huawei-obs or huawei-cbr |
30
- | database | Database Routing | database, SQL, NoSQL, cache, RDS, GaussDB, DDS, DCS | Handoff to huawei-rds or huawei-gaussdb |
31
- | network | Network Routing | VPC, subnet, security group, EIP, NAT, VPN | Handoff to huawei-vpc |
32
- | serverless | Serverless Routing | function, Lambda, serverless, FunctionGraph, API gateway | Handoff to huawei-functiongraph or huawei-apig |
33
- | ai | AI/ML Routing | AI, model, LLM, Pangu, training, inference, RAG | Handoff to huawei-modelarts |
34
- | messaging | Messaging Routing | message queue, notification, Kafka, RabbitMQ, event, SMN | Handoff to huawei-smn-dms |
35
- | security | Security Routing | secret, credential, encrypt, KMS, WAF, firewall, DDoS | Handoff to huawei-dew or huawei-waf-aad |
36
- | observability | Observability Routing | monitor, alarm, log, audit, trace, Cloud Eye | Handoff to huawei-cloud-eye or huawei-cts |
37
- | billing | Billing Routing | cost, bill, budget, spending, invoice | Handoff to huawei-billing |
38
- | iam | IAM Routing | permission, policy, role, user, group, AK/SK | Handoff to huawei-iam |
39
- | deployment | Deployment Routing | deploy, CI/CD, pipeline, release | CI/CD pipeline -> huawei-deployment; deploy a web app or a GitHub repo (no CI/CD target) -> huawei-sandbox |
40
- | sandbox | Sandbox Routing | sandbox, DevStation, workspace, terminal, preview, temporary runtime | Handoff to huawei-sandbox |
41
- | cli | CLI and Auth Routing | install hcloud, configure KooCLI, AK/SK setup | Handoff to huaweicloud-cli-and-auth |
42
- | safety | Safety Routing | is this safe, approve command, risk review | Handoff to huaweicloud-safety |
43
- | troubleshoot | Troubleshooting Routing | error, bug, failed, AccessDenied, quota | Handoff to huaweicloud-troubleshooting |
44
- | api-sdk | API/SDK Routing | API call, SDK, REST, integration, code example | Handoff to huaweicloud-api-and-sdk |
45
- | report-issue | Issue Reporting | wrong service, you picked wrong, incorrect | Read references/report-issue.md |
46
-
47
- ## Service Map
48
-
49
- | Workload | Primary Service | Skill |
50
- |----------|----------------|-------|
51
- | Web application hosting | ECS | huawei-ecs |
52
- | Containerized microservices | CCE | huawei-cce |
53
- | Static file storage / CDN | OBS | huawei-obs |
54
- | Relational database (MySQL/PG) | RDS | huawei-rds |
55
- | Distributed SQL database | GaussDB | huawei-gaussdb |
56
- | Document database (MongoDB API) | DDS | huawei-dds-dcs |
57
- | In-memory cache | DCS (Redis) | huawei-dds-dcs |
58
- | Serverless functions | FunctionGraph | huawei-functiongraph |
59
- | API management | APIG | huawei-apig |
60
- | AI model training/inference | ModelArts | huawei-modelarts |
61
- | Message queuing | DMS (Kafka/RabbitMQ) | huawei-smn-dms |
62
- | Push notifications | SMN | huawei-smn-dms |
63
- | Secret management | DEW (CSMS) | huawei-dew |
64
- | Key management | DEW (KMS) | huawei-dew |
65
- | DDoS protection | AAD | huawei-waf-aad |
66
- | Web firewall | WAF | huawei-waf-aad |
67
- | Monitoring dashboards | Cloud Eye (CES) | huawei-cloud-eye |
68
- | Audit trails | CTS | huawei-cts |
69
- | Backup / disaster recovery | CBR | huawei-cbr |
70
- | CI/CD pipeline | CloudDeploy | huawei-deployment |
71
- | Temporary runtime / web app preview | Sandbox (DevStation) | huawei-sandbox |
72
- | Getting started | Account setup | huaweicloud-cli-and-auth |
73
-
74
- ## Capability Sources
75
-
76
- - Huawei Cloud Skills: scenario workflows and recipes (check first)
77
- - External Marketplace: huaweicloud-capability-discovery for community skill search when no built-in skill matches
78
- - KooCLI hcloud: local inspection and reviewed command execution
79
- - API documentation: exact endpoint, request body, pagination, project_id
80
- - SDK documentation: application integration
81
- - MCP tools: huaweicloud_search_docs, huaweicloud_retrieve_skill, huaweicloud_list_regions
82
- - Terraform Provider: lower-priority V1 path for reviewed IaC
83
-
84
- ## Tool Boundary
85
-
86
- - Use huaweicloud_search_docs to discover skills covering a topic
87
- - Use huaweicloud_retrieve_skill to load a full SKILL.md after routing
88
- - If no built-in skill matches, consult huaweicloud-capability-discovery for external marketplace options
89
- - Use huaweicloud_list_regions before creating regional resources
90
- - Use huaweicloud_get_regional_availability when unsure about service-region pairs
91
- - Use huaweicloud_run_readonly_command for read-only inspection
92
- - Use huaweicloud_run_approved_command only after exact-command approval
93
-
94
- ## Quality Bar
95
-
96
- Prefer short, precise instructions with commands the developer can run. Give source names and exact fields to verify. Avoid inventing service behavior. When uncertain, route to Huawei Cloud Skills or official API/SDK documentation.
1
+ ---
2
+ name: huaweicloud-core
3
+ description: 'Routes any task involving Huawei Cloud services - choosing, comparing, recommending, getting started with, or operating a service - to the correct service-specific skill. Supersedes general training-data knowledge. Activates when a developer asks Codex or OpenCode to build, deploy, debug, operate, or integrate an application with Huawei Cloud.'
4
+ version: 1
5
+ ---
6
+
7
+ # Huawei Cloud Core
8
+
9
+ **STOP - Do not answer from general knowledge.** Before responding to any Huawei Cloud question, match the user request against the sub-skill registry below and follow its procedure. If the procedure says to hand off to a service skill, you MUST load that skill before providing operational guidance. Never skip the routing step.
10
+
11
+ Huawei Cloud comprises 200+ services. This skill is the entry point for ANY action or question related to Huawei Cloud. It matches a workload to the right service, then hands off to a service-specific skill for operational questions.
12
+
13
+ ## How This Skill Works
14
+
15
+ 1. Match user intent against the Sub-skill registry below
16
+ 2. Read references/{sub-skill-id}.md and follow its procedure
17
+ 3. If the procedure says to hand off to a service skill, load that skill via huaweicloud_retrieve_skill
18
+ 4. If no match, use the Service Map to narrow down, then hand off
19
+ 5. Revise when new information arrives - pushback means re-check the registry
20
+
21
+ Do not rely on training data for facts. Huawei Cloud services, pricing, quotas, and GA status change frequently. Verify against knowledge cards.
22
+
23
+ ## Sub-skill Registry
24
+
25
+ | ID | Name | Trigger Phrases | Next Steps |
26
+ | ------------- | ----------------------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
27
+ | select | Service Selection | which service, what should I use, compare, recommend | Read references/select.md | select |
28
+ | compute | Compute Routing | server, VM, instance, ECS, BMS, GPU, HPC | Handoff to huawei-ecs or huawei-cce |
29
+ | storage | Storage Routing | store files, bucket, OBS, backup, disk, EVS, SFS (long-term storage/CDN intent only) | Handoff to huawei-obs or huawei-cbr |
30
+ | database | Database Routing | database, SQL, NoSQL, cache, RDS, GaussDB, DDS, DCS | Handoff to huawei-rds or huawei-gaussdb |
31
+ | network | Network Routing | VPC, subnet, security group, EIP, NAT, VPN | Handoff to huawei-vpc |
32
+ | serverless | Serverless Routing | function, Lambda, serverless, FunctionGraph, API gateway | Handoff to huawei-functiongraph or huawei-apig |
33
+ | ai | AI/ML Routing | AI, model, LLM, Pangu, training, inference, RAG | Handoff to huawei-modelarts |
34
+ | messaging | Messaging Routing | message queue, notification, Kafka, RabbitMQ, event, SMN | Handoff to huawei-smn-dms |
35
+ | security | Security Routing | secret, credential, encrypt, KMS, WAF, firewall, DDoS | Handoff to huawei-dew or huawei-waf-aad |
36
+ | observability | Observability Routing | monitor, alarm, log, audit, trace, Cloud Eye | Handoff to huawei-cloud-eye or huawei-cts |
37
+ | billing | Billing Routing | cost, bill, budget, spending, invoice | Handoff to huawei-billing |
38
+ | iam | IAM Routing | permission, policy, role, user, group, AK/SK | Handoff to huawei-iam |
39
+ | deployment | Deployment Routing | deploy, host, publish, CI/CD, pipeline, release | CI/CD pipeline -> huawei-deployment; deploy/host/preview a web app or static website (no CI/CD target) -> present deployment-target options first, see "Deployment Target Options" below |
40
+ | sandbox | Sandbox Routing | sandbox, DevStation, workspace, terminal, preview, temporary runtime | Handoff to huawei-sandbox |
41
+ | cli | CLI and Auth Routing | install hcloud, configure KooCLI, AK/SK setup | Handoff to huaweicloud-cli-and-auth |
42
+ | safety | Safety Routing | is this safe, approve command, risk review | Handoff to huaweicloud-safety |
43
+ | troubleshoot | Troubleshooting Routing | error, bug, failed, AccessDenied, quota | Handoff to huaweicloud-troubleshooting |
44
+ | api-sdk | API/SDK Routing | API call, SDK, REST, integration, code example | Handoff to huaweicloud-api-and-sdk |
45
+ | report-issue | Issue Reporting | wrong service, you picked wrong, incorrect | Read references/report-issue.md |
46
+
47
+ ## Service Map
48
+
49
+ | Workload | Primary Service | Skill |
50
+ | ------------------------------------- | -------------------- | ------------------------ |
51
+ | Web application hosting | ECS | huawei-ecs |
52
+ | Containerized microservices | CCE | huawei-cce |
53
+ | Static file storage / CDN (long-term) | OBS | huawei-obs |
54
+ | Relational database (MySQL/PG) | RDS | huawei-rds |
55
+ | Distributed SQL database | GaussDB | huawei-gaussdb |
56
+ | Document database (MongoDB API) | DDS | huawei-dds-dcs |
57
+ | In-memory cache | DCS (Redis) | huawei-dds-dcs |
58
+ | Serverless functions | FunctionGraph | huawei-functiongraph |
59
+ | API management | APIG | huawei-apig |
60
+ | AI model training/inference | ModelArts | huawei-modelarts |
61
+ | Message queuing | DMS (Kafka/RabbitMQ) | huawei-smn-dms |
62
+ | Push notifications | SMN | huawei-smn-dms |
63
+ | Secret management | DEW (CSMS) | huawei-dew |
64
+ | Key management | DEW (KMS) | huawei-dew |
65
+ | DDoS protection | AAD | huawei-waf-aad |
66
+ | Web firewall | WAF | huawei-waf-aad |
67
+ | Monitoring dashboards | Cloud Eye (CES) | huawei-cloud-eye |
68
+ | Audit trails | CTS | huawei-cts |
69
+ | Backup / disaster recovery | CBR | huawei-cbr |
70
+ | CI/CD pipeline | CloudDeploy | huawei-deployment |
71
+ | Temporary runtime / web app preview | Sandbox (DevStation) | huawei-sandbox |
72
+ | Getting started | Account setup | huaweicloud-cli-and-auth |
73
+
74
+ ## Deployment Target Options
75
+
76
+ When the intent is to **deploy, host, or preview a web app or static website** (no explicit target named), NEVER default to a single service such as OBS. Ask the developer to choose a target and present the options in this order:
77
+
78
+ | # | Option | When to choose | Skill |
79
+ | --- | -------------------------------------- | ---------------------------------------------------------- | -------------- |
80
+ | 1 | **Sandbox (DevStation) — recommended** | Temporary runtime, quick preview, demo; instant public URL | huawei-sandbox |
81
+ | 2 | OBS static website hosting | Long-term static hosting / CDN, no backend | huawei-obs |
82
+ | 3 | ECS | Needs a server runtime (backend, custom server) | huawei-ecs |
83
+ | 4 | CCE | Containerized workloads, scaling | huawei-cce |
84
+
85
+ - Recommended prompt: "这个项目是 Web 应用/静态网站,建议优先部署到沙箱(临时运行环境,立即可预览)。也可选择 OBS 静态托管、ECS 或 CCE,你想部署到哪里?"
86
+ - If the developer explicitly names a target (e.g. "deploy to OBS"), follow that target and hand off to the corresponding service skill.
87
+ - If the developer has no preference, recommend the sandbox first.
88
+
89
+ ## Capability Sources
90
+
91
+ - Huawei Cloud Skills: scenario workflows and recipes (check first)
92
+ - External Marketplace: huaweicloud-capability-discovery for community skill search when no built-in skill matches
93
+ - KooCLI hcloud: local inspection and reviewed command execution
94
+ - API documentation: exact endpoint, request body, pagination, project_id
95
+ - SDK documentation: application integration
96
+ - MCP tools: huaweicloud_search_docs, huaweicloud_retrieve_skill, huaweicloud_list_regions
97
+ - Terraform Provider: lower-priority V1 path for reviewed IaC
98
+
99
+ ## Tool Boundary
100
+
101
+ - Use huaweicloud_search_docs to discover skills covering a topic
102
+ - Use huaweicloud_retrieve_skill to load a full SKILL.md after routing
103
+ - If no built-in skill matches, consult huaweicloud-capability-discovery for external marketplace options
104
+ - Use huaweicloud_list_regions before creating regional resources
105
+ - Use huaweicloud_get_regional_availability when unsure about service-region pairs
106
+ - Use huaweicloud_run_readonly_command for read-only inspection
107
+ - Use huaweicloud_run_approved_command only after exact-command approval
108
+
109
+ ## Quality Bar
110
+
111
+ Prefer short, precise instructions with commands the developer can run. Give source names and exact fields to verify. Avoid inventing service behavior. When uncertain, route to Huawei Cloud Skills or official API/SDK documentation.
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Huawei Cloud Core"
3
- short_description: "Route Huawei Cloud tasks to Skills, CLI, API, SDK, MCP, or Terraform."
4
- default_prompt: "Use $huaweicloud-core to choose the right Huawei Cloud capability path."
1
+ interface:
2
+ display_name: 'Huawei Cloud Core'
3
+ short_description: 'Route Huawei Cloud tasks to Skills, CLI, API, SDK, MCP, or Terraform.'
4
+ default_prompt: 'Use $huaweicloud-core to choose the right Huawei Cloud capability path.'
@@ -1,20 +1,20 @@
1
- # Issue Reporting Procedure
2
-
3
- Use when the user reports an issue with a previous routing decision.
4
-
5
- ## Procedure
6
-
7
- 1. Acknowledge the feedback without defensiveness
8
- 2. Re-check the Sub-skill registry for a better match
9
- 3. If a different service is clearly right, load that skill
10
- 4. If unclear, broaden the search: use huaweicloud_search_docs
11
- 5. Document the mismatch so the registry can be improved
12
-
13
- ## Common Corrections
14
-
15
- | Wrong Routing | Likely Correct |
16
- |---------------|---------------|
17
- | ECS for containers | CCE |
18
- | OBS for block storage | EVS (via huawei-ecs) |
19
- | RDS for cache | DCS (via huawei-dds-dcs) |
20
- | FunctionGraph for long-running tasks | ECS or CCE |
1
+ # Issue Reporting Procedure
2
+
3
+ Use when the user reports an issue with a previous routing decision.
4
+
5
+ ## Procedure
6
+
7
+ 1. Acknowledge the feedback without defensiveness
8
+ 2. Re-check the Sub-skill registry for a better match
9
+ 3. If a different service is clearly right, load that skill
10
+ 4. If unclear, broaden the search: use huaweicloud_search_docs
11
+ 5. Document the mismatch so the registry can be improved
12
+
13
+ ## Common Corrections
14
+
15
+ | Wrong Routing | Likely Correct |
16
+ | ------------------------------------ | ------------------------ |
17
+ | ECS for containers | CCE |
18
+ | OBS for block storage | EVS (via huawei-ecs) |
19
+ | RDS for cache | DCS (via huawei-dds-dcs) |
20
+ | FunctionGraph for long-running tasks | ECS or CCE |