chore: migrate config paths to XDG base directory and add hit_count tracking to api_cache

This commit is contained in:
2025-11-05 14:34:23 +00:00
parent 9f155db7c2
commit ab9c29467c
32 changed files with 2598 additions and 340 deletions
+6
View File
@@ -68,6 +68,12 @@ class AgentCommunicationBus:
)
"""
)
cursor.execute("PRAGMA table_info(agent_messages)")
columns = [row[1] for row in cursor.fetchall()]
if "read" not in columns:
cursor.execute("ALTER TABLE agent_messages ADD COLUMN read INTEGER DEFAULT 0")
self.conn.commit()
def send_message(self, message: AgentMessage, session_id: Optional[str] = None):
+2 -3
View File
@@ -1,4 +1,3 @@
import json
import time
import uuid
from dataclasses import dataclass, field
@@ -169,7 +168,7 @@ Break down the task and delegate subtasks to appropriate agents. Coordinate thei
return results
def get_session_summary(self) -> str:
def get_session_summary(self) -> Dict[str, Any]:
summary = {
"session_id": self.session_id,
"active_agents": len(self.active_agents),
@@ -183,7 +182,7 @@ Break down the task and delegate subtasks to appropriate agents. Coordinate thei
for agent_id, agent in self.active_agents.items()
],
}
return json.dumps(summary)
return summary
def clear_session(self):
self.active_agents.clear()