/** * The role-id shape the mirror lookup accepts — upstream `ROLE_ID_PATTERN` * semantics (`/^[a-z0-9-]{1,32}$/`, dsh-llm-fallbacks `src/config.ts`), * implemented locally (no import-shape assumptions). The role id flows from * the child's Assignment header (`Execute as`) into a filesystem path, so * it is constrained to this shape BEFORE any path join: no `..`, no path * separators, no absolute roots, bounded length. All 14 mirror stems comply. */ export declare const ROLE_ID_PATTERN: RegExp; /** One resolved persona: the text and its source. */ export interface PersonaResult { text: string; source: 'config' | 'default'; } /** The lookup surface {@link personaFor} consumes. */ export interface PersonaLookup { /** Config-sourced persona map (`rolePersonas`) — wins over the mirror default. */ rolePersonas?: Record | null; /** The mirror root (`harness-agents/`); absent → mirror defaults are skipped. */ agentsDir?: string; } /** Warn sink for extraction-time hazards (bound by the persona channel to its warn sink). */ export type PersonaWarnSink = (message: string) => void; /** * The persona channel's single lookup: `rolePersonas[roleId]` → mirror * default → undefined. Pure — the mirror root is passed explicitly (the * channel supplies the apply-bound packaged root; tests supply fixtures). * * @param roleId - the mstar role id (Assignment `Execute as`). * @param lookup - the config override map and the mirror root. * @param warn - optional extraction-time warn sink (hazard defaults). */ export declare function personaFor(roleId: string, lookup: PersonaLookup, warn?: PersonaWarnSink): PersonaResult | undefined; /** * The mstar role-id set for one mirror: the file stems of the shells * eligible as subagent role defaults (`mode` absent-or-`subagent` — a * `primary` shell like `project-manager` is excluded), sorted for * deterministic warn listings. The adoption advisory derives its taxonomy reference * from here — never hardcoded. Reads the mirror directory + each shell's * frontmatter once per call (the advisory invokes it once per apply — no * cache needed). Returns `[]` for an unreadable/absent mirror directory. */ export declare function subagentRoleIds(agentsDir: string): string[];