@cannbot-ai/install-helper 0.0.2-beta.69 → 0.0.2-beta.70
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 +45 -36
- package/dist/index.js.map +1 -1
- package/dist/install.ps1 +8 -8
- package/dist/plugins.d/catlass-op-generator.yml +1 -1
- package/dist/plugins.d/model-infer-optimize.yml +1 -1
- package/dist/plugins.d/ops-code-reviewer.yml +1 -1
- package/dist/plugins.d/ops-direct-invoke-flash.yml +1 -1
- package/dist/plugins.d/ops-direct-invoke.yml +2 -2
- package/dist/plugins.d/ops-registry-invoke.yml +2 -2
- package/dist/plugins.d/triton-op-generator.yml +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -595,8 +595,8 @@ var embedded_plugins_default = [
|
|
|
595
595
|
"direct",
|
|
596
596
|
"kernel"
|
|
597
597
|
],
|
|
598
|
-
skills:
|
|
599
|
-
agents:
|
|
598
|
+
skills: 16,
|
|
599
|
+
agents: 3,
|
|
600
600
|
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",
|
|
601
601
|
version: "1.2.2",
|
|
602
602
|
configFile: "AGENTS.md",
|
|
@@ -655,7 +655,7 @@ var embedded_plugins_default = [
|
|
|
655
655
|
"flash",
|
|
656
656
|
"kernel-flash"
|
|
657
657
|
],
|
|
658
|
-
skills:
|
|
658
|
+
skills: 1,
|
|
659
659
|
agents: 1,
|
|
660
660
|
description: "\u4ECE\u6570\u5B66\u516C\u5F0F\u6216\u4EE3\u7801\u7247\u6BB5\u5FEB\u901F\u6784\u5EFA\u5E76\u9A8C\u8BC1 Ascend NPU \u6838\u51FD\u6570",
|
|
661
661
|
version: "1.2.2",
|
|
@@ -699,8 +699,8 @@ var embedded_plugins_default = [
|
|
|
699
699
|
"ascendc-registry",
|
|
700
700
|
"registry"
|
|
701
701
|
],
|
|
702
|
-
skills:
|
|
703
|
-
agents:
|
|
702
|
+
skills: 12,
|
|
703
|
+
agents: 4,
|
|
704
704
|
description: "\u751F\u4EA7\u7EA7 ACLNN \u6CE8\u518C\u7B97\u5B50\u5168\u6D41\u7A0B\uFF1A\u4EE3\u7801\u2192UT/ST\u2192\u4E0A\u5E93",
|
|
705
705
|
version: "1.2.2",
|
|
706
706
|
configFile: "AGENTS.md",
|
|
@@ -772,7 +772,7 @@ var embedded_plugins_default = [
|
|
|
772
772
|
aliases: [
|
|
773
773
|
"catlass"
|
|
774
774
|
],
|
|
775
|
-
skills:
|
|
775
|
+
skills: 10,
|
|
776
776
|
agents: 3,
|
|
777
777
|
description: "Catlass \u6A21\u677F\u62FC\u88C5 GEMM/Matmul/Epilogue \u7B97\u5B50\u5F00\u53D1",
|
|
778
778
|
version: "1.2.2",
|
|
@@ -822,7 +822,7 @@ var embedded_plugins_default = [
|
|
|
822
822
|
"infer",
|
|
823
823
|
"inference"
|
|
824
824
|
],
|
|
825
|
-
skills:
|
|
825
|
+
skills: 11,
|
|
826
826
|
agents: 3,
|
|
827
827
|
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",
|
|
828
828
|
version: "1.2.2",
|
|
@@ -958,7 +958,7 @@ var embedded_plugins_default = [
|
|
|
958
958
|
"triton"
|
|
959
959
|
],
|
|
960
960
|
skills: 6,
|
|
961
|
-
agents:
|
|
961
|
+
agents: 1,
|
|
962
962
|
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",
|
|
963
963
|
version: "1.2.2",
|
|
964
964
|
configFile: "AGENTS.md",
|
|
@@ -1022,7 +1022,7 @@ var embedded_plugins_default = [
|
|
|
1022
1022
|
"review"
|
|
1023
1023
|
],
|
|
1024
1024
|
skills: 5,
|
|
1025
|
-
agents:
|
|
1025
|
+
agents: 1,
|
|
1026
1026
|
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",
|
|
1027
1027
|
version: "1.2.2",
|
|
1028
1028
|
configFile: "AGENTS.md",
|
|
@@ -1150,14 +1150,14 @@ function mergeDynamicPlugins(repoPath) {
|
|
|
1150
1150
|
function findPlugin(query) {
|
|
1151
1151
|
const normalized = query.toLowerCase().trim();
|
|
1152
1152
|
const exactMatch = PLUGIN_REGISTRY.find(
|
|
1153
|
-
(p) => p.id
|
|
1153
|
+
(p) => p.id === normalized || p.id === query.trim()
|
|
1154
1154
|
);
|
|
1155
1155
|
if (exactMatch) return exactMatch;
|
|
1156
1156
|
const aliasMatch = PLUGIN_REGISTRY.find(
|
|
1157
|
-
(p) => p.aliases.some((a) => a
|
|
1157
|
+
(p) => p.aliases.some((a) => a === normalized)
|
|
1158
1158
|
);
|
|
1159
1159
|
if (aliasMatch) return aliasMatch;
|
|
1160
|
-
const prefixMatch = PLUGIN_REGISTRY.find((p) => p.id.
|
|
1160
|
+
const prefixMatch = PLUGIN_REGISTRY.find((p) => p.id.startsWith(normalized));
|
|
1161
1161
|
if (prefixMatch) return prefixMatch;
|
|
1162
1162
|
return void 0;
|
|
1163
1163
|
}
|
|
@@ -1401,6 +1401,7 @@ function readManifest(configRoot) {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
function readAllManifests(configRoot) {
|
|
1403
1403
|
const manifests = [];
|
|
1404
|
+
const plugins = getAllPlugins();
|
|
1404
1405
|
const standardPath = getManifestPath(configRoot);
|
|
1405
1406
|
if (existsSync5(standardPath)) {
|
|
1406
1407
|
try {
|
|
@@ -1409,6 +1410,16 @@ function readAllManifests(configRoot) {
|
|
|
1409
1410
|
} catch {
|
|
1410
1411
|
}
|
|
1411
1412
|
}
|
|
1413
|
+
for (const plugin of plugins) {
|
|
1414
|
+
const pluginManifestPath = join5(configRoot, `${plugin.id}-manifest.json`);
|
|
1415
|
+
if (existsSync5(pluginManifestPath)) {
|
|
1416
|
+
try {
|
|
1417
|
+
const content = readFileSync3(pluginManifestPath, "utf-8");
|
|
1418
|
+
manifests.push(JSON.parse(content));
|
|
1419
|
+
} catch {
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1412
1423
|
return manifests;
|
|
1413
1424
|
}
|
|
1414
1425
|
function scanInstalled() {
|
|
@@ -1462,9 +1473,13 @@ function verifyPluginFilesExist(configRoot, manifest, tool, level) {
|
|
|
1462
1473
|
});
|
|
1463
1474
|
if (!hasAnyAgent) return false;
|
|
1464
1475
|
}
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1476
|
+
let agentsMdPath;
|
|
1477
|
+
if (tool === "opencode" && level === "project") {
|
|
1478
|
+
agentsMdPath = join5(configRoot, "..", "AGENTS.md");
|
|
1479
|
+
} else {
|
|
1480
|
+
agentsMdPath = join5(configRoot, "AGENTS.md");
|
|
1481
|
+
}
|
|
1482
|
+
if (!existsSync5(agentsMdPath)) return false;
|
|
1468
1483
|
return true;
|
|
1469
1484
|
}
|
|
1470
1485
|
|
|
@@ -2219,7 +2234,7 @@ function deduplicate(skills) {
|
|
|
2219
2234
|
function findSkill(query) {
|
|
2220
2235
|
const normalized = query.toLowerCase().trim();
|
|
2221
2236
|
const pool = getActiveSkills();
|
|
2222
|
-
return pool.find((s) => s.id
|
|
2237
|
+
return pool.find((s) => s.id === normalized);
|
|
2223
2238
|
}
|
|
2224
2239
|
function getAllSkills() {
|
|
2225
2240
|
return getActiveSkills();
|
|
@@ -2417,13 +2432,11 @@ function scanInstalledFiles(pluginId, displayName, tool, level, installPath, con
|
|
|
2417
2432
|
directories.push(agentsDir);
|
|
2418
2433
|
for (const agentName of manifest.installed_agents || []) {
|
|
2419
2434
|
const agentPath = join9(agentsDir, agentName);
|
|
2435
|
+
const agentPathMd = join9(agentsDir, agentName + ".md");
|
|
2420
2436
|
if (existsSync10(agentPath) || isSymlink(agentPath)) {
|
|
2421
2437
|
files.push(agentPath);
|
|
2422
|
-
} else if (
|
|
2423
|
-
|
|
2424
|
-
if (existsSync10(agentPathMd) || isSymlink(agentPathMd)) {
|
|
2425
|
-
files.push(agentPathMd);
|
|
2426
|
-
}
|
|
2438
|
+
} else if (existsSync10(agentPathMd) || isSymlink(agentPathMd)) {
|
|
2439
|
+
files.push(agentPathMd);
|
|
2427
2440
|
}
|
|
2428
2441
|
}
|
|
2429
2442
|
}
|
|
@@ -2436,6 +2449,10 @@ function scanInstalledFiles(pluginId, displayName, tool, level, installPath, con
|
|
|
2436
2449
|
if (existsSync10(manifestPath)) {
|
|
2437
2450
|
files.push(manifestPath);
|
|
2438
2451
|
}
|
|
2452
|
+
const pluginManifestPath = join9(configRoot, `${pluginId}-manifest.json`);
|
|
2453
|
+
if (existsSync10(pluginManifestPath)) {
|
|
2454
|
+
files.push(pluginManifestPath);
|
|
2455
|
+
}
|
|
2439
2456
|
const configFileName = tool === "claude" ? "CLAUDE.md" : "AGENTS.md";
|
|
2440
2457
|
const configFilePath = level === "project" ? join9(installPath, configFileName) : join9(configRoot, configFileName);
|
|
2441
2458
|
if (existsSync10(configFilePath)) {
|
|
@@ -3146,8 +3163,8 @@ async function installPlugin(opts) {
|
|
|
3146
3163
|
}
|
|
3147
3164
|
|
|
3148
3165
|
// src/core/skill-installer.ts
|
|
3149
|
-
import { existsSync as existsSync14, mkdirSync as mkdirSync6, symlinkSync as symlinkSync2, unlinkSync as unlinkSync5, readdirSync as readdirSync4,
|
|
3150
|
-
import { join as join13, dirname as dirname6
|
|
3166
|
+
import { existsSync as existsSync14, mkdirSync as mkdirSync6, symlinkSync as symlinkSync2, unlinkSync as unlinkSync5, readdirSync as readdirSync4, rmdirSync, realpathSync as realpathSync2 } from "fs";
|
|
3167
|
+
import { join as join13, dirname as dirname6 } from "path";
|
|
3151
3168
|
import { select as select3, checkbox, Separator as Separator2 } from "@inquirer/prompts";
|
|
3152
3169
|
import chalk5 from "chalk";
|
|
3153
3170
|
import Table from "cli-table3";
|
|
@@ -3177,15 +3194,7 @@ async function installSkills(skillIds, tool, level, repoPath) {
|
|
|
3177
3194
|
if (existsSync14(targetPath) || isSymlink(targetPath)) {
|
|
3178
3195
|
unlinkSync5(targetPath);
|
|
3179
3196
|
}
|
|
3180
|
-
|
|
3181
|
-
symlinkSync2(resolvedSource, targetPath);
|
|
3182
|
-
} catch (e) {
|
|
3183
|
-
if (e instanceof Error && e.message.includes("EPERM")) {
|
|
3184
|
-
copyFileSync3(resolvedSource, targetPath);
|
|
3185
|
-
} else {
|
|
3186
|
-
throw e;
|
|
3187
|
-
}
|
|
3188
|
-
}
|
|
3197
|
+
symlinkSync2(resolvedSource, targetPath);
|
|
3189
3198
|
results.push({ skillId, success: true });
|
|
3190
3199
|
installedIds.push(skillId);
|
|
3191
3200
|
} catch (error) {
|
|
@@ -3230,7 +3239,7 @@ async function uninstallSkills(skillIds, tool, level) {
|
|
|
3230
3239
|
try {
|
|
3231
3240
|
const entries = readdirSync4(skillsDir);
|
|
3232
3241
|
if (entries.length === 0) {
|
|
3233
|
-
|
|
3242
|
+
rmdirSync(skillsDir);
|
|
3234
3243
|
logger.step(` ${t("uninstall_clean_empty_dir")}: skills/`);
|
|
3235
3244
|
}
|
|
3236
3245
|
} catch {
|
|
@@ -3409,7 +3418,7 @@ function listAllSkills() {
|
|
|
3409
3418
|
}
|
|
3410
3419
|
function resolveSkillSourcePath(skill, repoPath) {
|
|
3411
3420
|
if (skill.filePath) {
|
|
3412
|
-
const absPath =
|
|
3421
|
+
const absPath = skill.filePath.startsWith("/") ? skill.filePath : join13(repoPath, skill.filePath);
|
|
3413
3422
|
if (existsSync14(absPath)) {
|
|
3414
3423
|
return dirname6(absPath);
|
|
3415
3424
|
}
|
|
@@ -4223,7 +4232,7 @@ async function installPlugins(pluginIds, tool, level, repoPath, installPath, yes
|
|
|
4223
4232
|
}
|
|
4224
4233
|
|
|
4225
4234
|
// src/commands/uninstall.ts
|
|
4226
|
-
import { existsSync as existsSync17, unlinkSync as unlinkSync7, rmdirSync, readdirSync as readdirSync6 } from "fs";
|
|
4235
|
+
import { existsSync as existsSync17, unlinkSync as unlinkSync7, rmdirSync as rmdirSync2, readdirSync as readdirSync6 } from "fs";
|
|
4227
4236
|
import { resolve, basename as basename3, sep } from "path";
|
|
4228
4237
|
import chalk11 from "chalk";
|
|
4229
4238
|
async function uninstallCommand(names, options) {
|
|
@@ -4283,7 +4292,7 @@ async function uninstallCommand(names, options) {
|
|
|
4283
4292
|
if (existsSync17(dirPath)) {
|
|
4284
4293
|
const entries = readdirSync6(dirPath);
|
|
4285
4294
|
if (entries.length === 0) {
|
|
4286
|
-
|
|
4295
|
+
rmdirSync2(dirPath);
|
|
4287
4296
|
const name = basename3(dirPath);
|
|
4288
4297
|
logger.step(` ${t("uninstall_clean_empty_dir")}: ${name}/`);
|
|
4289
4298
|
removedDirs++;
|