feat: add memory system and troubleshoot agent

Memory System:
- Add category-based memory storage (company, tech, role, location, server)
- Silent background saving via saveMemorySilently()
- Category-based overwrite (same category replaces old memory)
- Server-related pattern detection (AWS, GCP, k8s, traffic info)
- Memory management tool (list, delete)

Troubleshoot Agent:
- Session-based troubleshooting conversation (KV, 1h TTL)
- 20-year DevOps/SRE expert persona
- Support for server/infra, domain/DNS, code/deploy, network, database issues
- Internal tools: search_solution (Brave), lookup_docs (Context7)
- Auto-trigger on error-related keywords
- Session completion and cancellation support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
kappa
2026-01-27 14:28:22 +09:00
parent 6392a17d4f
commit 860e36a688
13 changed files with 1328 additions and 58 deletions

View File

@@ -0,0 +1,13 @@
-- Migration 003: Add User Memories Table
-- 사용자가 기억해달라고 요청한 정보를 저장하는 테이블
CREATE TABLE IF NOT EXISTS user_memories (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
content TEXT NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id)
);
-- 사용자별 기억 조회 성능 최적화
CREATE INDEX IF NOT EXISTS idx_memories_user ON user_memories(user_id, created_at DESC);