From 83ca6fbfc65ea6d8dbf40fead0beb0a9a7527141 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 26 Mar 2026 22:41:46 +0000 Subject: [PATCH] refactor: finish browser compat untangle --- extensions/browser/src/browser-runtime.ts | 18 +++++- extensions/browser/src/core-api.ts | 1 - extensions/browser/src/plugin-service.ts | 17 +++++- src/agents/sandbox/browser-bridges.ts | 2 +- src/agents/sandbox/browser.ts | 10 ++-- src/agents/sandbox/context.ts | 7 ++- src/agents/sandbox/manage.ts | 2 +- src/agents/sandbox/prune.ts | 2 +- src/agents/tools/browser-tool.actions.ts | 2 +- src/agents/tools/browser-tool.schema.ts | 2 +- src/agents/tools/browser-tool.ts | 2 +- src/browser/bridge-auth-registry.ts | 2 +- src/browser/bridge-server.ts | 2 +- src/browser/cdp-proxy-bypass.ts | 2 +- src/browser/cdp-timeouts.ts | 2 +- src/browser/cdp.helpers.ts | 2 +- src/browser/cdp.ts | 2 +- src/browser/chrome-mcp.snapshot.ts | 2 +- src/browser/chrome-mcp.ts | 2 +- .../chrome-user-data-dir.test-harness.ts | 2 +- src/browser/chrome.executables.ts | 2 +- src/browser/chrome.profile-decoration.ts | 2 +- src/browser/chrome.ts | 2 +- src/browser/client-actions-core.ts | 2 +- src/browser/client-actions-observe.ts | 2 +- src/browser/client-actions-state.ts | 2 +- src/browser/client-actions-types.ts | 2 +- src/browser/client-actions-url.ts | 2 +- src/browser/client-actions.ts | 2 +- src/browser/client-fetch.ts | 2 +- src/browser/client.ts | 2 +- src/browser/config.ts | 2 +- src/browser/constants.ts | 2 +- src/browser/control-auth.ts | 2 +- src/browser/control-service.ts | 2 +- src/browser/csrf.ts | 2 +- src/browser/errors.ts | 2 +- src/browser/form-fields.ts | 2 +- src/browser/http-auth.ts | 2 +- src/browser/navigation-guard.ts | 2 +- src/browser/output-atomic.ts | 2 +- src/browser/paths.ts | 2 +- src/browser/plugin-enabled.ts | 2 +- src/browser/plugin-service.ts | 2 +- src/browser/profile-capabilities.ts | 2 +- src/browser/profiles-service.ts | 2 +- src/browser/profiles.ts | 2 +- src/browser/proxy-files.ts | 2 +- src/browser/pw-ai-module.ts | 2 +- src/browser/pw-ai-state.ts | 2 +- src/browser/pw-ai.ts | 2 +- src/browser/pw-role-snapshot.ts | 2 +- src/browser/pw-session.mock-setup.ts | 2 +- src/browser/pw-session.page-cdp.ts | 2 +- src/browser/pw-session.ts | 2 +- src/browser/pw-tools-core.activity.ts | 2 +- src/browser/pw-tools-core.downloads.ts | 2 +- src/browser/pw-tools-core.interactions.ts | 2 +- src/browser/pw-tools-core.responses.ts | 2 +- src/browser/pw-tools-core.shared.ts | 2 +- src/browser/pw-tools-core.snapshot.ts | 2 +- src/browser/pw-tools-core.state.ts | 2 +- src/browser/pw-tools-core.storage.ts | 2 +- src/browser/pw-tools-core.test-harness.ts | 2 +- src/browser/pw-tools-core.trace.ts | 2 +- src/browser/pw-tools-core.ts | 2 +- src/browser/request-policy.ts | 2 +- src/browser/resolved-config-refresh.ts | 2 +- src/browser/routes/agent.act.download.ts | 2 +- src/browser/routes/agent.act.hooks.ts | 2 +- src/browser/routes/agent.act.shared.ts | 2 +- src/browser/routes/agent.act.ts | 2 +- src/browser/routes/agent.debug.ts | 2 +- src/browser/routes/agent.shared.ts | 2 +- src/browser/routes/agent.snapshot.plan.ts | 2 +- src/browser/routes/agent.snapshot.ts | 2 +- src/browser/routes/agent.storage.ts | 2 +- src/browser/routes/agent.ts | 2 +- src/browser/routes/basic.ts | 2 +- src/browser/routes/dispatcher.ts | 2 +- src/browser/routes/index.ts | 2 +- src/browser/routes/output-paths.ts | 2 +- src/browser/routes/path-output.ts | 2 +- src/browser/routes/tabs.ts | 2 +- src/browser/routes/test-helpers.ts | 2 +- src/browser/routes/types.ts | 2 +- src/browser/routes/utils.ts | 2 +- src/browser/runtime-lifecycle.ts | 2 +- src/browser/safe-filename.ts | 2 +- src/browser/screenshot.ts | 2 +- src/browser/server-context.availability.ts | 2 +- .../server-context.chrome-test-harness.ts | 2 +- src/browser/server-context.constants.ts | 2 +- .../server-context.remote-tab-ops.harness.ts | 2 +- src/browser/server-context.reset.ts | 2 +- src/browser/server-context.selection.ts | 2 +- src/browser/server-context.tab-ops.ts | 2 +- src/browser/server-context.ts | 2 +- src/browser/server-context.types.ts | 2 +- src/browser/server-lifecycle.ts | 2 +- src/browser/server-middleware.ts | 2 +- .../server.agent-contract.test-harness.ts | 2 +- .../server.control-server.test-harness.ts | 2 +- src/browser/server.ts | 2 +- src/browser/session-tab-registry.ts | 2 +- src/browser/snapshot-roles.ts | 2 +- src/browser/target-id.ts | 2 +- src/browser/test-fetch.ts | 2 +- src/browser/test-port.ts | 2 +- src/browser/trash.ts | 2 +- src/browser/url-pattern.ts | 2 +- src/cli/browser-cli-actions-input.ts | 2 +- .../register.element.ts | 2 +- .../register.files-downloads.ts | 2 +- .../register.form-wait-eval.ts | 2 +- .../register.navigation.ts | 2 +- src/cli/browser-cli-actions-input/register.ts | 2 +- src/cli/browser-cli-actions-input/shared.ts | 2 +- src/cli/browser-cli-actions-observe.ts | 2 +- src/cli/browser-cli-debug.ts | 2 +- src/cli/browser-cli-examples.ts | 2 +- src/cli/browser-cli-inspect.ts | 2 +- src/cli/browser-cli-manage.ts | 2 +- src/cli/browser-cli-resize.ts | 2 +- src/cli/browser-cli-shared.ts | 2 +- src/cli/browser-cli-state.cookies-storage.ts | 2 +- src/cli/browser-cli-state.ts | 2 +- src/cli/browser-cli.ts | 2 +- src/commands/doctor-browser.ts | 4 +- src/compat/browser/bridge-auth-registry.ts | 1 + src/compat/browser/bridge-server.ts | 1 + src/compat/browser/cdp-proxy-bypass.ts | 1 + src/compat/browser/cdp-timeouts.ts | 1 + src/compat/browser/cdp.helpers.ts | 1 + src/compat/browser/cdp.ts | 1 + src/compat/browser/chrome-mcp.snapshot.ts | 1 + src/compat/browser/chrome-mcp.ts | 1 + .../chrome-user-data-dir.test-harness.ts | 1 + src/compat/browser/chrome.executables.ts | 1 + .../browser/chrome.profile-decoration.ts | 1 + src/compat/browser/chrome.ts | 1 + .../browser/cli/browser-cli-actions-input.ts | 1 + .../register.element.ts | 1 + .../register.files-downloads.ts | 1 + .../register.form-wait-eval.ts | 1 + .../register.navigation.ts | 1 + .../cli/browser-cli-actions-input/register.ts | 1 + .../cli/browser-cli-actions-input/shared.ts | 1 + .../cli/browser-cli-actions-observe.ts | 1 + src/compat/browser/cli/browser-cli-debug.ts | 1 + .../browser/cli/browser-cli-examples.ts | 1 + src/compat/browser/cli/browser-cli-inspect.ts | 1 + src/compat/browser/cli/browser-cli-manage.ts | 1 + src/compat/browser/cli/browser-cli-resize.ts | 1 + src/compat/browser/cli/browser-cli-shared.ts | 1 + .../cli/browser-cli-state.cookies-storage.ts | 1 + src/compat/browser/cli/browser-cli-state.ts | 1 + src/compat/browser/cli/browser-cli.ts | 1 + src/compat/browser/client-actions-core.ts | 1 + src/compat/browser/client-actions-observe.ts | 1 + src/compat/browser/client-actions-state.ts | 1 + src/compat/browser/client-actions-types.ts | 1 + src/compat/browser/client-actions-url.ts | 1 + src/compat/browser/client-actions.ts | 1 + src/compat/browser/client-fetch.ts | 1 + src/compat/browser/client.ts | 1 + src/compat/browser/config.ts | 1 + src/compat/browser/constants.ts | 1 + src/compat/browser/control-auth.ts | 1 + src/compat/browser/control-service.ts | 1 + src/compat/browser/csrf.ts | 1 + src/compat/browser/errors.ts | 1 + src/compat/browser/form-fields.ts | 1 + src/compat/browser/gateway/browser-request.ts | 1 + src/compat/browser/http-auth.ts | 1 + src/compat/browser/navigation-guard.ts | 1 + .../browser/node-host/invoke-browser.ts | 1 + src/compat/browser/output-atomic.ts | 1 + src/compat/browser/paths.ts | 1 + src/compat/browser/plugin-enabled.ts | 1 + src/compat/browser/plugin-service.ts | 1 + src/compat/browser/profile-capabilities.ts | 1 + src/compat/browser/profiles-service.ts | 1 + src/compat/browser/profiles.ts | 1 + src/compat/browser/proxy-files.ts | 1 + src/compat/browser/pw-ai-module.ts | 1 + src/compat/browser/pw-ai-state.ts | 1 + src/compat/browser/pw-ai.ts | 1 + src/compat/browser/pw-role-snapshot.ts | 1 + src/compat/browser/pw-session.mock-setup.ts | 1 + src/compat/browser/pw-session.page-cdp.ts | 1 + src/compat/browser/pw-session.ts | 1 + src/compat/browser/pw-tools-core.activity.ts | 1 + src/compat/browser/pw-tools-core.downloads.ts | 1 + .../browser/pw-tools-core.interactions.ts | 1 + src/compat/browser/pw-tools-core.responses.ts | 1 + src/compat/browser/pw-tools-core.shared.ts | 1 + src/compat/browser/pw-tools-core.snapshot.ts | 1 + src/compat/browser/pw-tools-core.state.ts | 1 + src/compat/browser/pw-tools-core.storage.ts | 1 + .../browser/pw-tools-core.test-harness.ts | 1 + src/compat/browser/pw-tools-core.trace.ts | 1 + src/compat/browser/pw-tools-core.ts | 1 + src/compat/browser/request-policy.ts | 1 + src/compat/browser/resolved-config-refresh.ts | 1 + .../browser/routes/agent.act.download.ts | 1 + src/compat/browser/routes/agent.act.hooks.ts | 1 + src/compat/browser/routes/agent.act.shared.ts | 1 + src/compat/browser/routes/agent.act.ts | 1 + src/compat/browser/routes/agent.debug.ts | 1 + src/compat/browser/routes/agent.shared.ts | 1 + .../browser/routes/agent.snapshot.plan.ts | 1 + src/compat/browser/routes/agent.snapshot.ts | 1 + src/compat/browser/routes/agent.storage.ts | 1 + src/compat/browser/routes/agent.ts | 1 + src/compat/browser/routes/basic.ts | 1 + src/compat/browser/routes/dispatcher.ts | 1 + src/compat/browser/routes/index.ts | 1 + src/compat/browser/routes/output-paths.ts | 1 + src/compat/browser/routes/path-output.ts | 1 + src/compat/browser/routes/tabs.ts | 1 + src/compat/browser/routes/test-helpers.ts | 1 + src/compat/browser/routes/types.ts | 1 + src/compat/browser/routes/utils.ts | 1 + src/compat/browser/runtime-lifecycle.ts | 1 + src/compat/browser/safe-filename.ts | 1 + src/compat/browser/screenshot.ts | 1 + .../browser/server-context.availability.ts | 1 + .../server-context.chrome-test-harness.ts | 1 + .../browser/server-context.constants.ts | 1 + .../server-context.remote-tab-ops.harness.ts | 1 + src/compat/browser/server-context.reset.ts | 1 + .../browser/server-context.selection.ts | 1 + src/compat/browser/server-context.tab-ops.ts | 1 + src/compat/browser/server-context.ts | 1 + src/compat/browser/server-context.types.ts | 1 + src/compat/browser/server-lifecycle.ts | 1 + src/compat/browser/server-middleware.ts | 1 + .../server.agent-contract.test-harness.ts | 1 + .../server.control-server.test-harness.ts | 1 + src/compat/browser/server.ts | 1 + src/compat/browser/session-tab-registry.ts | 1 + src/compat/browser/snapshot-roles.ts | 1 + src/compat/browser/target-id.ts | 1 + src/compat/browser/test-fetch.ts | 1 + src/compat/browser/test-port.ts | 1 + .../browser/tools/browser-tool.actions.ts | 1 + .../browser/tools/browser-tool.schema.ts | 1 + src/compat/browser/tools/browser-tool.ts | 1 + src/compat/browser/trash.ts | 1 + src/compat/browser/url-pattern.ts | 1 + src/gateway/server-browser.ts | 31 ---------- src/gateway/server-methods/agents.ts | 2 +- src/gateway/server-methods/browser.ts | 2 +- src/gateway/session-reset-service.ts | 2 +- .../bundled-plugin-entries.generated.ts | 3 + src/node-host/invoke-browser.ts | 2 +- src/node-host/runner.ts | 2 +- src/plugin-sdk/browser-support.ts | 5 +- .../channel-import-guardrails.test.ts | 7 ++- src/plugin-sdk/plugin-runtime.ts | 1 + .../bundled-plugin-metadata.generated.ts | 2 +- src/plugins/lazy-service-module.test.ts | 58 +++++++++++++++++++ src/plugins/lazy-service-module.ts | 50 ++++++++++++++++ src/security/audit-extra.sync.ts | 2 +- src/security/audit.ts | 9 ++- 266 files changed, 424 insertions(+), 179 deletions(-) create mode 100644 src/compat/browser/bridge-auth-registry.ts create mode 100644 src/compat/browser/bridge-server.ts create mode 100644 src/compat/browser/cdp-proxy-bypass.ts create mode 100644 src/compat/browser/cdp-timeouts.ts create mode 100644 src/compat/browser/cdp.helpers.ts create mode 100644 src/compat/browser/cdp.ts create mode 100644 src/compat/browser/chrome-mcp.snapshot.ts create mode 100644 src/compat/browser/chrome-mcp.ts create mode 100644 src/compat/browser/chrome-user-data-dir.test-harness.ts create mode 100644 src/compat/browser/chrome.executables.ts create mode 100644 src/compat/browser/chrome.profile-decoration.ts create mode 100644 src/compat/browser/chrome.ts create mode 100644 src/compat/browser/cli/browser-cli-actions-input.ts create mode 100644 src/compat/browser/cli/browser-cli-actions-input/register.element.ts create mode 100644 src/compat/browser/cli/browser-cli-actions-input/register.files-downloads.ts create mode 100644 src/compat/browser/cli/browser-cli-actions-input/register.form-wait-eval.ts create mode 100644 src/compat/browser/cli/browser-cli-actions-input/register.navigation.ts create mode 100644 src/compat/browser/cli/browser-cli-actions-input/register.ts create mode 100644 src/compat/browser/cli/browser-cli-actions-input/shared.ts create mode 100644 src/compat/browser/cli/browser-cli-actions-observe.ts create mode 100644 src/compat/browser/cli/browser-cli-debug.ts create mode 100644 src/compat/browser/cli/browser-cli-examples.ts create mode 100644 src/compat/browser/cli/browser-cli-inspect.ts create mode 100644 src/compat/browser/cli/browser-cli-manage.ts create mode 100644 src/compat/browser/cli/browser-cli-resize.ts create mode 100644 src/compat/browser/cli/browser-cli-shared.ts create mode 100644 src/compat/browser/cli/browser-cli-state.cookies-storage.ts create mode 100644 src/compat/browser/cli/browser-cli-state.ts create mode 100644 src/compat/browser/cli/browser-cli.ts create mode 100644 src/compat/browser/client-actions-core.ts create mode 100644 src/compat/browser/client-actions-observe.ts create mode 100644 src/compat/browser/client-actions-state.ts create mode 100644 src/compat/browser/client-actions-types.ts create mode 100644 src/compat/browser/client-actions-url.ts create mode 100644 src/compat/browser/client-actions.ts create mode 100644 src/compat/browser/client-fetch.ts create mode 100644 src/compat/browser/client.ts create mode 100644 src/compat/browser/config.ts create mode 100644 src/compat/browser/constants.ts create mode 100644 src/compat/browser/control-auth.ts create mode 100644 src/compat/browser/control-service.ts create mode 100644 src/compat/browser/csrf.ts create mode 100644 src/compat/browser/errors.ts create mode 100644 src/compat/browser/form-fields.ts create mode 100644 src/compat/browser/gateway/browser-request.ts create mode 100644 src/compat/browser/http-auth.ts create mode 100644 src/compat/browser/navigation-guard.ts create mode 100644 src/compat/browser/node-host/invoke-browser.ts create mode 100644 src/compat/browser/output-atomic.ts create mode 100644 src/compat/browser/paths.ts create mode 100644 src/compat/browser/plugin-enabled.ts create mode 100644 src/compat/browser/plugin-service.ts create mode 100644 src/compat/browser/profile-capabilities.ts create mode 100644 src/compat/browser/profiles-service.ts create mode 100644 src/compat/browser/profiles.ts create mode 100644 src/compat/browser/proxy-files.ts create mode 100644 src/compat/browser/pw-ai-module.ts create mode 100644 src/compat/browser/pw-ai-state.ts create mode 100644 src/compat/browser/pw-ai.ts create mode 100644 src/compat/browser/pw-role-snapshot.ts create mode 100644 src/compat/browser/pw-session.mock-setup.ts create mode 100644 src/compat/browser/pw-session.page-cdp.ts create mode 100644 src/compat/browser/pw-session.ts create mode 100644 src/compat/browser/pw-tools-core.activity.ts create mode 100644 src/compat/browser/pw-tools-core.downloads.ts create mode 100644 src/compat/browser/pw-tools-core.interactions.ts create mode 100644 src/compat/browser/pw-tools-core.responses.ts create mode 100644 src/compat/browser/pw-tools-core.shared.ts create mode 100644 src/compat/browser/pw-tools-core.snapshot.ts create mode 100644 src/compat/browser/pw-tools-core.state.ts create mode 100644 src/compat/browser/pw-tools-core.storage.ts create mode 100644 src/compat/browser/pw-tools-core.test-harness.ts create mode 100644 src/compat/browser/pw-tools-core.trace.ts create mode 100644 src/compat/browser/pw-tools-core.ts create mode 100644 src/compat/browser/request-policy.ts create mode 100644 src/compat/browser/resolved-config-refresh.ts create mode 100644 src/compat/browser/routes/agent.act.download.ts create mode 100644 src/compat/browser/routes/agent.act.hooks.ts create mode 100644 src/compat/browser/routes/agent.act.shared.ts create mode 100644 src/compat/browser/routes/agent.act.ts create mode 100644 src/compat/browser/routes/agent.debug.ts create mode 100644 src/compat/browser/routes/agent.shared.ts create mode 100644 src/compat/browser/routes/agent.snapshot.plan.ts create mode 100644 src/compat/browser/routes/agent.snapshot.ts create mode 100644 src/compat/browser/routes/agent.storage.ts create mode 100644 src/compat/browser/routes/agent.ts create mode 100644 src/compat/browser/routes/basic.ts create mode 100644 src/compat/browser/routes/dispatcher.ts create mode 100644 src/compat/browser/routes/index.ts create mode 100644 src/compat/browser/routes/output-paths.ts create mode 100644 src/compat/browser/routes/path-output.ts create mode 100644 src/compat/browser/routes/tabs.ts create mode 100644 src/compat/browser/routes/test-helpers.ts create mode 100644 src/compat/browser/routes/types.ts create mode 100644 src/compat/browser/routes/utils.ts create mode 100644 src/compat/browser/runtime-lifecycle.ts create mode 100644 src/compat/browser/safe-filename.ts create mode 100644 src/compat/browser/screenshot.ts create mode 100644 src/compat/browser/server-context.availability.ts create mode 100644 src/compat/browser/server-context.chrome-test-harness.ts create mode 100644 src/compat/browser/server-context.constants.ts create mode 100644 src/compat/browser/server-context.remote-tab-ops.harness.ts create mode 100644 src/compat/browser/server-context.reset.ts create mode 100644 src/compat/browser/server-context.selection.ts create mode 100644 src/compat/browser/server-context.tab-ops.ts create mode 100644 src/compat/browser/server-context.ts create mode 100644 src/compat/browser/server-context.types.ts create mode 100644 src/compat/browser/server-lifecycle.ts create mode 100644 src/compat/browser/server-middleware.ts create mode 100644 src/compat/browser/server.agent-contract.test-harness.ts create mode 100644 src/compat/browser/server.control-server.test-harness.ts create mode 100644 src/compat/browser/server.ts create mode 100644 src/compat/browser/session-tab-registry.ts create mode 100644 src/compat/browser/snapshot-roles.ts create mode 100644 src/compat/browser/target-id.ts create mode 100644 src/compat/browser/test-fetch.ts create mode 100644 src/compat/browser/test-port.ts create mode 100644 src/compat/browser/tools/browser-tool.actions.ts create mode 100644 src/compat/browser/tools/browser-tool.schema.ts create mode 100644 src/compat/browser/tools/browser-tool.ts create mode 100644 src/compat/browser/trash.ts create mode 100644 src/compat/browser/url-pattern.ts delete mode 100644 src/gateway/server-browser.ts create mode 100644 src/plugins/lazy-service-module.test.ts create mode 100644 src/plugins/lazy-service-module.ts diff --git a/extensions/browser/src/browser-runtime.ts b/extensions/browser/src/browser-runtime.ts index d48dad1c214..27d13b7aff7 100644 --- a/extensions/browser/src/browser-runtime.ts +++ b/extensions/browser/src/browser-runtime.ts @@ -1,3 +1,5 @@ +export { startBrowserBridgeServer, stopBrowserBridgeServer } from "./browser/bridge-server.js"; +export type { BrowserBridge } from "./browser/bridge-server.js"; export { browserAct, browserArmDialog, @@ -32,8 +34,20 @@ export type { ProfileStatus, SnapshotResult, } from "./browser/client.js"; +export type { BrowserExecutable } from "./browser/chrome.executables.js"; +export type { ResolvedBrowserConfig, ResolvedBrowserProfile } from "./browser/config.js"; export { resolveBrowserConfig, resolveProfile } from "./browser/config.js"; -export { DEFAULT_AI_SNAPSHOT_MAX_CHARS } from "./browser/constants.js"; +export { + DEFAULT_AI_SNAPSHOT_MAX_CHARS, + DEFAULT_BROWSER_EVALUATE_ENABLED, + DEFAULT_OPENCLAW_BROWSER_COLOR, + DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, +} from "./browser/constants.js"; +export { + parseBrowserMajorVersion, + readBrowserVersion, + resolveGoogleChromeExecutableForPlatform, +} from "./browser/chrome.executables.js"; export { redactCdpUrl } from "./browser/cdp.helpers.js"; export { DEFAULT_UPLOAD_DIR, resolveExistingPathsWithinRoot } from "./browser/paths.js"; export { getBrowserProfileCapabilities } from "./browser/profile-capabilities.js"; @@ -44,10 +58,12 @@ export { resolveRequestedBrowserProfile, } from "./browser/request-policy.js"; export { + closeTrackedBrowserTabsForSessions, trackSessionBrowserTab, untrackSessionBrowserTab, } from "./browser/session-tab-registry.js"; export { ensureBrowserControlAuth, resolveBrowserControlAuth } from "./browser/control-auth.js"; +export { movePathToTrash } from "./browser/trash.js"; export { createBrowserControlContext, getBrowserControlState, diff --git a/extensions/browser/src/core-api.ts b/extensions/browser/src/core-api.ts index 6dc5dd6b157..a7e5f4595a9 100644 --- a/extensions/browser/src/core-api.ts +++ b/extensions/browser/src/core-api.ts @@ -94,7 +94,6 @@ export { selectDefaultNodeFromList, safeParseJson, shortenHomePath, - startBrowserControlServerIfEnabled, stringEnum, theme, withTimeout, diff --git a/extensions/browser/src/plugin-service.ts b/extensions/browser/src/plugin-service.ts index 8b4b0d51f67..00d8be01bbb 100644 --- a/extensions/browser/src/plugin-service.ts +++ b/extensions/browser/src/plugin-service.ts @@ -1,9 +1,10 @@ import { - startBrowserControlServerIfEnabled, + startLazyPluginServiceModule, + type LazyPluginServiceHandle, type OpenClawPluginService, } from "openclaw/plugin-sdk/browser-support"; -type BrowserControlHandle = Awaited>; +type BrowserControlHandle = LazyPluginServiceHandle | null; export function createBrowserPluginService(): OpenClawPluginService { let handle: BrowserControlHandle = null; @@ -14,7 +15,17 @@ export function createBrowserPluginService(): OpenClawPluginService { if (handle) { return; } - handle = await startBrowserControlServerIfEnabled(); + handle = await startLazyPluginServiceModule({ + skipEnvVar: "OPENCLAW_SKIP_BROWSER_CONTROL_SERVER", + overrideEnvVar: "OPENCLAW_BROWSER_CONTROL_MODULE", + // Keep the default module import static so compiled builds still bundle it. + loadDefaultModule: async () => await import("./server.js"), + startExportNames: [ + "startBrowserControlServiceFromConfig", + "startBrowserControlServerFromConfig", + ], + stopExportNames: ["stopBrowserControlService", "stopBrowserControlServer"], + }); }, stop: async () => { const current = handle; diff --git a/src/agents/sandbox/browser-bridges.ts b/src/agents/sandbox/browser-bridges.ts index 5a6e3db9936..03362237ed2 100644 --- a/src/agents/sandbox/browser-bridges.ts +++ b/src/agents/sandbox/browser-bridges.ts @@ -1,4 +1,4 @@ -import type { BrowserBridge } from "../../browser/bridge-server.js"; +import type { BrowserBridge } from "../../plugin-sdk/browser-runtime.js"; export const BROWSER_BRIDGES = new Map< string, diff --git a/src/agents/sandbox/browser.ts b/src/agents/sandbox/browser.ts index a0fdae3babe..eacf45a0c20 100644 --- a/src/agents/sandbox/browser.ts +++ b/src/agents/sandbox/browser.ts @@ -1,12 +1,14 @@ import crypto from "node:crypto"; -import { startBrowserBridgeServer, stopBrowserBridgeServer } from "../../browser/bridge-server.js"; -import { type ResolvedBrowserConfig, resolveProfile } from "../../browser/config.js"; +import { deriveDefaultBrowserCdpPortRange } from "../../config/port-defaults.js"; import { DEFAULT_BROWSER_EVALUATE_ENABLED, DEFAULT_OPENCLAW_BROWSER_COLOR, DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, -} from "../../browser/constants.js"; -import { deriveDefaultBrowserCdpPortRange } from "../../config/port-defaults.js"; + resolveProfile, + startBrowserBridgeServer, + stopBrowserBridgeServer, + type ResolvedBrowserConfig, +} from "../../plugin-sdk/browser-runtime.js"; import { defaultRuntime } from "../../runtime.js"; import { BROWSER_BRIDGES } from "./browser-bridges.js"; import { computeSandboxBrowserConfigHash } from "./config-hash.js"; diff --git a/src/agents/sandbox/context.ts b/src/agents/sandbox/context.ts index 031b7c45998..981055ad886 100644 --- a/src/agents/sandbox/context.ts +++ b/src/agents/sandbox/context.ts @@ -1,8 +1,11 @@ import fs from "node:fs/promises"; -import { DEFAULT_BROWSER_EVALUATE_ENABLED } from "../../browser/constants.js"; -import { ensureBrowserControlAuth, resolveBrowserControlAuth } from "../../browser/control-auth.js"; import type { OpenClawConfig } from "../../config/config.js"; import { loadConfig } from "../../config/config.js"; +import { + DEFAULT_BROWSER_EVALUATE_ENABLED, + ensureBrowserControlAuth, + resolveBrowserControlAuth, +} from "../../plugin-sdk/browser-runtime.js"; import { defaultRuntime } from "../../runtime.js"; import { resolveUserPath } from "../../utils.js"; import { syncSkillsToWorkspace } from "../skills.js"; diff --git a/src/agents/sandbox/manage.ts b/src/agents/sandbox/manage.ts index c6e6f3fd7bf..fba18628e72 100644 --- a/src/agents/sandbox/manage.ts +++ b/src/agents/sandbox/manage.ts @@ -1,5 +1,5 @@ -import { stopBrowserBridgeServer } from "../../browser/bridge-server.js"; import { loadConfig } from "../../config/config.js"; +import { stopBrowserBridgeServer } from "../../plugin-sdk/browser-runtime.js"; import { getSandboxBackendManager } from "./backend.js"; import { BROWSER_BRIDGES } from "./browser-bridges.js"; import { dockerSandboxBackendManager } from "./docker-backend.js"; diff --git a/src/agents/sandbox/prune.ts b/src/agents/sandbox/prune.ts index 8005c23330e..318149c2a87 100644 --- a/src/agents/sandbox/prune.ts +++ b/src/agents/sandbox/prune.ts @@ -1,5 +1,5 @@ -import { stopBrowserBridgeServer } from "../../browser/bridge-server.js"; import { loadConfig } from "../../config/config.js"; +import { stopBrowserBridgeServer } from "../../plugin-sdk/browser-runtime.js"; import { defaultRuntime } from "../../runtime.js"; import { getSandboxBackendManager } from "./backend.js"; import { BROWSER_BRIDGES } from "./browser-bridges.js"; diff --git a/src/agents/tools/browser-tool.actions.ts b/src/agents/tools/browser-tool.actions.ts index 61ac7bf75a8..105b60a113e 100644 --- a/src/agents/tools/browser-tool.actions.ts +++ b/src/agents/tools/browser-tool.actions.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser-tool.actions.js"; +export * from "../../compat/browser/tools/browser-tool.actions.js"; diff --git a/src/agents/tools/browser-tool.schema.ts b/src/agents/tools/browser-tool.schema.ts index f83d309d287..5e7d5287d5b 100644 --- a/src/agents/tools/browser-tool.schema.ts +++ b/src/agents/tools/browser-tool.schema.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser-tool.schema.js"; +export * from "../../compat/browser/tools/browser-tool.schema.js"; diff --git a/src/agents/tools/browser-tool.ts b/src/agents/tools/browser-tool.ts index 02e8a6955c6..fb0b3325005 100644 --- a/src/agents/tools/browser-tool.ts +++ b/src/agents/tools/browser-tool.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser-tool.js"; +export * from "../../compat/browser/tools/browser-tool.js"; diff --git a/src/browser/bridge-auth-registry.ts b/src/browser/bridge-auth-registry.ts index d4c6e592349..78ea73323a2 100644 --- a/src/browser/bridge-auth-registry.ts +++ b/src/browser/bridge-auth-registry.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/bridge-auth-registry.js"; +export * from "../compat/browser/bridge-auth-registry.js"; diff --git a/src/browser/bridge-server.ts b/src/browser/bridge-server.ts index 66d96ccf94e..e34a1d5fcb9 100644 --- a/src/browser/bridge-server.ts +++ b/src/browser/bridge-server.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/bridge-server.js"; +export * from "../compat/browser/bridge-server.js"; diff --git a/src/browser/cdp-proxy-bypass.ts b/src/browser/cdp-proxy-bypass.ts index a006e95cc3f..fff7b5b21c5 100644 --- a/src/browser/cdp-proxy-bypass.ts +++ b/src/browser/cdp-proxy-bypass.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/cdp-proxy-bypass.js"; +export * from "../compat/browser/cdp-proxy-bypass.js"; diff --git a/src/browser/cdp-timeouts.ts b/src/browser/cdp-timeouts.ts index a793565fe67..c32df7a76e2 100644 --- a/src/browser/cdp-timeouts.ts +++ b/src/browser/cdp-timeouts.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/cdp-timeouts.js"; +export * from "../compat/browser/cdp-timeouts.js"; diff --git a/src/browser/cdp.helpers.ts b/src/browser/cdp.helpers.ts index bc35820a6a7..7a184149768 100644 --- a/src/browser/cdp.helpers.ts +++ b/src/browser/cdp.helpers.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/cdp.helpers.js"; +export * from "../compat/browser/cdp.helpers.js"; diff --git a/src/browser/cdp.ts b/src/browser/cdp.ts index ea2a3e3a8d8..46181eb2a00 100644 --- a/src/browser/cdp.ts +++ b/src/browser/cdp.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/cdp.js"; +export * from "../compat/browser/cdp.js"; diff --git a/src/browser/chrome-mcp.snapshot.ts b/src/browser/chrome-mcp.snapshot.ts index 59e24e95383..b72b71bc053 100644 --- a/src/browser/chrome-mcp.snapshot.ts +++ b/src/browser/chrome-mcp.snapshot.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/chrome-mcp.snapshot.js"; +export * from "../compat/browser/chrome-mcp.snapshot.js"; diff --git a/src/browser/chrome-mcp.ts b/src/browser/chrome-mcp.ts index 56766308577..7cbd20df20f 100644 --- a/src/browser/chrome-mcp.ts +++ b/src/browser/chrome-mcp.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/chrome-mcp.js"; +export * from "../compat/browser/chrome-mcp.js"; diff --git a/src/browser/chrome-user-data-dir.test-harness.ts b/src/browser/chrome-user-data-dir.test-harness.ts index 281556ab526..5bd311111d2 100644 --- a/src/browser/chrome-user-data-dir.test-harness.ts +++ b/src/browser/chrome-user-data-dir.test-harness.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/chrome-user-data-dir.test-harness.js"; +export * from "../compat/browser/chrome-user-data-dir.test-harness.js"; diff --git a/src/browser/chrome.executables.ts b/src/browser/chrome.executables.ts index 56eddca29bf..1a561e28de7 100644 --- a/src/browser/chrome.executables.ts +++ b/src/browser/chrome.executables.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/chrome.executables.js"; +export * from "../compat/browser/chrome.executables.js"; diff --git a/src/browser/chrome.profile-decoration.ts b/src/browser/chrome.profile-decoration.ts index 2c466529885..27bafe329dc 100644 --- a/src/browser/chrome.profile-decoration.ts +++ b/src/browser/chrome.profile-decoration.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/chrome.profile-decoration.js"; +export * from "../compat/browser/chrome.profile-decoration.js"; diff --git a/src/browser/chrome.ts b/src/browser/chrome.ts index a13e3859716..c1e9c245663 100644 --- a/src/browser/chrome.ts +++ b/src/browser/chrome.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/chrome.js"; +export * from "../compat/browser/chrome.js"; diff --git a/src/browser/client-actions-core.ts b/src/browser/client-actions-core.ts index a0f78e7dbf7..a00057b2304 100644 --- a/src/browser/client-actions-core.ts +++ b/src/browser/client-actions-core.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/client-actions-core.js"; +export * from "../compat/browser/client-actions-core.js"; diff --git a/src/browser/client-actions-observe.ts b/src/browser/client-actions-observe.ts index 8096514da13..f9cc5cc6e52 100644 --- a/src/browser/client-actions-observe.ts +++ b/src/browser/client-actions-observe.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/client-actions-observe.js"; +export * from "../compat/browser/client-actions-observe.js"; diff --git a/src/browser/client-actions-state.ts b/src/browser/client-actions-state.ts index 68db6b66030..d58bf221b2e 100644 --- a/src/browser/client-actions-state.ts +++ b/src/browser/client-actions-state.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/client-actions-state.js"; +export * from "../compat/browser/client-actions-state.js"; diff --git a/src/browser/client-actions-types.ts b/src/browser/client-actions-types.ts index 36dc9a2ad57..f47b3351a51 100644 --- a/src/browser/client-actions-types.ts +++ b/src/browser/client-actions-types.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/client-actions-types.js"; +export * from "../compat/browser/client-actions-types.js"; diff --git a/src/browser/client-actions-url.ts b/src/browser/client-actions-url.ts index 2f82ffde6ea..535dbda0c0c 100644 --- a/src/browser/client-actions-url.ts +++ b/src/browser/client-actions-url.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/client-actions-url.js"; +export * from "../compat/browser/client-actions-url.js"; diff --git a/src/browser/client-actions.ts b/src/browser/client-actions.ts index e082707335b..832639691d2 100644 --- a/src/browser/client-actions.ts +++ b/src/browser/client-actions.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/client-actions.js"; +export * from "../compat/browser/client-actions.js"; diff --git a/src/browser/client-fetch.ts b/src/browser/client-fetch.ts index 5805440b225..6945566ef49 100644 --- a/src/browser/client-fetch.ts +++ b/src/browser/client-fetch.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/client-fetch.js"; +export * from "../compat/browser/client-fetch.js"; diff --git a/src/browser/client.ts b/src/browser/client.ts index af83cbe166a..d7700042cd3 100644 --- a/src/browser/client.ts +++ b/src/browser/client.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/client.js"; +export * from "../compat/browser/client.js"; diff --git a/src/browser/config.ts b/src/browser/config.ts index f45150b8f39..ac5acd4b3ca 100644 --- a/src/browser/config.ts +++ b/src/browser/config.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/config.js"; +export * from "../compat/browser/config.js"; diff --git a/src/browser/constants.ts b/src/browser/constants.ts index 24392a23430..f099c1db187 100644 --- a/src/browser/constants.ts +++ b/src/browser/constants.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/constants.js"; +export * from "../compat/browser/constants.js"; diff --git a/src/browser/control-auth.ts b/src/browser/control-auth.ts index bc1746e9c8c..dd645a1c83a 100644 --- a/src/browser/control-auth.ts +++ b/src/browser/control-auth.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/control-auth.js"; +export * from "../compat/browser/control-auth.js"; diff --git a/src/browser/control-service.ts b/src/browser/control-service.ts index 2397e6da39d..7753ba77193 100644 --- a/src/browser/control-service.ts +++ b/src/browser/control-service.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/control-service.js"; +export * from "../compat/browser/control-service.js"; diff --git a/src/browser/csrf.ts b/src/browser/csrf.ts index b09767175a2..e15ff4bb307 100644 --- a/src/browser/csrf.ts +++ b/src/browser/csrf.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/csrf.js"; +export * from "../compat/browser/csrf.js"; diff --git a/src/browser/errors.ts b/src/browser/errors.ts index e3fab12bd2a..229e6b68e98 100644 --- a/src/browser/errors.ts +++ b/src/browser/errors.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/errors.js"; +export * from "../compat/browser/errors.js"; diff --git a/src/browser/form-fields.ts b/src/browser/form-fields.ts index a7361d76c96..e57a4766515 100644 --- a/src/browser/form-fields.ts +++ b/src/browser/form-fields.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/form-fields.js"; +export * from "../compat/browser/form-fields.js"; diff --git a/src/browser/http-auth.ts b/src/browser/http-auth.ts index 173d699234d..73d3b77aa94 100644 --- a/src/browser/http-auth.ts +++ b/src/browser/http-auth.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/http-auth.js"; +export * from "../compat/browser/http-auth.js"; diff --git a/src/browser/navigation-guard.ts b/src/browser/navigation-guard.ts index 40a8d373eee..a292ec2e897 100644 --- a/src/browser/navigation-guard.ts +++ b/src/browser/navigation-guard.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/navigation-guard.js"; +export * from "../compat/browser/navigation-guard.js"; diff --git a/src/browser/output-atomic.ts b/src/browser/output-atomic.ts index 8caa070a249..ee34a4e43de 100644 --- a/src/browser/output-atomic.ts +++ b/src/browser/output-atomic.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/output-atomic.js"; +export * from "../compat/browser/output-atomic.js"; diff --git a/src/browser/paths.ts b/src/browser/paths.ts index bff9fec9ea9..a727bfbe7a4 100644 --- a/src/browser/paths.ts +++ b/src/browser/paths.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/paths.js"; +export * from "../compat/browser/paths.js"; diff --git a/src/browser/plugin-enabled.ts b/src/browser/plugin-enabled.ts index 3aee50235d0..bbe91af1d0b 100644 --- a/src/browser/plugin-enabled.ts +++ b/src/browser/plugin-enabled.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/plugin-enabled.js"; +export * from "../compat/browser/plugin-enabled.js"; diff --git a/src/browser/plugin-service.ts b/src/browser/plugin-service.ts index af6a14f0d2d..a54e051fdb7 100644 --- a/src/browser/plugin-service.ts +++ b/src/browser/plugin-service.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/plugin-service.js"; +export * from "../compat/browser/plugin-service.js"; diff --git a/src/browser/profile-capabilities.ts b/src/browser/profile-capabilities.ts index f486ed4175a..fa1f20fb30a 100644 --- a/src/browser/profile-capabilities.ts +++ b/src/browser/profile-capabilities.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/profile-capabilities.js"; +export * from "../compat/browser/profile-capabilities.js"; diff --git a/src/browser/profiles-service.ts b/src/browser/profiles-service.ts index 0d5ac204e6d..b47bc2f0b70 100644 --- a/src/browser/profiles-service.ts +++ b/src/browser/profiles-service.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/profiles-service.js"; +export * from "../compat/browser/profiles-service.js"; diff --git a/src/browser/profiles.ts b/src/browser/profiles.ts index 6676ffff054..07d7a788540 100644 --- a/src/browser/profiles.ts +++ b/src/browser/profiles.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/profiles.js"; +export * from "../compat/browser/profiles.js"; diff --git a/src/browser/proxy-files.ts b/src/browser/proxy-files.ts index 839a4c5c30c..5aa0c912760 100644 --- a/src/browser/proxy-files.ts +++ b/src/browser/proxy-files.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/proxy-files.js"; +export * from "../compat/browser/proxy-files.js"; diff --git a/src/browser/pw-ai-module.ts b/src/browser/pw-ai-module.ts index 046248d0b3e..26a77771735 100644 --- a/src/browser/pw-ai-module.ts +++ b/src/browser/pw-ai-module.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-ai-module.js"; +export * from "../compat/browser/pw-ai-module.js"; diff --git a/src/browser/pw-ai-state.ts b/src/browser/pw-ai-state.ts index 061fba4a40d..3c34faa50db 100644 --- a/src/browser/pw-ai-state.ts +++ b/src/browser/pw-ai-state.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-ai-state.js"; +export * from "../compat/browser/pw-ai-state.js"; diff --git a/src/browser/pw-ai.ts b/src/browser/pw-ai.ts index f9b60d976d4..82956c6813e 100644 --- a/src/browser/pw-ai.ts +++ b/src/browser/pw-ai.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-ai.js"; +export * from "../compat/browser/pw-ai.js"; diff --git a/src/browser/pw-role-snapshot.ts b/src/browser/pw-role-snapshot.ts index 6efcb09ba0e..99c5f9a18d4 100644 --- a/src/browser/pw-role-snapshot.ts +++ b/src/browser/pw-role-snapshot.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-role-snapshot.js"; +export * from "../compat/browser/pw-role-snapshot.js"; diff --git a/src/browser/pw-session.mock-setup.ts b/src/browser/pw-session.mock-setup.ts index b7cc7071733..215e8827251 100644 --- a/src/browser/pw-session.mock-setup.ts +++ b/src/browser/pw-session.mock-setup.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-session.mock-setup.js"; +export * from "../compat/browser/pw-session.mock-setup.js"; diff --git a/src/browser/pw-session.page-cdp.ts b/src/browser/pw-session.page-cdp.ts index 629c0d06489..b1199b606f4 100644 --- a/src/browser/pw-session.page-cdp.ts +++ b/src/browser/pw-session.page-cdp.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-session.page-cdp.js"; +export * from "../compat/browser/pw-session.page-cdp.js"; diff --git a/src/browser/pw-session.ts b/src/browser/pw-session.ts index 01bed483f79..53c160f7704 100644 --- a/src/browser/pw-session.ts +++ b/src/browser/pw-session.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-session.js"; +export * from "../compat/browser/pw-session.js"; diff --git a/src/browser/pw-tools-core.activity.ts b/src/browser/pw-tools-core.activity.ts index 9ce708e70d4..91edf18b51c 100644 --- a/src/browser/pw-tools-core.activity.ts +++ b/src/browser/pw-tools-core.activity.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-tools-core.activity.js"; +export * from "../compat/browser/pw-tools-core.activity.js"; diff --git a/src/browser/pw-tools-core.downloads.ts b/src/browser/pw-tools-core.downloads.ts index ea4701e7d4b..c1801d05c01 100644 --- a/src/browser/pw-tools-core.downloads.ts +++ b/src/browser/pw-tools-core.downloads.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-tools-core.downloads.js"; +export * from "../compat/browser/pw-tools-core.downloads.js"; diff --git a/src/browser/pw-tools-core.interactions.ts b/src/browser/pw-tools-core.interactions.ts index 819611cbe3f..493e78b4a0f 100644 --- a/src/browser/pw-tools-core.interactions.ts +++ b/src/browser/pw-tools-core.interactions.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-tools-core.interactions.js"; +export * from "../compat/browser/pw-tools-core.interactions.js"; diff --git a/src/browser/pw-tools-core.responses.ts b/src/browser/pw-tools-core.responses.ts index 3f349280336..7dd1737cb10 100644 --- a/src/browser/pw-tools-core.responses.ts +++ b/src/browser/pw-tools-core.responses.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-tools-core.responses.js"; +export * from "../compat/browser/pw-tools-core.responses.js"; diff --git a/src/browser/pw-tools-core.shared.ts b/src/browser/pw-tools-core.shared.ts index 7306ca7ed85..65933cc9eeb 100644 --- a/src/browser/pw-tools-core.shared.ts +++ b/src/browser/pw-tools-core.shared.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-tools-core.shared.js"; +export * from "../compat/browser/pw-tools-core.shared.js"; diff --git a/src/browser/pw-tools-core.snapshot.ts b/src/browser/pw-tools-core.snapshot.ts index fe09e86b8f9..e02ceffcd79 100644 --- a/src/browser/pw-tools-core.snapshot.ts +++ b/src/browser/pw-tools-core.snapshot.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-tools-core.snapshot.js"; +export * from "../compat/browser/pw-tools-core.snapshot.js"; diff --git a/src/browser/pw-tools-core.state.ts b/src/browser/pw-tools-core.state.ts index 95b473719df..933acff0219 100644 --- a/src/browser/pw-tools-core.state.ts +++ b/src/browser/pw-tools-core.state.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-tools-core.state.js"; +export * from "../compat/browser/pw-tools-core.state.js"; diff --git a/src/browser/pw-tools-core.storage.ts b/src/browser/pw-tools-core.storage.ts index 96702ba01fe..22a36280a36 100644 --- a/src/browser/pw-tools-core.storage.ts +++ b/src/browser/pw-tools-core.storage.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-tools-core.storage.js"; +export * from "../compat/browser/pw-tools-core.storage.js"; diff --git a/src/browser/pw-tools-core.test-harness.ts b/src/browser/pw-tools-core.test-harness.ts index 9bccb724cea..fe4bd86c684 100644 --- a/src/browser/pw-tools-core.test-harness.ts +++ b/src/browser/pw-tools-core.test-harness.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-tools-core.test-harness.js"; +export * from "../compat/browser/pw-tools-core.test-harness.js"; diff --git a/src/browser/pw-tools-core.trace.ts b/src/browser/pw-tools-core.trace.ts index feb3469bca7..2c973696f38 100644 --- a/src/browser/pw-tools-core.trace.ts +++ b/src/browser/pw-tools-core.trace.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-tools-core.trace.js"; +export * from "../compat/browser/pw-tools-core.trace.js"; diff --git a/src/browser/pw-tools-core.ts b/src/browser/pw-tools-core.ts index 06163e7e570..0484bf368df 100644 --- a/src/browser/pw-tools-core.ts +++ b/src/browser/pw-tools-core.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/pw-tools-core.js"; +export * from "../compat/browser/pw-tools-core.js"; diff --git a/src/browser/request-policy.ts b/src/browser/request-policy.ts index 72553db9efc..3db75faa86d 100644 --- a/src/browser/request-policy.ts +++ b/src/browser/request-policy.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/request-policy.js"; +export * from "../compat/browser/request-policy.js"; diff --git a/src/browser/resolved-config-refresh.ts b/src/browser/resolved-config-refresh.ts index 0fef8fffd33..316f4caac9c 100644 --- a/src/browser/resolved-config-refresh.ts +++ b/src/browser/resolved-config-refresh.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/resolved-config-refresh.js"; +export * from "../compat/browser/resolved-config-refresh.js"; diff --git a/src/browser/routes/agent.act.download.ts b/src/browser/routes/agent.act.download.ts index fd0e55cb7ba..1ae66b25c54 100644 --- a/src/browser/routes/agent.act.download.ts +++ b/src/browser/routes/agent.act.download.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/agent.act.download.js"; +export * from "../../compat/browser/routes/agent.act.download.js"; diff --git a/src/browser/routes/agent.act.hooks.ts b/src/browser/routes/agent.act.hooks.ts index 0d6c7b3ace6..7b62f22b9bd 100644 --- a/src/browser/routes/agent.act.hooks.ts +++ b/src/browser/routes/agent.act.hooks.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/agent.act.hooks.js"; +export * from "../../compat/browser/routes/agent.act.hooks.js"; diff --git a/src/browser/routes/agent.act.shared.ts b/src/browser/routes/agent.act.shared.ts index 4499756ef4a..7de0682824a 100644 --- a/src/browser/routes/agent.act.shared.ts +++ b/src/browser/routes/agent.act.shared.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/agent.act.shared.js"; +export * from "../../compat/browser/routes/agent.act.shared.js"; diff --git a/src/browser/routes/agent.act.ts b/src/browser/routes/agent.act.ts index 4a1aa85e941..8a2caf61656 100644 --- a/src/browser/routes/agent.act.ts +++ b/src/browser/routes/agent.act.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/agent.act.js"; +export * from "../../compat/browser/routes/agent.act.js"; diff --git a/src/browser/routes/agent.debug.ts b/src/browser/routes/agent.debug.ts index e88ca7bd036..e86b231de90 100644 --- a/src/browser/routes/agent.debug.ts +++ b/src/browser/routes/agent.debug.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/agent.debug.js"; +export * from "../../compat/browser/routes/agent.debug.js"; diff --git a/src/browser/routes/agent.shared.ts b/src/browser/routes/agent.shared.ts index 3435017ef10..0d6a678f420 100644 --- a/src/browser/routes/agent.shared.ts +++ b/src/browser/routes/agent.shared.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/agent.shared.js"; +export * from "../../compat/browser/routes/agent.shared.js"; diff --git a/src/browser/routes/agent.snapshot.plan.ts b/src/browser/routes/agent.snapshot.plan.ts index ff35196914f..7d22e8cf5fe 100644 --- a/src/browser/routes/agent.snapshot.plan.ts +++ b/src/browser/routes/agent.snapshot.plan.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/agent.snapshot.plan.js"; +export * from "../../compat/browser/routes/agent.snapshot.plan.js"; diff --git a/src/browser/routes/agent.snapshot.ts b/src/browser/routes/agent.snapshot.ts index b683b55875c..5686c7e0baf 100644 --- a/src/browser/routes/agent.snapshot.ts +++ b/src/browser/routes/agent.snapshot.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/agent.snapshot.js"; +export * from "../../compat/browser/routes/agent.snapshot.js"; diff --git a/src/browser/routes/agent.storage.ts b/src/browser/routes/agent.storage.ts index b75a0c8f494..1158913b6bc 100644 --- a/src/browser/routes/agent.storage.ts +++ b/src/browser/routes/agent.storage.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/agent.storage.js"; +export * from "../../compat/browser/routes/agent.storage.js"; diff --git a/src/browser/routes/agent.ts b/src/browser/routes/agent.ts index 816ed3d7c39..5c8b82eac38 100644 --- a/src/browser/routes/agent.ts +++ b/src/browser/routes/agent.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/agent.js"; +export * from "../../compat/browser/routes/agent.js"; diff --git a/src/browser/routes/basic.ts b/src/browser/routes/basic.ts index 211de1babf7..8a35d50c86b 100644 --- a/src/browser/routes/basic.ts +++ b/src/browser/routes/basic.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/basic.js"; +export * from "../../compat/browser/routes/basic.js"; diff --git a/src/browser/routes/dispatcher.ts b/src/browser/routes/dispatcher.ts index 46f6f6e9d29..7da21064acd 100644 --- a/src/browser/routes/dispatcher.ts +++ b/src/browser/routes/dispatcher.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/dispatcher.js"; +export * from "../../compat/browser/routes/dispatcher.js"; diff --git a/src/browser/routes/index.ts b/src/browser/routes/index.ts index 631fc5993d9..4fd74ce31db 100644 --- a/src/browser/routes/index.ts +++ b/src/browser/routes/index.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/index.js"; +export * from "../../compat/browser/routes/index.js"; diff --git a/src/browser/routes/output-paths.ts b/src/browser/routes/output-paths.ts index 34b43eaae85..8a82274d666 100644 --- a/src/browser/routes/output-paths.ts +++ b/src/browser/routes/output-paths.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/output-paths.js"; +export * from "../../compat/browser/routes/output-paths.js"; diff --git a/src/browser/routes/path-output.ts b/src/browser/routes/path-output.ts index db9c26a1f1d..e913bbb6b00 100644 --- a/src/browser/routes/path-output.ts +++ b/src/browser/routes/path-output.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/path-output.js"; +export * from "../../compat/browser/routes/path-output.js"; diff --git a/src/browser/routes/tabs.ts b/src/browser/routes/tabs.ts index a302625e27a..db346ca22ad 100644 --- a/src/browser/routes/tabs.ts +++ b/src/browser/routes/tabs.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/tabs.js"; +export * from "../../compat/browser/routes/tabs.js"; diff --git a/src/browser/routes/test-helpers.ts b/src/browser/routes/test-helpers.ts index fc27d64dfc5..5bd19ffc39d 100644 --- a/src/browser/routes/test-helpers.ts +++ b/src/browser/routes/test-helpers.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/test-helpers.js"; +export * from "../../compat/browser/routes/test-helpers.js"; diff --git a/src/browser/routes/types.ts b/src/browser/routes/types.ts index b8136a5ff60..7ed7e1e86e1 100644 --- a/src/browser/routes/types.ts +++ b/src/browser/routes/types.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/types.js"; +export * from "../../compat/browser/routes/types.js"; diff --git a/src/browser/routes/utils.ts b/src/browser/routes/utils.ts index 3f255a30c1d..f5ed004408d 100644 --- a/src/browser/routes/utils.ts +++ b/src/browser/routes/utils.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/browser/routes/utils.js"; +export * from "../../compat/browser/routes/utils.js"; diff --git a/src/browser/runtime-lifecycle.ts b/src/browser/runtime-lifecycle.ts index 82d629d3e72..efce554f69a 100644 --- a/src/browser/runtime-lifecycle.ts +++ b/src/browser/runtime-lifecycle.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/runtime-lifecycle.js"; +export * from "../compat/browser/runtime-lifecycle.js"; diff --git a/src/browser/safe-filename.ts b/src/browser/safe-filename.ts index 9f2a443e412..641e9901837 100644 --- a/src/browser/safe-filename.ts +++ b/src/browser/safe-filename.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/safe-filename.js"; +export * from "../compat/browser/safe-filename.js"; diff --git a/src/browser/screenshot.ts b/src/browser/screenshot.ts index 8de8cfab46e..4620eb3abaf 100644 --- a/src/browser/screenshot.ts +++ b/src/browser/screenshot.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/screenshot.js"; +export * from "../compat/browser/screenshot.js"; diff --git a/src/browser/server-context.availability.ts b/src/browser/server-context.availability.ts index 123ff18fdca..b4b23264cf2 100644 --- a/src/browser/server-context.availability.ts +++ b/src/browser/server-context.availability.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server-context.availability.js"; +export * from "../compat/browser/server-context.availability.js"; diff --git a/src/browser/server-context.chrome-test-harness.ts b/src/browser/server-context.chrome-test-harness.ts index ee00500d4d3..7c9fb04bc33 100644 --- a/src/browser/server-context.chrome-test-harness.ts +++ b/src/browser/server-context.chrome-test-harness.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server-context.chrome-test-harness.js"; +export * from "../compat/browser/server-context.chrome-test-harness.js"; diff --git a/src/browser/server-context.constants.ts b/src/browser/server-context.constants.ts index e90b8f525c9..44e4032c6b7 100644 --- a/src/browser/server-context.constants.ts +++ b/src/browser/server-context.constants.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server-context.constants.js"; +export * from "../compat/browser/server-context.constants.js"; diff --git a/src/browser/server-context.remote-tab-ops.harness.ts b/src/browser/server-context.remote-tab-ops.harness.ts index 3059f0b1a7c..9e1af62529c 100644 --- a/src/browser/server-context.remote-tab-ops.harness.ts +++ b/src/browser/server-context.remote-tab-ops.harness.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server-context.remote-tab-ops.harness.js"; +export * from "../compat/browser/server-context.remote-tab-ops.harness.js"; diff --git a/src/browser/server-context.reset.ts b/src/browser/server-context.reset.ts index c3217686b21..d755e555c29 100644 --- a/src/browser/server-context.reset.ts +++ b/src/browser/server-context.reset.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server-context.reset.js"; +export * from "../compat/browser/server-context.reset.js"; diff --git a/src/browser/server-context.selection.ts b/src/browser/server-context.selection.ts index a2bbceddd0d..64e97c2d537 100644 --- a/src/browser/server-context.selection.ts +++ b/src/browser/server-context.selection.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server-context.selection.js"; +export * from "../compat/browser/server-context.selection.js"; diff --git a/src/browser/server-context.tab-ops.ts b/src/browser/server-context.tab-ops.ts index e3ae2f32be3..e1008277f7b 100644 --- a/src/browser/server-context.tab-ops.ts +++ b/src/browser/server-context.tab-ops.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server-context.tab-ops.js"; +export * from "../compat/browser/server-context.tab-ops.js"; diff --git a/src/browser/server-context.ts b/src/browser/server-context.ts index 92c04e017a2..e68c4be280a 100644 --- a/src/browser/server-context.ts +++ b/src/browser/server-context.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server-context.js"; +export * from "../compat/browser/server-context.js"; diff --git a/src/browser/server-context.types.ts b/src/browser/server-context.types.ts index 1326b507b16..b2069f17293 100644 --- a/src/browser/server-context.types.ts +++ b/src/browser/server-context.types.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server-context.types.js"; +export * from "../compat/browser/server-context.types.js"; diff --git a/src/browser/server-lifecycle.ts b/src/browser/server-lifecycle.ts index 635e92244e4..bf2f57ce836 100644 --- a/src/browser/server-lifecycle.ts +++ b/src/browser/server-lifecycle.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server-lifecycle.js"; +export * from "../compat/browser/server-lifecycle.js"; diff --git a/src/browser/server-middleware.ts b/src/browser/server-middleware.ts index f6ad4cad1eb..4cc5d347b0e 100644 --- a/src/browser/server-middleware.ts +++ b/src/browser/server-middleware.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server-middleware.js"; +export * from "../compat/browser/server-middleware.js"; diff --git a/src/browser/server.agent-contract.test-harness.ts b/src/browser/server.agent-contract.test-harness.ts index 2e7271552de..32f017eec51 100644 --- a/src/browser/server.agent-contract.test-harness.ts +++ b/src/browser/server.agent-contract.test-harness.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server.agent-contract.test-harness.js"; +export * from "../compat/browser/server.agent-contract.test-harness.js"; diff --git a/src/browser/server.control-server.test-harness.ts b/src/browser/server.control-server.test-harness.ts index a329a73da8a..45b6be46df8 100644 --- a/src/browser/server.control-server.test-harness.ts +++ b/src/browser/server.control-server.test-harness.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server.control-server.test-harness.js"; +export * from "../compat/browser/server.control-server.test-harness.js"; diff --git a/src/browser/server.ts b/src/browser/server.ts index ea38f1269ff..cfc2bf010fe 100644 --- a/src/browser/server.ts +++ b/src/browser/server.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/server.js"; +export * from "../compat/browser/server.js"; diff --git a/src/browser/session-tab-registry.ts b/src/browser/session-tab-registry.ts index 5a76ef56d4d..b6c1c877ee9 100644 --- a/src/browser/session-tab-registry.ts +++ b/src/browser/session-tab-registry.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/session-tab-registry.js"; +export * from "../compat/browser/session-tab-registry.js"; diff --git a/src/browser/snapshot-roles.ts b/src/browser/snapshot-roles.ts index 5c4b98c1039..83e1c372d69 100644 --- a/src/browser/snapshot-roles.ts +++ b/src/browser/snapshot-roles.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/snapshot-roles.js"; +export * from "../compat/browser/snapshot-roles.js"; diff --git a/src/browser/target-id.ts b/src/browser/target-id.ts index 4d716464d57..14f2e261231 100644 --- a/src/browser/target-id.ts +++ b/src/browser/target-id.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/target-id.js"; +export * from "../compat/browser/target-id.js"; diff --git a/src/browser/test-fetch.ts b/src/browser/test-fetch.ts index 73daaa67d52..5a9e1d2a543 100644 --- a/src/browser/test-fetch.ts +++ b/src/browser/test-fetch.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/test-fetch.js"; +export * from "../compat/browser/test-fetch.js"; diff --git a/src/browser/test-port.ts b/src/browser/test-port.ts index a727492f6e2..db34d78229d 100644 --- a/src/browser/test-port.ts +++ b/src/browser/test-port.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/test-port.js"; +export * from "../compat/browser/test-port.js"; diff --git a/src/browser/trash.ts b/src/browser/trash.ts index 0c2240aed4e..86b99ded013 100644 --- a/src/browser/trash.ts +++ b/src/browser/trash.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/trash.js"; +export * from "../compat/browser/trash.js"; diff --git a/src/browser/url-pattern.ts b/src/browser/url-pattern.ts index fc781caac10..8a6a8dcd1c8 100644 --- a/src/browser/url-pattern.ts +++ b/src/browser/url-pattern.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/browser/url-pattern.js"; +export * from "../compat/browser/url-pattern.js"; diff --git a/src/cli/browser-cli-actions-input.ts b/src/cli/browser-cli-actions-input.ts index 6ca2162d9ce..0be40b09365 100644 --- a/src/cli/browser-cli-actions-input.ts +++ b/src/cli/browser-cli-actions-input.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/cli/browser-cli-actions-input.js"; +export * from "../compat/browser/cli/browser-cli-actions-input.js"; diff --git a/src/cli/browser-cli-actions-input/register.element.ts b/src/cli/browser-cli-actions-input/register.element.ts index 55d403be739..c143deb8dc7 100644 --- a/src/cli/browser-cli-actions-input/register.element.ts +++ b/src/cli/browser-cli-actions-input/register.element.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/cli/browser-cli-actions-input/register.element.js"; +export * from "../../compat/browser/cli/browser-cli-actions-input/register.element.js"; diff --git a/src/cli/browser-cli-actions-input/register.files-downloads.ts b/src/cli/browser-cli-actions-input/register.files-downloads.ts index 2d11e04ded7..fcdd0efe80d 100644 --- a/src/cli/browser-cli-actions-input/register.files-downloads.ts +++ b/src/cli/browser-cli-actions-input/register.files-downloads.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/cli/browser-cli-actions-input/register.files-downloads.js"; +export * from "../../compat/browser/cli/browser-cli-actions-input/register.files-downloads.js"; diff --git a/src/cli/browser-cli-actions-input/register.form-wait-eval.ts b/src/cli/browser-cli-actions-input/register.form-wait-eval.ts index c7f103c7ec8..399e86b8a57 100644 --- a/src/cli/browser-cli-actions-input/register.form-wait-eval.ts +++ b/src/cli/browser-cli-actions-input/register.form-wait-eval.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/cli/browser-cli-actions-input/register.form-wait-eval.js"; +export * from "../../compat/browser/cli/browser-cli-actions-input/register.form-wait-eval.js"; diff --git a/src/cli/browser-cli-actions-input/register.navigation.ts b/src/cli/browser-cli-actions-input/register.navigation.ts index 17d2b345d85..80b084a46fb 100644 --- a/src/cli/browser-cli-actions-input/register.navigation.ts +++ b/src/cli/browser-cli-actions-input/register.navigation.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/cli/browser-cli-actions-input/register.navigation.js"; +export * from "../../compat/browser/cli/browser-cli-actions-input/register.navigation.js"; diff --git a/src/cli/browser-cli-actions-input/register.ts b/src/cli/browser-cli-actions-input/register.ts index 7b3a2b70d6c..e7a22e29348 100644 --- a/src/cli/browser-cli-actions-input/register.ts +++ b/src/cli/browser-cli-actions-input/register.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/cli/browser-cli-actions-input/register.js"; +export * from "../../compat/browser/cli/browser-cli-actions-input/register.js"; diff --git a/src/cli/browser-cli-actions-input/shared.ts b/src/cli/browser-cli-actions-input/shared.ts index 369888b4599..006b187770e 100644 --- a/src/cli/browser-cli-actions-input/shared.ts +++ b/src/cli/browser-cli-actions-input/shared.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/cli/browser-cli-actions-input/shared.js"; +export * from "../../compat/browser/cli/browser-cli-actions-input/shared.js"; diff --git a/src/cli/browser-cli-actions-observe.ts b/src/cli/browser-cli-actions-observe.ts index a8d651515a2..6ff6eb45e22 100644 --- a/src/cli/browser-cli-actions-observe.ts +++ b/src/cli/browser-cli-actions-observe.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/cli/browser-cli-actions-observe.js"; +export * from "../compat/browser/cli/browser-cli-actions-observe.js"; diff --git a/src/cli/browser-cli-debug.ts b/src/cli/browser-cli-debug.ts index ad436b36766..a9d836c7385 100644 --- a/src/cli/browser-cli-debug.ts +++ b/src/cli/browser-cli-debug.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/cli/browser-cli-debug.js"; +export * from "../compat/browser/cli/browser-cli-debug.js"; diff --git a/src/cli/browser-cli-examples.ts b/src/cli/browser-cli-examples.ts index 98c82ff5b2e..e363530c286 100644 --- a/src/cli/browser-cli-examples.ts +++ b/src/cli/browser-cli-examples.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/cli/browser-cli-examples.js"; +export * from "../compat/browser/cli/browser-cli-examples.js"; diff --git a/src/cli/browser-cli-inspect.ts b/src/cli/browser-cli-inspect.ts index df7ac1ca434..9b0f9217b4c 100644 --- a/src/cli/browser-cli-inspect.ts +++ b/src/cli/browser-cli-inspect.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/cli/browser-cli-inspect.js"; +export * from "../compat/browser/cli/browser-cli-inspect.js"; diff --git a/src/cli/browser-cli-manage.ts b/src/cli/browser-cli-manage.ts index d7f1b5a8478..2ad6ccbf1e9 100644 --- a/src/cli/browser-cli-manage.ts +++ b/src/cli/browser-cli-manage.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/cli/browser-cli-manage.js"; +export * from "../compat/browser/cli/browser-cli-manage.js"; diff --git a/src/cli/browser-cli-resize.ts b/src/cli/browser-cli-resize.ts index 4aa40d1cf33..dd66b30db21 100644 --- a/src/cli/browser-cli-resize.ts +++ b/src/cli/browser-cli-resize.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/cli/browser-cli-resize.js"; +export * from "../compat/browser/cli/browser-cli-resize.js"; diff --git a/src/cli/browser-cli-shared.ts b/src/cli/browser-cli-shared.ts index 4d0f347e3e9..0b77b2d72d6 100644 --- a/src/cli/browser-cli-shared.ts +++ b/src/cli/browser-cli-shared.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/cli/browser-cli-shared.js"; +export * from "../compat/browser/cli/browser-cli-shared.js"; diff --git a/src/cli/browser-cli-state.cookies-storage.ts b/src/cli/browser-cli-state.cookies-storage.ts index b0a79dd7fd5..606d5789234 100644 --- a/src/cli/browser-cli-state.cookies-storage.ts +++ b/src/cli/browser-cli-state.cookies-storage.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/cli/browser-cli-state.cookies-storage.js"; +export * from "../compat/browser/cli/browser-cli-state.cookies-storage.js"; diff --git a/src/cli/browser-cli-state.ts b/src/cli/browser-cli-state.ts index 3fa202ceb56..2021ed7191e 100644 --- a/src/cli/browser-cli-state.ts +++ b/src/cli/browser-cli-state.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/cli/browser-cli-state.js"; +export * from "../compat/browser/cli/browser-cli-state.js"; diff --git a/src/cli/browser-cli.ts b/src/cli/browser-cli.ts index 1f9675a6223..1057040945d 100644 --- a/src/cli/browser-cli.ts +++ b/src/cli/browser-cli.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/cli/browser-cli.js"; +export * from "../compat/browser/cli/browser-cli.js"; diff --git a/src/commands/doctor-browser.ts b/src/commands/doctor-browser.ts index 028bfc50fb0..58883c99627 100644 --- a/src/commands/doctor-browser.ts +++ b/src/commands/doctor-browser.ts @@ -1,9 +1,9 @@ +import type { OpenClawConfig } from "../config/config.js"; import { parseBrowserMajorVersion, readBrowserVersion, resolveGoogleChromeExecutableForPlatform, -} from "../browser/chrome.executables.js"; -import type { OpenClawConfig } from "../config/config.js"; +} from "../plugin-sdk/browser-runtime.js"; import { note } from "../terminal/note.js"; const CHROME_MCP_MIN_MAJOR = 144; diff --git a/src/compat/browser/bridge-auth-registry.ts b/src/compat/browser/bridge-auth-registry.ts new file mode 100644 index 00000000000..4ff604f7cb0 --- /dev/null +++ b/src/compat/browser/bridge-auth-registry.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/bridge-auth-registry.js"; diff --git a/src/compat/browser/bridge-server.ts b/src/compat/browser/bridge-server.ts new file mode 100644 index 00000000000..8d03acfa1d9 --- /dev/null +++ b/src/compat/browser/bridge-server.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/bridge-server.js"; diff --git a/src/compat/browser/cdp-proxy-bypass.ts b/src/compat/browser/cdp-proxy-bypass.ts new file mode 100644 index 00000000000..210f9270622 --- /dev/null +++ b/src/compat/browser/cdp-proxy-bypass.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/cdp-proxy-bypass.js"; diff --git a/src/compat/browser/cdp-timeouts.ts b/src/compat/browser/cdp-timeouts.ts new file mode 100644 index 00000000000..5e92f6eeb2a --- /dev/null +++ b/src/compat/browser/cdp-timeouts.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/cdp-timeouts.js"; diff --git a/src/compat/browser/cdp.helpers.ts b/src/compat/browser/cdp.helpers.ts new file mode 100644 index 00000000000..6609eab39db --- /dev/null +++ b/src/compat/browser/cdp.helpers.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/cdp.helpers.js"; diff --git a/src/compat/browser/cdp.ts b/src/compat/browser/cdp.ts new file mode 100644 index 00000000000..bd589155b6b --- /dev/null +++ b/src/compat/browser/cdp.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/cdp.js"; diff --git a/src/compat/browser/chrome-mcp.snapshot.ts b/src/compat/browser/chrome-mcp.snapshot.ts new file mode 100644 index 00000000000..640ea7a444b --- /dev/null +++ b/src/compat/browser/chrome-mcp.snapshot.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/chrome-mcp.snapshot.js"; diff --git a/src/compat/browser/chrome-mcp.ts b/src/compat/browser/chrome-mcp.ts new file mode 100644 index 00000000000..9b65c4b3a0a --- /dev/null +++ b/src/compat/browser/chrome-mcp.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/chrome-mcp.js"; diff --git a/src/compat/browser/chrome-user-data-dir.test-harness.ts b/src/compat/browser/chrome-user-data-dir.test-harness.ts new file mode 100644 index 00000000000..645ff118988 --- /dev/null +++ b/src/compat/browser/chrome-user-data-dir.test-harness.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/chrome-user-data-dir.test-harness.js"; diff --git a/src/compat/browser/chrome.executables.ts b/src/compat/browser/chrome.executables.ts new file mode 100644 index 00000000000..99911965bf9 --- /dev/null +++ b/src/compat/browser/chrome.executables.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/chrome.executables.js"; diff --git a/src/compat/browser/chrome.profile-decoration.ts b/src/compat/browser/chrome.profile-decoration.ts new file mode 100644 index 00000000000..85210b7778f --- /dev/null +++ b/src/compat/browser/chrome.profile-decoration.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/chrome.profile-decoration.js"; diff --git a/src/compat/browser/chrome.ts b/src/compat/browser/chrome.ts new file mode 100644 index 00000000000..8d0c78213d9 --- /dev/null +++ b/src/compat/browser/chrome.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/chrome.js"; diff --git a/src/compat/browser/cli/browser-cli-actions-input.ts b/src/compat/browser/cli/browser-cli-actions-input.ts new file mode 100644 index 00000000000..e28487b0879 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-actions-input.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/cli/browser-cli-actions-input.js"; diff --git a/src/compat/browser/cli/browser-cli-actions-input/register.element.ts b/src/compat/browser/cli/browser-cli-actions-input/register.element.ts new file mode 100644 index 00000000000..bad7bcfc3d6 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-actions-input/register.element.ts @@ -0,0 +1 @@ +export * from "../../../../../extensions/browser/src/cli/browser-cli-actions-input/register.element.js"; diff --git a/src/compat/browser/cli/browser-cli-actions-input/register.files-downloads.ts b/src/compat/browser/cli/browser-cli-actions-input/register.files-downloads.ts new file mode 100644 index 00000000000..4f0f7c47df5 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-actions-input/register.files-downloads.ts @@ -0,0 +1 @@ +export * from "../../../../../extensions/browser/src/cli/browser-cli-actions-input/register.files-downloads.js"; diff --git a/src/compat/browser/cli/browser-cli-actions-input/register.form-wait-eval.ts b/src/compat/browser/cli/browser-cli-actions-input/register.form-wait-eval.ts new file mode 100644 index 00000000000..3427bc70b5e --- /dev/null +++ b/src/compat/browser/cli/browser-cli-actions-input/register.form-wait-eval.ts @@ -0,0 +1 @@ +export * from "../../../../../extensions/browser/src/cli/browser-cli-actions-input/register.form-wait-eval.js"; diff --git a/src/compat/browser/cli/browser-cli-actions-input/register.navigation.ts b/src/compat/browser/cli/browser-cli-actions-input/register.navigation.ts new file mode 100644 index 00000000000..db320b01aeb --- /dev/null +++ b/src/compat/browser/cli/browser-cli-actions-input/register.navigation.ts @@ -0,0 +1 @@ +export * from "../../../../../extensions/browser/src/cli/browser-cli-actions-input/register.navigation.js"; diff --git a/src/compat/browser/cli/browser-cli-actions-input/register.ts b/src/compat/browser/cli/browser-cli-actions-input/register.ts new file mode 100644 index 00000000000..834b384fb28 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-actions-input/register.ts @@ -0,0 +1 @@ +export * from "../../../../../extensions/browser/src/cli/browser-cli-actions-input/register.js"; diff --git a/src/compat/browser/cli/browser-cli-actions-input/shared.ts b/src/compat/browser/cli/browser-cli-actions-input/shared.ts new file mode 100644 index 00000000000..1bf849aa1c8 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-actions-input/shared.ts @@ -0,0 +1 @@ +export * from "../../../../../extensions/browser/src/cli/browser-cli-actions-input/shared.js"; diff --git a/src/compat/browser/cli/browser-cli-actions-observe.ts b/src/compat/browser/cli/browser-cli-actions-observe.ts new file mode 100644 index 00000000000..56efe09f031 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-actions-observe.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/cli/browser-cli-actions-observe.js"; diff --git a/src/compat/browser/cli/browser-cli-debug.ts b/src/compat/browser/cli/browser-cli-debug.ts new file mode 100644 index 00000000000..3923b0ee032 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-debug.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/cli/browser-cli-debug.js"; diff --git a/src/compat/browser/cli/browser-cli-examples.ts b/src/compat/browser/cli/browser-cli-examples.ts new file mode 100644 index 00000000000..685abf9d2d1 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-examples.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/cli/browser-cli-examples.js"; diff --git a/src/compat/browser/cli/browser-cli-inspect.ts b/src/compat/browser/cli/browser-cli-inspect.ts new file mode 100644 index 00000000000..d2a05c36d53 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-inspect.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/cli/browser-cli-inspect.js"; diff --git a/src/compat/browser/cli/browser-cli-manage.ts b/src/compat/browser/cli/browser-cli-manage.ts new file mode 100644 index 00000000000..9e9694dbf72 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-manage.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/cli/browser-cli-manage.js"; diff --git a/src/compat/browser/cli/browser-cli-resize.ts b/src/compat/browser/cli/browser-cli-resize.ts new file mode 100644 index 00000000000..5422027b7f2 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-resize.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/cli/browser-cli-resize.js"; diff --git a/src/compat/browser/cli/browser-cli-shared.ts b/src/compat/browser/cli/browser-cli-shared.ts new file mode 100644 index 00000000000..f366f70f683 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-shared.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/cli/browser-cli-shared.js"; diff --git a/src/compat/browser/cli/browser-cli-state.cookies-storage.ts b/src/compat/browser/cli/browser-cli-state.cookies-storage.ts new file mode 100644 index 00000000000..d2fe6454832 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-state.cookies-storage.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/cli/browser-cli-state.cookies-storage.js"; diff --git a/src/compat/browser/cli/browser-cli-state.ts b/src/compat/browser/cli/browser-cli-state.ts new file mode 100644 index 00000000000..34506467690 --- /dev/null +++ b/src/compat/browser/cli/browser-cli-state.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/cli/browser-cli-state.js"; diff --git a/src/compat/browser/cli/browser-cli.ts b/src/compat/browser/cli/browser-cli.ts new file mode 100644 index 00000000000..6f5f5cd5e3d --- /dev/null +++ b/src/compat/browser/cli/browser-cli.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/cli/browser-cli.js"; diff --git a/src/compat/browser/client-actions-core.ts b/src/compat/browser/client-actions-core.ts new file mode 100644 index 00000000000..9459503e9b9 --- /dev/null +++ b/src/compat/browser/client-actions-core.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/client-actions-core.js"; diff --git a/src/compat/browser/client-actions-observe.ts b/src/compat/browser/client-actions-observe.ts new file mode 100644 index 00000000000..4c97c496efa --- /dev/null +++ b/src/compat/browser/client-actions-observe.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/client-actions-observe.js"; diff --git a/src/compat/browser/client-actions-state.ts b/src/compat/browser/client-actions-state.ts new file mode 100644 index 00000000000..d857f92954c --- /dev/null +++ b/src/compat/browser/client-actions-state.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/client-actions-state.js"; diff --git a/src/compat/browser/client-actions-types.ts b/src/compat/browser/client-actions-types.ts new file mode 100644 index 00000000000..b246b16b619 --- /dev/null +++ b/src/compat/browser/client-actions-types.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/client-actions-types.js"; diff --git a/src/compat/browser/client-actions-url.ts b/src/compat/browser/client-actions-url.ts new file mode 100644 index 00000000000..08b8bf6770a --- /dev/null +++ b/src/compat/browser/client-actions-url.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/client-actions-url.js"; diff --git a/src/compat/browser/client-actions.ts b/src/compat/browser/client-actions.ts new file mode 100644 index 00000000000..f5e6833a127 --- /dev/null +++ b/src/compat/browser/client-actions.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/client-actions.js"; diff --git a/src/compat/browser/client-fetch.ts b/src/compat/browser/client-fetch.ts new file mode 100644 index 00000000000..84f5d2ab649 --- /dev/null +++ b/src/compat/browser/client-fetch.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/client-fetch.js"; diff --git a/src/compat/browser/client.ts b/src/compat/browser/client.ts new file mode 100644 index 00000000000..4adf65b620c --- /dev/null +++ b/src/compat/browser/client.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/client.js"; diff --git a/src/compat/browser/config.ts b/src/compat/browser/config.ts new file mode 100644 index 00000000000..48325a8ad91 --- /dev/null +++ b/src/compat/browser/config.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/config.js"; diff --git a/src/compat/browser/constants.ts b/src/compat/browser/constants.ts new file mode 100644 index 00000000000..7c74f3d53a9 --- /dev/null +++ b/src/compat/browser/constants.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/constants.js"; diff --git a/src/compat/browser/control-auth.ts b/src/compat/browser/control-auth.ts new file mode 100644 index 00000000000..dd57cb50dc3 --- /dev/null +++ b/src/compat/browser/control-auth.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/control-auth.js"; diff --git a/src/compat/browser/control-service.ts b/src/compat/browser/control-service.ts new file mode 100644 index 00000000000..d34f3938309 --- /dev/null +++ b/src/compat/browser/control-service.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/control-service.js"; diff --git a/src/compat/browser/csrf.ts b/src/compat/browser/csrf.ts new file mode 100644 index 00000000000..89181d7b284 --- /dev/null +++ b/src/compat/browser/csrf.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/csrf.js"; diff --git a/src/compat/browser/errors.ts b/src/compat/browser/errors.ts new file mode 100644 index 00000000000..49b2fbdaeb7 --- /dev/null +++ b/src/compat/browser/errors.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/errors.js"; diff --git a/src/compat/browser/form-fields.ts b/src/compat/browser/form-fields.ts new file mode 100644 index 00000000000..49a243a4afa --- /dev/null +++ b/src/compat/browser/form-fields.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/form-fields.js"; diff --git a/src/compat/browser/gateway/browser-request.ts b/src/compat/browser/gateway/browser-request.ts new file mode 100644 index 00000000000..aac2a88706a --- /dev/null +++ b/src/compat/browser/gateway/browser-request.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/gateway/browser-request.js"; diff --git a/src/compat/browser/http-auth.ts b/src/compat/browser/http-auth.ts new file mode 100644 index 00000000000..37d413c9119 --- /dev/null +++ b/src/compat/browser/http-auth.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/http-auth.js"; diff --git a/src/compat/browser/navigation-guard.ts b/src/compat/browser/navigation-guard.ts new file mode 100644 index 00000000000..e34b5745e47 --- /dev/null +++ b/src/compat/browser/navigation-guard.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/navigation-guard.js"; diff --git a/src/compat/browser/node-host/invoke-browser.ts b/src/compat/browser/node-host/invoke-browser.ts new file mode 100644 index 00000000000..0349ccd53e3 --- /dev/null +++ b/src/compat/browser/node-host/invoke-browser.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/node-host/invoke-browser.js"; diff --git a/src/compat/browser/output-atomic.ts b/src/compat/browser/output-atomic.ts new file mode 100644 index 00000000000..65963beda46 --- /dev/null +++ b/src/compat/browser/output-atomic.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/output-atomic.js"; diff --git a/src/compat/browser/paths.ts b/src/compat/browser/paths.ts new file mode 100644 index 00000000000..dd2b25a1479 --- /dev/null +++ b/src/compat/browser/paths.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/paths.js"; diff --git a/src/compat/browser/plugin-enabled.ts b/src/compat/browser/plugin-enabled.ts new file mode 100644 index 00000000000..32322facc58 --- /dev/null +++ b/src/compat/browser/plugin-enabled.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/plugin-enabled.js"; diff --git a/src/compat/browser/plugin-service.ts b/src/compat/browser/plugin-service.ts new file mode 100644 index 00000000000..acc74b0ff7d --- /dev/null +++ b/src/compat/browser/plugin-service.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/plugin-service.js"; diff --git a/src/compat/browser/profile-capabilities.ts b/src/compat/browser/profile-capabilities.ts new file mode 100644 index 00000000000..b173ef6c6ae --- /dev/null +++ b/src/compat/browser/profile-capabilities.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/profile-capabilities.js"; diff --git a/src/compat/browser/profiles-service.ts b/src/compat/browser/profiles-service.ts new file mode 100644 index 00000000000..d270652e6e7 --- /dev/null +++ b/src/compat/browser/profiles-service.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/profiles-service.js"; diff --git a/src/compat/browser/profiles.ts b/src/compat/browser/profiles.ts new file mode 100644 index 00000000000..5f49b013759 --- /dev/null +++ b/src/compat/browser/profiles.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/profiles.js"; diff --git a/src/compat/browser/proxy-files.ts b/src/compat/browser/proxy-files.ts new file mode 100644 index 00000000000..5314daa3308 --- /dev/null +++ b/src/compat/browser/proxy-files.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/proxy-files.js"; diff --git a/src/compat/browser/pw-ai-module.ts b/src/compat/browser/pw-ai-module.ts new file mode 100644 index 00000000000..e695ca7cbbc --- /dev/null +++ b/src/compat/browser/pw-ai-module.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-ai-module.js"; diff --git a/src/compat/browser/pw-ai-state.ts b/src/compat/browser/pw-ai-state.ts new file mode 100644 index 00000000000..5a6204038b3 --- /dev/null +++ b/src/compat/browser/pw-ai-state.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-ai-state.js"; diff --git a/src/compat/browser/pw-ai.ts b/src/compat/browser/pw-ai.ts new file mode 100644 index 00000000000..7e2f4caeb8b --- /dev/null +++ b/src/compat/browser/pw-ai.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-ai.js"; diff --git a/src/compat/browser/pw-role-snapshot.ts b/src/compat/browser/pw-role-snapshot.ts new file mode 100644 index 00000000000..5b7270ccbf8 --- /dev/null +++ b/src/compat/browser/pw-role-snapshot.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-role-snapshot.js"; diff --git a/src/compat/browser/pw-session.mock-setup.ts b/src/compat/browser/pw-session.mock-setup.ts new file mode 100644 index 00000000000..8e568ebc7b2 --- /dev/null +++ b/src/compat/browser/pw-session.mock-setup.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-session.mock-setup.js"; diff --git a/src/compat/browser/pw-session.page-cdp.ts b/src/compat/browser/pw-session.page-cdp.ts new file mode 100644 index 00000000000..f30da8d70bd --- /dev/null +++ b/src/compat/browser/pw-session.page-cdp.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-session.page-cdp.js"; diff --git a/src/compat/browser/pw-session.ts b/src/compat/browser/pw-session.ts new file mode 100644 index 00000000000..47e6920952d --- /dev/null +++ b/src/compat/browser/pw-session.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-session.js"; diff --git a/src/compat/browser/pw-tools-core.activity.ts b/src/compat/browser/pw-tools-core.activity.ts new file mode 100644 index 00000000000..53f16937c4b --- /dev/null +++ b/src/compat/browser/pw-tools-core.activity.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-tools-core.activity.js"; diff --git a/src/compat/browser/pw-tools-core.downloads.ts b/src/compat/browser/pw-tools-core.downloads.ts new file mode 100644 index 00000000000..65561ac058f --- /dev/null +++ b/src/compat/browser/pw-tools-core.downloads.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-tools-core.downloads.js"; diff --git a/src/compat/browser/pw-tools-core.interactions.ts b/src/compat/browser/pw-tools-core.interactions.ts new file mode 100644 index 00000000000..50f954bc829 --- /dev/null +++ b/src/compat/browser/pw-tools-core.interactions.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-tools-core.interactions.js"; diff --git a/src/compat/browser/pw-tools-core.responses.ts b/src/compat/browser/pw-tools-core.responses.ts new file mode 100644 index 00000000000..ccec040cd83 --- /dev/null +++ b/src/compat/browser/pw-tools-core.responses.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-tools-core.responses.js"; diff --git a/src/compat/browser/pw-tools-core.shared.ts b/src/compat/browser/pw-tools-core.shared.ts new file mode 100644 index 00000000000..07295acf5ff --- /dev/null +++ b/src/compat/browser/pw-tools-core.shared.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-tools-core.shared.js"; diff --git a/src/compat/browser/pw-tools-core.snapshot.ts b/src/compat/browser/pw-tools-core.snapshot.ts new file mode 100644 index 00000000000..1631d78811e --- /dev/null +++ b/src/compat/browser/pw-tools-core.snapshot.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-tools-core.snapshot.js"; diff --git a/src/compat/browser/pw-tools-core.state.ts b/src/compat/browser/pw-tools-core.state.ts new file mode 100644 index 00000000000..6432e56c881 --- /dev/null +++ b/src/compat/browser/pw-tools-core.state.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-tools-core.state.js"; diff --git a/src/compat/browser/pw-tools-core.storage.ts b/src/compat/browser/pw-tools-core.storage.ts new file mode 100644 index 00000000000..db48cb30f79 --- /dev/null +++ b/src/compat/browser/pw-tools-core.storage.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-tools-core.storage.js"; diff --git a/src/compat/browser/pw-tools-core.test-harness.ts b/src/compat/browser/pw-tools-core.test-harness.ts new file mode 100644 index 00000000000..d4558c482c4 --- /dev/null +++ b/src/compat/browser/pw-tools-core.test-harness.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-tools-core.test-harness.js"; diff --git a/src/compat/browser/pw-tools-core.trace.ts b/src/compat/browser/pw-tools-core.trace.ts new file mode 100644 index 00000000000..9375069f470 --- /dev/null +++ b/src/compat/browser/pw-tools-core.trace.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-tools-core.trace.js"; diff --git a/src/compat/browser/pw-tools-core.ts b/src/compat/browser/pw-tools-core.ts new file mode 100644 index 00000000000..4c7029a41a6 --- /dev/null +++ b/src/compat/browser/pw-tools-core.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/pw-tools-core.js"; diff --git a/src/compat/browser/request-policy.ts b/src/compat/browser/request-policy.ts new file mode 100644 index 00000000000..6c4d279a5ca --- /dev/null +++ b/src/compat/browser/request-policy.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/request-policy.js"; diff --git a/src/compat/browser/resolved-config-refresh.ts b/src/compat/browser/resolved-config-refresh.ts new file mode 100644 index 00000000000..8923d04604b --- /dev/null +++ b/src/compat/browser/resolved-config-refresh.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/resolved-config-refresh.js"; diff --git a/src/compat/browser/routes/agent.act.download.ts b/src/compat/browser/routes/agent.act.download.ts new file mode 100644 index 00000000000..9fc21d21ba0 --- /dev/null +++ b/src/compat/browser/routes/agent.act.download.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/agent.act.download.js"; diff --git a/src/compat/browser/routes/agent.act.hooks.ts b/src/compat/browser/routes/agent.act.hooks.ts new file mode 100644 index 00000000000..87d0de8da2e --- /dev/null +++ b/src/compat/browser/routes/agent.act.hooks.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/agent.act.hooks.js"; diff --git a/src/compat/browser/routes/agent.act.shared.ts b/src/compat/browser/routes/agent.act.shared.ts new file mode 100644 index 00000000000..15482fbfb4a --- /dev/null +++ b/src/compat/browser/routes/agent.act.shared.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/agent.act.shared.js"; diff --git a/src/compat/browser/routes/agent.act.ts b/src/compat/browser/routes/agent.act.ts new file mode 100644 index 00000000000..00574556218 --- /dev/null +++ b/src/compat/browser/routes/agent.act.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/agent.act.js"; diff --git a/src/compat/browser/routes/agent.debug.ts b/src/compat/browser/routes/agent.debug.ts new file mode 100644 index 00000000000..4d980f3bb7c --- /dev/null +++ b/src/compat/browser/routes/agent.debug.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/agent.debug.js"; diff --git a/src/compat/browser/routes/agent.shared.ts b/src/compat/browser/routes/agent.shared.ts new file mode 100644 index 00000000000..b446fd565a2 --- /dev/null +++ b/src/compat/browser/routes/agent.shared.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/agent.shared.js"; diff --git a/src/compat/browser/routes/agent.snapshot.plan.ts b/src/compat/browser/routes/agent.snapshot.plan.ts new file mode 100644 index 00000000000..c16f76f7e48 --- /dev/null +++ b/src/compat/browser/routes/agent.snapshot.plan.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/agent.snapshot.plan.js"; diff --git a/src/compat/browser/routes/agent.snapshot.ts b/src/compat/browser/routes/agent.snapshot.ts new file mode 100644 index 00000000000..c5a8a71d35e --- /dev/null +++ b/src/compat/browser/routes/agent.snapshot.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/agent.snapshot.js"; diff --git a/src/compat/browser/routes/agent.storage.ts b/src/compat/browser/routes/agent.storage.ts new file mode 100644 index 00000000000..a6f1ef97dd6 --- /dev/null +++ b/src/compat/browser/routes/agent.storage.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/agent.storage.js"; diff --git a/src/compat/browser/routes/agent.ts b/src/compat/browser/routes/agent.ts new file mode 100644 index 00000000000..98a383bdd9f --- /dev/null +++ b/src/compat/browser/routes/agent.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/agent.js"; diff --git a/src/compat/browser/routes/basic.ts b/src/compat/browser/routes/basic.ts new file mode 100644 index 00000000000..7039675ca78 --- /dev/null +++ b/src/compat/browser/routes/basic.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/basic.js"; diff --git a/src/compat/browser/routes/dispatcher.ts b/src/compat/browser/routes/dispatcher.ts new file mode 100644 index 00000000000..0b2c1652857 --- /dev/null +++ b/src/compat/browser/routes/dispatcher.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/dispatcher.js"; diff --git a/src/compat/browser/routes/index.ts b/src/compat/browser/routes/index.ts new file mode 100644 index 00000000000..f9b248d6e36 --- /dev/null +++ b/src/compat/browser/routes/index.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/index.js"; diff --git a/src/compat/browser/routes/output-paths.ts b/src/compat/browser/routes/output-paths.ts new file mode 100644 index 00000000000..2e51642a31a --- /dev/null +++ b/src/compat/browser/routes/output-paths.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/output-paths.js"; diff --git a/src/compat/browser/routes/path-output.ts b/src/compat/browser/routes/path-output.ts new file mode 100644 index 00000000000..adbbe669c49 --- /dev/null +++ b/src/compat/browser/routes/path-output.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/path-output.js"; diff --git a/src/compat/browser/routes/tabs.ts b/src/compat/browser/routes/tabs.ts new file mode 100644 index 00000000000..e67bf877841 --- /dev/null +++ b/src/compat/browser/routes/tabs.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/tabs.js"; diff --git a/src/compat/browser/routes/test-helpers.ts b/src/compat/browser/routes/test-helpers.ts new file mode 100644 index 00000000000..65c64ea409d --- /dev/null +++ b/src/compat/browser/routes/test-helpers.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/test-helpers.js"; diff --git a/src/compat/browser/routes/types.ts b/src/compat/browser/routes/types.ts new file mode 100644 index 00000000000..d7daa5ce2ee --- /dev/null +++ b/src/compat/browser/routes/types.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/types.js"; diff --git a/src/compat/browser/routes/utils.ts b/src/compat/browser/routes/utils.ts new file mode 100644 index 00000000000..4eb6f637e0a --- /dev/null +++ b/src/compat/browser/routes/utils.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser/routes/utils.js"; diff --git a/src/compat/browser/runtime-lifecycle.ts b/src/compat/browser/runtime-lifecycle.ts new file mode 100644 index 00000000000..d6932e46764 --- /dev/null +++ b/src/compat/browser/runtime-lifecycle.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/runtime-lifecycle.js"; diff --git a/src/compat/browser/safe-filename.ts b/src/compat/browser/safe-filename.ts new file mode 100644 index 00000000000..86737b8b029 --- /dev/null +++ b/src/compat/browser/safe-filename.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/safe-filename.js"; diff --git a/src/compat/browser/screenshot.ts b/src/compat/browser/screenshot.ts new file mode 100644 index 00000000000..5e30ef329de --- /dev/null +++ b/src/compat/browser/screenshot.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/screenshot.js"; diff --git a/src/compat/browser/server-context.availability.ts b/src/compat/browser/server-context.availability.ts new file mode 100644 index 00000000000..8193f48cbd7 --- /dev/null +++ b/src/compat/browser/server-context.availability.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server-context.availability.js"; diff --git a/src/compat/browser/server-context.chrome-test-harness.ts b/src/compat/browser/server-context.chrome-test-harness.ts new file mode 100644 index 00000000000..c939243271f --- /dev/null +++ b/src/compat/browser/server-context.chrome-test-harness.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server-context.chrome-test-harness.js"; diff --git a/src/compat/browser/server-context.constants.ts b/src/compat/browser/server-context.constants.ts new file mode 100644 index 00000000000..ad55a5d365f --- /dev/null +++ b/src/compat/browser/server-context.constants.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server-context.constants.js"; diff --git a/src/compat/browser/server-context.remote-tab-ops.harness.ts b/src/compat/browser/server-context.remote-tab-ops.harness.ts new file mode 100644 index 00000000000..8ec5cb809f1 --- /dev/null +++ b/src/compat/browser/server-context.remote-tab-ops.harness.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server-context.remote-tab-ops.harness.js"; diff --git a/src/compat/browser/server-context.reset.ts b/src/compat/browser/server-context.reset.ts new file mode 100644 index 00000000000..169ac8fd2cb --- /dev/null +++ b/src/compat/browser/server-context.reset.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server-context.reset.js"; diff --git a/src/compat/browser/server-context.selection.ts b/src/compat/browser/server-context.selection.ts new file mode 100644 index 00000000000..22083abfa21 --- /dev/null +++ b/src/compat/browser/server-context.selection.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server-context.selection.js"; diff --git a/src/compat/browser/server-context.tab-ops.ts b/src/compat/browser/server-context.tab-ops.ts new file mode 100644 index 00000000000..007ac10499f --- /dev/null +++ b/src/compat/browser/server-context.tab-ops.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server-context.tab-ops.js"; diff --git a/src/compat/browser/server-context.ts b/src/compat/browser/server-context.ts new file mode 100644 index 00000000000..b3739f0d11e --- /dev/null +++ b/src/compat/browser/server-context.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server-context.js"; diff --git a/src/compat/browser/server-context.types.ts b/src/compat/browser/server-context.types.ts new file mode 100644 index 00000000000..949f54eb620 --- /dev/null +++ b/src/compat/browser/server-context.types.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server-context.types.js"; diff --git a/src/compat/browser/server-lifecycle.ts b/src/compat/browser/server-lifecycle.ts new file mode 100644 index 00000000000..0cd9f14394f --- /dev/null +++ b/src/compat/browser/server-lifecycle.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server-lifecycle.js"; diff --git a/src/compat/browser/server-middleware.ts b/src/compat/browser/server-middleware.ts new file mode 100644 index 00000000000..9d50d66f8a5 --- /dev/null +++ b/src/compat/browser/server-middleware.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server-middleware.js"; diff --git a/src/compat/browser/server.agent-contract.test-harness.ts b/src/compat/browser/server.agent-contract.test-harness.ts new file mode 100644 index 00000000000..e1d0b30f726 --- /dev/null +++ b/src/compat/browser/server.agent-contract.test-harness.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server.agent-contract.test-harness.js"; diff --git a/src/compat/browser/server.control-server.test-harness.ts b/src/compat/browser/server.control-server.test-harness.ts new file mode 100644 index 00000000000..23ca9e02d96 --- /dev/null +++ b/src/compat/browser/server.control-server.test-harness.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server.control-server.test-harness.js"; diff --git a/src/compat/browser/server.ts b/src/compat/browser/server.ts new file mode 100644 index 00000000000..ed5f15ae272 --- /dev/null +++ b/src/compat/browser/server.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/server.js"; diff --git a/src/compat/browser/session-tab-registry.ts b/src/compat/browser/session-tab-registry.ts new file mode 100644 index 00000000000..6a2bdc8679e --- /dev/null +++ b/src/compat/browser/session-tab-registry.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/session-tab-registry.js"; diff --git a/src/compat/browser/snapshot-roles.ts b/src/compat/browser/snapshot-roles.ts new file mode 100644 index 00000000000..955a38c5867 --- /dev/null +++ b/src/compat/browser/snapshot-roles.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/snapshot-roles.js"; diff --git a/src/compat/browser/target-id.ts b/src/compat/browser/target-id.ts new file mode 100644 index 00000000000..8455a2b5590 --- /dev/null +++ b/src/compat/browser/target-id.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/target-id.js"; diff --git a/src/compat/browser/test-fetch.ts b/src/compat/browser/test-fetch.ts new file mode 100644 index 00000000000..b578d13fdb4 --- /dev/null +++ b/src/compat/browser/test-fetch.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/test-fetch.js"; diff --git a/src/compat/browser/test-port.ts b/src/compat/browser/test-port.ts new file mode 100644 index 00000000000..58056ba2aec --- /dev/null +++ b/src/compat/browser/test-port.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/test-port.js"; diff --git a/src/compat/browser/tools/browser-tool.actions.ts b/src/compat/browser/tools/browser-tool.actions.ts new file mode 100644 index 00000000000..cab1b88d88c --- /dev/null +++ b/src/compat/browser/tools/browser-tool.actions.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser-tool.actions.js"; diff --git a/src/compat/browser/tools/browser-tool.schema.ts b/src/compat/browser/tools/browser-tool.schema.ts new file mode 100644 index 00000000000..b1c88415abb --- /dev/null +++ b/src/compat/browser/tools/browser-tool.schema.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser-tool.schema.js"; diff --git a/src/compat/browser/tools/browser-tool.ts b/src/compat/browser/tools/browser-tool.ts new file mode 100644 index 00000000000..842ea08d8aa --- /dev/null +++ b/src/compat/browser/tools/browser-tool.ts @@ -0,0 +1 @@ +export * from "../../../../extensions/browser/src/browser-tool.js"; diff --git a/src/compat/browser/trash.ts b/src/compat/browser/trash.ts new file mode 100644 index 00000000000..943ed1df63d --- /dev/null +++ b/src/compat/browser/trash.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/trash.js"; diff --git a/src/compat/browser/url-pattern.ts b/src/compat/browser/url-pattern.ts new file mode 100644 index 00000000000..38f57540ed0 --- /dev/null +++ b/src/compat/browser/url-pattern.ts @@ -0,0 +1 @@ +export * from "../../../extensions/browser/src/browser/url-pattern.js"; diff --git a/src/gateway/server-browser.ts b/src/gateway/server-browser.ts deleted file mode 100644 index 5f2436f431d..00000000000 --- a/src/gateway/server-browser.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { isTruthyEnvValue } from "../infra/env.js"; - -export type BrowserControlServer = { - stop: () => Promise; -}; - -export async function startBrowserControlServerIfEnabled(): Promise { - if (isTruthyEnvValue(process.env.OPENCLAW_SKIP_BROWSER_CONTROL_SERVER)) { - return null; - } - // Lazy import: keeps startup fast, but still bundles for the embedded - // gateway (bun --compile) via the static specifier path. - const override = process.env.OPENCLAW_BROWSER_CONTROL_MODULE?.trim(); - const mod = override ? await import(override) : await import("../browser/server.js"); - const start = - typeof (mod as { startBrowserControlServiceFromConfig?: unknown }) - .startBrowserControlServiceFromConfig === "function" - ? (mod as { startBrowserControlServiceFromConfig: () => Promise }) - .startBrowserControlServiceFromConfig - : (mod as { startBrowserControlServerFromConfig?: () => Promise }) - .startBrowserControlServerFromConfig; - const stop = - typeof (mod as { stopBrowserControlService?: unknown }).stopBrowserControlService === "function" - ? (mod as { stopBrowserControlService: () => Promise }).stopBrowserControlService - : (mod as { stopBrowserControlServer?: () => Promise }).stopBrowserControlServer; - if (!start) { - return null; - } - await start(); - return { stop: stop ?? (async () => {}) }; -} diff --git a/src/gateway/server-methods/agents.ts b/src/gateway/server-methods/agents.ts index 88f84c216b8..5fd56fddbac 100644 --- a/src/gateway/server-methods/agents.ts +++ b/src/gateway/server-methods/agents.ts @@ -18,7 +18,6 @@ import { ensureAgentWorkspace, isWorkspaceSetupCompleted, } from "../../agents/workspace.js"; -import { movePathToTrash } from "../../browser/trash.js"; import { applyAgentConfig, findAgentEntryIndex, @@ -36,6 +35,7 @@ import { } from "../../infra/fs-safe.js"; import { assertNoPathAliasEscape } from "../../infra/path-alias-guards.js"; import { isNotFoundPathError } from "../../infra/path-guards.js"; +import { movePathToTrash } from "../../plugin-sdk/browser-runtime.js"; import { DEFAULT_AGENT_ID, normalizeAgentId } from "../../routing/session-key.js"; import { resolveUserPath } from "../../utils.js"; import { diff --git a/src/gateway/server-methods/browser.ts b/src/gateway/server-methods/browser.ts index 019d46b9031..4afcad3a998 100644 --- a/src/gateway/server-methods/browser.ts +++ b/src/gateway/server-methods/browser.ts @@ -1 +1 @@ -export * from "../../../extensions/browser/src/gateway/browser-request.js"; +export * from "../../compat/browser/gateway/browser-request.js"; diff --git a/src/gateway/session-reset-service.ts b/src/gateway/session-reset-service.ts index eb4aa1b7519..b6f4ebf805d 100644 --- a/src/gateway/session-reset-service.ts +++ b/src/gateway/session-reset-service.ts @@ -5,7 +5,6 @@ import { clearBootstrapSnapshot } from "../agents/bootstrap-cache.js"; import { abortEmbeddedPiRun, waitForEmbeddedPiRunEnd } from "../agents/pi-embedded.js"; import { stopSubagentsForRequester } from "../auto-reply/reply/abort.js"; import { clearSessionQueues } from "../auto-reply/reply/queue.js"; -import { closeTrackedBrowserTabsForSessions } from "../browser/session-tab-registry.js"; import { loadConfig } from "../config/config.js"; import { snapshotSessionOrigin, @@ -14,6 +13,7 @@ import { } from "../config/sessions.js"; import { logVerbose } from "../globals.js"; import { createInternalHookEvent, triggerInternalHook } from "../hooks/internal-hooks.js"; +import { closeTrackedBrowserTabsForSessions } from "../plugin-sdk/browser-runtime.js"; import { getGlobalHookRunner } from "../plugins/hook-runner-global.js"; import { createPluginRuntime } from "../plugins/runtime/index.js"; import { diff --git a/src/generated/bundled-plugin-entries.generated.ts b/src/generated/bundled-plugin-entries.generated.ts index 6bf331088e5..745d051e6e4 100644 --- a/src/generated/bundled-plugin-entries.generated.ts +++ b/src/generated/bundled-plugin-entries.generated.ts @@ -7,6 +7,7 @@ export async function loadGeneratedBundledPluginEntries() { anthropicPluginModule, bluebubblesPluginModule, bravePluginModule, + browserPluginModule, byteplusPluginModule, chutesPluginModule, cloudflareAiGatewayPluginModule, @@ -84,6 +85,7 @@ export async function loadGeneratedBundledPluginEntries() { import("../../extensions/anthropic/index.js"), import("../../extensions/bluebubbles/index.js"), import("../../extensions/brave/index.js"), + import("../../extensions/browser/index.js"), import("../../extensions/byteplus/index.js"), import("../../extensions/chutes/index.js"), import("../../extensions/cloudflare-ai-gateway/index.js"), @@ -162,6 +164,7 @@ export async function loadGeneratedBundledPluginEntries() { anthropicPluginModule.default, bluebubblesPluginModule.default, bravePluginModule.default, + browserPluginModule.default, byteplusPluginModule.default, chutesPluginModule.default, cloudflareAiGatewayPluginModule.default, diff --git a/src/node-host/invoke-browser.ts b/src/node-host/invoke-browser.ts index f621a57f895..130ee832c71 100644 --- a/src/node-host/invoke-browser.ts +++ b/src/node-host/invoke-browser.ts @@ -1 +1 @@ -export * from "../../extensions/browser/src/node-host/invoke-browser.js"; +export * from "../compat/browser/node-host/invoke-browser.js"; diff --git a/src/node-host/runner.ts b/src/node-host/runner.ts index 6d82086acb0..3fc0f4161ff 100644 --- a/src/node-host/runner.ts +++ b/src/node-host/runner.ts @@ -1,4 +1,3 @@ -import { resolveBrowserConfig } from "../browser/config.js"; import { loadConfig, type OpenClawConfig } from "../config/config.js"; import { GatewayClient } from "../gateway/client.js"; import { resolveGatewayConnectionAuth } from "../gateway/connection-auth.js"; @@ -12,6 +11,7 @@ import { NODE_SYSTEM_RUN_COMMANDS, } from "../infra/node-commands.js"; import { ensureOpenClawCliOnPath } from "../infra/path-env.js"; +import { resolveBrowserConfig } from "../plugin-sdk/browser-runtime.js"; import { GATEWAY_CLIENT_MODES, GATEWAY_CLIENT_NAMES } from "../utils/message-channel.js"; import { VERSION } from "../version.js"; import { ensureNodeHostConfig, saveNodeHostConfig, type NodeHostGatewayConfig } from "./config.js"; diff --git a/src/plugin-sdk/browser-support.ts b/src/plugin-sdk/browser-support.ts index 8377259651d..2a053f8f097 100644 --- a/src/plugin-sdk/browser-support.ts +++ b/src/plugin-sdk/browser-support.ts @@ -23,8 +23,11 @@ export { } from "../media/image-ops.js"; export { ensureMediaDir, saveMediaBuffer } from "../media/store.js"; export { normalizePluginsConfig, resolveEffectiveEnableState } from "../plugins/config-state.js"; +export { + startLazyPluginServiceModule, + type LazyPluginServiceHandle, +} from "../plugins/lazy-service-module.js"; export type { OpenClawPluginService } from "../plugins/types.js"; -export { startBrowserControlServerIfEnabled } from "../gateway/server-browser.js"; export { resolveGatewayAuth } from "../gateway/auth.js"; export { isLoopbackHost } from "../gateway/net.js"; export { ensureGatewayStartupAuth } from "../gateway/startup-auth.js"; diff --git a/src/plugin-sdk/channel-import-guardrails.test.ts b/src/plugin-sdk/channel-import-guardrails.test.ts index 1f7259db4f5..cc3069ed627 100644 --- a/src/plugin-sdk/channel-import-guardrails.test.ts +++ b/src/plugin-sdk/channel-import-guardrails.test.ts @@ -268,17 +268,22 @@ function collectExtensionSourceFiles(): string[] { function collectCoreSourceFiles(): string[] { const srcDir = resolve(ROOT_DIR, "..", "src"); const normalizedPluginSdkDir = normalizePath(resolve(ROOT_DIR, "plugin-sdk")); + const normalizedBrowserCompatDir = normalizePath(resolve(ROOT_DIR, "compat", "browser")); coreSourceFilesCache = collectSourceFiles(coreSourceFilesCache, { rootDir: srcDir, shouldSkipEntry: ({ normalizedFullPath }) => normalizedFullPath.includes(".test.") || + normalizedFullPath.includes(".test-helpers.") || normalizedFullPath.includes(".mock-harness.") || normalizedFullPath.includes(".spec.") || normalizedFullPath.includes(".fixture.") || normalizedFullPath.includes(".snap") || // src/plugin-sdk is the curated bridge layer; validate its contracts with dedicated // plugin-sdk guardrails instead of the generic "core should not touch extensions" rule. - normalizedFullPath.includes(`${normalizedPluginSdkDir}/`), + normalizedFullPath.includes(`${normalizedPluginSdkDir}/`) || + // src/compat/browser is the explicit browser compatibility shim layer that forwards + // legacy core entrypoints into the bundled browser plugin. + normalizedFullPath.includes(`${normalizedBrowserCompatDir}/`), }); return coreSourceFilesCache; } diff --git a/src/plugin-sdk/plugin-runtime.ts b/src/plugin-sdk/plugin-runtime.ts index 8066d30212b..224f15456ec 100644 --- a/src/plugin-sdk/plugin-runtime.ts +++ b/src/plugin-sdk/plugin-runtime.ts @@ -5,5 +5,6 @@ export * from "../plugins/hook-runner-global.js"; export * from "../plugins/http-path.js"; export * from "../plugins/http-registry.js"; export * from "../plugins/interactive.js"; +export * from "../plugins/lazy-service-module.js"; export * from "../plugins/types.js"; export type { RuntimeLogger } from "../plugins/runtime/types.js"; diff --git a/src/plugins/bundled-plugin-metadata.generated.ts b/src/plugins/bundled-plugin-metadata.generated.ts index c18ccbcbe6e..5ad80c20d6d 100644 --- a/src/plugins/bundled-plugin-metadata.generated.ts +++ b/src/plugins/bundled-plugin-metadata.generated.ts @@ -300,7 +300,7 @@ export const GENERATED_BUNDLED_PLUGIN_METADATA = [ }, { dirName: "browser", - idHint: "browser-plugin", + idHint: "browser", source: { source: "./index.ts", built: "index.js", diff --git a/src/plugins/lazy-service-module.test.ts b/src/plugins/lazy-service-module.test.ts new file mode 100644 index 00000000000..025ae8c5bb3 --- /dev/null +++ b/src/plugins/lazy-service-module.test.ts @@ -0,0 +1,58 @@ +import { afterEach, describe, expect, it, vi } from "vitest"; +import { startLazyPluginServiceModule } from "./lazy-service-module.js"; + +describe("startLazyPluginServiceModule", () => { + afterEach(() => { + delete process.env.OPENCLAW_LAZY_SERVICE_SKIP; + delete process.env.OPENCLAW_LAZY_SERVICE_OVERRIDE; + }); + + it("starts the default module and returns its stop hook", async () => { + const start = vi.fn(async () => {}); + const stop = vi.fn(async () => {}); + + const handle = await startLazyPluginServiceModule({ + loadDefaultModule: async () => ({ + startDefault: start, + stopDefault: stop, + }), + startExportNames: ["startDefault"], + stopExportNames: ["stopDefault"], + }); + + expect(start).toHaveBeenCalledTimes(1); + expect(handle).not.toBeNull(); + await handle?.stop(); + expect(stop).toHaveBeenCalledTimes(1); + }); + + it("honors skip env before loading the module", async () => { + process.env.OPENCLAW_LAZY_SERVICE_SKIP = "1"; + const loadDefaultModule = vi.fn(async () => ({ startDefault: vi.fn(async () => {}) })); + + const handle = await startLazyPluginServiceModule({ + skipEnvVar: "OPENCLAW_LAZY_SERVICE_SKIP", + loadDefaultModule, + startExportNames: ["startDefault"], + }); + + expect(handle).toBeNull(); + expect(loadDefaultModule).not.toHaveBeenCalled(); + }); + + it("uses the override module when configured", async () => { + process.env.OPENCLAW_LAZY_SERVICE_OVERRIDE = "virtual:service"; + const start = vi.fn(async () => {}); + const loadOverrideModule = vi.fn(async () => ({ startOverride: start })); + + await startLazyPluginServiceModule({ + overrideEnvVar: "OPENCLAW_LAZY_SERVICE_OVERRIDE", + loadDefaultModule: async () => ({ startDefault: vi.fn(async () => {}) }), + loadOverrideModule, + startExportNames: ["startOverride", "startDefault"], + }); + + expect(loadOverrideModule).toHaveBeenCalledWith("virtual:service"); + expect(start).toHaveBeenCalledTimes(1); + }); +}); diff --git a/src/plugins/lazy-service-module.ts b/src/plugins/lazy-service-module.ts new file mode 100644 index 00000000000..277434c6bcb --- /dev/null +++ b/src/plugins/lazy-service-module.ts @@ -0,0 +1,50 @@ +import { isTruthyEnvValue } from "../infra/env.js"; + +type LazyServiceModule = Record; + +export type LazyPluginServiceHandle = { + stop: () => Promise; +}; + +function resolveExport(mod: LazyServiceModule, names: string[]): T | null { + for (const name of names) { + const value = mod[name]; + if (typeof value === "function") { + return value as T; + } + } + return null; +} + +export async function startLazyPluginServiceModule(params: { + skipEnvVar?: string; + overrideEnvVar?: string; + loadDefaultModule: () => Promise; + loadOverrideModule?: (specifier: string) => Promise; + startExportNames: string[]; + stopExportNames?: string[]; +}): Promise { + const skipEnvVar = params.skipEnvVar?.trim(); + if (skipEnvVar && isTruthyEnvValue(process.env[skipEnvVar])) { + return null; + } + + const overrideEnvVar = params.overrideEnvVar?.trim(); + const override = overrideEnvVar ? process.env[overrideEnvVar]?.trim() : undefined; + const loadOverrideModule = + params.loadOverrideModule ?? (async (specifier: string) => await import(specifier)); + const mod = override ? await loadOverrideModule(override) : await params.loadDefaultModule(); + const start = resolveExport<() => Promise>(mod, params.startExportNames); + if (!start) { + return null; + } + const stop = + params.stopExportNames && params.stopExportNames.length > 0 + ? resolveExport<() => Promise>(mod, params.stopExportNames) + : null; + + await start(); + return { + stop: stop ?? (async () => {}), + }; +} diff --git a/src/security/audit-extra.sync.ts b/src/security/audit-extra.sync.ts index bebcc44c0d0..44a8c92ddb1 100644 --- a/src/security/audit-extra.sync.ts +++ b/src/security/audit-extra.sync.ts @@ -10,7 +10,6 @@ import type { SandboxToolPolicy } from "../agents/sandbox/types.js"; import { getBlockedBindReason } from "../agents/sandbox/validate-sandbox-security.js"; import { isToolAllowedByPolicies } from "../agents/tool-policy-match.js"; import { resolveToolProfilePolicy } from "../agents/tool-policy.js"; -import { resolveBrowserConfig } from "../browser/config.js"; import { formatCliCommand } from "../cli/command-format.js"; import type { OpenClawConfig } from "../config/config.js"; import { @@ -24,6 +23,7 @@ import { DEFAULT_DANGEROUS_NODE_COMMANDS, resolveNodeCommandAllowlist, } from "../gateway/node-command-policy.js"; +import { resolveBrowserConfig } from "../plugin-sdk/browser-runtime.js"; import { inferParamBFromIdOrName } from "../shared/model-param-b.js"; import { pickSandboxToolPolicy } from "./audit-tool-policy.js"; diff --git a/src/security/audit.ts b/src/security/audit.ts index b45af7534a4..cab5e41653b 100644 --- a/src/security/audit.ts +++ b/src/security/audit.ts @@ -1,9 +1,6 @@ import { isIP } from "node:net"; import path from "node:path"; import { resolveSandboxConfigForAgent } from "../agents/sandbox.js"; -import { redactCdpUrl } from "../browser/cdp.helpers.js"; -import { resolveBrowserConfig, resolveProfile } from "../browser/config.js"; -import { resolveBrowserControlAuth } from "../browser/control-auth.js"; import { hasPotentialConfiguredChannels } from "../channels/config-presence.js"; import type { listChannelPlugins } from "../channels/plugins/index.js"; import { formatCliCommand } from "../cli/command-format.js"; @@ -20,6 +17,12 @@ import { import { listRiskyConfiguredSafeBins } from "../infra/exec-safe-bin-semantics.js"; import { normalizeTrustedSafeBinDirs } from "../infra/exec-safe-bin-trust.js"; import { isBlockedHostnameOrIp, isPrivateNetworkAllowedByPolicy } from "../infra/net/ssrf.js"; +import { + redactCdpUrl, + resolveBrowserConfig, + resolveBrowserControlAuth, + resolveProfile, +} from "../plugin-sdk/browser-runtime.js"; import { DEFAULT_AGENT_ID } from "../routing/session-key.js"; import { formatPermissionDetail,