hermes-agent/hermes_cli/subcommands
Ben Barclay eaa539552c feat(sync): HSP/1 personal skill sync client (Milestone 1, client strand)
Implements the hermes-agent HSP/1 sync CLIENT against the frozen wire
contract (~/src/specs/collective-wisdom/hsp-1-contract.md §8), tested
against an in-process mock HSP server.

tools/skills_sync_client.py (new, low-level; does NOT import the CLI):
  * Full 64-hex sha256 content addressing + canonical JSON (§2.1/§2.5,
    OI-5) — kept distinct from the truncated local content_hash namespace.
  * HSPClient: capabilities/refs/objects GET, batch object upload
    (multipart, raw bytes per §1/§4.2), CAS ref (§4.4) with 409->HSPConflict.
  * Object building: skill dir -> blob/tree/commit; exec-bit preserved,
    symlinks skipped, oversize (413) surfaced; profile-root category trees.
  * push/pull + three-way merge (M1-C): reuses the origin/user/incoming
    decision semantics of skills_sync.py; non-overlap -> merge commit +
    retry CAS; true overlap -> refs/user/<owner>/conflict/<n> + surface.
  * DEV-PHASE gate: sync is INERT unless the resolved Nous token carries
    tool_gateway_admin===true (decoded from the bearer; server re-verifies).
  * Auth reuses resolve_nous_runtime_credentials() (no refresh reimpl).
  * maybe_push_skills / maybe_pull_skills gate-and-swallow entrypoints.

Opt-in (M1-D): tools/skill_usage.set_sync / is_sync_enabled — a `sync`
flag on the .usage.json sidecar; nothing syncs unless opted in. Only
agent-created/user-authored skills are eligible (bundled/hub excluded).

Hooks:
  * Debounced push in skill_manage success block (after the write gate).
  * Periodic pull at the two curator tick sites (gateway housekeeping loop
    + CLI startup).

CLI: hermes sync status|pull|push|now|enable|disable
  (hermes_cli/subcommands/sync.py + cmd_sync in main.py).

Tests: tests/tools/test_skills_sync_client.py — 29 tests (addressing,
canonicalization, dev gate, opt-in, object building, merge decisions, and
e2e push/pull/idempotency/conflict against a stdlib mock HSP server).
2026-07-18 13:55:09 +10:00
..
__init__.py
_shared.py
acp.py
auth.py feat(auth): make xAI Grok OAuth device-code-only, drop loopback login 2026-07-02 13:17:41 -07:00
backup.py
claw.py
config.py feat(config): add get and unset commands 2026-07-16 05:44:43 -07:00
console.py Add safe Hermes console REPL 2026-07-03 20:18:00 +05:30
cron.py fix(cron): harden execution attempt ledger 2026-07-17 04:58:35 -07:00
dashboard.py feat(cli): make hermes serve a real headless backend 2026-06-30 17:58:52 -05:00
debug.py fix(security): require explicit consent before uploading debug logs 2026-07-01 00:38:17 -07:00
doctor.py
dump.py
gateway.py fix(gateway): preserve external supervisor ownership 2026-07-16 05:08:56 -07:00
gui.py
hooks.py
import_cmd.py
insights.py
login.py
logout.py
logs.py
mcp.py feat(cli): add --connect-timeout flag to hermes mcp add 2026-07-05 19:10:00 -07:00
memory.py
model.py feat(auth): make xAI Grok OAuth device-code-only, drop loopback login 2026-07-02 13:17:41 -07:00
pairing.py
plugins.py feat(plugins): enable-time consent prompt for tool_override grant 2026-06-30 04:00:42 -07:00
postinstall.py
profile.py
prompt_size.py
security.py
setup.py
skills.py fix(skills-hub): surface per-tap providers (NVIDIA/OpenAI/...) in runtime search (#53191) 2026-06-26 11:04:41 -07:00
slack.py feat(slack): support agent view manifests 2026-07-14 13:58:36 -07:00
status.py
sync.py feat(sync): HSP/1 personal skill sync client (Milestone 1, client strand) 2026-07-18 13:55:09 +10:00
tools.py
uninstall.py feat: add uninstall dry-run mode 2026-07-07 05:12:24 -07:00
update.py fix(update): consolidate pre-update backups into one gated mechanism (#65754) 2026-07-16 08:47:25 -07:00
version.py
webhook.py feat(gateway): add webhook payload filters 2026-07-08 08:10:55 -07:00
whatsapp.py