mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 17:47:40 +00:00
* fix(persistence): session, automation-label writes take the workspace's host; exempt minted-unique folder and group ids (R4-2c) * fix(persistence): keep the session removal's spill rule; the twin guard was unreachable (review)
48 lines
1.9 KiB
TypeScript
48 lines
1.9 KiB
TypeScript
import type { ExecutionHostId } from '../../shared/execution-host'
|
|
import type {
|
|
AutomationDispatchRequest,
|
|
AutomationDispatchResult,
|
|
AutomationPrecheckResult,
|
|
AutomationRun,
|
|
ExternalAutomationManager
|
|
} from '../../shared/automations-types'
|
|
import type { AutomationOwnerRef } from '../../shared/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
|
|
}
|
|
|
|
/**
|
|
* Orca automation CRUD rides the local runtime RPC surface (`runtime:call`),
|
|
* so this IPC api carries only what stays desktop-native: the external-manager
|
|
* scope (probes run on this computer) and the dispatch-loop plumbing.
|
|
*/
|
|
export type AutomationsApi = {
|
|
listExternalManagerForOwner: (
|
|
request: ScopedExternalManagerListRequest
|
|
) => Promise<ExternalAutomationManagerResult>
|
|
runExternalActionForOwner: (request: ScopedExternalManagerActionRequest) => Promise<void>
|
|
retainExternalScopes: (request: { owners: readonly AutomationOwnerRef[] }) => Promise<void>
|
|
runPrecheck: (args: {
|
|
automationId: string
|
|
runId: string
|
|
}) => Promise<AutomationPrecheckResult | null>
|
|
markDispatchResult: (result: AutomationDispatchResult) => Promise<AutomationRun>
|
|
snapshotWorkspaceName: (args: {
|
|
workspaceId: string
|
|
hostId: ExecutionHostId
|
|
displayName: string
|
|
}) => Promise<number>
|
|
rendererReady: () => Promise<void>
|
|
onDispatchRequested: (callback: (request: AutomationDispatchRequest) => void) => () => void
|
|
onChanged: (callback: (payload: AutomationsChangedPayload) => void) => () => void
|
|
}
|