@synth-coder/memhub 0.2.3 → 0.2.4

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.
Files changed (143) hide show
  1. package/.eslintrc.cjs +45 -45
  2. package/.factory/commands/opsx-apply.md +150 -150
  3. package/.factory/commands/opsx-archive.md +155 -155
  4. package/.factory/commands/opsx-explore.md +171 -171
  5. package/.factory/commands/opsx-propose.md +104 -104
  6. package/.factory/skills/openspec-apply-change/SKILL.md +156 -156
  7. package/.factory/skills/openspec-archive-change/SKILL.md +114 -114
  8. package/.factory/skills/openspec-explore/SKILL.md +288 -288
  9. package/.factory/skills/openspec-propose/SKILL.md +110 -110
  10. package/.github/workflows/ci.yml +110 -74
  11. package/.github/workflows/release.yml +67 -0
  12. package/.iflow/commands/opsx-apply.md +152 -152
  13. package/.iflow/commands/opsx-archive.md +157 -157
  14. package/.iflow/commands/opsx-explore.md +173 -173
  15. package/.iflow/commands/opsx-propose.md +106 -106
  16. package/.iflow/skills/openspec-apply-change/SKILL.md +156 -156
  17. package/.iflow/skills/openspec-archive-change/SKILL.md +114 -114
  18. package/.iflow/skills/openspec-explore/SKILL.md +288 -288
  19. package/.iflow/skills/openspec-propose/SKILL.md +110 -110
  20. package/.prettierrc +11 -11
  21. package/AGENTS.md +167 -169
  22. package/README.md +276 -195
  23. package/README.zh-CN.md +245 -193
  24. package/dist/src/cli/agents/claude-code.d.ts +5 -0
  25. package/dist/src/cli/agents/claude-code.d.ts.map +1 -0
  26. package/dist/src/cli/agents/claude-code.js +14 -0
  27. package/dist/src/cli/agents/claude-code.js.map +1 -0
  28. package/dist/src/cli/agents/cline.d.ts +5 -0
  29. package/dist/src/cli/agents/cline.d.ts.map +1 -0
  30. package/dist/src/cli/agents/cline.js +14 -0
  31. package/dist/src/cli/agents/cline.js.map +1 -0
  32. package/dist/src/cli/agents/codex.d.ts +5 -0
  33. package/dist/src/cli/agents/codex.d.ts.map +1 -0
  34. package/dist/src/cli/agents/codex.js +14 -0
  35. package/dist/src/cli/agents/codex.js.map +1 -0
  36. package/dist/src/cli/agents/cursor.d.ts +5 -0
  37. package/dist/src/cli/agents/cursor.d.ts.map +1 -0
  38. package/dist/src/cli/agents/cursor.js +14 -0
  39. package/dist/src/cli/agents/cursor.js.map +1 -0
  40. package/dist/src/cli/agents/factory-droid.d.ts +5 -0
  41. package/dist/src/cli/agents/factory-droid.d.ts.map +1 -0
  42. package/dist/src/cli/agents/factory-droid.js +14 -0
  43. package/dist/src/cli/agents/factory-droid.js.map +1 -0
  44. package/dist/src/cli/agents/gemini-cli.d.ts +5 -0
  45. package/dist/src/cli/agents/gemini-cli.d.ts.map +1 -0
  46. package/dist/src/cli/agents/gemini-cli.js +14 -0
  47. package/dist/src/cli/agents/gemini-cli.js.map +1 -0
  48. package/dist/src/cli/agents/index.d.ts +14 -0
  49. package/dist/src/cli/agents/index.d.ts.map +1 -0
  50. package/dist/src/cli/agents/index.js +30 -0
  51. package/dist/src/cli/agents/index.js.map +1 -0
  52. package/dist/src/cli/agents/windsurf.d.ts +5 -0
  53. package/dist/src/cli/agents/windsurf.d.ts.map +1 -0
  54. package/dist/src/cli/agents/windsurf.js +14 -0
  55. package/dist/src/cli/agents/windsurf.js.map +1 -0
  56. package/dist/src/cli/index.d.ts +8 -0
  57. package/dist/src/cli/index.d.ts.map +1 -0
  58. package/dist/src/cli/index.js +168 -0
  59. package/dist/src/cli/index.js.map +1 -0
  60. package/dist/src/cli/init.d.ts +34 -0
  61. package/dist/src/cli/init.d.ts.map +1 -0
  62. package/dist/src/cli/init.js +160 -0
  63. package/dist/src/cli/init.js.map +1 -0
  64. package/dist/src/cli/instructions.d.ts +29 -0
  65. package/dist/src/cli/instructions.d.ts.map +1 -0
  66. package/dist/src/cli/instructions.js +141 -0
  67. package/dist/src/cli/instructions.js.map +1 -0
  68. package/dist/src/cli/types.d.ts +22 -0
  69. package/dist/src/cli/types.d.ts.map +1 -0
  70. package/dist/src/cli/types.js +86 -0
  71. package/dist/src/cli/types.js.map +1 -0
  72. package/dist/src/contracts/mcp.js +34 -34
  73. package/dist/src/contracts/schemas.js.map +1 -1
  74. package/dist/src/server/mcp-server.d.ts.map +1 -1
  75. package/dist/src/server/mcp-server.js +7 -14
  76. package/dist/src/server/mcp-server.js.map +1 -1
  77. package/dist/src/services/embedding-service.d.ts.map +1 -1
  78. package/dist/src/services/embedding-service.js +1 -1
  79. package/dist/src/services/embedding-service.js.map +1 -1
  80. package/dist/src/services/memory-service.d.ts.map +1 -1
  81. package/dist/src/services/memory-service.js.map +1 -1
  82. package/dist/src/storage/markdown-storage.d.ts.map +1 -1
  83. package/dist/src/storage/markdown-storage.js +1 -1
  84. package/dist/src/storage/markdown-storage.js.map +1 -1
  85. package/dist/src/storage/vector-index.d.ts.map +1 -1
  86. package/dist/src/storage/vector-index.js +4 -5
  87. package/dist/src/storage/vector-index.js.map +1 -1
  88. package/docs/README.md +21 -0
  89. package/docs/mcp-tools.md +136 -0
  90. package/docs/user-guide.md +182 -0
  91. package/package.json +61 -59
  92. package/src/cli/agents/claude-code.ts +14 -0
  93. package/src/cli/agents/cline.ts +14 -0
  94. package/src/cli/agents/codex.ts +14 -0
  95. package/src/cli/agents/cursor.ts +14 -0
  96. package/src/cli/agents/factory-droid.ts +14 -0
  97. package/src/cli/agents/gemini-cli.ts +14 -0
  98. package/src/cli/agents/index.ts +36 -0
  99. package/src/cli/agents/windsurf.ts +14 -0
  100. package/src/cli/index.ts +192 -0
  101. package/src/cli/init.ts +218 -0
  102. package/src/cli/instructions.ts +156 -0
  103. package/src/cli/types.ts +112 -0
  104. package/src/contracts/index.ts +12 -12
  105. package/src/contracts/mcp.ts +223 -223
  106. package/src/contracts/schemas.ts +307 -307
  107. package/src/contracts/types.ts +410 -410
  108. package/src/index.ts +8 -8
  109. package/src/server/index.ts +5 -5
  110. package/src/server/mcp-server.ts +169 -186
  111. package/src/services/embedding-service.ts +114 -114
  112. package/src/services/index.ts +5 -5
  113. package/src/services/memory-service.ts +656 -663
  114. package/src/storage/frontmatter-parser.ts +243 -243
  115. package/src/storage/index.ts +6 -6
  116. package/src/storage/markdown-storage.ts +228 -236
  117. package/src/storage/vector-index.ts +159 -160
  118. package/src/utils/index.ts +5 -5
  119. package/src/utils/slugify.ts +63 -63
  120. package/test/cli/init.test.ts +380 -0
  121. package/test/contracts/schemas.test.ts +313 -313
  122. package/test/contracts/types.test.ts +21 -21
  123. package/test/frontmatter-parser-more.test.ts +94 -94
  124. package/test/server/mcp-server.test.ts +211 -210
  125. package/test/services/memory-service-edge.test.ts +248 -248
  126. package/test/services/memory-service.test.ts +291 -279
  127. package/test/storage/frontmatter-parser.test.ts +223 -223
  128. package/test/storage/markdown-storage.test.ts +226 -217
  129. package/test/storage/storage-edge.test.ts +238 -238
  130. package/test/storage/vector-index.test.ts +149 -153
  131. package/test/utils/slugify-edge.test.ts +94 -94
  132. package/test/utils/slugify.test.ts +72 -68
  133. package/tsconfig.json +25 -25
  134. package/tsconfig.test.json +8 -8
  135. package/vitest.config.ts +29 -29
  136. package/docs/architecture-diagrams.md +0 -368
  137. package/docs/architecture.md +0 -381
  138. package/docs/contracts.md +0 -190
  139. package/docs/prompt-template.md +0 -33
  140. package/docs/proposals/mcp-typescript-sdk-refactor.md +0 -568
  141. package/docs/proposals/proposal-close-gates.md +0 -58
  142. package/docs/tool-calling-policy.md +0 -101
  143. package/docs/vector-search.md +0 -306
@@ -0,0 +1,136 @@
1
+ # MCP Tools Reference
2
+
3
+ MemHub exposes two MCP tools for AI agents to manage persistent memory.
4
+
5
+ ---
6
+
7
+ ## memory_load
8
+
9
+ Load relevant memories to get context for the current task.
10
+
11
+ ### Parameters
12
+
13
+ | Parameter | Type | Required | Description |
14
+ | ----------- | -------- | -------- | ----------------------------------------------------------- |
15
+ | `query` | string | No | Search query to filter memories |
16
+ | `tags` | string[] | No | Filter by tags |
17
+ | `limit` | number | No | Max memories to return (default: 10) |
18
+ | `entryType` | string | No | Filter by type: `preference`, `decision`, `context`, `fact` |
19
+
20
+ ### Returns
21
+
22
+ ```json
23
+ {
24
+ "memories": [
25
+ {
26
+ "id": "uuid",
27
+ "title": "Memory title",
28
+ "content": "Memory content...",
29
+ "tags": ["tag1", "tag2"],
30
+ "category": "engineering",
31
+ "importance": 4,
32
+ "createdAt": "2026-03-04T10:00:00.000Z",
33
+ "updatedAt": "2026-03-04T10:00:00.000Z"
34
+ }
35
+ ],
36
+ "count": 1
37
+ }
38
+ ```
39
+
40
+ ### When to Call
41
+
42
+ - Starting a new conversation or task
43
+ - User mentions "before", "remember", "last time"
44
+ - Uncertain about user preferences or constraints
45
+ - Need project context (tech stack, conventions)
46
+
47
+ ### Example
48
+
49
+ ```json
50
+ {
51
+ "query": "testing framework",
52
+ "tags": ["preference"],
53
+ "limit": 5
54
+ }
55
+ ```
56
+
57
+ ---
58
+
59
+ ## memory_update
60
+
61
+ Store new memories or update existing ones.
62
+
63
+ ### Parameters
64
+
65
+ | Parameter | Type | Required | Description |
66
+ | ------------ | -------- | -------- | ------------------------------------------ |
67
+ | `title` | string | Yes | Short, descriptive title |
68
+ | `content` | string | Yes | Detailed memory content |
69
+ | `tags` | string[] | No | Tags for categorization |
70
+ | `entryType` | string | No | Memory type (default: `fact`) |
71
+ | `category` | string | No | Category (e.g., `engineering`, `business`) |
72
+ | `importance` | number | No | Importance 1-5 (default: 3) |
73
+ | `id` | string | No | Existing memory ID to update |
74
+
75
+ ### Entry Types
76
+
77
+ | Type | Purpose |
78
+ | ------------ | -------------------------------------------------- |
79
+ | `preference` | User preferences (coding style, framework choices) |
80
+ | `decision` | Architecture decisions, technology choices |
81
+ | `context` | Project context (team, processes, constraints) |
82
+ | `fact` | Learned facts, important notes |
83
+
84
+ ### Returns
85
+
86
+ ```json
87
+ {
88
+ "id": "uuid",
89
+ "title": "Memory title",
90
+ "createdAt": "2026-03-04T10:00:00.000Z"
91
+ }
92
+ ```
93
+
94
+ ### When to Call
95
+
96
+ - User explicitly expresses a preference
97
+ - Made a significant decision with reasoning
98
+ - Discovered important project context
99
+ - User corrected an assumption
100
+
101
+ ### Example
102
+
103
+ ```json
104
+ {
105
+ "title": "Use Vitest for Testing",
106
+ "content": "User prefers Vitest over Jest for all new projects. Reason: faster test execution and better ESM support.",
107
+ "tags": ["testing", "preference"],
108
+ "entryType": "preference",
109
+ "importance": 4
110
+ }
111
+ ```
112
+
113
+ ---
114
+
115
+ ## Best Practices
116
+
117
+ ### What to Store
118
+
119
+ **Good candidates:**
120
+
121
+ - User preferences (coding style, frameworks)
122
+ - Technical decisions and their reasoning
123
+ - Project constraints and conventions
124
+ - Lessons learned from mistakes
125
+
126
+ **Avoid storing:**
127
+
128
+ - Temporary information
129
+ - One-time tasks
130
+ - Sensitive data (API keys, passwords)
131
+
132
+ ### Memory Principles
133
+
134
+ 1. **Natural trigger** - Memory calls should be context-driven
135
+ 2. **Value first** - Only store what future conversations benefit from
136
+ 3. **Preferences matter** - User preferences are the most valuable memories
@@ -0,0 +1,182 @@
1
+ # MemHub User Guide
2
+
3
+ MemHub is a Git-friendly memory system for AI coding agents. It helps your AI remember preferences, decisions, and project context across conversations.
4
+
5
+ ## Installation
6
+
7
+ ### Quick Setup (Recommended)
8
+
9
+ Configure MemHub for your AI agent with one command:
10
+
11
+ ```bash
12
+ npx -y @synth-coder/memhub init
13
+ ```
14
+
15
+ This will:
16
+
17
+ 1. Add MCP server config to your agent's configuration file
18
+ 2. Add MemHub usage instructions to your agent's rules file
19
+
20
+ ### Supported Agents
21
+
22
+ | Agent | Global Config | Local Config |
23
+ | ------------- | ------------------------------------- | ----------------------------------- |
24
+ | Claude Code | `~/.claude/settings.json` | `.mcp.json` |
25
+ | Cursor | `~/.cursor/mcp.json` | `.cursor/mcp.json` |
26
+ | Cline | `~/.cline/mcp.json` | `.cline/mcp.json` |
27
+ | Windsurf | `~/.codeium/windsurf/mcp_config.json` | `.codeium/windsurf/mcp_config.json` |
28
+ | Factory Droid | `~/.factory/mcp.json` | `.factory/mcp.json` |
29
+ | Gemini CLI | `~/.gemini/settings.json` | `.gemini/settings.json` |
30
+ | Codex | `~/.codex/config.toml` | `.codex/config.toml` |
31
+
32
+ ### CLI Options
33
+
34
+ ```bash
35
+ # Interactive selection (global - default)
36
+ npx -y @synth-coder/memhub init
37
+
38
+ # Specify agent
39
+ npx -y @synth-coder/memhub init -a claude-code
40
+
41
+ # Configure for current project only (local)
42
+ npx -y @synth-coder/memhub init -a cursor -l
43
+
44
+ # Update existing configuration
45
+ npx -y @synth-coder/memhub init -a claude-code --force
46
+ ```
47
+
48
+ | Option | Description |
49
+ | -------------------- | ----------------------------------------------- |
50
+ | `-a, --agent <name>` | Agent type (skip interactive) |
51
+ | `-l, --local` | Configure for current project (default: global) |
52
+ | `-f, --force` | Update existing configuration |
53
+
54
+ ---
55
+
56
+ ## How It Works
57
+
58
+ ### Memory Tools
59
+
60
+ MemHub provides two MCP tools for your AI agent:
61
+
62
+ #### `memory_load` - Recall Context
63
+
64
+ Your AI calls this when it needs to remember something:
65
+
66
+ - User mentions "before", "remember", "last time"
67
+ - Uncertain about user preferences
68
+ - Need historical context for a decision
69
+
70
+ #### `memory_update` - Store Knowledge
71
+
72
+ Your AI calls this when it learns something worth remembering:
73
+
74
+ - User expresses a preference ("I prefer functional components")
75
+ - Made a significant decision with reasoning
76
+ - Discovered important project context
77
+ - User corrected an assumption
78
+
79
+ ### Memory Types
80
+
81
+ | Type | Purpose | Example |
82
+ | ------------ | ------------------- | ------------------------------------ |
83
+ | `preference` | User preferences | "Prefers TypeScript over JavaScript" |
84
+ | `decision` | Technical decisions | "Using PostgreSQL for scalability" |
85
+ | `context` | Project context | "Team uses conventional commits" |
86
+ | `fact` | Learned facts | "API rate limit is 1000 req/min" |
87
+
88
+ ---
89
+
90
+ ## Storage
91
+
92
+ ### Where Memories Are Stored
93
+
94
+ By default, memories are stored in `~/.memhub/` (global) or `./memories/` (local).
95
+
96
+ ```bash
97
+ # Custom storage location
98
+ MEMHUB_STORAGE_PATH=/path/to/memories npx -y @synth-coder/memhub
99
+ ```
100
+
101
+ ### File Format
102
+
103
+ Memories are plain Markdown files with YAML front matter:
104
+
105
+ ```markdown
106
+ ---
107
+ id: '550e8400-e29b-41d4-a716-446655440000'
108
+ created_at: '2026-03-04T10:00:00.000Z'
109
+ tags:
110
+ - architecture
111
+ - tdd
112
+ category: 'engineering'
113
+ importance: 4
114
+ ---
115
+
116
+ # Use Contract-First Design
117
+
118
+ Define tool contracts and schemas before implementation.
119
+ ```
120
+
121
+ ### Git Integration
122
+
123
+ Since memories are plain text files, you can:
124
+
125
+ - Commit them to your repository
126
+ - Review changes in pull requests
127
+ - Revert if needed
128
+ - Share with your team
129
+
130
+ ---
131
+
132
+ ## Environment Variables
133
+
134
+ | Variable | Default | Description |
135
+ | --------------------- | ----------- | ------------------------------------------- |
136
+ | `MEMHUB_STORAGE_PATH` | `~/.memhub` | Memory storage directory |
137
+ | `MEMHUB_LOG_LEVEL` | `info` | Log level: `debug`, `info`, `warn`, `error` |
138
+
139
+ ---
140
+
141
+ ## Tips
142
+
143
+ ### What to Remember
144
+
145
+ **Good candidates:**
146
+
147
+ - User preferences (coding style, frameworks)
148
+ - Technical decisions and their reasoning
149
+ - Project constraints and conventions
150
+ - Lessons learned from mistakes
151
+
152
+ **Avoid storing:**
153
+
154
+ - Temporary information
155
+ - One-time tasks
156
+ - Sensitive data (API keys, passwords)
157
+
158
+ ### Memory Principles
159
+
160
+ 1. **Natural trigger** - Memory calls should be context-driven, not scheduled
161
+ 2. **Value first** - Only store what future conversations will benefit from
162
+ 3. **Preferences matter** - User preferences are the most valuable memories
163
+
164
+ ---
165
+
166
+ ## Troubleshooting
167
+
168
+ ### Configuration not working?
169
+
170
+ 1. Restart your AI agent after running `init`
171
+ 2. Check the config file exists and contains `memhub` server
172
+ 3. Try with `--force` to update existing configuration
173
+
174
+ ### Memories not loading?
175
+
176
+ 1. Check `MEMHUB_STORAGE_PATH` is correct
177
+ 2. Verify the directory contains `.md` files
178
+ 3. Check file permissions
179
+
180
+ ### Need help?
181
+
182
+ - GitHub Issues: https://github.com/synth-coder/memhub/issues
package/package.json CHANGED
@@ -1,59 +1,61 @@
1
- {
2
- "name": "@synth-coder/memhub",
3
- "version": "0.2.3",
4
- "description": "A Git-friendly memory hub using Markdown-based storage with YAML Front Matter",
5
- "type": "module",
6
- "main": "dist/src/index.js",
7
- "types": "dist/src/index.d.ts",
8
- "bin": {
9
- "memhub": "dist/src/server/mcp-server.js"
10
- },
11
- "scripts": {
12
- "build": "tsc",
13
- "dev": "tsc --watch",
14
- "test": "vitest run",
15
- "test:watch": "vitest",
16
- "test:coverage": "vitest run --coverage",
17
- "lint": "eslint src test --ext .ts",
18
- "lint:fix": "eslint src test --ext .ts --fix",
19
- "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"docs/**/*.md\"",
20
- "format:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\" \"docs/**/*.md\"",
21
- "typecheck": "tsc --noEmit --project tsconfig.json",
22
- "quality": "npm run lint && npm run typecheck && npm run test:coverage",
23
- "ci": "npm run quality"
24
- },
25
- "keywords": [
26
- "mcp",
27
- "memory",
28
- "markdown",
29
- "yaml",
30
- "git-friendly"
31
- ],
32
- "author": "",
33
- "license": "MIT",
34
- "dependencies": {
35
- "@lancedb/lancedb": "^0.26.2",
36
- "@modelcontextprotocol/sdk": "^1.27.1",
37
- "@xenova/transformers": "^2.17.2",
38
- "proper-lockfile": "^4.1.2",
39
- "sharp": "^0.34.5",
40
- "yaml": "^2.8.2",
41
- "zod": "^3.25.76"
42
- },
43
- "devDependencies": {
44
- "@types/node": "^20.19.35",
45
- "@types/proper-lockfile": "^4.1.4",
46
- "@typescript-eslint/eslint-plugin": "^6.21.0",
47
- "@typescript-eslint/parser": "^6.21.0",
48
- "@vitest/coverage-v8": "^1.6.1",
49
- "eslint": "^8.57.1",
50
- "eslint-config-prettier": "^9.1.2",
51
- "eslint-plugin-import": "^2.32.0",
52
- "prettier": "^3.8.1",
53
- "typescript": "^5.9.3",
54
- "vitest": "^1.6.1"
55
- },
56
- "engines": {
57
- "node": ">=18.0.0"
58
- }
59
- }
1
+ {
2
+ "name": "@synth-coder/memhub",
3
+ "version": "0.2.4",
4
+ "description": "A Git-friendly memory hub using Markdown-based storage with YAML Front Matter",
5
+ "type": "module",
6
+ "main": "dist/src/index.js",
7
+ "types": "dist/src/index.d.ts",
8
+ "bin": {
9
+ "memhub": "dist/src/cli/index.js"
10
+ },
11
+ "keywords": [
12
+ "mcp",
13
+ "memory",
14
+ "markdown",
15
+ "yaml",
16
+ "git-friendly"
17
+ ],
18
+ "author": "",
19
+ "license": "MIT",
20
+ "dependencies": {
21
+ "@clack/prompts": "^1.1.0",
22
+ "@lancedb/lancedb": "^0.26.2",
23
+ "@modelcontextprotocol/sdk": "^1.27.1",
24
+ "@xenova/transformers": "^2.17.2",
25
+ "proper-lockfile": "^4.1.2",
26
+ "sharp": "^0.34.5",
27
+ "smol-toml": "^1.6.0",
28
+ "yaml": "^2.8.2",
29
+ "zod": "^3.25.76"
30
+ },
31
+ "devDependencies": {
32
+ "@types/node": "^20.19.35",
33
+ "@types/proper-lockfile": "^4.1.4",
34
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
35
+ "@typescript-eslint/parser": "^6.21.0",
36
+ "@vitest/coverage-v8": "^1.6.1",
37
+ "eslint": "^8.57.1",
38
+ "eslint-config-prettier": "^9.1.2",
39
+ "eslint-plugin-import": "^2.32.0",
40
+ "prettier": "^3.8.1",
41
+ "typescript": "^5.9.3",
42
+ "vitest": "^1.6.1"
43
+ },
44
+ "engines": {
45
+ "node": ">=20.0.0"
46
+ },
47
+ "scripts": {
48
+ "build": "tsc",
49
+ "dev": "tsc --watch",
50
+ "test": "vitest run",
51
+ "test:watch": "vitest",
52
+ "test:coverage": "vitest run --coverage",
53
+ "lint": "eslint src test --ext .ts",
54
+ "lint:fix": "eslint src test --ext .ts --fix",
55
+ "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"docs/**/*.md\"",
56
+ "format:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\" \"docs/**/*.md\"",
57
+ "typecheck": "tsc --noEmit --project tsconfig.json",
58
+ "quality": "npm run lint && npm run typecheck && npm run test:coverage",
59
+ "ci": "npm run quality"
60
+ }
61
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Claude Code MCP configuration generator
3
+ */
4
+
5
+ export function generateClaudeCodeConfig(_memhubPath: string): Record<string, unknown> {
6
+ return {
7
+ mcpServers: {
8
+ memhub: {
9
+ command: 'npx',
10
+ args: ['-y', '@synth-coder/memhub'],
11
+ },
12
+ },
13
+ };
14
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Cline MCP configuration generator
3
+ */
4
+
5
+ export function generateClineConfig(_memhubPath: string): Record<string, unknown> {
6
+ return {
7
+ mcpServers: {
8
+ memhub: {
9
+ command: 'npx',
10
+ args: ['-y', '@synth-coder/memhub'],
11
+ },
12
+ },
13
+ };
14
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Codex MCP configuration generator
3
+ */
4
+
5
+ export function generateCodexConfig(_memhubPath: string): Record<string, unknown> {
6
+ return {
7
+ mcpServers: {
8
+ memhub: {
9
+ command: 'npx',
10
+ args: ['-y', '@synth-coder/memhub'],
11
+ },
12
+ },
13
+ };
14
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Cursor MCP configuration generator
3
+ */
4
+
5
+ export function generateCursorConfig(_memhubPath: string): Record<string, unknown> {
6
+ return {
7
+ mcpServers: {
8
+ memhub: {
9
+ command: 'npx',
10
+ args: ['-y', '@synth-coder/memhub'],
11
+ },
12
+ },
13
+ };
14
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Factory Droid MCP configuration generator
3
+ */
4
+
5
+ export function generateFactoryDroidConfig(_memhubPath: string): Record<string, unknown> {
6
+ return {
7
+ mcpServers: {
8
+ memhub: {
9
+ command: 'npx',
10
+ args: ['-y', '@synth-coder/memhub'],
11
+ },
12
+ },
13
+ };
14
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Gemini CLI MCP configuration generator
3
+ */
4
+
5
+ export function generateGeminiCliConfig(_memhubPath: string): Record<string, unknown> {
6
+ return {
7
+ mcpServers: {
8
+ memhub: {
9
+ command: 'npx',
10
+ args: ['-y', '@synth-coder/memhub'],
11
+ },
12
+ },
13
+ };
14
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Agent configuration generators index
3
+ */
4
+
5
+ export { generateCursorConfig } from './cursor.js';
6
+ export { generateClaudeCodeConfig } from './claude-code.js';
7
+ export { generateClineConfig } from './cline.js';
8
+ export { generateWindsurfConfig } from './windsurf.js';
9
+ export { generateFactoryDroidConfig } from './factory-droid.js';
10
+ export { generateGeminiCliConfig } from './gemini-cli.js';
11
+ export { generateCodexConfig } from './codex.js';
12
+
13
+ import type { AgentType } from '../types.js';
14
+ import { generateCursorConfig } from './cursor.js';
15
+ import { generateClaudeCodeConfig } from './claude-code.js';
16
+ import { generateClineConfig } from './cline.js';
17
+ import { generateWindsurfConfig } from './windsurf.js';
18
+ import { generateFactoryDroidConfig } from './factory-droid.js';
19
+ import { generateGeminiCliConfig } from './gemini-cli.js';
20
+ import { generateCodexConfig } from './codex.js';
21
+
22
+ export type ConfigGenerator = (memhubPath: string) => Record<string, unknown>;
23
+
24
+ const generators: Record<AgentType, ConfigGenerator> = {
25
+ cursor: generateCursorConfig,
26
+ 'claude-code': generateClaudeCodeConfig,
27
+ cline: generateClineConfig,
28
+ windsurf: generateWindsurfConfig,
29
+ 'factory-droid': generateFactoryDroidConfig,
30
+ 'gemini-cli': generateGeminiCliConfig,
31
+ codex: generateCodexConfig,
32
+ };
33
+
34
+ export function getConfigGenerator(agentId: AgentType): ConfigGenerator {
35
+ return generators[agentId];
36
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Windsurf MCP configuration generator
3
+ */
4
+
5
+ export function generateWindsurfConfig(_memhubPath: string): Record<string, unknown> {
6
+ return {
7
+ mcpServers: {
8
+ memhub: {
9
+ command: 'npx',
10
+ args: ['-y', '@synth-coder/memhub'],
11
+ },
12
+ },
13
+ };
14
+ }