Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2b5df3e
feat(browser): daemon-run headless browser with agent ops and viewer …
claude Nov 29, 2026
c97430c
feat(browser): browser pane for the macOS and iPad apps; docs and age…
claude Nov 29, 2026
5600b12
test(macos): expect protocol 15
claude Nov 29, 2026
c01bc0b
feat(browser): stop a project's browser after 30 idle minutes
claude Nov 29, 2026
51a04d9
fix(macos): harden browser session reconnect and frame decode
claude Nov 29, 2026
49d6f06
feat(win-app): browser pane
claude Nov 29, 2026
143377b
fix(browser): send HiDPI frames to Retina panes
claude Nov 29, 2026
e3f6f0b
fix(browser): build on macOS and Windows
claude Nov 30, 2026
1f3acf9
test(cli): build the expected screenshot path with the platform's sep…
claude Nov 30, 2026
2a10bc2
test(macos): use a kind that does not exist for the unknown-surface test
claude Nov 30, 2026
9b79c21
Merge origin/main into claude/admiring-clarke-1k36a3
2witstudios Nov 30, 2026
0aa302b
fix(browser): type AltGr characters; drop a tab whose first load fails
claude Nov 30, 2026
971f6b2
fix(browser): type AltGr text without Ctrl+Alt; keep agent chords as …
claude Nov 30, 2026
eb120be
docs(browser): say IME composition is not supported yet
claude Nov 30, 2026
214b8b5
fix(browser): address review findings on concurrency and robustness
claude Nov 30, 2026
3a8f7a5
test(browser): bound the Take Control retry loop
claude Nov 30, 2026
e02a02f
fix(browser): stop a dead browser before any relaunch; count opens un…
claude Nov 30, 2026
7574f32
Merge remote-tracking branch 'origin/main' into claude/admiring-clark…
claude Nov 30, 2026
9ff7e2b
fix(browser): publish a navigation's page and drop its refs atomically
claude Nov 30, 2026
cb1a638
fix(browser): keep Control in stream order, confirm browser exit befo…
claude Nov 30, 2026
d12929d
fix(browser): refuse a snapshot whose page URL changed before frameNa…
claude Nov 30, 2026
3782d67
fix(browser): reap a browser whose startup failed before reusing its …
claude Nov 30, 2026
1816415
fix(browser): drop refs when another document's URL is published; tes…
claude Nov 30, 2026
462132f
Merge origin/main into claude/admiring-clarke-1k36a3
claude Nov 30, 2026
d53b952
fix(browser): address review findings on the devtools pipe, launch, p…
claude Nov 30, 2026
066fcca
fix(browser): address follow-up review findings
claude Nov 30, 2026
b728a3e
fix(browser): bound per-pane work, scope streams to their tab, harden…
claude Nov 30, 2026
cd9ae94
fix(windows): bind pane ops to the stream they were made for
claude Nov 30, 2026
30365e4
fix(windows): bind ops made while reconnecting to the stream that ended
claude Nov 30, 2026
7e8e434
fix(browser): end a half-written CDP command at its caller's deadline
claude Nov 30, 2026
2d671b1
fix(browser): keep shutdown and retirement ordered; keep an unconfirm…
claude Nov 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to PurePoint are documented here. Format follows [Keep a Cha
## [Unreleased]

### Added
- A browser for agents and for you. Each project gets a headless Chrome (or Chromium, Edge or Brave) on the machine where its agents run. Agents drive it with `pu browser` (`open`, `snapshot` with `[ref=eN]` handles, `click`, `type`, `press`, `scroll`, `screenshot`, `console`, `eval`, `wait`), and you watch and use the same tab live in a new browser pane: choose Open Browser in an empty tab, or have an agent run `pu browser open <url> --show`. Take Control stops agents' page actions until you hand the tab back, or until the last pane showing the tab closes or disconnects, so a closed pane never locks agents out. Because the browser runs on the project's machine, `localhost` means the same thing to agents and to you, and panes work for remote machines. A remote agent's `localhost` links now open in a browser pane instead of your own browser. Logins persist per project in `~/.pu/browser/profiles` on that machine. The browser runs on a macOS or Linux daemon; a project on a Windows daemon cannot start one yet, though the Windows app can open browser panes for projects on a Mac or Linux machine. See [Browser](docs/product/browser.md).
- PurePoint runs natively on Windows 11 (x64 and arm64), with no WSL. `pu-engine` and `pu` are native Windows programs: the daemon listens on a private named pipe, agents run in ConPTY terminals and are stopped as a whole process tree, `pu daemon install` starts the daemon at sign-in through your user's Run key, and `pu phone` runs Point Guard for phone pairing over Tailscale. See [PurePoint on Windows](docs/guide/windows.md).
- A Windows desktop app (`PurePoint_<version>_<x64|arm64>-setup.exe`, a per-user installer that needs no administrator rights) with the macOS app's features. On first launch it installs `pu` and `pu-engine` to `%USERPROFILE%\.pu\bin`, adds that folder to your user `PATH`, installs the Claude Code plugin and supervises the daemon. The arm64 installer has not been tested on Arm hardware yet.
- `scripts/install.ps1` installs the Windows CLI from PowerShell (`irm https://raw.githubusercontent.com/2witstudios/PurePoint/main/scripts/install.ps1 | iex`). Like `install.sh`, it verifies the release's minisign signature or its GitHub attestation before installing, and stops if neither can be checked unless `PU_INSTALL_SKIP_VERIFY=1` is set.
Expand All @@ -14,10 +15,9 @@ All notable changes to PurePoint are documented here. Format follows [Keep a Cha
- Send photos and files to an agent from the iPhone and iPad. On the iPhone, the **+** menu beside an agent's prompt offers Photos and Files; each upload's path is added to your draft so you can write around it before sending. On the iPad, each agent pane has a paperclip button (Photos, Files), and you can paste an image or drag files in from other apps; the path is typed at the agent's prompt without pressing Enter. Photos are sent as JPEG, at most 2048 px on the long edge. The phone bridge relays uploads with a new `agent.attach` operation, which needs Full access; phone uploads are limited to 20 MB per file.

### Changed
- The daemon protocol is now version 15. This release adds the `browser`, `browser_attach`, `reorder_projects` and `attach_file` requests and changes the launch args request and response shapes. Update PurePoint on every machine and restart its daemon; `pu` and the macOS app reject an older daemon with update guidance instead of appearing to save launch args an old daemon drops.
- Point Guard now runs on its bundled Node.js 26 LTS (26.13.0), up from Node 22, on macOS and on Linux phone hosts. Nothing to install: the runtime ships inside PurePoint. Linux phone hosts still need glibc 2.28 or newer, and now also `libatomic` (`libatomic1` on Debian/Ubuntu, `libatomic` on Fedora/RHEL), which Node 26's Linux builds link; the installer names it if it's missing.
- The daemon protocol is now version 14, for the new `reorder_projects` request. Update PurePoint on every machine and restart its daemon.
- Phones and iPads now pair with full access (agents, terminals, workspace management and Point Guard chat). Point Guard setup shows each device on one line with a single Access menu (Full access, Terminals only, View only, No access) and a Revoke button. Revoked devices are removed instead of lingering as "Revoked", and the redundant "Require re-pair" button is gone. Devices that are already paired keep their current access.
- The daemon protocol is now version 12, for the new `attach_file` request. Update PurePoint on every machine and restart its daemon.
- **Breaking: `scripts/install.sh` installs a Linux release only after verifying who built it.** Linux tarballs are signed with a PurePoint minisign key whose public half is embedded in the script, and releases carry GitHub build provenance attestations. The script checks the signature (with `minisign`, or OpenSSL 3 when minisign isn't installed) and, when the GitHub CLI is installed and signed in, runs `gh attestation verify`. If neither check can run, for example for releases published before signing started, it stops; set `PU_INSTALL_SKIP_VERIFY=1` to install anyway with a warning. A check that fails always stops the install.
- Releases now include CycloneDX SBOMs for `pu`, `pu-engine` and the Point Guard npm runtime, attested against the DMG and Linux tarballs.
- The update feed (`appcast.xml`) is now signed with the Sparkle update key, and the app requires a signed feed and verifies each update before extracting it.
Expand All @@ -31,7 +31,6 @@ All notable changes to PurePoint are documented here. Format follows [Keep a Cha
Projects that already set `launchArgs` are unaffected.
- `launchArgs` is now one free-form string, split like a shell command line (`launchArgs: "--model opus --append-system-prompt 'be terse'"`), so new or renamed CLI flags work without a PurePoint update. Existing list values (`launchArgs: [..]`, `launchArgs: []`) still load the same; PurePoint writes the string form when it saves. A project value, even `""`, takes precedence over the machine-level one.
- `pu spawn --no-auto` now launches the bare command and ignores project and machine-level launch args. `--agent-args` still apply. The choice is saved with the agent, so it still launches bare after `pu bench`/`pu play`, suspend/resume or a daemon restart.
- The daemon protocol is now version 11 because the launch args request and response shapes changed. Restart the daemon after updating (`pu` and the macOS app reject a v10 daemon with update guidance instead of appearing to save launch args that an old daemon drops).
- Settings → Agents replaces the per-flag pickers for Claude, Codex and OpenCode with one launch args field per agent next to its command, for this project and for all projects. Each field's placeholder shows a flag that CLI accepts (`--model opus` for Claude, `--search` for Codex, `--auto` for OpenCode).
- **Breaking:** `pu` no longer searches `PATH` or `~/.cargo/bin` when it auto-starts the daemon. It starts the `pu-engine` beside itself, then `~/.pu/bin/pu-engine`; a `pu` inside the macOS app starts only the app's own engine. To run another build, set `PU_ENGINE_PATH` to its path (or to a name to look up on `PATH`). The chosen binary must be owned by you or root (or, for the app's own engine, by whoever owns the app) and not writable by group or others. If none qualifies, the error says why each candidate was refused.
- The macOS app now installs `pu-engine` next to `pu` in `~/.pu/bin`, so `~/.pu/bin/pu` can start the daemon when the app isn't running. Both are copied to a temporary file and renamed into place, so a daemon running from `~/.pu/bin` is never modified underneath itself.
Expand Down
6 changes: 5 additions & 1 deletion apps/purepoint-macos/purepoint-macos/Models/Workspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ nonisolated enum SurfaceContent: Equatable, Sendable {
case agent(String)
/// The file navigator/editor. `path` is the absolute file to show; `nil` opens the navigator alone.
case file(path: String?)
/// A tab of the project's browser, which runs on the project's machine. `tabId` is the
/// daemon's tab (`nil` until opened); `url` is the last page shown, so a tab lost to a
/// daemon or browser restart reopens where it was.
case browser(tabId: String?, url: String?)

var agentId: String? {
if case .agent(let id) = self { return id }
Expand Down Expand Up @@ -192,7 +196,7 @@ nonisolated struct Workspace: Identifiable, Equatable, Sendable {
if isPointGuard { return false }
return !surfaces.contains { surface in
switch surface.surface.content {
case .agent, .file, .pointGuard: true
case .agent, .file, .pointGuard, .browser: true
case .empty: false
}
}
Expand Down
12 changes: 12 additions & 0 deletions apps/purepoint-macos/purepoint-macos/PurePointiPadApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ struct PurePointiPadApp: App {
viewCache.remove(agentId: agentId)
appState.projectState(forId: projectId)?.removeAndKillAgent(agentId)
}
BrowserLinks.open = { [weak registry] agentId, url in
guard let registry, let workspaceId = registry.workspaceId(forAgent: agentId),
let workspace = registry.workspace(id: workspaceId)
else { return false }
let content = SurfaceContent.browser(tabId: nil, url: url.absoluteString)
return registry.newTab(workspaceId: workspaceId, leafId: workspace.focusedLeafId, content: content) != nil
}
registry.onCloseBrowserTab = { projectId, tabId in
guard let project = appState.projectState(forId: projectId) else { return }
let (client, root) = (project.client, project.projectRoot)
Task { _ = try? await client.send(.browser(projectRoot: root, op: .close(tabId: tabId))) }
}
hotkeyMonitor.keyBindingState = keyBindingState
hotkeyMonitor.start()
CommandPalettePanel.registerPresenter()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
import Foundation

// Browser wire types (protocol 15): `crates/pu-core/src/protocol/browser.rs`.
// The project's headless browser runs on the daemon's machine; a browser pane
// watches one tab over a `browser_attach` stream and drives it with ops.

/// One tab as the daemon reports it.
nonisolated struct BrowserTabInfo: Decodable, Equatable, Sendable {
let tabId: String
let url: String
let title: String
let loading: Bool
/// `agent` or `human`.
let driver: String
let canGoBack: Bool
let canGoForward: Bool
/// The page viewport in CSS pixels.
let width: Int
let height: Int

var isHumanDriving: Bool { driver == "human" }

enum CodingKeys: String, CodingKey {
case tabId = "tab_id"
case url, title, loading, driver
case canGoBack = "can_go_back"
case canGoForward = "can_go_forward"
case width, height
}
}

nonisolated struct BrowserTabPayload: Decodable {
let tab: BrowserTabInfo
}

/// One screencast frame: a base64 JPEG and the CSS viewport it shows.
nonisolated struct BrowserFramePayload: Decodable, Sendable {
let tabId: String
let seq: UInt64
let data: String
let width: Double
let height: Double

enum CodingKeys: String, CodingKey {
case tabId = "tab_id"
case seq, data, width, height
}
}

nonisolated struct BrowserTabIdPayload: Decodable {
let tabId: String

enum CodingKeys: String, CodingKey {
case tabId = "tab_id"
}
}

nonisolated struct BrowserEvalPayload: Decodable {
let value: BrowserJSONValue?
}

/// Just enough of a JSON value to read an eval result as text.
nonisolated enum BrowserJSONValue: Decodable, Sendable {
case string(String)
case other

init(from decoder: Decoder) throws {
let container = try decoder.singleValueContainer()
if let string = try? container.decode(String.self) {
self = .string(string)
} else {
self = .other
}
}

var string: String? {
if case .string(let s) = self { return s }
return nil
}
}

/// Modifier bits, as Chromium numbers them.
nonisolated struct BrowserModifiers: OptionSet, Sendable {
let rawValue: Int
static let alt = BrowserModifiers(rawValue: 1)
static let control = BrowserModifiers(rawValue: 2)
static let meta = BrowserModifiers(rawValue: 4)
static let shift = BrowserModifiers(rawValue: 8)
}

/// Input from the person at a browser pane. Coordinates are CSS pixels.
nonisolated enum BrowserInputEvent: Encodable, Equatable, Sendable {
enum MouseAction: String, Sendable { case down, up, move }
enum MouseButton: String, Sendable { case none, left, middle, right }

case mouse(action: MouseAction, x: Double, y: Double, button: MouseButton, clickCount: Int, modifiers: Int)
case wheel(x: Double, y: Double, dx: Double, dy: Double, modifiers: Int)
case key(down: Bool, key: String, code: String?, text: String?, modifiers: Int)
case text(String)

func encode(to encoder: Encoder) throws {
var c = encoder.container(keyedBy: DynamicCodingKey.self)
switch self {
case .mouse(let action, let x, let y, let button, let clickCount, let modifiers):
try c.encode("mouse", forKey: .key("kind"))
try c.encode(action.rawValue, forKey: .key("action"))
try c.encode(x, forKey: .key("x"))
try c.encode(y, forKey: .key("y"))
try c.encode(button.rawValue, forKey: .key("button"))
try c.encode(clickCount, forKey: .key("click_count"))
try c.encode(modifiers, forKey: .key("modifiers"))
case .wheel(let x, let y, let dx, let dy, let modifiers):
try c.encode("wheel", forKey: .key("kind"))
try c.encode(x, forKey: .key("x"))
try c.encode(y, forKey: .key("y"))
try c.encode(dx, forKey: .key("dx"))
try c.encode(dy, forKey: .key("dy"))
try c.encode(modifiers, forKey: .key("modifiers"))
case .key(let down, let key, let code, let text, let modifiers):
try c.encode("key", forKey: .key("kind"))
try c.encode(down ? "down" : "up", forKey: .key("action"))
try c.encode(key, forKey: .key("key"))
try c.encodeIfPresent(code, forKey: .key("code"))
try c.encodeIfPresent(text, forKey: .key("text"))
try c.encode(modifiers, forKey: .key("modifiers"))
case .text(let text):
try c.encode("text", forKey: .key("kind"))
try c.encode(text, forKey: .key("text"))
}
}
}

/// The browser ops a pane sends. A `nil` tab id means the stream's tab.
nonisolated enum BrowserOp: Encodable, Equatable, Sendable {
case open(url: String?)
case close(tabId: String?)
case navigate(tabId: String?, url: String)
/// `back`, `forward` or `reload`.
case history(tabId: String?, direction: String)
/// `human` or `agent`.
case control(tabId: String?, driver: String)
case eval(tabId: String?, expression: String)
case input(tabId: String?, event: BrowserInputEvent)
case resize(tabId: String?, width: Int, height: Int, scale: Double)
case frameAck(tabId: String?, seq: UInt64)

func encode(to encoder: Encoder) throws {
var c = encoder.container(keyedBy: DynamicCodingKey.self)
func tab(_ id: String?) throws { try c.encodeIfPresent(id, forKey: .key("tab_id")) }
switch self {
case .open(let url):
try c.encode("open", forKey: .key("action"))
try c.encodeIfPresent(url, forKey: .key("url"))
case .close(let tabId):
try c.encode("close", forKey: .key("action"))
try tab(tabId)
case .navigate(let tabId, let url):
try c.encode("navigate", forKey: .key("action"))
try tab(tabId)
try c.encode(url, forKey: .key("url"))
case .history(let tabId, let direction):
try c.encode("history", forKey: .key("action"))
try tab(tabId)
try c.encode(direction, forKey: .key("direction"))
case .control(let tabId, let driver):
try c.encode("control", forKey: .key("action"))
try tab(tabId)
try c.encode(driver, forKey: .key("driver"))
case .eval(let tabId, let expression):
try c.encode("eval", forKey: .key("action"))
try tab(tabId)
try c.encode(expression, forKey: .key("expression"))
case .input(let tabId, let event):
try c.encode("input", forKey: .key("action"))
try tab(tabId)
try c.encode(event, forKey: .key("event"))
case .resize(let tabId, let width, let height, let scale):
try c.encode("resize", forKey: .key("action"))
try tab(tabId)
try c.encode(width, forKey: .key("width"))
try c.encode(height, forKey: .key("height"))
try c.encode(scale, forKey: .key("scale"))
case .frameAck(let tabId, let seq):
try c.encode("frame_ack", forKey: .key("action"))
try tab(tabId)
try c.encode(seq, forKey: .key("seq"))
}
}
}
Loading