lumiverse-spindle-types 0.4.64 → 0.4.66

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.64",
3
+ "version": "0.4.66",
4
4
  "types": "./src/index.ts",
5
5
  "keywords": [
6
6
  "lumiverse",
package/src/api.ts CHANGED
@@ -255,6 +255,26 @@ export interface GenerationRequestDTO {
255
255
  signal?: AbortSignal;
256
256
  }
257
257
 
258
+ /** Options passed to chat generation when `spindle.chat.appendMessage()` starts a normal reply. */
259
+ export interface ChatAppendGenerationOptionsDTO {
260
+ connection_id?: string;
261
+ persona_id?: string;
262
+ persona_addon_states?: Record<string, boolean>;
263
+ preset_id?: string;
264
+ force_preset_id?: boolean;
265
+ parameters?: Record<string, unknown>;
266
+ target_character_id?: string;
267
+ retain_council?: boolean;
268
+ }
269
+
270
+ /** Optional third argument for `spindle.chat.appendMessage()`. */
271
+ export type ChatAppendMessageOptionsDTO =
272
+ | boolean
273
+ | {
274
+ triggerGeneration?: boolean;
275
+ generation?: ChatAppendGenerationOptionsDTO;
276
+ };
277
+
258
278
  /**
259
279
  * Streamed chunk yielded by `spindle.generate.rawStream()` and
260
280
  * `spindle.generate.quietStream()`.
@@ -1884,6 +1904,7 @@ export type WorkerToHost =
1884
1904
  content: string;
1885
1905
  metadata?: Record<string, unknown>;
1886
1906
  };
1907
+ options?: ChatAppendMessageOptionsDTO;
1887
1908
  }
1888
1909
  | {
1889
1910
  type: "chat_update_message";
package/src/index.ts CHANGED
@@ -24,6 +24,8 @@ export type {
24
24
  ToolSchemaDTO,
25
25
  ToolCallDTO,
26
26
  GenerationRequestDTO,
27
+ ChatAppendGenerationOptionsDTO,
28
+ ChatAppendMessageOptionsDTO,
27
29
  StreamChunkDTO,
28
30
  RequestInitDTO,
29
31
  ConnectionProfileDTO,
@@ -11,6 +11,7 @@ import type {
11
11
  MacroResolveResultDTO,
12
12
  ToolRegistrationDTO,
13
13
  GenerationRequestDTO,
14
+ ChatAppendMessageOptionsDTO,
14
15
  RequestInitDTO,
15
16
  ConnectionProfileDTO,
16
17
  PermissionDeniedDetail,
@@ -472,8 +473,9 @@ export interface SpindleAPI {
472
473
  role: "system" | "user" | "assistant";
473
474
  content: string;
474
475
  metadata?: Record<string, unknown>;
475
- }
476
- ): Promise<{ id: string }>;
476
+ },
477
+ options?: ChatAppendMessageOptionsDTO
478
+ ): Promise<{ id: string; generationId?: string }>;
477
479
  /**
478
480
  * Patch an existing message. All fields are optional; `undefined` leaves
479
481
  * the field untouched. Precedence rules: