@yawlabs/mcp 0.66.3 → 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 +79 -27
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2198,8 +2198,8 @@ function resolveInstallPath(opts) {
|
|
|
2198
2198
|
}
|
|
2199
2199
|
function pathFor(client, scope, os, base) {
|
|
2200
2200
|
const { home, appData, projectDir, claudeConfigDir } = base;
|
|
2201
|
-
const
|
|
2202
|
-
const joinPath = (...parts) => parts.join(
|
|
2201
|
+
const sep3 = os === "windows" ? "\\" : "/";
|
|
2202
|
+
const joinPath = (...parts) => parts.join(sep3);
|
|
2203
2203
|
if (client === "claude-code") {
|
|
2204
2204
|
if (scope === "user") {
|
|
2205
2205
|
if (claudeConfigDir) {
|
|
@@ -4006,7 +4006,7 @@ async function runUpgrade(opts = {}) {
|
|
|
4006
4006
|
return { exitCode: 3, lines };
|
|
4007
4007
|
}
|
|
4008
4008
|
function readCurrentVersion() {
|
|
4009
|
-
return true ? "0.
|
|
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.
|
|
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.
|
|
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,8 +9431,9 @@ import {
|
|
|
9431
9431
|
|
|
9432
9432
|
// src/oam-spawn.ts
|
|
9433
9433
|
import { execFileSync } from "child_process";
|
|
9434
|
-
import {
|
|
9435
|
-
|
|
9434
|
+
import { existsSync as existsSync8, readdirSync, readFileSync as readFileSync5 } from "fs";
|
|
9435
|
+
import { isAbsolute as isAbsolute2, join as join13, sep as sep2 } from "path";
|
|
9436
|
+
import { fileURLToPath } from "url";
|
|
9436
9437
|
function packageName(spec) {
|
|
9437
9438
|
const start = spec.startsWith("@") ? 1 : 0;
|
|
9438
9439
|
const at = spec.indexOf("@", start);
|
|
@@ -9475,16 +9476,67 @@ function rewriteForOam(command, args, deps) {
|
|
|
9475
9476
|
}
|
|
9476
9477
|
return { command, args };
|
|
9477
9478
|
}
|
|
9479
|
+
function npxCacheNodeModules(fromUrl = import.meta.url) {
|
|
9480
|
+
let here;
|
|
9481
|
+
try {
|
|
9482
|
+
here = fileURLToPath(fromUrl);
|
|
9483
|
+
} catch {
|
|
9484
|
+
return [];
|
|
9485
|
+
}
|
|
9486
|
+
const marker = `${sep2}_npx${sep2}`;
|
|
9487
|
+
const idx = here.indexOf(marker);
|
|
9488
|
+
if (idx === -1) return [];
|
|
9489
|
+
const npxRoot = here.slice(0, idx + marker.length - sep2.length);
|
|
9490
|
+
try {
|
|
9491
|
+
return readdirSync(npxRoot, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => join13(npxRoot, e.name, "node_modules"));
|
|
9492
|
+
} catch {
|
|
9493
|
+
return [];
|
|
9494
|
+
}
|
|
9495
|
+
}
|
|
9496
|
+
function ownNodeModules(fromUrl = import.meta.url) {
|
|
9497
|
+
let here;
|
|
9498
|
+
try {
|
|
9499
|
+
here = fileURLToPath(fromUrl);
|
|
9500
|
+
} catch {
|
|
9501
|
+
return [];
|
|
9502
|
+
}
|
|
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;
|
|
9533
|
+
}
|
|
9534
|
+
return null;
|
|
9535
|
+
}
|
|
9478
9536
|
function resolveOamSpawn(command, args) {
|
|
9479
9537
|
return rewriteForOam(command, args, {
|
|
9480
9538
|
oamBin: oamBin(),
|
|
9481
|
-
resolveEntry: (pkg) =>
|
|
9482
|
-
try {
|
|
9483
|
-
return requireFrom.resolve(pkg);
|
|
9484
|
-
} catch {
|
|
9485
|
-
return null;
|
|
9486
|
-
}
|
|
9487
|
-
}
|
|
9539
|
+
resolveEntry: (pkg) => resolveNpmEntry(pkg)
|
|
9488
9540
|
});
|
|
9489
9541
|
}
|
|
9490
9542
|
|
|
@@ -9827,7 +9879,7 @@ function categorizeSpawnError(err) {
|
|
|
9827
9879
|
}
|
|
9828
9880
|
async function connectToUpstream(config, onDisconnect, onListChanged) {
|
|
9829
9881
|
const client = new Client(
|
|
9830
|
-
{ name: "yaw-mcp", version: true ? "0.
|
|
9882
|
+
{ name: "yaw-mcp", version: true ? "0.67.1" : "dev" },
|
|
9831
9883
|
{ capabilities: {} }
|
|
9832
9884
|
);
|
|
9833
9885
|
let transport;
|
|
@@ -10162,7 +10214,7 @@ var ConnectServer = class _ConnectServer {
|
|
|
10162
10214
|
this.apiUrl = apiUrl5;
|
|
10163
10215
|
this.token = token5;
|
|
10164
10216
|
this.server = new Server(
|
|
10165
|
-
{ name: "yaw-mcp", version: true ? "0.
|
|
10217
|
+
{ name: "yaw-mcp", version: true ? "0.67.1" : "dev" },
|
|
10166
10218
|
{
|
|
10167
10219
|
capabilities: {
|
|
10168
10220
|
tools: { listChanged: true },
|
|
@@ -11929,7 +11981,7 @@ ${activeCount} loaded in this session, ${totalTools} tools in context${tokenSumm
|
|
|
11929
11981
|
}
|
|
11930
11982
|
const isUnder = (base, p) => {
|
|
11931
11983
|
const rel = relative(base, p);
|
|
11932
|
-
return rel === "" || !rel.startsWith("..") && !
|
|
11984
|
+
return rel === "" || !rel.startsWith("..") && !isAbsolute3(rel);
|
|
11933
11985
|
};
|
|
11934
11986
|
if (!isUnder(homedir16(), resolved) && !isUnder(process.cwd(), resolved)) {
|
|
11935
11987
|
return {
|
|
@@ -12783,16 +12835,16 @@ function truncateVersion(v) {
|
|
|
12783
12835
|
import { homedir as homedir17 } from "os";
|
|
12784
12836
|
|
|
12785
12837
|
// src/sync-state.ts
|
|
12786
|
-
import { existsSync as
|
|
12838
|
+
import { existsSync as existsSync9 } from "fs";
|
|
12787
12839
|
import { mkdir as mkdir5, readFile as readFile13 } from "fs/promises";
|
|
12788
|
-
import { dirname as dirname5, join as
|
|
12840
|
+
import { dirname as dirname5, join as join14 } from "path";
|
|
12789
12841
|
var SYNC_STATE_FILENAME = "sync-state.json";
|
|
12790
12842
|
function syncStatePath(home) {
|
|
12791
|
-
return
|
|
12843
|
+
return join14(home, CONFIG_DIRNAME, SYNC_STATE_FILENAME);
|
|
12792
12844
|
}
|
|
12793
12845
|
async function readSyncState(home) {
|
|
12794
12846
|
const path5 = syncStatePath(home);
|
|
12795
|
-
if (!
|
|
12847
|
+
if (!existsSync9(path5)) return {};
|
|
12796
12848
|
try {
|
|
12797
12849
|
const raw = await readFile13(path5, "utf8");
|
|
12798
12850
|
const parsed = JSON.parse(raw);
|
|
@@ -13169,10 +13221,10 @@ function suggestFlag(input, limit = 2) {
|
|
|
13169
13221
|
}
|
|
13170
13222
|
|
|
13171
13223
|
// src/sync-cmd.ts
|
|
13172
|
-
import { existsSync as
|
|
13224
|
+
import { existsSync as existsSync10 } from "fs";
|
|
13173
13225
|
import { mkdir as mkdir6, readFile as readFile14 } from "fs/promises";
|
|
13174
13226
|
import { homedir as homedir19 } from "os";
|
|
13175
|
-
import { dirname as dirname6, join as
|
|
13227
|
+
import { dirname as dirname6, join as join15 } from "path";
|
|
13176
13228
|
var SYNC_USAGE = `Usage: yaw-mcp sync <push|pull|status> [--json]
|
|
13177
13229
|
|
|
13178
13230
|
Replicate ~/.yaw-mcp/bundles.json across machines via your Yaw
|
|
@@ -13219,11 +13271,11 @@ ${SYNC_USAGE}` };
|
|
|
13219
13271
|
return { ok: true, options: opts };
|
|
13220
13272
|
}
|
|
13221
13273
|
function bundlesPath(home) {
|
|
13222
|
-
return
|
|
13274
|
+
return join15(home, CONFIG_DIRNAME, BUNDLES_FILENAME2);
|
|
13223
13275
|
}
|
|
13224
13276
|
async function readLocalBundles(home) {
|
|
13225
13277
|
const path5 = bundlesPath(home);
|
|
13226
|
-
if (!
|
|
13278
|
+
if (!existsSync10(path5)) return { version: 1, servers: [] };
|
|
13227
13279
|
const raw = await readFile14(path5, "utf8");
|
|
13228
13280
|
let parsed;
|
|
13229
13281
|
try {
|
|
@@ -13850,7 +13902,7 @@ if (subcommand === "compliance") {
|
|
|
13850
13902
|
`);
|
|
13851
13903
|
process.exit(0);
|
|
13852
13904
|
} else if (subcommand === "--version" || subcommand === "-V") {
|
|
13853
|
-
process.stdout.write(`yaw-mcp ${true ? "0.
|
|
13905
|
+
process.stdout.write(`yaw-mcp ${true ? "0.67.1" : "dev"}
|
|
13854
13906
|
`);
|
|
13855
13907
|
process.exit(0);
|
|
13856
13908
|
} else if (subcommand && !subcommand.startsWith("-")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yawlabs/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.1",
|
|
4
4
|
"mcpName": "io.github.YawLabs/mcp",
|
|
5
5
|
"description": "Yaw MCP -- MCP servers, managed. Free to run locally; Yaw Team adds cross-machine sync.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@biomejs/biome": "^2.5.0",
|
|
42
|
-
"@types/node": "^
|
|
42
|
+
"@types/node": "^26.0.0",
|
|
43
43
|
"esbuild": "^0.28.1",
|
|
44
44
|
"postject": "^1.0.0-alpha.6",
|
|
45
45
|
"tsup": "^8.4.0",
|