lumiverse-spindle-types 0.5.24 → 0.5.26

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.5.24",
3
+ "version": "0.5.26",
4
4
  "types": "./src/index.ts",
5
5
  "keywords": [
6
6
  "lumiverse",
package/src/api.ts CHANGED
@@ -2944,6 +2944,8 @@ export type HostToWorker =
2944
2944
  }
2945
2945
  | {
2946
2946
  type: "permission_changed";
2947
+ /** Extension identifier for the worker receiving this scoped change */
2948
+ extensionId?: string;
2947
2949
  permission: string;
2948
2950
  granted: boolean;
2949
2951
  allGranted: string[];
package/src/dom.ts CHANGED
@@ -810,6 +810,17 @@ export interface SpindleFrontendContext {
810
810
  * ```
811
811
  */
812
812
  getActiveChat(): { chatId: string | null; characterId: string | null };
813
+ /**
814
+ * Signal that the frontend is ready to receive any startup messages that
815
+ * were queued while the bundle was loading.
816
+ */
817
+ ready(): void;
818
+ /**
819
+ * Opt out of legacy auto-ready behavior. Call during setup() before it
820
+ * returns if initialization continues asynchronously and startup messages
821
+ * should remain queued until a later `ready()` call.
822
+ */
823
+ deferReady(): void;
813
824
  sendToBackend(payload: unknown): void;
814
825
  onBackendMessage(handler: (payload: unknown) => void): () => void;
815
826
  /** Structured lifecycle hooks for backend-spawned frontend processes. */
@@ -224,6 +224,12 @@ export interface SpindlePromptRegex {
224
224
 
225
225
  /** The global `spindle` object available in backend extension workers */
226
226
  export interface SpindleAPI {
227
+ /**
228
+ * Subscribe to permission grant/revoke changes for this extension only.
229
+ * This is delivered directly by the worker host and does not subscribe to
230
+ * the global backend event bus.
231
+ */
232
+ on(event: "PERMISSION_CHANGED", handler: (payload: PermissionChangedDetail) => void): () => void;
227
233
  /** Subscribe to generation-started events (requires `generation` permission). The optional `userId` identifies which user triggered the event. */
228
234
  on(event: "GENERATION_STARTED", handler: (payload: GenerationStartedPayloadDTO, userId?: string) => void): () => void;
229
235
  /** Subscribe to streamed token events (requires `generation` permission). The optional `userId` identifies which user triggered the event. */