/**
 * Clawx Agent Mesh Types
 *
 * Core types for multi-agent MVP.
 * Keep minimal and focused on v1 scope.
 */
export interface AgentIdentity {
    /** Unique agent identifier (UUID) */
    id: string;
    /** User-assigned name for display */
    name: string;
    /** Agent type */
    type: 'local' | 'remote' | 'self';
    /** Current status */
    status: 'idle' | 'working' | 'offline' | 'error' | 'starting';
    /** Tools this agent can execute */
    capabilities: string[];
    /** HTTP endpoint for communication (local agents: http://localhost:port) */
    endpoint?: string;
    /** Process ID (local agents only) */
    pid?: number;
    /** Isolated workspace path */
    workspace: string;
    /** Creation timestamp */
    created: number;
    /** Last heartbeat timestamp */
    lastHeartbeat?: number;
    /** Platform (win32, darwin, linux) */
    platform?: string;
    /** Platform-specific capabilities */
    platformCapabilities?: {
        /** Search tool availability */
        search?: {
            hasGrep: boolean;
            hasRipgrep: boolean;
            recommendedTool: 'grep' | 'ripgrep' | 'node';
        };
    };
    /** Owning master metadata for worker persistence/rehydration */
    ownerMasterId?: string;
    ownerMasterName?: string;
    ownerMasterEndpoint?: string;
    autoStart?: boolean;
    /** Persistent specialist — survives cleanup, auto-spawns on serve */
    persistent?: boolean;
    /** Persona information (loaded from user space) */
    persona?: {
        /** Whether persona is loaded */
        loaded: boolean;
        /** Persona name if loaded */
        name?: string;
        /** Persona role if loaded */
        role?: string;
    };
}
export interface AgentTask {
    /** Unique task identifier */
    id: string;
    /** Target agent ID */
    agentId: string;
    /** Task type */
    type: 'execute' | 'query' | 'control';
    /** Task payload */
    payload: {
        /** Tool name to execute */
        tool: string;
        /** Tool parameters */
        params: any;
        /** Optional execution context */
        context?: any;
    };
    /** Task status */
    status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
    /** Tool execution result (when completed) */
    result?: any;
    /** Error message (if failed) */
    error?: string;
    /** Creation timestamp */
    created: number;
    /** Start timestamp */
    started?: number;
    /** Completion timestamp */
    completed?: number;
}
export interface AgentMessage {
    /** Message type */
    type: 'task' | 'result' | 'heartbeat' | 'control';
    /** Source agent ID */
    from?: string;
    /** Target agent ID */
    to?: string;
    /** Message payload */
    payload: any;
    /** Message timestamp */
    timestamp: number;
}
export interface AgentConfig {
    /** Agent ID */
    id: string;
    /** Agent name */
    name: string;
    /** Master endpoint for registration */
    masterEndpoint: string;
    /** Master workspace to use as default execution context for worker tasks/chat */
    masterWorkspace?: string;
    /** Port to listen on (0 = auto) */
    port: number;
    /** Allowed tools (empty = all tools) */
    allowedTools: string[];
    /** Workspace directory */
    workspace: string;
    /** Owning master metadata for worker persistence/rehydration */
    ownerMasterId?: string;
    ownerMasterName?: string;
    ownerMasterEndpoint?: string;
    autoStart?: boolean;
}
/** Registry of known agents */
export interface AgentRegistry {
    /** Registry version */
    version: string;
    /** Known agents */
    agents: AgentIdentity[];
    /** Pending/completed tasks */
    tasks: AgentTask[];
    /** Last update timestamp */
    updated: number;
}
/** Persistent specialist definition — stored in ~/.clawx/specialists/ */
export interface SpecialistDefinition {
    /** Specialist name (used as worker name) */
    name: string;
    /** Persona to apply after spawning */
    persona: {
        name: string;
        role: string;
        tone?: string;
        strengths?: string[];
        goals?: string[];
    };
    /** Allowed tools (empty = all) */
    allowedTools: string[];
    /** Setup command to run in workspace after spawn (e.g. pip install ...) */
    setup?: string;
    /** When this specialist was created */
    created: number;
    /** Last updated */
    updated: number;
}
/** Agent server endpoints */
export declare const AGENT_API: {
    readonly HEALTH: "/health";
    readonly TASK: "/task";
    readonly RESULT: "/task/:id/result";
    readonly STATUS: "/task/:id/status";
    readonly CANCEL: "/task/:id/cancel";
    readonly HEARTBEAT: "/heartbeat";
    readonly REGISTER: "/register";
    readonly UNREGISTER: "/unregister";
};
//# sourceMappingURL=agent.d.ts.map