@cannbot-ai/install-helper 0.0.2-beta.67 → 0.0.2-beta.68
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 +1 -1
- package/dist/config/repository.yaml +1 -1
- package/dist/index.js +38 -47
- package/dist/index.js.map +1 -1
- package/dist/install.ps1 +22 -22
- 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/install.ps1
CHANGED
|
@@ -89,11 +89,11 @@ $Arch = if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") { "arm64" } else { "x64" }
|
|
|
89
89
|
$SubPkgName = "@cannbot-ai/install-helper-windows-$Arch"
|
|
90
90
|
$BinaryName = "install-helper.exe"
|
|
91
91
|
|
|
92
|
-
Write-Host " [OK]
|
|
92
|
+
Write-Host " [OK] 平台: windows-$Arch" -ForegroundColor Green
|
|
93
93
|
Write-Host ""
|
|
94
94
|
|
|
95
|
-
# 2. Query latest version from npm registry
|
|
96
|
-
Write-Host "
|
|
95
|
+
# 2.1 Query latest version from npm registry
|
|
96
|
+
Write-Host " 正在查询最新版本..." -ForegroundColor Cyan
|
|
97
97
|
|
|
98
98
|
$Mirrors = @(
|
|
99
99
|
"https://registry.npmjs.org",
|
|
@@ -119,21 +119,21 @@ foreach ($url in $Mirrors) {
|
|
|
119
119
|
} catch { $Errors += $_ }
|
|
120
120
|
}
|
|
121
121
|
if ($Version) {
|
|
122
|
-
Write-Host " [OK]
|
|
122
|
+
Write-Host " [OK] 版本: $Version (源: $Registry)" -ForegroundColor Green
|
|
123
123
|
break
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
if (-not $Version) {
|
|
128
|
-
Write-Host " [ERROR]
|
|
128
|
+
Write-Host " [ERROR] 无法查询版本信息" -ForegroundColor Red
|
|
129
129
|
if ($Errors.Count -gt 0) {
|
|
130
|
-
Write-Host "
|
|
130
|
+
Write-Host " 错误详情:" -ForegroundColor Yellow
|
|
131
131
|
foreach ($err in $Errors) {
|
|
132
132
|
Write-Host " - $($err.Exception.Message)" -ForegroundColor Yellow
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
Write-Host ""
|
|
136
|
-
Write-Host "
|
|
136
|
+
Write-Host " 备选方案 (需要 Node.js 18+):"
|
|
137
137
|
Write-Host " npm install -g @cannbot-ai/install-helper"
|
|
138
138
|
exit 1
|
|
139
139
|
}
|
|
@@ -145,7 +145,7 @@ New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null
|
|
|
145
145
|
$TarballName = "$($SubPkgName.Split('/')[1])-$Version.tgz"
|
|
146
146
|
|
|
147
147
|
Write-Host ""
|
|
148
|
-
Write-Host "
|
|
148
|
+
Write-Host " 正在下载 $TarballName ..." -ForegroundColor Cyan
|
|
149
149
|
|
|
150
150
|
$TempFile = Join-Path $env:TEMP "ih-tarball.tgz"
|
|
151
151
|
$Downloaded = $false
|
|
@@ -155,23 +155,23 @@ foreach ($url in $DownloadMirrors) {
|
|
|
155
155
|
try {
|
|
156
156
|
Invoke-WebRequest $TarballUrl -OutFile $TempFile -TimeoutSec 300 -UseBasicParsing
|
|
157
157
|
$Downloaded = $true
|
|
158
|
-
Write-Host " [OK]
|
|
158
|
+
Write-Host " [OK] 下载完成" -ForegroundColor Green
|
|
159
159
|
break
|
|
160
160
|
} catch {
|
|
161
|
-
Write-Host " [WARN]
|
|
161
|
+
Write-Host " [WARN] 从 $url 下载失败: $($_.Exception.Message)" -ForegroundColor Yellow
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
if (-not $Downloaded) {
|
|
166
|
-
Write-Host " [ERROR]
|
|
166
|
+
Write-Host " [ERROR] 所有镜像下载失败" -ForegroundColor Red
|
|
167
167
|
Write-Host ""
|
|
168
|
-
Write-Host "
|
|
168
|
+
Write-Host " 备选方案 (需要 Node.js 18+):"
|
|
169
169
|
Write-Host " npm install -g @cannbot-ai/install-helper"
|
|
170
170
|
exit 1
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
# 4. Extract
|
|
174
|
-
Write-Host "
|
|
174
|
+
Write-Host " 正在安装..." -ForegroundColor Cyan
|
|
175
175
|
|
|
176
176
|
$TempExtract = Join-Path $env:TEMP "ih-extract-$(Get-Random)"
|
|
177
177
|
New-Item -ItemType Directory -Force -Path $TempExtract | Out-Null
|
|
@@ -182,8 +182,8 @@ try {
|
|
|
182
182
|
throw "tar exit code $LASTEXITCODE"
|
|
183
183
|
}
|
|
184
184
|
} catch {
|
|
185
|
-
Write-Host " [ERROR]
|
|
186
|
-
Write-Host " Windows 10 1803+
|
|
185
|
+
Write-Host " [ERROR] 解压失败。tar 不存在或出错。" -ForegroundColor Red
|
|
186
|
+
Write-Host " Windows 10 1803+ 自带 tar。旧版 Windows 请使用 npm 安装。"
|
|
187
187
|
Remove-Item $TempExtract -Recurse -Force -ErrorAction SilentlyContinue
|
|
188
188
|
Remove-Item $TempFile -Force -ErrorAction SilentlyContinue
|
|
189
189
|
exit 1
|
|
@@ -193,7 +193,7 @@ $BinarySrc = Join-Path $TempExtract "package\$BinaryName"
|
|
|
193
193
|
$BinaryDest = Join-Path $InstallDir "install-helper.exe"
|
|
194
194
|
|
|
195
195
|
if (-not (Test-Path $BinarySrc)) {
|
|
196
|
-
Write-Host " [ERROR]
|
|
196
|
+
Write-Host " [ERROR] 二进制文件未找到: $BinarySrc" -ForegroundColor Red
|
|
197
197
|
Remove-Item $TempExtract -Recurse -Force -ErrorAction SilentlyContinue
|
|
198
198
|
Remove-Item $TempFile -Force -ErrorAction SilentlyContinue
|
|
199
199
|
exit 1
|
|
@@ -203,30 +203,30 @@ Copy-Item $BinarySrc $BinaryDest -Force
|
|
|
203
203
|
Remove-Item $TempExtract -Recurse -Force -ErrorAction SilentlyContinue
|
|
204
204
|
Remove-Item $TempFile -Force -ErrorAction SilentlyContinue
|
|
205
205
|
|
|
206
|
-
Write-Host " [OK]
|
|
206
|
+
Write-Host " [OK] 安装成功!" -ForegroundColor Green
|
|
207
207
|
Write-Host ""
|
|
208
208
|
|
|
209
209
|
# 5. PATH
|
|
210
210
|
$UserPath = [Environment]::GetEnvironmentVariable("Path", "User")
|
|
211
211
|
if (-not $UserPath) {
|
|
212
212
|
[Environment]::SetEnvironmentVariable("Path", $InstallDir, "User")
|
|
213
|
-
Write-Host " [OK]
|
|
213
|
+
Write-Host " [OK] 已添加到 PATH (重启终端生效)" -ForegroundColor Green
|
|
214
214
|
Write-Host ""
|
|
215
215
|
} elseif ($UserPath -notlike "*$InstallDir*") {
|
|
216
216
|
[Environment]::SetEnvironmentVariable("Path", "$UserPath;$InstallDir", "User")
|
|
217
|
-
Write-Host " [OK]
|
|
217
|
+
Write-Host " [OK] 已添加到 PATH (重启终端生效)" -ForegroundColor Green
|
|
218
218
|
Write-Host ""
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
# 6. Verify binary and launch
|
|
222
222
|
try {
|
|
223
223
|
$null = & $BinaryDest --version 2>&1
|
|
224
|
-
Write-Host "
|
|
224
|
+
Write-Host " 正在启动 install-helper..." -ForegroundColor Cyan
|
|
225
225
|
Write-Host ""
|
|
226
226
|
& $BinaryDest
|
|
227
227
|
} catch {
|
|
228
|
-
Write-Host " [WARN]
|
|
228
|
+
Write-Host " [WARN] 原生二进制无法运行" -ForegroundColor Yellow
|
|
229
229
|
Write-Host ""
|
|
230
|
-
Write-Host "
|
|
230
|
+
Write-Host " 备选方案 (需要 Node.js 18+):"
|
|
231
231
|
Write-Host " npm install -g @cannbot-ai/install-helper"
|
|
232
232
|
}
|
|
@@ -2,8 +2,8 @@ id: ops-direct-invoke
|
|
|
2
2
|
dir: plugins-official/ops-direct-invoke
|
|
3
3
|
displayName: AscendC Kernel 直调
|
|
4
4
|
aliases: [ops-direct, ascendc-direct, direct, kernel]
|
|
5
|
-
skills:
|
|
6
|
-
agents:
|
|
5
|
+
skills: 19
|
|
6
|
+
agents: 4
|
|
7
7
|
description: Ascend C 直调全流程:环境→设计→开发→审查→性能验收
|
|
8
8
|
version: "1.2.2"
|
|
9
9
|
configFile: AGENTS.md
|
|
@@ -2,8 +2,8 @@ id: ops-registry-invoke
|
|
|
2
2
|
dir: plugins-official/ops-registry-invoke
|
|
3
3
|
displayName: AscendC 算子注册调用
|
|
4
4
|
aliases: [ops-registry, ascendc-registry, registry]
|
|
5
|
-
skills:
|
|
6
|
-
agents:
|
|
5
|
+
skills: 26
|
|
6
|
+
agents: 3
|
|
7
7
|
description: 生产级 ACLNN 注册算子全流程:代码→UT/ST→上库
|
|
8
8
|
version: "1.2.2"
|
|
9
9
|
configFile: AGENTS.md
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cannbot-ai/install-helper",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.68",
|
|
4
4
|
"description": "Install Helper - Interactive installer for CANN operator development skills",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"yaml": "^2.6.0"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
|
-
"@cannbot-ai/install-helper-linux-x64": "0.0.2-beta.
|
|
46
|
-
"@cannbot-ai/install-helper-linux-arm64": "0.0.2-beta.
|
|
47
|
-
"@cannbot-ai/install-helper-darwin-x64": "0.0.2-beta.
|
|
48
|
-
"@cannbot-ai/install-helper-darwin-arm64": "0.0.2-beta.
|
|
49
|
-
"@cannbot-ai/install-helper-windows-x64": "0.0.2-beta.
|
|
45
|
+
"@cannbot-ai/install-helper-linux-x64": "0.0.2-beta.68",
|
|
46
|
+
"@cannbot-ai/install-helper-linux-arm64": "0.0.2-beta.68",
|
|
47
|
+
"@cannbot-ai/install-helper-darwin-x64": "0.0.2-beta.68",
|
|
48
|
+
"@cannbot-ai/install-helper-darwin-arm64": "0.0.2-beta.68",
|
|
49
|
+
"@cannbot-ai/install-helper-windows-x64": "0.0.2-beta.68"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^22.0.0",
|