feat(daemon): Add central TSPM daemon and IPC client; refactor CLI to use daemon and improve monitoring/error handling

This commit is contained in:
2025-08-25 08:52:57 +00:00
parent 1c06fb54b9
commit 3ad8f29e1c
23 changed files with 4761 additions and 3252 deletions

View File

@@ -1,6 +1,20 @@
# Changelog
## 2025-08-25 - 1.6.0 - feat(daemon)
Add central TSPM daemon and IPC client; refactor CLI to use daemon and improve monitoring/error handling
- Add central daemon implementation (ts/classes.daemon.ts) to manage all processes via a single background service and Unix socket.
- Introduce IPC client and typed IPC contracts (ts/classes.ipcclient.ts, ts/ipc.types.ts) so CLI communicates with the daemon.
- Refactor CLI to use the daemon for commands (ts/cli.ts): start/stop/restart/delete/list/describe/logs/start-all/stop-all/restart-all and new daemon start/stop/status commands.
- Enhance process monitoring and wrapping: ProcessMonitor and ProcessWrapper improvements (ts/classes.processmonitor.ts, ts/classes.processwrapper.ts) with better logging, memory checks, and restart behavior.
- Improve centralized error handling and Logger behavior (ts/utils.errorhandler.ts).
- Persist and load process configurations via TspmConfig and config storage changes (ts/classes.config.ts, ts/classes.tspm.ts).
- Bump dependency and devDependency versions and add packageManager entry in package.json.
- Add ts/daemon entrypoint and export daemon/ipc types from ts/index.ts; add paths for tspm runtime dir (ts/paths.ts).
- Update tests and test tooling imports (test/test.ts) and adjust commitinfo and readme hints.
## 2025-03-10 - 1.5.1 - fix(core)
Improve error handling, logging, and test suite; update dependency versions
- Updated devDependencies versions in package.json (@git.zone/tsbuild, @push.rocks/tapbundle, and @push.rocks/smartdaemon)
@@ -8,6 +22,7 @@ Improve error handling, logging, and test suite; update dependency versions
- Improved test structure by adding clear module import tests and usage examples in test files
## 2025-03-04 - 1.5.0 - feat(cli)
Enhance CLI with new process management commands
- Added comprehensive CLI commands for process management including start, stop, restart, list, describe and logs.
@@ -15,6 +30,7 @@ Enhance CLI with new process management commands
- Enhanced CLI output with formatted table listings for active processes.
## 2025-03-03 - 1.4.0 - feat(core)
Introduced process management features using ProcessWrapper and enhanced configuration.
- Added ProcessWrapper for wrapping and managing child processes.
@@ -23,12 +39,14 @@ Introduced process management features using ProcessWrapper and enhanced configu
- Enhanced CLI to support new process management commands like 'startAsDaemon'.
## 2025-03-01 - 1.3.1 - fix(test)
Update test script to fix type references and remove private method call
- Corrected type references in test script for IMonitorConfig.
- Fixed test script to use console.log instead of private method monitor.log.
## 2025-03-01 - 1.3.0 - feat(cli)
Add CLI support with command parsing and version display
- Added a basic CLI interface using smartcli.
@@ -36,6 +54,7 @@ Add CLI support with command parsing and version display
- Integrated project version display in the CLI.
## 2025-03-01 - 1.2.0 - feat(core)
Introduce ProcessMonitor with memory management and spawning features
- Added ProcessMonitor class with functionality to manage process execution and memory usage.
@@ -45,12 +64,14 @@ Introduce ProcessMonitor with memory management and spawning features
- Updated test file to include example usage of ProcessMonitor.
## 2025-03-01 - 1.1.1 - fix(package)
Update dependencies and pnpm configuration
- Updated @types/node to 22.13.8
- Updated pnpm configuration to include onlyBuiltDependencies with esbuild, mongodb-memory-server, and puppeteer
## 2025-03-01 - 1.1.0 - feat(core)
Introduce ProcessMonitor class and integrate native and external plugins
- Added a new ProcessMonitor class to manage and monitor child processes with memory constraints.
@@ -58,14 +79,16 @@ Introduce ProcessMonitor class and integrate native and external plugins
- Adjusted index and related files for improved modular structure.
## 2025-02-24 - 1.0.3 - fix(core)
Corrected description in package.json and readme.md from 'task manager' to 'process manager'.
- Updated the project description in package.json.
- Aligned the description in readme.md with package.json.
## 2025-02-24 - 1.0.2 - fix(core)
Internal changes with no functional impact.
## 2025-02-24 - 1.0.1 - initial release
Initial release with baseline functionality.