import { type SessionWatchEnvelope, type SessionWatchRow, type SessionWatchScopeStatus } from '../session/watch.js';
import { type AttentionItem } from './attention.js';
import { type ActivityEvent } from './activity.js';
export declare const FEED_WATCH_VERSION: 1;
type Base = {
    v: 1;
    type: string;
    streamId: string;
    sequence: number;
    scope: string;
};
export type FeedWatchEnvelope = Base & {
    type: 'reset';
    capturedAt: number;
    agents: SessionWatchRow[];
    attention: AttentionItem[];
} | Base & {
    type: 'agent.upsert';
    rowKey: string;
    agent: SessionWatchRow;
} | Base & {
    type: 'agent.remove';
    rowKey: string;
} | Base & {
    type: 'attention.upsert';
    rowKey: string;
    attention: AttentionItem;
} | Base & {
    type: 'attention.remove';
    rowKey: string;
} | Base & {
    type: 'activity.append';
    event: ActivityEvent;
} | Base & {
    type: 'scope';
    capturedAt: number;
    status: SessionWatchScopeStatus;
    reason?: string;
} | Base & {
    type: 'heartbeat';
    capturedAt: number;
};
type FeedWatchPayload = FeedWatchEnvelope extends infer Envelope ? Envelope extends FeedWatchEnvelope ? Omit<Envelope, 'v' | 'streamId' | 'sequence'> : never : never;
export declare class FeedWatchState {
    readonly streamId: string;
    private sequence;
    constructor(streamId?: `${string}-${string}-${string}-${string}-${string}`);
    emit(event: FeedWatchPayload): FeedWatchEnvelope;
}
export declare function projectSessionEnvelope(event: SessionWatchEnvelope, state: FeedWatchState): Promise<FeedWatchEnvelope[]>;
export declare function watchLocalFeed(options: {
    scope: string;
    signal: AbortSignal;
    emit: (event: FeedWatchEnvelope) => void;
    activityPollMs?: number;
}): Promise<void>;
export declare function watchFleetFeed(options: {
    signal: AbortSignal;
    emit: (event: FeedWatchEnvelope) => void;
    reconnectMs?: number;
}): Promise<void>;
export {};
