惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
Y
Y Combinator Blog
博客园_首页
V
Visual Studio Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
阮一峰的网络日志
阮一峰的网络日志
Hugging Face - Blog
Hugging Face - Blog
宝玉的分享
宝玉的分享
B
Blog
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
WordPress大学
WordPress大学
L
LangChain Blog
爱范儿
爱范儿
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
Blog — PlanetScale
Blog — PlanetScale
C
Check Point Blog
博客园 - 聂微东
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Help Net Security

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(browser): request admin scope for CLI control (#81716...
joshavant · 2026-05-14 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -27,6 +27,7 @@ Docs: https://docs.openclaw.ai

2727

- CLI/plugins: keep bare plugin and parent-command help on the lightweight path, avoiding plugin registry discovery before rendering help.

2828

- CLI tables: preserve muted/color styling on wrapped continuation lines after multiline cells, keeping `openclaw plugins list` descriptions readable.

2929

- Process execution: collapse case-insensitive duplicate child environment keys on Windows so caller-provided overrides such as `PATH` cannot be shadowed by host `Path`.

30+

- Browser CLI: request the existing `operator.admin` gateway scope explicitly for browser control commands, avoiding unnecessary scope-upgrade approval loops. Fixes #81555. (#81716) Thanks @joshavant.

3031

- iOS: restore first-use Contacts, Calendar, and Reminders permission prompts and add Privacy & Access status/actions in Settings. Thanks @BunsDev.

3132

- Canvas: return not found for malformed percent-encoded Canvas/A2UI/document asset paths and keep decoded parent traversal blocked before path normalization.

3233

- Telegram: allow trusted local Bot API media files whose filenames start with dots instead of falling back to remote download.

Original file line numberDiff line numberDiff line change

@@ -7,6 +7,10 @@ import type {

77

OpenClawPluginToolContext,

88

OpenClawPluginToolFactory,

99

} from "openclaw/plugin-sdk/plugin-entry";

10+

import {

11+

BROWSER_REQUEST_GATEWAY_METHOD,

12+

BROWSER_REQUEST_GATEWAY_SCOPE,

13+

} from "./src/browser-gateway-contract.js";

1014

import { BrowserToolSchema } from "./src/browser-tool.schema.js";

1115
1216

const BROWSER_CLI_DESCRIPTOR = {

@@ -107,13 +111,13 @@ export function registerBrowserPlugin(api: OpenClawPluginApi) {

107111

{ commands: ["browser"], descriptors: [BROWSER_CLI_DESCRIPTOR] },

108112

);

109113

api.registerGatewayMethod(

110-

"browser.request",

114+

BROWSER_REQUEST_GATEWAY_METHOD,

111115

async (opts) => {

112116

const { handleBrowserGatewayRequest } = await import("./register.runtime.js");

113117

return await handleBrowserGatewayRequest(opts);

114118

},

115119

{

116-

scope: "operator.admin",

120+

scope: BROWSER_REQUEST_GATEWAY_SCOPE,

117121

},

118122

);

119123

api.registerService(createLazyBrowserPluginService());

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,3 @@

1+

export const BROWSER_REQUEST_GATEWAY_METHOD = "browser.request" as const;

2+

export const BROWSER_REQUEST_GATEWAY_SCOPE = "operator.admin" as const;

3+

export const BROWSER_REQUEST_GATEWAY_SCOPES = [BROWSER_REQUEST_GATEWAY_SCOPE] as const;

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,34 @@

1+

import { beforeEach, describe, expect, it, vi } from "vitest";

2+

import type { callGatewayFromCli } from "./core-api.js";

3+
4+

type CallGatewayFromCliArgs = Parameters<typeof callGatewayFromCli>;

5+
6+

const gatewayMocks = vi.hoisted(() => ({

7+

callGatewayFromCli: vi.fn(async () => ({ ok: true })),

8+

}));

9+
10+

vi.mock("./core-api.js", () => ({

11+

callGatewayFromCli: gatewayMocks.callGatewayFromCli,

12+

}));

13+
14+

const { callBrowserRequest } = await import("./browser-cli-shared.js");

15+
16+

describe("callBrowserRequest", () => {

17+

beforeEach(() => {

18+

gatewayMocks.callGatewayFromCli.mockClear();

19+

});

20+
21+

it("requests the browser.request admin scope explicitly", async () => {

22+

await callBrowserRequest(

23+

{ json: true },

24+

{ method: "GET", path: "/status", query: { profile: "openclaw" } },

25+

{ progress: true },

26+

);

27+
28+

const call = gatewayMocks.callGatewayFromCli.mock.calls[0] as unknown as

29+

| CallGatewayFromCliArgs

30+

| undefined;

31+

const extra = call?.[3];

32+

expect(extra).toEqual({ progress: true, scopes: ["operator.admin"] });

33+

});

34+

});

Original file line numberDiff line numberDiff line change

@@ -1,4 +1,8 @@

11

import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";

2+

import {

3+

BROWSER_REQUEST_GATEWAY_METHOD,

4+

BROWSER_REQUEST_GATEWAY_SCOPES,

5+

} from "../browser-gateway-contract.js";

26

import { callGatewayFromCli, type GatewayRpcOpts } from "./core-api.js";

37
48

export type BrowserParentOpts = GatewayRpcOpts & {

@@ -44,7 +48,7 @@ export async function callBrowserRequest<T>(

4448

: undefined;

4549

const timeout = typeof resolvedTimeout === "number" ? String(resolvedTimeout) : opts.timeout;

4650

const payload = await callGatewayFromCli(

47-

"browser.request",

51+

BROWSER_REQUEST_GATEWAY_METHOD,

4852

{ ...opts, timeout },

4953

{

5054

method: params.method,

@@ -53,7 +57,7 @@ export async function callBrowserRequest<T>(

5357

body: params.body,

5458

timeoutMs: resolvedTimeout,

5559

},

56-

{ progress: extra?.progress },

60+

{ progress: extra?.progress, scopes: [...BROWSER_REQUEST_GATEWAY_SCOPES] },

5761

);

5862

if (payload === undefined) {

5963

throw new Error("Unexpected browser.request response");