Repository navigation
V2 - #963
Merged
Merged
V2#963
Conversation
Port main's v1.1.8 safety changes into v2 with adversarial-review
hardening (8 interrogate rounds, converged to zero findings):
- ShowSecret joins blockedSecretOperations; the TS text faces (joined
args, raw text, quote-stripped shadow) now DERIVE their vocabulary
from policy.json with the same stem-guard rule the py closure uses
(prefix-of-another-entry gets both-side boundary guards; self-specific
entries keep substring semantics), and the check runs before hcloud
routing so compound payloads cannot slip mangled vocabulary past TS.
- SECRET_ACCESS_KEY joins every HW_-family env-credential alternation
(TS x3, py x3, risk-rule catalog) — echo $HUAWEICLOUD_SECRET_ACCESS_KEY
was previously allowed.
- Three warn rules from main: hwc-command-adminpass-exposure
(artifact/deploy_plan), hwc-iam-highrisk-write (generalized to the
IAM verb*noun family incl. V5/Keystone spellings and hcloud.exe),
hwc-command-secret-in-arg (widened to dotted/underscore/hyphenated
KooCLI params and --ak/--sk/--cli-secret-key spellings; quoted
placeholders and grep-pattern closing quotes exempt).
- redactEvidence: JSON quoted/escaped keys, YAML prose keys, AK/SK
through quotes and case, secret:// refs spared.
- Fork-bomb rule was double-escaped (dead) and quadratically
backtracking: single-escaped, ambiguity-free classes, bounded {0,64}
segments; spaced head/tail variants covered; escape classes pinned
and documented honestly.
- Parity: hook-parity battery +26 rows (quote-mangled stems both
directions, exact-stem values, --help, compound payloads); mirror
test asserts the hand-maintained JSON rule regex matches the derived
vocabulary semantically (both guard directions, reverse containment);
degenerate policy shapes ([] / [''] / case-dups) never match-everything
in either layer.
…ure) The adopted huawei-cloud-* service skills (workstream S) teach wrapping every hcloud command in `skill-quality-cli run [flags] [--] <cmd>`; the raw-Bash write gate must see through the wrapper or every guided write launders past it. This adds the command-position unwrap mirroring the secret-exec seam, hardened through 8 adversarial review rounds: - Shared bin normalization (TS matchesBinName / py _matches_bin_name): raw + normalized dual candidate (Windows \-paths vs POSIX quote/escape mangling), trailing @Version strip that never eats a path segment, .exe/.bin suffixes, quote-mangled bins and subcommands. - The separator decision lives inside the flag walk: a child-owned '--' never masquerades as the wrapper separator; leading '--'s strip the way argparse strips them. - Value-slot ambiguity resolves by worst-case parse (grammarChildAt): grammar child head through the wrapper's own flag grammar composes the deny; the wrapper's '--' stays authoritative; script-head slots are the child unless the separator directly follows. - Unknown flag grammar fails CLOSED: REMAINDER/pre-run fallbacks re-base to the first hcloud bin or script head with a following token; lone trailing hcloud tokens (subcommand arguments) never re-base. - Nested-script candidates unwrap to a fixpoint (same-wrapper compositions reach the innermost script); py _script_of short-circuit order fixed (lone-shell-token children no longer crash fail-open). - Residuals documented in the safety skill's secrets.md (variable indirection, python3 -m / cli_entry.py spellings, space-in-flag-value) and pinned by structure.test.ts. - Battery +30 rows and unit pins across both layers (hook-parity runs every row through TS and the real py hook). Known pre-existing layer divergences documented, not introduced here: xargs-pipe-final routing split, Windows-path unescaping, '='-inline routing-fallback drift.
…hook-layer gating F3: the security job's npm audit splits into a blocking production-deps gate (--omit=dev) and an informational full audit (continue-on-error), ported from main's hunk. Ships with the paired undici bump main carried (^8.12.2 — 8.10.0 sat inside the 8.0.0-8.10.1 high-severity DoS range, which would have turned the new gate red on day one). F4: the README/README.zh-CN Telemetry disclosure section (en+zh) from main, with two honesty fixes the adversarial review forced: - The opt-out now gates the HOOK layer too: all six event writers (opencode skill-tracker, dsh hook-plugin, atomcode telemetry, workbuddy + hermes trackers, the py compat hook) return early while HUAWEICLOUD_DEVKIT_TELEMETRY=off — no local hook-events.jsonl collection, so nothing is transmitted retroactively on re-enable. - cli:* event values are trimmed to the hcloud <Service> <Operation> prefix in every writer (matching the MCP face's trim in tools.ts): file paths, bucket names, and flag values never ride along. The README copy now states the CLI-event value shape and the local staging file explicitly instead of claiming 'no file paths' for a pipeline that carried them.
Port main's buildSkillInstallCommand: GitCode-ZIP primary with GitHub ZIP fallback, esc/dir sanitizers (P4 injection-safe hint), SKILL_SRC dir + SKILL.md gates with false-terminated short-circuits (P5), and the installHint field on every marketplace result. Replaces the 'npx skills add' command, which needs git on PATH — absent on stripped Windows Server/sandbox environments. Teaching synced: capability-discovery step 10b and the modelarts skill now point at the returned installCommand/installHint with the manual download fallback. test/search-market.test.ts carries main's 9 tests (consolidated from 11 with no coverage loss). The jscpd baseline regen absorbs the intentional hook-writer gate/trim mirrors introduced by the previous commit (the gate was already red at HEAD); the lockfile re-resolves undici from registry.npmjs.org.
…etition) Ports main's huaweicloud_competition_voucher_claim in the lockstep the pack architecture demands: hdkitCompetitionVoucherClaim (POST competition/voucher/claim), the voucher pack's three maps, registry PACK_OF, the tools literal, and the registry-snapshot EXEMPT_TOOLS entry in one change. Teaching follows: the voucher skill becomes main's two-activity version (incentive vs competition, version: 2) and the core skill's voucher routing gains the competition triggers and service-map row. Count pins move in lockstep: packs-registry voucher 3 / total 51 / mapKeys 39, pack-meta compared 50, structure voucher 3, plugins-e2e PER_PACK_TOOLS + the 48 full-registry pin, tools.test required list. Two fetch-stub behavioral tests pin the competition endpoint path and error-envelope passthrough. Remote posture matches voucher_claim deliberately (auto-registered, credential-gated at the handler). jscpd baseline absorbs the third hdkitservice error-envelope copy and the plugins-e2e boundary re-pairings; the generated skills tree is rebuilt with the new voucher/core skill content.
…ntract Extracts the DevBridge expose flow from main's session-manager into src/sandbox/devbridge-tunnel.ts: the three-tier credential waterfall (keyring API key with D-Bus revive / AK/SK with mandatory STS token / api-key file), the expose script (pre-clean, nohup host, URL extract, curl health check), their parsers, and the port validation guard. The s2-domain and migration-marker constants stay single-copy (exported from session-manager, the module devbridge-tunnel imports from). Two deliberate v2 deviations from main, both adversarial-review rulings: a final attempt with no USABLE URL returns ok:false — main returned ok:true with a dead publicUrl, and the migration placeholder (HTTP 200 + dead URL) counts as unusable exactly like 000/'' (probe tunnel treats it as unreachable; the expose contract now agrees); and loginOutput is truncated to 400 like hostLog. Tests: main's 8 pure-function pins plus 6 seam-based control-flow tests (auth-fail envelope, healthy success, double-unreachable, migrated placeholder, quota-final, arg validation) via a module-local one-shot seam that stays null in production.
… rows Wires huaweicloud_sandbox_expose_tunnel into the sandbox pack (timeout 90000, handler with main's port-guard text, schema with the shared parts) and moves every count pin in lockstep: sandbox 12, total 52, mapKeys 40, pack-meta compared 51 + the four sandbox-12 pins, plugins-e2e 49/trim 24, tools.test list, sandbox-pack TIMEOUT_TOOLS, structure fallback-count 7. The huawei-sandbox skill's Step 1 becomes the verified credential waterfall (keyring → AK/SK → api-key file, DB_AUTH_MODE vocabulary, mandatory STS --security-token) and Step 7 teaches the preferred expose_tunnel call, including the ok:false honesty contract and the shared-sandbox concurrency warning. structure.test pins rewritten to the waterfall vocabulary in the same commit (main's stale sidecopy wart not replicated). ws-fake gains the devbridge-auth-probe row (anchored on the probe's unique double-quoted PATH first line, above the generic export-path row) and the devbridge-expose-script row (unanchored pkill prefix — the retry-cleanup blob is a single ;-joined line), with cross-tier pins in ws-exec-protocol (fake synthesis ↔ product parsers, both blob shapes) and an e2e case following the deploy-check pattern. The remoteSurface comment names expose_tunnel's accepted public-URL residual, pinned in remote-mcp-server.test.
…t-purity sentinel
main's verbatim port text ('Actual port nginx is listening on — …')
collides with the dist-bundle gate's /listening on/ sentinel, which
exists to catch the remote server's startup banner leaking into stdio.
The phrase now reads 'Port nginx actually serves on' — same semantics,
no sentinel collision; the framed-response anchors of the gate are
untouched.
Ports main's preflight with the adversarial-review hardening (three rounds; main shipped two latent bugs this port fixes): - src/lib/koocli-paths.ts leaf module for the lock/log paths (HUAWEICLOUD_HOME honored at call time) — breaks main's preflight <-> hcloud-probe import cycle before it is recreated. - The child's log stdio is a SYNCHRONOUS numeric fd: main passed a lazily-opened WriteStream, which throws ERR_INVALID_ARG_VALUE before the child ever starts (feature dead-on-arrival, lock stranded). - The child argv[1] is the plain entry path: main passed a file: URL, which the CJS loader rejects as a child main entry (stillborn spawn; the not_found hint then lied about a running install). Pinned by a real child exec (node <entry> version boots). - Lock release is ownership-checked (compare-and-delete on the read-back body) so a TTL-reclaimed holder cannot delete the new owner's live lock; corrupted lock bodies age out as stale instead of wedging forever. - Failure cooldown: an attempt that closes without producing hcloud (stock macOS without passwordless sudo) writes a 24h marker instead of re-downloading the pinned tarball every session start. - Wired stdio-only (the stateless remote must not churn the lock or download from an unauthenticated face), fire-and-forget in try/catch. - The not_found hint becomes main's friendly text: background install may be running, retry shortly, fixed install dirs are picked up on the next call with no agent restart, log path quoted. - HUAWEICLOUD_SKIP_HCLOUD_PREINSTALL=1 blanket-set across every test/script surface that spawns the server (mcp-server, dist-bundle, remote defensive, plugins-e2e, e2e env-policy, real-agents, smoke-agents). Tests: lock exclusivity/TTL/ownership/corruption, log fd 0600+append, skip-env intent, already-installed, forced spawn path via a seam (numeric-fd stdio, release-on-close, cooldown), entry-exists, provision-bypass source pin, mcp-startup wiring pins.
…ized) First of the eight adopted huawei-cloud-* service skills from main's 1.1.8 corpus, landing the shared adoption shape: - Frontmatter: main's '>' block-scalar description converted to the single-quoted folded form v2's parser accepts. - Teaching: Step 0 becomes the optional-wrapper note + the approval write-path routing note (plan_cli_command -> run_approved_command); the mandatory-wrapper mandate, telemetry claims, and the upgrade subcommand teaching are removed — the 34 wrapped examples stay, now correctly framed as optional with bare-hcloud equivalence (the F2 safety seam classifies both forms identically, probed live). - Scripts (normalized v2 forms, reused by the remaining S-units): scripts/cli/cli_entry.py is a whitelist wrapper (hcloud-only, charset validation, passthrough stdio — argparse subcommand dest fixed so 'run' is actually reachable; no telemetry, no network, no install/upgrade paths), scripts/ensure_cli.sh is an availability check + manual hint (no deployment, no PATH persistence, no symlinks); cli_reporting.py is not shipped. - References: cli-installation-guide section 5, verification section 6, and acceptance section G rewritten to the optional/local-only doctrine. - Cross-references renamed (8 sites), pack.ts + routeMap swapped, and huawei-apig removed from the structure min-quality exceptions. - New structure guards: the adopted-skills doctrine test (optional note, write-path routing, banned tokens across SKILL.md AND every reference, whitelist + banned-token scan of the scripts, cli_reporting.py absence) and an executing probe of the wrapper (version/run-whitelist-rejection/self-check).
Second of the eight adopted huawei-cloud-* service skills from main's 1.1.8 corpus, following the S1 template (de5d774): - Frontmatter: main's '>' block-scalar description folded to the single-quoted form (the duplicated "Service keywords" sentence drops per the family form main's apig corpus already used; a NOT-for clause restores the replaced huawei-cts skill's routing boundary — Cloud Eye alarms, LTS log analysis). - Teaching: Step 0 is the optional-wrapper + approval write-path note; the wrapper mandate (:120/:348/:417) and the telemetry-disable line (:430) are gone with their sections (Quality Reporting env vars, mid-doc Quality Reporting, tail Unified CLI); the 13 wrapped examples are actual command lines now, framed optional with bare equivalence. - Scripts: the normalized pair reused verbatim (whitelist wrapper, check-only ensure_cli.sh at the family's 100644 mode); no cli_reporting.py ships. - References: cli-installation-guide normalized to the S1 shape plus the v2 credential doctrine — profile status via huaweicloud_show_profile_redacted and user setup via npx huaweicloud-devkit auth init; the same fix lands in apig's S1 guide, which taught the hook-blocked raw `hcloud configure list`. The CreateTracker OBS pre-check now points at CTS CheckObsBuckets plus the obsutil-style `hcloud OBS ls` (the corpus's API-style `OBS ListBuckets` is not a KooCLI OBS command); verification-method gains the wrapper-sanity section; acceptance-criteria §1/§6 follow the normalized doctrine, and test-report.md is dropped (stale corpus artifact: [USE_ERROR] header, rows mismatching the templates; the S1 family ships no test-report). - Templates: test-defaults/test-vars ship (first adopted skill with templates/); the three dead v1-framework ALLOW_WRITES + allow_writes.yaml notes are rewritten to the devkit approval chain, and TC-10's live form uses the real CheckObsBuckets parameters (--domain_id + --buckets.1.bucket_name, verified live). - Corpus fixes beyond doctrine: the phantom --polling validation row is removed (no CTS operation takes it), ListTraceResources is promoted to an executable example like every other R3 query, the backslash-continued CreateTracker live form is joined, and the dataflow "TRAp" typo fixed. - Cross-references renamed (8 sites: core routing + service graph, iac SKILL + resource-catalog, cloud-eye and waf-aad descriptions, pack.ts + tools.ts routeMap); the legacy thin huawei-cts skill is deleted. - New guards: the adopted-skills doctrine sweep now also covers templates/ and bans allow_writes (the dead framework vocabulary round 1 caught only by hand); the script pair must stay byte-identical across adopted skills AND non-executable (the mode is pinned — this changeset itself staged a 755 fork first). Review: 3+2 interrogate rounds; every commit-blocking finding fixed. Leftover nits documented as non-blocking by both re-reviewers: the templates' TC-09/TC-10 auxiliary-action names (ListQuotas / CheckObsBuckets exist but sit outside the 10-action vocabulary), the inert cli-install-version marker kept for family consistency, and verification-method's conditionally-true negative test 1.
…malized) Third of the eight adopted huawei-cloud-* service skills from main's 1.1.8 corpus, following the S2 family form (901f9be): - Frontmatter: main's '|' literal block-scalar description folded to the single-quoted form. - Teaching: Step 0 optional-wrapper + approval write-path notes; the Chinese quality-bypass mandate blockquote replaced by the family Command-format note; the two-line quality-reporting comments converted to bare wrapped commands (the one truncated `...` form dropped); the Quality Reporting env-vars / mid-doc / tail sections removed; the Authentication Mode 2 and the guide normalized to the v2 credential doctrine (huaweicloud_show_profile_redacted + npx huaweicloud-devkit auth init; raw configure inspection is hook-blocked). No templates (main ships none). - Corpus fixes beyond doctrine (all verified live): the Create DCS Instance SDK example gains the required spec_code and no_password_access (defaults to False, which makes password mandatory — new Critical Warnings row, related-commands create row updated); the "capacity is NOT a filter" note corrected (--capacity IS an optional query param per DCS ListInstances --help); the dead HWC_AK/HWC_SK legacy env-var teaching removed repo-wide (Mode 1, Prerequisites, dataflow); "example below" -> above; the self-contradictory --project_id line reworded; the jsonInput block now states --project_id is required on that path; the Chinese 格式模板 blockquote normalized to the family English form (+ Verification table row); the subleg mermaid typo fixed; the architecture diagram's phantom DDS SDK fallback dropped (dependency scoped to huaweicloudsdkdcs). - Cross-references renamed (8 sites: core service graph x2, select.md x2, report-issue.md, iac SKILL + resource-catalog, rds NOT-for) and the core database routing row now hands DDS/DCS keywords to the new skill; the legacy thin huawei-dds-dcs skill is deleted. - Latent S1 bug fixed family-wide: the install one-liner's URL in all three adopted guides pointed at a 404 wrong-bucket host; replaced with the repo-canonical hdn-koocli cli/latest form (probed 200). New validate-package checks pin both the hcloud_install.sh URL host and the KOO_CLI_BASE constant to the hdn-koocli bucket. - New guard: every adopted skill must carry the --help-first discovery mandate (S3 had dropped it silently; both family phrasings accepted). Review: 3+2 interrogate rounds; every commit-blocking finding fixed, re-review polish applied (wrapper labels, restart placeholder, project_id jsonInput wording, guard comment).
…alized) Fourth of the eight adopted huawei-cloud-* service skills from main's 1.1.8 corpus, following the S2/S3 family form: - Frontmatter: '|' description folded to single-quoted; the redundant triggers: flow array dropped (content survives in the description and the body Triggers section). - Teaching: Step 0 family notes; the wrapped-command mandate blockquote replaced by the Command format note; every wrapped line paired with its bare twin (three corpus commands were wrapped-only); Prerequisites auth and wrapper bullets normalized to the v2 credential doctrine; obsutil setup gains the huaweicloud_setup_obs_config path alongside the safe interactive fallback. - Old/new model truth (all verified live against KooCLI 7.2.12 --help): the task-flavored operations ARE application operations in the legacy model (ListDeployTasks "Querying the application list"; DeleteDeployTask "Deletes an application based on the deployment task ID") — the corpus's two-entity framing and the false "deleting a task does not delete the application" reassurance are corrected across SKILL.md, verification-method, acceptance-criteria, and the dataflow branch; the creation-path doctrine is recast on the generation axis (CreateApp new model vs CreateDeployTaskByTemplate old model, sunset after 2024-09-30 — one path per application); ShowDeployTaskDetail's "still maintained" claim aligned with its own sunset notice. - Locale-dependent rejections taught in both forms everywhere (Unsupported service: CloudDeploy on the default en locale vs 不支持的服务名称 under --cli-lang=cn; Invalid parameter vs 不正确的参数), and the APIGW.0301 auth-failure row restored to the root-cause ladder and Expected-Rejections (the legacy skill's only auth-error teaching; probed live). - Corpus fixes: phantom --app_name dropped; --configs.[N].description row added; --app_id tethered to DeleteApplication in the sunset note; encrypt-params argv-leak warning + --cli-jsonInput alternative; the --size cap scoped per operation; test-data-guide normalized (v1 automation framing, hook-blocked configure list, -i=/-k= example, placeholder list). - References: guide rewritten to family shape + Verifying authentication section; acceptance-criteria normalized; test-report dropped (S2 precedent); templates shipped scrubbed. - structure.test.ts: the huawei-deployment pins test rewritten for the adopted skill (reads source; new pins CreateDeployTaskByTemplate / DEV-12-50002 / APIGW.0301 / sunset-after-2024-09-30 / dual-locale service-name; --app_name and the legacy vocabulary banned); huawei-deployment removed from the min-quality exceptions. - Cross-references renamed (core routing + service graph, getting-started, pack.ts, tools.ts); the legacy thin skill deleted. - ensure_cli.sh upgraded family-wide (all four adopted skills, byte-identical): the availability check now distinguishes the normalized v2 wrapper from a foreign/v1 telemetry-bearing install and warns + steers to the bare form. Review: 3+2+2 interrogate rounds; every commit-blocking finding fixed (the round-2 half-fix and the nine task==app sites were both caught by re-review), final polish per round 3.
… F1 closure) Fifth of the eight adopted huawei-cloud-* service skills from main's 1.1.8 corpus, following the S2-S4 family form. This unit closes the F1 ban-conflict and hardens the secrets surface end to end. - F1 resolution (the headline): v2's F1 vocabulary blocks CSMS ShowSecret while main's corpus taught it as an R3 describe command (probed live: deny/secret even with --help; ListSecrets allow). Teaching now routes describe to ListSecrets — whose items carry the full Secret object including auto_rotation/rotation_period/ rotation_func_urn (verified against the official ListSecrets doc directly) — and ShowSecret joins the Blocked Operations table as secret-adjacent-reads-fail-closed. Applied across SKILL.md, csms-usage, verification-method, the dataflow diagram, iam-policies grants, and the template's TC-02. - Safety policy root fix (the S5 reviewers found the corpus teaching "blocked" for KMS plaintext ops the classifier allowed): blockedSecretOperations gains DecryptData, DecryptDatakey (stem- guarded; Capsule variant covered by substring), DownloadAccessPointPrivateKey, DeriveSharedSecret, CreateRsaDatakeyPair, CreateEcDatakeyPair; writeOperationPrefixes gains Rotate and Cancel (RotateSecret/RotateOnDemand/CancelKeyDeletion were unknown reads). CreateDatakey deliberately stays an approval-gated write — it prefixes the safe CreateDatakeyWithoutPlaintext and substring semantics would block the safe variant. cloud-risk-rules.json mirror updated; a new safety-policy test pins every case (7 secret-denies, stem boundary, write classifications). - iam-policies rewritten to the documented dotted-lowercase IAM items (csms:secret:list, kms:cmk:list, ...; the corpus's PascalCase action names matched no real authorization item) with the SKILL.md Prerequisites and Troubleshooting rows aligned. - Corpus fixes (verified live): enable-rotation gains the conditionally-mandatory --rotation_period and --rotation_func_urn; DeleteKey "default 7" corrected to required 7~1096 (four sites); CTS --from/--to fixed to 13-digit UTC-ms ints (S2 family form); key_spec enumeration matches --help (SM2 dropped); EncryptData/ EncryptDatakey taught as NOT gated with the --plain_text argv-leak warning; the CreateSecretReference phantom generalized; verification §1 drops the hook-blocked configure-list probe and the USE_ERROR --version form. - Normalization per family: '|' description folded; Step 0 family notes; auth bullets -> v2 credential doctrine; the dual-form MUST-be-wrapped blockquote -> family Command format note; guide rewritten (hdn-koocli URL, verifying-auth section); telemetry residue and dead Prerequisites-huaweicloud#6/test-pipeline/command-extractor ghosts removed; AC-40/41 normalized; AC-03 path fixed; templates referenced (S2 convention). - rules/huawei-agent-rules.mdc:18 renamed; 10 cross-reference sites renamed; legacy huawei-dew deleted; scripts = family pair (with the S4 v1-wrapper detection), byte-identical, mode 644. Review: 3+2+1 interrogate rounds; every commit-blocking finding fixed (policy verified end-to-end on all three enforcement layers by both re-reviewers; final round caught the unstaged fix delta and one residual PascalCase grant row).
…malized) Sixth of the eight adopted huawei-cloud-* service skills from main's 1.1.8 corpus, following the S2-S5 family form. GaussDB is a two-service skill: GaussDB (MySQL-compatible) and lowercase gaussdbforopengauss (distributed). - scripts/gaussdb_cli.sh (main's region-injecting + quality-report- binding wrapper) deliberately does NOT ship; the Prerequisites reference replaced by the direct region rule; scripts/ carries exactly the family pair. NEW structure guard pins that shape for every adopted skill (scripts/ = ensure_cli.sh + cli/cli_entry.py only, with a clean assert on the missing-dir case) — the S6 precedent names gaussdb_cli.sh / smn_dms_skill.py / install_cli.sh. - SKILL.md: '|' description folded; Step 0 family notes; Prerequisites auth -> v2 credential doctrine; env-var table's SKILL_QUALITY_* / SKILL_TRACE_ID rows dropped; the dual-form MUST-be-wrapped blockquote and its intro wrapped example -> family Command format note with the two-service --help mandate; mid-doc Quality Reporting section dropped with Error Code Convention promoted; tail dropped. - References: verification-method §6 -> Wrapper sanity; acceptance-criteria Quality-reporting section + AC-07 + AC-17 normalized (AC-15 path fixed); dataflow-diagram's verbatim Quality-reporting bullet block dropped; guide rewritten family shape (configure teaching -> redacted tool + auth init) with the GaussDB-for-MySQL endpoint corrected to gaussdb.<region> (live --dryrun; the corpus conflated the service code with the hostname); iam-policies verbatim. - Corpus fact fixes (live-verified): SERVICE_EXAMPLES.GAUSSDB in the cli pack's tools.ts carried three operations that never existed in the GaussDB service (ListInstances / CreateInstance / ShowInstance) — replaced with the real ListGaussMySqlInstances / CreateGaussMySqlInstance / ShowGaussMySqlInstanceInfo. - NEW structure guard: every serviceCatalog `skills: [...]` entry scanned from tools.ts source must be owned by a pack (the S5/S6 unstaged/stale-rename class the reviewers caught twice); plus doctrine-phrasing bans (/Quality reporting is delivered/, /hard-binds a report/, installed-by-ensure_cli) closing the residue class the banned-vocabulary sweep missed. - exceptions set: huawei-gaussdb removed from min-quality (the 393-line skill passes unaided). Cross-references renamed (core routing database row + service graph, select.md, rds NOT-for, getting-started, iac x2, pack.ts, tools.ts routeMap); legacy huawei-gaussdb deleted. Review: 3+1 interrogate rounds; the final round verified all nine fix items against the staged tree with all gates green (one non-blocking AC-18 wording nit noted, S1-S5 precedent).
Seventh of the eight adopted huawei-cloud-* service skills from main's 1.1.8 corpus, following the S2-S6 family form. SMN pub/sub plus the DMS engines — KooCLI has no DMS service; the engine (kafka/rabbitmq/ rocketmq) selects the service (Kafka/RabbitMQ/RocketMQ). - Script executor stripped (the unit's headline ruling): main's corpus dispatches all 15 huawei_* actions through scripts/smn_dms_skill.py (with --preview gating and quality-report hard-binding) plus scripts/install_cli.sh — neither ships (the S6 scripts-shape guard pins the family pair). "Action Dispatch (Script Executor)" becomes "Action Dispatch (engine routing)": two-step lookup, action names as routing vocabulary, pointer to Core Commands; the load-bearing engine->service table survives in the Overview and engine-operation-reference. - SKILL.md: '|' description folded (+ NOT-for clause restoring the legacy routing boundary); Step 0 family notes (main's REQUIRED-framed install + supply-chain/telemetry-disable note dropped); every wrapped-only Core Command gained its bare twin (22 pairs, guard- verified); the generic <Service> mandate concretized; Prerequisites restored in family form (the first transform pass dropped main's section wholesale — re-review caught it); tail dropped. - Policy root fix (S7 review): Confirm and Subscribe added to writeOperationPrefixes — ConfirmSubscription and SubscribeTopic were unknown reads (probed live); ListSubscriptions* stays read_only. - Corpus fact fixes (live-verified): ListSubscriptions has no --topic_urn (hard rejection) — single-topic analysis routed to ListSubscriptionsByTopic; ConfirmSubscription's conditional params documented (token+topic_urn for HTTP/HTTPS; any-two-of-three for SMS/email); hcloud -v USE_ERROR fixed to hcloud version; the --preview script residue in verification/acceptance rewritten to huaweicloud_plan_cli_command / --dryrun; the phantom CreateDmsInstance named as the real create operations (audit guide + iam-policies); security-audit Gate 4 describes the shipped cli_entry.py (passthrough stdio, not the stripped script's capture_output); the dead validate-skill.sh path (the migration plan's flagged link) replaced with this repo's own gates. - Routing completeness: rocketmq added to the serviceCatalog keywords and the core messaging row; the service-graph row labels all three engines; the iac DMS row's discovery cells teach engine routing (hcloud DMS is Unsupported — its own error is in the skill's troubleshooting table). - References: guide normalized (configure -> redacted tool + auth init; stale hcli install URL -> canonical hdn-koocli); verification-method script sections -> direct hcloud; acceptance criteria -> wrapper doctrine; iam-policies/dataflow-diagram/ engine-operation-reference verbatim otherwise. Cross-refs renamed (core x3, functiongraph, cloud-eye x2, iac x2, pack.ts, tools.ts); legacy huawei-smn-dms deleted. Review: 3+1 interrogate rounds; every commit-blocking finding fixed (the round-1 partial-rename typo, the dropped Prerequisites, and the unescaped-pipe table corruption were all caught by re-review).
…zed) Eighth and last of the adopted huawei-cloud-* service skills from main's 1.1.8 corpus, following the S2-S7 family form. WAF rule management + AAD protection queries; the corpus's strong AAD console-only doctrine (no CreateInstance/DeleteInstance in KooCLI — re-verified live, [USE_ERROR], exit 0) preserved intact. - The no-CLI self-contradiction fixed (the unit's headline): main ships ONLY scripts/ensure_cli.sh (no cli/ dir) while its Chinese Step 0 claims an install path through it — the family Step 0 plus the family pair (check-only ensure_cli.sh + whitelist cli_entry.py) replaces it. - SKILL.md: '>-' description folded (+ NOT-for clause restoring the legacy boundary: security groups, CTS audit); the malformed space-separated tags line fixed; the redundant triggers array dropped; Dependency line, Prerequisites auth bullet (raw configure teaching), and the skill-quality-cli bullet normalized to family; the two-forms/mandated-execution bullet list and the mandate blockquote replaced by the family Command format note + the two-service --help mandate; the 可测试性约定 residue (wrapped-only justifications) replaced by the real reasons (needs a real policy_id/package_id — run the list op first); every wrapped-only command gained its bare twin (28/21 pairs, guard-verified). - Corpus fact fixes (live-verified): CcRule --name is optional and only the advanced mode can be created (--mode=1; the corpus taught --mode=0); WhiteblackipRule --policyids is a comma-separated string, not an indexed array; the fabricated logic_operation enums (begin_with/end_with family) replaced with the real prefix/not_prefix/suffix/not_suffix; create examples aligned to the report-mode-first doctrine (--white=2); the "MUST fail" negative-check wording fixed (USE_ERROR is output-only, exit 0); the EPS dead descriptor dropped. - References: guide rewritten family shape (main had a non-canonical S3 install URL, wrapped-only commands, configure teaching, and a Chinese install-the-wrapper section); verification-method and related-commands unwrapped + mode/white residue fixed; acceptance-criteria wrapper line normalized; dataflow-diagram's quality-report node dropped with its truncated sentence repaired; iam-policies verbatim. - Cross-refs renamed (core security routing + service graph x2, cloud-eye NOT-for, iac x2, pack.ts, tools.ts routeMap); legacy huawei-waf-aad deleted. With S8, all eight adopted skills are in. Review: 2+1 interrogate rounds; every commit-blocking finding fixed (the mandated-execution residue, the 14 wrapped-only commands, three mangled sentence fragments, and the round-2 catches: surviving (业务参数) markers, verification-method's --mode=0/--white=0, and the fabricated enum family).
… with its teaching The F-series comparison found two sandbox teaching blocks main had evolved past v2: the port-collision doctrine (v2 taught manual +1; the tool auto-increments up to 10 attempts) and the node_port default (v2 taught the stale <port>+1). Porting the text alone was blocked by review: this branch's session-manager.ts still implemented the huaweicloud#736 stopgap — the proxy template listened on the ORIGINAL port (auto- increment did not apply to proxy configs), nodePort was listenPort+1 without re-probing, and the tool's own runtime warning said so. The skill would have taught huaweicloud#738 behavior over huaweicloud#736 code. This commit ports main's huaweicloud#738 fix completely, tool first: - session-manager.ts: resolveProxyNodePort (exported, pure, probe- injectable — collision-safe upward re-probe, max 10 attempts, never lands on the nginx listen port) now computes effectiveNodePort against the RESOLVED targetPort with a live ss probe; the proxy template listens on ${targetPort}; formatProxyPortWarning is retired — conflict + drift warnings now apply to all nginx types, joined with main's ' | ' separator. - test/session-manager.test.ts: the two stopgap-warning tests replaced by main's six resolveProxyNodePort unit tests. - tools.ts: the node_port schema description fixed from the false "required when nginx_type=proxy" to the real defaulting behavior (main's own schema text is stale there; this is a deliberate fix beyond parity). - The skill: all three huaweicloud#738 teaching sites ported (auto-increment up to 10 with the SSR targetPort/nodePort split; node_port defaults to targetPort+1 and follows auto-increment; Step 6's returned-values rule), now consistent with the tool. - structure.test.ts: main's four huaweicloud#738 guards ported (proxy template targetPort, effectiveNodePort via the helper, formatProxyPortWarning retired + unified warnings, pipe-separated warning join) so the round-1 bug class has a regression pin. Review: 1+1 interrogate rounds; the round-1 critical (text ahead of tool) resolved by porting the tool; round-2 verified semantics parity line-for-line against main and flagged the staging gap + the missing guards, both fixed.
…ry chain Two content-level deltas from main the S-series left behind: - huawei-billing: main's partner/customer identity model restored — the trap table's collapsed "缺少必填参数 cli-domain-id / APIGW.0301 = invalid credentials" row (which also mis-rendered as a 3-cell row in a 2-column table) replaced by main's two precise rows (Partner vs Customer-level APIs; APIGW.0301 as identity mismatch, not bad credentials), and the workflow table regains the Identity column plus the two missing Customer-level operations (ListCustomerCouponChangeRecords) and the Partner-level ListQuotaCoupons with its APIGW.0301 note. - huaweicloud-cli-and-auth: main's two blocks ported — the no-restart- after-install doctrine (DevKit re-locates hcloud from its fixed install dirs on every call; main's two overlapping paragraphs merged into one), and the 4-step --help discovery chain with the never-skip-step-3 rule for write operations and parameters (replacing the one-line "discover before guessing" hint). All gates green (1147/0). Content verified against main's versions; the billing row merge was the only wording-level change beyond parity.
The adoption of the eight huawei-cloud-* skills changed every number the docs had pinned. Measured from the live registry import: 52 tools (PACK_OF keys; core 12 + non-core 40), 10 packs (secrets was missing from every enumeration), 30 skills (6 core meta + 20 huaweicloud-cli service + 4 others). - README.md / README.zh-CN.md: 47 MCP tools / nine packs -> 52 / ten, with `secrets` enumerated and the zh 其余 count 28 -> 33 (52-12-7). - AGENTS.md: :37 50 tools -> 52; :57 38 pack tools -> 40 and "covers all 50" -> 52; the registry bullet's PACK_OF "50-key" -> "52-key", gains "incl. secrets" and the 12-legacy + 8-adopted family note (huawei-cloud-eye called out as a legacy skill that happens to carry the cloud prefix — the families split by provenance, pinned in test/structure.test.ts, not by prefix); :32's "24 non-core service skills" clarified (20 service + 4 others); the Skill Naming "zero-tool huaweicloud-cli pack" claim corrected (it owns the 7 KooCLI execution tools, trimmed together with the skills); the ~80-line rule gains the legacy exception (thin skills up to ~250 lines, adopted corpus 300-650 by design). Review: one interrogate round; the reviewer's four findings fixed (the surviving 50-key PACK_OF count, the prefix-disjoint family claim, the zero-tool contradiction, and the 600-line understatement).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #
Type of change
Checklist
<type>(<scope>): <subject>)npm testpasses locallynpm run validatepasses locallynpm run lintpasses locallyREADME & Documentation
Notes