@productbrain/mcp 0.0.1-beta.4039 → 0.0.1-beta.4042
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.
|
@@ -8493,7 +8493,7 @@ function buildTaskAlignmentLines(ta) {
|
|
|
8493
8493
|
lines.push(`${i + 1}. **${ta.escapeRoutes[i].kind}** \u2014 ${ta.escapeRoutes[i].instruction}`);
|
|
8494
8494
|
}
|
|
8495
8495
|
}
|
|
8496
|
-
if (ta.verdict === "misaligned" && ta.citedRule) {
|
|
8496
|
+
if ((ta.verdict === "misaligned" || ta.verdict === "abstain") && ta.citedRule) {
|
|
8497
8497
|
lines.push("");
|
|
8498
8498
|
lines.push(`_Workspace rule: \`${ta.citedRule.entryId ?? ""}\` ${ta.citedRule.name}._`);
|
|
8499
8499
|
}
|
|
@@ -8772,6 +8772,18 @@ function reportOrientWrapperBytes(toolResult, truncated, tier, taskProvided) {
|
|
|
8772
8772
|
}
|
|
8773
8773
|
}
|
|
8774
8774
|
|
|
8775
|
+
// src/tools/orientDegradation.ts
|
|
8776
|
+
function buildDegradedPreloadsLine(degraded) {
|
|
8777
|
+
if (!degraded || degraded.length === 0) return null;
|
|
8778
|
+
return `\u26A0\uFE0F Degraded this run: ${degraded.join(", ")} preload(s) failed open \u2014 results may be thinner than usual.`;
|
|
8779
|
+
}
|
|
8780
|
+
function coherencyCheckTag(status2) {
|
|
8781
|
+
if (status2 === "not_checked") return " [not checked]";
|
|
8782
|
+
if (status2 === "check_incomplete") return " [check incomplete]";
|
|
8783
|
+
if (status2 === "stale") return " [stale \u2014 entry changed since last check]";
|
|
8784
|
+
return "";
|
|
8785
|
+
}
|
|
8786
|
+
|
|
8775
8787
|
// src/lib/gapToPrompt.ts
|
|
8776
8788
|
function cleanLabel(label) {
|
|
8777
8789
|
return label.replace(/ has entries$/i, "").replace(/ coverage$/i, "").replace(/^Strategy — /i, "");
|
|
@@ -9385,12 +9397,6 @@ var ORIENT_ACTION_SPECS = {
|
|
|
9385
9397
|
description: "All three fields are required."
|
|
9386
9398
|
}
|
|
9387
9399
|
};
|
|
9388
|
-
function coherencyCheckTag(status2) {
|
|
9389
|
-
if (status2 === "not_checked") return " [not checked]";
|
|
9390
|
-
if (status2 === "check_incomplete") return " [check incomplete]";
|
|
9391
|
-
if (status2 === "stale") return " [stale \u2014 entry changed since last check]";
|
|
9392
|
-
return "";
|
|
9393
|
-
}
|
|
9394
9400
|
function taskGroundingWarningLines(task, hasTaskGrounding = false) {
|
|
9395
9401
|
if (hasTaskGrounding) return [];
|
|
9396
9402
|
if (task) {
|
|
@@ -9609,6 +9615,8 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9609
9615
|
if (orientView?.taskAlignment) {
|
|
9610
9616
|
lines.push(`Task alignment: ${orientView.taskAlignment.verdict} \u2014 ${orientView.taskAlignment.wording.replace(/\*\*/g, "")}`);
|
|
9611
9617
|
}
|
|
9618
|
+
const degradedLineBrief = buildDegradedPreloadsLine(orientView?.degradedPreloads);
|
|
9619
|
+
if (degradedLineBrief) lines.push(degradedLineBrief);
|
|
9612
9620
|
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed || orientView?.fetchFailed === true }));
|
|
9613
9621
|
if (orientView?.startup?.domainRetrieval) {
|
|
9614
9622
|
const retrieval = orientView.startup.domainRetrieval;
|
|
@@ -9752,6 +9760,8 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9752
9760
|
...orientView?.taskContext?.isGroundingStub ? { groundingStub: true } : {},
|
|
9753
9761
|
// WP-465 slice ③ (§4.1): served verbatim — identical on CLI and MCP.
|
|
9754
9762
|
...orientView?.taskAlignment ? { taskAlignment: orientView.taskAlignment } : {},
|
|
9763
|
+
...orientView?.degradedPreloads?.length ? { degradedPreloads: orientView.degradedPreloads } : {},
|
|
9764
|
+
// WP-621 S1
|
|
9755
9765
|
// WP-582 B2 round 1 (Codex P2 review, PR #532, T1): omit when `undefined` (old
|
|
9756
9766
|
// deploy, field never served); keep an explicit `null` for the documented no-row
|
|
9757
9767
|
// arm — the two states must stay distinguishable to a structuredContent consumer.
|
|
@@ -9944,6 +9954,8 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
9944
9954
|
}
|
|
9945
9955
|
if (orientView) {
|
|
9946
9956
|
lines.push(...buildTaskAlignmentLines(orientView.taskAlignment));
|
|
9957
|
+
const degradedLineFull = buildDegradedPreloadsLine(orientView.degradedPreloads);
|
|
9958
|
+
if (degradedLineFull) lines.push(degradedLineFull);
|
|
9947
9959
|
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed || orientView?.fetchFailed === true }));
|
|
9948
9960
|
lines.push(...formatInitiativeStatusLines(orientView.initiativeStatus));
|
|
9949
9961
|
lines.push(...formatWorkstreamHealthLines(orientView.workstreamHealth));
|
|
@@ -10196,6 +10208,8 @@ async function _handleOrient({ mode = "full", tier, task, scope, startupSignals,
|
|
|
10196
10208
|
...orientView?.taskContext?.isGroundingStub ? { groundingStub: true } : {},
|
|
10197
10209
|
// WP-465 slice ③ (§4.1): served verbatim — identical on CLI and MCP.
|
|
10198
10210
|
...orientView?.taskAlignment ? { taskAlignment: orientView.taskAlignment } : {},
|
|
10211
|
+
...orientView?.degradedPreloads?.length ? { degradedPreloads: orientView.degradedPreloads } : {},
|
|
10212
|
+
// WP-621 S1
|
|
10199
10213
|
// WP-582 B2 round 1 (Codex P2 review, PR #532, T1): served verbatim ONLY when the
|
|
10200
10214
|
// server actually sent the field — see the matching brief-mode comment above for the
|
|
10201
10215
|
// undefined-vs-null distinction this preserves.
|
|
@@ -16702,4 +16716,4 @@ export {
|
|
|
16702
16716
|
createProductBrainServer,
|
|
16703
16717
|
initFeatureFlags
|
|
16704
16718
|
};
|
|
16705
|
-
//# sourceMappingURL=chunk-
|
|
16719
|
+
//# sourceMappingURL=chunk-AMDHVE7R.js.map
|