@comfyorg/comfyui-desktop-bridge-types 0.6.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.
@@ -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` (browser consent the first
139
- * time) and resolves with the resulting state; every view follows. */
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,6 +172,13 @@ 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
183
  /** Opens a model provider access page in the hosted frontend's browser session.
173
184
  * Resolves `true` when the host has taken ownership of the request.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-desktop-bridge-types",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "TypeScript definitions for the Comfy Desktop hosted frontend bridge",
5
5
  "type": "module",
6
6
  "main": "./index.js",