@beeos-ai/cli 1.0.23 → 1.1.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beeos-ai/cli",
3
- "version": "1.0.23",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "description": "BeeOS CLI — run AI agents from your desktop",
6
6
  "bin": {
@@ -80,7 +80,13 @@ Describe "install.ps1 parse-time integrity" {
80
80
  "Invoke-BeeosCli",
81
81
  # P2-8: PSCore + RunAs auto-elevation helpers.
82
82
  "Test-IsAdministrator",
83
- "Request-Elevation"
83
+ "Request-Elevation",
84
+ # Multi-OS install-link refactor Phase 2: TightVNC
85
+ # pre-check. install.sh has a parallel `test_vnc_server`
86
+ # function for Linux. Listed here so a future cleanup
87
+ # that drops the helper triggers a Pester failure
88
+ # before reaching customers.
89
+ "Test-VncServer"
84
90
  )
85
91
 
86
92
  foreach ($name in $expected) {
@@ -24,6 +24,11 @@
24
24
  $env:BEEOS_DASHBOARD_URL Dashboard base (OAuth / bind redirect).
25
25
  $env:BEEOS_INSTALL_DRY_RUN=1 CI smoke-test escape hatch.
26
26
  $env:BEEOS_NO_TELEMETRY=1 Disable script-level telemetry POSTs.
27
+ $env:BEEOS_NO_DESKTOP=1 Skip TightVNC detection/install hint.
28
+ Forwarded to `beeos init` so the
29
+ CLI's desktop pipeline also stays
30
+ dormant (Phase 2 of the multi-OS
31
+ install-link refactor).
27
32
  $env:BEEOS_USE_NPX = "1" Power-user throwaway install (beeos
28
33
  won't persist on PATH).
29
34
 
@@ -562,6 +567,47 @@ if (-not (Test-NodeVersion)) {
562
567
  $nodeVer = & node -v
563
568
  Write-BeeOk "Node.js $nodeVer detected"
564
569
 
570
+ # ── TightVNC detection (Phase 2 of multi-OS install-link refactor) ────
571
+ #
572
+ # BeeOS desktop streaming on Windows uses TightVNC + the existing
573
+ # vnc-bridge sidecar (same RFB pipeline as macOS / Linux). The CLI's
574
+ # `DesktopPlatform.windows` adapter takes over once `beeos init` runs:
575
+ # it generates a viewer password, writes the TightVNC registry config
576
+ # under UAC, and starts/restarts `tvnserver`. This script's only job
577
+ # at install time is the user-facing hint — pointing the user at
578
+ # `winget install GlavSoft.TightVNC` so the cold-start has something
579
+ # to configure on the next `beeos init`.
580
+ #
581
+ # Skipped entirely when:
582
+ # - $env:BEEOS_NO_DESKTOP = "1" (hint AND CLI desktop pipeline off)
583
+ # - the user opted into `-Device` mode (device-attach flow has its
584
+ # own VNC handling via `--vnc-host`).
585
+ function Test-VncServer {
586
+ if ($env:BEEOS_NO_DESKTOP -eq "1") {
587
+ Write-BeeInfo "BEEOS_NO_DESKTOP=1 — skipping TightVNC detection."
588
+ return
589
+ }
590
+ if ($Device) {
591
+ # device-attach handles its own VNC story; the OpenClaw
592
+ # auto-desktop path is only taken by `beeos init`.
593
+ return
594
+ }
595
+ $svc = Get-Service tvnserver -ErrorAction SilentlyContinue
596
+ $reg = Test-Path "HKLM:\SOFTWARE\TightVNC\Server"
597
+ if ($svc -or $reg) {
598
+ Write-BeeOk "TightVNC detected — `beeos init` will configure it for desktop streaming."
599
+ return
600
+ }
601
+ Write-Host ""
602
+ Write-BeeInfo "Optional: BeeOS desktop streaming on Windows uses TightVNC."
603
+ Write-Host " Install with:" -ForegroundColor White
604
+ Write-Host " winget install GlavSoft.TightVNC --accept-package-agreements --accept-source-agreements --silent"
605
+ Write-Host ""
606
+ Write-Host " Then re-run `beeos init`. Set $env:BEEOS_NO_DESKTOP = '1' to suppress this hint." -ForegroundColor DarkGray
607
+ Write-Host ""
608
+ }
609
+ Test-VncServer
610
+
565
611
  # Bootstrap is finished. Hand off to `Invoke-BeeosCli` which performs
566
612
  # `npm install -g @beeos-ai/cli` (idempotent — npm short-circuits when
567
613
  # the requested version is already on disk) and then runs the freshly
@@ -43,6 +43,12 @@
43
43
  # BEEOS_INSTALL_DRY_RUN=1 CI smoke-test escape hatch — return 0
44
44
  # from main() before any side effect.
45
45
  # BEEOS_NO_TELEMETRY=1 Disable the script-level telemetry POSTs.
46
+ # BEEOS_NO_DESKTOP=1 Skip the TigerVNC pre-check (Linux) and
47
+ # forwarded to `beeos init` so the CLI's
48
+ # `getDesktopPipeline()` chokepoint also
49
+ # short-circuits, suppressing every macOS /
50
+ # Linux cold-start side effect. Mirrors
51
+ # install.ps1's same-named env var.
46
52
  # BEEOS_USE_NPX=1 Power-user throwaway install (beeos won't
47
53
  # persist on PATH).
48
54
  #
@@ -451,6 +457,56 @@ print_install_hints() {
451
457
  echo ""
452
458
  }
453
459
 
460
+ # ── TigerVNC pre-check (Linux desktop streaming) ─────────────
461
+ #
462
+ # Mirrors install.ps1's `Test-VncServer`. BeeOS desktop streaming on
463
+ # Linux uses TigerVNC + the `vnc-bridge` sidecar (same RFB pipeline
464
+ # as macOS / Windows). The CLI's `LinuxDesktopPlatform` adapter takes
465
+ # over once `beeos init` runs: it generates a viewer password,
466
+ # writes `~/.vnc/passwd` via `tigervncpasswd -f`, mirrors plaintext
467
+ # into `~/.beeos/vnc.password`, and starts `vncserver :1 -localhost
468
+ # yes` if not already listening. This script's only job at install
469
+ # time is the user-facing hint — pointing the user at the
470
+ # distro-appropriate package so the cold-start has something to
471
+ # configure on the next `beeos init`.
472
+ #
473
+ # Skipped entirely when:
474
+ # - $BEEOS_NO_DESKTOP = "1" (hint AND CLI desktop pipeline off)
475
+ # - the user invoked `--device` mode (device-attach handles its own
476
+ # VNC story via `--vnc-host`).
477
+ # - host is darwin (macOS Screen Sharing is built-in; the CLI's
478
+ # `MacosDesktopPlatform` cold-start handles enable + password
479
+ # generation, no install-time hint needed).
480
+ #
481
+ # Detection: command -v tigervncpasswd or vncpasswd. Both are part
482
+ # of standard distro packages (tigervnc-standalone-server on
483
+ # Debian/Ubuntu, tigervnc-server on Fedora/RHEL, tigervnc on Arch).
484
+ test_vnc_server() {
485
+ if [[ "${BEEOS_NO_DESKTOP:-}" == "1" ]]; then
486
+ info "BEEOS_NO_DESKTOP=1 — skipping TigerVNC pre-check."
487
+ return 0
488
+ fi
489
+ if [[ "$MODE" == "device" ]]; then
490
+ return 0
491
+ fi
492
+ if [[ "$OS_KIND" != "linux" ]]; then
493
+ return 0
494
+ fi
495
+ if command -v tigervncpasswd &>/dev/null || command -v vncpasswd &>/dev/null; then
496
+ success "TigerVNC detected — \`beeos init\` will configure it for desktop streaming."
497
+ return 0
498
+ fi
499
+ echo ""
500
+ info "Optional: BeeOS desktop streaming on Linux uses TigerVNC."
501
+ echo " Install with one of:"
502
+ echo " Debian/Ubuntu: sudo apt install tigervnc-standalone-server"
503
+ echo " RHEL/Fedora: sudo dnf install tigervnc-server"
504
+ echo " Arch: sudo pacman -S tigervnc"
505
+ echo ""
506
+ echo " Then re-run \`beeos init\`. Set BEEOS_NO_DESKTOP=1 to suppress this hint."
507
+ echo ""
508
+ }
509
+
454
510
  # ── Main ─────────────────────────────────────────────────────
455
511
 
456
512
  run_cli() {
@@ -559,6 +615,13 @@ main() {
559
615
 
560
616
  success "Node.js $(node -v) detected"
561
617
 
618
+ # Phase 3 of the multi-OS install-link refactor: TigerVNC pre-check
619
+ # for Linux. Parallels install.ps1's `Test-VncServer`. Silent
620
+ # success when the tool is on PATH; printable hint when missing.
621
+ # Skipped on darwin (macOS Screen Sharing is configured by the
622
+ # CLI's `MacosDesktopPlatform` cold-start) and in `--device` mode.
623
+ test_vnc_server
624
+
562
625
  # Bootstrap is finished. Hand off to `run_cli` which performs
563
626
  # `npm install -g @beeos-ai/cli` (idempotent — npm short-circuits
564
627
  # when the requested version is already on disk) and then `exec`s