Bring the core up to the desktop's: port relay-desktop's probe/ changes since the split

Merged
KJ
9d ago
+4755-484

relay-desktop's probe/ took 11 more commits after #2057's snapshot (desktop ab63b45f..644f931a). This ports all of them into crates/probe, so relay's core is a superset of the desktop's. relay-desktop can then drop its copy and pin this crate, at the commit core 15.0.9 is released from.

Ported (three-way merged against relay's own changes since the flip):

  • Codex: spawning uses the managed app-server package when it is newer than codex on PATH; an unregistered chat gets one registration command (PostToolUse/stop hook); process discovery fixes.
  • Claude Code: the SessionStart hook introduces a session by its current name and address. The join prompt follows the sharing policy (claude_prompt_to_join_allowed, selected mode only). Relay's automatic-activation Joining guidance is kept and checked first.
  • Cursor CLI: hooks that explicit setup installed before the first chat count as installed (set_enabled).
  • Uploads: repeating an accepted include keeps the running generation. Off for a manually connected session stays off after a restart.
  • Hosted MCP: capability discovery runs before the first agent joins; the preamble carries the link address.
  • Claude cloud sessions: an enumeration schedule recovers soon after Keychain approval.
  • Contract: SignInRequest.provider (google/microsoft). contract/CoreContract.swift is regenerated.

Merge resolutions: session_hook/output.rs (Joining first, then the sharing policy; both tests kept), setup.rs (auto_activates plus the desktop's name/address/link_address), cursor_cli/settings.rs, tests/relay_agents.rs (the desktop's async fixture), and rust-oleum.toml (the higher ceiling of each). Fixups: Workspace.source in the new codex_stop test, and the new upload-off test gated on history.

Tests and CI moved here from relay-desktop: scripts/test-pi-live.sh, test-pi-live-model.sh, test-omp-live.sh, test-claude-mobile-plugin.mjs, test-cursor-live.sh, test-opencode-managed-replies.mjs, test-claude-handoff.py, install-pi-extension.mjs and verify-history-retention.sh, with paths now relative to the crate. Probe CI gains a Live Pi, Oh My Pi and Claude mobile harnesses job (desktop CI ran these) and runs the platform:: and install::/session_model tests on Windows.

Verified locally (macOS): cargo fmt --check. With history: every suite passes except the 2 history_flush deadline tests, which fail on this Mac on main too and are handled on fix/flaky-core-tests. Without history: the lib suite (2,642) and integration suites pass. The public-source check is clean, and the diff has no internal names. relay-desktop's desktop-core and GTK app build and test against this branch.

Changelog: four Fixed bullets under [Unreleased - Minor].

Superset audit (scope grew)

#2057 three-way merged each file against the desktop snapshot 5601b739. Where both sides had changed, it kept relay's side, which dropped some desktop changes made before the split. This PR now restores them. The full per-file ledger (678 files: 516 identical after formatting, the rest each with a decision and the desktop commit) is in crates/probe/docs/desktop-parity-ledger.md.

Restored, each with a test:

  • relay serve --headless keeps the app's Open-at-login entry (d23664e2).
  • Devin reviews are never listed, activated or recreated as offline rows (27854327, aa893455).
  • Grok usage records do not become empty transcript messages (fc84dd6e).
  • Discovery runs on a fixed cadence, and reads never start a pass (96ebd2c5).
  • The desktop's automatic-activation default, through AccountPlugin::auto_activate_by_default. It's false here, so the CLI's core is unchanged; desktop-core turns it on (a37b11a3, 7373df8b).

Kept relay-only, on purpose: the broker, fleet and relay-cli pieces, the reviewed permission_denied retry rule, and the Pi/OpenCode per-provider opt-ins. The desktop's core never auto-activated Pi, Oh My Pi or OpenCode at all, so these opt-ins are a superset.

Moved to relay-desktop's desktop-core: browser sign-in, the provider-credentials test support, and the account, MCP and attestation code.

🤖 Generated with Claude Code


Agent Relay sessions

  • claude session a16f9088 · contributor · ran gh pr commands · last active 2026-11-03