/** * Hermes `~/.hermes/skills/.usage.json` → CLEO `skills.db` migrator. * * Reads the Hermes sidecar (one JSON object keyed by skill name), maps * Hermes provenance into the CLEO `source_type` enum, and inserts * equivalent rows into `skills.db` via the * {@link bulkImportFromHermes} adapter helper. * * Counter fields (`use_count`, `view_count`, `patch_count`) are * synthesized into `skill_usage` rows so the freshly-imported registry * is queryable by `cleo skills stats` immediately after migration. * * ## Provenance mapping * * The Hermes sidecar exposes `created_by` (`agent` / `null`) and a * separate `.bundled_manifest` file listing hub-bundled skills as * `:` lines. The mapping is: * * | Hermes signal | CLEO `source_type` | * |---------------------------------|--------------------| * | `created_by == 'agent'` | `agent-created` | * | listed in `.bundled_manifest` | `canonical` | * | otherwise | `user` | * * `community` is intentionally NEVER produced — Hermes' marketplace * concept doesn't have a 1:1 equivalent so we conservatively label * those as `user` and let the operator promote them later via * `cleo skills mark-community` (out of scope for T9691). * * @task T9691 * @epic T9561 * @saga T9560 * @architecture docs/architecture/SG-CLEO-SKILLS-architecture-v3.md §4 */ import type { SkillImportHermesRequest, SkillImportHermesResponse } from '@cleocode/contracts'; /** * Run the Hermes → CLEO migration as described by {@link SkillImportHermesRequest}. * * Behaviour: * 1. Resolve Hermes home (request override > $HERMES_HOME > ~/.hermes). * 2. Read `/skills/.usage.json` (skip silently if absent). * 3. Read `/skills/.bundled_manifest` for canonical mapping. * 4. For each entry, derive the `skills` row + synthesize usage counters. * 5. Upsert atomically via `upsertSkillRow` (idempotent by `name`). * * The dry-run mode walks the same code paths but skips writes. The returned * response is identical in shape — callers can diff dry-run vs real-run * outcomes without re-invoking. * * @param request - Import request envelope. * @returns Per-row outcomes + summary counters. * * @task T9691 */ export declare function importFromHermes(request?: SkillImportHermesRequest): Promise; //# sourceMappingURL=hermes-importer.d.ts.map