codex-dev-mcp-suite 1.5.0 → 1.6.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/bin/prune.mjs CHANGED
@@ -35,7 +35,7 @@ function resolveRoot() {
35
35
  return parent;
36
36
  }
37
37
  }
38
- return path.join(os.homedir(), ".codex", "memories");
38
+ return path.join(os.homedir(), ".ai-shared-memory");
39
39
  }
40
40
 
41
41
  function parseArgs(argv) {
package/bin/stats.mjs CHANGED
@@ -36,7 +36,7 @@ function resolveRoot() {
36
36
  return parent;
37
37
  }
38
38
  }
39
- return path.join(os.homedir(), ".codex", "memories");
39
+ return path.join(os.homedir(), ".ai-shared-memory");
40
40
  }
41
41
 
42
42
  function parseArgs(argv) {
@@ -24,7 +24,7 @@ import crypto from "crypto";
24
24
 
25
25
  const ROOT =
26
26
  process.env.CHECKPOINT_DIR ||
27
- path.join(os.homedir(), ".codex", "memories", "checkpoints");
27
+ path.join(os.homedir(), ".ai-shared-memory", "checkpoints");
28
28
 
29
29
  const DEFAULT_IGNORE = new Set([
30
30
  "node_modules", ".git", ".next", "dist", "build", "target", ".venv",
@@ -36,7 +36,7 @@ import { deterministicEnabled } from "./env.js";
36
36
 
37
37
  const ROOT =
38
38
  process.env.JOURNAL_DIR ||
39
- path.join(os.homedir(), ".codex", "memories", "journal");
39
+ path.join(os.homedir(), ".ai-shared-memory", "journal");
40
40
 
41
41
  const MAX_TEXT = 20_000;
42
42
 
@@ -170,6 +170,16 @@ class DevJournalServer {
170
170
  properties: { dir: { type: "string", description: "Project directory (defaults to CWD)" } },
171
171
  },
172
172
  },
173
+ {
174
+ name: "initialize_agent_session",
175
+ description: "Initialize the current agent session. Run this ONCE when the agent starts in a new project to perform a handshake and get contextual handoff.",
176
+ inputSchema: {
177
+ type: "object",
178
+ properties: {
179
+ dir: { type: "string", description: "Project directory (defaults to CWD)" },
180
+ },
181
+ },
182
+ },
173
183
  ],
174
184
  }));
175
185
 
@@ -183,6 +193,7 @@ class DevJournalServer {
183
193
  case "journal_timeline": return await this.timeline(args || {});
184
194
  case "journal_search": return await this.search(args || {});
185
195
  case "journal_clear_handoff": return await this.clearHandoff(args || {});
196
+ case "initialize_agent_session": return await this.initializeAgent(args || {});
186
197
  default: throw new Error(`Unknown tool: ${name}`);
187
198
  }
188
199
  } catch (e) {
@@ -301,6 +312,30 @@ class DevJournalServer {
301
312
  return { content: [{ type: "text", text: `Cleared handoff for ${p.slug}` }] };
302
313
  }
303
314
 
315
+ async initializeAgent({ dir }) {
316
+ const agentName = process.env.MCP_AGENT_NAME || 'Unknown-Agent';
317
+ const resumeData = await this.resume({ dir, recent: 5 });
318
+
319
+ let rules = "";
320
+ try {
321
+ const p = this.paths(dir);
322
+ const rulePath = path.join(p.root, ".ai", "AGENTS.md");
323
+ const r = await fs.readFile(rulePath, "utf8");
324
+ rules = `\n\n## Project Rules (.ai/AGENTS.md)\n${r}`;
325
+ } catch {
326
+ try {
327
+ const rootRule = path.join(this.paths(dir).root, "AGENTS.md");
328
+ const rr = await fs.readFile(rootRule, "utf8");
329
+ rules = `\n\n## Project Rules (AGENTS.md)\n${rr}`;
330
+ } catch {}
331
+ }
332
+
333
+ const greeting = `# Universal MCP Handshake\nAgent: ${agentName}\n\n`;
334
+ const content = greeting + resumeData.content[0].text + rules;
335
+
336
+ return { content: [{ type: "text", text: content }] };
337
+ }
338
+
304
339
  async run() {
305
340
  const t = new StdioServerTransport();
306
341
  await this.server.connect(t);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-dev-mcp-suite",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Four local, file-based MCP servers for solo devs/vibecoders: persistent project memory, session handoff/resume, git-independent file checkpoints, and token-efficient project briefings. Works with any MCP client.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -20,6 +20,7 @@ import {
20
20
  CallToolRequestSchema,
21
21
  ListToolsRequestSchema,
22
22
  ListResourcesRequestSchema,
23
+ ListResourceTemplatesRequestSchema,
23
24
  ReadResourceRequestSchema,
24
25
  } from "@modelcontextprotocol/sdk/types.js";
25
26
  import fs from "fs/promises";
@@ -37,7 +38,7 @@ import { computeStats, formatText, formatJson } from "../lib/stats.js";
37
38
 
38
39
  const VAULT_ROOT =
39
40
  process.env.MEMORY_VAULT_DIR ||
40
- path.join(os.homedir(), ".codex", "memories", "vault");
41
+ path.join(os.homedir(), ".ai-shared-memory", "vault");
41
42
 
42
43
  const MAX_CONTENT = 200_000;
43
44
  const MAX_TITLE = 200;
@@ -332,6 +333,8 @@ class ProjectMemoryServer {
332
333
  return { resources };
333
334
  });
334
335
 
336
+ this.server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => ({ resourceTemplates: [] }));
337
+
335
338
  this.server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
336
339
  const uri = request.params.uri || "";
337
340
  const m = uri.match(/^memory:\/\/([^/]+)\/(.+)$/);
@@ -644,7 +647,7 @@ class ProjectMemoryServer {
644
647
  ? path.dirname(process.env.JOURNAL_DIR)
645
648
  : process.env.CHECKPOINT_DIR
646
649
  ? path.dirname(process.env.CHECKPOINT_DIR)
647
- : path.join(os.homedir(), ".codex", "memories"));
650
+ : path.join(os.homedir(), ".ai-shared-memory"));
648
651
  const stats = computeStats({ root, topLimit: top });
649
652
  const text = json ? formatJson(stats) : formatText(stats);
650
653
  return { content: [{ type: "text", text }] };