Commit Graph

23 Commits

Author SHA1 Message Date
Adriano Dal Pastro e54f828722 test: update tests for new session_id behavior
session_id "new" now returns null at creation (set from SDK after completion).
Session tests use custom session_ids directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 21:02:11 +00:00
Adriano Dal Pastro ad38cf7eaf docs: document sdk_conversation_id and multi-turn session flow
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 21:01:03 +00:00
Adriano Dal Pastro 9b68f772f6 fix: session handling and SDK async iteration
- Add sdk_conversation_id column to track SDK conversation separately from user session_id
- Queue processor looks up SDK conversation ID for resume instead of passing user session_id
- session_id "new" stores NULL initially, gets set from SDK on completion
- Custom session_ids are preserved (not overwritten by SDK)
- Worker catches SDK process exit error after messages are collected

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 20:59:55 +00:00
Adriano Dal Pastro 98ad65d248 feat: protect /docs and /redoc with API key
Adds middleware requiring X-Api-Key header or ?api_key= query param
to access Swagger UI and ReDoc. OpenAPI schema remains public.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 20:45:21 +00:00
Adriano Dal Pastro 5d78d865a4 fix: correct Docker setup, SDK async API, and docs
- Dockerfile: use explicit uvicorn command (uv run start fails without package mode)
- docker-compose: mount claude-auth volume to /root/.claude (worker runs as root)
- worker: update to Claude Code SDK async iterable API (query() returns iterator, not array)
- main.py: fix docs_url from /doc to /docs
- README: correct login instructions (exec not run --rm), add production URLs
- Add CLAUDE.md with full project documentation

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 20:35:44 +00:00
Adriano 6c53dd33bc chore: update uv.lock
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 21:42:22 +02:00
Adriano da2a518f8a feat: add Docker setup and README 2026-05-25 18:54:11 +02:00
Adriano d8d7e1a66f feat: add Node.js worker with Claude Code SDK 2026-05-25 18:53:43 +02:00
Adriano 1e69b1aec2 feat: add topic summarize endpoint 2026-05-25 18:53:28 +02:00
Adriano 1b1a0eb6ff feat: add rate limiting, CORS, queue loop in lifespan 2026-05-25 18:51:58 +02:00
Adriano 1feb012682 feat: add queue processor with model resolution 2026-05-25 18:51:22 +02:00
Adriano 6e75ba21da feat: add worker HTTP client 2026-05-25 18:50:44 +02:00
Adriano 335ef7cc6c feat: add sessions endpoints with close mechanism 2026-05-25 18:48:19 +02:00
Adriano 67d479f8ce feat: add requests CRUD endpoints 2026-05-25 18:48:16 +02:00
Adriano 3b665715ff feat: add topics CRUD endpoints 2026-05-25 18:45:15 +02:00
Adriano 7f88ca3a36 feat: add API key authentication and health endpoint 2026-05-25 18:44:33 +02:00
Adriano ffbfecffc5 feat: add Pydantic API models with envelope helpers 2026-05-25 18:42:04 +02:00
Adriano f3281883be feat: add SQLite database layer with schema init 2026-05-25 18:42:00 +02:00
Adriano 8b75fb438f feat: add Pydantic Settings configuration 2026-05-25 18:41:57 +02:00
Adriano 5103c327ae feat: project scaffold with dependencies and directory structure
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 18:39:06 +02:00
Adriano debcc9cdd4 Aggiunto piano di implementazione OpusAgent
14 task TDD con codice completo per FastAPI + Node.js worker.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 18:36:25 +02:00
Adriano d6ecef908a Correzioni self-review: model nelle risposte, session_id chiarito
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 18:26:20 +02:00
Adriano dcdbae211c Aggiunta spec design OpusAgent
Servizio self-hosted su VPS per interazione programmatica con modelli
Anthropic tramite Claude Code SDK e abbonamento Pro/Max.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 18:25:03 +02:00