// src/lisp/IActiveSubscription.ts

import type { IStream } from './IStream';
import type { ILambdaClosure } from './ILambdaClosure';

/**
 * ActiveSubscription tracks a running stream pipeline
 */
export interface IActiveSubscription {
  id?: string;
  topic: string;
  stream?: IStream;
  outputTopic?: string;
  callback?: ILambdaClosure;
  unsubscribe: () => void;
  unsubs?: (() => void)[];
  state?: Record<string, unknown>;  // For scan accumulator, debounce timers, etc.
  createdAt: number;
}
