@yawlabs/mcph 0.47.6 → 0.47.7
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/index.js +16 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1650,7 +1650,7 @@ function selectFlakyNamespaces(entries, limit) {
|
|
|
1650
1650
|
}
|
|
1651
1651
|
|
|
1652
1652
|
// src/doctor-cmd.ts
|
|
1653
|
-
var VERSION = true ? "0.47.
|
|
1653
|
+
var VERSION = true ? "0.47.7" : "dev";
|
|
1654
1654
|
async function runDoctor(opts = {}) {
|
|
1655
1655
|
if (opts.json) return runDoctorJson(opts);
|
|
1656
1656
|
const lines = [];
|
|
@@ -5015,7 +5015,7 @@ function categorizeSpawnError(err) {
|
|
|
5015
5015
|
}
|
|
5016
5016
|
async function connectToUpstream(config, onDisconnect, onListChanged) {
|
|
5017
5017
|
const client = new Client(
|
|
5018
|
-
{ name: "mcph", version: true ? "0.47.
|
|
5018
|
+
{ name: "mcph", version: true ? "0.47.7" : "dev" },
|
|
5019
5019
|
{ capabilities: {} }
|
|
5020
5020
|
);
|
|
5021
5021
|
let transport;
|
|
@@ -5323,7 +5323,7 @@ var ConnectServer = class _ConnectServer {
|
|
|
5323
5323
|
this.apiUrl = apiUrl6;
|
|
5324
5324
|
this.token = token6;
|
|
5325
5325
|
this.server = new Server(
|
|
5326
|
-
{ name: "mcph", version: true ? "0.47.
|
|
5326
|
+
{ name: "mcph", version: true ? "0.47.7" : "dev" },
|
|
5327
5327
|
{
|
|
5328
5328
|
capabilities: {
|
|
5329
5329
|
tools: { listChanged: true },
|
|
@@ -5341,10 +5341,14 @@ var ConnectServer = class _ConnectServer {
|
|
|
5341
5341
|
config = null;
|
|
5342
5342
|
configVersion = null;
|
|
5343
5343
|
pollTimer = null;
|
|
5344
|
-
//
|
|
5345
|
-
// this.server.oninitialized).
|
|
5346
|
-
//
|
|
5347
|
-
|
|
5344
|
+
// Captures the AI client's Implementation block once the first MCP
|
|
5345
|
+
// `initialize` lands (see this.server.oninitialized). Non-null means a
|
|
5346
|
+
// client is attached. The per-poll heartbeat refresh reuses these
|
|
5347
|
+
// exact values so its upsert always targets the same
|
|
5348
|
+
// (accountId, clientName) key the attach beacon created; re-reading
|
|
5349
|
+
// getClientVersion() per poll risked a transient undefined becoming a
|
|
5350
|
+
// split-brain 'unknown' row on the backend.
|
|
5351
|
+
attachedClient = null;
|
|
5348
5352
|
toolRoutes = /* @__PURE__ */ new Map();
|
|
5349
5353
|
resourceRoutes = /* @__PURE__ */ new Map();
|
|
5350
5354
|
promptRoutes = /* @__PURE__ */ new Map();
|
|
@@ -5595,8 +5599,8 @@ var ConnectServer = class _ConnectServer {
|
|
|
5595
5599
|
ensureUv().catch((err) => log("warn", "uv prewarm failed", { error: err?.message }));
|
|
5596
5600
|
}
|
|
5597
5601
|
this.server.oninitialized = () => {
|
|
5598
|
-
this.aiClientAttached = true;
|
|
5599
5602
|
const info = this.server.getClientVersion();
|
|
5603
|
+
this.attachedClient = { name: info?.name, version: info?.version };
|
|
5600
5604
|
reportHeartbeat(info?.name, info?.version).catch(
|
|
5601
5605
|
(err) => log("warn", "reportHeartbeat failed", { error: err?.message })
|
|
5602
5606
|
);
|
|
@@ -6764,9 +6768,8 @@ ${activeCount} loaded in this session, ${totalTools} tools in context${tokenSumm
|
|
|
6764
6768
|
} catch (err) {
|
|
6765
6769
|
log("warn", "Config poll failed", { error: err.message });
|
|
6766
6770
|
}
|
|
6767
|
-
if (this.
|
|
6768
|
-
|
|
6769
|
-
reportHeartbeat(info?.name, info?.version, true).catch(
|
|
6771
|
+
if (this.attachedClient) {
|
|
6772
|
+
reportHeartbeat(this.attachedClient.name, this.attachedClient.version, true).catch(
|
|
6770
6773
|
(err) => log("warn", "reportHeartbeat refresh failed", { error: err?.message })
|
|
6771
6774
|
);
|
|
6772
6775
|
}
|
|
@@ -7702,7 +7705,7 @@ Or re-run with --run to upgrade in place.`);
|
|
|
7702
7705
|
return { exitCode: 3, lines };
|
|
7703
7706
|
}
|
|
7704
7707
|
function readCurrentVersion() {
|
|
7705
|
-
return true ? "0.47.
|
|
7708
|
+
return true ? "0.47.7" : "dev";
|
|
7706
7709
|
}
|
|
7707
7710
|
|
|
7708
7711
|
// src/index.ts
|
|
@@ -7870,7 +7873,7 @@ if (subcommand === "compliance") {
|
|
|
7870
7873
|
`);
|
|
7871
7874
|
process.exit(0);
|
|
7872
7875
|
} else if (subcommand === "--version" || subcommand === "-V") {
|
|
7873
|
-
process.stdout.write(`mcph ${true ? "0.47.
|
|
7876
|
+
process.stdout.write(`mcph ${true ? "0.47.7" : "dev"}
|
|
7874
7877
|
`);
|
|
7875
7878
|
process.exit(0);
|
|
7876
7879
|
} else if (subcommand && !subcommand.startsWith("-")) {
|
package/package.json
CHANGED