/**
 * Resource selection patterns for agents.yaml versions: entries.
 *
 * Pattern syntax: [!]source:name
 *   "system:*"     — all resources from ~/.agents/.system/
 *   "user:*"       — all resources from ~/.agents/
 *   "rush:*"       — all resources from ~/.agents-rush/  (extra repo alias)
 *   "project:*"    — all resources from .agents/ in the project root
 *   "user:foo"     — specifically the resource named "foo" from ~/.agents/
 *   "!user:temp"   — exclude "temp" from the user repo
 *
 * Evaluation rule: union all inclusions, then subtract all exclusions.
 */
export interface ParsedPattern {
    negate: boolean;
    source: string;
    name: string;
}
export declare function parsePattern(p: string): ParsedPattern;
/** Returns true if the string is a legacy plain name with no source: prefix. */
export declare function isLegacyName(p: string): boolean;
/**
 * Expand a list of patterns against an available name→source map.
 * Returns the union of matching names with exclusions subtracted.
 *
 * Supports comma-grouped names to avoid repeating the source prefix:
 *   "system:brain-scan,mq"  →  includes brain-scan and mq from system
 *   "!user:temp,draft"      →  excludes temp and draft from user
 *
 * Note: in YAML flow sequences ([...]) a comma inside a pattern requires
 * quoting ("system:brain-scan,mq"). Block-style items and yaml.stringify
 * output handle this automatically.
 */
export declare function expandPatterns(patterns: string[], available: Map<string, string>): string[];
/**
 * Build the default pattern list for a resource type.
 * Order: system → user → alias1 → alias2 → ... → project (base-to-override).
 * @param extraAliases  Alias names of enabled extra repos, in insertion order.
 * @param includeProject  Whether to append "project:*". False for hooks (security).
 */
export declare function defaultPatterns(extraAliases?: string[], includeProject?: boolean): string[];
