/** * Open-role registry collector. * * An "open" role (`config.open === true`) exposes a subset of its subagents to * external consumers via `config.exports`. When `exports` is absent, only the * role id itself is addressable — subagents are NOT exposed. * * This module collects one entry per open role from the resolved role set and * resolves each export name to the subagent's full id (`roleId--slug`), using * the exact slug computation the orchestrator applies when building subagent * ids (src/resolver/orchestrator.ts:118-119). Unknown export names are logged * as warnings and skipped — resolution never fails because of them. */ import type { Logger } from "tslog"; import type { ILogObj } from "tslog"; import type { ResolvedRole } from "../types.ts"; /** A single open-role registry entry: the role's metadata plus resolved export ids. */ export interface OpenRoleEntry { /** Role id (directory name). */ roleId: string; /** Role display name (`config.name`). */ name: string; /** Role description (`config.description`). */ description: string; /** Full subagent ids (`roleId--slug`) exposed by this role; empty when none. */ exports: string[]; } /** @internal Test seam — swap the module-level logger for a mock. */ export declare function __setLoggerForTest(mockLog: Logger): void; /** * Compute a subagent slug from its display name — exactly as the orchestrator * does when deriving subagent ids (src/resolver/orchestrator.ts:118). */ export declare function toSubagentSlug(name: string): string; /** * Collect open-role registry entries from a set of resolved roles. * * Only roles with `config.open === true` are included. Each `config.exports` * entry is matched (case/whitespace-insensitively) against the slug of every * subagent in the role's tree — top-level first, then nested — and resolved to * that subagent's full id. Export names that match no subagent are logged as * warnings and dropped; they never fail resolution. * * @param resolvedRoles - The fully resolved role set. * @returns A Map keyed by roleId, in input order. */ export declare function collectOpenRoles(resolvedRoles: ResolvedRole[]): Map; //# sourceMappingURL=open-roles.d.ts.map