import type { ManagedSession } from "../../types"; import { type LiveActivityContentState } from "./liveActivityContentState"; import type { LiveActivitySender } from "./liveActivitySender"; /** * Build the content state mobile decodes. * * `startedAt` comes from the session's own start and is passed through in epoch * milliseconds: iOS renders its own ticking timer from it, so the server must * never compute an elapsed value. */ export declare function contentStateForSession(args: { session: ManagedSession; serverId: string; serverLabel?: string; /** Overrides the session's own start — used by a renewal to preserve continuity. */ startedAtOverride?: number | null; }): LiveActivityContentState | null; export declare class LiveActivityNotifier { private readonly sender; private readonly serverId; private readonly serverLabel?; /** * Sessions with a currently open (pushed) activity. * * An activity opens on a `waiting_input → running` edge (the user sent a * prompt) and closes on the matching `running → waiting_input` edge (the * response, including any sub-agents, finished) — so this set is what makes * the notifier per-turn rather than per-session. A session's very first * `running` (right after spawn, before any user prompt) has no prior * `waiting_input` and therefore no edge, so it never opens an activity — * this is what keeps a fresh/idle session from pushing anything. */ private openActivity; constructor(sender: LiveActivitySender, serverId: string, serverLabel?: string | undefined); /** * React to a session status change. * * Fire-and-forget by design: a push must never delay or fail a session * transition, so this returns a promise the caller may ignore and every error * is logged rather than propagated. */ onStatusChange(session: ManagedSession, previousStatus?: string): Promise; private startTurn; private maybeSendName; private endFor; /** Drop cached state for a session, so a resume re-opens on its next turn. */ forget(sessionId: string): void; } //# sourceMappingURL=liveActivityNotifier.d.ts.map