536 Commits

Author SHA256 Message Date
Alphaeus Mote 59c06e33bb feat(shell): clipboard for the remote shell [skip ci]
Copy with Ctrl+Shift+C, Ctrl+Insert or Ctrl+C over a selection (Ctrl+C
alone still interrupts); paste with Ctrl+V, Ctrl+Shift+V or Shift+Insert
through the browser's own paste; right-click copies the selection or
pastes. Copy and Paste buttons on the shell page and the pop-out toolbar.
Terminal Settings: right-click behaviour, Copy on Select, and Ask Before
Multi-Line Paste for shells that would run each pasted line. Pastes over
1 MiB are refused; input goes to the device in 32 KiB pieces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v1.14.0
2026-11-18 19:51:08 -05:00
Alphaeus Mote 974c0528d6 Merge branch 'feat/intellisense' [skip ci] 2026-11-18 17:46:58 -05:00
Alphaeus Mote dfd0cf36bf Merge branch 'feat/snippets' [skip ci] 2026-11-18 17:46:57 -05:00
Alphaeus Mote c3cdd36922 fix(shell): a multi-line snippet never types into a shell that would run each line [skip ci]
Without bracketed paste every line break is an Enter; the picker says so
and inserts nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 17:46:46 -05:00
Alphaeus Mote 7c3488705d feat(editor): full PowerShell IntelliSense catalog — .NET types and members, 1,100 commands [skip ci]
- .NET: 2,664 types across 68 namespaces (System, IO, Net, Text, Collections,
  Security/Cryptography, Diagnostics, Threading, Management.Automation,
  Microsoft.Win32, DirectoryServices, Xml, Web, InteropServices, …) with
  overload signatures, constants, enum values, constructors, the 107 type
  accelerators and ETS members. [Type]:: lists static members and new(),
  [System.IO. completes namespaces and types, generic arguments included.
- Commands: core Microsoft.PowerShell.* modules, CimCmdlets, NetTCPIP,
  NetSecurity, ScheduledTasks, Storage, Defender, PKI, Dism, BitLocker, … with
  typed parameters, parameter sets (syntax in hover), ValidateSet/enum values
  after -Parameter, output types, aliases, and the edition where a command or
  parameter exists on only one of 5.1 / 7. 680 curated synopses.
- Instance members after $x. when the type is evident: [T]$x declarations and
  params, assignments from casts, ::new(), static members, New-Object,
  commands (output types, Get-CimInstance class, registry and Cert: paths),
  pipelines (Where/Sort/Select -ExpandProperty/-Property), foreach loops,
  $_ in ForEach-Object/Where-Object and catch blocks, hashtable and
  [pscustomobject] literal keys, CIM class properties, $Files.<name>.
- Signature help for method and constructor overloads; hover for types,
  members, parameters, aliases and inferred variable types.
- Catalog JSON loads as two lazy chunks on first PowerShell focus or
  completion; generator under src/WebUI/scripts/powershell-catalog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 17:45:57 -05:00
Alphaeus Mote 4f689ba4be feat(scripts): Snippets library for the editors and the remote shell [skip ci]
A shared library of code to insert, under Automation > Snippets. 55 built-in
snippets ship with the server (PowerShell for Windows admins, Bash for Linux,
and ExecuteR's own: exit 3010/194, $Secrets, $Files, $ExecuteRJobDir,
$Trigger); operators add their own. Built-ins come from code with fixed ids:
they can be read and copied, never changed or deleted.

- /api/snippets CRUD plus /api/snippets/{id}/copy: Scripts View to read,
  Manage Scripts to change, audited under Scripts.
- Script and function editors: snippets for the editor's language appear in
  completions (CompletionItemKind.Snippet) and in a searchable Snippets picker
  that inserts at the cursor with live tab stops.
- Remote shell: the Snippets picker types one at the prompt, tab stops filled
  with their defaults, no Enter.
- Tab stops are ${1:default}, ${1}, ${1|a,b|} and ${0}; everything else is
  code as written (Bash's ${1:-x} included), converted to Monaco's syntax at
  insertion.

Migration for all three providers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 17:42:41 -05:00
Alphaeus Mote 244032f7a9 feat(devices): Restart and Shut Down for devices and groups [skip ci]
Restart… and Shut Down… in the device, selection and group menus start a
run of a built-in script (never stored) with Restart After Run on, so the
delay, the warning, cancel-while-scheduled, AllowRestart and the run's
targets, exclusions, Only Devices Online Now (on by default) and stagger
spread all come from the existing pipeline. POST /api/power, permission
devices.power (Admin, Operator, Help Desk).

Install Pending Updates (Windows, off by default) passes
SHUTDOWN_INSTALL_UPDATES only when asked; off, updates waiting for
"Update and restart" stay waiting. Shutting down is SHUTDOWN_POWEROFF on
Windows (wpeutil shutdown on PE) and logind PowerOff / ScheduleShutdown
("poweroff") / poweroff.target on Linux. Console actions give Windows a
planned Other: Maintenance reason. Shut down and updates need agent
1.14.0: older agents get their job failed instead of restarting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 17:24:11 -05:00
Alphaeus Mote a431eadd2f fix(release): a rerun never attaches a second copy of a published file [skip ci]
Assets were skipped only when name and size matched. A rerun rebuilds the
binaries, whose sizes differ by a few bytes, so v1.13.0's rerun attached ten
duplicates the published checksums do not describe. Skip by name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 13:13:57 -05:00
Alphaeus Mote e1fcdf4cea feat(scripts): Run As Each Signed-In User [skip ci]
The script editor's Run As is now a choice: Agent Account, Signed-In User, or
Each Signed-In User. Each runs the script once per signed-in user, in turn,
under one timeout; any failure fails the job and names who. Nobody signed in
runs nothing and succeeds. The server refuses it for agents before 1.14.0.
Migration for all three providers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 12:28:54 -05:00
Alphaeus Mote b05837d51f feat(shell): choose which signed-in user a Run As shell opens as [skip ci]
The agent lists who is signed in with each shell state; the console's Run As
menu offers each name, and the agent opens as that user only while they are
signed in. Several users with nobody at the console is no longer a dead end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v1.13.0
2026-11-18 12:04:50 -05:00
Alphaeus Mote 3832790484 Merge branch 'feat/install-repair' [skip ci] 2026-11-18 09:29:49 -05:00
Alphaeus Mote 21e9bad12f feat(groups): script groups, joined and left by what a script reports [skip ci]
- Every script gets built-ins: Set-ExecuteRGroupMembership (member when the
  value is true, above 0, a non-empty collection or yes-like text; pipe results
  in), Add-/Remove-ExecuteRGroupMembership, and executer_group in Bash. They
  need no credentials: the agent takes their lines out of the output and sends
  the answers with the job's final state.
- The server adds or removes the device in that script group, creating it (top
  level, kind Script) the first time a device joins. Each run decides again.
- Only script groups change: a curated group by that name is ignored, so a
  device can never add itself to one. Last answer per group wins; 25 a job.
- Console: Script kind in the group editor, tree and lists (reported devices,
  no hand-listing), editor completions and snippets for the built-ins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 09:29:48 -05:00
Alphaeus Mote 0b85bd5e8a feat(install): idempotent install scripts that upgrade or repair a failed agent [skip ci]
Every served install script (Windows/WinPE PowerShell 5.1, Linux and macOS
bash) now looks at the device before acting: a healthy, current agent
enrolled with this server is left alone (Already Installed), an older one is
upgraded in place with its enrollment kept, a failed one (service missing,
disabled, stopped or crash-looping, watchdog down, binary missing or broken,
Windows Installer registration or cache gone) is restarted through the
agent's own initialize and, if that does not help, reinstalled (MSI repair
REINSTALL=ALL REINSTALLMODE=vamus, cache restored from the kept package,
uninstall+install with ProgramData and the registry key set aside as a last
resort; Linux/macOS move files in one by one and re-register the unit or
daemon). The bootstrap token is used only when there is no usable credential
or the agent points at another server, never printed, and masked out of
failure messages. One setup at a time, leftovers of interrupted runs cleared.
Each run ends with one outcome line and exits 1 on failure.

The agent's status verb now prints a JSON line with version, server URL,
credential state (valid/missing/unreadable/other-device) and whether a
bootstrap token is pending, which the scripts read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 09:20:40 -05:00
Alphaeus Mote 505e9849eb Merge branch 'feat/log-format' [skip ci] 2026-11-18 09:03:20 -05:00
Alphaeus Mote 0e2056ca6c feat(runs): run again on a status's devices, the checked ones or the failed ones [skip ci]
- Each status tile of a run (Failed, Timed Out, Skipped, ...) has Run Again on
  These: right-click it or use its ⋯.
- Checked rows get Run Again on N beside Download Logs.
- The run page adds Run Again on N Failed (failed and timed out) next to Run Again.
- The same from a script's Executions panel. Each opens Run Script with those
  devices as targets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 09:03:11 -05:00
Alphaeus Mote 3e994102ed feat(agent): shells and scripts can run as the signed-in user [skip ci]
- Remote Shell gets Run As: Agent Account (default) or Signed-In User. Windows
  starts the shell with the user's own token, environment and profile folder on
  their desktop, headless; Linux and macOS start their login shell through su -l.
- Scripts get Run As Signed-In User. Every engine then runs out of process as the
  user (PowerShell 7 in the agent's built-in host, 5.1, Bash; su on unix), with
  no window, and the user is given that job folder only.
- The user is the console's, else the only one signed in; several and nobody at
  the console is refused rather than guessed.
- The server never sends either to agents older than 1.13.0 (they would ignore it
  and run as the agent's account): such jobs are created failed, the shell is
  refused. Migration for all three providers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 08:59:56 -05:00
Alphaeus Mote 28b2a53c29 feat(logging): one log line format everywhere, repeated warnings bounded [skip ci]
Every text line ExecuteR writes now reads
[2026-11-16T17:53:40.653Z] - [Category] - [LEVEL] - message key=value:
UTC time to the millisecond, a short category (the logging type without its
namespace, or Agent/Server), TRACE..FATAL, the rendered message and the
properties it did not use as key=value (correlation fields kept, enrichment
noise left out). Serilog writes it through LogLineFormatter (console, file
and the live views' message text); LOG_JSON keeps compact JSON. The watchdog
and its MSI/removal runners write the same format, and the Rust screen host
too (a tracing layer), with the agent taking each host line apart and logging
it once at the host's level and category, without a second timestamp.

LogLineParser reads the format back and the old ones still in device files
(services' [yyyy-MM-dd HH:mm:ss.fff LVL] Source: message, the watchdog's
...Z [LVL] message, tracing's default); the watchdog's live view uses it.

A warning, error or fatal that repeats (same level, SourceContext and
template) is written once, then counted for 60 s; the window's end writes one
line with repeated=N window=60s, a quiet window forgets it, at most 1,000 keys
are tracked and disposing writes open counts. The screen host does the same.

The console's log viewer shows the new level names and categories and copies
lines in the file format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 08:55:11 -05:00
Alphaeus Mote 09818d81c4 feat(console): agent downloads under Storage & Agent Packages, break-glass in the hover, more terminal themes [skip ci]
- The Agent Downloads card (public links, package list) moves from Enrollment
  Tokens to the Storage & Agent Packages tab.
- Built-In Sign-In drops the Break-Glass Account row; the card's hover names it.
- Eleven more terminal themes: Dracula, One Dark, Monokai, Nord, Gruvbox Dark,
  Tokyo Night, Ubuntu, High Contrast, Green Phosphor, Amber, Solarized Light.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 08:07:32 -05:00
Alphaeus Mote 34a46f3c40 feat(shell): terminal themes, text size and longer scrollback [skip ci]
Terminal Settings (per browser, live in every open shell, docked or popped
out): five themes, text size 9-28 px (Ctrl + = / - / 0 and Ctrl + wheel in
the terminal), scrollback 1,000-25,000 lines, 10,000 by default (was
xterm's 1,000).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v1.12.0
2026-11-16 16:56:31 -05:00
Alphaeus Mote d5274dfbea test(backend): presigned link expiry tolerates slow runners [skip ci]
CI #181 measured 298 s left on a 300 s link; allow 10 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v1.11.0
2026-11-16 14:57:02 -05:00
Alphaeus Mote d1f09eec2b feat(screen): H.264 video for Remote View, RemoteFX fallback at 30 fps [skip ci]
The screen goes as H.264 where the device can encode it: Media Foundation,
the GPU's encoder MFT first (async; NVIDIA, Intel, AMD), else Microsoft's
software encoder. The browser decodes with WebCodecs onto a canvas over the
RDP canvas; RDP keeps input, cursor, clipboard and Ctrl+Alt+Del.

- Negotiated in band: the browser asks with destination "screen;video=h264";
  a host with an encoder answers EXRMUX01 and frames stdio (channel 0 RDP,
  channel 1 video). Old hosts and hosts without an encoder (Windows PE,
  Server Core) answer plainly; the relay is unchanged.
- Baseline, no B-frames, low latency, CBR ~0.1 bit/pixel/frame; only changes
  are encoded, plus three refinement frames; at most 4 frames unacknowledged.
- Fallbacks: hardware -> software encoder; no encoder for a size -> STOP and
  RDP bitmaps; browser that cannot decode sends OFF -> RDP bitmaps.
- mfplat/ole32 loaded at run time from System32: static imports unchanged,
  so the exe still starts on Windows PE.
- Default frame rate 15 -> 30 (video and RemoteFX).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 13:56:29 -05:00
Alphaeus Mote cfba9bb51e feat(screen): text clipboard both ways in Remote View control sessions [skip ci]
The screen host now serves RDP's clipboard channel on Windows: a copy on the
device is announced to the operator's browser and a copy in the browser is
placed on the device, plain text only, up to 1 MiB each way. View-only
sessions get no clipboard channel. Device changes are polled (no listener
window); each write uses a message-only window made and destroyed for it,
the one exception to the no-windows rule, now documented.

The web view waits for the component's clipboard set-up before connecting:
it fires "ready" first, and a connection made then asks for no clipboard
channel. Verified both ways live through the stdio bridge and headless
Chrome against this machine's clipboard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 11:14:23 -05:00
Alphaeus Mote 61da8b704f chore(screen): log the client's offered codecs and the codec picked [skip ci]
The IronRDP web client 0.7 offers RemoteFX only, so that is what every
session encodes with; the log makes that visible when a session is slow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:53:04 -05:00
Alphaeus Mote 8de2214c93 feat(webui): right-click menus and copy paths in Files and Registry [skip ci]
Files: right-click a row for its menu (the whole selection when the row is
part of it), with Copy Path(s) and Copy Name; right-click the folder for
Copy Folder Path, New File/Folder, Upload and Refresh; a Copy Folder Path
button sits next to the path.
Registry: Copy Key Path/Name on keys, Copy Name/Data/Value Path on values
(the whole value is fetched when the list only holds its start), and a
Copy Key Path button next to the path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:53:03 -05:00
Alphaeus Mote b4202e9794 feat(enrollment): stable agent download links, optional public downloads, new Add Device dialog
CI / build-test (push) Failing after 11m51s
CI / images (push) Has been skipped
Release / release (push) Successful in 24m35s
Release / images (push) Successful in 5m13s
- Stable links per package (/api/downloads/agent/Agent.msi, Agent.zip,
  Agent-<os>-<arch>.zip) always serve the newest build (GET and HEAD,
  X-Agent-Version); /api/downloads/agent lists version, SHA-256, size and
  link as JSON. With offload on they redirect to a fresh presigned link
  (S3 presigned links cannot be permanent).
- Public Downloads setting (off by default): on, anyone; off, install
  scripts (their package URLs carry the bootstrap token) and signed-in
  users with devices.view.
- No MSI/ZIP choice: the Windows script installs the MSI, or the ZIP in
  Windows PE. Add Device is redesigned: platform cards, token step with
  summary chips, install step, and per-platform downloads.
- Settings > Enrollment Tokens gains an Agent Downloads card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v1.10.0
2026-11-08 21:25:58 -05:00
Alphaeus Mote 77412d1639 fix(webui): upgrade dialog's Version label no longer clipped [skip ci]
The field sat at the top of a dialog body that has no top padding under its
title, so the floating label was cut off; the closed field also showed the
menu row's chip and device count. It now has room and shows the choice alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 21:25:57 -05:00
Alphaeus Mote 1edc8e28fa fix(agent): Remote View in Windows PE captures the console session [skip ci]
The WinPE service ran the screen host in its own session 0, whose winlogon
desktop is never displayed: the host attached and streamed black. It now
moves the host to the active console session like full Windows (falling
back to its own session if there is none), with no prompt and no banner,
and WinPE's desktop reports that session so a switch still ends the stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:42:16 -05:00
Alphaeus Mote 6e07466a50 docs(screen): note the fitted frame's shape
CI / build-test (push) Successful in 41m18s
CI / images (push) Has been skipped
Release / release (push) Successful in 21m29s
Release / images (push) Successful in 7m18s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:07:04 -05:00
Alphaeus Mote 6bd5021f16 feat(webui): Remote View frame takes the screen's shape and follows the window [skip ci]
In the console, a fitted screen gets a frame of the device screen's aspect
ratio at the page's width, capped at the window's height (then centred with
bars at the sides), so it fills the space without stretching or cropping and
resizes with the window. Pop-out windows and 1:1 keep their own size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:54:27 -05:00
Alphaeus Mote 99713060b4 docs(screen): note the web client's visibility and Fit quirks
CI / build-test (push) Successful in 47m54s
CI / images (push) Has been skipped
Release / release (push) Successful in 26m49s
Release / images (push) Successful in 5m25s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 07:41:47 -05:00
Alphaeus Mote 5ac5517e99 fix(webui): show the Remote View screen and fit it to its frame [skip ci]
The IronRDP web component keeps its screen hidden until setVisibility(true),
which was never called: sessions connected and frames were drawn, but the
canvas stayed invisible. Its Fit also sizes to the window rather than the
container, so the screen is now sized to the frame (Fit scales, Real scrolls).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 07:36:06 -05:00
Alphaeus Mote 2936b08c6c fix(deploy): restart NATS when nats.conf changed [skip ci]
compose up -d leaves NATS on its old config when only the bind-mounted
nats.conf changed, so the 8 MB max_payload never applied on upgrades.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 05:47:27 -05:00
Alphaeus Mote 890bab034b fix: devices follow the real server address; static screen host
CI / build-test (push) Successful in 38m1s
CI / images (push) Has been skipped
Release / release (push) Successful in 19m58s
Release / images (push) Successful in 12m49s
- PUBLIC_SERVER_URL and TRUSTED_HOSTS left at .env.example's sample
  (control.example.com, any RFC 2606 name) are ignored with a startup
  warning: links follow the forwarded headers and devices download from
  the server URL they already use. .env.example ships them empty and
  deploy.sh clears sample values from an existing .env.
- The screen host is built from its own folder so .cargo/config.toml's
  +crt-static applies; the shipped exe imported VCRUNTIME140.dll and died
  without output on devices without the Visual C++ runtime ("the screen
  host gave no answer"). The build now refuses an exe with CRT imports.
- A failed screen host probe is retried with backoff (30 s up to 10 min)
  and the inventory is republished once it answers; the warning and the
  reason carry the exit code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 20:02:03 -05:00
Alphaeus Mote af7fd25a69 feat(webui): Folder field in the script and sequence editors
CI / build-test (push) Failing after 7m22s
CI / images (push) Has been skipped
Release / release (push) Successful in 20m28s
Release / images (push) Successful in 4m34s
Pick a folder or type a path (a new one is created on save); new items
start in the folder they were created from and copies stay with the
draft's folder. A folder changed from the editor is audited as a move
(moved / sequence-moved), like a move from the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 18:02:56 -05:00
Alphaeus Mote 65390c2b5e Merge folders for sequences [skip ci] 2026-11-07 15:50:59 -05:00
Alphaeus Mote d1cd59d01a feat(webui): Sequences in folders, like Scripts and Functions [skip ci]
- The Sequences page gets the shared folder tree, breadcrumb, folder rows,
  folder context menus, New Folder, drag onto the tree, Move to Folder...
  and bulk Move; search looks through every folder and shows the path
- New sequences land in the open folder; the editor's breadcrumb walks the
  sequence's folder; Duplicate keeps the folder; Delete returns to it
- Run...: the sequence table gains a sortable Folder column and search
  matches the folder; the schedule editor groups sequences by folder and
  shows the chosen one's folder
- README: folders in the Sequences section, permissions and audit actions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 15:45:32 -05:00
Alphaeus Mote cd0378a2fc feat(sequences): folders for sequences in the shared library-folder system [skip ci]
- Sequences carry a folder ("/" or "/a/b") with the scripts' rules:
  normalized, compared ignoring case through an upper-cased key, adopting
  the casing of folders a path passes through
- "sequences" is a library of the shared folder service and endpoints:
  GET/POST/DELETE /api/sequences/folders, POST /api/sequences/folders/move
  (rename or move with everything in it), POST /api/sequences/move (one or
  many); delete only while empty
- Saves take an optional folder: new sequences land in it, updates without
  one keep the sequence where it is; bad paths are refused as for scripts
- Scripts View to read, Manage Scripts to change; audited in the scripts
  category as sequence-folder-created/moved/deleted and sequence-moved
- SequenceFolders migration for SQLite, PostgreSQL and SQL Server: existing
  sequences go to "/"
- Tests: folder CRUD, rename and move, bulk move, validation, Viewer 403,
  migration default, and a run under way unaffected by a move

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 15:21:39 -05:00
Alphaeus Mote 81f67d5c12 Merge shared device tools: current window or pop out for Remote View, Shell, Files, Registry [skip ci] 2026-11-07 14:04:07 -05:00
Alphaeus Mote b87e4b5ac3 feat(webui): shared device tools with current window and pop out [skip ci]
Remote View, Shell, Files and Registry now come from one model
(sections/deviceTools): label, icon, gate (reusing screenGates and the
shell/files/registry permission + online checks), the current-window
path, the pop-out path and a stable window name per device and tool
(executer-<tool>-<clientId>).

- DeviceToolFrame hosts every tool: device name and status, the tool's
  actions and a Pop Out button in the console; a slim bar and a
  "<Tool> · <hostname>" title in a pop-out window.
- Routes: devices/:clientId/files and /registry pages, and /popout/devices/
  :clientId/{screen,shell,files,registry} under a minimal PopOutLayout
  (session guard; theme and snackbars from the app root).
- Pop out reuses an open window of the same name without reloading it;
  a blocked window gets a snackbar with Open Window to try again. The
  shell keeps its live pop-out (the terminal moves, the session carries on).
- Remote View ends its session on pagehide with a keepalive DELETE, so
  closing a pop-out (or tab) closes it; Disconnect in a pop-out closes it.
- ActionMenu rows can carry trailing icon actions (Arrow Right reaches
  them, aria-labelled). Device right-click and "…" menus get a Device
  Tools group (single device): each tool with Current Window and Pop Out.
- Device page: Pop Out beside Open Shell, Remote View menu rows with both
  icons, and a Pop Out icon for the Files / Registry tabs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 14:03:35 -05:00
Alphaeus Mote 13742a1087 chore(test): Test.ps1 -IncludeDeploy runs deploy.sh's database decision tests
CI / build-test (push) Successful in 42m14s
CI / images (push) Has been skipped
Release / release (push) Successful in 20m21s
Release / images (push) Successful in 6m54s
Release of the work since v1.6.1: bundled Postgres by default, Restart After Run with an agent-held timer and optional warning, S3 pre-run downloads, parallel dispatch and batched job states, script sequences, parallel upgrade fan-out and the reconnect storm fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 11:23:19 -05:00
Alphaeus Mote 6fa13f0106 Merge parallel upgrade fan-out and reconnect storm fixes [skip ci] 2026-11-07 11:15:45 -05:00
Alphaeus Mote 88aed64038 Merge main (Script Sequences, agent-held restart timer) into the storm and upgrade fan-out work [skip ci] 2026-11-07 11:04:34 -05:00
Alphaeus Mote f69127926a docs: settings pulls in a storm, their retry, and upgrade batches sent side by side [skip ci]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 11:04:22 -05:00
Alphaeus Mote 23ddf5c665 test(loadbench): the connect storm's settings answers and ready events, and an upgrade fan-out [skip ci]
- Connect storm: settings answers counted by first try and retries, with
  their reply times (p50, p95, max); the phase also waits for every
  device's ready event to be stored. --settings-retry retries a missed
  pull as the agent does (default: one try, what reaches a device at once).
- --upgrade: an MSI made up for the catalog, every device queued for it,
  the scheduler running as with SCHEDULE_WORKER on and StartWithinMinutes
  from --start-within (default 1); the simulated agents count upgrade
  commands and a second one for the same version, and each pass's sends are
  timed from the pass's start to the last publish returned.
- --burst false skips the job burst.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 11:02:40 -05:00
Alphaeus Mote 7bd3cdfd14 fix(agent): a settings pull without an answer is asked again with backoff and jitter [skip ci]
The pull on connect tried four times (now, then after 15 s, 60 s and 5 min,
the same for every device) and then left the device on what it held until
the next reconnect. A fleet whose pulls timed out together asked again
together.

It now asks again after a pause that doubles from 10 s up to 10 minutes, a
random point in the upper half of each, for as long as the session lasts;
it stops once answered, or when a pushed set newer than the one it started
with has arrived meanwhile. After four unanswered tries it says so once in
the log and goes on asking. The request and its sealing are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:57:19 -05:00
Alphaeus Mote bfbd9b1d4f fix(messaging): a fleet reconnecting at once gets every settings answer [skip ci]
A 10,000-device connect storm answered 1,526 settings pulls on SQLite and
4,365 on PostgreSQL; the rest came after the agent's 20 s. Measured (a
probe in the lanes): every pull queued in the 8 agent-event lanes behind
every device's ready event, and each event's replay id was one database
insert (19 to 36 ms under the storm's write contention) before anything
else; the lanes' wait reached 61 s on SQLite (41 s on PostgreSQL), 8,312
of 9,845 SQLite answers left after the agent had stopped waiting, and 155
more failed to publish. Nothing was dropped by a subscription.

- Requests on the event subject (anything with an inbox: settings pulls,
  CLI runs, uploads, restarts) leave the lanes for a request path of their
  own: up to 256 at a time opened side by side, their ids remembered for
  every replica in one insert (ServerReceipt.EventBatch, RememberEventsAsync;
  a replay is refused as before), settings pulls answered together.
- AgentSettingsAnswers: the enabled profiles (and every device's groups when
  a profile names groups) kept as a snapshot until AgentSettingsSignal fires
  (profile, group, member, tag changes) or 30 s; a batch's devices and
  stored sets in one query each. A stored set that is what the snapshot
  decides, not pending and not behind the agent, is the answer with no
  write; everything else goes through ReconcileDeviceAsync, read afresh.
- The lanes take what has queued (up to 64) and write it together:
  inventory reports in one transaction (one at a time when that fails),
  ready and logon events' device rows in one, event ids in one insert;
  order per device is kept. These writes, settings rows and replay ids
  take SqliteWriteGate on SQLite.
- Presence, inventory, events and requests read the keys of devices not
  cached a query per 500 (DeviceKeyCache.LoadAsync) and open side by side.
- The server's ECDH key is held in up to 8 instances: one instance under
  one lock made every first message of every device (after a server start)
  wait its turn, which starved the thread pool once opening ran in
  parallel (833 answers in that run).
- Subscriptions hold 65,536 messages (NATS.Net's default is 16,384); what
  a full one drops is counted by kind and logged every 10 s at most. An
  answer sent after the agent's 20 s is counted and logged too.
- An upgrade's key check reads the keys the command was just sealed with.

After: 10,000/10,000 first-try answers on SQLite (p50 0.5 s, p95 1.8 s,
max 2.1 s) and on PostgreSQL (p50 0.1 s, p95 0.3 s, max 0.9 s); every
inventory, presence and ready event stored by the end of the 20 s ramp.

Replies are sealed and signed for the asking device and bound to its inbox
as before; pulls and other requests are still replay-checked in the
database for every replica.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:56:23 -05:00
Alphaeus Mote 67bee0fffa perf(upgrades): a paced batch is sent side by side, its rows marked in batches [skip ci]
The scheduler sent a batch one device at a time, each with its own save
over every open upgrade row in memory, a fresh key read and a second
device read: a 2,500-device batch (10,000 devices, StartWithinMinutes 1)
took 507 s on SQLite and 556 s on PostgreSQL, so StartWithinMinutes meant
nothing past a few hundred devices.

- Rows go Queued -> Sent 500 per statement, only from Queued and only when
  due, with a new concurrency stamp; the pass keeps the rows it moved and
  lets go of the others (cancelled or taken meanwhile), so no row is handed
  to JetStream twice, also with two schedulers at once.
- Commands are sealed and published JOB_DISPATCH_PARALLELISM at a time (the
  job runner's setting, default 16); packages and rollback MSIs are read
  once per batch. A send that fails puts that device alone back in the
  queue (one statement for all of them), tried by a later pass; the others
  go on.
- The upgrade id is the command's JetStream message id, so a resend of an
  unconfirmed publish is dropped by the stream (and by the agent, which
  dedupes on the upgrade id).
- Pacing is unchanged: batch sizes still come from StartWithinMinutes and
  the at-least-ten rule, counted from when each row was first ready.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:55:02 -05:00
Alphaeus Mote 57f4eb3da8 Merge agent-held restart timer, optional warning and console cancel [skip ci] 2026-11-07 10:55:01 -05:00
Alphaeus Mote 8b4d64289e docs(restart): Restart After Run with the agent's delay, the warning and Cancel Restart [skip ci]
A sequence step's test carries the warning to the agent and waits through Scheduled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:52:55 -05:00
Alphaeus Mote d8c8a1c12d feat(console): Warn Signed-In Users, Restart at <time> with countdown and Cancel Restart [skip ci]
The restart fields (script editor, Run Script, sequence steps) gain Warn Signed-In Users with
its length (off by default; 60 s when turned on; 15 to 600 s). A scheduled restart's chip shows
its due time and countdown, and for who may run jobs a cancel that asks first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:43:19 -05:00