@yawlabs/mcp 0.79.1 → 0.79.2
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/README.md +5 -1
- package/dist/{auto-upgrade-YUPODM3T.js → auto-upgrade-W6LVJ7XD.js} +1 -2
- package/dist/{chunk-33LK4DLQ.js → chunk-ODSIFM3N.js} +781 -48
- package/dist/index.js +1468 -754
- package/package.json +5 -4
- package/schemas/yaw-mcp.config.v1.json +7 -6
- package/dist/chunk-3RRZQPA5.js +0 -39
- package/dist/chunk-TBJCXYS4.js +0 -639
- package/dist/oam-spawn-UUOFWXFP.js +0 -82
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yawlabs/mcp",
|
|
3
|
-
"version": "0.79.
|
|
3
|
+
"version": "0.79.2",
|
|
4
4
|
"mcpName": "io.github.YawLabs/mcp",
|
|
5
5
|
"description": "Yaw MCP -- one install, every MCP server, managed from yaw.sh/mcp. Runs entirely on your machine: no account, no sign-in.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
"build": "tsup",
|
|
20
20
|
"dev": "tsup --watch",
|
|
21
21
|
"test": "vitest run",
|
|
22
|
-
"lint": "biome check src/",
|
|
23
|
-
"lint:fix": "biome check --write src/",
|
|
22
|
+
"lint": "biome check src/ tsup.config.ts vitest.config.ts tsconfig.json",
|
|
23
|
+
"lint:fix": "biome check --write src/ tsup.config.ts vitest.config.ts tsconfig.json",
|
|
24
24
|
"typecheck": "tsc --noEmit",
|
|
25
|
-
"test:
|
|
25
|
+
"test:dist": "npm run build && npm test",
|
|
26
|
+
"preinstall": "node -e \"const major=Number(process.versions.node.split('.')[0]);if(major<20){console.error('@yawlabs/mcp requires Node 20 or newer; this is Node '+process.versions.node+'. Upgrade Node, then re-run the install.');process.exit(1);}\"",
|
|
26
27
|
"prepublishOnly": "npm run build",
|
|
27
28
|
"start": "node dist/index.js"
|
|
28
29
|
},
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"version": {
|
|
15
15
|
"type": "integer",
|
|
16
16
|
"minimum": 1,
|
|
17
|
-
"description": "Config schema version. Current version: 1. A value newer than the CLI understands triggers a warning but is not fatal."
|
|
17
|
+
"description": "Config schema version. Current version: 1. A value newer than the CLI understands triggers a warning but is not fatal. Declared `integer` with `minimum: 1` because that is the only shape yaw-mcp ever writes or documents. The loader (config-loader.ts readConfigAt) is deliberately more lenient -- it honors ANY numeric value and only warns when it exceeds the version it knows, so a hand-written `0` or `1.5` still loads. That gap is intentional: this schema is the editor-facing contract (flag the typo while it is being typed), the loader soft-fails by design (never refuse a file over a field it can ignore). A NON-number (`\"1\"`, null) is rejected here and warned about there."
|
|
18
18
|
},
|
|
19
19
|
"token": {
|
|
20
20
|
"type": "string",
|
|
@@ -32,22 +32,23 @@
|
|
|
32
32
|
},
|
|
33
33
|
"servers": {
|
|
34
34
|
"type": "array",
|
|
35
|
-
"items": { "type": "string", "minLength": 1 },
|
|
36
35
|
"uniqueItems": true,
|
|
37
|
-
"
|
|
36
|
+
"items": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]{0,29}$" },
|
|
37
|
+
"description": "Allow-list of server namespaces to activate. If set in any scope, only these servers are active. Precedence: local scope wins over project, which wins over global (most-specific overrides). Entries are matched literally against an installed namespace, so `pattern` mirrors NAMESPACE_RE (src/local-bundles.ts): a lowercase letter followed by up to 29 more of [a-z0-9_]. A blank, padded, or wrong-case entry ('GitHub', ' github') can never name a server. The loader is softer about the same three cases, and the split is deliberate -- it drops a blank entry with a warning, trims a padded one, and KEEPS an unmatchable one with a warning (dropping it would empty the array and silently promote this scope to the parent's allow-list). `uniqueItems` likewise flags a repeated namespace in the editor, where it is always a typo; the loader treats the duplicate as the harmless no-op it is."
|
|
38
38
|
},
|
|
39
39
|
"blocked": {
|
|
40
40
|
"type": "array",
|
|
41
|
-
"items": { "type": "string", "minLength": 1 },
|
|
42
41
|
"uniqueItems": true,
|
|
43
|
-
"
|
|
42
|
+
"items": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]{0,29}$" },
|
|
43
|
+
"description": "Deny-list of server namespaces that are never activated. Merged as a union across all scopes (additive, not overriding). Same namespace `pattern` and `uniqueItems` as `servers`, and the same strict-schema / lenient-loader split: the union is a Set, so the loader absorbs a duplicate rather than rejecting it."
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"examples": [
|
|
47
47
|
{
|
|
48
|
+
"$schema": "https://raw.githubusercontent.com/YawLabs/mcp/main/schemas/yaw-mcp.config.v1.json",
|
|
48
49
|
"version": 1,
|
|
49
50
|
"servers": ["github", "filesystem"],
|
|
50
|
-
"blocked": ["
|
|
51
|
+
"blocked": ["legacy_db"]
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
"version": 1,
|
package/dist/chunk-3RRZQPA5.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// src/logger.ts
|
|
4
|
-
var LOG_LEVELS = { debug: 0, info: 1, warn: 2, error: 3 };
|
|
5
|
-
function minLevel() {
|
|
6
|
-
return LOG_LEVELS[process.env.LOG_LEVEL?.toLowerCase()] ?? LOG_LEVELS.info;
|
|
7
|
-
}
|
|
8
|
-
var stderrErrorGuarded = false;
|
|
9
|
-
function guardStderrErrors() {
|
|
10
|
-
if (stderrErrorGuarded) return;
|
|
11
|
-
stderrErrorGuarded = true;
|
|
12
|
-
try {
|
|
13
|
-
if (process.stderr.listenerCount("error") === 0) {
|
|
14
|
-
process.stderr.on("error", () => {
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
} catch {
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function log(level, msg, data) {
|
|
21
|
-
if (LOG_LEVELS[level] < minLevel()) return;
|
|
22
|
-
guardStderrErrors();
|
|
23
|
-
const ts = (/* @__PURE__ */ new Date()).toISOString();
|
|
24
|
-
let entry;
|
|
25
|
-
try {
|
|
26
|
-
entry = JSON.stringify({ ...data, level, msg, ts });
|
|
27
|
-
} catch {
|
|
28
|
-
entry = JSON.stringify({ level, msg, ts, dataOmitted: true });
|
|
29
|
-
}
|
|
30
|
-
try {
|
|
31
|
-
process.stderr.write(`${entry}
|
|
32
|
-
`);
|
|
33
|
-
} catch {
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export {
|
|
38
|
-
log
|
|
39
|
-
};
|