Add API server session control surface - #29435
Closed
Codename-11 wants to merge 1 commit into
Closed
Conversation
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reworks the stale API Server control-surface idea from PR #8556 into a focused patch on current
upstream/main.This adds a client/session resource layer for mobile and web clients while keeping it as a thin wrapper over current upstream primitives:
GET /api/sessionsPOST /api/sessionsGET /api/sessions/{session_id}PATCH /api/sessions/{session_id}DELETE /api/sessions/{session_id}GET /api/sessions/{session_id}/messagesPOST /api/sessions/{session_id}/forkPOST /api/sessions/{session_id}/chatPOST /api/sessions/{session_id}/chat/streamThe implementation uses existing
SessionDBand_run_agentmachinery, includingX-Hermes-Session-IdandX-Hermes-Session-Keysemantics. It does not add a second session DB helper or a parallel agent execution path./v1/capabilitiesnow advertises the session/chat surface and explicitly marks deferred areas as unsupported so clients can choose safe fallbacks.Explicitly deferred
This PR intentionally does not implement broad admin/config control, jobs admin expansion, memory write APIs, skills/category APIs, WebRTC, provider-native realtime sessions, or realtime voice.
Verification
python -m py_compile gateway/platforms/api_server.pypython -m pytest tests/gateway/test_api_server.py -q -o 'addopts='— 149 passedpython -m pytest tests/gateway/test_session_api.py -q -o 'addopts='— 7 passedpython -m pytest tests/gateway/test_api_server*.py -q -o 'addopts='— 275 passed