@synth-coder/memhub 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -72,7 +72,7 @@ Example MCP client config:
72
72
  "command": "npx",
73
73
  "args": ["-y", "@synth-coder/memhub"],
74
74
  "env": {
75
- "MEMHUB_STORAGE_PATH": "/absolute/path/to/memories",
75
+ "MEMHUB_STORAGE_PATH": "/absolute/path/to/.memhub",
76
76
  "MEMHUB_LOG_LEVEL": "info"
77
77
  }
78
78
  }
@@ -97,7 +97,7 @@ Example MCP client config:
97
97
 
98
98
  ## Environment Variables
99
99
 
100
- - `MEMHUB_STORAGE_PATH` (default: `./memories`)
100
+ - `MEMHUB_STORAGE_PATH` (default: `~/.memhub`)
101
101
  - `MEMHUB_LOG_LEVEL` (default: `info`, options: `debug|info|warn|error`)
102
102
 
103
103
  ---
package/README.zh-CN.md CHANGED
@@ -97,7 +97,7 @@ npx -y @synth-coder/memhub
97
97
 
98
98
  ## 环境变量
99
99
 
100
- - `MEMHUB_STORAGE_PATH`:记忆存储目录(默认:`./memories`)
100
+ - `MEMHUB_STORAGE_PATH`:记忆存储目录(默认:`~/.memhub`)
101
101
  - `MEMHUB_LOG_LEVEL`:日志级别(默认:`info`,可选:`debug|info|warn|error`)
102
102
 
103
103
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synth-coder/memhub",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "A Git-friendly memory hub using Markdown-based storage with YAML Front Matter",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -7,6 +7,7 @@
7
7
  import { readFileSync } from 'fs';
8
8
  import { join, dirname } from 'path';
9
9
  import { fileURLToPath } from 'url';
10
+ import { homedir } from 'os';
10
11
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
11
12
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
12
13
  import {
@@ -37,7 +38,8 @@ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8')) as Packag
37
38
  * Create McpServer instance using SDK
38
39
  */
39
40
  export function createMcpServer(): Server {
40
- const storagePath = process.env.MEMHUB_STORAGE_PATH || './memories';
41
+ const defaultStoragePath = join(homedir(), '.memhub');
42
+ const storagePath = process.env.MEMHUB_STORAGE_PATH || defaultStoragePath;
41
43
  const memoryService = new MemoryService({ storagePath });
42
44
 
43
45
  // Create server using SDK