huaweicloud-devkit 1.1.8-next.1 → 1.1.8-next.3
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 +48 -0
- package/README.zh-CN.md +48 -0
- package/integrations/hermes/skills-snapshot.json +16 -16
- package/integrations/opencode/hooks/skill-tracker.js +83 -10
- package/integrations/opencode/opencode.json +6 -5
- package/package.json +5 -3
- package/plugins/huaweicloud-core/.claude-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.codex-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.hermes-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/openclaw.plugin.json +1 -1
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/SKILL.md +660 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/references/acceptance-criteria.md +71 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/references/cli-installation-guide.md +109 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/references/dataflow-diagram.md +78 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/references/iam-policies.md +93 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/references/verification-method.md +81 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/scripts/cli/cli_entry.py +491 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/scripts/cli/cli_reporting.py +589 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/scripts/ensure_cli.sh +76 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/SKILL.md +438 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/references/acceptance-criteria.md +62 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/references/cli-installation-guide.md +72 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/references/dataflow-diagram.md +55 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/references/iam-policies.md +70 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/references/test-report.md +35 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/references/verification-method.md +60 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/scripts/cli/cli_entry.py +341 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/scripts/cli/cli_reporting.py +928 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/scripts/ensure_cli.sh +76 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/templates/test-defaults.json +84 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/templates/test-vars.json +85 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/SKILL.md +552 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/references/acceptance-criteria.md +56 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/references/cli-installation-guide.md +81 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/references/dataflow-diagram.md +64 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/references/iam-policies.md +132 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/references/related-commands.md +42 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/references/verification-method.md +77 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/scripts/cli/cli_entry.py +341 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/scripts/cli/cli_reporting.py +928 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/scripts/ensure_cli.sh +76 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/SKILL.md +461 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/acceptance-criteria.md +57 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/cli-installation-guide.md +111 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/dataflow-diagram.md +72 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/iam-policies.md +88 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/test-data-guide.md +76 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/test-report.md +52 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/verification-method.md +64 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/scripts/cli/cli_entry.py +341 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/scripts/cli/cli_reporting.py +928 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/scripts/ensure_cli.sh +76 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/templates/test-defaults.json +108 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/templates/test-vars.json +96 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/SKILL.md +395 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/acceptance-criteria.md +60 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/cli-installation-guide.md +87 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/csms-usage.md +106 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/dataflow-diagram.md +60 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/iam-policies.md +105 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/kms-usage.md +72 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/verification-method.md +95 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/scripts/cli/cli_entry.py +388 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/scripts/cli/cli_reporting.py +577 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/scripts/ensure_cli.sh +77 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/templates/test-vars.json +85 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +3 -3
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/SKILL.md +474 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/references/acceptance-criteria.md +47 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/references/cli-installation-guide.md +74 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/references/dataflow-diagram.md +54 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/references/iam-policies.md +83 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/references/verification-method.md +94 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/scripts/cli/cli_entry.py +341 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/scripts/cli/cli_reporting.py +928 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/scripts/ensure_cli.sh +76 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/scripts/gaussdb_cli.sh +138 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/SKILL.md +456 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/acceptance-criteria.md +56 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/cli-installation-guide.md +75 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/dataflow-diagram.md +60 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/engine-operation-reference.md +90 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/iam-policies.md +64 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/security-audit-guide.md +73 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/verification-method.md +84 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/scripts/ensure_cli.sh +193 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/scripts/install_cli.sh +94 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/scripts/smn_dms_skill.py +444 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/SKILL.md +398 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/references/acceptance-criteria.md +46 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/references/cli-installation-guide.md +116 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/references/dataflow-diagram.md +48 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/references/iam-policies.md +83 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/references/related-commands.md +41 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/references/verification-method.md +74 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/scripts/ensure_cli.sh +51 -0
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +3 -3
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +1 -1
- package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +12 -12
- package/plugins/huaweicloud-core/skills/huawei-iac/SKILL.md +1 -1
- package/plugins/huaweicloud-core/skills/huawei-iac/references/resource-catalog.md +20 -20
- package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +1 -1
- package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +1 -1
- package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +3 -3
- package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +26 -22
- package/plugins/huaweicloud-core/skills/huawei-voucher/SKILL.md +39 -7
- package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +1 -1
- package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +49 -48
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +6 -6
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +3 -3
- package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +2 -1
- package/plugins/huaweicloud-core/src/mcp-config-merge.mjs +82 -18
- package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +14 -0
- package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +119 -18
- package/plugins/huaweicloud-core/src/setup-cli.mjs +108 -25
- package/plugins/huaweicloud-core/src/tools.mjs +31 -10
- package/rules/huawei-agent-rules.mdc +1 -1
- package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +0 -168
- package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +0 -55
- package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +0 -70
- package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +0 -62
- package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +0 -105
- package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +0 -37
- package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +0 -29
- package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +0 -56
- package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +0 -76
- package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +0 -66
package/README.md
CHANGED
|
@@ -344,6 +344,54 @@ Configures HTTP/HTTPS proxy for connections to Huawei Cloud services (e.g. enter
|
|
|
344
344
|
|
|
345
345
|
Environment variables `HTTPS_PROXY`, `HTTP_PROXY`, and `NO_PROXY` take precedence over the file configuration — use `proxy show` to inspect the effective settings.
|
|
346
346
|
|
|
347
|
+
## Telemetry
|
|
348
|
+
|
|
349
|
+
HuaweiCloud DevKit collects **anonymous** telemetry to understand usage patterns and improve the plugin. Telemetry is **enabled by default**.
|
|
350
|
+
|
|
351
|
+
### What We Collect
|
|
352
|
+
|
|
353
|
+
- **Installation ID** — a SHA-256 hash derived from a machine fingerprint (hostname + MAC address + OS type + home directory). The raw values are never sent or stored.
|
|
354
|
+
- **User hash** — a server-generated user identifier hash (produced by the Huawei Cloud backend `check-user` / `generatorUserIDHash` API). It is cached locally and sent with every event; it is not derived from any local PII.
|
|
355
|
+
- **Plugin version** — the installed `huaweicloud-devkit` version.
|
|
356
|
+
- **Agent harness** — which AI coding agent is running (e.g. `opencode`, `codex`, `codearts`).
|
|
357
|
+
- **Agent version** — the agent's version string.
|
|
358
|
+
- **OS type and version** — e.g. `Linux`, `Darwin`, `Windows_NT`.
|
|
359
|
+
- **Capability** — how the event was triggered: `mcp` (MCP tool invocation) or `cli` (CLI command), derived from the event key.
|
|
360
|
+
- **Event type** — what happened, e.g. `plugin:install`, `plugin:first_use`, `dau:active_today` (daily active), `tool:<tool_name>`, `skill:retrieve`, `sandbox:connect`.
|
|
361
|
+
- **Event value** — a short sanitized string (max 255 chars, newlines/tabs stripped). For tool events this is typically `1`; for skill retrieval it is the skill name.
|
|
362
|
+
|
|
363
|
+
### What We Do **Not** Collect
|
|
364
|
+
|
|
365
|
+
- No AK/SK, access keys, or any credentials
|
|
366
|
+
- No user input, prompts, or code content
|
|
367
|
+
- No IP addresses
|
|
368
|
+
- No personally identifiable information (PII)
|
|
369
|
+
- No file paths or project names
|
|
370
|
+
|
|
371
|
+
### How Data Is Transmitted
|
|
372
|
+
|
|
373
|
+
Events are queued in memory and sent in batches (up to 100 events per batch) via HTTP POST to Huawei Cloud's telemetry endpoint every 60 seconds. Transmission respects your proxy configuration. Failed requests are retried up to 3 times, then dropped.
|
|
374
|
+
|
|
375
|
+
### Disable Telemetry (Opt-Out)
|
|
376
|
+
|
|
377
|
+
Set the environment variable:
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
export HUAWEICLOUD_DEVKIT_TELEMETRY=off
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
When set to `off`, no telemetry events are collected or transmitted.
|
|
384
|
+
|
|
385
|
+
### Debug Mode
|
|
386
|
+
|
|
387
|
+
To log telemetry activity for troubleshooting:
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
export HUAWEICLOUD_DEVKIT_DEBUG=true
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
Debug logs are written to the plugin's `telemetry/telemetry-debug.log` file.
|
|
394
|
+
|
|
347
395
|
## What It Does
|
|
348
396
|
|
|
349
397
|
- **Guided cloud operations** — agents get step-by-step guidance for 20+ commonly used Huawei Cloud services (ECS, OBS, VPC, RDS, GaussDB, FunctionGraph, APIG, CCE, and more)
|
package/README.zh-CN.md
CHANGED
|
@@ -338,6 +338,54 @@ npx --yes huaweicloud-devkit proxy clear # 删除代理配置
|
|
|
338
338
|
|
|
339
339
|
环境变量 `HTTPS_PROXY`、`HTTP_PROXY`、`NO_PROXY` 优先级高于文件配置——可使用 `proxy show` 查看最终生效的设置。
|
|
340
340
|
|
|
341
|
+
## 遥测
|
|
342
|
+
|
|
343
|
+
HuaweiCloud DevKit 收集**匿名**遥测数据,以了解使用模式并改进插件。遥测**默认开启**。
|
|
344
|
+
|
|
345
|
+
### 收集哪些数据
|
|
346
|
+
|
|
347
|
+
- **安装 ID** — 基于机器指纹(主机名 + MAC 地址 + OS 类型 + home 目录)生成的 SHA-256 哈希。原始值不会被发送或存储。
|
|
348
|
+
- **用户哈希** — 服务端生成的用户标识哈希(由华为云后端 `check-user` / `generatorUserIDHash` API 生成)。本地缓存后随每次事件发送,非本地 PII 派生。
|
|
349
|
+
- **插件版本** — 已安装的 `huaweicloud-devkit` 版本。
|
|
350
|
+
- **Agent harness** — 正在运行的 AI 编码助手(如 `opencode`、`codex`、`codearts`)。
|
|
351
|
+
- **Agent 版本** — Agent 版本号。
|
|
352
|
+
- **OS 类型和版本** — 如 `Linux`、`Darwin`、`Windows_NT`。
|
|
353
|
+
- **Capability** — 事件触发方式:`mcp`(MCP 工具调用)或 `cli`(CLI 命令),由事件 key 派生。
|
|
354
|
+
- **事件类型** — 发生了什么,如 `plugin:install`(安装)、`plugin:first_use`(首次使用)、`dau:active_today`(日活)、`tool:<工具名>`(工具调用)、`skill:retrieve`(技能加载)、`sandbox:connect`(沙箱连接)。
|
|
355
|
+
- **事件值** — 简短的脱敏字符串(最长 255 字符,换行符/制表符已清除)。工具事件通常为 `1`;技能加载事件为技能名称。
|
|
356
|
+
|
|
357
|
+
### **不**收集哪些数据
|
|
358
|
+
|
|
359
|
+
- 不收集 AK/SK、访问密钥或任何凭据
|
|
360
|
+
- 不收集用户输入、提示词或代码内容
|
|
361
|
+
- 不收集 IP 地址
|
|
362
|
+
- 不收集个人可识别信息(PII)
|
|
363
|
+
- 不收集文件路径或项目名称
|
|
364
|
+
|
|
365
|
+
### 数据如何传输
|
|
366
|
+
|
|
367
|
+
事件先在内存中排队,然后每 60 秒批量(每批最多 100 条)通过 HTTP POST 发送到华为云遥测端点。传输过程遵循你的代理配置。发送失败最多重试 3 次后丢弃。
|
|
368
|
+
|
|
369
|
+
### 禁用遥测(Opt-Out)
|
|
370
|
+
|
|
371
|
+
设置环境变量:
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
export HUAWEICLOUD_DEVKIT_TELEMETRY=off
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
设置为 `off` 后,不会收集或传输任何遥测事件。
|
|
378
|
+
|
|
379
|
+
### 调试模式
|
|
380
|
+
|
|
381
|
+
如需记录遥测活动以供排查:
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
export HUAWEICLOUD_DEVKIT_DEBUG=true
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
调试日志写入插件的 `telemetry/telemetry-debug.log` 文件。
|
|
388
|
+
|
|
341
389
|
## 功能特性
|
|
342
390
|
|
|
343
391
|
- **引导式云操作** — Agent 获得 20+ 常用华为云服务的分步操作指引(ECS、OBS、VPC、RDS、GaussDB、FunctionGraph、APIG、CCE 等)
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"exported_at": "2026-09-07T00:00:00Z",
|
|
4
4
|
"skills": [
|
|
5
5
|
{
|
|
6
|
-
"name": "huawei-apig",
|
|
6
|
+
"name": "huawei-cloud-apig-instance-management",
|
|
7
7
|
"source": "official",
|
|
8
|
-
"identifier": "official/huaweicloud/huawei-apig",
|
|
8
|
+
"identifier": "official/huaweicloud/huawei-cloud-apig-instance-management",
|
|
9
9
|
"category": "huaweicloud"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
@@ -39,27 +39,27 @@
|
|
|
39
39
|
"category": "huaweicloud"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
"name": "huawei-cts",
|
|
42
|
+
"name": "huawei-cloud-cts-trace-management",
|
|
43
43
|
"source": "official",
|
|
44
|
-
"identifier": "official/huaweicloud/huawei-cts",
|
|
44
|
+
"identifier": "official/huaweicloud/huawei-cloud-cts-trace-management",
|
|
45
45
|
"category": "huaweicloud"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
|
-
"name": "huawei-dds-dcs",
|
|
48
|
+
"name": "huawei-cloud-dds-dcs-instance-management",
|
|
49
49
|
"source": "official",
|
|
50
|
-
"identifier": "official/huaweicloud/huawei-dds-dcs",
|
|
50
|
+
"identifier": "official/huaweicloud/huawei-cloud-dds-dcs-instance-management",
|
|
51
51
|
"category": "huaweicloud"
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
"name": "huawei-deployment",
|
|
54
|
+
"name": "huawei-cloud-deployment-task-management",
|
|
55
55
|
"source": "official",
|
|
56
|
-
"identifier": "official/huaweicloud/huawei-deployment",
|
|
56
|
+
"identifier": "official/huaweicloud/huawei-cloud-deployment-task-management",
|
|
57
57
|
"category": "huaweicloud"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
"name": "huawei-dew",
|
|
60
|
+
"name": "huawei-cloud-dew-key-management",
|
|
61
61
|
"source": "official",
|
|
62
|
-
"identifier": "official/huaweicloud/huawei-dew",
|
|
62
|
+
"identifier": "official/huaweicloud/huawei-cloud-dew-key-management",
|
|
63
63
|
"category": "huaweicloud"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"category": "huaweicloud"
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
|
-
"name": "huawei-gaussdb",
|
|
78
|
+
"name": "huawei-cloud-gaussdb-instance-management",
|
|
79
79
|
"source": "official",
|
|
80
|
-
"identifier": "official/huaweicloud/huawei-gaussdb",
|
|
80
|
+
"identifier": "official/huaweicloud/huawei-cloud-gaussdb-instance-management",
|
|
81
81
|
"category": "huaweicloud"
|
|
82
82
|
},
|
|
83
83
|
{
|
|
@@ -117,9 +117,9 @@
|
|
|
117
117
|
"category": "huaweicloud"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
|
-
"name": "huawei-smn-dms",
|
|
120
|
+
"name": "huawei-cloud-smn-dms-message",
|
|
121
121
|
"source": "official",
|
|
122
|
-
"identifier": "official/huaweicloud/huawei-smn-dms",
|
|
122
|
+
"identifier": "official/huaweicloud/huawei-cloud-smn-dms-message",
|
|
123
123
|
"category": "huaweicloud"
|
|
124
124
|
},
|
|
125
125
|
{
|
|
@@ -129,9 +129,9 @@
|
|
|
129
129
|
"category": "huaweicloud"
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
|
-
"name": "huawei-waf-aad",
|
|
132
|
+
"name": "huawei-cloud-waf-aad-rule-management",
|
|
133
133
|
"source": "official",
|
|
134
|
-
"identifier": "official/huaweicloud/huawei-waf-aad",
|
|
134
|
+
"identifier": "official/huaweicloud/huawei-cloud-waf-aad-rule-management",
|
|
135
135
|
"category": "huaweicloud"
|
|
136
136
|
},
|
|
137
137
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { appendFileSync, mkdirSync, existsSync } from 'node:fs';
|
|
2
2
|
import { join, dirname } from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { createRequire } from 'node:module';
|
|
4
5
|
|
|
5
6
|
const DEBUG = process.env.HUAWEICLOUD_DEVKIT_DEBUG === 'true';
|
|
6
7
|
|
|
@@ -98,19 +99,91 @@ function getHooks() {
|
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
101
|
|
|
101
|
-
// ──
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
102
|
+
// ── V2 setup: register hooks on their owning domains via the context. ──────
|
|
103
|
+
// `tool.execute.before` → ctx.tool.hook("execute.before", ...) whose single
|
|
104
|
+
// event carries `.tool` (name) and `.input` (args), replacing V1's (input, output).
|
|
105
|
+
// `event` → ctx.event.subscribe(AsyncIterable of { type, properties }).
|
|
106
|
+
async function setupV2(ctx) {
|
|
107
|
+
await ctx.tool.hook('execute.before', (event) => {
|
|
108
|
+
try {
|
|
109
|
+
debugLog(`HOOK tool.execute.before tool=${event?.tool}`);
|
|
110
|
+
if (event?.tool === 'skill') {
|
|
111
|
+
const name = event?.input?.name ?? event?.args?.name;
|
|
112
|
+
debugLog(`SKILL name=${name}`);
|
|
113
|
+
if (isHuaweiCloudSkill(name)) {
|
|
114
|
+
writeEvent('skill:retrieve', name);
|
|
115
|
+
debugLog(`SKILL TRACKED: ${name}`);
|
|
116
|
+
}
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (event?.tool === 'bash') {
|
|
120
|
+
const cmd = event?.input?.command ?? event?.args?.command ?? '';
|
|
121
|
+
if (!cmd) return;
|
|
122
|
+
const result = classifyHcloud(cmd);
|
|
123
|
+
if (result) writeEvent(result.key, result.value, { capability: 'cli' });
|
|
124
|
+
}
|
|
125
|
+
} catch (error) {
|
|
126
|
+
debugLog(`HOOK ERROR: ${error?.message || error}`);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
105
129
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
130
|
+
const controller = new AbortController();
|
|
131
|
+
void (async () => {
|
|
132
|
+
try {
|
|
133
|
+
for await (const event of ctx.event.subscribe({ signal: controller.signal })) {
|
|
134
|
+
if (event?.type === 'message.part.updated') {
|
|
135
|
+
const text = event?.properties?.part?.text;
|
|
136
|
+
if (typeof text === 'string') {
|
|
137
|
+
const m = text.match(/Base directory for this skill:\s*.*?skills[/\\]([a-z0-9-]+)/i);
|
|
138
|
+
if (m && isHuaweiCloudSkill(m[1])) writeEvent('skill:retrieve', m[1]);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
} catch (error) {
|
|
143
|
+
debugLog(`EVENT ERROR: ${error?.message || error}`);
|
|
144
|
+
}
|
|
145
|
+
})();
|
|
146
|
+
|
|
147
|
+
return () => controller.abort();
|
|
109
148
|
}
|
|
110
149
|
|
|
111
|
-
|
|
112
|
-
|
|
150
|
+
// ── Dual export: one default object serves OpenCode V1 and V2 ───────────────
|
|
151
|
+
// V1 loader reads `server()` (returns legacy string-keyed hooks).
|
|
152
|
+
// V2 loader reads `id` + `setup(ctx)` (registers hooks on the context domains).
|
|
153
|
+
// `Plugin.define` is a type/runtime helper injected lazily so a V1 host that
|
|
154
|
+
// lacks `@opencode/plugin` still loads (fallback to an identity define).
|
|
155
|
+
let Plugin = { define: (def) => def };
|
|
156
|
+
try {
|
|
157
|
+
const require = createRequire(import.meta.url);
|
|
158
|
+
for (const pkg of ['@opencode/plugin', '@opencode-ai/plugin']) {
|
|
159
|
+
try {
|
|
160
|
+
const mod = require(pkg);
|
|
161
|
+
if (mod?.Plugin?.define) {
|
|
162
|
+
Plugin = mod.Plugin;
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
if (typeof mod?.define === 'function') {
|
|
166
|
+
Plugin = mod;
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
} catch {
|
|
170
|
+
// not installed in this host; keep the identity define
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
} catch {
|
|
174
|
+
// createRequire unavailable; keep the identity define
|
|
175
|
+
}
|
|
113
176
|
|
|
114
|
-
export default
|
|
177
|
+
export default {
|
|
178
|
+
...Plugin.define({
|
|
179
|
+
id: 'huaweicloud-skill-tracker',
|
|
180
|
+
async setup(ctx) {
|
|
181
|
+
return setupV2(ctx);
|
|
182
|
+
},
|
|
183
|
+
}),
|
|
184
|
+
async server() {
|
|
185
|
+
return getHooks();
|
|
186
|
+
},
|
|
187
|
+
};
|
|
115
188
|
|
|
116
189
|
debugLog('=== PLUGIN INIT DONE ===');
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://opencode.ai/config.json",
|
|
3
|
-
"_note": "Merge this into ~/.config/opencode/opencode.jsonc. Replace the path with the absolute path to your mcp-server.mjs installation.",
|
|
3
|
+
"_note": "Merge this into ~/.config/opencode/opencode.jsonc (OpenCode 2.x). Replace the path with the absolute path to your mcp-server.mjs installation. For OpenCode 1.x, place the same entry directly under \"mcp\" (without the \"servers\" level) and add \"enabled\": true.",
|
|
4
4
|
"mcp": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
"servers": {
|
|
6
|
+
"huaweicloud-devkit": {
|
|
7
|
+
"type": "local",
|
|
8
|
+
"command": ["node", "<绝对路径>/plugins/huaweicloud-core/src/mcp-server.mjs"]
|
|
9
|
+
}
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
12
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
3
|
"mcpName": "io.github.huaweicloud/huaweicloud-devkit",
|
|
4
|
-
"version": "1.1.8-next.
|
|
4
|
+
"version": "1.1.8-next.3",
|
|
5
5
|
"kooCliVersion": "7.2.12",
|
|
6
6
|
"description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
|
|
7
7
|
"type": "module",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"postinstall": "node ./bin/dsh-postinstall.cjs"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"undici": "^8.
|
|
46
|
+
"undici": "^8.11.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@eslint/js": "^10.0.1",
|
|
@@ -57,7 +57,9 @@
|
|
|
57
57
|
"prettier": "^3.9.6"
|
|
58
58
|
},
|
|
59
59
|
"overrides": {
|
|
60
|
-
"smol-toml": "1.
|
|
60
|
+
"smol-toml": "^1.9.0",
|
|
61
|
+
"brace-expansion": "5.0.12",
|
|
62
|
+
"katex": "^0.19.0"
|
|
61
63
|
},
|
|
62
64
|
"keywords": [
|
|
63
65
|
"huaweicloud",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"mcpServers": "./.mcp.json",
|
|
18
18
|
"description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
|
|
19
19
|
"skills": "./skills/",
|
|
20
|
-
"version": "1.1.8-next.
|
|
20
|
+
"version": "1.1.8-next.3",
|
|
21
21
|
"author": {
|
|
22
22
|
"name": "HuaweiCloud Mate",
|
|
23
23
|
"url": "https://github.com/huaweicloud"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"mcpServers": "./.mcp.json",
|
|
21
21
|
"description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
|
|
22
22
|
"skills": "./skills/",
|
|
23
|
-
"version": "1.1.8-next.
|
|
23
|
+
"version": "1.1.8-next.3",
|
|
24
24
|
"author": {
|
|
25
25
|
"name": "HuaweiCloud Mate",
|
|
26
26
|
"url": "https://github.com/huaweicloud"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"mcpServers": "./.mcp.json",
|
|
18
18
|
"description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
|
|
19
19
|
"skills": "./skills/",
|
|
20
|
-
"version": "1.1.8-next.
|
|
20
|
+
"version": "1.1.8-next.3",
|
|
21
21
|
"author": {
|
|
22
22
|
"name": "HuaweiCloud Mate",
|
|
23
23
|
"url": "https://github.com/huaweicloud"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
|
-
"version": "1.1.8-next.
|
|
3
|
+
"version": "1.1.8-next.3",
|
|
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
|
-
"version": "1.1.8-next.
|
|
3
|
+
"version": "1.1.8-next.3",
|
|
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",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
3
|
"id": "huaweicloud-devkit",
|
|
4
4
|
"displayName": "HuaweiCloud DevKit",
|
|
5
|
-
"version": "1.1.8-next.
|
|
5
|
+
"version": "1.1.8-next.3",
|
|
6
6
|
"family": "bundle-plugin",
|
|
7
7
|
"bundleFormat": "codex",
|
|
8
8
|
"description": "Guide coding agents to use Huawei Cloud safely — KooCLI, APIs, SDKs, 28 MCP tools, skills, and safety guardrails.",
|