Files
orca/src/preload/api/automation-api.ts
T
Neil c10881fa8c refactor(shared): organize execution and automation defining owners (#39776)
* refactor: import journal queue state from defining owners

* refactor(shared): organize execution and automation owners

* fix: retain type imports used by surviving test cases

* refactor: finish work item owners and refresh validation metadata

* test: infer reconnect status fixture type

* test(claude): resolve source files beside same-named directories

* test(runtime): group repository creation mock registrations
2026-11-08 06:46:09 -08:00

31 lines
1.3 KiB
TypeScript

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<ExternalAutomationManagerResult>
runExternalActionForOwner: (request: ScopedExternalManagerActionRequest) => Promise<void>
retainExternalScopes: (request: { owners: readonly AutomationOwnerRef[] }) => Promise<void>
snapshotWorkspaceName: (args: {
workspaceId: string
hostId: ExecutionHostId
displayName: string
}) => Promise<number>
onChanged: (callback: (payload: AutomationsChangedPayload) => void) => () => void
}