lumiverse-spindle-types 0.5.17 → 0.5.18
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/package.json +1 -1
- package/src/api.ts +20 -0
- package/src/events.ts +1 -0
- package/src/index.ts +1 -0
- package/src/spindle-api.ts +3 -0
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -774,6 +774,26 @@ export interface ChatChangedPayloadDTO {
|
|
|
774
774
|
changedFields?: string[];
|
|
775
775
|
}
|
|
776
776
|
|
|
777
|
+
/**
|
|
778
|
+
* Payload for `CHAT_FORKED` events. Emitted when a chat is forked (branched)
|
|
779
|
+
* from a specific message — the messages up to and including the fork point are
|
|
780
|
+
* copied into a brand-new chat that shares the source chat's character.
|
|
781
|
+
*/
|
|
782
|
+
export interface ChatForkedPayloadDTO {
|
|
783
|
+
/** Id of the source chat that was forked. */
|
|
784
|
+
sourceChatId: string;
|
|
785
|
+
/** Id of the newly created forked chat. Equal to `chat.id`. */
|
|
786
|
+
forkedChatId: string;
|
|
787
|
+
/** The new forked chat row, including its `metadata` (carries `branched_from` and `branch_at_message`). */
|
|
788
|
+
chat: { id: string; [key: string]: unknown };
|
|
789
|
+
/** The `branch_id` assigned to every message copied into the forked chat. */
|
|
790
|
+
branchId: string;
|
|
791
|
+
/** Id of the message in the source chat the fork was taken at. Messages up to and including this one were copied into the forked chat. */
|
|
792
|
+
forkedAtMessageId: string;
|
|
793
|
+
/** Zero-based index of the fork-point message within the source chat. */
|
|
794
|
+
forkedAtMessageIndex: number;
|
|
795
|
+
}
|
|
796
|
+
|
|
777
797
|
// ─── User Preset DTOs ───────────────────────────────────────────────────
|
|
778
798
|
|
|
779
799
|
/** Option entry for `select` and `multiselect` prompt variables. */
|
package/src/events.ts
CHANGED
|
@@ -14,6 +14,7 @@ export enum CoreEventType {
|
|
|
14
14
|
CONNECTED = "CONNECTED",
|
|
15
15
|
CHAT_CHANGED = "CHAT_CHANGED",
|
|
16
16
|
CHAT_SWITCHED = "CHAT_SWITCHED",
|
|
17
|
+
CHAT_FORKED = "CHAT_FORKED",
|
|
17
18
|
MESSAGE_SENT = "MESSAGE_SENT",
|
|
18
19
|
MESSAGE_EDITED = "MESSAGE_EDITED",
|
|
19
20
|
MESSAGE_DELETED = "MESSAGE_DELETED",
|
package/src/index.ts
CHANGED
package/src/spindle-api.ts
CHANGED
|
@@ -85,6 +85,7 @@ import type {
|
|
|
85
85
|
BackendProcessLifecycleEventDTO,
|
|
86
86
|
BackendProcessStopOptionsDTO,
|
|
87
87
|
ChatChangedPayloadDTO,
|
|
88
|
+
ChatForkedPayloadDTO,
|
|
88
89
|
ChatMessageDTO,
|
|
89
90
|
GenerationStartedPayloadDTO,
|
|
90
91
|
StreamTokenPayloadDTO,
|
|
@@ -220,6 +221,8 @@ export interface SpindleAPI {
|
|
|
220
221
|
on(event: "GENERATION_STOPPED", handler: (payload: GenerationStoppedPayloadDTO, userId?: string) => void): () => void;
|
|
221
222
|
/** Subscribe to `CHAT_CHANGED` events. `changedFields` lists the dot-paths that differed when emitted by the standard `updateChat` path; absent on emits from other sources. */
|
|
222
223
|
on(event: "CHAT_CHANGED", handler: (payload: ChatChangedPayloadDTO, userId?: string) => void): () => void;
|
|
224
|
+
/** Subscribe to `CHAT_FORKED` events. Emitted when a chat is forked (branched) from a message into a new chat. The payload carries the source/forked chat ids, the full forked chat row, and the fork point. */
|
|
225
|
+
on(event: "CHAT_FORKED", handler: (payload: ChatForkedPayloadDTO, userId?: string) => void): () => void;
|
|
223
226
|
/**
|
|
224
227
|
* Subscribe to swipe lifecycle events. The payload's `action` discriminator
|
|
225
228
|
* tells you whether a swipe was added, updated, deleted, or navigated, and
|