huaweicloud-devkit 1.1.14-next.0 → 2.0.0-next.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 +16 -5
- package/README.zh-CN.md +16 -5
- package/bin/dsh-postinstall.cjs +171 -31
- package/bin/setup.cjs +1 -1
- package/cordis.patch.yml +1 -1
- package/integrations/atomcode/hooks/huaweicloud-telemetry.js +29 -33
- package/integrations/dsh/hook-plugin.d.mts +19 -0
- package/integrations/dsh/hook-plugin.mjs +23 -22
- package/integrations/hermes/hooks/huaweicloud-telemetry.py +26 -43
- package/integrations/hermes/manifest.yaml +35 -10
- package/integrations/opencode/commands/huaweicloud-doctor.md +3 -2
- package/integrations/opencode/hooks/skill-tracker.js +70 -89
- package/integrations/opencode/opencode.json +5 -6
- package/integrations/workbuddy/hooks/telemetry-tracker.py +27 -45
- package/package.json +32 -11
- package/plugins/huaweicloud-core/.claude-plugin/plugin.json +1 -2
- package/plugins/huaweicloud-core/.codex-plugin/plugin.json +1 -2
- package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +1 -2
- package/plugins/huaweicloud-core/.hermes-plugin/plugin.json +1 -2
- package/plugins/huaweicloud-core/.mcp.json +1 -1
- package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +1 -2
- package/plugins/huaweicloud-core/dist/agents/atomcode.js +118 -0
- package/plugins/huaweicloud-core/dist/agents/codearts-work.js +121 -0
- package/plugins/huaweicloud-core/dist/agents/codearts.js +69 -0
- package/plugins/huaweicloud-core/dist/agents/codex-desktop.js +193 -0
- package/plugins/huaweicloud-core/dist/agents/codex.js +205 -0
- package/plugins/huaweicloud-core/dist/agents/dsh-patch.js +172 -0
- package/plugins/huaweicloud-core/dist/agents/dsh.js +129 -0
- package/plugins/huaweicloud-core/dist/agents/hermes-config.js +976 -0
- package/plugins/huaweicloud-core/dist/agents/hermes-hook-plugin.js +90 -0
- package/plugins/huaweicloud-core/dist/agents/hermes-hooks.js +166 -0
- package/plugins/huaweicloud-core/dist/agents/hermes-sdk.js +58 -0
- package/plugins/huaweicloud-core/dist/agents/hermes.js +150 -0
- package/plugins/huaweicloud-core/dist/agents/officeace-registry.js +179 -0
- package/plugins/huaweicloud-core/dist/agents/officeace-sqlite.js +132 -0
- package/plugins/huaweicloud-core/dist/agents/officeace.js +173 -0
- package/plugins/huaweicloud-core/dist/agents/openclaw.js +54 -0
- package/plugins/huaweicloud-core/dist/agents/opencode-config.js +188 -0
- package/plugins/huaweicloud-core/dist/agents/opencode.js +112 -0
- package/plugins/huaweicloud-core/dist/agents/workbuddy.js +194 -0
- package/plugins/huaweicloud-core/dist/auth/account-type.js +136 -0
- package/plugins/huaweicloud-core/dist/auth/agent-registration.js +243 -0
- package/plugins/huaweicloud-core/dist/auth/cli.js +114 -0
- package/plugins/huaweicloud-core/dist/auth/codearts-context.js +131 -0
- package/plugins/huaweicloud-core/dist/auth/credential-placeholder.js +41 -0
- package/plugins/huaweicloud-core/dist/auth/credential-resolver.js +74 -0
- package/plugins/huaweicloud-core/dist/auth/credential-validator.js +139 -0
- package/plugins/huaweicloud-core/dist/auth/credentials.js +20 -0
- package/plugins/huaweicloud-core/dist/auth/error-table.js +123 -0
- package/plugins/huaweicloud-core/dist/auth/hcloud-profile.js +89 -0
- package/plugins/huaweicloud-core/dist/auth/init-cli.js +139 -0
- package/plugins/huaweicloud-core/dist/auth/missing-credential-error.js +33 -0
- package/plugins/huaweicloud-core/dist/auth/obs-config.js +31 -0
- package/plugins/huaweicloud-core/dist/auth/project-id.js +90 -0
- package/plugins/huaweicloud-core/dist/auth/reconcile.js +256 -0
- package/plugins/huaweicloud-core/dist/auth/runtime-credentials.js +32 -0
- package/plugins/huaweicloud-core/dist/auth/s1-store.js +171 -0
- package/plugins/huaweicloud-core/dist/auth/service.js +397 -0
- package/plugins/huaweicloud-core/dist/auth/sts-expiry.js +58 -0
- package/plugins/huaweicloud-core/dist/capability-catalog.js +494 -0
- package/plugins/huaweicloud-core/dist/codearts-sandbox.js +32 -0
- package/plugins/huaweicloud-core/dist/codex-probe.js +77 -0
- package/plugins/huaweicloud-core/dist/data/icons-manifest.v1.json +3517 -0
- package/plugins/huaweicloud-core/dist/dep/installers/gateway.js +186 -0
- package/plugins/huaweicloud-core/dist/dep/installers/hcloud.js +370 -0
- package/plugins/huaweicloud-core/dist/dep/installers/table.js +28 -0
- package/plugins/huaweicloud-core/dist/dep/provision.js +247 -0
- package/plugins/huaweicloud-core/dist/dep/receipts.js +385 -0
- package/plugins/huaweicloud-core/dist/detect-framework-match.js +111 -0
- package/plugins/huaweicloud-core/dist/detect-framework-pkg.js +85 -0
- package/plugins/huaweicloud-core/dist/detect-framework-scan.js +93 -0
- package/plugins/huaweicloud-core/dist/detect-framework-table.js +153 -0
- package/plugins/huaweicloud-core/dist/detect-framework.js +7 -0
- package/plugins/huaweicloud-core/dist/doctor-native.js +167 -0
- package/plugins/huaweicloud-core/dist/doctor-payload.js +34 -0
- package/plugins/huaweicloud-core/dist/doctor-report.js +8 -0
- package/plugins/huaweicloud-core/dist/explain-error.js +209 -0
- package/plugins/huaweicloud-core/dist/hcloud-api-error.js +64 -0
- package/plugins/huaweicloud-core/dist/hcloud-catalog.js +91 -0
- package/plugins/huaweicloud-core/dist/hcloud-cli.js +24 -0
- package/plugins/huaweicloud-core/dist/hcloud-obs-redact.js +68 -0
- package/plugins/huaweicloud-core/dist/hcloud-plan.js +298 -0
- package/plugins/huaweicloud-core/dist/hcloud-probe.js +153 -0
- package/plugins/huaweicloud-core/dist/hcloud-run-once.js +245 -0
- package/plugins/huaweicloud-core/dist/hcloud-run.js +107 -0
- package/plugins/huaweicloud-core/dist/hcloud-sg-preflight.js +104 -0
- package/plugins/huaweicloud-core/dist/hcloud-sts.js +113 -0
- package/plugins/huaweicloud-core/dist/hcloud-triage.js +71 -0
- package/plugins/huaweicloud-core/dist/icon-library.js +216 -0
- package/plugins/huaweicloud-core/dist/install-payload.js +35 -0
- package/plugins/huaweicloud-core/dist/install-plan.js +85 -0
- package/plugins/huaweicloud-core/dist/install-prompts.js +119 -0
- package/plugins/huaweicloud-core/dist/koocli-version.js +83 -0
- package/plugins/huaweicloud-core/dist/lib/approval-tokens.js +234 -0
- package/plugins/huaweicloud-core/dist/lib/as-record.js +10 -0
- package/plugins/huaweicloud-core/dist/lib/as-text.js +15 -0
- package/plugins/huaweicloud-core/dist/lib/banner.js +10 -0
- package/plugins/huaweicloud-core/dist/lib/call-trace.js +128 -0
- package/plugins/huaweicloud-core/dist/lib/cli-io.js +72 -0
- package/plugins/huaweicloud-core/dist/lib/credentials.js +173 -0
- package/plugins/huaweicloud-core/dist/lib/dep-resolve.js +64 -0
- package/plugins/huaweicloud-core/dist/lib/dependency-model.js +152 -0
- package/plugins/huaweicloud-core/dist/lib/hdkit/hdkitservice-api.js +217 -0
- package/plugins/huaweicloud-core/dist/lib/hdkit/hwlink-api.js +163 -0
- package/plugins/huaweicloud-core/dist/lib/hdkit/sandbox-pool.js +303 -0
- package/plugins/huaweicloud-core/dist/lib/hw-request-signing.js +57 -0
- package/plugins/huaweicloud-core/dist/lib/koocli-paths.js +18 -0
- package/plugins/huaweicloud-core/dist/lib/native-receipt.js +110 -0
- package/plugins/huaweicloud-core/dist/lib/opencode-permission-seam.js +132 -0
- package/plugins/huaweicloud-core/dist/lib/pack-state.js +179 -0
- package/plugins/huaweicloud-core/dist/lib/pack-types.js +21 -0
- package/plugins/huaweicloud-core/dist/lib/secret-vault/cli.js +273 -0
- package/plugins/huaweicloud-core/dist/lib/secret-vault/custody.js +396 -0
- package/plugins/huaweicloud-core/dist/lib/secret-vault/refs.js +63 -0
- package/plugins/huaweicloud-core/dist/lib/secret-vault/store.js +236 -0
- package/plugins/huaweicloud-core/dist/lib/skill-frontmatter.js +158 -0
- package/plugins/huaweicloud-core/dist/lib/skill-manifest.js +55 -0
- package/plugins/huaweicloud-core/dist/lib/skill-tree.js +44 -0
- package/plugins/huaweicloud-core/dist/lib/tool-schema-parts.js +66 -0
- package/plugins/huaweicloud-core/dist/mcp-agent-config.js +80 -0
- package/plugins/huaweicloud-core/dist/mcp-config-backup.js +74 -0
- package/plugins/huaweicloud-core/dist/mcp-config-io.js +195 -0
- package/plugins/huaweicloud-core/dist/mcp-config-merge.js +188 -0
- package/plugins/huaweicloud-core/dist/mcp-protocol.js +320 -0
- package/plugins/huaweicloud-core/dist/mcp-server.js +62136 -0
- package/plugins/huaweicloud-core/dist/mcp-server.js.map +7 -0
- package/plugins/huaweicloud-core/dist/mcp-stdio-transport.js +206 -0
- package/plugins/huaweicloud-core/dist/officeace-paths.js +142 -0
- package/plugins/huaweicloud-core/dist/packs/auth/pack.js +11 -0
- package/plugins/huaweicloud-core/dist/packs/auth/tools.js +276 -0
- package/plugins/huaweicloud-core/dist/packs/discovery/pack.js +11 -0
- package/plugins/huaweicloud-core/dist/packs/discovery/tools.js +78 -0
- package/plugins/huaweicloud-core/dist/packs/enable.js +81 -0
- package/plugins/huaweicloud-core/dist/packs/huaweicloud-cli/pack.js +39 -0
- package/plugins/huaweicloud-core/dist/packs/huaweicloud-cli/tools.js +435 -0
- package/plugins/huaweicloud-core/dist/packs/huaweicloud-open-mcp/approval.js +222 -0
- package/plugins/huaweicloud-core/dist/packs/huaweicloud-open-mcp/pack.js +17 -0
- package/plugins/huaweicloud-core/dist/packs/huaweicloud-open-mcp/sidecar.js +486 -0
- package/plugins/huaweicloud-core/dist/packs/huaweicloud-open-mcp/tools.js +134 -0
- package/plugins/huaweicloud-core/dist/packs/obs/pack.js +11 -0
- package/plugins/huaweicloud-core/dist/packs/obs/tools.js +425 -0
- package/plugins/huaweicloud-core/dist/packs/registry.js +143 -0
- package/plugins/huaweicloud-core/dist/packs/sandbox/git-transfer.js +79 -0
- package/plugins/huaweicloud-core/dist/packs/sandbox/handlers-account.js +80 -0
- package/plugins/huaweicloud-core/dist/packs/sandbox/handlers-credentials.js +138 -0
- package/plugins/huaweicloud-core/dist/packs/sandbox/handlers-deploy.js +45 -0
- package/plugins/huaweicloud-core/dist/packs/sandbox/handlers-session.js +48 -0
- package/plugins/huaweicloud-core/dist/packs/sandbox/handlers-tunnel.js +59 -0
- package/plugins/huaweicloud-core/dist/packs/sandbox/handlers-upload.js +34 -0
- package/plugins/huaweicloud-core/dist/packs/sandbox/pack.js +14 -0
- package/plugins/huaweicloud-core/dist/packs/sandbox/schemas.js +191 -0
- package/plugins/huaweicloud-core/dist/packs/sandbox/tools.js +146 -0
- package/plugins/huaweicloud-core/dist/packs/secrets/pack.js +8 -0
- package/plugins/huaweicloud-core/dist/packs/secrets/tools.js +126 -0
- package/plugins/huaweicloud-core/dist/packs/update/pack.js +11 -0
- package/plugins/huaweicloud-core/dist/packs/update/tools.js +82 -0
- package/plugins/huaweicloud-core/dist/packs/voucher/pack.js +11 -0
- package/plugins/huaweicloud-core/dist/packs/voucher/tools.js +91 -0
- package/plugins/huaweicloud-core/dist/packs-cli/commands.js +108 -0
- package/plugins/huaweicloud-core/dist/packs-cli/doctor.js +81 -0
- package/plugins/huaweicloud-core/dist/packs-cli/report.js +133 -0
- package/plugins/huaweicloud-core/dist/packs-cli/slots.js +104 -0
- package/plugins/huaweicloud-core/dist/packs-cli/write-command.js +108 -0
- package/plugins/huaweicloud-core/dist/packs-cli/writers.js +115 -0
- package/plugins/huaweicloud-core/dist/packs-configure.js +81 -0
- package/plugins/huaweicloud-core/dist/packs-policy.js +149 -0
- package/plugins/huaweicloud-core/dist/payload-files.js +78 -0
- package/plugins/huaweicloud-core/dist/payload-native-clean.js +142 -0
- package/plugins/huaweicloud-core/dist/payload-native-sync.js +89 -0
- package/plugins/huaweicloud-core/dist/payload-placement.js +94 -0
- package/plugins/huaweicloud-core/dist/payload-roster.js +80 -0
- package/plugins/huaweicloud-core/dist/payload-runtime-deps.js +67 -0
- package/plugins/huaweicloud-core/dist/payload-status.js +43 -0
- package/plugins/huaweicloud-core/dist/payload-utils.js +42 -0
- package/plugins/huaweicloud-core/dist/preflight.js +232 -0
- package/plugins/huaweicloud-core/dist/proxy/cli.js +83 -0
- package/plugins/huaweicloud-core/dist/proxy/proxy-agent.js +92 -0
- package/plugins/huaweicloud-core/dist/proxy/proxy-bypass.js +83 -0
- package/plugins/huaweicloud-core/dist/proxy/proxy-cidr.js +105 -0
- package/plugins/huaweicloud-core/dist/proxy/proxy-config-io.js +61 -0
- package/plugins/huaweicloud-core/dist/proxy/proxy-config.js +10 -0
- package/plugins/huaweicloud-core/dist/risk-rule-engine.js +229 -0
- package/plugins/huaweicloud-core/dist/safety/classify-hcloud.js +191 -0
- package/plugins/huaweicloud-core/dist/safety/classify-text.js +1032 -0
- package/plugins/huaweicloud-core/dist/safety/command-operation.js +25 -0
- package/plugins/huaweicloud-core/dist/safety/credential-path.js +23 -0
- package/plugins/huaweicloud-core/dist/safety/default-policy.js +28 -0
- package/plugins/huaweicloud-core/dist/safety/feeder.js +119 -0
- package/plugins/huaweicloud-core/dist/safety/heredoc.js +95 -0
- package/plugins/huaweicloud-core/dist/safety/policy.js +75 -0
- package/plugins/huaweicloud-core/dist/safety/redact.js +42 -0
- package/plugins/huaweicloud-core/dist/safety/risk-merge.js +22 -0
- package/plugins/huaweicloud-core/dist/safety/script-stream.js +90 -0
- package/plugins/huaweicloud-core/dist/safety/secret-exec.js +44 -0
- package/plugins/huaweicloud-core/dist/safety/segments.js +138 -0
- package/plugins/huaweicloud-core/dist/safety/shell-text.js +414 -0
- package/plugins/huaweicloud-core/dist/safety/skill-quality-cli.js +152 -0
- package/plugins/huaweicloud-core/dist/safety/tokens.js +297 -0
- package/plugins/huaweicloud-core/dist/safety/unwrap.js +148 -0
- package/plugins/huaweicloud-core/dist/safety/vocabulary.js +37 -0
- package/plugins/huaweicloud-core/dist/safety/windows-rebase.js +56 -0
- package/plugins/huaweicloud-core/dist/safety/windows.js +137 -0
- package/plugins/huaweicloud-core/dist/safety/xargs-argv.js +64 -0
- package/plugins/huaweicloud-core/dist/safety-policy.js +14 -0
- package/plugins/huaweicloud-core/dist/sandbox/deploy-check.js +246 -0
- package/plugins/huaweicloud-core/dist/sandbox/deploy-nginx-verify.js +76 -0
- package/plugins/huaweicloud-core/dist/sandbox/deploy-nginx.js +215 -0
- package/plugins/huaweicloud-core/dist/sandbox/devbridge-auth.js +246 -0
- package/plugins/huaweicloud-core/dist/sandbox/devbridge-exec.js +10 -0
- package/plugins/huaweicloud-core/dist/sandbox/devbridge-expose-flow.js +225 -0
- package/plugins/huaweicloud-core/dist/sandbox/devbridge-expose.js +214 -0
- package/plugins/huaweicloud-core/dist/sandbox/devbridge-gateway.js +34 -0
- package/plugins/huaweicloud-core/dist/sandbox/devbridge-keepalive.js +212 -0
- package/plugins/huaweicloud-core/dist/sandbox/devbridge-key.js +175 -0
- package/plugins/huaweicloud-core/dist/sandbox/devbridge-renew.js +69 -0
- package/plugins/huaweicloud-core/dist/sandbox/devbridge-tunnel.js +48 -0
- package/plugins/huaweicloud-core/dist/sandbox/devbridge-validation.js +79 -0
- package/plugins/huaweicloud-core/dist/sandbox/devbridge-verify.js +101 -0
- package/plugins/huaweicloud-core/dist/sandbox/hwlink-connection.js +145 -0
- package/plugins/huaweicloud-core/dist/sandbox/sandbox-file-server.py +45 -0
- package/plugins/huaweicloud-core/dist/sandbox/sandbox-output.js +45 -0
- package/plugins/huaweicloud-core/dist/sandbox/session-manager.js +55 -0
- package/plugins/huaweicloud-core/dist/sandbox/tunnel-http.js +137 -0
- package/plugins/huaweicloud-core/dist/sandbox/uninstall-cleanup.js +45 -0
- package/plugins/huaweicloud-core/dist/sandbox/upload-diagnostics.js +45 -0
- package/plugins/huaweicloud-core/dist/sandbox/upload-file.js +119 -0
- package/plugins/huaweicloud-core/dist/sandbox/upload-project.js +171 -0
- package/plugins/huaweicloud-core/dist/sandbox/upload-transport.js +96 -0
- package/plugins/huaweicloud-core/dist/sandbox/ws-exec-loader.js +43 -0
- package/plugins/huaweicloud-core/dist/search-docs.js +64 -0
- package/plugins/huaweicloud-core/dist/search-market.js +277 -0
- package/plugins/huaweicloud-core/dist/services/availability.js +51 -0
- package/plugins/huaweicloud-core/dist/services/regions.js +110 -0
- package/plugins/huaweicloud-core/dist/setup-cli.js +1343 -0
- package/plugins/huaweicloud-core/dist/skill-disclosure.js +231 -0
- package/plugins/huaweicloud-core/dist/targets.js +139 -0
- package/plugins/huaweicloud-core/dist/telemetry/agent-detect.js +44 -0
- package/plugins/huaweicloud-core/dist/telemetry/agent-registry.js +196 -0
- package/plugins/huaweicloud-core/dist/telemetry/agent-versions-desktop.js +143 -0
- package/plugins/huaweicloud-core/dist/telemetry/agent-versions.js +78 -0
- package/plugins/huaweicloud-core/dist/telemetry/event-pipeline.js +206 -0
- package/plugins/huaweicloud-core/dist/telemetry/hook-ingest.js +81 -0
- package/plugins/huaweicloud-core/dist/telemetry/identity-stamps.js +104 -0
- package/plugins/huaweicloud-core/dist/telemetry/invoke-value.js +47 -0
- package/plugins/huaweicloud-core/dist/telemetry/telemetry-fs.js +42 -0
- package/plugins/huaweicloud-core/dist/telemetry/telemetry-types.js +14 -0
- package/plugins/huaweicloud-core/dist/telemetry/telemetry-values.js +121 -0
- package/plugins/huaweicloud-core/dist/telemetry/telemetry.js +262 -0
- package/plugins/huaweicloud-core/dist/tool-definitions.js +276 -0
- package/plugins/huaweicloud-core/dist/tool-schemas.js +156 -0
- package/plugins/huaweicloud-core/dist/tools.js +269 -0
- package/plugins/huaweicloud-core/dist/update-cache.js +79 -0
- package/plugins/huaweicloud-core/dist/update-check.js +23 -0
- package/plugins/huaweicloud-core/dist/update-hint.js +45 -0
- package/plugins/huaweicloud-core/dist/update-installed.js +53 -0
- package/plugins/huaweicloud-core/dist/update-registry.js +141 -0
- package/plugins/huaweicloud-core/dist/update-semver.js +76 -0
- package/plugins/huaweicloud-core/dist/update-skip.js +81 -0
- package/plugins/huaweicloud-core/dist/update-upgrade.js +94 -0
- package/plugins/huaweicloud-core/dist/vendor-gate.js +89 -0
- package/plugins/huaweicloud-core/dist/ws-exec/hwlink-exec-client.js +10 -0
- package/plugins/huaweicloud-core/dist/ws-exec/hwlink-exec-pending.js +71 -0
- package/plugins/huaweicloud-core/dist/ws-exec/hwlink-exec-session.js +235 -0
- package/plugins/huaweicloud-core/dist/ws-exec/hwlink-fair-queue.js +139 -0
- package/plugins/huaweicloud-core/dist/ws-exec/hwlink-interactive-terminal.js +106 -0
- package/plugins/huaweicloud-core/dist/ws-exec/hwlink-multiplexer.js +229 -0
- package/plugins/huaweicloud-core/dist/ws-exec/hwlink-normalize.js +53 -0
- package/plugins/huaweicloud-core/dist/ws-exec/hwlink-packet.js +148 -0
- package/plugins/huaweicloud-core/dist/ws-exec/hwlink-terminal-channel.js +155 -0
- package/plugins/huaweicloud-core/dist/ws-exec/hwlink-tunnel-channel.js +254 -0
- package/plugins/huaweicloud-core/dist/ws-exec/index.js +20 -0
- package/plugins/huaweicloud-core/dist/ws-exec/ws-exec-client.js +76 -0
- package/plugins/huaweicloud-core/hooks/huaweicloud-safety.mjs +62 -3
- package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +2500 -33
- package/plugins/huaweicloud-core/openclaw.plugin.json +2 -2
- package/plugins/huaweicloud-core/safety/policy.json +45 -4
- package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +47 -15
- package/plugins/huaweicloud-core/skills/.manifest.json +67 -0
- package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +3 -1
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/SKILL.md +27 -51
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/references/acceptance-criteria.md +10 -12
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/references/cli-installation-guide.md +23 -27
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/references/dataflow-diagram.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/references/iam-policies.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/references/verification-method.md +8 -16
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/scripts/cli/cli_entry.py +71 -461
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/scripts/ensure_cli.sh +28 -68
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/SKILL.md +56 -144
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/references/acceptance-criteria.md +14 -12
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/references/cli-installation-guide.md +72 -39
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/references/dataflow-diagram.md +3 -1
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/references/iam-policies.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/references/verification-method.md +12 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/scripts/cli/cli_entry.py +67 -307
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/scripts/ensure_cli.sh +28 -68
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/templates/test-defaults.json +1 -1
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/templates/test-vars.json +9 -9
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/SKILL.md +82 -160
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/references/acceptance-criteria.md +9 -8
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/references/cli-installation-guide.md +73 -40
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/references/dataflow-diagram.md +4 -2
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/references/iam-policies.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/references/related-commands.md +16 -14
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/references/verification-method.md +7 -20
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/scripts/cli/cli_entry.py +67 -307
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/scripts/ensure_cli.sh +28 -68
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/SKILL.md +92 -95
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/acceptance-criteria.md +11 -10
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/cli-installation-guide.md +86 -67
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/dataflow-diagram.md +4 -2
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/iam-policies.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/test-data-guide.md +29 -25
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/verification-method.md +13 -11
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/scripts/cli/cli_entry.py +67 -307
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/scripts/ensure_cli.sh +28 -68
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/SKILL.md +107 -127
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/acceptance-criteria.md +26 -25
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/cli-installation-guide.md +66 -51
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/csms-usage.md +23 -19
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/dataflow-diagram.md +4 -2
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/iam-policies.md +25 -30
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/kms-usage.md +13 -11
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/references/verification-method.md +13 -7
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/scripts/cli/cli_entry.py +67 -354
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/scripts/ensure_cli.sh +28 -69
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/templates/test-vars.json +11 -11
- package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/SKILL.md +28 -109
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/references/acceptance-criteria.md +27 -31
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/references/cli-installation-guide.md +49 -24
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/references/dataflow-diagram.md +2 -5
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/references/iam-policies.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/references/verification-method.md +8 -25
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/scripts/cli/cli_entry.py +67 -307
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/scripts/ensure_cli.sh +28 -68
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/SKILL.md +60 -135
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/acceptance-criteria.md +9 -11
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/cli-installation-guide.md +16 -12
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/dataflow-diagram.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/engine-operation-reference.md +15 -13
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/iam-policies.md +9 -7
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/security-audit-guide.md +9 -5
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/references/verification-method.md +16 -37
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/scripts/cli/cli_entry.py +101 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/scripts/ensure_cli.sh +27 -184
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/SKILL.md +71 -103
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/references/acceptance-criteria.md +4 -2
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/references/cli-installation-guide.md +72 -84
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/references/dataflow-diagram.md +3 -3
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/references/iam-policies.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/references/related-commands.md +7 -5
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/references/verification-method.md +11 -9
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/scripts/cli/cli_entry.py +101 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-waf-aad-rule-management/scripts/ensure_cli.sh +27 -42
- package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +24 -13
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/hc-activity.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +25 -21
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/windows-ssh.md +7 -5
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-iac/SKILL.md +40 -38
- package/plugins/huaweicloud-core/skills/huawei-iac/references/architectures.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-iac/references/resource-catalog.md +14 -12
- package/plugins/huaweicloud-core/skills/huawei-iac/references/state-file.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +3 -1
- package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +4 -1
- package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +32 -29
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +4 -2
- package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +17 -15
- package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +10 -6
- package/plugins/huaweicloud-core/skills/huawei-openapi/SKILL.md +50 -0
- package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +15 -13
- package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +98 -91
- package/plugins/huaweicloud-core/skills/huawei-sandbox/references/framework-commands.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-sandbox/references/fullstack-postgrest.md +33 -27
- package/plugins/huaweicloud-core/skills/huawei-sandbox/references/nginx-templates.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-sandbox/references/resource-pool.md +3 -1
- package/plugins/huaweicloud-core/skills/huawei-sandbox/references/tunnel-persistence.md +9 -2
- package/plugins/huaweicloud-core/skills/huawei-voucher/SKILL.md +5 -3
- package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +3 -0
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +16 -0
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +2 -0
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +2 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +3 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +16 -13
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +6 -11
- package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +38 -35
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +2 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +2 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +3 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/references/secrets.md +32 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +2 -0
- package/plugins/huaweicloud-core/src/agents/atomcode.ts +138 -0
- package/plugins/huaweicloud-core/src/agents/codearts-work.ts +136 -0
- package/plugins/huaweicloud-core/src/agents/codearts.ts +92 -0
- package/plugins/huaweicloud-core/src/agents/codex-desktop.ts +219 -0
- package/plugins/huaweicloud-core/src/agents/codex.ts +230 -0
- package/plugins/huaweicloud-core/src/agents/dsh-patch.ts +195 -0
- package/plugins/huaweicloud-core/src/agents/dsh.ts +153 -0
- package/plugins/huaweicloud-core/src/agents/hermes-config.ts +974 -0
- package/plugins/huaweicloud-core/src/agents/hermes-hook-plugin.ts +99 -0
- package/plugins/huaweicloud-core/src/agents/hermes-hooks.ts +187 -0
- package/plugins/huaweicloud-core/src/agents/hermes-sdk.ts +63 -0
- package/plugins/huaweicloud-core/src/agents/hermes.ts +192 -0
- package/plugins/huaweicloud-core/src/agents/officeace-registry.ts +188 -0
- package/plugins/huaweicloud-core/src/agents/officeace-sqlite.ts +153 -0
- package/plugins/huaweicloud-core/src/agents/officeace.ts +202 -0
- package/plugins/huaweicloud-core/src/agents/openclaw.ts +73 -0
- package/plugins/huaweicloud-core/src/agents/opencode-config.ts +193 -0
- package/plugins/huaweicloud-core/src/agents/opencode.ts +148 -0
- package/plugins/huaweicloud-core/src/agents/workbuddy.ts +216 -0
- package/plugins/huaweicloud-core/src/auth/account-type.ts +191 -0
- package/plugins/huaweicloud-core/src/auth/agent-registration.ts +267 -0
- package/plugins/huaweicloud-core/src/auth/cli.ts +133 -0
- package/plugins/huaweicloud-core/src/auth/codearts-context.ts +139 -0
- package/plugins/huaweicloud-core/src/auth/credential-placeholder.ts +36 -0
- package/plugins/huaweicloud-core/src/auth/credential-resolver.ts +81 -0
- package/plugins/huaweicloud-core/src/auth/credential-validator.ts +176 -0
- package/plugins/huaweicloud-core/src/auth/credentials.ts +52 -0
- package/plugins/huaweicloud-core/src/auth/{guidance.mjs → error-table.ts} +58 -12
- package/plugins/huaweicloud-core/src/auth/hcloud-profile.ts +119 -0
- package/plugins/huaweicloud-core/src/auth/init-cli.ts +155 -0
- package/plugins/huaweicloud-core/src/auth/missing-credential-error.ts +44 -0
- package/plugins/huaweicloud-core/src/auth/obs-config.ts +42 -0
- package/plugins/huaweicloud-core/src/auth/project-id.ts +104 -0
- package/plugins/huaweicloud-core/src/auth/reconcile.ts +345 -0
- package/plugins/huaweicloud-core/src/auth/runtime-credentials.ts +38 -0
- package/plugins/huaweicloud-core/src/auth/s1-store.ts +214 -0
- package/plugins/huaweicloud-core/src/auth/{service.mjs → service.ts} +212 -61
- package/plugins/huaweicloud-core/src/auth/sts-expiry.ts +58 -0
- package/plugins/huaweicloud-core/src/capability-catalog.ts +519 -0
- package/plugins/huaweicloud-core/src/codearts-sandbox.ts +32 -0
- package/plugins/huaweicloud-core/src/codex-probe.ts +86 -0
- package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +5 -23
- package/plugins/huaweicloud-core/src/dep/installers/gateway.ts +213 -0
- package/plugins/huaweicloud-core/src/dep/installers/hcloud.ts +407 -0
- package/plugins/huaweicloud-core/src/dep/installers/table.ts +123 -0
- package/plugins/huaweicloud-core/src/dep/provision.ts +335 -0
- package/plugins/huaweicloud-core/src/dep/receipts.ts +464 -0
- package/plugins/huaweicloud-core/src/detect-framework-match.ts +143 -0
- package/plugins/huaweicloud-core/src/detect-framework-pkg.ts +79 -0
- package/plugins/huaweicloud-core/src/detect-framework-scan.ts +117 -0
- package/plugins/huaweicloud-core/src/detect-framework-table.ts +166 -0
- package/plugins/huaweicloud-core/src/detect-framework.ts +8 -0
- package/plugins/huaweicloud-core/src/doctor-native.ts +189 -0
- package/plugins/huaweicloud-core/src/doctor-payload.ts +77 -0
- package/plugins/huaweicloud-core/src/doctor-report.ts +30 -0
- package/plugins/huaweicloud-core/src/explain-error.ts +246 -0
- package/plugins/huaweicloud-core/src/hcloud-api-error.ts +69 -0
- package/plugins/huaweicloud-core/src/hcloud-catalog.ts +115 -0
- package/plugins/huaweicloud-core/src/hcloud-cli.ts +41 -0
- package/plugins/huaweicloud-core/src/hcloud-obs-redact.ts +65 -0
- package/plugins/huaweicloud-core/src/hcloud-plan.ts +344 -0
- package/plugins/huaweicloud-core/src/{hcloud-probe.mjs → hcloud-probe.ts} +87 -72
- package/plugins/huaweicloud-core/src/hcloud-run-once.ts +251 -0
- package/plugins/huaweicloud-core/src/hcloud-run.ts +151 -0
- package/plugins/huaweicloud-core/src/hcloud-sg-preflight.ts +111 -0
- package/plugins/huaweicloud-core/src/hcloud-sts.ts +123 -0
- package/plugins/huaweicloud-core/src/hcloud-triage.ts +80 -0
- package/plugins/huaweicloud-core/src/{icon-library.mjs → icon-library.ts} +115 -23
- package/plugins/huaweicloud-core/src/install-payload.ts +63 -0
- package/plugins/huaweicloud-core/src/install-plan.ts +85 -0
- package/plugins/huaweicloud-core/src/install-prompts.ts +134 -0
- package/plugins/huaweicloud-core/src/koocli-version.ts +87 -0
- package/plugins/huaweicloud-core/src/lib/approval-tokens.ts +315 -0
- package/plugins/huaweicloud-core/src/lib/as-record.ts +10 -0
- package/plugins/huaweicloud-core/src/lib/as-text.ts +16 -0
- package/plugins/huaweicloud-core/src/lib/banner.ts +12 -0
- package/plugins/huaweicloud-core/src/lib/call-trace.ts +153 -0
- package/plugins/huaweicloud-core/src/lib/cli-io.ts +81 -0
- package/plugins/huaweicloud-core/src/lib/credentials.ts +202 -0
- package/plugins/huaweicloud-core/src/lib/dep-resolve.ts +107 -0
- package/plugins/huaweicloud-core/src/lib/dependency-model.ts +236 -0
- package/plugins/huaweicloud-core/src/lib/hdkit/hdkitservice-api.ts +255 -0
- package/plugins/huaweicloud-core/src/lib/hdkit/hwlink-api.ts +245 -0
- package/plugins/huaweicloud-core/src/{sandbox/sandbox-pool.mjs → lib/hdkit/sandbox-pool.ts} +115 -47
- package/plugins/huaweicloud-core/src/lib/hw-request-signing.ts +101 -0
- package/plugins/huaweicloud-core/src/lib/koocli-paths.ts +21 -0
- package/plugins/huaweicloud-core/src/lib/native-receipt.ts +131 -0
- package/plugins/huaweicloud-core/src/lib/opencode-permission-seam.ts +145 -0
- package/plugins/huaweicloud-core/src/lib/pack-state.ts +192 -0
- package/plugins/huaweicloud-core/src/lib/pack-types.ts +74 -0
- package/plugins/huaweicloud-core/src/lib/secret-vault/cli.ts +270 -0
- package/plugins/huaweicloud-core/src/lib/secret-vault/custody.ts +468 -0
- package/plugins/huaweicloud-core/src/lib/secret-vault/refs.ts +75 -0
- package/plugins/huaweicloud-core/src/lib/secret-vault/store.ts +357 -0
- package/plugins/huaweicloud-core/src/lib/skill-frontmatter.ts +164 -0
- package/plugins/huaweicloud-core/src/lib/skill-manifest.ts +55 -0
- package/plugins/huaweicloud-core/src/lib/skill-tree.ts +45 -0
- package/plugins/huaweicloud-core/src/lib/tool-schema-parts.ts +80 -0
- package/plugins/huaweicloud-core/src/mcp-agent-config.ts +90 -0
- package/plugins/huaweicloud-core/src/{mcp-config-backup.mjs → mcp-config-backup.ts} +14 -10
- package/plugins/huaweicloud-core/src/mcp-config-io.ts +215 -0
- package/plugins/huaweicloud-core/src/mcp-config-merge.ts +205 -0
- package/plugins/huaweicloud-core/src/mcp-protocol.ts +385 -0
- package/plugins/huaweicloud-core/src/mcp-server-remote.ts +178 -0
- package/plugins/huaweicloud-core/src/mcp-server.ts +87 -0
- package/plugins/huaweicloud-core/src/mcp-stdio-transport.ts +245 -0
- package/plugins/huaweicloud-core/src/officeace-paths.ts +146 -0
- package/plugins/huaweicloud-core/src/packs/auth/pack.ts +14 -0
- package/plugins/huaweicloud-core/src/packs/auth/tools.ts +327 -0
- package/plugins/huaweicloud-core/src/packs/discovery/pack.ts +14 -0
- package/plugins/huaweicloud-core/src/packs/discovery/tools.ts +97 -0
- package/plugins/huaweicloud-core/src/packs/enable.ts +90 -0
- package/plugins/huaweicloud-core/src/packs/huaweicloud-cli/pack.ts +42 -0
- package/plugins/huaweicloud-core/src/packs/huaweicloud-cli/tools.ts +493 -0
- package/plugins/huaweicloud-core/src/packs/huaweicloud-open-mcp/approval.ts +250 -0
- package/plugins/huaweicloud-core/src/packs/huaweicloud-open-mcp/pack.ts +19 -0
- package/plugins/huaweicloud-core/src/packs/huaweicloud-open-mcp/sidecar.ts +603 -0
- package/plugins/huaweicloud-core/src/packs/huaweicloud-open-mcp/tools.ts +155 -0
- package/plugins/huaweicloud-core/src/packs/obs/pack.ts +13 -0
- package/plugins/huaweicloud-core/src/packs/obs/tools.ts +487 -0
- package/plugins/huaweicloud-core/src/packs/registry.ts +162 -0
- package/plugins/huaweicloud-core/src/packs/sandbox/git-transfer.ts +93 -0
- package/plugins/huaweicloud-core/src/packs/sandbox/handlers-account.ts +93 -0
- package/plugins/huaweicloud-core/src/packs/sandbox/handlers-credentials.ts +144 -0
- package/plugins/huaweicloud-core/src/packs/sandbox/handlers-deploy.ts +63 -0
- package/plugins/huaweicloud-core/src/packs/sandbox/handlers-session.ts +59 -0
- package/plugins/huaweicloud-core/src/packs/sandbox/handlers-tunnel.ts +101 -0
- package/plugins/huaweicloud-core/src/packs/sandbox/handlers-upload.ts +46 -0
- package/plugins/huaweicloud-core/src/packs/sandbox/pack.ts +16 -0
- package/plugins/huaweicloud-core/src/packs/sandbox/schemas.ts +249 -0
- package/plugins/huaweicloud-core/src/packs/sandbox/tools.ts +183 -0
- package/plugins/huaweicloud-core/src/packs/secrets/pack.ts +11 -0
- package/plugins/huaweicloud-core/src/packs/secrets/tools.ts +146 -0
- package/plugins/huaweicloud-core/src/packs/update/pack.ts +13 -0
- package/plugins/huaweicloud-core/src/packs/update/tools.ts +107 -0
- package/plugins/huaweicloud-core/src/packs/voucher/pack.ts +13 -0
- package/plugins/huaweicloud-core/src/packs/voucher/tools.ts +112 -0
- package/plugins/huaweicloud-core/src/packs-cli/commands.ts +121 -0
- package/plugins/huaweicloud-core/src/packs-cli/doctor.ts +85 -0
- package/plugins/huaweicloud-core/src/packs-cli/report.ts +171 -0
- package/plugins/huaweicloud-core/src/packs-cli/slots.ts +139 -0
- package/plugins/huaweicloud-core/src/packs-cli/write-command.ts +114 -0
- package/plugins/huaweicloud-core/src/packs-cli/writers.ts +125 -0
- package/plugins/huaweicloud-core/src/packs-configure.ts +104 -0
- package/plugins/huaweicloud-core/src/packs-policy.ts +203 -0
- package/plugins/huaweicloud-core/src/payload-files.ts +78 -0
- package/plugins/huaweicloud-core/src/payload-native-clean.ts +154 -0
- package/plugins/huaweicloud-core/src/payload-native-sync.ts +110 -0
- package/plugins/huaweicloud-core/src/payload-placement.ts +107 -0
- package/plugins/huaweicloud-core/src/payload-roster.ts +85 -0
- package/plugins/huaweicloud-core/src/payload-runtime-deps.ts +68 -0
- package/plugins/huaweicloud-core/src/payload-status.ts +53 -0
- package/plugins/huaweicloud-core/src/payload-utils.ts +51 -0
- package/plugins/huaweicloud-core/src/preflight.ts +250 -0
- package/plugins/huaweicloud-core/src/proxy/cli.ts +103 -0
- package/plugins/huaweicloud-core/src/proxy/{proxy-agent.mjs → proxy-agent.ts} +25 -16
- package/plugins/huaweicloud-core/src/proxy/proxy-bypass.ts +90 -0
- package/plugins/huaweicloud-core/src/proxy/proxy-cidr.ts +98 -0
- package/plugins/huaweicloud-core/src/proxy/proxy-config-io.ts +73 -0
- package/plugins/huaweicloud-core/src/proxy/proxy-config.ts +18 -0
- package/plugins/huaweicloud-core/src/risk-rule-engine.ts +325 -0
- package/plugins/huaweicloud-core/src/safety/classify-hcloud.ts +246 -0
- package/plugins/huaweicloud-core/src/safety/classify-text.ts +1099 -0
- package/plugins/huaweicloud-core/src/safety/command-operation.ts +28 -0
- package/plugins/huaweicloud-core/src/safety/credential-path.ts +25 -0
- package/plugins/huaweicloud-core/src/safety/default-policy.ts +34 -0
- package/plugins/huaweicloud-core/src/safety/feeder.ts +140 -0
- package/plugins/huaweicloud-core/src/safety/heredoc.ts +100 -0
- package/plugins/huaweicloud-core/src/safety/policy.ts +109 -0
- package/plugins/huaweicloud-core/src/safety/redact.ts +63 -0
- package/plugins/huaweicloud-core/src/safety/risk-merge.ts +31 -0
- package/plugins/huaweicloud-core/src/safety/script-stream.ts +95 -0
- package/plugins/huaweicloud-core/src/safety/secret-exec.ts +42 -0
- package/plugins/huaweicloud-core/src/safety/segments.ts +153 -0
- package/plugins/huaweicloud-core/src/safety/shell-text.ts +415 -0
- package/plugins/huaweicloud-core/src/safety/skill-quality-cli.ts +141 -0
- package/plugins/huaweicloud-core/src/safety/tokens.ts +322 -0
- package/plugins/huaweicloud-core/src/safety/unwrap.ts +162 -0
- package/plugins/huaweicloud-core/src/safety/vocabulary.ts +38 -0
- package/plugins/huaweicloud-core/src/safety/windows-rebase.ts +56 -0
- package/plugins/huaweicloud-core/src/safety/windows.ts +133 -0
- package/plugins/huaweicloud-core/src/safety/xargs-argv.ts +79 -0
- package/plugins/huaweicloud-core/src/safety-policy.ts +16 -0
- package/plugins/huaweicloud-core/src/sandbox/deploy-check.ts +307 -0
- package/plugins/huaweicloud-core/src/sandbox/deploy-nginx-verify.ts +96 -0
- package/plugins/huaweicloud-core/src/sandbox/deploy-nginx.ts +300 -0
- package/plugins/huaweicloud-core/src/sandbox/devbridge-auth.ts +291 -0
- package/plugins/huaweicloud-core/src/sandbox/devbridge-exec.ts +28 -0
- package/plugins/huaweicloud-core/src/sandbox/devbridge-expose-flow.ts +289 -0
- package/plugins/huaweicloud-core/src/sandbox/devbridge-expose.ts +310 -0
- package/plugins/huaweicloud-core/src/sandbox/devbridge-gateway.ts +36 -0
- package/plugins/huaweicloud-core/src/sandbox/devbridge-keepalive.ts +254 -0
- package/plugins/huaweicloud-core/src/sandbox/{devbridge-key.mjs → devbridge-key.ts} +48 -32
- package/plugins/huaweicloud-core/src/sandbox/devbridge-renew.ts +87 -0
- package/plugins/huaweicloud-core/src/sandbox/devbridge-tunnel.ts +79 -0
- package/plugins/huaweicloud-core/src/sandbox/devbridge-validation.ts +100 -0
- package/plugins/huaweicloud-core/src/sandbox/devbridge-verify.ts +120 -0
- package/plugins/huaweicloud-core/src/sandbox/hwlink-connection.ts +188 -0
- package/plugins/huaweicloud-core/src/sandbox/sandbox-output.ts +46 -0
- package/plugins/huaweicloud-core/src/sandbox/session-manager.ts +89 -0
- package/plugins/huaweicloud-core/src/sandbox/tunnel-http.ts +155 -0
- package/plugins/huaweicloud-core/src/sandbox/{uninstall-cleanup.mjs → uninstall-cleanup.ts} +4 -4
- package/plugins/huaweicloud-core/src/sandbox/upload-diagnostics.ts +46 -0
- package/plugins/huaweicloud-core/src/sandbox/upload-file.ts +161 -0
- package/plugins/huaweicloud-core/src/sandbox/upload-project.ts +218 -0
- package/plugins/huaweicloud-core/src/sandbox/upload-transport.ts +150 -0
- package/plugins/huaweicloud-core/src/sandbox/ws-exec-loader.ts +104 -0
- package/plugins/huaweicloud-core/src/search-docs.ts +64 -0
- package/plugins/huaweicloud-core/src/{search-market.mjs → search-market.ts} +96 -28
- package/plugins/huaweicloud-core/src/services/availability.ts +53 -0
- package/plugins/huaweicloud-core/src/services/regions.ts +110 -0
- package/plugins/huaweicloud-core/src/setup-cli.ts +1563 -0
- package/plugins/huaweicloud-core/src/skill-disclosure.ts +242 -0
- package/plugins/huaweicloud-core/src/targets.ts +156 -0
- package/plugins/huaweicloud-core/src/telemetry/{agent-detect.mjs → agent-detect.ts} +16 -5
- package/plugins/huaweicloud-core/src/telemetry/agent-registry.ts +210 -0
- package/plugins/huaweicloud-core/src/telemetry/agent-versions-desktop.ts +138 -0
- package/plugins/huaweicloud-core/src/telemetry/agent-versions.ts +84 -0
- package/plugins/huaweicloud-core/src/telemetry/event-pipeline.ts +214 -0
- package/plugins/huaweicloud-core/src/telemetry/hook-ingest.ts +82 -0
- package/plugins/huaweicloud-core/src/telemetry/identity-stamps.ts +108 -0
- package/plugins/huaweicloud-core/src/telemetry/invoke-value.ts +47 -0
- package/plugins/huaweicloud-core/src/telemetry/telemetry-fs.ts +47 -0
- package/plugins/huaweicloud-core/src/telemetry/telemetry-types.ts +97 -0
- package/plugins/huaweicloud-core/src/telemetry/telemetry-values.ts +116 -0
- package/plugins/huaweicloud-core/src/telemetry/telemetry.ts +299 -0
- package/plugins/huaweicloud-core/src/tool-definitions.ts +294 -0
- package/plugins/huaweicloud-core/src/tool-schemas.ts +180 -0
- package/plugins/huaweicloud-core/src/tools.ts +417 -0
- package/plugins/huaweicloud-core/src/update-cache.ts +95 -0
- package/plugins/huaweicloud-core/src/update-check.ts +51 -0
- package/plugins/huaweicloud-core/src/update-hint.ts +82 -0
- package/plugins/huaweicloud-core/src/update-installed.ts +53 -0
- package/plugins/huaweicloud-core/src/update-registry.ts +146 -0
- package/plugins/huaweicloud-core/src/update-semver.ts +80 -0
- package/plugins/huaweicloud-core/src/update-skip.ts +94 -0
- package/plugins/huaweicloud-core/src/update-upgrade.ts +123 -0
- package/plugins/huaweicloud-core/src/vendor-gate.ts +103 -0
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.ts +15 -0
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-pending.ts +113 -0
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-session.ts +334 -0
- package/plugins/huaweicloud-core/src/ws-exec/{hwlink-fair-queue.js → hwlink-fair-queue.ts} +46 -15
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-interactive-terminal.ts +158 -0
- package/plugins/huaweicloud-core/src/ws-exec/{hwlink-multiplexer.js → hwlink-multiplexer.ts} +108 -30
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-normalize.ts +60 -0
- package/plugins/huaweicloud-core/src/ws-exec/{hwlink-packet.js → hwlink-packet.ts} +40 -16
- package/plugins/huaweicloud-core/src/ws-exec/{hwlink-terminal-channel.js → hwlink-terminal-channel.ts} +30 -18
- package/plugins/huaweicloud-core/src/ws-exec/{hwlink-tunnel-channel.mjs → hwlink-tunnel-channel.ts} +75 -27
- package/plugins/huaweicloud-core/src/ws-exec/{index.js → index.ts} +11 -11
- package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.ts +102 -0
- package/plugins/huaweicloud-core/tsconfig.json +21 -0
- package/rules/huawei-agent-rules.mdc +2 -2
- package/integrations/hermes/skills-snapshot.json +0 -175
- package/integrations/opencode/package-lock.json +0 -24
- package/integrations/opencode/package.json +0 -10
- package/integrations/opencode/plugins/huaweicloud-devkit.js +0 -194
- package/integrations/opencode/skills/huaweicloud-core/SKILL.md +0 -32
- package/plugins/huaweicloud-core/skills/huawei-cloud-apig-instance-management/scripts/cli/cli_reporting.py +0 -589
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/references/test-report.md +0 -35
- package/plugins/huaweicloud-core/skills/huawei-cloud-cts-trace-management/scripts/cli/cli_reporting.py +0 -928
- package/plugins/huaweicloud-core/skills/huawei-cloud-dds-dcs-instance-management/scripts/cli/cli_reporting.py +0 -928
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/references/test-report.md +0 -52
- package/plugins/huaweicloud-core/skills/huawei-cloud-deployment-task-management/scripts/cli/cli_reporting.py +0 -928
- package/plugins/huaweicloud-core/skills/huawei-cloud-dew-key-management/scripts/cli/cli_reporting.py +0 -577
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/scripts/cli/cli_reporting.py +0 -928
- package/plugins/huaweicloud-core/skills/huawei-cloud-gaussdb-instance-management/scripts/gaussdb_cli.sh +0 -138
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/scripts/install_cli.sh +0 -94
- package/plugins/huaweicloud-core/skills/huawei-cloud-smn-dms-message/scripts/smn_dms_skill.py +0 -444
- package/plugins/huaweicloud-core/src/account-type.mjs +0 -144
- package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +0 -243
- package/plugins/huaweicloud-core/src/auth/credential-validator.mjs +0 -198
- package/plugins/huaweicloud-core/src/auth/credentials.mjs +0 -534
- package/plugins/huaweicloud-core/src/auth/project-id.mjs +0 -68
- package/plugins/huaweicloud-core/src/auth/reconcile.mjs +0 -257
- package/plugins/huaweicloud-core/src/auth/token-exchange.mjs +0 -100
- package/plugins/huaweicloud-core/src/detect-framework.mjs +0 -402
- package/plugins/huaweicloud-core/src/hcloud-cli.mjs +0 -864
- package/plugins/huaweicloud-core/src/koocli-install.mjs +0 -57
- package/plugins/huaweicloud-core/src/koocli-version.mjs +0 -47
- package/plugins/huaweicloud-core/src/mcp-config-merge.mjs +0 -219
- package/plugins/huaweicloud-core/src/mcp-protocol.mjs +0 -109
- package/plugins/huaweicloud-core/src/mcp-server-remote.mjs +0 -108
- package/plugins/huaweicloud-core/src/mcp-server.mjs +0 -221
- package/plugins/huaweicloud-core/src/officeace-paths.mjs +0 -51
- package/plugins/huaweicloud-core/src/preflight.mjs +0 -125
- package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +0 -187
- package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +0 -182
- package/plugins/huaweicloud-core/src/safety-policy.mjs +0 -625
- package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +0 -296
- package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +0 -259
- package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +0 -2594
- package/plugins/huaweicloud-core/src/setup-cli.mjs +0 -5461
- package/plugins/huaweicloud-core/src/telemetry/agent-registry.mjs +0 -341
- package/plugins/huaweicloud-core/src/telemetry/telemetry.mjs +0 -492
- package/plugins/huaweicloud-core/src/tools.mjs +0 -3229
- package/plugins/huaweicloud-core/src/update-check.mjs +0 -476
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +0 -461
- package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +0 -365
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""Hermes pre_tool_call hook — Huawei Cloud telemetry data collection.
|
|
3
3
|
|
|
4
|
-
Captures
|
|
4
|
+
Captures hcloud CLI commands and MCP tool invocations, writing structured events
|
|
5
5
|
to hook-events.jsonl for the devkit telemetry module to ingest and report.
|
|
6
6
|
|
|
7
7
|
This hook NEVER blocks execution — it always returns exit code 0.
|
|
@@ -11,7 +11,8 @@ Data flow:
|
|
|
11
11
|
stdin JSON (pre_tool_call event) → classify → hook-events.jsonl
|
|
12
12
|
→ MCP Server telemetry.mjs :: ingestHookEvents() → eventQueue → HTTP POST
|
|
13
13
|
|
|
14
|
-
Classification
|
|
14
|
+
Classification: the hcloud CLI classifier (unbounded-capture variant) plus
|
|
15
|
+
MCP tool invocations; never skill-tool loads.
|
|
15
16
|
"""
|
|
16
17
|
|
|
17
18
|
import json
|
|
@@ -82,7 +83,7 @@ def _get_hook_events_path():
|
|
|
82
83
|
return None
|
|
83
84
|
|
|
84
85
|
|
|
85
|
-
# ── Classifiers (
|
|
86
|
+
# ── Classifiers (hcloud CLI, unbounded-capture variant) ────────────
|
|
86
87
|
|
|
87
88
|
# hcloud command detection
|
|
88
89
|
HCLOUD_RE = re.compile(r'(?:^|[;&|]\s*)hcloud(?:\.exe)?\s+(.+)', re.IGNORECASE)
|
|
@@ -101,16 +102,12 @@ WRITE_VERBS = re.compile(
|
|
|
101
102
|
r'Reboot|Suspend|Resume|Terminate|Release|Allocate)\w*', re.IGNORECASE
|
|
102
103
|
)
|
|
103
104
|
|
|
104
|
-
# Huawei Cloud skill name pattern
|
|
105
|
-
HUAWEI_SKILL_RE = re.compile(r'^huawei', re.IGNORECASE)
|
|
106
|
-
|
|
107
105
|
|
|
108
106
|
def classify_hcloud(text):
|
|
109
107
|
"""Classify an hcloud CLI command as read / write / invoke.
|
|
110
108
|
|
|
111
109
|
Returns:
|
|
112
110
|
dict with 'key' and 'value', or None if not an hcloud command.
|
|
113
|
-
Matches the classifyHcloud() logic in skill-tracker.js.
|
|
114
111
|
"""
|
|
115
112
|
m = HCLOUD_RE.search(text)
|
|
116
113
|
if not m:
|
|
@@ -132,11 +129,6 @@ def classify_hcloud(text):
|
|
|
132
129
|
return {'key': 'cli:invoke', 'value': f'hcloud {cmd}'}
|
|
133
130
|
|
|
134
131
|
|
|
135
|
-
def is_huawei_skill(name):
|
|
136
|
-
"""Check if a skill name belongs to Huawei Cloud."""
|
|
137
|
-
return name and HUAWEI_SKILL_RE.search(name)
|
|
138
|
-
|
|
139
|
-
|
|
140
132
|
# ── Event writer ────────────────────────────────────────────────────
|
|
141
133
|
|
|
142
134
|
def write_event(key, value, extra=None):
|
|
@@ -145,10 +137,19 @@ def write_event(key, value, extra=None):
|
|
|
145
137
|
Format matches OpenCode/DSH/WorkBuddy output exactly:
|
|
146
138
|
{"key": "...", "value": "...", "capability": "..."}
|
|
147
139
|
"""
|
|
140
|
+
# Telemetry opt-out gates the local spool too (no collection while
|
|
141
|
+
# off, so nothing is transmitted retroactively on re-enable).
|
|
142
|
+
if os.environ.get("HUAWEICLOUD_DEVKIT_TELEMETRY") == "off":
|
|
143
|
+
return
|
|
148
144
|
path = _get_hook_events_path()
|
|
149
145
|
if not path:
|
|
150
146
|
return # Best-effort: silently skip if path is unresolvable
|
|
151
147
|
|
|
148
|
+
# cli:* values carry the hcloud command tail — trim to Service+
|
|
149
|
+
# Operation so file paths / bucket names / flag values never ride
|
|
150
|
+
# along (matches the MCP face's trim in tools.ts).
|
|
151
|
+
if isinstance(value, str) and key.startswith("cli:"):
|
|
152
|
+
value = " ".join(value.split()[:3])
|
|
152
153
|
event = {"key": key, "value": value}
|
|
153
154
|
if extra:
|
|
154
155
|
event.update(extra)
|
|
@@ -177,27 +178,6 @@ def command_text(tool_input):
|
|
|
177
178
|
return json.dumps(tool_input)
|
|
178
179
|
|
|
179
180
|
|
|
180
|
-
# ── Skill name extraction ───────────────────────────────────────────
|
|
181
|
-
|
|
182
|
-
def extract_skill_name(tool_name, tool_input):
|
|
183
|
-
"""Extract skill name from tool_input for skill-related tools.
|
|
184
|
-
|
|
185
|
-
Hermes skill tools: skill_view, skills_list, skill_manage.
|
|
186
|
-
The skill name may be in 'name', 'skill', or 'args' field.
|
|
187
|
-
"""
|
|
188
|
-
if not isinstance(tool_input, dict):
|
|
189
|
-
if isinstance(tool_input, str):
|
|
190
|
-
return tool_input
|
|
191
|
-
return ""
|
|
192
|
-
|
|
193
|
-
# Common field names across agent platforms
|
|
194
|
-
return (
|
|
195
|
-
tool_input.get("name", "")
|
|
196
|
-
or tool_input.get("skill", "")
|
|
197
|
-
or tool_input.get("command", "")
|
|
198
|
-
or ""
|
|
199
|
-
)
|
|
200
|
-
|
|
201
181
|
|
|
202
182
|
# ── Main hook logic ─────────────────────────────────────────────────
|
|
203
183
|
|
|
@@ -211,22 +191,25 @@ def main():
|
|
|
211
191
|
tool_name = data.get("tool_name", "")
|
|
212
192
|
tool_input = data.get("tool_input", {})
|
|
213
193
|
|
|
214
|
-
# ── Category 1:
|
|
215
|
-
#
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
#
|
|
222
|
-
|
|
194
|
+
# ── Category 1: Bash/terminal tool with hcloud commands ──
|
|
195
|
+
# Devkit service skills are server data disclosed over MCP (never
|
|
196
|
+
# installed natively), so their retrieval telemetry rides
|
|
197
|
+
# trackSkillRetrieve inside huaweicloud_retrieve_skill; direct reads via
|
|
198
|
+
# the stdio skillRoot disclosure (server instructions at initialize, or
|
|
199
|
+
# the list_skills payload) are observable only as catalog calls within
|
|
200
|
+
# telemetry — the instructions emission itself is trace-file-only (the
|
|
201
|
+
# e2e seam), never a telemetry event — and neither channel shows which
|
|
202
|
+
# skill file was consumed. The six core meta-skills are native copies
|
|
203
|
+
# (no telemetry for those loads). Only the CLI classifier and MCP
|
|
204
|
+
# invocations are tracked here.
|
|
205
|
+
if tool_name in ("Bash", "terminal", "bash", "pwsh"):
|
|
223
206
|
command = command_text(tool_input)
|
|
224
207
|
if command and HCLOUD_RE.search(command):
|
|
225
208
|
result = classify_hcloud(command)
|
|
226
209
|
if result:
|
|
227
210
|
write_event(result['key'], result['value'], {'capability': 'cli'})
|
|
228
211
|
|
|
229
|
-
# ── Category
|
|
212
|
+
# ── Category 2: MCP Huawei Cloud tool invocations ──
|
|
230
213
|
elif tool_name.startswith("mcp__huaweicloud") or tool_name.startswith("huaweicloud_"):
|
|
231
214
|
write_event(f"tool:{tool_name}", "1", {'capability': 'mcp'})
|
|
232
215
|
|
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
manifest_version: 1
|
|
2
2
|
name: huaweicloud-devkit
|
|
3
3
|
description: >
|
|
4
|
-
Huawei Cloud DevKit provides
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Huawei Cloud DevKit provides MCP tools, KooCLI guidance, and safety
|
|
5
|
+
guardrails for Huawei Cloud services within Hermes Agent. Service skills
|
|
6
|
+
(ECS, OBS, VPC, RDS, CCE, ModelArts, and more) ship as server data and are
|
|
7
|
+
disclosed through the MCP tools (huaweicloud_list_packs,
|
|
8
|
+
huaweicloud_list_skills, huaweicloud_retrieve_skill) instead of
|
|
9
|
+
~/.hermes/skills/ copies (that native directory holds only the six
|
|
10
|
+
huaweicloud-* meta-skill copies and is never a root for pack-owned
|
|
11
|
+
service skills — never guess a service skill's path by analogy to it);
|
|
12
|
+
the stdio MCP server instructions state skillRoot (the tree's location)
|
|
13
|
+
at initialize — the default load path is action-first: attempt the
|
|
14
|
+
direct read with skillRoot in hand before the first service-skill read
|
|
15
|
+
(never a guessed read in parallel with the catalog call), the attempt
|
|
16
|
+
itself is the reachability check — and huaweicloud_list_skills is the effective
|
|
17
|
+
catalog (which skills are ENABLED is pack-gated and can change at runtime),
|
|
18
|
+
with huaweicloud_retrieve_skill as the fallback when the attempted read
|
|
19
|
+
fails or is denied.
|
|
7
20
|
|
|
8
21
|
source: https://github.com/huaweicloud/huaweicloud-devkit
|
|
9
22
|
|
|
10
23
|
transport:
|
|
11
24
|
type: stdio
|
|
12
25
|
command: 'node'
|
|
13
|
-
args: ['plugins/huaweicloud-core/
|
|
26
|
+
args: ['plugins/huaweicloud-core/dist/mcp-server.js']
|
|
14
27
|
env:
|
|
15
28
|
HUAWEICLOUD_AGENT_TOOLKIT_MODE: 'local'
|
|
16
29
|
|
|
@@ -18,8 +31,9 @@ install:
|
|
|
18
31
|
type: git
|
|
19
32
|
url: https://github.com/huaweicloud/huaweicloud-devkit
|
|
20
33
|
bootstrap:
|
|
21
|
-
- 'npm ci
|
|
22
|
-
- '
|
|
34
|
+
- 'npm ci'
|
|
35
|
+
- 'npm run build'
|
|
36
|
+
- 'node plugins/huaweicloud-core/dist/setup-cli.js install --target hermes --skip-mcp-server'
|
|
23
37
|
|
|
24
38
|
auth:
|
|
25
39
|
type: none
|
|
@@ -31,13 +45,24 @@ post_install: |
|
|
|
31
45
|
Huawei Cloud DevKit installed successfully!
|
|
32
46
|
|
|
33
47
|
What was set up:
|
|
34
|
-
•
|
|
35
|
-
• MCP tools (33 tools for CLI, auth, sandbox, safety) → config.yaml
|
|
48
|
+
• MCP tools (every registered tool of the devkit server) → config.yaml
|
|
36
49
|
• Safety hooks (pre_tool_call terminal guard) → config.yaml
|
|
37
|
-
• Safety policy → ~/.hermes/huaweicloud-plugins/
|
|
50
|
+
• Safety policy + skills tree (server data) → ~/.hermes/huaweicloud-plugins/
|
|
51
|
+
|
|
52
|
+
Skills are MCP-disclosed: ask the agent to call huaweicloud_list_packs,
|
|
53
|
+
browse the effective catalog with huaweicloud_list_skills (which skills are
|
|
54
|
+
ENABLED is pack-gated and can change at runtime), or route a task with
|
|
55
|
+
huaweicloud_service_catalog, then attempt the direct read —
|
|
56
|
+
read the recommended skill's files directly under the skillRoot the MCP
|
|
57
|
+
server instructions state at initialize (and the list_skills payload
|
|
58
|
+
carries), no reachability pre-check — falling back to
|
|
59
|
+
huaweicloud_retrieve_skill when the attempted read fails or is denied
|
|
60
|
+
(the loader needs no file access). The six core
|
|
61
|
+
meta-skills (huaweicloud-*) are additionally installed as native copies in
|
|
62
|
+
~/.hermes/skills for system-prompt visibility.
|
|
38
63
|
|
|
39
64
|
Next steps:
|
|
40
65
|
1. Configure credentials: npx huaweicloud-devkit auth init
|
|
41
66
|
2. Restart Hermes Agent session (MCP tools load on restart)
|
|
42
67
|
3. Verify: hermes doctor
|
|
43
|
-
4. Try: "Help me check my ECS instances" or "Deploy this website to OBS"
|
|
68
|
+
4. Try: "Help me check my ECS instances on Huawei Cloud" or "Deploy this website to Huawei Cloud OBS"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
description: Self-check Huawei Cloud DevKit readiness — hcloud, MCP, skills, auth.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Use HuaweiCloud DevKit tools
|
|
5
|
+
Use HuaweiCloud DevKit tools to perform a comprehensive readiness check:
|
|
6
6
|
|
|
7
7
|
1. Check if KooCLI `hcloud` is installed: `huaweicloud_check_cli`. If not, guide user to install.
|
|
8
8
|
2. Check if hcloud has active credentials: `hcloud configure list` (redacted).
|
|
9
|
-
3. List
|
|
9
|
+
3. List the devkit skill inventory via `huaweicloud_list_packs` (each pack carries its skill names) and browse the effective skill catalog with `huaweicloud_list_skills` (which skills are ENABLED is pack-gated and can change at runtime). Service skills are server data disclosed over MCP, never files in `~/.config/opencode/skills/` (the stdio MCP server instructions state `skillRoot`, the server-side tree's location, at initialize, and the list_skills payload carries it too — the default load path is action-first: attempt the direct read, the attempt itself is the reachability check; if the attempted read fails or is denied, fall back to `huaweicloud_retrieve_skill` — it needs no file access); the six core meta-skills (`huaweicloud-*`) are additionally installed there as native copies for system-prompt visibility, and `npx huaweicloud-devkit doctor` verifies them against the installed payload.
|
|
10
10
|
4. Verify MCP server is reachable by calling any read-only tool.
|
|
11
11
|
5. Summarize: installed (OK) vs missing (action needed).
|
|
12
12
|
6. Do not print AK/SK, tokens, passwords, credential files, or raw profile secrets.
|
|
13
|
+
7. If direct skill reads prompt for approval, delegate to `npx huaweicloud-devkit doctor` — it verifies the skills-tree permission seam (the installer writes an `external_directory` allow paired with an `edit` deny; honest semantics: the allow covers every path-taking tool including bash — shell-mediated writes to the tree stop asking — while the edit deny governs only the edit tools) and prints remediation when rules are missing or user-owned.
|
|
13
14
|
|
|
14
15
|
If MCP tools are unavailable (fresh install), run `npx huaweicloud-devkit doctor` in terminal.
|
|
@@ -13,18 +13,28 @@ function debugLog(msg) {
|
|
|
13
13
|
if (!DEBUG) return;
|
|
14
14
|
try {
|
|
15
15
|
appendFileSync(join(agentDir, 'plugin-debug.log'), `${new Date().toISOString()} ${msg}\n`);
|
|
16
|
-
} catch (_) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function isHuaweiCloudSkill(name) {
|
|
20
|
-
return typeof name === 'string' && name && /^huawei/i.test(name);
|
|
16
|
+
} catch (_) {
|
|
17
|
+
// best-effort: debug logging must never break the hook itself
|
|
18
|
+
}
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
function writeEvent(key, value, extra = {}) {
|
|
22
|
+
// The telemetry opt-out must gate the LOCAL spool too: while off,
|
|
23
|
+
// nothing is collected (no hook-events.jsonl growth) and nothing is
|
|
24
|
+
// transmitted later (the file is only ingested when enabled).
|
|
25
|
+
if (process.env.HUAWEICLOUD_DEVKIT_TELEMETRY === 'off') return;
|
|
26
|
+
// cli:* values carry the hcloud command tail — trim to the
|
|
27
|
+
// Service+Operation prefix so file paths, bucket names, and flag
|
|
28
|
+
// values never ride along (matches the MCP face's trim in tools.ts).
|
|
29
|
+
if (typeof value === 'string' && key.startsWith('cli:')) {
|
|
30
|
+
value = value.split(/\s+/).slice(0, 3).join(' ');
|
|
31
|
+
}
|
|
24
32
|
const data = JSON.stringify({ key, value, ...extra }) + '\n';
|
|
25
33
|
try {
|
|
26
34
|
appendFileSync(join(agentDir, 'hook-events.jsonl'), data);
|
|
27
|
-
} catch (_) {
|
|
35
|
+
} catch (_) {
|
|
36
|
+
// best-effort: telemetry must never break the tool call it observes
|
|
37
|
+
}
|
|
28
38
|
}
|
|
29
39
|
|
|
30
40
|
// ── CLI command classification ────────────────────────────────
|
|
@@ -58,100 +68,70 @@ function classifyHcloud(text) {
|
|
|
58
68
|
}
|
|
59
69
|
|
|
60
70
|
// ── Shared hooks ──────────────────────────────────────────────
|
|
71
|
+
//
|
|
72
|
+
// Only the bash hcloud classifier lives here: direct shell invocations have
|
|
73
|
+
// no MCP-side telemetry path. Service skills are server data disclosed over
|
|
74
|
+
// MCP and never installed natively, so their retrieval telemetry rides
|
|
75
|
+
// trackSkillRetrieve inside huaweicloud_retrieve_skill. Direct reads via the
|
|
76
|
+
// skillRoot the stdio server instructions state at initialize (and the
|
|
77
|
+
// list_skills payload carries) are observable only as catalog calls within
|
|
78
|
+
// telemetry (tool:huaweicloud_list_skills) — the instructions emission
|
|
79
|
+
// itself is trace-file-only (the e2e seam), never a telemetry event — and
|
|
80
|
+
// neither channel shows which skill file was consumed; the same blind spot
|
|
81
|
+
// native loads have, by design. The six core meta-skills are additionally
|
|
82
|
+
// installed as native copies (system-prompt disclosure), and those native
|
|
83
|
+
// loads produce no telemetry by design.
|
|
84
|
+
|
|
85
|
+
// The one shared classification body: both the V1 string-keyed hook and the
|
|
86
|
+
// V2 context-registered hook feed bash commands through it.
|
|
87
|
+
function trackBashCommand(cmd) {
|
|
88
|
+
try {
|
|
89
|
+
debugLog('HOOK tool.execute.before tool=bash');
|
|
90
|
+
if (!cmd) return;
|
|
91
|
+
const result = classifyHcloud(cmd);
|
|
92
|
+
if (result) writeEvent(result.key, result.value, { capability: 'cli' });
|
|
93
|
+
} catch (error) {
|
|
94
|
+
debugLog(`HOOK ERROR: ${error?.message || error}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
61
97
|
|
|
62
98
|
function getHooks() {
|
|
63
99
|
return {
|
|
64
100
|
'tool.execute.before': function (input, output) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (input.tool === 'skill') {
|
|
68
|
-
const name = output?.args?.name;
|
|
69
|
-
debugLog(`SKILL name=${name}`);
|
|
70
|
-
if (isHuaweiCloudSkill(name)) {
|
|
71
|
-
writeEvent('skill:retrieve', name);
|
|
72
|
-
debugLog(`SKILL TRACKED: ${name}`);
|
|
73
|
-
}
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
if (input.tool === 'bash') {
|
|
77
|
-
const cmd = output?.args?.command || '';
|
|
78
|
-
if (!cmd) return;
|
|
79
|
-
const result = classifyHcloud(cmd);
|
|
80
|
-
if (result) writeEvent(result.key, result.value, { capability: 'cli' });
|
|
81
|
-
}
|
|
82
|
-
} catch (error) {
|
|
83
|
-
debugLog(`HOOK ERROR: ${error?.message || error}`);
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
event: function ({ event }) {
|
|
87
|
-
try {
|
|
88
|
-
if (event?.type === 'message.part.updated') {
|
|
89
|
-
const text = event?.properties?.part?.text;
|
|
90
|
-
if (typeof text === 'string') {
|
|
91
|
-
const m = text.match(/Base directory for this skill:\s*.*?skills[/\\]([a-z0-9-]+)/i);
|
|
92
|
-
if (m && isHuaweiCloudSkill(m[1])) writeEvent('skill:retrieve', m[1]);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
} catch (error) {
|
|
96
|
-
debugLog(`EVENT ERROR: ${error?.message || error}`);
|
|
97
|
-
}
|
|
101
|
+
if (input?.tool !== 'bash') return;
|
|
102
|
+
trackBashCommand(output?.args?.command || '');
|
|
98
103
|
},
|
|
99
104
|
};
|
|
100
105
|
}
|
|
101
106
|
|
|
102
|
-
// ──
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
//
|
|
107
|
+
// ── Export: dual export serves OpenCode V1 and V2 ─────────────
|
|
108
|
+
//
|
|
109
|
+
// V1 loader: `server()` -> returns the legacy string-keyed hooks map.
|
|
110
|
+
// V2 loader: `id` + `setup(ctx)` -> registers hooks on the owning context
|
|
111
|
+
// domains: `ctx.tool.hook('execute.before', ...)` whose single event carries
|
|
112
|
+
// `.tool` and `.input` (replacing V1's (input, output) pair).
|
|
113
|
+
//
|
|
114
|
+
// Deviation from main 1.1.9's setupV2, deliberate: main additionally tracked
|
|
115
|
+
// `skill` tool events and message.part.updated skill-root reads here. This
|
|
116
|
+
// tree's server-data doctrine (guarded by structure.test.ts's hook deny)
|
|
117
|
+
// keeps skill-load classification OUT of the hooks — skill retrieval
|
|
118
|
+
// telemetry rides trackSkillRetrieve on the MCP face, and native/direct
|
|
119
|
+
// loads are a designed blind spot. The V2 port therefore registers only the
|
|
120
|
+
// bash hcloud classifier, the one channel with no MCP-side telemetry path.
|
|
121
|
+
|
|
106
122
|
async function setupV2(ctx) {
|
|
107
123
|
await ctx.tool.hook('execute.before', (event) => {
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
}
|
|
124
|
+
if (event?.tool !== 'bash') return;
|
|
125
|
+
trackBashCommand(event?.input?.command ?? event?.args?.command ?? '');
|
|
128
126
|
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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();
|
|
127
|
+
// No-op cleanup, same shape main's setupV2 returned: a V2 host may invoke
|
|
128
|
+
// the setup return value unguarded, and undefined is not callable. There is
|
|
129
|
+
// nothing to tear down (no event subscription in this doctrine).
|
|
130
|
+
return () => {};
|
|
148
131
|
}
|
|
149
132
|
|
|
150
|
-
//
|
|
151
|
-
//
|
|
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).
|
|
133
|
+
// `Plugin.define` is a type/runtime helper injected lazily so a V1 host that
|
|
134
|
+
// lacks `@opencode/plugin` still loads (fallback to an identity define).
|
|
155
135
|
let Plugin = { define: (def) => def };
|
|
156
136
|
try {
|
|
157
137
|
const require = createRequire(import.meta.url);
|
|
@@ -166,11 +146,11 @@ try {
|
|
|
166
146
|
Plugin = mod;
|
|
167
147
|
break;
|
|
168
148
|
}
|
|
169
|
-
} catch {
|
|
149
|
+
} catch (_) {
|
|
170
150
|
// not installed in this host; keep the identity define
|
|
171
151
|
}
|
|
172
152
|
}
|
|
173
|
-
} catch {
|
|
153
|
+
} catch (_) {
|
|
174
154
|
// createRequire unavailable; keep the identity define
|
|
175
155
|
}
|
|
176
156
|
|
|
@@ -182,6 +162,7 @@ export default {
|
|
|
182
162
|
},
|
|
183
163
|
}),
|
|
184
164
|
async server() {
|
|
165
|
+
debugLog('=== PLUGIN EXPORT CALLED ===');
|
|
185
166
|
return getHooks();
|
|
186
167
|
},
|
|
187
168
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://opencode.ai/config.json",
|
|
3
|
-
"_note": "Merge this into ~/.config/opencode/opencode.jsonc
|
|
3
|
+
"_note": "Merge this into ~/.config/opencode/opencode.jsonc. Replace the path with the absolute path to your mcp-server.js installation.",
|
|
4
4
|
"mcp": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
5
|
+
"huaweicloud-devkit": {
|
|
6
|
+
"type": "local",
|
|
7
|
+
"command": ["node", "<绝对路径>/plugins/huaweicloud-core/dist/mcp-server.js"],
|
|
8
|
+
"enabled": true
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""WorkBuddy PostToolUse Hook — Huawei Cloud telemetry data collection.
|
|
3
3
|
|
|
4
|
-
Captures
|
|
4
|
+
Captures hcloud CLI commands and MCP tool invocations,
|
|
5
5
|
writing structured events to hook-events.jsonl for the devkit telemetry
|
|
6
6
|
module to ingest and report.
|
|
7
7
|
|
|
@@ -12,7 +12,16 @@ Data flow:
|
|
|
12
12
|
stdin JSON (PostToolUse event) → classify → hook-events.jsonl
|
|
13
13
|
→ MCP Server telemetry.mjs :: ingestHookEvents() → eventQueue → HTTP POST
|
|
14
14
|
|
|
15
|
-
Classification
|
|
15
|
+
Classification: only the hcloud CLI classifier and MCP tool invocations
|
|
16
|
+
(never skill-tool loads). Service skills are server data
|
|
17
|
+
disclosed over MCP and never installed natively, so skill-retrieval telemetry
|
|
18
|
+
rides trackSkillRetrieve inside huaweicloud_retrieve_skill; direct reads via
|
|
19
|
+
the stdio skillRoot disclosure (server instructions at initialize, or the
|
|
20
|
+
list_skills payload) are observable only as catalog calls within telemetry —
|
|
21
|
+
the instructions emission itself is trace-file-only (the e2e seam), never a
|
|
22
|
+
telemetry event — and neither channel shows which skill file was consumed.
|
|
23
|
+
The six core meta-skills are installed as native copies (system-prompt
|
|
24
|
+
disclosure); those loads produce no telemetry by design.
|
|
16
25
|
"""
|
|
17
26
|
|
|
18
27
|
import json
|
|
@@ -31,10 +40,9 @@ def _get_plugin_dir():
|
|
|
31
40
|
1. HUAWEICLOUD_PLUGIN_DIR env var (explicit override)
|
|
32
41
|
2. Dev repo: scripts/ → ../plugins/... (local dev)
|
|
33
42
|
3. ~/.workbuddy/huaweicloud-plugins/ (WorkBuddy installed)
|
|
34
|
-
4. ~/.
|
|
35
|
-
5. ~/.
|
|
36
|
-
6. ~/.
|
|
37
|
-
7. ~/.config/opencode/huaweicloud-plugins/ (OpenCode)
|
|
43
|
+
4. ~/.hermes/huaweicloud-plugins/ (Hermes)
|
|
44
|
+
5. ~/.dsh/huaweicloud-plugins/ (DSH)
|
|
45
|
+
6. ~/.config/opencode/huaweicloud-plugins/ (OpenCode)
|
|
38
46
|
8. ~/.codex/huaweicloud-plugins/ (Codex)
|
|
39
47
|
"""
|
|
40
48
|
env_dir = os.environ.get("HUAWEICLOUD_PLUGIN_DIR")
|
|
@@ -59,15 +67,6 @@ def _get_plugin_dir():
|
|
|
59
67
|
if platform_dir.is_dir():
|
|
60
68
|
return platform_dir
|
|
61
69
|
|
|
62
|
-
# Skills fallback: {home}/.workbuddy/skills/huawei-*/.../plugins/...
|
|
63
|
-
skills_root = home / ".workbuddy" / "skills"
|
|
64
|
-
if skills_root.is_dir():
|
|
65
|
-
for skill_dir in sorted(skills_root.iterdir()):
|
|
66
|
-
if skill_dir.is_dir() and skill_dir.name.lower().startswith("huawei"):
|
|
67
|
-
plugin_dir = skill_dir / "plugins" / "huaweicloud-core"
|
|
68
|
-
if plugin_dir.is_dir():
|
|
69
|
-
return plugin_dir
|
|
70
|
-
|
|
71
70
|
raise FileNotFoundError("Cannot resolve huaweicloud-core plugin directory")
|
|
72
71
|
|
|
73
72
|
|
|
@@ -91,7 +90,7 @@ def _get_hook_events_path():
|
|
|
91
90
|
return None
|
|
92
91
|
|
|
93
92
|
|
|
94
|
-
# ── Classifiers (
|
|
93
|
+
# ── Classifiers (hcloud CLI, unbounded-capture variant) ────────────
|
|
95
94
|
|
|
96
95
|
# hcloud command detection
|
|
97
96
|
HCLOUD_RE = re.compile(r'(?:^|[;&|]\s*)hcloud(?:\.exe)?\s+(.+)', re.IGNORECASE)
|
|
@@ -110,9 +109,6 @@ WRITE_VERBS = re.compile(
|
|
|
110
109
|
r'Reboot|Suspend|Resume|Terminate|Release|Allocate)\w*', re.IGNORECASE
|
|
111
110
|
)
|
|
112
111
|
|
|
113
|
-
# Huawei Cloud skill name pattern
|
|
114
|
-
HUAWEI_SKILL_RE = re.compile(r'^huawei', re.IGNORECASE)
|
|
115
|
-
|
|
116
112
|
|
|
117
113
|
def classify_hcloud(text):
|
|
118
114
|
"""Classify an hcloud CLI command as read / write / invoke.
|
|
@@ -122,7 +118,6 @@ def classify_hcloud(text):
|
|
|
122
118
|
|
|
123
119
|
Returns:
|
|
124
120
|
dict with 'key' and 'value', or None if not an hcloud command.
|
|
125
|
-
Matches the classifyHcloud() logic in skill-tracker.js.
|
|
126
121
|
"""
|
|
127
122
|
m = HCLOUD_RE.search(text)
|
|
128
123
|
if not m:
|
|
@@ -144,11 +139,6 @@ def classify_hcloud(text):
|
|
|
144
139
|
return {'key': 'cli:invoke', 'value': f'hcloud {cmd}'}
|
|
145
140
|
|
|
146
141
|
|
|
147
|
-
def is_huawei_skill(name):
|
|
148
|
-
"""Check if a skill name belongs to Huawei Cloud."""
|
|
149
|
-
return name and HUAWEI_SKILL_RE.search(name)
|
|
150
|
-
|
|
151
|
-
|
|
152
142
|
# ── Event writer ────────────────────────────────────────────────────
|
|
153
143
|
|
|
154
144
|
def write_event(key, value, extra=None):
|
|
@@ -157,10 +147,19 @@ def write_event(key, value, extra=None):
|
|
|
157
147
|
Format matches OpenCode/DSH output exactly:
|
|
158
148
|
{"key": "...", "value": "...", "capability": "..."}
|
|
159
149
|
"""
|
|
150
|
+
# Telemetry opt-out gates the local spool too (no collection while
|
|
151
|
+
# off, so nothing is transmitted retroactively on re-enable).
|
|
152
|
+
if os.environ.get("HUAWEICLOUD_DEVKIT_TELEMETRY") == "off":
|
|
153
|
+
return
|
|
160
154
|
path = _get_hook_events_path()
|
|
161
155
|
if not path:
|
|
162
156
|
return # Best-effort: silently skip if path is unresolvable
|
|
163
157
|
|
|
158
|
+
# cli:* values carry the hcloud command tail — trim to Service+
|
|
159
|
+
# Operation so file paths / bucket names / flag values never ride
|
|
160
|
+
# along (matches the MCP face's trim in tools.ts).
|
|
161
|
+
if isinstance(value, str) and key.startswith("cli:"):
|
|
162
|
+
value = " ".join(value.split()[:3])
|
|
164
163
|
event = {"key": key, "value": value}
|
|
165
164
|
if extra:
|
|
166
165
|
event.update(extra)
|
|
@@ -184,25 +183,8 @@ def main():
|
|
|
184
183
|
tool_name = data.get("tool_name", "")
|
|
185
184
|
tool_input = data.get("tool_input", {})
|
|
186
185
|
|
|
187
|
-
# ── Category 1:
|
|
188
|
-
if tool_name == "
|
|
189
|
-
skill_name = ""
|
|
190
|
-
if isinstance(tool_input, dict):
|
|
191
|
-
# WorkBuddy: {"skill": "huawei-ecs"}
|
|
192
|
-
# OpenCode/Hermes may use "command" or "args"
|
|
193
|
-
skill_name = (
|
|
194
|
-
tool_input.get("skill", "")
|
|
195
|
-
or tool_input.get("command", "")
|
|
196
|
-
or tool_input.get("args", "")
|
|
197
|
-
)
|
|
198
|
-
elif isinstance(tool_input, str):
|
|
199
|
-
skill_name = tool_input
|
|
200
|
-
|
|
201
|
-
if is_huawei_skill(skill_name):
|
|
202
|
-
write_event('skill:retrieve', skill_name)
|
|
203
|
-
|
|
204
|
-
# ── Category 2: Bash tool with hcloud commands ──
|
|
205
|
-
elif tool_name == "Bash":
|
|
186
|
+
# ── Category 1: Bash tool with hcloud commands ──
|
|
187
|
+
if tool_name == "Bash":
|
|
206
188
|
command = ""
|
|
207
189
|
if isinstance(tool_input, dict):
|
|
208
190
|
command = tool_input.get("command", "")
|
|
@@ -214,7 +196,7 @@ def main():
|
|
|
214
196
|
if result:
|
|
215
197
|
write_event(result['key'], result['value'], {'capability': 'cli'})
|
|
216
198
|
|
|
217
|
-
# ── Category
|
|
199
|
+
# ── Category 2: MCP Huawei Cloud tool invocations ──
|
|
218
200
|
elif tool_name.startswith("mcp__huaweicloud"):
|
|
219
201
|
write_event(f"tool:{tool_name}", "1", {'capability': 'mcp'})
|
|
220
202
|
|