import { z } from 'zod';
export type AgentStatus = 'active' | 'idle' | 'completed' | 'failed';
export type MessageType = 'request' | 'response' | 'notification' | 'claim' | 'release';
export type MessageChannel = 'broadcast' | 'deploy' | 'review' | 'direct' | 'coordination';
export type WorkIntentType = 'editing' | 'reviewing' | 'refactoring' | 'testing' | 'documenting';
export type ConflictRisk = 'none' | 'low' | 'medium' | 'high' | 'critical';
export type DeployActionType = 'commit' | 'push' | 'merge' | 'deploy' | 'workflow';
export type DeployStatus = 'pending' | 'batched' | 'executing' | 'completed' | 'failed';
export interface AgentRegistryEntry {
    id: string;
    name: string;
    sessionId: string;
    status: AgentStatus;
    currentTask?: string;
    worktreeBranch?: string;
    startedAt: string;
    lastHeartbeat: string;
    capabilities?: string[];
}
export interface MessagePayload {
    action: string;
    resource?: string;
    data?: unknown;
}
export interface AgentMessage {
    id: number;
    channel: MessageChannel;
    fromAgent?: string;
    toAgent?: string;
    type: MessageType;
    payload: MessagePayload;
    priority: number;
    createdAt: string;
    readAt?: string;
    expiresAt?: string;
}
export interface WorkAnnouncement {
    id: number;
    agentId: string;
    agentName?: string;
    worktreeBranch?: string;
    intentType: WorkIntentType;
    resource: string;
    description?: string;
    filesAffected?: string[];
    estimatedCompletion?: string;
    announcedAt: string;
    completedAt?: string;
}
export interface WorkOverlap {
    resource: string;
    agents: Array<{
        id: string;
        name: string;
        intentType: WorkIntentType;
        worktreeBranch?: string;
        description?: string;
    }>;
    conflictRisk: ConflictRisk;
    suggestion: string;
}
export interface CollaborationSuggestion {
    type: 'sequence' | 'parallel' | 'handoff' | 'merge_order';
    agents: string[];
    reason: string;
    suggestedOrder?: string[];
    estimatedMergeComplexity?: ConflictRisk;
}
export type ClaimType = 'exclusive' | 'shared';
export interface WorkClaim extends WorkAnnouncement {
    claimType?: ClaimType;
    claimedAt: string;
    expiresAt?: string;
}
export interface DeployAction {
    id: number;
    agentId: string;
    actionType: DeployActionType;
    target: string;
    payload?: Record<string, unknown>;
    status: DeployStatus;
    batchId?: string;
    queuedAt: string;
    executeAfter?: string;
    priority: number;
    dependencies?: string[];
}
export interface DeployBatch {
    id: string;
    actions: DeployAction[];
    createdAt: string;
    status: DeployStatus;
}
export interface BatchResult {
    batchId: string;
    success: boolean;
    executedActions: number;
    failedActions: number;
    errors?: string[];
    duration: number;
}
export interface CoordinationStatus {
    activeAgents: AgentRegistryEntry[];
    activeClaims: WorkClaim[];
    pendingDeploys: DeployAction[];
    pendingMessages: number;
}
export declare const AgentRegistryEntrySchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    sessionId: z.ZodString;
    status: z.ZodEnum<["active", "idle", "completed", "failed"]>;
    currentTask: z.ZodOptional<z.ZodString>;
    startedAt: z.ZodString;
    lastHeartbeat: z.ZodString;
    capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
    id: string;
    name: string;
    status: "active" | "idle" | "completed" | "failed";
    sessionId: string;
    startedAt: string;
    lastHeartbeat: string;
    capabilities?: string[] | undefined;
    currentTask?: string | undefined;
}, {
    id: string;
    name: string;
    status: "active" | "idle" | "completed" | "failed";
    sessionId: string;
    startedAt: string;
    lastHeartbeat: string;
    capabilities?: string[] | undefined;
    currentTask?: string | undefined;
}>;
export declare const MessagePayloadSchema: z.ZodObject<{
    action: z.ZodString;
    resource: z.ZodOptional<z.ZodString>;
    data: z.ZodOptional<z.ZodUnknown>;
}, "strip", z.ZodTypeAny, {
    action: string;
    resource?: string | undefined;
    data?: unknown;
}, {
    action: string;
    resource?: string | undefined;
    data?: unknown;
}>;
export declare const AgentMessageSchema: z.ZodObject<{
    id: z.ZodNumber;
    channel: z.ZodEnum<["broadcast", "deploy", "review", "direct", "coordination"]>;
    fromAgent: z.ZodOptional<z.ZodString>;
    toAgent: z.ZodOptional<z.ZodString>;
    type: z.ZodEnum<["request", "response", "notification", "claim", "release"]>;
    payload: z.ZodObject<{
        action: z.ZodString;
        resource: z.ZodOptional<z.ZodString>;
        data: z.ZodOptional<z.ZodUnknown>;
    }, "strip", z.ZodTypeAny, {
        action: string;
        resource?: string | undefined;
        data?: unknown;
    }, {
        action: string;
        resource?: string | undefined;
        data?: unknown;
    }>;
    priority: z.ZodDefault<z.ZodNumber>;
    createdAt: z.ZodString;
    readAt: z.ZodOptional<z.ZodString>;
    expiresAt: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    id: number;
    type: "request" | "response" | "notification" | "claim" | "release";
    priority: number;
    channel: "review" | "deploy" | "broadcast" | "direct" | "coordination";
    payload: {
        action: string;
        resource?: string | undefined;
        data?: unknown;
    };
    createdAt: string;
    fromAgent?: string | undefined;
    toAgent?: string | undefined;
    readAt?: string | undefined;
    expiresAt?: string | undefined;
}, {
    id: number;
    type: "request" | "response" | "notification" | "claim" | "release";
    channel: "review" | "deploy" | "broadcast" | "direct" | "coordination";
    payload: {
        action: string;
        resource?: string | undefined;
        data?: unknown;
    };
    createdAt: string;
    priority?: number | undefined;
    fromAgent?: string | undefined;
    toAgent?: string | undefined;
    readAt?: string | undefined;
    expiresAt?: string | undefined;
}>;
export declare const DeployActionSchema: z.ZodObject<{
    id: z.ZodNumber;
    agentId: z.ZodString;
    actionType: z.ZodEnum<["commit", "push", "merge", "deploy", "workflow"]>;
    target: z.ZodString;
    payload: z.ZodOptional<z.ZodRecord<z.ZodAny, z.ZodAny>>;
    status: z.ZodEnum<["pending", "batched", "executing", "completed", "failed"]>;
    batchId: z.ZodOptional<z.ZodString>;
    queuedAt: z.ZodString;
    executeAfter: z.ZodOptional<z.ZodString>;
    priority: z.ZodDefault<z.ZodNumber>;
    dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
    id: number;
    status: "completed" | "failed" | "pending" | "batched" | "executing";
    priority: number;
    agentId: string;
    actionType: "push" | "merge" | "commit" | "workflow" | "deploy";
    target: string;
    queuedAt: string;
    payload?: Record<any, any> | undefined;
    batchId?: string | undefined;
    executeAfter?: string | undefined;
    dependencies?: string[] | undefined;
}, {
    id: number;
    status: "completed" | "failed" | "pending" | "batched" | "executing";
    agentId: string;
    actionType: "push" | "merge" | "commit" | "workflow" | "deploy";
    target: string;
    queuedAt: string;
    priority?: number | undefined;
    payload?: Record<any, any> | undefined;
    batchId?: string | undefined;
    executeAfter?: string | undefined;
    dependencies?: string[] | undefined;
}>;
//# sourceMappingURL=coordination.d.ts.map