agents: deduplicate timestamps, plan expansion, rename agent
- Add compact_timestamp() to store — replaces 5 copies of format_datetime(now_epoch()).replace([':', '-', 'T'], "") Also fixes missing seconds (format_datetime only had HH:MM). - Add ConsolidationPlan::to_agent_runs() — replaces identical plan-to-runs-list expansion in consolidate.rs and daemon.rs. - Port job_rename_agent to use run_one_agent — eliminates manual prompt building, LLM call, report storage, and visit recording that duplicated the shared pipeline. - Rename Confidence::weight()/value() to delta_weight()/gate_value() to clarify the distinction (delta metrics vs depth gating).
This commit is contained in:
parent
fe7f636ad3
commit
abab85d249
6 changed files with 49 additions and 82 deletions
|
|
@ -28,7 +28,7 @@ mod ops;
|
|||
// Re-export everything callers need
|
||||
pub use types::{
|
||||
memory_dir, nodes_path,
|
||||
now_epoch, epoch_to_local, format_date, format_datetime, format_datetime_space, today,
|
||||
now_epoch, epoch_to_local, format_date, format_datetime, format_datetime_space, compact_timestamp, today,
|
||||
Node, Relation, NodeType, Provenance, RelationType,
|
||||
RetrievalEvent, Params, GapRecord, Store,
|
||||
new_node, new_relation,
|
||||
|
|
|
|||
|
|
@ -172,6 +172,12 @@ pub fn format_datetime_space(epoch: i64) -> String {
|
|||
format!("{:04}-{:02}-{:02} {:02}:{:02}", y, m, d, h, min)
|
||||
}
|
||||
|
||||
/// Compact timestamp for use in keys: "YYYYMMDDTHHMMss"
|
||||
pub fn compact_timestamp() -> String {
|
||||
let (y, m, d, h, min, s) = epoch_to_local(now_epoch());
|
||||
format!("{:04}{:02}{:02}T{:02}{:02}{:02}", y, m, d, h, min, s)
|
||||
}
|
||||
|
||||
pub fn today() -> String {
|
||||
format_date(now_epoch())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue