lumiverse-spindle-types 0.5.27 → 0.5.29

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,7 @@
1
1
  {
2
2
  "name": "lumiverse-spindle-types",
3
- "version": "0.5.27",
3
+
4
+ "version": "0.5.29",
4
5
  "types": "./src/index.ts",
5
6
  "keywords": [
6
7
  "lumiverse",
package/src/api.ts CHANGED
@@ -1353,6 +1353,23 @@ export interface PersonaUpdateDTO {
1353
1353
  metadata?: Record<string, unknown>;
1354
1354
  }
1355
1355
 
1356
+ export interface GlobalAddonDTO {
1357
+ id: string;
1358
+ label: string;
1359
+ content: string;
1360
+ sort_order: number;
1361
+ metadata: Record<string, unknown>;
1362
+ created_at: number;
1363
+ updated_at: number;
1364
+ }
1365
+
1366
+ export interface GlobalAddonUpdateDTO {
1367
+ label?: string;
1368
+ content?: string;
1369
+ sort_order?: number;
1370
+ metadata?: Record<string, unknown>;
1371
+ }
1372
+
1356
1373
  // ─── Activated World Info DTOs ─────────────────────────────────────────
1357
1374
 
1358
1375
  /**
@@ -2330,6 +2347,13 @@ export interface TokenCountResultDTO {
2330
2347
  approximate: boolean;
2331
2348
  }
2332
2349
 
2350
+ /** A completed resumable upload read back by `spindle.uploads.get`. */
2351
+ export interface SpindleUploadDTO {
2352
+ fileName: string;
2353
+ size: number;
2354
+ data: Uint8Array;
2355
+ }
2356
+
2333
2357
  /** Context delivered to an on-request shared RPC endpoint handler. */
2334
2358
  export interface SharedRpcRequestContextDTO {
2335
2359
  /** Fully-qualified endpoint name (for example `weather_ext.status.current`). */
@@ -2683,6 +2707,10 @@ export type WorkerToHost =
2683
2707
  | { type: "personas_delete"; requestId: string; personaId: string; userId?: string }
2684
2708
  | { type: "personas_switch"; requestId: string; personaId: string | null; userId?: string }
2685
2709
  | { type: "personas_get_world_book"; requestId: string; personaId: string; userId?: string }
2710
+ // ─── Global Add-ons (gated: "personas") ──────────────────────────
2711
+ | { type: "global_addons_list"; requestId: string; limit?: number; offset?: number; userId?: string }
2712
+ | { type: "global_addons_get"; requestId: string; addonId: string; userId?: string }
2713
+ | { type: "global_addons_update"; requestId: string; addonId: string; input: GlobalAddonUpdateDTO; userId?: string }
2686
2714
  // ─── Council (free tier, read-only) ──────────────────────────────
2687
2715
  | { type: "council_get_settings"; requestId: string; userId?: string }
2688
2716
  | { type: "council_get_members"; requestId: string; userId?: string }
package/src/index.ts CHANGED
@@ -94,6 +94,8 @@ export type {
94
94
  DatabankDocumentCreateDTO,
95
95
  DatabankDocumentUpdateDTO,
96
96
  PersonaDTO,
97
+ GlobalAddonDTO,
98
+ GlobalAddonUpdateDTO,
97
99
  LumiaItemDTO,
98
100
  PersonaCreateDTO,
99
101
  PersonaUpdateDTO,
@@ -158,6 +160,7 @@ export type {
158
160
  TokenModelSourceDTO,
159
161
  TokenCountOptionsDTO,
160
162
  TokenCountResultDTO,
163
+ SpindleUploadDTO,
161
164
  SharedRpcRequestContextDTO,
162
165
  SharedRpcEndpointPolicyDTO,
163
166
  MacroInterceptorPhase,
@@ -47,6 +47,8 @@ import type {
47
47
  DatabankDocumentCreateDTO,
48
48
  DatabankDocumentUpdateDTO,
49
49
  PersonaDTO,
50
+ GlobalAddonDTO,
51
+ GlobalAddonUpdateDTO,
50
52
  LumiaItemDTO,
51
53
  PersonaCreateDTO,
52
54
  PersonaUpdateDTO,
@@ -98,6 +100,7 @@ import type {
98
100
  StreamChunkDTO,
99
101
  TokenCountOptionsDTO,
100
102
  TokenCountResultDTO,
103
+ SpindleUploadDTO,
101
104
  MacroInterceptorCtxDTO,
102
105
  MacroInterceptorResultDTO,
103
106
  WorldInfoInterceptorCtxDTO,
@@ -717,6 +720,17 @@ export interface SpindleAPI {
717
720
  countChat(chatId: string, options?: TokenCountOptionsDTO): Promise<TokenCountResultDTO>;
718
721
  };
719
722
 
723
+ /**
724
+ * Resumable uploads (free tier). Consume a file the user streamed to the host
725
+ * tus endpoint (`/api/v1/spindle-uploads`), scoped to this extension + user.
726
+ */
727
+ uploads: {
728
+ /** Read a completed upload's bytes. Null if missing, expired, or not owned by this extension + user. */
729
+ get(uploadId: string, userId?: string): Promise<SpindleUploadDTO | null>;
730
+ /** Delete a staged upload once consumed. Returns false if it was already gone. */
731
+ delete(uploadId: string, userId?: string): Promise<boolean>;
732
+ };
733
+
720
734
  /**
721
735
  * Image generation (permission: "image_gen").
722
736
  * Generate images via the user's configured image gen connection profiles.
@@ -1163,6 +1177,12 @@ export interface SpindleAPI {
1163
1177
  getWorldBook(personaId: string, userId?: string): Promise<WorldBookDTO | null>;
1164
1178
  };
1165
1179
 
1180
+ global_addons: {
1181
+ list(options?: { limit?: number; offset?: number; userId?: string }): Promise<{ data: GlobalAddonDTO[]; total: number }>;
1182
+ get(addonId: string, userId?: string): Promise<GlobalAddonDTO | null>;
1183
+ update(addonId: string, input: GlobalAddonUpdateDTO, userId?: string): Promise<GlobalAddonDTO>;
1184
+ };
1185
+
1166
1186
  permissions: {
1167
1187
  getGranted(): Promise<string[]>;
1168
1188
  /**