lumiverse-spindle-types 0.4.38 → 0.4.40

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.38",
3
+ "version": "0.4.40",
4
4
  "types": "./src/index.ts",
5
5
  "keywords": [
6
6
  "lumiverse",
package/src/api.ts CHANGED
@@ -373,8 +373,8 @@ export interface ImageGenResultDTO {
373
373
 
374
374
  /**
375
375
  * Safe representation of a character exposed to extensions.
376
- * Omits the raw `extensions` blob only exposes user-facing fields plus
377
- * a small allowlist of structured extension state (e.g. `world_book_ids`).
376
+ * Includes the full `extensions` blob so extensions can read and write
377
+ * their own namespaced keys alongside the allowlisted `world_book_ids`.
378
378
  */
379
379
  export interface CharacterDTO {
380
380
  id: string;
@@ -396,6 +396,8 @@ export interface CharacterDTO {
396
396
  * single-id form is auto-migrated, so consumers can rely on the array.
397
397
  */
398
398
  world_book_ids: string[];
399
+ /** The raw extensions object. Extensions should namespace their keys. */
400
+ extensions: Record<string, any>;
399
401
  created_at: number;
400
402
  updated_at: number;
401
403
  }
@@ -415,6 +417,8 @@ export interface CharacterCreateDTO {
415
417
  creator?: string;
416
418
  /** Optional initial world book attachments. */
417
419
  world_book_ids?: string[];
420
+ /** Optional initial extension data. */
421
+ extensions?: Record<string, any>;
418
422
  }
419
423
 
420
424
  export interface CharacterUpdateDTO {
@@ -435,6 +439,12 @@ export interface CharacterUpdateDTO {
435
439
  * detach all books. Omit the field to leave attachments unchanged.
436
440
  */
437
441
  world_book_ids?: string[];
442
+ /**
443
+ * Shallow-merged into the character's existing extensions.
444
+ * Extension-provided keys overwrite existing ones; omitting a key leaves it
445
+ * untouched. Pass an empty object to make no changes, or omit entirely.
446
+ */
447
+ extensions?: Record<string, any>;
438
448
  }
439
449
 
440
450
  export interface CharacterAvatarUploadDTO {
@@ -575,6 +585,22 @@ export type WorldBookEntryUpdateDTO = WorldBookEntryCreateDTO;
575
585
  * Safe representation of a persona exposed to extensions.
576
586
  * Omits avatar_path (internal filesystem path) — use image_id for avatar access.
577
587
  */
588
+ export interface LumiaItemDTO {
589
+ id: string;
590
+ pack_id: string;
591
+ name: string;
592
+ avatar_url: string | null;
593
+ author_name: string;
594
+ definition: string;
595
+ personality: string;
596
+ behavior: string;
597
+ gender_identity: 0 | 1 | 2 | 3; // 0=feminine, 1=masculine, 2=neutral, 3=any
598
+ version: string;
599
+ sort_order: number;
600
+ created_at: number;
601
+ updated_at: number;
602
+ }
603
+
578
604
  export interface PersonaDTO {
579
605
  id: string;
580
606
  name: string;
@@ -1512,6 +1538,10 @@ export type WorkerToHost =
1512
1538
  | { type: "personas_delete"; requestId: string; personaId: string; userId?: string }
1513
1539
  | { type: "personas_switch"; requestId: string; personaId: string | null; userId?: string }
1514
1540
  | { type: "personas_get_world_book"; requestId: string; personaId: string; userId?: string }
1541
+ // ─── Council (free tier, read-only) ──────────────────────────────
1542
+ | { type: "council_get_settings"; requestId: string; userId?: string }
1543
+ | { type: "council_get_members"; requestId: string; userId?: string }
1544
+ | { type: "council_get_available_lumia_items"; requestId: string; userId?: string }
1515
1545
  // ─── Activated World Info (gated: "world_books") ───────────────────
1516
1546
  | { type: "world_books_get_activated"; requestId: string; chatId: string; userId?: string }
1517
1547
  // ─── Dry Run (gated: "generation") ────────────────────────────────
package/src/index.ts CHANGED
@@ -42,6 +42,7 @@ export type {
42
42
  WorldBookEntryCreateDTO,
43
43
  WorldBookEntryUpdateDTO,
44
44
  PersonaDTO,
45
+ LumiaItemDTO,
45
46
  PersonaCreateDTO,
46
47
  PersonaUpdateDTO,
47
48
  ActivatedWorldInfoEntryDTO,
@@ -1,4 +1,8 @@
1
1
  import type { SpindleManifest } from "./manifest";
2
+ import type {
3
+ CouncilMemberContext,
4
+ CouncilSettings,
5
+ } from "./council";
2
6
  import type {
3
7
  LlmMessageDTO,
4
8
  InterceptorResultDTO,
@@ -24,6 +28,7 @@ import type {
24
28
  WorldBookEntryCreateDTO,
25
29
  WorldBookEntryUpdateDTO,
26
30
  PersonaDTO,
31
+ LumiaItemDTO,
27
32
  PersonaCreateDTO,
28
33
  PersonaUpdateDTO,
29
34
  ActivatedWorldInfoEntryDTO,
@@ -631,6 +636,15 @@ export interface SpindleAPI {
631
636
  * For user-scoped extensions, userId is inferred from the extension owner.
632
637
  * For operator-scoped extensions, pass userId to scope to a specific user.
633
638
  */
639
+ council: {
640
+ /** Get the user's active council configuration (settings and members) */
641
+ getSettings(options?: { userId?: string }): Promise<CouncilSettings>;
642
+ /** Retrieve the current list of council members set up by the user with their full definitions */
643
+ getMembers(options?: { userId?: string }): Promise<CouncilMemberContext[]>;
644
+ /** Retrieve all Lumia items generally available to the user (e.g. from packs) */
645
+ getAvailableLumiaItems(options?: { userId?: string }): Promise<LumiaItemDTO[]>;
646
+ };
647
+
634
648
  personas: {
635
649
  list(options?: { limit?: number; offset?: number; userId?: string }): Promise<{ data: PersonaDTO[]; total: number }>;
636
650
  get(personaId: string, userId?: string): Promise<PersonaDTO | null>;