lumiverse-spindle-types 0.1.0 → 0.1.2

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.1.0",
3
+ "version": "0.1.2",
4
4
  "types": "./src/index.ts",
5
5
  "keywords": [
6
6
  "lumiverse",
package/src/api.ts CHANGED
@@ -245,6 +245,7 @@ export type WorkerToHost =
245
245
  error?: string;
246
246
  }
247
247
  | { type: "tool_invocation_result"; requestId: string; result?: string; error?: string }
248
+ | { type: "create_oauth_state"; requestId: string }
248
249
  | { type: "log"; level: "info" | "warn" | "error"; message: string };
249
250
 
250
251
  // ─── Host → Worker messages ──────────────────────────────────────────────
package/src/dom.ts CHANGED
@@ -182,6 +182,10 @@ export interface SpindleFrontendContext {
182
182
  };
183
183
  permissions: {
184
184
  getGranted(): Promise<string[]>;
185
+ /** Request that the given permissions be granted. Returns the updated granted list.
186
+ * Privileged permissions (e.g. cors_proxy) require admin/owner approval.
187
+ * The extension may be restarted after permissions are applied. */
188
+ request(permissions: string[]): Promise<string[]>;
185
189
  };
186
190
  sendToBackend(payload: unknown): void;
187
191
  onBackendMessage(handler: (payload: unknown) => void): () => void;
@@ -265,6 +265,8 @@ export interface SpindleAPI {
265
265
  onCallback(handler: (params: Record<string, string>) => Promise<{ html?: string } | void>): () => void;
266
266
  /** Get the relative callback URL path for this extension */
267
267
  getCallbackUrl(): string;
268
+ /** Create a platform-managed OAuth state nonce for CSRF protection */
269
+ createState(): Promise<string>;
268
270
  };
269
271
 
270
272
  /** This extension's manifest */