@productbrain/mcp 0.0.1-beta.16741 → 0.0.1-beta.16761
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.
|
@@ -336,6 +336,7 @@ function listCutLine(shown) {
|
|
|
336
336
|
return shown > 0 ? `Only the first ${shown} entries were read.` : "No entries matched in the part of the list that was read.";
|
|
337
337
|
}
|
|
338
338
|
var LIST_COUNTS_OF_ROWS_READ = "The counts here are of the rows read.";
|
|
339
|
+
var ORIENT_TRUST_SCAN_LIMIT = 100;
|
|
339
340
|
|
|
340
341
|
// src/lib/checklist.ts
|
|
341
342
|
var FIRST_SPINE_SUBJECT = "work_package";
|
|
@@ -542,6 +543,10 @@ function isPreviewCreateEntryResult(result2) {
|
|
|
542
543
|
|
|
543
544
|
// src/lib/listEntries.ts
|
|
544
545
|
var NARROW_IN_MCP = "Narrow it with context action=list collection=<slug> or status=<word>.";
|
|
546
|
+
function searchStatusTip(cut, query, collection, status2) {
|
|
547
|
+
const statusNamed = Array.isArray(status2) ? status2.length > 0 : !!status2;
|
|
548
|
+
return cut && collection && !statusNamed ? `Narrow it with context action=search query="${query}" collection="${collection}" status=<word>.` : null;
|
|
549
|
+
}
|
|
545
550
|
async function listEntriesWithCut(args, next = LIST_COUNTS_OF_ROWS_READ) {
|
|
546
551
|
const { rows, truncated } = await kernelQuery("chain.listEntriesBounded", args);
|
|
547
552
|
return { rows, cutLine: truncated ? `${listCutLine(rows.length)} ${next}` : null };
|
|
@@ -3340,11 +3345,11 @@ async function handleSearch(server, query, collection, status2) {
|
|
|
3340
3345
|
status: e.status,
|
|
3341
3346
|
collectionName: e.collection
|
|
3342
3347
|
}));
|
|
3343
|
-
const total = structuredResults.length;
|
|
3348
|
+
const total = structuredResults.length, statusTip = searchStatusTip(answer2.cutLine !== null, query, collection, status2);
|
|
3344
3349
|
return {
|
|
3345
3350
|
content: [{ type: "text", text: `${header}
|
|
3346
3351
|
|
|
3347
|
-
${[...platform.lines, formatted, answer2.cutLine].filter(Boolean).join("\n")}
|
|
3352
|
+
${[...platform.lines, formatted, answer2.cutLine, statusTip].filter(Boolean).join("\n")}
|
|
3348
3353
|
|
|
3349
3354
|
${footer}` }],
|
|
3350
3355
|
structuredContent: success(`Found ${total} entries${platform.count ? ` and ${platform.count} platform glossary terms` : ""} matching '${query}'.`, {
|
|
@@ -7390,6 +7395,20 @@ function getCollectionLabel(canonicalKey, form, workspaceCtx, collectionCtx) {
|
|
|
7390
7395
|
}
|
|
7391
7396
|
|
|
7392
7397
|
// src/tools/orient.ts
|
|
7398
|
+
function trustMetricsLines(tm) {
|
|
7399
|
+
if (!tm || tm.verified === 0 && tm.unverified === 0) return [];
|
|
7400
|
+
const capNote = tm.scannedCap ? ` (capped at ${ORIENT_TRUST_SCAN_LIMIT})` : "";
|
|
7401
|
+
return [
|
|
7402
|
+
"## Trust metrics",
|
|
7403
|
+
`_Entry verification status across workspace${capNote}._`,
|
|
7404
|
+
"",
|
|
7405
|
+
`- **Verified:** ${tm.verified}`,
|
|
7406
|
+
`- **Unverified:** ${tm.unverified}`,
|
|
7407
|
+
`- **No status (pre-BET-240):** ${tm.noStatus}`,
|
|
7408
|
+
`- **Total scanned:** ${tm.total}`,
|
|
7409
|
+
""
|
|
7410
|
+
];
|
|
7411
|
+
}
|
|
7393
7412
|
var PURPOSE_GAP_PREFIX = "purpose-gap-";
|
|
7394
7413
|
var READINESS_GAPS_MAX = 50;
|
|
7395
7414
|
function formatRetrievalMissLines(verdict2) {
|
|
@@ -7858,20 +7877,7 @@ async function _handleOrient({ mode: mode2 = "full", tier, task, startupSignals,
|
|
|
7858
7877
|
if (degradedLineFull) lines.push(degradedLineFull);
|
|
7859
7878
|
lines.push(...buildRitualsSurfaceLines(orientView, { fetchFailed: orientFetchFailed || orientView?.fetchFailed === true }));
|
|
7860
7879
|
lines.push(...formatWhatNeedsAttentionLines(orientView.whatNeedsAttention));
|
|
7861
|
-
|
|
7862
|
-
const tm = orientView.trustMetrics;
|
|
7863
|
-
if (tm.verified > 0 || tm.unverified > 0) {
|
|
7864
|
-
const capNote = tm.scannedCap ? " (capped at 500)" : "";
|
|
7865
|
-
lines.push("## Trust metrics");
|
|
7866
|
-
lines.push(`_Entry verification status across workspace${capNote}._`);
|
|
7867
|
-
lines.push("");
|
|
7868
|
-
lines.push(`- **Verified:** ${tm.verified}`);
|
|
7869
|
-
lines.push(`- **Unverified:** ${tm.unverified}`);
|
|
7870
|
-
lines.push(`- **No status (pre-BET-240):** ${tm.noStatus}`);
|
|
7871
|
-
lines.push(`- **Total scanned:** ${tm.total}`);
|
|
7872
|
-
lines.push("");
|
|
7873
|
-
}
|
|
7874
|
-
}
|
|
7880
|
+
lines.push(...trustMetricsLines(orientView.trustMetrics));
|
|
7875
7881
|
}
|
|
7876
7882
|
if (fullCoherence) {
|
|
7877
7883
|
lines.push(...fullCoherence.lines);
|
|
@@ -7949,20 +7955,7 @@ async function _handleOrient({ mode: mode2 = "full", tier, task, startupSignals,
|
|
|
7949
7955
|
}
|
|
7950
7956
|
lines.push(...buildOpenTaskSection(orientView?.plannedWork ?? NO_PLANNED_WORK));
|
|
7951
7957
|
lines.push(...formatWhatNeedsAttentionLines(orientView?.whatNeedsAttention));
|
|
7952
|
-
|
|
7953
|
-
const tm = orientView.trustMetrics;
|
|
7954
|
-
if (tm.verified > 0 || tm.unverified > 0) {
|
|
7955
|
-
const capNote = tm.scannedCap ? " (capped at 500)" : "";
|
|
7956
|
-
lines.push("## Trust metrics");
|
|
7957
|
-
lines.push(`_Entry verification status across workspace${capNote}._`);
|
|
7958
|
-
lines.push("");
|
|
7959
|
-
lines.push(`- **Verified:** ${tm.verified}`);
|
|
7960
|
-
lines.push(`- **Unverified:** ${tm.unverified}`);
|
|
7961
|
-
lines.push(`- **No status (pre-BET-240):** ${tm.noStatus}`);
|
|
7962
|
-
lines.push(`- **Total scanned:** ${tm.total}`);
|
|
7963
|
-
lines.push("");
|
|
7964
|
-
}
|
|
7965
|
-
}
|
|
7958
|
+
lines.push(...trustMetricsLines(orientView?.trustMetrics));
|
|
7966
7959
|
if (fullCoherence) {
|
|
7967
7960
|
lines.push(...fullCoherence.lines);
|
|
7968
7961
|
}
|
|
@@ -12539,4 +12532,4 @@ export {
|
|
|
12539
12532
|
SERVER_VERSION,
|
|
12540
12533
|
createProductBrainServer
|
|
12541
12534
|
};
|
|
12542
|
-
//# sourceMappingURL=chunk-
|
|
12535
|
+
//# sourceMappingURL=chunk-GSMNWDWV.js.map
|