@liveblocks/core 3.13.0 → 3.13.1-hackathon

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/index.d.cts CHANGED
@@ -527,6 +527,8 @@ declare const ClientMsgCode: Readonly<{
527
527
  UPDATE_STORAGE: 201;
528
528
  FETCH_YDOC: 300;
529
529
  UPDATE_YDOC: 301;
530
+ FETCH_AGENT_SESSIONS: 500;
531
+ FETCH_AGENT_MESSAGES: 502;
530
532
  }>;
531
533
  declare namespace ClientMsgCode {
532
534
  type UPDATE_PRESENCE = typeof ClientMsgCode.UPDATE_PRESENCE;
@@ -535,11 +537,13 @@ declare namespace ClientMsgCode {
535
537
  type UPDATE_STORAGE = typeof ClientMsgCode.UPDATE_STORAGE;
536
538
  type FETCH_YDOC = typeof ClientMsgCode.FETCH_YDOC;
537
539
  type UPDATE_YDOC = typeof ClientMsgCode.UPDATE_YDOC;
540
+ type FETCH_AGENT_SESSIONS = typeof ClientMsgCode.FETCH_AGENT_SESSIONS;
541
+ type FETCH_AGENT_MESSAGES = typeof ClientMsgCode.FETCH_AGENT_MESSAGES;
538
542
  }
539
543
  /**
540
544
  * Messages that can be sent from the client to the server.
541
545
  */
542
- type ClientMsg<P extends JsonObject, E extends Json> = BroadcastEventClientMsg<E> | UpdatePresenceClientMsg<P> | UpdateStorageClientMsg | FetchStorageClientMsg | FetchYDocClientMsg | UpdateYDocClientMsg;
546
+ type ClientMsg<P extends JsonObject, E extends Json> = BroadcastEventClientMsg<E> | UpdatePresenceClientMsg<P> | UpdateStorageClientMsg | FetchStorageClientMsg | FetchYDocClientMsg | UpdateYDocClientMsg | FetchAgentSessionsClientMsg | FetchAgentMessagesClientMsg;
543
547
  type BroadcastEventClientMsg<E extends Json> = {
544
548
  type: ClientMsgCode.BROADCAST_EVENT;
545
549
  event: E;
@@ -589,6 +593,20 @@ type UpdateYDocClientMsg = {
589
593
  readonly guid?: string;
590
594
  readonly v2?: boolean;
591
595
  };
596
+ type FetchAgentSessionsClientMsg = {
597
+ readonly type: ClientMsgCode.FETCH_AGENT_SESSIONS;
598
+ readonly cursor?: string;
599
+ readonly since?: number;
600
+ readonly limit?: number;
601
+ readonly metadata?: Record<string, string>;
602
+ };
603
+ type FetchAgentMessagesClientMsg = {
604
+ readonly type: ClientMsgCode.FETCH_AGENT_MESSAGES;
605
+ readonly sessionId: string;
606
+ readonly cursor?: string;
607
+ readonly since?: number;
608
+ readonly limit?: number;
609
+ };
592
610
 
593
611
  /**
594
612
  * Represents an indefinitely deep arbitrary immutable data
@@ -2597,6 +2615,17 @@ type Delegates<T extends BaseAuthResult> = {
2597
2615
  canZombie: () => boolean;
2598
2616
  };
2599
2617
 
2618
+ type AgentSession = {
2619
+ sessionId: string;
2620
+ metadata: Json;
2621
+ timestamp: number;
2622
+ };
2623
+ type AgentMessage = {
2624
+ id: string;
2625
+ timestamp: number;
2626
+ data: Json;
2627
+ };
2628
+
2600
2629
  type ServerMsgCode = (typeof ServerMsgCode)[keyof typeof ServerMsgCode];
2601
2630
  declare const ServerMsgCode: Readonly<{
2602
2631
  UPDATE_PRESENCE: 100;
@@ -2617,6 +2646,8 @@ declare const ServerMsgCode: Readonly<{
2617
2646
  COMMENT_REACTION_ADDED: 405;
2618
2647
  COMMENT_REACTION_REMOVED: 406;
2619
2648
  COMMENT_METADATA_UPDATED: 409;
2649
+ AGENT_SESSIONS: 501;
2650
+ AGENT_MESSAGES: 503;
2620
2651
  REJECT_STORAGE_OP: 299;
2621
2652
  }>;
2622
2653
  declare namespace ServerMsgCode {
@@ -2637,13 +2668,15 @@ declare namespace ServerMsgCode {
2637
2668
  type COMMENT_DELETED = typeof ServerMsgCode.COMMENT_DELETED;
2638
2669
  type COMMENT_REACTION_ADDED = typeof ServerMsgCode.COMMENT_REACTION_ADDED;
2639
2670
  type COMMENT_REACTION_REMOVED = typeof ServerMsgCode.COMMENT_REACTION_REMOVED;
2671
+ type AGENT_SESSIONS = typeof ServerMsgCode.AGENT_SESSIONS;
2672
+ type AGENT_MESSAGES = typeof ServerMsgCode.AGENT_MESSAGES;
2640
2673
  type COMMENT_METADATA_UPDATED = typeof ServerMsgCode.COMMENT_METADATA_UPDATED;
2641
2674
  type REJECT_STORAGE_OP = typeof ServerMsgCode.REJECT_STORAGE_OP;
2642
2675
  }
2643
2676
  /**
2644
2677
  * Messages that can be sent from the server to the client.
2645
2678
  */
2646
- type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | StorageStateServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg;
2679
+ type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | StorageStateServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg | AgentSessionsServerMsg | AgentMessagesServerMsg;
2647
2680
  type CommentsEventServerMsg = ThreadCreatedEvent | ThreadDeletedEvent | ThreadMetadataUpdatedEvent | ThreadUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved | CommentMetadataUpdatedEvent;
2648
2681
  type ThreadCreatedEvent = {
2649
2682
  type: ServerMsgCode.THREAD_CREATED;
@@ -2867,6 +2900,19 @@ type RejectedStorageOpServerMsg = {
2867
2900
  readonly opIds: string[];
2868
2901
  readonly reason: string;
2869
2902
  };
2903
+ type AgentSessionsServerMsg = {
2904
+ readonly type: ServerMsgCode.AGENT_SESSIONS;
2905
+ readonly sessions: AgentSession[];
2906
+ readonly nextCursor?: string;
2907
+ readonly operation: "list" | "added" | "updated" | "deleted";
2908
+ };
2909
+ type AgentMessagesServerMsg = {
2910
+ readonly type: ServerMsgCode.AGENT_MESSAGES;
2911
+ readonly sessionId: string;
2912
+ readonly messages: AgentMessage[];
2913
+ readonly nextCursor?: string;
2914
+ readonly operation: "list" | "added" | "updated" | "deleted";
2915
+ };
2870
2916
 
2871
2917
  type HistoryVersion = {
2872
2918
  type: "historyVersion";
@@ -3275,6 +3321,29 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3275
3321
  * Sends a request for the current document from liveblocks server
3276
3322
  */
3277
3323
  fetchYDoc(stateVector: string, guid?: string, isV2?: boolean): void;
3324
+ /**
3325
+ * Fetches agent sessions for the room.
3326
+ */
3327
+ fetchAgentSessions(options?: {
3328
+ cursor?: string;
3329
+ since?: number;
3330
+ limit?: number;
3331
+ metadata?: Record<string, string>;
3332
+ }): Promise<{
3333
+ sessions: AgentSession[];
3334
+ nextCursor?: string;
3335
+ }>;
3336
+ /**
3337
+ * Fetches agent messages for a specific session.
3338
+ */
3339
+ fetchAgentMessages(sessionId: string, options?: {
3340
+ cursor?: string;
3341
+ since?: number;
3342
+ limit?: number;
3343
+ }): Promise<{
3344
+ messages: AgentMessage[];
3345
+ nextCursor?: string;
3346
+ }>;
3278
3347
  /**
3279
3348
  * Broadcasts an event to other users in the room. Event broadcasted to the room can be listened with {@link Room.subscribe}("event").
3280
3349
  * @param {any} event the event to broadcast. Should be serializable to JSON
@@ -3333,6 +3402,7 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3333
3402
  readonly storageStatus: Observable<StorageStatus>;
3334
3403
  readonly ydoc: Observable<YDocUpdateServerMsg | UpdateYDocClientMsg>;
3335
3404
  readonly comments: Observable<CommentsEventServerMsg>;
3405
+ readonly agentSessions: Observable<AgentSessionsServerMsg | AgentMessagesServerMsg>;
3336
3406
  /**
3337
3407
  * Called right before the room is destroyed. The event cannot be used to
3338
3408
  * prevent the room from being destroyed, only to be informed that this is
@@ -5111,6 +5181,34 @@ declare function warnOnce(message: string, key?: string): void;
5111
5181
  */
5112
5182
  declare function warnOnceIf(condition: boolean | (() => boolean), message: string, key?: string): void;
5113
5183
 
5184
+ /**
5185
+ * Generates operations to mutate an existing Live storage structure.
5186
+ *
5187
+ * This function attempts to merge mutation data into an existing Live structure,
5188
+ * preserving nested LiveObjects, LiveMaps, and LiveLists. For example, if you have
5189
+ * a LiveObject with a nested LiveObject (engine), and you pass a plain object
5190
+ * mutation, it will preserve the nested LiveObject structure and only update the
5191
+ * specified fields.
5192
+ *
5193
+ * @param nodes - The existing storage nodes as IdTuple<SerializedCrdt>[]
5194
+ * @param mutation - The mutation data (can be partial JSON or LSON)
5195
+ * @param actorId - Optional actor/connection ID to use for generating op IDs. Defaults to 1.
5196
+ * @returns Array of operations that can be applied to achieve the mutation
5197
+ *
5198
+ * @example
5199
+ * ```typescript
5200
+ * const nodes: IdTuple<SerializedCrdt>[] = [
5201
+ * ["0:0", { type: CrdtType.OBJECT, data: {} }],
5202
+ * ["0:1", { type: CrdtType.OBJECT, data: { displacement: 1 }, parentId: "0:0", parentKey: "engine" }]
5203
+ * ];
5204
+ *
5205
+ * const ops = generateOpsFromJson(nodes, {
5206
+ * engine: { displacement: 2 } // Preserves engine as LiveObject, only updates displacement
5207
+ * }, 42); // Use actor ID 42 for generated ops
5208
+ * ```
5209
+ */
5210
+ declare function generateOpsFromJson<S extends LsonObject>(nodes: IdTuple<SerializedCrdt>[], mutation: Partial<S> | Json, actorId?: number): Op[];
5211
+
5114
5212
  /**
5115
5213
  * Definition of all messages the Panel can send to the Client.
5116
5214
  */
@@ -5243,4 +5341,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
5243
5341
  [K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
5244
5342
  };
5245
5343
 
5246
- export { type AckOp, type ActivityData, type AiAssistantContentPart, type AiAssistantMessage, type AiChat, type AiChatMessage, type AiChatsQuery, type AiKnowledgeRetrievalPart, type AiKnowledgeSource, type AiOpaqueToolDefinition, type AiOpaqueToolInvocationProps, type AiReasoningPart, type AiRetrievalPart, type AiSourcesPart, type AiTextPart, type AiToolDefinition, type AiToolExecuteCallback, type AiToolExecuteContext, type AiToolInvocationPart, type AiToolInvocationProps, type AiToolTypePack, type AiUrlSource, type AiUserMessage, type AiWebRetrievalPart, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type Awaitable, type BaseActivitiesData, type BaseAuthResult, type BaseGroupInfo, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type ClientWireOp, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsEventServerMsg, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DGI, type DP, type DRI, type DS, type DTM, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, Deque, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type HasOpId, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IdTuple, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LargeMessageStrategy, type LayerKey, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MENTION_CHARACTER, type ManagedPool, type MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type RejectedStorageOpServerMsg, type Relax, type RenderableToolResultResponse, type Resolve, type ResolveGroupsInfoArgs, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomStateServerMsg, type RoomSubscriptionSettings, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type ServerWireOp, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageStateServerMsg, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type UrlMetadata, type User, type UserJoinServerMsg, type UserLeftServerMsg, type UserMentionData, type UserRoomSubscriptionSettings, type UserSubscriptionData, type UserSubscriptionDataPlain, WebsocketCloseCodes, type WithNavigation, type WithOptional, type WithRequired, type YDocUpdateServerMsg, type YjsSyncStatus, asPos, assert, assertNever, autoRetry, b64decode, batch, checkBounds, chunk, cloneLson, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToGroupData, convertToInboxNotificationData, convertToSubscriptionData, convertToThreadData, convertToUserSubscriptionData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createManagedPool, createNotificationSettings, createThreadId, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getMentionsFromCommentBody, getSubscriptionKey, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isNotificationChannelEnabled, isNumberOperator, isPlainObject, isStartsWithOperator, isUrl, kInternal, keys, legacy_patchImmutableObject, lsonToJson, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, objectToQuery, patchLiveObjectKey, patchNotificationSettings, raise, resolveMentionsInCommentBody, sanitizeUrl, shallow, shallow2, stableStringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, url, urljoin, wait, warnOnce, warnOnceIf, withTimeout };
5344
+ export { type AckOp, type ActivityData, type AgentMessage, type AgentMessagesServerMsg, type AgentSession, type AgentSessionsServerMsg, type AiAssistantContentPart, type AiAssistantMessage, type AiChat, type AiChatMessage, type AiChatsQuery, type AiKnowledgeRetrievalPart, type AiKnowledgeSource, type AiOpaqueToolDefinition, type AiOpaqueToolInvocationProps, type AiReasoningPart, type AiRetrievalPart, type AiSourcesPart, type AiTextPart, type AiToolDefinition, type AiToolExecuteCallback, type AiToolExecuteContext, type AiToolInvocationPart, type AiToolInvocationProps, type AiToolTypePack, type AiUrlSource, type AiUserMessage, type AiWebRetrievalPart, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type Awaitable, type BaseActivitiesData, type BaseAuthResult, type BaseGroupInfo, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type ClientWireOp, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsEventServerMsg, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DGI, type DP, type DRI, type DS, type DTM, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, Deque, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type HasOpId, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IdTuple, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LargeMessageStrategy, type LayerKey, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MENTION_CHARACTER, type ManagedPool, type MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type RejectedStorageOpServerMsg, type Relax, type RenderableToolResultResponse, type Resolve, type ResolveGroupsInfoArgs, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomStateServerMsg, type RoomSubscriptionSettings, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type ServerWireOp, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageStateServerMsg, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type UrlMetadata, type User, type UserJoinServerMsg, type UserLeftServerMsg, type UserMentionData, type UserRoomSubscriptionSettings, type UserSubscriptionData, type UserSubscriptionDataPlain, WebsocketCloseCodes, type WithNavigation, type WithOptional, type WithRequired, type YDocUpdateServerMsg, type YjsSyncStatus, asPos, assert, assertNever, autoRetry, b64decode, batch, checkBounds, chunk, cloneLson, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToGroupData, convertToInboxNotificationData, convertToSubscriptionData, convertToThreadData, convertToUserSubscriptionData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createManagedPool, createNotificationSettings, createThreadId, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateOpsFromJson, generateUrl, getMentionsFromCommentBody, getSubscriptionKey, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isNotificationChannelEnabled, isNumberOperator, isPlainObject, isStartsWithOperator, isUrl, kInternal, keys, legacy_patchImmutableObject, lsonToJson, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, objectToQuery, patchLiveObjectKey, patchNotificationSettings, raise, resolveMentionsInCommentBody, sanitizeUrl, shallow, shallow2, stableStringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, url, urljoin, wait, warnOnce, warnOnceIf, withTimeout };
package/dist/index.d.ts CHANGED
@@ -527,6 +527,8 @@ declare const ClientMsgCode: Readonly<{
527
527
  UPDATE_STORAGE: 201;
528
528
  FETCH_YDOC: 300;
529
529
  UPDATE_YDOC: 301;
530
+ FETCH_AGENT_SESSIONS: 500;
531
+ FETCH_AGENT_MESSAGES: 502;
530
532
  }>;
531
533
  declare namespace ClientMsgCode {
532
534
  type UPDATE_PRESENCE = typeof ClientMsgCode.UPDATE_PRESENCE;
@@ -535,11 +537,13 @@ declare namespace ClientMsgCode {
535
537
  type UPDATE_STORAGE = typeof ClientMsgCode.UPDATE_STORAGE;
536
538
  type FETCH_YDOC = typeof ClientMsgCode.FETCH_YDOC;
537
539
  type UPDATE_YDOC = typeof ClientMsgCode.UPDATE_YDOC;
540
+ type FETCH_AGENT_SESSIONS = typeof ClientMsgCode.FETCH_AGENT_SESSIONS;
541
+ type FETCH_AGENT_MESSAGES = typeof ClientMsgCode.FETCH_AGENT_MESSAGES;
538
542
  }
539
543
  /**
540
544
  * Messages that can be sent from the client to the server.
541
545
  */
542
- type ClientMsg<P extends JsonObject, E extends Json> = BroadcastEventClientMsg<E> | UpdatePresenceClientMsg<P> | UpdateStorageClientMsg | FetchStorageClientMsg | FetchYDocClientMsg | UpdateYDocClientMsg;
546
+ type ClientMsg<P extends JsonObject, E extends Json> = BroadcastEventClientMsg<E> | UpdatePresenceClientMsg<P> | UpdateStorageClientMsg | FetchStorageClientMsg | FetchYDocClientMsg | UpdateYDocClientMsg | FetchAgentSessionsClientMsg | FetchAgentMessagesClientMsg;
543
547
  type BroadcastEventClientMsg<E extends Json> = {
544
548
  type: ClientMsgCode.BROADCAST_EVENT;
545
549
  event: E;
@@ -589,6 +593,20 @@ type UpdateYDocClientMsg = {
589
593
  readonly guid?: string;
590
594
  readonly v2?: boolean;
591
595
  };
596
+ type FetchAgentSessionsClientMsg = {
597
+ readonly type: ClientMsgCode.FETCH_AGENT_SESSIONS;
598
+ readonly cursor?: string;
599
+ readonly since?: number;
600
+ readonly limit?: number;
601
+ readonly metadata?: Record<string, string>;
602
+ };
603
+ type FetchAgentMessagesClientMsg = {
604
+ readonly type: ClientMsgCode.FETCH_AGENT_MESSAGES;
605
+ readonly sessionId: string;
606
+ readonly cursor?: string;
607
+ readonly since?: number;
608
+ readonly limit?: number;
609
+ };
592
610
 
593
611
  /**
594
612
  * Represents an indefinitely deep arbitrary immutable data
@@ -2597,6 +2615,17 @@ type Delegates<T extends BaseAuthResult> = {
2597
2615
  canZombie: () => boolean;
2598
2616
  };
2599
2617
 
2618
+ type AgentSession = {
2619
+ sessionId: string;
2620
+ metadata: Json;
2621
+ timestamp: number;
2622
+ };
2623
+ type AgentMessage = {
2624
+ id: string;
2625
+ timestamp: number;
2626
+ data: Json;
2627
+ };
2628
+
2600
2629
  type ServerMsgCode = (typeof ServerMsgCode)[keyof typeof ServerMsgCode];
2601
2630
  declare const ServerMsgCode: Readonly<{
2602
2631
  UPDATE_PRESENCE: 100;
@@ -2617,6 +2646,8 @@ declare const ServerMsgCode: Readonly<{
2617
2646
  COMMENT_REACTION_ADDED: 405;
2618
2647
  COMMENT_REACTION_REMOVED: 406;
2619
2648
  COMMENT_METADATA_UPDATED: 409;
2649
+ AGENT_SESSIONS: 501;
2650
+ AGENT_MESSAGES: 503;
2620
2651
  REJECT_STORAGE_OP: 299;
2621
2652
  }>;
2622
2653
  declare namespace ServerMsgCode {
@@ -2637,13 +2668,15 @@ declare namespace ServerMsgCode {
2637
2668
  type COMMENT_DELETED = typeof ServerMsgCode.COMMENT_DELETED;
2638
2669
  type COMMENT_REACTION_ADDED = typeof ServerMsgCode.COMMENT_REACTION_ADDED;
2639
2670
  type COMMENT_REACTION_REMOVED = typeof ServerMsgCode.COMMENT_REACTION_REMOVED;
2671
+ type AGENT_SESSIONS = typeof ServerMsgCode.AGENT_SESSIONS;
2672
+ type AGENT_MESSAGES = typeof ServerMsgCode.AGENT_MESSAGES;
2640
2673
  type COMMENT_METADATA_UPDATED = typeof ServerMsgCode.COMMENT_METADATA_UPDATED;
2641
2674
  type REJECT_STORAGE_OP = typeof ServerMsgCode.REJECT_STORAGE_OP;
2642
2675
  }
2643
2676
  /**
2644
2677
  * Messages that can be sent from the server to the client.
2645
2678
  */
2646
- type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | StorageStateServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg;
2679
+ type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | StorageStateServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg | AgentSessionsServerMsg | AgentMessagesServerMsg;
2647
2680
  type CommentsEventServerMsg = ThreadCreatedEvent | ThreadDeletedEvent | ThreadMetadataUpdatedEvent | ThreadUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved | CommentMetadataUpdatedEvent;
2648
2681
  type ThreadCreatedEvent = {
2649
2682
  type: ServerMsgCode.THREAD_CREATED;
@@ -2867,6 +2900,19 @@ type RejectedStorageOpServerMsg = {
2867
2900
  readonly opIds: string[];
2868
2901
  readonly reason: string;
2869
2902
  };
2903
+ type AgentSessionsServerMsg = {
2904
+ readonly type: ServerMsgCode.AGENT_SESSIONS;
2905
+ readonly sessions: AgentSession[];
2906
+ readonly nextCursor?: string;
2907
+ readonly operation: "list" | "added" | "updated" | "deleted";
2908
+ };
2909
+ type AgentMessagesServerMsg = {
2910
+ readonly type: ServerMsgCode.AGENT_MESSAGES;
2911
+ readonly sessionId: string;
2912
+ readonly messages: AgentMessage[];
2913
+ readonly nextCursor?: string;
2914
+ readonly operation: "list" | "added" | "updated" | "deleted";
2915
+ };
2870
2916
 
2871
2917
  type HistoryVersion = {
2872
2918
  type: "historyVersion";
@@ -3275,6 +3321,29 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3275
3321
  * Sends a request for the current document from liveblocks server
3276
3322
  */
3277
3323
  fetchYDoc(stateVector: string, guid?: string, isV2?: boolean): void;
3324
+ /**
3325
+ * Fetches agent sessions for the room.
3326
+ */
3327
+ fetchAgentSessions(options?: {
3328
+ cursor?: string;
3329
+ since?: number;
3330
+ limit?: number;
3331
+ metadata?: Record<string, string>;
3332
+ }): Promise<{
3333
+ sessions: AgentSession[];
3334
+ nextCursor?: string;
3335
+ }>;
3336
+ /**
3337
+ * Fetches agent messages for a specific session.
3338
+ */
3339
+ fetchAgentMessages(sessionId: string, options?: {
3340
+ cursor?: string;
3341
+ since?: number;
3342
+ limit?: number;
3343
+ }): Promise<{
3344
+ messages: AgentMessage[];
3345
+ nextCursor?: string;
3346
+ }>;
3278
3347
  /**
3279
3348
  * Broadcasts an event to other users in the room. Event broadcasted to the room can be listened with {@link Room.subscribe}("event").
3280
3349
  * @param {any} event the event to broadcast. Should be serializable to JSON
@@ -3333,6 +3402,7 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3333
3402
  readonly storageStatus: Observable<StorageStatus>;
3334
3403
  readonly ydoc: Observable<YDocUpdateServerMsg | UpdateYDocClientMsg>;
3335
3404
  readonly comments: Observable<CommentsEventServerMsg>;
3405
+ readonly agentSessions: Observable<AgentSessionsServerMsg | AgentMessagesServerMsg>;
3336
3406
  /**
3337
3407
  * Called right before the room is destroyed. The event cannot be used to
3338
3408
  * prevent the room from being destroyed, only to be informed that this is
@@ -5111,6 +5181,34 @@ declare function warnOnce(message: string, key?: string): void;
5111
5181
  */
5112
5182
  declare function warnOnceIf(condition: boolean | (() => boolean), message: string, key?: string): void;
5113
5183
 
5184
+ /**
5185
+ * Generates operations to mutate an existing Live storage structure.
5186
+ *
5187
+ * This function attempts to merge mutation data into an existing Live structure,
5188
+ * preserving nested LiveObjects, LiveMaps, and LiveLists. For example, if you have
5189
+ * a LiveObject with a nested LiveObject (engine), and you pass a plain object
5190
+ * mutation, it will preserve the nested LiveObject structure and only update the
5191
+ * specified fields.
5192
+ *
5193
+ * @param nodes - The existing storage nodes as IdTuple<SerializedCrdt>[]
5194
+ * @param mutation - The mutation data (can be partial JSON or LSON)
5195
+ * @param actorId - Optional actor/connection ID to use for generating op IDs. Defaults to 1.
5196
+ * @returns Array of operations that can be applied to achieve the mutation
5197
+ *
5198
+ * @example
5199
+ * ```typescript
5200
+ * const nodes: IdTuple<SerializedCrdt>[] = [
5201
+ * ["0:0", { type: CrdtType.OBJECT, data: {} }],
5202
+ * ["0:1", { type: CrdtType.OBJECT, data: { displacement: 1 }, parentId: "0:0", parentKey: "engine" }]
5203
+ * ];
5204
+ *
5205
+ * const ops = generateOpsFromJson(nodes, {
5206
+ * engine: { displacement: 2 } // Preserves engine as LiveObject, only updates displacement
5207
+ * }, 42); // Use actor ID 42 for generated ops
5208
+ * ```
5209
+ */
5210
+ declare function generateOpsFromJson<S extends LsonObject>(nodes: IdTuple<SerializedCrdt>[], mutation: Partial<S> | Json, actorId?: number): Op[];
5211
+
5114
5212
  /**
5115
5213
  * Definition of all messages the Panel can send to the Client.
5116
5214
  */
@@ -5243,4 +5341,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
5243
5341
  [K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
5244
5342
  };
5245
5343
 
5246
- export { type AckOp, type ActivityData, type AiAssistantContentPart, type AiAssistantMessage, type AiChat, type AiChatMessage, type AiChatsQuery, type AiKnowledgeRetrievalPart, type AiKnowledgeSource, type AiOpaqueToolDefinition, type AiOpaqueToolInvocationProps, type AiReasoningPart, type AiRetrievalPart, type AiSourcesPart, type AiTextPart, type AiToolDefinition, type AiToolExecuteCallback, type AiToolExecuteContext, type AiToolInvocationPart, type AiToolInvocationProps, type AiToolTypePack, type AiUrlSource, type AiUserMessage, type AiWebRetrievalPart, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type Awaitable, type BaseActivitiesData, type BaseAuthResult, type BaseGroupInfo, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type ClientWireOp, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsEventServerMsg, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DGI, type DP, type DRI, type DS, type DTM, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, Deque, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type HasOpId, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IdTuple, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LargeMessageStrategy, type LayerKey, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MENTION_CHARACTER, type ManagedPool, type MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type RejectedStorageOpServerMsg, type Relax, type RenderableToolResultResponse, type Resolve, type ResolveGroupsInfoArgs, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomStateServerMsg, type RoomSubscriptionSettings, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type ServerWireOp, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageStateServerMsg, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type UrlMetadata, type User, type UserJoinServerMsg, type UserLeftServerMsg, type UserMentionData, type UserRoomSubscriptionSettings, type UserSubscriptionData, type UserSubscriptionDataPlain, WebsocketCloseCodes, type WithNavigation, type WithOptional, type WithRequired, type YDocUpdateServerMsg, type YjsSyncStatus, asPos, assert, assertNever, autoRetry, b64decode, batch, checkBounds, chunk, cloneLson, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToGroupData, convertToInboxNotificationData, convertToSubscriptionData, convertToThreadData, convertToUserSubscriptionData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createManagedPool, createNotificationSettings, createThreadId, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getMentionsFromCommentBody, getSubscriptionKey, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isNotificationChannelEnabled, isNumberOperator, isPlainObject, isStartsWithOperator, isUrl, kInternal, keys, legacy_patchImmutableObject, lsonToJson, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, objectToQuery, patchLiveObjectKey, patchNotificationSettings, raise, resolveMentionsInCommentBody, sanitizeUrl, shallow, shallow2, stableStringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, url, urljoin, wait, warnOnce, warnOnceIf, withTimeout };
5344
+ export { type AckOp, type ActivityData, type AgentMessage, type AgentMessagesServerMsg, type AgentSession, type AgentSessionsServerMsg, type AiAssistantContentPart, type AiAssistantMessage, type AiChat, type AiChatMessage, type AiChatsQuery, type AiKnowledgeRetrievalPart, type AiKnowledgeSource, type AiOpaqueToolDefinition, type AiOpaqueToolInvocationProps, type AiReasoningPart, type AiRetrievalPart, type AiSourcesPart, type AiTextPart, type AiToolDefinition, type AiToolExecuteCallback, type AiToolExecuteContext, type AiToolInvocationPart, type AiToolInvocationProps, type AiToolTypePack, type AiUrlSource, type AiUserMessage, type AiWebRetrievalPart, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type Awaitable, type BaseActivitiesData, type BaseAuthResult, type BaseGroupInfo, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type ClientWireOp, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsEventServerMsg, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DGI, type DP, type DRI, type DS, type DTM, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, Deque, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type HasOpId, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IdTuple, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LargeMessageStrategy, type LayerKey, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MENTION_CHARACTER, type ManagedPool, type MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type RejectedStorageOpServerMsg, type Relax, type RenderableToolResultResponse, type Resolve, type ResolveGroupsInfoArgs, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomStateServerMsg, type RoomSubscriptionSettings, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type ServerWireOp, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageStateServerMsg, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type UrlMetadata, type User, type UserJoinServerMsg, type UserLeftServerMsg, type UserMentionData, type UserRoomSubscriptionSettings, type UserSubscriptionData, type UserSubscriptionDataPlain, WebsocketCloseCodes, type WithNavigation, type WithOptional, type WithRequired, type YDocUpdateServerMsg, type YjsSyncStatus, asPos, assert, assertNever, autoRetry, b64decode, batch, checkBounds, chunk, cloneLson, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToGroupData, convertToInboxNotificationData, convertToSubscriptionData, convertToThreadData, convertToUserSubscriptionData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createManagedPool, createNotificationSettings, createThreadId, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateOpsFromJson, generateUrl, getMentionsFromCommentBody, getSubscriptionKey, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isNotificationChannelEnabled, isNumberOperator, isPlainObject, isStartsWithOperator, isUrl, kInternal, keys, legacy_patchImmutableObject, lsonToJson, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, objectToQuery, patchLiveObjectKey, patchNotificationSettings, raise, resolveMentionsInCommentBody, sanitizeUrl, shallow, shallow2, stableStringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, url, urljoin, wait, warnOnce, warnOnceIf, withTimeout };