@adhdev/daemon-core 0.8.7 → 0.8.9

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,8 @@
19
19
  export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
20
20
  export declare function setLogLevel(level: LogLevel): void;
21
21
  export declare function getLogLevel(): LogLevel;
22
+ export declare function getDaemonLogDir(): string;
23
+ export declare function getCurrentDaemonLogPath(date?: Date): string;
22
24
  export interface LogEntry {
23
25
  ts: number;
24
26
  level: LogLevel;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/session-host-core",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "description": "ADHDev local session host core — session registry, protocol, buffers",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -102,7 +102,15 @@ export type { ManagedStatus } from './status/normalize.js';
102
102
  export type { StatusSnapshotOptions, StatusSnapshot } from './status/snapshot.js';
103
103
 
104
104
  // ── Logger ──
105
- export { LOG, installGlobalInterceptor, setLogLevel, getLogLevel, getRecentLogs } from './logging/logger.js';
105
+ export {
106
+ LOG,
107
+ installGlobalInterceptor,
108
+ setLogLevel,
109
+ getLogLevel,
110
+ getRecentLogs,
111
+ getDaemonLogDir,
112
+ getCurrentDaemonLogPath,
113
+ } from './logging/logger.js';
106
114
  export type { ScopedLogger, LogLevel, LogEntry } from './logging/logger.js';
107
115
  export { logCommand, getRecentCommands } from './logging/command-log.js';
108
116
 
@@ -54,6 +54,14 @@ function getDateStr(): string {
54
54
  let currentDate = getDateStr();
55
55
  let currentLogFile = path.join(LOG_DIR, `daemon-${currentDate}.log`);
56
56
 
57
+ export function getDaemonLogDir(): string {
58
+ return LOG_DIR;
59
+ }
60
+
61
+ export function getCurrentDaemonLogPath(date = new Date()): string {
62
+ return path.join(LOG_DIR, `daemon-${date.toISOString().slice(0, 10)}.log`);
63
+ }
64
+
57
65
  /** date change detect + old file cleanup */
58
66
  function checkDateRotation(): void {
59
67
  const today = getDateStr();