Skip to content

feat(daemon): Tier B IPC client — live familiar status#5

Merged
BunsDev merged 3 commits into
mainfrom
integration/tier-b-daemon-ipc
May 30, 2026
Merged

feat(daemon): Tier B IPC client — live familiar status#5
BunsDev merged 3 commits into
mainfrom
integration/tier-b-daemon-ipc

Conversation

@BunsDev
Copy link
Copy Markdown
Member

@BunsDev BunsDev commented May 30, 2026

Summary

Implements PR5: Tier B daemon socket client for coven-code.

What's new

src-rust/crates/core/src/coven_daemon.rs — new module:

  • DaemonClient — blocking HTTP-over-Unix-socket client targeting ~/.coven/coven.sock
  • DaemonClient::new() — returns None when socket is absent; never panics
  • DaemonClient::is_online() — quick liveness check
  • DaemonClient::familiar_statuses() — calls GET /api/v1/familiars, returns Vec<FamiliarStatus>
  • DaemonClient::active_sessions() — calls GET /api/v1/sessions, filters archived, returns Vec<DaemonSession>
  • Uses raw UnixStream + hand-written HTTP/1.0 (no new async/tokio deps)

coven_shared.rs — re-exports DaemonClient, FamiliarStatus, DaemonSession

agents_view.rsload_agent_definitions() now optionally fetches live familiar statuses from the daemon and appends a badge to each familiar's description (e.g. · active (2 sessions), · online, · offline)

Graceful degradation

  • No daemon → works exactly as before
  • Daemon unreachable → empty vecs, no badge appended
  • Partial data → safe defaults for all fields

Tests

4 new tests in coven_daemon: new_returns_none_when_sock_absent, new_returns_some_when_sock_present, familiar_status_deserializes_from_json, familiar_statuses_returns_empty_on_bad_json

Verification

  • cargo check -p claurst-tui
  • cargo test -p claurst-core coven_daemon — 4/4 passed ✅
  • cargo test -p claurst-core — 430 passed, 2 pre-existing keybindings failures unrelated to this PR

Copilot AI review requested due to automatic review settings May 30, 2026 00:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Tier B Coven daemon IPC support so familiar entries can be annotated with live daemon status while preserving graceful fallback when the daemon is unavailable.

Changes:

  • Introduces a blocking HTTP-over-Unix-socket DaemonClient with familiar/session status models.
  • Re-exports daemon IPC types through coven_shared.
  • Updates agent loading to append live familiar status badges when daemon data is available.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src-rust/crates/core/src/coven_daemon.rs Adds the Unix-socket daemon client, response models, parsing logic, and tests.
src-rust/crates/core/src/lib.rs Wires the new daemon module into the core crate.
src-rust/crates/core/src/coven_shared.rs Updates Tier B documentation and re-exports daemon IPC types.
src-rust/crates/tui/src/agents_view.rs Fetches daemon familiar statuses and appends live badges to familiar descriptions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src-rust/crates/core/src/coven_daemon.rs
Comment thread src-rust/crates/tui/src/agents_view.rs Outdated
Comment thread src-rust/crates/core/src/coven_daemon.rs Outdated
Comment thread src-rust/crates/core/src/coven_daemon.rs Outdated
Comment thread src-rust/crates/tui/src/agents_view.rs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@BunsDev BunsDev merged commit ecdd1ab into main May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants