Main-process services
Main-process logic is organized as feature-scoped services rather than one large main process file.
src/main/services holds one module per feature area — detection, sessions, git, settings, provider usage, workspaces, and (in AgentDock Pro) the full AIgency service family — each called from the IPC handler that owns its feature area, not from each other in an ad hoc way.
Notable services
| Service | Responsibility |
|---|---|
detection-service | Resolves each agent CLI's executable path across platforms. |
session-service | Creates and drives sessions — both ordinary hand-typed conversations and, in AgentDock Pro, every AIgency task execution. |
git-service | Backs the Changes drawer and AIgency's worktree/branch operations. |
settings-service | Reads and writes the persisted Settings object. |
provider-usage-service | Resolves capacity/quota signals per provider — see Provider usage. |
aigency-service (Pro) | The scheduler itself — see AIgency scheduler. |
Why one shared session service matters
AIgency doesn't run a parallel execution engine — every task it schedules is executed through the exact same session-service a normal, hand-typed conversation uses. This is why a session started by AIgency looks and behaves identically to one you started yourself: it's not a different code path, just a different caller.