teapot-coding-agent 0.37.151 → 0.37.153

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.
@@ -3262,6 +3262,14 @@ export class Agent {
3262
3262
  summarized: summarizedCount,
3263
3263
  dropped: droppedCount,
3264
3264
  mode,
3265
+ /**
3266
+ * The same line the checkpoint message carries, here so it is VERIFIABLE.
3267
+ *
3268
+ * The notice is a message in the agent's list and is never logged, so "did the model get the remaining budget
3269
+ * after the compaction?" could not be answered from a session log at all — which is exactly the question that
3270
+ * came back after a model stopped claiming "残コンテキストが僅少" at 3.5% used.
3271
+ */
3272
+ contextLine: usageLine(after, this.opts.contextTokenBudget),
3265
3273
  });
3266
3274
  }
3267
3275
  finally {
@@ -38,6 +38,14 @@ const STOP_PATTERNS = [
38
38
  /(?:running (?:low on|out of) context|not enough context (?:left|remaining)|context (?:is )?(?:almost )?(?:full|exhausted)|out of context (?:space|budget))/i,
39
39
  /(?:stop|halt|end|paus|abort)[a-z]*\s+(?:here|now)?\s*(?:because|due to)[^.\n]{0,40}(?:context|token)/i,
40
40
  /stopping (?:here )?(?:because|due to)[^.\n]{0,40}(?:context|token)/i,
41
+ /**
42
+ * Japanese phrasings, MEASURED on mediapad-t5-root-attempt-2: right after a compaction that left 26,610 of ~750,000
43
+ * tokens, the model wrote "ここで一旦区切ります(残コンテキストが僅少)" and stopped — the vocabulary above knew the
44
+ * Chinese and English forms and missed this one, so the guard that answers with the real usage never fired.
45
+ */
46
+ /残(?:り)?(?:の)?(?:コンテキスト|トークン)[^。\n]{0,12}(?:僅少|わずか|少な|尽き|残っていない|無くな)/,
47
+ /コンテキスト(?:の)?(?:残量|残り)[^。\n]{0,12}(?:僅少|わずか|少な|尽き|残っていない|無くな)/,
48
+ /(?:コンテキスト|トークン)(?:を)?(?:節約|温存)[^。\n]{0,20}(?:区切|停止|終了|打ち切)/,
41
49
  ];
42
50
  /**
43
51
  * Strip what the agent is REPORTING from what it is SAYING.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teapot-coding-agent",
3
- "version": "0.37.151",
3
+ "version": "0.37.153",
4
4
  "description": "A lightweight, always-on multi-agent harness for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-or-later",