An agentic browser harness: an AI side panel & orb in your own logged-in Chrome, Edge, Arc, Brave or even Firefox run by the agent/subscription you already use (Claude Code, Codex, Antigravity). Free, open source, no API key. Also an MCP server.
TypeScript agentic-browseragentic-browsingagy-cliaiai-agentai-browser-extensionai-toolsbrave-extensionbrowser-agentbrowser-automationbrowser-extensionbrowser-usebrowserskillchrome-extensionclaude-codecodexfirefox-addonmcp-servernanobrowserweb-automation
feat(mac): name each paired browser and unpair it by its session id, because two browsers sharing an origin were one row and one unpair
Shahriar2c6d243755e3
diff --git a/src/mac/Sources/Browsentic/App/AppModel.swift b/src/mac/Sources/Browsentic/App/AppModel.swiftindex 2a6303e..29d5ae4 100644--- a/src/mac/Sources/Browsentic/App/AppModel.swift+++ b/src/mac/Sources/Browsentic/App/AppModel.swift@@ -276,9 +276,9 @@ final class AppModel: ObservableObject {await perform("pair") { _, control in self.pairing = try await control.pair() }}- func revoke(_ origin: String?) async {+ func revoke(_ session: BrowserSession?) async {await perform("revoke") { _, control in- let count = try await control.revoke(origin: origin)+ let count = try await control.revoke(session)self.say(count == 0 ? "Nothing to unpair." : "Unpaired \(count) browser\(count == 1 ? "" : "s").")}await refresh()diff --git a/src/mac/Sources/Browsentic/Core/ControlClient.swift b/src/mac/Sources/Browsentic/Core/ControlClient.swiftindex 85209ac..5c4ee07 100644--- a/src/mac/Sources/Browsentic/Core/ControlClient.swift+++ b/src/mac/Sources/Browsentic/Core/ControlClient.swift@@ -56,9 +56,12 @@ actor ControlClient {return try JSONDecoder().decode(PairingCode.self, from: data)}- func revoke(origin: String?) async throws -> Int {+ func revoke(_ session: BrowserSession?) async throws -> Int {var frame: [String: Any] = ["op": "revoke"]- if let origin { frame["origin"] = origin }+ if let session {+ frame["origin"] = session.origin+ if let id = session.sessionId { frame["session"] = id }+ }return try await request(frame, as: Reply<Int>.self, key: "revoked")}diff --git a/src/mac/Sources/Browsentic/Core/Models.swift b/src/mac/Sources/Browsentic/Core/Models.swiftindex d3ad062..71164f9 100644--- a/src/mac/Sources/Browsentic/Core/Models.swift+++ b/src/mac/Sources/Browsentic/Core/Models.swift@@ -19,14 +19,22 @@ struct BridgeStatus: Decodable, Equatable {}struct BrowserSession: Decodable, Identifiable, Equatable {+ /// Absent from a daemon that still knows a browser by its origin alone.+ let sessionId: String?+ let browser: String?let origin: Stringlet extensionVersion: Stringlet pairedAt: Stringlet lastSeenAt: Stringlet connected: Bool- var id: String { origin }- var extensionId: String { origin.replacingOccurrences(of: "chrome-extension://", with: "") }+ enum CodingKeys: String, CodingKey {+ case sessionId = "id"+ case browser, origin, extensionVersion, pairedAt, lastSeenAt, connected+ }++ var id: String { sessionId ?? origin }+ var extensionId: String { origin.replacingOccurrences(of: #"^[a-z-]+-extension://"#, with: "", options: .regularExpression) }}struct PairingCode: Decodable, Equatable {diff --git a/src/mac/Sources/Browsentic/Views/BrowsersView.swift b/src/mac/Sources/Browsentic/Views/BrowsersView.swiftindex e359f95..1d1c64c 100644--- a/src/mac/Sources/Browsentic/Views/BrowsersView.swift+++ b/src/mac/Sources/Browsentic/Views/BrowsersView.swift@@ -42,14 +42,17 @@ private struct SessionRow: View {HStack(spacing: 12) {GlowDot(color: session.connected ? Palette.lime : Palette.inkFaint, pulsing: session.connected)VStack(alignment: .leading, spacing: 3) {- Text(session.extensionId).font(.code(12)).foregroundStyle(Palette.ink).textSelection(.enabled)+ if let browser = session.browser {+ Text(browser).font(.system(size: 13, weight: .medium)).foregroundStyle(Palette.ink)+ }+ Text(session.extensionId).font(.code(12)).foregroundStyle(session.browser == nil ? Palette.ink : Palette.inkDim).textSelection(.enabled)Text("Extension v\(session.extensionVersion) · paired \(Timestamp.ago(session.pairedAt)) · seen \(Timestamp.ago(session.lastSeenAt))").font(.system(size: 11.5)).foregroundStyle(Palette.inkDim)}Spacer()Pill(text: session.connected ? "Connected" : "Away", tint: session.connected ? Palette.lime : Palette.inkDim)- Button("Unpair") { Task { await model.revoke(session.origin) } }+ Button("Unpair") { Task { await model.revoke(session) } }.buttonStyle(QuietButtonStyle(tint: Palette.danger)).disabled(model.busy.contains("revoke"))}