@adhdev/daemon-core 0.8.77 → 0.8.78
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.
|
@@ -19,6 +19,7 @@ export interface CommandLogEntry {
|
|
|
19
19
|
error?: string;
|
|
20
20
|
durationMs?: number;
|
|
21
21
|
}
|
|
22
|
+
export declare function shouldLogCommand(cmd: string): boolean;
|
|
22
23
|
/**
|
|
23
24
|
* Log a command received from the dashboard/WS/P2P/extension/API.
|
|
24
25
|
* Call this at the entry point of command handling.
|
package/package.json
CHANGED
|
@@ -116,8 +116,14 @@ function checkSize(): void {
|
|
|
116
116
|
const SKIP_COMMANDS = new Set([
|
|
117
117
|
'heartbeat',
|
|
118
118
|
'status_report',
|
|
119
|
+
'read_chat',
|
|
120
|
+
'mark_session_seen',
|
|
119
121
|
]);
|
|
120
122
|
|
|
123
|
+
export function shouldLogCommand(cmd: string): boolean {
|
|
124
|
+
return !SKIP_COMMANDS.has(cmd);
|
|
125
|
+
}
|
|
126
|
+
|
|
121
127
|
// ─── Public API ──────────────────────────────
|
|
122
128
|
|
|
123
129
|
/**
|
|
@@ -125,7 +131,7 @@ const SKIP_COMMANDS = new Set([
|
|
|
125
131
|
* Call this at the entry point of command handling.
|
|
126
132
|
*/
|
|
127
133
|
export function logCommand(entry: CommandLogEntry): void {
|
|
128
|
-
if (
|
|
134
|
+
if (!shouldLogCommand(entry.cmd)) return;
|
|
129
135
|
|
|
130
136
|
try {
|
|
131
137
|
if (++writeCount % 500 === 0) {
|