teapot-coding-agent 0.37.50 → 0.37.51

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.
@@ -933,14 +933,6 @@ export class Agent {
933
933
  // `needs_operator` snapshot reported `live: false` until this was added.
934
934
  this.status === "needs_operator");
935
935
  }
936
- /**
937
- * Is this agent doing in-flight work that a WAITER (wait_children) should
938
- * hold for? Deliberately narrower than isLive(): queued prompts are DORMANT
939
- * work (a stopped/idle child touches them only after it is started), so
940
- * they must not keep a parent parked on a child that is visibly idle —
941
- * that wait would hang. isLive() answers "stop vs start" (#59/#133); this
942
- * answers "is work in flight".
943
- */
944
936
  /**
945
937
  * The text of every prompt still waiting for a turn boundary.
946
938
  *
@@ -951,6 +943,14 @@ export class Agent {
951
943
  pendingPromptTexts() {
952
944
  return this.pendingPrompts.map((p) => p.text);
953
945
  }
946
+ /**
947
+ * Is this agent doing in-flight work that a WAITER (wait_children) should
948
+ * hold for? Deliberately narrower than isLive(): queued prompts are DORMANT
949
+ * work (a stopped/idle child touches them only after it is started), so
950
+ * they must not keep a parent parked on a child that is visibly idle —
951
+ * that wait would hang. isLive() answers "stop vs start" (#59/#133); this
952
+ * answers "is work in flight".
953
+ */
954
954
  isBusy() {
955
955
  if (this.stopRequested)
956
956
  return false;
@@ -1080,11 +1080,6 @@ export class Agent {
1080
1080
  bus.emit("update", { kind: "agent-update", agentId: this.opts.id });
1081
1081
  }
1082
1082
  }
1083
- /**
1084
- * Restore the conversation from the JSONL log exactly once, on demand.
1085
- * Everything that touches history (prompts, start, fork, UI selection)
1086
- * funnels through here; boot stays cheap no matter how many sessions exist.
1087
- */
1088
1083
  /**
1089
1084
  * Resolve the session/workspace this agent operates on.
1090
1085
  *
@@ -1255,16 +1250,6 @@ export class Agent {
1255
1250
  /* keep the session copy if the agent-wide write failed — losing notes is worse */
1256
1251
  }
1257
1252
  }
1258
- /**
1259
- * Rebuild the in-memory conversation from the JSONL event log so a restart
1260
- * continues where the agent left off instead of starting blank.
1261
- *
1262
- * Strategy: find the most recent event overall (its branch is where the
1263
- * agent was), walk the `parent` chain backwards (crossing fork points),
1264
- * then replay events forward into ChatMessages. Meta-tool calls
1265
- * (finish / report_progress) never produced logged tool results, so we
1266
- * synthesize their responses to keep the message sequence valid.
1267
- */
1268
1253
  /**
1269
1254
  * Resolve a leading sub_fork header: load the parent session's file (and
1270
1255
  * recurse if THAT one is itself a sub_fork), take its lineage up to the
@@ -1306,6 +1291,17 @@ export class Agent {
1306
1291
  prefix.shift();
1307
1292
  return [...prefix, ...own.filter((e) => e !== header)];
1308
1293
  }
1294
+ /**
1295
+ * Restore the conversation from the JSONL log exactly once, on demand.
1296
+ * Everything that touches history (prompts, start, fork, UI selection)
1297
+ * funnels through here; boot stays cheap no matter how many sessions exist.
1298
+ *
1299
+ * Strategy: find the most recent event overall (its branch is where the
1300
+ * agent was), walk the `parent` chain backwards (crossing fork points),
1301
+ * then replay events forward into ChatMessages. Meta-tool calls
1302
+ * (finish / report_progress) never produced logged tool results, so we
1303
+ * synthesize their responses to keep the message sequence valid.
1304
+ */
1309
1305
  async restoreFromLog() {
1310
1306
  const own = await readEvents(this.log.filePath);
1311
1307
  if (own.length === 0)
@@ -1620,14 +1616,6 @@ export class Agent {
1620
1616
  await fs.writeFile(this.todoFile, text, "utf8");
1621
1617
  await this.log.append("todo", this.currentSession, this.currentBranch, { event: "set", by });
1622
1618
  }
1623
- /**
1624
- * Update SPECIFIC checkbox items without rewriting the whole list — the
1625
- * full-replacement path made agents lazy (a mid-task progress tick meant
1626
- * re-emitting the entire markdown, so they skipped updates) and risky (one
1627
- * sloppy regeneration mangled unrelated sections). Items are matched by
1628
- * normalized text; unknown items are reported back instead of silently
1629
- * dropped. Returns a short human-readable summary for the tool result.
1630
- */
1631
1619
  /**
1632
1620
  * Apply surgical changes to todo.md.
1633
1621
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teapot-coding-agent",
3
- "version": "0.37.50",
3
+ "version": "0.37.51",
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",