@cannbot-ai/install-helper 0.0.2-beta.48 → 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/README.md +13 -5
- package/dist/index.js +346 -42
- package/dist/index.js.map +1 -1
- package/dist/plugins.d/catlass-op-generator.yml +9 -0
- package/dist/plugins.d/model-infer-optimize.yml +10 -0
- package/dist/plugins.d/ops-code-reviewer.yml +6 -0
- package/dist/plugins.d/ops-direct-invoke-flash.yml +10 -0
- package/dist/plugins.d/ops-direct-invoke.yml +11 -0
- package/dist/plugins.d/ops-registry-invoke.yml +15 -0
- package/dist/plugins.d/pypto-op-orchestrator.yml +9 -0
- package/dist/plugins.d/tilelang-op-orchestrator.yml +11 -0
- package/dist/plugins.d/torch-compile.yml +6 -0
- package/dist/plugins.d/triton-op-generator.yml +6 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -8,14 +8,22 @@
|
|
|
8
8
|
## 快速开始
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
#
|
|
11
|
+
# Linux/macOS 一键安装(零依赖,无需 Node.js)
|
|
12
|
+
curl -fsSL https://raw.gitcode.com/cann/cannbot-skills/raw/master/install.sh | bash
|
|
13
|
+
|
|
14
|
+
# Windows PowerShell 一键安装(零依赖)
|
|
15
|
+
irm https://cdn.jsdelivr.net/npm/@cannbot-ai/install-helper@beta/dist/install.ps1 | iex
|
|
16
|
+
|
|
17
|
+
# 或通过 npm 全局安装(需要 Node.js 18+)
|
|
12
18
|
npm install -g @cannbot-ai/install-helper
|
|
13
19
|
install-helper
|
|
14
20
|
|
|
15
|
-
# 或 npx
|
|
21
|
+
# 或 npx 即用(无需安装,需要 Node.js 18+)
|
|
16
22
|
npx @cannbot-ai/install-helper
|
|
17
23
|
```
|
|
18
24
|
|
|
25
|
+
curl 和 PowerShell 方式从 npm registry 下载预编译二进制(Bun 编译的独立可执行文件),无需 Node.js、无需 npm。安装后 `install-helper` 命令可直接使用。
|
|
26
|
+
|
|
19
27
|
交互式向导会自动检测已安装的 AI 编程工具(OpenCode / Claude Code / Trae / Cursor / GitHub Copilot),通过箭头键选择场景即可完成安装。
|
|
20
28
|
|
|
21
29
|
## 一键安装所有 Skills
|
|
@@ -250,9 +258,9 @@ Skills 按 11 个类别组织(另有「其他」兜底类别,动态发现,
|
|
|
250
258
|
|
|
251
259
|
## 前置条件
|
|
252
260
|
|
|
253
|
-
- Node.js >= 18
|
|
254
261
|
- 已安装至少一个 AI 编程工具(OpenCode / Claude Code / Trae / Cursor / GitHub Copilot)
|
|
255
262
|
- Git(用于克隆 Skills 仓库)
|
|
263
|
+
- curl/PowerShell 方式无需 Node.js;npm/npx 方式需要 Node.js >= 18
|
|
256
264
|
|
|
257
265
|
## 工作原理
|
|
258
266
|
|
|
@@ -263,10 +271,10 @@ install-helper 是一个编排工具:
|
|
|
263
271
|
3. **缓存扫描结果**到 `~/.cannbot/scan-cache.json`(24 小时有效)
|
|
264
272
|
4. **克隆或更新** cannbot-skills 仓库(缓存到 `~/.cannbot/repo/`)
|
|
265
273
|
5. **备份现有配置**(如果检测到已安装的 AGENTS.md)
|
|
266
|
-
6.
|
|
274
|
+
6. **声明式安装**:优先读取插件的 `plugin-manifest.json`,通过 Node.js 原生引擎执行安装(创建 symlink、克隆外部仓库、写 manifest),无需 bash/sh;无 manifest 时 fallback 到 `init.sh` 脚本
|
|
267
275
|
7. **追踪**安装状态(`~/.cannbot/config.yaml` + manifest)
|
|
268
276
|
|
|
269
|
-
|
|
277
|
+
安装逻辑优先由 manifest 引擎(Node.js 原生,跨平台)负责,install-helper 提供统一的交互式入口和状态管理。
|
|
270
278
|
|
|
271
279
|
## 配置文件
|
|
272
280
|
|
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
|
|
2686
|
+
import { existsSync as existsSync12, mkdirSync as mkdirSync5, symlinkSync, unlinkSync as unlinkSync4, realpathSync, copyFileSync as copyFileSync2, cpSync, writeFileSync as writeFileSync3 } from "fs";
|
|
2371
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);
|
|
@@ -2530,9 +2835,10 @@ function writeCannbotManifest(configRoot, pluginId, version, level, tool, skills
|
|
|
2530
2835
|
writeFileSync3(manifestPath, JSON.stringify(manifest, null, 2), "utf-8");
|
|
2531
2836
|
return manifest;
|
|
2532
2837
|
}
|
|
2533
|
-
async function installViaManifest(
|
|
2838
|
+
async function installViaManifest(plugin, repoPath, tool, level, installPath) {
|
|
2534
2839
|
const cwd = installPath || process.cwd();
|
|
2535
2840
|
const configRoot = getConfigRoot(tool, level, installPath);
|
|
2841
|
+
const pluginDir = join11(repoPath, plugin.dir);
|
|
2536
2842
|
try {
|
|
2537
2843
|
const skillsDir = join11(configRoot, "skills");
|
|
2538
2844
|
const agentsDir = join11(configRoot, "agents");
|
|
@@ -2540,7 +2846,7 @@ async function installViaManifest(manifest, pluginDir, repoPath, tool, level, in
|
|
|
2540
2846
|
mkdirSync5(agentsDir, { recursive: true });
|
|
2541
2847
|
const installedSkills = [];
|
|
2542
2848
|
const installedAgents = [];
|
|
2543
|
-
for (const source of
|
|
2849
|
+
for (const source of plugin.installSkills || []) {
|
|
2544
2850
|
const sourceDir = join11(repoPath, source.dir);
|
|
2545
2851
|
if (!existsSync12(sourceDir)) {
|
|
2546
2852
|
logger.warn(` Skill source not found: ${source.dir}`);
|
|
@@ -2563,7 +2869,7 @@ async function installViaManifest(manifest, pluginDir, repoPath, tool, level, in
|
|
|
2563
2869
|
}
|
|
2564
2870
|
}
|
|
2565
2871
|
}
|
|
2566
|
-
for (const agentName of
|
|
2872
|
+
for (const agentName of plugin.installAgents || []) {
|
|
2567
2873
|
const agentFile = agentName.endsWith(".md") ? agentName : `${agentName}.md`;
|
|
2568
2874
|
const agentPath = join11(pluginDir, "agents", agentFile);
|
|
2569
2875
|
if (!existsSync12(agentPath)) {
|
|
@@ -2578,13 +2884,13 @@ async function installViaManifest(manifest, pluginDir, repoPath, tool, level, in
|
|
|
2578
2884
|
logger.warn(` Failed to install agent: ${agentFile}`);
|
|
2579
2885
|
}
|
|
2580
2886
|
}
|
|
2581
|
-
installConfigFile(pluginDir,
|
|
2887
|
+
installConfigFile(pluginDir, plugin.configFile || "AGENTS.md", tool, level, configRoot, cwd);
|
|
2582
2888
|
installWorkflows(pluginDir, configRoot);
|
|
2583
|
-
await installExternalRepos(
|
|
2889
|
+
await installExternalRepos(plugin.externalRepos, repoPath, configRoot, cwd, level);
|
|
2584
2890
|
const cannbotManifest = writeCannbotManifest(
|
|
2585
2891
|
configRoot,
|
|
2586
|
-
|
|
2587
|
-
|
|
2892
|
+
plugin.id,
|
|
2893
|
+
plugin.version || "1.0.0",
|
|
2588
2894
|
level,
|
|
2589
2895
|
tool,
|
|
2590
2896
|
installedSkills,
|
|
@@ -2667,11 +2973,9 @@ async function installPlugin(opts) {
|
|
|
2667
2973
|
logger.success(`${t("backup_created")}: ${backupInfo.filePath}`);
|
|
2668
2974
|
}
|
|
2669
2975
|
}
|
|
2670
|
-
|
|
2671
|
-
if (pluginManifest) {
|
|
2976
|
+
if (plugin.installSkills && plugin.installSkills.length > 0) {
|
|
2672
2977
|
const result = await installViaManifest(
|
|
2673
|
-
|
|
2674
|
-
pluginDir,
|
|
2978
|
+
plugin,
|
|
2675
2979
|
opts.repoPath,
|
|
2676
2980
|
opts.tool,
|
|
2677
2981
|
opts.level,
|
|
@@ -2798,7 +3102,7 @@ async function installPlugin(opts) {
|
|
|
2798
3102
|
|
|
2799
3103
|
// src/core/skill-installer.ts
|
|
2800
3104
|
import { existsSync as existsSync14, mkdirSync as mkdirSync6, symlinkSync as symlinkSync2, unlinkSync as unlinkSync5, readdirSync as readdirSync4, rmdirSync, realpathSync as realpathSync2 } from "fs";
|
|
2801
|
-
import { join as join13, dirname as
|
|
3105
|
+
import { join as join13, dirname as dirname6 } from "path";
|
|
2802
3106
|
import { select as select3, checkbox as checkbox2, Separator as Separator2 } from "@inquirer/prompts";
|
|
2803
3107
|
import chalk5 from "chalk";
|
|
2804
3108
|
import Table from "cli-table3";
|
|
@@ -3054,7 +3358,7 @@ function resolveSkillSourcePath(skill, repoPath) {
|
|
|
3054
3358
|
if (skill.filePath) {
|
|
3055
3359
|
const absPath = skill.filePath.startsWith("/") ? skill.filePath : join13(repoPath, skill.filePath);
|
|
3056
3360
|
if (existsSync14(absPath)) {
|
|
3057
|
-
return
|
|
3361
|
+
return dirname6(absPath);
|
|
3058
3362
|
}
|
|
3059
3363
|
}
|
|
3060
3364
|
return join13(repoPath, skill.source, skill.id);
|
|
@@ -3149,13 +3453,13 @@ function printEnhancedSummary(results, tool, configRoot) {
|
|
|
3149
3453
|
}
|
|
3150
3454
|
|
|
3151
3455
|
// src/commands/init.ts
|
|
3152
|
-
import { existsSync as existsSync15, readFileSync as
|
|
3456
|
+
import { existsSync as existsSync15, readFileSync as readFileSync8 } from "fs";
|
|
3153
3457
|
import { join as join14 } from "path";
|
|
3154
3458
|
async function initCommand() {
|
|
3155
3459
|
const cwd = process.cwd();
|
|
3156
3460
|
if (existsSync15(join14(cwd, "package.json")) && (() => {
|
|
3157
3461
|
try {
|
|
3158
|
-
const pkg = JSON.parse(
|
|
3462
|
+
const pkg = JSON.parse(readFileSync8(join14(cwd, "package.json"), "utf-8"));
|
|
3159
3463
|
return pkg.name === "@cannbot-ai/install-helper";
|
|
3160
3464
|
} catch {
|
|
3161
3465
|
return false;
|
|
@@ -4144,9 +4448,9 @@ async function langCommand(action, value) {
|
|
|
4144
4448
|
}
|
|
4145
4449
|
|
|
4146
4450
|
// src/cli.ts
|
|
4147
|
-
import { readFileSync as
|
|
4451
|
+
import { readFileSync as readFileSync9, existsSync as existsSync19 } from "fs";
|
|
4148
4452
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
4149
|
-
import { dirname as
|
|
4453
|
+
import { dirname as dirname7, join as join17 } from "path";
|
|
4150
4454
|
function readVersion() {
|
|
4151
4455
|
try {
|
|
4152
4456
|
if (typeof INSTALL_HELPER_VERSION !== "undefined" && INSTALL_HELPER_VERSION) {
|
|
@@ -4156,7 +4460,7 @@ function readVersion() {
|
|
|
4156
4460
|
}
|
|
4157
4461
|
try {
|
|
4158
4462
|
const __filename5 = fileURLToPath5(import.meta.url);
|
|
4159
|
-
const __dirname5 =
|
|
4463
|
+
const __dirname5 = dirname7(__filename5);
|
|
4160
4464
|
const candidates = [
|
|
4161
4465
|
join17(__dirname5, "..", "package.json"),
|
|
4162
4466
|
join17(__dirname5, "package.json"),
|
|
@@ -4164,7 +4468,7 @@ function readVersion() {
|
|
|
4164
4468
|
];
|
|
4165
4469
|
for (const pkgPath of candidates) {
|
|
4166
4470
|
if (existsSync19(pkgPath)) {
|
|
4167
|
-
const pkg = JSON.parse(
|
|
4471
|
+
const pkg = JSON.parse(readFileSync9(pkgPath, "utf-8"));
|
|
4168
4472
|
if (pkg.version && (pkg.name === "@cannbot-ai/install-helper" || pkg.name?.startsWith("@cannbot-ai/install-helper-"))) {
|
|
4169
4473
|
return pkg.version;
|
|
4170
4474
|
}
|