@yawlabs/mcp 0.67.0 → 0.67.1
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 +48 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4006,7 +4006,7 @@ async function runUpgrade(opts = {}) {
|
|
|
4006
4006
|
return { exitCode: 3, lines };
|
|
4007
4007
|
}
|
|
4008
4008
|
function readCurrentVersion() {
|
|
4009
|
-
return true ? "0.67.
|
|
4009
|
+
return true ? "0.67.1" : "dev";
|
|
4010
4010
|
}
|
|
4011
4011
|
|
|
4012
4012
|
// src/usage-hints.ts
|
|
@@ -4068,7 +4068,7 @@ function selectFlakyNamespaces(entries, limit) {
|
|
|
4068
4068
|
}
|
|
4069
4069
|
|
|
4070
4070
|
// src/doctor-cmd.ts
|
|
4071
|
-
var VERSION = true ? "0.67.
|
|
4071
|
+
var VERSION = true ? "0.67.1" : "dev";
|
|
4072
4072
|
function isPersistenceDisabled(env) {
|
|
4073
4073
|
const raw = env.YAW_MCP_DISABLE_PERSISTENCE;
|
|
4074
4074
|
return raw !== void 0 && raw !== "" && (raw === "1" || raw.toLowerCase() === "true");
|
|
@@ -6761,7 +6761,7 @@ async function runSecretsAudit(opts, io) {
|
|
|
6761
6761
|
// src/server.ts
|
|
6762
6762
|
import { readFile as readFile12 } from "fs/promises";
|
|
6763
6763
|
import { homedir as homedir16 } from "os";
|
|
6764
|
-
import { isAbsolute as
|
|
6764
|
+
import { isAbsolute as isAbsolute3, relative, resolve as resolve6 } from "path";
|
|
6765
6765
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
6766
6766
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6767
6767
|
import {
|
|
@@ -6876,7 +6876,7 @@ function defaultSpawn2(cmd, args) {
|
|
|
6876
6876
|
async function maybeAutoUpgrade(deps = {}) {
|
|
6877
6877
|
const optOut = process.env.YAW_MCP_AUTO_UPGRADE;
|
|
6878
6878
|
if (optOut === "0" || optOut?.toLowerCase() === "false") return;
|
|
6879
|
-
const current = deps.currentVersion ?? (true ? "0.67.
|
|
6879
|
+
const current = deps.currentVersion ?? (true ? "0.67.1" : "dev");
|
|
6880
6880
|
if (current === "dev") return;
|
|
6881
6881
|
const method = (deps.isSeaImpl ? await deps.isSeaImpl() : await detectSea()) ? "binary" : detectInstallMethod(deps.argvPath ?? process.argv[1]);
|
|
6882
6882
|
const latest = await (deps.fetchLatestImpl ?? fetchLatestVersion2)();
|
|
@@ -9431,11 +9431,9 @@ import {
|
|
|
9431
9431
|
|
|
9432
9432
|
// src/oam-spawn.ts
|
|
9433
9433
|
import { execFileSync } from "child_process";
|
|
9434
|
-
import { readdirSync } from "fs";
|
|
9435
|
-
import {
|
|
9436
|
-
import { join as join13, sep as sep2 } from "path";
|
|
9434
|
+
import { existsSync as existsSync8, readdirSync, readFileSync as readFileSync5 } from "fs";
|
|
9435
|
+
import { isAbsolute as isAbsolute2, join as join13, sep as sep2 } from "path";
|
|
9437
9436
|
import { fileURLToPath } from "url";
|
|
9438
|
-
var requireFrom = createRequire(import.meta.url);
|
|
9439
9437
|
function packageName(spec) {
|
|
9440
9438
|
const start = spec.startsWith("@") ? 1 : 0;
|
|
9441
9439
|
const at = spec.indexOf("@", start);
|
|
@@ -9495,16 +9493,43 @@ function npxCacheNodeModules(fromUrl = import.meta.url) {
|
|
|
9495
9493
|
return [];
|
|
9496
9494
|
}
|
|
9497
9495
|
}
|
|
9498
|
-
function
|
|
9496
|
+
function ownNodeModules(fromUrl = import.meta.url) {
|
|
9497
|
+
let here;
|
|
9499
9498
|
try {
|
|
9500
|
-
|
|
9499
|
+
here = fileURLToPath(fromUrl);
|
|
9501
9500
|
} catch {
|
|
9501
|
+
return [];
|
|
9502
9502
|
}
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9503
|
+
const seg = `${sep2}node_modules${sep2}`;
|
|
9504
|
+
const idx = here.lastIndexOf(seg);
|
|
9505
|
+
if (idx === -1) return [];
|
|
9506
|
+
return [here.slice(0, idx + seg.length - sep2.length)];
|
|
9507
|
+
}
|
|
9508
|
+
function packageEntry(pkgDir, pkg) {
|
|
9509
|
+
const pjPath = join13(pkgDir, "package.json");
|
|
9510
|
+
if (!existsSync8(pjPath)) return null;
|
|
9511
|
+
let j;
|
|
9512
|
+
try {
|
|
9513
|
+
j = JSON.parse(readFileSync5(pjPath, "utf8"));
|
|
9514
|
+
} catch {
|
|
9515
|
+
return null;
|
|
9516
|
+
}
|
|
9517
|
+
let rel;
|
|
9518
|
+
if (typeof j.bin === "string") {
|
|
9519
|
+
rel = j.bin;
|
|
9520
|
+
} else if (j.bin && typeof j.bin === "object") {
|
|
9521
|
+
const unscoped = pkg.slice(pkg.lastIndexOf("/") + 1);
|
|
9522
|
+
rel = j.bin[unscoped] ?? (j.name ? j.bin[j.name] : void 0) ?? Object.values(j.bin)[0];
|
|
9523
|
+
}
|
|
9524
|
+
if (!rel && typeof j.main === "string") rel = j.main;
|
|
9525
|
+
if (!rel) return null;
|
|
9526
|
+
return isAbsolute2(rel) ? rel : join13(pkgDir, rel);
|
|
9527
|
+
}
|
|
9528
|
+
function resolveNpmEntry(pkg, fromUrl = import.meta.url) {
|
|
9529
|
+
const parts = pkg.split("/");
|
|
9530
|
+
for (const nodeModules of [...ownNodeModules(fromUrl), ...npxCacheNodeModules(fromUrl)]) {
|
|
9531
|
+
const entry = packageEntry(join13(nodeModules, ...parts), pkg);
|
|
9532
|
+
if (entry) return entry;
|
|
9508
9533
|
}
|
|
9509
9534
|
return null;
|
|
9510
9535
|
}
|
|
@@ -9854,7 +9879,7 @@ function categorizeSpawnError(err) {
|
|
|
9854
9879
|
}
|
|
9855
9880
|
async function connectToUpstream(config, onDisconnect, onListChanged) {
|
|
9856
9881
|
const client = new Client(
|
|
9857
|
-
{ name: "yaw-mcp", version: true ? "0.67.
|
|
9882
|
+
{ name: "yaw-mcp", version: true ? "0.67.1" : "dev" },
|
|
9858
9883
|
{ capabilities: {} }
|
|
9859
9884
|
);
|
|
9860
9885
|
let transport;
|
|
@@ -10189,7 +10214,7 @@ var ConnectServer = class _ConnectServer {
|
|
|
10189
10214
|
this.apiUrl = apiUrl5;
|
|
10190
10215
|
this.token = token5;
|
|
10191
10216
|
this.server = new Server(
|
|
10192
|
-
{ name: "yaw-mcp", version: true ? "0.67.
|
|
10217
|
+
{ name: "yaw-mcp", version: true ? "0.67.1" : "dev" },
|
|
10193
10218
|
{
|
|
10194
10219
|
capabilities: {
|
|
10195
10220
|
tools: { listChanged: true },
|
|
@@ -11956,7 +11981,7 @@ ${activeCount} loaded in this session, ${totalTools} tools in context${tokenSumm
|
|
|
11956
11981
|
}
|
|
11957
11982
|
const isUnder = (base, p) => {
|
|
11958
11983
|
const rel = relative(base, p);
|
|
11959
|
-
return rel === "" || !rel.startsWith("..") && !
|
|
11984
|
+
return rel === "" || !rel.startsWith("..") && !isAbsolute3(rel);
|
|
11960
11985
|
};
|
|
11961
11986
|
if (!isUnder(homedir16(), resolved) && !isUnder(process.cwd(), resolved)) {
|
|
11962
11987
|
return {
|
|
@@ -12810,7 +12835,7 @@ function truncateVersion(v) {
|
|
|
12810
12835
|
import { homedir as homedir17 } from "os";
|
|
12811
12836
|
|
|
12812
12837
|
// src/sync-state.ts
|
|
12813
|
-
import { existsSync as
|
|
12838
|
+
import { existsSync as existsSync9 } from "fs";
|
|
12814
12839
|
import { mkdir as mkdir5, readFile as readFile13 } from "fs/promises";
|
|
12815
12840
|
import { dirname as dirname5, join as join14 } from "path";
|
|
12816
12841
|
var SYNC_STATE_FILENAME = "sync-state.json";
|
|
@@ -12819,7 +12844,7 @@ function syncStatePath(home) {
|
|
|
12819
12844
|
}
|
|
12820
12845
|
async function readSyncState(home) {
|
|
12821
12846
|
const path5 = syncStatePath(home);
|
|
12822
|
-
if (!
|
|
12847
|
+
if (!existsSync9(path5)) return {};
|
|
12823
12848
|
try {
|
|
12824
12849
|
const raw = await readFile13(path5, "utf8");
|
|
12825
12850
|
const parsed = JSON.parse(raw);
|
|
@@ -13196,7 +13221,7 @@ function suggestFlag(input, limit = 2) {
|
|
|
13196
13221
|
}
|
|
13197
13222
|
|
|
13198
13223
|
// src/sync-cmd.ts
|
|
13199
|
-
import { existsSync as
|
|
13224
|
+
import { existsSync as existsSync10 } from "fs";
|
|
13200
13225
|
import { mkdir as mkdir6, readFile as readFile14 } from "fs/promises";
|
|
13201
13226
|
import { homedir as homedir19 } from "os";
|
|
13202
13227
|
import { dirname as dirname6, join as join15 } from "path";
|
|
@@ -13250,7 +13275,7 @@ function bundlesPath(home) {
|
|
|
13250
13275
|
}
|
|
13251
13276
|
async function readLocalBundles(home) {
|
|
13252
13277
|
const path5 = bundlesPath(home);
|
|
13253
|
-
if (!
|
|
13278
|
+
if (!existsSync10(path5)) return { version: 1, servers: [] };
|
|
13254
13279
|
const raw = await readFile14(path5, "utf8");
|
|
13255
13280
|
let parsed;
|
|
13256
13281
|
try {
|
|
@@ -13877,7 +13902,7 @@ if (subcommand === "compliance") {
|
|
|
13877
13902
|
`);
|
|
13878
13903
|
process.exit(0);
|
|
13879
13904
|
} else if (subcommand === "--version" || subcommand === "-V") {
|
|
13880
|
-
process.stdout.write(`yaw-mcp ${true ? "0.67.
|
|
13905
|
+
process.stdout.write(`yaw-mcp ${true ? "0.67.1" : "dev"}
|
|
13881
13906
|
`);
|
|
13882
13907
|
process.exit(0);
|
|
13883
13908
|
} else if (subcommand && !subcommand.startsWith("-")) {
|
package/package.json
CHANGED