mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:00:43 +00:00
fix(browser): break doctor client import cycle
This commit is contained in:
@@ -1,34 +1,21 @@
|
||||
import { buildProfileQuery, withBaseUrl } from "./client-actions-url.js";
|
||||
import { fetchBrowserJson } from "./client-fetch.js";
|
||||
import type { BrowserTab, BrowserTransport, SnapshotAriaNode } from "./client.types.js";
|
||||
import type {
|
||||
BrowserStatus,
|
||||
BrowserTab,
|
||||
BrowserTransport,
|
||||
SnapshotAriaNode,
|
||||
} from "./client.types.js";
|
||||
import type { BrowserDoctorReport } from "./doctor.js";
|
||||
|
||||
export type { BrowserTab, BrowserTransport, SnapshotAriaNode } from "./client.types.js";
|
||||
export type {
|
||||
BrowserStatus,
|
||||
BrowserTab,
|
||||
BrowserTransport,
|
||||
SnapshotAriaNode,
|
||||
} from "./client.types.js";
|
||||
export type { BrowserDoctorCheck, BrowserDoctorReport } from "./doctor.js";
|
||||
|
||||
export type BrowserStatus = {
|
||||
enabled: boolean;
|
||||
profile?: string;
|
||||
driver?: "openclaw" | "existing-session";
|
||||
transport?: BrowserTransport;
|
||||
running: boolean;
|
||||
cdpReady?: boolean;
|
||||
cdpHttp?: boolean;
|
||||
pid: number | null;
|
||||
cdpPort: number | null;
|
||||
cdpUrl?: string | null;
|
||||
chosenBrowser: string | null;
|
||||
detectedBrowser?: string | null;
|
||||
detectedExecutablePath?: string | null;
|
||||
detectError?: string | null;
|
||||
userDataDir: string | null;
|
||||
color: string;
|
||||
headless: boolean;
|
||||
noSandbox?: boolean;
|
||||
executablePath?: string | null;
|
||||
attachOnly: boolean;
|
||||
};
|
||||
|
||||
export type ProfileStatus = {
|
||||
name: string;
|
||||
transport?: BrowserTransport;
|
||||
|
||||
@@ -1,5 +1,28 @@
|
||||
export type BrowserTransport = "cdp" | "chrome-mcp";
|
||||
|
||||
export type BrowserStatus = {
|
||||
enabled: boolean;
|
||||
profile?: string;
|
||||
driver?: "openclaw" | "existing-session";
|
||||
transport?: BrowserTransport;
|
||||
running: boolean;
|
||||
cdpReady?: boolean;
|
||||
cdpHttp?: boolean;
|
||||
pid: number | null;
|
||||
cdpPort: number | null;
|
||||
cdpUrl?: string | null;
|
||||
chosenBrowser: string | null;
|
||||
detectedBrowser?: string | null;
|
||||
detectedExecutablePath?: string | null;
|
||||
detectError?: string | null;
|
||||
userDataDir: string | null;
|
||||
color: string;
|
||||
headless: boolean;
|
||||
noSandbox?: boolean;
|
||||
executablePath?: string | null;
|
||||
attachOnly: boolean;
|
||||
};
|
||||
|
||||
export type BrowserTab = {
|
||||
/** Best handle for agents to pass back as targetId: label, then tabId, then raw targetId. */
|
||||
suggestedTargetId?: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { BrowserStatus, BrowserTransport } from "./client.js";
|
||||
import type { BrowserStatus, BrowserTransport } from "./client.types.js";
|
||||
|
||||
export type BrowserDoctorCheckStatus = "pass" | "warn" | "fail" | "info";
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ describe("browser doctor readiness", () => {
|
||||
},
|
||||
{
|
||||
noteFn,
|
||||
env: { DISPLAY: ":99" },
|
||||
resolveManagedExecutable: () => ({ kind: "chrome", path: "/usr/bin/google-chrome" }),
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user