feat: add API server session controls - #29302
Conversation
|
Hey. Also waiting for this feature in the next version |
|
Also would love this feature! in general more APIs would be great to build clients on-top of hermes. |
|
Echoing sentiment here - would use these APIs! |
|
Hey @Codename-11! Just wanted to flag that I opened Codename-11#2 against your session-control branch. It adds multimodal/image support for the new Without this, clients can send image-shaped payloads, but the new session chat endpoints pass them through without the same validation/canonicalization that |
…-with-media Support media in session chat API
|
Merged via salvage PR #33134 — #33134 Your branch was substantially behind main (1246 files / +9.7k / −181k stale) so direct merge wasn't possible. Cherry-picked your two substantive commits onto current main, resolved conflicts with #33016 (which had just added /v1/skills + /v1/toolsets), flipped the placeholder Both authorships preserved via rebase merge into main:
Validation done before merge:
AUTHOR_MAP entries added for both of you in |
Summary
/api/sessionscontrol surface for API Server clients: list/create/read/update/delete, message history, fork, chat, and chat SSE./v1/capabilitiesso mobile/web clients can discover enhanced Hermes support and fall back safely._run_agentpath and SessionDB primitives, preservingX-Hermes-Session-Id/X-Hermes-Session-Keysemantics and existing/v1/runsbehavior.Revives the product intent from stale PR #8556 without mechanically merging the stale branch.
Test plan
python -m py_compile gateway/platforms/api_server.pypython -m pytest tests/gateway/test_session_api.py -q -o 'addopts='python -m pytest tests/gateway/test_api_server.py -q -o 'addopts='Note: local verification emits warnings from a local Hermes-Relay bootstrap monkey-patch in this environment; the targeted tests pass.