import type { ExecutionHostId } from '../../shared/execution-host' import type { ExternalAutomationManager } from '../../shared/automations/external/external-automation' import type { AutomationOwnerRef } from '../../shared/automations/ownership/automation-owner-ref' import type { ScopedExternalManagerActionRequest, ScopedExternalManagerListRequest } from '../../shared/external-automation-scope' import type { AutomationsChangedPayload } from '../../shared/runtime-client-events' export type ExternalAutomationManagerResult = { /** Null once a probe succeeded and found no manager configured for this scope. */ manager: ExternalAutomationManager | null error: string | null updatedAt: number } // Automation CRUD uses runtime RPC; this IPC API handles desktop-only calls. export type AutomationsApi = { listExternalManagerForOwner: ( request: ScopedExternalManagerListRequest ) => Promise runExternalActionForOwner: (request: ScopedExternalManagerActionRequest) => Promise retainExternalScopes: (request: { owners: readonly AutomationOwnerRef[] }) => Promise snapshotWorkspaceName: (args: { workspaceId: string hostId: ExecutionHostId displayName: string }) => Promise onChanged: (callback: (payload: AutomationsChangedPayload) => void) => () => void }