lumiverse-spindle-types 0.4.17 → 0.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumiverse-spindle-types",
3
- "version": "0.4.17",
3
+ "version": "0.4.18",
4
4
  "types": "./src/index.ts",
5
5
  "keywords": [
6
6
  "lumiverse",
package/src/api.ts CHANGED
@@ -169,7 +169,8 @@ export interface ImageGenResultDTO {
169
169
 
170
170
  /**
171
171
  * Safe representation of a character exposed to extensions.
172
- * Omits raw extensions blob — only exposes user-facing fields.
172
+ * Omits the raw `extensions` blob — only exposes user-facing fields plus
173
+ * a small allowlist of structured extension state (e.g. `world_book_ids`).
173
174
  */
174
175
  export interface CharacterDTO {
175
176
  id: string;
@@ -186,6 +187,11 @@ export interface CharacterDTO {
186
187
  alternate_greetings: string[];
187
188
  creator: string;
188
189
  image_id: string | null;
190
+ /**
191
+ * IDs of world books attached directly to this character. The legacy
192
+ * single-id form is auto-migrated, so consumers can rely on the array.
193
+ */
194
+ world_book_ids: string[];
189
195
  created_at: number;
190
196
  updated_at: number;
191
197
  }
@@ -203,6 +209,8 @@ export interface CharacterCreateDTO {
203
209
  tags?: string[];
204
210
  alternate_greetings?: string[];
205
211
  creator?: string;
212
+ /** Optional initial world book attachments. */
213
+ world_book_ids?: string[];
206
214
  }
207
215
 
208
216
  export interface CharacterUpdateDTO {
@@ -218,6 +226,11 @@ export interface CharacterUpdateDTO {
218
226
  tags?: string[];
219
227
  alternate_greetings?: string[];
220
228
  creator?: string;
229
+ /**
230
+ * Replace the character's world book attachments. Pass an empty array to
231
+ * detach all books. Omit the field to leave attachments unchanged.
232
+ */
233
+ world_book_ids?: string[];
221
234
  }
222
235
 
223
236
  // ─── Chat DTOs ──────────────────────────────────────────────────────────
@@ -991,6 +1004,26 @@ export type WorkerToHost =
991
1004
  chatId: string;
992
1005
  messageId: string;
993
1006
  }
1007
+ | {
1008
+ type: "chat_set_message_hidden";
1009
+ requestId: string;
1010
+ chatId: string;
1011
+ messageId: string;
1012
+ hidden: boolean;
1013
+ }
1014
+ | {
1015
+ type: "chat_set_messages_hidden";
1016
+ requestId: string;
1017
+ chatId: string;
1018
+ messageIds: string[];
1019
+ hidden: boolean;
1020
+ }
1021
+ | {
1022
+ type: "chat_is_message_hidden";
1023
+ requestId: string;
1024
+ chatId: string;
1025
+ messageId: string;
1026
+ }
994
1027
  | {
995
1028
  type: "events_track";
996
1029
  requestId: string;
@@ -252,6 +252,27 @@ export interface SpindleAPI {
252
252
  }
253
253
  ): Promise<void>;
254
254
  deleteMessage(chatId: string, messageId: string): Promise<void>;
255
+ /**
256
+ * Mark a single message as hidden or visible. Hidden messages are
257
+ * excluded from chat memory embeddings (vector retrieval) but, in the
258
+ * current build, are still included in chat history during prompt
259
+ * assembly. See `chat-mutation.md` for the full semantics.
260
+ *
261
+ * Requires the `chat_mutation` permission.
262
+ */
263
+ setMessageHidden(chatId: string, messageId: string, hidden: boolean): Promise<void>;
264
+ /**
265
+ * Bulk variant of {@link setMessageHidden}. Capped at 500 message IDs
266
+ * per call (matching the underlying service limit).
267
+ *
268
+ * Requires the `chat_mutation` permission.
269
+ */
270
+ setMessagesHidden(chatId: string, messageIds: string[], hidden: boolean): Promise<void>;
271
+ /**
272
+ * Read the hidden flag for a single message. Returns `false` for messages
273
+ * that have never had the flag set. Requires the `chat_mutation` permission.
274
+ */
275
+ isMessageHidden(chatId: string, messageId: string): Promise<boolean>;
255
276
  };
256
277
 
257
278
  /** Extension-level telemetry */