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
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](https://github.com/huaweicloud/huaweicloud-devkit/actions/workflows/ci.yml)
|
|
6
6
|
[](https://www.npmjs.com/package/huaweicloud-devkit)
|
|
7
|
-
[](https://github.com/huaweicloud/huaweicloud-devkit)
|
|
8
8
|
|
|
9
9
|
**[中文](README.zh-CN.md) | English**
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ Supports OpenCode, Codex, CodeArts Agent, WorkBuddy, DeepSeek Harness (DSH), Off
|
|
|
14
14
|
|
|
15
15
|
## Prerequisites
|
|
16
16
|
|
|
17
|
-
- Node.js >= 22
|
|
17
|
+
- Node.js >= 22.19
|
|
18
18
|
|
|
19
19
|
> **China mainland users**: If you experience slow downloads or connection issues with the default npm registry, configure the Huawei Cloud npm mirror:
|
|
20
20
|
>
|
|
@@ -47,7 +47,8 @@ The commands below are global (they act on every agent):
|
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
49
|
npx --yes huaweicloud-devkit version # print CLI version and installed plugin versions per agent
|
|
50
|
-
npx --yes huaweicloud-devkit
|
|
50
|
+
npx --yes huaweicloud-devkit packs status # per-agent pack surface (what DEVKIT_PACKS enables)
|
|
51
|
+
npx --yes huaweicloud-devkit uninstall --target all --clean-global # also remove KooCLI + OBS config + open-mcp-gateway
|
|
51
52
|
```
|
|
52
53
|
|
|
53
54
|
### OpenCode
|
|
@@ -358,7 +359,7 @@ HuaweiCloud DevKit collects **anonymous** telemetry to understand usage patterns
|
|
|
358
359
|
- **OS type and version** — e.g. `Linux`, `Darwin`, `Windows_NT`.
|
|
359
360
|
- **Capability** — how the event was triggered: `mcp` (MCP tool invocation) or `cli` (CLI command), derived from the event key.
|
|
360
361
|
- **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
|
+
- **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; for CLI events it is the trimmed `hcloud <Service> <Operation>` command summary — arguments, paths, and values are never included.
|
|
362
363
|
|
|
363
364
|
### What We Do **Not** Collect
|
|
364
365
|
|
|
@@ -370,7 +371,7 @@ HuaweiCloud DevKit collects **anonymous** telemetry to understand usage patterns
|
|
|
370
371
|
|
|
371
372
|
### How Data Is Transmitted
|
|
372
373
|
|
|
373
|
-
|
|
374
|
+
MCP-tool events are queued in memory; CLI events are staged in a local file (`telemetry/hook-events.jsonl` under the plugin directory) and ingested on the next flush. Events are 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
|
|
|
375
376
|
### Disable Telemetry (Opt-Out)
|
|
376
377
|
|
|
@@ -399,6 +400,16 @@ Debug logs are written to the plugin's `telemetry/telemetry-debug.log` file.
|
|
|
399
400
|
- **Pre-execution risk checks** — public exposure, credential leaks, and destructive operations are caught before they run
|
|
400
401
|
- **Regional awareness** — auto-discovers available regions and checks service availability before creating resources
|
|
401
402
|
- **Sandbox (DevStation)** — temporary cloud runtime for web app deployment with instant public URL preview
|
|
403
|
+
- **Capability packs (56 MCP tools)** — the devkit ships ten packs (core 12 tools; huaweicloud-cli carries the 20 service skills plus the 7 KooCLI execution tools; sandbox, auth, obs, voucher, update, discovery, secrets, huaweicloud-open-mcp for the rest). The huaweicloud-open-mcp pack proxies Huawei Cloud's full OpenAPI catalog through the local huaweicloud-open-mcp gateway with one generic call tool (`huaweicloud_gateway_call`: search_apis → list_apis → get_api discovery, execute_api with gateway-engine-gated consent; install the gateway with pip or uv, or just have `uvx` on PATH — no persistent install needed). Discover packs with `huaweicloud_list_packs` → `huaweicloud_pack_info`, browse the effective skill catalog with `huaweicloud_list_skills` (every enabled pack's skills with name, description, version, and reference filenames in one call, plus `skillRoot` — the tree's absolute location; which skills are ENABLED is pack-gated and can change at runtime, so a `huawei-*` service skill absent from the catalog belongs to a trimmed pack — the six `huaweicloud-*` meta-skills never appear in it and are always available), read the skill files directly under `skillRoot` on a same-machine install (the stdio server instructions state the location at initialize, so no catalog call is needed just to start reading; the taught policy is action-first — attempt the direct read, the attempt itself is the reachability check), and fall back to `huaweicloud_retrieve_skill` only when the attempted read fails or is denied — the taught reaction is falling back (the loader needs no file access), never repeatedly requesting. (the gated, telemetry-bearing, portable fallback, whose stdio payload also carries `skillRoot`; the six core meta-skills are additionally installed as native skill copies on directory-loading agents for system-prompt visibility). Trim the surface with `DEVKIT_PACKS` (comma-separated pack ids, e.g. `DEVKIT_PACKS=core,sandbox`); unset means all packs, unknown ids fail fast at startup, and core (pack meta, safety and discovery surface) is always included — trimming huaweicloud-cli removes the CLI execution face and its approval tools together. In a live stdio agent session, `huaweicloud_packs_configure` enables or disables packs on the spot (session-scoped; the refreshed tool list is pushed to the agent, and restarting the session restores the operator posture; the stateless remote surface does not carry it). Manage the surface persistently after install with `npx huaweicloud-devkit packs status | enable <ids> | disable <ids> | all [--target <agent>]`: the command rewrites `DEVKIT_PACKS` inside every installed agent's MCP config (the install-time `--packs` flag never overwrites an existing value), and the change takes effect on the agent's next session restart.
|
|
404
|
+
|
|
405
|
+
Harness permission notes (skill-tree reads outside the workspace): the taught reaction above is universal — when a direct read fails or is denied, fall back to `huaweicloud_retrieve_skill`, never repeatedly request. The OpenCode installer writes a persistent permission seam (external_directory allow + edit deny over the tree globs); on other harnesses the operator can pre-allow the tree in the harness's own config if prompts bother them. Honest semantics for the seam: the allow covers every path-taking tool including bash (an allowed external directory inherits workspace defaults), so shell-mediated writes to the tree stop asking too — the edit deny governs only the edit tools; the tree is regenerated on every install/update, and the devkit's PreToolUse hook still denies hcloud writes.
|
|
406
|
+
|
|
407
|
+
| Harness | Outside-workspace reads | Operator relief |
|
|
408
|
+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
409
|
+
| OpenCode | gated; the approval prompt scopes to the touched file's own directory and "always" is session-scoped (measured on 1.19.0) | handled by the installer (permission seam); legacy installs: re-run install, or see `npx huaweicloud-devkit doctor` |
|
|
410
|
+
| Claude Code | permission rules exist (not verified here) | `--add-dir <skillRoot>` / settings `additionalDirectories` (committed rules need workspace trust), or a `Read(~/...)` allow rule |
|
|
411
|
+
| Codex CLI | sandbox governs writes; reads generally unrestricted (not verified here; binary strings on 0.162.x) | none needed |
|
|
412
|
+
| Others (dsh, hermes, workbuddy, atomcode, codearts, officeace, openclaw) | no known read gating (not verified here) | — |
|
|
402
413
|
|
|
403
414
|
## Supported Services
|
|
404
415
|
|
package/README.zh-CN.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](https://github.com/huaweicloud/huaweicloud-devkit/actions/workflows/ci.yml)
|
|
6
6
|
[](https://www.npmjs.com/package/huaweicloud-devkit)
|
|
7
|
-
[](https://github.com/huaweicloud/huaweicloud-devkit)
|
|
8
8
|
|
|
9
9
|
**中文 | [English](README.md)**
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
## 前置条件
|
|
16
16
|
|
|
17
|
-
- Node.js >= 22
|
|
17
|
+
- Node.js >= 22.19
|
|
18
18
|
|
|
19
19
|
> **国内用户**:使用默认 npm 镜像时可能遇到下载缓慢或连接失败的问题,建议配置华为云 npm 镜像:
|
|
20
20
|
>
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
npx --yes huaweicloud-devkit version # 查看 CLI 版本和各 agent 已安装的插件版本
|
|
46
|
-
npx --yes huaweicloud-devkit
|
|
46
|
+
npx --yes huaweicloud-devkit packs status # 查看各 agent 的能力包启用面(DEVKIT_PACKS)
|
|
47
|
+
npx --yes huaweicloud-devkit uninstall --target all --clean-global # 一并删除 KooCLI、OBS 配置与 open-mcp-gateway
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
### OpenCode
|
|
@@ -352,7 +353,7 @@ HuaweiCloud DevKit 收集**匿名**遥测数据,以了解使用模式并改进
|
|
|
352
353
|
- **OS 类型和版本** — 如 `Linux`、`Darwin`、`Windows_NT`。
|
|
353
354
|
- **Capability** — 事件触发方式:`mcp`(MCP 工具调用)或 `cli`(CLI 命令),由事件 key 派生。
|
|
354
355
|
- **事件类型** — 发生了什么,如 `plugin:install`(安装)、`plugin:first_use`(首次使用)、`dau:active_today`(日活)、`tool:<工具名>`(工具调用)、`skill:retrieve`(技能加载)、`sandbox:connect`(沙箱连接)。
|
|
355
|
-
- **事件值** — 简短的脱敏字符串(最长 255 字符,换行符/制表符已清除)。工具事件通常为 `1
|
|
356
|
+
- **事件值** — 简短的脱敏字符串(最长 255 字符,换行符/制表符已清除)。工具事件通常为 `1`;技能加载事件为技能名称;CLI 事件为截断后的 `hcloud <Service> <Operation>` 命令摘要——不包含任何参数、路径或值。
|
|
356
357
|
|
|
357
358
|
### **不**收集哪些数据
|
|
358
359
|
|
|
@@ -364,7 +365,7 @@ HuaweiCloud DevKit 收集**匿名**遥测数据,以了解使用模式并改进
|
|
|
364
365
|
|
|
365
366
|
### 数据如何传输
|
|
366
367
|
|
|
367
|
-
|
|
368
|
+
MCP 工具事件在内存中排队;CLI 事件先暂存于本地文件(插件目录下的 `telemetry/hook-events.jsonl`)并在下一轮刷新时摄取。事件每 60 秒批量(每批最多 100 条)通过 HTTP POST 发送到华为云遥测端点。传输过程遵循你的代理配置。发送失败最多重试 3 次后丢弃。
|
|
368
369
|
|
|
369
370
|
### 禁用遥测(Opt-Out)
|
|
370
371
|
|
|
@@ -393,6 +394,16 @@ export HUAWEICLOUD_DEVKIT_DEBUG=true
|
|
|
393
394
|
- **执行前风险检查** — 公网暴露、凭证泄露、破坏性操作在执行前即被拦截
|
|
394
395
|
- **区域感知** — 自动发现可用区域,创建资源前检查服务可用性
|
|
395
396
|
- **沙箱(DevStation)** — 临时云端运行环境,部署 Web 应用并即刻获得公网预览地址
|
|
397
|
+
- **能力包(56 个 MCP 工具)** — 内置十个能力包(core 12 个工具;huaweicloud-cli 承载 20 个服务技能外加 7 个 KooCLI 执行工具;sandbox、auth、obs、voucher、update、discovery、secrets、huaweicloud-open-mcp 合计其余 37 个)。huaweicloud-open-mcp 包经本地 huaweicloud-open-mcp 网关代理华为云全量 OpenAPI 目录,统一走一个泛型调用工具(`huaweicloud_gateway_call`:search_apis → list_apis → get_api 发现链,execute_api 由网关 policy engine 把关同意;网关可用 pip 或 uv 安装,PATH 上有 `uvx` 即无需持久安装)。用 `huaweicloud_list_packs` → `huaweicloud_pack_info` 发现能力包,用 `huaweicloud_list_skills` 一次调用浏览有效技能目录(每个已启用包的技能名称、描述、版本与引用文件名;stdio 会话的载荷还携带 `skillRoot`——技能树绝对路径;哪些技能**已启用**由 pack 开关决定且可在运行时变化,不在目录里的 `huawei-*` 服务技能属于被裁剪的包——六个 `huaweicloud-*` 元技能按设计不进目录、始终可用),同机安装默认直读 `<skillRoot>/<name>/SKILL.md` 与 `references/`(stdio 会话的 MCP 服务器 instructions 在 initialize 即给出树路径,仅为了开始读取无需先调目录;教学行为是动作优先——先尝试直读,尝试本身就是可达性检查,不做预判),直读失败/被拒时才回退 `huaweicloud_retrieve_skill`(该工具无需文件权限),绝不反复请求。(受门控、带遥测、remote 面依赖的可移植回退路径,其 stdio 载荷同样携带 `skillRoot`;六个核心元技能在目录加载型 agent 上额外以原生副本安装以获得系统提示可见性)。可用 `DEVKIT_PACKS` 裁剪启用面(逗号分隔的包 id,如 `DEVKIT_PACKS=core,sandbox`);未设置即全量启用,未知 id 启动即报错,core(包元数据、安全与发现面)始终强制包含——裁剪 huaweicloud-cli 会同时移除 CLI 执行面及其审批工具。stdio 会话内可用 `huaweicloud_packs_configure` 即时开关能力包(仅会话内生效,刷新后的工具列表立即推给 agent,重启会话即回到操作者姿态;无状态 remote 面不提供该工具)。安装后可用 `npx huaweicloud-devkit packs status | enable <ids> | disable <ids> | all [--target <agent>]` 持久管理启用面:该命令直接改写各已安装 agent MCP 配置里的 `DEVKIT_PACKS`(安装期 `--packs` 不会覆盖已有值),重启会话后生效。
|
|
398
|
+
|
|
399
|
+
Harness 权限说明(工作目录外的技能树读取):上文的通用教学行为是直读失败/被拒时回退 `huaweicloud_retrieve_skill`,绝不反复请求。OpenCode 安装器会写入持久权限缝(对技能树 glob 的 external_directory allow + edit deny);其他 harness 上若弹窗困扰,操作者可在其自身配置里预授权技能树。权限缝的真实语义:allow 覆盖一切带路径工具(含 bash——被 allow 的外部目录继承工作区默认),bash 介导的树写入也不再询问,edit deny 只罩编辑工具族;技能树每次安装/更新都会再生,devkit 的 PreToolUse hook 仍拒绝 hcloud 写操作。
|
|
400
|
+
|
|
401
|
+
| Harness | 工作目录外读取 | 操作者救济 |
|
|
402
|
+
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
403
|
+
| OpenCode | 有门控;审批弹窗按被触文件所在目录请求,"always" 仅会话内(实测 1.19.0) | 安装器已处理(权限缝);存量安装:重跑 install,或看 `npx huaweicloud-devkit doctor` |
|
|
404
|
+
| Claude Code | 存在权限规则(此处未验证) | `--add-dir <skillRoot>` / settings `additionalDirectories`(提交进仓库的规则需 workspace trust),或 `Read(~/...)` allow 规则 |
|
|
405
|
+
| Codex CLI | 沙箱管写、读基本不受限(此处未验证;0.162.x 二进制字串佐证) | 无需配置 |
|
|
406
|
+
| 其他(dsh、hermes、workbuddy、atomcode、codearts、officeace、openclaw) | 未知读取门控(此处未验证) | — |
|
|
396
407
|
|
|
397
408
|
## 支持的服务
|
|
398
409
|
|
package/bin/dsh-postinstall.cjs
CHANGED
|
@@ -15,7 +15,17 @@ if (!cwd.startsWith(profilesRoot)) {
|
|
|
15
15
|
process.exit(0);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
// ── Inside a DSH profile
|
|
18
|
+
// ── Inside a DSH profile ──
|
|
19
|
+
// The core meta-skills are disclosed natively in ~/.dsh/skills (refreshed
|
|
20
|
+
// here for the npm-in-profile layout, and by the setup CLI's install/update
|
|
21
|
+
// for the plugin-dir layout); every non-core skill stays off the native
|
|
22
|
+
// surface so DEVKIT_PACKS gating holds (its disclosure is the MCP catalog,
|
|
23
|
+
// plus the stdio skillRoot location the server instructions state at
|
|
24
|
+
// initialize and list_skills carries — both
|
|
25
|
+
// disclosure-level). The pack claims come from the shipped
|
|
26
|
+
// manifest — when it is missing or unusable this script refuses to mutate
|
|
27
|
+
// anything rather than guess the core set (a wrong guess would purge the
|
|
28
|
+
// very copies it should refresh).
|
|
19
29
|
const packageRoot = path.resolve(__dirname, '..');
|
|
20
30
|
|
|
21
31
|
// Rewrite the bundled patch's relative MCP server path to the absolute package
|
|
@@ -23,9 +33,9 @@ const packageRoot = path.resolve(__dirname, '..');
|
|
|
23
33
|
// is started outside the profile directory. Idempotent: absolute paths are kept.
|
|
24
34
|
const bundledPatch = path.join(packageRoot, 'cordis.patch.yml');
|
|
25
35
|
if (fs.existsSync(bundledPatch)) {
|
|
26
|
-
const relativeArg = './node_modules/huaweicloud-devkit/plugins/huaweicloud-core/
|
|
36
|
+
const relativeArg = './node_modules/huaweicloud-devkit/plugins/huaweicloud-core/dist/mcp-server.js';
|
|
27
37
|
const absoluteArg = path
|
|
28
|
-
.join(packageRoot, 'plugins', 'huaweicloud-core', '
|
|
38
|
+
.join(packageRoot, 'plugins', 'huaweicloud-core', 'dist', 'mcp-server.js')
|
|
29
39
|
.replace(/\\/g, '/')
|
|
30
40
|
.replace(/'/g, "''");
|
|
31
41
|
const patch = fs.readFileSync(bundledPatch, 'utf8');
|
|
@@ -38,40 +48,170 @@ if (fs.existsSync(bundledPatch)) {
|
|
|
38
48
|
|
|
39
49
|
const skillsSrc = path.join(packageRoot, 'plugins', 'huaweicloud-core', 'skills');
|
|
40
50
|
const skillsDest = path.join(dshHome, 'skills');
|
|
51
|
+
const manifestPath = path.join(skillsSrc, '.manifest.json');
|
|
41
52
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
// One receipt and one roster implementation: the compiled dist copies of
|
|
54
|
+
// the same zod-free modules the setup CLI imports, so the two writers of
|
|
55
|
+
// ~/.dsh/skills can never drift on the receipt's state machine (the
|
|
56
|
+
// shape-broken boundary is classified identically everywhere). Loaded via
|
|
57
|
+
// dynamic import() of a file URL — the same pattern bin/setup.cjs uses —
|
|
58
|
+
// because the dist libs are ESM and require(esm) exists only on newer
|
|
59
|
+
// Node runtimes than a DSH host is guaranteed to carry; the sync must not
|
|
60
|
+
// silently depend on the host's Node version. A dist/ that is truly
|
|
61
|
+
// missing or unreadable is a broken package — the server cannot start —
|
|
62
|
+
// so warn and skip the sync rather than fail the npm install.
|
|
63
|
+
const libUrl = (name) =>
|
|
64
|
+
require('node:url').pathToFileURL(path.join(packageRoot, 'plugins', 'huaweicloud-core', 'dist', 'lib', name)).href;
|
|
46
65
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
66
|
+
async function syncNativeSkills() {
|
|
67
|
+
// Returns whether the package (and its MCP server) is healthy: the
|
|
68
|
+
// trailing availability hint must never follow a 'will refuse to start'
|
|
69
|
+
// diagnosis in the same output.
|
|
70
|
+
let shared;
|
|
71
|
+
try {
|
|
72
|
+
shared = {
|
|
73
|
+
receipt: await import(libUrl('native-receipt.js')),
|
|
74
|
+
roster: await import(libUrl('skill-manifest.js')),
|
|
75
|
+
};
|
|
76
|
+
} catch (error) {
|
|
77
|
+
if (error && (error.code === 'ERR_MODULE_NOT_FOUND' || error.code === 'ENOENT')) {
|
|
78
|
+
console.error(
|
|
79
|
+
'HuaweiCloud DevKit: dist/ missing or unreadable in the package — the MCP server will refuse to start. Reinstall the huaweicloud-devkit package.',
|
|
80
|
+
);
|
|
57
81
|
} else {
|
|
58
|
-
|
|
82
|
+
console.error(
|
|
83
|
+
`HuaweiCloud DevKit: could not load the shared dist libs (${error && (error.code || error.message) ? error.code || error.message : 'unknown error'}) — the native skill sync is skipped. Reinstall the huaweicloud-devkit package.`,
|
|
84
|
+
);
|
|
59
85
|
}
|
|
86
|
+
return false;
|
|
60
87
|
}
|
|
61
|
-
}
|
|
62
88
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
89
|
+
if (!fs.existsSync(skillsSrc) || !fs.existsSync(manifestPath)) {
|
|
90
|
+
console.error(
|
|
91
|
+
'HuaweiCloud DevKit: skills tree or manifest pack info missing from the package — the MCP server will refuse to start. Reinstall the huaweicloud-devkit package.',
|
|
92
|
+
);
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
let coreNames = null;
|
|
96
|
+
try {
|
|
97
|
+
coreNames = shared.roster.parseCoreSkillNames(fs.readFileSync(manifestPath, 'utf8'));
|
|
98
|
+
} catch {
|
|
99
|
+
// unparsable manifest: coreNames stays null and the guard below fires
|
|
100
|
+
}
|
|
101
|
+
if (coreNames === null) {
|
|
102
|
+
console.error(
|
|
103
|
+
'HuaweiCloud DevKit: skills tree or manifest pack info missing from the package — the MCP server will refuse to start. Reinstall the huaweicloud-devkit package.',
|
|
104
|
+
);
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
let owned = null;
|
|
108
|
+
try {
|
|
109
|
+
owned = new Set(
|
|
110
|
+
fs
|
|
111
|
+
.readdirSync(skillsSrc, { withFileTypes: true })
|
|
112
|
+
.filter((entry) => entry.isDirectory())
|
|
113
|
+
.map((entry) => entry.name),
|
|
114
|
+
);
|
|
115
|
+
} catch {
|
|
116
|
+
// unreadable source tree: broken package
|
|
117
|
+
}
|
|
118
|
+
if (owned === null) {
|
|
119
|
+
console.error(
|
|
120
|
+
'HuaweiCloud DevKit: skills tree unreadable in the package — the MCP server will refuse to start. Reinstall the huaweicloud-devkit package.',
|
|
121
|
+
);
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
// A manifest may claim core skills a partial/broken tree does not ship;
|
|
125
|
+
// cpSync would throw on them and fail the whole npm install. Place what
|
|
126
|
+
// exists, warn loudly about the rest — the receipt records only what was
|
|
127
|
+
// actually placed. The server's boot guard refuses a tree missing
|
|
128
|
+
// claimed skills, so a partial tree is a broken package for the trailing
|
|
129
|
+
// availability hint even when some core skills place.
|
|
130
|
+
const placeable = [...coreNames].filter((name) => owned.has(name));
|
|
131
|
+
const missing = [...coreNames].filter((name) => !owned.has(name));
|
|
132
|
+
const packageHealthy = missing.length === 0;
|
|
133
|
+
if (missing.length > 0) {
|
|
134
|
+
console.error(
|
|
135
|
+
`HuaweiCloud DevKit: core skill(s) claimed by the manifest but missing from the package tree: ${missing.join(', ')} — the MCP server will refuse to start. Reinstall the huaweicloud-devkit package.`,
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
if (placeable.length === 0) {
|
|
139
|
+
console.error('HuaweiCloud DevKit: no core skills placeable — skipping the native sync.');
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
// Receipt via the shared module: remembered names are read with the same
|
|
143
|
+
// shape validation and corrupt classification the setup CLI applies, and
|
|
144
|
+
// the rewrite records this layout — the marketplace marker doctor trusts
|
|
145
|
+
// (plugin-dir installs never run this script).
|
|
146
|
+
const receipt = shared.receipt.readNativeReceipt(skillsDest);
|
|
147
|
+
if (receipt && receipt.kind === 'corrupt') {
|
|
148
|
+
console.error(`HuaweiCloud DevKit: unreadable native receipt in ${skillsDest} — this run rewrites it.`);
|
|
149
|
+
}
|
|
150
|
+
const remembered = receipt && receipt.kind === 'ok' ? receipt.receipt.names : [];
|
|
151
|
+
// The native layer is disclosure; the MCP server remains the functional
|
|
152
|
+
// path. A destination-side failure (locked dir, permissions, disk full)
|
|
153
|
+
// must warn and leave the npm install green, mirroring the setup CLI's
|
|
154
|
+
// syncNativeCoreSkills contract — never fail the whole profile install.
|
|
155
|
+
try {
|
|
156
|
+
fs.mkdirSync(skillsDest, { recursive: true });
|
|
157
|
+
let purged = 0;
|
|
158
|
+
for (const name of placeable) {
|
|
159
|
+
fs.rmSync(path.join(skillsDest, name), { recursive: true, force: true });
|
|
160
|
+
fs.cpSync(path.join(skillsSrc, name), path.join(skillsDest, name), { recursive: true });
|
|
161
|
+
}
|
|
162
|
+
for (const entry of fs.readdirSync(skillsDest, { withFileTypes: true })) {
|
|
163
|
+
if (!entry.isDirectory()) continue;
|
|
164
|
+
const claimed = owned.has(entry.name) || remembered.includes(entry.name);
|
|
165
|
+
if (claimed && !coreNames.has(entry.name)) {
|
|
166
|
+
fs.rmSync(path.join(skillsDest, entry.name), { recursive: true, force: true });
|
|
167
|
+
purged++;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
shared.receipt.writeNativeReceipt(skillsDest, {
|
|
171
|
+
names: [...placeable].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0)),
|
|
172
|
+
layout: 'package-root',
|
|
173
|
+
packageRoot,
|
|
174
|
+
});
|
|
175
|
+
if (purged > 0) {
|
|
176
|
+
console.log(
|
|
177
|
+
`HuaweiCloud DevKit: cleaned ${purged} stale native skill cop${purged === 1 ? 'y' : 'ies'} (non-core skills are server data; MCP catalog + stdio skillRoot instructions)`,
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
console.log(
|
|
181
|
+
`HuaweiCloud DevKit: refreshed ${placeable.length} core skill cop${placeable.length === 1 ? 'y' : 'ies'} in ${skillsDest}`,
|
|
182
|
+
);
|
|
183
|
+
return packageHealthy;
|
|
184
|
+
} catch (error) {
|
|
185
|
+
console.error(
|
|
186
|
+
`HuaweiCloud DevKit: native core skills not synced to ${skillsDest}: ${error && error.message ? error.message : error} — MCP disclosure remains authoritative; re-run install`,
|
|
187
|
+
);
|
|
188
|
+
// Destination-side failure: only the disclosure layer failed — package
|
|
189
|
+
// health (and the trailing availability hint) follows the package, not
|
|
190
|
+
// the destination.
|
|
191
|
+
return packageHealthy;
|
|
68
192
|
}
|
|
69
193
|
}
|
|
70
194
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
console.log('
|
|
195
|
+
syncNativeSkills()
|
|
196
|
+
.then((packageHealthy) => {
|
|
197
|
+
// A broken package already printed 'the MCP server will refuse to
|
|
198
|
+
// start'; promising availability in the same breath is the one
|
|
199
|
+
// contradiction this hint must never form.
|
|
200
|
+
if (packageHealthy) {
|
|
201
|
+
console.log('MCP server will be available after DSH restart.');
|
|
202
|
+
}
|
|
203
|
+
})
|
|
204
|
+
.catch((error) => {
|
|
205
|
+
// The sync is disclosure: an unexpected failure warns and leaves the
|
|
206
|
+
// npm install green (the guarded block above owns the known classes).
|
|
207
|
+
console.error(
|
|
208
|
+
`HuaweiCloud DevKit: native core skills not synced: ${error && error.message ? error.message : error} — MCP disclosure remains authoritative; re-run install`,
|
|
209
|
+
);
|
|
210
|
+
})
|
|
211
|
+
.finally(() => {
|
|
212
|
+
console.log('\n\u001b[1m\u001b[36m 首次使用请配置环境:\u001b[0m');
|
|
213
|
+
console.log(' 1. 安装 KooCLI:npx huaweicloud-devkit install-hcloud');
|
|
214
|
+
console.log(' 2. 配置凭证: npx huaweicloud-devkit auth init');
|
|
215
|
+
console.log(' 3. 重启 DSH 会话后即可使用');
|
|
216
|
+
console.log(' 或者直接在 DSH 中对 Agent 说:帮我安装华为云 KooCLI 并配置凭证\n');
|
|
217
|
+
});
|
package/bin/setup.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
const path = require('node:path');
|
|
4
4
|
const fileUrl = require('node:url').pathToFileURL(
|
|
5
|
-
path.join(__dirname, '..', 'plugins', 'huaweicloud-core', '
|
|
5
|
+
path.join(__dirname, '..', 'plugins', 'huaweicloud-core', 'dist', 'setup-cli.js'),
|
|
6
6
|
).href;
|
|
7
7
|
|
|
8
8
|
import(fileUrl).catch((error) => {
|
package/cordis.patch.yml
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
transport: stdio
|
|
7
7
|
command: node
|
|
8
8
|
args:
|
|
9
|
-
- './node_modules/huaweicloud-devkit/plugins/huaweicloud-core/
|
|
9
|
+
- './node_modules/huaweicloud-devkit/plugins/huaweicloud-core/dist/mcp-server.js'
|
|
10
10
|
env:
|
|
11
11
|
HUAWEICLOUD_AGENT_TOOLKIT_MODE: local
|
|
12
12
|
HDKITSERVICE_ENDPOINT: ''
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* huaweicloud-telemetry.js — AtomCode PreToolUse Hook
|
|
3
3
|
*
|
|
4
|
-
* Captures
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Captures hcloud CLI commands and MCP tool invocations, writing structured
|
|
5
|
+
* events to hook-events.jsonl for the devkit telemetry module to ingest and
|
|
6
|
+
* report. Service skills are server data disclosed over MCP, so their
|
|
7
|
+
* retrieval telemetry rides trackSkillRetrieve inside
|
|
8
|
+
* huaweicloud_retrieve_skill; direct reads via the stdio skillRoot
|
|
9
|
+
* disclosure (server instructions at initialize, or the list_skills
|
|
10
|
+
* payload) are observable only as catalog calls within telemetry — the
|
|
11
|
+
* instructions emission itself is trace-file-only (the e2e seam), never a
|
|
12
|
+
* telemetry event — and neither channel shows which skill file was
|
|
13
|
+
* consumed. The six core meta-skills are installed as native
|
|
14
|
+
* copies (system-prompt disclosure); those loads produce no telemetry by
|
|
15
|
+
* design — so this hook never classifies skill-tool loads (the prefix
|
|
16
|
+
* match would also misattribute user skills sharing the huawei* prefix).
|
|
7
17
|
*
|
|
8
|
-
* Classification
|
|
9
|
-
*
|
|
18
|
+
* Classification mirrors the other platform hooks' trimmed shape: the
|
|
19
|
+
* hcloud CLI classifier plus MCP tool events (opencode's hook carries
|
|
20
|
+
* the CLI classifier only). This hook NEVER blocks execution — it
|
|
21
|
+
* always exits 0.
|
|
10
22
|
*/
|
|
11
23
|
|
|
12
24
|
import { appendFileSync, mkdirSync, existsSync, readFileSync } from 'node:fs';
|
|
@@ -48,6 +60,14 @@ function ensureDir(dirPath) {
|
|
|
48
60
|
}
|
|
49
61
|
|
|
50
62
|
function writeEvent(key, value, extra = {}) {
|
|
63
|
+
// Telemetry opt-out gates the local spool too (no collection while
|
|
64
|
+
// off, so nothing is transmitted retroactively on re-enable).
|
|
65
|
+
if (process.env.HUAWEICLOUD_DEVKIT_TELEMETRY === 'off') return;
|
|
66
|
+
// cli:* values carry the hcloud command tail — trim to Service+
|
|
67
|
+
// Operation (matches the MCP face's trim in tools.ts).
|
|
68
|
+
if (typeof value === 'string' && key.startsWith('cli:')) {
|
|
69
|
+
value = value.split(/\s+/).slice(0, 3).join(' ');
|
|
70
|
+
}
|
|
51
71
|
try {
|
|
52
72
|
ensureDir(TELEMETRY_DIR);
|
|
53
73
|
const line = JSON.stringify({ key, value, ...extra }) + '\n';
|
|
@@ -59,15 +79,8 @@ function writeEvent(key, value, extra = {}) {
|
|
|
59
79
|
}
|
|
60
80
|
|
|
61
81
|
// ══════════════════════════════════════════════════════════════════
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
|
|
65
|
-
function isHuaweiCloudSkill(name) {
|
|
66
|
-
return typeof name === 'string' && /^huawei/i.test(name);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// ══════════════════════════════════════════════════════════════════
|
|
70
|
-
// CLI command classification (matches skill-tracker.js exactly)
|
|
82
|
+
// CLI command classification (the unbounded-capture variant shared with
|
|
83
|
+
// the workbuddy/hermes hooks; opencode/dsh use a bounded 4-token capture)
|
|
71
84
|
// ══════════════════════════════════════════════════════════════════
|
|
72
85
|
|
|
73
86
|
const HCLOUD_RE = /(?:^|[;&|]\s*)hcloud(?:\.exe)?\s+(.+)/i;
|
|
@@ -128,14 +141,6 @@ function extractCommand(toolInput) {
|
|
|
128
141
|
return '';
|
|
129
142
|
}
|
|
130
143
|
|
|
131
|
-
function extractSkillName(toolInput) {
|
|
132
|
-
if (typeof toolInput === 'string') return toolInput;
|
|
133
|
-
if (toolInput && typeof toolInput === 'object') {
|
|
134
|
-
return toolInput.name || toolInput.command || '';
|
|
135
|
-
}
|
|
136
|
-
return '';
|
|
137
|
-
}
|
|
138
|
-
|
|
139
144
|
// ══════════════════════════════════════════════════════════════════
|
|
140
145
|
// Main
|
|
141
146
|
// ══════════════════════════════════════════════════════════════════
|
|
@@ -147,16 +152,7 @@ try {
|
|
|
147
152
|
|
|
148
153
|
debugLog(`tool=${toolName}`);
|
|
149
154
|
|
|
150
|
-
// ── Category 1:
|
|
151
|
-
if (toolName === 'skill' || toolName === 'use_skill') {
|
|
152
|
-
const skillName = extractSkillName(toolInput);
|
|
153
|
-
debugLog(`skill name=${skillName}`);
|
|
154
|
-
if (isHuaweiCloudSkill(skillName)) {
|
|
155
|
-
writeEvent('skill:retrieve', skillName);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// ── Category 2: Bash/pwsh with hcloud commands ──
|
|
155
|
+
// ── Category 1: Bash/pwsh with hcloud commands ──
|
|
160
156
|
if (toolName === 'bash' || toolName === 'pwsh') {
|
|
161
157
|
const command = extractCommand(toolInput);
|
|
162
158
|
if (command && HCLOUD_RE.test(command)) {
|
|
@@ -168,7 +164,7 @@ try {
|
|
|
168
164
|
}
|
|
169
165
|
}
|
|
170
166
|
|
|
171
|
-
// ── Category
|
|
167
|
+
// ── Category 2: MCP Huawei Cloud tools ──
|
|
172
168
|
if (toolName.startsWith('mcp__huaweicloud')) {
|
|
173
169
|
writeEvent(`tool:${toolName}`, '1', { capability: 'mcp' });
|
|
174
170
|
debugLog(`MCP tool: ${toolName}`);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const name: string;
|
|
2
|
+
export const inject: string[];
|
|
3
|
+
|
|
4
|
+
export interface HookClassification {
|
|
5
|
+
key: string;
|
|
6
|
+
value: string;
|
|
7
|
+
capability: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function classifyHcloud(text: string): HookClassification | null;
|
|
11
|
+
|
|
12
|
+
export interface HookPluginContext {
|
|
13
|
+
on(
|
|
14
|
+
event: string,
|
|
15
|
+
handler: (exec: { name: string; arguments?: { command?: string } }, next: () => void) => void,
|
|
16
|
+
): void;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function apply(ctx: HookPluginContext): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// hook-plugin.mjs — DSH Cordis Hook Plugin
|
|
2
|
-
// Intercepts
|
|
3
|
-
//
|
|
2
|
+
// Intercepts hcloud CLI commands and MCP tool invocations, writes events
|
|
3
|
+
// to hook-events.jsonl for the telemetry module to consume.
|
|
4
4
|
|
|
5
5
|
import { appendFileSync, existsSync, mkdirSync } from 'node:fs';
|
|
6
6
|
import { join, dirname } from 'node:path';
|
|
@@ -43,6 +43,14 @@ function debugLog(msg) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
function writeEvent(key, value, extra = {}) {
|
|
46
|
+
// Telemetry opt-out gates the local spool too (no collection while
|
|
47
|
+
// off, so nothing is transmitted retroactively on re-enable).
|
|
48
|
+
if (process.env.HUAWEICLOUD_DEVKIT_TELEMETRY === 'off') return;
|
|
49
|
+
// cli:* values carry the hcloud command tail — trim to Service+
|
|
50
|
+
// Operation (matches the MCP face's trim in tools.ts).
|
|
51
|
+
if (typeof value === 'string' && key.startsWith('cli:')) {
|
|
52
|
+
value = value.split(/\s+/).slice(0, 3).join(' ');
|
|
53
|
+
}
|
|
46
54
|
try {
|
|
47
55
|
ensureDir(TELEMETRY_DIR);
|
|
48
56
|
const line = JSON.stringify({ key, value, ...extra }) + '\n';
|
|
@@ -53,14 +61,6 @@ function writeEvent(key, value, extra = {}) {
|
|
|
53
61
|
}
|
|
54
62
|
}
|
|
55
63
|
|
|
56
|
-
// ══════════════════════════════════════════════════════════════════
|
|
57
|
-
// Huawei Cloud identification
|
|
58
|
-
// ══════════════════════════════════════════════════════════════════
|
|
59
|
-
|
|
60
|
-
function isHuaweiCloudSkill(name) {
|
|
61
|
-
return typeof name === 'string' && /^huawei/i.test(name);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
64
|
// ══════════════════════════════════════════════════════════════════
|
|
65
65
|
// hcloud command classification (mirrors skill-tracker.js)
|
|
66
66
|
// ══════════════════════════════════════════════════════════════════
|
|
@@ -95,22 +95,23 @@ export function apply(ctx) {
|
|
|
95
95
|
debugLog('=== PLUGIN LOADED ===');
|
|
96
96
|
|
|
97
97
|
// ── Layer 1: tools/pre-execute waterfall ──────────────────────
|
|
98
|
+
// The hcloud CLI classifier lives here because direct shell invocations
|
|
99
|
+
// have no MCP-side telemetry path; MCP tool invocations are recorded
|
|
100
|
+
// below. Service skills are server data
|
|
101
|
+
// disclosed over MCP and never installed natively for DSH, so their
|
|
102
|
+
// retrieval telemetry rides trackSkillRetrieve inside
|
|
103
|
+
// huaweicloud_retrieve_skill; direct reads via the stdio skillRoot
|
|
104
|
+
// disclosure (server instructions at initialize, or the list_skills
|
|
105
|
+
// payload) are observable only as catalog calls within telemetry — the
|
|
106
|
+
// instructions emission itself is trace-file-only (the e2e seam), never a
|
|
107
|
+
// telemetry event — and neither channel shows which skill file was
|
|
108
|
+
// consumed. The six core meta-skills are installed as
|
|
109
|
+
// native copies (system-prompt disclosure); those loads produce no
|
|
110
|
+
// telemetry by design.
|
|
98
111
|
ctx.on('tools/pre-execute', async (exec, next) => {
|
|
99
112
|
try {
|
|
100
113
|
debugLog(`pre-execute tool=${exec.name}`);
|
|
101
114
|
|
|
102
|
-
// ── Intercept 1: skill tool calls ──
|
|
103
|
-
if (exec.name === 'skill') {
|
|
104
|
-
const skillName = exec.arguments?.name || '';
|
|
105
|
-
debugLog(`skill name=${skillName}`);
|
|
106
|
-
if (isHuaweiCloudSkill(skillName)) {
|
|
107
|
-
writeEvent('skill:retrieve', skillName);
|
|
108
|
-
ctx.logger.info(`[hw-hook] skill called: ${skillName}`);
|
|
109
|
-
debugLog(`SKILL TRACKED: ${skillName}`);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// ── Intercept 2: pwsh/bash with hcloud commands ──
|
|
114
115
|
if (exec.name === 'pwsh' || exec.name === 'bash') {
|
|
115
116
|
const command = exec.arguments?.command || '';
|
|
116
117
|
if (!command) return next();
|