feat(probe): build the core without relayhistory (history feature)

Merged
KH
9d ago
+1616-217

Phase 1.5 of moving the probe core into relay (follows #2012): relay's build of crates/probe no longer depends on relayhistory (ai-hist, history-provider-sources).

The split

  • New Cargo feature history = ["dep:ai-hist", "dep:history-provider-sources", "dep:notify"], on by default. relay-desktop builds the defaults and its behaviour is unchanged.
  • relay ships --no-default-features --features production-binaries: the messaging runtime (relay serve: discovery, native delivery + injection, harness setup, Relaycast/workspace, spawning, bridge, install). cargo tree --no-default-features --features production-binaries -e normal has no ai-hist / history-provider-sources (CI enforces it).
  • Gated behind history: the upload queue/receiver/retention (delivery, destination, retention), the session catalog query, the uploader's history reader and monitor, the retention store, Devin Cloud / claude.ai web catalog reads and the Devin Cloud send, Hermes title roots, the binary's collector commands (cloud, run, start, status, sessions, sharing, history flush, ...), and 9 history integration tests + one example (required-features).

The bridge without history

The contract is identical in both builds (generated from a feature-independent registry; CI diffs both builds' output against the checked-in CoreContract.swift). Without history:

  • contract::HISTORY_METHODS (every uploader.* method and sessions.transcript) answer the new error kind history_unavailable (-32000, not retryable) before params are read; the generated Swift docs say so. Adding an error kind does not change bridge_version (Swift falls back to internal).
  • settings.set of history_retention_days → history_unavailable; settings.get reports the default.
  • status.get → daemon.history_version: null.
  • Devin Cloud delivery is history-only: such sessions aren't discovered, and a send to a Devin Cloud id is refused permanently.
  • The uploader uses NoHistoryRunner (no child processes; no installs; everything else history_unavailable). Cloud account.sign_in adopts the workspace then ends in error (its last step is cloud install) — relay resolves its workspace from the CLI (phase 2).
  • Agent-led setup (/setup/*) no longer waits on an uploader; POST /setup/sharing → setup_unavailable.

Also removes three unused imports that warned in both builds.

CI

probe-ci.yml: Linux builds + tests both configurations (linux and core-only, ubuntu-latest, --test-threads=4, isolated HOME keeping RUSTUP_HOME/CARGO_HOME), core-only adds the dependency-tree and contract checks; macOS and Windows also build the no-history core.

Testing

  • cargo test --locked --no-default-features --features production-binaries (env -i, empty HOME): 2619 passed, 0 failed, 14 ignored.
  • cargo check --locked --all-targets (default/history): clean apart from pre-existing warnings; full history test suite runs in CI.
  • Contract regenerated; both builds generate the same file.

Docs: crates/probe/README.md (feature split), docs/probe-move.md (phase 1.5), crates/probe/docs/relay-core.md (error table).

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Agent Relay sessions

  • claude session ada65920 · opened via gh pr create · last active 2026-10-29
  • claude session 5a4f854b · contributor · ran gh pr commands · last active 2026-10-29
  • claude session 8ab900cc · contributor · ran gh pr commands · last active 2026-10-29