Rename "topic" to "agent" across the codebase
The "topic" field originally named the agent/generator that produced
output. Rename to "agent" consistently: Python identifiers, SQLite FTS5
schema column, CLI flags (--topic/-t → --agent/-a), CLI commands
(topics → agents), JSON event fields, stats cache keys, API response
keys, UI constants and templates, documentation, and muse prompts.
Key renames:
- get_output_topic() → get_output_name() (returns filename stem)
- meta["indexer"]["topic"] → meta["indexer"]["agent"]
- write_events_jsonl(topic=) → write_events_jsonl(agent=)
- TOPIC_ICONS/LABELS → AGENT_ICONS/LABELS
- topic_counts/minutes/counts_by_day → agent_counts/minutes/counts_by_day
Adds migration script (apps/search/maint/004_migrate_topic_to_agent.py)
for existing event JSONL and stats cache files. Index requires rebuild
via sol indexer --rebuild after migration.
Audio enrichment "topics" field (subject-matter keywords) is unchanged.
Natural-language uses of "topic" in muse prompts are preserved.
Also fixes a flaky test in test_cortex_client.py where callosum_server
fixture didn't match platform default path.