@cannbot-ai/install-helper 1.1.11 → 1.1.13-beta.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.
- package/bin/install-helper.js +59 -0
- package/bin/package.json +3 -0
- package/dist/index.js +3 -9
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// ----------------------------------------------------------------------------------------------------------
|
|
3
|
+
// Copyright (c) 2026 Huawei Technologies Co., Ltd.
|
|
4
|
+
// This program is free software, you can redistribute it and/or modify it under the terms and conditions of
|
|
5
|
+
// CANN Open Software License Agreement Version 2.0 (the "License").
|
|
6
|
+
// Please refer to the License for details. You may not use this file except in compliance with the License.
|
|
7
|
+
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
|
|
8
|
+
// INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
9
|
+
// See LICENSE in the root of the software repository for the full text of the License.
|
|
10
|
+
// ----------------------------------------------------------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const { spawn } = require("child_process");
|
|
14
|
+
const { existsSync } = require("fs");
|
|
15
|
+
const { join, dirname } = require("path");
|
|
16
|
+
|
|
17
|
+
const PLATFORM_MAP = {
|
|
18
|
+
"linux-x64": "@cannbot-ai/install-helper-linux-x64",
|
|
19
|
+
"linux-arm64": "@cannbot-ai/install-helper-linux-arm64",
|
|
20
|
+
"darwin-x64": "@cannbot-ai/install-helper-darwin-x64",
|
|
21
|
+
"darwin-arm64": "@cannbot-ai/install-helper-darwin-arm64",
|
|
22
|
+
"win32-x64": "@cannbot-ai/install-helper-windows-x64",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const key = `${process.platform}-${process.arch}`;
|
|
26
|
+
const pkgName = PLATFORM_MAP[key];
|
|
27
|
+
const binaryName = process.platform === "win32" ? "install-helper.exe" : "install-helper";
|
|
28
|
+
const args = process.argv.slice(2);
|
|
29
|
+
|
|
30
|
+
if (pkgName) {
|
|
31
|
+
try {
|
|
32
|
+
const pkgPath = require.resolve(`${pkgName}/package.json`);
|
|
33
|
+
const binaryPath = join(dirname(pkgPath), binaryName);
|
|
34
|
+
if (existsSync(binaryPath)) {
|
|
35
|
+
const child = spawn(binaryPath, args, { stdio: "inherit" });
|
|
36
|
+
child.on("exit", (code, signal) => { process.exit(code ?? (signal ? 1 : 0)); });
|
|
37
|
+
child.on("error", () => runJSFallback());
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
} catch {}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
runJSFallback();
|
|
44
|
+
|
|
45
|
+
function runJSFallback() {
|
|
46
|
+
const jsPath = join(__dirname, "..", "dist", "index.js");
|
|
47
|
+
if (existsSync(jsPath)) {
|
|
48
|
+
const child = spawn(process.execPath, [jsPath, ...args], { stdio: "inherit" });
|
|
49
|
+
child.on("exit", (code, signal) => { process.exit(code ?? (signal ? 1 : 0)); });
|
|
50
|
+
child.on("error", () => {
|
|
51
|
+
console.error("install-helper: failed to run");
|
|
52
|
+
process.exit(1);
|
|
53
|
+
});
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
console.error(`install-helper binary not found for ${key}`);
|
|
57
|
+
console.error("Try: npm install -g @cannbot-ai/install-helper");
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
package/bin/package.json
ADDED
package/dist/index.js
CHANGED
|
@@ -64,7 +64,7 @@ var init_embedded_plugins = __esm({
|
|
|
64
64
|
"direct",
|
|
65
65
|
"kernel"
|
|
66
66
|
],
|
|
67
|
-
skills:
|
|
67
|
+
skills: 21,
|
|
68
68
|
agents: 4,
|
|
69
69
|
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",
|
|
70
70
|
version: "1.2.5",
|
|
@@ -75,7 +75,6 @@ var init_embedded_plugins = __esm({
|
|
|
75
75
|
dir: "ops",
|
|
76
76
|
skills: [
|
|
77
77
|
"ascendc-tiling-design",
|
|
78
|
-
"ascendc-simt-tiling-design",
|
|
79
78
|
"npu-arch",
|
|
80
79
|
"ascendc-api-best-practices",
|
|
81
80
|
"ascendc-regbase-best-practice",
|
|
@@ -85,12 +84,9 @@ var init_embedded_plugins = __esm({
|
|
|
85
84
|
"ops-precision-standard",
|
|
86
85
|
"ascendc-docs-search",
|
|
87
86
|
"ascendc-env-check",
|
|
88
|
-
"cann-env-setup",
|
|
89
87
|
"ascendc-precision-debug",
|
|
90
88
|
"ops-profiling",
|
|
91
|
-
"torch-ops-profiler",
|
|
92
89
|
"ascendc-direct-invoke-template",
|
|
93
|
-
"ascendc-direct-invoke-to-registry-invoke",
|
|
94
90
|
"torch-ascendc-op-extension",
|
|
95
91
|
"ascendc-runtime-debug",
|
|
96
92
|
"ascendc-crash-debug",
|
|
@@ -181,7 +177,7 @@ var init_embedded_plugins = __esm({
|
|
|
181
177
|
"ascendc-registry",
|
|
182
178
|
"registry"
|
|
183
179
|
],
|
|
184
|
-
skills:
|
|
180
|
+
skills: 30,
|
|
185
181
|
agents: 7,
|
|
186
182
|
description: "\u751F\u4EA7\u7EA7 ACLNN \u6CE8\u518C\u7B97\u5B50\u5168\u6D41\u7A0B\uFF1A\u4EE3\u7801\u2192UT/ST\u2192\u4E0A\u5E93",
|
|
187
183
|
version: "1.2.3",
|
|
@@ -200,14 +196,12 @@ var init_embedded_plugins = __esm({
|
|
|
200
196
|
"ascendc-docs-gen",
|
|
201
197
|
"ascendc-docs-search",
|
|
202
198
|
"ascendc-env-check",
|
|
203
|
-
"cann-env-setup",
|
|
204
199
|
"npu-arch",
|
|
205
200
|
"ascendc-performance-best-practices",
|
|
206
201
|
"ascendc-precision-debug",
|
|
207
202
|
"ascendc-perf-optimize",
|
|
208
203
|
"ascendc-regbase-best-practice",
|
|
209
204
|
"ascendc-registry-invoke-template",
|
|
210
|
-
"ascendc-registry-invoke-to-direct-invoke",
|
|
211
205
|
"ascendc-runtime-debug",
|
|
212
206
|
"ascendc-st-design",
|
|
213
207
|
"ascendc-tiling-design",
|
|
@@ -2425,7 +2419,7 @@ var STATIC_SKILL_CATEGORIES = [
|
|
|
2425
2419
|
skills: [
|
|
2426
2420
|
{ id: "gitcode-pr-handler", description: "GitCode PR \u6807\u9898/\u63CF\u8FF0\u751F\u6210", source: "infra" },
|
|
2427
2421
|
{ id: "gitcode-issue-gen", description: "GitCode Issue \u751F\u6210\u4E0E\u5173\u8054", source: "infra" },
|
|
2428
|
-
{ id: "gitcode-issue-handler", description: "GitCode Issue \
|
|
2422
|
+
{ id: "gitcode-issue-handler", description: "GitCode \u5355 Issue/\u6279\u91CF Issue \u81EA\u52A8\u5904\u7406", source: "infra" },
|
|
2429
2423
|
{ id: "gitcode-toolkit", description: "GitCode \u534F\u4F5C\u901A\u7528\u53C2\u8003", source: "infra" },
|
|
2430
2424
|
{ id: "cannbot-skill-reviewer", description: "Skill \u5165\u5E93\u8D28\u91CF\u5BA1\u67E5", source: "infra" }
|
|
2431
2425
|
]
|