# Changelog ## 2025-08-31 - 5.6.2 - fix(processmanager) Improve process lifecycle handling and cleanup in daemon, monitors and wrappers - StartAll: when a monitor exists but is not running, restart it instead of skipping — ensures saved processes are reliably brought online. - ProcessMonitor.stop: cancel any pending restart timers to prevent stray restarts after explicit stop. - ProcessWrapper: add killProcessTree helper and use it for graceful (SIGTERM) and force (SIGKILL) shutdowns to reliably signal child processes. - Daemon stopAll: yield briefly after stopping processes and inspect monitors (not only processInfo) to accurately report stopped vs failed processes. ## 2025-08-31 - 5.6.1 - fix(daemon) Ensure robust process shutdown and improve logs/subscriber diagnostics - Make ProcessWrapper.stop asynchronous and awaitable to avoid race conditions when stopping processes - Signal entire process groups on POSIX (kill by negative PID) and fall back to per-PID signalling; escalate to SIGKILL after a timeout - Await processWrapper.stop() from ProcessMonitor when enforcing memory limits or handling exits/errors to ensure child processes are cleaned up - Add logs:subscribers IPC endpoint and corresponding types to inspect current subscribers for a process log topic - Add optional CLI debug output in logs command (enabled via TSPM_DEBUG=true) to print subscriber counts and details - Support passing request.lines to getLogs handler in daemon to limit returned log entries ## 2025-08-30 - 5.6.0 - feat(processmonitor) Add CPU monitoring and display CPU in process list - CLI: show a CPU column in the `tspm list` output (adds formatting and placeholder name display) - Daemon: ProcessMonitor now collects CPU usage for the process group in addition to memory - Daemon: ProcessMonitor exposes getLastCpuUsage() and ProcessManager syncs CPU values into IProcessInfo - Non-breaking: UI and internal stats enriched to surface CPU metrics for processes ## 2025-08-30 - 5.5.0 - feat(logs) Improve logs streaming and backlog delivery; add CLI filters and ndjson output - CLI: add new logs options: --since, --stderr-only, --stdout-only and --ndjson; enhance streaming output and gap detection - CLI: fetch backlog conditionally (honoring --since) and print filtered results before live streaming - Client: add TspmIpcClient.requestLogsBacklogStream, onStream and onBacklogTopic helpers to receive backlog chunks and streams - Daemon: add logs:subscribe IPC handler to stream backlog entries to requesting client in small batches - Protocol: extend IPC types with LogsSubscribeRequest/Response and register 'logs:subscribe' method - Dependency: bump @push.rocks/smartipc to ^2.3.0 to support the streaming/IPC changes ## 2025-08-30 - 5.4.2 - fix(cli/process/logs) Reset log sequence on process restart to avoid false log gap warnings - Track process runId when streaming logs and initialize lastRunId from fetched logs - When a new runId is detected, reset lastSeq so that subsequent streamed logs are accepted (prevents spurious gap warnings) - Emit an informational message when a restart/runId change is detected to aid debugging of log streams ## 2025-08-30 - 5.4.1 - fix(processmonitor) Bump tsbuild devDependency and relax ps-tree callback typing in ProcessMonitor - Update devDependency @git.zone/tsbuild from ^2.6.7 to ^2.6.8 - Change psTree callback types in ts/daemon/processmonitor.ts to accept any error and ReadonlyArray for children to improve type compatibility ## 2025-08-30 - 5.4.0 - feat(daemon) Add CLI systemd service refresh on version mismatch and fix daemon memory leak; update dependencies - CLI: when client and daemon versions differ, prompt to refresh the systemd service and optionally disable/enable the service automatically - Daemon: clear pidusage state for PIDs on process exit/stop to prevent memory leaks in long-running monitors - Client: expose smartdaemon in client plugin exports and fix import path for tspm.servicemanager - Package: tighten dependency ranges (set specific versions) and add @types for pidusage and ps-tree - Misc: ensure IPC disconnects and PID/socket handling improvements were integrated alongside the above changes ## 2025-08-30 - 5.3.2 - fix(daemon) Improve daemon log delivery and process monitor memory accounting; gate debug output and update tests to numeric ProcessId - Deliver process logs only to subscribed clients instead of broadcasting to all connections (reduce unnecessary IPC traffic and noise) - Implement incremental log memory accounting in ProcessMonitor using an estimateLogSize helper and WeakMap to avoid repeated JSON.stringify and reduce CPU/memory overhead - Seed the incremental size map when loading persisted logs so memory accounting is accurate after restart - Trim logs incrementally by subtracting estimated sizes of removed entries (avoids O(n) recalculation) - Gate verbose console/debug output behind TSPM_DEBUG to prevent spamming in normal runs (applies to ProcessWrapper and ProcessMonitor) - Improve process wrapper stdout/stderr debug logging to be conditional on debug mode - Update tests to use numeric ProcessId via toProcessId(...) for consistency with typed IDs ## 2025-08-30 - 5.3.1 - fix(client(tspmIpcClient)) Use bare topic names for IPC client subscribe/unsubscribe to fix log subscription issues - Updated ts/client/tspm.ipcclient.ts to call ipcClient.subscribe/unsubscribe with the bare topic (e.g. 'logs.') instead of prefixed 'topic:<...>'. - Added comments clarifying that the IpcClient registers the 'topic:' prefix internally. - Fixes incorrect topic registration that could prevent log streaming handlers from receiving messages. ## 2025-08-30 - 5.3.0 - feat(cli/daemon/processmonitor) Add flexible target resolution and search command; improve restart/backoff and error handling - Add new cli command `search` to find processes by id or name fragment. - Allow flexible process targets in CLI commands (accepts numeric id, id:, or name: