teapot-coding-agent 0.37.126 → 0.37.127

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.
@@ -2987,18 +2987,26 @@ export class Agent {
2987
2987
  * Only what's open is shown: a done item is noise after a compaction.
2988
2988
  */
2989
2989
  {
2990
- const open = this.todo
2991
- .split("\n")
2992
- .filter((l) => /^\s*-\s*\[\s\]/.test(l))
2993
- .slice(0, 40);
2990
+ /**
2991
+ * The WHOLE list, not just the unchecked lines.
2992
+ *
2993
+ * todo.md is free-form input — the operator writes paragraphs into it, and the checklist is the part of it
2994
+ * that survives a round trip, not the whole of it. Filtering to bullets would silently drop the context
2995
+ * around them. The only case worth omitting is when every item is already done: then the list says nothing
2996
+ * actionable, and its past is in the log.
2997
+ */
2998
+ const lines = this.todo.split("\n");
2999
+ const items = lines.filter((l) => /^\s*-/.test(l));
3000
+ const allDone = items.length > 0 && items.every((l) => /^\s*-\s*\[x\]/i.test(l));
3001
+ const todoText = allDone ? "" : this.todo.trim();
2994
3002
  const goalText = this.goal.text.trim();
2995
- if (goalText || open.length) {
3003
+ if (goalText || todoText) {
2996
3004
  this.messages.splice(1, 0, {
2997
3005
  role: "user",
2998
- content: `[harness] Your goal and open tasks, re-attached after compaction:\n` +
3006
+ content: `[harness] Your goal and TODO list, re-attached after compaction:\n` +
2999
3007
  `goal (${this.goal.status}): ${goalText ? goalText.slice(0, 2_000) : "(none set)"}\n` +
3000
- (open.length
3001
- ? `open tasks (${open.length}):\n${open.join("\n")}\n` +
3008
+ (todoText
3009
+ ? `todo.md (verbatim):\n${todoText.slice(0, 8_000)}\n` +
3002
3010
  `Update the list as you finish work (set_todo), so this list and reality cannot drift.`
3003
3011
  : `no task is open in todo.md right now — if work remains, write it there`),
3004
3012
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teapot-coding-agent",
3
- "version": "0.37.126",
3
+ "version": "0.37.127",
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",