feat(agent): expose chat history with existing chat scope (#6443)

Co-authored-by: Raul <9117159+raultcj@users.noreply.github.com>
This commit is contained in:
Raul Juarez
2026-10-23 13:18:49 -06:00
committed by GitHub
co-authored by Raul
parent 01566b158e
commit b4ae7ebcc4
6 changed files with 167 additions and 3 deletions
@@ -100,6 +100,14 @@ python3 ~/.claude/skills/odysseus/scripts/odysseus_api.py POST /api/codex/memory
- `POST /api/codex/documents` — body `{"session_id": "...", "title": "...", "content": "...", "language": "markdown"}`. Requires `documents:write`.
- `DELETE /api/codex/documents/{doc_id}` — delete a document. Requires `documents:write`.
## Chat history
- `GET /api/codex/chat/{session_id}?offset=0&limit=100` — read a paginated conversation transcript owned by the token owner. Requires the existing `chat` scope.
```bash
python3 ~/.claude/skills/odysseus/scripts/odysseus_api.py GET /api/codex/chat/SESSION_ID
```
## Email draft + send
- Prefer `POST /api/codex/emails/draft-document` for agent-written email replies. It creates an editable Odysseus Document with `language: "email"` and does not touch IMAP/send.
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Small Odysseus scoped API helper for Codex terminal sessions."""
"""Small Odysseus scoped API helper for Claude Code terminal sessions."""
from __future__ import annotations
@@ -44,7 +44,7 @@ def _config() -> tuple[str, str] | None:
if not token:
missing.append("ODYSSEUS_API_TOKEN")
if missing:
print(f"missing {', '.join(missing)}; create a Codex Agent token in Odysseus Settings", file=sys.stderr)
print(f"missing {', '.join(missing)}; create a Claude Agent token in Odysseus Settings", file=sys.stderr)
return None
return base_url, token