96 const std::string& title =
"New Conversation",
97 const std::optional<std::string>& project_path = std::nullopt,
98 const std::optional<std::string>& model_id = std::nullopt);
112 const std::string& parent_conversation_id,
113 const std::string& child_conversation_id,
114 const std::string& delegating_tier,
115 const std::string& target_tier,
116 const std::string& task);
Activate model on GPU (WARM → ACTIVE).
std::string utc_timestamp()
Get current UTC time as ISO 8601 string.
std::string generate_uuid()
Generate a UUID v4 string.
ConversationRecord make_conversation(const std::string &title="New Conversation", const std::optional< std::string > &project_path=std::nullopt, const std::optional< std::string > &model_id=std::nullopt)
Create a new ConversationRecord with generated UUID and timestamps.
DelegationRecord make_delegation(const std::string &parent_conversation_id, const std::string &child_conversation_id, const std::string &delegating_tier, const std::string &target_tier, const std::string &task)
Create a new DelegationRecord with generated UUID and timestamp.
Database record for a conversation.
std::string created_at
ISO 8601 timestamp.
std::string id
UUID primary key.
std::string title
Conversation title.
std::optional< std::string > model_id
Model identifier (nullable)
std::optional< std::string > project_path
Project path (nullable)
std::string updated_at
ISO 8601 timestamp.
std::string metadata
JSON metadata blob.
Database record for a delegation.
std::string target_tier
Target tier for child loop.
std::string created_at
ISO 8601 timestamp.
std::string delegating_tier
Tier that initiated delegation.
std::string status
pending/running/completed/failed
std::optional< std::string > completed_at
Completion timestamp (nullable)
std::optional< int > max_turns
Turn limit (nullable)
std::string parent_conversation_id
Parent conversation FK.
std::optional< std::string > result_summary
Result summary (nullable)
std::string task
Task description.
std::string id
UUID primary key.
std::string child_conversation_id
Child conversation FK.
Database record for a message.
std::string tool_calls
JSON array of tool calls.
std::string id
UUID primary key.
std::string conversation_id
Parent conversation FK.
std::optional< std::string > identity_tier
Tier that produced this message.
std::string tool_results
JSON array of tool results.
bool is_compacted
Whether this message survived compaction.
std::string role
"user", "assistant", "system", "tool"
int64_t token_count
Estimated token count.
std::string created_at
ISO 8601 timestamp.
std::string content
Message text.