19 Commits

Author SHA256 Message Date
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 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
Alphaeus Mote 39441eced9 feat(auth): record a generated first-start admin password and add reset-admin
An empty INITIAL_ADMIN_PASSWORD now means generate and record: the one-time
password goes to <data>/initial-admin-password.txt (Administrators, SYSTEM and
the server's own account only; mode 600 elsewhere) and the log only says where.
The file is removed once the password is changed or reset. reset-admin (alias
auth-reset) reads the standalone appsettings.json, so it reaches the same
database with the service running or stopped, takes --user/--password, turns
the account back on and is audited. The compose scripts stop generating the
password into .env.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 20:42:38 -05:00
Alphaeus Mote d84347f5d6 build: ship the pinned object store, and share one across replicas
Silo is pinned by SHA-256 in build/object-store.json and goes into the standalone
packages, the MSI and the backend image, with its licence. Releases carry its
source. The Swarm and Kubernetes stacks run one store as an internal service.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 08:50:37 -05:00
Alphaeus Mote 31869b17ba build(version): packaging and release scripts use semantic versions
Build, Test and the packaging scripts take the version from
Get-Version.ps1 and the short commit from the same place. Both MSIs get
the four-field version as ProductVersion (X.Y.Z.0 for a release, X.Y.Z.N
between releases) instead of the calendar transform. Checksums and release
assets take only their own version's files (1.4.0 no longer matches
1.4.0.7's).

Publish-Release.ps1 creates the tag vX.Y.Z on the released commit and the
release "ExecuteR X.Y.Z" with semantic-release's notes (-NotesFile,
-Prerelease), reuses both on a re-run of the same commit, refuses a version
already tagged on another commit and skips assets uploaded whole.

deploy.sh builds from source with the git version (0.0.0.0 without git)
and runs the images it built by that tag. Test.ps1 runs the watchdog
tests too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:49:46 -04:00
Alphaeus Mote 8a053f5314 chore!: ExecuteR is proprietary (Grace Solutions), not AGPL
The project is not open source, so the AGPL text no longer describes it.

- LICENSE: the Grace Solutions proprietary licence used by the other house
  products, including the clause for the commercially licensed Mantis Pro
  template the console is built on.
- THIRD-PARTY-NOTICES.md: the commercial template, the bundled nats-server
  and the open-source server, agent, console and build components with
  their licences.
- Assemblies carry the copyright; the WebUI package is UNLICENSED; both
  container images are labelled LicenseRef-GraceSolutions-Proprietary.
- Server and agent zips ship LICENSE and THIRD-PARTY-NOTICES.md; the README
  gains a Licence section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 22:18:05 -04:00
Alphaeus Mote c56b6d6f55 feat(webui)!: move the console to React + MUI 9 on the Mantis Pro shell
Replaces the SvelteKit app with a Vite/React 19 console built on the Mantis
Pro 4.2.0 seed (MUI 9.0.1): its theme system, component overrides, drawer
and header, restyled to the slate surfaces and blue accent of the house
consoles, with light/dark/system modes on CSS variables.

This commit is the shell; pages move over in the commits that follow
(routes show a placeholder until then).

- Session context with can(permission); navigation entries the session
  cannot use stay visible, disabled, and say why on hover.
- One API module (cookie auth + CSRF double-submit; a 401 returns to
  sign-in with a safe returnUrl) and SWR for cached, shared reads.
- The browser NATS client is unchanged apart from exposing its connection
  state to React; the header shows it as Live/Connecting/Offline.
- Shared building blocks: PageHeader, DataTable (sort, paging, row
  selection, toolbar slot), TreeList (keyboard, context menu, drag and
  drop), ActionMenu (menus as data, greyed entries explain themselves),
  ConfirmDialog, Sheet, GatedButton, StatusChip and time/format helpers.
- Sign-in keeps local, OIDC, auto-redirect, ?local=1 and the forced
  first-password change.

Build/deploy: `vite build` writes dist/. The webui image now serves it
with a dependency-free server.mjs (SPA fallback, immutable asset caching,
traversal-safe) on the same port 3000, so compose/k8s/swarm and their
health checks are unchanged; Package-Server embeds dist/ instead of the
adapter-static output. `npm run check` is now typecheck + ESLint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 21:04:58 -04:00
gsadmin e70ad0a21b Deployment polish: paths, metadata, execution history, multi-target runs [skip ci]
Standalone setup fixes the jetstream double-nesting (store_dir is the
parent), moves the database to data/db and logs to ./logs; the agent
logs to ./Logs next to its binary. Both MSIs install under
ExecuteR\Server and ExecuteR\Agent, binaries carry ExecuteR
Server/Agent product metadata with dateversion-shortcommit as the
product version, and shipped bundles drop pdbs and the staticwebassets
manifest.

Execution reworks: targets are an add-one-or-more chip list (devices
and groups mix; each run lands in one per-device list with focusable
output), the script page gains a History section, the device page's
tab becomes Execution History grouped by script, and JOB_HISTORY_LIMIT
(default 200 per device, 0 off) prunes old jobs plus their stored
output. Functions drops the Module name placeholder and only opens the
editor on selection or New function.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-09 09:10:10 -04:00
gsadmin 18b40c64b1 Release artifacts carry the product name [skip ci]
MSIs, ZIPs and checksum files rename to ExecuteR-Agent-* and
ExecuteR-Server-* across the packaging scripts, the CI staging/upload
globs and the release asset filter. The agent-package bundle names the
server serves (Agent.msi, Agent-<rid>.zip) are internal delivery paths
and stay unchanged. Takes effect on the next release build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-09 08:33:04 -04:00
gsadmin 9d78ae5e0e Agent TLS skip-verify is an operator choice, never inferred
The install endpoint takes skipVerify=1 instead of auto-detecting: a
self-signed server that later gains a proxy with a real certificate
must not leave agents skipping validation needlessly. The Add Device
modal and the Settings token panel gain a checkbox, pre-selected only
while the server serves its self-signed chain directly. The PowerShell
skip snippet now covers both generations: wildcard
-SkipCertificateCheck defaults on 7+, the ServicePointManager callback
on 5.1 (verified live in both shells).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 21:08:33 -04:00
gsadmin 33b8a8a0bf Self-Signed TLS is now opt-out, with a PEM mirror on Windows
TLS_SELF_SIGNED defaults on everywhere (0 / setup --tls 0 / unchecking
the pre-checked MSI box opts out); the compose stack alone keeps its
internal hop plain HTTP by default because the bundled nginx site
proxies http upstreams. On Windows the machine stores stay
authoritative, but every chain settle now also mirrors certs, keys and
fullchain.crt to <data>/tls (keys marked exportable for refresh) so a
local Caddy / Nginx UI / nginx can bind or trust the files and
renewals keep them current. Test hosts opt out to avoid chain
generation racing across parallel fixtures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 17:18:30 -04:00
gsadmin 28e4878cc9 Optional Self-Signed TLS: encrypted proxy-to-server hop
CI / build-test (push) Successful in 15m9s
CI / images (push) Successful in 2m15s
CI / build-test (pull_request) Successful in 3m17s
CI / images (pull_request) Has been skipped
TLS_SELF_SIGNED=1 (env/appsettings), setup --tls 1, or the new MSI
checkbox switch the listener to HTTPS with a managed ECDSA chain —
root > intermediate > leaf, issued on first boot, auto-renewed ahead
of expiry and hot-swapped via Kestrel's certificate selector without
a restart. Windows persists the chain in the machine stores (Trusted
Roots / Intermediate CAs / Personal, so local browsers trust it);
Linux/macOS/containers use PEM files under <data>/tls with a
fullchain.crt for pinning. Reverse proxies either skip verification
(the hop stays encrypted — the roots just aren't distributed) or
import root+intermediate, re-importing when the chain rotates.

The MSI finish link follows the checkbox to https; short port flag
aliases keep the setup command inside the 255-char CA column, and the
quoted empty ENABLETLS keeps unchecked installs on plain HTTP.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 16:50:55 -04:00
gsadmin 872a09724e Multi-instance standalone servers: port, bind and service-name control
CI / build-test (push) Successful in 15m19s
CI / images (push) Successful in 2m11s
CI / build-test (pull_request) Successful in 3m54s
CI / images (pull_request) Has been skipped
`setup` gains --http-port (default 9080), --bind (default 0.0.0.0, IPv6
literals bracketed automatically), and --nats-port/--nats-ws-port/
--nats-monitor-port for the loopback-only sidecar listeners — all
flowing into the generated nats.conf and appsettings.json, with the
sidecar health poll reading NATS_MONITOR_URL instead of a hardcoded
8222. `service install|uninstall --name <n>` registers instances side
by side (Windows service or systemd unit). One directory per instance
owns its config, database, keys, NATS state and agent packages, so
instances never share anything. Re-running setup over existing config
now says so instead of silently keeping old ports.

Verified live: setup with custom ports produced matching nats.conf and
appsettings values, and --bind 127.0.0.1 landed in Urls.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 15:56:17 -04:00
gsadmin 2bd87f8924 Standalone servers surface the proxy trust and public URL knobs
CI / build-test (push) Successful in 15m19s
CI / images (push) Successful in 2m2s
CI / build-test (pull_request) Successful in 3m19s
CI / images (pull_request) Has been skipped
The Windows and Linux binaries are the same backend, so they already
honor the private-network trust defaults; setup now pre-writes the
optional keys — PUBLIC_SERVER_URL, TRUST_PROXY, TRUSTED_NETWORKS,
TRUSTED_HOSTS — as empty placeholders in the generated appsettings.json
(empty means unset everywhere), and QUICKSTART/README explain the
configuration model: flat keys in appsettings.json next to the binary
or the same names as environment variables, env winning.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 15:44:00 -04:00
gsadmin 083e207cc4 Add device from the Devices page: one-liner installs for every platform
CI / build-test (push) Successful in 15m53s
CI / images (push) Successful in 2m20s
CI / build-test (pull_request) Successful in 3m26s
CI / images (pull_request) Has been skipped
Devices gains an Add device modal (visible with settings.manage): a
horizontal Windows / Linux / macOS selector, a single-use or multi-use
token choice (24-hour expiry), and Generate command — nothing is
created until confirmed; Esc, click-outside or Cancel dismiss without
side effects, and each open starts fresh. The generated one-liner is
copy-ready per platform.

The install endpoint grew unix variants: ?type=linux|osx returns a bash
script that detects the architecture, downloads the matching agent zip
from the same origin, unpacks to /opt/executer/agent, configures
enrollment through the agent''s new cross-platform `configure --url
--token` verb (registry on Windows, agent.json elsewhere) and registers
the systemd unit / launchd daemon. The agent package service serves the
four unix zips alongside Agent.msi/Agent.zip, and both the CI image
bake and the standalone server bundles stage them.

Covered by seven endpoint tests (PowerShell variants, bash variants
with arch detection, token refusal); modal verified live — it issued a
real token and built the Linux one-liner in the shot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 12:48:25 -04:00
gsadmin 573852cb83 Bare setup fully configures the server with admin/admin
CI / build-test (push) Successful in 11m47s
CI / images (push) Failing after 44s
No flags needed: setup writes the admin/admin sign-in by default (the
flags remain as overrides), prints the first sign-in guidance, and the
server MSI wizard matches with lowercase admin/admin defaults.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 09:53:34 -04: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 1ff1a2273e CI builds every platform binary: agent x5 RIDs, standalone server x2
Package-Agent gains -Runtimes and picks the right flavor per RID
(net10.0-windows for win, portable net10.0 elsewhere) — this also fixes
publishing after the multi-targeting change, which requires an explicit
framework. Unix binaries ship as executer-agent; the MSI still harvests
the win-x64 output.

CI packages the agent for win-x64/linux-x64/linux-arm64/osx-x64/
osx-arm64 plus the combined standalone server (win-x64, linux-x64) and
uploads everything as a "binaries" artifact with checksums. Releases
attach the same set (Server zips included), and the release workflow
sets up Node 22 for the static WebUI build the server bundle needs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 20:02:18 -04:00
gsadmin cf907afb4e Standalone combined server: one binary serving UI, API, messaging and NATS
`Package-Server.ps1` produces a self-contained single-file ExecuteRServer
per platform (win-x64/linux-x64) that embeds the WebUI as a static SPA
(ADAPTER=static build; SSR disabled — the app is fully client-driven),
relays /messaging/agent and /messaging/browser over WebSocket to a
bundled nats-server sidecar it supervises (spawned before the NATS
client connects, restarted with backoff, killed on shutdown), and runs
as a Windows service or systemd unit via `service install|uninstall`.
`setup` generates the NATS operator keys, sidecar config (relative
include paths — nats-server mangles Windows drive-letter absolutes) and
appsettings.json. Windows publishes carry the app icon.

Verified end to end from the packaged zip: setup → run → SPA served,
/api/ready shows natsConnected:true, admin login 200, and a WebSocket
to /messaging/browser receives the NATS INFO greeting through the relay.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 19:20:21 -04:00