@antonbabenko/deliberation-mcp 3.7.0 → 3.8.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.
Files changed (2) hide show
  1. package/dist/index.js +17 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -632,9 +632,14 @@ var require_orchestrate = __commonJS({
632
632
  async function askOne2(provider, req, opts = {}) {
633
633
  return callProvider(provider, req, opts.logger || NULL_LOGGER, opts.tool || "ask-one", opts.cache, opts.orientationFiles);
634
634
  }
635
+ var MAX_PEER_OPINION_CHARS = 2e3;
636
+ function capPeerOpinion(text) {
637
+ if (typeof text !== "string" || text.length <= MAX_PEER_OPINION_CHARS) return text;
638
+ return text.slice(0, MAX_PEER_OPINION_CHARS) + "\n...[truncated]";
639
+ }
635
640
  function buildArbiterPrompt(question, opinions) {
636
641
  const blocks = opinions.map((o, i) => `### Opinion ${i + 1}
637
- ${o.text}`).join("\n\n");
642
+ ${capPeerOpinion(o.text)}`).join("\n\n");
638
643
  return [
639
644
  "You are the arbiter. Below are independent expert opinions on the same question.",
640
645
  "Cross-review them: note where they agree, where they disagree, and which view is best supported.",
@@ -688,7 +693,7 @@ ${blocks}`,
688
693
  const peerBlocks = results.map((r) => {
689
694
  if (r.isError) return `Peer ${r.source}: ERRORED`;
690
695
  const issues = (r.criticalIssues || []).map((i) => ` - [${i.category}] ${i.description}`).join("\n");
691
- return `Peer ${r.source}: ${r.verdict || "UNKNOWN"}${issues ? "\n" + issues : ""}`;
696
+ return capPeerOpinion(`Peer ${r.source}: ${r.verdict || "UNKNOWN"}${issues ? "\n" + issues : ""}`);
692
697
  }).join("\n");
693
698
  return [
694
699
  "ADJUDICATE the peer reviews below and give ONE overall verdict.",
@@ -790,7 +795,7 @@ ${feedback || "(reviewers gave no specific issues; tighten the weakest part)"}`
790
795
  opinions: lastResults
791
796
  };
792
797
  }
793
- module2.exports = { askAll: askAll2, askOne: askOne2, consensus: consensus2, buildArbiterPrompt, runToConvergence: runToConvergence2 };
798
+ module2.exports = { askAll: askAll2, askOne: askOne2, consensus: consensus2, buildArbiterPrompt, buildAdjudicationPrompt, runToConvergence: runToConvergence2 };
794
799
  }
795
800
  });
796
801
 
@@ -1073,6 +1078,14 @@ var require_analyze = __commonJS({
1073
1078
  sessionsPersist: !!(meta && meta.sessionsPersist),
1074
1079
  eventsParsed: evs.length,
1075
1080
  sessionsRead: recs.length,
1081
+ // sessionsDir is the dir the RUNNING server resolved (passed by the caller).
1082
+ // /deliberation:doctor compares this to the shell-resolved path to detect the
1083
+ // XDG_CACHE_HOME / DELIBERATION_SESSIONS drift that silently empties Lens B.
1084
+ sessionsDir: meta && meta.sessionsDir || null,
1085
+ // Total agreement votes across all models. sessionsRead>0 with agreementVotes==0
1086
+ // means records exist but none carry a per-opinion verdict (old or ask-all runs) -
1087
+ // Lens B is empty for a content reason, not a read-path one.
1088
+ agreementVotes: agreement.reduce((n, a) => n + (a && a.votes ? a.votes : 0), 0),
1076
1089
  insufficientData: stats.length === 0
1077
1090
  }
1078
1091
  };
@@ -5331,7 +5344,7 @@ function buildServer({ providers, getConfig, getConfigError, sessionsDir, notify
5331
5344
  if (rec) records.push(rec);
5332
5345
  }
5333
5346
  }
5334
- return analyzeCore.buildAnalysis(events, records, cfg, { logPath, debugEnabled, sessionsPersist: persist });
5347
+ return analyzeCore.buildAnalysis(events, records, cfg, { logPath, debugEnabled, sessionsPersist: persist, sessionsDir });
5335
5348
  }
5336
5349
  async function call(name, args) {
5337
5350
  const namedExpert = EXPERTS.includes(name) ? name : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antonbabenko/deliberation-mcp",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "description": "Deliberation for Claude Code and any MCP host - GPT, Gemini, Grok, and OpenRouter expert subagents.",
5
5
  "mcpName": "io.github.antonbabenko/deliberation",
6
6
  "repository": { "type": "git", "url": "git+https://github.com/antonbabenko/deliberation.git", "directory": "server/mcp" },