feat: implement desktop authorization recovery handling and session management improvements
Desktop Client Build / Resolve Build Metadata (push) Successful in 24s
Desktop Client Build / Build Desktop Client (push) Successful in 21m30s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 26s

This commit is contained in:
2026-06-24 11:00:19 +08:00
parent 0afd082d96
commit 6b60438f25
6 changed files with 317 additions and 19 deletions
+14 -1
View File
@@ -9,6 +9,7 @@ import type {
DesktopClientUpdateResult,
DesktopPublishTaskListResponse,
DesktopRuntimeSessionSyncRequest,
DesktopTaskInfo,
ListDesktopPublishTasksParams,
} from '@geo/shared-types'
import type { DesktopObservedRequest } from '../shared/network-debug'
@@ -75,6 +76,17 @@ declare global {
secure: boolean
}
interface DesktopAuthRecoveryRequest {
reason: 'desktop-client-token-unauthorized'
method: string
path: string
status: number
code?: number
message: string
requestId: string
at: number
}
interface Window {
desktopBridge: {
app: {
@@ -132,7 +144,7 @@ declare global {
cleanStorage(): Promise<DesktopStorageCleanupResult>
syncRuntimeSession(session: DesktopRuntimeSessionSyncRequest | null): Promise<null>
rotateRuntimeClientToken(): Promise<DesktopClientRotateResponse>
releaseRuntimeSession(revoke?: boolean): Promise<null>
releaseRuntimeSession(revoke?: boolean, options?: { skipRemote?: boolean }): Promise<null>
setWindowMode(
mode: 'login' | 'main',
request?: {
@@ -140,6 +152,7 @@ declare global {
animate?: boolean
},
): Promise<null>
onAuthRecoveryRequested(listener: (event: DesktopAuthRecoveryRequest) => void): () => void
onRuntimeInvalidated(
listener: (event: {
reason: