@comfyorg/comfyui-desktop-bridge-types 0.6.0 → 0.7.0
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 +17 -2
- package/package.json +1 -1
package/comfyDesktopBridge.d.ts
CHANGED
|
@@ -130,13 +130,21 @@ export interface ComfyDesktop2AuthBridge {
|
|
|
130
130
|
* is scoped to; null when signed out, disabled, or the scope is missing,
|
|
131
131
|
* malformed or different. The refresh token never leaves Desktop. */
|
|
132
132
|
getWorkspaceToken(workspaceId: string): Promise<string | null>
|
|
133
|
+
/** The partner-node token for prompts in `workspaceId`, under the same rules
|
|
134
|
+
* as `getWorkspaceToken`. Desktop mints and renews it; null means use the
|
|
135
|
+
* workspace token. Absent on Desktop builds before it. */
|
|
136
|
+
getPartnerNodeToken?(workspaceId: string): Promise<string | null>
|
|
133
137
|
/** Runs Desktop's browser sign-in and resolves with the resulting state. */
|
|
134
138
|
requestSignIn(): Promise<ComfyDesktop2AuthState>
|
|
135
139
|
/** Signs Desktop out of its account (every view follows) and resolves with
|
|
136
140
|
* the resulting state; Desktop may keep the session if an install needs it. */
|
|
137
141
|
signOut(): Promise<ComfyDesktop2AuthState>
|
|
138
|
-
/** Re-scopes Desktop's session to `workspaceId`
|
|
139
|
-
*
|
|
142
|
+
/** Re-scopes Desktop's session to `workspaceId` and resolves with the resulting
|
|
143
|
+
* state; every view follows. A view that is not signed in gets its current
|
|
144
|
+
* state back. Otherwise the switch may open browser consent: it does not for
|
|
145
|
+
* the grant's own workspace or one Desktop holds an unexpired token for,
|
|
146
|
+
* unless the grant has ended, and a request for a workspace Desktop is already
|
|
147
|
+
* switching to shares that switch's result. */
|
|
140
148
|
switchWorkspace(workspaceId: string): Promise<ComfyDesktop2AuthState>
|
|
141
149
|
/** Fires when Desktop signs in, signs out or switches workspace. */
|
|
142
150
|
onChanged(callback: (state: ComfyDesktop2AuthState) => void): () => void
|
|
@@ -168,6 +176,13 @@ export interface ComfyDesktop2Bridge {
|
|
|
168
176
|
/** Reports whether the backend server is cloud/remote, not the user's location.
|
|
169
177
|
* Optional: desktop builds predating it are still in the wild. */
|
|
170
178
|
isRemote?(): boolean
|
|
179
|
+
/** Returns the per-installation id: a non-PII, stable-per-machine value
|
|
180
|
+
* (`SHA-256(machine_id + salt)`, see main/lib/deviceId). The hosted
|
|
181
|
+
* frontend sends it to cloud as the `X-Comfy-Install-Id` header so cloud
|
|
182
|
+
* can attribute requests to a Desktop install. Not an identity/secret.
|
|
183
|
+
* Undefined outside cloud-hosted pages or when the id is not
|
|
184
|
+
* machine-derived. Absent on Desktop builds predating it. */
|
|
185
|
+
getInstallId?(): string | undefined
|
|
171
186
|
openTerminal?: () => Promise<boolean>
|
|
172
187
|
/** Opens a model provider access page in the hosted frontend's browser session.
|
|
173
188
|
* Resolves `true` when the host has taken ownership of the request.
|