/** * Team roster service (specs/2026-10-10-team-roster.md). * * Reads the harness's records, builds the roster with * {@link buildRoster}, and keeps the result for a short time so the prompt * module, the API and the skills share one build. Every source is read-only * and fail-soft: a source that cannot be read leaves that part of the roster * empty instead of failing the whole thing. * * @module services/team-roster/team-roster.service */ import type { Project, Team } from '../../types/index.js'; import { type OwnerCandidate, type RosterTeam, type RosterTicket, type RosterWorkItem } from './team-roster.builder.js'; /** Where the roster reads from; every member is replaceable in tests. */ export interface TeamRosterDeps { getTeams: () => Promise; getProjects: () => Promise; listTickets: (projectPath: string) => Promise; getWorkItems: () => Promise; getChannels: () => Promise>; now: () => Date; } /** * Builds and serves the team roster. * * @example * ```typescript * const md = await TeamRosterService.getInstance().renderForPrompt(); * const hits = await TeamRosterService.getInstance().find('record a promo video for flopost'); * ``` */ export declare class TeamRosterService { private static instance; private readonly deps; private readonly logger; private cached; private inflight; /** * @param deps - Replacement sources (tests) */ constructor(deps?: Partial); /** * Process-wide instance. * * @returns The singleton */ static getInstance(): TeamRosterService; /** Reset the singleton (tests). */ static resetInstance(): void; /** Drop the cached roster so the next read rebuilds it (a charter or team changed). */ invalidate(): void; /** * The roster, rebuilt at most once per {@link TEAM_ROSTER_CONSTANTS.CACHE_TTL_MS}. * * @param opts - `fresh` skips the cache * @returns One entry per live team, busiest first */ getRoster(opts?: { fresh?: boolean; }): Promise; /** * The roster as prompt markdown, under the token budget. * * @param maxTokens - Budget (defaults to {@link TEAM_ROSTER_CONSTANTS.PROMPT_MAX_TOKENS}) * @returns Markdown, or '' when there are no teams */ renderForPrompt(maxTokens?: number): Promise; /** * Rank teams and members for a request. * * @param request - What the owner asked for * @param limit - Candidates to return * @returns Best first; empty when nothing matches */ find(request: string, limit?: number): Promise; /** Read every source and build. */ private build; } //# sourceMappingURL=team-roster.service.d.ts.map