/** * dsh-widgets — the data collector. * * Renders in the `conversation.composer.dock` slot (so the shell mounts it while a * session exists) and folds three kinds of input into the bridge: * 1. the live conversation projection (session stats + the 轨迹 beats); * 2. the LIVE DATA SOURCES — one `` per discovered adapter * (`data/sources.ts`), which owns every host route's cadence. Before v1.11 * those five routes were five hand-written effects in this file; adding a * data source meant editing it. It does not any more; * 3. the installs WITHOUT dsh-usage-center, whose heatmap is self-accounted here * and persisted across mounts. * * Moved out of `client/index.ts` (Phase 2.5) with its body unchanged. It receives * the bridge handles instead of closing over them: `useBridge` / `setState` are * stable, while `state` and `prefs` are LIVE bindings, so those two arrive as * getters and are read at the point of use. */ import * as React from 'react'; import { type BridgeSnapshot, type BridgeState } from '../runtime/bridge'; import { type Prefs } from '../runtime/prefs'; import { type RemoteServiceLike } from './schedule'; /** What the collector needs from the composition root that owns the bridge. */ export interface CollectorDeps { /** Subscribe to the bridge (re-renders this collector on every emit). */ useBridge: () => BridgeSnapshot; /** Merge a patch into the live state, then emit. */ setState: (patch: Partial) => void; /** The LIVE state binding — call it at the point of use, never capture it. */ getState: () => BridgeState; /** The LIVE prefs binding, for the same reason. */ getPrefs: () => Prefs; /** The client Remote service, resolved per call (see the schedule effect). */ getRemote: () => RemoteServiceLike | undefined; } /** Build the collector component bound to one bridge. */ export declare function createCollector(deps: CollectorDeps): (props: any) => React.ReactElement | null;