codex-dev-mcp-suite 1.5.1 → 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.1",
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",
@@ -38,7 +38,7 @@ import { computeStats, formatText, formatJson } from "../lib/stats.js";
38
38
 
39
39
  const VAULT_ROOT =
40
40
  process.env.MEMORY_VAULT_DIR ||
41
- path.join(os.homedir(), ".codex", "memories", "vault");
41
+ path.join(os.homedir(), ".ai-shared-memory", "vault");
42
42
 
43
43
  const MAX_CONTENT = 200_000;
44
44
  const MAX_TITLE = 200;
@@ -647,7 +647,7 @@ class ProjectMemoryServer {
647
647
  ? path.dirname(process.env.JOURNAL_DIR)
648
648
  : process.env.CHECKPOINT_DIR
649
649
  ? path.dirname(process.env.CHECKPOINT_DIR)
650
- : path.join(os.homedir(), ".codex", "memories"));
650
+ : path.join(os.homedir(), ".ai-shared-memory"));
651
651
  const stats = computeStats({ root, topLimit: top });
652
652
  const text = json ? formatJson(stats) : formatText(stats);
653
653
  return { content: [{ type: "text", text }] };