huaweicloud-devkit 0.1.21 → 0.1.24

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 (67) hide show
  1. package/.agents/plugins/marketplace.json +20 -20
  2. package/LICENSE +201 -201
  3. package/README.md +169 -169
  4. package/bin/setup.cjs +7 -7
  5. package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
  6. package/integrations/opencode/opencode.json +14 -14
  7. package/integrations/opencode/skills/huaweicloud-core/SKILL.md +30 -30
  8. package/package.json +43 -43
  9. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +1 -1
  10. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +1 -1
  11. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +1 -1
  12. package/plugins/huaweicloud-core/.mcp.json +13 -13
  13. package/plugins/huaweicloud-core/hooks/hooks.json +26 -26
  14. package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +88 -88
  15. package/plugins/huaweicloud-core/safety/policy.json +85 -85
  16. package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +144 -144
  17. package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -48
  18. package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -50
  19. package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +101 -101
  20. package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +73 -73
  21. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +1 -1
  22. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -55
  23. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -70
  24. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +97 -97
  25. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +29 -29
  26. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +23 -23
  27. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +131 -131
  28. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +98 -96
  29. package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -31
  30. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +28 -28
  31. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
  32. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +132 -132
  33. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +58 -58
  34. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +71 -71
  35. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -119
  36. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -142
  37. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -56
  38. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +65 -65
  39. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -111
  40. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -65
  41. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +118 -118
  42. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +26 -26
  43. package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -56
  44. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +181 -181
  45. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -69
  46. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +78 -78
  47. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +76 -76
  48. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +59 -59
  49. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -63
  50. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -4
  51. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +47 -47
  52. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -4
  53. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +127 -127
  54. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -4
  55. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +93 -93
  56. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -4
  57. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +19 -19
  58. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +27 -27
  59. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +46 -46
  60. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -4
  61. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -83
  62. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -4
  63. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +265 -265
  64. package/plugins/huaweicloud-core/src/mcp-server.mjs +93 -93
  65. package/plugins/huaweicloud-core/src/safety-policy.mjs +289 -289
  66. package/plugins/huaweicloud-core/src/setup-cli.mjs +874 -869
  67. package/plugins/huaweicloud-core/src/tools.mjs +677 -677
@@ -1,65 +1,65 @@
1
- ---
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.)."
4
- version: 1
5
- ---
6
-
7
- # Huawei Cloud Getting Started
8
-
9
- **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
-
11
- ## KooCLI Installation
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 |
18
-
19
- ## First-Time Setup
20
- 1. **Install KooCLI** using command above
21
- 2. **Accept privacy policy** (first run only): KooCLI requires one-time privacy agreement. Run `hcloud version` and respond `y` to the prompt. For non-interactive terminals, use `echo "y" | hcloud version`
22
- 3. **Configure credentials**: `hcloud configure init` (interactive, prompts for AK/SK/region safely)
23
- 4. **Verify**: `hcloud configure list` to confirm profile, then `hcloud ECS ListServersDetails --cli-region=cn-north-4`
24
- 5. For detailed auth guidance, see `huaweicloud-cli-and-auth` skill
25
-
26
- > **Security**: Never pass AK/SK as command-line arguments (`--ak=...`). Always use `hcloud configure init` (interactive) or `hcloud configure set` with cached profile to avoid secrets in shell history.
27
-
28
- ### Non-Interactive Setup (Agent/CI Environments)
29
-
30
- When the interactive TUI is unavailable (Agent tools, CI/CD), use `hcloud configure set` — this must be run outside agent chat by the user:
31
-
32
- ```bash
33
- # User executes in their terminal (NOT in agent chat):
34
- hcloud configure set --cli-access-key=<AK> --cli-secret-key=<SK> --cli-region=<region>
35
-
36
- # Agent verifies:
37
- hcloud configure list
38
- ```
39
-
40
- ## 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 | KooCLI requires one-time `y` confirmation. Non-interactive terminals need `echo "y" \| hcloud <cmd>` |
47
-
48
- ## What Can I Do? (Quick Index)
49
- | Goal | Skill |
50
- |------|-------|
51
- | Create a VM | huawei-ecs |
52
- | Store files | huawei-obs |
53
- | 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 |
61
-
62
- ## Pro Tips
63
- - Use `hcloud <Service> --help` to discover operations (see huaweicloud-capability-discovery)
64
- - Prepend `hcloud configure set --cli-region=<r>` to avoid per-command region flags
65
- - Pipe sensitive output through IAM with `--cli-output-format=json`
1
+ ---
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.)."
4
+ version: 1
5
+ ---
6
+
7
+ # Huawei Cloud Getting Started
8
+
9
+ **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
+
11
+ ## KooCLI Installation
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 |
18
+
19
+ ## First-Time Setup
20
+ 1. **Install KooCLI** using command above
21
+ 2. **Accept privacy policy** (first run only): KooCLI requires one-time privacy agreement. Run `hcloud version` and respond `y` to the prompt. For non-interactive terminals, use `echo "y" | hcloud version`
22
+ 3. **Configure credentials**: `hcloud configure init` (interactive, prompts for AK/SK/region safely)
23
+ 4. **Verify**: `hcloud configure list` to confirm profile, then `hcloud ECS ListServersDetails --cli-region=cn-north-4`
24
+ 5. For detailed auth guidance, see `huaweicloud-cli-and-auth` skill
25
+
26
+ > **Security**: Never pass AK/SK as command-line arguments (`--ak=...`). Always use `hcloud configure init` (interactive) or `hcloud configure set` with cached profile to avoid secrets in shell history.
27
+
28
+ ### Non-Interactive Setup (Agent/CI Environments)
29
+
30
+ When the interactive TUI is unavailable (Agent tools, CI/CD), use `hcloud configure set` — this must be run outside agent chat by the user:
31
+
32
+ ```bash
33
+ # User executes in their terminal (NOT in agent chat):
34
+ hcloud configure set --cli-access-key=<AK> --cli-secret-key=<SK> --cli-region=<region>
35
+
36
+ # Agent verifies:
37
+ hcloud configure list
38
+ ```
39
+
40
+ ## 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 | KooCLI requires one-time `y` confirmation. Non-interactive terminals need `echo "y" \| hcloud <cmd>` |
47
+
48
+ ## What Can I Do? (Quick Index)
49
+ | Goal | Skill |
50
+ |------|-------|
51
+ | Create a VM | huawei-ecs |
52
+ | Store files | huawei-obs |
53
+ | 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 |
61
+
62
+ ## Pro Tips
63
+ - Use `hcloud <Service> --help` to discover operations (see huaweicloud-capability-discovery)
64
+ - Prepend `hcloud configure set --cli-region=<r>` to avoid per-command region flags
65
+ - Pipe sensitive output through IAM with `--cli-output-format=json`
@@ -1,111 +1,111 @@
1
- ---
2
- name: huawei-iam
3
- description: "Use when managing IAM users, groups, roles, policies, agencies, projects, or access keys on Huawei Cloud. Covers IAM policy structure, least-privilege design, temporary credentials (STS), OneAccess integration, and security best practices. Triggers on: IAM, permission, policy, role, user, group, AK/SK, access key, agency, project, authorization. NOT for: DEW secret management (use huawei-dew)."
4
- version: 1
5
- ---
6
-
7
- # Huawei Cloud IAM
8
-
9
- **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
-
11
- Always run `hcloud <Service> <Operation> --help` before constructing commands to discover exact parameter names and requirements.
12
-
13
- ## Overview
14
-
15
- Domain expertise for Huawei Cloud Identity and Access Management (IAM). Covers user/group/role lifecycle, policy design, temporary credentials, and security best practices.
16
-
17
- ## Critical Warnings
18
-
19
- | Trap | Why |
20
- |------|-----|
21
- | NEVER create IAM users for humans | Use OneAccess (IAM Identity Center) or federated SSO |
22
- | NEVER create long-term AK/SK | Use temporary STS tokens via agencies |
23
- | Wildcard policies dangerous | Effect:Allow + Resource:* = full access. Always scope resources |
24
- | Agency trust is powerful | Agencies let services assume roles. Always add conditions |
25
- | Root account must have MFA | Root AK/SK is all-powerful. Enable MFA immediately |
26
-
27
- ## Policy Structure
28
-
29
- `json
30
- {
31
- "Version": "1.1",
32
- "Statement": [{
33
- "Effect": "Allow",
34
- "Action": ["ecs:*"],
35
- "Resource": ["*"],
36
- "Condition": {
37
- "StringEquals": {"g:SourceVpc": "vpc-xxx"}
38
- }
39
- }]
40
- }
41
- `
42
-
43
- ## Common Workflows
44
-
45
- | Task | Command | Steps |
46
- |------|---------|-------|
47
- | List users | hcloud IAM ListUsers | references/iam-ops.md |
48
- | Create group | hcloud IAM CreateGroup --group.name=<name> | references/iam-ops.md |
49
- | Create custom policy | hcloud IAM CreateCustomPolicy --policy.name=<n> --policy.document=<json> | references/policy-examples.md |
50
- | Create agency | hcloud IAM CreateAgency --agency.name=<n> --agency.domain_id=<id> --agency.trust_policy=<json> | references/agency.md |
51
- | Get temporary credential | hcloud STS GetTemporaryCredential --agency_name=<n> --domain_id=<id> --duration_seconds=3600 | references/sts.md |
52
- | Attach policy | hcloud IAM AttachGroupPolicy --group_id=<id> --policy_id=<id> | references/iam-ops.md |
53
-
54
- ## Policy Examples (Least Privilege)
55
-
56
- | Role | Actions | Resource |
57
- |------|---------|----------|
58
- | ECS Reader | ecs:List*, ecs:Get*, ecs:Describe* | * |
59
- | OBS Bucket Operator | obs:Get*, obs:Put*, obs:Delete*, obs:List* | obs:*:*:bucket:my-bucket |
60
- | RDS Backup Operator | rds:CreateBackup, rds:RestoreFromBackup, rds:ListBackup | rds:* |
61
-
62
- > See `references/policy-examples.md` for complete policy JSON templates with conditions.
63
-
64
- ## Troubleshooting
65
-
66
- | Error | Root Cause -> Fix |
67
- |-------|------------------|
68
- | AccessDenied | Missing IAM permission -> Check policy action and resource scope |
69
- | AuthFailure | Expired AK/SK or wrong project -> Renew credentials / Check project ID |
70
- | Agency trust failed | Missing trust policy condition -> Add g:SourceAccount condition |
71
- | Quota exceeded | IAM user/group/policy limit -> Request quota increase |
72
-
73
- ## Security Considerations
74
-
75
- - MUST NOT create IAM users. Use OneAccess or federated SSO
76
- - MUST NOT create long-term AK/SK. Use STS temporary tokens
77
- - MUST scope Resource ARNs. Never use wildcard *
78
- - MUST add conditions to trust policies (g:SourceAccount, g:SourceUrn)
79
- - SHOULD rotate credentials every 90 days
80
-
81
- ## Agencies (Cross-Service Delegation)
82
-
83
- Agencies allow one service to act on behalf of another. Common use cases:
84
-
85
- ### FunctionGraph Agency (VPC Access)
86
-
87
- FunctionGraph needs an agency to access VPC resources (RDS, DCS, etc.):
88
-
89
- ```bash
90
- # 1. Create agency with FunctionGraph trust
91
- hcloud IAM CreateAgency --agency_name=<name> --trust_domain_name=functiongraph
92
-
93
- # 2. Attach VPC Administrator role
94
- hcloud IAM GrantRoleToAgency --agency_name=<name> --role_id=<role-id>
95
-
96
- # 3. Use in CreateFunction
97
- hcloud FunctionGraph CreateFunction ... --app_xrole=<agency-name>
98
- ```
99
-
100
- Common roles for FunctionGraph: VPC Administrator, RDS Administrator, DCS Administrator.
101
-
102
- ## MCP Tools
103
-
104
- - huaweicloud_list_operations service=IAM
105
- - huaweicloud_run_readonly_command for user/policy discovery
106
-
107
- ## References
108
-
109
- - IAM Docs: https://support.huaweicloud.com/iam/
110
- - Policy examples: references/policy-examples.md
111
- - Agency setup: references/agency.md
1
+ ---
2
+ name: huawei-iam
3
+ description: "Use when managing IAM users, groups, roles, policies, agencies, projects, or access keys on Huawei Cloud. Covers IAM policy structure, least-privilege design, temporary credentials (STS), OneAccess integration, and security best practices. Triggers on: IAM, permission, policy, role, user, group, AK/SK, access key, agency, project, authorization. NOT for: DEW secret management (use huawei-dew)."
4
+ version: 1
5
+ ---
6
+
7
+ # Huawei Cloud IAM
8
+
9
+ **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
+
11
+ Always run `hcloud <Service> <Operation> --help` before constructing commands to discover exact parameter names and requirements.
12
+
13
+ ## Overview
14
+
15
+ Domain expertise for Huawei Cloud Identity and Access Management (IAM). Covers user/group/role lifecycle, policy design, temporary credentials, and security best practices.
16
+
17
+ ## Critical Warnings
18
+
19
+ | Trap | Why |
20
+ |------|-----|
21
+ | NEVER create IAM users for humans | Use OneAccess (IAM Identity Center) or federated SSO |
22
+ | NEVER create long-term AK/SK | Use temporary STS tokens via agencies |
23
+ | Wildcard policies dangerous | Effect:Allow + Resource:* = full access. Always scope resources |
24
+ | Agency trust is powerful | Agencies let services assume roles. Always add conditions |
25
+ | Root account must have MFA | Root AK/SK is all-powerful. Enable MFA immediately |
26
+
27
+ ## Policy Structure
28
+
29
+ `json
30
+ {
31
+ "Version": "1.1",
32
+ "Statement": [{
33
+ "Effect": "Allow",
34
+ "Action": ["ecs:*"],
35
+ "Resource": ["*"],
36
+ "Condition": {
37
+ "StringEquals": {"g:SourceVpc": "vpc-xxx"}
38
+ }
39
+ }]
40
+ }
41
+ `
42
+
43
+ ## Common Workflows
44
+
45
+ | Task | Command | Steps |
46
+ |------|---------|-------|
47
+ | List users | hcloud IAM ListUsers | references/iam-ops.md |
48
+ | Create group | hcloud IAM CreateGroup --group.name=<name> | references/iam-ops.md |
49
+ | Create custom policy | hcloud IAM CreateCustomPolicy --policy.name=<n> --policy.document=<json> | references/policy-examples.md |
50
+ | Create agency | hcloud IAM CreateAgency --agency.name=<n> --agency.domain_id=<id> --agency.trust_policy=<json> | references/agency.md |
51
+ | Get temporary credential | hcloud STS GetTemporaryCredential --agency_name=<n> --domain_id=<id> --duration_seconds=3600 | references/sts.md |
52
+ | Attach policy | hcloud IAM AttachGroupPolicy --group_id=<id> --policy_id=<id> | references/iam-ops.md |
53
+
54
+ ## Policy Examples (Least Privilege)
55
+
56
+ | Role | Actions | Resource |
57
+ |------|---------|----------|
58
+ | ECS Reader | ecs:List*, ecs:Get*, ecs:Describe* | * |
59
+ | OBS Bucket Operator | obs:Get*, obs:Put*, obs:Delete*, obs:List* | obs:*:*:bucket:my-bucket |
60
+ | RDS Backup Operator | rds:CreateBackup, rds:RestoreFromBackup, rds:ListBackup | rds:* |
61
+
62
+ > See `references/policy-examples.md` for complete policy JSON templates with conditions.
63
+
64
+ ## Troubleshooting
65
+
66
+ | Error | Root Cause -> Fix |
67
+ |-------|------------------|
68
+ | AccessDenied | Missing IAM permission -> Check policy action and resource scope |
69
+ | AuthFailure | Expired AK/SK or wrong project -> Renew credentials / Check project ID |
70
+ | Agency trust failed | Missing trust policy condition -> Add g:SourceAccount condition |
71
+ | Quota exceeded | IAM user/group/policy limit -> Request quota increase |
72
+
73
+ ## Security Considerations
74
+
75
+ - MUST NOT create IAM users. Use OneAccess or federated SSO
76
+ - MUST NOT create long-term AK/SK. Use STS temporary tokens
77
+ - MUST scope Resource ARNs. Never use wildcard *
78
+ - MUST add conditions to trust policies (g:SourceAccount, g:SourceUrn)
79
+ - SHOULD rotate credentials every 90 days
80
+
81
+ ## Agencies (Cross-Service Delegation)
82
+
83
+ Agencies allow one service to act on behalf of another. Common use cases:
84
+
85
+ ### FunctionGraph Agency (VPC Access)
86
+
87
+ FunctionGraph needs an agency to access VPC resources (RDS, DCS, etc.):
88
+
89
+ ```bash
90
+ # 1. Create agency with FunctionGraph trust
91
+ hcloud IAM CreateAgency --agency_name=<name> --trust_domain_name=functiongraph
92
+
93
+ # 2. Attach VPC Administrator role
94
+ hcloud IAM GrantRoleToAgency --agency_name=<name> --role_id=<role-id>
95
+
96
+ # 3. Use in CreateFunction
97
+ hcloud FunctionGraph CreateFunction ... --app_xrole=<agency-name>
98
+ ```
99
+
100
+ Common roles for FunctionGraph: VPC Administrator, RDS Administrator, DCS Administrator.
101
+
102
+ ## MCP Tools
103
+
104
+ - huaweicloud_list_operations service=IAM
105
+ - huaweicloud_run_readonly_command for user/policy discovery
106
+
107
+ ## References
108
+
109
+ - IAM Docs: https://support.huaweicloud.com/iam/
110
+ - Policy examples: references/policy-examples.md
111
+ - Agency setup: references/agency.md
@@ -1,65 +1,65 @@
1
- ---
2
- name: huawei-modelarts
3
- description: "Use when training, deploying, or managing AI/ML models on Huawei Cloud ModelArts. Covers training jobs, model registry, online services, notebook instances. Triggers: ModelArts, model training, AI, machine learning, deep learning, notebook, inference, deployment. NOT for: general AI/ML concepts, non-Huawei platforms."
4
- version: 1
5
- ---
6
-
7
- # Huawei Cloud ModelArts
8
-
9
- **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
-
11
- Always run `hcloud ModelArts <Operation> --help` before constructing commands to discover exact parameter names and requirements.
12
-
13
- ## Overview
14
-
15
- Domain expertise for ModelArts. Covers training jobs, model deployment, notebook instances, and OBS integration.
16
-
17
- ## Critical Warnings
18
-
19
- | Trap | Why |
20
- |------|-----|
21
- | OBS bucket required | All training data, model outputs, and notebook storage use OBS. Create bucket first |
22
- | Training charges by duration | Pay-per-minute GPU/CPU billing. Stop unused notebooks and services |
23
- | Notebook auto-stop needed | Default no auto-stop — can run indefinitely and incur charges |
24
- | Model deployment needs quota | Online services may require service quota approval in new accounts |
25
- | Training job output must be OBS | Local output not supported. Ensure `--output_path` is a valid OBS path |
26
-
27
- ## Prerequisites
28
-
29
- - Training data must be stored in an OBS bucket (see `huawei-obs`)
30
- - Output path for trained models must be an OBS path
31
- - Notebook instances need a VPC/subnet (see `huawei-vpc`)
32
-
33
- ## Common Workflows
34
-
35
- | Task | Operation |
36
- |------|-----------|
37
- | List models | `ListModels --cli-region=<r> --project_id=<p>` |
38
- | List training jobs | `ListTrainJobs --cli-region=<r> --project_id=<p>` |
39
- | List services | `ListServices --cli-region=<r> --project_id=<p>` |
40
- | List notebooks | `ListNotebooks --cli-region=<r> --project_id=<p>` |
41
- | Create model | `CreateModel --cli-region=<r> --project_id=<p>` |
42
- | Create notebook | `CreateNotebook --cli-region=<r> --project_id=<p>` |
43
-
44
- Discover operation parameters with `--help` before executing any write operation.
45
-
46
- ## Service Types
47
-
48
- | Type | Purpose |
49
- |------|---------|
50
- | Training Job | Train models on GPU/CPU resources |
51
- | Model | Register trained models for deployment |
52
- | Service (Online) | Deploy models as REST API endpoints |
53
- | Notebook | JupyterLab environments for development |
54
-
55
- ## Troubleshooting
56
-
57
- | Error | Fix |
58
- |-------|-----|
59
- | OBS path not found | Verify OBS bucket exists and path is correct |
60
- | Training job fails | Check training data format, resource quotas, and logs in console |
61
-
62
- ## Cross-Skill References
63
-
64
- - **OBS storage**: See `huawei-obs` for bucket and training data management
65
- - **VPC/Subnet**: See `huawei-vpc` for notebook network configuration
1
+ ---
2
+ name: huawei-modelarts
3
+ description: "Use when training, deploying, or managing AI/ML models on Huawei Cloud ModelArts. Covers training jobs, model registry, online services, notebook instances. Triggers: ModelArts, model training, AI, machine learning, deep learning, notebook, inference, deployment. NOT for: general AI/ML concepts, non-Huawei platforms."
4
+ version: 1
5
+ ---
6
+
7
+ # Huawei Cloud ModelArts
8
+
9
+ **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
+
11
+ Always run `hcloud ModelArts <Operation> --help` before constructing commands to discover exact parameter names and requirements.
12
+
13
+ ## Overview
14
+
15
+ Domain expertise for ModelArts. Covers training jobs, model deployment, notebook instances, and OBS integration.
16
+
17
+ ## Critical Warnings
18
+
19
+ | Trap | Why |
20
+ |------|-----|
21
+ | OBS bucket required | All training data, model outputs, and notebook storage use OBS. Create bucket first |
22
+ | Training charges by duration | Pay-per-minute GPU/CPU billing. Stop unused notebooks and services |
23
+ | Notebook auto-stop needed | Default no auto-stop — can run indefinitely and incur charges |
24
+ | Model deployment needs quota | Online services may require service quota approval in new accounts |
25
+ | Training job output must be OBS | Local output not supported. Ensure `--output_path` is a valid OBS path |
26
+
27
+ ## Prerequisites
28
+
29
+ - Training data must be stored in an OBS bucket (see `huawei-obs`)
30
+ - Output path for trained models must be an OBS path
31
+ - Notebook instances need a VPC/subnet (see `huawei-vpc`)
32
+
33
+ ## Common Workflows
34
+
35
+ | Task | Operation |
36
+ |------|-----------|
37
+ | List models | `ListModels --cli-region=<r> --project_id=<p>` |
38
+ | List training jobs | `ListTrainJobs --cli-region=<r> --project_id=<p>` |
39
+ | List services | `ListServices --cli-region=<r> --project_id=<p>` |
40
+ | List notebooks | `ListNotebooks --cli-region=<r> --project_id=<p>` |
41
+ | Create model | `CreateModel --cli-region=<r> --project_id=<p>` |
42
+ | Create notebook | `CreateNotebook --cli-region=<r> --project_id=<p>` |
43
+
44
+ Discover operation parameters with `--help` before executing any write operation.
45
+
46
+ ## Service Types
47
+
48
+ | Type | Purpose |
49
+ |------|---------|
50
+ | Training Job | Train models on GPU/CPU resources |
51
+ | Model | Register trained models for deployment |
52
+ | Service (Online) | Deploy models as REST API endpoints |
53
+ | Notebook | JupyterLab environments for development |
54
+
55
+ ## Troubleshooting
56
+
57
+ | Error | Fix |
58
+ |-------|-----|
59
+ | OBS path not found | Verify OBS bucket exists and path is correct |
60
+ | Training job fails | Check training data format, resource quotas, and logs in console |
61
+
62
+ ## Cross-Skill References
63
+
64
+ - **OBS storage**: See `huawei-obs` for bucket and training data management
65
+ - **VPC/Subnet**: See `huawei-vpc` for notebook network configuration