@lousy-agents/mcp 5.4.3 → 5.5.0

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.
@@ -7854,19 +7854,26 @@ function composeNode(ctx, token, props, onError) {
7854
7854
  case 'block-map':
7855
7855
  case 'block-seq':
7856
7856
  case 'flow-collection':
7857
- node = composeCollection.composeCollection(CN, ctx, token, props, onError);
7858
- if (anchor)
7859
- node.anchor = anchor.source.substring(1);
7857
+ try {
7858
+ node = composeCollection.composeCollection(CN, ctx, token, props, onError);
7859
+ if (anchor)
7860
+ node.anchor = anchor.source.substring(1);
7861
+ }
7862
+ catch (error) {
7863
+ // Almost certainly here due to a stack overflow
7864
+ const message = error instanceof Error ? error.message : String(error);
7865
+ onError(token, 'RESOURCE_EXHAUSTION', message);
7866
+ }
7860
7867
  break;
7861
7868
  default: {
7862
7869
  const message = token.type === 'error'
7863
7870
  ? token.message
7864
7871
  : `Unsupported token (type: ${token.type})`;
7865
7872
  onError(token, 'UNEXPECTED_TOKEN', message);
7866
- node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError);
7867
7873
  isSrcToken = false;
7868
7874
  }
7869
7875
  }
7876
+ node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError));
7870
7877
  if (anchor && node.anchor === '')
7871
7878
  onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');
7872
7879
  if (atKey &&
@@ -14840,6 +14847,7 @@ function createStringifyContext(doc, options) {
14840
14847
  nullStr: 'null',
14841
14848
  simpleKeys: false,
14842
14849
  singleQuote: null,
14850
+ trailingComma: false,
14843
14851
  trueStr: 'true',
14844
14852
  verifyAliasOrder: true
14845
14853
  }, doc.schema.toStringOptions, options);
@@ -15057,12 +15065,22 @@ function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
15057
15065
  if (comment)
15058
15066
  reqNewline = true;
15059
15067
  let str = stringify.stringify(item, itemCtx, () => (comment = null));
15060
- if (i < items.length - 1)
15068
+ reqNewline || (reqNewline = lines.length > linesAtValue || str.includes('\n'));
15069
+ if (i < items.length - 1) {
15061
15070
  str += ',';
15071
+ }
15072
+ else if (ctx.options.trailingComma) {
15073
+ if (ctx.options.lineWidth > 0) {
15074
+ reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) +
15075
+ (str.length + 2) >
15076
+ ctx.options.lineWidth);
15077
+ }
15078
+ if (reqNewline) {
15079
+ str += ',';
15080
+ }
15081
+ }
15062
15082
  if (comment)
15063
15083
  str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
15064
- if (!reqNewline && (lines.length > linesAtValue || str.includes('\n')))
15065
- reqNewline = true;
15066
15084
  lines.push(str);
15067
15085
  linesAtValue = lines.length;
15068
15086
  }
@@ -47816,11 +47834,25 @@ var yaml_dist = __webpack_require__(3519);
47816
47834
 
47817
47835
 
47818
47836
 
47837
+ /**
47838
+ * Skill directory locations to search for SKILL.md files.
47839
+ */ const SKILL_DIRECTORIES = [
47840
+ (0,external_node_path_.join)(".github", "skills"),
47841
+ (0,external_node_path_.join)(".claude", "skills")
47842
+ ];
47819
47843
  /**
47820
47844
  * File system implementation of the skill lint gateway.
47821
47845
  */ class FileSystemSkillLintGateway {
47822
47846
  async discoverSkills(targetDir) {
47823
- const skillsDir = join(targetDir, ".github", "skills");
47847
+ const skills = [];
47848
+ for (const relativeDir of SKILL_DIRECTORIES){
47849
+ const skillsDir = join(targetDir, relativeDir);
47850
+ const discovered = await this.discoverSkillsInDir(skillsDir);
47851
+ skills.push(...discovered);
47852
+ }
47853
+ return skills;
47854
+ }
47855
+ async discoverSkillsInDir(skillsDir) {
47824
47856
  if (!await fileExists(skillsDir)) {
47825
47857
  return [];
47826
47858
  }