export type TeamsStyle = string;
export interface TeamMember {
    name: string;
    role: "lead" | "worker";
    addedAt: string;
    status: "online" | "offline";
    lastSeenAt?: string;
    /** Optional: teammate session file path (useful for debugging) */
    sessionFile?: string;
    /** Optional: teammate working directory */
    cwd?: string;
    /** Freeform metadata for future use */
    meta?: Record<string, unknown>;
}
export type TeamHooksFailureAction = "warn" | "followup" | "reopen" | "reopen_followup";
export type TeamHooksFollowupOwnerPolicy = "member" | "lead" | "none";
export interface TeamHooksPolicy {
    failureAction?: TeamHooksFailureAction;
    maxReopensPerTask?: number;
    followupOwner?: TeamHooksFollowupOwnerPolicy;
}
export interface TeamConfig {
    version: 1;
    teamId: string;
    /** Task list namespace identifier (Claude-style: often teamName or parentSessionId) */
    taskListId: string;
    /** Internal leader agent id (mailbox name, member name, etc.) */
    leadName: string;
    /** Optional UI/UX style. If omitted, treat as "normal". */
    style?: TeamsStyle;
    /** Optional per-team hooks policy override (env remains fallback). */
    hooks?: TeamHooksPolicy;
    createdAt: string;
    updatedAt: string;
    members: TeamMember[];
}
export declare function getTeamConfigPath(teamDir: string): string;
export declare function loadTeamConfig(teamDir: string): Promise<TeamConfig | null>;
export declare function ensureTeamConfig(teamDir: string, init: {
    teamId: string;
    taskListId: string;
    leadName: string;
    style?: TeamsStyle;
}): Promise<TeamConfig>;
export declare function setTeamStyle(teamDir: string, style: TeamsStyle): Promise<TeamConfig | null>;
export declare function updateTeamHooksPolicy(teamDir: string, updater: (current: TeamHooksPolicy) => TeamHooksPolicy | undefined): Promise<TeamConfig | null>;
export declare function upsertMember(teamDir: string, member: Omit<TeamMember, "name" | "addedAt"> & {
    name: string;
    addedAt?: string;
}): Promise<TeamConfig>;
export declare function setMemberStatus(teamDir: string, memberName: string, status: "online" | "offline", extra?: {
    lastSeenAt?: string;
    meta?: Record<string, unknown>;
}): Promise<TeamConfig | null>;
