fix(examples): keep memory configs provider-owned

This commit is contained in:
ZiyaZhang
2026-07-31 02:34:52 -07:00
parent 07f51593a0
commit dc7f3253f6
12 changed files with 30 additions and 38 deletions
@@ -10,4 +10,4 @@
cwd: !!js process.cwd()
env:
MEMORY_FILE_PATH: !!js >-
(() => { const path = process.getBuiltinModule('node:path'); const os = process.getBuiltinModule('node:os'); const crypto = process.getBuiltinModule('node:crypto'); const configured = process.env.DSH_HOME; const root = configured !== undefined && configured.trim().length > 0 ? configured : path.join(os.homedir(), '.dsh'); const user = process.env.DSH_MEMORY_USER_ID?.trim() || 'default'; const scope = crypto.createHash('sha256').update(user).digest('hex').slice(0, 16); return path.join(path.resolve(root), `mcp-reference-memory-${scope}.jsonl`) })()
process.env.MEMORY_FILE_PATH?.trim() || process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:os').homedir(), '.dsh-mcp-reference-memory.jsonl')