Repository navigation
Feature/nervous system - #63
Merged
Merged
Conversation
added 10 commits
July 17, 2026 00:56
…viders, and Web GUI - 新增聊天会话持久化(chat_sessions / chat_messages + ChatSessionRepository) - 新增多供应商 LLM 抽象层(llm_providers / model_config),兼容 OpenAI/DeepSeek/SiliconFlow/Moonshot/Zhipu/Custom - 新增 FastAPI Web 后端:REST API、WebSocket、Services、Schemas 完整链路 - 新增 React 前端:Chat/Settings/Knowledge/Schedule/Event/NPS/Database/Creative/Debug 页面 - 修复 WebSocket 聊天重复初始化 LLM 的性能问题(ChatService 全局单例复用 + session_id 隔离) - 补充 E2E/性能/回滚测试、文档、启动脚本和示例环境变量
…Hippocampus - 新增神经系统基础架构:Packet、CentralRouter、BaseModule - 新增 HTTP Gateway 和 WebSocket Gateway 骨架 - 新增大脑皮层 EchoCortex 和海马体 SimpleHippocampus MVP 模块 - 新增独立 FastAPI 入口 src/nervous_system/app.py 与启动脚本 run_v4_mvp.py - 新增单元测试和集成测试,验证路由延迟 < 1ms、端到端延迟 < 50ms - 保持现有 v3.1.0 Web 后端不受影响
重构内容: 1. 新增大脑皮层、边缘系统、前额叶、小脑、下丘脑等模块化认知架构 2. 实现CentralRouter统一路由与Packet通信协议 3. 保留v3.1.0兼容层确保向后兼容 4. 新增HTTP/LLM网关、Web后端NeoBridge集成 5. 完善全链路单元与集成测试
清理了两个过期的字节码缓存文件,减少仓库冗余文件
- 删除 docs/REFACTORING_SUMMARY.md(早期 v3.x 重构过程总结) - 删除 docs/architecture-refactor-proposal.md(分阶段重构方案提案) - 保留 docs/architecture-v4-diagrams.md 作为最终架构图 - 修复 tests/test_chat_stream.py:当 agent 不可用时允许真实 ChatAgent 懒加载成功后的非空回复
- 删除 docs/ARCHITECTURE.md(内容已被 architecture.md / architecture-v4-diagrams.md 覆盖) - 将 docs/API.md 重命名为 docs/core-api.md,避免与 docs/api.md 大小写冲突 - 更新 docs/architecture.md 参考链接指向 core-api.md 与 architecture-v4-diagrams.md - 更新 README.md 中英文项目结构,加入 v4.0 神经系统目录(nervous_system / cortex / limbic / prefrontal / cerebellum / hypothalamus)
- WebSocketGateway 支持流式路由 /ws/chat → prefrontal.workflow/chat_workflow - ws/chat.py 优先走 v4 CentralRouter,降级兼容 v3 ChatService - LLMCore 实现 llm_stream 流式通道,输出 chunk/done/error Packet - 新增 ChatWorkflow + WorkflowModule:对话→记忆→情感→日程→主动确认 - HippocampusModule 为 memory_query/memory_context/memory_stats 增加 TTL 缓存 - 补充单元测试:ws_gateway、workflow_module、hippocampus cache
- 删除 src/gui/、run.py、validate_gui_structure.py 及 Tkinter 相关测试 - 重写 main.py 为纯 Web/API 入口,移除 --tk/--web 参数 - 清理 run_web.py、background_scheduler.py 中的 Tkinter 引用 - 迁移 WAL 并发安全测试到 tests/integration/ - 更新 .env.example、README、docs 中 Tkinter 相关内容 - 修复 tests/test_p4_proactive.py 入口契约测试以匹配新 main.py - 补充 .gitignore 忽略测试生成的 .db 文件
- 新增 run.py 作为唯一主入口,提供 web/stop/status/logs 子命令 - 保留 main.py 作为 run.py 的薄兼容层 - 新增 UnifiedLogger 统一日志格式与多 Handler 输出 - DebugLogger 适配旧 API 并委托给 UnifiedLogger - 新增前端 logger.ts SDK,拦截 console 并通过 WebSocket 上报 - 新增后端 /ws/frontend-logs 接收前端日志 - 新增 REST 兜底 /api/debug/logs/ingest - 修复入口测试断言以匹配 run.py 新架构 - 全量测试通过:233 passed, 24 skipped
- 新增架构总览图:统一入口、Web 服务、神经系统、统一日志四层 - 突出 run.py 主入口与 main.py 兼容层 - 补充 UnifiedLogger + DebugLogger + /ws/frontend-logs 说明 - 更新快速开始与项目结构,体现新入口与日志模块 - 同步中英双语内容
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.