lumiverse-spindle-types 0.4.39 → 0.4.41
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/dom.ts +9 -0
- package/src/index.ts +1 -0
- package/src/spindle-api.ts +14 -0
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -585,6 +585,22 @@ export type WorldBookEntryUpdateDTO = WorldBookEntryCreateDTO;
|
|
|
585
585
|
* Safe representation of a persona exposed to extensions.
|
|
586
586
|
* Omits avatar_path (internal filesystem path) — use image_id for avatar access.
|
|
587
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
|
+
|
|
588
604
|
export interface PersonaDTO {
|
|
589
605
|
id: string;
|
|
590
606
|
name: string;
|
|
@@ -1522,6 +1538,10 @@ export type WorkerToHost =
|
|
|
1522
1538
|
| { type: "personas_delete"; requestId: string; personaId: string; userId?: string }
|
|
1523
1539
|
| { type: "personas_switch"; requestId: string; personaId: string | null; userId?: string }
|
|
1524
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 }
|
|
1525
1545
|
// ─── Activated World Info (gated: "world_books") ───────────────────
|
|
1526
1546
|
| { type: "world_books_get_activated"; requestId: string; chatId: string; userId?: string }
|
|
1527
1547
|
// ─── Dry Run (gated: "generation") ────────────────────────────────
|
package/src/dom.ts
CHANGED
|
@@ -77,6 +77,9 @@ export interface SpindleFloatWidgetOptions {
|
|
|
77
77
|
/** Strip default container chrome (border, background, shadow, border-radius).
|
|
78
78
|
* The extension fully owns the visual presentation. */
|
|
79
79
|
chromeless?: boolean;
|
|
80
|
+
/** When true, the widget is created in fullscreen mode anchored to the
|
|
81
|
+
* viewport origin (0,0) and sized to fill the entire viewport. */
|
|
82
|
+
fullscreen?: boolean;
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
export interface SpindleFloatWidgetHandle {
|
|
@@ -86,6 +89,12 @@ export interface SpindleFloatWidgetHandle {
|
|
|
86
89
|
getPosition(): { x: number; y: number };
|
|
87
90
|
setVisible(visible: boolean): void;
|
|
88
91
|
isVisible(): boolean;
|
|
92
|
+
/** Toggle fullscreen mode. When enabled the host resizes the widget to
|
|
93
|
+
* fill the viewport and anchors it at (0,0). Disabling restores the
|
|
94
|
+
* previous size and position. */
|
|
95
|
+
setFullscreen(fullscreen: boolean): void;
|
|
96
|
+
/** Returns true when the widget is currently in fullscreen mode. */
|
|
97
|
+
isFullscreen(): boolean;
|
|
89
98
|
destroy(): void;
|
|
90
99
|
onDragEnd(handler: (pos: { x: number; y: number }) => void): () => void;
|
|
91
100
|
}
|
package/src/index.ts
CHANGED
package/src/spindle-api.ts
CHANGED
|
@@ -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>;
|