import type { AgentInvocation, IfBusyPolicy, MemberPreset, RoomMessage, RoomMessageKind, RoomMessageSenderType, StructuredMention, TeamMember, TeamMemberCapabilities, TeamMemberQueueManagementPolicy, TeamMemberSessionPolicy, TeamMemberTriggerPolicy, TeamRun, TeamRunMode, TeamTemplate, WorkRequest, WorkspacePolicy } from '@agent-tower/shared';
export interface CreateMemberPresetInput {
    name: string;
    aliases: string[];
    providerId: string;
    rolePrompt: string;
    capabilities: TeamMemberCapabilities;
    workspacePolicy: WorkspacePolicy;
    triggerPolicy: TeamMemberTriggerPolicy;
    sessionPolicy: TeamMemberSessionPolicy;
    queueManagementPolicy: TeamMemberQueueManagementPolicy;
    avatar?: string | null;
}
export type UpdateMemberPresetInput = Partial<CreateMemberPresetInput>;
export interface TeamTemplateMemberInput {
    memberPresetId: string;
    position?: number;
}
export interface CreateTeamTemplateInput {
    name: string;
    memberPresetIds?: string[];
    members?: TeamTemplateMemberInput[];
}
export interface UpdateTeamTemplateInput {
    name?: string;
    memberPresetIds?: string[];
    members?: TeamTemplateMemberInput[];
}
export interface CreateTeamRunMemberInput {
    name: string;
    aliases: string[];
    providerId: string;
    rolePrompt: string;
    capabilities: TeamMemberCapabilities;
    workspacePolicy: WorkspacePolicy;
    triggerPolicy: TeamMemberTriggerPolicy;
    sessionPolicy: TeamMemberSessionPolicy;
    queueManagementPolicy: TeamMemberQueueManagementPolicy;
    avatar?: string | null;
}
export interface AddTeamRunMemberInput {
    memberPresetId?: string;
    member?: CreateTeamRunMemberInput;
}
export type PatchTeamRunMemberInput = Partial<CreateTeamRunMemberInput>;
export interface RemoveTeamRunMemberOptions {
    cancelQueued?: boolean;
}
export interface CreateTeamRunInput {
    mode: TeamRunMode;
    teamTemplateId?: string;
    memberPresetIds?: string[];
    members?: CreateTeamRunMemberInput[];
}
export interface CreateRoomMessageInput {
    content: string;
    mentions?: StructuredMention[];
    attachmentIds?: string[];
    artifactRefs?: string[];
    senderType?: RoomMessageSenderType;
    senderId?: string | null;
    senderInvocationId?: string | null;
    kind?: RoomMessageKind;
}
export interface CreatePrivateRoomMessageInput {
    content: string;
    recipientMemberIds: string[];
    attachmentIds?: string[];
    artifactRefs?: string[];
    senderType?: RoomMessageSenderType;
    senderId?: string | null;
    senderInvocationId?: string | null;
    ifBusy?: IfBusyPolicy;
    cancelQueued?: boolean;
}
export interface TeamRunVisibilityOptions {
    viewerMemberId?: string | null;
}
export interface TeamRunAgentInvocationIdentity {
    invocationId: string;
    memberId: string;
}
export interface WorkRequestQueueItem extends WorkRequest {
    triggerMessage: {
        id: string;
        senderType: RoomMessageSenderType;
        senderId: string | null;
        senderInvocationId: string | null;
        kind: RoomMessageKind;
        contentPreview: string;
        createdAt: string;
    } | null;
    targetMember: {
        id: string;
        name: string;
        label: string;
    } | null;
}
export interface MemberWorkRequestQueue {
    teamRunId: string;
    currentMemberId: string;
    queueManagementPolicy: TeamMemberQueueManagementPolicy;
    canManageTeamRunQueue: boolean;
    workRequests: WorkRequestQueueItem[];
}
export declare class TeamRunService {
    listMemberPresets(): Promise<MemberPreset[]>;
    getMemberPresetById(id: string): Promise<MemberPreset>;
    createMemberPreset(input: CreateMemberPresetInput): Promise<MemberPreset>;
    updateMemberPreset(id: string, input: UpdateMemberPresetInput): Promise<MemberPreset>;
    deleteMemberPreset(id: string): Promise<void>;
    listTeamTemplates(): Promise<TeamTemplate[]>;
    getTeamTemplateById(id: string): Promise<TeamTemplate>;
    createTeamTemplate(input: CreateTeamTemplateInput): Promise<TeamTemplate>;
    updateTeamTemplate(id: string, input: UpdateTeamTemplateInput): Promise<TeamTemplate>;
    deleteTeamTemplate(id: string): Promise<void>;
    createTeamRun(taskId: string, input: CreateTeamRunInput): Promise<TeamRun>;
    createTeamRunWithInitialRoomMessage(taskId: string, input: CreateTeamRunInput): Promise<TeamRun>;
    getTaskTeamRun(taskId: string, options?: TeamRunVisibilityOptions): Promise<TeamRun>;
    getTeamRunById(id: string, options?: TeamRunVisibilityOptions): Promise<TeamRun>;
    listTeamMembers(teamRunId: string, options?: TeamRunVisibilityOptions): Promise<TeamMember[]>;
    addTeamRunMember(teamRunId: string, input: AddTeamRunMemberInput): Promise<TeamMember>;
    patchTeamRunMember(teamRunId: string, memberId: string, input: PatchTeamRunMemberInput): Promise<TeamMember>;
    softRemoveTeamRunMember(teamRunId: string, memberId: string, options?: RemoveTeamRunMemberOptions): Promise<{
        member: TeamMember;
        cancelledWorkRequestIds: string[];
    }>;
    listRoomMessages(teamRunId: string, options?: TeamRunVisibilityOptions): Promise<RoomMessage[]>;
    getRoomMessage(teamRunId: string, messageId: string, options?: TeamRunVisibilityOptions): Promise<RoomMessage>;
    listWorkRequests(teamRunId: string, options?: TeamRunVisibilityOptions): Promise<WorkRequest[]>;
    listQueuedWorkRequestsForMember(teamRunId: string, memberId: string): Promise<MemberWorkRequestQueue>;
    listAgentInvocations(teamRunId: string, options?: TeamRunVisibilityOptions): Promise<AgentInvocation[]>;
    createRoomMessage(teamRunId: string, input: CreateRoomMessageInput): Promise<RoomMessage>;
    createPrivateRoomMessage(teamRunId: string, input: CreatePrivateRoomMessageInput): Promise<RoomMessage>;
    private normalizeTeamTemplateMembers;
    private buildTeamMemberSnapshots;
    private buildAddTeamRunMemberSnapshot;
    private resolveAddedMemberInstanceName;
    private memberPresetToSnapshot;
    private findMemberPresetsByIds;
    private assertMemberPresetsExist;
    private assertTeamRunExists;
    private getTeamMemberOrThrow;
    resolveAgentInvocationIdentity(teamRunId: string, invocationId: string | null | undefined): Promise<TeamRunAgentInvocationIdentity | null>;
    resolveViewerMemberIdFromInvocation(teamRunId: string, invocationId: string | null | undefined): Promise<string | null>;
    private resolveQueueManagementPolicy;
    private contentPreview;
    private compactContentPreview;
    private serializePreviewField;
    private teamRunInclude;
    private serializeMemberPreset;
    private serializeTeamTemplate;
    private serializeTeamRun;
    private deriveTeamMemberStatuses;
    private deriveTeamMemberStatus;
    private serializeTeamMember;
    private serializeRoomMessage;
    private serializeRoomMessageParticipant;
    private serializeWorkRequest;
    private serializeWorkRequestQueueItem;
    private serializeAgentInvocation;
}
//# sourceMappingURL=team-run.service.d.ts.map