import type { DaemonSession } from './types.js'; export declare function markSessionActivity(ds: DaemonSession, at?: number): void; /** Refresh the latest user/bot exchange after its append-only source file has * been written. Some inbound routes mark activity before appending to queues, * so keeping this explicit avoids publishing the previous turn's preview. */ export declare function publishSessionMessagePreviewPatch(ds: DaemonSession): void; /** Publish the persisted close state and explicitly clear message previews. * * Dashboard clients merge `session.update` patches into their current row. * Deleting the turn-send marker therefore is not enough: every live close * entrypoint must overwrite preview fields or an already-open dashboard keeps * rendering the last private exchange until its next full hydrate. */ export declare function publishClosedSessionPatch(sessionId: string, closedAt?: number, extraPatch?: { tokenUsage: unknown; }): void; /** Publish the latest inbound sender kind after quoteTarget* has been updated. * * `markSessionActivity()` runs before some routing paths finish writing their * quote provenance, so folding this field into its timestamp patch would race * with the old value. Keep the patch explicit and call it immediately after * assigning `quoteTargetSenderIsBot`. */ export declare function publishLastInputFromBotPatch(ds: DaemonSession): void; /** * Immediately project a newly learned native topic id into the Dashboard's * cached row. `markSessionActivity()` intentionally publishes only timestamp * data, so it cannot make a first-time `larkThreadId` visible to a dashboard * that has already hydrated this session. * * The row composer owns the brand-aware AppLink and validates the `omt_...` * id again. Returning false keeps accidental callers with a chat/invalid id * from publishing a misleading patch. */ export declare function publishNativeTopicLinkPatch(ds: DaemonSession): boolean; /** Push the current attention signals (repo-selection pending / TUI prompt * open) to the dashboard. Call after mutating `ds.pendingRepo` or * `ds.tuiPromptCardId` so the board view's needs-you column tracks live * state. Idempotent — patches are derived from the session, never toggled * blindly. */ export declare function publishAttentionPatch(ds: DaemonSession): void; export declare function clearAgentAttention(ds: DaemonSession): boolean; export declare function announceSessionRow(ds: DaemonSession): void; /** Announce a repo-selection-pending session to dashboard SSE subscribers. * * `session.spawned` is normally published when the worker process spawns — * but a pendingRepo session has NO worker yet (it sits in activeSessions * waiting for a card click), so SSE-only dashboard clients never learn it * exists until the next full hydrate. Call this right after registering such * a session. No-op when the session isn't actually pending, so callers on * mixed paths (`pendingRepo: !pinnedWorkingDir`) can call unconditionally — * the non-pending branch is announced by the real spawn moments later. */ export declare function announcePendingRepoSession(ds: DaemonSession): void; //# sourceMappingURL=session-activity.d.ts.map