@adhdev/daemon-standalone 1.0.44 → 1.0.45-rc.1
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.
package/dist/index.js
CHANGED
|
@@ -36556,10 +36556,10 @@ var require_dist3 = __commonJS({
|
|
|
36556
36556
|
}
|
|
36557
36557
|
function getDaemonBuildInfo() {
|
|
36558
36558
|
if (cached2) return cached2;
|
|
36559
|
-
const commit = readInjected(true ? "
|
|
36560
|
-
const commitShort = readInjected(true ? "
|
|
36561
|
-
const version2 = readInjected(true ? "1.0.
|
|
36562
|
-
const builtAt = readInjected(true ? "2026-08-
|
|
36559
|
+
const commit = readInjected(true ? "c17f2078df64faf3fb3169a6e2af8e6e79f85562" : void 0) ?? "unknown";
|
|
36560
|
+
const commitShort = readInjected(true ? "c17f207" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
36561
|
+
const version2 = readInjected(true ? "1.0.45-rc.1" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
36562
|
+
const builtAt = readInjected(true ? "2026-08-11T13:37:11.714Z" : void 0);
|
|
36563
36563
|
cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
|
|
36564
36564
|
return cached2;
|
|
36565
36565
|
}
|
|
@@ -37817,7 +37817,7 @@ var require_dist3 = __commonJS({
|
|
|
37817
37817
|
}
|
|
37818
37818
|
});
|
|
37819
37819
|
function resolveBuildTrack(env2 = process.env) {
|
|
37820
|
-
const injected = true ? "" : void 0;
|
|
37820
|
+
const injected = true ? "preview" : void 0;
|
|
37821
37821
|
const stamped = typeof injected === "string" ? injected.trim() : "";
|
|
37822
37822
|
const raw = (stamped || (env2[BUILD_CHANNEL_ENV_VAR] ?? "").trim()).toLowerCase();
|
|
37823
37823
|
return raw === "preview" || raw === "next" ? "preview" : "stable";
|
|
@@ -97630,6 +97630,46 @@ ${buttons.join("\n")}`;
|
|
|
97630
97630
|
host.pushEvent({ event: me.type, agentKey: me.agentKey, message: me.message, elapsedSec: me.elapsedSec, timestamp: me.timestamp });
|
|
97631
97631
|
}
|
|
97632
97632
|
}
|
|
97633
|
+
init_contracts2();
|
|
97634
|
+
var MAX_TRACKED_MESSAGES = 2e3;
|
|
97635
|
+
function hasUsableTimestamp(message) {
|
|
97636
|
+
const value = Number(message.receivedAt || message.timestamp || 0);
|
|
97637
|
+
return Number.isFinite(value) && value > 0;
|
|
97638
|
+
}
|
|
97639
|
+
var ParsedIngestTimestampStamper = class {
|
|
97640
|
+
firstSeenAtByKey = /* @__PURE__ */ new Map();
|
|
97641
|
+
stamp(messages, nowMs = Date.now()) {
|
|
97642
|
+
return messages.map((message) => {
|
|
97643
|
+
if (!message || hasUsableTimestamp(message)) return message;
|
|
97644
|
+
const key2 = this.keyFor(message);
|
|
97645
|
+
let firstSeenAt = this.firstSeenAtByKey.get(key2);
|
|
97646
|
+
if (firstSeenAt === void 0) {
|
|
97647
|
+
firstSeenAt = nowMs;
|
|
97648
|
+
this.remember(key2, firstSeenAt);
|
|
97649
|
+
}
|
|
97650
|
+
return { ...message, receivedAt: firstSeenAt };
|
|
97651
|
+
});
|
|
97652
|
+
}
|
|
97653
|
+
keyFor(message) {
|
|
97654
|
+
const role = typeof message.role === "string" ? message.role.trim().toLowerCase() : "";
|
|
97655
|
+
const kind = typeof message.kind === "string" ? message.kind.trim().toLowerCase() : "";
|
|
97656
|
+
let text = "";
|
|
97657
|
+
try {
|
|
97658
|
+
text = flattenContent(message.content);
|
|
97659
|
+
} catch {
|
|
97660
|
+
text = String(message.content ?? "");
|
|
97661
|
+
}
|
|
97662
|
+
return `${role}|${kind}|${text.replace(/\s+/g, " ").trim()}`;
|
|
97663
|
+
}
|
|
97664
|
+
remember(key2, firstSeenAt) {
|
|
97665
|
+
this.firstSeenAtByKey.set(key2, firstSeenAt);
|
|
97666
|
+
while (this.firstSeenAtByKey.size > MAX_TRACKED_MESSAGES) {
|
|
97667
|
+
const oldest = this.firstSeenAtByKey.keys().next();
|
|
97668
|
+
if (oldest.done) break;
|
|
97669
|
+
this.firstSeenAtByKey.delete(oldest.value);
|
|
97670
|
+
}
|
|
97671
|
+
}
|
|
97672
|
+
};
|
|
97633
97673
|
init_auto_approve_modes();
|
|
97634
97674
|
var CliProviderInstance = class _CliProviderInstance {
|
|
97635
97675
|
constructor(provider, workingDir, cliArgs = [], instanceId, transportFactory, options) {
|
|
@@ -98014,6 +98054,11 @@ ${buttons.join("\n")}`;
|
|
|
98014
98054
|
appliedEffectKeys = /* @__PURE__ */ new Set();
|
|
98015
98055
|
historyWriter;
|
|
98016
98056
|
runtimeMessages = [];
|
|
98057
|
+
// INGEST-TIMESTAMP: stamps untimed provider-parsed messages with their
|
|
98058
|
+
// first-observed time so mergeConversationMessages can interleave the
|
|
98059
|
+
// timestamped runtime user-input ack by clock instead of pinning it after
|
|
98060
|
+
// every parsed message (the "user bubble stuck at the bottom" defect).
|
|
98061
|
+
parsedIngestTimestamps = new ParsedIngestTimestampStamper();
|
|
98017
98062
|
lastPersistedHistoryMessages = [];
|
|
98018
98063
|
lastAcknowledgedUserInputAt = 0;
|
|
98019
98064
|
// TASKBUBBLE-DUP: per-content last-ack timestamps so the same dispatched
|
|
@@ -98192,7 +98237,7 @@ ${buttons.join("\n")}`;
|
|
|
98192
98237
|
if (historyMessageCount !== null) {
|
|
98193
98238
|
parsedMessages = historyMessageCount > 0 ? parsedMessages.slice(-historyMessageCount) : [];
|
|
98194
98239
|
}
|
|
98195
|
-
const mergedMessages = mergeConversationMessages(this.runtimeMessages, parsedMessages);
|
|
98240
|
+
const mergedMessages = mergeConversationMessages(this.runtimeMessages, this.parsedIngestTimestamps.stamp(parsedMessages));
|
|
98196
98241
|
const canonicalBackedHistory = this.shouldHydrateExistingProviderHistory() ? this.syncCanonicalSavedHistoryIfNeeded() : false;
|
|
98197
98242
|
const statusMessages = canonicalBackedHistory && this.lastPersistedHistoryMessages.length > 0 ? this.lastPersistedHistoryMessages.map((message) => ({
|
|
98198
98243
|
role: message.role,
|
|
@@ -100273,7 +100318,7 @@ ${buttons.join("\n")}`;
|
|
|
100273
100318
|
}
|
|
100274
100319
|
}
|
|
100275
100320
|
mergeRuntimeChatMessages(parsedMessages) {
|
|
100276
|
-
return mergeConversationMessages(this.runtimeMessages, parsedMessages);
|
|
100321
|
+
return mergeConversationMessages(this.runtimeMessages, this.parsedIngestTimestamps.stamp(parsedMessages));
|
|
100277
100322
|
}
|
|
100278
100323
|
promoteProviderSessionId(sessionId, opts = {}) {
|
|
100279
100324
|
const nextSessionId = String(sessionId || "").trim();
|