HERMES-GIELIE/api
Chris Watson 8566462b72 feat: add MEDIA_ALLOWED_ROOTS env var for configurable /api/media whitelist
The /api/media endpoint only serves files from ~/.hermes, /tmp, and the
active workspace. Power users with media in custom directories (models,
Downloads, Pictures, ComfyUI outputs) have no way to serve those files
inline without copying or symlinking.

Add MEDIA_ALLOWED_ROOTS env var — a colon-separated list of absolute
paths — that extends the allowed roots at runtime. Each entry is resolved
and validated as an existing directory before being appended. Non-existent
or invalid paths are silently skipped.

This is purely additive: the built-in security whitelist is unchanged,
and if MEDIA_ALLOWED_ROOTS is unset, behavior is identical to before.
2026-05-11 02:45:46 +00:00
..
__init__.py
agent_health.py Mute stale stopped gateway heartbeat 2026-05-09 14:53:42 +08:00
agent_sessions.py feat: add read-only session lineage report 2026-05-10 23:28:14 +08:00
auth.py fix(stage-326): preserve SESSION_TTL constant + reconcile #1957 tests 2026-05-09 18:33:28 +00:00
background.py
clarify.py
commands.py
config.py Merge PR #2039 into stage-335 2026-05-11 00:25:07 +00:00
dashboard_probe.py feat: link official Hermes dashboard 2026-05-05 01:23:55 +00:00
extensions.py
gateway_watcher.py
goals.py fix(i18n): localize /goal runtime status strings 2026-05-10 15:21:24 +08:00
helpers.py fix: add cdn.jsdelivr.net to CSP connect-src to allow xterm source map fetches 2026-05-07 20:42:55 +00:00
kanban_bridge.py stage-315 absorb: document handle_kanban_* three-valued return contract 2026-05-07 18:52:01 +00:00
metering.py
models.py Stage 331: PR #2015 — fix(sessions): stitch continued session transcripts by @Jellypowered 2026-05-10 17:09:21 +00:00
oauth.py fix(oauth): serialize Anthropic env fallback reads 2026-05-07 02:47:19 +00:00
onboarding.py Fix Xiaomi API key env detection 2026-05-11 07:33:52 +08:00
profiles.py refactor(profiles): relocate _profiles_match to api/profiles.py (#1895 review) 2026-05-08 17:12:01 +00:00
providers.py Merge PR #2034 into stage-334 2026-05-10 23:38:05 +00:00
request_diagnostics.py fix: add request wedge diagnostics 2026-05-08 15:37:08 +00:00
rollback.py
routes.py feat: add MEDIA_ALLOWED_ROOTS env var for configurable /api/media whitelist 2026-05-11 02:45:46 +00:00
session_ops.py
session_recovery.py fix(recovery): close concurrency hazards in state.db sidecar reconciliation 2026-05-11 02:44:38 +00:00
startup.py
state_sync.py
streaming.py Merge PR #2039 into stage-335 2026-05-11 00:25:07 +00:00
system_health.py feat: add VPS resource health panel 2026-05-05 17:30:56 +00:00
terminal.py
updates.py fix: normalize update banner repository URLs 2026-05-05 08:29:00 -07:00
upload.py
workspace.py fix: preserve inaccessible workspace entries 2026-05-07 16:56:48 +00:00