@cats-inc/cats-platform 0.1.10 → 0.1.21

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.
Files changed (163) hide show
  1. package/.env.example +7 -10
  2. package/build/desktop/bootstrapPage.d.ts.map +1 -1
  3. package/build/desktop/bootstrapPage.js +162 -55
  4. package/build/desktop/bootstrapPage.js.map +1 -1
  5. package/build/desktop/cliInventoryProbe.d.ts +18 -0
  6. package/build/desktop/cliInventoryProbe.d.ts.map +1 -1
  7. package/build/desktop/cliInventoryProbe.js +42 -0
  8. package/build/desktop/cliInventoryProbe.js.map +1 -1
  9. package/build/desktop/contracts.d.ts +9 -0
  10. package/build/desktop/contracts.d.ts.map +1 -1
  11. package/build/desktop/main.js +101 -20
  12. package/build/desktop/main.js.map +1 -1
  13. package/build/desktop/readiness.d.ts.map +1 -1
  14. package/build/desktop/readiness.js +35 -2
  15. package/build/desktop/readiness.js.map +1 -1
  16. package/build/desktop/tray.d.ts +1 -1
  17. package/build/desktop/tray.d.ts.map +1 -1
  18. package/build/desktop/tray.js +2 -7
  19. package/build/desktop/tray.js.map +1 -1
  20. package/build/desktop/trayMenu.d.ts +23 -2
  21. package/build/desktop/trayMenu.d.ts.map +1 -1
  22. package/build/desktop/trayMenu.js +24 -30
  23. package/build/desktop/trayMenu.js.map +1 -1
  24. package/build/desktop/updateDialog.d.ts +40 -0
  25. package/build/desktop/updateDialog.d.ts.map +1 -0
  26. package/build/desktop/updateDialog.js +178 -0
  27. package/build/desktop/updateDialog.js.map +1 -0
  28. package/build/desktop/updateNotifications.js +2 -2
  29. package/build/desktop/updateNotifications.js.map +1 -1
  30. package/build/desktop/updaterAdapter.d.ts +1 -0
  31. package/build/desktop/updaterAdapter.d.ts.map +1 -1
  32. package/build/desktop/updaterAdapter.js +13 -1
  33. package/build/desktop/updaterAdapter.js.map +1 -1
  34. package/build/renderer/assets/{ActiveSessionPermissionChip-Dl2UOFgh.js → ActiveSessionPermissionChip-DImsuR9T.js} +1 -1
  35. package/build/renderer/assets/{App-CPqGDXVi.js → App-BfOvMP2m.js} +1 -1
  36. package/build/renderer/assets/{App-ChvP0G9X.js → App-DKOSn0o_.js} +1 -1
  37. package/build/renderer/assets/{App-C57f4p8k.js → App-DWd7I3Z2.js} +1 -1
  38. package/build/renderer/assets/{WorkspaceAppRoutes-DYg2vnjz.js → WorkspaceAppRoutes-CrbTA9En.js} +1 -1
  39. package/build/renderer/assets/app-BTww3Hl4.js +43 -0
  40. package/build/renderer/assets/{app-XnXwkcD2.css → app-CPxWQwLA.css} +1 -1
  41. package/build/renderer/assets/conversationSidebarRecentEntries-QuaOPxCb.js +6 -0
  42. package/build/renderer/assets/{useDraftSessionChips-By3XXabI.js → useDraftSessionChips-DCIId0eY.js} +1 -1
  43. package/build/renderer/index.html +2 -2
  44. package/build/server/app/renderer/auth/api.d.ts +28 -2
  45. package/build/server/app/renderer/auth/api.d.ts.map +1 -1
  46. package/build/server/app/renderer/auth/api.js +29 -4
  47. package/build/server/app/renderer/auth/api.js.map +1 -1
  48. package/build/server/app/renderer/settings/settingsDesktopUpdateLabels.d.ts +11 -4
  49. package/build/server/app/renderer/settings/settingsDesktopUpdateLabels.d.ts.map +1 -1
  50. package/build/server/app/renderer/settings/settingsDesktopUpdateLabels.js +25 -5
  51. package/build/server/app/renderer/settings/settingsDesktopUpdateLabels.js.map +1 -1
  52. package/build/server/app/server/authGatePolicy.js +1 -2
  53. package/build/server/app/server/authGatePolicy.js.map +1 -1
  54. package/build/server/app/server/authRoutes.d.ts +14 -1
  55. package/build/server/app/server/authRoutes.d.ts.map +1 -1
  56. package/build/server/app/server/authRoutes.js +395 -76
  57. package/build/server/app/server/authRoutes.js.map +1 -1
  58. package/build/server/app/server/contracts.d.ts +4 -1
  59. package/build/server/app/server/contracts.d.ts.map +1 -1
  60. package/build/server/app/server/dependencies.d.ts.map +1 -1
  61. package/build/server/app/server/dependencies.js +6 -1
  62. package/build/server/app/server/dependencies.js.map +1 -1
  63. package/build/server/app/server/platformSetupRoutes.d.ts +2 -1
  64. package/build/server/app/server/platformSetupRoutes.d.ts.map +1 -1
  65. package/build/server/app/server/platformSetupRoutes.js +129 -64
  66. package/build/server/app/server/platformSetupRoutes.js.map +1 -1
  67. package/build/server/app/server/requestRouter.d.ts.map +1 -1
  68. package/build/server/app/server/requestRouter.js +3 -0
  69. package/build/server/app/server/requestRouter.js.map +1 -1
  70. package/build/server/app/server/runtimeSurfaceProxy.d.ts.map +1 -1
  71. package/build/server/app/server/runtimeSurfaceProxy.js +12 -17
  72. package/build/server/app/server/runtimeSurfaceProxy.js.map +1 -1
  73. package/build/server/config.d.ts +1 -3
  74. package/build/server/config.d.ts.map +1 -1
  75. package/build/server/config.js +2 -13
  76. package/build/server/config.js.map +1 -1
  77. package/build/server/design/components/providerModelFieldsSupport.d.ts.map +1 -1
  78. package/build/server/design/components/providerModelFieldsSupport.js +4 -1
  79. package/build/server/design/components/providerModelFieldsSupport.js.map +1 -1
  80. package/build/server/design/components/useProviderTargetReconciliation.d.ts.map +1 -1
  81. package/build/server/design/components/useProviderTargetReconciliation.js +3 -1
  82. package/build/server/design/components/useProviderTargetReconciliation.js.map +1 -1
  83. package/build/server/platform/auth/actionGrant.d.ts +61 -0
  84. package/build/server/platform/auth/actionGrant.d.ts.map +1 -0
  85. package/build/server/platform/auth/actionGrant.js +108 -0
  86. package/build/server/platform/auth/actionGrant.js.map +1 -0
  87. package/build/server/platform/auth/adminCredentials.d.ts +37 -0
  88. package/build/server/platform/auth/adminCredentials.d.ts.map +1 -0
  89. package/build/server/platform/auth/adminCredentials.js +63 -0
  90. package/build/server/platform/auth/adminCredentials.js.map +1 -0
  91. package/build/server/platform/auth/bootstrap.d.ts +14 -0
  92. package/build/server/platform/auth/bootstrap.d.ts.map +1 -1
  93. package/build/server/platform/auth/bootstrap.js +29 -4
  94. package/build/server/platform/auth/bootstrap.js.map +1 -1
  95. package/build/server/platform/auth/config.d.ts.map +1 -1
  96. package/build/server/platform/auth/config.js +1 -1
  97. package/build/server/platform/auth/config.js.map +1 -1
  98. package/build/server/platform/auth/errorCodes.d.ts +2 -0
  99. package/build/server/platform/auth/errorCodes.d.ts.map +1 -1
  100. package/build/server/platform/auth/errorCodes.js +2 -0
  101. package/build/server/platform/auth/errorCodes.js.map +1 -1
  102. package/build/server/platform/auth/googleAccount.d.ts +40 -13
  103. package/build/server/platform/auth/googleAccount.d.ts.map +1 -1
  104. package/build/server/platform/auth/googleAccount.js +89 -70
  105. package/build/server/platform/auth/googleAccount.js.map +1 -1
  106. package/build/server/platform/auth/index.d.ts +4 -0
  107. package/build/server/platform/auth/index.d.ts.map +1 -1
  108. package/build/server/platform/auth/index.js +4 -0
  109. package/build/server/platform/auth/index.js.map +1 -1
  110. package/build/server/platform/auth/localLogin.d.ts +10 -0
  111. package/build/server/platform/auth/localLogin.d.ts.map +1 -1
  112. package/build/server/platform/auth/localLogin.js +17 -0
  113. package/build/server/platform/auth/localLogin.js.map +1 -1
  114. package/build/server/platform/auth/loginMethods.d.ts +18 -0
  115. package/build/server/platform/auth/loginMethods.d.ts.map +1 -0
  116. package/build/server/platform/auth/loginMethods.js +19 -0
  117. package/build/server/platform/auth/loginMethods.js.map +1 -0
  118. package/build/server/platform/auth/securityEvents.d.ts +31 -0
  119. package/build/server/platform/auth/securityEvents.d.ts.map +1 -0
  120. package/build/server/platform/auth/securityEvents.js +45 -0
  121. package/build/server/platform/auth/securityEvents.js.map +1 -0
  122. package/build/server/products/chat/api/contracts.d.ts +0 -8
  123. package/build/server/products/chat/api/contracts.d.ts.map +1 -1
  124. package/build/server/products/chat/api/setupRoutes.d.ts.map +1 -1
  125. package/build/server/products/chat/api/setupRoutes.js +2 -84
  126. package/build/server/products/chat/api/setupRoutes.js.map +1 -1
  127. package/build/server/products/shared/api/workspaceContracts.d.ts +0 -8
  128. package/build/server/products/shared/api/workspaceContracts.d.ts.map +1 -1
  129. package/build/server/runtime/client.d.ts +11 -0
  130. package/build/server/runtime/client.d.ts.map +1 -1
  131. package/build/server/runtime/client.js +23 -1
  132. package/build/server/runtime/client.js.map +1 -1
  133. package/build/server/shared/i18n/catalogs/en.d.ts.map +1 -1
  134. package/build/server/shared/i18n/catalogs/en.js +40 -0
  135. package/build/server/shared/i18n/catalogs/en.js.map +1 -1
  136. package/build/server/shared/i18n/catalogs/zh-TW.d.ts.map +1 -1
  137. package/build/server/shared/i18n/catalogs/zh-TW.js +39 -0
  138. package/build/server/shared/i18n/catalogs/zh-TW.js.map +1 -1
  139. package/build/server/shared/i18n/index.d.ts +39 -0
  140. package/build/server/shared/i18n/index.d.ts.map +1 -1
  141. package/build/server/shared/i18n/messageKeys.d.ts +39 -0
  142. package/build/server/shared/i18n/messageKeys.d.ts.map +1 -1
  143. package/build/server/shared/i18n/messageKeys.js +39 -0
  144. package/build/server/shared/i18n/messageKeys.js.map +1 -1
  145. package/build/server/shared/providerCatalog.d.ts +3 -2
  146. package/build/server/shared/providerCatalog.d.ts.map +1 -1
  147. package/build/server/shared/providerCatalog.js +9 -1
  148. package/build/server/shared/providerCatalog.js.map +1 -1
  149. package/build/server/shared/providerCatalogData.d.ts +11 -1
  150. package/build/server/shared/providerCatalogData.d.ts.map +1 -1
  151. package/build/server/shared/providerCatalogData.js +9 -0
  152. package/build/server/shared/providerCatalogData.js.map +1 -1
  153. package/build/server/shared/providerCatalogInstances.d.ts.map +1 -1
  154. package/build/server/shared/providerCatalogInstances.js +3 -0
  155. package/build/server/shared/providerCatalogInstances.js.map +1 -1
  156. package/package.json +1 -1
  157. package/scripts/README.md +30 -0
  158. package/scripts/linux/node-cli-common.sh +2 -75
  159. package/scripts/macos/node-cli-common.sh +2 -75
  160. package/scripts/windows/Check-WindowsSetupReadiness.ps1 +14 -443
  161. package/scripts/windows/Remove-MergedBranches.ps1 +229 -0
  162. package/build/renderer/assets/app-DVN9Ghrk.js +0 -43
  163. package/build/renderer/assets/conversationSidebarRecentEntries-XZVCnMLw.js +0 -6
@@ -3,11 +3,19 @@
3
3
  Inspect Windows packaged setup readiness for Cats.
4
4
 
5
5
  .DESCRIPTION
6
- Composes the repo-owned packaged setup helpers into one structured host-side
7
- readiness audit. The helper is read-only and reports whether the npm prefix
8
- substrate, the per-CLI npm-global helpers, and the bundled native provider
9
- helpers are ready, missing, or still require changes before deeper provider
10
- installation flows can proceed.
6
+ Composes the repo-owned packaged prerequisite helpers into one structured
7
+ host-side readiness audit. The helper is read-only and reports whether the
8
+ Node.js host, the GitHub CLI host, and the npm prefix substrate are ready,
9
+ missing, or still require changes before deeper provider installation flows
10
+ can proceed. The optional local-model runtime is included on request.
11
+
12
+ Provider presence is deliberately NOT audited here. cats-runtime's setup
13
+ scan already probes every provider CLI, reports a version and a probe-backed
14
+ auth status for each, and is the source the desktop host's CLI inventory
15
+ reads. Auditing them a second time meant spawning one powershell.exe per
16
+ provider — eighteen processes and roughly a minute and a half on first
17
+ launch — to produce answers the host then ignored. The audit now owns the
18
+ prerequisites, and the scan owns the providers.
11
19
 
12
20
  The audit talks only to helpers that ship in DESKTOP_SETUP_ASSETS. WSL and
13
21
  Docker substrates were removed from the packaged path in earlier phases and
@@ -16,11 +24,6 @@
16
24
  .PARAMETER Json
17
25
  Emit a structured JSON result.
18
26
 
19
- .PARAMETER IncludeNativeProviders
20
- Include native Claude/Cursor/Goose/Junie/Kiro readiness checks plus
21
- authentication follow-through where the provider requires it. Enabled by
22
- default.
23
-
24
27
  .PARAMETER IncludeLocalModels
25
28
  Include local-model runtime checks such as the repo-owned Ollama helper.
26
29
  Disabled by default because the first packaged baseline remains the API
@@ -34,14 +37,6 @@
34
37
  .PARAMETER SkipNodeCheck
35
38
  Skip probing node/npm binaries for deterministic tests.
36
39
 
37
- .PARAMETER InstalledPackagesJson
38
- Override the installed npm package set as a JSON array for deterministic
39
- tests. Mapped onto each per-CLI helper's `-InstallState`.
40
-
41
- .PARAMETER OutdatedPackagesJson
42
- Override the outdated npm package set as a JSON array for deterministic
43
- tests. Mapped onto each per-CLI helper's `-OutdatedState`.
44
-
45
40
  .PARAMETER DesiredPrefix
46
41
  Override the desired npm prefix passed to the sibling prefix helper.
47
42
 
@@ -57,39 +52,6 @@
57
52
  .PARAMETER OllamaApiState
58
53
  Override Ollama local API readiness for deterministic tests.
59
54
 
60
- .PARAMETER ClaudeInstallState
61
- Override Claude Code installation detection for deterministic tests.
62
-
63
- .PARAMETER ClaudeAuthState
64
- Override Claude Code authentication detection for deterministic tests.
65
-
66
- .PARAMETER CursorInstallState
67
- Override Cursor Agent installation detection for deterministic tests.
68
-
69
- .PARAMETER CursorAuthState
70
- Override Cursor Agent authentication detection for deterministic tests.
71
-
72
- .PARAMETER AntigravityInstallState
73
- Override Antigravity CLI installation detection for deterministic tests.
74
-
75
- .PARAMETER GrokInstallState
76
- Override Grok CLI installation detection for deterministic tests.
77
-
78
- .PARAMETER GooseInstallState
79
- Override Goose installation detection for deterministic tests.
80
-
81
- .PARAMETER GooseAuthState
82
- Override Goose authentication detection for deterministic tests.
83
-
84
- .PARAMETER JunieInstallState
85
- Override Junie installation detection for deterministic tests.
86
-
87
- .PARAMETER JunieAuthState
88
- Override Junie authentication detection for deterministic tests.
89
-
90
- .PARAMETER KiroInstallState
91
- Override Kiro CLI installation detection for deterministic tests.
92
-
93
55
  .PARAMETER NodeHostInstallState
94
56
  Override Node.js host installation detection for deterministic tests.
95
57
 
@@ -98,38 +60,13 @@
98
60
  #>
99
61
  param(
100
62
  [switch]$Json,
101
- [string]$IncludeNativeProviders = 'true',
102
63
  [string]$IncludeLocalModels = 'false',
103
64
  [string]$Parallel = 'true',
104
65
  [switch]$SkipNodeCheck,
105
- [string]$InstalledPackagesJson = '',
106
- [string]$OutdatedPackagesJson = '',
107
66
  [string]$DesiredPrefix = '',
108
67
  [string]$CurrentPrefix = '',
109
68
  [string]$CurrentUserPath = '',
110
69
  [ValidateSet('auto', 'installed', 'missing')]
111
- [string]$ClaudeInstallState = 'auto',
112
- [ValidateSet('auto', 'authenticated', 'auth_required')]
113
- [string]$ClaudeAuthState = 'auto',
114
- [ValidateSet('auto', 'installed', 'missing')]
115
- [string]$CursorInstallState = 'auto',
116
- [ValidateSet('auto', 'authenticated', 'auth_required')]
117
- [string]$CursorAuthState = 'auto',
118
- [ValidateSet('auto', 'installed', 'missing')]
119
- [string]$AntigravityInstallState = 'auto',
120
- [ValidateSet('auto', 'installed', 'missing')]
121
- [string]$GrokInstallState = 'auto',
122
- [ValidateSet('auto', 'installed', 'missing')]
123
- [string]$GooseInstallState = 'auto',
124
- [ValidateSet('auto', 'authenticated', 'auth_required')]
125
- [string]$GooseAuthState = 'auto',
126
- [ValidateSet('auto', 'installed', 'missing')]
127
- [string]$JunieInstallState = 'auto',
128
- [ValidateSet('auto', 'authenticated', 'auth_required')]
129
- [string]$JunieAuthState = 'auto',
130
- [ValidateSet('auto', 'installed', 'missing')]
131
- [string]$KiroInstallState = 'auto',
132
- [ValidateSet('auto', 'installed', 'missing')]
133
70
  [string]$NodeHostInstallState = 'auto',
134
71
  [ValidateSet('auto', 'installed', 'missing')]
135
72
  [string]$GitHubCliInstallState = 'auto',
@@ -164,7 +101,6 @@ function Resolve-BoolArgument {
164
101
  }
165
102
  }
166
103
 
167
- $includeNativeProvidersEnabled = Resolve-BoolArgument -Name 'IncludeNativeProviders' -Value $IncludeNativeProviders
168
104
  $includeLocalModelsEnabled = Resolve-BoolArgument -Name 'IncludeLocalModels' -Value $IncludeLocalModels
169
105
  $parallelChecksEnabled = Resolve-BoolArgument -Name 'Parallel' -Value $Parallel
170
106
 
@@ -178,7 +114,6 @@ function Write-StructuredResult {
178
114
  } else {
179
115
  Write-Host "Status: $($Result.status)"
180
116
  Write-Host "Collection mode: $($Result.collectionMode)"
181
- Write-Host "Native CLI pack: $($Result.nativeCliPack.status)"
182
117
  foreach ($action in $Result.plannedActions) {
183
118
  Write-Host "Planned action: $action"
184
119
  }
@@ -301,78 +236,11 @@ function Invoke-HelperJsonBatch {
301
236
  return $results
302
237
  }
303
238
 
304
- # Map InstalledPackagesJson / OutdatedPackagesJson onto per-CLI -InstallState /
305
- # -OutdatedState so the test fixtures stay deterministic without bulk-pack
306
- # arguments.
307
- $installedPackagesSet = @{}
308
- $hasInstalledPackagesOverride = -not [string]::IsNullOrWhiteSpace($InstalledPackagesJson)
309
- if ($hasInstalledPackagesOverride) {
310
- try {
311
- $parsedInstalled = $InstalledPackagesJson | ConvertFrom-Json
312
- foreach ($entry in $parsedInstalled) {
313
- $installedPackagesSet[[string]$entry] = $true
314
- }
315
- } catch {
316
- throw "Invalid -InstalledPackagesJson payload: $($_.Exception.Message)"
317
- }
318
- }
319
- $outdatedPackagesSet = @{}
320
- $hasOutdatedPackagesOverride = -not [string]::IsNullOrWhiteSpace($OutdatedPackagesJson)
321
- if ($hasOutdatedPackagesOverride) {
322
- try {
323
- $parsedOutdated = $OutdatedPackagesJson | ConvertFrom-Json
324
- foreach ($entry in $parsedOutdated) {
325
- $outdatedPackagesSet[[string]$entry] = $true
326
- }
327
- } catch {
328
- throw "Invalid -OutdatedPackagesJson payload: $($_.Exception.Message)"
329
- }
330
- }
331
-
332
- function Resolve-NpmCliInstallState {
333
- param([string]$PackageName)
334
- if (-not $hasInstalledPackagesOverride) {
335
- return 'auto'
336
- }
337
- if ($installedPackagesSet.ContainsKey($PackageName)) {
338
- return 'installed'
339
- }
340
- return 'missing'
341
- }
342
-
343
- function Resolve-NpmCliOutdatedState {
344
- param([string]$PackageName)
345
- if (-not $hasOutdatedPackagesOverride) {
346
- return 'auto'
347
- }
348
- if ($outdatedPackagesSet.ContainsKey($PackageName)) {
349
- return 'outdated'
350
- }
351
- return 'current'
352
- }
353
-
354
239
  $nodeHostHelperPath = Join-Path $PSScriptRoot 'Install-Node.ps1'
355
240
  $githubCliHelperPath = Join-Path $PSScriptRoot 'Install-GitHubCli.ps1'
356
241
  $prefixHelperPath = Join-Path $PSScriptRoot 'Setup-NodeGlobalPrefix.ps1'
357
- $claudeHelperPath = Join-Path $PSScriptRoot 'Install-ClaudeCode.ps1'
358
- $cursorHelperPath = Join-Path $PSScriptRoot 'Install-CursorAgent.ps1'
359
- $antigravityHelperPath = Join-Path $PSScriptRoot 'Install-Antigravity.ps1'
360
- $grokHelperPath = Join-Path $PSScriptRoot 'Install-Grok.ps1'
361
- $gooseHelperPath = Join-Path $PSScriptRoot 'Install-Goose.ps1'
362
- $junieHelperPath = Join-Path $PSScriptRoot 'Install-Junie.ps1'
363
- $kiroHelperPath = Join-Path $PSScriptRoot 'Install-KiroCli.ps1'
364
242
  $ollamaHelperPath = Join-Path $PSScriptRoot 'Install-Ollama.ps1'
365
243
 
366
- $NpmCliCatalog = @(
367
- [pscustomobject]@{ Key = 'codex'; ScriptName = 'Install-Codex.ps1'; PackageName = '@openai/codex' },
368
- [pscustomobject]@{ Key = 'copilot'; ScriptName = 'Install-Copilot.ps1'; PackageName = '@github/copilot' },
369
- [pscustomobject]@{ Key = 'opencode'; ScriptName = 'Install-OpenCode.ps1'; PackageName = 'opencode-ai' },
370
- [pscustomobject]@{ Key = 'kilo'; ScriptName = 'Install-KiloCli.ps1'; PackageName = '@kilocode/cli' },
371
- [pscustomobject]@{ Key = 'auggie'; ScriptName = 'Install-Auggie.ps1'; PackageName = '@augmentcode/auggie' },
372
- [pscustomobject]@{ Key = 'pi'; ScriptName = 'Install-Pi.ps1'; PackageName = '@earendil-works/pi-coding-agent' }
373
- [pscustomobject]@{ Key = 'cline'; ScriptName = 'Install-Cline.ps1'; PackageName = 'cline' }
374
- )
375
-
376
244
  $prefixHelperArguments = @('-CheckOnly', '-Json')
377
245
  if ($SkipNodeCheck) {
378
246
  $prefixHelperArguments += '-SkipNodeCheck'
@@ -420,109 +288,6 @@ $helperInvocations.Add([pscustomobject]@{
420
288
  Arguments = $prefixHelperArguments
421
289
  })
422
290
 
423
- foreach ($entry in $NpmCliCatalog) {
424
- $cliArguments = @('-CheckOnly', '-Json')
425
- if ($hasInstalledPackagesOverride) {
426
- $cliArguments += '-SkipNpmInvocation'
427
- }
428
- $installState = Resolve-NpmCliInstallState -PackageName $entry.PackageName
429
- if ($installState -ne 'auto') {
430
- $cliArguments += @('-InstallState', $installState)
431
- }
432
- $outdatedState = Resolve-NpmCliOutdatedState -PackageName $entry.PackageName
433
- if ($outdatedState -ne 'auto') {
434
- $cliArguments += @('-OutdatedState', $outdatedState)
435
- }
436
- $helperInvocations.Add([pscustomobject]@{
437
- Key = "npm:$($entry.Key)"
438
- ScriptPath = (Join-Path $PSScriptRoot $entry.ScriptName)
439
- Arguments = $cliArguments
440
- })
441
- }
442
-
443
- if ($includeNativeProvidersEnabled) {
444
- $claudeArguments = @('-CheckOnly', '-Json')
445
- if ($ClaudeInstallState -ne 'auto') {
446
- $claudeArguments += @('-InstallState', $ClaudeInstallState)
447
- }
448
- if ($ClaudeAuthState -ne 'auto') {
449
- $claudeArguments += @('-AuthState', $ClaudeAuthState)
450
- }
451
- $helperInvocations.Add([pscustomobject]@{
452
- Key = 'claude'
453
- ScriptPath = $claudeHelperPath
454
- Arguments = $claudeArguments
455
- })
456
-
457
- $cursorArguments = @('-CheckOnly', '-Json')
458
- if ($CursorInstallState -ne 'auto') {
459
- $cursorArguments += @('-InstallState', $CursorInstallState)
460
- }
461
- if ($CursorAuthState -ne 'auto') {
462
- $cursorArguments += @('-AuthState', $CursorAuthState)
463
- }
464
- $helperInvocations.Add([pscustomobject]@{
465
- Key = 'cursor'
466
- ScriptPath = $cursorHelperPath
467
- Arguments = $cursorArguments
468
- })
469
-
470
- $antigravityArguments = @('-CheckOnly', '-Json')
471
- if ($AntigravityInstallState -ne 'auto') {
472
- $antigravityArguments += @('-InstallState', $AntigravityInstallState)
473
- }
474
- $helperInvocations.Add([pscustomobject]@{
475
- Key = 'antigravity'
476
- ScriptPath = $antigravityHelperPath
477
- Arguments = $antigravityArguments
478
- })
479
-
480
- $grokArguments = @('-CheckOnly', '-Json')
481
- if ($GrokInstallState -ne 'auto') {
482
- $grokArguments += @('-InstallState', $GrokInstallState)
483
- }
484
- $helperInvocations.Add([pscustomobject]@{
485
- Key = 'grok'
486
- ScriptPath = $grokHelperPath
487
- Arguments = $grokArguments
488
- })
489
-
490
- $gooseArguments = @('-CheckOnly', '-Json')
491
- if ($GooseInstallState -ne 'auto') {
492
- $gooseArguments += @('-InstallState', $GooseInstallState)
493
- }
494
- if ($GooseAuthState -ne 'auto') {
495
- $gooseArguments += @('-AuthState', $GooseAuthState)
496
- }
497
- $helperInvocations.Add([pscustomobject]@{
498
- Key = 'goose'
499
- ScriptPath = $gooseHelperPath
500
- Arguments = $gooseArguments
501
- })
502
-
503
- $junieArguments = @('-CheckOnly', '-Json')
504
- if ($JunieInstallState -ne 'auto') {
505
- $junieArguments += @('-InstallState', $JunieInstallState)
506
- }
507
- if ($JunieAuthState -ne 'auto') {
508
- $junieArguments += @('-AuthState', $JunieAuthState)
509
- }
510
- $helperInvocations.Add([pscustomobject]@{
511
- Key = 'junie'
512
- ScriptPath = $junieHelperPath
513
- Arguments = $junieArguments
514
- })
515
-
516
- $kiroArguments = @('-CheckOnly', '-Json')
517
- if ($KiroInstallState -ne 'auto') {
518
- $kiroArguments += @('-InstallState', $KiroInstallState)
519
- }
520
- $helperInvocations.Add([pscustomobject]@{
521
- Key = 'kiro'
522
- ScriptPath = $kiroHelperPath
523
- Arguments = $kiroArguments
524
- })
525
- }
526
291
  if ($includeLocalModelsEnabled) {
527
292
  $ollamaArguments = @('-CheckOnly', '-Json')
528
293
  if ($OllamaInstallState -ne 'auto') {
@@ -546,107 +311,12 @@ $helperResults = if ($parallelChecksEnabled) {
546
311
  $nodeHostResult = $helperResults['nodeHost']
547
312
  $githubCliResult = $helperResults['githubCli']
548
313
  $prefixHelper = $helperResults['prefixHelper']
549
- $claudeResult = if ($helperResults.ContainsKey('claude')) { $helperResults['claude'] } else { $null }
550
- $cursorResult = if ($helperResults.ContainsKey('cursor')) { $helperResults['cursor'] } else { $null }
551
- $antigravityResult = if ($helperResults.ContainsKey('antigravity')) { $helperResults['antigravity'] } else { $null }
552
- $grokResult = if ($helperResults.ContainsKey('grok')) { $helperResults['grok'] } else { $null }
553
- $gooseResult = if ($helperResults.ContainsKey('goose')) { $helperResults['goose'] } else { $null }
554
- $junieResult = if ($helperResults.ContainsKey('junie')) { $helperResults['junie'] } else { $null }
555
- $kiroResult = if ($helperResults.ContainsKey('kiro')) { $helperResults['kiro'] } else { $null }
556
314
  $ollamaResult = if ($helperResults.ContainsKey('ollama')) { $helperResults['ollama'] } else { $null }
557
315
 
558
- # Aggregate the per-CLI npm helper results into a single nativeCliPack-shaped
559
- # object for downstream consumers (renderer, bridge tests) that still expect
560
- # a single status for the npm-global CLI substrate.
561
- $npmCliResults = [ordered]@{}
562
- $npmCliWarnings = [System.Collections.Generic.List[string]]::new()
563
- $npmCliPlanned = [System.Collections.Generic.List[string]]::new()
564
- $npmCliApplied = [System.Collections.Generic.List[string]]::new()
565
- $npmCliInterruptions = [System.Collections.Generic.List[object]]::new()
566
- $npmCliStatuses = [System.Collections.Generic.List[string]]::new()
567
- $npmCliInstalledCount = 0
568
- foreach ($entry in $NpmCliCatalog) {
569
- $key = "npm:$($entry.Key)"
570
- if (-not $helperResults.ContainsKey($key)) {
571
- continue
572
- }
573
- $perCliResult = $helperResults[$key]
574
- $npmCliResults[$entry.Key] = $perCliResult
575
- $npmCliStatuses.Add([string]$perCliResult.status)
576
- if ($perCliResult.installed) {
577
- $npmCliInstalledCount++
578
- }
579
- foreach ($warning in @($perCliResult.warnings)) {
580
- if (-not [string]::IsNullOrWhiteSpace([string]$warning)) {
581
- $npmCliWarnings.Add([string]$warning)
582
- }
583
- }
584
- foreach ($planned in @($perCliResult.plannedActions)) {
585
- if (-not [string]::IsNullOrWhiteSpace([string]$planned)) {
586
- $npmCliPlanned.Add([string]$planned)
587
- }
588
- }
589
- foreach ($applied in @($perCliResult.appliedChanges)) {
590
- if (-not [string]::IsNullOrWhiteSpace([string]$applied)) {
591
- $npmCliApplied.Add([string]$applied)
592
- }
593
- }
594
- if (@($perCliResult.PSObject.Properties.Match('interruptions')).Count -gt 0) {
595
- foreach ($interruption in @($perCliResult.interruptions)) {
596
- if ($null -ne $interruption) {
597
- $npmCliInterruptions.Add($interruption)
598
- }
599
- }
600
- }
601
- }
602
- $nativeCliPackStatus = if ($npmCliStatuses -contains 'failed') {
603
- 'failed'
604
- } elseif ($npmCliStatuses -contains 'changes_required') {
605
- 'changes_required'
606
- } elseif ($npmCliStatuses -contains 'not_installed') {
607
- 'not_installed'
608
- } elseif ($npmCliStatuses.Count -eq 0) {
609
- 'ready'
610
- } else {
611
- 'ready'
612
- }
613
- $nativeCliPack = [pscustomobject]@{
614
- helper = 'windows-native-cli-pack-aggregate'
615
- mode = 'check'
616
- status = $nativeCliPackStatus
617
- installed = ($npmCliInstalledCount -eq $NpmCliCatalog.Count)
618
- packages = $npmCliResults
619
- warnings = $npmCliWarnings.ToArray()
620
- plannedActions = $npmCliPlanned.ToArray()
621
- appliedChanges = $npmCliApplied.ToArray()
622
- interruptions = $npmCliInterruptions.ToArray()
623
- }
624
-
625
316
  $warnings = [System.Collections.Generic.List[string]]::new()
626
317
  $plannedActions = [System.Collections.Generic.List[string]]::new()
627
318
  $interruptions = [System.Collections.Generic.List[object]]::new()
628
- $statuses = @($nodeHostResult.status, $githubCliResult.status, $prefixHelper.status, $nativeCliPack.status)
629
- if ($null -ne $claudeResult) {
630
- $statuses += $claudeResult.status
631
- }
632
- if ($null -ne $cursorResult) {
633
- $statuses += $cursorResult.status
634
- }
635
- if ($null -ne $antigravityResult) {
636
- $statuses += $antigravityResult.status
637
- }
638
- if ($null -ne $grokResult) {
639
- $statuses += $grokResult.status
640
- }
641
- if ($null -ne $gooseResult) {
642
- $statuses += $gooseResult.status
643
- }
644
- if ($null -ne $junieResult) {
645
- $statuses += $junieResult.status
646
- }
647
- if ($null -ne $kiroResult) {
648
- $statuses += $kiroResult.status
649
- }
319
+ $statuses = @($nodeHostResult.status, $githubCliResult.status, $prefixHelper.status)
650
320
  if ($null -ne $ollamaResult) {
651
321
  $statuses += $ollamaResult.status
652
322
  }
@@ -664,49 +334,6 @@ if (-not $nodeMissing -and $prefixHelper.status -ne 'ready') {
664
334
  $plannedActions.Add('repair_npm_prefix')
665
335
  }
666
336
 
667
- if (-not $nodeMissing -and $nativeCliPack.status -ne 'ready') {
668
- # Skip the per-CLI repair signal when Node itself is missing — the npm-global
669
- # CLI helpers cannot run until the host installer finishes.
670
- $plannedActions.Add('repair_native_cli_pack')
671
- }
672
-
673
- if ($null -ne $claudeResult) {
674
- if ($claudeResult.status -eq 'not_installed') {
675
- $plannedActions.Add('provider:install_claude_code_native')
676
- } elseif ($claudeResult.status -eq 'auth_required') {
677
- $plannedActions.Add('provider:authenticate_claude_code')
678
- }
679
- }
680
- if ($null -ne $cursorResult) {
681
- if ($cursorResult.status -eq 'not_installed') {
682
- $plannedActions.Add('provider:install_cursor_agent_native')
683
- } elseif ($cursorResult.status -eq 'auth_required') {
684
- $plannedActions.Add('provider:authenticate_cursor_agent')
685
- }
686
- }
687
- if ($null -ne $antigravityResult -and $antigravityResult.status -eq 'not_installed') {
688
- $plannedActions.Add('provider:install_antigravity_native')
689
- }
690
- if ($null -ne $grokResult -and $grokResult.status -eq 'not_installed') {
691
- $plannedActions.Add('provider:install_grok_native')
692
- }
693
- if ($null -ne $gooseResult) {
694
- if ($gooseResult.status -eq 'not_installed') {
695
- $plannedActions.Add('provider:install_goose_native')
696
- } elseif ($gooseResult.status -eq 'auth_required') {
697
- $plannedActions.Add('provider:authenticate_goose')
698
- }
699
- }
700
- if ($null -ne $junieResult) {
701
- if ($junieResult.status -eq 'not_installed') {
702
- $plannedActions.Add('provider:install_junie_native')
703
- } elseif ($junieResult.status -eq 'auth_required') {
704
- $plannedActions.Add('provider:authenticate_junie')
705
- }
706
- }
707
- if ($null -ne $kiroResult -and $kiroResult.status -eq 'not_installed') {
708
- $plannedActions.Add('provider:install_kiro_native')
709
- }
710
337
  if ($null -ne $ollamaResult) {
711
338
  foreach ($action in $ollamaResult.plannedActions) {
712
339
  $plannedActions.Add("local_model:$action")
@@ -722,44 +349,6 @@ foreach ($warning in $githubCliResult.warnings) {
722
349
  foreach ($warning in $prefixHelper.warnings) {
723
350
  $warnings.Add([string]$warning)
724
351
  }
725
- foreach ($warning in $nativeCliPack.warnings) {
726
- $warnings.Add([string]$warning)
727
- }
728
- if ($null -ne $claudeResult) {
729
- foreach ($warning in $claudeResult.warnings) {
730
- $warnings.Add([string]$warning)
731
- }
732
- }
733
- if ($null -ne $cursorResult) {
734
- foreach ($warning in $cursorResult.warnings) {
735
- $warnings.Add([string]$warning)
736
- }
737
- }
738
- if ($null -ne $antigravityResult) {
739
- foreach ($warning in $antigravityResult.warnings) {
740
- $warnings.Add([string]$warning)
741
- }
742
- }
743
- if ($null -ne $grokResult) {
744
- foreach ($warning in $grokResult.warnings) {
745
- $warnings.Add([string]$warning)
746
- }
747
- }
748
- if ($null -ne $gooseResult) {
749
- foreach ($warning in $gooseResult.warnings) {
750
- $warnings.Add([string]$warning)
751
- }
752
- }
753
- if ($null -ne $junieResult) {
754
- foreach ($warning in $junieResult.warnings) {
755
- $warnings.Add([string]$warning)
756
- }
757
- }
758
- if ($null -ne $kiroResult) {
759
- foreach ($warning in $kiroResult.warnings) {
760
- $warnings.Add([string]$warning)
761
- }
762
- }
763
352
  if ($null -ne $ollamaResult) {
764
353
  foreach ($warning in $ollamaResult.warnings) {
765
354
  $warnings.Add([string]$warning)
@@ -792,14 +381,6 @@ function Add-InterruptionsFromResult {
792
381
 
793
382
  Add-InterruptionsFromResult -HelperResult $nodeHostResult
794
383
  Add-InterruptionsFromResult -HelperResult $githubCliResult
795
- Add-InterruptionsFromResult -HelperResult $nativeCliPack
796
- Add-InterruptionsFromResult -HelperResult $claudeResult
797
- Add-InterruptionsFromResult -HelperResult $cursorResult
798
- Add-InterruptionsFromResult -HelperResult $antigravityResult
799
- Add-InterruptionsFromResult -HelperResult $grokResult
800
- Add-InterruptionsFromResult -HelperResult $gooseResult
801
- Add-InterruptionsFromResult -HelperResult $junieResult
802
- Add-InterruptionsFromResult -HelperResult $kiroResult
803
384
  Add-InterruptionsFromResult -HelperResult $ollamaResult
804
385
 
805
386
  function Test-InterruptionPresent {
@@ -840,16 +421,6 @@ $result = [pscustomobject]@{
840
421
  nodeHost = $nodeHostResult
841
422
  githubCli = $githubCliResult
842
423
  prefixHelper = $prefixHelper
843
- nativeCliPack = $nativeCliPack
844
- nativeProviders = [pscustomobject]@{
845
- claude = $claudeResult
846
- cursor = $cursorResult
847
- antigravity = $antigravityResult
848
- grok = $grokResult
849
- goose = $gooseResult
850
- junie = $junieResult
851
- kiro = $kiroResult
852
- }
853
424
  localModels = [pscustomobject]@{
854
425
  ollama = $ollamaResult
855
426
  }