@jacklika/dsh-memory-mcp 0.1.2 → 0.1.3
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/package.json +4 -1
- package/src/server.mjs +2 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jacklika/dsh-memory-mcp",
|
|
3
3
|
"description": "Zero-dependency MCP stdio server exposing the memory vault to any MCP client — one process owns all writes.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -29,5 +29,8 @@
|
|
|
29
29
|
"README.md",
|
|
30
30
|
"README.zh.md"
|
|
31
31
|
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@jacklika/dsh-memory-time": "^0.1.0-alpha.0"
|
|
34
|
+
},
|
|
32
35
|
"license": "MIT"
|
|
33
36
|
}
|
package/src/server.mjs
CHANGED
|
@@ -12,6 +12,7 @@ import { mkdir, readdir, readFile, realpath, rename, rm, writeFile } from 'node:
|
|
|
12
12
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'node:path'
|
|
13
13
|
import process from 'node:process'
|
|
14
14
|
import readline from 'node:readline'
|
|
15
|
+
import { formatBeijingTime } from '@jacklika/dsh-memory-time'
|
|
15
16
|
|
|
16
17
|
const PROTOCOL_VERSION = '2024-11-05'
|
|
17
18
|
const SERVER_INFO = { name: 'dsh-memory-mcp', version: '0.1.0' }
|
|
@@ -183,7 +184,7 @@ async function writeNote(id, content, mode = 'append', baseVersion) {
|
|
|
183
184
|
const fm = Object.keys(frontmatter).length > 0
|
|
184
185
|
? `---\n${Object.entries(frontmatter).map(([k, v]) => `${k}: ${v}`).join('\n')}\n---\n\n`
|
|
185
186
|
: ''
|
|
186
|
-
finalBody = `${fm}${body}\n\n## ${new Date()
|
|
187
|
+
finalBody = `${fm}${body}\n\n## ${formatBeijingTime(new Date())}\n\n${content}\n`
|
|
187
188
|
}
|
|
188
189
|
const tmp = `${absolutePath}.tmp-${process.pid}-${randomUUID()}`
|
|
189
190
|
try {
|