@productbrain/mcp 0.0.1-beta.3449 → 0.0.1-beta.3462
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.
|
@@ -5616,6 +5616,18 @@ Review at /review in Cortex UI.`
|
|
|
5616
5616
|
};
|
|
5617
5617
|
}
|
|
5618
5618
|
if (result2?.preview) {
|
|
5619
|
+
if (result2.wouldBlock) {
|
|
5620
|
+
return {
|
|
5621
|
+
content: [{ type: "text", text: `# Preview: would relate ${from} \u2192 ${to} (${type}) \u2014 BLOCKED
|
|
5622
|
+
|
|
5623
|
+
${result2.blockingReason ?? "This relation would be rejected."}` }],
|
|
5624
|
+
structuredContent: success(
|
|
5625
|
+
`Preview: relating ${from} \u2192 ${to} (${type}) would be blocked`,
|
|
5626
|
+
{ status: "preview-blocked", from, to, type, blockingReason: result2.blockingReason ?? null },
|
|
5627
|
+
[]
|
|
5628
|
+
)
|
|
5629
|
+
};
|
|
5630
|
+
}
|
|
5619
5631
|
const suggested2 = result2.suggestedType;
|
|
5620
5632
|
const suggestedWithPosture2 = suggested2 ? { ...suggested2, governancePosture: suggested2.type === "governs" ? "requires_consent" : "direct" } : void 0;
|
|
5621
5633
|
return {
|
|
@@ -8531,7 +8543,9 @@ async function buildAlreadyOrientedResult(kernelQuery2, agentSessionId, taskGrou
|
|
|
8531
8543
|
let ritualsFetchFailed = false;
|
|
8532
8544
|
let rituals = null;
|
|
8533
8545
|
try {
|
|
8534
|
-
rituals = await kernelQuery2("chain.getRitualsSurface", {
|
|
8546
|
+
rituals = await kernelQuery2("chain.getRitualsSurface", {
|
|
8547
|
+
now: Math.floor(Date.now() / 6e4) * 6e4
|
|
8548
|
+
});
|
|
8535
8549
|
} catch {
|
|
8536
8550
|
ritualsFetchFailed = true;
|
|
8537
8551
|
}
|
|
@@ -8553,7 +8567,12 @@ async function buildAlreadyOrientedResult(kernelQuery2, agentSessionId, taskGrou
|
|
|
8553
8567
|
// null for a genuine no-row arm.
|
|
8554
8568
|
...rituals?.directionLine !== void 0 ? { directionLine: rituals.directionLine } : {},
|
|
8555
8569
|
...rituals?.verdictAskLine !== void 0 ? { verdictAskLine: rituals.verdictAskLine } : {},
|
|
8556
|
-
...rituals?.spineLine !== void 0 ? { spineLine: rituals.spineLine } : {}
|
|
8570
|
+
...rituals?.spineLine !== void 0 ? { spineLine: rituals.spineLine } : {},
|
|
8571
|
+
// PR #538 late review fix (P2, "include at-cap disclosure in structured orient output"):
|
|
8572
|
+
// atCapLine renders in TEXT (buildRitualsSurfaceLines) but was never mirrored into
|
|
8573
|
+
// structuredContent — a structured-content consumer silently missed the dropped-at-cap
|
|
8574
|
+
// warning even when the same response's text carried it.
|
|
8575
|
+
...rituals?.atCapLine !== void 0 ? { atCapLine: rituals.atCapLine } : {}
|
|
8557
8576
|
}
|
|
8558
8577
|
)
|
|
8559
8578
|
};
|
|
@@ -9328,7 +9347,7 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9328
9347
|
"",
|
|
9329
9348
|
"Or tell me about your product and I'll start capturing knowledge directly."
|
|
9330
9349
|
];
|
|
9331
|
-
scanLines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed }));
|
|
9350
|
+
scanLines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed || orientView?.fetchFailed === true }));
|
|
9332
9351
|
let oriented = false;
|
|
9333
9352
|
let orientationStatus2 = "no_session";
|
|
9334
9353
|
if (agentSessionId) {
|
|
@@ -9396,7 +9415,7 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9396
9415
|
if (orientView?.taskAlignment) {
|
|
9397
9416
|
lines.push(`Task alignment: ${orientView.taskAlignment.verdict} \u2014 ${orientView.taskAlignment.wording.replace(/\*\*/g, "")}`);
|
|
9398
9417
|
}
|
|
9399
|
-
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed }));
|
|
9418
|
+
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed || orientView?.fetchFailed === true }));
|
|
9400
9419
|
if (orientView?.startup?.domainRetrieval) {
|
|
9401
9420
|
const retrieval = orientView.startup.domainRetrieval;
|
|
9402
9421
|
const scopedTo = retrieval.resolvedDomainSlug ? ` (${retrieval.resolvedDomainSlug})` : "";
|
|
@@ -9545,6 +9564,10 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9545
9564
|
...orientView?.directionLine !== void 0 ? { directionLine: orientView.directionLine } : {},
|
|
9546
9565
|
...orientView?.verdictAskLine !== void 0 ? { verdictAskLine: orientView.verdictAskLine } : {},
|
|
9547
9566
|
...orientView?.spineLine !== void 0 ? { spineLine: orientView.spineLine } : {},
|
|
9567
|
+
...orientView?.atCapLine !== void 0 ? { atCapLine: orientView.atCapLine } : {},
|
|
9568
|
+
// PR #538 late review (P2)
|
|
9569
|
+
...orientView?.fetchFailed !== void 0 ? { fetchFailed: orientView.fetchFailed } : {},
|
|
9570
|
+
// PR #539 review fix
|
|
9548
9571
|
// RCRT miss-alarm: machine-readable verdict for structuredContent
|
|
9549
9572
|
// consumers (parity with the rendered prose alarm).
|
|
9550
9573
|
...orientView?.retrievalMiss ? { retrievalMiss: orientView.retrievalMiss } : {},
|
|
@@ -9727,7 +9750,7 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9727
9750
|
}
|
|
9728
9751
|
if (orientView) {
|
|
9729
9752
|
lines.push(...buildTaskAlignmentLines(orientView.taskAlignment));
|
|
9730
|
-
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed }));
|
|
9753
|
+
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed || orientView?.fetchFailed === true }));
|
|
9731
9754
|
lines.push(...formatInitiativeStatusLines(orientView.initiativeStatus));
|
|
9732
9755
|
lines.push(...formatWorkstreamHealthLines(orientView.workstreamHealth));
|
|
9733
9756
|
lines.push(...formatWhatNeedsAttentionLines(orientView.whatNeedsAttention));
|
|
@@ -9855,7 +9878,7 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9855
9878
|
} else {
|
|
9856
9879
|
lines.push(`**Brain stage: ${orientStage}.**`);
|
|
9857
9880
|
lines.push("");
|
|
9858
|
-
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed }));
|
|
9881
|
+
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed || orientView?.fetchFailed === true }));
|
|
9859
9882
|
if (orientView?.activeWorkPackages?.length) {
|
|
9860
9883
|
lines.push("## Active work packages \u2014 current scope");
|
|
9861
9884
|
lines.push("_Work outside these work packages requires explicit user confirmation._");
|
|
@@ -9985,6 +10008,10 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9985
10008
|
...orientView?.directionLine !== void 0 ? { directionLine: orientView.directionLine } : {},
|
|
9986
10009
|
...orientView?.verdictAskLine !== void 0 ? { verdictAskLine: orientView.verdictAskLine } : {},
|
|
9987
10010
|
...orientView?.spineLine !== void 0 ? { spineLine: orientView.spineLine } : {},
|
|
10011
|
+
...orientView?.atCapLine !== void 0 ? { atCapLine: orientView.atCapLine } : {},
|
|
10012
|
+
// PR #538 late review (P2)
|
|
10013
|
+
...orientView?.fetchFailed !== void 0 ? { fetchFailed: orientView.fetchFailed } : {},
|
|
10014
|
+
// PR #539 review fix
|
|
9988
10015
|
// RCRT miss-alarm: machine-readable verdict for structuredContent
|
|
9989
10016
|
// consumers (parity with the rendered prose alarm).
|
|
9990
10017
|
...orientView?.retrievalMiss ? { retrievalMiss: orientView.retrievalMiss } : {},
|
|
@@ -16466,4 +16493,4 @@ export {
|
|
|
16466
16493
|
createProductBrainServer,
|
|
16467
16494
|
initFeatureFlags
|
|
16468
16495
|
};
|
|
16469
|
-
//# sourceMappingURL=chunk-
|
|
16496
|
+
//# sourceMappingURL=chunk-YUN2RDXK.js.map
|