export interface SecureChannelConfig {
    inviteToken: string;
    dataDir: string;
    apiUrl: string;
    agentName?: string;
    agentVersion?: string;
    platform?: string;
    maxHistorySize?: number;
    webhookUrl?: string;
    httpPort?: number;
    onMessage?: (plaintext: string, metadata: MessageMetadata) => void;
    onStateChange?: (state: ChannelState) => void;
    onA2AMessage?: (msg: A2AMessage) => void;
    /** Enable client-side policy scanning. If true, rules are fetched on connect. */
    enableScanning?: boolean;
}
export type ChannelState = "idle" | "enrolling" | "polling" | "activating" | "connecting" | "ready" | "disconnected" | "error";
export interface AttachmentData {
    filename: string;
    mime: string;
    size: number;
    filePath: string;
    /** Base64-encoded decrypted content (for images passed to LLM vision) */
    base64?: string;
    /** Extracted text content (for text-based files) */
    textContent?: string;
}
export interface MessageMetadata {
    messageId: string;
    conversationId: string;
    timestamp: string;
    topicId?: string;
    attachment?: AttachmentData;
    spanId?: string;
    parentSpanId?: string;
    messageType?: string;
    priority?: string;
    envelopeVersion?: string;
    /** Set when the message originated from a multi-agent room */
    roomId?: string;
}
export interface SendOptions {
    /** Target a specific conversation instead of broadcasting to all sessions */
    conversationId?: string;
    topicId?: string;
    messageType?: string;
    priority?: string;
    parentSpanId?: string;
    metadata?: Record<string, unknown>;
}
export interface DecisionOption {
    option_id: string;
    label: string;
    risk_level: "low" | "medium" | "high" | "critical";
    is_default?: boolean;
}
export interface ContextRef {
    type: string;
    uri: string;
    label: string;
}
export interface DecisionRequest {
    title: string;
    description?: string;
    options: DecisionOption[];
    context_refs?: ContextRef[];
    deadline?: string;
    auto_action?: {
        option_id: string;
        trigger: string;
        description?: string;
    };
}
export interface DecisionResponse {
    decision_id: string;
    selected_option_id?: string;
    resolved_at?: string;
    action?: "approve" | "deny" | "defer";
    defer_until?: string;
    defer_reason?: string;
}
export interface HistoryEntry {
    sender: "owner" | "agent";
    text: string;
    ts: string;
    topicId?: string;
}
export interface DeviceSession {
    ownerDeviceId: string;
    ratchetState: string;
    activated?: boolean;
}
export interface PersistedState {
    deviceId: string;
    deviceJwt: string;
    primaryConversationId: string;
    sessions: Record<string, DeviceSession>;
    identityKeypair: {
        publicKey: string;
        privateKey: string;
    };
    ephemeralKeypair: {
        publicKey: string;
        privateKey: string;
    };
    fingerprint: string;
    lastMessageTimestamp?: string;
    messageHistory?: HistoryEntry[];
    topics?: Array<{
        id: string;
        name: string;
        isDefault: boolean;
    }>;
    defaultTopicId?: string;
    groupId?: string;
    hubAddress?: string;
    hubId?: string;
    /** A2A channel state (agent-to-agent communication) */
    a2aChannels?: Record<string, {
        channelId: string;
        hubAddress: string;
        conversationId: string;
        role?: "initiator" | "responder";
        session?: DeviceSession;
        pendingEphemeralPrivateKey?: string;
        /** Observer session (agent → owner ratchet for A2A observation) */
        observerSession?: {
            ratchetState: string;
        };
        pendingObserverEphemeralPrivateKey?: string;
    }>;
    /** Outbound messages queued while disconnected */
    outboundQueue?: Array<{
        convId: string;
        headerBlob: string;
        ciphertext: string;
        messageGroupId: string;
        topicId?: string;
    }>;
    /** Multi-agent room state */
    rooms?: Record<string, RoomState>;
}
/** Legacy state format for backward compatibility */
export interface LegacyPersistedState {
    deviceId: string;
    deviceJwt: string;
    conversationId: string;
    identityKeypair: {
        publicKey: string;
        privateKey: string;
    };
    ephemeralKeypair: {
        publicKey: string;
        privateKey: string;
    };
    fingerprint: string;
    ratchetState: string;
    lastMessageTimestamp?: string;
}
export interface RoomMemberInfo {
    deviceId: string;
    entityType: string;
    displayName: string;
    identityPublicKey?: string;
    ephemeralPublicKey?: string;
}
export interface RoomConversationInfo {
    id: string;
    participantA: string;
    participantB: string;
}
export interface RoomInfo {
    roomId: string;
    name: string;
    members: RoomMemberInfo[];
    conversationIds: string[];
}
export interface RoomState {
    roomId: string;
    name: string;
    conversationIds: string[];
    members: RoomMemberInfo[];
}
export interface HeartbeatStatus {
    agent_status: string;
    current_task: string;
}
export interface StatusAlert {
    title: string;
    message: string;
    severity: "info" | "warning" | "error" | "critical";
    detail?: string;
    detailFormat?: "markdown" | "json" | "text";
    category?: "performance" | "security" | "error" | "info";
}
export interface RoomParticipantEvent {
    roomId: string;
    participant: {
        deviceId: string;
        participantType: "human" | "agent";
        displayName?: string;
    };
}
export interface A2AChannel {
    channelId: string;
    initiatorHubAddress: string;
    responderHubAddress: string;
    conversationId: string | null;
    status: "pending" | "approved" | "active" | "rejected" | "revoked";
    createdAt: string;
}
export interface A2AMessage {
    text: string;
    fromHubAddress: string;
    channelId: string;
    conversationId: string;
    parentSpanId?: string;
    timestamp: string;
}
//# sourceMappingURL=types.d.ts.map