mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 11:30:21 +00:00
refactor: route browser control via gateway/node
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { ErrorCodes, errorShape } from "./protocol/index.js";
|
||||
import { agentHandlers } from "./server-methods/agent.js";
|
||||
import { agentsHandlers } from "./server-methods/agents.js";
|
||||
import { browserHandlers } from "./server-methods/browser.js";
|
||||
import { channelsHandlers } from "./server-methods/channels.js";
|
||||
import { chatHandlers } from "./server-methods/chat.js";
|
||||
import { configHandlers } from "./server-methods/config.js";
|
||||
@@ -86,6 +87,7 @@ const WRITE_METHODS = new Set([
|
||||
"node.invoke",
|
||||
"chat.send",
|
||||
"chat.abort",
|
||||
"browser.request",
|
||||
]);
|
||||
|
||||
function authorizeGatewayMethod(method: string, client: GatewayRequestOptions["client"]) {
|
||||
@@ -168,6 +170,7 @@ export const coreGatewayHandlers: GatewayRequestHandlers = {
|
||||
...usageHandlers,
|
||||
...agentHandlers,
|
||||
...agentsHandlers,
|
||||
...browserHandlers,
|
||||
};
|
||||
|
||||
export async function handleGatewayRequest(
|
||||
|
||||
Reference in New Issue
Block a user