fix(browser): break doctor client import cycle · openclaw/openclaw@8a490f4
steipete
·
2026-04-25
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { buildProfileQuery, withBaseUrl } from "./client-actions-url.js"; |
2 | 2 | import { fetchBrowserJson } from "./client-fetch.js"; |
3 | | -import type { BrowserTab, BrowserTransport, SnapshotAriaNode } from "./client.types.js"; |
| 3 | +import type { |
| 4 | +BrowserStatus, |
| 5 | +BrowserTab, |
| 6 | +BrowserTransport, |
| 7 | +SnapshotAriaNode, |
| 8 | +} from "./client.types.js"; |
4 | 9 | import type { BrowserDoctorReport } from "./doctor.js"; |
5 | 10 | |
6 | | -export type { BrowserTab, BrowserTransport, SnapshotAriaNode } from "./client.types.js"; |
| 11 | +export type { |
| 12 | +BrowserStatus, |
| 13 | +BrowserTab, |
| 14 | +BrowserTransport, |
| 15 | +SnapshotAriaNode, |
| 16 | +} from "./client.types.js"; |
7 | 17 | export type { BrowserDoctorCheck, BrowserDoctorReport } from "./doctor.js"; |
8 | 18 | |
9 | | -export type BrowserStatus = { |
10 | | -enabled: boolean; |
11 | | -profile?: string; |
12 | | -driver?: "openclaw" | "existing-session"; |
13 | | -transport?: BrowserTransport; |
14 | | -running: boolean; |
15 | | -cdpReady?: boolean; |
16 | | -cdpHttp?: boolean; |
17 | | -pid: number | null; |
18 | | -cdpPort: number | null; |
19 | | -cdpUrl?: string | null; |
20 | | -chosenBrowser: string | null; |
21 | | -detectedBrowser?: string | null; |
22 | | -detectedExecutablePath?: string | null; |
23 | | -detectError?: string | null; |
24 | | -userDataDir: string | null; |
25 | | -color: string; |
26 | | -headless: boolean; |
27 | | -noSandbox?: boolean; |
28 | | -executablePath?: string | null; |
29 | | -attachOnly: boolean; |
30 | | -}; |
31 | | - |
32 | 19 | export type ProfileStatus = { |
33 | 20 | name: string; |
34 | 21 | transport?: BrowserTransport; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | export type BrowserTransport = "cdp" | "chrome-mcp"; |
2 | 2 | |
| 3 | +export type BrowserStatus = { |
| 4 | +enabled: boolean; |
| 5 | +profile?: string; |
| 6 | +driver?: "openclaw" | "existing-session"; |
| 7 | +transport?: BrowserTransport; |
| 8 | +running: boolean; |
| 9 | +cdpReady?: boolean; |
| 10 | +cdpHttp?: boolean; |
| 11 | +pid: number | null; |
| 12 | +cdpPort: number | null; |
| 13 | +cdpUrl?: string | null; |
| 14 | +chosenBrowser: string | null; |
| 15 | +detectedBrowser?: string | null; |
| 16 | +detectedExecutablePath?: string | null; |
| 17 | +detectError?: string | null; |
| 18 | +userDataDir: string | null; |
| 19 | +color: string; |
| 20 | +headless: boolean; |
| 21 | +noSandbox?: boolean; |
| 22 | +executablePath?: string | null; |
| 23 | +attachOnly: boolean; |
| 24 | +}; |
| 25 | + |
3 | 26 | export type BrowserTab = { |
4 | 27 | /** Best handle for agents to pass back as targetId: label, then tabId, then raw targetId. */ |
5 | 28 | suggestedTargetId?: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -import type { BrowserStatus, BrowserTransport } from "./client.js"; |
| 1 | +import type { BrowserStatus, BrowserTransport } from "./client.types.js"; |
2 | 2 | |
3 | 3 | export type BrowserDoctorCheckStatus = "pass" | "warn" | "fail" | "info"; |
4 | 4 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -14,6 +14,7 @@ describe("browser doctor readiness", () => {
|
14 | 14 | }, |
15 | 15 | { |
16 | 16 | noteFn, |
| 17 | +env: { DISPLAY: ":99" }, |
17 | 18 | resolveManagedExecutable: () => ({ kind: "chrome", path: "/usr/bin/google-chrome" }), |
18 | 19 | }, |
19 | 20 | ); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。