refactor(core): messaging-only agent-relay-node; session history moves to the desktop
crates/relay-node is the Agent Relay core as a messaging-only crate: Cargo package agent-relay-node, library agent_relay_node, binary agent-relay-node. It discovers the coding sessions on a computer, puts them on the relay, delivers messages into them through each harness's own route and sends theirs, and serves the bridge contract. It depends on nothing from relayhistory (ai-hist, history-provider-sources, notify are gone, and so is the history Cargo feature).
The binary runs the messaging commands only: relay … (serve, call, send, read and the other session-socket commands) and connect ….
Release and the CLI
.github/workflows/relay-node-release.yml(manual dispatch,versionanddry_runinputs) publishesagent-relay-node-<version>-<os>-<arch>[.exe]with.sha256sidecars under the tagrelay-node-v<version>.relay init(packages/cli/src/cli/lib/relay-node.ts) downloads that asset from that tag into<bin>/agent-relay-node;AGENT_RELAY_NODE_PATHpoints it at a binary of your own.packages/harness-drivernames the slotagent-relay-node.- CI is
.github/workflows/relay-node-ci.yml. relay initpinsRELAY_NODE_VERSION = '15.0.9', so arelay-node-v15.0.9(or newer, with the pin moved) release must exist before the next CLI release.
Seams a build adds
| Seam | What it is |
|---|---|
Plugins.account (AccountPlugin) | Sign-in and Cloud maintenance; answers the Availability::Account methods (account.*, every uploader.* method, sessions.transcript) |
Plugins.session_policy (SessionPolicy) | Which sessions join the relay by themselves, may be asked to join, publish activity |
Plugins.settings (SettingsExtension) | Extra settings, such as history_retention_days |
Plugins.history_version | The session-history release status.get reports as daemon.history_version |
PluginBuilder.session_sources → session_sources::SessionSources | RemoteSessions sources (remote rows per SessionKind, hidden sessions, whether a remote row may join by itself, delivery a local route cannot make) and HermesRoots (Hermes's homes, which make Hermes titles editable) |
relay::automatic_edit | AutomaticEdit, authority, eligible: renames and native titles a build makes on its own apply only while still current (Core::rename_if_current, session_titles::set_native_title_if_current) |
The contract keeps every uploader.* method and its types as data. SharingMode, Stage and the uploader Target are contract types in relay::contract::account; history_retention_days's values are relay::contract::agents::history_retention. A core without an account answers the account methods with method_not_found; history_unavailable is gone. Agent-led setup closes its bootstrap without an uploader.
What relay-desktop's desktop-core provides
desktop-core takes the session-history code (collector, upload queue, RelayHistory transport, catalog and queries, view models, retention, uploader, relay_uploads, session naming, the collector's Cloud sign-in, and the Devin Cloud / Claude Code on the web catalog readers) and composes it with this crate: it sets session_policy to the uploader policy, registers the retention setting, sets history_version, starts refresh_snapshots and session naming from the account's run, gives PluginBuilder.session_sources its catalog-backed sources, and keeps its own binary dispatching the core's commands and the collector's (history flush included).
Items made public for it: Core::unregister_upload_excluded, Core::rename_if_current, session_titles::set_native_title_if_current, outbox::write_atomic, methods::session_path_for, and the new local_methods::discovered_sessions.
This PR merges #2067 (sessions.location) and adds UploadSession.originator. It supersedes #2068.
🤖 Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Agent Relay sessions
claudesessionb881bd94· opened viagh pr create· last active 2026-11-04