1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
// SPDX-License-Identifier: MIT OR Apache-2.0
//! Fleet registry abstraction for sub-agent session tracking.
//!
//! [`FleetRegistry`] is a narrow trait that decouples `zeph-subagent` from the
//! `zeph-memory` `SqliteStore`. The concrete implementation lives in `zeph-core`
//! and is injected via `SubAgentManager::set_fleet_registry`.
use Future;
use Pin;
use Arc;
/// Terminal lifecycle status of an agent session visible in the fleet dashboard.
///
/// Only terminal states are represented because [`FleetRegistry::mark_terminal`] is only
/// called when a session ends. Active sessions are registered via
/// [`FleetRegistry::register_active`].
///
/// Mirrors the terminal variants of `zeph_memory::SessionStatus` without creating a
/// dependency on that crate.
/// Minimal data needed to register a sub-agent session in the fleet dashboard.
/// Trait that abstracts fleet session persistence for `SubAgentManager`.
///
/// Implementors must be `Send + Sync` and handle their own internal error recovery;
/// the manager logs failures at `warn` level but never propagates them to the caller.
/// Shared, type-erased fleet registry injected into the manager.
pub type SharedFleetRegistry = ;