monomind 1.11.1 → 1.11.3

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.
@@ -1 +1 @@
1
- {"sessionId":"ed60b548-7aa2-4e96-bcec-4eaf8aa33732","pid":74650,"procStart":"Mon Jun 1 16:07:08 2026","acquiredAt":1780344677932}
1
+ {"sessionId":"03297c7b-619d-4277-81a8-5710ba82cb61","pid":6026,"procStart":"Thu Jun 4 08:02:16 2026","acquiredAt":1780700957322}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monomind",
3
- "version": "1.11.1",
3
+ "version": "1.11.3",
4
4
  "description": "Monomind - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -198,6 +198,7 @@ export declare function getSchemaResource(db: Db): {
198
198
  export declare function getGraphResource(db: Db): {
199
199
  nodes: unknown[];
200
200
  edges: unknown[];
201
+ capturedAt: string;
201
202
  };
202
203
  export declare function getMonographCypher(db: Db, query: string): {
203
204
  rows: Record<string, unknown>[];
@@ -229,12 +229,14 @@ export function detectMonographChanges(db, opts, repoPath) {
229
229
  const affectedSymbols = [];
230
230
  const seenIds = new Set();
231
231
  for (const rel of changedFiles) {
232
- const abs = join(repoPath, rel);
233
- const nodes = getNodesForFile(db, abs);
232
+ // DB stores relative paths; try both relative and absolute to be safe
233
+ const nodes = getNodesForFile(db, rel).length > 0
234
+ ? getNodesForFile(db, rel)
235
+ : getNodesForFile(db, join(repoPath, rel));
234
236
  for (const n of nodes) {
235
237
  if (!seenIds.has(n.id)) {
236
238
  seenIds.add(n.id);
237
- affectedSymbols.push({ id: n.id, name: n.name, label: n.label, filePath: n.filePath ?? abs });
239
+ affectedSymbols.push({ id: n.id, name: n.name, label: n.label, filePath: n.filePath ?? rel });
238
240
  }
239
241
  }
240
242
  }
@@ -351,7 +353,8 @@ export async function getMonographStaleness(repoPath) {
351
353
  if (existsSync(dbPath)) {
352
354
  const db = openDb(dbPath);
353
355
  try {
354
- const meta = db.prepare("SELECT value FROM index_meta WHERE key = 'lastCommit'").get();
356
+ // monomind's indexer writes ua_last_commit; published monograph@1.1.0 writes lastCommit
357
+ const meta = db.prepare("SELECT value FROM index_meta WHERE key IN ('ua_last_commit','lastCommit') LIMIT 1").get();
355
358
  lastCommit = meta?.value ?? null;
356
359
  }
357
360
  finally {
@@ -379,7 +382,7 @@ export async function getMonographStaleness(repoPath) {
379
382
  catch { /* skip */ }
380
383
  if (commitsBehind > 0) {
381
384
  try {
382
- firstDivergingCommitTime = execSync(`git show -s --format=%cI ${lastCommit}..HEAD -- | head -1`, {
385
+ firstDivergingCommitTime = execSync(`git log -1 --format=%cI ${lastCommit}..HEAD`, {
383
386
  cwd: repoPath, encoding: 'utf-8',
384
387
  }).trim() || undefined;
385
388
  }
@@ -503,19 +506,17 @@ export function getSchemaResource(db) {
503
506
  }
504
507
  // 10d. getGraphResource
505
508
  export function getGraphResource(db) {
506
- let nodes = [];
507
- let edges = [];
508
509
  try {
509
510
  const snap = snapshotFromDb(db);
510
- // snapshotFromDb returns a graphology graph; export via raw SQL for a stable shape
511
- nodes = db.prepare('SELECT * FROM nodes LIMIT 2000').all();
512
- edges = db.prepare('SELECT * FROM edges LIMIT 10000').all();
511
+ return {
512
+ nodes: snap.nodes.slice(0, 2000),
513
+ edges: snap.edges.slice(0, 10000),
514
+ capturedAt: snap.capturedAt,
515
+ };
513
516
  }
514
517
  catch {
515
- nodes = db.prepare('SELECT * FROM nodes LIMIT 2000').all();
516
- edges = db.prepare('SELECT * FROM edges LIMIT 10000').all();
518
+ return { nodes: [], edges: [], capturedAt: new Date().toISOString() };
517
519
  }
518
- return { nodes, edges };
519
520
  }
520
521
  // ─── Tier 2: Best-effort / correctly-shaped degradation ───────────────────────
521
522
  // 11. getMonographCypher — minimal single-hop MATCH evaluator
@@ -919,7 +920,7 @@ export async function getGroupList(configPath) {
919
920
  try {
920
921
  const db = openDb(dbPath);
921
922
  nodeCount = countNodes(db);
922
- const meta = db.prepare("SELECT value FROM index_meta WHERE key = 'indexedAt'").get();
923
+ const meta = db.prepare("SELECT value FROM index_meta WHERE key IN ('ua_analyzed_at','indexedAt') LIMIT 1").get();
923
924
  indexedAt = meta?.value ?? null;
924
925
  closeDb(db);
925
926
  }
@@ -1046,12 +1047,12 @@ export async function getGroupStatus(configPath) {
1046
1047
  const db = openDb(dbPath);
1047
1048
  const nc = countNodes(db);
1048
1049
  const contracts = db.prepare("SELECT COUNT(*) as n FROM nodes WHERE label = 'Route'").get();
1049
- const meta = db.prepare("SELECT value FROM index_meta WHERE key = 'lastCommit'").get();
1050
+ const meta = db.prepare("SELECT value FROM index_meta WHERE key IN ('ua_last_commit','lastCommit') LIMIT 1").get();
1050
1051
  closeDb(db);
1051
1052
  groups.push({
1052
1053
  name,
1053
1054
  indexed: nc > 0,
1054
- stale: false, // we'd need git to detect; default false
1055
+ stale: false, // git-based staleness check requires repoPath; default false
1055
1056
  contractCount: contracts?.n ?? 0,
1056
1057
  ...(meta?.value ? { lastSync: meta.value } : {}),
1057
1058
  });
@@ -1073,9 +1074,9 @@ export async function serveMonograph(opts) {
1073
1074
  if (_httpServer) {
1074
1075
  return { status: 'already_running', url: _serverUrl ?? `http://localhost:${port}` };
1075
1076
  }
1076
- const nodes = opts.db.prepare('SELECT * FROM nodes LIMIT 500').all();
1077
- const edges = opts.db.prepare('SELECT * FROM edges LIMIT 3000').all();
1078
- const html = toHtml(nodes, edges);
1077
+ // snapshotFromDb returns camelCase nodes/edges as toHtml expects (filePath, communityId, sourceId, targetId)
1078
+ const snap = snapshotFromDb(opts.db);
1079
+ const html = toHtml(snap.nodes.slice(0, 500), snap.edges.slice(0, 3000));
1079
1080
  _httpServer = createServer((req, res) => {
1080
1081
  res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
1081
1082
  res.end(html);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monoes/monomindcli",
3
- "version": "1.11.1",
3
+ "version": "1.11.3",
4
4
  "type": "module",
5
5
  "description": "Monomind CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",