@ai-matrx/messaging 0.10.4 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.d.cts CHANGED
@@ -138,6 +138,39 @@ interface Message {
138
138
  /** Set only while this message is in the outbox and its last send failed. */
139
139
  readonly failureReason?: string | undefined;
140
140
  }
141
+ /**
142
+ * THE ARCHIVED-ITEMS LAW's three states (Arman, 2026-09-09 —
143
+ * `common-docs/policies/archived-items.md`):
144
+ *
145
+ * > "everything should have an archive filter, and the default should always
146
+ * > hide archived, but seeing archived items should be one or two clicks
147
+ * > away … this is a system wide decision for every single item everywhere in
148
+ * > our system, for every single table and every single page."
149
+ *
150
+ * | value | what the list shows |
151
+ * |------------|--------------------------|
152
+ * | `active` | only un-archived rows |
153
+ * | `archived` | only archived rows |
154
+ * | `all` | every row |
155
+ *
156
+ * The same three words the rest of the platform uses — `ArchivedFilter` in
157
+ * matrx-frontend's `lib/entity-list`, `p_archived` on the `agx_*`/`wfx_*` and
158
+ * DM list RPCs, `ArchiveFilter` in `@ai-matrx/design-system`. A person meets
159
+ * ONE control, not one per app.
160
+ *
161
+ * 🚨 Three states, never a boolean. A boolean cannot say "archived only",
162
+ * which is exactly the view someone looking for a conversation they archived
163
+ * last month needs.
164
+ */
165
+ type MessagingArchiveFilter = "active" | "archived" | "all";
166
+ /** The platform default: a list hides archived rows until asked. */
167
+ declare const DEFAULT_MESSAGING_ARCHIVE_FILTER: MessagingArchiveFilter;
168
+ /**
169
+ * Narrow an untrusted value (a stored preference, a URL param, a host knob) to
170
+ * the tri-state. Anything unrecognised falls back to the default rather than
171
+ * silently widening a list to archived conversations.
172
+ */
173
+ declare function toMessagingArchiveFilter(value: unknown, fallback?: MessagingArchiveFilter): MessagingArchiveFilter;
141
174
  interface ConversationSummary {
142
175
  readonly conversation: Conversation;
143
176
  readonly participants: readonly UserSummary[];
@@ -667,7 +700,30 @@ interface MessagingRepository {
667
700
  listConversations(args?: {
668
701
  limit?: number;
669
702
  cursor?: ConversationCursor | null;
703
+ /**
704
+ * THE ARCHIVED-ITEMS LAW. Omitted means `active` — archived conversations
705
+ * are hidden until a caller asks for them. This is a REQUEST to the reader
706
+ * (the RPC's `p_archived`), never a client-side sieve, so `hasMore` and the
707
+ * cursor describe the rows the caller actually asked for.
708
+ */
709
+ archived?: MessagingArchiveFilter;
670
710
  }): Promise<Page<ConversationSummary, ConversationCursor>>;
711
+ /**
712
+ * How many ARCHIVED conversations the caller has — the number a reveal
713
+ * control prints ("Archived (12)").
714
+ *
715
+ * 🚨 It is capped, and it says so. A count is read by listing archived rows
716
+ * up to `limit`; if that many come back the result is `exact: false` and the
717
+ * UI must render "12+", never a confident "12". A screen never lies: a cap
718
+ * silently presented as a total is the same defect as a badge counting rows
719
+ * the list hides.
720
+ */
721
+ countArchivedConversations(args?: {
722
+ limit?: number;
723
+ }): Promise<{
724
+ count: number;
725
+ exact: boolean;
726
+ }>;
671
727
  getConversation(id: ConversationId): Promise<Conversation>;
672
728
  listMessages(conversationId: ConversationId, args?: {
673
729
  limit?: number;
@@ -754,11 +810,38 @@ interface MessagingSnapshot {
754
810
  readonly activeConversationId: ConversationId | null;
755
811
  /** Conversations WITH unread, not total unread messages (the origin's semantics). */
756
812
  readonly totalUnreadConversations: number;
813
+ /**
814
+ * THE ARCHIVED-ITEMS LAW's state for this inbox. `conversations` above is
815
+ * ALWAYS the rows this filter asked the server for — never a superset a
816
+ * surface is expected to sieve, so counts and pagination cannot disagree
817
+ * with what renders.
818
+ */
819
+ readonly archiveFilter: MessagingArchiveFilter;
820
+ /**
821
+ * How many archived conversations exist, for the reveal control's label, or
822
+ * `null` before the first count lands. `exact: false` means the count hit its
823
+ * cap and the label must read "N+" — a capped number shown as a total is the
824
+ * same lie as a badge counting hidden rows.
825
+ */
826
+ readonly archivedCount: {
827
+ readonly count: number;
828
+ readonly exact: boolean;
829
+ } | null;
757
830
  }
758
831
  interface MessagingStore {
759
832
  snapshot(): MessagingSnapshot;
760
833
  subscribe(listener: (snapshot: MessagingSnapshot) => void): () => void;
761
834
  setConversations(items: readonly ConversationSummary[], hasMore: boolean): void;
835
+ /**
836
+ * Switch the archive axis. Clears the list and marks it UNLOADED: the rows
837
+ * on screen belong to the old filter, and leaving them there while the new
838
+ * page is in flight shows active conversations under an "Archived" heading.
839
+ */
840
+ setArchiveFilter(next: MessagingArchiveFilter): void;
841
+ setArchivedCount(value: {
842
+ count: number;
843
+ exact: boolean;
844
+ } | null): void;
762
845
  appendConversations(items: readonly ConversationSummary[], hasMore: boolean): void;
763
846
  upsertConversation(item: ConversationSummary): void;
764
847
  removeConversation(id: ConversationId): void;
@@ -833,6 +916,15 @@ interface MessagingEngineOptions {
833
916
  onIncoming?: ((message: Message) => void) | undefined;
834
917
  conversationPageSize?: number | undefined;
835
918
  messagePageSize?: number | undefined;
919
+ /**
920
+ * 🚨 OPINIONS BECOME KNOBS. THE ARCHIVED-ITEMS LAW's clause 6 says the
921
+ * filter's initial state is an org/user-configurable setting, not code
922
+ * taste. The PLATFORM default is `active` (hide archived) and a host that
923
+ * passes nothing gets exactly that; a host wires this to whatever its own
924
+ * setting resolves to. The person can always change it from the control on
925
+ * the list.
926
+ */
927
+ archiveFilter?: MessagingArchiveFilter | undefined;
836
928
  }
837
929
  interface MessagingEngine {
838
930
  readonly store: MessagingStore;
@@ -841,6 +933,14 @@ interface MessagingEngine {
841
933
  /** Load page one of the inbox and start the inbox channel. */
842
934
  start(): Promise<void>;
843
935
  loadMoreConversations(): Promise<void>;
936
+ /**
937
+ * THE ARCHIVED-ITEMS LAW's control. Re-reads page one under the new state
938
+ * (the filter is a REQUEST to the server, never a client-side sieve) and
939
+ * refreshes the archived count the reveal label prints.
940
+ */
941
+ setArchiveFilter(next: MessagingArchiveFilter): Promise<void>;
942
+ /** Re-read how many archived conversations exist, for the reveal's label. */
943
+ refreshArchivedCount(): Promise<void>;
844
944
  /** Open a conversation: load its thread and subscribe to its channel. */
845
945
  openConversation(id: ConversationId): Promise<void>;
846
946
  closeConversation(id: ConversationId): void;
@@ -1037,6 +1137,15 @@ interface MessagingProviderProps {
1037
1137
  resolveSession?: SessionResolver | undefined;
1038
1138
  /** Override outbox persistence. Defaults to localStorage, then memory. */
1039
1139
  outboxStorage?: OutboxStorage | undefined;
1140
+ /**
1141
+ * 🚨 OPINIONS BECOME KNOBS. THE ARCHIVED-ITEMS LAW (Arman, 2026-09-09 —
1142
+ * `common-docs/policies/archived-items.md`) clause 6: the archive filter's
1143
+ * initial state is an org/user setting, not code taste. The PLATFORM default
1144
+ * is `active` — archived conversations hidden — and a host that passes
1145
+ * nothing gets exactly that. Pass whatever your own setting resolves to; the
1146
+ * person can still flip it from the control on the list.
1147
+ */
1148
+ archiveFilter?: MessagingArchiveFilter | undefined;
1040
1149
  children: ReactNode;
1041
1150
  }
1042
1151
  declare function MessagingProvider(props: MessagingProviderProps): ReactNode;
@@ -1061,6 +1170,22 @@ interface UseConversationsResult {
1061
1170
  select: (id: ConversationId) => void;
1062
1171
  activeConversationId: ConversationId | null;
1063
1172
  startDirect: (otherUserId: UserId) => Promise<ConversationId>;
1173
+ /**
1174
+ * THE ARCHIVED-ITEMS LAW's state. `conversations` above is ALWAYS the rows
1175
+ * this filter asked the SERVER for — never a superset to sieve — so a count
1176
+ * taken over it can never disagree with what renders.
1177
+ */
1178
+ archiveFilter: MessagingArchiveFilter;
1179
+ setArchiveFilter: (next: MessagingArchiveFilter) => void;
1180
+ /**
1181
+ * How many archived conversations exist, for a reveal label, or `null`
1182
+ * before the first count lands. `exact: false` means the count hit its cap
1183
+ * and the label must read "N+".
1184
+ */
1185
+ archivedCount: {
1186
+ count: number;
1187
+ exact: boolean;
1188
+ } | null;
1064
1189
  }
1065
1190
  declare function useConversations(): UseConversationsResult;
1066
1191
  interface UseConversationResult {
@@ -1538,4 +1663,4 @@ declare function summarizeText(content: string, maxLength?: number): string;
1538
1663
  /** Serialize picked references into a fence the platform's other readers accept. */
1539
1664
  declare function composeFence(references: readonly MatrxReference[]): string;
1540
1665
 
1541
- export { type ActionChoice, type ActionContext, type ActionHandler, type ActionOutcome, type ActionReceipt, type ActionRegistry, type ActorPresentation, AgentTag, type AiCallArgs, type AiCapability, type AiResult, AlertIcon, type Attachment, Avatar, BotIcon, CheckIcon, ChevronLeftIcon, type ClientMessageId, ClockIcon, CloseIcon, Composer, type ComposerInputRenderProps, type Conversation, type ConversationCursor, type ConversationId, ConversationList, type ConversationListProps, type ConversationRowWrapperProps, ConversationSkeleton, type ConversationSummary, type ConversationThread, type ConversationType, ConversationView, type ConversationViewProps, type DeliveryState, DeliveryTick, DoubleCheckIcon, type DraftMessage, EmptyState, type EngineDiagnostic, type IncomingMessageContext, type JsonObject, type JsonValue, LinkIcon, MESSAGING_EVENTS, MESSAGING_RPC_SCHEMA, MESSAGING_SCHEMA, type MatrxReference, type Message, type MessageAction, MessageActionChips, type MessageActionRenderProps, type MessageActionRenderer, MessageBubble, type MessageCursor, type MessageGroup, type MessageId, type MessageKind, type MessageWrapperProps, type MessagingAgentIdentity, type MessagingAgents, type MessagingAi, type MessagingAiOptions, type MessagingEngine, type MessagingEngineOptions, MessagingError, type MessagingErrorCode, type MessagingHost, type MessagingIdentity, MessagingInbox, type MessagingInboxProps, MessagingProvider, type MessagingProviderProps, type MessagingRepository, type MessagingSnapshot, type MessagingStore, type MessagingSupabaseClient, type MessagingSupabaseInternal, type OrganizationId, type Outbox, type OutboxEntry, type OutboxOptions, type OutboxStorage, type Page, PaperclipIcon, type Participant, type ParticipantRole, PlusIcon, type PostgrestFilterLike, type PostgrestLikeResponse, type PostgrestTableLike, RPCS, type ReadCache, type ReadCacheOptions, ReferenceCard, type ReferenceRenderer, ReplyIcon, type RepositoryOptions, type SchemaLike, SearchIcon, SendIcon, type SessionResolver, SparklesIcon, type SupabaseLike, TABLES, type TextSegment, TypingDots, type UseComposerResult, type UseConversationResult, type UseConversationsResult, type UseMessageActionResult, type UseMessagingAiResult, type UseTypistsResult, type UserId, type UserSummary, UsersIcon, asClientMessageId, asConversationId, asMessageId, asOrganizationId, asUserId, composeFence, conversationTopic, createActionRegistry, createMemoryOutboxStorage, createMessagingAi, createMessagingEngine, createMessagingRepository, createMessagingStore, createOutbox, createReadCache, createWebOutboxStorage, effectiveActorKey, extractReferences, formatConversationTime, formatDateSeparator, formatLastSeen, formatMessageTime, formatTypists, groupMessages, inboxTopic, invalidResponse, isSameDay, messagingClientId, normalizeMessagingError, optimisticMessage, participantNames, projectConversationSummary, projectMessage, projectMessageAction, projectParticipantRole, projectUserSummary, resolveActor, splitText, summarizeText, unreadCutoff, useComposer, useConversation, useConversations, useMessageAction, useMessagingAi, useMessagingHost, useMessagingSnapshot, useOnlineUserIds, useRequiredMessagingHost, useTypists };
1666
+ export { type ActionChoice, type ActionContext, type ActionHandler, type ActionOutcome, type ActionReceipt, type ActionRegistry, type ActorPresentation, AgentTag, type AiCallArgs, type AiCapability, type AiResult, AlertIcon, type Attachment, Avatar, BotIcon, CheckIcon, ChevronLeftIcon, type ClientMessageId, ClockIcon, CloseIcon, Composer, type ComposerInputRenderProps, type Conversation, type ConversationCursor, type ConversationId, ConversationList, type ConversationListProps, type ConversationRowWrapperProps, ConversationSkeleton, type ConversationSummary, type ConversationThread, type ConversationType, ConversationView, type ConversationViewProps, DEFAULT_MESSAGING_ARCHIVE_FILTER, type DeliveryState, DeliveryTick, DoubleCheckIcon, type DraftMessage, EmptyState, type EngineDiagnostic, type IncomingMessageContext, type JsonObject, type JsonValue, LinkIcon, MESSAGING_EVENTS, MESSAGING_RPC_SCHEMA, MESSAGING_SCHEMA, type MatrxReference, type Message, type MessageAction, MessageActionChips, type MessageActionRenderProps, type MessageActionRenderer, MessageBubble, type MessageCursor, type MessageGroup, type MessageId, type MessageKind, type MessageWrapperProps, type MessagingAgentIdentity, type MessagingAgents, type MessagingAi, type MessagingAiOptions, type MessagingArchiveFilter, type MessagingEngine, type MessagingEngineOptions, MessagingError, type MessagingErrorCode, type MessagingHost, type MessagingIdentity, MessagingInbox, type MessagingInboxProps, MessagingProvider, type MessagingProviderProps, type MessagingRepository, type MessagingSnapshot, type MessagingStore, type MessagingSupabaseClient, type MessagingSupabaseInternal, type OrganizationId, type Outbox, type OutboxEntry, type OutboxOptions, type OutboxStorage, type Page, PaperclipIcon, type Participant, type ParticipantRole, PlusIcon, type PostgrestFilterLike, type PostgrestLikeResponse, type PostgrestTableLike, RPCS, type ReadCache, type ReadCacheOptions, ReferenceCard, type ReferenceRenderer, ReplyIcon, type RepositoryOptions, type SchemaLike, SearchIcon, SendIcon, type SessionResolver, SparklesIcon, type SupabaseLike, TABLES, type TextSegment, TypingDots, type UseComposerResult, type UseConversationResult, type UseConversationsResult, type UseMessageActionResult, type UseMessagingAiResult, type UseTypistsResult, type UserId, type UserSummary, UsersIcon, asClientMessageId, asConversationId, asMessageId, asOrganizationId, asUserId, composeFence, conversationTopic, createActionRegistry, createMemoryOutboxStorage, createMessagingAi, createMessagingEngine, createMessagingRepository, createMessagingStore, createOutbox, createReadCache, createWebOutboxStorage, effectiveActorKey, extractReferences, formatConversationTime, formatDateSeparator, formatLastSeen, formatMessageTime, formatTypists, groupMessages, inboxTopic, invalidResponse, isSameDay, messagingClientId, normalizeMessagingError, optimisticMessage, participantNames, projectConversationSummary, projectMessage, projectMessageAction, projectParticipantRole, projectUserSummary, resolveActor, splitText, summarizeText, toMessagingArchiveFilter, unreadCutoff, useComposer, useConversation, useConversations, useMessageAction, useMessagingAi, useMessagingHost, useMessagingSnapshot, useOnlineUserIds, useRequiredMessagingHost, useTypists };
package/dist/react.d.ts CHANGED
@@ -138,6 +138,39 @@ interface Message {
138
138
  /** Set only while this message is in the outbox and its last send failed. */
139
139
  readonly failureReason?: string | undefined;
140
140
  }
141
+ /**
142
+ * THE ARCHIVED-ITEMS LAW's three states (Arman, 2026-09-09 —
143
+ * `common-docs/policies/archived-items.md`):
144
+ *
145
+ * > "everything should have an archive filter, and the default should always
146
+ * > hide archived, but seeing archived items should be one or two clicks
147
+ * > away … this is a system wide decision for every single item everywhere in
148
+ * > our system, for every single table and every single page."
149
+ *
150
+ * | value | what the list shows |
151
+ * |------------|--------------------------|
152
+ * | `active` | only un-archived rows |
153
+ * | `archived` | only archived rows |
154
+ * | `all` | every row |
155
+ *
156
+ * The same three words the rest of the platform uses — `ArchivedFilter` in
157
+ * matrx-frontend's `lib/entity-list`, `p_archived` on the `agx_*`/`wfx_*` and
158
+ * DM list RPCs, `ArchiveFilter` in `@ai-matrx/design-system`. A person meets
159
+ * ONE control, not one per app.
160
+ *
161
+ * 🚨 Three states, never a boolean. A boolean cannot say "archived only",
162
+ * which is exactly the view someone looking for a conversation they archived
163
+ * last month needs.
164
+ */
165
+ type MessagingArchiveFilter = "active" | "archived" | "all";
166
+ /** The platform default: a list hides archived rows until asked. */
167
+ declare const DEFAULT_MESSAGING_ARCHIVE_FILTER: MessagingArchiveFilter;
168
+ /**
169
+ * Narrow an untrusted value (a stored preference, a URL param, a host knob) to
170
+ * the tri-state. Anything unrecognised falls back to the default rather than
171
+ * silently widening a list to archived conversations.
172
+ */
173
+ declare function toMessagingArchiveFilter(value: unknown, fallback?: MessagingArchiveFilter): MessagingArchiveFilter;
141
174
  interface ConversationSummary {
142
175
  readonly conversation: Conversation;
143
176
  readonly participants: readonly UserSummary[];
@@ -667,7 +700,30 @@ interface MessagingRepository {
667
700
  listConversations(args?: {
668
701
  limit?: number;
669
702
  cursor?: ConversationCursor | null;
703
+ /**
704
+ * THE ARCHIVED-ITEMS LAW. Omitted means `active` — archived conversations
705
+ * are hidden until a caller asks for them. This is a REQUEST to the reader
706
+ * (the RPC's `p_archived`), never a client-side sieve, so `hasMore` and the
707
+ * cursor describe the rows the caller actually asked for.
708
+ */
709
+ archived?: MessagingArchiveFilter;
670
710
  }): Promise<Page<ConversationSummary, ConversationCursor>>;
711
+ /**
712
+ * How many ARCHIVED conversations the caller has — the number a reveal
713
+ * control prints ("Archived (12)").
714
+ *
715
+ * 🚨 It is capped, and it says so. A count is read by listing archived rows
716
+ * up to `limit`; if that many come back the result is `exact: false` and the
717
+ * UI must render "12+", never a confident "12". A screen never lies: a cap
718
+ * silently presented as a total is the same defect as a badge counting rows
719
+ * the list hides.
720
+ */
721
+ countArchivedConversations(args?: {
722
+ limit?: number;
723
+ }): Promise<{
724
+ count: number;
725
+ exact: boolean;
726
+ }>;
671
727
  getConversation(id: ConversationId): Promise<Conversation>;
672
728
  listMessages(conversationId: ConversationId, args?: {
673
729
  limit?: number;
@@ -754,11 +810,38 @@ interface MessagingSnapshot {
754
810
  readonly activeConversationId: ConversationId | null;
755
811
  /** Conversations WITH unread, not total unread messages (the origin's semantics). */
756
812
  readonly totalUnreadConversations: number;
813
+ /**
814
+ * THE ARCHIVED-ITEMS LAW's state for this inbox. `conversations` above is
815
+ * ALWAYS the rows this filter asked the server for — never a superset a
816
+ * surface is expected to sieve, so counts and pagination cannot disagree
817
+ * with what renders.
818
+ */
819
+ readonly archiveFilter: MessagingArchiveFilter;
820
+ /**
821
+ * How many archived conversations exist, for the reveal control's label, or
822
+ * `null` before the first count lands. `exact: false` means the count hit its
823
+ * cap and the label must read "N+" — a capped number shown as a total is the
824
+ * same lie as a badge counting hidden rows.
825
+ */
826
+ readonly archivedCount: {
827
+ readonly count: number;
828
+ readonly exact: boolean;
829
+ } | null;
757
830
  }
758
831
  interface MessagingStore {
759
832
  snapshot(): MessagingSnapshot;
760
833
  subscribe(listener: (snapshot: MessagingSnapshot) => void): () => void;
761
834
  setConversations(items: readonly ConversationSummary[], hasMore: boolean): void;
835
+ /**
836
+ * Switch the archive axis. Clears the list and marks it UNLOADED: the rows
837
+ * on screen belong to the old filter, and leaving them there while the new
838
+ * page is in flight shows active conversations under an "Archived" heading.
839
+ */
840
+ setArchiveFilter(next: MessagingArchiveFilter): void;
841
+ setArchivedCount(value: {
842
+ count: number;
843
+ exact: boolean;
844
+ } | null): void;
762
845
  appendConversations(items: readonly ConversationSummary[], hasMore: boolean): void;
763
846
  upsertConversation(item: ConversationSummary): void;
764
847
  removeConversation(id: ConversationId): void;
@@ -833,6 +916,15 @@ interface MessagingEngineOptions {
833
916
  onIncoming?: ((message: Message) => void) | undefined;
834
917
  conversationPageSize?: number | undefined;
835
918
  messagePageSize?: number | undefined;
919
+ /**
920
+ * 🚨 OPINIONS BECOME KNOBS. THE ARCHIVED-ITEMS LAW's clause 6 says the
921
+ * filter's initial state is an org/user-configurable setting, not code
922
+ * taste. The PLATFORM default is `active` (hide archived) and a host that
923
+ * passes nothing gets exactly that; a host wires this to whatever its own
924
+ * setting resolves to. The person can always change it from the control on
925
+ * the list.
926
+ */
927
+ archiveFilter?: MessagingArchiveFilter | undefined;
836
928
  }
837
929
  interface MessagingEngine {
838
930
  readonly store: MessagingStore;
@@ -841,6 +933,14 @@ interface MessagingEngine {
841
933
  /** Load page one of the inbox and start the inbox channel. */
842
934
  start(): Promise<void>;
843
935
  loadMoreConversations(): Promise<void>;
936
+ /**
937
+ * THE ARCHIVED-ITEMS LAW's control. Re-reads page one under the new state
938
+ * (the filter is a REQUEST to the server, never a client-side sieve) and
939
+ * refreshes the archived count the reveal label prints.
940
+ */
941
+ setArchiveFilter(next: MessagingArchiveFilter): Promise<void>;
942
+ /** Re-read how many archived conversations exist, for the reveal's label. */
943
+ refreshArchivedCount(): Promise<void>;
844
944
  /** Open a conversation: load its thread and subscribe to its channel. */
845
945
  openConversation(id: ConversationId): Promise<void>;
846
946
  closeConversation(id: ConversationId): void;
@@ -1037,6 +1137,15 @@ interface MessagingProviderProps {
1037
1137
  resolveSession?: SessionResolver | undefined;
1038
1138
  /** Override outbox persistence. Defaults to localStorage, then memory. */
1039
1139
  outboxStorage?: OutboxStorage | undefined;
1140
+ /**
1141
+ * 🚨 OPINIONS BECOME KNOBS. THE ARCHIVED-ITEMS LAW (Arman, 2026-09-09 —
1142
+ * `common-docs/policies/archived-items.md`) clause 6: the archive filter's
1143
+ * initial state is an org/user setting, not code taste. The PLATFORM default
1144
+ * is `active` — archived conversations hidden — and a host that passes
1145
+ * nothing gets exactly that. Pass whatever your own setting resolves to; the
1146
+ * person can still flip it from the control on the list.
1147
+ */
1148
+ archiveFilter?: MessagingArchiveFilter | undefined;
1040
1149
  children: ReactNode;
1041
1150
  }
1042
1151
  declare function MessagingProvider(props: MessagingProviderProps): ReactNode;
@@ -1061,6 +1170,22 @@ interface UseConversationsResult {
1061
1170
  select: (id: ConversationId) => void;
1062
1171
  activeConversationId: ConversationId | null;
1063
1172
  startDirect: (otherUserId: UserId) => Promise<ConversationId>;
1173
+ /**
1174
+ * THE ARCHIVED-ITEMS LAW's state. `conversations` above is ALWAYS the rows
1175
+ * this filter asked the SERVER for — never a superset to sieve — so a count
1176
+ * taken over it can never disagree with what renders.
1177
+ */
1178
+ archiveFilter: MessagingArchiveFilter;
1179
+ setArchiveFilter: (next: MessagingArchiveFilter) => void;
1180
+ /**
1181
+ * How many archived conversations exist, for a reveal label, or `null`
1182
+ * before the first count lands. `exact: false` means the count hit its cap
1183
+ * and the label must read "N+".
1184
+ */
1185
+ archivedCount: {
1186
+ count: number;
1187
+ exact: boolean;
1188
+ } | null;
1064
1189
  }
1065
1190
  declare function useConversations(): UseConversationsResult;
1066
1191
  interface UseConversationResult {
@@ -1538,4 +1663,4 @@ declare function summarizeText(content: string, maxLength?: number): string;
1538
1663
  /** Serialize picked references into a fence the platform's other readers accept. */
1539
1664
  declare function composeFence(references: readonly MatrxReference[]): string;
1540
1665
 
1541
- export { type ActionChoice, type ActionContext, type ActionHandler, type ActionOutcome, type ActionReceipt, type ActionRegistry, type ActorPresentation, AgentTag, type AiCallArgs, type AiCapability, type AiResult, AlertIcon, type Attachment, Avatar, BotIcon, CheckIcon, ChevronLeftIcon, type ClientMessageId, ClockIcon, CloseIcon, Composer, type ComposerInputRenderProps, type Conversation, type ConversationCursor, type ConversationId, ConversationList, type ConversationListProps, type ConversationRowWrapperProps, ConversationSkeleton, type ConversationSummary, type ConversationThread, type ConversationType, ConversationView, type ConversationViewProps, type DeliveryState, DeliveryTick, DoubleCheckIcon, type DraftMessage, EmptyState, type EngineDiagnostic, type IncomingMessageContext, type JsonObject, type JsonValue, LinkIcon, MESSAGING_EVENTS, MESSAGING_RPC_SCHEMA, MESSAGING_SCHEMA, type MatrxReference, type Message, type MessageAction, MessageActionChips, type MessageActionRenderProps, type MessageActionRenderer, MessageBubble, type MessageCursor, type MessageGroup, type MessageId, type MessageKind, type MessageWrapperProps, type MessagingAgentIdentity, type MessagingAgents, type MessagingAi, type MessagingAiOptions, type MessagingEngine, type MessagingEngineOptions, MessagingError, type MessagingErrorCode, type MessagingHost, type MessagingIdentity, MessagingInbox, type MessagingInboxProps, MessagingProvider, type MessagingProviderProps, type MessagingRepository, type MessagingSnapshot, type MessagingStore, type MessagingSupabaseClient, type MessagingSupabaseInternal, type OrganizationId, type Outbox, type OutboxEntry, type OutboxOptions, type OutboxStorage, type Page, PaperclipIcon, type Participant, type ParticipantRole, PlusIcon, type PostgrestFilterLike, type PostgrestLikeResponse, type PostgrestTableLike, RPCS, type ReadCache, type ReadCacheOptions, ReferenceCard, type ReferenceRenderer, ReplyIcon, type RepositoryOptions, type SchemaLike, SearchIcon, SendIcon, type SessionResolver, SparklesIcon, type SupabaseLike, TABLES, type TextSegment, TypingDots, type UseComposerResult, type UseConversationResult, type UseConversationsResult, type UseMessageActionResult, type UseMessagingAiResult, type UseTypistsResult, type UserId, type UserSummary, UsersIcon, asClientMessageId, asConversationId, asMessageId, asOrganizationId, asUserId, composeFence, conversationTopic, createActionRegistry, createMemoryOutboxStorage, createMessagingAi, createMessagingEngine, createMessagingRepository, createMessagingStore, createOutbox, createReadCache, createWebOutboxStorage, effectiveActorKey, extractReferences, formatConversationTime, formatDateSeparator, formatLastSeen, formatMessageTime, formatTypists, groupMessages, inboxTopic, invalidResponse, isSameDay, messagingClientId, normalizeMessagingError, optimisticMessage, participantNames, projectConversationSummary, projectMessage, projectMessageAction, projectParticipantRole, projectUserSummary, resolveActor, splitText, summarizeText, unreadCutoff, useComposer, useConversation, useConversations, useMessageAction, useMessagingAi, useMessagingHost, useMessagingSnapshot, useOnlineUserIds, useRequiredMessagingHost, useTypists };
1666
+ export { type ActionChoice, type ActionContext, type ActionHandler, type ActionOutcome, type ActionReceipt, type ActionRegistry, type ActorPresentation, AgentTag, type AiCallArgs, type AiCapability, type AiResult, AlertIcon, type Attachment, Avatar, BotIcon, CheckIcon, ChevronLeftIcon, type ClientMessageId, ClockIcon, CloseIcon, Composer, type ComposerInputRenderProps, type Conversation, type ConversationCursor, type ConversationId, ConversationList, type ConversationListProps, type ConversationRowWrapperProps, ConversationSkeleton, type ConversationSummary, type ConversationThread, type ConversationType, ConversationView, type ConversationViewProps, DEFAULT_MESSAGING_ARCHIVE_FILTER, type DeliveryState, DeliveryTick, DoubleCheckIcon, type DraftMessage, EmptyState, type EngineDiagnostic, type IncomingMessageContext, type JsonObject, type JsonValue, LinkIcon, MESSAGING_EVENTS, MESSAGING_RPC_SCHEMA, MESSAGING_SCHEMA, type MatrxReference, type Message, type MessageAction, MessageActionChips, type MessageActionRenderProps, type MessageActionRenderer, MessageBubble, type MessageCursor, type MessageGroup, type MessageId, type MessageKind, type MessageWrapperProps, type MessagingAgentIdentity, type MessagingAgents, type MessagingAi, type MessagingAiOptions, type MessagingArchiveFilter, type MessagingEngine, type MessagingEngineOptions, MessagingError, type MessagingErrorCode, type MessagingHost, type MessagingIdentity, MessagingInbox, type MessagingInboxProps, MessagingProvider, type MessagingProviderProps, type MessagingRepository, type MessagingSnapshot, type MessagingStore, type MessagingSupabaseClient, type MessagingSupabaseInternal, type OrganizationId, type Outbox, type OutboxEntry, type OutboxOptions, type OutboxStorage, type Page, PaperclipIcon, type Participant, type ParticipantRole, PlusIcon, type PostgrestFilterLike, type PostgrestLikeResponse, type PostgrestTableLike, RPCS, type ReadCache, type ReadCacheOptions, ReferenceCard, type ReferenceRenderer, ReplyIcon, type RepositoryOptions, type SchemaLike, SearchIcon, SendIcon, type SessionResolver, SparklesIcon, type SupabaseLike, TABLES, type TextSegment, TypingDots, type UseComposerResult, type UseConversationResult, type UseConversationsResult, type UseMessageActionResult, type UseMessagingAiResult, type UseTypistsResult, type UserId, type UserSummary, UsersIcon, asClientMessageId, asConversationId, asMessageId, asOrganizationId, asUserId, composeFence, conversationTopic, createActionRegistry, createMemoryOutboxStorage, createMessagingAi, createMessagingEngine, createMessagingRepository, createMessagingStore, createOutbox, createReadCache, createWebOutboxStorage, effectiveActorKey, extractReferences, formatConversationTime, formatDateSeparator, formatLastSeen, formatMessageTime, formatTypists, groupMessages, inboxTopic, invalidResponse, isSameDay, messagingClientId, normalizeMessagingError, optimisticMessage, participantNames, projectConversationSummary, projectMessage, projectMessageAction, projectParticipantRole, projectUserSummary, resolveActor, splitText, summarizeText, toMessagingArchiveFilter, unreadCutoff, useComposer, useConversation, useConversations, useMessageAction, useMessagingAi, useMessagingHost, useMessagingSnapshot, useOnlineUserIds, useRequiredMessagingHost, useTypists };