Val-sss
|
8fd5275b2e
|
feat: complete MoE framework — token budget, guardrails, observability, session continuity
P1: Token budget tracking (llm/llama_backend.py)
- Auto-count input/output tokens per LLM call
- BudgetExceededError when over limit
- OpenAI API uses real usage data, Ollama estimates
P2: Guardrails (tools/executor.py)
- Block dangerous commands (rm -rf, git push --force, drop database, etc.)
- Protect sensitive files (.env, credentials.json, id_rsa)
- Confine writes to project_root
P3: Execution observability (core/execution_trace.py)
- Structured trace per task (steps, timing, tokens, success)
- Human-readable summary() output
P4: Session continuity (memory/session_md.py)
- Auto-save SESSION.md on exit (recent task summaries)
- Auto-load on next startup into Gate memory_context
- Based on Claude Code 4-Layer Memory + Augment "Session-End Spec Update"
Also fixed: apply_patch method accidentally dropped during executor.py rewrite.
311 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-29 20:52:13 +08:00 |
|