huaweicloud-devkit 1.0.2-next.7 → 1.0.2-next.9

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 (87) hide show
  1. package/.agents/plugins/marketplace.json +18 -18
  2. package/bin/setup.cjs +5 -3
  3. package/integrations/opencode/opencode.json +1 -4
  4. package/package.json +13 -3
  5. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +1 -1
  6. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +1 -1
  7. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +1 -1
  8. package/plugins/huaweicloud-core/.mcp.json +1 -3
  9. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +1 -1
  10. package/plugins/huaweicloud-core/safety/policy.json +75 -100
  11. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +41 -13
  12. package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +34 -34
  13. package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +18 -18
  14. package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +19 -19
  15. package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +32 -32
  16. package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +30 -30
  17. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +12 -11
  18. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +64 -17
  19. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +20 -20
  20. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +31 -31
  21. package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +20 -20
  22. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +39 -30
  23. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +8 -1
  24. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +6 -0
  25. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +39 -36
  26. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +15 -4
  27. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +11 -9
  28. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +13 -13
  29. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +40 -39
  30. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +12 -10
  31. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +21 -20
  32. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +19 -19
  33. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +20 -20
  34. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +27 -23
  35. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +27 -27
  36. package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +65 -39
  37. package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +9 -9
  38. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +25 -25
  39. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +44 -44
  40. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +19 -19
  41. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +12 -7
  42. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +13 -12
  43. package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +4 -4
  44. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +63 -58
  45. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +39 -39
  46. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +26 -26
  47. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +39 -39
  48. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +13 -12
  49. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +20 -19
  50. package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +15 -15
  51. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +18 -18
  52. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +13 -13
  53. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +3 -3
  54. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +6 -1
  55. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +3 -3
  56. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +11 -1
  57. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +3 -3
  58. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +53 -53
  59. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +3 -3
  60. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +6 -6
  61. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +3 -1
  62. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +0 -1
  63. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +3 -3
  64. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +33 -33
  65. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +3 -3
  66. package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +5 -3
  67. package/plugins/huaweicloud-core/src/auth/credentials.mjs +12 -4
  68. package/plugins/huaweicloud-core/src/auth/service.mjs +1 -1
  69. package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
  70. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +16 -7
  71. package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
  72. package/plugins/huaweicloud-core/src/mcp-server.mjs +0 -1
  73. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +1 -2
  74. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +4 -1
  75. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +4 -1
  76. package/plugins/huaweicloud-core/src/safety-policy.mjs +122 -68
  77. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +2 -7
  78. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +10 -22
  79. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +30 -9
  80. package/plugins/huaweicloud-core/src/search-market.mjs +46 -12
  81. package/plugins/huaweicloud-core/src/setup-cli.mjs +435 -167
  82. package/plugins/huaweicloud-core/src/tools.mjs +407 -114
  83. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +54 -34
  84. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +1 -5
  85. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +3 -15
  86. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +3 -16
  87. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +37 -31
@@ -1,20 +1,20 @@
1
1
  {
2
- "name": "huaweicloud-devkit",
3
- "interface": {
4
- "displayName": "HuaweiCloud Devkit"
5
- },
6
- "plugins": [
7
- {
8
- "name": "huaweicloud-core",
9
- "source": {
10
- "source": "local",
11
- "path": "./plugins/huaweicloud-core"
12
- },
13
- "policy": {
14
- "installation": "AVAILABLE",
15
- "authentication": "ON_USE"
16
- },
17
- "category": "Cloud"
18
- }
19
- ]
2
+ "name": "huaweicloud-devkit",
3
+ "interface": {
4
+ "displayName": "HuaweiCloud Devkit"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "huaweicloud-core",
9
+ "source": {
10
+ "source": "local",
11
+ "path": "./plugins/huaweicloud-core"
12
+ },
13
+ "policy": {
14
+ "installation": "AVAILABLE",
15
+ "authentication": "ON_USE"
16
+ },
17
+ "category": "Cloud"
18
+ }
19
+ ]
20
20
  }
package/bin/setup.cjs CHANGED
@@ -1,8 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
- const path = require('path');
4
- const fileUrl = require('url').pathToFileURL(path.join(__dirname, '..', 'plugins', 'huaweicloud-core', 'src', 'setup-cli.mjs')).href;
5
- import(fileUrl).catch(e => {
3
+ const path = require('node:path');
4
+ const fileUrl = require('node:url').pathToFileURL(
5
+ path.join(__dirname, '..', 'plugins', 'huaweicloud-core', 'src', 'setup-cli.mjs'),
6
+ ).href;
7
+ import(fileUrl).catch((e) => {
6
8
  console.error(e.message);
7
9
  process.exit(1);
8
10
  });
@@ -4,10 +4,7 @@
4
4
  "mcp": {
5
5
  "huaweicloud-devkit": {
6
6
  "type": "local",
7
- "command": [
8
- "node",
9
- "<绝对路径>/plugins/huaweicloud-core/src/mcp-server.mjs"
10
- ],
7
+ "command": ["node", "<绝对路径>/plugins/huaweicloud-core/src/mcp-server.mjs"],
11
8
  "enabled": true
12
9
  }
13
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huaweicloud-devkit",
3
- "version": "1.0.2-next.7",
3
+ "version": "1.0.2-next.9",
4
4
  "description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
5
5
  "type": "module",
6
6
  "files": [
@@ -18,14 +18,24 @@
18
18
  },
19
19
  "scripts": {
20
20
  "test": "node --test",
21
+ "format": "prettier --write .",
22
+ "format:check": "prettier --check .",
21
23
  "lint:md": "markdownlint-cli2 \"**/*.md\" \"#node_modules\" \"#.git\" \"#test/**\" \"#docs/**\"",
22
- "lint": "npm run lint:md",
24
+ "lint:js": "eslint .",
25
+ "lint": "npm run lint:md && npm run lint:js",
23
26
  "validate": "node ./scripts/validate-package.mjs",
24
27
  "pack:verify": "node ./scripts/pack-verify.mjs",
25
28
  "postinstall": "node -e \"console.log('\\nHuaweiCloud DevKit installed. Run: npx huaweicloud-devkit install\\n')\""
26
29
  },
30
+ "dependencies": {},
27
31
  "devDependencies": {
28
- "markdownlint-cli2": "^0.23.2"
32
+ "@eslint/js": "^10.0.1",
33
+ "eslint": "^10.8.1",
34
+ "eslint-config-prettier": "^10.1.8",
35
+ "eslint-plugin-n": "^18.3.0",
36
+ "globals": "^17.11.0",
37
+ "markdownlint-cli2": "^0.23.2",
38
+ "prettier": "^3.9.6"
29
39
  },
30
40
  "keywords": [
31
41
  "huaweicloud",
@@ -20,7 +20,7 @@
20
20
  "mcpServers": "./.mcp.json",
21
21
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
22
22
  "skills": "./skills/",
23
- "version": "1.0.2-next.7",
23
+ "version": "1.0.2-next.9",
24
24
  "author": {
25
25
  "name": "HuaweiCloud Mate",
26
26
  "url": "https://github.com/huaweicloud"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huaweicloud-core",
3
- "version": "1.0.2-next.7",
3
+ "version": "1.0.2-next.9",
4
4
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
5
5
  "author": {
6
6
  "name": "HuaweiCloud Mate",
@@ -20,7 +20,7 @@
20
20
  "mcpServers": "./.mcp.json",
21
21
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
22
22
  "skills": "./skills/",
23
- "version": "1.0.2-next.7",
23
+ "version": "1.0.2-next.9",
24
24
  "author": {
25
25
  "name": "HuaweiCloud Mate",
26
26
  "url": "https://github.com/huaweicloud"
@@ -2,9 +2,7 @@
2
2
  "mcpServers": {
3
3
  "huaweicloud-devkit": {
4
4
  "command": "node",
5
- "args": [
6
- "./src/mcp-server.mjs"
7
- ],
5
+ "args": ["./src/mcp-server.mjs"],
8
6
  "cwd": ".",
9
7
  "env": {
10
8
  "HUAWEICLOUD_AGENT_TOOLKIT_MODE": "local",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huaweicloud-core",
3
- "version": "1.0.2-next.7",
3
+ "version": "1.0.2-next.9",
4
4
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
5
5
  "author": {
6
6
  "name": "HuaweiCloud Mate",
@@ -1,101 +1,76 @@
1
1
  {
2
- "version": "0.1.0",
3
- "secretKeyNamePatterns": [
4
- "access[_-]?key",
5
- "secret[_-]?key",
6
- "security[_-]?token",
7
- "x[_-]?auth[_-]?token",
8
- "authorization",
9
- "password",
10
- "passwd",
11
- "token",
12
- "credential",
13
- "private[_-]?key",
14
- "ak",
15
- "sk"
16
- ],
17
- "credentialFilePatterns": [
18
- "\\.hcloud",
19
- "\\.huaweicloud",
20
- "hcloud[/\\\\](config|credentials)",
21
- "huaweicloud[/\\\\](config|credentials)"
22
- ],
23
- "blockedConfigureSubcommands": [
24
- "show",
25
- "get",
26
- "list",
27
- "export",
28
- "init"
29
- ],
30
- "blockedSecretOperations": [
31
- "ShowSecretVersion",
32
- "DownloadSecret",
33
- "GetSecretValue"
34
- ],
35
- "writeOperationPrefixes": [
36
- "Create",
37
- "BatchCreate",
38
- "Delete",
39
- "BatchDelete",
40
- "Update",
41
- "Modify",
42
- "Resize",
43
- "Reboot",
44
- "Stop",
45
- "Start",
46
- "Restart",
47
- "Authorize",
48
- "Revoke",
49
- "Add",
50
- "Remove",
51
- "Associate",
52
- "Disassociate",
53
- "Attach",
54
- "Detach",
55
- "Enable",
56
- "Disable",
57
- "Set",
58
- "Put",
59
- "Upload",
60
- "Install",
61
- "Publish",
62
- "Bind",
63
- "Unbind",
64
- "Invoke",
65
- "Execute",
66
- "Trigger",
67
- "Deploy"
68
- ],
69
- "readOperationPrefixes": [
70
- "List",
71
- "Show",
72
- "Get",
73
- "Describe",
74
- "NovaList",
75
- "NovaShow"
76
- ],
77
- "safeTextReadCommands": [
78
- "rg",
79
- "grep",
80
- "findstr",
81
- "git",
82
- "ls",
83
- "dir",
84
- "Get-ChildItem"
85
- ],
86
- "blockedSandboxCommands": [
87
- "rm\\s+-rf\\s+/",
88
- "mkfs",
89
- "dd\\s+if=",
90
- ":\\(\\)\\{:\\|:&\\};:",
91
- "shutdown",
92
- "reboot",
93
- "init\\s+[06]",
94
- "fdisk"
95
- ],
96
- "sandboxWriteTools": [
97
- "huaweicloud_sandbox_connect",
98
- "huaweicloud_sandbox_credentials",
99
- "huaweicloud_sandbox_upload_file"
100
- ]
101
- }
2
+ "version": "0.1.0",
3
+ "secretKeyNamePatterns": [
4
+ "access[_-]?key",
5
+ "secret[_-]?key",
6
+ "security[_-]?token",
7
+ "x[_-]?auth[_-]?token",
8
+ "authorization",
9
+ "password",
10
+ "passwd",
11
+ "token",
12
+ "credential",
13
+ "private[_-]?key",
14
+ "ak",
15
+ "sk"
16
+ ],
17
+ "credentialFilePatterns": [
18
+ "\\.hcloud",
19
+ "\\.huaweicloud",
20
+ "hcloud[/\\\\](config|credentials)",
21
+ "huaweicloud[/\\\\](config|credentials)"
22
+ ],
23
+ "blockedConfigureSubcommands": ["show", "get", "list", "export", "init"],
24
+ "blockedSecretOperations": ["ShowSecretVersion", "DownloadSecret", "GetSecretValue"],
25
+ "writeOperationPrefixes": [
26
+ "Create",
27
+ "BatchCreate",
28
+ "Delete",
29
+ "BatchDelete",
30
+ "Update",
31
+ "Modify",
32
+ "Resize",
33
+ "Reboot",
34
+ "Stop",
35
+ "Start",
36
+ "Restart",
37
+ "Authorize",
38
+ "Revoke",
39
+ "Add",
40
+ "Remove",
41
+ "Associate",
42
+ "Disassociate",
43
+ "Attach",
44
+ "Detach",
45
+ "Enable",
46
+ "Disable",
47
+ "Set",
48
+ "Put",
49
+ "Upload",
50
+ "Install",
51
+ "Publish",
52
+ "Bind",
53
+ "Unbind",
54
+ "Invoke",
55
+ "Execute",
56
+ "Trigger",
57
+ "Deploy"
58
+ ],
59
+ "readOperationPrefixes": ["List", "Show", "Get", "Describe", "NovaList", "NovaShow"],
60
+ "safeTextReadCommands": ["rg", "grep", "findstr", "git", "ls", "dir", "Get-ChildItem"],
61
+ "blockedSandboxCommands": [
62
+ "rm\\s+-rf\\s+/",
63
+ "mkfs",
64
+ "dd\\s+if=",
65
+ ":\\(\\)\\{:\\|:&\\};:",
66
+ "shutdown",
67
+ "reboot",
68
+ "init\\s+[06]",
69
+ "fdisk"
70
+ ],
71
+ "sandboxWriteTools": [
72
+ "huaweicloud_sandbox_connect",
73
+ "huaweicloud_sandbox_credentials",
74
+ "huaweicloud_sandbox_upload_file"
75
+ ]
76
+ }
@@ -9,7 +9,10 @@
9
9
  "stages": ["command"],
10
10
  "match": {
11
11
  "any": [
12
- { "field": "text", "regex": "(^|\\s)(cat|type|Get-Content|gc|less|more)\\s+[^\\n]*(\\.hcloud|\\.huaweicloud)" },
12
+ {
13
+ "field": "text",
14
+ "regex": "(^|\\s)(cat|type|Get-Content|gc|less|more)\\s+[^\\n]*(\\.hcloud|\\.huaweicloud)"
15
+ },
13
16
  { "field": "text", "regex": "(hcloud|huaweicloud)[/\\\\](config|credentials)" }
14
17
  ]
15
18
  },
@@ -54,7 +57,10 @@
54
57
  "stages": ["command"],
55
58
  "match": {
56
59
  "all": [
57
- { "field": "text", "regex": "(base64\\s+(-d|--decode)|xxd\\s+-r|certutil\\s+-decode|FromBase64String|hex\\s*decode)" },
60
+ {
61
+ "field": "text",
62
+ "regex": "(base64\\s+(-d|--decode)|xxd\\s+-r|certutil\\s+-decode|FromBase64String|hex\\s*decode)"
63
+ },
58
64
  { "field": "text", "regex": "(\\||;|&&)" },
59
65
  { "field": "text", "regex": "\\b(bash|sh|zsh|powershell|pwsh|cmd|python|node)\\b" }
60
66
  ]
@@ -70,8 +76,14 @@
70
76
  "stages": ["command", "artifact", "deploy_plan"],
71
77
  "match": {
72
78
  "all": [
73
- { "field": "text", "regex": "(0\\.0\\.0\\.0\\s*/\\s*0|::\\s*/\\s*0|remote_ip_prefix\\s*[=:]\\s*0\\.0\\.0\\.0\\s*/\\s*0|cidr\\s*[=:]\\s*0\\.0\\.0\\.0\\s*/\\s*0)" },
74
- { "field": "text", "regex": "(port_range_min|port_range_max|from_port|to_port|port|\\b22\\b|\\b3389\\b|\\b3306\\b|\\b5432\\b|\\b6379\\b|\\b9200\\b)" }
79
+ {
80
+ "field": "text",
81
+ "regex": "(0\\.0\\.0\\.0\\s*/\\s*0|::\\s*/\\s*0|remote_ip_prefix\\s*[=:]\\s*0\\.0\\.0\\.0\\s*/\\s*0|cidr\\s*[=:]\\s*0\\.0\\.0\\.0\\s*/\\s*0)"
82
+ },
83
+ {
84
+ "field": "text",
85
+ "regex": "(port_range_min|port_range_max|from_port|to_port|port|\\b22\\b|\\b3389\\b|\\b3306\\b|\\b5432\\b|\\b6379\\b|\\b9200\\b)"
86
+ }
75
87
  ]
76
88
  },
77
89
  "message": "The change appears to expose an administrative or database port to the public internet.",
@@ -84,12 +96,16 @@
84
96
  "severity": "deny",
85
97
  "stages": ["command", "artifact", "deploy_plan"],
86
98
  "match": {
87
- "all": [
88
- { "field": "text", "regex": "(OBS|obs://|bucket|object|Statement|Principal)" }
89
- ],
99
+ "all": [{ "field": "text", "regex": "(OBS|obs://|bucket|object|Statement|Principal)" }],
90
100
  "any": [
91
- { "field": "text", "regex": "((Anonymous|Everyone|\\\"Principal\\\"\\s*:\\s*\\\"\\*\\\"|AllUsers).*(PutObject|DeleteObject|PutBucketPolicy|FULL_CONTROL|WRITE|obs:object:PutObject|obs:bucket:PutBucketPolicy)|(PutObject|DeleteObject|PutBucketPolicy|FULL_CONTROL|WRITE|obs:object:PutObject|obs:bucket:PutBucketPolicy).*(Anonymous|Everyone|\\\"Principal\\\"\\s*:\\s*\\\"\\*\\\"|AllUsers))" },
92
- { "field": "text", "regex": "(-acl\\s*=?\\s*public-read-write|acl\\s*[=:]\\s*[\\\"']?public-read-write|public-write)" }
101
+ {
102
+ "field": "text",
103
+ "regex": "((Anonymous|Everyone|\\\"Principal\\\"\\s*:\\s*\\\"\\*\\\"|AllUsers).*(PutObject|DeleteObject|PutBucketPolicy|FULL_CONTROL|WRITE|obs:object:PutObject|obs:bucket:PutBucketPolicy)|(PutObject|DeleteObject|PutBucketPolicy|FULL_CONTROL|WRITE|obs:object:PutObject|obs:bucket:PutBucketPolicy).*(Anonymous|Everyone|\\\"Principal\\\"\\s*:\\s*\\\"\\*\\\"|AllUsers))"
104
+ },
105
+ {
106
+ "field": "text",
107
+ "regex": "(-acl\\s*=?\\s*public-read-write|acl\\s*[=:]\\s*[\\\"']?public-read-write|public-write)"
108
+ }
93
109
  ]
94
110
  },
95
111
  "message": "The change may grant anonymous write or full-control access to OBS data.",
@@ -104,7 +120,10 @@
104
120
  "match": {
105
121
  "all": [
106
122
  { "field": "text", "regex": "(FunctionGraph|APIG|CreateTrigger|CreateApi|DEDICATEDGATEWAY|API Gateway)" },
107
- { "field": "text", "regex": "(public|PUBLIC|0\\.0\\.0\\.0\\s*/\\s*0|auth[\\\"']?\\s*[=:]\\s*[\\\"']?(NONE|none|false)|security_authentication[\\\"']?\\s*[=:]\\s*[\\\"']?(NONE|none))" }
123
+ {
124
+ "field": "text",
125
+ "regex": "(public|PUBLIC|0\\.0\\.0\\.0\\s*/\\s*0|auth[\\\"']?\\s*[=:]\\s*[\\\"']?(NONE|none|false)|security_authentication[\\\"']?\\s*[=:]\\s*[\\\"']?(NONE|none))"
126
+ }
108
127
  ]
109
128
  },
110
129
  "message": "The generated FunctionGraph or API Gateway path may be publicly reachable without authentication.",
@@ -119,7 +138,10 @@
119
138
  "match": {
120
139
  "all": [
121
140
  { "field": "text", "regex": "(IAM|policy|role|agency|Statement|Action)" },
122
- { "field": "text", "regex": "(\\\"Action\\\"\\s*:\\s*(\\\"(\\*|\\*:\\*)\\\"|\\[\\s*\\\"(\\*|\\*:\\*)\\\")|Action\\s*[=:]\\s*(\\*|\\*:\\*)|AdministratorAccess|FullAccess)" },
141
+ {
142
+ "field": "text",
143
+ "regex": "(\\\"Action\\\"\\s*:\\s*(\\\"(\\*|\\*:\\*)\\\"|\\[\\s*\\\"(\\*|\\*:\\*)\\\")|Action\\s*[=:]\\s*(\\*|\\*:\\*)|AdministratorAccess|FullAccess)"
144
+ },
123
145
  { "field": "text", "regex": "(\\\"Effect\\\"\\s*:\\s*\\\"Allow\\\"|Effect\\s*[=:]\\s*Allow)" }
124
146
  ]
125
147
  },
@@ -149,7 +171,10 @@
149
171
  "stages": ["artifact", "deploy_plan"],
150
172
  "match": {
151
173
  "all": [
152
- { "field": "text", "regex": "(sandbox|preview|temporary|ephemeral|dev environment|FunctionGraph|ECS|CCE|APIG)" },
174
+ {
175
+ "field": "text",
176
+ "regex": "(sandbox|preview|temporary|ephemeral|dev environment|FunctionGraph|ECS|CCE|APIG)"
177
+ },
153
178
  { "field": "text", "regex": "(Create|Deploy|Provision|resource|stack|environment)" }
154
179
  ],
155
180
  "none": [
@@ -167,7 +192,10 @@
167
192
  "stages": ["command", "artifact", "deploy_plan"],
168
193
  "match": {
169
194
  "any": [
170
- { "field": "text", "regex": "(max_instances|max_node_count|max_replica|desired\\s*[=:]\\s*[5-9][0-9]|replicas\\s*[=:]\\s*[5-9][0-9])" },
195
+ {
196
+ "field": "text",
197
+ "regex": "(max_instances|max_node_count|max_replica|desired\\s*[=:]\\s*[5-9][0-9]|replicas\\s*[=:]\\s*[5-9][0-9])"
198
+ },
171
199
  { "field": "text", "regex": "(GPU|gpu|large|xlarge|charging_mode\\s*[=:]\\s*prePaid|period_type|period_num)" }
172
200
  ]
173
201
  },
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-apig
3
- description: "Use when creating or managing API Gateway (APIG). Covers API creation, throttling, auth (IAM/APP/basic), CORS, publishing, instance management. Triggers: APIG, API gateway, throttling, publish API. NOT for: FunctionGraph triggers (use huawei-functiongraph)."
3
+ description: 'Use when creating or managing API Gateway (APIG). Covers API creation, throttling, auth (IAM/APP/basic), CORS, publishing, instance management. Triggers: APIG, API gateway, throttling, publish API. NOT for: FunctionGraph triggers (use huawei-functiongraph).'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -16,16 +16,16 @@ Always discover parameters with `hcloud APIG <Operation> --help` before executin
16
16
 
17
17
  ## Critical Warnings
18
18
 
19
- | Trap | Why |
20
- |------|-----|
21
- | API group region-locked | Cannot move across regions |
22
- | Throttling per-API default | Use app-level quotas for per-user limits |
23
- | CORS must be explicit | OPTIONS preflight fails until configured |
24
- | `BASIC` spec has no public IP | Use `PROFESSIONAL` + `elb` provider for public access |
25
- | Instance creation takes 5-15min | Long-running async operation. State is **Running** (NOT "SUCCESS"). Poll with `ListInstancesV2`, wait for `status == "Running"` |
26
- | `sl_domain` is from API **Group** | NOT from Instance. Get it from `CreateApiGroupV2` or `ListApiGroupsV2` response |
27
- | API name must NOT have hyphens | `[a-zA-Z0-9_]+` only. Hyphens cause regex validation failure |
28
- | VPC params need prefix | `--vpc.name=<n>` / `--subnet.vpc_id=<id>` / `--security_group.name=<n>` with KooCLI 7.x |
19
+ | Trap | Why |
20
+ | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
21
+ | API group region-locked | Cannot move across regions |
22
+ | Throttling per-API default | Use app-level quotas for per-user limits |
23
+ | CORS must be explicit | OPTIONS preflight fails until configured |
24
+ | `BASIC` spec has no public IP | Use `PROFESSIONAL` + `elb` provider for public access |
25
+ | Instance creation takes 5-15min | Long-running async operation. State is **Running** (NOT "SUCCESS"). Poll with `ListInstancesV2`, wait for `status == "Running"` |
26
+ | `sl_domain` is from API **Group** | NOT from Instance. Get it from `CreateApiGroupV2` or `ListApiGroupsV2` response |
27
+ | API name must NOT have hyphens | `[a-zA-Z0-9_]+` only. Hyphens cause regex validation failure |
28
+ | VPC params need prefix | `--vpc.name=<n>` / `--subnet.vpc_id=<id>` / `--security_group.name=<n>` with KooCLI 7.x |
29
29
 
30
30
  ## Instance Management
31
31
 
@@ -43,14 +43,14 @@ hcloud APIG CreateInstanceV2 --help
43
43
 
44
44
  Key gotchas when creating:
45
45
 
46
- | Param | Note |
47
- |-------|------|
48
- | `--spec_id` | `BASIC` (no public access), `PROFESSIONAL` (requires `--loadbalancer_provider`) |
49
- | `--loadbalancer_provider` | `elb` for public access (supports `AddIngressEipV2`), `lvs` for internal only (supports `AddEipV2`) |
50
- | `--enterprise_project_id` | **Required** for enterprise accounts. Use `"0"` for default project |
51
- | `--available_zone_ids` | Use AZ code like `ap-southeast-3a`, NOT UUID from `ListAvailableZonesV2` |
52
- | `--vpc_id`, `--subnet_id` | Must exist in the target region |
53
- | `--security_group_id` | **Required**. Create a security group first via `VPC CreateSecurityGroup` (VPC v3 API — no `vpc_id` param needed) |
46
+ | Param | Note |
47
+ | ------------------------- | ----------------------------------------------------------------------------------------------------------------- |
48
+ | `--spec_id` | `BASIC` (no public access), `PROFESSIONAL` (requires `--loadbalancer_provider`) |
49
+ | `--loadbalancer_provider` | `elb` for public access (supports `AddIngressEipV2`), `lvs` for internal only (supports `AddEipV2`) |
50
+ | `--enterprise_project_id` | **Required** for enterprise accounts. Use `"0"` for default project |
51
+ | `--available_zone_ids` | Use AZ code like `ap-southeast-3a`, NOT UUID from `ListAvailableZonesV2` |
52
+ | `--vpc_id`, `--subnet_id` | Must exist in the target region |
53
+ | `--security_group_id` | **Required**. Create a security group first via `VPC CreateSecurityGroup` (VPC v3 API — no `vpc_id` param needed) |
54
54
 
55
55
  ### Add Public Access (ELB Provider Only)
56
56
 
@@ -89,9 +89,9 @@ Wait for `eip_address` to show a valid IP (may take up to 2 minutes). If `eip_ad
89
89
  hcloud APIG CreateApiGroupV2 --instance_id=<id> --name=<n>
90
90
  ```
91
91
 
92
- | Param | Note |
93
- |-------|------|
94
- | `--name` | Group name (required) |
92
+ | Param | Note |
93
+ | ---------- | ---------------------- |
94
+ | `--name` | Group name (required) |
95
95
  | `--remark` | Description (optional) |
96
96
 
97
97
  ## API Management
@@ -120,18 +120,18 @@ hcloud APIG CreateThrottlingPolicyV2 --name=<n> --api_call_limits=1000
120
120
 
121
121
  ## Common Workflows
122
122
 
123
- | Task | Operation |
124
- |------|-----------|
125
- | List instances | `ListInstancesV2` |
126
- | Create instance | `CreateInstanceV2` |
127
- | Delete instance | `DeleteInstancesV2` |
128
- | Add public EIP | `AddIngressEipV2` |
129
- | Create API group | `CreateApiGroupV2` |
130
- | Create API | `CreateApiV2` |
131
- | Update API | `UpdateApiV2` — change auth mode, path, etc. |
132
- | List APIs | `ListApisV2` |
133
- | Publish | `BatchPublishOrOfflineApiV2` |
134
- | List APIs | `ListApisV2` |
123
+ | Task | Operation |
124
+ | ---------------- | -------------------------------------------- |
125
+ | List instances | `ListInstancesV2` |
126
+ | Create instance | `CreateInstanceV2` |
127
+ | Delete instance | `DeleteInstancesV2` |
128
+ | Add public EIP | `AddIngressEipV2` |
129
+ | Create API group | `CreateApiGroupV2` |
130
+ | Create API | `CreateApiV2` |
131
+ | Update API | `UpdateApiV2` — change auth mode, path, etc. |
132
+ | List APIs | `ListApisV2` |
133
+ | Publish | `BatchPublishOrOfflineApiV2` |
134
+ | List APIs | `ListApisV2` |
135
135
 
136
136
  ## FunctionGraph Integration
137
137
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-billing
3
- description: "Use when querying bills, costs, resource usage, or billing details on Huawei Cloud (BSS). Triggers: billing, BSS, cost, bill, expense, usage report, resource usage, budget. NOT for: resource management (use huawei-ecs etc.), creating resources."
3
+ description: 'Use when querying bills, costs, resource usage, or billing details on Huawei Cloud (BSS). Triggers: billing, BSS, cost, bill, expense, usage report, resource usage, budget. NOT for: resource management (use huawei-ecs etc.), creating resources.'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -16,32 +16,32 @@ Domain expertise for billing queries (BSS). Covers cost tracking, bill details,
16
16
 
17
17
  ## Critical Warnings
18
18
 
19
- | Trap | Why |
20
- |------|-----|
21
- | Bills delayed ~24h | Yesterday's costs may not appear until the next day |
22
- | BSS Admin role needed | IAM user must have BSS Administrator or Finance role |
23
- | Currency conversion varies | Cross-region costs use daily exchange rates |
19
+ | Trap | Why |
20
+ | -------------------------- | ---------------------------------------------------- |
21
+ | Bills delayed ~24h | Yesterday's costs may not appear until the next day |
22
+ | BSS Admin role needed | IAM user must have BSS Administrator or Finance role |
23
+ | Currency conversion varies | Cross-region costs use daily exchange rates |
24
24
 
25
25
  ## Common Workflows
26
26
 
27
- | Task | Operation |
28
- |------|-----------|
29
- | List costs | `ListCosts --cli-region=<r> --project_id=<p>` |
30
- | List customer bills | `ListCustomerBills --cli-region=<r> --project_id=<p>` |
31
- | List resource usage | `ListResourceUsage --cli-region=<r> --project_id=<p>` |
32
- | List sub-customers | `ListConsumeSubCustomers --cli-region=<r> --project_id=<p>` |
27
+ | Task | Operation |
28
+ | -------------------- | --------------------------------------------------------------- |
29
+ | List costs | `ListCosts --cli-region=<r> --project_id=<p>` |
30
+ | List customer bills | `ListCustomerBills --cli-region=<r> --project_id=<p>` |
31
+ | List resource usage | `ListResourceUsage --cli-region=<r> --project_id=<p>` |
32
+ | List sub-customers | `ListConsumeSubCustomers --cli-region=<r> --project_id=<p>` |
33
33
  | Show account balance | `ShowCustomerAccountBalances --cli-region=<r> --project_id=<p>` |
34
- | List conversions | `ListConversions --cli-region=<r> --project_id=<p>` |
34
+ | List conversions | `ListConversions --cli-region=<r> --project_id=<p>` |
35
35
 
36
36
  Discover exact parameters with `--help` before executing any command. All BSS operations are read-only.
37
37
 
38
38
  ## Troubleshooting
39
39
 
40
- | Error | Fix |
41
- |-------|-----|
42
- | Access denied | User needs BSS Administrator or Finance role |
43
- | No data returned | Check time range (bills have ~24h delay). Verify project_id |
44
- | Enterprise account restrictions | Some APIs require enterprise real-name authentication |
40
+ | Error | Fix |
41
+ | ------------------------------- | ----------------------------------------------------------- |
42
+ | Access denied | User needs BSS Administrator or Finance role |
43
+ | No data returned | Check time range (bills have ~24h delay). Verify project_id |
44
+ | Enterprise account restrictions | Some APIs require enterprise real-name authentication |
45
45
 
46
46
  ## Cross-Skill References
47
47