Stella Ops Windows Host Agent

The Stella Ops Windows host agent is the RuntimeInstrumentation host service for Windows container estates. It shares StellaOps.Agent.Core identity, runtime status, health, configuration, and publisher contracts with the Linux agent, but keeps Windows lifecycle, ACL, and runtime-source behavior inside src/RuntimeInstrumentation/StellaOps.Agent.Windows/.

Current Base

Installation Shape

The base executable is StellaOps.Agent.Windows. Package tooling should install it as a Windows Service running under a least-privilege service account.

Service packaging must preserve:

Native Windows Service packaging and installer scripts are not part of this base task. They must not add Kubernetes or Helm packaging.

Configuration

Configuration precedence is deterministic:

  1. Local JSON files: %ProgramData%\StellaOps\windows-agent.json and windows-agent.json
  2. Environment variables prefixed with STELLAOPS_WINDOWS_AGENT_
  3. Optional policy-delivered JSON file referenced by RuntimeInstrumentation:WindowsAgent:PolicyFile

Required settings:

Command-backed sources must use a fully qualified executable path, typed arguments, UseShellExecute=false, explicit timeout, and stdout/stderr byte limits. Shell invocation is not allowed.

Runtime Status Sources

The active baseline supports:

The parser accepts common Windows/Docker-style fields including container id, image name/reference, image id/digest, observed timestamps, labels, and annotations. It normalizes only valid sha256:<64-hex> digests.

Native Windows runtime APIs and named-pipe clients remain planned until Stella Ops owns or approves the API contract, permission model, fixtures, dependencies, and tests.

Permissions

The Windows service account must be least-privilege. It needs only:

Permission denied, unavailable runtime source, malformed data, tag-only image identity, stale status, ambiguous status, timed-out commands, over-large command output, and missing sources all fail closed.

Diagnostics And Failure Modes

Each collection cycle produces a WindowsHostAgentSnapshot with:

Important reason codes:

Reason codeMeaning
runtime_status.source_failedOne or more configured sources failed.
runtime_status.no_publishable_digestNo collected status had a valid digest.
runtime_status.some_records_blockedAt least one status was blocked while another was publishable.
runtime_status.digest_missing_or_malformedStatus was tag-only or had a malformed digest.
runtime_status.staleStatus exceeded MaxRuntimeStatusAge.
runtime_status.ambiguousMultiple records mapped to the same container id.
runtime_status.permission_deniedService account lacks source access.
runtime_status.runtime_unavailableRuntime command/API/named pipe is unavailable.
runtime_status.command_timeoutCommand-backed source exceeded its timeout.
runtime_status.command_output_too_largeCommand output exceeded configured bounds.

The bounded spool accepts only digest-valid HostRuntimeStatus records, rejects invalid digests, drops when full, records retry attempts, and removes entries when retry budgets are exhausted.