Skip to content

DiagnosticsDeps

Defined in: src/diagnostics.ts:31

Injectable child-process runners. Each defaults to an async execFile with a per-probe timeout (DIAGNOSTICS_PROBE_TIMEOUT_MS) — never execFileSync, so a hung binary can’t block Bun’s single thread. Tests override these so no real binaries are needed.

optional anyForgeRepo?: () => boolean

Defined in: src/diagnostics.ts:51

Returns true when at least one configured repo has repoMode “forge”. Default () => true preserves today’s behavior (gh failure = error).

boolean


optional anyLightweightRepo?: () => boolean

Defined in: src/diagnostics.ts:54

Returns true when at least one configured repo has repoMode “lightweight”. Default () => false (no extra git capability warning unless opted in).

boolean


optional resolveHost?: () => Promise<string | null>

Defined in: src/diagnostics.ts:40

This node’s tailnet hostname, or null when tailscale is absent / not logged in. Defaults to the shared resolveNodeHost.

Promise<string | null>


optional runGhAuth?: () => Promise<void>

Defined in: src/diagnostics.ts:37

Run gh auth status; resolves on a zero exit, rejects on non-zero / timeout. Its stdout is intentionally discarded (it carries account identity).

Promise<void>


optional runRemediation?: (cmd) => Promise<void>

Defined in: src/diagnostics.ts:48

Run a verbatim remediation command (a shell pipeline like curl … | bash). Resolves on exit 0; rejects on non-zero exit or timeout. Default spawns a detached process group and SIGKILLs the whole group on timeout. Injected in tests.

string

Promise<void>


optional runServeStatus?: () => Promise<string>

Defined in: src/diagnostics.ts:44

Raw tailscale serve status --json output, parsed into a served-port via findServedPort. Both a direct tailscale serve mapping and a Tailscale Service mapping are detected. Reject ⇒ treated as “not serving”.

Promise<string>


optional runVersion?: (bin, args) => Promise<string>

Defined in: src/diagnostics.ts:34

Run <bin> <args...> and return stdout. Used for every --version probe plus the which/presence checks. Reject (incl. timeout) ⇒ binary absent.

string

string[]

Promise<string>