@memnexus-ai/mx-agent-cli 0.1.239 → 0.1.240
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -196,9 +196,13 @@ NAME_SAFE=$(printf '%s' "$NAME" | tr -d '\000-\037')
|
|
|
196
196
|
# This is ADVISORY only: we emit to stderr and DO NOT exit here — the normal
|
|
197
197
|
# allow/block flow below is unchanged, so no existing behavior is affected. The
|
|
198
198
|
# warn depends only on NEW_LEN, so it fires even if the head fetch later fails.
|
|
199
|
+
HARD_CAP=50000
|
|
199
200
|
WARN_THRESHOLD=45000
|
|
200
201
|
if (( NEW_LEN >= WARN_THRESHOLD )); then
|
|
201
|
-
|
|
202
|
+
# A write ABOVE the cap is not "approaching" it — say so, rather than
|
|
203
|
+
# rendering 60000/50000 as ">=90%", which reads as headroom that isn't there.
|
|
204
|
+
if (( NEW_LEN > HARD_CAP )); then PROXIMITY="OVER the ${HARD_CAP}-char hard cap"; else PROXIMITY=">=90% of the ${HARD_CAP}-char hard cap"; fi
|
|
205
|
+
echo "⚠ named-memory '${NAME_SAFE}' is at ${NEW_LEN} chars (${PROXIMITY}). Archive older entries soon or the next write may hit the hard cap. See mx-agent memory archive-prep." >&2
|
|
202
206
|
fi
|
|
203
207
|
|
|
204
208
|
# ── Fetch current head ───────────────────────────────────────────────────────
|