/** Metadata for a registered team. */
export interface TeamMeta {
    created_at: string;
    description?: string;
    enable_worktrees?: boolean;
    /** Shared worktree path for all teammates (mutually exclusive with enable_worktrees). */
    use_worktree?: string;
    /**
     * Distributed teams: the pool of devices this team may auto-schedule teammates
     * onto (from `agents devices`). One device → the whole team runs there; many →
     * unpinned teammates are least-loaded-scheduled across them; empty/absent →
     * every teammate runs locally (today's behavior).
     */
    devices?: string[];
    /**
     * Distributed teams: how each device gets the code — a git URL to clone or a
     * path that already exists on the host. Defaults to the local checkout's
     * `origin` at create time. Used by `ensureRemoteRepo` to provision the repo.
     */
    repo?: string;
    /**
     * The project (`agents projects`) this team works on. Its primary directory
     * is a local teammate's base cwd when neither `--cwd` nor a worktree gives
     * one, and its other bound directories become `--add-dir` grants.
     */
    project?: string;
}
/** Map of team name to team metadata. */
export type TeamRegistry = Record<string, TeamMeta>;
/**
 * Load all teams from the registry file. Returns an empty object only when
 * the file does not exist. A malformed file is a hard error — silently
 * returning {} would let any caller wipe the user's registry on the next
 * write, which is exactly the data-loss path we are trying to close.
 */
export declare function loadTeams(): Promise<TeamRegistry>;
export interface CreateTeamOptions {
    description?: string;
    enableWorktrees?: boolean;
    /** Path to an existing worktree for all teammates to share. */
    useWorktree?: string;
    /** Distributed pool of devices this team may auto-schedule teammates onto. */
    devices?: string[];
    /** How each device gets the code (git URL to clone, or a path on the host). */
    repo?: string;
    /** The `agents projects` project this team works on. */
    project?: string;
}
/** Create a new team. Throws if a team with the same name already exists. */
export declare function createTeam(name: string, options?: CreateTeamOptions): Promise<TeamMeta>;
/** Return existing team metadata or create a new team if it does not exist. */
export declare function ensureTeam(name: string): Promise<TeamMeta>;
/** Mark a team as disbanded so saveMeta will not resurrect its teammates. */
export declare function markTeamDisbanded(name: string): Promise<void>;
/** Clear a disband tombstone — called when the name is re-created. */
export declare function clearTeamDisbanded(name: string): Promise<void>;
/** True when the team was disbanded and has not been re-created since. */
export declare function isTeamDisbanded(name: string): Promise<boolean>;
/** Remove a team from the registry. Returns false if the team did not exist. */
export declare function removeTeam(name: string): Promise<boolean>;
/** Check whether a team with the given name exists in the registry. */
export declare function teamExists(name: string): Promise<boolean>;
/** Get metadata for a specific team. Returns null if team does not exist. */
export declare function getTeam(name: string): Promise<TeamMeta | null>;
