@cannbot-ai/install-helper 0.0.2-beta.47 → 0.0.2-beta.49

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/index.js CHANGED
@@ -583,7 +583,52 @@ var embedded_plugins_default = [
583
583
  ],
584
584
  skills: 16,
585
585
  agents: 3,
586
- description: "Ascend C \u76F4\u8C03\u5168\u6D41\u7A0B\uFF1A\u73AF\u5883\u2192\u8BBE\u8BA1\u2192\u5F00\u53D1\u2192\u5BA1\u67E5\u2192\u6027\u80FD\u9A8C\u6536"
586
+ description: "Ascend C \u76F4\u8C03\u5168\u6D41\u7A0B\uFF1A\u73AF\u5883\u2192\u8BBE\u8BA1\u2192\u5F00\u53D1\u2192\u5BA1\u67E5\u2192\u6027\u80FD\u9A8C\u6536",
587
+ version: "1.2.2",
588
+ configFile: "AGENTS.md",
589
+ installSkills: [
590
+ {
591
+ dir: "ops",
592
+ skills: [
593
+ "ascendc-tiling-design",
594
+ "npu-arch",
595
+ "ascendc-api-best-practices",
596
+ "ascendc-regbase-best-practice",
597
+ "ascendc-blaze-best-practice",
598
+ "ops-precision-standard",
599
+ "ascendc-docs-search",
600
+ "ascendc-env-check",
601
+ "ascendc-precision-debug",
602
+ "ops-profiling",
603
+ "ascendc-direct-invoke-template",
604
+ "torch-ascendc-op-extension",
605
+ "ascendc-runtime-debug",
606
+ "ascendc-crash-debug",
607
+ "ascendc-code-review"
608
+ ]
609
+ },
610
+ {
611
+ dir: "infra",
612
+ skills: [
613
+ "gitcode-toolkit",
614
+ "gitcode-pr-handler",
615
+ "gitcode-issue-gen",
616
+ "gitcode-issue-handler"
617
+ ]
618
+ }
619
+ ],
620
+ installAgents: [
621
+ "ascendc-kernel-architect",
622
+ "ascendc-kernel-design-reviewer",
623
+ "ascendc-kernel-developer",
624
+ "ascendc-kernel-reviewer"
625
+ ],
626
+ externalRepos: [
627
+ {
628
+ url: "https://gitcode.com/cann/asc-devkit.git",
629
+ dir: "plugins-official/ops-direct-invoke/asc-devkit"
630
+ }
631
+ ]
587
632
  },
588
633
  {
589
634
  id: "ops-direct-invoke-flash",
@@ -596,7 +641,36 @@ var embedded_plugins_default = [
596
641
  ],
597
642
  skills: 1,
598
643
  agents: 1,
599
- description: "\u4ECE\u6570\u5B66\u516C\u5F0F\u6216\u4EE3\u7801\u7247\u6BB5\u5FEB\u901F\u6784\u5EFA\u5E76\u9A8C\u8BC1 Ascend NPU \u6838\u51FD\u6570"
644
+ description: "\u4ECE\u6570\u5B66\u516C\u5F0F\u6216\u4EE3\u7801\u7247\u6BB5\u5FEB\u901F\u6784\u5EFA\u5E76\u9A8C\u8BC1 Ascend NPU \u6838\u51FD\u6570",
645
+ version: "1.2.2",
646
+ configFile: "AGENTS.md",
647
+ installSkills: [
648
+ {
649
+ dir: "plugins-official/ops-direct-invoke-flash/skills",
650
+ skills: [
651
+ "ops-direct-invoke-flash"
652
+ ]
653
+ },
654
+ {
655
+ dir: "ops",
656
+ skills: [
657
+ "ascendc-st-design",
658
+ "ascendc-whitebox-design"
659
+ ]
660
+ },
661
+ {
662
+ dir: "infra",
663
+ skills: [
664
+ "gitcode-toolkit",
665
+ "gitcode-pr-handler",
666
+ "gitcode-issue-gen",
667
+ "gitcode-issue-handler"
668
+ ]
669
+ }
670
+ ],
671
+ installAgents: [
672
+ "ops-direct-invoke-flash-reviewer"
673
+ ]
600
674
  },
601
675
  {
602
676
  id: "ops-registry-invoke",
@@ -610,7 +684,66 @@ var embedded_plugins_default = [
610
684
  ],
611
685
  skills: 12,
612
686
  agents: 4,
613
- description: "\u751F\u4EA7\u7EA7 ACLNN \u6CE8\u518C\u7B97\u5B50\u5168\u6D41\u7A0B\uFF1A\u4EE3\u7801\u2192UT/ST\u2192\u4E0A\u5E93"
687
+ description: "\u751F\u4EA7\u7EA7 ACLNN \u6CE8\u518C\u7B97\u5B50\u5168\u6D41\u7A0B\uFF1A\u4EE3\u7801\u2192UT/ST\u2192\u4E0A\u5E93",
688
+ version: "1.2.2",
689
+ configFile: "AGENTS.md",
690
+ installSkills: [
691
+ {
692
+ dir: "ops",
693
+ skills: [
694
+ "ascendc-blaze-best-practice",
695
+ "ascendc-api-best-practices",
696
+ "ascendc-code-review",
697
+ "ascendc-crash-debug",
698
+ "ascendc-direct-invoke-template",
699
+ "ascendc-docs-gen",
700
+ "ascendc-docs-search",
701
+ "ascendc-env-check",
702
+ "npu-arch",
703
+ "ascendc-performance-best-practices",
704
+ "ascendc-precision-debug",
705
+ "ascendc-regbase-best-practice",
706
+ "ascendc-registry-invoke-template",
707
+ "ascendc-runtime-debug",
708
+ "ascendc-st-design",
709
+ "ascendc-tiling-design",
710
+ "ascendc-ut-develop",
711
+ "ascendc-whitebox-design",
712
+ "ops-precision-standard",
713
+ "ops-profiling",
714
+ "ops-spec-gen"
715
+ ]
716
+ },
717
+ {
718
+ dir: "infra",
719
+ skills: [
720
+ "gitcode-toolkit",
721
+ "gitcode-pr-handler",
722
+ "gitcode-issue-gen",
723
+ "gitcode-issue-handler"
724
+ ]
725
+ },
726
+ {
727
+ dir: "plugins-official/ops-registry-invoke",
728
+ skills: [
729
+ {
730
+ name: "workflow",
731
+ as: "ops-registry-invoke-workflow"
732
+ }
733
+ ]
734
+ }
735
+ ],
736
+ installAgents: [
737
+ "ascendc-ops-architect",
738
+ "ascendc-ops-developer",
739
+ "ascendc-ops-tester"
740
+ ],
741
+ externalRepos: [
742
+ {
743
+ url: "https://gitcode.com/cann/asc-devkit.git",
744
+ dir: "plugins-official/ops-registry-invoke/asc-devkit"
745
+ }
746
+ ]
614
747
  },
615
748
  {
616
749
  id: "catlass-op-generator",
@@ -622,7 +755,41 @@ var embedded_plugins_default = [
622
755
  ],
623
756
  skills: 10,
624
757
  agents: 3,
625
- description: "Catlass \u6A21\u677F\u62FC\u88C5 GEMM/Matmul/Epilogue \u7B97\u5B50\u5F00\u53D1"
758
+ description: "Catlass \u6A21\u677F\u62FC\u88C5 GEMM/Matmul/Epilogue \u7B97\u5B50\u5F00\u53D1",
759
+ version: "1.2.2",
760
+ configFile: "AGENTS.md",
761
+ installSkills: [
762
+ {
763
+ dir: "ops",
764
+ skills: [
765
+ "catlass-op-design",
766
+ "catlass-op-develop",
767
+ "catlass-op-perf-tune",
768
+ "ascendc-tiling-design",
769
+ "npu-arch",
770
+ "ascendc-api-best-practices",
771
+ "ops-precision-standard",
772
+ "ascendc-docs-search",
773
+ "ascendc-env-check",
774
+ "ascendc-precision-debug",
775
+ "ops-profiling",
776
+ "ascendc-runtime-debug",
777
+ "ascendc-code-review",
778
+ "torch-ascendc-op-extension"
779
+ ]
780
+ }
781
+ ],
782
+ installAgents: [
783
+ "catlass-op-architect",
784
+ "catlass-op-generator",
785
+ "catlass-op-reviewer"
786
+ ],
787
+ externalRepos: [
788
+ {
789
+ url: "https://gitcode.com/cann/asc-devkit.git",
790
+ dir: "plugins-official/catlass-op-generator/asc-devkit"
791
+ }
792
+ ]
626
793
  },
627
794
  {
628
795
  id: "model-infer-optimize",
@@ -636,7 +803,40 @@ var embedded_plugins_default = [
636
803
  ],
637
804
  skills: 11,
638
805
  agents: 3,
639
- description: "NPU \u6A21\u578B\u63A8\u7406\u7AEF\u5230\u7AEF\u4F18\u5316\uFF08\u5E76\u884C/KVCache/\u878D\u5408/\u91CF\u5316/\u56FE\u6A21\u5F0F/\u591A\u6D41/SuperKernel\uFF09"
806
+ description: "NPU \u6A21\u578B\u63A8\u7406\u7AEF\u5230\u7AEF\u4F18\u5316\uFF08\u5E76\u884C/KVCache/\u878D\u5408/\u91CF\u5316/\u56FE\u6A21\u5F0F/\u591A\u6D41/SuperKernel\uFF09",
807
+ version: "1.2.2",
808
+ configFile: "AGENTS.md",
809
+ installSkills: [
810
+ {
811
+ dir: "model",
812
+ skills: [
813
+ "model-infer-migrator",
814
+ "model-infer-parallel-analysis",
815
+ "model-infer-parallel-impl",
816
+ "model-infer-kvcache",
817
+ "model-infer-fusion",
818
+ "model-infer-quantization",
819
+ "model-infer-graph-mode",
820
+ "model-infer-precision-debug",
821
+ "model-infer-runtime-debug",
822
+ "model-infer-multi-stream",
823
+ "model-infer-prefetch",
824
+ "model-infer-superkernel"
825
+ ]
826
+ }
827
+ ],
828
+ installAgents: [
829
+ "model-infer-analyzer",
830
+ "model-infer-implementer",
831
+ "model-infer-reviewer"
832
+ ],
833
+ externalRepos: [
834
+ {
835
+ url: "https://gitcode.com/cann/cann-recipes-infer.git",
836
+ dir: "plugins-official/model-infer-optimize/cann-recipes-infer",
837
+ depth: 1
838
+ }
839
+ ]
640
840
  },
641
841
  {
642
842
  id: "pypto-op-orchestrator",
@@ -649,7 +849,35 @@ var embedded_plugins_default = [
649
849
  ],
650
850
  skills: 8,
651
851
  agents: 3,
652
- description: "PyPTO Python API \u7B97\u5B50\u5168\u6D41\u7A0B\u5F00\u53D1\uFF0C\u8986\u76D6\u9700\u6C42\u7406\u89E3\u3001API \u63A2\u7D22\u3001\u5B9E\u73B0\u4E0E\u8C03\u4F18"
852
+ description: "PyPTO Python API \u7B97\u5B50\u5168\u6D41\u7A0B\u5F00\u53D1\uFF0C\u8986\u76D6\u9700\u6C42\u7406\u89E3\u3001API \u63A2\u7D22\u3001\u5B9E\u73B0\u4E0E\u8C03\u4F18",
853
+ version: "1.2.2",
854
+ configFile: "AGENTS.md",
855
+ installSkills: [
856
+ {
857
+ dir: "ops",
858
+ skills: [
859
+ "pypto-intent-understand",
860
+ "pypto-api-explore",
861
+ "pypto-op-design",
862
+ "pypto-op-develop",
863
+ "pypto-precision-debug",
864
+ "pypto-precision-compare",
865
+ "pypto-op-perf-tune",
866
+ "pypto-golden-generate"
867
+ ]
868
+ }
869
+ ],
870
+ installAgents: [
871
+ "pypto-op-analyst",
872
+ "pypto-op-developer",
873
+ "pypto-op-perf-tuner"
874
+ ],
875
+ externalRepos: [
876
+ {
877
+ url: "https://gitcode.com/cann/pypto.git",
878
+ dir: "plugins-official/pypto-op-orchestrator/pypto"
879
+ }
880
+ ]
653
881
  },
654
882
  {
655
883
  id: "tilelang-op-orchestrator",
@@ -661,7 +889,38 @@ var embedded_plugins_default = [
661
889
  ],
662
890
  skills: 9,
663
891
  agents: 3,
664
- description: "TileLang Python DSL + @tilelang.jit \u7B97\u5B50\u5F00\u53D1\uFF08\u652F\u6301 Developer/Expert \u53CC\u6A21\u5F0F\uFF09"
892
+ description: "TileLang Python DSL + @tilelang.jit \u7B97\u5B50\u5F00\u53D1\uFF08\u652F\u6301 Developer/Expert \u53CC\u6A21\u5F0F\uFF09",
893
+ version: "1.2.2",
894
+ configFile: "AGENTS.md",
895
+ installSkills: [
896
+ {
897
+ dir: "ops",
898
+ skills: [
899
+ "tilelang-api-best-practices",
900
+ "tilelang-env-check",
901
+ "tilelang-op-design",
902
+ "tilelang-op-develop",
903
+ "tilelang-op-test-design",
904
+ "tilelang-perf-optimization",
905
+ "tilelang-programming-model-guide",
906
+ "tilelang-review",
907
+ "tilelang-submodule-pull"
908
+ ]
909
+ }
910
+ ],
911
+ installAgents: [
912
+ "tilelang-op-analyst",
913
+ "tilelang-op-developer",
914
+ "tilelang-op-perf-tuner"
915
+ ],
916
+ externalRepos: [
917
+ {
918
+ url: "https://github.com/tile-ai/tilelang-ascend.git",
919
+ dir: "plugins-official/tilelang-op-orchestrator/tilelang-ascend",
920
+ depth: 1,
921
+ recursive: true
922
+ }
923
+ ]
665
924
  },
666
925
  {
667
926
  id: "triton-op-generator",
@@ -673,7 +932,23 @@ var embedded_plugins_default = [
673
932
  ],
674
933
  skills: 6,
675
934
  agents: 1,
676
- description: "Triton-Ascend \u7B97\u5B50 6 \u9636\u6BB5\u81EA\u52A8\u751F\u6210\u4E0E\u4F18\u5316\uFF08\u63CF\u8FF0\u2192\u4EE3\u7801\u2192\u9A8C\u8BC1\u2192\u4F18\u5316\uFF09"
935
+ description: "Triton-Ascend \u7B97\u5B50 6 \u9636\u6BB5\u81EA\u52A8\u751F\u6210\u4E0E\u4F18\u5316\uFF08\u63CF\u8FF0\u2192\u4EE3\u7801\u2192\u9A8C\u8BC1\u2192\u4F18\u5316\uFF09",
936
+ version: "1.2.2",
937
+ configFile: "AGENTS.md",
938
+ installSkills: [
939
+ {
940
+ dir: "ops",
941
+ skills: [
942
+ "triton-task-extractor",
943
+ "triton-op-designer",
944
+ "triton-op-coding",
945
+ "triton-op-verifier",
946
+ "triton-latency-optimizer",
947
+ "npu-arch"
948
+ ]
949
+ }
950
+ ],
951
+ installAgents: []
677
952
  },
678
953
  {
679
954
  id: "torch-compile",
@@ -687,7 +962,25 @@ var embedded_plugins_default = [
687
962
  ],
688
963
  skills: 6,
689
964
  agents: 1,
690
- description: "NPU \u56FE\u6A21\u5F0F npugraph_ex \u914D\u7F6E\u3001\u811A\u672C\u8FC1\u79FB\u3001\u7F16\u8BD1\u8BCA\u65AD\u4E0E\u81EA\u5B9A\u4E49\u7B97\u5B50\u5165\u56FE"
965
+ description: "NPU \u56FE\u6A21\u5F0F npugraph_ex \u914D\u7F6E\u3001\u811A\u672C\u8FC1\u79FB\u3001\u7F16\u8BD1\u8BCA\u65AD\u4E0E\u81EA\u5B9A\u4E49\u7B97\u5B50\u5165\u56FE",
966
+ version: "1.2.2",
967
+ configFile: "AGENTS.md",
968
+ installSkills: [
969
+ {
970
+ dir: "graph",
971
+ skills: [
972
+ "torch-npugraph-ex-knowledge",
973
+ "torch-npugraph-ex-template",
974
+ "torch-npugraph-ex-dfx-triage",
975
+ "torch-npugraph-ex-compile-error-diagnosis",
976
+ "torch-npugraph-ex-runtime-error-diagnosis",
977
+ "torch-custom-ops-guide"
978
+ ]
979
+ }
980
+ ],
981
+ installAgents: [
982
+ "torch-npugraph-ex"
983
+ ]
691
984
  },
692
985
  {
693
986
  id: "ops-code-reviewer",
@@ -701,7 +994,25 @@ var embedded_plugins_default = [
701
994
  ],
702
995
  skills: 5,
703
996
  agents: 1,
704
- description: "Ascend C \u7B97\u5B50\u4EE3\u7801 4 \u9636\u6BB5\u5168\u91CF\u68C0\u89C6\uFF08\u4E3B Agent \u7F16\u6392 + \u5B50 Agent \u5E76\u884C\u68C0\u89C6\uFF09"
997
+ description: "Ascend C \u7B97\u5B50\u4EE3\u7801 4 \u9636\u6BB5\u5168\u91CF\u68C0\u89C6\uFF08\u4E3B Agent \u7F16\u6392 + \u5B50 Agent \u5E76\u884C\u68C0\u89C6\uFF09",
998
+ version: "1.2.2",
999
+ configFile: "AGENTS.md",
1000
+ installSkills: [
1001
+ {
1002
+ dir: "ops",
1003
+ skills: [
1004
+ "ascendc-code-review",
1005
+ "ascendc-docs-search",
1006
+ "ascendc-task-focus",
1007
+ "ascendc-api-best-practices",
1008
+ "npu-arch"
1009
+ ]
1010
+ }
1011
+ ],
1012
+ installAgents: [
1013
+ "ascendc-code-summarizer",
1014
+ "ascendc-ops-reviewer"
1015
+ ]
705
1016
  }
706
1017
  ];
707
1018
 
@@ -742,7 +1053,12 @@ function loadPluginsFromYaml() {
742
1053
  aliases: content.aliases || [],
743
1054
  skills: content.skills ?? defaults.skills ?? 0,
744
1055
  agents: content.agents ?? defaults.agents ?? 0,
745
- description: content.description || ""
1056
+ description: content.description || "",
1057
+ version: content.version,
1058
+ configFile: content.configFile,
1059
+ installSkills: content.installSkills,
1060
+ installAgents: content.installAgents,
1061
+ externalRepos: content.externalRepos
746
1062
  });
747
1063
  } catch {
748
1064
  logger.warn(t("plugin_yaml_error").replace("{file}", file));
@@ -2367,20 +2683,9 @@ async function showRestorePrompt(backups) {
2367
2683
  }
2368
2684
 
2369
2685
  // src/core/plugin-installer.ts
2370
- import { existsSync as existsSync12, mkdirSync as mkdirSync5, symlinkSync, unlinkSync as unlinkSync4, realpathSync, copyFileSync as copyFileSync2, cpSync, writeFileSync as writeFileSync3, readFileSync as readFileSync8 } from "fs";
2371
- import { join as join11 } from "path";
2686
+ import { existsSync as existsSync12, mkdirSync as mkdirSync5, symlinkSync, unlinkSync as unlinkSync4, realpathSync, copyFileSync as copyFileSync2, cpSync, writeFileSync as writeFileSync3 } from "fs";
2687
+ import { join as join11, basename } from "path";
2372
2688
  import { execa as execa3 } from "execa";
2373
- function readPluginManifest(pluginDir) {
2374
- const manifestPath = join11(pluginDir, "plugin-manifest.json");
2375
- if (!existsSync12(manifestPath)) return null;
2376
- try {
2377
- const content = JSON.parse(readFileSync8(manifestPath, "utf-8"));
2378
- if (!content || !content.id) return null;
2379
- return content;
2380
- } catch {
2381
- return null;
2382
- }
2383
- }
2384
2689
  function installLink(source, target) {
2385
2690
  try {
2386
2691
  const resolved = realpathSync(source);
@@ -2438,27 +2743,80 @@ function installConfigFile(pluginDir, configFile, tool, level, configRoot, insta
2438
2743
  }
2439
2744
  }
2440
2745
  }
2441
- async function installExternalRepos(repos, repoPath) {
2746
+ async function installExternalRepos(repos, repoPath, configRoot, installPath, level) {
2442
2747
  if (!repos || repos.length === 0) return;
2443
2748
  for (const repo of repos) {
2444
2749
  const targetDir = join11(repoPath, repo.dir);
2445
- if (existsSync12(targetDir)) {
2446
- logger.info(` ${repo.dir} already exists, skipping clone`);
2447
- continue;
2750
+ if (!existsSync12(targetDir)) {
2751
+ const args = ["clone"];
2752
+ if (repo.depth) {
2753
+ args.push("--depth", String(repo.depth));
2754
+ }
2755
+ if (repo.recursive) {
2756
+ args.push("--recursive");
2757
+ }
2758
+ args.push(repo.url, targetDir);
2759
+ try {
2760
+ await execa3("git", args, { timeout: 12e4 });
2761
+ } catch {
2762
+ logger.warn(` git clone failed: ${repo.url}, clone manually: git clone ${repo.url} ${repo.dir}`);
2763
+ continue;
2764
+ }
2765
+ }
2766
+ const linkName = basename(repo.dir);
2767
+ const resolved = realpathSync(targetDir);
2768
+ const configRootLink = join11(configRoot, linkName);
2769
+ try {
2770
+ if (existsSync12(configRootLink) || isSymlink(configRootLink)) {
2771
+ unlinkSync4(configRootLink);
2772
+ }
2773
+ try {
2774
+ symlinkSync(resolved, configRootLink);
2775
+ } catch (e) {
2776
+ if (e.code === "EPERM") {
2777
+ cpSync(resolved, configRootLink, { recursive: true });
2778
+ }
2779
+ }
2780
+ } catch {
2781
+ logger.warn(` Failed to link ${linkName} to config directory`);
2448
2782
  }
2449
- const args = ["clone"];
2450
- if (repo.depth) {
2451
- args.push("--depth", String(repo.depth));
2783
+ if (level === "project") {
2784
+ const projectLink = join11(installPath, linkName);
2785
+ try {
2786
+ if (existsSync12(projectLink) || isSymlink(projectLink)) {
2787
+ unlinkSync4(projectLink);
2788
+ }
2789
+ try {
2790
+ symlinkSync(resolved, projectLink);
2791
+ } catch (e) {
2792
+ if (e.code === "EPERM") {
2793
+ cpSync(resolved, projectLink, { recursive: true });
2794
+ }
2795
+ }
2796
+ } catch {
2797
+ logger.warn(` Failed to link ${linkName} to project directory`);
2798
+ }
2452
2799
  }
2453
- if (repo.recursive) {
2454
- args.push("--recursive");
2800
+ }
2801
+ }
2802
+ function installWorkflows(pluginDir, configRoot) {
2803
+ const workflowsDir = join11(pluginDir, "workflows");
2804
+ if (!existsSync12(workflowsDir)) return;
2805
+ const targetPath = join11(configRoot, "workflows");
2806
+ try {
2807
+ const resolved = realpathSync(workflowsDir);
2808
+ if (existsSync12(targetPath) || isSymlink(targetPath)) {
2809
+ unlinkSync4(targetPath);
2455
2810
  }
2456
- args.push(repo.url, targetDir);
2457
2811
  try {
2458
- await execa3("git", args, { timeout: 12e4 });
2459
- } catch {
2460
- logger.warn(` git clone failed: ${repo.url}, clone manually: git clone ${repo.url} ${repo.dir}`);
2812
+ symlinkSync(resolved, targetPath);
2813
+ } catch (e) {
2814
+ if (e.code === "EPERM") {
2815
+ cpSync(resolved, targetPath, { recursive: true });
2816
+ }
2461
2817
  }
2818
+ } catch {
2819
+ logger.warn(` Failed to link workflows to config directory`);
2462
2820
  }
2463
2821
  }
2464
2822
  function writeCannbotManifest(configRoot, pluginId, version, level, tool, skills, agents) {
@@ -2477,9 +2835,10 @@ function writeCannbotManifest(configRoot, pluginId, version, level, tool, skills
2477
2835
  writeFileSync3(manifestPath, JSON.stringify(manifest, null, 2), "utf-8");
2478
2836
  return manifest;
2479
2837
  }
2480
- async function installViaManifest(manifest, pluginDir, repoPath, tool, level, installPath) {
2838
+ async function installViaManifest(plugin, repoPath, tool, level, installPath) {
2481
2839
  const cwd = installPath || process.cwd();
2482
2840
  const configRoot = getConfigRoot(tool, level, installPath);
2841
+ const pluginDir = join11(repoPath, plugin.dir);
2483
2842
  try {
2484
2843
  const skillsDir = join11(configRoot, "skills");
2485
2844
  const agentsDir = join11(configRoot, "agents");
@@ -2487,7 +2846,7 @@ async function installViaManifest(manifest, pluginDir, repoPath, tool, level, in
2487
2846
  mkdirSync5(agentsDir, { recursive: true });
2488
2847
  const installedSkills = [];
2489
2848
  const installedAgents = [];
2490
- for (const source of manifest.skills) {
2849
+ for (const source of plugin.installSkills || []) {
2491
2850
  const sourceDir = join11(repoPath, source.dir);
2492
2851
  if (!existsSync12(sourceDir)) {
2493
2852
  logger.warn(` Skill source not found: ${source.dir}`);
@@ -2510,7 +2869,7 @@ async function installViaManifest(manifest, pluginDir, repoPath, tool, level, in
2510
2869
  }
2511
2870
  }
2512
2871
  }
2513
- for (const agentName of manifest.agents) {
2872
+ for (const agentName of plugin.installAgents || []) {
2514
2873
  const agentFile = agentName.endsWith(".md") ? agentName : `${agentName}.md`;
2515
2874
  const agentPath = join11(pluginDir, "agents", agentFile);
2516
2875
  if (!existsSync12(agentPath)) {
@@ -2525,12 +2884,13 @@ async function installViaManifest(manifest, pluginDir, repoPath, tool, level, in
2525
2884
  logger.warn(` Failed to install agent: ${agentFile}`);
2526
2885
  }
2527
2886
  }
2528
- installConfigFile(pluginDir, manifest.configFile, tool, level, configRoot, cwd);
2529
- await installExternalRepos(manifest.externalRepos, repoPath);
2887
+ installConfigFile(pluginDir, plugin.configFile || "AGENTS.md", tool, level, configRoot, cwd);
2888
+ installWorkflows(pluginDir, configRoot);
2889
+ await installExternalRepos(plugin.externalRepos, repoPath, configRoot, cwd, level);
2530
2890
  const cannbotManifest = writeCannbotManifest(
2531
2891
  configRoot,
2532
- manifest.id,
2533
- manifest.version || "1.0.0",
2892
+ plugin.id,
2893
+ plugin.version || "1.0.0",
2534
2894
  level,
2535
2895
  tool,
2536
2896
  installedSkills,
@@ -2613,11 +2973,9 @@ async function installPlugin(opts) {
2613
2973
  logger.success(`${t("backup_created")}: ${backupInfo.filePath}`);
2614
2974
  }
2615
2975
  }
2616
- const pluginManifest = readPluginManifest(pluginDir);
2617
- if (pluginManifest) {
2976
+ if (plugin.installSkills && plugin.installSkills.length > 0) {
2618
2977
  const result = await installViaManifest(
2619
- pluginManifest,
2620
- pluginDir,
2978
+ plugin,
2621
2979
  opts.repoPath,
2622
2980
  opts.tool,
2623
2981
  opts.level,
@@ -2744,7 +3102,7 @@ async function installPlugin(opts) {
2744
3102
 
2745
3103
  // src/core/skill-installer.ts
2746
3104
  import { existsSync as existsSync14, mkdirSync as mkdirSync6, symlinkSync as symlinkSync2, unlinkSync as unlinkSync5, readdirSync as readdirSync4, rmdirSync, realpathSync as realpathSync2 } from "fs";
2747
- import { join as join13, dirname as dirname7 } from "path";
3105
+ import { join as join13, dirname as dirname6 } from "path";
2748
3106
  import { select as select3, checkbox as checkbox2, Separator as Separator2 } from "@inquirer/prompts";
2749
3107
  import chalk5 from "chalk";
2750
3108
  import Table from "cli-table3";
@@ -3000,7 +3358,7 @@ function resolveSkillSourcePath(skill, repoPath) {
3000
3358
  if (skill.filePath) {
3001
3359
  const absPath = skill.filePath.startsWith("/") ? skill.filePath : join13(repoPath, skill.filePath);
3002
3360
  if (existsSync14(absPath)) {
3003
- return dirname7(absPath);
3361
+ return dirname6(absPath);
3004
3362
  }
3005
3363
  }
3006
3364
  return join13(repoPath, skill.source, skill.id);
@@ -3095,13 +3453,13 @@ function printEnhancedSummary(results, tool, configRoot) {
3095
3453
  }
3096
3454
 
3097
3455
  // src/commands/init.ts
3098
- import { existsSync as existsSync15, readFileSync as readFileSync9 } from "fs";
3456
+ import { existsSync as existsSync15, readFileSync as readFileSync8 } from "fs";
3099
3457
  import { join as join14 } from "path";
3100
3458
  async function initCommand() {
3101
3459
  const cwd = process.cwd();
3102
3460
  if (existsSync15(join14(cwd, "package.json")) && (() => {
3103
3461
  try {
3104
- const pkg = JSON.parse(readFileSync9(join14(cwd, "package.json"), "utf-8"));
3462
+ const pkg = JSON.parse(readFileSync8(join14(cwd, "package.json"), "utf-8"));
3105
3463
  return pkg.name === "@cannbot-ai/install-helper";
3106
3464
  } catch {
3107
3465
  return false;
@@ -4090,9 +4448,9 @@ async function langCommand(action, value) {
4090
4448
  }
4091
4449
 
4092
4450
  // src/cli.ts
4093
- import { readFileSync as readFileSync10, existsSync as existsSync19 } from "fs";
4451
+ import { readFileSync as readFileSync9, existsSync as existsSync19 } from "fs";
4094
4452
  import { fileURLToPath as fileURLToPath5 } from "url";
4095
- import { dirname as dirname8, join as join17 } from "path";
4453
+ import { dirname as dirname7, join as join17 } from "path";
4096
4454
  function readVersion() {
4097
4455
  try {
4098
4456
  if (typeof INSTALL_HELPER_VERSION !== "undefined" && INSTALL_HELPER_VERSION) {
@@ -4102,7 +4460,7 @@ function readVersion() {
4102
4460
  }
4103
4461
  try {
4104
4462
  const __filename5 = fileURLToPath5(import.meta.url);
4105
- const __dirname5 = dirname8(__filename5);
4463
+ const __dirname5 = dirname7(__filename5);
4106
4464
  const candidates = [
4107
4465
  join17(__dirname5, "..", "package.json"),
4108
4466
  join17(__dirname5, "package.json"),
@@ -4110,7 +4468,7 @@ function readVersion() {
4110
4468
  ];
4111
4469
  for (const pkgPath of candidates) {
4112
4470
  if (existsSync19(pkgPath)) {
4113
- const pkg = JSON.parse(readFileSync10(pkgPath, "utf-8"));
4471
+ const pkg = JSON.parse(readFileSync9(pkgPath, "utf-8"));
4114
4472
  if (pkg.version && (pkg.name === "@cannbot-ai/install-helper" || pkg.name?.startsWith("@cannbot-ai/install-helper-"))) {
4115
4473
  return pkg.version;
4116
4474
  }