@lousy-agents/mcp 5.21.9 → 5.21.11
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/mcp-server.js +44 -41
- package/package.json +2 -2
package/dist/mcp-server.js
CHANGED
|
@@ -85674,46 +85674,47 @@ function plainValue(source, onError) {
|
|
|
85674
85674
|
}
|
|
85675
85675
|
if (badChar)
|
|
85676
85676
|
onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`);
|
|
85677
|
-
return
|
|
85677
|
+
return unfoldLines(source);
|
|
85678
85678
|
}
|
|
85679
85679
|
function singleQuotedValue(source, onError) {
|
|
85680
85680
|
if (source[source.length - 1] !== "'" || source.length === 1)
|
|
85681
85681
|
onError(source.length, 'MISSING_CHAR', "Missing closing 'quote");
|
|
85682
|
-
return
|
|
85682
|
+
return unfoldLines(source.slice(1, -1)).replace(/''/g, "'");
|
|
85683
85683
|
}
|
|
85684
|
-
function
|
|
85684
|
+
function unfoldLines(source) {
|
|
85685
|
+
const line = /(.*?)\r?\n/sy;
|
|
85686
|
+
let match = line.exec(source);
|
|
85687
|
+
if (!match)
|
|
85688
|
+
return source;
|
|
85685
85689
|
/**
|
|
85686
|
-
* The negative
|
|
85690
|
+
* The negative lookbehinds in these RegExps are to
|
|
85687
85691
|
* prevent causing a polynomial search time in certain cases.
|
|
85688
85692
|
*
|
|
85689
|
-
* The try-catch is for Safari
|
|
85693
|
+
* The try-catch is for Safari < 16.4 and other old browsers:
|
|
85690
85694
|
* https://caniuse.com/js-regexp-lookbehind
|
|
85691
85695
|
*/
|
|
85692
|
-
let
|
|
85696
|
+
let trimEnd, trimBoth;
|
|
85693
85697
|
try {
|
|
85694
|
-
|
|
85695
|
-
|
|
85698
|
+
trimEnd = new RegExp('(?<![ \t])[ \t]+$');
|
|
85699
|
+
trimBoth = new RegExp('^[ \t]+|(?<![ \t])[ \t]+$', 'g');
|
|
85696
85700
|
}
|
|
85697
85701
|
catch {
|
|
85698
|
-
|
|
85699
|
-
|
|
85702
|
+
trimEnd = /[ \t]+$/;
|
|
85703
|
+
trimBoth = /^[ \t]+|[ \t]+$/g;
|
|
85700
85704
|
}
|
|
85701
|
-
let
|
|
85702
|
-
if (!match)
|
|
85703
|
-
return source;
|
|
85704
|
-
let res = match[1];
|
|
85705
|
+
let res = match[1].replace(trimEnd, '');
|
|
85705
85706
|
let sep = ' ';
|
|
85706
|
-
let pos =
|
|
85707
|
-
line.lastIndex = pos;
|
|
85707
|
+
let pos = line.lastIndex;
|
|
85708
85708
|
while ((match = line.exec(source))) {
|
|
85709
|
-
|
|
85709
|
+
const lm = match[1].replace(trimBoth, '');
|
|
85710
|
+
if (lm === '') {
|
|
85710
85711
|
if (sep === '\n')
|
|
85711
85712
|
res += sep;
|
|
85712
85713
|
else
|
|
85713
85714
|
sep = '\n';
|
|
85714
85715
|
}
|
|
85715
85716
|
else {
|
|
85716
|
-
res += sep +
|
|
85717
|
+
res += sep + lm;
|
|
85717
85718
|
sep = ' ';
|
|
85718
85719
|
}
|
|
85719
85720
|
pos = line.lastIndex;
|
|
@@ -87050,38 +87051,40 @@ class Alias extends Node.NodeBase {
|
|
|
87050
87051
|
if (node.anchor === this.source)
|
|
87051
87052
|
found = node;
|
|
87052
87053
|
}
|
|
87054
|
+
if (found && ctx) {
|
|
87055
|
+
const { anchors, doc, maxAliasCount } = ctx;
|
|
87056
|
+
let data = anchors.get(found);
|
|
87057
|
+
if (!data) {
|
|
87058
|
+
// Resolve anchors for Node.prototype.toJS()
|
|
87059
|
+
toJS.toJS(found, null, ctx);
|
|
87060
|
+
data = anchors.get(found);
|
|
87061
|
+
}
|
|
87062
|
+
/* istanbul ignore if */
|
|
87063
|
+
if (data?.res === undefined) {
|
|
87064
|
+
const msg = 'This should not happen: Alias anchor was not resolved?';
|
|
87065
|
+
throw new ReferenceError(msg);
|
|
87066
|
+
}
|
|
87067
|
+
if (maxAliasCount >= 0) {
|
|
87068
|
+
data.count += 1;
|
|
87069
|
+
if (data.aliasCount === 0)
|
|
87070
|
+
data.aliasCount = getAliasCount(doc, found, anchors);
|
|
87071
|
+
if (data.count * data.aliasCount > maxAliasCount) {
|
|
87072
|
+
const msg = 'Excessive alias count indicates a resource exhaustion attack';
|
|
87073
|
+
throw new ReferenceError(msg);
|
|
87074
|
+
}
|
|
87075
|
+
}
|
|
87076
|
+
}
|
|
87053
87077
|
return found;
|
|
87054
87078
|
}
|
|
87055
87079
|
toJSON(_arg, ctx) {
|
|
87056
87080
|
if (!ctx)
|
|
87057
87081
|
return { source: this.source };
|
|
87058
|
-
const
|
|
87059
|
-
const source = this.resolve(doc, ctx);
|
|
87082
|
+
const source = this.resolve(ctx.doc, ctx);
|
|
87060
87083
|
if (!source) {
|
|
87061
87084
|
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
87062
87085
|
throw new ReferenceError(msg);
|
|
87063
87086
|
}
|
|
87064
|
-
|
|
87065
|
-
if (!data) {
|
|
87066
|
-
// Resolve anchors for Node.prototype.toJS()
|
|
87067
|
-
toJS.toJS(source, null, ctx);
|
|
87068
|
-
data = anchors.get(source);
|
|
87069
|
-
}
|
|
87070
|
-
/* istanbul ignore if */
|
|
87071
|
-
if (data?.res === undefined) {
|
|
87072
|
-
const msg = 'This should not happen: Alias anchor was not resolved?';
|
|
87073
|
-
throw new ReferenceError(msg);
|
|
87074
|
-
}
|
|
87075
|
-
if (maxAliasCount >= 0) {
|
|
87076
|
-
data.count += 1;
|
|
87077
|
-
if (data.aliasCount === 0)
|
|
87078
|
-
data.aliasCount = getAliasCount(doc, source, anchors);
|
|
87079
|
-
if (data.count * data.aliasCount > maxAliasCount) {
|
|
87080
|
-
const msg = 'Excessive alias count indicates a resource exhaustion attack';
|
|
87081
|
-
throw new ReferenceError(msg);
|
|
87082
|
-
}
|
|
87083
|
-
}
|
|
87084
|
-
return data.res;
|
|
87087
|
+
return ctx.anchors.get(source).res;
|
|
87085
87088
|
}
|
|
87086
87089
|
toString(ctx, _onComment, _onChompKeep) {
|
|
87087
87090
|
const src = `*${this.source}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lousy-agents/mcp",
|
|
3
|
-
"version": "5.21.
|
|
3
|
+
"version": "5.21.11",
|
|
4
4
|
"description": "MCP server for lousy-agents - provides AI coding assistant tools via the Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
41
|
-
"yaml": "2.9.
|
|
41
|
+
"yaml": "2.9.1",
|
|
42
42
|
"zod": "4.5.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|