@poolse/sdk 3.1.0 → 3.2.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -574,6 +574,25 @@ interface MessageDeletedEvent {
574
574
  conversation_id: Uuid;
575
575
  deleted_at: string | null;
576
576
  }
577
+ /**
578
+ * `message:stream` — an AI agent's reply as it's being written.
579
+ *
580
+ * * `started`: the agent began writing (carries `sender_external_id`).
581
+ * * `delta`: the next piece of text; append it.
582
+ * * `failed`: the agent couldn't answer; nothing will be posted.
583
+ *
584
+ * The finished reply arrives as a normal `message:new` whose `id`
585
+ * equals the stream's `id`, so swap the streaming bubble for it.
586
+ */
587
+ interface MessageStreamEvent {
588
+ id: Uuid;
589
+ conversation_id: Uuid;
590
+ sender_id: Uuid;
591
+ status: 'started' | 'delta' | 'failed';
592
+ sender_external_id?: string | null;
593
+ delta?: string;
594
+ error?: string;
595
+ }
577
596
  /** `typing:start` / `typing:stop`. */
578
597
  interface TypingEvent {
579
598
  /** Internal poolse user id. Most consumer code uses `external_id` instead. */
@@ -778,6 +797,8 @@ declare class ConversationChannel {
778
797
  onMessageUpdated(fn: (msg: MessageUpdatedEvent) => void): Unsubscribe$1;
779
798
  /** Tombstone for a soft-deleted message. */
780
799
  onMessageDeleted(fn: (evt: MessageDeletedEvent) => void): Unsubscribe$1;
800
+ /** An AI agent's reply as it's written (`message:stream`); see `MessageStreamEvent`. */
801
+ onMessageStream(fn: (evt: MessageStreamEvent) => void): Unsubscribe$1;
781
802
  onTypingStart(fn: (evt: TypingEvent) => void): Unsubscribe$1;
782
803
  onTypingStop(fn: (evt: TypingEvent) => void): Unsubscribe$1;
783
804
  onReactionAdded(fn: (evt: ReactionEvent) => void): Unsubscribe$1;
@@ -1838,7 +1859,7 @@ declare class AuthError extends ApiError {
1838
1859
  */
1839
1860
  type CallMedia = 'audio' | 'video';
1840
1861
 
1841
- declare const version = "3.1.0";
1862
+ declare const version = "3.2.0-dev.0";
1842
1863
 
1843
1864
  type CallLogMedia = 'audio' | 'video';
1844
1865
  /** What became of one person a call involved (the caller excluded). */
@@ -1950,4 +1971,4 @@ declare function formatCallLogPreview(preview: string | null | undefined, curren
1950
1971
 
1951
1972
  declare function safeUuid(): string;
1952
1973
 
1953
- export { type AddMemberOptions, ApiError, type Attachment, type AttachmentDownloadResponse, AttachmentHandle, type AttachmentOptions, type AttachmentProgressEvent, type AttachmentStatus, type AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsResource, AuthError, type CallConnection, type CallDevice, type CallDeviceKind, type CallEndReason, type CallFinishedEvent, type CallLog, type CallLogDisplay, type CallLogEntry, type CallLogMedia, type CallMedia, type CallMissedEntry, type CallParticipant, type CallParticipantStatus, type CallParticipantsEvent, CallRoom, type CallRoomOptions, type CallRoomStatus, type CallStartedEvent, CallTokensResource, type CameraFacing, type CheckedLiveKitModule, type Conversation, ConversationChannel, type ConversationCreateRequest, type ConversationCreatedEvent, ConversationHandle, type ConversationList, ConversationMessages, type ConversationType, type ConversationUpdateRequest, type ConversationUpdatedEvent, ConversationsResource, type Device, type DeviceEnvironment, type DeviceKind, type DevicePlatform, DevicesResource, type ErrorEnvelope, type IsoDateTime, type LiveCall, type LiveCallMember, LiveCallsResource, type LiveKitLocalVideoTrack, type LiveKitModule, type LiveKitParticipant, type LiveKitPublication, type LiveKitRoomHandle, type LiveKitTrack, type LiveKitTrackReference, type Me, MeResource, type MemberReadEvent, type MemberRole, type Membership, type MembershipCreateRequest, type MembershipList, type MentionEvent, type Message, type MessageCreateRequest, type MessageDeletedEvent, MessageHandle, type MessageList, type MessageNewEvent, type MessageType, type MessageUpdateRequest, type MessageUpdatedEvent, MessagesResource, NetworkError, POOLSE_API_URL, Poolse, type PoolseConfig, PoolseError, PoolseRealtime, type PoolseUserProfile, type PresenceSnapshot, type QuotedMessagePreview, RateLimitedError, type ReactionEvent, type ReactionRequest, type ReadReceiptsState, type ReadRequest, type RealtimeStatus, type RegisterDeviceRequest, type RingEndedEvent, type RoomSession, RoomsResource, type TypingEvent, type Unsubscribe$1 as Unsubscribe, type UpdateMeRequest, UserChannel, UsersResource, type Uuid, callLogDisplayFor, describeCallLog, formatCallDuration, formatCallLogPreview, isCallLogMessage, isMessageVisibleTo, parseCallLog, parseCallLogBody, safeUuid, version };
1974
+ export { type AddMemberOptions, ApiError, type Attachment, type AttachmentDownloadResponse, AttachmentHandle, type AttachmentOptions, type AttachmentProgressEvent, type AttachmentStatus, type AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsResource, AuthError, type CallConnection, type CallDevice, type CallDeviceKind, type CallEndReason, type CallFinishedEvent, type CallLog, type CallLogDisplay, type CallLogEntry, type CallLogMedia, type CallMedia, type CallMissedEntry, type CallParticipant, type CallParticipantStatus, type CallParticipantsEvent, CallRoom, type CallRoomOptions, type CallRoomStatus, type CallStartedEvent, CallTokensResource, type CameraFacing, type CheckedLiveKitModule, type Conversation, ConversationChannel, type ConversationCreateRequest, type ConversationCreatedEvent, ConversationHandle, type ConversationList, ConversationMessages, type ConversationType, type ConversationUpdateRequest, type ConversationUpdatedEvent, ConversationsResource, type Device, type DeviceEnvironment, type DeviceKind, type DevicePlatform, DevicesResource, type ErrorEnvelope, type IsoDateTime, type LiveCall, type LiveCallMember, LiveCallsResource, type LiveKitLocalVideoTrack, type LiveKitModule, type LiveKitParticipant, type LiveKitPublication, type LiveKitRoomHandle, type LiveKitTrack, type LiveKitTrackReference, type Me, MeResource, type MemberReadEvent, type MemberRole, type Membership, type MembershipCreateRequest, type MembershipList, type MentionEvent, type Message, type MessageCreateRequest, type MessageDeletedEvent, MessageHandle, type MessageList, type MessageNewEvent, type MessageStreamEvent, type MessageType, type MessageUpdateRequest, type MessageUpdatedEvent, MessagesResource, NetworkError, POOLSE_API_URL, Poolse, type PoolseConfig, PoolseError, PoolseRealtime, type PoolseUserProfile, type PresenceSnapshot, type QuotedMessagePreview, RateLimitedError, type ReactionEvent, type ReactionRequest, type ReadReceiptsState, type ReadRequest, type RealtimeStatus, type RegisterDeviceRequest, type RingEndedEvent, type RoomSession, RoomsResource, type TypingEvent, type Unsubscribe$1 as Unsubscribe, type UpdateMeRequest, UserChannel, UsersResource, type Uuid, callLogDisplayFor, describeCallLog, formatCallDuration, formatCallLogPreview, isCallLogMessage, isMessageVisibleTo, parseCallLog, parseCallLogBody, safeUuid, version };
package/dist/index.d.ts CHANGED
@@ -574,6 +574,25 @@ interface MessageDeletedEvent {
574
574
  conversation_id: Uuid;
575
575
  deleted_at: string | null;
576
576
  }
577
+ /**
578
+ * `message:stream` — an AI agent's reply as it's being written.
579
+ *
580
+ * * `started`: the agent began writing (carries `sender_external_id`).
581
+ * * `delta`: the next piece of text; append it.
582
+ * * `failed`: the agent couldn't answer; nothing will be posted.
583
+ *
584
+ * The finished reply arrives as a normal `message:new` whose `id`
585
+ * equals the stream's `id`, so swap the streaming bubble for it.
586
+ */
587
+ interface MessageStreamEvent {
588
+ id: Uuid;
589
+ conversation_id: Uuid;
590
+ sender_id: Uuid;
591
+ status: 'started' | 'delta' | 'failed';
592
+ sender_external_id?: string | null;
593
+ delta?: string;
594
+ error?: string;
595
+ }
577
596
  /** `typing:start` / `typing:stop`. */
578
597
  interface TypingEvent {
579
598
  /** Internal poolse user id. Most consumer code uses `external_id` instead. */
@@ -778,6 +797,8 @@ declare class ConversationChannel {
778
797
  onMessageUpdated(fn: (msg: MessageUpdatedEvent) => void): Unsubscribe$1;
779
798
  /** Tombstone for a soft-deleted message. */
780
799
  onMessageDeleted(fn: (evt: MessageDeletedEvent) => void): Unsubscribe$1;
800
+ /** An AI agent's reply as it's written (`message:stream`); see `MessageStreamEvent`. */
801
+ onMessageStream(fn: (evt: MessageStreamEvent) => void): Unsubscribe$1;
781
802
  onTypingStart(fn: (evt: TypingEvent) => void): Unsubscribe$1;
782
803
  onTypingStop(fn: (evt: TypingEvent) => void): Unsubscribe$1;
783
804
  onReactionAdded(fn: (evt: ReactionEvent) => void): Unsubscribe$1;
@@ -1838,7 +1859,7 @@ declare class AuthError extends ApiError {
1838
1859
  */
1839
1860
  type CallMedia = 'audio' | 'video';
1840
1861
 
1841
- declare const version = "3.1.0";
1862
+ declare const version = "3.2.0-dev.0";
1842
1863
 
1843
1864
  type CallLogMedia = 'audio' | 'video';
1844
1865
  /** What became of one person a call involved (the caller excluded). */
@@ -1950,4 +1971,4 @@ declare function formatCallLogPreview(preview: string | null | undefined, curren
1950
1971
 
1951
1972
  declare function safeUuid(): string;
1952
1973
 
1953
- export { type AddMemberOptions, ApiError, type Attachment, type AttachmentDownloadResponse, AttachmentHandle, type AttachmentOptions, type AttachmentProgressEvent, type AttachmentStatus, type AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsResource, AuthError, type CallConnection, type CallDevice, type CallDeviceKind, type CallEndReason, type CallFinishedEvent, type CallLog, type CallLogDisplay, type CallLogEntry, type CallLogMedia, type CallMedia, type CallMissedEntry, type CallParticipant, type CallParticipantStatus, type CallParticipantsEvent, CallRoom, type CallRoomOptions, type CallRoomStatus, type CallStartedEvent, CallTokensResource, type CameraFacing, type CheckedLiveKitModule, type Conversation, ConversationChannel, type ConversationCreateRequest, type ConversationCreatedEvent, ConversationHandle, type ConversationList, ConversationMessages, type ConversationType, type ConversationUpdateRequest, type ConversationUpdatedEvent, ConversationsResource, type Device, type DeviceEnvironment, type DeviceKind, type DevicePlatform, DevicesResource, type ErrorEnvelope, type IsoDateTime, type LiveCall, type LiveCallMember, LiveCallsResource, type LiveKitLocalVideoTrack, type LiveKitModule, type LiveKitParticipant, type LiveKitPublication, type LiveKitRoomHandle, type LiveKitTrack, type LiveKitTrackReference, type Me, MeResource, type MemberReadEvent, type MemberRole, type Membership, type MembershipCreateRequest, type MembershipList, type MentionEvent, type Message, type MessageCreateRequest, type MessageDeletedEvent, MessageHandle, type MessageList, type MessageNewEvent, type MessageType, type MessageUpdateRequest, type MessageUpdatedEvent, MessagesResource, NetworkError, POOLSE_API_URL, Poolse, type PoolseConfig, PoolseError, PoolseRealtime, type PoolseUserProfile, type PresenceSnapshot, type QuotedMessagePreview, RateLimitedError, type ReactionEvent, type ReactionRequest, type ReadReceiptsState, type ReadRequest, type RealtimeStatus, type RegisterDeviceRequest, type RingEndedEvent, type RoomSession, RoomsResource, type TypingEvent, type Unsubscribe$1 as Unsubscribe, type UpdateMeRequest, UserChannel, UsersResource, type Uuid, callLogDisplayFor, describeCallLog, formatCallDuration, formatCallLogPreview, isCallLogMessage, isMessageVisibleTo, parseCallLog, parseCallLogBody, safeUuid, version };
1974
+ export { type AddMemberOptions, ApiError, type Attachment, type AttachmentDownloadResponse, AttachmentHandle, type AttachmentOptions, type AttachmentProgressEvent, type AttachmentStatus, type AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsResource, AuthError, type CallConnection, type CallDevice, type CallDeviceKind, type CallEndReason, type CallFinishedEvent, type CallLog, type CallLogDisplay, type CallLogEntry, type CallLogMedia, type CallMedia, type CallMissedEntry, type CallParticipant, type CallParticipantStatus, type CallParticipantsEvent, CallRoom, type CallRoomOptions, type CallRoomStatus, type CallStartedEvent, CallTokensResource, type CameraFacing, type CheckedLiveKitModule, type Conversation, ConversationChannel, type ConversationCreateRequest, type ConversationCreatedEvent, ConversationHandle, type ConversationList, ConversationMessages, type ConversationType, type ConversationUpdateRequest, type ConversationUpdatedEvent, ConversationsResource, type Device, type DeviceEnvironment, type DeviceKind, type DevicePlatform, DevicesResource, type ErrorEnvelope, type IsoDateTime, type LiveCall, type LiveCallMember, LiveCallsResource, type LiveKitLocalVideoTrack, type LiveKitModule, type LiveKitParticipant, type LiveKitPublication, type LiveKitRoomHandle, type LiveKitTrack, type LiveKitTrackReference, type Me, MeResource, type MemberReadEvent, type MemberRole, type Membership, type MembershipCreateRequest, type MembershipList, type MentionEvent, type Message, type MessageCreateRequest, type MessageDeletedEvent, MessageHandle, type MessageList, type MessageNewEvent, type MessageStreamEvent, type MessageType, type MessageUpdateRequest, type MessageUpdatedEvent, MessagesResource, NetworkError, POOLSE_API_URL, Poolse, type PoolseConfig, PoolseError, PoolseRealtime, type PoolseUserProfile, type PresenceSnapshot, type QuotedMessagePreview, RateLimitedError, type ReactionEvent, type ReactionRequest, type ReadReceiptsState, type ReadRequest, type RealtimeStatus, type RegisterDeviceRequest, type RingEndedEvent, type RoomSession, RoomsResource, type TypingEvent, type Unsubscribe$1 as Unsubscribe, type UpdateMeRequest, UserChannel, UsersResource, type Uuid, callLogDisplayFor, describeCallLog, formatCallDuration, formatCallLogPreview, isCallLogMessage, isMessageVisibleTo, parseCallLog, parseCallLogBody, safeUuid, version };
package/dist/index.js CHANGED
@@ -329,6 +329,10 @@ var ConversationChannel = class {
329
329
  onMessageDeleted(fn) {
330
330
  return this.subscribe("message:deleted", fn);
331
331
  }
332
+ /** An AI agent's reply as it's written (`message:stream`); see `MessageStreamEvent`. */
333
+ onMessageStream(fn) {
334
+ return this.subscribe("message:stream", fn);
335
+ }
332
336
  onTypingStart(fn) {
333
337
  return this.subscribe("typing:start", fn);
334
338
  }
@@ -1980,7 +1984,7 @@ var Poolse = class {
1980
1984
  };
1981
1985
 
1982
1986
  // src/version.ts
1983
- var version = "3.1.0";
1987
+ var version = "3.2.0-dev.0";
1984
1988
 
1985
1989
  // src/call-log.ts
1986
1990
  function parseCallLogBody(body) {