@productbrain/mcp 0.0.1-beta.11092 → 0.0.1-beta.11101

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.
@@ -510,6 +510,12 @@ function translateStaleToolNames(text) {
510
510
  _Tool name translations (these references use deprecated names):_
511
511
  ${found.map((f) => `- ${f}`).join("\n")}`;
512
512
  }
513
+ function entryDataLines(data) {
514
+ if (!data) return [];
515
+ const purpose = typeof data.purpose === "string" && data.purpose.trim().length > 0 ? data.purpose : null;
516
+ const rest = Object.entries(data).filter(([key]) => !(purpose && key === "purpose"));
517
+ return [...purpose ? [`**Purpose:** ${purpose}`] : [], "", ...rest.map(([key, val]) => `**${key}:** ${typeof val === "string" ? val : JSON.stringify(val)}`)];
518
+ }
513
519
 
514
520
  // src/gap-store.ts
515
521
  var SESSIONLESS_KEY = "__sessionless__";
@@ -3507,13 +3513,7 @@ async function handleGet(entryId) {
3507
3513
  if (whyLine !== null) lines.push(whyLine);
3508
3514
  const visibleData = sanitizeEntryData(e.data);
3509
3515
  const filteredData = visibleData && whySourceKey ? Object.keys(visibleData).filter((k) => k !== whySourceKey).length > 0 ? Object.fromEntries(Object.entries(visibleData).filter(([k]) => k !== whySourceKey)) : void 0 : visibleData;
3510
- if (filteredData) {
3511
- lines.push("");
3512
- for (const [key, val] of Object.entries(filteredData)) {
3513
- const display = typeof val === "string" ? val : JSON.stringify(val);
3514
- lines.push(`**${key}:** ${display}`);
3515
- }
3516
- }
3516
+ lines.push(...entryDataLines(filteredData));
3517
3517
  if (Array.isArray(e.tags) && e.tags.length > 0) {
3518
3518
  lines.push("", `**Tags:** ${e.tags.join(", ")}`);
3519
3519
  }
@@ -3618,13 +3618,7 @@ async function handleBatch(entryIds) {
3618
3618
  if (whyLine !== null) lines.push(whyLine);
3619
3619
  const visibleData = sanitizeEntryData(entry.data);
3620
3620
  const filteredData = visibleData && whySourceKey ? Object.keys(visibleData).filter((k) => k !== whySourceKey).length > 0 ? Object.fromEntries(Object.entries(visibleData).filter(([k]) => k !== whySourceKey)) : void 0 : visibleData;
3621
- if (filteredData) {
3622
- lines.push("");
3623
- for (const [key, val] of Object.entries(filteredData)) {
3624
- const display = typeof val === "string" ? val : JSON.stringify(val);
3625
- lines.push(`**${key}:** ${display}`);
3626
- }
3627
- }
3621
+ lines.push(...entryDataLines(filteredData));
3628
3622
  if (Array.isArray(entry.tags) && entry.tags.length > 0) {
3629
3623
  lines.push("", `**Tags:** ${entry.tags.join(", ")}`);
3630
3624
  }
@@ -12896,4 +12890,4 @@ export {
12896
12890
  createProductBrainServer,
12897
12891
  initFeatureFlags
12898
12892
  };
12899
- //# sourceMappingURL=chunk-KCWD7G5U.js.map
12893
+ //# sourceMappingURL=chunk-ZOZLMZ5V.js.map