mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 01:29:56 +00:00
* refactor(plugins): deslop browser and memory-core second pass Share browser registration, route orchestration, and documented SDK owners. Consolidate memory queue state, search preparation, and ingestion checkpoints. Preserve browser safety and tool definitions, memory schema and ordering, and existing dreaming and compaction output. Remove 1,344 net production lines. * fix(browser): break headless source type import cycle Move the unchanged headless-source union to the existing profile contract and migrate config, Chrome, and client types directly to that leaf owner. This removes the type-only cycle caught by the architecture gate.
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
/**
|
|
* Browser CLI metadata entry. It registers the `openclaw browser` command lazily
|
|
* so command discovery does not load the full browser runtime.
|
|
*/
|
|
import { definePluginEntry, type OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry";
|
|
import { isBrowserMachineOutput } from "./cli-output-mode.js";
|
|
|
|
export function registerBrowserCliMetadata(api: OpenClawPluginApi) {
|
|
api.registerCli(
|
|
async ({ program }) => {
|
|
const { registerBrowserCli } = await import("./src/cli/browser-cli.js");
|
|
registerBrowserCli(program, process.argv, api.rootDir);
|
|
},
|
|
{
|
|
commands: ["browser"],
|
|
descriptors: [
|
|
{
|
|
name: "browser",
|
|
description: "Manage OpenClaw's dedicated browser (Chrome/Chromium)",
|
|
hasSubcommands: true,
|
|
machineOutput: isBrowserMachineOutput,
|
|
},
|
|
],
|
|
},
|
|
);
|
|
}
|
|
|
|
/** Plugin entry that contributes Browser CLI commands. */
|
|
export default definePluginEntry({
|
|
id: "browser",
|
|
name: "Browser",
|
|
description: "Default browser tool plugin",
|
|
register: registerBrowserCliMetadata,
|
|
});
|