lumiverse-spindle-types 0.4.66 → 0.4.69
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 +14 -1
- package/src/index.ts +1 -0
- package/src/spindle-api.ts +14 -5
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -9,6 +9,8 @@ export interface LlmMessageDTO {
|
|
|
9
9
|
name?: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
export type SpindleUserRoleDTO = "operator" | "admin" | "user";
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* Optional metadata returned by an interceptor so Lumiverse can surface
|
|
14
16
|
* extension-injected prompt messages as first-class items in Prompt Breakdown.
|
|
@@ -257,9 +259,12 @@ export interface GenerationRequestDTO {
|
|
|
257
259
|
|
|
258
260
|
/** Options passed to chat generation when `spindle.chat.appendMessage()` starts a normal reply. */
|
|
259
261
|
export interface ChatAppendGenerationOptionsDTO {
|
|
262
|
+
/** Omit to use the user's default connection profile. */
|
|
260
263
|
connection_id?: string;
|
|
264
|
+
/** Omit to use the user's active persona setting. */
|
|
261
265
|
persona_id?: string;
|
|
262
266
|
persona_addon_states?: Record<string, boolean>;
|
|
267
|
+
/** Omit to use the user's active Loom preset; if unset, the connection preset is used. */
|
|
263
268
|
preset_id?: string;
|
|
264
269
|
force_preset_id?: boolean;
|
|
265
270
|
parameters?: Record<string, unknown>;
|
|
@@ -2139,8 +2144,9 @@ export type WorkerToHost =
|
|
|
2139
2144
|
// ─── Push Notifications (gated: "push_notification") ────────────────
|
|
2140
2145
|
| { type: "push_send"; requestId: string; title: string; body: string; tag?: string; url?: string; userId?: string; icon?: string; rawTitle?: boolean; image?: string }
|
|
2141
2146
|
| { type: "push_get_status"; requestId: string; userId?: string }
|
|
2142
|
-
// ─── User
|
|
2147
|
+
// ─── User Context (free tier) ──────────────────────────────────────
|
|
2143
2148
|
| { type: "user_is_visible"; requestId: string; userId?: string }
|
|
2149
|
+
| { type: "user_get_role"; requestId: string; userId?: string }
|
|
2144
2150
|
// ─── Text Editor (free tier) ───────────────────────────────────────
|
|
2145
2151
|
| { type: "text_editor_open"; requestId: string; title?: string; value?: string; placeholder?: string; userId?: string }
|
|
2146
2152
|
// ─── Modal (free tier) ────────────────────────────────────────────
|
|
@@ -2191,6 +2197,13 @@ export type WorkerToHost =
|
|
|
2191
2197
|
userId?: string;
|
|
2192
2198
|
}
|
|
2193
2199
|
| { type: "images_upload"; requestId: string; input: ImageUploadDTO; userId?: string }
|
|
2200
|
+
| {
|
|
2201
|
+
type: "images_upload_many";
|
|
2202
|
+
requestId: string;
|
|
2203
|
+
items: ImageUploadDTO[];
|
|
2204
|
+
userId?: string;
|
|
2205
|
+
concurrency?: number;
|
|
2206
|
+
}
|
|
2194
2207
|
| {
|
|
2195
2208
|
type: "images_upload_from_data_url";
|
|
2196
2209
|
requestId: string;
|
package/src/index.ts
CHANGED
package/src/spindle-api.ts
CHANGED
|
@@ -61,6 +61,7 @@ import type {
|
|
|
61
61
|
ThemePaletteConfigDTO,
|
|
62
62
|
ThemeVariablesConfigDTO,
|
|
63
63
|
ColorExtractionResult,
|
|
64
|
+
SpindleUserRoleDTO,
|
|
64
65
|
SpindleModalItemDTO,
|
|
65
66
|
SpindleCommandDTO,
|
|
66
67
|
SpindleCommandContextDTO,
|
|
@@ -664,6 +665,10 @@ export interface SpindleAPI {
|
|
|
664
665
|
get(imageId: string, userId?: string): Promise<ImageDTO | null>;
|
|
665
666
|
get(imageId: string, options?: ImageGetOptionsDTO): Promise<ImageDTO | null>;
|
|
666
667
|
upload(input: ImageUploadDTO, userId?: string): Promise<ImageDTO>;
|
|
668
|
+
uploadMany(
|
|
669
|
+
items: ImageUploadDTO[],
|
|
670
|
+
options?: { userId?: string; concurrency?: number },
|
|
671
|
+
): Promise<Array<{ id?: string; error?: string }>>;
|
|
667
672
|
uploadFromDataUrl(dataUrl: string, originalFilename?: string, userId?: string): Promise<ImageDTO>;
|
|
668
673
|
uploadFromDataUrl(dataUrl: string, options?: ImageUploadFromDataUrlOptionsDTO): Promise<ImageDTO>;
|
|
669
674
|
delete(imageId: string, userId?: string): Promise<boolean>;
|
|
@@ -1185,11 +1190,7 @@ export interface SpindleAPI {
|
|
|
1185
1190
|
): Promise<MacroResolveResultDTO>;
|
|
1186
1191
|
};
|
|
1187
1192
|
|
|
1188
|
-
/**
|
|
1189
|
-
* User presence queries (free tier — no permission needed).
|
|
1190
|
-
* Check whether a user currently has the Lumiverse app visible/focused
|
|
1191
|
-
* in at least one browser tab or PWA window.
|
|
1192
|
-
*/
|
|
1193
|
+
/** User context queries (free tier — no permission needed). */
|
|
1193
1194
|
users: {
|
|
1194
1195
|
/**
|
|
1195
1196
|
* Returns true if the user has the app visible in at least one session.
|
|
@@ -1199,6 +1200,14 @@ export interface SpindleAPI {
|
|
|
1199
1200
|
* For operator-scoped extensions, pass userId explicitly.
|
|
1200
1201
|
*/
|
|
1201
1202
|
isVisible(userId?: string): Promise<boolean>;
|
|
1203
|
+
/**
|
|
1204
|
+
* Return the user's Lumiverse role as exposed to extensions.
|
|
1205
|
+
* Internal owners are reported as `operator`; admins remain `admin`;
|
|
1206
|
+
* everyone else is `user`.
|
|
1207
|
+
* For user-scoped extensions, userId is inferred from the extension owner.
|
|
1208
|
+
* For operator-scoped extensions, pass userId explicitly.
|
|
1209
|
+
*/
|
|
1210
|
+
getRole(userId?: string): Promise<SpindleUserRoleDTO>;
|
|
1202
1211
|
};
|
|
1203
1212
|
|
|
1204
1213
|
/** Show toast notifications in the frontend UI (free tier — no permission needed) */
|