@productbrain/mcp 0.0.1-beta.8621 → 0.0.1-beta.8633
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.
- package/dist/{chunk-FB2VAQOX.js → chunk-66OMK2AA.js} +1 -1
- package/dist/{chunk-FB2VAQOX.js.map → chunk-66OMK2AA.js.map} +1 -1
- package/dist/{chunk-WVXG6HXT.js → chunk-LDWP3UNV.js} +31 -7
- package/dist/chunk-LDWP3UNV.js.map +1 -0
- package/dist/cli/index.js +1 -1
- package/dist/http.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{setup-4HRTIJQA.js → setup-SM4BGXPL.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-WVXG6HXT.js.map +0 -1
- /package/dist/{setup-4HRTIJQA.js.map → setup-SM4BGXPL.js.map} +0 -0
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
trackQualityVerdict,
|
|
39
39
|
trackSessionCaptureRate,
|
|
40
40
|
trackZeroCaptureAuditFired
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-66OMK2AA.js";
|
|
42
42
|
|
|
43
43
|
// src/server.ts
|
|
44
44
|
import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -7569,15 +7569,24 @@ function sanitizeRuleListField(value) {
|
|
|
7569
7569
|
}
|
|
7570
7570
|
function formatRuleListRow(row) {
|
|
7571
7571
|
const entryId = sanitizeRuleListField(row.entryId);
|
|
7572
|
-
const owner = row.ownerRoleId ? sanitizeRuleListField(row.ownerRoleId) : "\u2014";
|
|
7573
7572
|
const team = row.teamId ? ` (team ${sanitizeRuleListField(row.teamId)})` : "";
|
|
7574
7573
|
const servedAt = row.servedAt ? ` \u2014 served ${new Date(row.servedAt).toISOString()}` : "";
|
|
7575
|
-
|
|
7574
|
+
const name = row.name ? sanitizeRuleListField(row.name) : "";
|
|
7575
|
+
if (!name) return `${entryId} \u2014 owner ${row.ownerRoleId ? sanitizeRuleListField(row.ownerRoleId) : "\u2014"}${team}${servedAt}`;
|
|
7576
|
+
const sentence = /[.!?]$/.test(name) ? name : `${name}.`;
|
|
7577
|
+
const why = row.why ? ` Why: ${sanitizeRuleListField(row.why)}` : "";
|
|
7578
|
+
const role = sanitizeRuleListField(row.ownerRoleName ?? row.ownerRoleId ?? "\u2014");
|
|
7579
|
+
const date = row.date ? `, ${sanitizeRuleListField(row.date)}` : "";
|
|
7580
|
+
return `${entryId} \u2014 ${sentence}${why} \u2014 ${role}${team}${date}${servedAt}`;
|
|
7576
7581
|
}
|
|
7577
7582
|
function formatRuleListBucketLines(label, bucket, truncated) {
|
|
7578
7583
|
if (!bucket || bucket.rows.length === 0) return [];
|
|
7579
7584
|
const lines = [`${label}:`, ...bucket.rows.map((r) => ` - ${formatRuleListRow(r)}`)];
|
|
7580
|
-
if (bucket.overCap > 0)
|
|
7585
|
+
if (bucket.overCap > 0) {
|
|
7586
|
+
const cap = bucket.rows.length - bucket.overCap;
|
|
7587
|
+
const atLeast = truncated ? "at least " : "";
|
|
7588
|
+
lines.push(` (${atLeast}${bucket.rows.length} rules on a list capped at ${cap}: retire ${atLeast}${bucket.overCap} to fit; until then accept refuses new rules here.)`);
|
|
7589
|
+
}
|
|
7581
7590
|
return lines;
|
|
7582
7591
|
}
|
|
7583
7592
|
function formatRuleListTrailers(ruleLists) {
|
|
@@ -7585,6 +7594,9 @@ function formatRuleListTrailers(ruleLists) {
|
|
|
7585
7594
|
if (ruleLists.truncated) {
|
|
7586
7595
|
lines.push("(Some Current rules may be missing from these lists \u2014 the underlying read was truncated.)");
|
|
7587
7596
|
}
|
|
7597
|
+
if (ruleLists.namesTruncated) {
|
|
7598
|
+
lines.push("(Some rules show no owner or verifier: this serve looked up at most 100 distinct names.)");
|
|
7599
|
+
}
|
|
7588
7600
|
if (ruleLists.unassigned > 0) {
|
|
7589
7601
|
const atLeast = ruleLists.truncated ? "at least " : "";
|
|
7590
7602
|
lines.push(`(${atLeast}${ruleLists.unassigned} current rule(s) on no list reach no agent: a rule needs applies and one owner role; an everyone rule needs the root Team Lead as owner, a team rule an owner placed in a team.)`);
|
|
@@ -7607,7 +7619,14 @@ var RULE_LISTS_EVERYONE_ONLY_LABEL = "Rules (everyone list only; run `orient mod
|
|
|
7607
7619
|
var RULE_LISTS_UNAVAILABLE_LINE = "Rules: unavailable \u2014 rule list fetch failed, retry `orient mode=full`";
|
|
7608
7620
|
function buildEveryoneOnlyRuleListsLines(ruleLists) {
|
|
7609
7621
|
if (!ruleLists) return [];
|
|
7610
|
-
const everyoneOnly = {
|
|
7622
|
+
const everyoneOnly = {
|
|
7623
|
+
everyone: ruleLists.everyone,
|
|
7624
|
+
team: null,
|
|
7625
|
+
role: { rows: [], overCap: 0 },
|
|
7626
|
+
unassigned: ruleLists.unassigned,
|
|
7627
|
+
truncated: ruleLists.truncated,
|
|
7628
|
+
...ruleLists.namesTruncated ? { namesTruncated: true } : {}
|
|
7629
|
+
};
|
|
7611
7630
|
const bucketLines = formatRuleListsLines(everyoneOnly);
|
|
7612
7631
|
return [RULE_LISTS_EVERYONE_ONLY_LABEL, bucketLines.length > 0 ? bucketLines.join("\n") : "(none currently served)"];
|
|
7613
7632
|
}
|
|
@@ -7769,7 +7788,12 @@ async function buildAlreadyOrientedResult(kernelQuery2, agentSessionId, taskGrou
|
|
|
7769
7788
|
// and `ruleListsScope` says explicitly why, rather than shipping a shape a consumer could
|
|
7770
7789
|
// misread as "this session has no team/role rules".
|
|
7771
7790
|
...ruleLists ? {
|
|
7772
|
-
ruleLists: {
|
|
7791
|
+
ruleLists: {
|
|
7792
|
+
everyone: ruleLists.everyone,
|
|
7793
|
+
unassigned: ruleLists.unassigned,
|
|
7794
|
+
truncated: ruleLists.truncated,
|
|
7795
|
+
...ruleLists.namesTruncated ? { namesTruncated: true } : {}
|
|
7796
|
+
},
|
|
7773
7797
|
ruleListsScope: "everyone-only"
|
|
7774
7798
|
} : {},
|
|
7775
7799
|
// Round 1 review (PRRT_kwDORS4ils6mOeU8, TEN-3912): explicit `true` only on the rejection
|
|
@@ -14537,4 +14561,4 @@ export {
|
|
|
14537
14561
|
createProductBrainServer,
|
|
14538
14562
|
initFeatureFlags
|
|
14539
14563
|
};
|
|
14540
|
-
//# sourceMappingURL=chunk-
|
|
14564
|
+
//# sourceMappingURL=chunk-LDWP3UNV.js.map
|