@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/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. Download tarball (with mirror fallback)
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
- # 4. Extract
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
- # 5. PATH
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
- # 6. Verify binary and launch
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,7 +2,7 @@ id: catlass-op-generator
2
2
  dir: plugins-official/catlass-op-generator
3
3
  displayName: Catlass 算子直调
4
4
  aliases: [catlass]
5
- skills: 10
5
+ skills: 14
6
6
  agents: 3
7
7
  description: Catlass 模板拼装 GEMM/Matmul/Epilogue 算子开发
8
8
  version: "1.2.2"
@@ -2,7 +2,7 @@ id: model-infer-optimize
2
2
  dir: plugins-official/model-infer-optimize
3
3
  displayName: NPU 推理优化
4
4
  aliases: [model-infer, infer, inference]
5
- skills: 11
5
+ skills: 12
6
6
  agents: 3
7
7
  description: NPU 模型推理端到端优化(并行/KVCache/融合/量化/图模式/多流/SuperKernel)
8
8
  version: "1.2.2"
@@ -3,7 +3,7 @@ dir: plugins-official/ops-code-reviewer
3
3
  displayName: 代码检视
4
4
  aliases: [code-review, reviewer, review]
5
5
  skills: 5
6
- agents: 1
6
+ agents: 2
7
7
  description: Ascend C 算子代码 4 阶段全量检视(主 Agent 编排 + 子 Agent 并行检视)
8
8
  version: "1.2.2"
9
9
  configFile: AGENTS.md
@@ -2,7 +2,7 @@ id: ops-direct-invoke-flash
2
2
  dir: plugins-official/ops-direct-invoke-flash
3
3
  displayName: AscendC Kernel 直调(快速版)
4
4
  aliases: [flash, kernel-flash]
5
- skills: 1
5
+ skills: 7
6
6
  agents: 1
7
7
  description: 从数学公式或代码片段快速构建并验证 Ascend NPU 核函数
8
8
  version: "1.2.2"
@@ -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: 16
6
- agents: 3
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: 12
6
- agents: 4
5
+ skills: 26
6
+ agents: 3
7
7
  description: 生产级 ACLNN 注册算子全流程:代码→UT/ST→上库
8
8
  version: "1.2.2"
9
9
  configFile: AGENTS.md
@@ -3,7 +3,7 @@ dir: plugins-official/triton-op-generator
3
3
  displayName: Triton 算子开发
4
4
  aliases: [triton]
5
5
  skills: 6
6
- agents: 1
6
+ agents: 0
7
7
  description: Triton-Ascend 算子 6 阶段自动生成与优化(描述→代码→验证→优化)
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.74",
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.74",
46
- "@cannbot-ai/install-helper-linux-arm64": "0.0.2-beta.74",
47
- "@cannbot-ai/install-helper-darwin-x64": "0.0.2-beta.74",
48
- "@cannbot-ai/install-helper-darwin-arm64": "0.0.2-beta.74",
49
- "@cannbot-ai/install-helper-windows-x64": "0.0.2-beta.74"
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",