Add headless API mode (--headless flag)
Details
PrivStack can now run as a headless API server without the Avalonia GUI,
enabling programmatic access via scripts, CI/CD, or background services.
CLI interface:
privstack --headless [--workspace <name>] [--port <N>] [--bind <addr>]
privstack --headless --show-api-key
privstack --headless --generate-api-key
New files:
- HeadlessOptions: parsed CLI arguments record
- HeadlessHost: startup orchestrator (workspace resolution, auth via
PRIVSTACK_MASTER_PASSWORD env var or stdin prompt, plugin discovery,
API server lifecycle, graceful SIGTERM/SIGINT shutdown)
- HeadlessStubs: no-op implementations for 8 UI service interfaces
(dispatcher, dialogs, toast, theme, font scale, layout, notifications,
focus mode)
Modified files:
- Program.cs: Main() returns int exit codes, branches to HeadlessHost
when --headless detected via hand-rolled arg parser
- ServiceRegistration: extracted RegisterCoreServices() + WireCorePostBuild()
shared methods, added ConfigureHeadless() with stub registrations and
cached-password vault unlock
- App.axaml.cs: Services setter changed to internal for HeadlessHost access
- ILocalApiServer/LocalApiServer: added BindAddress property, non-localhost
Kestrel binding support, workspace name/ID in /api/v1/status response
Exit codes: 0=success, 1=config, 2=auth, 3=port-in-use, 4=db-locked
Replace endpoint detail child window with inline ModalOverlay
Details
The ApiRouteDetailWindow was a separate child window shown via
ShowDialog(this) — on macOS, child dialogs are constrained to the parent
window's bounds, causing long response content to get clipped with no
way to scroll further.
Replaced with the shared ModalOverlay control from PrivStack.UI.Adaptive,
rendered inline inside ApiDocsWindow via a Panel wrapper. Route detail
content (cURL, params, request/response) is now built directly into the
overlay body. Deleted ApiRouteDetailWindow entirely.
Revert "Fix API endpoint detail dialog clipping on macOS"
Details
This reverts commit 1fd77727299d661a526e37e61f0b5634561c56bc.
Get notified about new releases