import type { Tool } from "@github/copilot-sdk"; import type { FeatureOwner } from "./feature-flags.js"; import type { FactStore } from "./facts-store.js"; export type CapabilityKind = "skill" | "agent" | "tool" | "mcp"; export interface CapabilityArtifact { kind: CapabilityKind; name: string; description: string; body?: string; /** Opaque identity within one source revision. Never displayed as a path. */ id?: string; skills?: string[]; tools?: string[]; mcpServers?: string[]; initialPrompt?: string; } export interface CapabilitySource { id: string; name: string; source: "static" | "published"; revision: string; scope: "shared" | "user"; owner?: FeatureOwner | null; packageId?: string; artifacts: CapabilityArtifact[]; tools: Map>; mcpServers: Record; } export interface CapabilitySelection { sourceId: string; sourceRef?: string; tools: string[]; mcpServers: string[]; } export interface CapabilityState { revision: number; selections: CapabilitySelection[]; requests?: Array<{ id: string; hash: string; }>; } export declare const EMPTY_CAPABILITY_STATE: CapabilityState; export declare function normalizeCapabilityState(value: unknown): CapabilityState; export declare function capabilityHash(value: unknown): string; export declare function visibleCapabilitySource(source: CapabilitySource, owner: FeatureOwner | null): boolean; export type CapabilityOwnership = "static" | "owned" | "other_shared"; export declare function capabilityOwnership(source: CapabilitySource, owner: FeatureOwner | null): CapabilityOwnership; interface Ref { s: string; r: string; k: CapabilityKind | "source"; n: string; } export declare function capabilityRef(s: string, r: string, k: Ref["k"], n?: string): string; export declare function parseCapabilityRef(ref: unknown): Ref; export declare function resolveCapabilitySource(sources: CapabilitySource[], owner: FeatureOwner | null, ref: string): { source: CapabilitySource; ref: Ref; }; /** Complete, body-free inventory trusted for automatic Base V2 discovery. */ export declare function ownedAndStaticCapabilityInventory(sources: CapabilitySource[], owner: FeatureOwner | null): { kind: "skill" | "agent"; name: string; description: string; package: string; ownership: "static" | "owned"; scope: "shared" | "user"; ref: string; }[]; export declare class CapabilityCatalog { private readonly getSources; private readonly factStore?; private readonly reservedPrefixes; constructor(getSources: () => CapabilitySource[], factStore?: (FactStore | null) | undefined, reservedPrefixes?: string[]); private isCurated; search(owner: FeatureOwner | null, readerSessionId: string, args: { query: string; limit?: number; kinds?: CapabilityKind[]; sources?: string[]; }): Promise<{ capabilities: any[]; coverage: Record; }>; load(owner: FeatureOwner | null, readerSessionId: string, ref: string, kind: "skill" | "agent"): Promise<{ ref: string; source: string; revision: string; skill: any; } | { notice?: string | undefined; kind: CapabilityKind; name: string; description: string; body?: string; /** Opaque identity within one source revision. Never displayed as a path. */ id?: string; skills?: string[]; tools?: string[]; mcpServers?: string[]; initialPrompt?: string; ref: string; source: "static" | "published"; revision: string; ownership: CapabilityOwnership; mode: string; skill?: undefined; }>; } export {}; //# sourceMappingURL=capability-catalog.d.ts.map