huaweicloud-devkit 0.1.26-dev.0 → 1.0.0

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.
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # HuaweiCloud DevKit
1
+ # HuaweiCloud DevKit
2
2
 
3
3
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
4
- [![CI](https://github.com/huaweicloud-mate/huaweicloud-devkit/actions/workflows/ci.yml/badge.svg)](https://github.com/huaweicloud-mate/huaweicloud-devkit/actions/workflows/ci.yml)
4
+ [![CI](https://github.com/huaweicloud/HuaweiCloud-Devkit/actions/workflows/ci.yml/badge.svg)](https://github.com/huaweicloud/HuaweiCloud-Devkit/actions/workflows/ci.yml)
5
5
 
6
6
  帮助 AI 编码助手安全、准确地使用华为云——技能引导、KooCLI 工具、安全策略一站式集成。
7
7
 
8
- HuaweiCloud DevKit 为 AI 编码助手提供操作华为云所需的知识、工具和安全护栏,支持 OpenCode、Codex、Claude Code、Cursor、码道(CodeArts Agent)等主流 Agent。
8
+ HuaweiCloud DevKit 为 AI 编码助手提供操作华为云所需的知识、工具和安全护栏,支持 OpenCode、Codex、码道(CodeArts Agent)等主流 Agent。
9
9
 
10
10
  ## 快速开始
11
11
 
@@ -32,16 +32,6 @@ npx --yes huaweicloud-devkit install --target codex
32
32
 
33
33
  > 需要先安装 Codex CLI。`--target all` 会在 Codex CLI 缺失时跳过 Codex。
34
34
 
35
- ### Claude Code
36
-
37
- 通过 **设置 → 插件 → 团队市场 → 添加市场 → 从仓库导入**,指向 `huaweicloud-mate/huaweicloud-devkit`。Claude Code 会自动索引插件。
38
-
39
- 安装插件:
40
-
41
- ```
42
- /plugin install huaweicloud-core@huaweicloud-devkit
43
- ```
44
-
45
35
  ### CodeArts Agent(码道)
46
36
 
47
37
  码道没有插件市场,通过技能 + MCP 机制适配:
@@ -63,12 +53,6 @@ npx --yes huaweicloud-devkit uninstall --target codearts # 卸载
63
53
  >
64
54
  > **认证**:KooCLI 就绪后,还需在码道外终端执行 `hcloud configure init` 配置 AK/SK 与区域,然后即可在码道中描述你的华为云任务。
65
55
 
66
- ### Cursor
67
-
68
- 通过 **设置 → 插件 → 团队市场 → 添加市场 → 从仓库导入**,指向 `huaweicloud-mate/huaweicloud-devkit`。
69
-
70
- 然后在**插件**面板中安装 **huaweicloud-core** 插件。
71
-
72
56
  ### 其他 Agent
73
57
 
74
58
  对于支持 Model Context Protocol (MCP) 的 Agent,手动配置 MCP 服务器:
@@ -135,7 +119,7 @@ Agent 技能是经过整理的指令和参考材料包,帮助 Agent 完成特
135
119
  | 层级 | 机制 | 说明 |
136
120
  |------|------|------|
137
121
  | 技能层 | `SKILL.md` 流程文档 | 教会 Agent 正确的行为规则和安全用法 |
138
- | 钩子层 | `huaweicloud-safety.py` | PreToolUse Hook 阻断高风险工具调用(Claude Code、Cursor 可用) |
122
+ | 钩子层 | `huaweicloud-safety.py` | PreToolUse Hook 阻断高风险工具调用 |
139
123
  | MCP 层 | `safety-policy.mjs` | Node.js 安全策略包装器,在所有 Agent 环境中强制执行 |
140
124
 
141
125
  详见 [`docs/safety-model.md`](docs/safety-model.md)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huaweicloud-devkit",
3
- "version": "0.1.26-dev.0",
3
+ "version": "1.0.0",
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": [
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "https://github.com/huaweicloud-mate/huaweicloud-devkit.git"
17
+ "url": "https://github.com/huaweicloud/HuaweiCloud-Devkit.git"
18
18
  },
19
19
  "scripts": {
20
20
  "test": "node --test",
@@ -1,44 +1,44 @@
1
1
  {
2
- "interface": {
3
- "displayName": "HuaweiCloud Devkit",
4
- "shortDescription": "HuaweiCloud Devkit - Huawei Cloud guidance, CLI/API/SDK routing, MCP tools, and safety for coding agents.",
5
- "longDescription": "HuaweiCloud Devkit helps coding agents choose and use Huawei Cloud Skills, KooCLI, APIs, SDKs, and MCP tools with less context, safer command execution, and more accurate cloud implementation decisions.",
6
- "developerName": "HuaweiCloud Mate",
7
- "category": "Cloud",
8
- "capabilities": [
9
- "Read",
10
- "Interactive"
11
- ],
12
- "websiteURL": "https://github.com/huaweicloud-mate/huaweicloud-devkit",
13
- "brandColor": "#C7000B",
14
- "defaultPrompt": [
15
- "Help me choose the right Huawei Cloud capability.",
16
- "Check my Huawei Cloud CLI setup safely.",
17
- "Plan this Huawei Cloud API or SDK task."
18
- ]
19
- },
20
- "mcpServers": "./.mcp.json",
21
- "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
22
- "skills": "./skills/",
23
- "version": "0.1.23",
24
- "author": {
25
- "name": "HuaweiCloud Mate",
26
- "url": "https://github.com/huaweicloud-mate"
27
- },
28
- "hooks": "./hooks/",
29
- "name": "huaweicloud-core",
30
- "homepage": "https://github.com/huaweicloud-mate/huaweicloud-devkit",
31
- "repository": "https://github.com/huaweicloud-mate/huaweicloud-devkit",
32
- "license": "Apache-2.0",
33
- "keywords": [
34
- "huaweicloud",
35
- "huawei-cloud",
36
- "koocli",
37
- "hcloud",
38
- "agent",
39
- "mcp",
40
- "api",
41
- "sdk",
42
- "skills"
43
- ]
44
- }
2
+ "interface": {
3
+ "displayName": "HuaweiCloud Devkit",
4
+ "shortDescription": "HuaweiCloud Devkit - Huawei Cloud guidance, CLI/API/SDK routing, MCP tools, and safety for coding agents.",
5
+ "longDescription": "HuaweiCloud Devkit helps coding agents choose and use Huawei Cloud Skills, KooCLI, APIs, SDKs, and MCP tools with less context, safer command execution, and more accurate cloud implementation decisions.",
6
+ "developerName": "HuaweiCloud Mate",
7
+ "category": "Cloud",
8
+ "capabilities": [
9
+ "Read",
10
+ "Interactive"
11
+ ],
12
+ "websiteURL": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
13
+ "brandColor": "#C7000B",
14
+ "defaultPrompt": [
15
+ "Help me choose the right Huawei Cloud capability.",
16
+ "Check my Huawei Cloud CLI setup safely.",
17
+ "Plan this Huawei Cloud API or SDK task."
18
+ ]
19
+ },
20
+ "mcpServers": "./.mcp.json",
21
+ "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
22
+ "skills": "./skills/",
23
+ "version": "1.0.0",
24
+ "author": {
25
+ "name": "HuaweiCloud Mate",
26
+ "url": "https://github.com/huaweicloud"
27
+ },
28
+ "hooks": "./hooks/",
29
+ "name": "huaweicloud-core",
30
+ "homepage": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
31
+ "repository": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
32
+ "license": "Apache-2.0",
33
+ "keywords": [
34
+ "huaweicloud",
35
+ "huawei-cloud",
36
+ "koocli",
37
+ "hcloud",
38
+ "agent",
39
+ "mcp",
40
+ "api",
41
+ "sdk",
42
+ "skills"
43
+ ]
44
+ }
@@ -1,43 +1,43 @@
1
1
  {
2
- "name": "huaweicloud-core",
3
- "version": "0.1.23",
4
- "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
5
- "author": {
6
- "name": "HuaweiCloud Mate",
7
- "url": "https://github.com/huaweicloud-mate"
8
- },
9
- "homepage": "https://github.com/huaweicloud-mate/huaweicloud-devkit",
10
- "repository": "https://github.com/huaweicloud-mate/huaweicloud-devkit",
11
- "license": "Apache-2.0",
12
- "keywords": [
13
- "huaweicloud",
14
- "huawei-cloud",
15
- "koocli",
16
- "hcloud",
17
- "agent",
18
- "mcp",
19
- "api",
20
- "sdk",
21
- "skills"
22
- ],
23
- "skills": "./skills/",
24
- "mcpServers": "./.mcp.json",
25
- "interface": {
26
- "displayName": "HuaweiCloud Devkit",
27
- "shortDescription": "HuaweiCloud Devkit - Huawei Cloud guidance, CLI/API/SDK routing, MCP tools, and safety for coding agents.",
28
- "longDescription": "HuaweiCloud Devkit helps coding agents choose and use Huawei Cloud Skills, KooCLI, APIs, SDKs, and MCP tools with less context, safer command execution, and more accurate cloud implementation decisions.",
29
- "developerName": "HuaweiCloud Mate",
30
- "category": "Cloud",
31
- "capabilities": [
32
- "Read",
33
- "Interactive"
34
- ],
35
- "websiteURL": "https://github.com/huaweicloud-mate/huaweicloud-devkit",
36
- "brandColor": "#C7000B",
37
- "defaultPrompt": [
38
- "Help me choose the right Huawei Cloud capability.",
39
- "Check my Huawei Cloud CLI setup safely.",
40
- "Plan this Huawei Cloud API or SDK task."
41
- ]
42
- }
43
- }
2
+ "name": "huaweicloud-core",
3
+ "version": "1.0.0",
4
+ "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
5
+ "author": {
6
+ "name": "HuaweiCloud Mate",
7
+ "url": "https://github.com/huaweicloud"
8
+ },
9
+ "homepage": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
10
+ "repository": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
11
+ "license": "Apache-2.0",
12
+ "keywords": [
13
+ "huaweicloud",
14
+ "huawei-cloud",
15
+ "koocli",
16
+ "hcloud",
17
+ "agent",
18
+ "mcp",
19
+ "api",
20
+ "sdk",
21
+ "skills"
22
+ ],
23
+ "skills": "./skills/",
24
+ "mcpServers": "./.mcp.json",
25
+ "interface": {
26
+ "displayName": "HuaweiCloud Devkit",
27
+ "shortDescription": "HuaweiCloud Devkit - Huawei Cloud guidance, CLI/API/SDK routing, MCP tools, and safety for coding agents.",
28
+ "longDescription": "HuaweiCloud Devkit helps coding agents choose and use Huawei Cloud Skills, KooCLI, APIs, SDKs, and MCP tools with less context, safer command execution, and more accurate cloud implementation decisions.",
29
+ "developerName": "HuaweiCloud Mate",
30
+ "category": "Cloud",
31
+ "capabilities": [
32
+ "Read",
33
+ "Interactive"
34
+ ],
35
+ "websiteURL": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
36
+ "brandColor": "#C7000B",
37
+ "defaultPrompt": [
38
+ "Help me choose the right Huawei Cloud capability.",
39
+ "Check my Huawei Cloud CLI setup safely.",
40
+ "Plan this Huawei Cloud API or SDK task."
41
+ ]
42
+ }
43
+ }
@@ -1,44 +1,44 @@
1
1
  {
2
- "interface": {
3
- "displayName": "HuaweiCloud Devkit",
4
- "shortDescription": "HuaweiCloud Devkit - Huawei Cloud guidance, CLI/API/SDK routing, MCP tools, and safety for coding agents.",
5
- "longDescription": "HuaweiCloud Devkit helps coding agents choose and use Huawei Cloud Skills, KooCLI, APIs, SDKs, and MCP tools with less context, safer command execution, and more accurate cloud implementation decisions.",
6
- "developerName": "HuaweiCloud Mate",
7
- "category": "Cloud",
8
- "capabilities": [
9
- "Read",
10
- "Interactive"
11
- ],
12
- "websiteURL": "https://github.com/huaweicloud-mate/huaweicloud-devkit",
13
- "brandColor": "#C7000B",
14
- "defaultPrompt": [
15
- "Help me choose the right Huawei Cloud capability.",
16
- "Check my Huawei Cloud CLI setup safely.",
17
- "Plan this Huawei Cloud API or SDK task."
18
- ]
19
- },
20
- "mcpServers": "./.mcp.json",
21
- "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
22
- "skills": "./skills/",
23
- "version": "0.1.23",
24
- "author": {
25
- "name": "HuaweiCloud Mate",
26
- "url": "https://github.com/huaweicloud-mate"
27
- },
28
- "hooks": "./hooks/",
29
- "name": "huaweicloud-core",
30
- "homepage": "https://github.com/huaweicloud-mate/huaweicloud-devkit",
31
- "repository": "https://github.com/huaweicloud-mate/huaweicloud-devkit",
32
- "license": "Apache-2.0",
33
- "keywords": [
34
- "huaweicloud",
35
- "huawei-cloud",
36
- "koocli",
37
- "hcloud",
38
- "agent",
39
- "mcp",
40
- "api",
41
- "sdk",
42
- "skills"
43
- ]
44
- }
2
+ "interface": {
3
+ "displayName": "HuaweiCloud Devkit",
4
+ "shortDescription": "HuaweiCloud Devkit - Huawei Cloud guidance, CLI/API/SDK routing, MCP tools, and safety for coding agents.",
5
+ "longDescription": "HuaweiCloud Devkit helps coding agents choose and use Huawei Cloud Skills, KooCLI, APIs, SDKs, and MCP tools with less context, safer command execution, and more accurate cloud implementation decisions.",
6
+ "developerName": "HuaweiCloud Mate",
7
+ "category": "Cloud",
8
+ "capabilities": [
9
+ "Read",
10
+ "Interactive"
11
+ ],
12
+ "websiteURL": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
13
+ "brandColor": "#C7000B",
14
+ "defaultPrompt": [
15
+ "Help me choose the right Huawei Cloud capability.",
16
+ "Check my Huawei Cloud CLI setup safely.",
17
+ "Plan this Huawei Cloud API or SDK task."
18
+ ]
19
+ },
20
+ "mcpServers": "./.mcp.json",
21
+ "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
22
+ "skills": "./skills/",
23
+ "version": "1.0.0",
24
+ "author": {
25
+ "name": "HuaweiCloud Mate",
26
+ "url": "https://github.com/huaweicloud"
27
+ },
28
+ "hooks": "./hooks/",
29
+ "name": "huaweicloud-core",
30
+ "homepage": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
31
+ "repository": "https://github.com/huaweicloud/HuaweiCloud-Devkit",
32
+ "license": "Apache-2.0",
33
+ "keywords": [
34
+ "huaweicloud",
35
+ "huawei-cloud",
36
+ "koocli",
37
+ "hcloud",
38
+ "agent",
39
+ "mcp",
40
+ "api",
41
+ "sdk",
42
+ "skills"
43
+ ]
44
+ }
@@ -12,7 +12,7 @@ description: |
12
12
 
13
13
  # Huawei Cloud Agent Skills Search and Discovery
14
14
 
15
- This skill enables users to efficiently search, discover, and install Huawei Cloud skills.
15
+ This skill enables users to efficiently search, discover, and install Huawei Cloud skills.
16
16
 
17
17
  ## Scenario Description
18
18
 
@@ -12,7 +12,7 @@ Always run `hcloud DDS <Operation> --help` or `hcloud DCS <Operation> --help` be
12
12
 
13
13
  ## DDS (Document Database Service — MongoDB Compatible)
14
14
 
15
- ## Critical Warnings
15
+ ## DDS Critical Warnings
16
16
 
17
17
  | Trap | Why |
18
18
  |------|-----|
@@ -35,7 +35,7 @@ Discover exact parameters with `--help` before executing any command.
35
35
 
36
36
  ## DCS (Distributed Cache Service — Redis/Memcached)
37
37
 
38
- ## Critical Warnings
38
+ ## DCS Critical Warnings
39
39
 
40
40
  | Trap | Why |
41
41
  |------|-----|
@@ -59,7 +59,7 @@ hcloud ECS CreateServers ... --server.user_data=$user_data
59
59
  ```
60
60
 
61
61
  > **Security**: Never embed secrets (passwords, AK/SK, tokens) in user_data. It is stored unencrypted and readable from within the instance via IMDS. Fetch secrets at boot from DEW/CSMS instead.
62
-
62
+ >
63
63
  > **Debugging**: If the script didn't run, check `/var/log/cloud-init-output.log` on the instance.
64
64
 
65
65
  ## 7. EIP (two methods)
@@ -81,12 +81,14 @@ hcloud ECS CreateServers \
81
81
  ### Method B: Create and bind separately
82
82
  hcloud EIP CreatePublicip --publicip.type=<type> --bandwidth.size=<size> --bandwidth.share_type=<share-type> --bandwidth.name=<name>
83
83
 
84
+ ```bash
84
85
  # Get the ECS network port ID
85
86
  hcloud ECS ListServersDetails --cli-region=<region> --server_id=<instance-id>
86
87
  # → addresses.<vpc-id>[].OS-EXT-IPS:port_id
87
88
 
88
89
  # Bind EIP via port
89
90
  hcloud EIP AssociatePublicips --publicip_id=<eip-id> --publicip.associate_instance_id=<port-id> --publicip.associate_instance_type=PORT
91
+ ```
90
92
 
91
93
  ## 8. Verify
92
94
  hcloud ECS ListServersDetails --cli-region=<region> --server_id=<instance-id>
@@ -138,5 +138,5 @@ hcloud FunctionGraph DeleteFunctionTrigger --function_urn=<urn> --trigger_type_c
138
138
  ```
139
139
 
140
140
  > Deleting a trigger does NOT cascade-delete the associated APIG API. After `DeleteFunctionTrigger`, also run `hcloud APIG ListApisV2 --instance_id=<id>` and delete orphaned APIs to avoid resource residue.
141
-
141
+ >
142
142
  > **APIG event format**: When using DEDICATEDGATEWAY, the event body is Base64 encoded and uses a non-standard structure. See `apig-event-format.md` for handler templates.
@@ -72,14 +72,14 @@ Agent processes find executables through `PATH`. If OpenCode/Codex cannot find `
72
72
  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.
73
73
  3. Ask the user to configure credentials outside the agent conversation when setup is needed.
74
74
  4. Inspect profile and region only through redacted tooling.
75
- 4. 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`.
76
- 5. Use `--cli-output=json` for machine-readable responses when supported.
77
- 6. For resource operations, include `--cli-region`, `--cli-profile`, and service-specific project information when required.
78
- 7. Classify every command before running it:
75
+ 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`.
76
+ 6. Use `--cli-output=json` for machine-readable responses when supported.
77
+ 7. For resource operations, include `--cli-region`, `--cli-profile`, and service-specific project information when required.
78
+ 8. Classify every command before running it:
79
79
  - Read-only: `List*`, `Show*`, `Get*`, `Describe*`.
80
80
  - Write: `Create*`, `Delete*`, `Update*`, `Resize*`, `Start*`, `Stop*`, `Authorize*`, and similar.
81
81
  - Secret: any operation returning secret string, binary secret, token, or password.
82
- 8. For write operations, show the exact command and ask for explicit approval.
82
+ 9. For write operations, show the exact command and ask for explicit approval.
83
83
 
84
84
  ## KooCLI Syntax Notes
85
85
 
@@ -19,7 +19,7 @@ try {
19
19
  const BANNER = `
20
20
  ╔══════════════════════════════════════════════╗
21
21
  ║ HuaweiCloud DevKit v${pkgVersion}${' '.repeat(Math.max(0, 22 - String(pkgVersion).length))}║
22
- ║ https://github.com/huaweicloud-mate
22
+ ║ https://github.com/huaweicloud ║
23
23
  ╚══════════════════════════════════════════════╝
24
24
  `;
25
25