@productbrain/mcp 0.0.1-beta.14560 → 0.0.1-beta.14566
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.
|
@@ -4071,6 +4071,7 @@ var pct = (v, unit = "%") => v === void 0 ? "\u2014" : `${Math.round(v * 10) / 1
|
|
|
4071
4071
|
var roleLabel = (role) => role === null ? "not set" : role.name === null ? "a role that no longer exists" : sanitizeSingleLineField(role.name);
|
|
4072
4072
|
function formatOutcomeShow(result2) {
|
|
4073
4073
|
if (!result2) return "No outcome found.";
|
|
4074
|
+
if ("kpiState" in result2.outcome) return formatKpiShow(result2);
|
|
4074
4075
|
const o = result2.outcome;
|
|
4075
4076
|
const unit = o.unit ? ` ${sanitizeSingleLineField(o.unit)}` : "";
|
|
4076
4077
|
const lines = [
|
|
@@ -4095,6 +4096,18 @@ function formatOutcomeShow(result2) {
|
|
|
4095
4096
|
}
|
|
4096
4097
|
return lines.join("\n");
|
|
4097
4098
|
}
|
|
4099
|
+
function formatKpiShow(result2) {
|
|
4100
|
+
const o = result2.outcome;
|
|
4101
|
+
const unit = o.unit ? ` ${sanitizeSingleLineField(o.unit)}` : "";
|
|
4102
|
+
return [
|
|
4103
|
+
`${sanitizeSingleLineField(result2.entryId)} \u2014 ${sanitizeSingleLineField(result2.name)}`,
|
|
4104
|
+
` standing ${sanitizeSingleLineField(o.kpiState.text)}`,
|
|
4105
|
+
` current ${o.current ? `${o.current.value}${unit} on ${safeDateSlice(o.current.asOf)}` : "\u2014"} (${o.readingCount} reading(s))`,
|
|
4106
|
+
` next due ${o.nextDueAt ? safeDateSlice(o.nextDueAt) : "no cadence set"}`,
|
|
4107
|
+
` owner ${roleLabel(o.ownerRole)}`,
|
|
4108
|
+
` reporter ${roleLabel(o.reporterRole)}`
|
|
4109
|
+
].join("\n");
|
|
4110
|
+
}
|
|
4098
4111
|
function outcomeErrorResult(err, action, entryId, params = {}) {
|
|
4099
4112
|
const classified = classifyError(err);
|
|
4100
4113
|
const definedParams = Object.fromEntries(Object.entries(params).filter(([, v]) => v !== void 0));
|
|
@@ -12404,4 +12417,4 @@ export {
|
|
|
12404
12417
|
SERVER_VERSION,
|
|
12405
12418
|
createProductBrainServer
|
|
12406
12419
|
};
|
|
12407
|
-
//# sourceMappingURL=chunk-
|
|
12420
|
+
//# sourceMappingURL=chunk-NSA7HEJI.js.map
|