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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
IT之家
IT之家
C
Check Point Blog
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
人人都是产品经理
人人都是产品经理
H
Hackread – Cybersecurity News, Data Breaches, AI and More
美团技术团队
M
MIT News - Artificial intelligence
Jina AI
Jina AI
Blog — PlanetScale
Blog — PlanetScale
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
F
Fortinet All Blogs
V
Visual Studio Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
MyScale Blog
MyScale Blog
爱范儿
爱范儿
The Cloudflare Blog
博客园 - 三生石上(FineUI控件)

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(gateway): hide unapproved node surfaces · openclaw/op...
steipete · 2026-05-13 · via Recent Commits to openclaw:main

@@ -15,8 +15,11 @@ export type NodeSession = {

1515

deviceFamily?: string;

1616

modelIdentifier?: string;

1717

remoteIp?: string;

18+

declaredCaps: string[];

1819

caps: string[];

20+

declaredCommands: string[];

1921

commands: string[];

22+

declaredPermissions?: Record<string, boolean>;

2023

permissions?: Record<string, boolean>;

2124

pathEnv?: string;

2225

connectedAtMs: number;

@@ -138,13 +141,27 @@ export class NodeRegistry {

138141

const connect = client.connect;

139142

const nodeId = connect.device?.id ?? connect.client.id;

140143

const caps = Array.isArray(connect.caps) ? connect.caps : [];

144+

const declaredCaps = Array.isArray((connect as { declaredCaps?: string[] }).declaredCaps)

145+

? ((connect as { declaredCaps?: string[] }).declaredCaps ?? [])

146+

: caps;

141147

const commands = Array.isArray((connect as { commands?: string[] }).commands)

142148

? ((connect as { commands?: string[] }).commands ?? [])

143149

: [];

150+

const declaredCommands = Array.isArray(

151+

(connect as { declaredCommands?: string[] }).declaredCommands,

152+

)

153+

? ((connect as { declaredCommands?: string[] }).declaredCommands ?? [])

154+

: commands;

144155

const permissions =

145156

typeof (connect as { permissions?: Record<string, boolean> }).permissions === "object"

146157

? ((connect as { permissions?: Record<string, boolean> }).permissions ?? undefined)

147158

: undefined;

159+

const declaredPermissions =

160+

typeof (connect as { declaredPermissions?: Record<string, boolean> }).declaredPermissions ===

161+

"object"

162+

? ((connect as { declaredPermissions?: Record<string, boolean> }).declaredPermissions ??

163+

undefined)

164+

: permissions;

148165

const pathEnv =

149166

typeof (connect as { pathEnv?: string }).pathEnv === "string"

150167

? (connect as { pathEnv?: string }).pathEnv

@@ -163,8 +180,11 @@ export class NodeRegistry {

163180

deviceFamily: connect.client.deviceFamily,

164181

modelIdentifier: connect.client.modelIdentifier,

165182

remoteIp: opts.remoteIp,

183+

declaredCaps,

166184

caps,

185+

declaredCommands,

167186

commands,

187+

declaredPermissions,

168188

permissions,

169189

pathEnv,

170190

connectedAtMs: Date.now(),

@@ -208,6 +228,66 @@ export class NodeRegistry {

208228

return this.nodesById.get(nodeId);

209229

}

210230231+

updateCommands(nodeId: string, commands: readonly string[]): NodeSession | null {

232+

return this.updateSurface(nodeId, { commands });

233+

}

234+235+

updateSurface(

236+

nodeId: string,

237+

surface: {

238+

caps?: readonly string[];

239+

commands: readonly string[];

240+

permissions?: Record<string, boolean> | undefined;

241+

},

242+

): NodeSession | null {

243+

const node = this.nodesById.get(nodeId);

244+

if (!node) {

245+

return null;

246+

}

247+248+

const declaredCommands = new Set(node.declaredCommands);

249+

const nextCommands = surface.commands.filter((command) => declaredCommands.has(command));

250+

node.commands = nextCommands;

251+

(node.client.connect as { commands?: string[] }).commands = nextCommands;

252+253+

if ("caps" in surface) {

254+

const declaredCaps = new Set(node.declaredCaps);

255+

const nextCaps = (surface.caps ?? []).filter((capability) => declaredCaps.has(capability));

256+

node.caps = nextCaps;

257+

(node.client.connect as { caps?: string[] }).caps = nextCaps;

258+

}

259+260+

if ("permissions" in surface) {

261+

if (surface.permissions === undefined) {

262+

node.permissions = undefined;

263+

(node.client.connect as { permissions?: Record<string, boolean> }).permissions = undefined;

264+

return node;

265+

}

266+

const declared = node.declaredPermissions ?? {};

267+

const nextEntries: Array<[string, boolean]> = [];

268+

for (const [key, declaredValue] of Object.entries(declared)) {

269+

if (!declaredValue) {

270+

nextEntries.push([key, false]);

271+

continue;

272+

}

273+

const approvedValue = surface.permissions?.[key];

274+

if (approvedValue === true) {

275+

nextEntries.push([key, true]);

276+

continue;

277+

}

278+

if (approvedValue === false) {

279+

nextEntries.push([key, false]);

280+

}

281+

}

282+

const nextPermissions = nextEntries.length > 0 ? Object.fromEntries(nextEntries) : undefined;

283+

node.permissions = nextPermissions;

284+

(node.client.connect as { permissions?: Record<string, boolean> }).permissions =

285+

nextPermissions;

286+

}

287+288+

return node;

289+

}

290+211291

async invoke(params: {

212292

nodeId: string;

213293

command: string;