teapot-coding-agent 0.37.167 → 0.37.168

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.
@@ -1340,6 +1340,15 @@ export class Agent {
1340
1340
  : `h${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`);
1341
1341
  const entry = { source, text, images, id: promptId };
1342
1342
  this.pendingPrompts.push(entry);
1343
+ /**
1344
+ * Recorded on the LOGGED prompt event, because the row's label must not depend on timing.
1345
+ *
1346
+ * The client cannot tell "waiting behind a turn" from "about to start in 3ms": both look like "enqueued, no delivery
1347
+ * note yet". MEASURED as the report that survived three releases — "idleやwaitingからプロンプト送ると一瞬キューに
1348
+ * なってる". The queue position is known HERE, synchronously, before the append and before `start()`; putting it in the
1349
+ * event makes the row's label a fact instead of an inference.
1350
+ */
1351
+ const aheadAtEnqueue = this.pendingAheadOf(promptId);
1343
1352
  void this.ensureReady()
1344
1353
  .then(async () => {
1345
1354
  /**
@@ -1358,6 +1367,7 @@ export class Agent {
1358
1367
  text,
1359
1368
  ...(stored?.length ? { images: stored } : {}),
1360
1369
  ...(promptId ? { promptId } : {}),
1370
+ ahead: aheadAtEnqueue,
1361
1371
  });
1362
1372
  })
1363
1373
  .then(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teapot-coding-agent",
3
- "version": "0.37.167",
3
+ "version": "0.37.168",
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",