chore(skills): docs + ruff format for skill-management-console
Tests / Test passed: 855

Documents Skill Management in CLOUD_DEPLOYMENT.md (cloud-skill store,
per-host entitlement, incremental sync, local authoring/override,
inventory report, skills:admin scope) and applies ruff check/format to
all touched modules. All tasks complete; full non-integration suite
green (593 passed) and openspec validate --strict passes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-15 08:10:20 +08:00
co-authored by Claude Opus 4.6
parent fd0ea3a066
commit f8054cb58c
9 changed files with 83 additions and 53 deletions
+3 -6
View File
@@ -7,6 +7,7 @@ truth" contract is enforced by that import boundary.
Push (webhook) is optional; the baseline pull loop is correct standalone.
"""
from __future__ import annotations
import logging
@@ -185,9 +186,7 @@ class CloudApiSkillClient:
response.raise_for_status()
return _parse_cloud_sync_payload(response.json())
def report_inventory(
self, host_id: str, inventory: list[dict[str, Any]]
) -> None:
def report_inventory(self, host_id: str, inventory: list[dict[str, Any]]) -> None:
"""Best-effort local-skill inventory report to the Cloud (design D7)."""
response = self._ensure_client().post(
f"{self.base_url}/internal/v1/hosts/{host_id}/skills/inventory",
@@ -312,9 +311,7 @@ class SkillSyncRunner:
subscription_id, since_version=since_version
)
except Exception as exc:
log.warning(
"skill sync fetch failed for %s: %s", subscription_id, exc
)
log.warning("skill sync fetch failed for %s: %s", subscription_id, exc)
self.store._set_subscription_state(
subscription_id,
last_error=f"{type(exc).__name__}: {exc}",