forked from Rockachopa/Timmy-time-dashboard
fix: remove dead swarm imports, add memory_write tool, and auto-prune on startup (#143)
- Replace dead `from swarm` imports in tools_delegation and tools_intro with working implementations sourced from _PERSONAS - Add `memory_write` tool so the agent can actually persist memories when users ask it to remember something - Enhance `memory_search` to search both vault files AND the runtime vector store for cross-channel recall (Discord/web/Telegram) - Add memory management config: memory_prune_days, memory_prune_keep_facts, memory_vault_max_mb - Auto-prune old vector store entries and warn on vault size at startup - Update tests for new delegation agent list (mace removed) Co-authored-by: Trip T <trip@local> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
3bf7187482
commit
b8164e46b0
@@ -24,15 +24,22 @@ class TestDelegateTask:
|
||||
assert isinstance(result, dict)
|
||||
|
||||
def test_all_valid_agents_accepted(self):
|
||||
valid_agents = ["seer", "forge", "echo", "helm", "quill", "mace"]
|
||||
valid_agents = ["seer", "forge", "echo", "helm", "quill"]
|
||||
for agent in valid_agents:
|
||||
result = delegate_task(agent, "test task")
|
||||
assert "Unknown agent" not in result.get("error", ""), f"{agent} rejected"
|
||||
|
||||
def test_mace_no_longer_valid(self):
|
||||
result = delegate_task("mace", "run security scan")
|
||||
assert result["success"] is False
|
||||
assert "Unknown agent" in result["error"]
|
||||
|
||||
|
||||
class TestListSwarmAgents:
|
||||
def test_graceful_failure_when_swarm_unavailable(self):
|
||||
def test_returns_agents_from_personas(self):
|
||||
result = list_swarm_agents()
|
||||
assert result["success"] is False
|
||||
assert result["agents"] == []
|
||||
assert "error" in result
|
||||
assert result["success"] is True
|
||||
assert len(result["agents"]) > 0
|
||||
agent_names = [a["name"] for a in result["agents"]]
|
||||
assert "Seer" in agent_names
|
||||
assert "Forge" in agent_names
|
||||
|
||||
Reference in New Issue
Block a user