@trillboards/edge-sdk 0.2.157 → 0.2.158

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.
@@ -346,13 +346,19 @@ function Get-LitertlmShimPaths([string]$UvPath) {
346
346
  (Join-Path $PSScriptRoot '..\litertlm\trillboards_litertlm_shim.py')
347
347
  )) { if (Test-Path -LiteralPath $candidate -PathType Leaf) { $shim = $candidate; break } }
348
348
  if (-not $shim) { throw 'The released litert-lm shim is missing' }
349
- $toolDir = (& $UvPath tool dir 2>$null | Select-Object -First 1)
350
- if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($toolDir)) { throw 'Cannot resolve uv tool dir' }
349
+ # PS 5.1 stops a native process when Select-Object -First has its line,
350
+ # turning a successful lookup into exit -1. Drain stdout before selecting.
351
+ $toolDirOutput = @(& $UvPath tool dir 2>$null)
352
+ $toolDirExit = $LASTEXITCODE
353
+ $toolDir = $toolDirOutput | Select-Object -First 1
354
+ if ($toolDirExit -ne 0 -or [string]::IsNullOrWhiteSpace($toolDir)) { throw 'Cannot resolve uv tool dir' }
351
355
  $venv = [IO.Path]::GetFullPath((Join-Path $toolDir.Trim() 'litert-lm'))
352
356
  $py = Join-Path $venv 'Scripts\python.exe'
353
357
  if (-not (Test-Path -LiteralPath $py -PathType Leaf)) { throw 'The installed litert-lm Python is missing' }
354
- $site = (& $py -c "import sysconfig;print(sysconfig.get_paths()['purelib'])" 2>$null | Select-Object -First 1)
355
- if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($site)) { throw 'Cannot resolve litert-lm site-packages' }
358
+ $siteOutput = @(& $py -c "import sysconfig;print(sysconfig.get_paths()['purelib'])" 2>$null)
359
+ $siteExit = $LASTEXITCODE
360
+ $site = $siteOutput | Select-Object -First 1
361
+ if ($siteExit -ne 0 -or [string]::IsNullOrWhiteSpace($site)) { throw 'Cannot resolve litert-lm site-packages' }
356
362
  $site = [IO.Path]::GetFullPath($site.Trim())
357
363
  if (-not $site.StartsWith(($venv.TrimEnd('\') + '\'), [StringComparison]::OrdinalIgnoreCase) -or
358
364
  -not (Test-Path -LiteralPath $site -PathType Container)) { throw 'The runtime site is outside its managed venv' }
@@ -735,8 +741,13 @@ if ((Test-LitertLmCli) -and ($installedLitertLmVersion -eq $LitertLmVersion)) {
735
741
  # --force` rebuilds the venv and takes both files with it, while Test-LitertLmCli
736
742
  # short-circuits that branch on a healthy CLI -- gating this behind it is exactly
737
743
  # how a repaired-and-healthy machine would keep the slow serve and report fine.
738
- # Never throws: this is a speed fix, and it must not be able to fail an install.
739
- Install-LitertlmShim -UvPath $uvCmd.Source | Out-Null
744
+ # The adapter also binds runtime model proof to each response; it is required
745
+ # before readiness probes can verify the installed model.
746
+ if (-not (Install-LitertlmShim -UvPath $uvCmd.Source)) {
747
+ Fail-LocalAi "The local AI runtime adapter could not be installed. See $LogPath."
748
+ Stop-SetupLock
749
+ exit 1
750
+ }
740
751
 
741
752
  $bundledModelVerified = $false
742
753
  if (-not [string]::IsNullOrWhiteSpace($BundledModelPath)) {
package/dist/EdgeAgent.js CHANGED
@@ -44,7 +44,7 @@ const edge_ads_1 = require("@trillboards/edge-ads");
44
44
  const CommandRouter_1 = require("./CommandRouter");
45
45
  const config_1 = require("./config");
46
46
  const dataDir_1 = require("./dataDir");
47
- const SDK_VERSION = '0.2.157';
47
+ const SDK_VERSION = '0.2.158';
48
48
  class EdgeAgent extends events_1.EventEmitter {
49
49
  constructor(config, deps) {
50
50
  super();
@@ -31,7 +31,7 @@ export interface DiagnosticReport {
31
31
  skipped: number;
32
32
  };
33
33
  }
34
- declare const SDK_VERSION = "0.2.157";
34
+ declare const SDK_VERSION = "0.2.158";
35
35
  declare function checkNodeVersion(): CheckResult;
36
36
  declare function checkPlatform(): CheckResult;
37
37
  declare function checkMemory(): CheckResult;
package/dist/diagnose.js CHANGED
@@ -63,7 +63,7 @@ const localNetworkAccess_1 = require("./localNetworkAccess");
63
63
  // ---------------------------------------------------------------------------
64
64
  // SDK version — mirrors package.json; kept in sync by CI
65
65
  // ---------------------------------------------------------------------------
66
- const SDK_VERSION = '0.2.157';
66
+ const SDK_VERSION = '0.2.158';
67
67
  exports._SDK_VERSION = SDK_VERSION;
68
68
  // ---------------------------------------------------------------------------
69
69
  // ANSI helpers (no external deps)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trillboards/edge-sdk",
3
- "version": "0.2.157",
3
+ "version": "0.2.158",
4
4
  "description": "Composable cross-platform Edge AI SDK for audience sensing on DOOH/CTV devices",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",