@productbrain/mcp 0.0.1-beta.15279 → 0.0.1-beta.15285

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.
@@ -940,6 +940,10 @@ function restsOnLine(item) {
940
940
  return RESTS_ON_SENTENCES[item.kind].replace("{id}", item.entryId).replace("{label}", label2).replace("{date}", date);
941
941
  }
942
942
 
943
+ // src/lib/attestationWords.ts
944
+ var confirmedByLabel = (who) => `Confirmed by ${who}`;
945
+ var markReadsSentence = (input) => `${input.entryId} ${input.already ? "already" : "now"} reads '${confirmedByLabel(input.verifiedBy)}'.`;
946
+
943
947
  // src/lib/historyLine.ts
944
948
  var label = (s) => s.replace(/[_-]/g, " ");
945
949
  var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
@@ -1977,6 +1981,8 @@ ${mcp}`, "QUALITY_HELD", mcp.split("\n")[0] ?? mcp, mcp.split("\n")[1] ?? mcp, v
1977
1981
  ...changedLine ? [changedLine] : [],
1978
1982
  ...applied.qualityOverride ? [applied.qualityOverride] : [],
1979
1983
  // TASK-954: the recorded line, never a silent clear
1984
+ ...applied.markLowered ? [applied.markLowered] : [],
1985
+ // DEC-1991: the lowered mark, as the kernel wrote it
1980
1986
  ...applied.restsOnCount !== void 0 ? [restsOnCountLine(applied.restsOnCount, applied.restsOnBounded === true)] : [],
1981
1987
  ``,
1982
1988
  // TASK-935
@@ -1998,7 +2004,7 @@ ${mcp}`, "QUALITY_HELD", mcp.split("\n")[0] ?? mcp, mcp.split("\n")[1] ?? mcp, v
1998
2004
  if (orgCheck.length > 0) responseLines.push("", ...orgCheck);
1999
2005
  const missingFieldLines = applied.missingFieldLines ?? [];
2000
2006
  if (missingFieldLines.length > 0) responseLines.push("", ...missingFieldLines);
2001
- const summary = [applied.receipt ?? `Updated ${entryId} \u2014 ${versionMode}. Fields: ${appliedFields.join(", ") || "none"}.`, applied.qualityOverride].filter(Boolean).join(" ");
2007
+ const summary = [applied.receipt ?? `Updated ${entryId} \u2014 ${versionMode}. Fields: ${appliedFields.join(", ") || "none"}.`, applied.qualityOverride, applied.markLowered].filter(Boolean).join(" ");
2002
2008
  const next = [
2003
2009
  { tool: "context", description: "View updated entry", parameters: { action: "get", entryId } },
2004
2010
  // DEC-1894: reads live on context
@@ -2602,9 +2608,9 @@ async function handleVerifyEntry({ entryId }) {
2602
2608
  { entryId, ...agentSessionId ? { sessionId: agentSessionId } : {} }
2603
2609
  );
2604
2610
  const basis = result2.attestation?.basis;
2605
- const strength = result2.attestation?.strength;
2606
- const verifiedBySuffix = result2.verifiedBy ? basis && basis !== "attested" ? ` (${result2.verifiedBy})` : ` \u2014 by ${result2.verifiedBy}${strength ? ` (${strength})` : ""}` : "";
2607
- const message = result2.alreadyVerified ? `Entry ${entryId} is already verified${verifiedBySuffix}.` : `Entry ${entryId} verified${verifiedBySuffix}.`;
2611
+ const attested = Boolean(result2.verifiedBy) && !(basis && basis !== "attested");
2612
+ const verifiedBySuffix = result2.verifiedBy && !attested ? ` (${result2.verifiedBy})` : "";
2613
+ const message = attested ? markReadsSentence({ entryId, verifiedBy: result2.verifiedBy ?? "", already: result2.alreadyVerified === true }) : result2.alreadyVerified ? `Entry ${entryId} is already verified${verifiedBySuffix}.` : `Entry ${entryId} verified${verifiedBySuffix}.`;
2608
2614
  return successResult(message, message, result2);
2609
2615
  }
2610
2616
 
@@ -2899,15 +2905,11 @@ function renderVerificationLine(e) {
2899
2905
  if (!e.verificationStatus) return null;
2900
2906
  const verifiedBy = typeof e.verifiedBy === "string" ? e.verifiedBy : void 0;
2901
2907
  const attestation = e.attestation && typeof e.attestation === "object" ? e.attestation : void 0;
2902
- const strength = attestation && typeof attestation.strength === "string" ? attestation.strength : void 0;
2903
2908
  const basis = attestation && typeof attestation.basis === "string" ? attestation.basis : void 0;
2904
- let who;
2905
- if (basis && basis !== "attested") {
2906
- who = verifiedBy ? ` (${verifiedBy})` : "";
2907
- } else {
2908
- who = verifiedBy ? ` \u2014 by ${verifiedBy}${strength ? ` (${strength})` : ""}` : "";
2909
- }
2910
- return `**Verification:** ${String(e.verificationStatus)}${who}`;
2909
+ const status2 = String(e.verificationStatus);
2910
+ if (basis && basis !== "attested") return `**Verification:** ${status2}${verifiedBy ? ` (${verifiedBy})` : ""}`;
2911
+ if (verifiedBy && status2 === "verified") return `**Verification:** ${confirmedByLabel(verifiedBy)}`;
2912
+ return `**Verification:** ${status2}${verifiedBy ? ` \u2014 by ${verifiedBy}` : ""}`;
2911
2913
  }
2912
2914
  var wqSchema = z13.enum(["rationale", "missing", "restated"]);
2913
2915
  var entriesGetOutputSchema = z13.object({
@@ -12497,4 +12499,4 @@ export {
12497
12499
  SERVER_VERSION,
12498
12500
  createProductBrainServer
12499
12501
  };
12500
- //# sourceMappingURL=chunk-X7LW6NEZ.js.map
12502
+ //# sourceMappingURL=chunk-ZNF3JSUA.js.map