mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 11:13:43 +08:00
Always-on memory (structured user/feedback blocks, PROFILE.md, MEMORY.md) is injected into every system prompt but only ever grew, inflating per-turn context over time. This adds deterministic size control across all always-on sources: - Injection budget: cap the always-on structured block by total chars and per-type entry count, keeping the most-recently-updated entries (LRU by Updated date) and disclosing how many were omitted - Nightly consolidation: a dedicated scheduled pass merges duplicate/stale user & feedback entries via the LLM, preserving each entry's original Updated date; runs per owner bucket (shared + personal) with a per-run cap and a never-grow safety guard - File ceilings: deterministic backstop truncates PROFILE.md / MEMORY.md at a section boundary when a rewrite overruns its budget - Manual trigger endpoint for the consolidation maintenance task All knobs under mate.memory.*; covered by unit tests. |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| test | ||
| .npmrc | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| TEST_CASES.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
| vitest.config.ts | ||
| yarn.lock | ||