Files
orca/src/preload/api/agent-hook-api.ts
T
Neil c58591e56d fix(wsl): refuse render-driven hook checks on a stopped distro instead of booting it (#35155)
hooks:check takes an optional background flag. The sidebar setup-script prompt and the setup
guide's progress probe, which run on render, pass it: on a stopped or unverifiable WSL distro
the check answers status 'error' without opening orca.yaml over \\\\wsl.localhost, which would boot
the distro. Launch preflight and settings, user acts that start the distro anyway, are unchanged.
2026-10-28 07:33:15 -07:00

31 lines
1.1 KiB
TypeScript

import type { OrcaHooks } from '../../shared/orca-yaml-hook-types'
import type { ExecutionHostId } from '../../shared/execution-host'
import type { SetupScriptImportCandidate } from '../../shared/setup-script-imports'
export type HooksApi = {
/** `background`: a render-driven probe, refused (status 'error') rather than booting a stopped WSL distro. */
check: (args: { repoId: string; hostId?: ExecutionHostId; background?: boolean }) => Promise<{
status?: 'ok' | 'error'
hasHooks: boolean
hooks: OrcaHooks | null
mayNeedUpdate: boolean
}>
inspectSetupScriptImports: (args: {
repoId: string
hostId?: ExecutionHostId
}) => Promise<SetupScriptImportCandidate[]>
readIssueCommand: (args: { repoId: string; hostId?: ExecutionHostId }) => Promise<{
status?: 'ok' | 'error'
localContent: string | null
sharedContent: string | null
effectiveContent: string | null
localFilePath: string
source: 'local' | 'shared' | 'none'
}>
writeIssueCommand: (args: {
repoId: string
content: string
hostId?: ExecutionHostId
}) => Promise<void>
}