@productbrain/mcp 0.0.1-beta.4057 → 0.0.1-beta.4065
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.
|
@@ -5804,12 +5804,15 @@ ${result2.blockingReason ?? "This relation would be rejected."}` }],
|
|
|
5804
5804
|
}
|
|
5805
5805
|
const suggested2 = result2.suggestedType;
|
|
5806
5806
|
const suggestedWithPosture2 = suggested2 ? { ...suggested2, governancePosture: suggested2.type === "governs" ? "requires_consent" : "direct" } : void 0;
|
|
5807
|
+
const advisoryText = (result2.advisories ?? []).map((a) => `
|
|
5808
|
+
|
|
5809
|
+
\u26A0 **${a.ruleId}** (org stage: ${a.stage}): ${a.ruleText}`).join("");
|
|
5807
5810
|
return {
|
|
5808
5811
|
content: [{ type: "text", text: `# Preview: would relate ${from} \u2192 ${to} (${type})
|
|
5809
5812
|
|
|
5810
5813
|
No DB writes \u2014 call without \`preview:true\` to create for real.${suggestedWithPosture2 ? `
|
|
5811
5814
|
|
|
5812
|
-
**Type suggestion:** \`${suggestedWithPosture2.type}\` may be more precise (${suggestedWithPosture2.confidence}% confidence). Governance: ${suggestedWithPosture2.governancePosture}.` : ""}` }],
|
|
5815
|
+
**Type suggestion:** \`${suggestedWithPosture2.type}\` may be more precise (${suggestedWithPosture2.confidence}% confidence). Governance: ${suggestedWithPosture2.governancePosture}.` : ""}${advisoryText}` }],
|
|
5813
5816
|
structuredContent: success(
|
|
5814
5817
|
`Preview: would relate ${from} \u2192 ${to} (${type}) \u2014 no DB writes`,
|
|
5815
5818
|
{
|
|
@@ -5817,7 +5820,8 @@ No DB writes \u2014 call without \`preview:true\` to create for real.${suggested
|
|
|
5817
5820
|
from,
|
|
5818
5821
|
to,
|
|
5819
5822
|
type,
|
|
5820
|
-
...suggestedWithPosture2 && { suggestedType: suggestedWithPosture2 }
|
|
5823
|
+
...suggestedWithPosture2 && { suggestedType: suggestedWithPosture2 },
|
|
5824
|
+
...result2.advisories && result2.advisories.length > 0 && { advisories: result2.advisories }
|
|
5821
5825
|
},
|
|
5822
5826
|
[{ tool: "relations", description: "Create for real", parameters: { action: "create", from, to, type } }]
|
|
5823
5827
|
)
|
|
@@ -5860,6 +5864,10 @@ The relation was **not applied** \u2014 it will be created when the proposal is
|
|
|
5860
5864
|
lines.push(`_${suggestedWithPosture.reasoning}_`);
|
|
5861
5865
|
lines.push(`To use instead: \`relations action=create from="${from}" to="${to}" type="${suggestedWithPosture.type}"\``);
|
|
5862
5866
|
}
|
|
5867
|
+
for (const a of result2?.advisories ?? []) {
|
|
5868
|
+
lines.push("");
|
|
5869
|
+
lines.push(`\u26A0 **${a.ruleId}** (org stage: ${a.stage}): ${a.ruleText}`);
|
|
5870
|
+
}
|
|
5863
5871
|
return {
|
|
5864
5872
|
content: [{ type: "text", text: lines.join("\n") }],
|
|
5865
5873
|
structuredContent: success(
|
|
@@ -5869,7 +5877,8 @@ The relation was **not applied** \u2014 it will be created when the proposal is
|
|
|
5869
5877
|
from,
|
|
5870
5878
|
to,
|
|
5871
5879
|
type,
|
|
5872
|
-
...suggestedWithPosture && { suggestedType: suggestedWithPosture }
|
|
5880
|
+
...suggestedWithPosture && { suggestedType: suggestedWithPosture },
|
|
5881
|
+
...result2?.advisories && result2.advisories.length > 0 && { advisories: result2.advisories }
|
|
5873
5882
|
},
|
|
5874
5883
|
[{ tool: "relations", description: "See connections", parameters: { action: "find", entryId: from } }]
|
|
5875
5884
|
)
|
|
@@ -9606,6 +9615,10 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9606
9615
|
const wpPlural = getCollectionLabel("work_package", "plural", vocabCtx);
|
|
9607
9616
|
lines.push(`${sc.activeBetCount} active ${wpPlural}, ${sc.activeTensionCount} tension(s).`);
|
|
9608
9617
|
}
|
|
9618
|
+
const briefStrategyHighlights = (orientView?.strategyHighlights ?? []).filter((e) => e != null && typeof e.name === "string" && e.name.length > 0);
|
|
9619
|
+
if (briefStrategyHighlights.length > 0) {
|
|
9620
|
+
lines.push(`Strategy: ${briefStrategyHighlights.map((e) => e.name + (typeof e.preview === "string" && e.preview ? ` \u2014 ${e.preview}` : "")).join(" | ")}`);
|
|
9621
|
+
}
|
|
9609
9622
|
if (orientView?.taskContext && orientView.taskContext.context.length > 0) {
|
|
9610
9623
|
lines.push(`Task context: ${orientView.taskContext.totalFound} relevant entries (${orientView.taskContext.confidence} confidence).`);
|
|
9611
9624
|
if (orientView.taskContext.isGroundingStub && orientView.taskContext.groundingNote) {
|
|
@@ -9781,7 +9794,9 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9781
9794
|
// WP-560/TEN-2532 post-merge review (Codex P2): the rendered shape-advisory
|
|
9782
9795
|
// line must reach structuredContent too, not just the text — never a
|
|
9783
9796
|
// text-only fact a machine consumer can't see.
|
|
9784
|
-
...orientView?.shapeAdvisorySummary ? { shapeAdvisorySummary: orientView.shapeAdvisorySummary } : {}
|
|
9797
|
+
...orientView?.shapeAdvisorySummary ? { shapeAdvisorySummary: orientView.shapeAdvisorySummary } : {},
|
|
9798
|
+
// WP-622 follow-up (Copilot review PR #601, post-merge): brief structuredContent parity with full mode.
|
|
9799
|
+
...orientView?.strategyHighlights?.length ? { strategyHighlights: orientView.strategyHighlights } : {}
|
|
9785
9800
|
}
|
|
9786
9801
|
)
|
|
9787
9802
|
};
|
|
@@ -16718,4 +16733,4 @@ export {
|
|
|
16718
16733
|
createProductBrainServer,
|
|
16719
16734
|
initFeatureFlags
|
|
16720
16735
|
};
|
|
16721
|
-
//# sourceMappingURL=chunk-
|
|
16736
|
+
//# sourceMappingURL=chunk-MZQFLJVD.js.map
|