@productbrain/mcp 0.0.1-beta.14530 → 0.0.1-beta.14531
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.
|
@@ -574,33 +574,16 @@ function readEntryBody(data, proseKey) {
|
|
|
574
574
|
}
|
|
575
575
|
|
|
576
576
|
// src/tools/knowledge-helpers.ts
|
|
577
|
-
var EPISTEMIC_COLLECTIONS = /* @__PURE__ */ new Set(["insights", "assumptions"]);
|
|
578
577
|
function deriveEpistemicStatus(entry) {
|
|
579
578
|
const coll = entry.collectionName?.toLowerCase();
|
|
580
|
-
if (
|
|
579
|
+
if (coll !== "insights") return null;
|
|
581
580
|
const relations = entry.relations ?? [];
|
|
582
581
|
const hasValidates = relations.some(
|
|
583
582
|
(r) => r.type === "validates" && r.direction === "incoming"
|
|
584
583
|
);
|
|
585
|
-
const hasInvalidates = relations.some(
|
|
586
|
-
(r) => r.type === "invalidates" && r.direction === "incoming"
|
|
587
|
-
);
|
|
588
584
|
const evidenceCount = relations.filter(
|
|
589
585
|
(r) => (r.type === "validates" || r.type === "invalidates") && r.direction === "incoming"
|
|
590
586
|
).length;
|
|
591
|
-
if (coll === "assumptions") {
|
|
592
|
-
const ws2 = entry.workflowStatus;
|
|
593
|
-
if (ws2 === "invalidated" || hasInvalidates) {
|
|
594
|
-
return { level: "invalidated", reason: "Disproved by linked counter-evidence" };
|
|
595
|
-
}
|
|
596
|
-
if (ws2 === "validated" || hasValidates && ws2 !== "untested") {
|
|
597
|
-
return { level: "validated", reason: `${evidenceCount} evidence link${evidenceCount !== 1 ? "s" : ""}` };
|
|
598
|
-
}
|
|
599
|
-
if (ws2 === "testing") {
|
|
600
|
-
return { level: "testing", reason: "Experiment in progress" };
|
|
601
|
-
}
|
|
602
|
-
return { level: "untested", reason: "No evidence linked", action: 'Link evidence via `relations action=create type="validates"`' };
|
|
603
|
-
}
|
|
604
587
|
const ws = entry.workflowStatus;
|
|
605
588
|
if (ws === "validated" && hasValidates) {
|
|
606
589
|
return { level: "validated", reason: `${evidenceCount} evidence link${evidenceCount !== 1 ? "s" : ""}` };
|
|
@@ -615,7 +598,7 @@ function deriveEpistemicStatus(entry) {
|
|
|
615
598
|
};
|
|
616
599
|
}
|
|
617
600
|
function formatEpistemicLine(es) {
|
|
618
|
-
const icon = es.level === "validated" ? "\u2713" : es.level === "evidenced" ? "\u25CE" :
|
|
601
|
+
const icon = es.level === "validated" ? "\u2713" : es.level === "evidenced" ? "\u25CE" : "\u25B3";
|
|
619
602
|
const suffix = es.action ? ` ${es.action}` : "";
|
|
620
603
|
return `**Confidence:** ${icon} ${es.level} \u2014 ${es.reason}.${suffix}`;
|
|
621
604
|
}
|
|
@@ -2151,7 +2134,7 @@ No DB writes \u2014 call without \`preview:true\` to accept for real.` }],
|
|
|
2151
2134
|
const replaced = result2?.replaced;
|
|
2152
2135
|
if (replaced) lines.push("", replaced.line, ...replaced.nextAccept ? [`Next: ${acceptCall(replaced.nextAccept)}.`] : []);
|
|
2153
2136
|
const epistemic = deriveEpistemicStatus(toEpistemicInput(entry));
|
|
2154
|
-
if (epistemic
|
|
2137
|
+
if (epistemic?.level === "hypothesis") {
|
|
2155
2138
|
lines.push("");
|
|
2156
2139
|
lines.push(`\u26A0 ${formatEpistemicLine(epistemic)}`);
|
|
2157
2140
|
if (epistemic.action) {
|
|
@@ -4647,7 +4630,6 @@ function annotateStaleNames(text) {
|
|
|
4647
4630
|
function epistemicCollectionHint(collectionName) {
|
|
4648
4631
|
const lc = collectionName.toLowerCase();
|
|
4649
4632
|
if (lc === "insights") return " \u2014 _verify confidence with `context action=get`_";
|
|
4650
|
-
if (lc === "assumptions") return " \u2014 _check evidence strength with `context action=get`_";
|
|
4651
4633
|
return "";
|
|
4652
4634
|
}
|
|
4653
4635
|
var CONTEXT_ACTIONS = [...LOOKUP_ACTIONS, "gather", "build", "neighborhood", "changes", "chain", "cross-cut", "incremental", "brief"];
|
|
@@ -6939,7 +6921,7 @@ function formatBetConstellationLines(constellationEntries, constellationBetName)
|
|
|
6939
6921
|
const betName = constellationBetName ?? "Matched work package";
|
|
6940
6922
|
const lines = [
|
|
6941
6923
|
`## Work Package Constellation \u2014 ${betName}`,
|
|
6942
|
-
"_Decisions
|
|
6924
|
+
"_Decisions and tensions related to the matched work package._",
|
|
6943
6925
|
""
|
|
6944
6926
|
];
|
|
6945
6927
|
const bySlug = /* @__PURE__ */ new Map();
|
|
@@ -6948,7 +6930,7 @@ function formatBetConstellationLines(constellationEntries, constellationBetName)
|
|
|
6948
6930
|
list.push(e);
|
|
6949
6931
|
bySlug.set(e.collectionSlug, list);
|
|
6950
6932
|
}
|
|
6951
|
-
const order = ["decisions", "tensions"
|
|
6933
|
+
const order = ["decisions", "tensions"];
|
|
6952
6934
|
for (const slug of order) {
|
|
6953
6935
|
const entries = bySlug.get(slug);
|
|
6954
6936
|
if (!entries?.length) continue;
|
|
@@ -12425,4 +12407,4 @@ export {
|
|
|
12425
12407
|
SERVER_VERSION,
|
|
12426
12408
|
createProductBrainServer
|
|
12427
12409
|
};
|
|
12428
|
-
//# sourceMappingURL=chunk-
|
|
12410
|
+
//# sourceMappingURL=chunk-LVXKUIP6.js.map
|