export interface ParsedSkillInstallSource { kind: 'local' | 'git' | 'github' | 'agentbuddy'; value: string; github?: { owner: string; repo: string; path?: string; ref?: string; }; agentbuddy?: AgentbuddySource; } /** A skill (or collection) to fetch through the external `agentbuddy` CLI. * `collection` is mutually exclusive with `group`/`skill`. No registry host or * auth lives here — the daemon host's configured `agentbuddy` binary owns that, * so the public source never carries an internal domain. */ export interface AgentbuddySource { /** agentbuddy protocol — `skill` (default) or `plugin`. */ protocol?: 'skill' | 'plugin'; collection?: string; group?: string; skill?: string; version?: string; } /** Stable identifier persisted in the skill registry and rendered back to * users. Keep this formatter beside the parser so every emitted identifier is * guaranteed to have a matching parse form. */ export declare function formatAgentbuddyIdentifier(opts: AgentbuddySource): string; export declare function redactGitUrlCredentials(raw: string): string; export declare function assertNoGitUrlCredentials(raw: string): void; export declare function assertAllowedGitProtocol(raw: string): void; /** Refuse refs that could be mistaken for a `git checkout` option (leading `-`) * or carry control characters. Real branch/tag/commit refs never start with a * dash, so this is safe to reject outright. */ export declare function assertSafeGitRef(ref: string | undefined): void; export declare function assertSafeGitSkillPath(path: string): void; /** Parse a pasted agentbuddy install command into an agentbuddy source. * Accepts the exact copy-command the marketplace shows, e.g.: * agentbuddy skill collection add * agentbuddy plugin collection add * agentbuddy skill add --skill [--version ] * agentbuddy skill add / [--version ] * and tolerates a leading `KEY=VALUE … npx [-y] agentbuddy@latest …` prefix * (the env + runner the site prepends). Only install subcommands (`add`, * `collection add`) of `skill`/`plugin` are accepted — other agentbuddy * subcommands (publish/remove/login/…) return null so a stray command can't * drive the CLI. Returns null for anything that isn't such a command. */ export declare function parseAgentbuddyCommand(raw: string): AgentbuddySource | null; /** Parse the canonical `agentbuddy:` identifiers documented in * docs/setup/skills.md, which the dashboard install box accepts directly: * agentbuddy:collection/ * agentbuddy:/[@] * A leading `skill`/`plugin` segment is always treated as the protocol, for * both `collection/` and `/` — that is the exact shape * formatAgentbuddyIdentifier() writes into the registry, so a saved source * re-parses back to the same target (see the round-trip test in * test/skill-sources.test.ts). * Consequence, deliberate: a group whose FIRST segment is literally `skill` or * `plugin` cannot be expressed here — `agentbuddy:skill/health` reads as * protocol `skill` + an incomplete target and throws. Real groups are * registry-host prefixed (`skills.example.com/team`), so this does not collide * in practice; the round-trip guarantee is worth more than that name. * Throws `invalid_agentbuddy_*` for malformed identifiers (an `agentbuddy:` * prefix is an explicit intent — it must never fall through to another kind). * Returns null when `raw` carries no `agentbuddy:` prefix at all. */ export declare function parseAgentbuddyIdentifier(raw: string): AgentbuddySource | null; /** Recognize the open-source `skills` CLI (vercel-labs/skills) add command and * route its GitHub source into botmux's native GitHub/Git install — no extra * dependency, and public repos need no auth. Accepts: * skills add (also the `add-skill ` bin) * npx [-y] skills[@latest] add * where is a GitHub shorthand or a GitHub/Git URL. Returns null * for anything that isn't such a command. */ export declare function parseSkillsInstallCommand(raw: string): ParsedSkillInstallSource | null; export declare function parseSkillInstallSource(raw: string): ParsedSkillInstallSource; export declare function githubToGitUrl(owner: string, repo: string): string; //# sourceMappingURL=sources.d.ts.map