@lousy-agents/lint 5.12.2 → 5.13.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.
Files changed (2) hide show
  1. package/dist/index.js +56 -72
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -566,7 +566,7 @@ module.exports = webpackEmptyAsyncContext;
566
566
 
567
567
 
568
568
  },
569
- 4624(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
569
+ 3966(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
570
570
 
571
571
  // EXPORTS
572
572
  __webpack_require__.d(__webpack_exports__, {
@@ -759,6 +759,56 @@ var promises_ = __webpack_require__(1455);
759
759
  var external_node_path_ = __webpack_require__(6760);
760
760
  // EXTERNAL MODULE: ../../node_modules/yaml/dist/index.js
761
761
  var dist = __webpack_require__(3519);
762
+ ;// CONCATENATED MODULE: ../core/src/lib/frontmatter.ts
763
+ /**
764
+ * Shared YAML frontmatter parser for markdown files.
765
+ * Extracts YAML data between leading `---` delimiters.
766
+ */
767
+ /**
768
+ * Parses YAML frontmatter from markdown content.
769
+ *
770
+ * Returns `null` when the content has no opening `---`, no closing `---`,
771
+ * or contains invalid YAML.
772
+ */ function parseFrontmatter(content) {
773
+ const lines = content.split("\n");
774
+ if (lines[0]?.trim() !== "---") {
775
+ return null;
776
+ }
777
+ let endIndex = -1;
778
+ for(let i = 1; i < lines.length; i++){
779
+ if (lines[i]?.trim() === "---") {
780
+ endIndex = i;
781
+ break;
782
+ }
783
+ }
784
+ if (endIndex === -1) {
785
+ return null;
786
+ }
787
+ const yamlContent = lines.slice(1, endIndex).join("\n");
788
+ let data;
789
+ try {
790
+ const parsed = (0,dist/* .parse */.qg)(yamlContent, {
791
+ maxAliasCount: 0
792
+ });
793
+ data = parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
794
+ } catch {
795
+ return null;
796
+ }
797
+ const fieldLines = new Map();
798
+ for(let i = 1; i < endIndex; i++){
799
+ // Match YAML top-level field names: non-whitespace start, any chars except colon, then colon followed by whitespace or end-of-line
800
+ const match = lines[i]?.match(/^([^\s:][^:]*?):(?:\s|$)/);
801
+ if (match?.[1]) {
802
+ fieldLines.set(match[1], i + 1);
803
+ }
804
+ }
805
+ return {
806
+ data: data ?? {},
807
+ fieldLines,
808
+ frontmatterStartLine: 1
809
+ };
810
+ }
811
+
762
812
  // EXTERNAL MODULE: external "node:fs"
763
813
  var external_node_fs_ = __webpack_require__(3024);
764
814
  ;// CONCATENATED MODULE: ../core/src/gateways/file-system-utils.ts
@@ -945,40 +995,7 @@ function isPathWithinRoot(rootPath, candidatePath) {
945
995
  return readFileNoFollow(filePath, MAX_AGENT_FILE_BYTES);
946
996
  }
947
997
  parseFrontmatter(content) {
948
- const lines = content.split("\n");
949
- if (lines[0]?.trim() !== "---") {
950
- return null;
951
- }
952
- let endIndex = -1;
953
- for(let i = 1; i < lines.length; i++){
954
- if (lines[i]?.trim() === "---") {
955
- endIndex = i;
956
- break;
957
- }
958
- }
959
- if (endIndex === -1) {
960
- return null;
961
- }
962
- const yamlContent = lines.slice(1, endIndex).join("\n");
963
- let data;
964
- try {
965
- const parsed = (0,dist/* .parse */.qg)(yamlContent);
966
- data = parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
967
- } catch {
968
- return null;
969
- }
970
- const fieldLines = new Map();
971
- for(let i = 1; i < endIndex; i++){
972
- const match = lines[i]?.match(/^([^\s:][^:]*?):\s/);
973
- if (match?.[1]) {
974
- fieldLines.set(match[1], i + 1);
975
- }
976
- }
977
- return {
978
- data: data ?? {},
979
- fieldLines,
980
- frontmatterStartLine: 1
981
- };
998
+ return parseFrontmatter(content);
982
999
  }
983
1000
  }
984
1001
  /**
@@ -20292,7 +20309,8 @@ const remark = unified().use(remarkParse).use(remarkStringify).freeze()
20292
20309
  * Skill directory locations to search for SKILL.md files.
20293
20310
  */ const SKILL_DIRECTORIES = [
20294
20311
  (0,external_node_path_.join)(".github", "skills"),
20295
- (0,external_node_path_.join)(".claude", "skills")
20312
+ (0,external_node_path_.join)(".claude", "skills"),
20313
+ (0,external_node_path_.join)(".agents", "skills")
20296
20314
  ];
20297
20315
  /**
20298
20316
  * File system implementation of the skill lint gateway.
@@ -20362,41 +20380,7 @@ const remark = unified().use(remarkParse).use(remarkStringify).freeze()
20362
20380
  return readFileNoFollow(filePath, MAX_SKILL_FILE_BYTES);
20363
20381
  }
20364
20382
  parseFrontmatter(content) {
20365
- const lines = content.split("\n");
20366
- if (lines[0]?.trim() !== "---") {
20367
- return null;
20368
- }
20369
- let endIndex = -1;
20370
- for(let i = 1; i < lines.length; i++){
20371
- if (lines[i]?.trim() === "---") {
20372
- endIndex = i;
20373
- break;
20374
- }
20375
- }
20376
- if (endIndex === -1) {
20377
- return null;
20378
- }
20379
- const yamlContent = lines.slice(1, endIndex).join("\n");
20380
- let data;
20381
- try {
20382
- const parsed = (0,dist/* .parse */.qg)(yamlContent);
20383
- data = parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
20384
- } catch {
20385
- return null;
20386
- }
20387
- const fieldLines = new Map();
20388
- for(let i = 1; i < endIndex; i++){
20389
- // Match YAML top-level field names: non-whitespace start, any chars except colon, then colon+space
20390
- const match = lines[i]?.match(/^([^\s:][^:]*?):\s/);
20391
- if (match?.[1]) {
20392
- fieldLines.set(match[1], i + 1);
20393
- }
20394
- }
20395
- return {
20396
- data: data ?? {},
20397
- fieldLines,
20398
- frontmatterStartLine: 1
20399
- };
20383
+ return parseFrontmatter(content);
20400
20384
  }
20401
20385
  }
20402
20386
  /**
@@ -40787,7 +40771,7 @@ if (installedChunkData !== 0) { // 0 means "already installed".'
40787
40771
  // module factories are used so entry inlining is disabled
40788
40772
  // startup
40789
40773
  // Load entry module and return exports
40790
- var __webpack_exports__ = __webpack_require__(4624);
40774
+ var __webpack_exports__ = __webpack_require__(3966);
40791
40775
  var __webpack_exports__DEFAULT_LINT_RULES = __webpack_exports__.Kd;
40792
40776
  var __webpack_exports__LintValidationError = __webpack_exports__.F5;
40793
40777
  var __webpack_exports__createFormatter = __webpack_exports__.xi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lousy-agents/lint",
3
- "version": "5.12.2",
3
+ "version": "5.13.0",
4
4
  "description": "Programmatic lint API for validating AI coding assistant configurations — skills, agents, hooks, and instructions",
5
5
  "type": "module",
6
6
  "repository": {