@adhdev/daemon-core 0.8.33 → 0.8.35
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.d.ts +1 -1
- package/dist/index.js +127 -102
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +127 -102
- package/dist/index.mjs.map +1 -1
- package/dist/shared-types.d.ts +38 -0
- package/dist/status/reporter.d.ts +3 -0
- package/node_modules/@adhdev/session-host-core/package.json +1 -1
- package/package.json +1 -1
- package/src/agent-stream/forward.d.ts +8 -0
- package/src/agent-stream/index.d.ts +6 -0
- package/src/agent-stream/manager.d.ts +60 -0
- package/src/agent-stream/poller.d.ts +41 -0
- package/src/agent-stream/provider-adapter.d.ts +36 -0
- package/src/agent-stream/types.d.ts +68 -0
- package/src/boot/daemon-lifecycle.d.ts +100 -0
- package/src/cdp/devtools.d.ts +51 -0
- package/src/cdp/initializer.d.ts +50 -0
- package/src/cdp/manager.d.ts +147 -0
- package/src/cdp/scanner.d.ts +58 -0
- package/src/cdp/setup.d.ts +58 -0
- package/src/cli-adapter-types.d.ts +57 -0
- package/src/cli-adapters/provider-cli-adapter.d.ts +177 -0
- package/src/cli-adapters/provider-cli-adapter.ts +115 -91
- package/src/cli-adapters/provider-cli-config.d.ts +30 -0
- package/src/cli-adapters/provider-cli-parse.d.ts +42 -0
- package/src/cli-adapters/provider-cli-runtime.d.ts +29 -0
- package/src/cli-adapters/provider-cli-shared.d.ts +158 -0
- package/src/cli-adapters/pty-transport.d.ts +48 -0
- package/src/cli-adapters/session-host-transport.d.ts +20 -0
- package/src/cli-adapters/spawn-env.d.ts +8 -0
- package/src/cli-adapters/terminal-backends/ghostty-vt-backend.d.ts +16 -0
- package/src/cli-adapters/terminal-backends/types.d.ts +18 -0
- package/src/cli-adapters/terminal-backends/xterm-backend.d.ts +17 -0
- package/src/cli-adapters/terminal-screen.d.ts +33 -0
- package/src/commands/cdp-commands.d.ts +15 -0
- package/src/commands/chat-commands.d.ts +15 -0
- package/src/commands/cli-manager.d.ts +94 -0
- package/src/commands/handler.d.ts +103 -0
- package/src/commands/router.d.ts +98 -0
- package/src/commands/stream-commands.d.ts +14 -0
- package/src/commands/upgrade-helper.d.ts +10 -0
- package/src/commands/workspace-commands.d.ts +11 -0
- package/src/config/chat-history.d.ts +99 -0
- package/src/config/config.d.ts +14 -0
- package/src/config/recent-activity.d.ts +29 -0
- package/src/config/saved-sessions.d.ts +22 -0
- package/src/config/state-store.d.ts +32 -0
- package/src/config/workspaces.d.ts +0 -1
- package/src/daemon/dev-auto-implement.d.ts +43 -0
- package/src/daemon/dev-cdp-handlers.d.ts +22 -0
- package/src/daemon/dev-cli-debug.d.ts +106 -0
- package/src/daemon/dev-server-types.d.ts +43 -0
- package/src/daemon/dev-server.d.ts +140 -0
- package/src/daemon/scaffold-template.d.ts +32 -0
- package/src/daemon-core.d.ts +36 -0
- package/src/detection/cli-detector.d.ts +31 -0
- package/src/detection/ide-detector.d.ts +35 -0
- package/src/index.d.ts +83 -0
- package/src/index.ts +2 -0
- package/src/installer.d.ts +50 -0
- package/src/ipc-protocol.d.ts +111 -0
- package/src/launch.d.ts +46 -0
- package/src/logging/command-log.d.ts +31 -0
- package/src/logging/logger.d.ts +89 -0
- package/src/providers/acp-provider-instance.d.ts +102 -0
- package/src/providers/approval-utils.d.ts +7 -0
- package/src/providers/cli-provider-instance.d.ts +86 -0
- package/src/providers/contracts.d.ts +193 -1
- package/src/providers/control-effects.d.ts +4 -0
- package/src/providers/extension-provider-instance.d.ts +61 -0
- package/src/providers/ide-provider-instance.d.ts +70 -0
- package/src/providers/provider-instance-manager.d.ts +84 -0
- package/src/providers/provider-instance.d.ts +7 -1
- package/src/providers/provider-loader.d.ts +299 -0
- package/src/providers/status-monitor.d.ts +48 -0
- package/src/providers/version-archive.d.ts +52 -0
- package/src/session-host/runtime-support.d.ts +8 -0
- package/src/sessions/reconcile.d.ts +22 -0
- package/src/sessions/registry.d.ts +24 -0
- package/src/shared-types-extra.d.ts +29 -0
- package/src/shared-types.d.ts +79 -22
- package/src/shared-types.ts +40 -0
- package/src/status/builders.d.ts +33 -0
- package/src/status/reporter.d.ts +69 -0
- package/src/status/reporter.ts +16 -13
- package/src/status/snapshot.d.ts +58 -0
- package/src/system/host-memory.d.ts +19 -0
- package/src/types.d.ts +3 -7
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Core logic for daemon: CDP, Provider, IDE detection, CLI/ACP adapters and more.
|
|
5
5
|
*/
|
|
6
6
|
export type { ChatMessage, ExtensionInfo, CommandResult as CoreCommandResult, ProviderConfig, DaemonEvent, StatusResponse, SystemInfo, DetectedIde, ProviderInfo, AgentEntry, } from './types.js';
|
|
7
|
-
export type { SessionEntry, SessionTransport, SessionKind, SessionCapability, AgentSessionStream, AvailableProviderInfo, AcpConfigOption, AcpMode, ProviderControlSchema, StatusReportPayload, MachineInfo, DetectedIdeInfo, WorkspaceEntry, ProviderStatus, ProviderErrorReason, ActiveChatData, IdeProviderState, CliProviderState, AcpProviderState, ExtensionProviderState, } from './shared-types.js';
|
|
7
|
+
export type { SessionEntry, CompactSessionEntry, CompactDaemonEntry, SessionTransport, SessionKind, SessionCapability, AgentSessionStream, AvailableProviderInfo, AcpConfigOption, AcpMode, ProviderControlSchema, StatusReportPayload, MachineInfo, DetectedIdeInfo, WorkspaceEntry, ProviderStatus, ProviderErrorReason, ActiveChatData, IdeProviderState, CliProviderState, AcpProviderState, ExtensionProviderState, } from './shared-types.js';
|
|
8
8
|
import type { RuntimeWriteOwner as _RuntimeWriteOwner } from './shared-types-extra.js';
|
|
9
9
|
import type { RuntimeAttachedClient as _RuntimeAttachedClient } from './shared-types-extra.js';
|
|
10
10
|
import type { RecentLaunchEntry as _RecentLaunchEntry } from './shared-types.js';
|
package/dist/index.js
CHANGED
|
@@ -2488,8 +2488,6 @@ ${data.message || ""}`.trim();
|
|
|
2488
2488
|
if (blockingModal || this.currentStatus === "waiting_approval") {
|
|
2489
2489
|
throw new Error(`${this.cliName} is awaiting confirmation before it can accept a prompt`);
|
|
2490
2490
|
}
|
|
2491
|
-
this.committedMessages.push({ role: "user", content: text, timestamp: Date.now() });
|
|
2492
|
-
this.syncMessageViews();
|
|
2493
2491
|
this.isWaitingForResponse = true;
|
|
2494
2492
|
this.responseBuffer = "";
|
|
2495
2493
|
this.finishRetryCount = 0;
|
|
@@ -2521,6 +2519,13 @@ ${data.message || ""}`.trim();
|
|
|
2521
2519
|
const submitDelayMs = this.sendDelayMs + Math.min(2e3, Math.max(0, estimatedLines - 1) * 350);
|
|
2522
2520
|
const maxEchoWaitMs = submitDelayMs + Math.max(1500, Math.min(5e3, estimatedLines * 500));
|
|
2523
2521
|
const retryDelayMs = Math.max(350, Math.min(1500, Math.max(this.sendDelayMs, submitDelayMs)));
|
|
2522
|
+
let didCommitUserTurn = false;
|
|
2523
|
+
const commitUserTurn = () => {
|
|
2524
|
+
if (didCommitUserTurn) return;
|
|
2525
|
+
didCommitUserTurn = true;
|
|
2526
|
+
this.committedMessages.push({ role: "user", content: text, timestamp: Date.now() });
|
|
2527
|
+
this.syncMessageViews();
|
|
2528
|
+
};
|
|
2524
2529
|
if (this.settleTimer) {
|
|
2525
2530
|
clearTimeout(this.settleTimer);
|
|
2526
2531
|
this.settleTimer = null;
|
|
@@ -2533,109 +2538,128 @@ ${data.message || ""}`.trim();
|
|
|
2533
2538
|
if (this.isWaitingForResponse) this.finishResponse();
|
|
2534
2539
|
}, this.timeouts.maxResponse);
|
|
2535
2540
|
};
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2541
|
+
await new Promise((resolve12) => {
|
|
2542
|
+
let resolved = false;
|
|
2543
|
+
const resolveOnce = () => {
|
|
2544
|
+
if (resolved) return;
|
|
2545
|
+
resolved = true;
|
|
2546
|
+
resolve12();
|
|
2547
|
+
};
|
|
2548
|
+
const submit = () => {
|
|
2549
|
+
if (!this.ptyProcess) {
|
|
2550
|
+
resolveOnce();
|
|
2551
|
+
return;
|
|
2552
|
+
}
|
|
2553
|
+
commitUserTurn();
|
|
2554
|
+
this.submitPendingUntil = 0;
|
|
2550
2555
|
const screenText = this.terminalScreen.getText();
|
|
2551
|
-
if (!promptLikelyVisible(screenText, normalizedPromptSnippet)) return;
|
|
2552
|
-
if (/Esc to interrupt|Do you want to proceed|This command requires approval|Allow Codex to|Approve and run now|Always approve this session|Running…|Running\.\.\./i.test(screenText)) return;
|
|
2553
|
-
this.responseSettleIgnoreUntil = Date.now() + this.timeouts.outputSettle + 400;
|
|
2554
|
-
LOG.info("CLI", `[${this.cliType}] Retrying submit key for stuck prompt (attempt ${attempt})`);
|
|
2555
2556
|
this.recordTrace("submit_write", {
|
|
2556
|
-
mode: "
|
|
2557
|
-
attempt,
|
|
2557
|
+
mode: "submit_key",
|
|
2558
2558
|
sendKey: this.sendKey,
|
|
2559
2559
|
screenText: summarizeCliTraceText(screenText, 500)
|
|
2560
2560
|
});
|
|
2561
2561
|
this.ptyProcess.write(this.sendKey);
|
|
2562
|
-
|
|
2563
|
-
this.
|
|
2564
|
-
return;
|
|
2565
|
-
|
|
2566
|
-
|
|
2562
|
+
const retrySubmitIfStuck = (attempt) => {
|
|
2563
|
+
this.submitRetryTimer = null;
|
|
2564
|
+
if (!this.ptyProcess || !this.isWaitingForResponse || this.submitRetryUsed) return;
|
|
2565
|
+
if (this.currentStatus === "waiting_approval") return;
|
|
2566
|
+
if ((this.responseBuffer || "").trim()) return;
|
|
2567
|
+
const screenText2 = this.terminalScreen.getText();
|
|
2568
|
+
if (!promptLikelyVisible(screenText2, normalizedPromptSnippet)) return;
|
|
2569
|
+
if (/Esc to interrupt|Do you want to proceed|This command requires approval|Allow Codex to|Approve and run now|Always approve this session|Running…|Running\.\.\./i.test(screenText2)) return;
|
|
2570
|
+
this.responseSettleIgnoreUntil = Date.now() + this.timeouts.outputSettle + 400;
|
|
2571
|
+
LOG.info("CLI", `[${this.cliType}] Retrying submit key for stuck prompt (attempt ${attempt})`);
|
|
2572
|
+
this.recordTrace("submit_write", {
|
|
2573
|
+
mode: "submit_retry",
|
|
2574
|
+
attempt,
|
|
2575
|
+
sendKey: this.sendKey,
|
|
2576
|
+
screenText: summarizeCliTraceText(screenText2, 500)
|
|
2577
|
+
});
|
|
2578
|
+
this.ptyProcess.write(this.sendKey);
|
|
2579
|
+
if (attempt >= 3) {
|
|
2580
|
+
this.submitRetryUsed = true;
|
|
2581
|
+
return;
|
|
2582
|
+
}
|
|
2583
|
+
this.submitRetryTimer = setTimeout(() => retrySubmitIfStuck(attempt + 1), retryDelayMs);
|
|
2584
|
+
};
|
|
2585
|
+
this.submitRetryTimer = setTimeout(() => retrySubmitIfStuck(1), retryDelayMs);
|
|
2586
|
+
startResponseTimeout();
|
|
2587
|
+
resolveOnce();
|
|
2567
2588
|
};
|
|
2568
|
-
this.
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2589
|
+
if (this.submitStrategy === "immediate") {
|
|
2590
|
+
commitUserTurn();
|
|
2591
|
+
this.submitPendingUntil = 0;
|
|
2592
|
+
this.recordTrace("submit_write", {
|
|
2593
|
+
mode: "immediate",
|
|
2594
|
+
text: summarizeCliTraceText(text, 500),
|
|
2595
|
+
sendKey: this.sendKey,
|
|
2596
|
+
screenText: summarizeCliTraceText(this.terminalScreen.getText(), 500)
|
|
2597
|
+
});
|
|
2598
|
+
this.ptyProcess.write(text + this.sendKey);
|
|
2599
|
+
this.submitRetryTimer = setTimeout(() => {
|
|
2600
|
+
this.submitRetryTimer = null;
|
|
2601
|
+
if (!this.ptyProcess || !this.isWaitingForResponse || this.submitRetryUsed) return;
|
|
2602
|
+
if (this.currentStatus === "waiting_approval") return;
|
|
2603
|
+
if ((this.responseBuffer || "").trim()) return;
|
|
2604
|
+
const screenText = this.terminalScreen.getText();
|
|
2605
|
+
if (!promptLikelyVisible(screenText, normalizedPromptSnippet)) return;
|
|
2606
|
+
LOG.info("CLI", `[${this.cliType}] Retrying submit key for stuck prompt (attempt 1)`);
|
|
2607
|
+
this.responseSettleIgnoreUntil = Date.now() + this.timeouts.outputSettle + 400;
|
|
2608
|
+
this.recordTrace("submit_write", {
|
|
2609
|
+
mode: "immediate_retry",
|
|
2610
|
+
attempt: 1,
|
|
2611
|
+
sendKey: this.sendKey,
|
|
2612
|
+
screenText: summarizeCliTraceText(screenText, 500)
|
|
2613
|
+
});
|
|
2614
|
+
this.ptyProcess.write(this.sendKey);
|
|
2615
|
+
this.submitRetryUsed = true;
|
|
2616
|
+
}, retryDelayMs);
|
|
2617
|
+
startResponseTimeout();
|
|
2618
|
+
resolveOnce();
|
|
2619
|
+
return;
|
|
2620
|
+
}
|
|
2621
|
+
if (submitDelayMs > 0) {
|
|
2622
|
+
this.submitPendingUntil = Date.now() + submitDelayMs;
|
|
2623
|
+
}
|
|
2624
|
+
this.ptyProcess.write(text);
|
|
2573
2625
|
this.recordTrace("submit_write", {
|
|
2574
|
-
mode: "
|
|
2626
|
+
mode: "type_then_submit",
|
|
2575
2627
|
text: summarizeCliTraceText(text, 500),
|
|
2576
2628
|
sendKey: this.sendKey,
|
|
2577
2629
|
screenText: summarizeCliTraceText(this.terminalScreen.getText(), 500)
|
|
2578
2630
|
});
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
if (this.
|
|
2584
|
-
|
|
2631
|
+
const submitStartedAt = Date.now();
|
|
2632
|
+
let lastNormalizedScreen = "";
|
|
2633
|
+
let lastScreenChangeAt = submitStartedAt;
|
|
2634
|
+
const waitForEchoAndSubmit = () => {
|
|
2635
|
+
if (!this.ptyProcess) {
|
|
2636
|
+
resolveOnce();
|
|
2637
|
+
return;
|
|
2638
|
+
}
|
|
2639
|
+
const now = Date.now();
|
|
2640
|
+
const elapsed = now - submitStartedAt;
|
|
2585
2641
|
const screenText = this.terminalScreen.getText();
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
}
|
|
2601
|
-
if (submitDelayMs > 0) {
|
|
2602
|
-
this.submitPendingUntil = Date.now() + submitDelayMs;
|
|
2603
|
-
}
|
|
2604
|
-
this.ptyProcess.write(text);
|
|
2605
|
-
this.recordTrace("submit_write", {
|
|
2606
|
-
mode: "type_then_submit",
|
|
2607
|
-
text: summarizeCliTraceText(text, 500),
|
|
2608
|
-
sendKey: this.sendKey,
|
|
2609
|
-
screenText: summarizeCliTraceText(this.terminalScreen.getText(), 500)
|
|
2610
|
-
});
|
|
2611
|
-
const submitStartedAt = Date.now();
|
|
2612
|
-
let lastNormalizedScreen = "";
|
|
2613
|
-
let lastScreenChangeAt = submitStartedAt;
|
|
2614
|
-
const waitForEchoAndSubmit = () => {
|
|
2615
|
-
if (!this.ptyProcess) return;
|
|
2616
|
-
const now = Date.now();
|
|
2617
|
-
const elapsed = now - submitStartedAt;
|
|
2618
|
-
const screenText = this.terminalScreen.getText();
|
|
2619
|
-
const normalizedScreen = normalizePromptText(screenText);
|
|
2620
|
-
if (normalizedScreen !== lastNormalizedScreen) {
|
|
2621
|
-
lastNormalizedScreen = normalizedScreen;
|
|
2622
|
-
lastScreenChangeAt = now;
|
|
2623
|
-
}
|
|
2624
|
-
const echoVisible = !normalizedPromptSnippet || promptLikelyVisible(screenText, normalizedPromptSnippet);
|
|
2625
|
-
if (echoVisible) {
|
|
2626
|
-
const screenSettled = now - lastScreenChangeAt >= 500;
|
|
2627
|
-
if (elapsed >= submitDelayMs && screenSettled) {
|
|
2642
|
+
const normalizedScreen = normalizePromptText(screenText);
|
|
2643
|
+
if (normalizedScreen !== lastNormalizedScreen) {
|
|
2644
|
+
lastNormalizedScreen = normalizedScreen;
|
|
2645
|
+
lastScreenChangeAt = now;
|
|
2646
|
+
}
|
|
2647
|
+
const echoVisible = !normalizedPromptSnippet || promptLikelyVisible(screenText, normalizedPromptSnippet);
|
|
2648
|
+
if (echoVisible) {
|
|
2649
|
+
const screenSettled = now - lastScreenChangeAt >= 500;
|
|
2650
|
+
if (elapsed >= submitDelayMs && screenSettled) {
|
|
2651
|
+
submit();
|
|
2652
|
+
return;
|
|
2653
|
+
}
|
|
2654
|
+
}
|
|
2655
|
+
if (elapsed >= maxEchoWaitMs) {
|
|
2628
2656
|
submit();
|
|
2629
2657
|
return;
|
|
2630
2658
|
}
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
}
|
|
2636
|
-
setTimeout(waitForEchoAndSubmit, 50);
|
|
2637
|
-
};
|
|
2638
|
-
waitForEchoAndSubmit();
|
|
2659
|
+
setTimeout(waitForEchoAndSubmit, 50);
|
|
2660
|
+
};
|
|
2661
|
+
waitForEchoAndSubmit();
|
|
2662
|
+
});
|
|
2639
2663
|
}
|
|
2640
2664
|
getPartialResponse() {
|
|
2641
2665
|
if (!this.isWaitingForResponse) return "";
|
|
@@ -14417,6 +14441,7 @@ var DaemonStatusReporter = class {
|
|
|
14417
14441
|
lastStatusSentAt = 0;
|
|
14418
14442
|
statusPendingThrottle = false;
|
|
14419
14443
|
lastP2PStatusHash = "";
|
|
14444
|
+
lastServerStatusHash = "";
|
|
14420
14445
|
lastStatusSummary = "";
|
|
14421
14446
|
statusTimer = null;
|
|
14422
14447
|
p2pTimer = null;
|
|
@@ -14427,11 +14452,11 @@ var DaemonStatusReporter = class {
|
|
|
14427
14452
|
// ─── Lifecycle ───────────────────────────────────
|
|
14428
14453
|
startReporting() {
|
|
14429
14454
|
setTimeout(() => {
|
|
14430
|
-
this.sendUnifiedStatusReport().catch((e) => LOG.warn("Status", `Initial report failed: ${e?.message}`));
|
|
14455
|
+
this.sendUnifiedStatusReport({ forceServer: true, reason: "initial" }).catch((e) => LOG.warn("Status", `Initial report failed: ${e?.message}`));
|
|
14431
14456
|
}, 2e3);
|
|
14432
14457
|
const scheduleServerReport = () => {
|
|
14433
14458
|
this.statusTimer = setTimeout(() => {
|
|
14434
|
-
this.sendUnifiedStatusReport().catch((e) => LOG.warn("Status", `Periodic report failed: ${e?.message}`));
|
|
14459
|
+
this.sendUnifiedStatusReport({ forceServer: true, reason: "periodic" }).catch((e) => LOG.warn("Status", `Periodic report failed: ${e?.message}`));
|
|
14435
14460
|
scheduleServerReport();
|
|
14436
14461
|
}, 3e4);
|
|
14437
14462
|
};
|
|
@@ -14578,24 +14603,24 @@ var DaemonStatusReporter = class {
|
|
|
14578
14603
|
cdpConnected: session.cdpConnected,
|
|
14579
14604
|
currentModel: session.currentModel,
|
|
14580
14605
|
currentPlan: session.currentPlan,
|
|
14581
|
-
currentAutoApprove: session.currentAutoApprove
|
|
14582
|
-
lastUpdated: session.lastUpdated,
|
|
14583
|
-
unread: session.unread,
|
|
14584
|
-
lastSeenAt: session.lastSeenAt,
|
|
14585
|
-
inboxBucket: session.inboxBucket,
|
|
14586
|
-
surfaceHidden: session.surfaceHidden,
|
|
14587
|
-
controlValues: session.controlValues,
|
|
14588
|
-
providerControls: session.providerControls,
|
|
14589
|
-
acpConfigOptions: session.acpConfigOptions,
|
|
14590
|
-
acpModes: session.acpModes
|
|
14606
|
+
currentAutoApprove: session.currentAutoApprove
|
|
14591
14607
|
})),
|
|
14592
14608
|
p2p: payload.p2p,
|
|
14593
14609
|
timestamp: now,
|
|
14594
14610
|
detectedIdes: payload.detectedIdes,
|
|
14595
14611
|
availableProviders: payload.availableProviders
|
|
14596
14612
|
};
|
|
14613
|
+
const wsHash = this.simpleHash(JSON.stringify({
|
|
14614
|
+
...wsPayload,
|
|
14615
|
+
timestamp: void 0
|
|
14616
|
+
}));
|
|
14617
|
+
if (!opts?.forceServer && wsHash === this.lastServerStatusHash) {
|
|
14618
|
+
LOG.debug("Server", `skip duplicate status_report${opts?.reason ? ` (${opts.reason})` : ""}`);
|
|
14619
|
+
return;
|
|
14620
|
+
}
|
|
14621
|
+
this.lastServerStatusHash = wsHash;
|
|
14597
14622
|
serverConn.sendMessage("status_report", wsPayload);
|
|
14598
|
-
LOG.debug("Server", `sent status_report (${JSON.stringify(wsPayload).length} bytes)`);
|
|
14623
|
+
LOG.debug("Server", `sent status_report (${JSON.stringify(wsPayload).length} bytes)${opts?.reason ? ` [${opts.reason}]` : ""}`);
|
|
14599
14624
|
}
|
|
14600
14625
|
// ─── P2P ─────────────────────────────────────────
|
|
14601
14626
|
sendP2PPayload(payload) {
|