/** A skill source/registry that provides installable skills. */
export interface SkillRegistrySource {
    /** Unique registry identifier (e.g. 'anthropic', 'agentskill', 'skillssh'). */
    id: string;
    /** Human-readable registry name. */
    name: string;
    /** Base URL for this registry. */
    url: string;
    /** How to fetch skills from this registry. */
    type: 'github' | 'api' | 'npm';
    /** Fetch priority — lower number means higher priority (anthropic=1). */
    priority: number;
    /** Whether this registry is currently enabled. */
    enabled: boolean;
    /** Which registry discovered this one (for crawled registries). */
    discoveredFrom?: string;
    /** ISO 8601 timestamp of the last crawl. */
    lastCrawled?: string;
}
/** A skill returned from any registry during a unified search. */
export interface SkillSearchResult {
    /** Skill name as published in the source registry. */
    name: string;
    /** Short description of what the skill does. */
    description: string;
    /** Registry ID that provides this skill (e.g. 'anthropic'). */
    source: string;
    /** Command to install this skill (e.g. "planu registry install anthropic/frontend-design"). */
    installCommand: string;
    /** URL to the skill's page or repository. */
    url?: string;
    /** Author or organization that published the skill. */
    author?: string;
    /** Total install count across all users. */
    installs?: number;
    /** Security score 0-100 assigned by the registry or auditor. */
    securityScore?: number;
    /** Runtime/platform compatibility string (e.g. "node>=18, claude-3+"). */
    compatibility?: string;
    /** SPDX license identifier (e.g. "MIT"). */
    license?: string;
    /** Searchable tags for the skill. */
    tags?: string[];
    /** Relevance score 0-1 computed by the unified search engine. */
    relevanceScore: number;
}
/** Parameters for a unified skill search across registries. */
export interface SkillSearchParams {
    /** Free-text search query (e.g. "frontend design", "auth stripe"). */
    query: string;
    /** Registry ID to restrict search to, or 'all' to search every enabled registry. */
    registry?: string;
    /** Filter results by technology stack (e.g. "next.js", "react"). */
    stack?: string;
    /** Maximum number of results to return (default: 10). */
    limit?: number;
}
/** Result of installing a skill from a registry. */
export interface SkillInstallResult {
    /** Skill name as installed. */
    name: string;
    /** Registry ID the skill was fetched from. */
    source: string;
    /** Absolute path where the skill was installed. */
    installedPath: string;
    /** List of files written during installation. */
    filesWritten: string[];
    /** Whether the skill includes post-install scripts (security warning flag). */
    hasScripts: boolean;
    /** Installed version, if available. */
    version?: string;
    /** Security scan summary for this install, when the skill source was scanned. */
    securityScan?: SkillSecurityScanResult;
}
/** Severity labels returned by the skill security scanner. */
export type SkillSecuritySeverity = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL' | 'UNKNOWN';
/** Recommendation labels returned by the skill security scanner. */
export type SkillSecurityRecommendation = 'SAFE' | 'CAUTION' | 'DO_NOT_INSTALL' | 'UNKNOWN';
/** Policy to use when the external skill security scanner cannot run. */
export type SkillSecurityScannerUnavailablePolicy = 'fail-closed' | 'allow';
/** Options controlling skill security scanning during installation. */
export interface SkillInstallOptions {
    /** Policy for scanner execution failures. Defaults to fail-closed for external skills. */
    scannerUnavailablePolicy?: SkillSecurityScannerUnavailablePolicy;
}
/** In-memory skill content prepared before writing to host skill directories. */
export interface PreparedSkillInstallContent {
    /** SKILL.md content to write or scan. */
    content: string;
    /** Whether the source skill advertises executable script files. */
    hasScripts: boolean;
    /** Installed version, if available. */
    version?: string;
}
/** Normalized security scan summary persisted by Planu. */
export interface SkillSecurityScanResult {
    /** Scanner name. */
    scanner: 'skillspector';
    /** Scanner version, if reported by the scanner. */
    scannerVersion?: string;
    /** ISO 8601 timestamp when Planu ran or recorded the scan. */
    scannedAt: string;
    /** Numeric risk score, 0-100. */
    score: number;
    /** Risk severity label. */
    severity: SkillSecuritySeverity;
    /** Scanner recommendation. */
    recommendation: SkillSecurityRecommendation;
    /** Number of findings/issues reported by the scanner. */
    issuesCount: number;
    /** Exact scanner command shape used, without secrets or environment values. */
    command: string;
    /** Whether the scanner completed successfully. */
    available: boolean;
    /** Optional failure reason when available=false. */
    error?: string;
}
/** Minimal JSON shape emitted by SkillSpector in --format json mode. */
export interface SkillSpectorJsonReport {
    risk_assessment?: {
        score?: unknown;
        severity?: unknown;
        recommendation?: unknown;
    };
    issues?: unknown[];
    metadata?: {
        skillspector_version?: unknown;
    };
}
/** Manifest tracking all skills installed in a project. */
export interface SkillManifest {
    /** ISO 8601 timestamp of initial manifest creation. */
    installedAt: string;
    /** List of installed skill entries. */
    skills: InstalledSkillEntry[];
}
/** A single entry in the installed skills manifest. */
export interface InstalledSkillEntry {
    /** Skill name. */
    name: string;
    /** Registry ID the skill was installed from. */
    source: string;
    /** Installed version, if available. */
    version?: string;
    /** ISO 8601 timestamp of initial installation. */
    installedAt: string;
    /** ISO 8601 timestamp of last update. */
    updatedAt?: string;
    /** SPEC-668: ISO 8601 timestamp of last adaptation/TTL refresh. */
    adaptedAt?: string;
    /** SPEC-668: Tracks source availability; 'source-unavailable' when re-fetch fails. */
    sourceStatus?: 'active' | 'source-unavailable';
    /** Absolute path to the installed skill directory. */
    path: string;
    /** Security scan summary captured during installation, when available. */
    securityScan?: SkillSecurityScanResult;
}
/** SPEC-668: Result of a skills TTL refresh operation. */
export interface SkillTTLRefreshResult {
    /** Number of skills checked for staleness. */
    checked: number;
    /** Skills successfully refreshed with new content. */
    refreshed: string[];
    /** Skills that had no content change (already up to date). */
    upToDate: string[];
    /** Skills whose source was unreachable; flagged in manifest. */
    sourceUnavailable: string[];
    /** Skills skipped (adaptedAt within TTL). */
    skipped: string[];
}
/** In-memory cache entry for fetched skill lists. */
export interface SkillCacheEntry {
    /** Cached skill results. */
    data: SkillSearchResult[];
    /** Unix timestamp (ms) when the data was fetched. */
    fetchedAt: number;
}
/** A single item returned by the GitHub Contents API. */
export interface GitHubContentItem {
    /** File or directory name. */
    name: string;
    /** Entry type. */
    type: 'file' | 'dir';
    /** Raw download URL (files only). */
    download_url?: string;
    /** Path relative to repo root. */
    path?: string;
}
/** Parsed YAML frontmatter from a SKILL.md file. */
export interface SkillFrontmatter {
    name?: string;
    description?: string;
    author?: string;
    tags?: string[];
    version?: string;
    license?: string;
}
/** A single skill entry from the skills.sh catalog or search API. */
export interface SkillsShEntry {
    name?: string;
    owner?: string;
    description?: string;
    installCommand?: string;
    tags?: string[];
    installs?: number;
    author?: string;
    license?: string;
    url?: string;
}
/** Top-level response from the skills.sh catalog or search endpoint. */
export interface SkillsShResponse {
    skills?: SkillsShEntry[];
    results?: SkillsShEntry[];
}
/** A single skill entry from the agentskill.sh search API. */
export interface AgentSkillEntry {
    name?: string;
    description?: string;
    author?: string;
    tags?: string[];
    installs?: number;
    license?: string;
}
/** Top-level response from the agentskill.sh search endpoint. */
export interface AgentSkillResponse {
    skills?: AgentSkillEntry[];
    data?: AgentSkillEntry[];
}
/** Summary of a batch skill auto-install operation (SPEC-185). */
export interface SkillInstallSummary {
    /** Skills successfully installed in this run. */
    installed: string[];
    /** Skills skipped because they were already installed. */
    skipped: string[];
    /** Skills that failed to install (non-blocking). */
    failed: {
        name: string;
        error: string;
    }[];
}
/** A single entry in the built-in skill catalog (skill-catalog.json). */
export interface BuiltInSkillEntry {
    /** Unique skill name (kebab-case). */
    name: string;
    /** Short description of what the skill does. */
    description: string;
    /** Category grouping (e.g. "planning", "security", "testing"). */
    category: string;
    /** Searchable tags. */
    tags: string[];
    /** When to invoke this skill. */
    trigger: string;
    /** Command to install this skill. */
    installCommand: string;
    /** Whether this is a built-in Planu skill. */
    builtIn: boolean;
    /** Recommended Claude model for this skill (haiku | sonnet). */
    model?: string;
    /** Effort level for this skill (low | medium). */
    effort?: string;
}
/** Catalog of built-in skills (skill-catalog.json top-level shape). */
export interface SkillCatalog {
    /** List of built-in skill entries. */
    skills: BuiltInSkillEntry[];
}
/** Result of crawling registries to discover new ones. */
export interface RegistryDiscoveryResult {
    /** Newly discovered registries not previously known. */
    newRegistries: SkillRegistrySource[];
    /** All URLs crawled during discovery. */
    crawledUrls: string[];
    /** Non-fatal errors encountered during crawling. */
    errors: string[];
}
/** Source identifier for universal skill discovery (SPEC-606). */
export type SkillDiscoverySource = 'skills.sh' | 'github' | 'npm' | 'anthropic' | 'builtin';
/** Skill format returned by universal discovery (SPEC-606). */
export type SkillFormat = 'agent-skills-spec' | 'markdown' | 'unknown';
/** A skill result from the universal multi-source discovery engine (SPEC-606). */
export interface UniversalSkillResult {
    /** Skill name as published in the source. */
    name: string;
    /** Which discovery source provided this result. */
    source: SkillDiscoverySource;
    /** Short description of what the skill does. */
    description: string;
    /** Compatible technology stacks (e.g. ["react", "next.js"]). */
    stacks: string[];
    /** Total download/install count if available. */
    downloadCount?: number;
    /** URL to the skill's page or repository. */
    url?: string;
    /** Skill file format. */
    format: SkillFormat;
}
/** A ranked skill result from the universal discovery engine (SPEC-606). */
export interface RankedSkillResult extends UniversalSkillResult {
    /** Composite rank score 0-1 (higher = better match). */
    rankScore: number;
}
/** Options for universal skill search (SPEC-606). */
export interface UniversalSearchOptions {
    /** Filter by project stack (e.g. "react"). */
    stack?: string;
    /** Maximum results to return (default: 10). */
    limit?: number;
    /** Which sources to include (default: all). */
    sources?: SkillDiscoverySource[];
}
/** Interface that every discovery source adapter must implement (SPEC-606). */
export interface SkillSourceAdapter {
    /** Unique name identifying this adapter (matches SkillDiscoverySource). */
    name: string;
    /** Search for skills matching the query in this source. */
    search(query: string, options?: {
        stack?: string;
        limit?: number;
    }): Promise<UniversalSkillResult[]>;
}
/** Result of splitting skill content for progressive disclosure (SPEC-606). */
export interface SplitSkillContent {
    /** Compact body: frontmatter + key instructions, fits in context window. */
    body: string;
    /** Map of reference filename → full reference content. */
    references: Map<string, string>;
}
/** A single item from the GitHub repository search API response. */
export interface GitHubSearchItem {
    /** Repository name (without owner). */
    name?: string;
    /** Full repository name (owner/repo). */
    full_name?: string;
    /** Repository description. */
    description?: string | null;
    /** HTML URL to the repository. */
    html_url?: string;
    /** Topic tags applied to the repository. */
    topics?: string[];
    /** GitHub star count (used as download proxy for ranking). */
    stargazers_count?: number;
}
/** Top-level response from the GitHub repository search API. */
export interface GitHubSearchResponse {
    /** Array of matching repository items. */
    items?: GitHubSearchItem[];
}
/** Sources from which a skill can be installed/adapted (SPEC-680). */
export type SkillSource = 'superpowers' | 'anthropic' | 'local' | 'community';
/** A single entry in the .planu/skill-registry.json tracking skill provenance (SPEC-680). */
export interface SkillRegistryEntry {
    /** Skill name (kebab-case). */
    skillName: string;
    /** Source from which this skill was installed. */
    source: SkillSource;
    /** Installed version, or null if unavailable. */
    version: string | null;
    /** ISO 8601 timestamp of last adaptation/install. */
    adaptedAt: string;
    /** Number of days before the skill is considered stale. Default: 30. */
    ttlDays: number;
    /** Set when a local source overwrote a remote source. */
    conflictResolution?: 'local-wins';
}
/** Top-level .planu/skill-registry.json structure (SPEC-680). */
export interface SkillRegistry {
    /** ISO 8601 — set once on creation. */
    createdAt: string;
    /** ISO 8601 — updated on every write. */
    updatedAt: string;
    /** Ordered list of enabled sources for this project. */
    sources: SkillSource[];
    /** Map of skill name → registry entry. */
    installed: Record<string, SkillRegistryEntry>;
}
import type { SkillWriteTarget } from './skill-generation.js';
/** A workflow skill definition used for generating .claude/skills/*.md files (SPEC-685). */
export interface WorkflowSkillDefinition {
    /** Kebab-case filename without extension, e.g. 'implement-spec' */
    name: string;
    /** Short description of what this skill does. */
    description: string;
    /** Markdown body with {typecheck_cmd}, {test_cmd}, {package_manager} placeholders */
    templateBody: string;
    /** File glob patterns that trigger this skill automatically */
    triggers?: string[];
    /** Claude tools this skill is allowed to use */
    allowedTools?: string[];
}
/** Options for generateWorkflowSkills (SPEC-685). */
export interface WorkflowSkillGenerationOptions {
    /** Which agent targets to generate for. Default: ['claude']. */
    targets?: SkillWriteTarget[];
    /** Force regeneration even if conventions unchanged. Default: false. */
    force?: boolean;
}
/** Result of generateWorkflowSkills (SPEC-685). */
export interface WorkflowSkillGenerationResult {
    /** Skill names that were written (new or updated). */
    written: string[];
    /** Skill names that were skipped (conventions unchanged). */
    skipped: string[];
    /** Any non-fatal errors (skill name → error message). */
    errors: Record<string, string>;
}
//# sourceMappingURL=skill-registry.d.ts.map