@yawlabs/mcph 0.34.0 → 0.35.0
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/CHANGELOG.md +4 -0
- package/dist/index.js +17 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@yawlabs/mcph` are documented here. This project uses [semantic versioning](https://semver.org) and a CI-gated release flow: pushing a `vX.Y.Z` tag triggers `.github/workflows/release.yml`, which publishes to npm.
|
|
4
4
|
|
|
5
|
+
## 0.35.0 — 2026-04-18
|
|
6
|
+
|
|
7
|
+
- **Inline reliability warning in `mcp_connect_discover`** — Discover now annotates dormant (not currently loaded) servers with `reliability: P% success across N past calls` when persisted learning shows ≥3 dispatches and <80% success. Renders under the server card right after the live health warning, so the LLM sees the flaky history *before* it picks a server to activate — not only after `handleHealth` surfaces it post-hoc. Thresholds match the cross-session reliability block from v0.34.0 so the two views stay consistent. Suppressed for loaded servers (the live per-call warning already covers them with fresher data).
|
|
8
|
+
|
|
5
9
|
## 0.34.0 — 2026-04-18
|
|
6
10
|
|
|
7
11
|
- **Cross-session reliability block in `mcp_connect_health`** — New section at the bottom of health output surfaces flaky *dormant* namespaces pulled from persisted learning: `<namespace> — N calls, P% success, last used <age> ago`. Threshold is deliberately high (≥3 dispatches, <80% success) so a one-off failure doesn't light up the panel; loaded namespaces are skipped (in-session block already covers them). Sorted worst-rate first, ties broken by most calls then alpha; capped at 5. Also fixes a gap where `handleHealth` returned early on an empty-connections session and never showed dormant history — now it falls through so operators can see which past servers were unreliable even before loading anything.
|
package/dist/index.js
CHANGED
|
@@ -946,7 +946,7 @@ function errorMessage(err) {
|
|
|
946
946
|
}
|
|
947
947
|
|
|
948
948
|
// src/doctor-cmd.ts
|
|
949
|
-
var VERSION = true ? "0.
|
|
949
|
+
var VERSION = true ? "0.35.0" : "dev";
|
|
950
950
|
async function runDoctor(opts = {}) {
|
|
951
951
|
const lines = [];
|
|
952
952
|
const write = opts.out ?? ((s) => process.stdout.write(s));
|
|
@@ -3922,7 +3922,7 @@ function categorizeSpawnError(err) {
|
|
|
3922
3922
|
}
|
|
3923
3923
|
async function connectToUpstream(config, onDisconnect, onListChanged) {
|
|
3924
3924
|
const client = new Client(
|
|
3925
|
-
{ name: "mcph", version: true ? "0.
|
|
3925
|
+
{ name: "mcph", version: true ? "0.35.0" : "dev" },
|
|
3926
3926
|
{ capabilities: {} }
|
|
3927
3927
|
);
|
|
3928
3928
|
let transport;
|
|
@@ -4323,6 +4323,8 @@ async function reportTools(serverId, tools) {
|
|
|
4323
4323
|
// src/usage-hints.ts
|
|
4324
4324
|
var MAX_PEERS = 3;
|
|
4325
4325
|
var MIN_SUCCESS_TO_SHOW = 1;
|
|
4326
|
+
var RELIABILITY_MIN_OBSERVATIONS = 3;
|
|
4327
|
+
var RELIABILITY_THRESHOLD = 0.8;
|
|
4326
4328
|
function buildCoUsageMap(packs) {
|
|
4327
4329
|
const result = /* @__PURE__ */ new Map();
|
|
4328
4330
|
for (const pack of packs) {
|
|
@@ -4355,6 +4357,13 @@ function formatUsageHint(usage, coUsedWith) {
|
|
|
4355
4357
|
if (parts.length === 0) return null;
|
|
4356
4358
|
return `usage: ${parts.join("; ")}`;
|
|
4357
4359
|
}
|
|
4360
|
+
function formatReliabilityWarning(usage) {
|
|
4361
|
+
if (!usage || usage.dispatched < RELIABILITY_MIN_OBSERVATIONS) return null;
|
|
4362
|
+
const rate = usage.succeeded / usage.dispatched;
|
|
4363
|
+
if (rate >= RELIABILITY_THRESHOLD) return null;
|
|
4364
|
+
const pct = Math.round(rate * 100);
|
|
4365
|
+
return `reliability: ${pct}% success across ${usage.dispatched} past calls`;
|
|
4366
|
+
}
|
|
4358
4367
|
|
|
4359
4368
|
// src/server.ts
|
|
4360
4369
|
var DEFAULT_POLL_INTERVAL_MS = 6e4;
|
|
@@ -4439,7 +4448,7 @@ var ConnectServer = class _ConnectServer {
|
|
|
4439
4448
|
this.apiUrl = apiUrl6;
|
|
4440
4449
|
this.token = token6;
|
|
4441
4450
|
this.server = new Server(
|
|
4442
|
-
{ name: "mcph", version: true ? "0.
|
|
4451
|
+
{ name: "mcph", version: true ? "0.35.0" : "dev" },
|
|
4443
4452
|
{
|
|
4444
4453
|
capabilities: {
|
|
4445
4454
|
tools: { listChanged: true },
|
|
@@ -5314,6 +5323,10 @@ var ConnectServer = class _ConnectServer {
|
|
|
5314
5323
|
if (shadow) lines.push(` ${shadow}`);
|
|
5315
5324
|
const warning = formatHealthWarning(connection?.health, this.activationFailures.get(server.namespace));
|
|
5316
5325
|
if (warning) lines.push(` ${warning}`);
|
|
5326
|
+
if (!connection) {
|
|
5327
|
+
const reliability = formatReliabilityWarning(this.learning.get(server.namespace));
|
|
5328
|
+
if (reliability) lines.push(` ${reliability}`);
|
|
5329
|
+
}
|
|
5317
5330
|
const usageHint = formatUsageHint(this.learning.get(server.namespace), coUsageMap.get(server.namespace) ?? []);
|
|
5318
5331
|
if (usageHint) lines.push(` ${usageHint}`);
|
|
5319
5332
|
if (!connection) {
|
|
@@ -6540,7 +6553,7 @@ ${installBlock}
|
|
|
6540
6553
|
);
|
|
6541
6554
|
process.exit(0);
|
|
6542
6555
|
} else if (subcommand === "--version" || subcommand === "-V") {
|
|
6543
|
-
process.stdout.write(`mcph ${true ? "0.
|
|
6556
|
+
process.stdout.write(`mcph ${true ? "0.35.0" : "dev"}
|
|
6544
6557
|
`);
|
|
6545
6558
|
process.exit(0);
|
|
6546
6559
|
} else if (subcommand && !subcommand.startsWith("-")) {
|
package/package.json
CHANGED