/** * Team config filesystem CRUD. * * Port of cc-agent-teams-impl-mcp teams.py into TypeScript. * Storage layout: ~/.codex-teams-mcp/teams//config.json * * All writes are atomic (write to tmp file, then rename) to avoid * partial reads from concurrent agents. */ import type { TeamConfig, TeammateMember } from './types.js'; /** Root directory for all team configs. */ export declare function teamsDir(): string; /** Root directory for all team task graphs. */ export declare function tasksDir(): string; /** Directory for a specific team. */ export declare function teamDir(teamName: string): string; /** Path to a team's config.json. */ export declare function configPath(teamName: string): string; /** Returns true if config.json exists for the given team. */ export declare function teamExists(teamName: string): boolean; /** * Create a new team on disk. * * 1. Validates name against regex + max length. * 2. Creates team dir, tasks dir, and inboxes dir. * 3. Creates a .lock file in the tasks dir. * 4. Optionally creates a Git worktree (non-fatal on failure). * 5. Writes the initial config atomically. * * @returns The newly created TeamConfig. */ export declare function createTeam(name: string, description: string, sessionId: string, cwd: string): Promise; /** * Read and parse a team's config.json. * * Throws if the file does not exist or contains invalid JSON. */ export declare function readConfig(teamName: string): Promise; /** * Atomically write a team config. * * Writes to a .tmp file in the team directory, then renames it over * the real config.json. This prevents concurrent readers from seeing * a partial file. */ export declare function writeConfig(teamName: string, config: TeamConfig): Promise; /** * Add a teammate to the team config. * * Rejects duplicate names. Does not accept LeadMember (use createTeam * for that). */ export declare function addMember(teamName: string, member: TeammateMember): Promise; /** * Remove a member from the team config by name. * * Refuses to remove "team-lead". */ export declare function removeMember(teamName: string, memberName: string): Promise; /** * Delete a team and its associated directories. * * Refuses to delete if any non-lead members (TeammateMember) still exist * in the config. Remove all teammates first. */ export declare function deleteTeam(teamName: string): Promise; /** * Find a TeammateMember by name in a team's config. * * Returns undefined if the member does not exist or is the lead. */ export declare function getTeammate(teamName: string, name: string): Promise; //# sourceMappingURL=config.d.ts.map