export interface TopicCatalogEntry {
    topic: string;
    description?: string;
    category: string;
    payload_schema?: Record<string, any>;
    example_payload?: Record<string, any>;
    source: string;
    tags: string[];
    /** When true, this topic is managed by static config (reset: true). Dashboard edits would be overwritten on next boot. */
    managed: boolean;
    last_seen_at?: string;
    subscriber_count?: number;
    created_at: string;
    updated_at: string;
}
export interface TopicSubscriber {
    id: string;
    agent_id: string;
    agent_name: string;
    topic: string;
    reaction_type: string;
}
export declare function listTopics(filters?: {
    category?: string;
    search?: string;
    limit?: number;
    offset?: number;
}): Promise<{
    topics: TopicCatalogEntry[];
    total: number;
}>;
export declare function getTopic(topic: string): Promise<(TopicCatalogEntry & {
    subscribers: TopicSubscriber[];
}) | null>;
export declare function createTopic(data: {
    topic: string;
    description?: string;
    category: string;
    payload_schema?: Record<string, any>;
    example_payload?: Record<string, any>;
    source?: string;
    tags?: string[];
}): Promise<TopicCatalogEntry>;
export declare function updateTopic(topic: string, data: Partial<TopicCatalogEntry>): Promise<TopicCatalogEntry | null>;
export declare function deleteTopic(topic: string): Promise<boolean>;
/**
 * Auto-register or update a topic on publish (learn-on-first-use).
 * Creates the entry on first publish; updates last_seen on subsequent publishes.
 */
export declare function upsertTopicOnPublish(topic: string, data?: Record<string, any>, source?: string): Promise<void>;
/**
 * Seed a topic at startup (insert-if-absent).
 * Conflict on topic — DB is source of truth after first boot.
 */
export declare function seedTopic(data: {
    topic: string;
    description: string;
    category: string;
    payload_schema?: Record<string, any>;
    example_payload?: Record<string, any>;
    source?: string;
    tags?: string[];
}): Promise<boolean>;
/**
 * Reset a topic at startup — config is source of truth.
 * Overwrites description, category, schema, tags on every boot.
 * Used when `reset: true` is set in static topic config.
 */
export declare function resetTopic(data: {
    topic: string;
    description: string;
    category: string;
    payload_schema?: Record<string, any>;
    example_payload?: Record<string, any>;
    source?: string;
    tags?: string[];
}): Promise<void>;
