@productbrain/mcp 0.0.1-beta.2131 → 0.0.1-beta.2143

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.
@@ -3124,7 +3124,8 @@ function registerKnowledgeTools(server) {
3124
3124
  const formatted = history.map((h) => {
3125
3125
  const date = new Date(h.timestamp).toISOString();
3126
3126
  const changes = h.changes ? ` \u2014 ${JSON.stringify(h.changes)}` : "";
3127
- return `- **${date}** ${h.event}${h.changedBy ? ` _(${h.changedBy})_` : ""}${changes}`;
3127
+ const qualifier = h.legacyQualifier ? ` [${h.legacyQualifier}]` : "";
3128
+ return `- **${date}** ${h.event}${h.changedBy ? ` _(${h.changedBy})_` : ""}${changes}${qualifier}`;
3128
3129
  }).join("\n");
3129
3130
  return {
3130
3131
  content: [{ type: "text", text: `# History for \`${entryId}\` (${history.length} events)
@@ -3655,7 +3656,8 @@ async function handleGet(entryId) {
3655
3656
  lines.push("", "## History (last 10)");
3656
3657
  for (const h of e.history.slice(-10)) {
3657
3658
  const date = new Date(h.timestamp).toISOString().split("T")[0];
3658
- lines.push(`- ${date}: ${h.event}${h.changedBy ? ` _(${h.changedBy})_` : ""}`);
3659
+ const qualifier = h.legacyQualifier ? ` [${h.legacyQualifier}]` : "";
3660
+ lines.push(`- ${date}: ${h.event}${h.changedBy ? ` _(${h.changedBy})_` : ""}${qualifier}`);
3659
3661
  }
3660
3662
  }
3661
3663
  const entryData = {
@@ -12002,11 +12004,6 @@ function domainDetailFromRetrieval(retrieval) {
12002
12004
  const evidenceGap = typeof retrieval.evidenceGap === "string" ? retrieval.evidenceGap : null;
12003
12005
  return reason || nextAction || evidenceGap ? { reason, nextAction, evidenceGap } : null;
12004
12006
  }
12005
- var NON_MEANINGFUL_TASK_RE = /^[\s​‌‍⁠]*$/u;
12006
- function taskIsMeaningful(task) {
12007
- if (typeof task !== "string") return false;
12008
- return !NON_MEANINGFUL_TASK_RE.test(task);
12009
- }
12010
12007
  function reportOrientWrapperBytes(toolResult, truncated, tier, taskProvided) {
12011
12008
  try {
12012
12009
  const fullToolOutput = JSON.stringify({ content: toolResult.content ?? [] });
@@ -12086,7 +12083,6 @@ function registerOrientTool(server) {
12086
12083
  async function _handleOrient({ mode = "full", tier, task, scope }) {
12087
12084
  const errors = [];
12088
12085
  const callTier = tier ?? (mode === "brief" ? "summary" : void 0);
12089
- const resolvedTier = callTier ?? (taskIsMeaningful(task) ? "summary" : "standard");
12090
12086
  if (scope && !task) {
12091
12087
  errors.push("--scope requires --task to filter governance. Scope was ignored.");
12092
12088
  }
@@ -12130,6 +12126,8 @@ async function _handleOrient({ mode = "full", tier, task, scope }) {
12130
12126
  orientView = await kernelQuery("chain.getOrientView", orientArgs);
12131
12127
  } catch {
12132
12128
  }
12129
+ const resolvedTier = orientView?.resolvedTier ?? callTier ?? "standard";
12130
+ const taskMeaningful = orientView?.taskMeaningful ?? false;
12133
12131
  let vocabCtx;
12134
12132
  try {
12135
12133
  const vocab = await kernelQuery("chain.getVocabulary", {});
@@ -12203,7 +12201,7 @@ async function _handleOrient({ mode = "full", tier, task, scope }) {
12203
12201
  [{ tool: "start_pb", description: "Guided workspace setup", parameters: {} }]
12204
12202
  )
12205
12203
  };
12206
- reportOrientWrapperBytes(blankResult, false, resolvedTier, taskIsMeaningful(task));
12204
+ reportOrientWrapperBytes(blankResult, false, resolvedTier, taskMeaningful);
12207
12205
  return blankResult;
12208
12206
  }
12209
12207
  const lines = [];
@@ -12399,7 +12397,7 @@ async function _handleOrient({ mode = "full", tier, task, scope }) {
12399
12397
  }
12400
12398
  )
12401
12399
  };
12402
- reportOrientWrapperBytes(briefResult, briefTruncated, resolvedTier, taskIsMeaningful(task));
12400
+ reportOrientWrapperBytes(briefResult, briefTruncated, resolvedTier, taskMeaningful);
12403
12401
  return briefResult;
12404
12402
  }
12405
12403
  const orientStage = readiness?.stage ?? "seeded";
@@ -12823,7 +12821,7 @@ async function _handleOrient({ mode = "full", tier, task, scope }) {
12823
12821
  }
12824
12822
  )
12825
12823
  };
12826
- reportOrientWrapperBytes(fullResult, fullTruncated, resolvedTier, taskIsMeaningful(task));
12824
+ reportOrientWrapperBytes(fullResult, fullTruncated, resolvedTier, taskMeaningful);
12827
12825
  return fullResult;
12828
12826
  }
12829
12827
 
@@ -14712,4 +14710,4 @@ export {
14712
14710
  createProductBrainServer,
14713
14711
  initFeatureFlags
14714
14712
  };
14715
- //# sourceMappingURL=chunk-NFU745LM.js.map
14713
+ //# sourceMappingURL=chunk-IZZBRF2F.js.map