@luisarg/memory-mcp 0.1.0

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 ADDED
@@ -0,0 +1,39 @@
1
+ # @luisarg/memory-mcp
2
+
3
+ Cordis bundle that connects [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harness/)
4
+ (DSH) to a persistent OKF memory vault over the Model Context Protocol.
5
+
6
+ It mounts `@deepseek-ai/dsh-mcp-client` configured for the vault's Python MCP
7
+ server (`memory-vault-server` in this repository) over stdio, exposing the
8
+ vault's tools (`search_memory`, `store_*`, `export_memories`, `get_profile`,
9
+ `ping`) to the agent.
10
+
11
+ ## Install
12
+
13
+ ```sh
14
+ dsh plugin --profile web add @luisarg/memory-mcp
15
+ ```
16
+
17
+ Requires `uv` on PATH — the plugin spawns the server with `uv run`.
18
+
19
+ ## Configuration
20
+
21
+ | Variable | Purpose | Default |
22
+ |---|---|---|
23
+ | `DSH_MEMORY_SERVER_DIR` | directory containing `server.py` | `$DSH_HOME/memory-vault-server` |
24
+ | `DSH_MEMORY_PATH` | vault directory (forwarded to the server as `MEMORY_PATH`) | `$DSH_HOME/memory-vault` |
25
+
26
+ The bundle ships no cwd-dependent paths: the `cordis.patch.yml` layer resolves both
27
+ values from the environment, falling back to the harness home (`$DSH_HOME`, or
28
+ `~/.dsh`) — DSH does not chdir, so launching from any directory works.
29
+
30
+ ## Development
31
+
32
+ ```sh
33
+ pnpm install
34
+ pnpm build
35
+ pnpm test
36
+ ```
37
+
38
+ The bundle manifest (`dsh.bundle`) makes this package installable through the
39
+ standard `dsh plugin add` flow; the patch layer lives in `cordis.patch.yml`.
@@ -0,0 +1,16 @@
1
+ # bundle @luisarg/memory-mcp — MCP stdio wrapper for memory-vault
2
+ # overrides vía env: DSH_MEMORY_PATH, DSH_MEMORY_SERVER_DIR
3
+ # defaults resuelven bajo el home del harness (cwd-independent):
4
+ # $DSH_HOME/memory-vault-server y $DSH_HOME/memory-vault (~/.dsh por defecto)
5
+ - insert:
6
+ - id: memory-mcp
7
+ name: '@deepseek-ai/dsh-mcp-client'
8
+ config:
9
+ serverName: memory
10
+ transport: stdio
11
+ command: uv
12
+ args: [run, --directory, !!js process.env.DSH_MEMORY_SERVER_DIR ?? dshHomePath('memory-vault-server'), python, server.py]
13
+ env:
14
+ MEMORY_PATH: !!js process.env.DSH_MEMORY_PATH ?? dshHomePath('memory-vault')
15
+ UV_CACHE_DIR: /tmp/uv-cache
16
+ cwd: !!js process.env.DSH_MEMORY_SERVER_DIR ?? dshHomePath('memory-vault-server')
@@ -0,0 +1,13 @@
1
+ import Schema from "@deepseek-ai/schemastery";
2
+ import { Context } from "@deepseek-ai/cordis";
3
+
4
+ //#region src/index.d.ts
5
+ declare const name = "memory-mcp";
6
+ interface Config {
7
+ memoryPath: string;
8
+ }
9
+ declare const Config: Schema<Config>;
10
+ declare function apply(ctx: Context, config: Config): void;
11
+ //#endregion
12
+ export { Config, apply, name };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;cAMa,IAAA;UAEI,MAAA;EAFJ,UAAI,EAAA,MAAA;AAEjB;AAIa,cAAA,MAAe,EAAP,MAAA,CAAO,MAAD,CAAA;AAcX,iBAAA,KAAA,CAAW,GAAiB,EAAjB,OAAuB,EAAA,MAAA,EAAN,MAAM,CAAA,EAAA,IAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ import { existsSync } from "node:fs";
2
+ import { homedir } from "node:os";
3
+ import { isAbsolute, join } from "node:path";
4
+ import Schema from "@deepseek-ai/schemastery";
5
+
6
+ //#region src/index.ts
7
+ const name = "memory-mcp";
8
+ const Config = Schema.object({ memoryPath: Schema.string().default(process.env.DSH_MEMORY_PATH ?? "") });
9
+ /**
10
+ * Resolve the harness home the same way the harness does (`$DSH_HOME`, or
11
+ * `~/.dsh`). Paths must never depend on the launch cwd: DSH does not chdir.
12
+ */
13
+ function resolveMemoryPath(value) {
14
+ const v = value.trim();
15
+ if (v.length === 0) return join(process.env.DSH_HOME?.trim() || join(homedir(), ".dsh"), "memory-vault");
16
+ return isAbsolute(v) ? v : join(process.env.DSH_HOME?.trim() || join(homedir(), ".dsh"), v);
17
+ }
18
+ function apply(ctx, config) {
19
+ const memoryPath = resolveMemoryPath(config.memoryPath);
20
+ if (!existsSync(memoryPath)) console.warn(`[memory-mcp] vault not found at ${memoryPath} — it will be created on first use.`);
21
+ console.log(`[memory-mcp] MEMORY_PATH=${memoryPath}`);
22
+ }
23
+
24
+ //#endregion
25
+ export { Config, apply, name };
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Config: Schema<Config>"],"sources":["../src/index.ts"],"sourcesContent":["import { existsSync } from 'node:fs'\nimport { homedir } from 'node:os'\nimport { isAbsolute, join } from 'node:path'\nimport type { Context } from '@deepseek-ai/cordis'\nimport Schema from '@deepseek-ai/schemastery'\n\nexport const name = 'memory-mcp'\n\nexport interface Config {\n memoryPath: string\n}\n\nexport const Config: Schema<Config> = Schema.object({\n memoryPath: Schema.string().default(process.env.DSH_MEMORY_PATH ?? ''),\n})\n\n/**\n * Resolve the harness home the same way the harness does (`$DSH_HOME`, or\n * `~/.dsh`). Paths must never depend on the launch cwd: DSH does not chdir.\n */\nfunction resolveMemoryPath(value: string): string {\n const v = value.trim()\n if (v.length === 0) return join((process.env.DSH_HOME?.trim() || join(homedir(), '.dsh')), 'memory-vault')\n return isAbsolute(v) ? v : join(process.env.DSH_HOME?.trim() || join(homedir(), '.dsh'), v)\n}\n\nexport function apply(ctx: Context, config: Config) {\n // This plugin is a placeholder; actual MCP wiring is via cordis.patch.yml\n // dsh-mcp-client row. This module allows Config validation and logs.\n const memoryPath = resolveMemoryPath(config.memoryPath)\n if (!existsSync(memoryPath)) {\n console.warn(`[memory-mcp] vault not found at ${memoryPath} — it will be created on first use.`)\n }\n console.log(`[memory-mcp] MEMORY_PATH=${memoryPath}`)\n}\n"],"mappings":";;;;;;AAMA,MAAa,OAAO;AAMpB,MAAaA,SAAyB,OAAO,OAAO,EAClD,YAAY,OAAO,QAAQ,CAAC,QAAQ,QAAQ,IAAI,mBAAmB,GAAG,EACvE,CAAC;;;;;AAMF,SAAS,kBAAkB,OAAuB;CAChD,MAAM,IAAI,MAAM,MAAM;AACtB,KAAI,EAAE,WAAW,EAAG,QAAO,KAAM,QAAQ,IAAI,UAAU,MAAM,IAAI,KAAK,SAAS,EAAE,OAAO,EAAG,eAAe;AAC1G,QAAO,WAAW,EAAE,GAAG,IAAI,KAAK,QAAQ,IAAI,UAAU,MAAM,IAAI,KAAK,SAAS,EAAE,OAAO,EAAE,EAAE;;AAG7F,SAAgB,MAAM,KAAc,QAAgB;CAGlD,MAAM,aAAa,kBAAkB,OAAO,WAAW;AACvD,KAAI,CAAC,WAAW,WAAW,CACzB,SAAQ,KAAK,mCAAmC,WAAW,qCAAqC;AAElG,SAAQ,IAAI,4BAA4B,aAAa"}
package/package.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "@luisarg/memory-mcp",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "DSH MCP client for the memory vault",
6
+ "repository": { "type": "git", "url": "git+https://github.com/Luisarg03/dsh-memory-vault.git" },
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": { ".": { "types": "./dist/index.d.ts", "default": "./dist/index.js" } },
10
+ "files": ["dist/", "cordis.patch.yml"],
11
+ "dsh": { "bundle": { "patch": "./cordis.patch.yml" } },
12
+ "scripts": { "build": "tsdown", "dev": "tsdown --watch", "test": "vitest run --passWithNoTests", "prepare": "tsdown" },
13
+ "dependencies": {
14
+ "@deepseek-ai/cordis": "4.0.1",
15
+ "@deepseek-ai/schemastery": "3.18.1"
16
+ },
17
+ "devDependencies": { "typescript": "^5.9.2", "tsdown": "^0.15.6" }
18
+ }