import { accessContextHasInbox } from "@opengeni/contracts"; import type { InboxItem, ListInboxResponse, OpenGeniClient } from "@opengeni/sdk"; type InboxState = { data: ListInboxResponse | null; error: unknown; loading: boolean; }; type InboxClient = Pick; /** * Only a person has an inbox: a signed-in person, or a local install's one * built-in human. The API refuses keys, services, agents and other development * subjects, so nothing polls it for anyone else. */ export declare function hasInbox(context: Parameters[0]): boolean; export declare class InboxStore { private readonly client; private state; private listeners; private inFlight; private generation; constructor(client: InboxClient); get snapshot(): InboxState; subscribe: (listener: () => void) => () => boolean; private set; refresh: () => Promise; /** Apply a local change at once (an answered item leaves) before the server confirms. */ patchItems(update: (items: InboxItem[]) => InboxItem[]): void; } /** The inbox, polled while mounted. `pollMs` is shortened while the Inbox page is open. */ export declare function useInbox(options?: { pollMs?: number | undefined; enabled?: boolean | undefined; }): { data: ListInboxResponse | null; error: unknown; loading: boolean; refresh: () => Promise; patchItems: (update: (items: InboxItem[]) => InboxItem[]) => void; }; /** Questions, approvals and paused goals wait on the person; notes and replies don't. */ export declare function isNeedsYouKind(kind: InboxItem["kind"]): boolean; /** What waits on the person: needs-you items plus unread notes and replies, unsnoozed. */ export declare function inboxAttentionCount(data: ListInboxResponse | null): number; /** * Looking at a session reads its replies and agent notes in the inbox (they * stay until cleared): on opening it and on leaving it, so a reply that * arrived while it was open is read too. Needs-you items are untouched. */ export declare function useReadSessionInbox(sessionId: string): void; export type SessionRepliesMute = { muted: boolean; busy: boolean; toggle: () => void; }; /** * The signed-in person's mute on a top-level session's replies. Null when it * does not apply (a sub-agent, no inbox) or the server cannot say, so the * menu offers it only where it works. */ export declare function useSessionRepliesMute(session: { workspaceId: string; id: string; parentSessionId: string | null; }): SessionRepliesMute | null; export {};