/** * Resource discovery and pattern matching for the package manager. * * Pure filesystem/string helpers extracted from package-manager.ts: recursive * file collection honoring nested ignore files, skill/prompt/theme/extension * auto-discovery, hoocode package-manifest reading, and the include/exclude * pattern engine (plain globs plus `!`/`+`/`-` overrides). None of these touch * the DefaultPackageManager instance; it imports and composes them. */ export interface HooCodeManifest { extensions?: string[]; skills?: string[]; prompts?: string[]; themes?: string[]; agents?: string[]; } export type ResourceType = "extensions" | "skills" | "prompts" | "themes" | "agents"; export declare const RESOURCE_TYPES: ResourceType[]; /** Resource types that are configurable via user/project settings. Excludes "agents" because * agent discovery is handled by AgentRegistry from conventional directories; only package * manifests supply agents through the package manager. */ export type SettingsResourceType = Exclude; export declare const SETTINGS_RESOURCE_TYPES: SettingsResourceType[]; export declare function getHomeDir(): string; export declare function isOverridePattern(s: string): boolean; export declare function hasGlobPattern(s: string): boolean; export declare function splitPatterns(entries: string[]): { plain: string[]; patterns: string[]; }; /** * How a skills directory is laid out. * * `hoocode`: a bare `*.md` at the root of the directory is itself a skill, as * well as the `/SKILL.md` form. `agents`: only the directory form, which * is what the cross-vendor `~/.agents` layout specifies. */ export type SkillDiscoveryMode = "hoocode" | "agents"; export declare function collectAutoSkillEntries(dir: string, mode: SkillDiscoveryMode): string[]; export declare function collectAncestorAgentsSkillDirs(startDir: string): string[]; export declare function collectAutoPromptEntries(dir: string): string[]; export declare function collectAutoThemeEntries(dir: string): string[]; export declare function collectAutoExtensionEntries(dir: string): string[]; /** * Collect resource files from a directory based on resource type. * Extensions use smart discovery (index.ts in subdirs), others use recursive collection. */ export declare function collectResourceFiles(dir: string, resourceType: ResourceType): string[]; export declare function isEnabledByOverrides(filePath: string, patterns: string[], baseDir: string): boolean; /** * Apply patterns to paths and return a Set of enabled paths. * Pattern types: * - Plain patterns: include matching paths * - `!pattern`: exclude matching paths * - `+path`: force-include exact path (overrides exclusions) * - `-path`: force-exclude exact path (overrides force-includes) */ export declare function applyPatterns(allPaths: string[], patterns: string[], baseDir: string): Set; //# sourceMappingURL=package-resource-discovery.d.ts.map