@maximalabs/dev-mcp-suite 0.0.0-stage → 3.6.1

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 (68) hide show
  1. package/.env.example +69 -0
  2. package/CHANGELOG.md +281 -0
  3. package/CODEX_DEV_MCP_GUIDE.md +297 -0
  4. package/LICENSE +21 -0
  5. package/README.md +193 -2
  6. package/armada/package.json +14 -0
  7. package/armada/server.js +329 -0
  8. package/backfill-sessions-v2.mjs +288 -0
  9. package/bin/_meta.mjs +73 -0
  10. package/bin/armada-mcp.mjs +12 -0
  11. package/bin/checkpoint.mjs +9 -0
  12. package/bin/context-pack.mjs +9 -0
  13. package/bin/devjournal.mjs +9 -0
  14. package/bin/init.mjs +25 -0
  15. package/bin/project-memory.mjs +10 -0
  16. package/bin/provider-smoke.mjs +278 -0
  17. package/bin/prune.mjs +158 -0
  18. package/bin/stats.mjs +101 -0
  19. package/bin/ui.mjs +5 -0
  20. package/checkpoint/package.json +14 -0
  21. package/checkpoint/server.js +318 -0
  22. package/context-pack/package.json +14 -0
  23. package/context-pack/server.js +747 -0
  24. package/devjournal/compress.js +75 -0
  25. package/devjournal/env.js +3 -0
  26. package/devjournal/package.json +14 -0
  27. package/devjournal/provider-chain.js +109 -0
  28. package/devjournal/rerank.js +120 -0
  29. package/devjournal/server.js +415 -0
  30. package/docs/ROADMAP.md +77 -0
  31. package/docs/clients/antigravity.md +52 -0
  32. package/docs/clients/claude-code.md +46 -0
  33. package/docs/clients/codex.md +39 -0
  34. package/docs/clients/generic-mcp.md +45 -0
  35. package/docs/clients/hermes.md +48 -0
  36. package/docs/configuration.md +123 -0
  37. package/docs/privacy.md +39 -0
  38. package/docs/providers.md +13 -0
  39. package/docs/superpowers/plans/2026-06-15-hardening-v1-2-implementation.md +60 -0
  40. package/docs/superpowers/plans/2026-06-15-provider-chain-v1-1-implementation.md +65 -0
  41. package/docs/superpowers/plans/2026-06-15-provider-client-agnostic-config.md +41 -0
  42. package/docs/superpowers/plans/2026-06-15-trust-release-implementation.md +62 -0
  43. package/docs/superpowers/plans/2026-06-18-v1-5-0-knowledge-graph.md +792 -0
  44. package/docs/superpowers/specs/2026-06-15-provider-chain-v1-1-design.md +89 -0
  45. package/docs/superpowers/specs/2026-06-15-trust-release-design.md +164 -0
  46. package/docs/superpowers/specs/2026-06-18-dev-mcp-suite-v1-5-0-knowledge-graph-design.md +386 -0
  47. package/docs/superpowers/specs/2026-07-22-v2-0-0-peak-intelligence.md +50 -0
  48. package/docs/superpowers/specs/2026-07-22-v3-0-0-god-tier.md +32 -0
  49. package/lib/init-wizard.js +120 -0
  50. package/lib/provider-smoke.js +234 -0
  51. package/lib/prune.js +114 -0
  52. package/lib/stats.js +269 -0
  53. package/lib/ui-server.js +151 -0
  54. package/lib/update-check.js +125 -0
  55. package/package.json +71 -4
  56. package/project-memory/auto-indexer.js +152 -0
  57. package/project-memory/dedup.js +49 -0
  58. package/project-memory/embedding.js +174 -0
  59. package/project-memory/env.js +3 -0
  60. package/project-memory/global-index.js +46 -0
  61. package/project-memory/graph.js +93 -0
  62. package/project-memory/local-embed.js +92 -0
  63. package/project-memory/package.json +14 -0
  64. package/project-memory/provider-chain.js +109 -0
  65. package/project-memory/rerank.js +120 -0
  66. package/project-memory/server.js +931 -0
  67. package/project-memory/swarm.js +56 -0
  68. package/run-tests.mjs +54 -0
package/lib/stats.js ADDED
@@ -0,0 +1,269 @@
1
+ /**
2
+ * Dev MCP Suite — stats aggregation library.
3
+ *
4
+ * Pure functions for summarizing local memory storage across the three stores
5
+ * (vault / journal / checkpoints). No MCP, no stdio — used by bin/stats.mjs
6
+ * and safe to import from tests.
7
+ *
8
+ * Storage layout assumed (see each MCP server's server.js for source of truth):
9
+ * <root>/vault/<slug>/notes/*.md (one .md per memory_save note)
10
+ * <root>/journal/<slug>/journal.jsonl (append-only entries)
11
+ * <root>/journal/<slug>/handoff.json (optional)
12
+ * <root>/checkpoints/<slug>/snapshots/<id>/ (one dir per snapshot)
13
+ * <root>/checkpoints/<slug>/manifest.json (checkpoint index)
14
+ */
15
+
16
+ import fs from "fs";
17
+ import path from "path";
18
+
19
+ const VAULT_DIRNAME = "vault";
20
+ const JOURNAL_DIRNAME = "journal";
21
+ const CHECKPOINT_DIRNAME = "checkpoints";
22
+
23
+ function safeListDirs(parent) {
24
+ try {
25
+ return fs
26
+ .readdirSync(parent, { withFileTypes: true })
27
+ .filter((d) => d.isDirectory())
28
+ .map((d) => d.name);
29
+ } catch {
30
+ return [];
31
+ }
32
+ }
33
+
34
+ function safeListFiles(parent) {
35
+ try {
36
+ return fs.readdirSync(parent);
37
+ } catch {
38
+ return [];
39
+ }
40
+ }
41
+
42
+ function newestMtimeMs(dir) {
43
+ try {
44
+ const stat = fs.statSync(dir);
45
+ return stat.mtimeMs;
46
+ } catch {
47
+ return 0;
48
+ }
49
+ }
50
+
51
+ function isoFromMs(ms) {
52
+ if (!ms) return null;
53
+ return new Date(ms).toISOString();
54
+ }
55
+
56
+ function isTempSlug(slug) {
57
+ return /^tmp\./.test(slug);
58
+ }
59
+
60
+ function summarizeProject(slug, { root }) {
61
+ const vaultDir = path.join(root, VAULT_DIRNAME, slug);
62
+ const journalDir = path.join(root, JOURNAL_DIRNAME, slug);
63
+ const cpDir = path.join(root, CHECKPOINT_DIRNAME, slug);
64
+
65
+ const notesDir = path.join(vaultDir, "notes");
66
+ const notes = safeListFiles(notesDir).filter((f) => f.endsWith(".md")).length;
67
+
68
+ let journalEntries = 0;
69
+ let lastEntryTs = null;
70
+ const jl = path.join(journalDir, "journal.jsonl");
71
+ if (fs.existsSync(jl)) {
72
+ try {
73
+ const lines = fs.readFileSync(jl, "utf8").split("\n").filter(Boolean);
74
+ journalEntries = lines.length;
75
+ // journal entries are append-only and roughly time-ordered; parse first + last
76
+ for (const line of lines) {
77
+ try {
78
+ const obj = JSON.parse(line);
79
+ if (obj && obj.ts) {
80
+ if (!lastEntryTs || obj.ts > lastEntryTs) lastEntryTs = obj.ts;
81
+ }
82
+ } catch { /* skip malformed */ }
83
+ }
84
+ } catch { /* ignore read errors */ }
85
+ }
86
+
87
+ // checkpoints: count snapshot dirs
88
+ let checkpoints = 0;
89
+ const snapsDir = path.join(cpDir, "snapshots");
90
+ if (fs.existsSync(snapsDir)) {
91
+ checkpoints = safeListDirs(snapsDir).length;
92
+ }
93
+
94
+ // last activity across all artifacts (mtime fallback)
95
+ let lastActivityMs = 0;
96
+ for (const d of [vaultDir, journalDir, cpDir]) {
97
+ const m = newestMtimeMs(d);
98
+ if (m > lastActivityMs) lastActivityMs = m;
99
+ }
100
+ // prefer parsed entry ts if newer than filesystem mtime
101
+ if (lastEntryTs) {
102
+ const t = Date.parse(lastEntryTs);
103
+ if (!Number.isNaN(t) && t > lastActivityMs) lastActivityMs = t;
104
+ }
105
+ const lastActivityTs = isoFromMs(lastActivityMs);
106
+
107
+ return {
108
+ slug,
109
+ notes,
110
+ journalEntries,
111
+ checkpoints,
112
+ lastActivityTs,
113
+ temp: isTempSlug(slug),
114
+ };
115
+ }
116
+
117
+ /**
118
+ * Compute aggregate stats for a memory root.
119
+ * @param {object} opts
120
+ * @param {string} opts.root - absolute path to memories root (containing vault/, journal/, checkpoints/)
121
+ * @param {number} [opts.topLimit=10] - max entries in topByNotes / recentActivity
122
+ * @returns {{
123
+ * root: string,
124
+ * totals: { notes: number, journalProjects: number, checkpoints: number },
125
+ * projectCount: number,
126
+ * topByNotes: Array<{ slug: string, notes: number }>,
127
+ * recentActivity: Array<{ slug: string, ts: string }>,
128
+ * tempSlugs: string[],
129
+ * perProject: Array<{ slug: string, notes: number, journalEntries: number, checkpoints: number, lastActivityTs: string|null, temp: boolean }>,
130
+ * }}
131
+ */
132
+ export function computeStats({ root, topLimit = 10 } = {}) {
133
+ if (!root) throw new Error("computeStats: `root` is required");
134
+
135
+ // union of slugs across all three stores
136
+ const slugSet = new Set();
137
+ for (const store of [VAULT_DIRNAME, JOURNAL_DIRNAME, CHECKPOINT_DIRNAME]) {
138
+ for (const slug of safeListDirs(path.join(root, store))) slugSet.add(slug);
139
+ }
140
+
141
+ const perProject = [...slugSet]
142
+ .map((slug) => summarizeProject(slug, { root }))
143
+ .sort((a, b) => {
144
+ if (a.temp !== b.temp) return a.temp ? 1 : -1; // real first
145
+ return a.slug.localeCompare(b.slug);
146
+ });
147
+
148
+ const totals = perProject.reduce(
149
+ (acc, p) => ({
150
+ notes: acc.notes + p.notes,
151
+ journalProjects: acc.journalProjects + (p.journalEntries > 0 ? 1 : 0),
152
+ checkpoints: acc.checkpoints + p.checkpoints,
153
+ }),
154
+ { notes: 0, journalProjects: 0, checkpoints: 0 },
155
+ );
156
+
157
+ const topByNotes = [...perProject]
158
+ .filter((p) => p.notes > 0)
159
+ .sort((a, b) => b.notes - a.notes || a.slug.localeCompare(b.slug))
160
+ .slice(0, topLimit)
161
+ .map((p) => ({ slug: p.slug, notes: p.notes }));
162
+
163
+ const recentActivity = [...perProject]
164
+ .filter((p) => p.lastActivityTs && !p.temp)
165
+ .sort((a, b) => (a.lastActivityTs < b.lastActivityTs ? 1 : -1))
166
+ .slice(0, topLimit)
167
+ .map((p) => ({ slug: p.slug, ts: p.lastActivityTs }));
168
+
169
+ const tempSlugs = perProject.filter((p) => p.temp).map((p) => p.slug).sort();
170
+
171
+ return {
172
+ root,
173
+ totals,
174
+ projectCount: perProject.length,
175
+ topByNotes,
176
+ recentActivity,
177
+ tempSlugs,
178
+ perProject,
179
+ };
180
+ }
181
+
182
+ /** Right-pad a slug to a fixed display width. */
183
+ function pad(s, w) {
184
+ s = String(s);
185
+ if (s.length >= w) return s + " ";
186
+ return s + " ".repeat(w - s.length);
187
+ }
188
+ function rpadNum(n, w) {
189
+ const s = String(n);
190
+ return s.length >= w ? s : " ".repeat(w - s.length) + s;
191
+ }
192
+
193
+ function formatLocal(ts) {
194
+ if (!ts) return "—";
195
+ try {
196
+ return new Date(ts).toISOString().replace("T", " ").replace(/\.\d+Z$/, "Z");
197
+ } catch {
198
+ return ts;
199
+ }
200
+ }
201
+
202
+ /**
203
+ * Human-readable text summary.
204
+ * @param {ReturnType<typeof computeStats>} stats
205
+ * @param {object} [opts]
206
+ * @param {string} [opts.timezone="UTC"] - display-only label, not used to convert
207
+ */
208
+ export function formatText(stats, opts = {}) {
209
+ const lines = [];
210
+ lines.push("Dev MCP Suite — stats");
211
+ lines.push("======================");
212
+ lines.push(`Storage root: ${stats.root}`);
213
+ lines.push("");
214
+ lines.push("Totals");
215
+ lines.push("------");
216
+ lines.push(` Notes: ${stats.totals.notes}`);
217
+ lines.push(` Journal projects:${rpadNum(stats.totals.journalProjects, 2)}`);
218
+ lines.push(` Checkpoints: ${stats.totals.checkpoints}`);
219
+ lines.push(` Distinct projects: ${stats.projectCount}`);
220
+ lines.push("");
221
+
222
+ if (stats.topByNotes.length) {
223
+ lines.push(`Top projects by notes (top ${stats.topByNotes.length})`);
224
+ lines.push("------------------------");
225
+ const slugW = Math.max(8, ...stats.topByNotes.map((p) => p.slug.length));
226
+ for (const p of stats.topByNotes) {
227
+ lines.push(` ${rpadNum(p.notes, 4)} ${pad(p.slug, slugW)}`);
228
+ }
229
+ lines.push("");
230
+ }
231
+
232
+ if (stats.recentActivity.length) {
233
+ lines.push("Most recent activity");
234
+ lines.push("--------------------");
235
+ const slugW = Math.max(8, ...stats.recentActivity.map((p) => p.slug.length));
236
+ for (const p of stats.recentActivity) {
237
+ lines.push(` ${pad(p.slug, slugW)} ${formatLocal(p.ts)}`);
238
+ }
239
+ lines.push("");
240
+ }
241
+
242
+ if (stats.tempSlugs.length) {
243
+ lines.push(`Temp/cleanup candidates (${stats.tempSlugs.length})`);
244
+ lines.push("------------------------");
245
+ for (const slug of stats.tempSlugs) lines.push(` ${slug}`);
246
+ lines.push("");
247
+ } else {
248
+ lines.push("Temp/cleanup candidates: none");
249
+ lines.push("");
250
+ }
251
+
252
+ lines.push(`Generated at ${new Date().toISOString()}`);
253
+ return lines.join("\n");
254
+ }
255
+
256
+ /** Stable JSON serialization (sorted keys for top-level + totals). */
257
+ export function formatJson(stats) {
258
+ const out = {
259
+ root: stats.root,
260
+ totals: stats.totals,
261
+ projectCount: stats.projectCount,
262
+ topByNotes: stats.topByNotes,
263
+ recentActivity: stats.recentActivity,
264
+ tempSlugs: stats.tempSlugs,
265
+ perProject: stats.perProject,
266
+ generatedAt: new Date().toISOString(),
267
+ };
268
+ return JSON.stringify(out, null, 2);
269
+ }
@@ -0,0 +1,151 @@
1
+ /**
2
+ * Built-in Web GUI Dashboard Server for Dev MCP Suite (v3.0.0 God-Tier).
3
+ * Zero external dependencies. Serves a glassmorphic dashboard on http://localhost:3333
4
+ */
5
+
6
+ import http from "http";
7
+ import fs from "fs/promises";
8
+ import path from "path";
9
+ import os from "os";
10
+ import { computeStats } from "./stats.js";
11
+
12
+ const DEFAULT_PORT = 3333;
13
+ const STORAGE_ROOT = path.join(os.homedir(), ".ai-shared-memory");
14
+
15
+ function renderHtml() {
16
+ return `<!DOCTYPE html>
17
+ <html lang="en">
18
+ <head>
19
+ <meta charset="UTF-8">
20
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
21
+ <title>Dev MCP Suite — Peak Dashboard</title>
22
+ <style>
23
+ :root {
24
+ --bg: #0d1117;
25
+ --card-bg: rgba(22, 27, 34, 0.75);
26
+ --accent: #58a6ff;
27
+ --accent-glow: rgba(88, 166, 255, 0.3);
28
+ --text: #c9d1d9;
29
+ --border: rgba(48, 54, 61, 0.8);
30
+ }
31
+ * { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
32
+ body { background: var(--bg); color: var(--text); padding: 20px; }
33
+ header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
34
+ h1 { color: #fff; font-size: 22px; display: flex; align-items: center; gap: 10px; }
35
+ .grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-top: 20px; }
36
+ .card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 20px; backdrop-filter: blur(10px); }
37
+ .card h2 { font-size: 16px; color: var(--accent); margin-bottom: 15px; }
38
+ canvas { width: 100%; height: 350px; background: #010409; border-radius: 8px; border: 1px solid var(--border); }
39
+ ul { list-style: none; }
40
+ li { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13px; }
41
+ .badge { background: var(--accent-glow); color: var(--accent); padding: 2px 8px; border-radius: 12px; font-size: 11px; }
42
+ </style>
43
+ </head>
44
+ <body>
45
+ <header>
46
+ <h1>🚀 Dev MCP Suite <span class="badge">v3.0.0 God-Tier</span></h1>
47
+ <div>Local Storage: <code>~/.ai-shared-memory</code></div>
48
+ </header>
49
+
50
+ <div class="grid">
51
+ <div class="card">
52
+ <h2>🌌 3D/2D Knowledge Graph View</h2>
53
+ <canvas id="graphCanvas"></canvas>
54
+ </div>
55
+ <div class="card">
56
+ <h2>📊 Live Storage Stats</h2>
57
+ <div id="statsBox">Loading stats...</div>
58
+ </div>
59
+ </div>
60
+
61
+ <script>
62
+ const canvas = document.getElementById('graphCanvas');
63
+ const ctx = canvas.getContext('2d');
64
+ canvas.width = canvas.offsetWidth;
65
+ canvas.height = canvas.offsetHeight;
66
+
67
+ // Animated node graph preview
68
+ const nodes = Array.from({length: 12}, (_, i) => ({
69
+ x: Math.random() * canvas.width,
70
+ y: Math.random() * canvas.height,
71
+ vx: (Math.random() - 0.5) * 0.8,
72
+ vy: (Math.random() - 0.5) * 0.8,
73
+ name: \`Note-\${i+1}\`
74
+ }));
75
+
76
+ function draw() {
77
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
78
+
79
+ // Draw edges
80
+ ctx.strokeStyle = 'rgba(88, 166, 255, 0.15)';
81
+ ctx.lineWidth = 1;
82
+ for(let i=0; i<nodes.length; i++) {
83
+ for(let j=i+1; j<nodes.length; j++) {
84
+ ctx.beginPath();
85
+ ctx.moveTo(nodes[i].x, nodes[i].y);
86
+ ctx.lineTo(nodes[j].x, nodes[j].y);
87
+ ctx.stroke();
88
+ }
89
+ }
90
+
91
+ // Draw nodes
92
+ nodes.forEach(n => {
93
+ n.x += n.vx; n.y += n.vy;
94
+ if(n.x < 10 || n.x > canvas.width - 10) n.vx *= -1;
95
+ if(n.y < 10 || n.y > canvas.height - 10) n.vy *= -1;
96
+
97
+ ctx.fillStyle = '#58a6ff';
98
+ ctx.beginPath();
99
+ ctx.arc(n.x, n.y, 6, 0, Math.PI * 2);
100
+ ctx.fill();
101
+
102
+ ctx.fillStyle = '#8b949e';
103
+ ctx.font = '10px sans-serif';
104
+ ctx.fillText(n.name, n.x + 10, n.y + 3);
105
+ });
106
+
107
+ requestAnimationFrame(draw);
108
+ }
109
+ draw();
110
+
111
+ fetch('/api/stats')
112
+ .then(r => r.json())
113
+ .then(s => {
114
+ document.getElementById('statsBox').innerHTML = \`
115
+ <ul>
116
+ <li><strong>Total Vault Notes:</strong> \${s.totalNotes || 0}</li>
117
+ <li><strong>Journal Projects:</strong> \${s.totalJournalProjects || 0}</li>
118
+ <li><strong>Checkpoints:</strong> \${s.totalCheckpoints || 0}</li>
119
+ </ul>
120
+ \`;
121
+ }).catch(() => {
122
+ document.getElementById('statsBox').innerHTML = "Ready";
123
+ });
124
+ </script>
125
+ </body>
126
+ </html>`;
127
+ }
128
+
129
+ export function startUiServer(port = DEFAULT_PORT) {
130
+ const server = http.createServer(async (req, res) => {
131
+ if (req.url === "/" || req.url === "/index.html") {
132
+ res.writeHead(200, { "Content-Type": "text/html" });
133
+ res.end(renderHtml());
134
+
135
+ } else if (req.url === "/api/stats") {
136
+ const stats = computeStats({ root: STORAGE_ROOT });
137
+ res.writeHead(200, { "Content-Type": "application/json" });
138
+ res.end(JSON.stringify(stats));
139
+
140
+ } else {
141
+ res.writeHead(404, { "Content-Type": "text/plain" });
142
+ res.end("Not Found");
143
+ }
144
+ });
145
+
146
+ server.listen(port, () => {
147
+ console.log(`\n🚀 [Dev MCP Suite UI] Web Dashboard running on http://localhost:${port}\n`);
148
+ });
149
+
150
+ return server;
151
+ }
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Non-blocking, cached upstream update checker for Dev MCP Suite.
3
+ * Checks npm registry (https://registry.npmjs.org/@maximalabs%2Fdev-mcp-suite/latest)
4
+ * once every 24 hours. Safe for stdio MCP transport (logs only to stderr).
5
+ */
6
+
7
+ import http from "http";
8
+ import https from "https";
9
+ import fs from "fs";
10
+ import path from "path";
11
+ import os from "os";
12
+ import { fileURLToPath } from "url";
13
+
14
+ const CACHE_FILE = path.join(os.homedir(), ".ai-shared-memory", ".update-check-cache.json");
15
+ const CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000; // 24 hours
16
+ const PKG_NAME = "@maximalabs/dev-mcp-suite";
17
+
18
+ /** Reads current package version from package.json */
19
+ function getCurrentVersion() {
20
+ try {
21
+ const dir = path.dirname(fileURLToPath(import.meta.url));
22
+ const pkgPath = path.join(dir, "..", "package.json");
23
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
24
+ return pkg.version || "1.8.2";
25
+ } catch {
26
+ return "1.8.2";
27
+ }
28
+ }
29
+
30
+ /** Simple version comparator (e.g. "1.9.0" > "1.8.2") */
31
+ export function isNewerVersion(current, latest) {
32
+ if (!current || !latest) return false;
33
+ const c = current.split(".").map(Number);
34
+ const l = latest.split(".").map(Number);
35
+ for (let i = 0; i < 3; i++) {
36
+ if ((l[i] || 0) > (c[i] || 0)) return true;
37
+ if ((l[i] || 0) < (c[i] || 0)) return false;
38
+ }
39
+ return false;
40
+ }
41
+
42
+ /** Check npm registry for latest version asynchronously with timeout */
43
+ function fetchLatestNpmVersion() {
44
+ return new Promise((resolve) => {
45
+ const req = https.get(
46
+ `https://registry.npmjs.org/${encodeURIComponent(PKG_NAME)}/latest`,
47
+ { headers: { "User-Agent": `${PKG_NAME}-update-check` }, timeout: 1500 },
48
+ (res) => {
49
+ if (res.statusCode !== 200) return resolve(null);
50
+ let body = "";
51
+ res.on("data", (chunk) => (body += chunk));
52
+ res.on("end", () => {
53
+ try {
54
+ const data = JSON.parse(body);
55
+ resolve(data.version || null);
56
+ } catch {
57
+ resolve(null);
58
+ }
59
+ });
60
+ }
61
+ );
62
+ req.on("error", () => resolve(null));
63
+ req.on("timeout", () => {
64
+ req.destroy();
65
+ resolve(null);
66
+ });
67
+ });
68
+ }
69
+
70
+ /**
71
+ * Triggers a background check for updates.
72
+ * Never blocks process execution or breaks stdio protocol.
73
+ */
74
+ export async function checkForUpdates() {
75
+ try {
76
+ if (process.env.MCP_DISABLE_UPDATE_CHECK || process.env.CI || process.env.NO_NETWORK) {
77
+ return null;
78
+ }
79
+ const now = Date.now();
80
+ let cache = { lastCheck: 0, latestVersion: null };
81
+
82
+ // Read existing cache if available
83
+ try {
84
+ if (fs.existsSync(CACHE_FILE)) {
85
+ cache = JSON.parse(fs.readFileSync(CACHE_FILE, "utf8"));
86
+ }
87
+ } catch { /* ignore cache read error */ }
88
+
89
+ const currentVersion = getCurrentVersion();
90
+
91
+ // If cache is fresh, check cached latest version
92
+ if (now - (cache.lastCheck || 0) < CHECK_INTERVAL_MS && cache.latestVersion) {
93
+ if (isNewerVersion(currentVersion, cache.latestVersion)) {
94
+ console.error(
95
+ `\n💡 [Dev MCP Suite] Update available: ${currentVersion} → ${cache.latestVersion}\n` +
96
+ ` Run "npm i -g ${PKG_NAME}@latest" or use "npx -y -p ${PKG_NAME}@latest"\n`
97
+ );
98
+ }
99
+ return;
100
+ }
101
+
102
+ // Perform background check
103
+ fetchLatestNpmVersion().then((latest) => {
104
+ if (!latest) return;
105
+
106
+ // Update cache
107
+ try {
108
+ const cacheDir = path.dirname(CACHE_FILE);
109
+ if (!fs.existsSync(cacheDir)) {
110
+ fs.mkdirSync(cacheDir, { recursive: true });
111
+ }
112
+ fs.writeFileSync(CACHE_FILE, JSON.stringify({ lastCheck: now, latestVersion: latest }));
113
+ } catch { /* ignore cache write error */ }
114
+
115
+ if (isNewerVersion(currentVersion, latest)) {
116
+ console.error(
117
+ `\n💡 [Dev MCP Suite] Update available: ${currentVersion} → ${latest}\n` +
118
+ ` Run "npm i -g ${PKG_NAME}@latest" or use "npx -y -p ${PKG_NAME}@latest"\n`
119
+ );
120
+ }
121
+ }).catch(() => {});
122
+ } catch {
123
+ /* Silent catch: update checks must never throw or disrupt the application */
124
+ }
125
+ }
package/package.json CHANGED
@@ -1,6 +1,73 @@
1
1
  {
2
2
  "name": "@maximalabs/dev-mcp-suite",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "3.6.1",
4
+ "description": "Local-first MCP servers for solo devs/vibecoders: persistent project memory, session handoff/resume, git-independent checkpoints, token-efficient briefings, and optional fleet ops via an Armada bus. Works with any MCP client.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "maximalabs",
8
+ "homepage": "https://github.com/MaximaLabs/dev-mcp-suite#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/MaximaLabs/dev-mcp-suite.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/MaximaLabs/dev-mcp-suite/issues"
15
+ },
16
+ "keywords": [
17
+ "mcp",
18
+ "model-context-protocol",
19
+ "codex",
20
+ "claude-code",
21
+ "cursor",
22
+ "ai-memory",
23
+ "developer-tools",
24
+ "llm",
25
+ "context",
26
+ "vibecoding"
27
+ ],
28
+ "engines": {
29
+ "node": ">=18"
30
+ },
31
+ "bin": {
32
+ "project-memory-mcp": "bin/project-memory.mjs",
33
+ "devjournal-mcp": "bin/devjournal.mjs",
34
+ "checkpoint-mcp": "bin/checkpoint.mjs",
35
+ "context-pack-mcp": "bin/context-pack.mjs",
36
+ "armada-mcp": "bin/armada-mcp.mjs",
37
+ "stats": "bin/stats.mjs",
38
+ "prune": "bin/prune.mjs",
39
+ "provider-smoke": "bin/provider-smoke.mjs",
40
+ "mcp-ui": "bin/ui.mjs",
41
+ "init": "bin/init.mjs",
42
+ "dev-mcp-suite": "bin/init.mjs"
43
+ },
44
+ "scripts": {
45
+ "test": "node run-tests.mjs",
46
+ "test:stats": "node tests/stats.test.mjs"
47
+ },
48
+ "dependencies": {
49
+ "@modelcontextprotocol/sdk": "^1.0.0"
50
+ },
51
+ "files": [
52
+ "bin/*.mjs",
53
+ "project-memory/*.js",
54
+ "project-memory/package.json",
55
+ "devjournal/*.js",
56
+ "devjournal/package.json",
57
+ "checkpoint/*.js",
58
+ "checkpoint/package.json",
59
+ "context-pack/*.js",
60
+ "context-pack/package.json",
61
+ "armada/*.js",
62
+ "armada/package.json",
63
+ "lib/*.js",
64
+ "backfill-sessions-v2.mjs",
65
+ "run-tests.mjs",
66
+ "docs/**/*.md",
67
+ "CODEX_DEV_MCP_GUIDE.md",
68
+ "CHANGELOG.md",
69
+ "README.md",
70
+ "LICENSE",
71
+ ".env.example"
72
+ ]
73
+ }