@adhdev/daemon-standalone 0.8.90 → 0.8.91
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 +17 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/index-Bb3i76KI.js +79 -0
- package/public/index.html +1 -1
- package/public/assets/index-CWAvsU0q.js +0 -79
package/dist/index.js
CHANGED
|
@@ -30418,14 +30418,15 @@ var require_dist2 = __commonJS({
|
|
|
30418
30418
|
return;
|
|
30419
30419
|
}
|
|
30420
30420
|
const startupModal = this.getStartupConfirmationModal(screenText);
|
|
30421
|
-
const modal = this.runParseApproval(tail) || startupModal;
|
|
30422
|
-
const rawScriptStatus = this.runDetectStatus(tail);
|
|
30423
|
-
const scriptStatus = startupModal ? "waiting_approval" : rawScriptStatus;
|
|
30424
30421
|
const parsedTranscript = this.parseCurrentTranscript(
|
|
30425
30422
|
this.committedMessages,
|
|
30426
30423
|
this.responseBuffer,
|
|
30427
30424
|
this.currentTurnScope
|
|
30428
30425
|
);
|
|
30426
|
+
const parsedModal = parsedTranscript?.activeModal && Array.isArray(parsedTranscript.activeModal.buttons) && parsedTranscript.activeModal.buttons.some((button) => typeof button === "string" && button.trim()) ? parsedTranscript.activeModal : null;
|
|
30427
|
+
const modal = this.runParseApproval(tail) || parsedModal || startupModal;
|
|
30428
|
+
const rawScriptStatus = this.runDetectStatus(tail);
|
|
30429
|
+
const scriptStatus = startupModal ? "waiting_approval" : parsedModal && parsedTranscript?.status === "waiting_approval" ? "waiting_approval" : rawScriptStatus;
|
|
30429
30430
|
const parsedMessages = Array.isArray(parsedTranscript?.messages) ? normalizeCliParsedMessages(parsedTranscript.messages, {
|
|
30430
30431
|
committedMessages: this.committedMessages,
|
|
30431
30432
|
scope: this.currentTurnScope,
|
|
@@ -30435,6 +30436,7 @@ var require_dist2 = __commonJS({
|
|
|
30435
30436
|
return;
|
|
30436
30437
|
}
|
|
30437
30438
|
const lastParsedAssistant = [...parsedMessages].reverse().find((message) => message.role === "assistant");
|
|
30439
|
+
const parsedShowsLiveAssistantProgress = parsedTranscript?.status === "generating" && !!lastParsedAssistant && parsedMessages.length > this.committedMessages.length;
|
|
30438
30440
|
const normalizedPromptSnippet = normalizePromptText(this.submitRetryPromptSnippet || this.currentTurnScope?.prompt || "");
|
|
30439
30441
|
this.recordTrace("settled", {
|
|
30440
30442
|
tail: summarizeCliTraceText(tail, 500),
|
|
@@ -30589,7 +30591,7 @@ var require_dist2 = __commonJS({
|
|
|
30589
30591
|
const effectiveScreenText = screenText || this.accumulatedBuffer;
|
|
30590
30592
|
const noActiveTurn = !this.currentTurnScope;
|
|
30591
30593
|
const looksIdleChrome = /(^|\n)\s*[❯›>]\s*(?:\n|$)/m.test(effectiveScreenText) || /accept edits on/i.test(effectiveScreenText) && (/Update available!/i.test(screenText) || /\/effort/i.test(screenText) || /^.*➜\s+\S+/m.test(effectiveScreenText));
|
|
30592
|
-
if (prevStatus === "idle" && !this.isWaitingForResponse && noActiveTurn && !modal && looksIdleChrome) {
|
|
30594
|
+
if (prevStatus === "idle" && !this.isWaitingForResponse && noActiveTurn && !modal && looksIdleChrome && !parsedShowsLiveAssistantProgress) {
|
|
30593
30595
|
return;
|
|
30594
30596
|
}
|
|
30595
30597
|
if (prevStatus === "waiting_approval") {
|
|
@@ -37907,10 +37909,11 @@ ${effect.notification.body || ""}`.trim();
|
|
|
37907
37909
|
const parsedRecord = parsedStatus && typeof parsedStatus === "object" ? parsedStatus : null;
|
|
37908
37910
|
const adapterStatus = adapter.getStatus();
|
|
37909
37911
|
const shouldPreferAdapterMessages = Array.isArray(adapterStatus.messages) && adapterStatus.messages.length > 0 && Array.isArray(parsedRecord?.messages) && adapterStatus.messages.length > parsedRecord.messages.length;
|
|
37912
|
+
const parsedShowsApproval = hasNonEmptyModalButtons(parsedRecord?.activeModal) && parsedRecord?.status === "waiting_approval";
|
|
37910
37913
|
const status = parsedRecord ? {
|
|
37911
37914
|
...parsedRecord,
|
|
37912
37915
|
messages: shouldPreferAdapterMessages ? adapterStatus.messages : parsedRecord.messages,
|
|
37913
|
-
status: adapterStatus.status !== "idle" ? adapterStatus.status : parsedRecord.status || adapterStatus.status,
|
|
37916
|
+
status: parsedShowsApproval ? parsedRecord.status : adapterStatus.status !== "idle" ? adapterStatus.status : parsedRecord.status || adapterStatus.status,
|
|
37914
37917
|
activeModal: parsedRecord.activeModal || adapterStatus.activeModal
|
|
37915
37918
|
} : adapterStatus;
|
|
37916
37919
|
const title = typeof parsedRecord?.title === "string" ? parsedRecord.title : void 0;
|
|
@@ -46030,6 +46033,10 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
46030
46033
|
}
|
|
46031
46034
|
}
|
|
46032
46035
|
onStatusChange() {
|
|
46036
|
+
if (this.deps.p2p?.isConnected) {
|
|
46037
|
+
this.resetP2PHash();
|
|
46038
|
+
this.sendUnifiedStatusReport({ p2pOnly: true, reason: "status-change" }).catch((e) => LOG2.warn("Status", `Immediate P2P status send failed: ${e?.message}`));
|
|
46039
|
+
}
|
|
46033
46040
|
this.throttledReport();
|
|
46034
46041
|
}
|
|
46035
46042
|
throttledReport() {
|
|
@@ -46127,10 +46134,12 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
46127
46134
|
}
|
|
46128
46135
|
async sendUnifiedStatusReport(opts) {
|
|
46129
46136
|
const { serverConn, p2p } = this.deps;
|
|
46130
|
-
|
|
46137
|
+
const serverConnected = !!serverConn?.isConnected();
|
|
46138
|
+
const p2pConnected = !!p2p?.isConnected;
|
|
46139
|
+
if (!serverConnected && !p2pConnected) return;
|
|
46131
46140
|
this.lastStatusSentAt = Date.now();
|
|
46132
46141
|
const now = this.lastStatusSentAt;
|
|
46133
|
-
const target = opts?.p2pOnly ? "P2P" : "P2P+Server";
|
|
46142
|
+
const target = opts?.p2pOnly ? "P2P" : serverConnected ? "P2P+Server" : "P2P";
|
|
46134
46143
|
const allStates = this.deps.instanceManager.collectAllStates();
|
|
46135
46144
|
const ideStates = allStates.filter((s15) => s15.category === "ide");
|
|
46136
46145
|
const cliStates = allStates.filter((s15) => s15.category === "cli");
|
|
@@ -46209,6 +46218,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
46209
46218
|
...wsPayload,
|
|
46210
46219
|
timestamp: void 0
|
|
46211
46220
|
}));
|
|
46221
|
+
if (!serverConnected || !serverConn) return;
|
|
46212
46222
|
if (!opts?.forceServer && wsHash === this.lastServerStatusHash) {
|
|
46213
46223
|
LOG2.debug("Server", `skip duplicate status_report${opts?.reason ? ` (${opts.reason})` : ""}`);
|
|
46214
46224
|
return;
|