@ai-matrx/messaging 0.15.9 → 0.15.10
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +43 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +43 -6
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +334 -63
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +24 -45
- package/dist/react.d.ts +24 -45
- package/dist/react.js +335 -64
- package/dist/react.js.map +1 -1
- package/package.json +3 -3
package/dist/react.d.cts
CHANGED
|
@@ -1154,6 +1154,8 @@ interface MessagingEngine {
|
|
|
1154
1154
|
readonly store: MessagingStore;
|
|
1155
1155
|
readonly outbox: Outbox;
|
|
1156
1156
|
readonly identity: MessagingIdentity;
|
|
1157
|
+
/** Route package-owned recoveries through the host's diagnostic surface. */
|
|
1158
|
+
reportDiagnostic(event: EngineDiagnostic): void;
|
|
1157
1159
|
/** Load page one of the inbox and start the inbox channel. */
|
|
1158
1160
|
start(): Promise<void>;
|
|
1159
1161
|
loadMoreConversations(): Promise<void>;
|
|
@@ -1185,36 +1187,6 @@ declare function createMessagingEngine(options: MessagingEngineOptions): Messagi
|
|
|
1185
1187
|
/** The realtime client session id, exposed for diagnostics surfaces. */
|
|
1186
1188
|
declare function messagingClientId(): string;
|
|
1187
1189
|
|
|
1188
|
-
/**
|
|
1189
|
-
* `<MessagingProvider>` — the one place an app wires messaging.
|
|
1190
|
-
*
|
|
1191
|
-
* THE ONE-HOUR INTEGRATION CONTRACT (R7) is this component's job: a host passes
|
|
1192
|
-
* a Supabase client, who they are, and their org. Everything else — the
|
|
1193
|
-
* repository, the realtime manager and its channels, the store, the outbox and
|
|
1194
|
-
* its durable storage, the action registry, the AI surface — is constructed and
|
|
1195
|
-
* owned here.
|
|
1196
|
-
*
|
|
1197
|
-
* What a host may inject is IDENTITY and app chrome: session source, agent ids,
|
|
1198
|
-
* a navigator for reference cards, a notification sink, action handlers. What a
|
|
1199
|
-
* host must NEVER have to inject is behavior — if you find yourself catching a
|
|
1200
|
-
* package error, retrying a package call, or branching on a package quirk in
|
|
1201
|
-
* host code, that logic belongs in here (C22).
|
|
1202
|
-
*
|
|
1203
|
-
* 🚨 THE PROVIDER'S LIFETIME IS `client` + THE SESSION'S USER + `organizationId`,
|
|
1204
|
-
* AND NOTHING ELSE. Hosts pass fresh object literals for `agents`, `actions`,
|
|
1205
|
-
* and `onDiagnostic` on every render; keying the engine on those identities
|
|
1206
|
-
* would tear down and rebuild every channel on every parent re-render — a
|
|
1207
|
-
* permanent resubscribe loop that looks exactly like "realtime is broken".
|
|
1208
|
-
*
|
|
1209
|
-
* 🚨 THERE IS NO `userId` PROP (DD-241, 0.12.0). Who is acting is read from the
|
|
1210
|
-
* session of the `client` you pass — see `core/session-identity.ts` for the
|
|
1211
|
-
* class that closed. The provider is INERT until that first read lands, an
|
|
1212
|
-
* account switch rebuilds the runtime under the open tab, and a sign-out makes
|
|
1213
|
-
* it inert again. A `userId` still passed at run time (a stale bundle, a
|
|
1214
|
-
* JavaScript consumer) is ignored and reported through `onDiagnostic` with the
|
|
1215
|
-
* remedy — never taken, and never dropped in silence.
|
|
1216
|
-
*/
|
|
1217
|
-
|
|
1218
1190
|
/**
|
|
1219
1191
|
* What the host needs to decide whether to interrupt someone, and what to say.
|
|
1220
1192
|
*/
|
|
@@ -1270,6 +1242,9 @@ type ReferenceRenderer = ComponentType<{
|
|
|
1270
1242
|
* through a kind registry), and only the app can draw them. Give us this and
|
|
1271
1243
|
* EVERY fence in a message goes to you, parsed or not.
|
|
1272
1244
|
*/
|
|
1245
|
+
type AttachmentRenderer = ComponentType<{
|
|
1246
|
+
attachment: Attachment;
|
|
1247
|
+
}>;
|
|
1273
1248
|
type FenceRenderer = ComponentType<{
|
|
1274
1249
|
body: string;
|
|
1275
1250
|
}>;
|
|
@@ -1303,6 +1278,7 @@ interface MessagingHost {
|
|
|
1303
1278
|
/** Host surfaces for action kinds whose answer is a card, not a chip. */
|
|
1304
1279
|
readonly actionRenderers: ReadonlyMap<string, MessageActionRenderer>;
|
|
1305
1280
|
readonly renderReference: ReferenceRenderer | null;
|
|
1281
|
+
readonly renderAttachment: AttachmentRenderer | null;
|
|
1306
1282
|
readonly renderFence: FenceRenderer | null;
|
|
1307
1283
|
readonly wrapMessage: ComponentType<MessageWrapperProps> | null;
|
|
1308
1284
|
readonly wrapConversationRow: ComponentType<ConversationRowWrapperProps> | null;
|
|
@@ -1360,6 +1336,7 @@ interface MessagingProviderProps {
|
|
|
1360
1336
|
/** Draw references with the app's own renderer instead of the package card. */
|
|
1361
1337
|
renderReference?: ReferenceRenderer | undefined;
|
|
1362
1338
|
/** Draw ```matrx fences with the app's own renderer — every fence, parsed or not. */
|
|
1339
|
+
renderAttachment?: AttachmentRenderer | undefined;
|
|
1363
1340
|
renderFence?: FenceRenderer | undefined;
|
|
1364
1341
|
/** App chrome (a right-click menu, a drop target) around each message bubble. */
|
|
1365
1342
|
wrapMessage?: ComponentType<MessageWrapperProps> | undefined;
|
|
@@ -1461,7 +1438,16 @@ interface UseConversationResult {
|
|
|
1461
1438
|
remove: (messageId: Message["id"], forEveryone: boolean) => Promise<void>;
|
|
1462
1439
|
}
|
|
1463
1440
|
declare function useConversation(id: ConversationId | null): UseConversationResult;
|
|
1441
|
+
interface ComposerAttachment {
|
|
1442
|
+
readonly id: string;
|
|
1443
|
+
readonly label: string;
|
|
1444
|
+
readonly content?: string;
|
|
1445
|
+
readonly attachment?: Attachment;
|
|
1446
|
+
}
|
|
1464
1447
|
interface UseComposerResult {
|
|
1448
|
+
additions: readonly ComposerAttachment[];
|
|
1449
|
+
add: (item: ComposerAttachment) => void;
|
|
1450
|
+
removeAddition: (id: string) => void;
|
|
1465
1451
|
value: string;
|
|
1466
1452
|
setValue: (value: string) => void;
|
|
1467
1453
|
canSend: boolean;
|
|
@@ -1516,24 +1502,12 @@ interface UseMessageActionResult {
|
|
|
1516
1502
|
*/
|
|
1517
1503
|
declare function useMessageAction(message: Message): UseMessageActionResult;
|
|
1518
1504
|
|
|
1519
|
-
/**
|
|
1520
|
-
* THE DROP-IN SURFACES (R6/R7).
|
|
1521
|
-
*
|
|
1522
|
-
* `<MessagingInbox />` is the whole product in one element. The paired pieces
|
|
1523
|
-
* are exported too, for a host that wants the list in a sidebar and the thread
|
|
1524
|
-
* on a route — but composing pages is the host's job, and building a product
|
|
1525
|
-
* is not.
|
|
1526
|
-
*
|
|
1527
|
-
* Every screen here obeys the same three rules: a control is absent or honest
|
|
1528
|
-
* (never dead or disabled-looking with no reason); loading is a skeleton of the
|
|
1529
|
-
* real thing, never the word "Loading…"; and a degraded connection SAYS so
|
|
1530
|
-
* rather than quietly showing a stale thread.
|
|
1531
|
-
*/
|
|
1532
|
-
|
|
1533
1505
|
interface ConversationListProps {
|
|
1534
1506
|
onSelect?: (id: ConversationId) => void;
|
|
1535
1507
|
onNewConversation?: () => void;
|
|
1536
1508
|
className?: string;
|
|
1509
|
+
/** Conversation IDs the host marks as favorites, in display order. */
|
|
1510
|
+
pinnedConversationIds?: readonly string[];
|
|
1537
1511
|
}
|
|
1538
1512
|
declare function ConversationList(props: ConversationListProps): ReactNode;
|
|
1539
1513
|
interface ConversationViewProps {
|
|
@@ -1548,6 +1522,9 @@ interface ConversationViewProps {
|
|
|
1548
1522
|
renderComposerInput?: (props: ComposerInputRenderProps) => ReactNode;
|
|
1549
1523
|
}
|
|
1550
1524
|
interface ComposerInputRenderProps {
|
|
1525
|
+
readonly additions: UseComposerResult["additions"];
|
|
1526
|
+
readonly add: UseComposerResult["add"];
|
|
1527
|
+
readonly removeAddition: UseComposerResult["removeAddition"];
|
|
1551
1528
|
readonly value: string;
|
|
1552
1529
|
readonly disabled: boolean;
|
|
1553
1530
|
readonly canSend: boolean;
|
|
@@ -1559,6 +1536,8 @@ interface ComposerInputRenderProps {
|
|
|
1559
1536
|
declare function ConversationView(props: ConversationViewProps): ReactNode;
|
|
1560
1537
|
declare function MessageBubble(props: {
|
|
1561
1538
|
message: Message;
|
|
1539
|
+
renderAttachment?: AttachmentRenderer;
|
|
1540
|
+
replyTo?: Message | undefined;
|
|
1562
1541
|
isMine: boolean;
|
|
1563
1542
|
isLast: boolean;
|
|
1564
1543
|
onRetry?: (entryId: string) => void;
|
|
@@ -1898,4 +1877,4 @@ declare function summarizeText(content: string, maxLength?: number): string;
|
|
|
1898
1877
|
/** Serialize picked references into a fence the platform's other readers accept. */
|
|
1899
1878
|
declare function composeFence(references: readonly MatrxReference[]): string;
|
|
1900
1879
|
|
|
1901
|
-
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 ConversationAiContext, type ConversationCursor, type ConversationId, ConversationList, type ConversationListProps, type ConversationReadFailure, 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, SERVER_SESSION_IDENTITY, type SchemaLike, SearchIcon, SendIcon, type SessionIdentity, type SessionIdentitySnapshot, 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, conversationContextVariables, conversationTopic, createActionRegistry, createMemoryOutboxStorage, createMessagingAi, createMessagingEngine, createMessagingRepository, createMessagingStore, createOutbox, createReadCache, createSessionIdentity, 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 };
|
|
1880
|
+
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 ComposerAttachment, type ComposerInputRenderProps, type Conversation, type ConversationAiContext, type ConversationCursor, type ConversationId, ConversationList, type ConversationListProps, type ConversationReadFailure, 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, SERVER_SESSION_IDENTITY, type SchemaLike, SearchIcon, SendIcon, type SessionIdentity, type SessionIdentitySnapshot, 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, conversationContextVariables, conversationTopic, createActionRegistry, createMemoryOutboxStorage, createMessagingAi, createMessagingEngine, createMessagingRepository, createMessagingStore, createOutbox, createReadCache, createSessionIdentity, 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
|
@@ -1154,6 +1154,8 @@ interface MessagingEngine {
|
|
|
1154
1154
|
readonly store: MessagingStore;
|
|
1155
1155
|
readonly outbox: Outbox;
|
|
1156
1156
|
readonly identity: MessagingIdentity;
|
|
1157
|
+
/** Route package-owned recoveries through the host's diagnostic surface. */
|
|
1158
|
+
reportDiagnostic(event: EngineDiagnostic): void;
|
|
1157
1159
|
/** Load page one of the inbox and start the inbox channel. */
|
|
1158
1160
|
start(): Promise<void>;
|
|
1159
1161
|
loadMoreConversations(): Promise<void>;
|
|
@@ -1185,36 +1187,6 @@ declare function createMessagingEngine(options: MessagingEngineOptions): Messagi
|
|
|
1185
1187
|
/** The realtime client session id, exposed for diagnostics surfaces. */
|
|
1186
1188
|
declare function messagingClientId(): string;
|
|
1187
1189
|
|
|
1188
|
-
/**
|
|
1189
|
-
* `<MessagingProvider>` — the one place an app wires messaging.
|
|
1190
|
-
*
|
|
1191
|
-
* THE ONE-HOUR INTEGRATION CONTRACT (R7) is this component's job: a host passes
|
|
1192
|
-
* a Supabase client, who they are, and their org. Everything else — the
|
|
1193
|
-
* repository, the realtime manager and its channels, the store, the outbox and
|
|
1194
|
-
* its durable storage, the action registry, the AI surface — is constructed and
|
|
1195
|
-
* owned here.
|
|
1196
|
-
*
|
|
1197
|
-
* What a host may inject is IDENTITY and app chrome: session source, agent ids,
|
|
1198
|
-
* a navigator for reference cards, a notification sink, action handlers. What a
|
|
1199
|
-
* host must NEVER have to inject is behavior — if you find yourself catching a
|
|
1200
|
-
* package error, retrying a package call, or branching on a package quirk in
|
|
1201
|
-
* host code, that logic belongs in here (C22).
|
|
1202
|
-
*
|
|
1203
|
-
* 🚨 THE PROVIDER'S LIFETIME IS `client` + THE SESSION'S USER + `organizationId`,
|
|
1204
|
-
* AND NOTHING ELSE. Hosts pass fresh object literals for `agents`, `actions`,
|
|
1205
|
-
* and `onDiagnostic` on every render; keying the engine on those identities
|
|
1206
|
-
* would tear down and rebuild every channel on every parent re-render — a
|
|
1207
|
-
* permanent resubscribe loop that looks exactly like "realtime is broken".
|
|
1208
|
-
*
|
|
1209
|
-
* 🚨 THERE IS NO `userId` PROP (DD-241, 0.12.0). Who is acting is read from the
|
|
1210
|
-
* session of the `client` you pass — see `core/session-identity.ts` for the
|
|
1211
|
-
* class that closed. The provider is INERT until that first read lands, an
|
|
1212
|
-
* account switch rebuilds the runtime under the open tab, and a sign-out makes
|
|
1213
|
-
* it inert again. A `userId` still passed at run time (a stale bundle, a
|
|
1214
|
-
* JavaScript consumer) is ignored and reported through `onDiagnostic` with the
|
|
1215
|
-
* remedy — never taken, and never dropped in silence.
|
|
1216
|
-
*/
|
|
1217
|
-
|
|
1218
1190
|
/**
|
|
1219
1191
|
* What the host needs to decide whether to interrupt someone, and what to say.
|
|
1220
1192
|
*/
|
|
@@ -1270,6 +1242,9 @@ type ReferenceRenderer = ComponentType<{
|
|
|
1270
1242
|
* through a kind registry), and only the app can draw them. Give us this and
|
|
1271
1243
|
* EVERY fence in a message goes to you, parsed or not.
|
|
1272
1244
|
*/
|
|
1245
|
+
type AttachmentRenderer = ComponentType<{
|
|
1246
|
+
attachment: Attachment;
|
|
1247
|
+
}>;
|
|
1273
1248
|
type FenceRenderer = ComponentType<{
|
|
1274
1249
|
body: string;
|
|
1275
1250
|
}>;
|
|
@@ -1303,6 +1278,7 @@ interface MessagingHost {
|
|
|
1303
1278
|
/** Host surfaces for action kinds whose answer is a card, not a chip. */
|
|
1304
1279
|
readonly actionRenderers: ReadonlyMap<string, MessageActionRenderer>;
|
|
1305
1280
|
readonly renderReference: ReferenceRenderer | null;
|
|
1281
|
+
readonly renderAttachment: AttachmentRenderer | null;
|
|
1306
1282
|
readonly renderFence: FenceRenderer | null;
|
|
1307
1283
|
readonly wrapMessage: ComponentType<MessageWrapperProps> | null;
|
|
1308
1284
|
readonly wrapConversationRow: ComponentType<ConversationRowWrapperProps> | null;
|
|
@@ -1360,6 +1336,7 @@ interface MessagingProviderProps {
|
|
|
1360
1336
|
/** Draw references with the app's own renderer instead of the package card. */
|
|
1361
1337
|
renderReference?: ReferenceRenderer | undefined;
|
|
1362
1338
|
/** Draw ```matrx fences with the app's own renderer — every fence, parsed or not. */
|
|
1339
|
+
renderAttachment?: AttachmentRenderer | undefined;
|
|
1363
1340
|
renderFence?: FenceRenderer | undefined;
|
|
1364
1341
|
/** App chrome (a right-click menu, a drop target) around each message bubble. */
|
|
1365
1342
|
wrapMessage?: ComponentType<MessageWrapperProps> | undefined;
|
|
@@ -1461,7 +1438,16 @@ interface UseConversationResult {
|
|
|
1461
1438
|
remove: (messageId: Message["id"], forEveryone: boolean) => Promise<void>;
|
|
1462
1439
|
}
|
|
1463
1440
|
declare function useConversation(id: ConversationId | null): UseConversationResult;
|
|
1441
|
+
interface ComposerAttachment {
|
|
1442
|
+
readonly id: string;
|
|
1443
|
+
readonly label: string;
|
|
1444
|
+
readonly content?: string;
|
|
1445
|
+
readonly attachment?: Attachment;
|
|
1446
|
+
}
|
|
1464
1447
|
interface UseComposerResult {
|
|
1448
|
+
additions: readonly ComposerAttachment[];
|
|
1449
|
+
add: (item: ComposerAttachment) => void;
|
|
1450
|
+
removeAddition: (id: string) => void;
|
|
1465
1451
|
value: string;
|
|
1466
1452
|
setValue: (value: string) => void;
|
|
1467
1453
|
canSend: boolean;
|
|
@@ -1516,24 +1502,12 @@ interface UseMessageActionResult {
|
|
|
1516
1502
|
*/
|
|
1517
1503
|
declare function useMessageAction(message: Message): UseMessageActionResult;
|
|
1518
1504
|
|
|
1519
|
-
/**
|
|
1520
|
-
* THE DROP-IN SURFACES (R6/R7).
|
|
1521
|
-
*
|
|
1522
|
-
* `<MessagingInbox />` is the whole product in one element. The paired pieces
|
|
1523
|
-
* are exported too, for a host that wants the list in a sidebar and the thread
|
|
1524
|
-
* on a route — but composing pages is the host's job, and building a product
|
|
1525
|
-
* is not.
|
|
1526
|
-
*
|
|
1527
|
-
* Every screen here obeys the same three rules: a control is absent or honest
|
|
1528
|
-
* (never dead or disabled-looking with no reason); loading is a skeleton of the
|
|
1529
|
-
* real thing, never the word "Loading…"; and a degraded connection SAYS so
|
|
1530
|
-
* rather than quietly showing a stale thread.
|
|
1531
|
-
*/
|
|
1532
|
-
|
|
1533
1505
|
interface ConversationListProps {
|
|
1534
1506
|
onSelect?: (id: ConversationId) => void;
|
|
1535
1507
|
onNewConversation?: () => void;
|
|
1536
1508
|
className?: string;
|
|
1509
|
+
/** Conversation IDs the host marks as favorites, in display order. */
|
|
1510
|
+
pinnedConversationIds?: readonly string[];
|
|
1537
1511
|
}
|
|
1538
1512
|
declare function ConversationList(props: ConversationListProps): ReactNode;
|
|
1539
1513
|
interface ConversationViewProps {
|
|
@@ -1548,6 +1522,9 @@ interface ConversationViewProps {
|
|
|
1548
1522
|
renderComposerInput?: (props: ComposerInputRenderProps) => ReactNode;
|
|
1549
1523
|
}
|
|
1550
1524
|
interface ComposerInputRenderProps {
|
|
1525
|
+
readonly additions: UseComposerResult["additions"];
|
|
1526
|
+
readonly add: UseComposerResult["add"];
|
|
1527
|
+
readonly removeAddition: UseComposerResult["removeAddition"];
|
|
1551
1528
|
readonly value: string;
|
|
1552
1529
|
readonly disabled: boolean;
|
|
1553
1530
|
readonly canSend: boolean;
|
|
@@ -1559,6 +1536,8 @@ interface ComposerInputRenderProps {
|
|
|
1559
1536
|
declare function ConversationView(props: ConversationViewProps): ReactNode;
|
|
1560
1537
|
declare function MessageBubble(props: {
|
|
1561
1538
|
message: Message;
|
|
1539
|
+
renderAttachment?: AttachmentRenderer;
|
|
1540
|
+
replyTo?: Message | undefined;
|
|
1562
1541
|
isMine: boolean;
|
|
1563
1542
|
isLast: boolean;
|
|
1564
1543
|
onRetry?: (entryId: string) => void;
|
|
@@ -1898,4 +1877,4 @@ declare function summarizeText(content: string, maxLength?: number): string;
|
|
|
1898
1877
|
/** Serialize picked references into a fence the platform's other readers accept. */
|
|
1899
1878
|
declare function composeFence(references: readonly MatrxReference[]): string;
|
|
1900
1879
|
|
|
1901
|
-
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 ConversationAiContext, type ConversationCursor, type ConversationId, ConversationList, type ConversationListProps, type ConversationReadFailure, 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, SERVER_SESSION_IDENTITY, type SchemaLike, SearchIcon, SendIcon, type SessionIdentity, type SessionIdentitySnapshot, 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, conversationContextVariables, conversationTopic, createActionRegistry, createMemoryOutboxStorage, createMessagingAi, createMessagingEngine, createMessagingRepository, createMessagingStore, createOutbox, createReadCache, createSessionIdentity, 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 };
|
|
1880
|
+
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 ComposerAttachment, type ComposerInputRenderProps, type Conversation, type ConversationAiContext, type ConversationCursor, type ConversationId, ConversationList, type ConversationListProps, type ConversationReadFailure, 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, SERVER_SESSION_IDENTITY, type SchemaLike, SearchIcon, SendIcon, type SessionIdentity, type SessionIdentitySnapshot, 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, conversationContextVariables, conversationTopic, createActionRegistry, createMemoryOutboxStorage, createMessagingAi, createMessagingEngine, createMessagingRepository, createMessagingStore, createOutbox, createReadCache, createSessionIdentity, 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 };
|