3 Commits

Author SHA256 Message Date
Alphaeus Mote cf2c83fb56 feat(agent): file downloads follow server paths, with the server's trust
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>
2026-11-01 08:50:36 -05:00
Alphaeus Mote 4bb68997b7 test(agent): the file fetcher's loopback server binds a free port
A random port in 20000-60000 occasionally collided with one in use and
HttpListener.Start() threw, failing a delivery test now and then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 22:26:49 -04:00
gsadmin 0c15833f7c Script-integrated S3 delivery: $Files dictionary, prefixes, expansion
CI / build-test (push) Successful in 12m48s
CI / images (push) Successful in 1m57s
CI / build-test (pull_request) Successful in 3m18s
CI / images (pull_request) Has been skipped
Scripts declare file bindings in the define strip alongside parameters,
secrets and Functions: S3 objects — or whole prefixes delivered
recursively — that download to the device before execution. The server
lists and presigns everything once at dispatch (shared across group
fan-outs; failures surface before any job rows exist, like secrets),
so agents never hold S3 credentials.

On the device the destination path gets full expansion (%VAR% natively,
$env:/$(...) through a short-lived runspace regardless of engine), items
stream to temp files and move into place, relative keys are checked
against traversal, and every entry lands in a case-insensitive ordered
dictionary: $Files.Name is a FileInfo, or a DirectoryInfo for prefixes.
Per-entry continue-on-failure logs a warning and still runs the script
($Files.Name.Exists reveals what arrived); otherwise delivery failure
fails the job before execution. PowerShell 5 gets the same $Files via
typed literals; bash gets one env var per entry.

The execution flow below the editor is now fully vertical — Execution,
Schedules and Triggers each get a full-width row.

Verified with real HTTP round-trips: single files, recursive directory
trees, 404s under both failure modes, server-side resolution errors,
and path-traversal refusal (9 new tests; suites at 58/63/89, svelte
clean).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 11:08:45 -04:00