/** * `SkillsManager` — browser stub. * * The Node version walks the filesystem to discover `SKILL.md` files, * which is fundamentally Node-only. In the browser there is no * filesystem, no `node_modules`, no `~/.qodo/skills`. Rather than * polyfill, the stub throws a clear error directing the consumer to * either: * * 1. Not configure `ClientOptions.skills` in browser code paths * (the field is optional; omitting it leaves the SDK behaving * exactly as today). * 2. If skills are needed, run discovery server-side and ship the * pre-built catalog through their own data plane. * * The Node version of this file is `manager.ts`; the swap is wired via * the `browser` field in `package.json`. */ import type { ParsedSkill, SkillEvent, SkillsConfig } from './types.js'; export interface CatalogSnapshot { readonly skills: readonly ParsedSkill[]; readonly bySource: readonly never[]; readonly excluded: readonly never[]; readonly epoch: number; } export interface SkillGetOptions { readonly includeAllVersions?: boolean; } /** * Mirrors the Node-side `ResolvedRequiresCaps` shape so consumer code * typing against the manager surface compiles identically in both * environments. (Activation pipeline is Node-only; the values returned * here are the documented defaults so a reader-only consumer * surfacing the operative limits in a UI sees them.) */ export interface ResolvedRequiresCaps { readonly maxDepth: number; readonly maxTransitive: number; readonly maxTransitiveTokens: number; } export declare class SkillsManager { constructor(_config: SkillsConfig); discover(): Promise; forwardEvents(_events: readonly SkillEvent[]): void; get isReady(): boolean; get currentSnapshot(): CatalogSnapshot | null; get defaultActivate(): readonly string[] | undefined; get indexCharBudget(): number | undefined; get embedder(): SkillsConfig['embedder'] | undefined; get activationConfig(): SkillsConfig['activation'] | undefined; list(_opts?: SkillGetOptions): Promise; get(_specifier: string): Promise; resolveOrThrow(_specifiers: readonly string[]): Promise; isTrusted(_skill: ParsedSkill): boolean; get requiresCapsResolved(): ResolvedRequiresCaps; getActiveSkills(): readonly string[]; markActive(_fqn: string): boolean; deactivate(_fqn: string): boolean; resetActive(): void; get internalActiveFqns(): Set; startWatching(): Promise; stopWatching(): void; dispose(): void; get catalogEpoch(): number; onRebuild(_listener: (snapshot: CatalogSnapshot) => void): () => void; rebuildNow(): Promise; } export declare class SkillNotFoundError extends Error { readonly specifier: string; constructor(specifier: string); } export declare class SkillAmbiguousPinError extends Error { readonly specifier: string; readonly candidates: readonly string[]; constructor(specifier: string, candidates: readonly string[]); } export declare class SkillsBudgetExceededError extends Error { readonly omittedSkills: readonly string[]; readonly hardCap: number; constructor(omittedSkills: readonly string[], hardCap: number); } /** * Mirrors the Node-side `QodoSkillError`. Thrown by the activation * pipeline when caller-pin resolution fails (trust violation, cap * breach, cycle, unresolved dep). The browser stub doesn't run the * pipeline, but the class shape is exposed so consumer `catch (err * instanceof QodoSkillError)` blocks compile in both environments. */ export declare class QodoSkillError extends Error { readonly skill: string; readonly reason: 'requires_trust_violation' | 'requires_cap_exceeded' | 'requires_cycle' | 'requires_unresolved' | 'not_found'; constructor(skill: string, reason: QodoSkillError['reason'], message: string); } //# sourceMappingURL=manager.browser.d.ts.map