MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / metadata

Method metadata

src/sessions/codex.rs:616–642  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

614 }
615
616 fn metadata(&self) -> Value {
617 let mut goal = serde_json::Map::new();
618 goal.insert("source".to_string(), Value::String("goal".to_string()));
619 goal.insert(
620 "objective".to_string(),
621 Value::String(self.objective.clone()),
622 );
623 if let Some(tokens_used) = self.tokens_used {
624 goal.insert("tokens_used".to_string(), Value::from(tokens_used));
625 }
626 if let Some(token_budget) = self.token_budget {
627 goal.insert("token_budget".to_string(), Value::from(token_budget));
628 }
629 if self.token_budget_unbounded {
630 goal.insert("token_budget_unbounded".to_string(), Value::from(true));
631 }
632 if let Some(tokens_remaining) = self.tokens_remaining {
633 goal.insert(
634 "tokens_remaining".to_string(),
635 Value::from(tokens_remaining),
636 );
637 }
638 if self.tokens_remaining_unbounded {
639 goal.insert("tokens_remaining_unbounded".to_string(), Value::from(true));
640 }
641 Value::Object(goal)
642 }
643}
644
645fn codex_goal_context_from_text(text: &str) -> Option<CodexGoalContext> {

Callers 15

sweep_orphan_dbsFunction · 0.80
walkFunction · 0.80
write_entry_innerFunction · 0.80
collect_task_api_pathsFunction · 0.80
message_metadataFunction · 0.80
scan_rootFunction · 0.80
handle_storage_statusFunction · 0.80
read_log_tailFunction · 0.80

Calls 1

insertMethod · 0.80