@synth-coder/memhub 0.1.0 → 0.1.1
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 +35 -12
- package/README.zh-CN.md +35 -12
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -18,30 +18,34 @@ MemHub stores decisions, preferences, and reusable knowledge as plain Markdown f
|
|
|
18
18
|
## Features
|
|
19
19
|
|
|
20
20
|
- Markdown-based memory storage (`.md`)
|
|
21
|
-
- YAML Front Matter metadata (`id`, `tags`, `category`, `importance`, timestamps)
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
- Category/tag aggregation
|
|
21
|
+
- YAML Front Matter metadata (`id`, `session_id`, `entry_type`, `tags`, `category`, `importance`, timestamps)
|
|
22
|
+
- STM-first 2-tool interface: `memory_load` + `memory_update`
|
|
23
|
+
- Concurrent CLI-safe storage layout: `YYYY-MM-DD/session_uuid/...`
|
|
25
24
|
- MCP stdio server compatible with MCP clients
|
|
26
25
|
|
|
27
26
|
---
|
|
28
27
|
|
|
29
28
|
## Quick Start
|
|
30
29
|
|
|
31
|
-
### 1) Install
|
|
30
|
+
### 1) Install from npm
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm i @synth-coder/memhub
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 2) Or install dependencies for local development
|
|
32
37
|
|
|
33
38
|
```bash
|
|
34
39
|
npm install
|
|
35
40
|
```
|
|
36
41
|
|
|
37
|
-
###
|
|
42
|
+
### 3) Build
|
|
38
43
|
|
|
39
44
|
```bash
|
|
40
45
|
npm run build
|
|
41
46
|
```
|
|
42
47
|
|
|
43
|
-
###
|
|
44
|
-
|
|
48
|
+
### 4) Run quality gate
|
|
45
49
|
```bash
|
|
46
50
|
npm run quality
|
|
47
51
|
```
|
|
@@ -50,14 +54,22 @@ npm run quality
|
|
|
50
54
|
|
|
51
55
|
## Use as MCP Server (stdio)
|
|
52
56
|
|
|
57
|
+
### Option A: run directly via npx (recommended)
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx -y @synth-coder/memhub
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
> On Windows, do **not** append `memhub` after the package name.
|
|
64
|
+
|
|
53
65
|
Example MCP client config:
|
|
54
66
|
|
|
55
67
|
```json
|
|
56
68
|
{
|
|
57
69
|
"mcpServers": {
|
|
58
70
|
"memhub": {
|
|
59
|
-
"command": "
|
|
60
|
-
"args": ["
|
|
71
|
+
"command": "npx",
|
|
72
|
+
"args": ["-y", "@synth-coder/memhub"],
|
|
61
73
|
"env": {
|
|
62
74
|
"MEMHUB_STORAGE_PATH": "/absolute/path/to/memories",
|
|
63
75
|
"MEMHUB_LOG_LEVEL": "info"
|
|
@@ -67,7 +79,18 @@ Example MCP client config:
|
|
|
67
79
|
}
|
|
68
80
|
```
|
|
69
81
|
|
|
70
|
-
|
|
82
|
+
### Option B: local repo run
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"mcpServers": {
|
|
87
|
+
"memhub": {
|
|
88
|
+
"command": "node",
|
|
89
|
+
"args": ["dist/src/server/mcp-server.js"]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
71
94
|
|
|
72
95
|
---
|
|
73
96
|
|
|
@@ -162,7 +185,7 @@ memhub/
|
|
|
162
185
|
- [x] Quality gate (lint/typecheck/test/coverage)
|
|
163
186
|
- [ ] Integration tests
|
|
164
187
|
- [ ] Performance improvements
|
|
165
|
-
- [
|
|
188
|
+
- [x] npm release (`@synth-coder/memhub@0.1.1`)
|
|
166
189
|
|
|
167
190
|
---
|
|
168
191
|
|
package/README.zh-CN.md
CHANGED
|
@@ -18,30 +18,34 @@ MemHub 将“用户决策、长期偏好、可复用知识”保存为 **Markdow
|
|
|
18
18
|
## 核心特性
|
|
19
19
|
|
|
20
20
|
- Markdown 持久化(`.md`)
|
|
21
|
-
- YAML Front Matter 元数据(`id / tags / category / importance / 时间戳`)
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
- 分类/标签聚合能力
|
|
21
|
+
- YAML Front Matter 元数据(`id / session_id / entry_type / tags / category / importance / 时间戳`)
|
|
22
|
+
- STM-first 双工具接口:`memory_load` + `memory_update`
|
|
23
|
+
- 并发 CLI 安全目录:`YYYY-MM-DD/session_uuid/...`
|
|
25
24
|
- MCP stdio server,可接入主流 MCP 客户端
|
|
26
25
|
|
|
27
26
|
---
|
|
28
27
|
|
|
29
28
|
## 快速开始
|
|
30
29
|
|
|
31
|
-
### 1
|
|
30
|
+
### 1)从 npm 安装
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm i @synth-coder/memhub
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 2)本地开发安装依赖
|
|
32
37
|
|
|
33
38
|
```bash
|
|
34
39
|
npm install
|
|
35
40
|
```
|
|
36
41
|
|
|
37
|
-
###
|
|
42
|
+
### 3)构建
|
|
38
43
|
|
|
39
44
|
```bash
|
|
40
45
|
npm run build
|
|
41
46
|
```
|
|
42
47
|
|
|
43
|
-
###
|
|
44
|
-
|
|
48
|
+
### 4)执行质量门禁
|
|
45
49
|
```bash
|
|
46
50
|
npm run quality
|
|
47
51
|
```
|
|
@@ -50,14 +54,22 @@ npm run quality
|
|
|
50
54
|
|
|
51
55
|
## 作为 MCP Server 使用(stdio)
|
|
52
56
|
|
|
57
|
+
### 方式 A:npx 直接运行(推荐)
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx -y @synth-coder/memhub
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
> Windows 下不要在包名后再加 `memhub` 参数。
|
|
64
|
+
|
|
53
65
|
在你的 MCP 客户端配置中添加:
|
|
54
66
|
|
|
55
67
|
```json
|
|
56
68
|
{
|
|
57
69
|
"mcpServers": {
|
|
58
70
|
"memhub": {
|
|
59
|
-
"command": "
|
|
60
|
-
"args": ["
|
|
71
|
+
"command": "npx",
|
|
72
|
+
"args": ["-y", "@synth-coder/memhub"],
|
|
61
73
|
"env": {
|
|
62
74
|
"MEMHUB_STORAGE_PATH": "/绝对路径/你的记忆目录",
|
|
63
75
|
"MEMHUB_LOG_LEVEL": "info"
|
|
@@ -67,7 +79,18 @@ npm run quality
|
|
|
67
79
|
}
|
|
68
80
|
```
|
|
69
81
|
|
|
70
|
-
|
|
82
|
+
### 方式 B:本地仓库运行
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"mcpServers": {
|
|
87
|
+
"memhub": {
|
|
88
|
+
"command": "node",
|
|
89
|
+
"args": ["dist/src/server/mcp-server.js"]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
71
94
|
|
|
72
95
|
---
|
|
73
96
|
|
|
@@ -160,7 +183,7 @@ memhub/
|
|
|
160
183
|
- [x] 质量门禁(lint/typecheck/test/coverage)
|
|
161
184
|
- [ ] 集成测试
|
|
162
185
|
- [ ] 性能优化
|
|
163
|
-
- [
|
|
186
|
+
- [x] npm 发布(`@synth-coder/memhub@0.1.1`)
|
|
164
187
|
|
|
165
188
|
---
|
|
166
189
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synth-coder/memhub",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A Git-friendly memory hub using Markdown-based storage with YAML Front Matter",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
6
|
+
"main": "dist/src/index.js",
|
|
7
|
+
"types": "dist/src/index.d.ts",
|
|
8
8
|
"bin": {
|
|
9
|
-
"memhub": "dist/server/mcp-server.js"
|
|
9
|
+
"memhub": "dist/src/server/mcp-server.js"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "tsc",
|