Native API
System-level APIs exposed through Electron IPC channels, registered inmain.jsand organized per domain insrc/main/handlers/. The bridge is window.electronAPI.
Two corrections to this page
The only bridge preload.js exposes is window.electronAPI. The previous version of this page routed every example through a different global that no preload creates, so each one threw a TypeError before reaching the channel it named.
The API tables below are a design reference, not a list you can call. Of the 61 methods this page listed, 46 have no IPC channel of that name in either the preload bridge or the main process — there is no read-file, no http-request, no press-hot-key. The code examples below were rewritten against methods verified to exist; the tables are kept because the capability modules may still live in src/lib/ with nothing exposing them. See aartiq-browser/docs-audit/feature-triage.md.
61
Documented APIs
15
Reachable APIs
46
Unreachable APIs
4
Visual APIs
4
Apple AI APIs
macOS Native AI
Apple Intelligence Paths
Aartiq ships a native Swift helper for readiness checks, summaries, and Apple image generation. Apple's platform docs also point to more advanced integrations through Writing Tools, App Intents assistant schemas, and native Image Playground interfaces.
Foundation Models
Apple's on-device language model. Reached through the compiled helper, gated on macOS 26.0. Not a general-purpose generation API: Aartiq calls it to summarize.
src/lib/apple-intelligence.swift
Image Playground
Native image generation, gated on macOS 15.1. Returns a file path, not base64.
src/lib/apple-intelligence.swift
Genmoji
Custom emoji from a description, gated on macOS 15.4. Same helper, different command.
src/lib/apple-intelligence.swift
Apple Intelligence panel
The native SwiftUI surface that calls the summary and image endpoints on the loopback bridge.
src/lib/native-panels/AppleIntelligencePanelView.swift
App Intents
Twenty intents registered for Siri, five of which call a bridge route that is not served. See the Apple integration page for which ones work.
src/lib/native-panels/AppIntents.swift
Writing Tools
Not implemented. No code path calls the macOS Writing Tools service. The rewrite box in the panel is Aartiq's own prompt box and is not relabelled to cover this row.
Available APIs
API Categories
System APIs
Control system-level functions like displays, power, and system preferences.
src/main/handlers/system-handlers.js
getSystemInfo()SystemInfoGet CPU, memory, disk info
getDisplays()Display[]List all connected displays
setDisplayMode()voidChange resolution, refresh rate
getSystemPreferences()PreferencesGet macOS system preferences
setSystemPreference()voidUpdate system preferences
lockScreen()voidLock the computer
sleep()voidPut display to sleep
restart()voidRestart the system
shutdown()voidShut down the system
Implementation
Code Examples
System APIs Example
// window.electronAPI is the only bridge preload.js exposes. // Earlier examples on this page called a different global and threw. const platform = await window.electronAPI.getPlatform(); // 'darwin' | 'win32' | 'linux' const isOnline = await window.electronAPI.getIsOnline(); console.log(platform, isOnline);
Reference
Type Definitions
TypeScript Definitions
// Response shapes, transcribed from the code.
//
// Every field of ResponsePayload in src/lib/apple-intelligence.swift. The
// optional fields are omitted when the matching command is unavailable, so
// read the availability flag before the value.
interface AppleIntelligenceResponse {
success: boolean;
error?: string;
// Every command
available?: boolean;
osVersion?: string;
// Summaries, via Foundation Models. macOS 26.0+
supportsSummaries?: boolean;
summaryAvailable?: boolean;
summaryReason?: string; // present when it is unavailable
summary?: string;
// Image Playground. macOS 15.1+
supportsImageGeneration?: boolean;
imageAvailable?: boolean;
imageReason?: string;
imagePath?: string; // a filesystem path, not base64
availableStyles?: string[];
// Genmoji. macOS 15.4+
supportsGenmoji?: boolean;
genmojiAvailable?: boolean;
genmojiReason?: string;
genmojiPath?: string; // a filesystem path, not base64
}
// Off macOS, every one of these resolves to exactly:
// { success: false, error: APPLE_INTELLIGENCE_UNAVAILABLE }
// where the message is "Apple Intelligence is only available on macOS."
// Approval ticket, from src/lib/approval-gate.js: bound to a hash of the
// exact action and its arguments, five minute TTL, single use.
interface ApprovalTicket {
id: string;
action: string;
params: Record<string, unknown>;
riskTier: string;
expiresAt: number; // epoch milliseconds
}Best Practices
Usage Patterns
Recommended
- Always await async operations before continuing
- Use error handling for file/network operations
- Check permissions before destructive actions
- Add delays between rapid input operations
Avoid
- Rapid-fire keyboard input without delays
- Deleting files without confirmation
- Ignoring errors on system operations
- Running shutdown without user consent