@yawlabs/mcp 1.1.17 → 1.1.18
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 +12 -0
- package/dist/{auto-upgrade-YH4LZ5WJ.js → auto-upgrade-C6AD444Q.js} +1 -1
- package/dist/{chunk-GZORC754.js → chunk-4Y3B23Z3.js} +45 -24
- package/dist/{chunk-O44N66FZ.js → chunk-S36KB7D2.js} +5 -5
- package/dist/{git-source-JG6YFZJT.js → git-source-7SUMXT6H.js} +2 -2
- package/dist/index.js +32 -25
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to `@yawlabs/mcp` (formerly `@yawlabs/mcph`) are documented
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 1.1.18
|
|
8
|
+
|
|
9
|
+
**Changed -- the oam floor moves to 0.22.0, and the hostable node flags gain --title and --env-file**
|
|
10
|
+
|
|
11
|
+
`npm run verify:oam-floor` hosted a stdio `@modelcontextprotocol/server` server on oam v0.22.0 through `oam run` on 2026-11-28 -- both protocol eras, 2025-11-25 (initialize) and 2026-07-28 (server/discover), each through tools/list and tools/call -- and raised `MIN_OAM_VERSION` to it; the floor was 0.21.1. A machine whose oam is older hosts its node/npx sidecars on node instead, and logs a warning naming both versions, `oam self-update` as the fix, and that yaw-mcp needs a restart afterwards.
|
|
12
|
+
|
|
13
|
+
0.22.0 also fixed the stale exclusion that kept three node flags off the oam allowlist: `--title=NAME`, `--env-file=PATH` and `--env-file-if-exists=PATH` take effect on oam and stay in `process.execArgv`, exactly as on node -- measured beside node 26.13.1 on oam 0.22.0, and again on oam 0.21.1, where the `=` forms already behaved this way (the exclusion dates from the 0.19.5-era measurement and had gone stale). The rewrite now carries all three onto `oam run` instead of leaving the launch on node, and the real-oam contract test exercises them. What 0.22.0 itself adds, the mirror in `OAM_SPACED_VALUE_OPTIONS` learns: `--title` accepts a spaced value there (`oam run --title T entry`), which 0.21.1 refused with a clap error. `--process-timeout=<n><ms|s|m|h>`, new in both node 26 and oam 0.22.0, stays off the allowlist: oam enforces it but leaves it out of execArgv where node reflects it, so a server forking a worker with its own execArgv would lose the deadline.
|
|
14
|
+
|
|
15
|
+
**Added -- the "Left off, and why" exclusion reasons are machine-checked on every run**
|
|
16
|
+
|
|
17
|
+
The three individually-reasoned oam exclusions (`--enable-source-maps`, `--pending-deprecation`, `--process-timeout`) now live in `OAM_NODE_FLAG_EXCLUSIONS` in `oam-spawn.ts` with the kind of claim each reason makes -- `refused-by-oam`, `execArgv-dropped`, `effect-diverges` -- and the real-oam contract test re-measures each one against the installed oam and the local node on every run: that oam refuses `--enable-source-maps` without running the entry, that node's `--pending-deprecation` emits DEP0111 for `process.binding()` where oam's does not, and that oam accepts and enforces `--process-timeout` but leaves it out of `process.execArgv` where node 26 reflects it. A floor raise that changes oam's behavior under one of these reasons now fails the suite naming the flag, instead of leaving the exclusion silently stale -- which is how the `--title` one survived three floor raises (it dated from the 0.19.5-era measurement and nothing re-read it). Two static tests pin the map's exact contents and that it never overlaps the allowlist. `--inspect*` and the "not verified" catch-all stay prose: policy cannot go stale, and the catch-all already fails safe.
|
|
18
|
+
|
|
7
19
|
## 1.1.17
|
|
8
20
|
|
|
9
21
|
**Fixed -- the consent screen is no longer hidden behind a "package manager not installed" refusal**
|
|
@@ -5370,7 +5370,7 @@ function npxSpec(args) {
|
|
|
5370
5370
|
const spec = args[idx];
|
|
5371
5371
|
return spec.startsWith("-") ? null : spec;
|
|
5372
5372
|
}
|
|
5373
|
-
var MIN_OAM_VERSION = "0.
|
|
5373
|
+
var MIN_OAM_VERSION = "0.22.0";
|
|
5374
5374
|
var OAM_INSTALL_SH = "curl -fsSL https://oamjs.org/install.sh | sh";
|
|
5375
5375
|
var OAM_INSTALL_PS1 = "irm https://oamjs.org/install.ps1 | iex";
|
|
5376
5376
|
function oamInstallCommand(os) {
|
|
@@ -5795,7 +5795,20 @@ var OAM_HOSTABLE_NODE_VALUE_FLAGS = /* @__PURE__ */ new Map([
|
|
|
5795
5795
|
["--max-old-space-size", HEAP_MB],
|
|
5796
5796
|
["--max-http-header-size", POSITIVE_INT],
|
|
5797
5797
|
["--dns-result-order", /^(?:verbatim|ipv4first|ipv6first)$/],
|
|
5798
|
-
["--disable-warning", /^[A-Za-z0-9_]+$/]
|
|
5798
|
+
["--disable-warning", /^[A-Za-z0-9_]+$/],
|
|
5799
|
+
// Excluded since the 0.19.5-era measurement, which found oam dropping
|
|
5800
|
+
// these from execArgv; re-measured 2026-11-28 against oam 0.22.0 beside
|
|
5801
|
+
// node 26.13.1, all three take effect and stay in execArgv in the = form
|
|
5802
|
+
// (--title=abc -> ["--title=abc"] on both; --env-file's missing file exits
|
|
5803
|
+
// 9 on both, -if-exists' exits 0 with a stderr notice on both). The =
|
|
5804
|
+
// forms already behaved this way on 0.21.1 (measured the same day) -- what
|
|
5805
|
+
// 0.22.0 itself adds is --title's spaced-value form, which 0.21.1 refused
|
|
5806
|
+
// with a clap error. The path is arbitrary (node validates it at parse
|
|
5807
|
+
// time), so the check is only "non-empty"; the = spelling alone is not
|
|
5808
|
+
// the flag.
|
|
5809
|
+
["--title", /^.+$/],
|
|
5810
|
+
["--env-file", /^.+$/],
|
|
5811
|
+
["--env-file-if-exists", /^.+$/]
|
|
5799
5812
|
]);
|
|
5800
5813
|
function scanNodeLaunchFlags(args) {
|
|
5801
5814
|
const flags = [];
|
|
@@ -5841,7 +5854,8 @@ var OAM_SPACED_VALUE_OPTIONS = /* @__PURE__ */ new Set([
|
|
|
5841
5854
|
"--disable-warning",
|
|
5842
5855
|
"--redirect-warnings",
|
|
5843
5856
|
"--allow-fs-read",
|
|
5844
|
-
"--allow-fs-write"
|
|
5857
|
+
"--allow-fs-write",
|
|
5858
|
+
"--title"
|
|
5845
5859
|
]);
|
|
5846
5860
|
function rewriteForOam(command, args, deps) {
|
|
5847
5861
|
const bin = deps.oamBin;
|
|
@@ -6283,34 +6297,41 @@ function resolveManagedSpawn(command, args, fromUrl = import.meta.url, npmCache
|
|
|
6283
6297
|
}
|
|
6284
6298
|
});
|
|
6285
6299
|
}
|
|
6286
|
-
var npxUnderNodeMemo =
|
|
6300
|
+
var npxUnderNodeMemo = /* @__PURE__ */ new Map();
|
|
6301
|
+
function npxMemoKey(env) {
|
|
6302
|
+
const path5 = env.PATH ?? env.Path ?? env.path ?? "";
|
|
6303
|
+
const pathext = env.PATHEXT ?? env.PathExt ?? env.pathext ?? "";
|
|
6304
|
+
return JSON.stringify([path5, pathext]);
|
|
6305
|
+
}
|
|
6287
6306
|
function npxUnderNode(command, args, opts = {}) {
|
|
6288
6307
|
const platform = opts.platform ?? process.platform;
|
|
6289
6308
|
if (platform !== "win32") return { command, args };
|
|
6290
|
-
if (nodeLaunchKind(command) !== "npx") return { command, args };
|
|
6309
|
+
if (nodeLaunchKind(command) !== "npx" || /[\\/]/.test(command)) return { command, args };
|
|
6291
6310
|
const execPath = opts.execPath ?? process.execPath;
|
|
6292
6311
|
if (nodeLaunchKind(execPath) === "node") return { command, args };
|
|
6293
6312
|
const env = opts.env ?? process.env;
|
|
6294
6313
|
const fileExists = opts.exists ?? existsSync3;
|
|
6295
|
-
const defaulted = opts.platform === void 0 && opts.execPath === void 0 && opts.
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
if (
|
|
6299
|
-
|
|
6300
|
-
}
|
|
6314
|
+
const defaulted = opts.platform === void 0 && opts.execPath === void 0 && opts.exists === void 0;
|
|
6315
|
+
const memoKey = npxMemoKey(env);
|
|
6316
|
+
const memoed = npxUnderNodeMemo.get(memoKey);
|
|
6317
|
+
if (memoed !== void 0 && !fileExists(memoed.cli)) {
|
|
6318
|
+
npxUnderNodeMemo.delete(memoKey);
|
|
6319
|
+
}
|
|
6320
|
+
const found = npxUnderNodeMemo.get(memoKey) ?? (() => {
|
|
6301
6321
|
const nodeBin = resolveBinAbsolute("node.exe", env, platform);
|
|
6302
6322
|
if (nodeBin === null) {
|
|
6303
6323
|
log("debug", "no node.exe resolved on PATH; staying on npx", { command });
|
|
6304
|
-
return
|
|
6324
|
+
return null;
|
|
6305
6325
|
}
|
|
6306
6326
|
const cli = npxCliCandidates(nodeBin, platform).find((c) => fileExists(c));
|
|
6307
6327
|
if (cli === void 0) {
|
|
6308
6328
|
log("debug", "no npx-cli.js beside the resolved node binary; staying on npx", { command, nodeBin });
|
|
6309
|
-
return
|
|
6329
|
+
return null;
|
|
6310
6330
|
}
|
|
6311
|
-
if (defaulted) npxUnderNodeMemo
|
|
6312
|
-
|
|
6313
|
-
}
|
|
6331
|
+
if (defaulted) npxUnderNodeMemo.set(memoKey, { nodeBin, cli });
|
|
6332
|
+
return { nodeBin, cli };
|
|
6333
|
+
})();
|
|
6334
|
+
if (found === null) return { command, args };
|
|
6314
6335
|
log("debug", "npx launch rewritten to node + npx-cli.js (skips the cmd.exe verbatim-args detour)", {
|
|
6315
6336
|
nodeBin: found.nodeBin,
|
|
6316
6337
|
cli: found.cli
|
|
@@ -6657,21 +6678,21 @@ async function oamFloorLines(probe) {
|
|
|
6657
6678
|
}
|
|
6658
6679
|
async function defaultRunningPrefix(argvPath) {
|
|
6659
6680
|
if (isTestSandbox()) return null;
|
|
6660
|
-
const { detectRunningInstallPrefix: detectRunningInstallPrefix2 } = await import("./auto-upgrade-
|
|
6681
|
+
const { detectRunningInstallPrefix: detectRunningInstallPrefix2 } = await import("./auto-upgrade-C6AD444Q.js");
|
|
6661
6682
|
return detectRunningInstallPrefix2(argvPath);
|
|
6662
6683
|
}
|
|
6663
6684
|
async function defaultConfirmGlobalPrefix(argvPath, prefix) {
|
|
6664
|
-
const { defaultConfirmGlobalPrefix: confirm } = await import("./auto-upgrade-
|
|
6685
|
+
const { defaultConfirmGlobalPrefix: confirm } = await import("./auto-upgrade-C6AD444Q.js");
|
|
6665
6686
|
return confirm(argvPath, prefix);
|
|
6666
6687
|
}
|
|
6667
6688
|
async function defaultAcquireLock(prefixDir) {
|
|
6668
6689
|
if (isTestSandbox()) return () => {
|
|
6669
6690
|
};
|
|
6670
|
-
const { acquireUpgradeLock: acquireUpgradeLock2 } = await import("./auto-upgrade-
|
|
6691
|
+
const { acquireUpgradeLock: acquireUpgradeLock2 } = await import("./auto-upgrade-C6AD444Q.js");
|
|
6671
6692
|
return acquireUpgradeLock2(prefixDir);
|
|
6672
6693
|
}
|
|
6673
6694
|
async function upgradeLockPath(prefixDir) {
|
|
6674
|
-
const { UPGRADE_LOCK_NAME: UPGRADE_LOCK_NAME2 } = await import("./auto-upgrade-
|
|
6695
|
+
const { UPGRADE_LOCK_NAME: UPGRADE_LOCK_NAME2 } = await import("./auto-upgrade-C6AD444Q.js");
|
|
6675
6696
|
return join12(prefixDir, UPGRADE_LOCK_NAME2);
|
|
6676
6697
|
}
|
|
6677
6698
|
async function defaultSpawn(cmd, args, cwd) {
|
|
@@ -6735,12 +6756,12 @@ async function runUpgrade(opts = {}) {
|
|
|
6735
6756
|
if (method === "global-npm") {
|
|
6736
6757
|
rawPrefix = await (opts.runningPrefix ?? defaultRunningPrefix)(argvPath);
|
|
6737
6758
|
if (rawPrefix !== null && !await (opts.confirmGlobalPrefix ?? defaultConfirmGlobalPrefix)(argvPath, rawPrefix)) {
|
|
6738
|
-
const { PREFIX_REFUSED_REASON: PREFIX_REFUSED_REASON2, prefixRefusedRemedies: prefixRefusedRemedies2 } = await import("./auto-upgrade-
|
|
6759
|
+
const { PREFIX_REFUSED_REASON: PREFIX_REFUSED_REASON2, prefixRefusedRemedies: prefixRefusedRemedies2 } = await import("./auto-upgrade-C6AD444Q.js");
|
|
6739
6760
|
prefixRefusedNote = `Note: not pinning --prefix ${rawPrefix}: ${PREFIX_REFUSED_REASON2}. The command below installs into npm's own global prefix and does NOT update the copy at ${rawPrefix}. ` + prefixRefusedRemedies2(rawPrefix, opts.platform);
|
|
6740
6761
|
rawPrefix = null;
|
|
6741
6762
|
}
|
|
6742
6763
|
if (rawPrefix !== null) {
|
|
6743
|
-
const { quoteArgForDisplay: quoteArgForDisplay2, quoteShellArgIfNeeded: quoteShellArgIfNeeded2 } = await import("./auto-upgrade-
|
|
6764
|
+
const { quoteArgForDisplay: quoteArgForDisplay2, quoteShellArgIfNeeded: quoteShellArgIfNeeded2 } = await import("./auto-upgrade-C6AD444Q.js");
|
|
6744
6765
|
const spawnForm = quoteShellArgIfNeeded2(rawPrefix, opts.platform);
|
|
6745
6766
|
const displayForm = quoteArgForDisplay2(rawPrefix, opts.platform);
|
|
6746
6767
|
if (spawnForm !== null && displayForm !== null) {
|
|
@@ -6879,7 +6900,7 @@ async function runUpgrade(opts = {}) {
|
|
|
6879
6900
|
return { exitCode: 3, lines };
|
|
6880
6901
|
}
|
|
6881
6902
|
function readCurrentVersion() {
|
|
6882
|
-
return true ? "1.1.
|
|
6903
|
+
return true ? "1.1.18" : "dev";
|
|
6883
6904
|
}
|
|
6884
6905
|
|
|
6885
6906
|
// src/auto-upgrade.ts
|
|
@@ -7196,7 +7217,7 @@ function defaultSpawn2(cmd, args, onDone = () => {
|
|
|
7196
7217
|
}
|
|
7197
7218
|
async function maybeAutoUpgrade(deps = {}) {
|
|
7198
7219
|
if (isFeatureDisabled("YAW_MCP_AUTO_UPGRADE")) return;
|
|
7199
|
-
const current = deps.currentVersion ?? (true ? "1.1.
|
|
7220
|
+
const current = deps.currentVersion ?? (true ? "1.1.18" : "dev");
|
|
7200
7221
|
if (current === "dev") return;
|
|
7201
7222
|
const argvPath = deps.argvPath ?? process.argv[1];
|
|
7202
7223
|
let method = (deps.isSeaImpl ? await deps.isSeaImpl() : await detectSea()) ? "binary" : detectInstallMethod(argvPath, realpathSync3, ["unknown", "local-node-modules"]);
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
stripJsoncComments,
|
|
46
46
|
stripTrailingCommas,
|
|
47
47
|
userConfigDir
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-4Y3B23Z3.js";
|
|
49
49
|
|
|
50
50
|
// src/git-source.ts
|
|
51
51
|
import { spawn as spawn3 } from "child_process";
|
|
@@ -4553,12 +4553,12 @@ async function gitBuildMissing(config, home, consented) {
|
|
|
4553
4553
|
}
|
|
4554
4554
|
async function gitRepoConsented(config) {
|
|
4555
4555
|
if (!config.git?.commit || gitEntryBuilt(config.namespace, config.git)) return void 0;
|
|
4556
|
-
const { hasRepoConsent: hasRepoConsent2 } = await import("./git-source-
|
|
4556
|
+
const { hasRepoConsent: hasRepoConsent2 } = await import("./git-source-7SUMXT6H.js");
|
|
4557
4557
|
return hasRepoConsent2(config.git.url, homedir6());
|
|
4558
4558
|
}
|
|
4559
4559
|
async function recordActivatedGitPin(namespace, commit) {
|
|
4560
4560
|
try {
|
|
4561
|
-
const { recordLoadedGitPin: recordLoadedGitPin2 } = await import("./git-source-
|
|
4561
|
+
const { recordLoadedGitPin: recordLoadedGitPin2 } = await import("./git-source-7SUMXT6H.js");
|
|
4562
4562
|
await recordLoadedGitPin2(namespace, commit, { home: homedir6(), cwd: process.cwd() });
|
|
4563
4563
|
} catch (e) {
|
|
4564
4564
|
log("debug", "Could not record the git build an activation uses", { namespace, error: e.message });
|
|
@@ -4766,7 +4766,7 @@ async function connectToUpstreamOnce(config, onDisconnect, onListChanged, bridge
|
|
|
4766
4766
|
if (downstreamCaps?.sampling) capabilities.sampling = downstreamCaps.sampling;
|
|
4767
4767
|
if (downstreamCaps?.roots) capabilities.roots = {};
|
|
4768
4768
|
const client = new Client(
|
|
4769
|
-
{ name: "yaw-mcp", version: true ? "1.1.
|
|
4769
|
+
{ name: "yaw-mcp", version: true ? "1.1.18" : "dev" },
|
|
4770
4770
|
{ capabilities }
|
|
4771
4771
|
);
|
|
4772
4772
|
if (bridge && capabilities.elicitation) {
|
|
@@ -4851,7 +4851,7 @@ async function connectToUpstreamOnce(config, onDisconnect, onListChanged, bridge
|
|
|
4851
4851
|
resolved = managed;
|
|
4852
4852
|
}
|
|
4853
4853
|
}
|
|
4854
|
-
resolved = npxUnderNode(resolved.command, resolved.args);
|
|
4854
|
+
resolved = npxUnderNode(resolved.command, resolved.args, { env: mergeChildEnv(parentEnv, serverEnv) });
|
|
4855
4855
|
} catch (err) {
|
|
4856
4856
|
if (err instanceof ActivationError) throw err;
|
|
4857
4857
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -62,8 +62,8 @@ import {
|
|
|
62
62
|
tryRemoveTree,
|
|
63
63
|
writeAskpassHelper,
|
|
64
64
|
writeGitState
|
|
65
|
-
} from "./chunk-
|
|
66
|
-
import "./chunk-
|
|
65
|
+
} from "./chunk-S36KB7D2.js";
|
|
66
|
+
import "./chunk-4Y3B23Z3.js";
|
|
67
67
|
export {
|
|
68
68
|
GIT_CONSENT_FILENAME,
|
|
69
69
|
GIT_CREDENTIALS_REFUSAL,
|
package/dist/index.js
CHANGED
|
@@ -168,7 +168,7 @@ import {
|
|
|
168
168
|
withWarnSink,
|
|
169
169
|
withoutControls,
|
|
170
170
|
writeGitState
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-S36KB7D2.js";
|
|
172
172
|
import {
|
|
173
173
|
BINARY_RETIRED_HINT,
|
|
174
174
|
CLAUDE_CODE_ALLOW_PATTERN,
|
|
@@ -295,7 +295,7 @@ import {
|
|
|
295
295
|
userConfigDir,
|
|
296
296
|
withFileLock,
|
|
297
297
|
yawModeOverlay
|
|
298
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-4Y3B23Z3.js";
|
|
299
299
|
|
|
300
300
|
// src/audit-cmd.ts
|
|
301
301
|
import { homedir as homedir3 } from "os";
|
|
@@ -815,7 +815,6 @@ async function loadYawMcpConfig(opts = {}) {
|
|
|
815
815
|
const global = await readConfigAt(globalPath, "global", warnings, policyErrors);
|
|
816
816
|
if (global) loadedFiles.push(global);
|
|
817
817
|
const policyWarnings = loadedFiles.flatMap((f) => f.unknownKeysWarning ? [f.unknownKeysWarning] : []);
|
|
818
|
-
policyWarnings.push(...policyErrors.map((e) => e.message));
|
|
819
818
|
return {
|
|
820
819
|
servers: pickServers(loadedFiles, warnings),
|
|
821
820
|
blocked: unionStringField(loadedFiles, "blocked"),
|
|
@@ -1153,6 +1152,16 @@ function identityBlockOf(profile, servers, namespace) {
|
|
|
1153
1152
|
if (!profileAllows(profile, namespace)) return null;
|
|
1154
1153
|
return displayIdentity(matched);
|
|
1155
1154
|
}
|
|
1155
|
+
function identityBlocksOf(profile, servers, namespaces) {
|
|
1156
|
+
const blocks = identityBlocks(profile, identify(servers));
|
|
1157
|
+
const out = /* @__PURE__ */ new Map();
|
|
1158
|
+
for (const namespace of namespaces) {
|
|
1159
|
+
const matched = blocks.get(namespace);
|
|
1160
|
+
if (!matched || !profileAllows(profile, namespace)) continue;
|
|
1161
|
+
out.set(namespace, displayIdentity(matched));
|
|
1162
|
+
}
|
|
1163
|
+
return out;
|
|
1164
|
+
}
|
|
1156
1165
|
function effectiveProfile(profile, servers) {
|
|
1157
1166
|
if (!profile || !profile.blocked?.length && !profile.blockedTools?.length) return profile;
|
|
1158
1167
|
const identified = identify(servers);
|
|
@@ -9514,7 +9523,7 @@ function foldBundleWarnings(warnings, probe) {
|
|
|
9514
9523
|
const prefix = `${probe.path}:`;
|
|
9515
9524
|
return warnings.filter((w) => !w.startsWith(prefix));
|
|
9516
9525
|
}
|
|
9517
|
-
var VERSION = true ? "1.1.
|
|
9526
|
+
var VERSION = true ? "1.1.18" : "dev";
|
|
9518
9527
|
var DOCTOR_USAGE = `Usage: yaw-mcp doctor [--json]
|
|
9519
9528
|
|
|
9520
9529
|
Print a diagnostic of your yaw-mcp setup.
|
|
@@ -19788,7 +19797,7 @@ var ConnectServer = class _ConnectServer {
|
|
|
19788
19797
|
* initialize handshake completes; see beginSession for why it waits. */
|
|
19789
19798
|
buildServer(era, supportedProtocolVersions) {
|
|
19790
19799
|
const s = new Server(
|
|
19791
|
-
{ name: "yaw-mcp", version: true ? "1.1.
|
|
19800
|
+
{ name: "yaw-mcp", version: true ? "1.1.18" : "dev" },
|
|
19792
19801
|
{
|
|
19793
19802
|
capabilities: {
|
|
19794
19803
|
tools: { listChanged: true },
|
|
@@ -20098,7 +20107,7 @@ var ConnectServer = class _ConnectServer {
|
|
|
20098
20107
|
await this.ready;
|
|
20099
20108
|
const resourceNamespace = this.getBuiltinResourceMap().has(request.params.uri) ? void 0 : this.resourceRoutes.get(request.params.uri)?.namespace;
|
|
20100
20109
|
const resourceRefusal = resourceNamespace ? this.serverPolicyRefusal(resourceNamespace) : null;
|
|
20101
|
-
if (resourceRefusal)
|
|
20110
|
+
if (resourceRefusal) throw new ProtocolError(ProtocolErrorCode.InvalidRequest, resourceRefusal);
|
|
20102
20111
|
return await routeResourceRead(
|
|
20103
20112
|
request.params.uri,
|
|
20104
20113
|
this.resourceRoutes,
|
|
@@ -20121,9 +20130,7 @@ var ConnectServer = class _ConnectServer {
|
|
|
20121
20130
|
await this.ready;
|
|
20122
20131
|
const promptNamespace = this.promptRoutes.get(request.params.name)?.namespace;
|
|
20123
20132
|
const promptRefusal = promptNamespace ? this.serverPolicyRefusal(promptNamespace) : null;
|
|
20124
|
-
if (promptRefusal)
|
|
20125
|
-
return { messages: [{ role: "user", content: { type: "text", text: promptRefusal } }] };
|
|
20126
|
-
}
|
|
20133
|
+
if (promptRefusal) throw new ProtocolError(ProtocolErrorCode.InvalidRequest, promptRefusal);
|
|
20127
20134
|
return await routePromptGet(
|
|
20128
20135
|
request.params.name,
|
|
20129
20136
|
request.params.arguments,
|
|
@@ -20936,8 +20943,7 @@ var ConnectServer = class _ConnectServer {
|
|
|
20936
20943
|
projectConfigDir: null,
|
|
20937
20944
|
loadedFiles: [],
|
|
20938
20945
|
warnings: [message],
|
|
20939
|
-
policyErrors: [{ path: path3, message }]
|
|
20940
|
-
policyWarnings: [message]
|
|
20946
|
+
policyErrors: [{ path: path3, message }]
|
|
20941
20947
|
};
|
|
20942
20948
|
});
|
|
20943
20949
|
for (const w of resolvedConfig.warnings) log("warn", "Config warning", { warning: w });
|
|
@@ -22428,16 +22434,11 @@ ${activeCount} loaded in this session, ${totalTools} ${totalTools === 1 ? "tool"
|
|
|
22428
22434
|
const refusal = spawnGateVerdict(server, this.profile, resolveMinCompliance(), this.config?.servers ?? [server]);
|
|
22429
22435
|
if (!refusal) return null;
|
|
22430
22436
|
const text = this.spawnGateRefusalText(refusal, purpose);
|
|
22431
|
-
const
|
|
22432
|
-
|
|
22433
|
-
|
|
22434
|
-
|
|
22435
|
-
|
|
22436
|
-
* that already print the policyErrors themselves, so the broken file's
|
|
22437
|
-
* message does not print twice. */
|
|
22438
|
-
genuinePolicyWarnings() {
|
|
22439
|
-
const errorMessages = new Set((this.profile?.policyErrors ?? []).map((e) => e.message));
|
|
22440
|
-
return (this.profile?.policyWarnings ?? []).filter((w) => !errorMessages.has(w));
|
|
22437
|
+
const notes = [
|
|
22438
|
+
...refusal.kind === "policy-invalid" ? [] : (this.profile?.policyErrors ?? []).map((e) => e.message),
|
|
22439
|
+
...this.profile?.policyWarnings ?? []
|
|
22440
|
+
];
|
|
22441
|
+
return notes.length > 0 ? `${text} Note: ${notes.join(" ")}` : text;
|
|
22441
22442
|
}
|
|
22442
22443
|
spawnGateRefusalText(refusal, purpose) {
|
|
22443
22444
|
switch (refusal.kind) {
|
|
@@ -24120,13 +24121,19 @@ The vault at ${path3} exists but could not be read, so which referenced names it
|
|
|
24120
24121
|
lines.push(`Profile: ${this.profile.path}`);
|
|
24121
24122
|
}
|
|
24122
24123
|
for (const e of this.profile.policyErrors ?? []) lines.push(` POLICY ERROR: ${e.message}`);
|
|
24123
|
-
for (const w of this.
|
|
24124
|
+
for (const w of this.profile.policyWarnings ?? []) lines.push(` POLICY WARNING: ${w}`);
|
|
24124
24125
|
if (this.profile.servers) lines.push(` allow: ${this.profile.servers.join(", ") || "(nothing)"}`);
|
|
24125
24126
|
if (this.profile.blocked?.length) lines.push(` block: ${this.profile.blocked.join(", ")}`);
|
|
24126
24127
|
const enforced = this.profile.policyErrors?.length ? null : this.policy();
|
|
24127
24128
|
const servers = this.config?.servers ?? [];
|
|
24128
24129
|
const profile = this.profile;
|
|
24129
|
-
const extraBlocked = enforced ?
|
|
24130
|
+
const extraBlocked = enforced ? [
|
|
24131
|
+
...identityBlocksOf(
|
|
24132
|
+
profile,
|
|
24133
|
+
servers,
|
|
24134
|
+
servers.filter((s) => s.isActive && !profileAllows(enforced, s.namespace)).map((s) => s.namespace)
|
|
24135
|
+
).keys()
|
|
24136
|
+
].sort() : [];
|
|
24130
24137
|
if (extraBlocked.length > 0) lines.push(` also blocked via identity: ${extraBlocked.join(", ")}`);
|
|
24131
24138
|
if (this.profile.blockedTools?.length) lines.push(` block tools: ${this.profile.blockedTools.join(", ")}`);
|
|
24132
24139
|
lines.push("");
|
|
@@ -25818,7 +25825,7 @@ async function runShutdown(shutdown, deps) {
|
|
|
25818
25825
|
// src/status-cmd.ts
|
|
25819
25826
|
import { existsSync as existsSync8 } from "fs";
|
|
25820
25827
|
import { homedir as homedir20 } from "os";
|
|
25821
|
-
var VERSION2 = true ? "1.1.
|
|
25828
|
+
var VERSION2 = true ? "1.1.18" : "dev";
|
|
25822
25829
|
var STATUS_SCHEMA_VERSION = 1;
|
|
25823
25830
|
var STATUS_USAGE = `Usage: yaw-mcp status [--json]
|
|
25824
25831
|
|
|
@@ -26761,7 +26768,7 @@ if (subcommand === "compliance") {
|
|
|
26761
26768
|
`);
|
|
26762
26769
|
process.exitCode = 0;
|
|
26763
26770
|
} else if (subcommand === "--version" || subcommand === "-V") {
|
|
26764
|
-
process.stdout.write(`yaw-mcp ${true ? "1.1.
|
|
26771
|
+
process.stdout.write(`yaw-mcp ${true ? "1.1.18" : "dev"}
|
|
26765
26772
|
`);
|
|
26766
26773
|
process.exitCode = 0;
|
|
26767
26774
|
} else if (subcommand !== void 0 && !subcommand.startsWith("-")) {
|
package/package.json
CHANGED