-
Notifications
You must be signed in to change notification settings - Fork 0
Function Reference
Lumicake edited this page Feb 28, 2026
·
1 revision
This page is auto-generated from the current repository source and includes the latest code updates.
Generated: 2026-02-28 23:32:15
Regenerate with: scripts/generate_function_wiki.py
- Total functions found: 1267
- Python: 17
- Swift: 1250
- Files with functions: 113
-
L15func applicationDidFinishLaunching(_ notification: Notification) -
L40private func setupGlassWindow(_ window: NSWindow) -
L50private func setupMenuBar() -
L62@objc func toggleApp() -
L72func applicationWillTerminate(_ notification: Notification) -
L77func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool
-
L59func setupGlobalHotkey() -
L125func refreshGlobalHotkeys() -
L131private func runGlobalTextAssist(_ action: TextAssistAction) -
L170func rewriteText(_ text: String, action: TextAssistAction) async throws -> String -
L203private func buildFrontmostDocumentContext() async -> String -
L234private func detectFrontmostDocumentPath() async -> String? -
L264private func waitForModifiersRelease(timeout: TimeInterval = 0.8) async -
L277private func captureSelectedText() async -> String? -
L314private func triggerCopyFromFrontmostApp() async -
L336private func readStringFromPasteboard(_ pboard: NSPasteboard) -> String? -
L353private func captureSelectedTextViaAccessibility() -> String? -
L370private func replaceSelectedText(with text: String) async -
L392private func sendCommandShortcut(_ keyCode: CGKeyCode) -
L404private func replaceSelectedTextViaAccessibility(_ replacement: String) -> Bool -
L423private func resolvedHotkeyTargetAgent() -> Agent? -
L428private func ensureHotkeyConversation(agentId: UUID) -> UUID -
L445private func rewriteTextStreaming( _ text: String, action: TextAssistAction, agent: Agent, conversationId: UUID ) async throws -> String -
L508func toggleCommandPalette() -
L514func toggleQuickActionPanel() -
L520func sendQuickAction(type: QuickActionType) -
L566private func buildQuickActionPrompt(type: QuickActionType) async -> (String, String?) -
L579private func buildDesktopCleanupPrompt(basePrompt: String) -> String -
L613private func desktopInventory(at directory: URL, maxItems: Int) -> String -
L644private func getActiveApplication() -> String -
L650private func isIWorkApp(bundleId: String) -> Bool -
L660private func getIWorkDocumentInfo() async -> (info: String, content: String) -
L747private func buildIWorkContext(app: String, docInfo: String, docContent: String, actionType: QuickActionType) -> String -
L840func startAutomationEngine()
-
L53func isDefaultAgent(_ id: UUID) -> Bool -
L57func setDefaultAgent(_ id: UUID?) -
L111init() -
L166func setRemoteMacBridge( isConnected: Bool, executor: IOSRemoteMacCommandExecutor? ) -
L177func sendCommandPaletteMessage(text: String, agentId: UUID?) -
L191func createAutomation() -
L197func runAutomation(id: UUID) -
L204func fireAutomation(_ rule: AutomationRule) -
L215private func loadAutomations() -
L242private func saveAutomations() -
L256func recordToolCall(agentId: UUID, agentName: String, toolName: String, arguments: [String: String], result: String) -
L268func stopAgentControl() -
L275func isConversationResponding(_ conversationId: UUID) -> Bool -
L284func stopResponse(in conversationId: UUID) -
L307private func loadAgents() -
L318func updateAgent(_ agent: Agent) -
L334func deleteAgent(id: UUID) -
L349func applySelfUpdate(_ args: [String: String], agentId: UUID) -> String -
L381private func loadConversations() -
L407private func saveConversations() -
L420func createDM(agentId: UUID) -> Conversation -
L435func createGroup(agentIds: [UUID], title: String?) -> Conversation -
L444func deleteConversation(id: UUID) -
L453func sendMessage(_ text: String, in conversationId: UUID, agentMode: Bool = false, desktopControlEnabled: Bool = false) -
L497func streamResponse( from agent: Agent, in conversationId: UUID, history: [SpaceMessage], agentMode: Bool = false, desktopControlEnabled: Bool = false, delegationDepth: Int = 0, toolNameAllowlist: Set<String>? = nil -
L837func updatePlaceholder(_ text: String) -
L1051private func iOSRemoteMacTools(enabledNames: [String]) -> [AITool] -
L1190private func executeIOSRemoteMacTool( named toolName: String, arguments: [String: String] ) async throws -> String -
L1294private func shellQuote(_ input: String) -> String
-
L29init(onFire: @escaping (AutomationRule) -> Void) -
L35func update(rules: [AutomationRule]) -
L40func runManually(_ rule: AutomationRule) -
L46private func start() -
L98func stop() -
L102private func restart() -
L110private func handleAppEvent(name: String, launched: Bool) -
L123private func handleScreenUnlock() -
L129private func handleBluetoothUpdate(_ current: Set<String>) -
L148private func checkSchedules() -
L188private func fire(_ rule: AutomationRule) -
L196nonisolated private static func currentBluetoothDevices() -> Set<String> -
L226init(onFire: @escaping (AutomationRule) -> Void) -
L227func update(rules: [AutomationRule]) -
L228func runManually(_ rule: AutomationRule) -
L229func stop()
-
L63private init() -
L67private func ensureEventHandlerInstalled() -
L118func register(keyCode: UInt32 = KeyCode.L, modifiers: UInt32 = Modifiers.command) -
L127func registerSecondary(keyCode: UInt32 = KeyCode.L, modifiers: UInt32 = Modifiers.control) -
L136func registerTertiary(keyCode: UInt32 = KeyCode.L, modifiers: UInt32 = Modifiers.option | Modifiers.command) -
L145func registerQuaternary(keyCode: UInt32, modifiers: UInt32) -
L153func registerFifth(keyCode: UInt32, modifiers: UInt32) -
L161func registerSixth(keyCode: UInt32, modifiers: UInt32) -
L168func unregister() -
L172func unregisterAll() -
L182func unregisterSecondary() -
L191private init() -
L198func register(keyCode: UInt32 = 0, modifiers: UInt32 = 0) -
L199func registerSecondary(keyCode: UInt32 = 0, modifiers: UInt32 = 0) -
L200func registerTertiary(keyCode: UInt32 = 0, modifiers: UInt32 = 0) -
L201func registerQuaternary(keyCode: UInt32, modifiers: UInt32) -
L202func registerFifth(keyCode: UInt32, modifiers: UInt32) -
L203func registerSixth(keyCode: UInt32, modifiers: UInt32) -
L204func unregister() -
L205func unregisterAll() -
L206func unregisterSecondary()
-
L114private func openLogsDirectory()
-
L27init() -
L61private func checkBundleIdentifier()
-
L12@objc func extendSelectedText(_ pboard: NSPasteboard, userData: String?, error: AutoreleasingUnsafeMutablePointer<NSString>) -
L20@objc func correctGrammar(_ pboard: NSPasteboard, userData: String?, error: AutoreleasingUnsafeMutablePointer<NSString>) -
L28@objc func autoResolveText(_ pboard: NSPasteboard, userData: String?, error: AutoreleasingUnsafeMutablePointer<NSString>) -
L36@objc func cleanDesktopService(_ pboard: NSPasteboard, userData: String?, error: AutoreleasingUnsafeMutablePointer<NSString>) -
L48private func transformTextFromPasteboard( _ pboard: NSPasteboard, action: AppState.TextAssistAction, error: AutoreleasingUnsafeMutablePointer<NSString> )
-
L166private func deleteAgents(at offsets: IndexSet) -
L373private func deleteConversations(at offsets: IndexSet) -
L468private func messageRow(for message: SpaceMessage) -> some View -
L554private func sendMessage() -
L561private func scrollToBottom(using proxy: ScrollViewProxy, animated: Bool) -
L571private func throttledStreamingScroll(using proxy: ScrollViewProxy) -
L584static func == (lhs: iOSMessageBubble, rhs: iOSMessageBubble) -> Bool -
L807private func saveKey(_ key: String, for provider: AIProvider) -
L872private func createAgent() -
L954private func createConversation()
-
L30init( role: Role, content: String, toolCallId: String? = nil, toolCalls: [ToolCall]? = nil, imageData: Data? = nil ) -
L52init(name: String, description: String, parameters: AIToolParameters) -
L66init(type: String = "object", properties: [String: AIToolProperty], required: [String] = []) -
L88init(type: String, description: String, enumValues: [String]? = nil) -
L115init(id: String, content: String?, toolCalls: [ToolCall]?, finishReason: String?, usage: AIUsage?) -
L131init(promptTokens: Int, completionTokens: Int, totalTokens: Int) -
L153init(id: String, content: String?, toolCallChunk: ToolCallChunk?, finishReason: String?, done: Bool = false)
-
L23init() -
L27deinit -
L33private func setupXPCConnection() -
L43func executePrivileged( command: String, arguments: [String] = [] ) async throws -> CommandExecutionResult -
L54func isHelperInstalled() -> Bool -
L61func installHelper() async throws
-
L23init(timeout: TimeInterval = 300) -
L30func execute( command: String, arguments: [String] = [], environment: [String: String]? = nil, workingDirectory: URL? = nil ) async throws -> CommandExecutionResult -
L93func executeStreaming( command: String, arguments: [String] = [] ) -> AsyncThrowingStream<String, Error>
-
L18public init(id: UUID = UUID(), name: String, value: String, unit: String, icon: String, colorName: String, date: Date = Date(), weeklyData: [WeeklyDataPointDTO] = []) -
L34public init(label: String, value: Double) -
L49public init() -
L68private init() -
L95public func requestAuthorization() async throws -
L114public func fetchSyncData() async -> HealthSyncData -
L144public func prefetchAndCacheSync() async -
L152public func cachedOrPersistedSyncData() -> Data? -
L160public func updateCachedSyncData(_ data: Data) -
L166public func exportSyncSnapshotToDocuments() async throws -> URL -
L189private func refreshAuthorizationState() async -
L202private func persistSyncData(_ data: Data) -
L206private func loadPersistedSyncData() -> Data? -
L210private func syncFileURL() -> URL -
L219private func loadActivityMetrics() async -> [HealthMetricDTO] -
L242private func loadHeartMetrics() async -> [HealthMetricDTO] -
L265private func loadBodyMetrics() async -> [HealthMetricDTO] -
L283private func loadSleepMetrics() async -> [HealthMetricDTO] -
L286func fmt(_ minutes: Double) -> String -
L300private func loadWorkoutMetrics() async -> [HealthMetricDTO] -
L311private func loadVitalsMetrics() async -> [HealthMetricDTO] -
L325private func fetchDailySum(_ id: HKQuantityTypeIdentifier, unit: HKUnit) async -> Double? -
L337private func fetchLatest(_ id: HKQuantityTypeIdentifier, unit: HKUnit) async -> Double? -
L348private func fetchWeeklySum(_ id: HKQuantityTypeIdentifier, unit: HKUnit) async -> [WeeklyDataPointDTO] -
L369private func fetchWeeklyAvg(_ id: HKQuantityTypeIdentifier, unit: HKUnit) async -> [WeeklyDataPointDTO] -
L390private func fetchSleepMinutes() async -> (inBed: Double, asleep: Double, deep: Double, rem: Double) -
L415private func fetchMindfulMinutes() async -> Double -
L428private func fetchRecentWorkouts(limit: Int) async -> [HKWorkout]
-
L15private func udKey(_ provider: AIProvider) -> String -
L19func setAPIKey(_ key: String, for provider: AIProvider) throws -
L23func getAPIKey(for provider: AIProvider) throws -> String? -
L30func sendMessage( provider: AIProvider, model: String, messages: [AIMessage], systemPrompt: String? = nil, tools: [AITool]? = nil, temperature: Double? = nil, maxTokens: Int? = nil -
L68func sendMessageStream( provider: AIProvider, model: String, messages: [AIMessage], systemPrompt: String? = nil, tools: [AITool]? = nil, temperature: Double? = nil, maxTokens: Int? = nil -
L104func getAvailableModels(provider: AIProvider) async throws -> [String] -
L115func launchOllama() -
L129private func openAIMessages(from messages: [AIMessage], systemPrompt: String?) -> [[String: Any]] -
L178private func ollamaMessages(from messages: [AIMessage], systemPrompt: String?) -> [[String: Any]] -
L234private func anthropicMessages(from messages: [AIMessage]) -> [[String: Any]] -
L290private func geminiContents(from messages: [AIMessage]) -> [[String: Any]] -
L336private func openAIToolDefs(_ tools: [AITool]) -> [[String: Any]] -
L344private func anthropicToolDefs(_ tools: [AITool]) -> [[String: Any]] -
L351private func geminiToolDefs(_ tools: [AITool]) -> [[String: Any]] -
L363private func encodeArgs(_ args: [String: String]) -> String -
L369private func decodeArgs(_ jsonStr: String) -> [String: String] -
L376private func toArgStrings(_ dict: [String: Any]) -> [String: String] -
L384private func sendOpenAIMessage( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, maxTokens: Int?, provider: AIProvider = .openai ) async throws -> AIResponse -
L426private func sendOpenAIStream( model: String, messages: [AIMessage], systemPrompt: String?, temperature: Double?, maxTokens: Int?, provider: AIProvider = .openai ) async throws -> AsyncThrowingStream<AIStreamChunk, Error> -
L474private func openAIRequest( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, maxTokens: Int?, stream: Bool, provider: AIProvider ) throws -> URLRequest -
L519private func openAIProviderName(_ provider: AIProvider) -> String -
L530private func openAIUsage(_ json: [String: Any]) -> AIUsage? -
L541private func sendAnthropicMessage( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, maxTokens: Int? ) async throws -> AIResponse -
L582private func sendAnthropicStream( model: String, messages: [AIMessage], systemPrompt: String?, temperature: Double?, maxTokens: Int? ) async throws -> AsyncThrowingStream<AIStreamChunk, Error> -
L636private func anthropicRequest( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, maxTokens: Int?, stream: Bool ) throws -> URLRequest -
L667private func anthropicUsage(_ json: [String: Any]) -> AIUsage? -
L678private func sendGeminiMessage( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, maxTokens: Int? ) async throws -> AIResponse -
L718private func sendGeminiStream( model: String, messages: [AIMessage], systemPrompt: String?, temperature: Double?, maxTokens: Int? ) async throws -> AsyncThrowingStream<AIStreamChunk, Error> -
L766private func geminiRequest( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, maxTokens: Int?, stream: Bool ) throws -> URLRequest -
L798private func geminiUsage(_ json: [String: Any]) -> AIUsage? -
L809private func sendOllamaMessage( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double? ) async throws -> AIResponse -
L858private func sendOllamaStream( model: String, messages: [AIMessage], systemPrompt: String?, temperature: Double? ) async throws -> AsyncThrowingStream<AIStreamChunk, Error> -
L905private func ollamaRequest( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, stream: Bool ) throws -> URLRequest -
L924private func fetchOllamaModels() async throws -> [String] -
L933private func ollamaUsage(_ json: [String: Any]) -> AIUsage? -
L943private func checkHTTP(_ response: URLResponse, data: Data?, provider: String) throws
-
L16init(database: DatabaseManager = .shared) -
L20private func loadCollection() throws -> SyncCollection<Agent> -
L32func create(_ agent: Agent) async throws -
L40func update(_ agent: Agent) async throws -
L50func delete(id: UUID) async throws -
L57func get(id: UUID) async throws -> Agent? -
L62func getAll() async throws -> [Agent] -
L67func getByStatus(_ status: AgentStatus) async throws -> [Agent]
-
L16init(database: DatabaseManager = .shared) -
L20func create(_ session: ExecutionSession) async throws -
L27func update(_ session: ExecutionSession) async throws -
L37func get(id: UUID) async throws -> ExecutionSession? -
L42func getForAgent(agentId: UUID, limit: Int = 50) async throws -> [ExecutionSession] -
L51func getRecent(limit: Int = 50) async throws -> [ExecutionSession]
-
L23init( id: UUID = UUID(), name: String, configuration: AgentConfiguration, capabilities: [AgentCapability] = [], status: AgentStatus = .idle, createdAt: Date = Date(), updatedAt: Date = Date() -
L76init( provider: AIProvider, model: String, systemPrompt: String? = nil, temperature: Double? = 0.7, maxTokens: Int? = 4096, enabledTools: [String] = [], securityPolicy: SecurityPolicy = SecurityPolicy() -
L267init( allowSudo: Bool = false, requireApproval: Bool = true, whitelistedCommands: [String] = [], blacklistedCommands: [String] = ["rm -rf /", "dd if=/dev/zero", ":() -
L295static func < (lhs: RiskLevel, rhs: RiskLevel) -> Bool
-
L82func encode(to encoder: Encoder) throws -
L116init(from decoder: Decoder) throws -
L163init( id: UUID = UUID(), title: String = "New Automation", notes: String = "", trigger: AutomationTrigger = .manual, agentId: UUID? = nil, isEnabled: Bool = true, createdAt: Date = Date(), -
L184init(from decoder: Decoder) throws
-
L20func displayTitle(agents: [Agent]) -> String -
L28init( id: UUID = UUID(), title: String? = nil, participantIds: [UUID], messages: [SpaceMessage] = [], createdAt: Date = Date(), updatedAt: Date = Date() -
L62init( id: UUID = UUID(), role: SpaceMessageRole, content: String, agentId: UUID? = nil, timestamp: Date = Date(), isStreaming: Bool = false, imageData: Data? = nil
-
L23init( id: UUID = UUID(), agentId: UUID, userPrompt: String, steps: [ExecutionStep] = [], result: ExecutionResult? = nil, status: ExecutionStatus = .running, startedAt: Date = Date(), -
L59init( id: UUID = UUID(), type: ExecutionStepType, content: String, timestamp: Date = Date(), metadata: [String: String]? = nil ) -
L139init( success: Bool, output: String? = nil, error: String? = nil, tokensUsed: Int? = nil, costEstimate: Double? = nil ) -
L163init( id: String = UUID().uuidString, name: String, arguments: [String: String], result: ToolResult? = nil ) -
L185init( success: Bool, output: String? = nil, error: String? = nil, executionTime: TimeInterval? = nil )
-
L14init(items: [T], updatedAt: Date = Date())
-
L20init(agentId: UUID, agentName: String, toolName: String, arguments: [String: String], result: String, success: Bool)
-
L20private init() -
L26func openQuickActionPanel() -
L35func openAgentReplyBubble() -
L44func closeQuickActionPanel() -
L51func closeAgentReplyBubble() -
L59private func findWindow(withIdentifier identifier: String) -> NSWindow? -
L65func openQuickActionPanel() -
L66func openAgentReplyBubble() -
L67func closeQuickActionPanel() -
L68func closeAgentReplyBubble()
-
L14func sendMessage( provider: AIProvider, model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool]?, temperature: Double?, maxTokens: Int? -
L25func sendMessageStream( provider: AIProvider, model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool]?, temperature: Double?, maxTokens: Int? -
L36func getAvailableModels(provider: AIProvider) async throws -> [String] }
-
L13func create(_ agent: Agent) async throws func update(_ agent: Agent) async throws -
L14func update(_ agent: Agent) async throws func delete(id: UUID) async throws -
L15func delete(id: UUID) async throws func get(id: UUID) async throws -> Agent? func getAll() async throws -> [Agent] func getByStatus(_ status: AgentStatus) async throws -> [Agent] } -
L16func get(id: UUID) async throws -> Agent? func getAll() async throws -> [Agent] func getByStatus(_ status: AgentStatus) async throws -> [Agent] } -
L17func getAll() async throws -> [Agent] func getByStatus(_ status: AgentStatus) async throws -> [Agent] } -
L18func getByStatus(_ status: AgentStatus) async throws -> [Agent] } -
L24func create(_ session: ExecutionSession) async throws func update(_ session: ExecutionSession) async throws -
L25func update(_ session: ExecutionSession) async throws func get(id: UUID) async throws -> ExecutionSession? func getForAgent(agentId: UUID, limit: Int) async throws -> [ExecutionSession] func getRecent(limit: Int) async throws -> [ExecutionSession] } -
L26func get(id: UUID) async throws -> ExecutionSession? func getForAgent(agentId: UUID, limit: Int) async throws -> [ExecutionSession] func getRecent(limit: Int) async throws -> [ExecutionSession] } -
L27func getForAgent(agentId: UUID, limit: Int) async throws -> [ExecutionSession] func getRecent(limit: Int) async throws -> [ExecutionSession] } -
L28func getRecent(limit: Int) async throws -> [ExecutionSession] }
-
L36init( aiRepository: AIProviderRepositoryProtocol? = nil, sessionRepository: SessionRepositoryProtocol? = nil, authorizationManager: AuthorizationManager? = nil, toolRegistry: ToolRegistry? = nil ) -
L51func execute( agent: Agent, userPrompt: String ) async throws -
L101func stop() async -
L115private func executionLoop( agent: Agent, session: ExecutionSession, messages: inout [AIMessage], tools: [AITool] ) async throws -
L174private func processToolCall( _ toolCall: ToolCall, agent: Agent, session: ExecutionSession, messages: inout [AIMessage] ) async throws -
L208private func addStep( _ type: ExecutionStepType, content: String ) async -
L229private func completeSession( success: Bool, error: Error? = nil ) async -
L284func execute(agent: Agent, userPrompt: String) async throws -
L285func stop() async
-
L17private func expandPath(_ path: String) -> String -
L24static func createDirectory(path: String) async throws -> String -
L34static func deleteFile(path: String) async throws -> String -
L43static func moveFile(source: String, destination: String) async throws -> String -
L52static func copyFile(source: String, destination: String) async throws -> String -
L61static func searchFiles(directory: String, pattern: String) async throws -> String -
L76static func getFileInfo(path: String) async throws -> String -
L114static func appendToFile(path: String, content: String) async throws -> String -
L134static func getCurrentDatetime() async throws -> String -
L141static func getSystemInfo() async throws -> String -
L170static func listRunningProcesses() async throws -> String -
L187static func openApplication(name: String) async throws -> String -
L239static func openURL(url: String) async throws -> String -
L259static func fetchURL(url urlString: String) async throws -> String -
L270static func httpRequest( url urlString: String, method: String, headers: String?, body: String? ) async throws -> String -
L308static func webSearch(query: String) async throws -> String -
L316private static func braveSearch(query: String, apiKey: String) async throws -> String -
L341private static func duckDuckGoSearch(query: String) async throws -> String -
L368static func status(directory: String) async throws -> String -
L383static func log(directory: String, limit: Int) async throws -> String -
L398static func diff(directory: String, staged: Bool) async throws -> String -
L416static func commit(directory: String, message: String) async throws -> String -
L443static func branch(directory: String, create: String?) async throws -> String -
L471static func clone(url: String, destination: String) async throws -> String -
L488static func searchInFile(path: String, pattern: String) async throws -> String -
L506static func replaceInFile(path: String, search: String, replacement: String) async throws -> String -
L521static func calculate(expression: String) async throws -> String -
L535static func parseJSON(input: String) async throws -> String -
L544static func encodeBase64(input: String) async throws -> String -
L551static func decodeBase64(input: String) async throws -> String -
L559static func countLines(path: String) async throws -> String -
L573static func read() async throws -> String -
L579static func write(content: String) async throws -> String -
L590static func takeScreenshot(path: String) async throws -> String -
L613static func runPython(code: String) async throws -> String -
L631static func runNode(code: String) async throws -> String -
L655static func save(key: String, value: String) async throws -> String -
L660static func read(key: String) async throws -> String -
L667static func list() async throws -> String -
L678static func delete(key: String) async throws -> String -
L693static func listDevices() async throws -> String -
L707static func connectDevice(device: String, action: String) async throws -> String -
L729static func scanDevices() async throws -> String -
L739private static func shell(_ cmd: String) async throws -> String -
L756static func getVolume() async throws -> String -
L769static func setVolume(level: Int) async throws -> String -
L779static func setMute(muted: Bool) async throws -> String -
L791static func listAudioDevices() async throws -> String -
L804static func setOutputDevice(device: String) async throws -> String -
L819private static func shell(_ cmd: String) async throws -> String -
L837static func control(action: String, app: String?) async throws -> String -
L879private static func shell(_ cmd: String) async throws -> String -
L899static func getScreenInfo() async throws -> String -
L928private static func toQuartzPoint(x: Double, y: Double, frame: CGRect) -> CGPoint -
L941static func moveMouse(x: Double, y: Double) async throws -> String -
L950static func clickMouse(x: Double, y: Double, button: String, clicks: Int) async throws -> String -
L974static func scrollMouse(x: Double, y: Double, deltaX: Int, deltaY: Int) async throws -> String -
L987static func typeText(text: String) async throws -> String -
L1002static func pressKey(key: String, modifiers: String) async throws -> String -
L1031static func runAppleScript(script: String) async throws -> String -
L1050static func iworkWriteText(text: String) async throws -> String -
L1066static func iworkGetDocumentInfo() async throws -> String -
L1110static func iworkReplaceText(findText: String, replaceText: String, allOccurrences: Bool = true) async throws -> String -
L1148static func iworkInsertAfterAnchor(anchorText: String, newText: String) async throws -> String -
L1181private static func keyNameToCode(_ name: String) -> Int -
L1210static func readPDF(path: String) async throws -> String -
L1235static func readWord(path: String) async throws -> String -
L1265static func readPPT(path: String) async throws -> String -
L1344static func readDocument(path: String) async throws -> String -
L1420static func readExcel(path: String) async throws -> String -
L1553static func readIWork(path: String, ext: String) async throws -> String -
L1627static func readImageMetadata(path: String) async throws -> String -
L1665static func analyzeDiskSpace(path: String?) async throws -> String -
L1699static func listWindows() async throws -> String -
L1724static func focusWindow(app: String, title: String?) async throws -> String -
L1746static func resizeWindow(app: String, x: Int?, y: Int?, width: Int?, height: Int?) async throws -> String -
L1771static func closeWindow(app: String) async throws -> String -
L1786static func quitApplication(name: String) async throws -> String -
L1793static func listRunningApps() async throws -> String -
L1810static func getFrontmostApp() async throws -> String -
L1825static func sendNotification(title: String, subtitle: String?, message: String) async throws -> String -
L1833static func setTimer(seconds: Int, message: String) async throws -> String -
L1852static func getImageInfo(path: String) async throws -> String -
L1870static func resizeImage(path: String, width: Int?, height: Int?, outputPath: String?) async throws -> String -
L1901static func convertImage(path: String, format: String, outputPath: String?) async throws -> String -
L1936static func createArchive(sources: [String], outputPath: String) async throws -> String -
L1959static func extractArchive(path: String, destination: String?) async throws -> String -
L2002static func getWifiInfo() async throws -> String -
L2019static func getNetworkInterfaces() async throws -> String -
L2041static func pingHost(host: String, count: Int) async throws -> String -
L2063static func getBrightness() async throws -> String -
L2085static func setBrightness(level: Double) async throws -> String -
L2107static func getAppearance() async throws -> String -
L2114static func setDarkMode(enabled: Bool) async throws -> String -
L2121static func setWallpaper(path: String) async throws -> String -
L2143static func moveToTrash(path: String) async throws -> String -
L2158static func emptyTrash() async throws -> String -
L2174static func speakText(text: String, voice: String?) async throws -> String -
L2193static func listVoices() async throws -> String -
L2211static func getEvents(days: Int) async throws -> String -
L2236static func createEvent(title: String, startDate: String, endDate: String, calendar: String?, notes: String?) async throws -> String -
L2259static func getReminders(list: String?) async throws -> String -
L2282static func createReminder(title: String, dueDate: String?, notes: String?, list: String?) async throws -> String -
L2303static func hashFile(path: String, algorithm: String) async throws -> String -
L2335static func spotlightSearch(query: String, directory: String?) async throws -> String -
L2361static func previewFile(path: String) async throws -> String -
L2378static func getBatteryInfo() async throws -> String -
L2392static func getUserInfo() async throws -> String -
L2405static func listMenuItems(app: String?) async throws -> String
-
L27private init() -
L34func register(_ tool: RegisteredTool) -
L39func getTool(named name: String) -> RegisteredTool? -
L44func getAllTools() -> [RegisteredTool] -
L49func getToolsForAI(enabledNames: [String] = []) -> [AITool] -
L61func getToolsForAIWithoutDesktopControl(enabledNames: [String] = []) -> [AITool] -
L79private func registerBuiltInTools() -
L2002func toAITool() -> AITool -
L2105static func readFile(path: String) async throws -> String -
L2123static func writeFile(path: String, content: String) async throws -> String -
L2130static func listDirectory(path: String) async throws -> String -
L2144static func executeCommand( command: String, workingDirectory: String? ) async throws -> String -
L2226private init() -
L2227func getAllTools() -> [RegisteredTool] -
L2228func getToolsForAI(enabledNames: [String] = []) -> [AITool] -
L2229func getToolsForAIWithoutDesktopControl() -> [AITool] -
L2230func getTool(named name: String) -> RegisteredTool?
-
L18func startRecording() async throws -
L45func stopRecordingAndTranscribe() async throws -> String -
L71func recordAndTranscribeAutomatically( maxDuration: TimeInterval = 18.0, silenceThresholdDB: Float = -42.0, silenceDuration: TimeInterval = 1.2, minimumSpeechDuration: TimeInterval = 0.8 ) async throws -> String -
L93func speak(text: String) async throws -
L113private func requestMicrophoneAccessIfNeeded() async throws -> Bool -
L131private func transcribeAudio(at fileURL: URL) async throws -> String -
L161private func synthesizeSpeech(from text: String) async throws -> Data -
L185private func openAIKey() throws -> String -
L193private func appendField(_ name: String, value: String, to body: inout Data, boundary: String) -
L199private func appendFile( _ name: String, filename: String, mimeType: String, data: Data, to body: inout Data, boundary: String ) -
L214private func checkHTTP(response: URLResponse, data: Data) throws -
L224private func waitForAutoStop( maxDuration: TimeInterval, silenceThresholdDB: Float, silenceDuration: TimeInterval, minimumSpeechDuration: TimeInterval ) async throws -
L261private func transcribeWithRealtimeVAD(maxDuration: TimeInterval) async throws -> String -
L377private func stopRealtimeCapture() -
L385private func sendRealtimeEvent(_ event: [String: Any], on socket: URLSessionWebSocketTask) async throws -
L393private func convertBuffer( _ inputBuffer: AVAudioPCMBuffer, with converter: AVAudioConverter, to outputFormat: AVAudioFormat ) -> AVAudioPCMBuffer? -
L421private func pcm16Data(from buffer: AVAudioPCMBuffer) -> Data? -
L429func startRecording() async throws -
L430func stopRecordingAndTranscribe() async throws -> String -
L431func recordAndTranscribeAutomatically() async throws -> String -
L432func speak(text: String) async throws
-
L27private init() -
L40private func fileURL(_ name: String) -> URL -
L44func load<T: Codable>(_ type: T.Type, from name: String, default defaultValue: @autoclosure () -> T) throws -> T -
L55func save<T: Codable>(_ value: T, to name: String) throws -
L64func rawData(for name: String) -> Data?
-
L61private init() -
L65public func start() -
L110public func stop() -
L124public func approveConnection(_ id: UUID) -
L139public func rejectConnection(_ id: UUID) -
L146public func connectionHints() -> [String] -
L185private func handleListenerState(_ state: NWListener.State) -
L207private func accept(_ connection: NWConnection) -
L235private func removeConnection(id: UUID) -
L246private func receiveNext(on connection: NWConnection, bufferBox: BufferBox, id: UUID) -
L263private func drainBuffer(bufferBox: BufferBox, connection: NWConnection, id: UUID) -
L313private func updateClientName(id: UUID, name: String) -
L335private func execute(_ command: RemoteCommandMessage, from connectionID: UUID) async -> RemoteResponseMessage -
L650private func baseURL() -> URL -
L659private func latestUpdatedAt(in data: Data) -> Date -
L669private func latestUpdatedAt(inJSONObject json: Any) -> Date -
L690private func parseTimestamp(_ raw: Any) -> Date? -
L718private func runAppleScript(_ source: String) async throws -> String -
L736private func runShell(_ command: String) async throws -> String -
L760private func keyCode(for key: String) -> Int -
L779private func buildModifiers(from modString: String) -> String -
L791private func encodeResponse(_ response: RemoteResponseMessage) throws -> Data -
L799private func currentMouseLocation() -> CGPoint -
L803private func moveMouse(to point: CGPoint) throws -
L815private func clickMouse(at point: CGPoint, button: CGMouseButton) throws -
L826private func scrollMouse(deltaX: Int32, deltaY: Int32) throws -
L840private func exportedSettingsJSON() -> Data -
L859private func exportedAPIKeysJSON() -> Data -
L915init(id: UUID, success: Bool, result: String, error: String? = nil, imageData: String? = nil)
-
L34private init() -
L41private func startMonitoring() -
L51func stopMonitoring()
-
L26private init() -
L28public func start() -
L72public func stop() -
L87private func processAddedDevices(_ iterator: io_iterator_t) -
L100private func processRemovedDevices(_ iterator: io_iterator_t) -
L112private func isIOSDevice(_ device: io_object_t) -> Bool
-
L19nonisolated func captureScreenAsJPEG(maxWidth: CGFloat = 1440, displayID: UInt32? = nil) -> Data? -
L58func captureWindowAsJPEG(maxWidth: CGFloat = 1440) -> Data? -
L115func captureScreenAsJPEG(maxWidth: CGFloat = 1440, displayID: UInt32? = nil) -> Data?
-
L46private init() -
L51func assessRisk( command: String, target: String?, policy: SecurityPolicy ) -> RiskLevel -
L100func shouldAutoApprove( riskLevel: RiskLevel, policy: SecurityPolicy ) -> Bool -
L108func validateCommand( _ command: String, policy: SecurityPolicy ) throws
-
L21private init() -
L25func refreshAll() -
L36func checkAccessibility() -
L41func requestAccessibility() -
L49func checkScreenRecording() -
L53func requestScreenRecording() -
L60func checkFullDiskAccess() -
L66func requestFullDiskAccess() -
L72func checkMicrophone() -
L76func requestMicrophone() -
L93func checkCamera() -
L97func requestCamera() -
L114func checkHelperStatus() -
L119func installHelper() -
L127func requestAutomation() -
L131func requestInputMonitoring() -
L135func requestFullAccess() -
L175private func openSystemSettings(path: String) -
L180private func hasUsageDescription(_ key: String) -> Bool
-
L12private func formatToolName(_ name: String) -> String -
L25init(agent: Agent) -
L205private func uniqueModels(_ models: [String]) -> [String] -
L425private func fetchModels() -
L614init(_ label: String, @ViewBuilder content: @escaping () -> Content) -
L681func sizeThatFits(proposal: ProposedViewSize, subviews: Subviews, cache: inout ()) -> CGSize -
L686func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout ()) -
L697init(in maxWidth: CGFloat, subviews: Subviews, spacing: CGFloat)
-
L17private func isRegularConversation(_ conv: Conversation) -> Bool -
L283private func create()
-
L67private func chatHeader(conv: Conversation) -> some View -
L123private func messagesArea(conv: Conversation) -> some View -
L152private func emptyConversationHint(conv: Conversation) -> some View -
L172private func sendMessage() -
L179private func agentFor(_ message: SpaceMessage) -> Agent? -
L184private func scrollToBottom(conv: Conversation, proxy: ScrollViewProxy) -
L191private func loadSettings(for conv: Conversation) -
L198private func saveSettings(for conv: Conversation) -
L205private func handleVoiceAction() -
L219private func handleVoicePlayback(for conv: Conversation) -
L566private func performSend() -
L572private func updateMentionState() -
L581private func insertMention(_ agent: Agent)
-
L95private init() -
L107@objc private func appActivated(_ note: Notification) -
L129func snapshot() -> (todaySeconds: TimeInterval, topAppName: String?, topAppSeconds: TimeInterval, weekly: [(String, Double)]) -
L140private func bootstrapFrontmostApp() -
L150private func rotateDayIfNeeded(now: Date) -
L164private func flushCurrentSegment(until now: Date) -
L176private func weeklyTotals() -> [(String, Double)] -
L188private func storedDayStart() -> Date? -
L193private func loadPersisted() -
L200private func persist() -
L234private init() -
L269func requestAuthorizationIfNeeded() async -
L287func requestAuthorization() async -
L311private func authorizationRequestStatus() async -> HKAuthorizationRequestStatus -
L321func loadAllMetrics() async -
L358private func mapDTO(_ dto: HealthMetricDTO) -> HealthMetric -
L387func metricsForCategory(_ category: HealthCategory) -> [HealthMetric] -
L400private func loadActivityMetrics() async -> [HealthMetric] -
L427private func loadScreenTimeFallbackMetrics() -> [HealthMetric] -
L454private func formatDuration(_ seconds: TimeInterval) -> String -
L464private func loadHeartMetrics() async -> [HealthMetric] -
L493private func loadBodyMetrics() async -> [HealthMetric] -
L515private func loadSleepMetrics() async -> [HealthMetric] -
L518func fmt(_ minutes: Double) -> String -
L548private func loadWorkoutMetrics() async -> [HealthMetric] -
L566private func loadVitalsMetrics() async -> [HealthMetric] -
L583private func fetchDailySum(_ id: HKQuantityTypeIdentifier, unit: HKUnit) async -> Double? -
L595private func fetchLatest(_ id: HKQuantityTypeIdentifier, unit: HKUnit) async -> Double? -
L606private func fetchWeeklySum(_ id: HKQuantityTypeIdentifier, unit: HKUnit) async -> [(label: String, value: Double)] -
L627private func fetchWeeklyAvg(_ id: HKQuantityTypeIdentifier, unit: HKUnit) async -> [(label: String, value: Double)] -
L648private func fetchSleepMinutes() async -> (inBed: Double, asleep: Double, deep: Double, rem: Double) -
L682private func fetchMindfulMinutes() async -> Double -
L695private func fetchRecentWorkouts(limit: Int) async -> [HKWorkout] -
L707func analyzeCategory(_ category: HealthCategory, agent: Agent?) async
-
L27func metrics(for category: HealthCategory) -> [HealthMetric] -
L44func load(notifySync: Bool = false) async -
L68func requestAuthorization() async -
L79func exportJSONSnapshot() async -
L92func analyze(category: HealthCategory, preferredAgent: Agent?) async -
L156private func resolveProviderAndModel(repo: AIProviderRepository, preferredAgent: Agent?) async throws -> (AIProvider, String) -
L186private func mapDTO(_ dto: HealthMetricDTO) -> HealthMetric
-
L34func show(agents: [Agent], appState: AppState, onSubmit: @escaping (_ text: String, _ agentId: UUID?) -> Void) -
L106func hide() -
L112func toggle(agents: [Agent], appState: AppState, onSubmit: @escaping (_ text: String, _ agentId: UUID?) -> Void) -
L261private func submit()
-
L16func show(message: String) -
L35private func createPanel(message: String) -
L68private func update(message: String) -
L79private func hide() -
L92private func measuredSize(for view: HotkeyToastView) -> NSSize -
L108private func position(panel: NSPanel, size: NSSize)
-
L20func makeNSView(context: Context) -> NSVisualEffectView -
L28func updateNSView(_ nsView: NSVisualEffectView, context: Context) -
L122func executeCurrentAgent() async -
L897private func syncUIFromTrigger() -
L922private func syncTriggerFromUI() -
L1003private func uniqueModels(_ models: [String]) -> [String] -
L1126private func fetchModels() -
L1160private func createAgent()
-
L27func isIWorkApp() -> Bool -
L102func show(onAction: @escaping (QuickActionType) -> Void) -
L108func hide() -
L120func toggle(onAction: @escaping (QuickActionType) -> Void) -
L128func triggerAction(_ type: QuickActionType) -
L133private func createPanel() -
L189func addToolCall(_ toolName: String, args: [String: String]) -
L208func show(initialText: String = "") -
L213func hide() -
L226func updateText(_ text: String) -
L233func addToolCall(_ toolName: String, args: [String: String]) -
L238func setConversationId(_ id: UUID) -
L244func prepareForNewResponse() -
L252private func resizePanel() -
L272private func calculateContentHeight() -> CGFloat -
L281private func createPanel(initialText: String) -
L541private func sendUserInput() -
L547private func handleVoiceTap()
-
L24func show(onStop: @escaping () -> Void) -
L31func hide() -
L40private func createPanel(onStop: @escaping () -> Void)
-
L32static func == (lhs: IOSRemoteDevice, rhs: IOSRemoteDevice) -> Bool -
L42init(type: String, parameters: [String: String] = [:]) -
L58static func encode<T: Encodable>(_ value: T) throws -> Data -
L66static func decode<T: Decodable>(_ type: T.Type, from data: Data) throws -> T -
L80func start() -
L133func stop() -
L152func connect(to endpoint: NWEndpoint) async throws -
L179private func handleStateUpdate(_ state: NWConnection.State) -
L207private func handleTimeout() -
L221func connect(host: String, port: UInt16 = 47285) async throws -
L229func disconnect() -
L236func send(_ type: String, parameters: [String: String] = [:], timeout: TimeInterval = 15) async throws -> IOSRemoteResponse -
L263private func receiveLoop() -
L286private func drainBuffer() -
L335private func cancelPending(with error: Error) -
L372init() -
L402deinit -
L410func start() -
L411func stop() -
L413func connect(_ device: IOSRemoteDevice) -
L435func connectDirect() -
L465private func awaitApproval() async throws -
L496func disconnect() -
L503func ping() -
L507func screenshot() -
L511func setVolume(_ percent: Int) -
L515func runShell() -
L522func syncNow() -
L530private func syncBidirectional(showProgress: Bool) async -
L586func step(_ detail: String? = nil) -
L681private func beginRemoteSession() -
L695private func endRemoteSession() -
L704private func startContinuousSyncLoop() -
L716private func scheduleLocalChangeSync() -
L726private func shouldSkipPull(for file: String) -> Bool -
L736private func maxTimestamp(in data: Data) -> Date -
L746private func maxTimestamp(in json: Any) -> Date -
L767private func parseDateValue(_ raw: Any) -> Date? -
L781private func applyPulledData(_ data: Data, for file: String) async throws -
L803private func localSyncData(for file: String) -> Data? -
L825private func friendlyFileName(_ file: String) -> String -
L837private func localBaseURL() -> URL -
L845private func applySettingsFromJSON(_ data: Data) -
L852private func applyAPIKeysFromJSON(_ data: Data) -
L859private func exportedSettingsJSON() -> Data -
L878private func exportedAPIKeysJSON() -> Data -
L891private func run(_ type: String, parameters: [String: String] = [:], timeout: TimeInterval = 15)
-
L71private func sectionView(_ section: SettingsSection) -> some View -
L393private func loadSystemAccount() -
L542private func apiKeySection( provider: AIProvider, icon: String, color: Color, title: String, placeholder: String, key: Binding<String> ) -> some View -
L586private func loadKeyStatus() -
L595private func save(_ key: String, for provider: AIProvider) -
L700private func checkStatus()
-
L19func run() -
L32func executeCommand( _ command: String, withAuthorization: Data ) throws -> String
-
L16override func setUp() async throws -
L27func testEngineInitialization() -
L33func testExecutionWithSimplePrompt() async throws -
L58private func createTestAgent() -> Agent -
L75func sendMessage( provider: AIProvider, model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool]?, temperature: Double?, maxTokens: Int? -
L96func sendMessageStream( provider: AIProvider, model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool]?, temperature: Double?, maxTokens: Int? -
L110func getAvailableModels(provider: AIProvider) async throws -> [String] -
L120func create(_ session: ExecutionSession) async throws -
L124func update(_ session: ExecutionSession) async throws -
L130func get(id: UUID) async throws -> ExecutionSession? -
L134func getForAgent(agentId: UUID, limit: Int) async throws -> [ExecutionSession] -
L138func getRecent(limit: Int) async throws -> [ExecutionSession]
-
L14override func setUp() -
L18func testRiskAssessmentForDangerousCommand() -
L29func testRiskAssessmentForSudoCommand() -
L40func testRiskAssessmentForSafePath() -
L51func testRiskAssessmentForSensitivePath() -
L62func testCommandValidationWithBlacklist() -
L72func testCommandValidationWithoutSudo() -
L87func testAutoApproveThreshold()
-
L15func applicationDidFinishLaunching(_ notification: Notification) -
L36private func setupMenuBar() -
L48@objc func toggleApp() -
L58func applicationWillTerminate(_ notification: Notification) -
L63func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool
-
L28init(onFire: @escaping (AutomationRule) -> Void) -
L32deinit -
L36func update(rules: [AutomationRule]) -
L41func runManually(_ rule: AutomationRule) -
L47private func start() -
L87func stop() -
L95private func restart() -
L103private func handleAppEvent(name: String, launched: Bool) -
L116private func handleScreenUnlock() -
L122private func pollBluetooth() -
L142private func checkSchedules() -
L182private func fire(_ rule: AutomationRule) -
L190private static func currentBluetoothDevices() -> Set<String>
-
L63private init() -
L67private func ensureEventHandlerInstalled() -
L118func register(keyCode: UInt32 = KeyCode.L, modifiers: UInt32 = Modifiers.command) -
L127func registerSecondary(keyCode: UInt32 = KeyCode.L, modifiers: UInt32 = Modifiers.control) -
L136func registerTertiary(keyCode: UInt32 = KeyCode.L, modifiers: UInt32 = Modifiers.option | Modifiers.command) -
L145func registerQuaternary(keyCode: UInt32, modifiers: UInt32) -
L153func registerFifth(keyCode: UInt32, modifiers: UInt32) -
L161func registerSixth(keyCode: UInt32, modifiers: UInt32) -
L168func unregister() -
L172func unregisterAll() -
L182func unregisterSecondary()
-
L114private func openLogsDirectory()
-
L24init() -
L32private func setupBundleIdentifier() -
L101private func captureScreenAsJPEG(maxWidth: CGFloat = 1440, displayID: UInt32? = nil) -> Data? -
L140private func captureWindowAsJPEG(maxWidth: CGFloat = 1440) -> Data? -
L197private func captureScreenAsJPEG(maxWidth: CGFloat = 1440, displayID: UInt32? = nil) -> Data? -
L218init(agentId: UUID, agentName: String, toolName: String, arguments: [String: String], result: String, success: Bool) -
L249func isDefaultAgent(_ id: UUID) -> Bool -
L253func setDefaultAgent(_ id: UUID?) -
L337init() -
L366private func setupGlobalHotkey() -
L446func refreshGlobalHotkeys() -
L450private func runGlobalTextAssist(_ action: TextAssistAction) -
L490func rewriteText(_ text: String, action: TextAssistAction) async throws -> String -
L521private func buildFrontmostDocumentContext() async -> String -
L553private func detectFrontmostDocumentPath() async -> String? -
L584private func waitForModifiersRelease(timeout: TimeInterval = 0.8) async -
L599private func captureSelectedText() async -> String? -
L641private func triggerCopyFromFrontmostApp() async -
L666private func readStringFromPasteboard(_ pboard: NSPasteboard) -> String? -
L683private func captureSelectedTextViaAccessibility() -> String? -
L700private func replaceSelectedText(with text: String) async -
L725private func sendCommandShortcut(_ keyCode: CGKeyCode) -
L737private func replaceSelectedTextViaAccessibility(_ replacement: String) -> Bool -
L754private func resolvedHotkeyTargetAgent() -> Agent? -
L759private func ensureHotkeyConversation(agentId: UUID) -> UUID -
L776private func rewriteTextStreaming( _ text: String, action: TextAssistAction, agent: Agent, conversationId: UUID ) async throws -> String -
L837func toggleCommandPalette() -
L843func toggleQuickActionPanel() -
L849func sendQuickAction(type: QuickActionType) -
L908private func buildQuickActionPrompt(type: QuickActionType) async -> (String, String?) -
L921private func buildDesktopCleanupPrompt(basePrompt: String) -> String -
L955private func desktopInventory(at directory: URL, maxItems: Int) -> String -
L985private func getActiveApplication() -> String -
L994private func isIWorkApp(bundleId: String) -> Bool -
L1005private func getIWorkDocumentInfo() async -> (info: String, content: String) -
L1093private func buildIWorkContext(app: String, docInfo: String, docContent: String, actionType: QuickActionType) -> String -
L1184func sendCommandPaletteMessage(text: String, agentId: UUID?) -
L1201private func startAutomationEngine() -
L1209func createAutomation() -
L1215func runAutomation(id: UUID) -
L1222private func fireAutomation(_ rule: AutomationRule) -
L1234private func loadAutomations() -
L1240private func saveAutomations() -
L1245func recordToolCall(agentId: UUID, agentName: String, toolName: String, arguments: [String: String], result: String) -
L1256func stopAgentControl() -
L1265private func loadAgents() -
L1276func updateAgent(_ agent: Agent) -
L1286func deleteAgent(id: UUID) -
L1296func applySelfUpdate(_ args: [String: String], agentId: UUID) -> String -
L1328private func loadConversations() -
L1334private func saveConversations() -
L1340func createDM(agentId: UUID) -> Conversation -
L1355func createGroup(agentIds: [UUID], title: String?) -> Conversation -
L1363func deleteConversation(id: UUID) -
L1370func sendMessage(_ text: String, in conversationId: UUID, agentMode: Bool = false, desktopControlEnabled: Bool = false) -
L1403private func streamResponse( from agent: Agent, in conversationId: UUID, history: [SpaceMessage], agentMode: Bool = false, desktopControlEnabled: Bool = false, delegationDepth: Int = 0, toolNameAllowlist: Set<String>? = nil -
L1635func updatePlaceholder(_ text: String)
-
L12@objc func extendSelectedText(_ pboard: NSPasteboard, userData: String?, error: AutoreleasingUnsafeMutablePointer<NSString>) -
L20@objc func correctGrammar(_ pboard: NSPasteboard, userData: String?, error: AutoreleasingUnsafeMutablePointer<NSString>) -
L28@objc func autoResolveText(_ pboard: NSPasteboard, userData: String?, error: AutoreleasingUnsafeMutablePointer<NSString>) -
L36@objc func cleanDesktopService(_ pboard: NSPasteboard, userData: String?, error: AutoreleasingUnsafeMutablePointer<NSString>) -
L48private func transformTextFromPasteboard( _ pboard: NSPasteboard, action: AppState.TextAssistAction, error: AutoreleasingUnsafeMutablePointer<NSString> )
-
L155private func deleteAgents(at offsets: IndexSet) -
L342private func deleteConversations(at offsets: IndexSet) -
L435private func sendMessage() -
L631private func saveKey(_ key: String, for provider: AIProvider) -
L690private func createAgent() -
L754private func createConversation()
-
L30init( role: Role, content: String, toolCallId: String? = nil, toolCalls: [ToolCall]? = nil, imageData: Data? = nil ) -
L52init(name: String, description: String, parameters: AIToolParameters) -
L66init(type: String = "object", properties: [String: AIToolProperty], required: [String] = []) -
L88init(type: String, description: String, enumValues: [String]? = nil) -
L115init(id: String, content: String?, toolCalls: [ToolCall]?, finishReason: String?, usage: AIUsage?) -
L131init(promptTokens: Int, completionTokens: Int, totalTokens: Int) -
L153init(id: String, content: String?, toolCallChunk: ToolCallChunk?, finishReason: String?, done: Bool = false)
-
L23init() -
L27deinit -
L33private func setupXPCConnection() -
L43func executePrivileged( command: String, arguments: [String] = [] ) async throws -> CommandExecutionResult -
L54func isHelperInstalled() -> Bool -
L61func installHelper() async throws
-
L23init(timeout: TimeInterval = 300) -
L30func execute( command: String, arguments: [String] = [], environment: [String: String]? = nil, workingDirectory: URL? = nil ) async throws -> CommandExecutionResult -
L93func executeStreaming( command: String, arguments: [String] = [] ) -> AsyncThrowingStream<String, Error>
-
L15private func udKey(_ provider: AIProvider) -> String -
L19func setAPIKey(_ key: String, for provider: AIProvider) throws -
L23func getAPIKey(for provider: AIProvider) throws -> String? -
L30func sendMessage( provider: AIProvider, model: String, messages: [AIMessage], systemPrompt: String? = nil, tools: [AITool]? = nil, temperature: Double? = nil, maxTokens: Int? = nil -
L58func sendMessageStream( provider: AIProvider, model: String, messages: [AIMessage], systemPrompt: String? = nil, tools: [AITool]? = nil, temperature: Double? = nil, maxTokens: Int? = nil -
L85func getAvailableModels(provider: AIProvider) async throws -> [String] -
L99private func openAIMessages(from messages: [AIMessage], systemPrompt: String?) -> [[String: Any]] -
L148private func anthropicMessages(from messages: [AIMessage]) -> [[String: Any]] -
L204private func geminiContents(from messages: [AIMessage]) -> [[String: Any]] -
L250private func openAIToolDefs(_ tools: [AITool]) -> [[String: Any]] -
L258private func anthropicToolDefs(_ tools: [AITool]) -> [[String: Any]] -
L265private func geminiToolDefs(_ tools: [AITool]) -> [[String: Any]] -
L277private func encodeArgs(_ args: [String: String]) -> String -
L283private func decodeArgs(_ jsonStr: String) -> [String: String] -
L290private func toArgStrings(_ dict: [String: Any]) -> [String: String] -
L298private func sendOpenAIMessage( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, maxTokens: Int? ) async throws -> AIResponse -
L339private func sendOpenAIStream( model: String, messages: [AIMessage], systemPrompt: String?, temperature: Double?, maxTokens: Int? ) async throws -> AsyncThrowingStream<AIStreamChunk, Error> -
L386private func openAIRequest( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, maxTokens: Int?, stream: Bool ) throws -> URLRequest -
L419private func openAIUsage(_ json: [String: Any]) -> AIUsage? -
L430private func sendAnthropicMessage( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, maxTokens: Int? ) async throws -> AIResponse -
L471private func sendAnthropicStream( model: String, messages: [AIMessage], systemPrompt: String?, temperature: Double?, maxTokens: Int? ) async throws -> AsyncThrowingStream<AIStreamChunk, Error> -
L525private func anthropicRequest( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, maxTokens: Int?, stream: Bool ) throws -> URLRequest -
L556private func anthropicUsage(_ json: [String: Any]) -> AIUsage? -
L567private func sendGeminiMessage( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, maxTokens: Int? ) async throws -> AIResponse -
L607private func sendGeminiStream( model: String, messages: [AIMessage], systemPrompt: String?, temperature: Double?, maxTokens: Int? ) async throws -> AsyncThrowingStream<AIStreamChunk, Error> -
L655private func geminiRequest( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, maxTokens: Int?, stream: Bool ) throws -> URLRequest -
L687private func geminiUsage(_ json: [String: Any]) -> AIUsage? -
L698private func sendOllamaMessage( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double? ) async throws -> AIResponse -
L747private func sendOllamaStream( model: String, messages: [AIMessage], systemPrompt: String?, temperature: Double? ) async throws -> AsyncThrowingStream<AIStreamChunk, Error> -
L794private func ollamaRequest( model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool], temperature: Double?, stream: Bool ) throws -> URLRequest -
L813private func fetchOllamaModels() async throws -> [String] -
L822private func ollamaUsage(_ json: [String: Any]) -> AIUsage? -
L832private func checkHTTP(_ response: URLResponse, data: Data?, provider: String) throws
-
L16init(dbQueue: DatabaseQueue = DatabaseManager.shared.dbQueue) -
L20func create(_ agent: Agent) async throws -
L26func update(_ agent: Agent) async throws -
L35func delete(id: UUID) async throws -
L41func get(id: UUID) async throws -> Agent? -
L47func getAll() async throws -> [Agent] -
L53func getByStatus(_ status: AgentStatus) async throws -> [Agent]
-
L16init(dbQueue: DatabaseQueue = DatabaseManager.shared.dbQueue) -
L20func create(_ session: ExecutionSession) async throws -
L26func update(_ session: ExecutionSession) async throws -
L32func get(id: UUID) async throws -> ExecutionSession? -
L38func getForAgent(agentId: UUID, limit: Int = 50) async throws -> [ExecutionSession] -
L48func getRecent(limit: Int = 50) async throws -> [ExecutionSession]
-
L23init( id: UUID = UUID(), name: String, configuration: AgentConfiguration, capabilities: [AgentCapability] = [], status: AgentStatus = .idle, createdAt: Date = Date(), updatedAt: Date = Date() -
L65init( provider: AIProvider, model: String, systemPrompt: String? = nil, temperature: Double? = 0.7, maxTokens: Int? = 4096, enabledTools: [String] = [], securityPolicy: SecurityPolicy = SecurityPolicy() -
L208init( allowSudo: Bool = false, requireApproval: Bool = true, whitelistedCommands: [String] = [], blacklistedCommands: [String] = ["rm -rf /", "dd if=/dev/zero", ":() -
L236static func < (lhs: RiskLevel, rhs: RiskLevel) -> Bool
-
L82func encode(to encoder: Encoder) throws -
L116init(from decoder: Decoder) throws -
L162init( id: UUID = UUID(), title: String = "New Automation", notes: String = "", trigger: AutomationTrigger = .manual, agentId: UUID? = nil, isEnabled: Bool = true )
-
L20func displayTitle(agents: [Agent]) -> String -
L28init( id: UUID = UUID(), title: String? = nil, participantIds: [UUID], messages: [SpaceMessage] = [], createdAt: Date = Date(), updatedAt: Date = Date() -
L62init( id: UUID = UUID(), role: SpaceMessageRole, content: String, agentId: UUID? = nil, timestamp: Date = Date(), isStreaming: Bool = false, imageData: Data? = nil
-
L23init( id: UUID = UUID(), agentId: UUID, userPrompt: String, steps: [ExecutionStep] = [], result: ExecutionResult? = nil, status: ExecutionStatus = .running, startedAt: Date = Date(), -
L59init( id: UUID = UUID(), type: ExecutionStepType, content: String, timestamp: Date = Date(), metadata: [String: String]? = nil ) -
L139init( success: Bool, output: String? = nil, error: String? = nil, tokensUsed: Int? = nil, costEstimate: Double? = nil ) -
L163init( id: String = UUID().uuidString, name: String, arguments: [String: String], result: ToolResult? = nil ) -
L185init( success: Bool, output: String? = nil, error: String? = nil, executionTime: TimeInterval? = nil )
-
L234private func sendMessage() -
L336private func createAgent() -
L393private func createConversation()
-
L14func sendMessage( provider: AIProvider, model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool]?, temperature: Double?, maxTokens: Int? -
L25func sendMessageStream( provider: AIProvider, model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool]?, temperature: Double?, maxTokens: Int? -
L36func getAvailableModels(provider: AIProvider) async throws -> [String] }
-
L13func create(_ agent: Agent) async throws func update(_ agent: Agent) async throws -
L14func update(_ agent: Agent) async throws func delete(id: UUID) async throws -
L15func delete(id: UUID) async throws func get(id: UUID) async throws -> Agent? func getAll() async throws -> [Agent] func getByStatus(_ status: AgentStatus) async throws -> [Agent] } -
L16func get(id: UUID) async throws -> Agent? func getAll() async throws -> [Agent] func getByStatus(_ status: AgentStatus) async throws -> [Agent] } -
L17func getAll() async throws -> [Agent] func getByStatus(_ status: AgentStatus) async throws -> [Agent] } -
L18func getByStatus(_ status: AgentStatus) async throws -> [Agent] } -
L24func create(_ session: ExecutionSession) async throws func update(_ session: ExecutionSession) async throws -
L25func update(_ session: ExecutionSession) async throws func get(id: UUID) async throws -> ExecutionSession? func getForAgent(agentId: UUID, limit: Int) async throws -> [ExecutionSession] func getRecent(limit: Int) async throws -> [ExecutionSession] } -
L26func get(id: UUID) async throws -> ExecutionSession? func getForAgent(agentId: UUID, limit: Int) async throws -> [ExecutionSession] func getRecent(limit: Int) async throws -> [ExecutionSession] } -
L27func getForAgent(agentId: UUID, limit: Int) async throws -> [ExecutionSession] func getRecent(limit: Int) async throws -> [ExecutionSession] } -
L28func getRecent(limit: Int) async throws -> [ExecutionSession] }
-
L36init( aiRepository: AIProviderRepositoryProtocol = AIProviderRepository(), sessionRepository: SessionRepositoryProtocol = SessionRepository(), authorizationManager: AuthorizationManager = .shared, toolRegistry: ToolRegistry = .shared ) -
L51func execute( agent: Agent, userPrompt: String ) async throws -
L101func stop() async -
L115private func executionLoop( agent: Agent, session: ExecutionSession, messages: inout [AIMessage], tools: [AITool] ) async throws -
L174private func processToolCall( _ toolCall: ToolCall, agent: Agent, session: ExecutionSession, messages: inout [AIMessage] ) async throws -
L208private func addStep( _ type: ExecutionStepType, content: String ) async -
L229private func completeSession( success: Bool, error: Error? = nil ) async
-
L16private func expandPath(_ path: String) -> String -
L23static func createDirectory(path: String) async throws -> String -
L33static func deleteFile(path: String) async throws -> String -
L42static func moveFile(source: String, destination: String) async throws -> String -
L51static func copyFile(source: String, destination: String) async throws -> String -
L60static func searchFiles(directory: String, pattern: String) async throws -> String -
L75static func getFileInfo(path: String) async throws -> String -
L113static func appendToFile(path: String, content: String) async throws -> String -
L133static func getCurrentDatetime() async throws -> String -
L140static func getSystemInfo() async throws -> String -
L169static func listRunningProcesses() async throws -> String -
L186static func openApplication(name: String) async throws -> String -
L238static func openURL(url: String) async throws -> String -
L258static func fetchURL(url urlString: String) async throws -> String -
L269static func httpRequest( url urlString: String, method: String, headers: String?, body: String? ) async throws -> String -
L307static func webSearch(query: String) async throws -> String -
L315private static func braveSearch(query: String, apiKey: String) async throws -> String -
L340private static func duckDuckGoSearch(query: String) async throws -> String -
L367static func status(directory: String) async throws -> String -
L382static func log(directory: String, limit: Int) async throws -> String -
L397static func diff(directory: String, staged: Bool) async throws -> String -
L415static func commit(directory: String, message: String) async throws -> String -
L442static func branch(directory: String, create: String?) async throws -> String -
L470static func clone(url: String, destination: String) async throws -> String -
L487static func searchInFile(path: String, pattern: String) async throws -> String -
L505static func replaceInFile(path: String, search: String, replacement: String) async throws -> String -
L520static func calculate(expression: String) async throws -> String -
L534static func parseJSON(input: String) async throws -> String -
L543static func encodeBase64(input: String) async throws -> String -
L550static func decodeBase64(input: String) async throws -> String -
L558static func countLines(path: String) async throws -> String -
L572static func read() async throws -> String -
L578static func write(content: String) async throws -> String -
L589static func takeScreenshot(path: String) async throws -> String -
L612static func runPython(code: String) async throws -> String -
L630static func runNode(code: String) async throws -> String -
L654static func save(key: String, value: String) async throws -> String -
L659static func read(key: String) async throws -> String -
L666static func list() async throws -> String -
L677static func delete(key: String) async throws -> String -
L692static func listDevices() async throws -> String -
L706static func connectDevice(device: String, action: String) async throws -> String -
L728static func scanDevices() async throws -> String -
L738private static func shell(_ cmd: String) async throws -> String -
L755static func getVolume() async throws -> String -
L768static func setVolume(level: Int) async throws -> String -
L778static func setMute(muted: Bool) async throws -> String -
L790static func listAudioDevices() async throws -> String -
L803static func setOutputDevice(device: String) async throws -> String -
L818private static func shell(_ cmd: String) async throws -> String -
L836static func control(action: String, app: String?) async throws -> String -
L878private static func shell(_ cmd: String) async throws -> String -
L898static func getScreenInfo() async throws -> String -
L927private static func toQuartzPoint(x: Double, y: Double, frame: CGRect) -> CGPoint -
L940static func moveMouse(x: Double, y: Double) async throws -> String -
L949static func clickMouse(x: Double, y: Double, button: String, clicks: Int) async throws -> String -
L973static func scrollMouse(x: Double, y: Double, deltaX: Int, deltaY: Int) async throws -> String -
L986static func typeText(text: String) async throws -> String -
L1001static func pressKey(key: String, modifiers: String) async throws -> String -
L1030static func runAppleScript(script: String) async throws -> String -
L1049static func iworkWriteText(text: String) async throws -> String -
L1065static func iworkGetDocumentInfo() async throws -> String -
L1109static func iworkReplaceText(findText: String, replaceText: String, allOccurrences: Bool = true) async throws -> String -
L1147static func iworkInsertAfterAnchor(anchorText: String, newText: String) async throws -> String -
L1180private static func keyNameToCode(_ name: String) -> Int
-
L27private init() -
L34func register(_ tool: RegisteredTool) -
L39func getTool(named name: String) -> RegisteredTool? -
L44func getAllTools() -> [RegisteredTool] -
L49func getToolsForAI(enabledNames: [String] = []) -> [AITool] -
L61func getToolsForAIWithoutDesktopControl(enabledNames: [String] = []) -> [AITool] -
L79private func registerBuiltInTools() -
L1351func toAITool() -> AITool -
L1421static func readFile(path: String) async throws -> String -
L1430static func writeFile(path: String, content: String) async throws -> String -
L1437static func listDirectory(path: String) async throws -> String -
L1451static func executeCommand( command: String, workingDirectory: String? ) async throws -> String
-
L17func startRecording() async throws -
L44func stopRecordingAndTranscribe() async throws -> String -
L70func recordAndTranscribeAutomatically( maxDuration: TimeInterval = 18.0, silenceThresholdDB: Float = -42.0, silenceDuration: TimeInterval = 1.2, minimumSpeechDuration: TimeInterval = 0.8 ) async throws -> String -
L92func speak(text: String) async throws -
L112private func requestMicrophoneAccessIfNeeded() async throws -> Bool -
L130private func transcribeAudio(at fileURL: URL) async throws -> String -
L160private func synthesizeSpeech(from text: String) async throws -> Data -
L184private func openAIKey() throws -> String -
L192private func appendField(_ name: String, value: String, to body: inout Data, boundary: String) -
L198private func appendFile( _ name: String, filename: String, mimeType: String, data: Data, to body: inout Data, boundary: String ) -
L213private func checkHTTP(response: URLResponse, data: Data) throws -
L223private func waitForAutoStop( maxDuration: TimeInterval, silenceThresholdDB: Float, silenceDuration: TimeInterval, minimumSpeechDuration: TimeInterval ) async throws -
L260private func transcribeWithRealtimeVAD(maxDuration: TimeInterval) async throws -> String -
L376private func stopRealtimeCapture() -
L384private func sendRealtimeEvent(_ event: [String: Any], on socket: URLSessionWebSocketTask) async throws -
L392private func convertBuffer( _ inputBuffer: AVAudioPCMBuffer, with converter: AVAudioConverter, to outputFormat: AVAudioFormat ) -> AVAudioPCMBuffer? -
L420private func pcm16Data(from buffer: AVAudioPCMBuffer) -> Data?
-
L25private init() -
L31private func setupDatabase() -
L58private func runMigrations() throws
-
L28init(row: Row) throws -
L57func encode(to container: inout PersistenceContainer) throws -
L90init(row: Row) throws -
L119func encode(to container: inout PersistenceContainer) throws
-
L54private init() -
L58public func start() -
L96public func stop() -
L108private func handleListenerState(_ state: NWListener.State) -
L125private func accept(_ connection: NWConnection) -
L147private func removeConnection(_ connection: NWConnection) -
L155private func receiveLoop(on connection: NWConnection, buffer: inout Data) -
L161private func receiveNext(on connection: NWConnection, bufferBox: BufferBox) -
L177private func drainBuffer(_ data: Data, connection: NWConnection) async -
L200private func execute(_ command: RemoteCommandMessage) async -> RemoteResponseMessage -
L406private func runAppleScript(_ source: String) async throws -> String -
L424private func runShell(_ command: String) async throws -> String -
L448private func keyCode(for key: String) -> Int -
L467private func buildModifiers(from modString: String) -> String -
L479private func encodeResponse(_ response: RemoteResponseMessage) throws -> Data -
L514init(id: UUID, success: Bool, result: String, error: String? = nil, imageData: String? = nil)
-
L31private init() -
L38private func startMonitoring() -
L48func stopMonitoring()
-
L51private init() -
L56func assessRisk( command: String, target: String?, policy: SecurityPolicy ) -> RiskLevel -
L105func shouldAutoApprove( riskLevel: RiskLevel, policy: SecurityPolicy ) -> Bool -
L113func validateCommand( _ command: String, policy: SecurityPolicy ) throws -
L142private func generateReasoning( command: String, riskLevel: RiskLevel, target: String? ) -> String -
L165private func generateImpact( command: String, target: String? ) -> String
-
L20private init() -
L24func refreshAll() -
L35func checkAccessibility() -
L40func requestAccessibility() -
L48func checkScreenRecording() -
L52func requestScreenRecording() -
L59func checkFullDiskAccess() -
L65func requestFullDiskAccess() -
L71func checkMicrophone() -
L75func requestMicrophone() -
L91func checkCamera() -
L95func requestCamera() -
L111func checkHelperStatus() -
L116func installHelper() -
L124func requestAutomation() -
L128func requestInputMonitoring() -
L132func requestFullAccess() -
L172private func openSystemSettings(path: String) -
L177private func hasUsageDescription(_ key: String) -> Bool
-
L12private func formatToolName(_ name: String) -> String -
L25init(agent: Agent) -
L355private func fetchModels() -
L531init(_ label: String, @ViewBuilder content: @escaping () -> Content) -
L598func sizeThatFits(proposal: ProposedViewSize, subviews: Subviews, cache: inout ()) -> CGSize -
L603func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout ()) -
L614init(in maxWidth: CGFloat, subviews: Subviews, spacing: CGFloat)
-
L17private func isRegularConversation(_ conv: Conversation) -> Bool -
L282private func create()
-
L67private func chatHeader(conv: Conversation) -> some View -
L123private func messagesArea(conv: Conversation) -> some View -
L152private func emptyConversationHint(conv: Conversation) -> some View -
L172private func sendMessage() -
L179private func agentFor(_ message: SpaceMessage) -> Agent? -
L184private func scrollToBottom(conv: Conversation, proxy: ScrollViewProxy) -
L191private func loadSettings(for conv: Conversation) -
L198private func saveSettings(for conv: Conversation) -
L205private func handleVoiceAction() -
L219private func handleVoicePlayback(for conv: Conversation) -
L688private func performSend() -
L694private func updateMentionState() -
L703private func insertMention(_ agent: Agent)
-
L94private init() -
L106@objc private func appActivated(_ note: Notification) -
L128func snapshot() -> (todaySeconds: TimeInterval, topAppName: String?, topAppSeconds: TimeInterval, weekly: [(String, Double)]) -
L139private func bootstrapFrontmostApp() -
L149private func rotateDayIfNeeded(now: Date) -
L163private func flushCurrentSegment(until now: Date) -
L175private func weeklyTotals() -> [(String, Double)] -
L187private func storedDayStart() -> Date? -
L192private func loadPersisted() -
L199private func persist() -
L231private init() -
L260func requestAuthorizationIfNeeded() async -
L278func requestAuthorization() async -
L295private func authorizationRequestStatus() async -> HKAuthorizationRequestStatus -
L305func loadAllMetrics() async -
L339func metricsForCategory(_ category: HealthCategory) -> [HealthMetric] -
L352private func loadActivityMetrics() async -> [HealthMetric] -
L379private func loadScreenTimeFallbackMetrics() -> [HealthMetric] -
L406private func formatDuration(_ seconds: TimeInterval) -> String -
L416private func loadHeartMetrics() async -> [HealthMetric] -
L445private func loadBodyMetrics() async -> [HealthMetric] -
L467private func loadSleepMetrics() async -> [HealthMetric] -
L470func fmt(_ minutes: Double) -> String -
L500private func loadWorkoutMetrics() async -> [HealthMetric] -
L518private func loadVitalsMetrics() async -> [HealthMetric] -
L535private func fetchDailySum(_ id: HKQuantityTypeIdentifier, unit: HKUnit) async -> Double? -
L547private func fetchLatest(_ id: HKQuantityTypeIdentifier, unit: HKUnit) async -> Double? -
L558private func fetchWeeklySum(_ id: HKQuantityTypeIdentifier, unit: HKUnit) async -> [(label: String, value: Double)] -
L579private func fetchWeeklyAvg(_ id: HKQuantityTypeIdentifier, unit: HKUnit) async -> [(label: String, value: Double)] -
L600private func fetchSleepMinutes() async -> (inBed: Double, asleep: Double, deep: Double, rem: Double) -
L634private func fetchMindfulMinutes() async -> Double -
L647private func fetchRecentWorkouts(limit: Int) async -> [HKWorkout] -
L659func analyzeCategory(_ category: HealthCategory, agent: Agent?) async
-
L33func show(agents: [Agent], appState: AppState, onSubmit: @escaping (_ text: String, _ agentId: UUID?) -> Void) -
L105func hide() -
L111func toggle(agents: [Agent], appState: AppState, onSubmit: @escaping (_ text: String, _ agentId: UUID?) -> Void) -
L260private func submit()
-
L15func show(message: String) -
L34private func createPanel(message: String) -
L67private func update(message: String) -
L78private func hide() -
L89private func measuredSize(for view: HotkeyToastView) -> NSSize -
L105private func position(panel: NSPanel, size: NSSize)
-
L70func executeCurrentAgent() async -
L780private func syncUIFromTrigger() -
L805private func syncTriggerFromUI() -
L939private func fetchModels() -
L955private func createAgent()
-
L25func isIWorkApp() -> Bool -
L102func show(onAction: @escaping (QuickActionType) -> Void) -
L108func hide() -
L120func toggle(onAction: @escaping (QuickActionType) -> Void) -
L128func triggerAction(_ type: QuickActionType) -
L133private func createPanel() -
L188func addToolCall(_ toolName: String, args: [String: String]) -
L207func show(initialText: String = "") -
L212func hide() -
L225func updateText(_ text: String) -
L232func addToolCall(_ toolName: String, args: [String: String]) -
L237func setConversationId(_ id: UUID) -
L243func prepareForNewResponse() -
L251private func resizePanel() -
L271private func calculateContentHeight() -> CGFloat -
L280private func createPanel(initialText: String) -
L543private func sendUserInput() -
L549private func handleVoiceTap()
-
L24func show(onStop: @escaping () -> Void) -
L31func hide() -
L40private func createPanel(onStop: @escaping () -> Void)
-
L310private func loadSystemAccount() -
L450private func apiKeySection( provider: AIProvider, icon: String, color: Color, title: String, placeholder: String, key: Binding<String> ) -> some View -
L494private func loadKeyStatus() -
L503private func save(_ key: String, for provider: AIProvider)
-
L237private func sendMessage() -
L340private func createAgent() -
L397private func createConversation()
-
L19func run() -
L32func executeCommand( _ command: String, withAuthorization: Data ) throws -> String
-
L47func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil ) -> Bool -
L60func applicationWillResignActive(_ application: UIApplication) -
L65func applicationDidBecomeActive(_ application: UIApplication) -
L69private func configureAudioSession()
-
L19private init() -
L25public func getBrightness() -> Double -
L34public func setBrightness(_ level: Double, animated: Bool = true) -
L47public func increaseBrightness(step: Double = 0.1) -
L54public func decreaseBrightness(step: Double = 0.1)
-
L51private init() -
L62private func setupAudioSession() -
L71private func attachVolumeView() -
L79private func setupNotifications() -
L98private func startPolling() -
L109private func refreshNowPlaying() -
L125private func refreshPlaybackState() -
L129private func refreshVolume() -
L135public func play() -
L140public func pause() -
L145public func togglePlayPause() -
L149public func nextTrack() -
L156public func previousTrack() -
L167public func stop() -
L172public func seek(to position: TimeInterval) -
L180public func setVolume(_ level: Double) -
L191public func increaseVolume(step: Double = 0.1) -
L196public func decreaseVolume(step: Double = 0.1) -
L200deinit
-
L27public init(recipients: [String], body: String = "", subject: String? = nil) -
L46private init() -
L66public init(request: MessageComposeRequest, completion: @escaping (MessageComposeResult) -> Void) -
L71public func makeUIViewController(context: Context) -> MFMessageComposeViewController -
L82public func updateUIViewController(_ uiViewController: MFMessageComposeViewController, context: Context) -
L84public func makeCoordinator() -> Coordinator -
L90init(completion: @escaping (MessageComposeResult) -> Void) -
L94public func messageComposeViewController( _ controller: MFMessageComposeViewController, didFinishWith result: MFMessageComposeResult ) -
L116public func body(content: Content) -> some View -
L148func messageComposeSheet(_ request: Binding<MessageComposeRequest?>) -> some View
-
L45private override init() -
L54public func refresh() -
L74private func fetchWeather(for location: CLLocation) async -
L121private func applyResponse(_ response: OpenMeteoResponse) -
L139public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) -
L145public func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) -
L149public func locationManagerDidChangeAuthorization(_ manager: CLLocationManager)
-
L42public init() -
L47public func startBrowsing() -
L84public func stopBrowsing() -
L92private func handleBrowseResults(_ results: [NWBrowser.Result]) -
L110private func friendlyName(from serviceName: String) -> String -
L117deinit
-
L41public init() -
L45public func connect(to device: MacDevice) async throws -
L62public func disconnect() -
L72public func send(_ command: RemoteCommand, timeout: TimeInterval = 15) async throws -> RemoteCommandResponse -
L104private func handleConnectionState( _ nwState: NWConnection.State, continuation: CheckedContinuation<Void, Error>? ) -
L130private func startReceiving() -
L134private func receiveLoop() -
L158private func drainBuffer() -
L176private func handleResponse(_ response: RemoteCommandResponse) -
L185private func cancelAllPending(with error: Error) -
L194private func makeTCPParameters() -> NWParameters -
L202public func setBrightness(_ level: Double) async throws -> RemoteCommandResponse -
L207public func setVolume(_ level: Double) async throws -> RemoteCommandResponse -
L212public func setMute(_ muted: Bool) async throws -> RemoteCommandResponse -
L217public func mediaPlay() async throws -> RemoteCommandResponse -
L221public func mediaPause() async throws -> RemoteCommandResponse -
L225public func mediaNext() async throws -> RemoteCommandResponse -
L229public func mediaPrevious() async throws -> RemoteCommandResponse -
L233public func mediaGetInfo() async throws -> RemoteCommandResponse -
L237public func screenshot() async throws -> RemoteCommandResponse -
L241public func typeText(_ text: String) async throws -> RemoteCommandResponse -
L246public func pressKey(_ key: String, modifiers: String = "") async throws -> RemoteCommandResponse -
L251public func openApplication(_ name: String) async throws -> RemoteCommandResponse -
L256public func runAppleScript(_ script: String) async throws -> RemoteCommandResponse -
L261public func getSystemInfo() async throws -> RemoteCommandResponse -
L265public func ping() async throws -> RemoteCommandResponse -
L269deinit
-
L25public init( name: String, serviceName: String, endpoint: NWEndpoint, connectionState: ConnectionState = .discovered ) -
L75public static func == (lhs: MacDevice, rhs: MacDevice) -> Bool
-
L19public init( commandType: CommandType, parameters: [String: String] = [:] ) -
L170public init( id: UUID, success: Bool, result: String, error: String? = nil, imageData: String? = nil ) -
L184public static func failure(id: UUID, error: String) -> RemoteCommandResponse -
L194public static func encode<T: Encodable>(_ value: T) throws -> Data -
L202public static func decode<T: Decodable>(_ type: T.Type, from data: Data) throws -> T
-
L49public init() -
L94func weatherInfo(for code: Int, isDay: Bool) -> (description: String, sfSymbol: String)
-
L69public init() -
L76private func bindDiscovery() -
L90private func bindClient() -
L103public func startBrowsing() -
L107public func stopBrowsing() -
L113public func connect(to device: MacDevice) -
L132public func disconnect() -
L141public func refreshRemoteState() async -
L151private func runCommand(_ block: @escaping () async throws -> RemoteCommandResponse) -
L171public func setRemoteBrightness(_ level: Double) -
L181public func setRemoteVolume(_ level: Double) -
L189public func toggleRemoteMute() -
L200public func remotePlay() -
L206public func remotePause() -
L212public func remoteNext() -
L218public func remotePrevious() -
L225public func remoteGetNowPlaying() -
L238private func parseNowPlaying(_ text: String) -
L257public func takeRemoteScreenshot() -
L270public func sendTypeText() -
L283public func sendOpenApp() -
L296public func runAppleScript() -
L308public func runShellCommand() -
L325public func pressKey(_ key: String, modifiers: String = "")
-
L67public init() -
L77private func bindMedia() -
L107private func bindWeather() -
L121private func refreshBattery() -
L126private func setupBatteryNotifications() -
L139public func refreshBrightness() -
L145public func togglePlayPause() -
L146public func nextTrack() -
L147public func previousTrack() -
L149public func setVolume(_ level: Double) -
L155public func refreshWeather() -
L161public func composeMessage(to recipients: [String], body: String = "")
-
L18public init()
-
L17public init()
-
L23public init() -
L156func makeUIView(context: Context) -> MPVolumeView -
L161func updateUIView(_ uiView: MPVolumeView, context: Context) -
L247private func formatTime(_ t: TimeInterval) -> String
-
L16override func setUp() async throws -
L27func testEngineInitialization() -
L33func testExecutionWithSimplePrompt() async throws -
L58private func createTestAgent() -> Agent -
L75func sendMessage( provider: AIProvider, model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool]?, temperature: Double?, maxTokens: Int? -
L96func sendMessageStream( provider: AIProvider, model: String, messages: [AIMessage], systemPrompt: String?, tools: [AITool]?, temperature: Double?, maxTokens: Int? -
L110func getAvailableModels(provider: AIProvider) async throws -> [String] -
L120func create(_ session: ExecutionSession) async throws -
L124func update(_ session: ExecutionSession) async throws -
L130func get(id: UUID) async throws -> ExecutionSession? -
L134func getForAgent(agentId: UUID, limit: Int) async throws -> [ExecutionSession] -
L138func getRecent(limit: Int) async throws -> [ExecutionSession]
-
L14override func setUp() -
L18func testRiskAssessmentForDangerousCommand() -
L29func testRiskAssessmentForSudoCommand() -
L40func testRiskAssessmentForSafePath() -
L51func testRiskAssessmentForSensitivePath() -
L62func testCommandValidationWithBlacklist() -
L72func testCommandValidationWithoutSudo() -
L87func testAutoApproveThreshold()
-
L22def main() -> None
-
L22def main() -> None
-
L52def should_skip(path: Path) -> bool -
L59def iter_source_files(root: Path) -> Iterable[Path] -
L88def clean_signature(sig: str) -> str -
L97def parse_swift(path: Path) -> list[FunctionEntry] -
L140def parse_python(path: Path) -> list[FunctionEntry] -
L176def parse_shell(path: Path) -> list[FunctionEntry] -
L196def parse_file(path: Path) -> list[FunctionEntry] -
L204def collect_functions() -> list[FunctionEntry] -
L214def find_changes_in_worktree() -> tuple[dict[str, list[str]], dict[str, list[str]]] -
L244def is_func_signature(text: str, path: str) -> bool -
L261def dedupe(values: list[str]) -> list[str] -
L274def untracked_function_files(entries: list[FunctionEntry]) -> dict[str, list[FunctionEntry]] -
L300def write_reference(entries: list[FunctionEntry]) -> None -
L338def write_updates(entries: list[FunctionEntry]) -> None -
L397def main() -> None
Getting started
Core concepts
Features
Reference