lumiverse-spindle-types 0.6.68 → 0.6.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/dist/api.d.ts CHANGED
@@ -2875,6 +2875,12 @@ export interface SpindleCommandDTO {
2875
2875
  * so the extension can act on the right chat/character/page.
2876
2876
  */
2877
2877
  export interface SpindleCommandContextDTO {
2878
+ /** Present for an owner-configured desktop binding; no raw keyboard input is exposed. Informational, not an authorization token. */
2879
+ trigger?: {
2880
+ type: "keybind";
2881
+ bindingId: string;
2882
+ scope: "focused" | "global";
2883
+ };
2878
2884
  /** Current route path (e.g. `"/chat/abc-123"`, `"/"`, `"/characters/xyz"`). */
2879
2885
  route: string;
2880
2886
  /** Active chat ID, if the user is in a chat view. */
@@ -3501,7 +3507,7 @@ export interface ProviderManager {
3501
3507
  key: ProviderKeyDTO;
3502
3508
  }) => void): () => void;
3503
3509
  }
3504
- export type WorkerToHost = import("./decisions.js").DecisionWorkerMessage | import("./embeddings.js").EmbeddingsWorkerMessage | import("./file-transfers.js").FileTransferWorkerMessage | import("./desktop-capture.js").DesktopCaptureWorkerMessage | {
3510
+ export type WorkerToHost = import("./live-activities.js").LiveActivityWorkerMessage | import("./decisions.js").DecisionWorkerMessage | import("./embeddings.js").EmbeddingsWorkerMessage | import("./file-transfers.js").FileTransferWorkerMessage | import("./desktop-capture.js").DesktopCaptureWorkerMessage | {
3505
3511
  type: "subscribe_event";
3506
3512
  event: string;
3507
3513
  } | {
@@ -650,6 +650,17 @@ export interface SpindleHostSurfaceHandle {
650
650
  on(event: string, handler: SpindleHostSurfaceEventHandler): () => void;
651
651
  }
652
652
  export interface SpindleComponentsHelper {
653
+ /** Embed a user-configured desktop binding editor for one of this extension's
654
+ * registered commands. Feature-detect this optional method. It stays inside
655
+ * the supplied extension-owned panel/settings root; it never opens Settings.
656
+ * Global bindings use the same one-time native owner opt-in as host Settings. */
657
+ mountKeybindingEditor?(target: SpindleComponentTarget, options: {
658
+ commandId: string;
659
+ }): {
660
+ readonly componentId: string;
661
+ readonly element: HTMLElement;
662
+ destroy(): void;
663
+ };
653
664
  mountTextInput(target: SpindleComponentTarget, options?: SpindleTextInputOptions): SpindleTextInputHandle;
654
665
  mountTextArea(target: SpindleComponentTarget, options?: SpindleTextAreaOptions): SpindleTextAreaHandle;
655
666
  mountNumericInput(target: SpindleComponentTarget, options?: SpindleNumericInputOptions): SpindleNumericInputHandle;
@@ -1,6 +1,9 @@
1
1
  export type DesktopCaptureKind = "image" | "video";
2
2
  export interface DesktopCaptureDevice {
3
3
  id: string;
4
+ /** Stable across reconnects for this native installation, instance and account. Older clients omit this. */
5
+ stableIdentity?: boolean;
6
+ approvalStatusSupported?: boolean;
4
7
  name: string;
5
8
  platform: "linux" | "macos" | "windows";
6
9
  capabilities: {
@@ -10,6 +13,19 @@ export interface DesktopCaptureDevice {
10
13
  };
11
14
  expiresAt: number;
12
15
  }
16
+ export interface DesktopCaptureApprovalQuery {
17
+ deviceId: string;
18
+ connectionId: string;
19
+ kind: DesktopCaptureKind;
20
+ userId?: string;
21
+ }
22
+ export interface DesktopCaptureApprovalStatus {
23
+ deviceId: string;
24
+ kind: DesktopCaptureKind;
25
+ approval: "required" | "remembered" | "paused" | "unavailable" | "unknown";
26
+ source: "ready" | "missing" | "permission_required" | "unknown";
27
+ checkedAt: number;
28
+ }
13
29
  export type DesktopCaptureRequest = {
14
30
  deviceId: string;
15
31
  connectionId: string;
@@ -37,6 +53,8 @@ export interface SpindleDesktopAPI {
37
53
  listDevices(options?: {
38
54
  userId?: string;
39
55
  }): Promise<DesktopCaptureDevice[]>;
56
+ /** Read-only advisory status for this extension, capture kind and exact destination. Never grants access. */
57
+ getApprovalStatus(input: DesktopCaptureApprovalQuery): Promise<DesktopCaptureApprovalStatus>;
40
58
  request(input: DesktopCaptureRequest): Promise<CapturedMediaRef>;
41
59
  release(assetId: string, options?: {
42
60
  userId?: string;
@@ -47,6 +65,10 @@ export type DesktopCaptureWorkerMessage = {
47
65
  type: "desktop_capture_devices";
48
66
  requestId: string;
49
67
  userId?: string;
68
+ } | {
69
+ type: "desktop_capture_approval_status";
70
+ requestId: string;
71
+ input: DesktopCaptureApprovalQuery;
50
72
  } | {
51
73
  type: "desktop_capture_request";
52
74
  requestId: string;
@@ -65,18 +87,31 @@ export interface DesktopCaptureDestination {
65
87
  endpointOrigin: string;
66
88
  }
67
89
  export type DesktopCaptureCommand = {
90
+ type: "approval_status";
91
+ requestId: string;
92
+ extension: {
93
+ id: string;
94
+ identifier: string;
95
+ name: string;
96
+ approvalRevision?: string;
97
+ };
98
+ kind: DesktopCaptureKind;
99
+ destination: DesktopCaptureDestination;
100
+ expiresAt: number;
101
+ } | {
68
102
  type: "capture";
69
103
  requestId: string;
70
104
  extension: {
71
105
  id: string;
72
106
  identifier: string;
73
107
  name: string;
108
+ approvalRevision?: string;
74
109
  };
75
110
  purpose: string;
76
111
  kind: DesktopCaptureKind;
77
112
  mode?: "record" | "replay";
78
113
  durationSeconds?: number;
79
- destination: Omit<DesktopCaptureDestination, "revision">;
114
+ destination: DesktopCaptureDestination;
80
115
  maxBytes: number;
81
116
  maxPixels: number;
82
117
  expiresAt: number;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export type { LiveActivityPresentation, LiveActivityStartInput, LiveActivityResult, LiveActivityStatus, SpindleLiveActivitiesAPI, LiveActivityWorkerMessage } from "./live-activities.js";
1
2
  export type { DecisionImageAsset, DecisionBox, DecisionJsonValue, DecisionDescription, DecisionState, DecisionQuestion, DecisionAnswer, DecisionAnswerFor, DecisionAnswers, DecisionResult, DecisionEvaluationInput, DecisionConnectionProfileDTO, DecisionModelDTO, DecisionProviderDTO, SpindleDecisionsAPI, DecisionWorkerMessage } from "./decisions.js";
2
3
  export type { EmbeddingConnectionDTO, EmbeddingsEmbedInput, EmbeddingsEmbedResult, SpindleEmbeddingsAPI, EmbeddingsWorkerMessage } from "./embeddings.js";
3
4
  export type { SpindleManifest, SpindlePermission, SpindleCapability, } from "./manifest.js";
@@ -13,7 +14,7 @@ export { SPINDLE_HOST_CAPABILITIES, SPINDLE_COMPATIBILITY_ERROR_CODE, } from "./
13
14
  export type { SpindleThemeAsset, SpindleThemeAssetUploadOptions, SpindleThemeAssetUpdate, SpindleThemePackComponentDraft, SpindleThemePackDraft, SpindleThemePackImportResult, SpindleThemePackInstallOptions, SpindleThemePackInstallResult, SpindleThemeComponentCatalogEntry, SpindleThemeVariableCatalogEntry, SpindleThemeEditorTarget, SpindleThemeEditorOptions, SpindleThemeAuthoringAPI, } from "./theme.js";
14
15
  export { SPINDLE_THEME_AUTHORING_HOST_CAPABILITIES } from "./theme.js";
15
16
  export type { SpindlePermission as SpindlePermissionType } from "./permissions.js";
16
- export type { DesktopCaptureKind, DesktopCaptureDevice, DesktopCaptureRequest, CapturedMediaRef, SpindleDesktopAPI, DesktopCaptureWorkerMessage, DesktopCaptureDestination, DesktopCaptureCommand, DesktopCaptureReply, } from "./desktop-capture.js";
17
+ export type { DesktopCaptureKind, DesktopCaptureDevice, DesktopCaptureRequest, CapturedMediaRef, DesktopCaptureApprovalQuery, DesktopCaptureApprovalStatus, SpindleDesktopAPI, DesktopCaptureWorkerMessage, DesktopCaptureDestination, DesktopCaptureCommand, DesktopCaptureReply, } from "./desktop-capture.js";
17
18
  export { ALL_PERMISSIONS, isValidPermission } from "./permissions.js";
18
19
  export type { SpindleCapability as SpindleCapabilityType } from "./capabilities.js";
19
20
  export { ALL_CAPABILITIES, isValidCapability } from "./capabilities.js";
@@ -0,0 +1,54 @@
1
+ /** Native iOS Live Activities (permission: `push_notification`). */
2
+ export type LiveActivityPresentation = {
3
+ title: string;
4
+ body?: string;
5
+ /** SF Symbol name. Defaults to a symbol appropriate for the layout. */
6
+ symbol?: string;
7
+ } & ({
8
+ layout: "status";
9
+ progress?: never;
10
+ imageId?: never;
11
+ } | {
12
+ layout: "progress";
13
+ progress: number;
14
+ imageId?: never;
15
+ } | {
16
+ layout: "image";
17
+ imageId: string;
18
+ progress?: never;
19
+ });
20
+ export type LiveActivityStartInput = LiveActivityPresentation & {
21
+ /** Idempotency key within this extension and user. */
22
+ key: string;
23
+ /** Active lifetime in seconds, 60–28,800; defaults to one hour. */
24
+ durationSeconds?: number;
25
+ };
26
+ export interface LiveActivityResult {
27
+ id: string;
28
+ revision: number;
29
+ state: "queued" | "active" | "ended";
30
+ }
31
+ export interface LiveActivityStatus {
32
+ available: boolean;
33
+ layouts: readonly ["status", "progress", "image"];
34
+ /** This initial protocol requires a foreground native app to start. */
35
+ remoteStart: false;
36
+ enrolledDevices: number;
37
+ }
38
+ export interface SpindleLiveActivitiesAPI {
39
+ getStatus(userId?: string): Promise<LiveActivityStatus>;
40
+ /** Queues creation until an enrolled iOS app is open with Live Activities enabled. */
41
+ start(input: LiveActivityStartInput, userId?: string): Promise<LiveActivityResult>;
42
+ /** Replaces the complete presentation. Background updates use ActivityKit APNs. */
43
+ update(id: string, presentation: LiveActivityPresentation, userId?: string): Promise<LiveActivityResult>;
44
+ /** Ends the activity, retaining its latest presentation briefly on the Lock Screen. */
45
+ end(id: string, userId?: string): Promise<LiveActivityResult>;
46
+ }
47
+ export type LiveActivityWorkerMessage = {
48
+ type: "live_activity";
49
+ requestId: string;
50
+ operation: "status" | "start" | "update" | "end";
51
+ id?: string;
52
+ input?: LiveActivityStartInput | LiveActivityPresentation;
53
+ userId?: string;
54
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1642,6 +1642,8 @@ export interface SpindleAPI {
1642
1642
  * Send OS-level push notifications to users and check push status.
1643
1643
  * Notifications are attributed to your extension name.
1644
1644
  */
1645
+ /** Three built-in native iOS layouts (permission: push_notification). */
1646
+ liveActivities: import("./live-activities.js").SpindleLiveActivitiesAPI;
1645
1647
  push: {
1646
1648
  /**
1647
1649
  * Send a push notification to a user's registered devices.
@@ -2236,7 +2238,8 @@ export interface SpindleAPI {
2236
2238
  unregister(commandIds?: string[]): void;
2237
2239
  /**
2238
2240
  * Register a handler called when the user selects one of this
2239
- * extension's commands from the palette. The handler receives
2241
+ * extension's commands from the palette or a configured desktop key binding. For bindings,
2242
+ * `context.trigger` identifies the binding and focused/global scope. The handler receives
2240
2243
  * the command ID and a snapshot of the frontend's current state.
2241
2244
  * Returns an unsubscribe function.
2242
2245
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumiverse-spindle-types",
3
- "version": "0.6.68",
3
+ "version": "0.6.69",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "keywords": [