@lousy-agents/cli 5.21.9 → 5.21.10

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.
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@biomejs/biome": "2.5.13",
21
- "@lousy-agents/mcp": "5.21.8",
21
+ "@lousy-agents/mcp": "5.21.9",
22
22
  "@modelcontextprotocol/server-sequential-thinking": "2026.8.31",
23
23
  "@testcontainers/postgresql": "12.1.0",
24
24
  "@types/node": "24.13.3",
@@ -958,9 +958,9 @@
958
958
  }
959
959
  },
960
960
  "node_modules/@lousy-agents/mcp": {
961
- "version": "5.21.8",
962
- "resolved": "https://registry.npmjs.org/@lousy-agents/mcp/-/mcp-5.21.8.tgz",
963
- "integrity": "sha512-XGGbomuNSEfDg0wNMQzeEMdZ2GsTWEEGM3h060gFhJjD+mv7fxuuAv5IZvk6asqdC+GWVb4oqklYEnejjXpevQ==",
961
+ "version": "5.21.9",
962
+ "resolved": "https://registry.npmjs.org/@lousy-agents/mcp/-/mcp-5.21.9.tgz",
963
+ "integrity": "sha512-rjxEuOXK33ZQeL1cSdvMiTcUj3dMoTPRI7SuMNL4YZZob7LRNDTe68xW+1lq8EZnJMhHXEaGWowxCVj/uLSQpw==",
964
964
  "dev": true,
965
965
  "license": "BSD-2-Clause-Patent",
966
966
  "dependencies": {
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@biomejs/biome": "2.5.13",
32
- "@lousy-agents/mcp": "5.21.8",
32
+ "@lousy-agents/mcp": "5.21.9",
33
33
  "@modelcontextprotocol/server-sequential-thinking": "2026.8.31",
34
34
  "@testcontainers/postgresql": "12.1.0",
35
35
  "@types/node": "24.13.3",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@biomejs/biome": "2.5.13",
23
- "@lousy-agents/mcp": "5.21.8",
23
+ "@lousy-agents/mcp": "5.21.9",
24
24
  "@modelcontextprotocol/server-sequential-thinking": "2026.8.31",
25
25
  "@types/node": "24.13.3",
26
26
  "chance": "1.1.13",
package/dist/index.js CHANGED
@@ -87869,46 +87869,47 @@ function plainValue(source, onError) {
87869
87869
  }
87870
87870
  if (badChar)
87871
87871
  onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`);
87872
- return foldLines(source);
87872
+ return unfoldLines(source);
87873
87873
  }
87874
87874
  function singleQuotedValue(source, onError) {
87875
87875
  if (source[source.length - 1] !== "'" || source.length === 1)
87876
87876
  onError(source.length, 'MISSING_CHAR', "Missing closing 'quote");
87877
- return foldLines(source.slice(1, -1)).replace(/''/g, "'");
87877
+ return unfoldLines(source.slice(1, -1)).replace(/''/g, "'");
87878
87878
  }
87879
- function foldLines(source) {
87879
+ function unfoldLines(source) {
87880
+ const line = /(.*?)\r?\n/sy;
87881
+ let match = line.exec(source);
87882
+ if (!match)
87883
+ return source;
87880
87884
  /**
87881
- * The negative lookbehind here and in the `re` RegExp is to
87885
+ * The negative lookbehinds in these RegExps are to
87882
87886
  * prevent causing a polynomial search time in certain cases.
87883
87887
  *
87884
- * The try-catch is for Safari, which doesn't support this yet:
87888
+ * The try-catch is for Safari < 16.4 and other old browsers:
87885
87889
  * https://caniuse.com/js-regexp-lookbehind
87886
87890
  */
87887
- let first, line;
87891
+ let trimEnd, trimBoth;
87888
87892
  try {
87889
- first = new RegExp('(.*?)(?<![ \t])[ \t]*\r?\n', 'sy');
87890
- line = new RegExp('[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n', 'sy');
87893
+ trimEnd = new RegExp('(?<![ \t])[ \t]+$');
87894
+ trimBoth = new RegExp('^[ \t]+|(?<![ \t])[ \t]+$', 'g');
87891
87895
  }
87892
87896
  catch {
87893
- first = /(.*?)[ \t]*\r?\n/sy;
87894
- line = /[ \t]*(.*?)[ \t]*\r?\n/sy;
87897
+ trimEnd = /[ \t]+$/;
87898
+ trimBoth = /^[ \t]+|[ \t]+$/g;
87895
87899
  }
87896
- let match = first.exec(source);
87897
- if (!match)
87898
- return source;
87899
- let res = match[1];
87900
+ let res = match[1].replace(trimEnd, '');
87900
87901
  let sep = ' ';
87901
- let pos = first.lastIndex;
87902
- line.lastIndex = pos;
87902
+ let pos = line.lastIndex;
87903
87903
  while ((match = line.exec(source))) {
87904
- if (match[1] === '') {
87904
+ const lm = match[1].replace(trimBoth, '');
87905
+ if (lm === '') {
87905
87906
  if (sep === '\n')
87906
87907
  res += sep;
87907
87908
  else
87908
87909
  sep = '\n';
87909
87910
  }
87910
87911
  else {
87911
- res += sep + match[1];
87912
+ res += sep + lm;
87912
87913
  sep = ' ';
87913
87914
  }
87914
87915
  pos = line.lastIndex;
@@ -89245,38 +89246,40 @@ class Alias extends Node.NodeBase {
89245
89246
  if (node.anchor === this.source)
89246
89247
  found = node;
89247
89248
  }
89249
+ if (found && ctx) {
89250
+ const { anchors, doc, maxAliasCount } = ctx;
89251
+ let data = anchors.get(found);
89252
+ if (!data) {
89253
+ // Resolve anchors for Node.prototype.toJS()
89254
+ toJS.toJS(found, null, ctx);
89255
+ data = anchors.get(found);
89256
+ }
89257
+ /* istanbul ignore if */
89258
+ if (data?.res === undefined) {
89259
+ const msg = 'This should not happen: Alias anchor was not resolved?';
89260
+ throw new ReferenceError(msg);
89261
+ }
89262
+ if (maxAliasCount >= 0) {
89263
+ data.count += 1;
89264
+ if (data.aliasCount === 0)
89265
+ data.aliasCount = getAliasCount(doc, found, anchors);
89266
+ if (data.count * data.aliasCount > maxAliasCount) {
89267
+ const msg = 'Excessive alias count indicates a resource exhaustion attack';
89268
+ throw new ReferenceError(msg);
89269
+ }
89270
+ }
89271
+ }
89248
89272
  return found;
89249
89273
  }
89250
89274
  toJSON(_arg, ctx) {
89251
89275
  if (!ctx)
89252
89276
  return { source: this.source };
89253
- const { anchors, doc, maxAliasCount } = ctx;
89254
- const source = this.resolve(doc, ctx);
89277
+ const source = this.resolve(ctx.doc, ctx);
89255
89278
  if (!source) {
89256
89279
  const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
89257
89280
  throw new ReferenceError(msg);
89258
89281
  }
89259
- let data = anchors.get(source);
89260
- if (!data) {
89261
- // Resolve anchors for Node.prototype.toJS()
89262
- toJS.toJS(source, null, ctx);
89263
- data = anchors.get(source);
89264
- }
89265
- /* istanbul ignore if */
89266
- if (data?.res === undefined) {
89267
- const msg = 'This should not happen: Alias anchor was not resolved?';
89268
- throw new ReferenceError(msg);
89269
- }
89270
- if (maxAliasCount >= 0) {
89271
- data.count += 1;
89272
- if (data.aliasCount === 0)
89273
- data.aliasCount = getAliasCount(doc, source, anchors);
89274
- if (data.count * data.aliasCount > maxAliasCount) {
89275
- const msg = 'Excessive alias count indicates a resource exhaustion attack';
89276
- throw new ReferenceError(msg);
89277
- }
89278
- }
89279
- return data.res;
89282
+ return ctx.anchors.get(source).res;
89280
89283
  }
89281
89284
  toString(ctx, _onComment, _onChompKeep) {
89282
89285
  const src = `*${this.source}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lousy-agents/cli",
3
- "version": "5.21.9",
3
+ "version": "5.21.10",
4
4
  "description": "CLI scaffolding tool that sets up projects with structure, instructions, and feedback loops for AI coding assistants",
5
5
  "type": "module",
6
6
  "repository": {
@@ -23,7 +23,7 @@
23
23
  "devDependencies": {
24
24
  "@biomejs/biome": "2.5.13",
25
25
  "@eslint/eslintrc": "3.3.7",
26
- "@lousy-agents/mcp": "5.21.8",
26
+ "@lousy-agents/mcp": "5.21.9",
27
27
  "@modelcontextprotocol/server-sequential-thinking": "2026.8.31",
28
28
  "@testing-library/jest-dom": "7.0.1",
29
29
  "@testing-library/react": "16.3.3",