@yawlabs/mcp 0.75.0 → 0.75.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 +20 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4817,7 +4817,7 @@ async function runUpgrade(opts = {}) {
|
|
|
4817
4817
|
return { exitCode: 3, lines };
|
|
4818
4818
|
}
|
|
4819
4819
|
function readCurrentVersion() {
|
|
4820
|
-
return true ? "0.75.
|
|
4820
|
+
return true ? "0.75.1" : "dev";
|
|
4821
4821
|
}
|
|
4822
4822
|
|
|
4823
4823
|
// src/learning.ts
|
|
@@ -5051,7 +5051,7 @@ function foldBundleWarnings(warnings, probe) {
|
|
|
5051
5051
|
const prefix = `${probe.path}:`;
|
|
5052
5052
|
return warnings.filter((w) => !w.startsWith(prefix));
|
|
5053
5053
|
}
|
|
5054
|
-
var VERSION = true ? "0.75.
|
|
5054
|
+
var VERSION = true ? "0.75.1" : "dev";
|
|
5055
5055
|
async function runDoctor(opts = {}) {
|
|
5056
5056
|
if (opts.json) return runDoctorJson(opts);
|
|
5057
5057
|
const lines = [];
|
|
@@ -8571,7 +8571,7 @@ function defaultSpawn2(cmd, args) {
|
|
|
8571
8571
|
async function maybeAutoUpgrade(deps = {}) {
|
|
8572
8572
|
const optOut = process.env.YAW_MCP_AUTO_UPGRADE;
|
|
8573
8573
|
if (optOut === "0" || optOut?.toLowerCase() === "false") return;
|
|
8574
|
-
const current = deps.currentVersion ?? (true ? "0.75.
|
|
8574
|
+
const current = deps.currentVersion ?? (true ? "0.75.1" : "dev");
|
|
8575
8575
|
if (current === "dev") return;
|
|
8576
8576
|
const method = (deps.isSeaImpl ? await deps.isSeaImpl() : await detectSea()) ? "binary" : detectInstallMethod(deps.argvPath ?? process.argv[1]);
|
|
8577
8577
|
const latest = await (deps.fetchLatestImpl ?? fetchLatestVersion)();
|
|
@@ -9754,12 +9754,13 @@ function buildToolRoutes(activeConnections, inactiveWithCache = []) {
|
|
|
9754
9754
|
}
|
|
9755
9755
|
return routes;
|
|
9756
9756
|
}
|
|
9757
|
-
function buildResourceList(activeConnections, builtins = []) {
|
|
9757
|
+
function buildResourceList(activeConnections, builtins = [], exposure = "full", exposedNamespaces) {
|
|
9758
9758
|
const resources = [];
|
|
9759
9759
|
for (const b of builtins) {
|
|
9760
9760
|
resources.push({ uri: b.uri, name: b.name, description: b.description, mimeType: b.mimeType });
|
|
9761
9761
|
}
|
|
9762
9762
|
for (const conn of activeConnections.values()) {
|
|
9763
|
+
if (exposure === "gateway" && !exposedNamespaces?.has(conn.config.namespace)) continue;
|
|
9763
9764
|
for (const r of conn.resources) {
|
|
9764
9765
|
resources.push({
|
|
9765
9766
|
uri: r.namespacedUri,
|
|
@@ -9780,10 +9781,11 @@ function buildResourceRoutes(activeConnections) {
|
|
|
9780
9781
|
}
|
|
9781
9782
|
return routes;
|
|
9782
9783
|
}
|
|
9783
|
-
function buildPromptList(activeConnections) {
|
|
9784
|
+
function buildPromptList(activeConnections, exposure = "full", exposedNamespaces) {
|
|
9784
9785
|
const prompts = [];
|
|
9785
9786
|
const seen = /* @__PURE__ */ new Set();
|
|
9786
9787
|
for (const conn of activeConnections.values()) {
|
|
9788
|
+
if (exposure === "gateway" && !exposedNamespaces?.has(conn.config.namespace)) continue;
|
|
9787
9789
|
for (const p of conn.prompts) {
|
|
9788
9790
|
if (seen.has(p.namespacedName)) continue;
|
|
9789
9791
|
prompts.push({
|
|
@@ -10913,7 +10915,7 @@ async function connectToUpstream(config, onDisconnect, onListChanged) {
|
|
|
10913
10915
|
}
|
|
10914
10916
|
async function connectToUpstreamOnce(config, onDisconnect, onListChanged, attempt, disableOamRewrite) {
|
|
10915
10917
|
const client = new Client(
|
|
10916
|
-
{ name: "yaw-mcp", version: true ? "0.75.
|
|
10918
|
+
{ name: "yaw-mcp", version: true ? "0.75.1" : "dev" },
|
|
10917
10919
|
{ capabilities: {} }
|
|
10918
10920
|
);
|
|
10919
10921
|
let transport;
|
|
@@ -11482,7 +11484,7 @@ var ConnectServer = class _ConnectServer {
|
|
|
11482
11484
|
static SHUTDOWN_DRAIN_MS = 2e3;
|
|
11483
11485
|
constructor() {
|
|
11484
11486
|
this.server = new Server(
|
|
11485
|
-
{ name: "yaw-mcp", version: true ? "0.75.
|
|
11487
|
+
{ name: "yaw-mcp", version: true ? "0.75.1" : "dev" },
|
|
11486
11488
|
{
|
|
11487
11489
|
capabilities: {
|
|
11488
11490
|
tools: { listChanged: true },
|
|
@@ -11535,13 +11537,18 @@ var ConnectServer = class _ConnectServer {
|
|
|
11535
11537
|
return this.handleToolCall(name, args ?? {}, extra);
|
|
11536
11538
|
});
|
|
11537
11539
|
this.server.setRequestHandler(ListResourcesRequestSchema, async () => ({
|
|
11538
|
-
resources: buildResourceList(
|
|
11540
|
+
resources: buildResourceList(
|
|
11541
|
+
this.connections,
|
|
11542
|
+
this.getBuiltinResources(),
|
|
11543
|
+
resolveToolExposure(),
|
|
11544
|
+
this.sessionActivated
|
|
11545
|
+
)
|
|
11539
11546
|
}));
|
|
11540
11547
|
this.server.setRequestHandler(ReadResourceRequestSchema, async (request2) => {
|
|
11541
11548
|
return routeResourceRead(request2.params.uri, this.resourceRoutes, this.connections, this.getBuiltinResourceMap());
|
|
11542
11549
|
});
|
|
11543
11550
|
this.server.setRequestHandler(ListPromptsRequestSchema, async () => ({
|
|
11544
|
-
prompts: buildPromptList(this.connections)
|
|
11551
|
+
prompts: buildPromptList(this.connections, resolveToolExposure(), this.sessionActivated)
|
|
11545
11552
|
}));
|
|
11546
11553
|
this.server.setRequestHandler(GetPromptRequestSchema, async (request2) => {
|
|
11547
11554
|
return routePromptGet(
|
|
@@ -12939,6 +12946,7 @@ ${activeCount} loaded in this session, ${totalTools} tools in context${tokenSumm
|
|
|
12939
12946
|
this.idleCallCounts.delete(ns);
|
|
12940
12947
|
this.adaptiveSkipLogged.delete(ns);
|
|
12941
12948
|
this.toolFilters.delete(ns);
|
|
12949
|
+
this.sessionActivated.delete(ns);
|
|
12942
12950
|
deactivated++;
|
|
12943
12951
|
}
|
|
12944
12952
|
if (deactivated > 0) {
|
|
@@ -12957,6 +12965,7 @@ ${activeCount} loaded in this session, ${totalTools} tools in context${tokenSumm
|
|
|
12957
12965
|
this.idleCallCounts.delete(namespace);
|
|
12958
12966
|
this.adaptiveSkipLogged.delete(namespace);
|
|
12959
12967
|
this.toolFilters.delete(namespace);
|
|
12968
|
+
this.sessionActivated.delete(namespace);
|
|
12960
12969
|
this.elicitedEnv.delete(namespace);
|
|
12961
12970
|
changed = true;
|
|
12962
12971
|
continue;
|
|
@@ -12969,6 +12978,7 @@ ${activeCount} loaded in this session, ${totalTools} tools in context${tokenSumm
|
|
|
12969
12978
|
this.idleCallCounts.delete(namespace);
|
|
12970
12979
|
this.adaptiveSkipLogged.delete(namespace);
|
|
12971
12980
|
this.toolFilters.delete(namespace);
|
|
12981
|
+
this.sessionActivated.delete(namespace);
|
|
12972
12982
|
this.elicitedEnv.delete(namespace);
|
|
12973
12983
|
changed = true;
|
|
12974
12984
|
}
|
|
@@ -13880,7 +13890,7 @@ if (subcommand === "compliance") {
|
|
|
13880
13890
|
`);
|
|
13881
13891
|
process.exitCode = 0;
|
|
13882
13892
|
} else if (subcommand === "--version" || subcommand === "-V") {
|
|
13883
|
-
process.stdout.write(`yaw-mcp ${true ? "0.75.
|
|
13893
|
+
process.stdout.write(`yaw-mcp ${true ? "0.75.1" : "dev"}
|
|
13884
13894
|
`);
|
|
13885
13895
|
process.exitCode = 0;
|
|
13886
13896
|
} else if (subcommand && !subcommand.startsWith("-")) {
|
package/package.json
CHANGED