lumiverse-spindle-types 0.4.68 → 0.4.70

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumiverse-spindle-types",
3
- "version": "0.4.68",
3
+ "version": "0.4.70",
4
4
  "types": "./src/index.ts",
5
5
  "keywords": [
6
6
  "lumiverse",
package/src/api.ts CHANGED
@@ -1606,9 +1606,8 @@ export interface GenerationStoppedPayloadDTO {
1606
1606
  * Wire shape of a chat message as delivered in WebSocket event payloads
1607
1607
  * (e.g. `MESSAGE_SENT`, `MESSAGE_EDITED`, `MESSAGE_SWIPED`).
1608
1608
  *
1609
- * This is the raw backend message shape and is distinct from the normalized
1610
- * `{ id, role, content, ... }` object returned by `spindle.chat.getMessages()`,
1611
- * which collapses `is_user`/`name` into a `role` discriminator.
1609
+ * `spindle.chat.getMessages()` returns this backend shape plus normalized
1610
+ * convenience fields such as `role` and `metadata`.
1612
1611
  */
1613
1612
  export interface ChatMessageDTO {
1614
1613
  id: string;
@@ -2197,6 +2196,13 @@ export type WorkerToHost =
2197
2196
  userId?: string;
2198
2197
  }
2199
2198
  | { type: "images_upload"; requestId: string; input: ImageUploadDTO; userId?: string }
2199
+ | {
2200
+ type: "images_upload_many";
2201
+ requestId: string;
2202
+ items: ImageUploadDTO[];
2203
+ userId?: string;
2204
+ concurrency?: number;
2205
+ }
2200
2206
  | {
2201
2207
  type: "images_upload_from_data_url";
2202
2208
  requestId: string;
@@ -76,6 +76,7 @@ import type {
76
76
  BackendProcessLifecycleEventDTO,
77
77
  BackendProcessStopOptionsDTO,
78
78
  ChatChangedPayloadDTO,
79
+ ChatMessageDTO,
79
80
  GenerationStartedPayloadDTO,
80
81
  StreamTokenPayloadDTO,
81
82
  GenerationEndedPayloadDTO,
@@ -447,26 +448,17 @@ export interface SpindleAPI {
447
448
 
448
449
  /** Chat mutation helpers */
449
450
  chat: {
450
- getMessages(chatId: string): Promise<Array<{
451
- id: string;
451
+ getMessages(chatId: string): Promise<Array<ChatMessageDTO & {
452
+ /** Normalized role derived from `is_user` and Spindle system-message metadata. */
452
453
  role: "system" | "user" | "assistant";
453
- content: string;
454
454
  /**
455
455
  * The free-form `extra` bag minus `spindle_metadata` (which is surfaced
456
456
  * separately on `metadata`). Carries reasoning text/duration, attachments,
457
457
  * and any host-owned housekeeping fields.
458
458
  */
459
459
  extra: Record<string, unknown>;
460
+ /** Spindle-owned metadata split out from `extra.spindle_metadata`. */
460
461
  metadata?: Record<string, unknown>;
461
- /** Index of the active swipe in `swipes`. `0` when the message has no alternates. */
462
- swipe_id: number;
463
- /**
464
- * All swipe variants for this message, including the currently active one.
465
- * `swipes[swipe_id]` always equals `content`.
466
- */
467
- swipes: string[];
468
- /** Per-swipe creation timestamps (unix epoch seconds), aligned with `swipes`. */
469
- swipe_dates: number[];
470
462
  }>>;
471
463
  appendMessage(
472
464
  chatId: string,
@@ -665,6 +657,10 @@ export interface SpindleAPI {
665
657
  get(imageId: string, userId?: string): Promise<ImageDTO | null>;
666
658
  get(imageId: string, options?: ImageGetOptionsDTO): Promise<ImageDTO | null>;
667
659
  upload(input: ImageUploadDTO, userId?: string): Promise<ImageDTO>;
660
+ uploadMany(
661
+ items: ImageUploadDTO[],
662
+ options?: { userId?: string; concurrency?: number },
663
+ ): Promise<Array<{ id?: string; error?: string }>>;
668
664
  uploadFromDataUrl(dataUrl: string, originalFilename?: string, userId?: string): Promise<ImageDTO>;
669
665
  uploadFromDataUrl(dataUrl: string, options?: ImageUploadFromDataUrlOptionsDTO): Promise<ImageDTO>;
670
666
  delete(imageId: string, userId?: string): Promise<boolean>;