@hasna/switcher 0.2.11 → 0.2.12

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.
@@ -23,3 +23,6 @@ export declare function detectChatGPTApp(appPath?: string, system?: DesktopHost)
23
23
  /** Claude Desktop's supported third-party gateway mode uses its own Claude-3p
24
24
  * data directory. Do not use restricted Electron development overrides. */
25
25
  export declare function detectClaudeDesktopApp(appPath?: string, system?: DesktopHost): Promise<ClaudeDesktopInstallation>;
26
+ export declare const claudeDesktopDataDirectory: () => string;
27
+ export declare function validateClaudeDesktopVersion(app: ClaudeDesktopInstallation): void;
28
+ export declare function assertClaudeDesktopAvailable(userData: string): Promise<void>;
@@ -0,0 +1,20 @@
1
+ /** Caller holds the shared desktop lease and has refused a running native app. */
2
+ export declare function recoverDesktopSelection(library: string): Promise<void>;
3
+ /** Read-only validation before account selection or broker access. The returned
4
+ * digests bind incumbent bytes without exporting credential-bearing content. */
5
+ export declare function inspectDesktopSelection(library: string): Promise<{
6
+ metadataHash: string | null;
7
+ metadataMode: number | null;
8
+ selectedHash: string | null;
9
+ recoveryHash: string | null;
10
+ }>;
11
+ export type DesktopSelection = {
12
+ configPath: string;
13
+ assertCurrent(): Promise<void>;
14
+ assertCurrentSync(): void;
15
+ restore(): Promise<void>;
16
+ };
17
+ /** One journal/rollback protocol for the provider launcher and broker adapter.
18
+ * The receipt is written and read back before touching the effective selection.
19
+ * Hooks are an internal fixture seam, never part of the public adapter input. */
20
+ export declare function applyDesktopSelection(library: string, config: Record<string, unknown>, label: string, checkpoint?: (stage: "preserved" | "config" | "selected") => Promise<void>): Promise<DesktopSelection>;
@@ -1,3 +1,13 @@
1
+ export type DesktopFileSnapshot = {
2
+ text: string;
3
+ mode: number;
4
+ };
5
+ export declare function safeDesktopSnapshot(path: string): Promise<DesktopFileSnapshot | undefined>;
6
+ /** Bounded, no-yield form for the final native launch handoff. */
7
+ export declare function safeDesktopSnapshotSync(path: string): DesktopFileSnapshot | undefined;
1
8
  export declare function safeDesktopRead(path: string): Promise<string | undefined>;
2
- export declare function writeDesktopPrivate(path: string, text: string): Promise<void>;
9
+ export declare function writeDesktopPrivate(path: string, text: string, mode?: number): Promise<void>;
3
10
  export declare function desktopLease(path: string): Promise<() => void>;
11
+ export declare function assertDesktopRuntime(): Promise<void>;
12
+ /** Read-only preflight, not acquisition of a future launch lease. */
13
+ export declare function assertDesktopLeaseAvailable(path: string): Promise<void>;