"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AgentTeamRegistry = void 0;
class AgentTeamRegistry {
    teams = [];
    constructor(seed) {
        if (seed?.length)
            this.teams = seed;
    }
    list() { return [...this.teams]; }
    upsert(team) {
        const idx = this.teams.findIndex(t => t.id === team.id);
        if (idx >= 0)
            this.teams[idx] = team;
        else
            this.teams.push(team);
    }
    resolveByDomain(domain) {
        return this.teams.find(t => t.domain === domain) || null;
    }
}
exports.AgentTeamRegistry = AgentTeamRegistry;
