add tool calling, SQLite persistence, group chat, image vision, voice transcription

Major features:
- OpenAI function calling with tool call loop (streaming SSE parsing)
- Built-in tools: spawn_agent (async claude -p), agent_status, kill_agent,
  update_scratch, send_file
- Script-based tool discovery: tools/ dir with --schema convention
- Feishu todo management script (tools/manage_todo)
- SQLite persistence: conversations, messages, config, scratch_area tables
- Sliding window context (100 msgs, slide 50, auto-summarize)
- Conversation summary generation via LLM on window slide
- Group chat support with independent session contexts
- Image understanding: multimodal vision input (base64 to API)
- Voice transcription via faster-whisper Docker service
- Configurable persona stored in DB
- diag command for session diagnostics
- System prompt restructured: persona + tool instructions separated
- RUST_BACKTRACE=1 in service, clippy in deploy pipeline
- .gitignore for config/state/db files
This commit is contained in:
Fam Zheng
2026-04-09 16:38:28 +01:00
parent 84ba209b3f
commit 128f2481c0
9 changed files with 1840 additions and 51 deletions

View File

@@ -1,10 +1,44 @@
# TODO
# noc roadmap
- [ ] Streaming responses — edit message as claude output arrives instead of waiting for full completion
- [ ] Markdown formatting — parse claude output and send with TG MarkdownV2
- [ ] Timeout handling — kill claude if it hangs beyond a threshold
- [ ] Graceful shutdown on SIGTERM
- [ ] `/reset` command to force new session without waiting for 5am
- [ ] Rate limiting per chat
- [ ] Voice message support — STT (whisper.cpp) → text → claude
- [ ] Video/audio file transcription
## "会呼吸的助手" — 让 noc 活着
核心理念noc 不应该只在收到消息时才被唤醒,而是一个持续运行、有自己节奏的存在。
### 主动行为
- [ ] 定时任务 (cron)LLM 可以自己设置提醒、定期检查
- [ ] 事件驱动监控文件变化、git push、CI 状态等,主动通知
- [ ] 晨间/晚间报告:每天自动汇总待办、提醒重要事项
- [ ] 情境感知:根据时间、地点、日历自动调整行为
### 记忆与成长
- [ ] 长期记忆 (MEMORY.md):跨 session 的持久化记忆
- [ ] 语义搜索:基于 embedding 的记忆检索
- [ ] 自我反思:定期回顾对话质量,优化自己的行为
### 感知能力
- [x] 图片理解multimodal vision input
- [ ] 语音转录whisper API 转文字
- [ ] 屏幕/截图分析
- [ ] 链接预览/摘要
### 交互体验
- [x] 群组支持:独立上下文
- [x] 流式输出sendMessageDraft + editMessageText
- [x] Markdown 渲染
- [ ] Typing indicator
- [ ] Inline keyboard 交互
- [ ] 语音回复 (TTS)
### 工具生态
- [x] 脚本工具发现 (tools/ + --schema)
- [x] 异步子代理 (spawn_agent)
- [x] 飞书待办管理
- [ ] Web search / fetch
- [ ] 更多脚本工具
- [ ] MCP 协议支持
### 可靠性
- [ ] API 重试策略 (指数退避)
- [ ] 用量追踪
- [ ] Context pruning (只裁工具输出)
- [ ] Model failover