fix: update restart command from 'claude-mem restart' to 'npm run worker:restart' in documentation and scripts
This commit is contained in:
@@ -106,7 +106,7 @@ pm2 logs claude-mem-worker # View logs
|
|||||||
```bash
|
```bash
|
||||||
npm run worker:start # Start worker
|
npm run worker:start # Start worker
|
||||||
npm run worker:stop # Stop worker
|
npm run worker:stop # Stop worker
|
||||||
claude-mem restart # Restart worker
|
npm run worker:restart # Restart worker
|
||||||
npm run worker:status # Check status
|
npm run worker:status # Check status
|
||||||
npm run worker:logs # View logs
|
npm run worker:logs # View logs
|
||||||
```
|
```
|
||||||
@@ -305,7 +305,7 @@ No migration logic runs on subsequent sessions.
|
|||||||
| `pm2 list` | `npm run worker:status` | Shows worker status |
|
| `pm2 list` | `npm run worker:status` | Shows worker status |
|
||||||
| `pm2 start <script>` | `npm run worker:start` | Start worker |
|
| `pm2 start <script>` | `npm run worker:start` | Start worker |
|
||||||
| `pm2 stop claude-mem-worker` | `npm run worker:stop` | Stop worker |
|
| `pm2 stop claude-mem-worker` | `npm run worker:stop` | Stop worker |
|
||||||
| `pm2 restart claude-mem-worker` | `claude-mem restart` | Restart worker |
|
| `pm2 restart claude-mem-worker` | `npm run worker:restart` | Restart worker |
|
||||||
| `pm2 delete claude-mem-worker` | `npm run worker:stop` | Remove worker |
|
| `pm2 delete claude-mem-worker` | `npm run worker:stop` | Remove worker |
|
||||||
| `pm2 logs claude-mem-worker` | `npm run worker:logs` | View logs |
|
| `pm2 logs claude-mem-worker` | `npm run worker:logs` | View logs |
|
||||||
| `pm2 describe claude-mem-worker` | `npm run worker:status` | Detailed status |
|
| `pm2 describe claude-mem-worker` | `npm run worker:status` | Detailed status |
|
||||||
@@ -451,7 +451,7 @@ pm2 save # Persist the deletion
|
|||||||
rm ~/.claude-mem/.pm2-migrated
|
rm ~/.claude-mem/.pm2-migrated
|
||||||
|
|
||||||
# Restart worker
|
# Restart worker
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
### Scenario 2: Stale PID File (Process Dead)
|
### Scenario 2: Stale PID File (Process Dead)
|
||||||
@@ -483,7 +483,7 @@ lsof -i :37777
|
|||||||
kill -9 <PID>
|
kill -9 <PID>
|
||||||
|
|
||||||
# Restart worker
|
# Restart worker
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
### Common Error Messages
|
### Common Error Messages
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ If searches fail, check worker service:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run worker:status # Check status
|
npm run worker:status # Check status
|
||||||
claude-mem restart # Restart worker
|
npm run worker:restart # Restart worker
|
||||||
npm run worker:logs # View logs
|
npm run worker:logs # View logs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -597,7 +597,7 @@ npm run worker:start
|
|||||||
npm run worker:stop
|
npm run worker:stop
|
||||||
|
|
||||||
# Restart worker
|
# Restart worker
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
|
|
||||||
# View logs
|
# View logs
|
||||||
npm run worker:logs
|
npm run worker:logs
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ Edit `~/.claude-mem/settings.json`:
|
|||||||
|
|
||||||
Then restart the worker:
|
Then restart the worker:
|
||||||
```bash
|
```bash
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
### Custom Model
|
### Custom Model
|
||||||
@@ -373,7 +373,7 @@ Edit `~/.claude-mem/settings.json`:
|
|||||||
Then restart the worker:
|
Then restart the worker:
|
||||||
```bash
|
```bash
|
||||||
export CLAUDE_MEM_MODEL=opus
|
export CLAUDE_MEM_MODEL=opus
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
### Custom Skip Tools
|
### Custom Skip Tools
|
||||||
@@ -430,7 +430,7 @@ Enable debug logging:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
export DEBUG=claude-mem:*
|
export DEBUG=claude-mem:*
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
npm run worker:logs
|
npm run worker:logs
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -448,7 +448,7 @@ npm run worker:logs
|
|||||||
|
|
||||||
1. Restart worker after changes:
|
1. Restart worker after changes:
|
||||||
```bash
|
```bash
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Verify environment variables:
|
2. Verify environment variables:
|
||||||
@@ -482,7 +482,7 @@ If port 37777 is already in use:
|
|||||||
|
|
||||||
2. Restart worker:
|
2. Restart worker:
|
||||||
```bash
|
```bash
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Verify new port:
|
3. Verify new port:
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ npm run build
|
|||||||
1. Make changes to React components in `src/ui/viewer/`
|
1. Make changes to React components in `src/ui/viewer/`
|
||||||
2. Build: `npm run build`
|
2. Build: `npm run build`
|
||||||
3. Sync to installed plugin: `npm run sync-marketplace`
|
3. Sync to installed plugin: `npm run sync-marketplace`
|
||||||
4. Restart worker: `claude-mem restart`
|
4. Restart worker: `npm run worker:restart`
|
||||||
5. Refresh browser at http://localhost:37777
|
5. Refresh browser at http://localhost:37777
|
||||||
|
|
||||||
**Hot Reload**: Not currently supported. Full rebuild + restart required for changes.
|
**Hot Reload**: Not currently supported. Full rebuild + restart required for changes.
|
||||||
@@ -395,7 +395,7 @@ When developing new features:
|
|||||||
```bash
|
```bash
|
||||||
npm run build
|
npm run build
|
||||||
npm run sync-marketplace
|
npm run sync-marketplace
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Test in real session**:
|
2. **Test in real session**:
|
||||||
@@ -560,7 +560,7 @@ export async function createObservation(
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
export DEBUG=claude-mem:*
|
export DEBUG=claude-mem:*
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
npm run worker:logs
|
npm run worker:logs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ git checkout beta/endless-mode
|
|||||||
npm install
|
npm install
|
||||||
|
|
||||||
# Restart the worker
|
# Restart the worker
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
**To return to stable:**
|
**To return to stable:**
|
||||||
@@ -103,7 +103,7 @@ claude-mem restart
|
|||||||
cd ~/.claude/plugins/marketplaces/thedotmack/
|
cd ~/.claude/plugins/marketplaces/thedotmack/
|
||||||
git checkout main
|
git checkout main
|
||||||
npm install
|
npm install
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## Summary
|
## Summary
|
||||||
|
|||||||
@@ -534,7 +534,7 @@ npm run worker:status
|
|||||||
npm run worker:logs
|
npm run worker:logs
|
||||||
|
|
||||||
# Restart
|
# Restart
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
|
|
||||||
# Stop
|
# Stop
|
||||||
npm run worker:stop
|
npm run worker:stop
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ CLAUDE_MEM_PYTHON_VERSION=3.13 # Python version for chroma-mcp
|
|||||||
```bash
|
```bash
|
||||||
npm run build # Compile TypeScript (hooks + worker)
|
npm run build # Compile TypeScript (hooks + worker)
|
||||||
npm run sync-marketplace # Copy to ~/.claude/plugins
|
npm run sync-marketplace # Copy to ~/.claude/plugins
|
||||||
claude-mem restart # Restart worker
|
npm run worker:restart # Restart worker
|
||||||
npm run worker:logs # View worker logs
|
npm run worker:logs # View worker logs
|
||||||
npm run worker:status # Check worker status
|
npm run worker:status # Check worker status
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -48,14 +48,14 @@ The skill includes comprehensive diagnostics, automated repair sequences, and de
|
|||||||
|
|
||||||
4. Restart worker service:
|
4. Restart worker service:
|
||||||
```bash
|
```bash
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Check for port conflicts:
|
5. Check for port conflicts:
|
||||||
```bash
|
```bash
|
||||||
# If port 37777 is in use by another service
|
# If port 37777 is in use by another service
|
||||||
export CLAUDE_MEM_WORKER_PORT=38000
|
export CLAUDE_MEM_WORKER_PORT=38000
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
### Theme Toggle Not Persisting
|
### Theme Toggle Not Persisting
|
||||||
@@ -110,7 +110,7 @@ The skill includes comprehensive diagnostics, automated repair sequences, and de
|
|||||||
|
|
||||||
5. Restart worker and refresh browser:
|
5. Restart worker and refresh browser:
|
||||||
```bash
|
```bash
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
### Chroma/Python Dependency Issues (v5.0.0+)
|
### Chroma/Python Dependency Issues (v5.0.0+)
|
||||||
@@ -225,7 +225,7 @@ The skill includes comprehensive diagnostics, automated repair sequences, and de
|
|||||||
3. Or use a different port:
|
3. Or use a different port:
|
||||||
```bash
|
```bash
|
||||||
export CLAUDE_MEM_WORKER_PORT=38000
|
export CLAUDE_MEM_WORKER_PORT=38000
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Verify new port:
|
4. Verify new port:
|
||||||
@@ -282,7 +282,7 @@ The skill includes comprehensive diagnostics, automated repair sequences, and de
|
|||||||
|
|
||||||
4. Restart worker:
|
4. Restart worker:
|
||||||
```bash
|
```bash
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
### Manual Recovery for Stuck Observations
|
### Manual Recovery for Stuck Observations
|
||||||
@@ -839,7 +839,7 @@ sqlite3 ~/.claude-mem/claude-mem.db "
|
|||||||
|
|
||||||
2. Restart worker:
|
2. Restart worker:
|
||||||
```bash
|
```bash
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Clean up old data (see "Database Too Large" above)
|
3. Clean up old data (see "Database Too Large" above)
|
||||||
@@ -916,7 +916,7 @@ sqlite3 ~/.claude-mem/claude-mem.db "
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
export DEBUG=claude-mem:*
|
export DEBUG=claude-mem:*
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
npm run worker:logs
|
npm run worker:logs
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -976,7 +976,7 @@ SELECT created_at, tool_name FROM observations ORDER BY created_at DESC LIMIT 10
|
|||||||
|
|
||||||
**Cause**: Worker not running or port mismatch.
|
**Cause**: Worker not running or port mismatch.
|
||||||
|
|
||||||
**Solution**: Restart worker with `claude-mem restart`.
|
**Solution**: Restart worker with `npm run worker:restart`.
|
||||||
|
|
||||||
### "Database is locked"
|
### "Database is locked"
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ npm run worker:start
|
|||||||
npm run worker:stop
|
npm run worker:stop
|
||||||
|
|
||||||
# Restart worker service
|
# Restart worker service
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
|
|
||||||
# View worker logs
|
# View worker logs
|
||||||
npm run worker:logs
|
npm run worker:logs
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ sqlite3 ~/.claude-mem/claude-mem.db "
|
|||||||
|
|
||||||
3. **Restart worker**:
|
3. **Restart worker**:
|
||||||
```bash
|
```bash
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **Check database integrity**:
|
4. **Check database integrity**:
|
||||||
@@ -308,7 +308,7 @@ bun scripts/check-pending-queue.ts --process
|
|||||||
4. **Increase worker memory** (if using custom runner):
|
4. **Increase worker memory** (if using custom runner):
|
||||||
```bash
|
```bash
|
||||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
export NODE_OPTIONS="--max-old-space-size=4096"
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## Advanced Usage
|
## Advanced Usage
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ This design ensures that private content never reaches the database, search indi
|
|||||||
1. Verify correct syntax: `<private>content</private>`
|
1. Verify correct syntax: `<private>content</private>`
|
||||||
2. Check `~/.claude-mem/silent.log` for errors
|
2. Check `~/.claude-mem/silent.log` for errors
|
||||||
3. Ensure worker is running: `npm run worker:status`
|
3. Ensure worker is running: `npm run worker:status`
|
||||||
4. Restart worker: `claude-mem restart`
|
4. Restart worker: `npm run worker:restart`
|
||||||
|
|
||||||
### Partial Content Stored
|
### Partial Content Stored
|
||||||
|
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ If search isn't working, check the worker service:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run worker:status # Check worker status
|
npm run worker:status # Check worker status
|
||||||
claude-mem restart # Restart if needed
|
npm run worker:restart # Restart if needed
|
||||||
npm run worker:logs # View logs
|
npm run worker:logs # View logs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ ${t.stack}`:t.message;if(Array.isArray(t))return`[${t.length} items]`;let r=Obje
|
|||||||
|
|
||||||
`;return E+=`To restart the worker:
|
`;return E+=`To restart the worker:
|
||||||
`,E+=`1. Exit Claude Code completely
|
`,E+=`1. Exit Claude Code completely
|
||||||
`,E+=`2. Run: claude-mem restart
|
`,E+=`2. Run: npm run worker:restart
|
||||||
`,E+="3. Restart Claude Code",r&&(E+=`
|
`,E+="3. Restart Claude Code",r&&(E+=`
|
||||||
|
|
||||||
If that doesn't work, try: /troubleshoot`),n&&(E=`Worker Error: ${n}
|
If that doesn't work, try: /troubleshoot`),n&&(E=`Worker Error: ${n}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ ${e.stack}`:e.message;if(Array.isArray(e))return`[${e.length} items]`;let t=Obje
|
|||||||
|
|
||||||
Available tools: ${Object.keys(cs).join(", ")}`}],isError:!0};let t=cs[e];return{content:[{type:"text",text:`# ${e} Parameters
|
Available tools: ${Object.keys(cs).join(", ")}`}],isError:!0};let t=cs[e];return{content:[{type:"text",text:`# ${e} Parameters
|
||||||
|
|
||||||
${JSON.stringify(t,null,2)}`}]}}},{name:"search",description:'Search memory. All parameters optional - call get_schema("search") for details',inputSchema:{type:"object",properties:{},additionalProperties:!0},handler:async a=>{let e=bt.search;return await Pt(e,a)}},{name:"timeline",description:'Timeline context. All parameters optional - call get_schema("timeline") for details',inputSchema:{type:"object",properties:{},additionalProperties:!0},handler:async a=>{let e=bt.timeline;return await Pt(e,a)}},{name:"get_recent_context",description:'Recent context. All parameters optional - call get_schema("get_recent_context") for details',inputSchema:{type:"object",properties:{},additionalProperties:!0},handler:async a=>{let e=bt.get_recent_context;return await Pt(e,a)}},{name:"get_context_timeline",description:"Timeline around observation ID",inputSchema:{type:"object",properties:{anchor:{type:"number",description:'Observation ID (required). Optional params: get_schema("get_context_timeline")'}},required:["anchor"],additionalProperties:!0},handler:async a=>{let e=bt.get_context_timeline;return await Pt(e,a)}},{name:"help",description:'Get detailed docs. All parameters optional - call get_schema("help") for details',inputSchema:{type:"object",properties:{},additionalProperties:!0},handler:async a=>{let e=bt.help;return await Pt(e,a)}},{name:"get_observation",description:"Fetch observation by ID",inputSchema:{type:"object",properties:{id:{type:"number",description:"Observation ID (required)"}},required:["id"]},handler:async a=>await us("/api/observation",a.id)},{name:"get_observations",description:"Batch fetch observations",inputSchema:{type:"object",properties:{ids:{type:"array",items:{type:"number"},description:'Array of observation IDs (required). Optional params: get_schema("get_observations")'}},required:["ids"],additionalProperties:!0},handler:async a=>await Td("/api/observations/batch",a)},{name:"get_session",description:"Fetch session by ID",inputSchema:{type:"object",properties:{id:{type:"number",description:"Session ID (required)"}},required:["id"]},handler:async a=>await us("/api/session",a.id)},{name:"get_prompt",description:"Fetch prompt by ID",inputSchema:{type:"object",properties:{id:{type:"number",description:"Prompt ID (required)"}},required:["id"]},handler:async a=>await us("/api/prompt",a.id)}],ds=new ia({name:"mem-search-server",version:"1.0.0"},{capabilities:{tools:{}}});ds.setRequestHandler(Ia,async()=>({tools:ho.map(a=>({name:a.name,description:a.description,inputSchema:a.inputSchema}))}));ds.setRequestHandler(Aa,async a=>{let e=ho.find(t=>t.name===a.params.name);if(!e)throw new Error(`Unknown tool: ${a.params.name}`);try{return await e.handler(a.params.arguments||{})}catch(t){return{content:[{type:"text",text:`Tool execution failed: ${t.message}`}],isError:!0}}});async function po(){me.info("SYSTEM","MCP server shutting down"),process.exit(0)}process.on("SIGTERM",po);process.on("SIGINT",po);async function Ad(){let a=new la;await ds.connect(a),me.info("SYSTEM","Claude-mem search server started"),setTimeout(async()=>{await Id()?me.info("SYSTEM","Worker available",void 0,{workerUrl:it}):(me.warn("SYSTEM","Worker not available",void 0,{workerUrl:it}),me.warn("SYSTEM","Tools will fail until Worker is started"),me.warn("SYSTEM","Start Worker with: claude-mem restart"))},0)}Ad().catch(a=>{me.error("SYSTEM","Fatal error",void 0,a),process.exit(1)});
|
${JSON.stringify(t,null,2)}`}]}}},{name:"search",description:'Search memory. All parameters optional - call get_schema("search") for details',inputSchema:{type:"object",properties:{},additionalProperties:!0},handler:async a=>{let e=bt.search;return await Pt(e,a)}},{name:"timeline",description:'Timeline context. All parameters optional - call get_schema("timeline") for details',inputSchema:{type:"object",properties:{},additionalProperties:!0},handler:async a=>{let e=bt.timeline;return await Pt(e,a)}},{name:"get_recent_context",description:'Recent context. All parameters optional - call get_schema("get_recent_context") for details',inputSchema:{type:"object",properties:{},additionalProperties:!0},handler:async a=>{let e=bt.get_recent_context;return await Pt(e,a)}},{name:"get_context_timeline",description:"Timeline around observation ID",inputSchema:{type:"object",properties:{anchor:{type:"number",description:'Observation ID (required). Optional params: get_schema("get_context_timeline")'}},required:["anchor"],additionalProperties:!0},handler:async a=>{let e=bt.get_context_timeline;return await Pt(e,a)}},{name:"help",description:'Get detailed docs. All parameters optional - call get_schema("help") for details',inputSchema:{type:"object",properties:{},additionalProperties:!0},handler:async a=>{let e=bt.help;return await Pt(e,a)}},{name:"get_observation",description:"Fetch observation by ID",inputSchema:{type:"object",properties:{id:{type:"number",description:"Observation ID (required)"}},required:["id"]},handler:async a=>await us("/api/observation",a.id)},{name:"get_observations",description:"Batch fetch observations",inputSchema:{type:"object",properties:{ids:{type:"array",items:{type:"number"},description:'Array of observation IDs (required). Optional params: get_schema("get_observations")'}},required:["ids"],additionalProperties:!0},handler:async a=>await Td("/api/observations/batch",a)},{name:"get_session",description:"Fetch session by ID",inputSchema:{type:"object",properties:{id:{type:"number",description:"Session ID (required)"}},required:["id"]},handler:async a=>await us("/api/session",a.id)},{name:"get_prompt",description:"Fetch prompt by ID",inputSchema:{type:"object",properties:{id:{type:"number",description:"Prompt ID (required)"}},required:["id"]},handler:async a=>await us("/api/prompt",a.id)}],ds=new ia({name:"mem-search-server",version:"1.0.0"},{capabilities:{tools:{}}});ds.setRequestHandler(Ia,async()=>({tools:ho.map(a=>({name:a.name,description:a.description,inputSchema:a.inputSchema}))}));ds.setRequestHandler(Aa,async a=>{let e=ho.find(t=>t.name===a.params.name);if(!e)throw new Error(`Unknown tool: ${a.params.name}`);try{return await e.handler(a.params.arguments||{})}catch(t){return{content:[{type:"text",text:`Tool execution failed: ${t.message}`}],isError:!0}}});async function po(){me.info("SYSTEM","MCP server shutting down"),process.exit(0)}process.on("SIGTERM",po);process.on("SIGINT",po);async function Ad(){let a=new la;await ds.connect(a),me.info("SYSTEM","Claude-mem search server started"),setTimeout(async()=>{await Id()?me.info("SYSTEM","Worker available",void 0,{workerUrl:it}):(me.warn("SYSTEM","Worker not available",void 0,{workerUrl:it}),me.warn("SYSTEM","Tools will fail until Worker is started"),me.warn("SYSTEM","Start Worker with: npm run worker:restart"))},0)}Ad().catch(a=>{me.error("SYSTEM","Fatal error",void 0,a),process.exit(1)});
|
||||||
/*! Bundled license information:
|
/*! Bundled license information:
|
||||||
|
|
||||||
uri-js/dist/es5/uri.all.js:
|
uri-js/dist/es5/uri.all.js:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ ${t.stack}`:t.message;if(Array.isArray(t))return`[${t.length} items]`;let r=Obje
|
|||||||
|
|
||||||
`;return i+=`To restart the worker:
|
`;return i+=`To restart the worker:
|
||||||
`,i+=`1. Exit Claude Code completely
|
`,i+=`1. Exit Claude Code completely
|
||||||
`,i+=`2. Run: claude-mem restart
|
`,i+=`2. Run: npm run worker:restart
|
||||||
`,i+="3. Restart Claude Code",r&&(i+=`
|
`,i+="3. Restart Claude Code",r&&(i+=`
|
||||||
|
|
||||||
If that doesn't work, try: /troubleshoot`),n&&(i=`Worker Error: ${n}
|
If that doesn't work, try: /troubleshoot`),n&&(i=`Worker Error: ${n}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ ${t.stack}`:t.message;if(Array.isArray(t))return`[${t.length} items]`;let r=Obje
|
|||||||
|
|
||||||
`;return E+=`To restart the worker:
|
`;return E+=`To restart the worker:
|
||||||
`,E+=`1. Exit Claude Code completely
|
`,E+=`1. Exit Claude Code completely
|
||||||
`,E+=`2. Run: claude-mem restart
|
`,E+=`2. Run: npm run worker:restart
|
||||||
`,E+="3. Restart Claude Code",r&&(E+=`
|
`,E+="3. Restart Claude Code",r&&(E+=`
|
||||||
|
|
||||||
If that doesn't work, try: /troubleshoot`),n&&(E=`Worker Error: ${n}
|
If that doesn't work, try: /troubleshoot`),n&&(E=`Worker Error: ${n}
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ function installCLI() {
|
|||||||
console.error('📋 Add to PATH (run once in PowerShell as Admin):');
|
console.error('📋 Add to PATH (run once in PowerShell as Admin):');
|
||||||
console.error(` [Environment]::SetEnvironmentVariable("Path", $env:Path + ";${cliDir}", "User")`);
|
console.error(` [Environment]::SetEnvironmentVariable("Path", $env:Path + ";${cliDir}", "User")`);
|
||||||
console.error('');
|
console.error('');
|
||||||
console.error(' Then restart your terminal and use: claude-mem start|stop|restart|status');
|
console.error(' Then restart your terminal and use: npm run worker:start|stop|restart|status');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`⚠️ Could not install CLI: ${error.message}`);
|
console.error(`⚠️ Could not install CLI: ${error.message}`);
|
||||||
console.error(` You can still use: bun "${WORKER_CLI}" <command>`);
|
console.error(` You can still use: bun "${WORKER_CLI}" <command>`);
|
||||||
@@ -333,9 +333,9 @@ exec "${bunPath}" "${WORKER_CLI}" "$@"
|
|||||||
console.error('📋 Add to PATH (add to ~/.bashrc or ~/.zshrc):');
|
console.error('📋 Add to PATH (add to ~/.bashrc or ~/.zshrc):');
|
||||||
console.error(' export PATH="$HOME/.local/bin:$PATH"');
|
console.error(' export PATH="$HOME/.local/bin:$PATH"');
|
||||||
console.error('');
|
console.error('');
|
||||||
console.error(' Then restart your terminal and use: claude-mem start|stop|restart|status');
|
console.error(' Then restart your terminal and use: npm run worker:start|stop|restart|status');
|
||||||
} else {
|
} else {
|
||||||
console.error(' Usage: claude-mem start|stop|restart|status');
|
console.error(' Usage: npm run worker:start|stop|restart|status');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`⚠️ Could not install CLI: ${error.message}`);
|
console.error(`⚠️ Could not install CLI: ${error.message}`);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ ${t.stack}`:t.message;if(Array.isArray(t))return`[${t.length} items]`;let r=Obje
|
|||||||
|
|
||||||
`;return i+=`To restart the worker:
|
`;return i+=`To restart the worker:
|
||||||
`,i+=`1. Exit Claude Code completely
|
`,i+=`1. Exit Claude Code completely
|
||||||
`,i+=`2. Run: claude-mem restart
|
`,i+=`2. Run: npm run worker:restart
|
||||||
`,i+="3. Restart Claude Code",r&&(i+=`
|
`,i+="3. Restart Claude Code",r&&(i+=`
|
||||||
|
|
||||||
If that doesn't work, try: /troubleshoot`),n&&(i=`Worker Error: ${n}
|
If that doesn't work, try: /troubleshoot`),n&&(i=`Worker Error: ${n}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ ${t.stack}`:t.message;if(Array.isArray(t))return`[${t.length} items]`;let r=Obje
|
|||||||
|
|
||||||
`;return i+=`To restart the worker:
|
`;return i+=`To restart the worker:
|
||||||
`,i+=`1. Exit Claude Code completely
|
`,i+=`1. Exit Claude Code completely
|
||||||
`,i+=`2. Run: claude-mem restart
|
`,i+=`2. Run: npm run worker:restart
|
||||||
`,i+="3. Restart Claude Code",r&&(i+=`
|
`,i+="3. Restart Claude Code",r&&(i+=`
|
||||||
|
|
||||||
If that doesn't work, try: /troubleshoot`),n&&(i=`Worker Error: ${n}
|
If that doesn't work, try: /troubleshoot`),n&&(i=`Worker Error: ${n}
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ npm run worker:status
|
|||||||
If the worker is stopped, restart it:
|
If the worker is stopped, restart it:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ npm run worker:status
|
|||||||
```bash
|
```bash
|
||||||
cd ~/.claude/plugins/marketplaces/thedotmack/ && \
|
cd ~/.claude/plugins/marketplaces/thedotmack/ && \
|
||||||
npm install && \
|
npm install && \
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## Fix: Stale PID File
|
## Fix: Stale PID File
|
||||||
@@ -70,7 +70,7 @@ curl -s http://127.0.0.1:37777/health
|
|||||||
mkdir -p ~/.claude-mem && \
|
mkdir -p ~/.claude-mem && \
|
||||||
echo '{"CLAUDE_MEM_WORKER_PORT":"37778"}' > ~/.claude-mem/settings.json && \
|
echo '{"CLAUDE_MEM_WORKER_PORT":"37778"}' > ~/.claude-mem/settings.json && \
|
||||||
cd ~/.claude/plugins/marketplaces/thedotmack/ && \
|
cd ~/.claude/plugins/marketplaces/thedotmack/ && \
|
||||||
claude-mem restart && \
|
npm run worker:restart && \
|
||||||
sleep 2 && \
|
sleep 2 && \
|
||||||
curl -s http://127.0.0.1:37778/health
|
curl -s http://127.0.0.1:37778/health
|
||||||
```
|
```
|
||||||
@@ -86,7 +86,7 @@ curl -s http://127.0.0.1:37778/health
|
|||||||
cp ~/.claude-mem/claude-mem.db ~/.claude-mem/claude-mem.db.backup && \
|
cp ~/.claude-mem/claude-mem.db ~/.claude-mem/claude-mem.db.backup && \
|
||||||
sqlite3 ~/.claude-mem/claude-mem.db "PRAGMA integrity_check;" && \
|
sqlite3 ~/.claude-mem/claude-mem.db "PRAGMA integrity_check;" && \
|
||||||
cd ~/.claude/plugins/marketplaces/thedotmack/ && \
|
cd ~/.claude/plugins/marketplaces/thedotmack/ && \
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
**If integrity check fails, recreate database:**
|
**If integrity check fails, recreate database:**
|
||||||
@@ -94,7 +94,7 @@ claude-mem restart
|
|||||||
# WARNING: This deletes all memory data
|
# WARNING: This deletes all memory data
|
||||||
mv ~/.claude-mem/claude-mem.db ~/.claude-mem/claude-mem.db.old && \
|
mv ~/.claude-mem/claude-mem.db ~/.claude-mem/claude-mem.db.old && \
|
||||||
cd ~/.claude/plugins/marketplaces/thedotmack/ && \
|
cd ~/.claude/plugins/marketplaces/thedotmack/ && \
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## Fix: Clean Reinstall
|
## Fix: Clean Reinstall
|
||||||
@@ -135,7 +135,7 @@ find ~/.claude-mem/logs/ -name "worker-*.log" -mtime +7 -delete
|
|||||||
|
|
||||||
# Restart worker for fresh log
|
# Restart worker for fresh log
|
||||||
cd ~/.claude/plugins/marketplaces/thedotmack/
|
cd ~/.claude/plugins/marketplaces/thedotmack/
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** Logs auto-rotate daily, manual cleanup rarely needed.
|
**Note:** Logs auto-rotate daily, manual cleanup rarely needed.
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Quick fixes for frequently encountered claude-mem problems.
|
|||||||
3. Restart worker and start new session:
|
3. Restart worker and start new session:
|
||||||
```bash
|
```bash
|
||||||
cd ~/.claude/plugins/marketplaces/thedotmack/
|
cd ~/.claude/plugins/marketplaces/thedotmack/
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Create a test observation: `/skill version-bump` then cancel
|
4. Create a test observation: `/skill version-bump` then cancel
|
||||||
@@ -173,7 +173,7 @@ Quick fixes for frequently encountered claude-mem problems.
|
|||||||
4. If FTS5 out of sync, restart worker (triggers reindex):
|
4. If FTS5 out of sync, restart worker (triggers reindex):
|
||||||
```bash
|
```bash
|
||||||
cd ~/.claude/plugins/marketplaces/thedotmack/
|
cd ~/.claude/plugins/marketplaces/thedotmack/
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## Issue: Port Conflicts
|
## Issue: Port Conflicts
|
||||||
@@ -194,7 +194,7 @@ Quick fixes for frequently encountered claude-mem problems.
|
|||||||
mkdir -p ~/.claude-mem
|
mkdir -p ~/.claude-mem
|
||||||
echo '{"CLAUDE_MEM_WORKER_PORT":"37778"}' > ~/.claude-mem/settings.json
|
echo '{"CLAUDE_MEM_WORKER_PORT":"37778"}' > ~/.claude-mem/settings.json
|
||||||
cd ~/.claude/plugins/marketplaces/thedotmack/
|
cd ~/.claude/plugins/marketplaces/thedotmack/
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## Issue: Database Corrupted
|
## Issue: Database Corrupted
|
||||||
@@ -219,7 +219,7 @@ Quick fixes for frequently encountered claude-mem problems.
|
|||||||
```bash
|
```bash
|
||||||
rm ~/.claude-mem/claude-mem.db
|
rm ~/.claude-mem/claude-mem.db
|
||||||
cd ~/.claude/plugins/marketplaces/thedotmack/
|
cd ~/.claude/plugins/marketplaces/thedotmack/
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
# Worker will create new database
|
# Worker will create new database
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ If FTS5 counts don't match, triggers may have failed. Restart worker to rebuild:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~/.claude/plugins/marketplaces/thedotmack/
|
cd ~/.claude/plugins/marketplaces/thedotmack/
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
The worker will rebuild FTS5 indexes on startup if they're out of sync.
|
The worker will rebuild FTS5 indexes on startup if they're out of sync.
|
||||||
@@ -263,7 +263,7 @@ sqlite3 ~/.claude-mem/claude-mem.db "SELECT COUNT(*) FROM observations;"
|
|||||||
```bash
|
```bash
|
||||||
mv ~/.claude-mem/claude-mem.db ~/.claude-mem/claude-mem.db.archive
|
mv ~/.claude-mem/claude-mem.db ~/.claude-mem/claude-mem.db.archive
|
||||||
cd ~/.claude/plugins/marketplaces/thedotmack/
|
cd ~/.claude/plugins/marketplaces/thedotmack/
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## Database Recovery
|
## Database Recovery
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ npm run worker:status
|
|||||||
npm run worker:start
|
npm run worker:start
|
||||||
|
|
||||||
# Restart worker
|
# Restart worker
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
|
|
||||||
# Stop worker
|
# Stop worker
|
||||||
npm run worker:stop
|
npm run worker:stop
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ npm run worker:start
|
|||||||
```bash
|
```bash
|
||||||
# Restart worker (stops and starts)
|
# Restart worker (stops and starts)
|
||||||
cd ~/.claude/plugins/marketplaces/thedotmack/
|
cd ~/.claude/plugins/marketplaces/thedotmack/
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
|
|
||||||
# Or manually stop and start
|
# Or manually stop and start
|
||||||
npm run worker:stop
|
npm run worker:stop
|
||||||
@@ -219,7 +219,7 @@ npm run worker:start
|
|||||||
**Port conflict:**
|
**Port conflict:**
|
||||||
```bash
|
```bash
|
||||||
echo '{"CLAUDE_MEM_WORKER_PORT":"37778"}' > ~/.claude-mem/settings.json
|
echo '{"CLAUDE_MEM_WORKER_PORT":"37778"}' > ~/.claude-mem/settings.json
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
**Stale PID file:**
|
**Stale PID file:**
|
||||||
@@ -261,14 +261,14 @@ If fails, backup and recreate database.
|
|||||||
**Out of memory:**
|
**Out of memory:**
|
||||||
Check if database is too large or memory leak. Restart:
|
Check if database is too large or memory leak. Restart:
|
||||||
```bash
|
```bash
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
**Port conflict race condition:**
|
**Port conflict race condition:**
|
||||||
Another process grabbing port intermittently. Change port:
|
Another process grabbing port intermittently. Change port:
|
||||||
```bash
|
```bash
|
||||||
echo '{"CLAUDE_MEM_WORKER_PORT":"37778"}' > ~/.claude-mem/settings.json
|
echo '{"CLAUDE_MEM_WORKER_PORT":"37778"}' > ~/.claude-mem/settings.json
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## Worker Management Commands
|
## Worker Management Commands
|
||||||
@@ -284,7 +284,7 @@ npm run worker:start
|
|||||||
npm run worker:stop
|
npm run worker:stop
|
||||||
|
|
||||||
# Restart worker
|
# Restart worker
|
||||||
claude-mem restart
|
npm run worker:restart
|
||||||
|
|
||||||
# View logs
|
# View logs
|
||||||
npm run worker:logs
|
npm run worker:logs
|
||||||
@@ -355,7 +355,7 @@ All should return appropriate responses (HTML for viewer, JSON for APIs).
|
|||||||
|---------|---------|----------------|
|
|---------|---------|----------------|
|
||||||
| Check if running | `npm run worker:status` | Shows PID and uptime |
|
| Check if running | `npm run worker:status` | Shows PID and uptime |
|
||||||
| Worker not running | `npm run worker:start` | Worker starts successfully |
|
| Worker not running | `npm run worker:start` | Worker starts successfully |
|
||||||
| Worker crashed | `claude-mem restart` | Worker restarts |
|
| Worker crashed | `npm run worker:restart` | Worker restarts |
|
||||||
| View recent errors | `grep -i error ~/.claude-mem/logs/worker-$(date +%Y-%m-%d).log \| tail -20` | Shows recent errors |
|
| View recent errors | `grep -i error ~/.claude-mem/logs/worker-$(date +%Y-%m-%d).log \| tail -20` | Shows recent errors |
|
||||||
| Port in use | `lsof -i :37777` | Shows process using port |
|
| Port in use | `lsof -i :37777` | Shows process using port |
|
||||||
| Stale PID | `rm ~/.claude-mem/worker.pid && npm run worker:start` | Removes stale PID and starts |
|
| Stale PID | `rm ~/.claude-mem/worker.pid && npm run worker:start` | Removes stale PID and starts |
|
||||||
|
|||||||
@@ -496,7 +496,7 @@ async function main() {
|
|||||||
if (!workerAvailable) {
|
if (!workerAvailable) {
|
||||||
logger.warn('SYSTEM', 'Worker not available', undefined, { workerUrl: WORKER_BASE_URL });
|
logger.warn('SYSTEM', 'Worker not available', undefined, { workerUrl: WORKER_BASE_URL });
|
||||||
logger.warn('SYSTEM', 'Tools will fail until Worker is started');
|
logger.warn('SYSTEM', 'Tools will fail until Worker is started');
|
||||||
logger.warn('SYSTEM', 'Start Worker with: claude-mem restart');
|
logger.warn('SYSTEM', 'Start Worker with: npm run worker:restart');
|
||||||
} else {
|
} else {
|
||||||
logger.info('SYSTEM', 'Worker available', undefined, { workerUrl: WORKER_BASE_URL });
|
logger.info('SYSTEM', 'Worker available', undefined, { workerUrl: WORKER_BASE_URL });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export function getWorkerRestartInstructions(
|
|||||||
let message = `${prefix}${portInfo}\n\n`;
|
let message = `${prefix}${portInfo}\n\n`;
|
||||||
message += `To restart the worker:\n`;
|
message += `To restart the worker:\n`;
|
||||||
message += `1. Exit Claude Code completely\n`;
|
message += `1. Exit Claude Code completely\n`;
|
||||||
message += `2. Run: claude-mem restart\n`;
|
message += `2. Run: npm run worker:restart\n`;
|
||||||
message += `3. Restart Claude Code`;
|
message += `3. Restart Claude Code`;
|
||||||
|
|
||||||
if (includeSkillFallback) {
|
if (includeSkillFallback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user