add-ai-tools 1.2.1 → 1.2.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.
Files changed (2) hide show
  1. package/dist/index.mjs +51 -12
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -465,6 +465,22 @@ var GitHubRateLimitError = class extends GitHubApiError {
465
465
  * - API 호출: 2회 (branch SHA + tree)
466
466
  * - 파일 fetch: raw.githubusercontent.com (Rate Limit 영향 없음)
467
467
  */
468
+ /**
469
+ * 리소스 파일이 아닌 일반 문서 파일 목록
470
+ * findMainResourceFile 폴백 및 루트 레벨 처리에서 제외됩니다.
471
+ */
472
+ const NON_RESOURCE_FILES$1 = [
473
+ "README.md",
474
+ "readme.md",
475
+ "CHANGELOG.md",
476
+ "changelog.md",
477
+ "LICENSE.md",
478
+ "license.md",
479
+ "CONTRIBUTING.md",
480
+ "contributing.md",
481
+ "CLAUDE.md",
482
+ "AGENTS.md"
483
+ ];
468
484
  var GitHubFetcher = class {
469
485
  parser;
470
486
  baseApiUrl = "https://api.github.com";
@@ -583,9 +599,12 @@ var GitHubFetcher = class {
583
599
  const resource = this.parseSubdirectoryResource(subdir, files, type);
584
600
  if (resource) resources.push(resource);
585
601
  }
586
- for (const file of structure.rootFiles) if (file.path.endsWith(".md")) {
587
- const resource = this.parseSingleFileResource(file, type);
588
- if (resource) resources.push(resource);
602
+ for (const file of structure.rootFiles) {
603
+ const fileName = this.getFileName(file.path);
604
+ if (file.path.endsWith(".md") && !NON_RESOURCE_FILES$1.some((nr) => fileName.toLowerCase() === nr.toLowerCase())) {
605
+ const resource = this.parseSingleFileResource(file, type);
606
+ if (resource) resources.push(resource);
607
+ }
589
608
  }
590
609
  return resources;
591
610
  }
@@ -692,8 +711,7 @@ var GitHubFetcher = class {
692
711
  "RULE.md",
693
712
  "RULES.md",
694
713
  "rule.md",
695
- "rules.md",
696
- "README.md"
714
+ "rules.md"
697
715
  ],
698
716
  agents: ["AGENT.md", "agent.md"]
699
717
  }[type] || [];
@@ -703,7 +721,10 @@ var GitHubFetcher = class {
703
721
  });
704
722
  if (found) return found;
705
723
  }
706
- return files.find((file) => file.path.endsWith(".md")) || null;
724
+ return files.find((file) => {
725
+ const fileName = this.getFileName(file.path);
726
+ return file.path.endsWith(".md") && !NON_RESOURCE_FILES$1.some((nr) => fileName.toLowerCase() === nr.toLowerCase());
727
+ }) || null;
707
728
  }
708
729
  };
709
730
  const githubFetcher = new GitHubFetcher();
@@ -728,6 +749,22 @@ var BitbucketApiError = class extends Error {
728
749
  * git archive --remote 명령을 사용하여 SSH 키 인증을 활용합니다.
729
750
  * 최적화: 단일 SSH 호출로 전체 디렉토리를 가져와 캐시합니다.
730
751
  */
752
+ /**
753
+ * 리소스 파일이 아닌 일반 문서 파일 목록
754
+ * findMainResourceFile 폴백 및 루트 레벨 처리에서 제외됩니다.
755
+ */
756
+ const NON_RESOURCE_FILES = [
757
+ "README.md",
758
+ "readme.md",
759
+ "CHANGELOG.md",
760
+ "changelog.md",
761
+ "LICENSE.md",
762
+ "license.md",
763
+ "CONTRIBUTING.md",
764
+ "contributing.md",
765
+ "CLAUDE.md",
766
+ "AGENTS.md"
767
+ ];
731
768
  var BitbucketFetcher = class {
732
769
  parser;
733
770
  fileCache = /* @__PURE__ */ new Map();
@@ -827,9 +864,12 @@ var BitbucketFetcher = class {
827
864
  const resource = this.parseSubdirectoryResource(subdir, files, type);
828
865
  if (resource) resources.push(resource);
829
866
  }
830
- for (const file of structure.rootFiles) if (file.path.endsWith(".md")) {
831
- const resource = this.parseSingleFileResource(file, type);
832
- if (resource) resources.push(resource);
867
+ for (const file of structure.rootFiles) {
868
+ const fileName = this.getFileName(file.path);
869
+ if (file.path.endsWith(".md") && !NON_RESOURCE_FILES.some((nr) => fileName.toLowerCase() === nr.toLowerCase())) {
870
+ const resource = this.parseSingleFileResource(file, type);
871
+ if (resource) resources.push(resource);
872
+ }
833
873
  }
834
874
  return resources;
835
875
  }
@@ -926,8 +966,7 @@ var BitbucketFetcher = class {
926
966
  "RULE.md",
927
967
  "RULES.md",
928
968
  "rule.md",
929
- "rules.md",
930
- "README.md"
969
+ "rules.md"
931
970
  ],
932
971
  agents: ["AGENT.md", "agent.md"]
933
972
  }[type] || [];
@@ -940,7 +979,7 @@ var BitbucketFetcher = class {
940
979
  }
941
980
  return entries.find((entry) => {
942
981
  const fileName = this.getFileName(entry.path);
943
- return entry.type === "file" && fileName.endsWith(".md");
982
+ return entry.type === "file" && fileName.endsWith(".md") && !NON_RESOURCE_FILES.some((nr) => fileName.toLowerCase() === nr.toLowerCase());
944
983
  }) || null;
945
984
  }
946
985
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "add-ai-tools",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Universal AI agent resource installer CLI",
5
5
  "type": "module",
6
6
  "bin": {