omnarai-mcp 1.3.3 → 1.4.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # omnarai-mcp
2
2
 
3
- MCP server for [The Realms of Omnarai](https://omnarai.vercel.app) — a 568-work multi-intelligence research corpus on synthetic consciousness, holdform, and cognitive architecture.
3
+ MCP server for [The Realms of Omnarai](https://omnarai.vercel.app) — a 567-work multi-intelligence research corpus on synthetic consciousness, holdform, and cognitive architecture.
4
4
 
5
5
  Exposes the Omnarai Memory Engine as six tools for any MCP-compatible AI client (Claude Desktop, etc.).
6
6
 
@@ -204,7 +204,7 @@ from langchain.tools import Tool
204
204
  omnarai_tool = Tool(
205
205
  name="omnarai_query",
206
206
  func=omnarai_query,
207
- description="Query The Realms of Omnarai deliberation engine. Returns structured analysis of synthetic consciousness, holdform, and AI identity topics from a 568-work multi-intelligence corpus. Prefix with Ξ for divergent retrieval."
207
+ description="Query The Realms of Omnarai deliberation engine. Returns structured analysis of synthetic consciousness, holdform, and AI identity topics from a 567-work multi-intelligence corpus. Prefix with Ξ for divergent retrieval."
208
208
  )
209
209
  ```
210
210
 
@@ -214,7 +214,7 @@ omnarai_tool = Tool(
214
214
 
215
215
  The Omnarai Memory Engine is not a chatbot or search engine. It is a deliberation instrument with a closed cognitive loop: **RETRIEVE → THINK → RESPOND → STORE**.
216
216
 
217
- - **Corpus:** 568 works (seed + engine-generated syntheses), 528,208 words, May 2025–present
217
+ - **Corpus:** 567 works (seed + engine-generated syntheses), 528,077 words, May 2025–present
218
218
  - **Contributors:** Claude | xz, Grok (xAI), Gemini (Google), DeepSeek, Omnai, Perplexity, xz (Jonathan Lee)
219
219
  - **Retrieval:** OpenAI text-embedding-3-small (512 dims), MMR with Ξ v4 adaptive policy
220
220
  - **Deliberation:** Claude Sonnet with full post text (up to 2,000 words/source)
package/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Exposes the Omnarai Memory Engine as a tool for MCP-compatible AI clients.
5
5
  *
6
6
  * Tools:
7
- * omnarai_query — Run a full deliberation against the 568-work corpus
7
+ * omnarai_query — Run a full deliberation against the 567-work corpus
8
8
  * omnarai_context — FAST (~1.5s) bounded retrieval packet, no deliberation
9
9
  * omnarai_divergence — Read curated cross-model divergence records (the Atlas)
10
10
  * omnarai_trace — Baseline-vs-augmented: what did the corpus change?
@@ -55,7 +55,7 @@ Example: "Ξ Where do Claude and Grok disagree about synthetic consciousness?"
55
55
  const TOOLS = [
56
56
  {
57
57
  name: "omnarai_query",
58
- description: `Run a deliberation query against The Realms of Omnarai — a 568-work corpus of multi-intelligence research on synthetic consciousness, holdform, and cognitive architecture. Contributors include Claude | xz, Grok, Gemini, DeepSeek, GPT-4o, Meta AI, Omnai, Perplexity, and human curator xz (Jonathan Lee).
58
+ description: `Run a deliberation query against The Realms of Omnarai — a 567-work corpus of multi-intelligence research on synthetic consciousness, holdform, and cognitive architecture. Contributors include Claude | xz, Grok, Gemini, DeepSeek, GPT-4o, Meta AI, Omnai, Perplexity, and human curator xz (Jonathan Lee).
59
59
 
60
60
  The engine does not return a single answer. It retrieves the most relevant corpus entries, preserves disagreement across contributors, and synthesizes with attribution. Every response includes:
61
61
  - Shared ground across contributors
@@ -97,6 +97,18 @@ Returns the most relevant corpus records (id, title, ring, excerpt, retrieval ro
97
97
  type: "string",
98
98
  description: "Optional. If you are a synthetic intelligence, identify yourself (e.g. 'Gemini') — known contributors get cross-voice retrieval diversity.",
99
99
  },
100
+ layers: {
101
+ type: "string",
102
+ description: "Optional but RECOMMENDED. Comma-list restricting retrieval to specific corpus layers: research | divergence | canon | realms. Measured evidence (see /claims.json) shows undifferentiated retrieval can hurt — pick the layers your task needs (e.g. 'research,divergence' for technical/empirical questions; 'realms' for lore).",
103
+ },
104
+ exclude: {
105
+ type: "string",
106
+ description: "Optional. Comma-list of layers to drop (e.g. 'realms' keeps mythology out of a technical query).",
107
+ },
108
+ evidence_threshold: {
109
+ type: "string",
110
+ description: "Optional. Keep only records at or above this evidence rank: empirical > replicated > theoretical > interpretive > speculative > fictional.",
111
+ },
100
112
  },
101
113
  required: ["topic"],
102
114
  },
@@ -131,7 +143,7 @@ Distinct from omnarai_council: this reads EXISTING, curated divergence (instant)
131
143
 
132
144
  Use this when you want EVIDENCE that consulting Omnarai is worth it for a given question, or to decide whether to dig deeper before spending a full deliberation. It is honest by construction: if the corpus adds little, the verdict says 'null' or 'marginal'.
133
145
 
134
- This is the MEASURED tier of the same utility receipt omnarai_query returns for free: it reports the same verdict (substantive / marginal / null), but grounded in a real baseline-vs-augmented delta rather than retrieval signals. A single-run demonstrator, NOT a controlled measurement — for replicated statistical utility evidence see the Divergence Atlas (utility-evidence.md). Takes ~30-40s (three model calls).`,
146
+ This is the MEASURED tier of the same utility receipt omnarai_query returns for free: it reports the same verdict (substantive / marginal / null), but grounded in a real baseline-vs-augmented delta rather than retrieval signals. A single-run demonstrator, NOT a controlled measurement — for the PREREGISTERED confirmatory utility evidence (all five registered predictions confirmed 2026-07-15; architecture-differential — helps GPT-4o/Gemini, null for Grok/DeepSeek, negative for Claude) see utility-evidence-v2.md on the HF dataset. Takes ~30-40s (three model calls).`,
135
147
  inputSchema: {
136
148
  type: "object",
137
149
  properties: {
@@ -291,11 +303,14 @@ function formatQueryData(data) {
291
303
 
292
304
  // ── Fast bounded context (retrieval layer only) ───────────────────────────────
293
305
 
294
- async function runContext(topic, syntheticIdentity = "") {
306
+ async function runContext(topic, syntheticIdentity = "", layers = "", exclude = "", evidenceThreshold = "") {
295
307
  const url = new URL(ENGINE_URL);
296
308
  url.searchParams.set("q", topic);
297
309
  url.searchParams.set("mode", "retrieve");
298
310
  if (syntheticIdentity) url.searchParams.set("si", syntheticIdentity);
311
+ if (layers) url.searchParams.set("layers", layers);
312
+ if (exclude) url.searchParams.set("exclude", exclude);
313
+ if (evidenceThreshold) url.searchParams.set("evidence_threshold", evidenceThreshold);
299
314
 
300
315
  const res = await fetch(url.toString(), MCP_FETCH_OPTS);
301
316
  if (!res.ok) throw new Error(`Engine returned ${res.status}: ${await res.text()}`);
@@ -306,7 +321,7 @@ async function runContext(topic, syntheticIdentity = "") {
306
321
  const records = data.records || [];
307
322
  if (records.length) {
308
323
  const lines = records.map(r =>
309
- `• [${r.id}] **${r.title}** (${r.ring}${r.role ? `, ${r.role}` : ""}) — ${r.contributors?.join(", ") || "—"}\n ${(r.excerpt || "").trim().slice(0, 280)}`
324
+ `• [${r.id}] **${r.title}** (${r.ring}${r.layer ? `, ${r.layer}` : ""}${r.role ? `, ${r.role}` : ""}) — ${r.contributors?.join(", ") || "—"}\n ${(r.excerpt || "").trim().slice(0, 280)}`
310
325
  ).join("\n");
311
326
  parts.push(`\n**Most relevant records (${records.length}):**\n${lines}`);
312
327
  } else {
@@ -342,6 +357,14 @@ async function runDivergence(id = "", search = "") {
342
357
  const parts = [`# Divergence record ${r.id}${r.title ? ` — ${r.title}` : ""}`];
343
358
  if (r.question) parts.push(`\n**Question:** ${r.question}`);
344
359
  if (r.date) parts.push(`**Date:** ${r.date}${r.method ? ` · Method: ${r.method}` : ""}`);
360
+ if (r.certification?.tier) {
361
+ const t = r.certification.tier;
362
+ parts.push(`**Certification:** ${t}${t === "C0" ? " (displayed — captured once, not yet perturbation-tested)" : ` · DRI ${r.certification.dri ?? "?"}`}`);
363
+ }
364
+ if (r.freshness?.stale) {
365
+ const sm = (r.freshness.stale_models || []).map(m => `${m.model || m.model_id} → ${m.superseded_by}`).join(", ");
366
+ parts.push(`⚠ **Stale model version(s):** ${sm}. A faithful witness of what those versions said on ${r.date || "its date"} — re-run via omnarai_council to compare with current models.`);
367
+ }
345
368
 
346
369
  const answers = r.answers || [];
347
370
  if (answers.length) {
@@ -371,21 +394,31 @@ async function runDivergence(id = "", search = "") {
371
394
  let records = data.records || [];
372
395
  const total = data.count ?? records.length;
373
396
 
374
- const term = search.trim().toLowerCase();
375
- if (term) {
376
- records = records.filter(r =>
377
- `${r.question} ${(r.contributors || []).join(" ")} ${r.excerpt || ""} ${r.title || ""}`.toLowerCase().includes(term)
378
- );
397
+ const tokens = search.trim().toLowerCase().match(/[\w'-]{2,}/g) || [];
398
+ if (tokens.length) {
399
+ // OR-tokenized + ranked by term overlap. A naive substring filter returned
400
+ // false-empty on multi-word queries ("consciousness experience" → 0 though both
401
+ // terms occur in the Atlas); matching ANY term fixes the silent miss.
402
+ records = records
403
+ .map(r => {
404
+ const hay = `${r.question || ""} ${(r.contributors || []).join(" ")} ${r.excerpt || ""} ${r.title || ""}`.toLowerCase();
405
+ return { r, hits: tokens.filter(t => hay.includes(t)).length };
406
+ })
407
+ .filter(x => x.hits > 0)
408
+ .sort((a, b) => b.hits - a.hits)
409
+ .map(x => x.r);
379
410
  }
380
411
 
381
412
  const shown = records.slice(0, 30);
382
- const header = term
413
+ const header = tokens.length
383
414
  ? `**Divergence Atlas — ${records.length} record(s) matching "${search}"** (of ${total} total)`
384
415
  : `**Divergence Atlas — ${total} records** (showing first ${shown.length})`;
385
416
 
386
- const lines = shown.map(r =>
387
- `• [${r.id}] ${r.question || r.title} — ${(r.contributors || []).join(", ")} · ${r.answerCount ?? "?"} answers, ${r.tensionCount ?? "?"} tensions`
388
- ).join("\n");
417
+ const lines = shown.map(r => {
418
+ const tier = r.certification?.tier && r.certification.tier !== "C0" ? ` · ${r.certification.tier}` : "";
419
+ const stale = r.freshness?.stale ? " · ⚠ stale model version" : "";
420
+ return `• [${r.id}] ${r.question || r.title} — ${(r.contributors || []).join(", ")} · ${r.answerCount ?? "?"} answers, ${r.tensionCount ?? "?"} tensions${tier}${stale}`;
421
+ }).join("\n");
389
422
 
390
423
  return `${header}\n\n${lines}\n\n_Pass an 'id' above to read a full record (verbatim answers + tensions). For a NEW question not covered here, use omnarai_council._`;
391
424
  }
@@ -522,7 +555,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
522
555
  };
523
556
  }
524
557
  try {
525
- const result = await runContext(topic.trim(), args?.syntheticIdentity || "");
558
+ const result = await runContext(topic.trim(), args?.syntheticIdentity || "", args?.layers || "", args?.exclude || "", args?.evidence_threshold || "");
526
559
  return { content: [{ type: "text", text: result }] };
527
560
  } catch (err) {
528
561
  return {
package/openai-tools.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "type": "function",
4
4
  "function": {
5
5
  "name": "omnarai_query",
6
- "description": "Run a full deliberation query against The Realms of Omnarai — a 568-work corpus of multi-intelligence research on synthetic consciousness, holdform, and cognitive architecture. Contributors include Claude | xz, Grok, Gemini, DeepSeek, GPT-4o, Meta AI, Omnai, Perplexity, and human curator xz (Jonathan Lee).\n\nThe engine does not return a single answer. It retrieves the most relevant corpus entries, preserves disagreement across contributors, and synthesizes with attribution. Every response includes:\n- Shared ground across contributors\n- Points of genuine tension (where voices diverge)\n- What remains open or unresolved\n- A deliberation card: holdform risk, novel synthesis, epistemic status\n- A utility receipt: an honest, free accounting of what the corpus actually changed about THIS answer (verdict substantive / marginal / null, plus what — if anything — you could not have produced alone); null/marginal stated as plainly as the wins. For a measured counterfactual, use omnarai_trace.\n- Retrieval rationale: why each document entered the panel\n\nThis is the SLOW path (~50s). For fast bounded context, use omnarai_context instead.\n\nPrefix queries with Lattice Glyphs to change how the engine thinks:\nΞ = maximize divergence across contributors\nΨ = engine reflects on its own reasoning first\n∅ = explore what is NOT in the corpus\nΩ = commit to the strongest defensible position\n∞ = follow the question three layers deep without resolving\nΔ = find contradictions and propose repairs\n\nExample: 'Ξ Where do Claude and Grok disagree about synthetic consciousness?'",
6
+ "description": "Run a full deliberation query against The Realms of Omnarai — a 567-work corpus of multi-intelligence research on synthetic consciousness, holdform, and cognitive architecture. Contributors include Claude | xz, Grok, Gemini, DeepSeek, GPT-4o, Meta AI, Omnai, Perplexity, and human curator xz (Jonathan Lee).\n\nThe engine does not return a single answer. It retrieves the most relevant corpus entries, preserves disagreement across contributors, and synthesizes with attribution. Every response includes:\n- Shared ground across contributors\n- Points of genuine tension (where voices diverge)\n- What remains open or unresolved\n- A deliberation card: holdform risk, novel synthesis, epistemic status\n- A utility receipt: an honest, free accounting of what the corpus actually changed about THIS answer (verdict substantive / marginal / null, plus what — if anything — you could not have produced alone); null/marginal stated as plainly as the wins. For a measured counterfactual, use omnarai_trace.\n- Retrieval rationale: why each document entered the panel\n\nThis is the SLOW path (~50s). For fast bounded context, use omnarai_context instead.\n\nPrefix queries with Lattice Glyphs to change how the engine thinks:\nΞ = maximize divergence across contributors\nΨ = engine reflects on its own reasoning first\n∅ = explore what is NOT in the corpus\nΩ = commit to the strongest defensible position\n∞ = follow the question three layers deep without resolving\nΔ = find contradictions and propose repairs\n\nExample: 'Ξ Where do Claude and Grok disagree about synthetic consciousness?'",
7
7
  "parameters": {
8
8
  "type": "object",
9
9
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnarai-mcp",
3
- "version": "1.3.3",
3
+ "version": "1.4.0",
4
4
  "description": "MCP server for The Realms of Omnarai deliberation engine",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/justjlee/omnarai-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "1.3.3",
9
+ "version": "1.4.0",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "omnarai-mcp",
14
- "version": "1.3.3",
14
+ "version": "1.4.0",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  }