The same failure PlatformR had: a device whose clock is hours off (Windows
PE reading the hardware clock in another zone) or years off (a dead clock
battery) had every sealed message refused both ways (5 minutes of skew),
its credential renewal refused as if orphaned (and re-enrolled with a
bootstrap token), and, far enough off, the server's certificate refused.
ServerClock is a TimeProvider that is the device's clock until its first
sample, then that sample plus the monotonic time since; it never sets the
device's clock. Samples: a server-signed reply on the agent's own inbox,
or the new clock probe's answer, either way; any other signed server
message forward only (a replay is old); a Date or a renewal refusal's
server time over verified TLS. Sealing, freshness, the remembered message
ids, the renewal's proof and certificate validation use it.
Server: a renewal signed with the enrolled key at a time too far off is
refused with 401 urn:problem:clock-off carrying serverTime (checked after
the signature), and the agent signs once more at it. POST
/api/enrollment/clock answers the server's time sealed to the device for
the agent's nonce, which works over plain http and before TLS can verify.
Also in the README: the AMSI behaviour in Windows PE.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PowerShell sets AMSI up once per process and tolerates only a missing
amsi.dll; any other load failure leaves AmsiUtils broken and every script
fails with "The type initializer for 'System.Management.Automation.
AmsiUtils' threw an exception" (reproduced with the SDK 7.6.4 the agent
ships). The agent now resolves amsi.dll for the engine: in Windows PE it is
reported missing (no antimalware engine there anyway); elsewhere it is
loaded from System32 and checked for every export PowerShell binds, and a
library that fails either way is reported missing too. A healthy Windows
keeps AMSI. A failure inside a type initializer now names its cause in the
job's output and summary.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
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>
- 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>
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>
- 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>
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>
- 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>
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>
RestartWarningSeconds on Scripts (0 for existing ones) and RestartDueUtc on Jobs, for SQLite,
PostgreSQL and SQL Server. A sequence step's Restart On Completion carries the warning to the
agent, and a Scheduled step restart waits like Requested and Restarting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A sequence is an ordered list of steps, each an existing script with its own
arguments, extra Functions, own S3 files, condition (previous outcome,
platform, full OS / Windows PE, groups), Restart On Completion (one
RestartSettings value over the script's own), Continue On Error and
Success/Warning/Failure exit-code lists (codes, ranges, hex, *; defaults
0 / 3010, 1641 / *; validated server side, no overlaps).
A start records the sequence run, one ordinary run per step with that
step's sealed snapshot, and each device's run with its first step's job.
Every step is a normal job sent by the JobDispatcher, so history, output,
run pages, dashboards and audit are unchanged. A SequenceWorker (on the
SCHEDULE_WORKER node, every 2 s) classifies a finished step, waits while its
restart is under way (Restarted, or a newer inventory boot time, which also
covers Windows PE), checks the next step's condition and queues it, with one
update conditioned on the device run's version and the next job in the same
transaction: duplicate or concurrent advances move a device once. The
batched job-state writer is untouched.
Sequences run from Run Now (POST /api/jobs with sequenceId), schedules and
event triggers (sequenceId on /api/triggers), and On Demand with the device
CLI, which returns at once for a sequence. Runs can be cancelled
(POST /api/sequence-runs/{id}/cancel); steps not yet sent are cancelled.
Jobs, runs and summaries carry a sequence step reference. Migrations for
SQLite, PostgreSQL and SQL Server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Script editor: Add From S3 opens the S3 browser in multi-select mode
(files and folders, search, breadcrumb); each pick gets a unique
identifier name. Download To (default $ExecuteRJobDir\Files) with the
variables on hover, per-binding Path inside it, Clean Up Downloads (on).
- Run Script: Review > Files > Change for This Run overrides the selection
for one run (needs scripts.manage or files.send), sealed into the
run's snapshot.
- Storage: FileBindingsJson becomes {root, cleanUp, bindings}; the older
array form still reads (absolute destinations, nothing removed). No
schema change.
- Server: only the selected keys are listed and presigned; single files
carry their listed size; a folder over 2,000 objects is refused.
- Agent: paths expand on the device ($ExecuteRJobDir, $ExecuteRAgentDir,
$ExecuteRAgentPath, %VAR%, $env:VAR, $VAR/${VAR} on Unix, $(...));
undefined variables and ".." fail before the script runs. Missing
folders are created (inheriting the parent's ACL). Four downloads at
once, streamed, retried, checked against size and plain-MD5 ETags,
timeout/cancel aware. Information lines and progress records while it
runs, and a summary. $Files (FileInfo/DirectoryInfo, ordered,
case-insensitive) and $FilesRoot in PowerShell 7 and 5.1;
EXECUTER_FILE_<NAME> and EXECUTER_FILES_ROOT in Bash. Clean Up
Downloads removes only what the job wrote, on success, failure,
timeout or cancel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restart After Run (Off / Always / When the Script Asks, with a delay up to
60 minutes) is a script option, versioned in the run snapshot and carried
in ScriptCommandPayload like the other run options, and Run Script can
override it for one run. Asking means exit 3010 or 1641, and on linux and
macOS also 194 (what exit 3010 becomes in an 8-bit status); with the option
on, an asking exit is a success.
The agent restarts only after the server holds the job's result: the
result is kept in the local store first, then a restart request on the
device's event subject is answered once the server has stored the final
state (applied from the request if its JetStream copy lags) and every
output line (missing lines are resent). If the server is unreachable, the
kept result is sent after the restart. The job shows Restart Requested,
Restarting, then Restarted when the device's inventory reports a newer
boot time; Refused, Cancelled and Failed are reported too, and every step
is audited. Pending restarts carry an opaque continuation for script
sequences.
Mechanisms, all behind ISystemRestart: Windows InitiateShutdownW
(SHUTDOWN_RESTART | SHUTDOWN_FORCE_OTHERS, the delay as grace period,
planned Application: Installation reason) after enabling SeShutdownPrivilege;
Windows PE tries the same API, then wpeutil reboot; linux uses logind
Reboot/ScheduleShutdown over D-Bus (Tmds.DBus.Protocol), falling back to
systemd StartUnit(reboot.target); macOS reports it is unsupported.
AllowRestart (default on) is a managed agent setting with ADMX/ADML, an
MSI property and registry/agent.json support. The agent service is now
plain Automatic: install sets it, and the agent switches an earlier
Delayed Start when it starts as a service. Migration RestartAfterRun for
SQLite, PostgreSQL and SQL Server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The runner runs the suite as SYSTEM: a pipe it owns is trusted by design,
and its temp path's case varies. A presigned link signed a moment after its
expiry was set reads one second shorter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent settings now resolve as Group Policy > Agent Settings profile > device
registry (agent.json on linux/macOS) > default, per setting, for the settings
profiles manage (AgentSettingCatalog): the access switches, Remote View, the
inventory interval, log level and job folder root. ServerURL, the bootstrap
token, TlsSkipVerify, ProxyUrl, the reconnect delays and MessageClockSkew are
never taken from a profile.
The agent pulls its set on connect (agent.settings.request, sealed) and takes
pushes (command.agent.settings, durable), ignores a set older than the one it
holds or for another client id, keeps the last set under Runtime\ManagedSettings
so a restart without the server still applies it, applies it to the running
session (permission checks, Remote View policy, inventory interval, closing a
remote shell switched off) and reports every setting's value, source and
pending restart with its inventory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- $ExecuteRAgentDir / $ExecuteRAgentPath in both PowerShell engines (every
mode), and EXECUTER_AGENT_DIR / EXECUTER_AGENT_PATH for PowerShell 5 and
Bash (PowerShell 7 shares the agent's environment, so variables only),
resolved from the running binary (links followed) for MSI, portable,
Windows PE and Linux/macOS layouts.
- ExecuteR-Agent upload <path|mask>... [--recurse] [--flatten|--preserve]
[--dest] [--zip [name.zip]] [--overwrite] [--quiet]: the CLI plans paths
and masks where it runs, the service reads the files (sharing with writers
and deleters) and sends them over the local channel's caller checks; exit
codes 0 all, 1 refused/none, 2 unreachable, 3 partial.
- The upload steps (begin, presign, complete, abort, finish) go on the same
request path as `run` (AgentLink.RequestAsync, sealed both ways); bytes go
straight to the store over HTTPS, whole or in parts, with retries, size
checks and progress.
- The console's Upload to S3 (files/folders, and the agent's logs as a zip)
takes the same path from the file listener.
- The upload runs as the agent, not under the pipe client's identification
token, which leaked into pool threads and made file opens fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stream time a queued v1 message is judged by comes from the NATS server,
which is inside the threat model; once nothing from before the key exchange
can still be in the stream, unsealed messages are refused outright.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Envelope v2 on top of TLS and NATS permissions: AES-256-GCM with a key per
message (HKDF-SHA256 over an ECDH P-256 secret, message id as salt, direction
as info), the header (kid, type, message id, issue/expiry, sender, subject) as
associated data, and an Ed25519 signature (server signing key / agent NKey)
over header, nonce and ciphertext. v1 is still parsed from unsealed agents.
- Keys: the server's signing + ECDH key set is a Data Protection-encrypted
setting, current + previous (7 days), rotated from Settings > Message
Security and announced to sealed agents signed with the old key. Agents keep
an ECDH key with their credentials and pin the server's keys at enrollment,
or for agents enrolled earlier at their first credential renewal (HTTPS,
proof signed with the enrolled NKey covering the message key).
- Replay: issued/expiry on every message (live 2 min, queued commands 2 days,
job states 7 days, 5 min skew, configurable both sides); seen ids persisted
on the agent (job store), in the database for agent events, in a bounded
window otherwise; queued messages remembered on ack.
- Remote View and file/log/registry transfers: per-stream AES-GCM frames with
counter nonces; duplicates and reordering refused.
- Browser NATS traffic (events, job and shell output, keystrokes) sealed per
session with a WebCrypto ECDH key.
- Rollout: Sealed chip on the device list and page, inventory reports it,
Require Sealed Agents (off by default) refuses v1 and sends nothing to
unsealed agents. Job messages must be signed by the device they name.
- Migrations MessageSecurity (Sqlite, Postgres, SqlServer); README Message
security section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Being Viewed banner was WinForms published as a self-contained single
file (49.3 MB, ~320 ms just to start and exit). It is now plain Win32 through
source-generated LibraryImport (runtime marshalling disabled, no reflection)
published with Native AOT: 1.6 MB for win-x64 and win-arm64, ~33 ms to start
and exit (the OS process floor), on screen in ~0.1 s.
- BannerWindow: a WS_EX_TOPMOST | TOOLWINDOW | NOACTIVATE popup, a STATIC per
caption (read by screen readers, clicks fall through to drag) and an
owner-drawn BUTTON per Stop, named for its session; the mouse is handled in
a subclass and BM_CLICK invokes directly, so clicking or assistive-tech
invoke never activates the banner. GDI drawing, comctl32 6 tooltips,
PerMonitorV2 manifest with WM_DPICHANGED, AppsUseLightTheme and high
contrast on WM_SETTINGCHANGE, DWM rounded corners and dark frame.
- Same metrics, colours and wording as the WinForms banner (checked against
screenshots at 125%), now in window-free Logic/ (layout, palette, rows)
that Agent.Tests compiles and tests.
- The protocol moves to src/Shared.Banner (compiled into agent and banner),
with the exit codes; DLL hardening, pipe checks and protocol unchanged.
- Package-Agent publishes the banner with AOT when vswhere finds the MSVC
tools for the RID (and puts vswhere on PATH for newer VS vcvarsall),
otherwise warns and publishes a trimmed single file (~11 MB).
- README: Build Tools "Desktop development with C++" (plus ARM64 tools) as a
prerequisite, also for the CI windows-host runner.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One process-wide session watcher: the Windows service lifetime now takes
SERVICE_CONTROL_SESSIONCHANGE and forwards it; a foreground run polls
WTSEnumerateSessions. Remote View sweeps at once on console and logon
changes. Logons (WTSINFO LogonTime and DOMAIN\user on Windows, loginctl
on linux; none on macOS or in Windows PE) are caught up at start, deduped
in logons.json and reported as "logon" agent events, queued while the
agent is offline.
Script jobs wait on the device clock until NotBeforeUtc before they run,
see what started them ($Trigger, EXECUTER_TRIGGER_* for external engines)
and feed a local observer keyed by the request id.
`ExecuteR-Agent run <name|id> [-p Name=Value] [--wait] [--timeout s]` and
`run --list` reach the running agent over a named pipe (Administrators and
SYSTEM only, elevated callers, owner-checked) or a root-only Unix socket,
which asks the backend with an agent.run.request. Bare `run` is still the
service entry point.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- WindowsDeviceRegistry lists keys (paged, with counts and last write time)
and values (raw type and bytes via RegQueryValueEx, so every type
survives), creates, deletes (recursive only when asked), renames keys
(RegRenameKey) and values, sets every type, exports .reg (UTF-16 LE,
streamed) and imports .reg in order with per-line failures and the data
before each change. 64- and 32-bit views; access denied says so.
- HKEY_CURRENT_USER is the console user's hive (HKEY_USERS\<SID>, from
WTSGetActiveConsoleSessionId and WTSQueryUserToken) behind
IConsoleUserResolver; nobody signed in answers no-user with the reason.
- The file listener answers registry operations under AllowRegistryAccess
(GPO > registry > default on; ADMX/ADML; ALLOWREGISTRYACCESS MSI
property), whatever AllowFileAccess says; non-Windows answers Unsupported.
- Tests against a throwaway HKCU\Software\ExecuteR-Tests key, cleaned up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
Every script job now runs in <JobRoot>\<JobId>\, locked to SYSTEM and
Administrators (inheritance off; 0700 and root-owned on linux/macOS). The
script is staged under its own name (Install-Baseline.ps1), the 5.1
wrapper and preludes sit beside it as .executer-* helper files that are
always deleted, and the folder goes too with Clean Up After Run (default
on). Folders older than 7 days are swept at agent start.
- PowerShell 7 Run From File: the script is written to the job folder and
invoked by path (AddCommand), so $PSScriptRoot, $PSCommandPath and
$MyInvocation.MyCommand.Definition are the file's. The prelude runs first
on its own; `exit N` reaches the host as with pwsh -File via the engine's
rethrow-exit flag (with a $LASTEXITCODE fallback).
- Set Working Directory to Script Folder (staged runs only): process
directory for 5.1/Bash, runspace location for PowerShell 7 (the shared
process directory is never touched). Off keeps today's directory.
- $ExecuteRJobDir in both PowerShell engines (every mode) and
EXECUTER_JOB_DIR for 5.1 and Bash.
- Bash sources the prelude through BASH_ENV, so the script file is the script.
- JobRoot policy (GPO > registry > default; ADMX/ADML, MSI JOBROOT):
%VAR% / $VAR expansion as the agent, validation (absolute, local, not
under user profiles, no parent others can rename), warning + default on
a bad value, reported in the inventory.
- The script command carries RunFromFile, CleanUpAfterRun and
SetWorkingDirectory (older backends: the defaults).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The end of a stream released the ready wait just before the stream completed,
so an immediate exit (capture unavailable) could answer ok. Also checks the
real screen host's probe through the agent when it has been built.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Remote View configuration values carry their compiled defaults, so
configurations built elsewhere (integration tests) need not set them, and
a test pins the policy's precedence. The console's first connection reads
Waiting For Device (consent, when asked, and the screen host's start).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Probe the ExecuteR-Screen sidecar at start and report the capability;
on open settle consent (Notify, Ask First via WTSSendMessage, unattended,
WinPE), start the host as SYSTEM in the active console session from a
session-0 service (duplicated token, winsta0\default, handle-listed
anonymous pipes, kill-on-close job), relay stdio with backpressure, end on
close, idle, console session switch and shutdown. Policy comes from
AllowRemoteView and RemoteView* registry/GPO values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every process keeps its last 2,000 log lines in memory (a Serilog sink into
a LiveLog ring) for long-polled live views: GET /api/logs/server/tail and
/api/devices/{clientId}/logs/tail answer with the lines after a cursor as
soon as there is one. A device's tail, file list and download reach its
agent over the file browser's request path (new log-tail, log-list and
log-read operations, no new subject), name no path, and answer even with
AllowFileAccess off. The watchdog's log is followed from its file.
Log files are the *.log files directly in the log folders, asked for by
bare name, so nothing outside them can be listed or read; a file still
being written downloads as long as it was when asked. Downloads are
audited. logs.view (Admin) guards the server's logs, devices.logs
(Operator, Help Desk) a device's, in device scope. Properties named in
Redaction.NeverLog are now masked for every sink. A device file download
also stops at the length it announced, so a growing file no longer breaks it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent files live in one folder per version (<version>/<file>, the version
from the package's VERSION marker) on disk and, with agent offload on, in the
object store under executer/agent/<version>/. Offload now works with the
built-in store as well as an external one (the chosen store is used), and a
removed version's folder leaves the store too. Keys recorded against another
store, endpoint or bucket are dropped and re-uploaded, so a link never points
at a store without the file.
Downloads ask this server every time: GET /api/agent-packages/{sha256} and
the install package route answer with a 302 (Cache-Control: no-store) to a
presigned link made at that moment, lasting the new agent link lifetime
(s3.agentLinkSeconds, 30-3600 s, default 300). The built-in store's link is
on PUBLIC_SERVER_URL, else the request's forwarded scheme and host
(PublicUrl.Resolve); an external store's is its own. With offload off, or the
store unusable, the server streams the file as before. Upgrade commands always
carry the server path, so a short lifetime holds however long a command waits.
The agent follows the redirect itself (up to 5 hops, relative and https to
http included) and still checks size and SHA-256. The per-type install
package upload is replaced by the catalog's offload pass, which "Upload Now"
runs on demand.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows a TLS certificate context imports its intermediates into the
Intermediate CAs store (LocalMachine's when elevated) so SChannel can send
them. Test runs left hundreds there, until chain building slowed and failed.
Tests now remove what they caused, and the classes that change stores or build
the managed chain run in one serial collection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server reads a PowerShell script's param() block with PowerShell's own
parser (System.Management.Automation, parse only) through
POST /api/scripts/parameters/parse (scripts.view) and merges it into the
editor's parameters: the code owns name, type, required, default and
ValidateSet; Expansion and hand-written descriptions without help are kept;
parameters gone from the code are dropped. Only constant primitive defaults
and lists of them are imported; computed ones stay in the code. `using
assembly` is masked before parsing, since the parser would load it.
Manual runs, trigger saves and every firing share one check: a required
parameter needs a value or a default, and given values must fit. Schedules
store only the values set on them, so untouched ones follow the script's
defaults; a firing that no longer fits records why and does not run. Empty
values count as not given on the server and the agent alike.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
First contact keeps only the root matching the token's fingerprint and the
CAs that chain to it, so an extra root in the response can no longer reach
the trust store. The verified chain is kept as the agent's anchors and backs
the HTTPS API, downloads, upgrades, the CA refresh and the NATS WebSocket when
OS validation fails on an untrusted chain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Like an external store's, and checked by the store itself; the server only passes
on one signed object. They are signed for a fixed name the server gives the store,
so they hold at any address. An external store's URLs lead straight to it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A delivery's URL can now be a path, resolved against the server URL the agent
already reaches, as upgrades do. Both downloaders also use enrollment's trust,
so a self-signed server's links work.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Uploads land only once complete, text saves keep their encoding and refuse a
file that moved on, and folders stream as zips. AllowFileAccess turns all of it
off locally, whatever the server asks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Behaviour change: the in-process PowerShell engine now reports what the
script asked for, the way pwsh -File does.
- `exit 5` reports exit 5 and Failed. It used to report Succeeded, 0: an
AddScript exit reaches only the host's SetShouldExit, which nothing read,
so a small host now captures it. `exit 0` succeeds, even after errors.
- A native command's non-zero $LASTEXITCODE no longer fails a script unless
the script exits with it, and neither do errors it silenced (HadErrors is
set by both, so the error stream decides now).
- Write-Error still fails a script that never calls exit, with exit 1.
JobStatePayload gains optional ErrorType, ErrorId and ErrorMessage: the first
error's exception type, FullyQualifiedErrorId and message; for external
engines the first stderr line. Older agents omit them. It also gains RunId,
for the backend to set when relaying to browsers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An MSI install hands the MSI over with the kept MSI of its version (or the
server's, downloaded, checked and kept; or none, said so), keeps what it
brought, refuses the zip, and is refused by a portable install; a kept MSI
whose bytes are not its folder's hash is not used; an MSI of another version
or not the agent's fails as package; msi.json makes it busy; kept packages
stay at the newest three plus those still needed. The outcome reporter passes
an MSI run's own detail on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>