/** * OpenViking skill provider for the DSH skill registry. * * This is the "inject OpenViking skills into the skill catalog" seam: it * registers one `ctx.skills` provider named `openviking` whose catalog * entries come from `GET /api/v1/skills` (the current user's private skills * plus the account-shared agent skills) and whose full bodies are loaded on * demand through `GET /api/v1/skills/{name}?include_content=true`. * * Whatever the model sees under `` and can load through the * `skill` tool is exactly the set of skills saved in OpenViking (minus names * that fail the kebab-case grammar or have an empty description). A * reachable-but-empty server contributes nothing; an unreachable server * reports an incomplete observation so the host never caches an empty * catalog as authoritative. * @module openviking-memory/skill-provider */ import type { Context } from '@deepseek-ai/cordis'; import type { OpenVikingConfig } from './config.ts'; import type { OpenVikingClient } from './ov-client.ts'; /** Provider name surfaced in catalogs and `skill` tool results. */ export declare const OPENVIKING_SKILL_PROVIDER = "openviking"; /** Discovery source label shown next to each contributed skill. */ export declare const OPENVIKING_SKILL_SOURCE = "openviking"; /** * Catalog rank: local user filesystem skills (rank 400–500) win over an * OpenViking copy of the same name, while OpenViking skills still outrank * bundled skills (rank 600). */ export declare const OPENVIKING_SKILL_RANK = 550; /** Opaque provider handle carried by each candidate back into `get()`. */ export interface OpenVikingSkillLocator { /** Kebab-case skill name. */ readonly skillName: string; /** Canonical skill root URI, e.g. `viking://user/default/skills/search-web`. */ readonly rootUri: string; /** `target_uri` disambiguator for `get_skill`; set only for agent-root skills. */ readonly targetUri?: string; } /** Metadata OpenViking attaches to a skill (mirrored into candidate/definition metadata). */ export interface OpenVikingSkillMetadata { readonly tags?: string[]; readonly allowedTools?: string[]; readonly [key: string]: unknown; } export interface OpenVikingSkillProviderOptions { client: OpenVikingClient; /** Live config source; read per discovery/load so settings changes apply immediately. */ config: () => OpenVikingConfig; } /** * Register the OpenViking skill provider on `ctx.skills`. Registration is * synchronous during plugin apply; network discovery happens lazily inside * `list()`. The returned disposer unregisters the provider. */ export declare function registerOpenVikingSkillProvider(ctx: Context, options: OpenVikingSkillProviderOptions): () => void; /** * Split a raw SKILL.md into its body and the leading YAML frontmatter block, * extracting the `name` and `description` scalars when present. Skills without * a `---` header are returned whole. */ export declare function stripSkillFrontmatter(raw: string): { body: string; name?: string; description?: string; }; //# sourceMappingURL=skill-provider.d.ts.map