Single-commit clean baseline after security scrub of niche-tells, project codenames, internal jargon, and contributor-email leaks. Contents: - 100 Rust crates (_primitives/_rust/) - 37 agent manifests (_manifests/) + generated specs (_generated/) - 67 user-invocable skills (skills/) - 33 hooks (hooks/) - Composition blocks (_blocks/) - Documentation (docs/, README.md) - TS adapter packages (_ts_packages/) - Assembler (_assembler/) - Roles (_roles/) - Templates (_templates/) - Forgejo CI (.forgejo/) Author: Denis Parfionovich <info@greendragon.info> License: see LICENSE.
22 lines
786 B
Rust
22 lines
786 B
Rust
//! Candidate row returned by `candidates()`.
|
|
//!
|
|
//! Constructor Pattern: one cube = one DTO. Serializable so CLI can
|
|
//! emit JSON without extra mapping.
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
/// A single pruning candidate — an agent that is eligible for retirement
|
|
/// based on age + status + not-yet-retired.
|
|
///
|
|
/// Fields:
|
|
/// - `id` — ledger `agents.id` (primary key).
|
|
/// - `dna` — ledger `agents.dna` (may be empty string when NULL in DB).
|
|
/// - `last_used_ts` — `COALESCE(finished_ts, started_ts)` for the row.
|
|
/// - `age_days` — `(now - started_ts) / 86400` (integer truncation).
|
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
|
pub struct PruneCandidate {
|
|
pub id: String,
|
|
pub dna: String,
|
|
pub last_used_ts: i64,
|
|
pub age_days: i64,
|
|
}
|