@productbrain/mcp 0.0.1-beta.7832 → 0.0.1-beta.7848

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.
@@ -5424,6 +5424,9 @@ _This helps future sessions start with better constraints and context._`
5424
5424
  if (hasBindingGovernance) {
5425
5425
  lines2.push("## Binding governance");
5426
5426
  lines2.push("_These are the non-optional rules and standards that govern this task._");
5427
+ if (result3._budget?.truncated) {
5428
+ lines2.push("_Note: the governance ranking scan hit its cap \u2014 some entries' governs relations may not be reflected._");
5429
+ }
5427
5430
  lines2.push("");
5428
5431
  const renderGovernanceEntries = (entries) => {
5429
5432
  for (const entry of entries) {
@@ -5431,7 +5434,7 @@ _This helps future sessions start with better constraints and context._`
5431
5434
  const scoreLabel = typeof entry.score === "number" ? ` ${entry.score}` : "";
5432
5435
  const flagsLabel = entry.scoreFlags?.length ? ` [${entry.scoreFlags.join(", ")}]` : "";
5433
5436
  const originLabel = entry.origin ? ` (origin: ${entry.origin})` : "";
5434
- const tierLabel = entry.tier === 1 ? " `[direct]`" : entry.tier === 2 ? " `[domain]`" : entry.tier === 3 ? " `[org]`" : "";
5437
+ const tierLabel = entry.tier === 1 ? " `[direct]`" : entry.tier === 2 ? " `[governs]`" : entry.tier === 3 ? " `[ungoverned]`" : "";
5435
5438
  lines2.push(`- ${id}${entry.name}${tierLabel}${scoreLabel}${flagsLabel}${originLabel}`);
5436
5439
  if (entry.preview) lines2.push(` _${entry.preview}_`);
5437
5440
  }
@@ -7451,7 +7454,7 @@ var MAX_ENTRIES_WITH_TASK = 5;
7451
7454
  function formatGovernanceEntry(entry) {
7452
7455
  const id = entry.entryId ?? entry.name;
7453
7456
  const desc = entry.description ? ` \u2014 ${entry.description.slice(0, 120)}${entry.description.length > 120 ? "..." : ""}` : "";
7454
- const tierLabel = entry.tier === 1 ? " `[direct]`" : entry.tier === 2 ? " `[domain]`" : entry.tier === 3 ? " `[org]`" : "";
7457
+ const tierLabel = entry.tier === 1 ? " `[direct]`" : entry.tier === 2 ? " `[governs]`" : entry.tier === 3 ? " `[ungoverned]`" : "";
7455
7458
  const mark = provenanceMark(entry.provenance);
7456
7459
  const anchorSuffix = entry.anchoredBy ? ` (${entry.anchoredBy})` : "";
7457
7460
  return `- ${mark}**[${id}]** ${entry.name}${anchorSuffix}${tierLabel}${desc}`;
@@ -7499,9 +7502,7 @@ function buildOperatingProtocol(governanceOrStandards, task) {
7499
7502
  }
7500
7503
  }
7501
7504
  const filterNote = anyTierRanking ? "ranked by relevance" : "in listing order";
7502
- lines.push(
7503
- `_${shownCount} of ${totalGovernance} governance entries shown, ${filterNote}._`
7504
- );
7505
+ lines.push(`_${shownCount} of ${totalGovernance} governance entries shown, ${filterNote}._`);
7505
7506
  } else {
7506
7507
  for (const type of types) {
7507
7508
  if (type.entries.length === 0) continue;
@@ -7516,6 +7517,9 @@ function buildOperatingProtocol(governanceOrStandards, task) {
7516
7517
  );
7517
7518
  }
7518
7519
  }
7520
+ if (governance.truncated) {
7521
+ lines.push("_Note: the governance ranking scan hit its cap \u2014 some entries' governs relations may not be reflected._");
7522
+ }
7519
7523
  lines.push("");
7520
7524
  return lines;
7521
7525
  }
@@ -8162,7 +8166,10 @@ async function buildOrientResponse(wsCtx, agentSessionId, errors, task) {
8162
8166
  governanceEntries = {
8163
8167
  principles: (bg.principles ?? []).map(mapGovEntry),
8164
8168
  standards: (bg.standards ?? []).map(mapGovEntry),
8165
- businessRules: (bg.businessRules ?? []).map(mapGovEntry)
8169
+ businessRules: (bg.businessRules ?? []).map(mapGovEntry),
8170
+ // TASK-469 (TEN-4004): same _budget.truncated read orient.ts's _handleOrient already
8171
+ // applies to getOrientView's envelope — one shared shape, one read pattern.
8172
+ truncated: bindingGovernanceView?._budget?.truncated === true
8166
8173
  };
8167
8174
  }
8168
8175
  }
@@ -8224,7 +8231,9 @@ async function buildOrientResponse(wsCtx, agentSessionId, errors, task) {
8224
8231
  }
8225
8232
  lines.push("");
8226
8233
  }
8227
- lines.push(...buildOperatingProtocol());
8234
+ lines.push(
8235
+ ...buildOperatingProtocol({ truncated: bindingGovernanceView?._budget?.truncated === true })
8236
+ );
8228
8237
  const noTaskRuleLines = formatRuleListsLines(ruleListsView);
8229
8238
  if (noTaskRuleLines.length > 0) lines.push("", "Rules:", ...noTaskRuleLines);
8230
8239
  if (coherence) {
@@ -14916,4 +14925,4 @@ export {
14916
14925
  createProductBrainServer,
14917
14926
  initFeatureFlags
14918
14927
  };
14919
- //# sourceMappingURL=chunk-5HVA3T22.js.map
14928
+ //# sourceMappingURL=chunk-LHJ2WU4D.js.map