@agenticmail/claudecode 0.2.3 → 0.2.4
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.
|
@@ -13222,12 +13222,18 @@ var Dispatcher = class {
|
|
|
13222
13222
|
let turnCount = 0;
|
|
13223
13223
|
let lastTool = "";
|
|
13224
13224
|
let lastUsage;
|
|
13225
|
+
const digestedUids = /* @__PURE__ */ new Set();
|
|
13225
13226
|
const observer = {
|
|
13226
13227
|
onMessage: (tag, summary) => {
|
|
13227
13228
|
writeLog(`${tag} ${summary}`);
|
|
13228
13229
|
if (tag === "tool_use") {
|
|
13229
13230
|
lastTool = summary.split(" ")[0];
|
|
13230
13231
|
turnCount++;
|
|
13232
|
+
const m = /read_email\b[^}]*"uid"\s*:\s*(\d+)/.exec(summary);
|
|
13233
|
+
if (m) {
|
|
13234
|
+
const uid = parseInt(m[1], 10);
|
|
13235
|
+
if (Number.isFinite(uid) && uid > 0) digestedUids.add(uid);
|
|
13236
|
+
}
|
|
13231
13237
|
}
|
|
13232
13238
|
if (tag === "usage") lastUsage = summary;
|
|
13233
13239
|
}
|
|
@@ -13267,6 +13273,26 @@ var Dispatcher = class {
|
|
|
13267
13273
|
} finally {
|
|
13268
13274
|
clearInterval(heartbeatHandle);
|
|
13269
13275
|
this.releaseSlot();
|
|
13276
|
+
if (digestedUids.size > 0) {
|
|
13277
|
+
const prefix = `${account.id}::`;
|
|
13278
|
+
for (const [key, entry] of this.wakeCoalesce.entries()) {
|
|
13279
|
+
if (!key.startsWith(prefix)) continue;
|
|
13280
|
+
const before = entry.events.length;
|
|
13281
|
+
entry.events = entry.events.filter((e) => !(typeof e.uid === "number" && digestedUids.has(e.uid)));
|
|
13282
|
+
if (entry.events.length < before) {
|
|
13283
|
+
this.log("info", `[dispatcher] dropped ${before - entry.events.length} queued wake(s) for "${account.name}" \u2014 UIDs already digested this turn`);
|
|
13284
|
+
}
|
|
13285
|
+
if (entry.events.length === 0) {
|
|
13286
|
+
try {
|
|
13287
|
+
clearTimeout(entry.timer);
|
|
13288
|
+
} catch {
|
|
13289
|
+
}
|
|
13290
|
+
this.wakeCoalesce.delete(key);
|
|
13291
|
+
}
|
|
13292
|
+
}
|
|
13293
|
+
const ch = this.channels.get(account.id);
|
|
13294
|
+
if (ch) for (const uid of digestedUids) rememberBounded(ch.seenUids, uid);
|
|
13295
|
+
}
|
|
13270
13296
|
try {
|
|
13271
13297
|
releaseAgentLock();
|
|
13272
13298
|
} catch {
|
package/dist/dispatcher-bin.js
CHANGED
package/dist/dispatcher.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenticmail/claudecode",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Claude Code integration for AgenticMail — surfaces every AgenticMail agent as a native Claude Code subagent so any Claude Code session can delegate to them with the Agent tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|