lumiverse-spindle-types 0.4.66 → 0.4.68
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 +7 -1
- package/src/index.ts +1 -0
- package/src/spindle-api.ts +10 -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) ────────────────────────────────────────────
|
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,
|
|
@@ -1185,11 +1186,7 @@ export interface SpindleAPI {
|
|
|
1185
1186
|
): Promise<MacroResolveResultDTO>;
|
|
1186
1187
|
};
|
|
1187
1188
|
|
|
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
|
-
*/
|
|
1189
|
+
/** User context queries (free tier — no permission needed). */
|
|
1193
1190
|
users: {
|
|
1194
1191
|
/**
|
|
1195
1192
|
* Returns true if the user has the app visible in at least one session.
|
|
@@ -1199,6 +1196,14 @@ export interface SpindleAPI {
|
|
|
1199
1196
|
* For operator-scoped extensions, pass userId explicitly.
|
|
1200
1197
|
*/
|
|
1201
1198
|
isVisible(userId?: string): Promise<boolean>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Return the user's Lumiverse role as exposed to extensions.
|
|
1201
|
+
* Internal owners are reported as `operator`; admins remain `admin`;
|
|
1202
|
+
* everyone else is `user`.
|
|
1203
|
+
* For user-scoped extensions, userId is inferred from the extension owner.
|
|
1204
|
+
* For operator-scoped extensions, pass userId explicitly.
|
|
1205
|
+
*/
|
|
1206
|
+
getRole(userId?: string): Promise<SpindleUserRoleDTO>;
|
|
1202
1207
|
};
|
|
1203
1208
|
|
|
1204
1209
|
/** Show toast notifications in the frontend UI (free tier — no permission needed) */
|