(options: {
stateDir?: string;
})
| 76 | } |
| 77 | |
| 78 | export async function doctorManagedAgentBrowser(options: { |
| 79 | stateDir?: string; |
| 80 | }): Promise<{ status: AgentBrowserToolStatus; stdout: string; stderr: string; exitCode: number }> { |
| 81 | const status = getManagedAgentBrowserStatus(options); |
| 82 | if (!status.installed) { |
| 83 | throw missingManagedToolError(status); |
| 84 | } |
| 85 | const result = await runManagedAgentBrowser(status, ['doctor', '--offline', '--quick'], { |
| 86 | timeoutMs: DOCTOR_TIMEOUT_MS, |
| 87 | allowFailure: true, |
| 88 | }); |
| 89 | return { status, ...result }; |
| 90 | } |
| 91 | |
| 92 | function getManagedAgentBrowserStatus(options: { stateDir?: string }): AgentBrowserToolStatus { |
| 93 | const stateDir = options.stateDir ?? process.env.AGENT_DEVICE_STATE_DIR ?? defaultStateDir(); |
no test coverage detected
searching dependent graphs…