teapot-coding-agent 0.37.124 → 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.
@@ -725,7 +725,7 @@ export class Agent {
725
725
  await this.log.append("system_note", this.currentSession, this.currentBranch, {
726
726
  event: "unfinished-tools-closed",
727
727
  count: seen.size,
728
- detail: "a restart left these tool calls without a result; they are marked not completed (#54)",
728
+ detail: "a restart left these tool calls without a result; they are marked not completed",
729
729
  });
730
730
  }
731
731
  get goalFile() {
@@ -1447,7 +1447,7 @@ export class Agent {
1447
1447
  await this.log.append("system_note", this.currentSession, this.currentBranch, {
1448
1448
  event: "audit-retry-cap",
1449
1449
  rejects: this.consecutiveAuditRejects,
1450
- detail: "the completion audit rejected the same goal repeatedly ? stopping to avoid an unbounded retry loop (#128)",
1450
+ detail: "the completion audit rejected the same goal repeatedly ? stopping to avoid an unbounded retry loop",
1451
1451
  });
1452
1452
  this.consecutiveAuditRejects = 0;
1453
1453
  break;
@@ -1503,9 +1503,8 @@ export class Agent {
1503
1503
  event: "context-claim-answered",
1504
1504
  attempt: this.contextClaimNudges,
1505
1505
  via: "stop",
1506
- detail: "the agent stopped blaming its remaining capacity — the harness compacted and answered with the measured window plus a fresh-perspective instruction (#201)",
1506
+ detail: "the agent stopped blaming its remaining capacity — answered with the measured window plus a fresh-perspective instruction; auto-compaction handles the window on its own",
1507
1507
  });
1508
- await this.maybeCompact(true);
1509
1508
  const msg = this.contextClaimAnswer("stop");
1510
1509
  await this.log.append("prompt", this.currentSession, this.currentBranch, {
1511
1510
  source: "harness",
@@ -1532,7 +1531,7 @@ export class Agent {
1532
1531
  if (this.progressRequestedThisRound) {
1533
1532
  await this.log.append("system_note", this.currentSession, this.currentBranch, {
1534
1533
  event: "auto-continue-suppressed",
1535
- detail: "a progress report was already requested this round (#95) — the round that carried it already continues the work, so no nudge is added and the loop goes on",
1534
+ detail: "a progress report was already requested this round — the round that carried it already continues the work, so no nudge is added and the loop goes on",
1536
1535
  });
1537
1536
  this.progressRequestedThisRound = false;
1538
1537
  continue;
@@ -1647,9 +1646,8 @@ export class Agent {
1647
1646
  event: "context-claim-answered",
1648
1647
  attempt: this.contextClaimNudges,
1649
1648
  via: "finish",
1650
- detail: "a finish(goalComplete=false) blamed the context window — refused, compacted, and told to continue (#201)",
1649
+ detail: "a finish(goalComplete=false) blamed the context window — refused and told to continue; auto-compaction handles the window on its own",
1651
1650
  });
1652
- await this.maybeCompact(true);
1653
1651
  const msg = this.contextClaimAnswer("finish");
1654
1652
  /**
1655
1653
  * Answer the tool call FIRST — in the log as well as in memory.
@@ -1685,7 +1683,7 @@ export class Agent {
1685
1683
  this.blockerAsks += 1;
1686
1684
  await this.log.append("system_note", this.currentSession, this.currentBranch, {
1687
1685
  event: "finish-without-blocker",
1688
- detail: "finish(goalComplete=false) named no blocker while the harness saw none either — asked for one instead of ending the round (#200)",
1686
+ detail: "finish(goalComplete=false) named no blocker while the harness saw none either — asked for one instead of ending the round",
1689
1687
  });
1690
1688
  const msg = this.harnessMessage(`[harness] That finish() was refused: its summary names no blocker, and ` +
1691
1689
  `nothing in the harness agrees with one — the context window above is measured, compaction is ` +
@@ -2509,7 +2507,7 @@ export class Agent {
2509
2507
  await this.log.append("system_note", this.currentSession, this.currentBranch, {
2510
2508
  event: "audit-unavailable-cap",
2511
2509
  attempts: this.auditUnavailableStreak,
2512
- detail: "the completion audit could not produce a verdict repeatedly — stopping so the operator decides (#128)",
2510
+ detail: "the completion audit could not produce a verdict repeatedly — stopping so the operator decides",
2513
2511
  });
2514
2512
  await this.captureRecentTurns();
2515
2513
  return;
@@ -2575,7 +2573,7 @@ export class Agent {
2575
2573
  await this.log.append("system_note", this.currentSession, this.currentBranch, {
2576
2574
  event: "audit-unavailable-cap",
2577
2575
  attempts: this.auditUnavailableStreak,
2578
- detail: "the completion audit could not produce a verdict repeatedly — stopping so the operator decides (#128)",
2576
+ detail: "the completion audit could not produce a verdict repeatedly — stopping so the operator decides",
2579
2577
  });
2580
2578
  await this.captureRecentTurns();
2581
2579
  return;
@@ -2978,6 +2976,34 @@ export class Agent {
2978
2976
  catch {
2979
2977
  }
2980
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
+ }
2981
3007
  if (this.recentReads.length && mode === "summarize") {
2982
3008
  const restored = [];
2983
3009
  const restoredPaths = new Set();
@@ -45,5 +45,9 @@ export function turnAnchor(args) {
45
45
  if (gap >= 3_000)
46
46
  parts.push(`${shortDuration(gap)} since the last turn`);
47
47
  }
48
- return `[harness] ${parts.join(" · ")}`;
48
+ /**
49
+ * `now 21:09` rather than a bare `21:09` — reported as "21:09 がいきなり出されても意味不明". A timestamp with no
50
+ * label is a number in a sentence; the label is three characters.
51
+ */
52
+ return `[harness] now ${parts.join(" · ")}`;
49
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teapot-coding-agent",
3
- "version": "0.37.124",
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",
@@ -46,7 +46,8 @@
46
46
  "test:portable": "node scripts/run-portable-tests.ts",
47
47
  "test:clean": "node scripts/clean-test-tmp.ts --apply",
48
48
  "test:tmp": "node scripts/clean-test-tmp.ts",
49
- "release:wait": "node scripts/wait-npm-version.ts"
49
+ "release:wait": "node scripts/wait-npm-version.ts",
50
+ "pre-release": "pnpm typecheck && pnpm typecheck-web && pnpm typecheck:scripts && pnpm lint && pnpm build && pnpm test && pnpm test:portable && node scripts/smoke-web.ts"
50
51
  },
51
52
  "dependencies": {
52
53
  "@hono/node-server": "^2.1.4",