@productbrain/mcp 0.0.1-beta.3439 → 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 {
|
|
@@ -8524,13 +8536,16 @@ function buildRitualsSurfaceLines(view, opts) {
|
|
|
8524
8536
|
lines.push(view?.directionLine ?? "Direction: not computed yet \u2014 `pb direction refresh`");
|
|
8525
8537
|
if (view?.verdictAskLine) lines.push(view.verdictAskLine);
|
|
8526
8538
|
lines.push(view?.spineLine ?? "Spine check: not computed yet \u2014 `pb quality spine-check`");
|
|
8539
|
+
if (view?.atCapLine) lines.push(view.atCapLine);
|
|
8527
8540
|
return lines;
|
|
8528
8541
|
}
|
|
8529
8542
|
async function buildAlreadyOrientedResult(kernelQuery2, agentSessionId, taskGroundingWarningLines2) {
|
|
8530
8543
|
let ritualsFetchFailed = false;
|
|
8531
8544
|
let rituals = null;
|
|
8532
8545
|
try {
|
|
8533
|
-
rituals = await kernelQuery2("chain.getRitualsSurface", {
|
|
8546
|
+
rituals = await kernelQuery2("chain.getRitualsSurface", {
|
|
8547
|
+
now: Math.floor(Date.now() / 6e4) * 6e4
|
|
8548
|
+
});
|
|
8534
8549
|
} catch {
|
|
8535
8550
|
ritualsFetchFailed = true;
|
|
8536
8551
|
}
|
|
@@ -8552,7 +8567,12 @@ async function buildAlreadyOrientedResult(kernelQuery2, agentSessionId, taskGrou
|
|
|
8552
8567
|
// null for a genuine no-row arm.
|
|
8553
8568
|
...rituals?.directionLine !== void 0 ? { directionLine: rituals.directionLine } : {},
|
|
8554
8569
|
...rituals?.verdictAskLine !== void 0 ? { verdictAskLine: rituals.verdictAskLine } : {},
|
|
8555
|
-
...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 } : {}
|
|
8556
8576
|
}
|
|
8557
8577
|
)
|
|
8558
8578
|
};
|
|
@@ -9327,6 +9347,7 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9327
9347
|
"",
|
|
9328
9348
|
"Or tell me about your product and I'll start capturing knowledge directly."
|
|
9329
9349
|
];
|
|
9350
|
+
scanLines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed || orientView?.fetchFailed === true }));
|
|
9330
9351
|
let oriented = false;
|
|
9331
9352
|
let orientationStatus2 = "no_session";
|
|
9332
9353
|
if (agentSessionId) {
|
|
@@ -9394,7 +9415,7 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9394
9415
|
if (orientView?.taskAlignment) {
|
|
9395
9416
|
lines.push(`Task alignment: ${orientView.taskAlignment.verdict} \u2014 ${orientView.taskAlignment.wording.replace(/\*\*/g, "")}`);
|
|
9396
9417
|
}
|
|
9397
|
-
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed }));
|
|
9418
|
+
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed || orientView?.fetchFailed === true }));
|
|
9398
9419
|
if (orientView?.startup?.domainRetrieval) {
|
|
9399
9420
|
const retrieval = orientView.startup.domainRetrieval;
|
|
9400
9421
|
const scopedTo = retrieval.resolvedDomainSlug ? ` (${retrieval.resolvedDomainSlug})` : "";
|
|
@@ -9543,6 +9564,10 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9543
9564
|
...orientView?.directionLine !== void 0 ? { directionLine: orientView.directionLine } : {},
|
|
9544
9565
|
...orientView?.verdictAskLine !== void 0 ? { verdictAskLine: orientView.verdictAskLine } : {},
|
|
9545
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
|
|
9546
9571
|
// RCRT miss-alarm: machine-readable verdict for structuredContent
|
|
9547
9572
|
// consumers (parity with the rendered prose alarm).
|
|
9548
9573
|
...orientView?.retrievalMiss ? { retrievalMiss: orientView.retrievalMiss } : {},
|
|
@@ -9725,7 +9750,7 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9725
9750
|
}
|
|
9726
9751
|
if (orientView) {
|
|
9727
9752
|
lines.push(...buildTaskAlignmentLines(orientView.taskAlignment));
|
|
9728
|
-
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed }));
|
|
9753
|
+
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed || orientView?.fetchFailed === true }));
|
|
9729
9754
|
lines.push(...formatInitiativeStatusLines(orientView.initiativeStatus));
|
|
9730
9755
|
lines.push(...formatWorkstreamHealthLines(orientView.workstreamHealth));
|
|
9731
9756
|
lines.push(...formatWhatNeedsAttentionLines(orientView.whatNeedsAttention));
|
|
@@ -9853,7 +9878,7 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9853
9878
|
} else {
|
|
9854
9879
|
lines.push(`**Brain stage: ${orientStage}.**`);
|
|
9855
9880
|
lines.push("");
|
|
9856
|
-
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed }));
|
|
9881
|
+
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed || orientView?.fetchFailed === true }));
|
|
9857
9882
|
if (orientView?.activeWorkPackages?.length) {
|
|
9858
9883
|
lines.push("## Active work packages \u2014 current scope");
|
|
9859
9884
|
lines.push("_Work outside these work packages requires explicit user confirmation._");
|
|
@@ -9983,6 +10008,10 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9983
10008
|
...orientView?.directionLine !== void 0 ? { directionLine: orientView.directionLine } : {},
|
|
9984
10009
|
...orientView?.verdictAskLine !== void 0 ? { verdictAskLine: orientView.verdictAskLine } : {},
|
|
9985
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
|
|
9986
10015
|
// RCRT miss-alarm: machine-readable verdict for structuredContent
|
|
9987
10016
|
// consumers (parity with the rendered prose alarm).
|
|
9988
10017
|
...orientView?.retrievalMiss ? { retrievalMiss: orientView.retrievalMiss } : {},
|
|
@@ -11843,6 +11872,7 @@ async function handleSpineCheck(story, refresh = false) {
|
|
|
11843
11872
|
if (s.visionConnectedToPurpose === false) lines.push("No vision informs any purpose.");
|
|
11844
11873
|
if (s.visionPurposeConnectivityTruncated) lines.push("Vision\u2192purpose connectivity unknown (relation set truncated).");
|
|
11845
11874
|
if (verdict.strategiesTruncated) lines.push("Strategy set truncated \u2014 not every strategy was graded this pass.");
|
|
11875
|
+
if (verdict.perStrategyEvaluationTruncated) lines.push("Per-strategy evaluation stopped on the wall-clock budget \u2014 not every fetched strategy was graded this pass.");
|
|
11846
11876
|
if (verdict.perStrategy.length > 0) {
|
|
11847
11877
|
lines.push("", `Per-strategy refusal heuristic (${verdict.perStrategy.length}):`);
|
|
11848
11878
|
for (const p of verdict.perStrategy) {
|
|
@@ -11855,7 +11885,7 @@ async function handleSpineCheck(story, refresh = false) {
|
|
|
11855
11885
|
lines.push("", `One-story judgment [unvalidated, on-demand]: ${verdict.story.passed ? "PASS" : "FAIL"}`);
|
|
11856
11886
|
if (!verdict.story.passed && verdict.story.failedCriterion) lines.push(`Failed criterion: ${verdict.story.failedCriterion}`);
|
|
11857
11887
|
} else if (row.includesStoryPass) {
|
|
11858
|
-
lines.push("", "One-story judgment: requested, but the LLM pass did not return a usable result (timeout or parse failure).
|
|
11888
|
+
lines.push("", "One-story judgment: requested, but the LLM pass did not return a usable result (timeout or parse failure). Pass refresh:true to retry \u2014 a plain re-run will not reschedule it.");
|
|
11859
11889
|
} else {
|
|
11860
11890
|
lines.push("", "One-story judgment: not run this pass \u2014 pass story=true to run it.");
|
|
11861
11891
|
}
|
|
@@ -13170,7 +13200,9 @@ async function handleClose() {
|
|
|
13170
13200
|
// genuine no-row arm.
|
|
13171
13201
|
...rituals?.directionLine !== void 0 ? { directionLine: rituals.directionLine } : {},
|
|
13172
13202
|
...rituals?.verdictAskLine !== void 0 ? { verdictAskLine: rituals.verdictAskLine } : {},
|
|
13173
|
-
...rituals?.spineLine !== void 0 ? { spineLine: rituals.spineLine } : {}
|
|
13203
|
+
...rituals?.spineLine !== void 0 ? { spineLine: rituals.spineLine } : {},
|
|
13204
|
+
...rituals?.atCapLine !== void 0 ? { atCapLine: rituals.atCapLine } : {}
|
|
13205
|
+
// D1 residue fix (named item c)
|
|
13174
13206
|
})
|
|
13175
13207
|
};
|
|
13176
13208
|
}
|
|
@@ -16461,4 +16493,4 @@ export {
|
|
|
16461
16493
|
createProductBrainServer,
|
|
16462
16494
|
initFeatureFlags
|
|
16463
16495
|
};
|
|
16464
|
-
//# sourceMappingURL=chunk-
|
|
16496
|
+
//# sourceMappingURL=chunk-YUN2RDXK.js.map
|