mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 17:47:40 +00:00
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.
31 lines
1.1 KiB
TypeScript
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>
|
|
}
|