@poolse/sdk 3.1.0 → 3.2.0-dev.1
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 +15 -0
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -2
- package/dist/index.d.ts +25 -2
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -574,6 +574,27 @@ 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
|
+
* * `tool`: the agent is running one of its tools (`tool` is its name).
|
|
583
|
+
* * `failed`: the agent couldn't answer; nothing will be posted.
|
|
584
|
+
*
|
|
585
|
+
* The finished reply arrives as a normal `message:new` whose `id`
|
|
586
|
+
* equals the stream's `id`, so swap the streaming bubble for it.
|
|
587
|
+
*/
|
|
588
|
+
interface MessageStreamEvent {
|
|
589
|
+
id: Uuid;
|
|
590
|
+
conversation_id: Uuid;
|
|
591
|
+
sender_id: Uuid;
|
|
592
|
+
status: 'started' | 'delta' | 'tool' | 'failed';
|
|
593
|
+
sender_external_id?: string | null;
|
|
594
|
+
delta?: string;
|
|
595
|
+
tool?: string;
|
|
596
|
+
error?: string;
|
|
597
|
+
}
|
|
577
598
|
/** `typing:start` / `typing:stop`. */
|
|
578
599
|
interface TypingEvent {
|
|
579
600
|
/** Internal poolse user id. Most consumer code uses `external_id` instead. */
|
|
@@ -778,6 +799,8 @@ declare class ConversationChannel {
|
|
|
778
799
|
onMessageUpdated(fn: (msg: MessageUpdatedEvent) => void): Unsubscribe$1;
|
|
779
800
|
/** Tombstone for a soft-deleted message. */
|
|
780
801
|
onMessageDeleted(fn: (evt: MessageDeletedEvent) => void): Unsubscribe$1;
|
|
802
|
+
/** An AI agent's reply as it's written (`message:stream`); see `MessageStreamEvent`. */
|
|
803
|
+
onMessageStream(fn: (evt: MessageStreamEvent) => void): Unsubscribe$1;
|
|
781
804
|
onTypingStart(fn: (evt: TypingEvent) => void): Unsubscribe$1;
|
|
782
805
|
onTypingStop(fn: (evt: TypingEvent) => void): Unsubscribe$1;
|
|
783
806
|
onReactionAdded(fn: (evt: ReactionEvent) => void): Unsubscribe$1;
|
|
@@ -1838,7 +1861,7 @@ declare class AuthError extends ApiError {
|
|
|
1838
1861
|
*/
|
|
1839
1862
|
type CallMedia = 'audio' | 'video';
|
|
1840
1863
|
|
|
1841
|
-
declare const version = "3.
|
|
1864
|
+
declare const version = "3.2.0-dev.1";
|
|
1842
1865
|
|
|
1843
1866
|
type CallLogMedia = 'audio' | 'video';
|
|
1844
1867
|
/** What became of one person a call involved (the caller excluded). */
|
|
@@ -1950,4 +1973,4 @@ declare function formatCallLogPreview(preview: string | null | undefined, curren
|
|
|
1950
1973
|
|
|
1951
1974
|
declare function safeUuid(): string;
|
|
1952
1975
|
|
|
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 };
|
|
1976
|
+
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,27 @@ 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
|
+
* * `tool`: the agent is running one of its tools (`tool` is its name).
|
|
583
|
+
* * `failed`: the agent couldn't answer; nothing will be posted.
|
|
584
|
+
*
|
|
585
|
+
* The finished reply arrives as a normal `message:new` whose `id`
|
|
586
|
+
* equals the stream's `id`, so swap the streaming bubble for it.
|
|
587
|
+
*/
|
|
588
|
+
interface MessageStreamEvent {
|
|
589
|
+
id: Uuid;
|
|
590
|
+
conversation_id: Uuid;
|
|
591
|
+
sender_id: Uuid;
|
|
592
|
+
status: 'started' | 'delta' | 'tool' | 'failed';
|
|
593
|
+
sender_external_id?: string | null;
|
|
594
|
+
delta?: string;
|
|
595
|
+
tool?: string;
|
|
596
|
+
error?: string;
|
|
597
|
+
}
|
|
577
598
|
/** `typing:start` / `typing:stop`. */
|
|
578
599
|
interface TypingEvent {
|
|
579
600
|
/** Internal poolse user id. Most consumer code uses `external_id` instead. */
|
|
@@ -778,6 +799,8 @@ declare class ConversationChannel {
|
|
|
778
799
|
onMessageUpdated(fn: (msg: MessageUpdatedEvent) => void): Unsubscribe$1;
|
|
779
800
|
/** Tombstone for a soft-deleted message. */
|
|
780
801
|
onMessageDeleted(fn: (evt: MessageDeletedEvent) => void): Unsubscribe$1;
|
|
802
|
+
/** An AI agent's reply as it's written (`message:stream`); see `MessageStreamEvent`. */
|
|
803
|
+
onMessageStream(fn: (evt: MessageStreamEvent) => void): Unsubscribe$1;
|
|
781
804
|
onTypingStart(fn: (evt: TypingEvent) => void): Unsubscribe$1;
|
|
782
805
|
onTypingStop(fn: (evt: TypingEvent) => void): Unsubscribe$1;
|
|
783
806
|
onReactionAdded(fn: (evt: ReactionEvent) => void): Unsubscribe$1;
|
|
@@ -1838,7 +1861,7 @@ declare class AuthError extends ApiError {
|
|
|
1838
1861
|
*/
|
|
1839
1862
|
type CallMedia = 'audio' | 'video';
|
|
1840
1863
|
|
|
1841
|
-
declare const version = "3.
|
|
1864
|
+
declare const version = "3.2.0-dev.1";
|
|
1842
1865
|
|
|
1843
1866
|
type CallLogMedia = 'audio' | 'video';
|
|
1844
1867
|
/** What became of one person a call involved (the caller excluded). */
|
|
@@ -1950,4 +1973,4 @@ declare function formatCallLogPreview(preview: string | null | undefined, curren
|
|
|
1950
1973
|
|
|
1951
1974
|
declare function safeUuid(): string;
|
|
1952
1975
|
|
|
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 };
|
|
1976
|
+
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.
|
|
1987
|
+
var version = "3.2.0-dev.1";
|
|
1984
1988
|
|
|
1985
1989
|
// src/call-log.ts
|
|
1986
1990
|
function parseCallLogBody(body) {
|