@ai-matrx/messaging 0.6.0 → 0.7.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/CHANGELOG.md +29 -0
- package/README.md +2 -1
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +4 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +19 -2
- package/dist/react.d.ts +19 -2
- package/dist/react.js +4 -1
- package/dist/react.js.map +1 -1
- package/package.json +3 -3
package/dist/react.d.cts
CHANGED
|
@@ -543,8 +543,25 @@ type MessagingSupabaseClient = SupabaseLike & RealtimeClientLike;
|
|
|
543
543
|
* — which in a large org is every page.
|
|
544
544
|
*/
|
|
545
545
|
|
|
546
|
-
/** The schema. Messaging
|
|
546
|
+
/** The TABLES' schema. Messaging tables are never in `public`. */
|
|
547
547
|
declare const MESSAGING_SCHEMA = "communication";
|
|
548
|
+
/**
|
|
549
|
+
* 🚨 THE RPCS LIVE IN `public`, AND THE TABLES DO NOT. THIS IS NOT A TYPO.
|
|
550
|
+
*
|
|
551
|
+
* Matrx Main's messaging tables moved into `communication` during the schema
|
|
552
|
+
* reorg; the five auth-checked SECURITY DEFINER functions stayed in `public`,
|
|
553
|
+
* where PostgREST exposes them by default and where every existing caller and
|
|
554
|
+
* GRANT already pointed. Calling them on `communication` fails with PGRST202
|
|
555
|
+
* ("no matches were found in the schema cache") on EVERY read — which is what
|
|
556
|
+
* happened the first time this package touched the live database, and what no
|
|
557
|
+
* amount of checking the SQL by inspection had caught.
|
|
558
|
+
*
|
|
559
|
+
* Verify before changing either constant:
|
|
560
|
+
* select n.nspname, p.proname from pg_proc p
|
|
561
|
+
* join pg_namespace n on n.oid = p.pronamespace
|
|
562
|
+
* where p.proname like '%_dm_%';
|
|
563
|
+
*/
|
|
564
|
+
declare const MESSAGING_RPC_SCHEMA = "public";
|
|
548
565
|
declare const TABLES: {
|
|
549
566
|
readonly conversations: "dm_conversations";
|
|
550
567
|
readonly participants: "dm_conversation_participants";
|
|
@@ -1408,4 +1425,4 @@ declare function summarizeText(content: string, maxLength?: number): string;
|
|
|
1408
1425
|
/** Serialize picked references into a fence the platform's other readers accept. */
|
|
1409
1426
|
declare function composeFence(references: readonly MatrxReference[]): string;
|
|
1410
1427
|
|
|
1411
|
-
export { type ActionChoice, type ActionContext, type ActionHandler, type ActionOutcome, type ActionReceipt, type ActionRegistry, type ActorPresentation, AgentTag, type AiCapability, type AiResult, AlertIcon, type Attachment, Avatar, BotIcon, CheckIcon, ChevronLeftIcon, type ClientMessageId, ClockIcon, CloseIcon, Composer, 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_SCHEMA, type MatrxReference, type Message, type MessageAction, MessageActionChips, type MessageActionRenderProps, type MessageActionRenderer, MessageBubble, type MessageCursor, type MessageGroup, type MessageId, type MessageKind, type MessageWrapperProps, 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 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, extractReferences, formatConversationTime, formatDateSeparator, formatLastSeen, formatMessageTime, formatTypists, groupMessages, inboxTopic, invalidResponse, isSameDay, messagingClientId, normalizeMessagingError, optimisticMessage, participantNames, projectConversationSummary, projectMessage, projectMessageAction, projectParticipantRole, projectUserSummary, resolveActor, splitText, summarizeText, useComposer, useConversation, useConversations, useMessageAction, useMessagingAi, useMessagingHost, useMessagingSnapshot, useOnlineUserIds, useRequiredMessagingHost, useTypists };
|
|
1428
|
+
export { type ActionChoice, type ActionContext, type ActionHandler, type ActionOutcome, type ActionReceipt, type ActionRegistry, type ActorPresentation, AgentTag, type AiCapability, type AiResult, AlertIcon, type Attachment, Avatar, BotIcon, CheckIcon, ChevronLeftIcon, type ClientMessageId, ClockIcon, CloseIcon, Composer, 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 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 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, extractReferences, formatConversationTime, formatDateSeparator, formatLastSeen, formatMessageTime, formatTypists, groupMessages, inboxTopic, invalidResponse, isSameDay, messagingClientId, normalizeMessagingError, optimisticMessage, participantNames, projectConversationSummary, projectMessage, projectMessageAction, projectParticipantRole, projectUserSummary, resolveActor, splitText, summarizeText, useComposer, useConversation, useConversations, useMessageAction, useMessagingAi, useMessagingHost, useMessagingSnapshot, useOnlineUserIds, useRequiredMessagingHost, useTypists };
|
package/dist/react.d.ts
CHANGED
|
@@ -543,8 +543,25 @@ type MessagingSupabaseClient = SupabaseLike & RealtimeClientLike;
|
|
|
543
543
|
* — which in a large org is every page.
|
|
544
544
|
*/
|
|
545
545
|
|
|
546
|
-
/** The schema. Messaging
|
|
546
|
+
/** The TABLES' schema. Messaging tables are never in `public`. */
|
|
547
547
|
declare const MESSAGING_SCHEMA = "communication";
|
|
548
|
+
/**
|
|
549
|
+
* 🚨 THE RPCS LIVE IN `public`, AND THE TABLES DO NOT. THIS IS NOT A TYPO.
|
|
550
|
+
*
|
|
551
|
+
* Matrx Main's messaging tables moved into `communication` during the schema
|
|
552
|
+
* reorg; the five auth-checked SECURITY DEFINER functions stayed in `public`,
|
|
553
|
+
* where PostgREST exposes them by default and where every existing caller and
|
|
554
|
+
* GRANT already pointed. Calling them on `communication` fails with PGRST202
|
|
555
|
+
* ("no matches were found in the schema cache") on EVERY read — which is what
|
|
556
|
+
* happened the first time this package touched the live database, and what no
|
|
557
|
+
* amount of checking the SQL by inspection had caught.
|
|
558
|
+
*
|
|
559
|
+
* Verify before changing either constant:
|
|
560
|
+
* select n.nspname, p.proname from pg_proc p
|
|
561
|
+
* join pg_namespace n on n.oid = p.pronamespace
|
|
562
|
+
* where p.proname like '%_dm_%';
|
|
563
|
+
*/
|
|
564
|
+
declare const MESSAGING_RPC_SCHEMA = "public";
|
|
548
565
|
declare const TABLES: {
|
|
549
566
|
readonly conversations: "dm_conversations";
|
|
550
567
|
readonly participants: "dm_conversation_participants";
|
|
@@ -1408,4 +1425,4 @@ declare function summarizeText(content: string, maxLength?: number): string;
|
|
|
1408
1425
|
/** Serialize picked references into a fence the platform's other readers accept. */
|
|
1409
1426
|
declare function composeFence(references: readonly MatrxReference[]): string;
|
|
1410
1427
|
|
|
1411
|
-
export { type ActionChoice, type ActionContext, type ActionHandler, type ActionOutcome, type ActionReceipt, type ActionRegistry, type ActorPresentation, AgentTag, type AiCapability, type AiResult, AlertIcon, type Attachment, Avatar, BotIcon, CheckIcon, ChevronLeftIcon, type ClientMessageId, ClockIcon, CloseIcon, Composer, 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_SCHEMA, type MatrxReference, type Message, type MessageAction, MessageActionChips, type MessageActionRenderProps, type MessageActionRenderer, MessageBubble, type MessageCursor, type MessageGroup, type MessageId, type MessageKind, type MessageWrapperProps, 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 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, extractReferences, formatConversationTime, formatDateSeparator, formatLastSeen, formatMessageTime, formatTypists, groupMessages, inboxTopic, invalidResponse, isSameDay, messagingClientId, normalizeMessagingError, optimisticMessage, participantNames, projectConversationSummary, projectMessage, projectMessageAction, projectParticipantRole, projectUserSummary, resolveActor, splitText, summarizeText, useComposer, useConversation, useConversations, useMessageAction, useMessagingAi, useMessagingHost, useMessagingSnapshot, useOnlineUserIds, useRequiredMessagingHost, useTypists };
|
|
1428
|
+
export { type ActionChoice, type ActionContext, type ActionHandler, type ActionOutcome, type ActionReceipt, type ActionRegistry, type ActorPresentation, AgentTag, type AiCapability, type AiResult, AlertIcon, type Attachment, Avatar, BotIcon, CheckIcon, ChevronLeftIcon, type ClientMessageId, ClockIcon, CloseIcon, Composer, 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 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 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, extractReferences, formatConversationTime, formatDateSeparator, formatLastSeen, formatMessageTime, formatTypists, groupMessages, inboxTopic, invalidResponse, isSameDay, messagingClientId, normalizeMessagingError, optimisticMessage, participantNames, projectConversationSummary, projectMessage, projectMessageAction, projectParticipantRole, projectUserSummary, resolveActor, splitText, summarizeText, useComposer, useConversation, useConversations, useMessageAction, useMessagingAi, useMessagingHost, useMessagingSnapshot, useOnlineUserIds, useRequiredMessagingHost, useTypists };
|
package/dist/react.js
CHANGED
|
@@ -1358,6 +1358,7 @@ function createReadCache(options) {
|
|
|
1358
1358
|
|
|
1359
1359
|
// src/core/repository.ts
|
|
1360
1360
|
var MESSAGING_SCHEMA = "communication";
|
|
1361
|
+
var MESSAGING_RPC_SCHEMA = "public";
|
|
1361
1362
|
var TABLES = {
|
|
1362
1363
|
conversations: "dm_conversations",
|
|
1363
1364
|
participants: "dm_conversation_participants",
|
|
@@ -1392,6 +1393,7 @@ function createMessagingRepository(options) {
|
|
|
1392
1393
|
...options.now !== void 0 ? { now: options.now } : {}
|
|
1393
1394
|
});
|
|
1394
1395
|
const db = () => client.schema(MESSAGING_SCHEMA);
|
|
1396
|
+
const rpcDb = () => client.schema(MESSAGING_RPC_SCHEMA);
|
|
1395
1397
|
async function withSessionRetry(operation, run) {
|
|
1396
1398
|
try {
|
|
1397
1399
|
return await run();
|
|
@@ -1409,7 +1411,7 @@ function createMessagingRepository(options) {
|
|
|
1409
1411
|
}
|
|
1410
1412
|
}
|
|
1411
1413
|
async function rpc(fn, args, operation) {
|
|
1412
|
-
const { data, error } = await
|
|
1414
|
+
const { data, error } = await rpcDb().rpc(fn, args);
|
|
1413
1415
|
if (error !== null) throw normalizeMessagingError(error, operation);
|
|
1414
1416
|
return data;
|
|
1415
1417
|
}
|
|
@@ -3034,6 +3036,7 @@ export {
|
|
|
3034
3036
|
EmptyState,
|
|
3035
3037
|
LinkIcon,
|
|
3036
3038
|
MESSAGING_EVENTS,
|
|
3039
|
+
MESSAGING_RPC_SCHEMA,
|
|
3037
3040
|
MESSAGING_SCHEMA,
|
|
3038
3041
|
MessageActionChips,
|
|
3039
3042
|
MessageBubble,
|