Enhance ecosystem configuration and worker service for improved stability

- Document intentional watch mode in ecosystem config for auto-restart on plugin updates.
- Implement auto-session creation in worker service to preserve observation data, ensuring no loss of valuable information during hook failures.
- Address race condition concerns in worker startup and improve error handling in hooks.
This commit is contained in:
Alex Newman
2025-11-04 15:16:28 -05:00
parent 280cb2fe54
commit 1b9cec2a95
4 changed files with 524 additions and 2 deletions
+10
View File
@@ -13,6 +13,16 @@ module.exports = {
apps: [{
name: 'claude-mem-worker',
script: './plugin/scripts/worker-service.cjs',
// INTENTIONAL: Watch mode enables auto-restart on plugin updates
//
// Why this is enabled:
// - When you run `npm run sync-marketplace` or rebuild the plugin,
// files in ~/.claude/plugins/marketplaces/thedotmack/ change
// - Watch mode detects these changes and auto-restarts the worker
// - Users get the latest code without manually running `pm2 restart`
//
// This is a feature, not a bug - it ensures users always run the
// latest version after plugin updates.
watch: true,
ignore_watch: [
'node_modules',