IPC API surface documentation for the Maestro codebase. For the main guide, see [[CLAUDE.md]].
The window.maestro API exposes the following namespaces:
settings- Get/set app settingssessions/groups- Agent and group persistenceprocess- Spawn, write, kill, resizefs- readDir, readFiledialog- Folder selectionshells- Detect available shellslogger- System logging
agents- Detect, get, config, refresh, custom paths, getCapabilitiesagentSessions- Generic provider session storage API (list, read, search, delete)agentError- Agent error handling (clearError, retryAfterError)claude- (Deprecated) Claude Code provider sessions - useagentSessionsinstead
git- Status, diff, isRepo, numstat, branches, tags, infogit- Worktree support: worktreeInfo, getRepoRoot, worktreeSetup, worktreeCheckoutgit- PR creation: createPR, checkGhCli, getDefaultBranch
web- Broadcast user input, Auto Run state, tab changes to web clientslive- Toggle live sessions, get status, dashboard URL, connected clientswebserver- Get URL, connected client counttunnel- Cloudflare tunnel: isCloudflaredInstalled, start, stop, getStatus
autorun- Document and image management for Auto Runplaybooks- Batch run configuration managementhistory- Per-agent execution history (see History API below)cli- CLI activity detection for playbook runstempfile- Temporary file management for batch processing
stats- Usage statistics: recordQuery, getAggregatedStats, exportCsv, clearOldData, getDatabaseSizestats- Auto Run tracking: startAutoRun, endAutoRun, recordTask, getAutoRunSessionsstats- Real-time updates viastats:updatedevent broadcastdocumentGraph- File watching: watchFolder, unwatchFolderdocumentGraph- Real-time updates viadocumentGraph:filesChangedevent
Per-agent history storage with 5,000 entries per agent (up from 1,000 global). Each agent's history is stored as a JSON file in ~/Library/Application Support/Maestro/history/{sessionId}.json.
window.maestro.history = {
getAll: (projectPath?, sessionId?) => Promise<HistoryEntry[]>,
add: (entry) => Promise<boolean>,
clear: (projectPath?, sessionId?) => Promise<boolean>,
delete: (entryId, sessionId?) => Promise<boolean>,
update: (entryId, updates, sessionId?) => Promise<boolean>,
// For AI context integration:
getFilePath: (sessionId) => Promise<string | null>,
listSessions: () => Promise<string[]>,
// External change detection:
onExternalChange: (handler) => () => void,
reload: () => Promise<boolean>,
};AI Context Integration: Use getFilePath(sessionId) to get the path to an agent's history file. This file can be passed directly to AI agents as context, giving them visibility into past completed tasks, decisions, and work patterns.
power- Sleep prevention: setEnabled, isEnabled, getStatus, addReason, removeReason
wakatime- WakaTime CLI management: checkCli, validateApiKey
fonts- Font detectionnotification- Desktop notifications, text-to-speechdevtools- Developer tools: open, close, toggleattachments- Image attachment management