10 Commits

Author SHA1 Message Date
UNITRONIX c9f7ae5006 fix(agent): hide console windows for PowerShell commands and improve GDI screenshot capture
- Updated PowerShell command invocations to use `-WindowStyle Hidden` to prevent visible console windows during clipboard operations and other commands.
- Implemented GDI-based screenshot capture to eliminate the need for PowerShell, reducing console window spamming during desktop capture.
- Enhanced error handling for missing OpenGL DLLs and ensured complete Mesa DLL set is shipped with the agent to prevent startup issues.
- Updated build scripts to ensure proper installation of required tools and dependencies for Windows builds.
2026-08-09 20:44:12 +02:00
UNITRONIX abe0d52fe4 chore: refresh EOL runtimes and patch non-agent dependencies
Move Docker/CI/installers to Node 24 and Go 1.26 images, bump Alpine server runtime, apply safe npm/Go patch updates, migrate SNMP to pysnmp, and document deferred majors.
2026-08-01 09:19:42 +02:00
UNITRONIX 1118fc2ba6 Anonymize operator infrastructure fingerprints from public repo.
Remove internal LAN IP, SSH user, and developer paths from docs and examples; move deploy runbook to gitignored docs/private with a public template; drop Cursor debug logging leftovers; add CI checks to prevent regression.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 19:07:42 +02:00
UNITRONIX 09d20c3444 feat(consent): streamline remote consent handling for terminal and desktop sessions
Refactored the consent handling logic for both terminal and desktop sessions to utilize a unified requestRemoteConsent method. This change simplifies the consent process, ensuring consistent behavior across different session types. Additionally, introduced default session ID handling and improved logging for consent status. Updated related payload structures to include operator names for better tracking.
2026-06-07 12:03:49 +02:00
UNITRONIX 8fe678f980 Implement device self-help request and enhance enrollment token handling
- Added a new API endpoint for enrolled devices to raise help requests via REST when not connected to CDAP.
- Improved the device enrollment process by issuing a device token during status polls, allowing for seamless recovery of CDAP authentication.
- Enhanced error handling for device token validation and ensured proper responses for various failure scenarios.
- Updated the build process to support dual UI binaries for Linux (X11 and Wayland) and included a session-aware launcher.
- Refactored the installation script to accommodate the new Linux UI bundle structure, improving deployment flexibility.
2026-06-04 20:06:12 +02:00
UNITRONIX 8bd60d1193 Refactor UI status handling and improve Go toolchain installation checks
- Updated the UI to utilize a new status handling method, enhancing the display of connection and enrollment statuses.
- Introduced a status dot indicator for better visual feedback on connection state.
- Refactored the Go toolchain installation script to verify the presence of the JSON package instead of PNG, improving compatibility checks.
- Enhanced error handling in the agent build worker to streamline the build process and ensure proper environment setup.
2026-06-04 04:12:01 +02:00
UNITRONIX 7bac0e774a Implement Go toolchain installation and health checks
- Added a new function to install the Go toolchain if it's missing or broken, ensuring proper setup for support-agent Generator builds.
- Enhanced the agentBuildWorker to check for a healthy Go binary and requeue builds that failed due to a broken Go installation.
- Updated the build environment configuration to prioritize a working Go toolchain, improving the reliability of the build process.
2026-06-04 03:23:23 +02:00
UNITRONIX d07da4951a Implement support agent staging and enhance connection handling
- Added a new function to stage the Go support-agent source for Generator builds, ensuring proper setup without a full git checkout.
- Refactored connection handling to improve TLS configuration, allowing for insecure connections based on environment variables.
- Updated UI elements for better user experience, including resizing and wrapping labels for status messages.
- Enhanced the enrollment process with improved error handling and status updates.
- Introduced new environment variables and command-line options for running the agent without a GUI, catering to environments like VMs or RDP.
- Updated README and build scripts to reflect new features and requirements.
2026-06-04 03:08:17 +02:00
UNITRONIX a31d91753c feat(agent-client): wire runtime branding into SolidJS UI + fix Windows target
App.tsx now loads the per-deployment branding profile (get_branding IPC) during boot and applies it to the document: primary/accent colors map onto the existing --accent CSS variables, product name becomes the document title, and an optional logo data URL becomes the favicon. New src/lib/branding.ts exposes loadBranding()/getBranding() with safe fallbacks to built-in BetterDesk defaults so unbranded developer builds still render.

install-build-toolchain.sh now installs the x86_64-pc-windows-msvc Rust target instead of windows-gnu, because the build worker cross-compiles Windows installers via cargo-xwin (MSVC ABI). The previous gnu target caused every windows/exe build to fail with 'Target x86_64-pc-windows-msvc is not installed'.

This commit was made possible thanks to Insolve.
2026-05-31 01:25:39 +02:00
UNITRONIX 760c0e933d feat(agent-client): alpha bundle generator + cross-platform build pipeline
Generator UI: web-nodejs/views/generator.ejs + public/js/generator.js + public/css/generator.css. Logo upload up to 10 MB, 16 MB body parser, branding form (product name, colors, server URL, etc.), per-branding hash deduplication.

Build pipeline: web-nodejs/services/agentBundleService.js (queue API + branding hash) and agentBuildWorker.js (DB-backed queue, 5s poll, concurrency 1, 30 min timeout). Spawns 'cargo tauri build --bundles <fmt> [--target <triple>] [--runner cargo-xwin]' per platform under systemd User=root. Loads /etc/betterdesk/build.env at module top so BUILD_USER/CARGO_HOME/PATH survive empty service env. Uses absolute CARGO_BIN/NPM_BIN paths to avoid PATH-resolution issues. Artifact path resolution honors profile.target presence (no triple subdir when omitted).

Toolchain installer: scripts/install-build-toolchain.sh (Rust + targets + cargo-tauri + cargo-xwin + mingw + makensis + dpkg-deb + rpmbuild + appimagetool + pnpm + node), writes /etc/betterdesk/build.env, 12-tool verification. Wired into betterdesk.sh menu as option B with post-install rsync of agent source to /opt/BetterDeskConsole/agent-source/.

Agent download page: web-nodejs/views/agent-download.ejs + public/css/agent-download.css for end-user installer downloads per platform/format with live status.

Branding scaffold (Tauri side): betterdesk-agent-client/src-tauri/src/branding.rs (Branding struct + OnceLock cache + BETTERDESK_AGENT_BRANDING env override + BaseDirectory::Resource resolve). resources/branding.json (dev skeleton). lib.rs registers module + get_branding command. commands.rs exposes get_branding IPC. tauri.conf.json declares resources/branding.json. Frontend integration of get_branding is intentionally pending — alpha.

Database: web-nodejs/services/database.js + dbAdapter.js add agent_bundle_builds + agent_bundles tables with full PostgreSQL + SQLite parity.

i18n: en.json + pl.json + zh-TW.json get ~75 new keys covering generator wizard, build status, download page, and toolchain installer messages.

Validated end-to-end on prod (Ubuntu 24.04, 4-core, PostgreSQL): linux/x64/AppImage built successfully (83.7 MB, 283s) for branding hash 25e2f242. linux/deb in progress, rpm + windows/exe queued.

Known follow-ups (NOT in this commit): SolidJS invoke('get_branding') wiring in App.tsx, betterdesk.ps1 toolchain menu mirror, reset-password.js PostgreSQL support, Docker decision.

This commit was made possible thanks to Insolve.
2026-05-29 07:15:45 +02:00