/**
 * @fileoverview Agent Teams Watcher
 *
 * Polls ~/.claude/teams/ and ~/.claude/tasks/ for agent team activity.
 * Matches teams to Codeman sessions via leadSessionId and emits
 * events for UI updates and team-aware idle detection.
 *
 * @module team-watcher
 */
import { EventEmitter } from 'node:events';
import type { TeamConfig, TeamMember, TeamTask, InboxMessage } from './types.js';
export declare class TeamWatcher extends EventEmitter {
    private teamsDir;
    private tasksDir;
    private pollTimer;
    private teams;
    private teamTasks;
    private inboxCache;
    private configMtimes;
    private taskMtimes;
    private inboxMtimes;
    private sessionToTeam;
    private teamsWatcher;
    private tasksWatcher;
    constructor(teamsDir?: string, tasksDir?: string);
    start(): void;
    private setupFsWatchers;
    stop(): void;
    /** Get all discovered teams */
    getTeams(): TeamConfig[];
    /** Get team associated with a Codeman session (matched by leadSessionId) */
    getTeamForSession(sessionId: string): TeamConfig | undefined;
    /** Get tasks for a team (excluding internal tasks) */
    getTeamTasks(teamName: string): TeamTask[];
    /** Count active (non-completed) tasks for a team */
    getActiveTaskCount(teamName: string): number;
    /** Get inbox messages for a team member (or all members) */
    getInboxMessages(teamName: string, member?: string): InboxMessage[];
    /** Check if a session has active teammates (for idle detection) */
    hasActiveTeammates(sessionId: string): boolean;
    /** Get teammates that have real tmux panes (not in-process) */
    getTmuxPaneTeammates(teamName: string): Array<TeamMember & {
        tmuxPaneId: string;
    }>;
    /** Get count of active teammates for a session */
    getActiveTeammateCount(sessionId: string): number;
    private poll;
    private pollAsync;
    private pollTeams;
    private pollTasks;
    private pollInboxes;
    /** Check for directory-based lock (mkdir atomic locking) */
    private isLocked;
    private readJson;
}
//# sourceMappingURL=team-watcher.d.ts.map