hero_agent: migrate audit_log, usage_log, and memories from SQLite to OSIS #91
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Follow-up to #45 (AI conversations → OSIS).
After #45, hero_agent still uses SQLite (
db.rs) for three data domains. This issue tracks migrating them to OSIS so SQLite andrusqlitecan be removed entirely.What remains in SQLite after #45
1. Audit Log (
audit_logtable)ai/audit.oschemaor extendai/agent.oschema2. Usage Log (
usage_logtable)ai/usage.oschemaor extendai/agent.oschema3. Memories (
memoriestable)ai/memory.oschemaor extendai/agent.oschemaImplementation Steps
Phase 1: OSIS Schemas
Phase 2: Backend Migration
audit_osis.rs,usage_osis.rs,memory_osis.rs(or unified module)/api/audit,/api/usage,/api/memories,/api/stats)Phase 3: Data Migration
Phase 4: Remove SQLite
db.rsentirelyrusqlitefrom Cargo.tomlTesting
/api/audit,/api/usage,/api/memories,/api/statsendpointsRelated
Signed-off-by: mik-tf
Completed — all SQLite tables migrated to OSIS
This was implemented as part of #45 in a single pass. All 5 SQLite tables (conversations, messages, audit_log, usage_log, memories) are now stored in OSIS via the
aidomain schema.Schema types added
AgentAuditEntry— tool execution audit trailAgentUsageEntry— LLM token consumption trackingAgentMemory— user facts, preferences, skills, context(Plus
AgentConversationandAgentMessagefrom #45)SQLite fully removed
db.rsdeleted (711 lines)conversation.rsdeleted (90 lines)rusqlitedependency removed from workspacehero_agent.dbfile at runtimeSigned-off-by: mik-tf