Refactor worker commands from npm scripts to claude-mem CLI

- Updated all instances of `npm run worker:restart` to `claude-mem restart` in documentation and code comments for consistency.
- Modified error messages and logging to reflect the new command structure.
- Adjusted worker management commands in various troubleshooting documents.
- Changed the worker status check message to guide users towards the new command.
This commit is contained in:
Alex Newman
2025-12-20 17:16:20 -05:00
parent e27f8e4963
commit 5ce656037e
31 changed files with 130 additions and 156 deletions
@@ -48,7 +48,7 @@ describe('Hook Error Logging', () => {
handleFetchError(mockResponse, errorText, context);
} catch (error: any) {
expect(error.message).toContain('Failed Observation storage for Bash');
expect(error.message).toContain('npm run worker:restart');
expect(error.message).toContain('claude-mem restart');
}
});
@@ -119,7 +119,7 @@ describe('Hook Error Logging', () => {
expect(() => {
handleWorkerError(connError);
}).toThrow('npm run worker:restart');
}).toThrow('claude-mem restart');
});
it('re-throws non-connection errors unchanged', () => {
@@ -130,7 +130,7 @@ describe('Hook Error Logging', () => {
expect.fail('Should have thrown');
} catch (error: any) {
expect(error.message).toBe('Something went wrong');
expect(error.message).not.toContain('npm run worker:restart');
expect(error.message).not.toContain('claude-mem restart');
}
});
@@ -227,7 +227,7 @@ describe('Hook Error Logging', () => {
handleFetchError(mockResponse, 'error', context);
} catch (error: any) {
// Must include restart command
expect(error.message).toMatch(/npm run worker:restart/);
expect(error.message).toMatch(/claude-mem restart/);
// Must be user-facing (no technical jargon)
expect(error.message).not.toContain('ECONNREFUSED');