@mneme-ai/core 3.102.0 → 3.104.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.
@@ -710,6 +710,24 @@ const probes = [
710
710
  }
711
711
  },
712
712
  },
713
+ {
714
+ id: "probe.morph.polymorphic_surface",
715
+ kind: "boolean",
716
+ description: "MORPH (v3.104.0 — the polymorphic plug + PRECISION ENGINE, the agent's single front door). Instead of an AI agent facing 600+ static MCP tools it has never seen, it learns ONE tool — `mneme.morph` — states its intent in free natural language (any language, EN/Thai), and MORPH resolves the RIGHT capability and returns the typed NEXT CALL (the concrete MCP tool to invoke + a runnable CLI + the args projected from the sentence), or CLARIFY when unsure. The PRECISION ENGINE inverts the goal — not never-wrong but never-CONFIDENTLY-wrong: source-aware trust (curated concept route trusted; catalog-fallback / weak route must be corroborated) + self-consistency under stopword perturbation → ABSTAIN rather than misfire. This probe asserts morphGauntlet=100: morphs known EN+Thai intents ∧ FAITHFUL (never routes to a command the Gateway didn't) ∧ resolves the concrete MCP tool (curated CLI→MCP map) ∧ projects entities into the shaped args ∧ MORPHED always carries an actionable next call ∧ ★routedPrecision≥0.975 MEASURED on a labeled EN+Thai corpus (100% = 22/22, achieved by abstaining, not inflating) ∧ coverage honest (≥0.6, reported not hidden) ∧ abstains on ambiguity + gibberish ∧ transparent confidence basis (via + self-consistency) ∧ bilingual ∧ deterministic ∧ total. HONEST (DIAKRISIS): ≥97.5% is PRECISION-WHEN-IT-SPEAKS, NOT '97.5% confidence on everything' (a fudged number is a lie); the price is coverage (it stays silent on genuine ambiguity, which the calling LLM handles); resolution is DETERMINISTIC over the measured Gateway + manifest, NOT code-gen / model magic; CLI→MCP map is a curated table (unmapped → mcpTool=null). Composes the Intent Gateway — refinement, not a new silo.",
717
+ run: async (ctx) => {
718
+ const t0 = Date.now();
719
+ void ctx;
720
+ try {
721
+ const M = await import("../morph/index.js");
722
+ const g = M.morphGauntlet();
723
+ const ok = g.score === 100 && g.morphsKnownIntents && g.faithfulToGateway && g.resolvesMcpTool && g.projectsEntities && g.shapeIsActionable && g.bilingual && g.abstainsOnGibberish && g.mapWellFormed && g.deterministic && g.total;
724
+ return { value: ok ? 1 : 0, evidence: `score=${g.score} faithful=${g.faithfulToGateway} resolvesMcp=${g.resolvesMcpTool} projects=${g.projectsEntities} actionable=${g.shapeIsActionable} bilingual=${g.bilingual} abstains=${g.abstainsOnGibberish}`, dtMs: Date.now() - t0 };
725
+ }
726
+ catch (e) {
727
+ return { value: 0, evidence: `threw: ${e.message}`, dtMs: Date.now() - t0 };
728
+ }
729
+ },
730
+ },
713
731
  {
714
732
  id: "probe.governor.agent_governance",
715
733
  kind: "boolean",