@productbrain/mcp 0.0.1-beta.7345 → 0.0.1-beta.7351
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.
|
@@ -3861,7 +3861,7 @@ function renderWhyLine(e) {
|
|
|
3861
3861
|
const d = e.data ?? {};
|
|
3862
3862
|
let whySourceKey = null;
|
|
3863
3863
|
const kf = e.whyField;
|
|
3864
|
-
if ((kf === "rationale" || kf === "description") && typeof d[kf] === "string" && d[kf].trim().length > 0) {
|
|
3864
|
+
if ((kf === "why" || kf === "rationale" || kf === "description") && typeof d[kf] === "string" && d[kf].trim().length > 0) {
|
|
3865
3865
|
whySourceKey = kf;
|
|
3866
3866
|
} else if (typeof d.rationale === "string" && d.rationale.trim().length > 0) {
|
|
3867
3867
|
whySourceKey = "rationale";
|
|
@@ -3884,6 +3884,7 @@ function renderVerificationLine(e) {
|
|
|
3884
3884
|
}
|
|
3885
3885
|
return `**Verification:** ${String(e.verificationStatus)}${who}`;
|
|
3886
3886
|
}
|
|
3887
|
+
var wqSchema = z10.enum(["rationale", "missing", "restated"]);
|
|
3887
3888
|
var entriesGetOutputSchema = z10.object({
|
|
3888
3889
|
entryId: z10.string(),
|
|
3889
3890
|
name: z10.string(),
|
|
@@ -3909,8 +3910,7 @@ var entriesGetOutputSchema = z10.object({
|
|
|
3909
3910
|
sourceRef: z10.string().optional(),
|
|
3910
3911
|
sourceExcerpt: z10.string().optional(),
|
|
3911
3912
|
why: z10.string().optional(),
|
|
3912
|
-
|
|
3913
|
-
whyQuality: z10.enum(["rationale", "missing", "restated"]).optional(),
|
|
3913
|
+
whyQuality: wqSchema.optional(),
|
|
3914
3914
|
data: z10.record(z10.unknown()).optional(),
|
|
3915
3915
|
relations: z10.array(z10.object({
|
|
3916
3916
|
entryId: z10.string().optional(),
|
|
@@ -3963,9 +3963,9 @@ var entriesBatchOutputSchema = z10.object({
|
|
|
3963
3963
|
}).optional(),
|
|
3964
3964
|
sourceRef: z10.string().optional(),
|
|
3965
3965
|
sourceExcerpt: z10.string().optional(),
|
|
3966
|
-
// TEN-2191: mirror entriesGetOutputSchema — batch entries now carry why/whyQuality.
|
|
3967
3966
|
why: z10.string().optional(),
|
|
3968
|
-
|
|
3967
|
+
// TEN-2191: mirrors entriesGetOutputSchema
|
|
3968
|
+
whyQuality: wqSchema.optional(),
|
|
3969
3969
|
data: z10.record(z10.unknown()).optional()
|
|
3970
3970
|
}).passthrough()),
|
|
3971
3971
|
total: z10.number()
|
|
@@ -14226,7 +14226,6 @@ async function buildOrientationResourceText(kernelQuery2) {
|
|
|
14226
14226
|
kernelQuery2("chain.listEntries", { collectionSlug: "principles" }),
|
|
14227
14227
|
kernelQuery2("chain.getOrientView", {
|
|
14228
14228
|
tier: "summary",
|
|
14229
|
-
renderMode: "json",
|
|
14230
14229
|
invocationPath: "unknown"
|
|
14231
14230
|
})
|
|
14232
14231
|
]);
|
|
@@ -14234,8 +14233,16 @@ async function buildOrientationResourceText(kernelQuery2) {
|
|
|
14234
14233
|
const standards = standardsResult.status === "fulfilled" ? standardsResult.value : null;
|
|
14235
14234
|
const businessRules = rulesResult.status === "fulfilled" ? rulesResult.value : null;
|
|
14236
14235
|
const principles = principlesResult.status === "fulfilled" ? principlesResult.value : null;
|
|
14237
|
-
|
|
14238
|
-
|
|
14236
|
+
let directionLines;
|
|
14237
|
+
if (orientViewResult.status === "rejected") {
|
|
14238
|
+
const reason = orientViewResult.reason instanceof Error ? orientViewResult.reason.message : String(orientViewResult.reason);
|
|
14239
|
+
const normalized = sanitizeSingleLineField(reason);
|
|
14240
|
+
const truncated = normalized.length > 120 ? `${normalized.slice(0, 120)}\u2026` : normalized;
|
|
14241
|
+
directionLines = [`_Strategic context unavailable: the spine read failed (${truncated})_`];
|
|
14242
|
+
} else {
|
|
14243
|
+
const orientView = orientViewResult.value;
|
|
14244
|
+
directionLines = buildDirectionLines(orientView);
|
|
14245
|
+
}
|
|
14239
14246
|
return buildOrientationMarkdown(collections, standards, businessRules, principles, directionLines);
|
|
14240
14247
|
}
|
|
14241
14248
|
|
|
@@ -14888,4 +14895,4 @@ export {
|
|
|
14888
14895
|
createProductBrainServer,
|
|
14889
14896
|
initFeatureFlags
|
|
14890
14897
|
};
|
|
14891
|
-
//# sourceMappingURL=chunk-
|
|
14898
|
+
//# sourceMappingURL=chunk-DFQJQUDB.js.map
|