teapot-coding-agent 0.37.125 → 0.37.126

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.
@@ -2976,6 +2976,34 @@ export class Agent {
2976
2976
  catch {
2977
2977
  }
2978
2978
  }
2979
+ /**
2980
+ * The GOAL and the open TODO list, re-attached as facts — not left to the summary.
2981
+ *
2982
+ * memory/files/AGENTS.md were re-attached, but the two things that actually drive the work were only implied
2983
+ * by the checkpoint the summarizer wrote. If that summary omits or paraphrases the goal, the agent drifts; and
2984
+ * the TODO list is the only copy of what is left. Reported as "compact後にアクティブなgoalとかTODOリストを再入
2985
+ * とかしてる? それしないと見失いそうだけど (TODOは更新せずに作業終わることがあるからなんとも言えないけど)".
2986
+ *
2987
+ * Only what's open is shown: a done item is noise after a compaction.
2988
+ */
2989
+ {
2990
+ const open = this.todo
2991
+ .split("\n")
2992
+ .filter((l) => /^\s*-\s*\[\s\]/.test(l))
2993
+ .slice(0, 40);
2994
+ const goalText = this.goal.text.trim();
2995
+ if (goalText || open.length) {
2996
+ this.messages.splice(1, 0, {
2997
+ role: "user",
2998
+ content: `[harness] Your goal and open tasks, re-attached after compaction:\n` +
2999
+ `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` +
3002
+ `Update the list as you finish work (set_todo), so this list and reality cannot drift.`
3003
+ : `no task is open in todo.md right now — if work remains, write it there`),
3004
+ });
3005
+ }
3006
+ }
2979
3007
  if (this.recentReads.length && mode === "summarize") {
2980
3008
  const restored = [];
2981
3009
  const restoredPaths = new Set();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teapot-coding-agent",
3
- "version": "0.37.125",
3
+ "version": "0.37.126",
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",