Commit Graph

12 Commits

Author SHA1 Message Date
bea8aefd8d test: stop hardcoding an out-of-repo sys.path in test_protocol.py
tests/test_protocol.py 原本把 "/home/program/NextAgent/src" 硬编码进
sys.path,指向宿主机上另一份(工作区为脏的)NextAgent 检出。结果测试
import 的是那份副本而非本仓库的 src,导致两个用例失败:

  - test_decode_raises_on_wrong_fmt_id → DecodingError not raised
  - test_register_and_send → ValueError: inhomogeneous shape

改为基于 __file__ 推导仓库内的 src/ 路径,测试不再依赖仓库外的任何
绝对路径,任何检出位置都能跑通。实现代码未做改动——这是测试耦合问题,
不是实现 bug。

同时取消跟踪 7 个误提交的 .pyc(.gitignore 规则此前加晚了)。
仅 git rm --cached,工作区文件保留;.gitignore 的 __pycache__/ 与 *.pyc
规则继续生效。

python3 -m unittest discover -s tests → Ran 31 tests, OK
git ls-files '*.pyc' | wc -l → 0
2026-10-16 09:22:45 +08:00
014097794f 更新 README.md 2026-06-03 13:06:17 +00:00
db4d1d0214 fix(memory): correct memory architecture to 3-layer design (text/vector/graph) 2026-06-01 11:25:14 +08:00
27865b1663 chore: add .gitignore, remove pycache from tracking 2026-06-01 11:14:49 +08:00
ac663fca16 feat: protocol base lib + rule-based parser MVP + 31 tests 2026-06-01 11:12:45 +08:00
6edda94a89 docs: add tensor-parser-network.md - human-readable tensor debugging tool
- Tensor Parser Network converts standard tensors to human-readable text
- Not a runtime component; purely a training/debugging/verification tool
- Dedicated parsers for each tensor type (ref, memory, reasoning, expression, control)
- Three data generation methods: from subnet training, synthetic via LLM, end-to-end collection
- MVP approach: rule-based template parser (zero training, usable immediately)
- Iterative roadmap: rules → learned parsers → unified LLM-based generator
- Training dataset construction, evaluation metrics, and usage scenarios
2026-06-01 10:05:58 +08:00
c3faa570ca docs: add core-training.md - three approaches for training the heuristic scheduler
- RL approach: MDP formulation, PPO, curriculum learning
- LLM-driven approach: compact LLM fine-tuned as scheduler
- Neuro-symbolic approach (recommended): symbolic rules (70%) + small neural policy (30%) + arbiter
- Expression verifier training for Core's internal verification component
- Comprehensive training pipeline combining all approaches
- Evaluation metrics for Core performance
2026-06-01 10:00:16 +08:00
3345394bf5 docs: fix architecture boundaries - routing=unique input, LLM=unique output, memory=autonomous
Key corrections:
- Routing subnet is the ONLY external input path; all images/text/voice must pass through it
- LLM subnet is the ONLY external output path; natural language goes directly to user
- Core is a purely internal layer, not directly exposed to users
- Memory subnet is autonomous: Core only passes query tensors + new information tensors;
  how to update/delete/modify is entirely decided by memory subnet
- Routing subnet uses sliding window mechanism: instant label tensor generation → Core,
  then after the round ends, Core schedules routing to process remaining raw data
- Updated all ASCII diagrams, Mermaid diagrams, pseudo-code, and data flow charts
- Added border rules table to all relevant docs
2026-06-01 09:38:33 +08:00
74fe091026 cleanup: remove HarmonyOS references (typo) 2026-06-01 09:25:11 +08:00
79a6a9faf7 docs: refine Unified Tensor Protocol with Adapter+Facade patterns and Zero-Copy advantages
- Added precise design pattern description (Adapter Pattern for codec, Facade Pattern for TensorBus interface)
- Dynamic grid-joining: register new subnets at runtime via TensorBus.register()
- Hot-plug: add/remove subnets without interrupting system
- Zero-Copy via kernel bypass on HarmonyOS 6.1
- Hardware affinity: NPU/GPU native tensor operations
- High data fidelity: lossless transfer of high-dim feature maps & attention weights
- Runtime training: support creating subnets on-demand while system runs
2026-06-01 09:23:05 +08:00
bf0af3709c fix: correct architecture docs - tensor protocol, heuristic scheduling, LLM dual output, memory update mechanism
Key corrections:
- Subnets communicate via Standard Tensor Protocol, not natural language
- Core scheduling is heuristic (non-linear), not pipeline-based
- LLM subnet has dual output: natural language→user, expression tensor→Core
- Core aggregates subnet results → memory update parameter tensor → memory subnet
- Added TrulyMEM-style graph DB (Neo4j) reference in memory-subnet.md
- LLM is demoted to specialized language generation engine
- All docs include correct tensor schemas, architecture diagrams, and training plans
2026-06-01 09:20:14 +08:00
398d35c50b chore: init project docs - NextAgent cognitive decoupled architecture
- README.md with architecture diagram and project overview
- docs/architecture-overview.md: core design, scheduling, RefPack protocol
- docs/routing-compression-subnet.md: multi-modal encoding, compression training
- docs/memory-subnet.md: MANN, GNN, retrieve-pull mechanism training
- docs/logic-trace-subnet.md: RLHF+PRM, MCTS, self-correction training
- docs/llm-subnet.md: SFT, RLHF fine-tuning, multi-language alignment
2026-06-01 08:55:27 +08:00