@productbrain/mcp 0.0.1-beta.11015 → 0.0.1-beta.11026

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.
@@ -611,6 +611,17 @@ async function dispatchDiscriminated(toolName, union2, flatData, actionSpecs, ha
611
611
  return handler(parsed.data);
612
612
  }
613
613
 
614
+ // src/lib/restsOn.ts
615
+ var RESTS_ON_SENTENCES = {
616
+ promise: "Rests on {id}, which changed its promise on {date}.",
617
+ past: "Rests on {id}, {label} on {date}."
618
+ };
619
+ function restsOnLine(item) {
620
+ const date = new Date(item.changedAt).toISOString().split("T")[0];
621
+ const label = item.kind === "past" ? item.label : "";
622
+ return RESTS_ON_SENTENCES[item.kind].replace("{id}", item.entryId).replace("{label}", label).replace("{date}", date);
623
+ }
624
+
614
625
  // src/tools/knowledge.ts
615
626
  import { z as z6 } from "zod/v3";
616
627
 
@@ -3479,6 +3490,8 @@ async function handleGet(entryId) {
3479
3490
  const parsedOwner = parseOwnerOutput(e.owner);
3480
3491
  if (parsedOwner) lines.push(formatOwnerLine2(parsedOwner));
3481
3492
  if (typeof e.pendingMove === "string") lines.push(sanitizeSingleLineField(e.pendingMove));
3493
+ const restsOnChanged = Array.isArray(e.restsOnChanged) ? e.restsOnChanged : [];
3494
+ for (const item of restsOnChanged) lines.push(sanitizeSingleLineField(restsOnLine(item)));
3482
3495
  if (epistemic) lines.push(formatEpistemicLine(epistemic));
3483
3496
  const { line: whyLine, why, whySourceKey } = renderWhyLine(e);
3484
3497
  if (whyLine !== null) lines.push(whyLine);
@@ -3531,6 +3544,7 @@ async function handleGet(entryId) {
3531
3544
  ...e.sourceExcerpt ? { sourceExcerpt: String(e.sourceExcerpt) } : {},
3532
3545
  ...parsedOwner ? { owner: parsedOwner } : {},
3533
3546
  ...typeof e.pendingMove === "string" ? { pendingMove: e.pendingMove } : {},
3547
+ ...restsOnChanged.length > 0 ? { restsOnChanged } : {},
3534
3548
  // TEN-2191: surface the WHY and its quality in the structured payload too.
3535
3549
  ...why.length > 0 ? { why } : {},
3536
3550
  ...e.whyQuality ? { whyQuality: String(e.whyQuality) } : {},
@@ -12872,4 +12886,4 @@ export {
12872
12886
  createProductBrainServer,
12873
12887
  initFeatureFlags
12874
12888
  };
12875
- //# sourceMappingURL=chunk-QY6SKJ5Y.js.map
12889
+ //# sourceMappingURL=chunk-C7PEB3J5.js.map