@cannbot-ai/install-helper 0.0.2-beta.74 → 0.0.2-beta.76
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 +1 -1
- package/dist/index.js +32 -23
- package/dist/index.js.map +1 -1
- package/dist/install.ps1 +40 -6
- 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
|
@@ -13,6 +13,13 @@ try {
|
|
|
13
13
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
|
14
14
|
} catch {}
|
|
15
15
|
|
|
16
|
+
# Auto-fix ExecutionPolicy for npm global tools (.ps1)
|
|
17
|
+
$execPolicy = Get-ExecutionPolicy -Scope CurrentUser
|
|
18
|
+
if ($execPolicy -eq "Restricted") {
|
|
19
|
+
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
|
|
20
|
+
Write-Host " [OK] ExecutionPolicy set to RemoteSigned (required for npm tools)" -ForegroundColor Green
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
$ErrorActionPreference = "Stop"
|
|
17
24
|
$ProgressPreference = "SilentlyContinue"
|
|
18
25
|
|
|
@@ -101,8 +108,36 @@ if (-not $Version) {
|
|
|
101
108
|
return
|
|
102
109
|
}
|
|
103
110
|
|
|
104
|
-
# 3.
|
|
111
|
+
# 3. Check if already installed and up-to-date
|
|
105
112
|
$InstallDir = Join-Path $env:USERPROFILE ".cannbot\bin"
|
|
113
|
+
$BinaryDest = Join-Path $InstallDir "install-helper.exe"
|
|
114
|
+
if (Test-Path $BinaryDest) {
|
|
115
|
+
try {
|
|
116
|
+
$prevEAP = $ErrorActionPreference
|
|
117
|
+
$ErrorActionPreference = "Continue"
|
|
118
|
+
$localVersion = (& $BinaryDest --version 2>$null)
|
|
119
|
+
$ErrorActionPreference = $prevEAP
|
|
120
|
+
if ($localVersion -and $localVersion.Trim() -eq $Version) {
|
|
121
|
+
Write-Host " [OK] Already up-to-date (v$Version)" -ForegroundColor Green
|
|
122
|
+
Write-Host ""
|
|
123
|
+
$UserPath = [Environment]::GetEnvironmentVariable("Path", "User")
|
|
124
|
+
if (-not $UserPath) {
|
|
125
|
+
[Environment]::SetEnvironmentVariable("Path", $InstallDir, "User")
|
|
126
|
+
} elseif ($UserPath -notlike "*$InstallDir*") {
|
|
127
|
+
[Environment]::SetEnvironmentVariable("Path", "$UserPath;$InstallDir", "User")
|
|
128
|
+
}
|
|
129
|
+
Write-Host " Launching install-helper..." -ForegroundColor Cyan
|
|
130
|
+
Write-Host ""
|
|
131
|
+
& $BinaryDest
|
|
132
|
+
return
|
|
133
|
+
}
|
|
134
|
+
if ($localVersion) {
|
|
135
|
+
Write-Host " [INFO] Updating: v$($localVersion.Trim()) -> v$Version" -ForegroundColor Yellow
|
|
136
|
+
}
|
|
137
|
+
} catch {}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
# 4. Download tarball (with mirror fallback)
|
|
106
141
|
New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null
|
|
107
142
|
|
|
108
143
|
$TarballName = "$($SubPkgName.Split('/')[1])-$Version.tgz"
|
|
@@ -133,8 +168,8 @@ if (-not $Downloaded) {
|
|
|
133
168
|
return
|
|
134
169
|
}
|
|
135
170
|
|
|
136
|
-
#
|
|
137
|
-
Write-Host " Installing..." -ForegroundColor Cyan
|
|
171
|
+
# 5. Extract
|
|
172
|
+
Write-Host " Installing v$Version..." -ForegroundColor Cyan
|
|
138
173
|
|
|
139
174
|
$TempExtract = Join-Path $env:TEMP "ih-extract-$(Get-Random)"
|
|
140
175
|
New-Item -ItemType Directory -Force -Path $TempExtract | Out-Null
|
|
@@ -153,7 +188,6 @@ try {
|
|
|
153
188
|
}
|
|
154
189
|
|
|
155
190
|
$BinarySrc = Join-Path $TempExtract "package\$BinaryName"
|
|
156
|
-
$BinaryDest = Join-Path $InstallDir "install-helper.exe"
|
|
157
191
|
|
|
158
192
|
if (-not (Test-Path $BinarySrc)) {
|
|
159
193
|
Write-Host " [ERROR] Binary not found in tarball: $BinarySrc" -ForegroundColor Red
|
|
@@ -169,7 +203,7 @@ Remove-Item $TempFile -Force -ErrorAction SilentlyContinue
|
|
|
169
203
|
Write-Host " [OK] Installation successful!" -ForegroundColor Green
|
|
170
204
|
Write-Host ""
|
|
171
205
|
|
|
172
|
-
#
|
|
206
|
+
# 6. PATH
|
|
173
207
|
$UserPath = [Environment]::GetEnvironmentVariable("Path", "User")
|
|
174
208
|
if (-not $UserPath) {
|
|
175
209
|
[Environment]::SetEnvironmentVariable("Path", $InstallDir, "User")
|
|
@@ -181,7 +215,7 @@ if (-not $UserPath) {
|
|
|
181
215
|
Write-Host ""
|
|
182
216
|
}
|
|
183
217
|
|
|
184
|
-
#
|
|
218
|
+
# 7. Verify binary and launch
|
|
185
219
|
try {
|
|
186
220
|
$null = & $BinaryDest --version 2>$null
|
|
187
221
|
Write-Host " Launching install-helper..." -ForegroundColor Cyan
|
|
@@ -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.76",
|
|
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.76",
|
|
46
|
+
"@cannbot-ai/install-helper-linux-arm64": "0.0.2-beta.76",
|
|
47
|
+
"@cannbot-ai/install-helper-darwin-x64": "0.0.2-beta.76",
|
|
48
|
+
"@cannbot-ai/install-helper-darwin-arm64": "0.0.2-beta.76",
|
|
49
|
+
"@cannbot-ai/install-helper-windows-x64": "0.0.2-beta.76"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^22.0.0",
|