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

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Visual Studio Blog
The GitHub Blog
The GitHub Blog
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
人人都是产品经理
人人都是产品经理
H
Heimdal Security Blog
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
雷峰网
雷峰网
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
Microsoft Azure Blog
Microsoft Azure Blog
MyScale Blog
MyScale Blog
A
About on SuperTechFans
V2EX - 技术
V2EX - 技术
小众软件
小众软件
博客园 - Franky
博客园 - 司徒正美
P
Privacy International News Feed
爱范儿
爱范儿
U
Unit 42
博客园 - 叶小钗
The Hacker News
The Hacker News
C
Check Point Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Simon Willison's Weblog
Simon Willison's Weblog
N
News and Events Feed by Topic
D
Docker
T
Threatpost
MongoDB | Blog
MongoDB | Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Help Net Security
L
LINUX DO - 最新话题
Security Latest
Security Latest
T
The Exploit Database - CXSecurity.com
S
SegmentFault 最新的问题
A
Arctic Wolf
Spread Privacy
Spread Privacy

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix: improve mac pairing approval prompt · openclaw/openclaw@ff8d3dc
steipete · 2026-05-17 · via Recent Commits to openclaw:main

@@ -33,7 +33,7 @@ final class DevicePairingApprovalPrompter {

3333

let remoteIp: String?

3434

}

353536-

private struct PendingRequest: Codable, Equatable, Identifiable {

36+

struct PendingRequest: Codable, Equatable, Identifiable {

3737

let requestId: String

3838

let deviceId: String

3939

let publicKey: String

@@ -115,14 +115,16 @@ final class DevicePairingApprovalPrompter {

115115

PairingAlertSupport.presentPairingAlert(

116116

request: req,

117117

requestId: req.requestId,

118-

messageText: "Allow device to connect?",

119-

informativeText: Self.describe(req),

118+

messageText: Self.alertTitle(for: req),

119+

informativeText: Self.alertSummary(for: req),

120+

buttonTitles: PairingAlertSupport.ButtonTitles(approve: Self.approveButtonTitle(for: req)),

121+

accessoryView: Self.buildAccessoryView(for: req),

120122

state: self.alertState,

121123

onResponse: self.handleAlertResponse)

122124

}

123125124126

private func handleAlertResponse(_ response: NSApplication.ModalResponse, request: PendingRequest) async {

125-

var shouldRemove = response != .alertFirstButtonReturn

127+

var shouldRemove = response != .alertSecondButtonReturn

126128

defer {

127129

if shouldRemove {

128130

if self.queue.first == request {

@@ -144,14 +146,14 @@ final class DevicePairingApprovalPrompter {

144146145147

switch response {

146148

case .alertFirstButtonReturn:

149+

_ = await self.approve(requestId: request.requestId)

150+

case .alertSecondButtonReturn:

147151

shouldRemove = false

148152

if let idx = self.queue.firstIndex(of: request) {

149153

self.queue.remove(at: idx)

150154

}

151155

self.queue.append(request)

152156

return

153-

case .alertSecondButtonReturn:

154-

_ = await self.approve(requestId: request.requestId)

155157

case .alertThirdButtonReturn:

156158

await self.reject(requestId: request.requestId)

157159

default:

@@ -233,24 +235,166 @@ final class DevicePairingApprovalPrompter {

233235

self.updatePendingCounts()

234236

}

235237236-

private static func describe(_ req: PendingRequest) -> String {

237-

var lines: [String] = []

238-

lines.append("Device: \(req.displayName ?? req.deviceId)")

239-

if let platform = req.platform {

240-

lines.append("Platform: \(platform)")

238+

static func alertTitle(for req: PendingRequest) -> String {

239+

self.isMac(req.platform) ? "New Mac wants to connect" : "New device wants to connect"

240+

}

241+242+

static func alertSummary(for req: PendingRequest) -> String {

243+

let subject = self.isMac(req.platform) ? "this Mac app" : "this device"

244+

return "Approve \(subject) to control OpenClaw. Only approve if this is yours; you can remove it later in Settings."

245+

}

246+247+

static func approveButtonTitle(for req: PendingRequest) -> String {

248+

self.isMac(req.platform) ? "Approve Mac" : "Approve Device"

249+

}

250+251+

static func buildAccessoryView(for req: PendingRequest) -> NSView {

252+

let stack = NSStackView()

253+

stack.orientation = .vertical

254+

stack.alignment = .leading

255+

stack.spacing = 8

256+

stack.edgeInsets = NSEdgeInsets(top: 2, left: 0, bottom: 0, right: 0)

257+258+

stack.addArrangedSubview(self.makeValueRow(label: "Device", value: self.deviceName(for: req)))

259+

if let platform = self.prettyPlatform(req.platform) {

260+

stack.addArrangedSubview(self.makeValueRow(label: "Platform", value: platform))

241261

}

242-

if let role = req.role {

243-

lines.append("Role: \(role)")

262+

if let role = self.prettyRole(req.role) {

263+

stack.addArrangedSubview(self.makeValueRow(label: "Role", value: role))

244264

}

245-

if let scopes = req.scopes, !scopes.isEmpty {

246-

lines.append("Scopes: \(scopes.joined(separator: ", "))")

265+

let accessItems = self.friendlyScopeNames(req.scopes)

266+

if !accessItems.isEmpty {

267+

stack.addArrangedSubview(self.makeSectionLabel("Access requested"))

268+

for item in accessItems {

269+

stack.addArrangedSubview(self.makeBullet(item))

270+

}

247271

}

248-

if let remoteIp = req.remoteIp {

249-

lines.append("IP: \(remoteIp)")

272+

stack.addArrangedSubview(self.makeDetailLine(req))

273+274+

let fitting = stack.fittingSize

275+

stack.frame = NSRect(x: 0, y: 0, width: 420, height: fitting.height)

276+

return stack

277+

}

278+279+

static func deviceName(for req: PendingRequest) -> String {

280+

let trimmedName = req.displayName?.trimmingCharacters(in: .whitespacesAndNewlines)

281+

if let trimmedName, !trimmedName.isEmpty, trimmedName != req.deviceId {

282+

return trimmedName

283+

}

284+

return self.isMac(req.platform) ? "OpenClaw Mac app" : "New device"

285+

}

286+287+

static func prettyPlatform(_ raw: String?) -> String? {

288+

let platform = raw?.trimmingCharacters(in: .whitespacesAndNewlines)

289+

guard let platform, !platform.isEmpty else { return nil }

290+

switch platform.lowercased() {

291+

case "macintel", "x86_64-apple-darwin":

292+

return "Mac (Intel)"

293+

case "macarm", "macarm64", "arm64-apple-darwin", "aarch64-apple-darwin":

294+

return "Mac (Apple silicon)"

295+

case "darwin":

296+

return "Mac"

297+

default:

298+

if platform.lowercased().contains("mac") {

299+

return "Mac"

300+

}

301+

return platform

302+

}

303+

}

304+305+

static func prettyRole(_ raw: String?) -> String? {

306+

let role = raw?.trimmingCharacters(in: .whitespacesAndNewlines)

307+

guard let role, !role.isEmpty else { return nil }

308+

return role == "operator" ? "Operator" : role

309+

}

310+311+

static func friendlyScopeNames(_ scopes: [String]?) -> [String] {

312+

guard let scopes else { return [] }

313+

var seen = Set<String>()

314+

return scopes.compactMap { scope in

315+

let normalized = scope.trimmingCharacters(in: .whitespacesAndNewlines)

316+

guard !normalized.isEmpty, seen.insert(normalized).inserted else { return nil }

317+

switch normalized {

318+

case "operator.admin":

319+

return "Admin access"

320+

case "operator.read":

321+

return "Read OpenClaw data"

322+

case "operator.write":

323+

return "Send messages and make changes"

324+

case "operator.approvals":

325+

return "Manage approvals"

326+

case "operator.pairing":

327+

return "Pair and repair devices"

328+

case "operator.talk.secrets":

329+

return "Use Talk credentials"

330+

default:

331+

return normalized

332+

}

333+

}

334+

}

335+336+

static func shortIdentifier(_ id: String) -> String {

337+

let trimmed = id.trimmingCharacters(in: .whitespacesAndNewlines)

338+

guard trimmed.count > 20 else { return trimmed }

339+

return "\(trimmed.prefix(8))...\(trimmed.suffix(7))"

340+

}

341+342+

private static func isMac(_ platform: String?) -> Bool {

343+

guard let platform else { return false }

344+

let lower = platform.lowercased()

345+

return lower.contains("mac") || lower.contains("darwin")

346+

}

347+348+

private static func makeValueRow(label: String, value: String) -> NSView {

349+

let row = NSStackView()

350+

row.orientation = .horizontal

351+

row.alignment = .firstBaseline

352+

row.spacing = 8

353+354+

let labelField = self.makeLabel("\(label):", font: .systemFont(ofSize: 12, weight: .semibold))

355+

labelField.textColor = .secondaryLabelColor

356+

labelField.setContentHuggingPriority(.required, for: .horizontal)

357+

let valueField = self.makeLabel(value, font: .systemFont(ofSize: 12, weight: .regular))

358+

valueField.maximumNumberOfLines = 2

359+360+

row.addArrangedSubview(labelField)

361+

row.addArrangedSubview(valueField)

362+

return row

363+

}

364+365+

private static func makeSectionLabel(_ text: String) -> NSTextField {

366+

let label = self.makeLabel(text, font: .systemFont(ofSize: 12, weight: .semibold))

367+

label.textColor = .secondaryLabelColor

368+

return label

369+

}

370+371+

private static func makeBullet(_ text: String) -> NSTextField {

372+

let label = self.makeLabel("\(text)", font: .systemFont(ofSize: 12, weight: .regular))

373+

label.maximumNumberOfLines = 2

374+

return label

375+

}

376+377+

private static func makeDetailLine(_ req: PendingRequest) -> NSTextField {

378+

var parts = ["ID \(self.shortIdentifier(req.deviceId))"]

379+

if let remoteIp = req.remoteIp?.trimmingCharacters(in: .whitespacesAndNewlines), !remoteIp.isEmpty {

380+

parts.append("IP \(remoteIp.replacingOccurrences(of: "::ffff:", with: ""))")

250381

}

251382

if req.isRepair == true {

252-

lines.append("Repair: yes")

383+

parts.append("repair request")

253384

}

254-

return lines.joined(separator: "\n")

385+

let label = self.makeLabel(

386+

parts.joined(separator: " · "),

387+

font: .monospacedSystemFont(ofSize: 11, weight: .regular))

388+

label.textColor = .tertiaryLabelColor

389+

label.maximumNumberOfLines = 2

390+

return label

391+

}

392+393+

private static func makeLabel(_ text: String, font: NSFont) -> NSTextField {

394+

let label = NSTextField(labelWithString: text)

395+

label.font = font

396+

label.lineBreakMode = .byWordWrapping

397+

label.textColor = .labelColor

398+

return label

255399

}

256400

}