7 Commits

Author SHA256 Message Date
Alphaeus Mote f5de1cc197 Merge server installer database, folders and network pages [skip ci]
# Conflicts:
#	README.md
2026-11-06 17:39:46 -05:00
Alphaeus Mote 23b6feae6b feat(installer): database, folders and network pages for the server MSI
The server MSI's wizard is now Welcome > Folders > Database > Certificate >
Server Address > Ready, after StifleR's flow:

- Folders: install, data, log and backup folders with Browse (defaults follow
  a changed install folder), Enable Windows Long Paths while they are off.
- Database: SQLite, PostgreSQL (host, port, database, SSL mode, user,
  password) or SQL Server (server\instance, port, database, Windows or SQL
  login, Encrypt, Trust Server Certificate), Create If Missing, and Test
  Connection with the server's own error; Next needs a passing test or
  Continue Without a Successful Test.
- Server Address: HTTPS port and an HTTP redirect port, Listen On all or one
  of this computer's addresses, NATS and object store ports, public URL,
  firewall rules; a port in use names the program holding it.

Every choice is a public property (DATAFOLDER LOGFOLDER BACKUPFOLDER
ENABLELONGPATHS DBPROVIDER DBSERVER DBPORT DBNAME DBAUTH DBUSER DBPASSWORD
DBSSLMODE DBENCRYPT DBTRUSTCERT DBCREATE DBSKIPTEST HTTPREDIRECTPORT
OBJECTSTOREPORT PUBLICSERVERURL FIREWALL), checked the same way for /qn
before anything changes. The custom actions test PostgreSQL with their own
protocol client (SCRAM-SHA-256, MD5, SSL) and SQL Server with
System.Data.SqlClient, create the database when the account may (and give
the service's Windows login db_owner), write appsettings.json in place, keep
the password DPAPI-protected and out of the log, restrict the file and new
folders to SYSTEM and Administrators, create long folders through \\?\, and
keep netsh firewall rules for the ports in effect.

Upgrades find the install folder again, keep the configuration and change
the database only when the command line gives another; the choices but the
password are remembered for a reinstall. The banner and Welcome/Finish
artwork are drawn from the product icon by Generate-Icons.ps1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 17:37:59 -05:00
Alphaeus Mote 382fcaa24e Merge Being Viewed banner [skip ci]
# Conflicts:
#	scripts/Generate-Icons.ps1
#	src/Installer/Policies/README.md
2026-11-06 15:02:41 -05:00
Alphaeus Mote 5eb4edf900 feat(screen): Being Viewed banner in the signed-in user's session, with Stop
- New src/Agent.Banner (ExecuteR-Banner.exe): a WinForms tool window at the
  top centre, always on top, never activated, draggable, per-monitor DPI,
  light/dark/high contrast, embedded icon (assets/icons/banner.ico: the
  product tile with an eye). "Being Viewed by <operator> · View Only|Control"
  and Stop, one row per session. Hardens DLL search first thing; talks only
  to a pipe owned by SYSTEM and served from session 0, at Identification.
- Agent: ScreenBanner follows the open sessions and the console and decides
  (ScreenBannerPolicy) when the banner runs: policy off, Windows PE, nothing
  open, nobody signed in -> never; console switch, sign-out, another user ->
  end (and launch for whoever is there); a banner that went away -> end,
  retry after 30 s. WindowsScreenBannerLauncher starts it with
  WTSQueryUserToken (the filtered token, never SYSTEM), the user's
  environment, winsta0\default, no inherited handles, image-load
  mitigations, a kill-on-close job, from the protected agent folder.
- IPC (ScreenBannerProtocol, ScreenBannerConnection): a per-launch nonce pipe
  created first (first instance, one instance, SYSTEM owner, SYSTEM full +
  the user's SID read/write, network denied); the client must be the
  launched PID in its session (GetNamedPipeClientProcessId /
  GetNamedPipeClientSessionId). Service -> banner: display data only.
  Banner -> service: exactly "stop <id>", 64-byte lines, honoured only for a
  session it shows in its console session; anything else ends it.
- Stop: the agent sends a final StoppedAtDevice state and ends the streams,
  and refuses a reconnect of that session (status "stopped"). The server ends
  the session with its own reason "Stopped by the user at the device." and
  audits it as ended. The open request now carries the operator's display
  name for the banner.
- RemoteViewBanner (default off) is read like the other Remote View policy
  values and reported in the inventory policy (on only where the banner can
  run).
- Tests: protocol (only a valid stop of a shown session, garbage, overlong
  and non-UTF-8 lines, wrong client PID or session refused), launcher
  decisions, the banner manager with a fake launcher, the agent's display
  data and stop path, the pipe ACL, the protected-folder check, the
  server's handling and audit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 14:44:59 -05:00
Alphaeus Mote d0bb160537 build: commit the product icon, generated without ImageMagick
scripts/Generate-Icons.ps1 now renders assets/icons/app.ico from
assets/icon-source.png with System.Drawing (no installs, Windows PowerShell
or pwsh, byte-identical across runs): 16, 20, 24, 32, 40, 48, 64 and 128 px
as 32-bit DIBs and 256 px PNG-compressed (124 KB, was 370 KB with six
uncompressed frames).

The .ico is committed and every build embeds it, so local builds match CI.
The packaging scripts and workflows no longer generate it at build time
(the ImageMagick step wrote artifacts/icons/app.ico, which nothing read):
-SkipIcon and the release "Generate icon" step are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 13:53:42 -05:00
gsadmin 2833468cb3 Server MSI, in-code bootstrap, bundled agent delivery, ExecuteR-Server
setup now lives fully in the binary to suit every platform: it accepts
--admin-user/--admin-password (written into appsettings.json on first
run only), downloads nats-server for the current OS/architecture when
the sidecar is absent (zip/tar.gz, BCL only), and wires
AGENT_PACKAGE_PATH at the bundled agent-package directory. Bundles ship
Agent.msi + Agent.zip + VERSION next to the server, so the URL install
command works immediately instead of reporting Missing. Direct binaries
are named ExecuteR-Server(.exe); container names are unchanged. The
committed icon (assets/icons/app.ico) embeds in every build, CI
included.

New Windows installer (src/Installer.Server): harvests the whole
bundle, shows an Administrator account page (defaults Admin/Admin,
ADMINUSERNAME/ADMINPASSWORD properties for silent installs), then runs
the binary''s own `setup` and `service install` — idempotent, so
upgrades and repairs never overwrite existing configuration. Uninstall
stops and removes the service. Verified end to end: MSI carries all 169
files, setup from a bare directory downloaded the sidecar, and the
booted server answered ready (db+nats+signing), signed in Admin/Admin,
served the SPA and reported the bundled Agent.msi with version and
SHA-256.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 09:37:29 -04:00
gsadmin eab5d78ce3 Infra: NATS operator-mode config, Compose stack, Dockerfiles, scripts, WebUI scaffold
- nats.conf: JetStream + WebSocket listener behind reverse proxy, file resolver
- docker-compose(.dev).yml: nats/backend/webui with health checks and volumes
- Multi-stage backend/webui Dockerfiles (non-root, unified version labels)
- Scripts: unified version, build, test, icon generation (ImageMagick via
  winget when missing), agent packaging with checksums, local secrets and
  repo initialization
- SvelteKit WebUI scaffold (Svelte 5, adapter-node, TS) with NATS core,
  nkeys, Monaco and xterm dependencies
- Placeholder icon source + assets/secrets documentation

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 18:43:09 -04:00