SPB Git

spb/zyquo-cloud Public MIT

Native macOS AI chat client for 12 cloud providers — your keys, every cloud model, one beautiful chat.

Swift 97.4% Shell 1.7% Makefile 1%
1.2 KB · 39 lines swift
Raw Blame History
1//2//  Main.swift3//  Zyquo Cloud4//5//  Author: Simon-Pierre Boucher6//  Mail: contact@spboucher.ai7//8//  Entry point. `--verify` runs the Phase 7 API harness headlessly (reusing9//  the production provider clients); `--load-vault` seeds the encrypted vault10//  from environment keys; otherwise the SwiftUI app launches.11//12//  Deliberately a synchronous main: launching NSApplicationMain from an async13//  main() corrupts Swift concurrency's executor setup (background tasks stop14//  being scheduled), so the CLI modes drive their async work explicitly.15//1617import Foundation1819@main20enum Main {21    static func main() {22        let arguments = CommandLine.arguments23        if arguments.contains("--verify") {24            Task.detached {25                let status = await VerifyHarness.run(arguments: arguments)26                exit(status)27            }28            // Park the main thread servicing the main queue so MainActor work29            // can run (a blocking semaphore here deadlocks the harness).30            dispatchMain()31        }32        if arguments.contains("--load-vault") {33            VerifyHarness.loadVault()34            exit(0)35        }36        ZyquoCloudApp.main()37    }38}39