@comfyorg/comfyui-desktop-bridge-types 0.5.0 → 0.6.1
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/comfyDesktopBridge.d.ts +13 -3
- package/package.json +1 -1
package/comfyDesktopBridge.d.ts
CHANGED
|
@@ -135,8 +135,12 @@ export interface ComfyDesktop2AuthBridge {
|
|
|
135
135
|
/** Signs Desktop out of its account (every view follows) and resolves with
|
|
136
136
|
* the resulting state; Desktop may keep the session if an install needs it. */
|
|
137
137
|
signOut(): Promise<ComfyDesktop2AuthState>
|
|
138
|
-
/** Re-scopes Desktop's session to `workspaceId`
|
|
139
|
-
*
|
|
138
|
+
/** Re-scopes Desktop's session to `workspaceId` and resolves with the resulting
|
|
139
|
+
* state; every view follows. A view that is not signed in gets its current
|
|
140
|
+
* state back. Otherwise the switch may open browser consent: it does not for
|
|
141
|
+
* the grant's own workspace or one Desktop holds an unexpired token for,
|
|
142
|
+
* unless the grant has ended, and a request for a workspace Desktop is already
|
|
143
|
+
* switching to shares that switch's result. */
|
|
140
144
|
switchWorkspace(workspaceId: string): Promise<ComfyDesktop2AuthState>
|
|
141
145
|
/** Fires when Desktop signs in, signs out or switches workspace. */
|
|
142
146
|
onChanged(callback: (state: ComfyDesktop2AuthState) => void): () => void
|
|
@@ -168,8 +172,14 @@ export interface ComfyDesktop2Bridge {
|
|
|
168
172
|
/** Reports whether the backend server is cloud/remote, not the user's location.
|
|
169
173
|
* Optional: desktop builds predating it are still in the wild. */
|
|
170
174
|
isRemote?(): boolean
|
|
175
|
+
/** Returns the per-installation id: a non-PII, stable-per-machine value
|
|
176
|
+
* (`SHA-256(machine_id + salt)`, see main/lib/deviceId). The hosted
|
|
177
|
+
* frontend sends it to cloud as the `X-Comfy-Install-Id` header so cloud
|
|
178
|
+
* can attribute requests to a Desktop install. Not an identity/secret.
|
|
179
|
+
* Undefined outside cloud-hosted pages or when the id is not
|
|
180
|
+
* machine-derived. Absent on Desktop builds predating it. */
|
|
181
|
+
getInstallId?(): string | undefined
|
|
171
182
|
openTerminal?: () => Promise<boolean>
|
|
172
|
-
openMcpSetup?: () => Promise<boolean>
|
|
173
183
|
/** Opens a model provider access page in the hosted frontend's browser session.
|
|
174
184
|
* Resolves `true` when the host has taken ownership of the request.
|
|
175
185
|
* On `false` or rejection the frontend falls back to opening a new tab. */
|