@productbrain/mcp 0.0.1-beta.6052 → 0.0.1-beta.6058
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.
|
@@ -7310,16 +7310,11 @@ function formatSteeringBrief(result2) {
|
|
|
7310
7310
|
if (result2.snapshotWarning) {
|
|
7311
7311
|
lines.push("_Note: Compound query spans multiple reads. Data consistency is not guaranteed across components (TEN-1029)._");
|
|
7312
7312
|
}
|
|
7313
|
-
const sanitizedReadiness = { ...readiness };
|
|
7314
|
-
delete sanitizedReadiness.score;
|
|
7315
|
-
delete sanitizedReadiness.totalChecks;
|
|
7316
|
-
delete sanitizedReadiness.passedChecks;
|
|
7317
|
-
delete sanitizedReadiness.scoringVersion;
|
|
7318
7313
|
return {
|
|
7319
7314
|
content: [{ type: "text", text: lines.join("\n") }],
|
|
7320
7315
|
structuredContent: success(
|
|
7321
7316
|
`Steering brief: ${changes.entries.length} changes, ${delta.newEntries.length} new entries.${readiness.sampleTruncated ? " (provisional sample; gaps unverified)" : ""}`,
|
|
7322
|
-
{ ...result2,
|
|
7317
|
+
{ ...result2, trustFilterActive: true }
|
|
7323
7318
|
)
|
|
7324
7319
|
};
|
|
7325
7320
|
}
|
|
@@ -9112,6 +9107,41 @@ function formatAdoptDiscoveryLine(display) {
|
|
|
9112
9107
|
return [`- ${display} open question${display === "1" ? "" : "s"} you raised have no owner yet \u2014 use \`question action=adopt\` to route one.`];
|
|
9113
9108
|
}
|
|
9114
9109
|
|
|
9110
|
+
// src/lib/terminalStatuses.ts
|
|
9111
|
+
var TERMINAL_STATUSES = /* @__PURE__ */ new Set([
|
|
9112
|
+
"shipped",
|
|
9113
|
+
"resolved",
|
|
9114
|
+
"done",
|
|
9115
|
+
"closed",
|
|
9116
|
+
"decided",
|
|
9117
|
+
"deprecated",
|
|
9118
|
+
// WP-707 S1 round-3 sign-off (P1, PRRT_kwDORS4ils6eVtHg): the questions drawer this PR revives
|
|
9119
|
+
// declares validWorkflowStatuses ['open','investigating','answered','dropped'] — before this
|
|
9120
|
+
// PR, questions were shelved as 'tension' so confidence.ts's QUESTION_SLUGS (['questions'])
|
|
9121
|
+
// matched nothing and questionResolutionRate defaulted to 1. Reviving the drawer without this
|
|
9122
|
+
// entry makes resolvedQuestions always empty (0/N), so any workspace with ≥3 questions goes
|
|
9123
|
+
// PERMANENTLY red and every answered question with ≥3 downstream stays a whatsNext critical
|
|
9124
|
+
// blocker forever, even after being answered. 'dropped' is pre-existing on objectives/
|
|
9125
|
+
// key-results/work-packages/chains (already terminal there) but becomes newly reachable via
|
|
9126
|
+
// this PR's two new drawers — same additive edit, taken together per the sign-off ruling.
|
|
9127
|
+
"answered",
|
|
9128
|
+
"dropped"
|
|
9129
|
+
]);
|
|
9130
|
+
|
|
9131
|
+
// src/lib/rankActiveBets.ts
|
|
9132
|
+
function betWorkflowPriority(e) {
|
|
9133
|
+
if (e.workflowStatus === "building") return 2;
|
|
9134
|
+
if (e.workflowStatus === "shaped") return 1;
|
|
9135
|
+
return 0;
|
|
9136
|
+
}
|
|
9137
|
+
function rankActiveBets(entries) {
|
|
9138
|
+
return [...entries].sort((a, b) => {
|
|
9139
|
+
const p = betWorkflowPriority(b) - betWorkflowPriority(a);
|
|
9140
|
+
if (p !== 0) return p;
|
|
9141
|
+
return (b.updatedAt ?? 0) - (a.updatedAt ?? 0);
|
|
9142
|
+
});
|
|
9143
|
+
}
|
|
9144
|
+
|
|
9115
9145
|
// src/tools/start_pb.ts
|
|
9116
9146
|
var startPbSchema = z20.object({
|
|
9117
9147
|
task: z20.string().max(2e3).optional().describe(
|
|
@@ -9143,10 +9173,8 @@ async function tryMarkOriented(agentSessionId, coherenceSnapshot) {
|
|
|
9143
9173
|
}
|
|
9144
9174
|
}
|
|
9145
9175
|
}
|
|
9146
|
-
function
|
|
9147
|
-
|
|
9148
|
-
const horizon = e.data?.horizon;
|
|
9149
|
-
return status2 === "active" && horizon === "now";
|
|
9176
|
+
function isActiveBet(e) {
|
|
9177
|
+
return !TERMINAL_STATUSES.has(e.workflowStatus ?? "");
|
|
9150
9178
|
}
|
|
9151
9179
|
async function buildSetupResponse(agentSessionId, sampleTruncated) {
|
|
9152
9180
|
await kernelMutation(
|
|
@@ -9230,7 +9258,7 @@ async function buildOrientResponse(wsCtx, agentSessionId, errors, task) {
|
|
|
9230
9258
|
let activeBets = [];
|
|
9231
9259
|
try {
|
|
9232
9260
|
const betsEntries = await kernelQuery("chain.listEntries", { collectionSlug: "work-packages" });
|
|
9233
|
-
activeBets = (betsEntries ?? []).filter((e) =>
|
|
9261
|
+
activeBets = rankActiveBets((betsEntries ?? []).filter((e) => isActiveBet(e))).map((e) => ({ name: e.name, entryId: e.entryId ?? null })).slice(0, 8);
|
|
9234
9262
|
} catch {
|
|
9235
9263
|
}
|
|
9236
9264
|
let governanceEntries = { principles: [], standards: [], businessRules: [] };
|
|
@@ -17006,4 +17034,4 @@ export {
|
|
|
17006
17034
|
createProductBrainServer,
|
|
17007
17035
|
initFeatureFlags
|
|
17008
17036
|
};
|
|
17009
|
-
//# sourceMappingURL=chunk-
|
|
17037
|
+
//# sourceMappingURL=chunk-Z5CJBIDL.js.map
|