39 lines
837 B
Swift
39 lines
837 B
Swift
import Foundation
|
|
|
|
struct CompanionBootstrap: Codable {
|
|
let schemaVersion: Int
|
|
let generatedAt: String
|
|
let gateway: Gateway
|
|
let node: Node
|
|
let runtime: Runtime
|
|
}
|
|
|
|
struct Gateway: Codable {
|
|
let url: String
|
|
let token: String?
|
|
}
|
|
|
|
struct Node: Codable {
|
|
let nodeId: String
|
|
let role: String
|
|
let platform: String
|
|
let capabilities: [String]
|
|
}
|
|
|
|
struct Runtime: Codable {
|
|
let heartbeatSeconds: Int
|
|
let handoffTimeoutMs: Int
|
|
let autoReconnect: Bool
|
|
}
|
|
|
|
// Reference entrypoint for a menu-bar app wrapper.
|
|
// Production apps should prefer in-process runtime integration over shelling out.
|
|
func launchFlynnCompanion() throws {
|
|
let task = Process()
|
|
task.executableURL = URL(fileURLWithPath: "/bin/bash")
|
|
task.arguments = ["./run-companion.sh"]
|
|
try task.run()
|
|
}
|
|
|
|
// Generated for node: macos-reference-shell (macos)
|