Add backend support - Cursor, Gemini, Claude#2
Draft
palol wants to merge 16 commits intovoytek:mainfrom
Draft
Conversation
Support cursor
- Add integrations/_shared.py: SCHEMA, load_prompt_template, build_triage_prompt, parse_structured_response - Add integrations/openai_triage.py (moved from digest.py), use shared prompt + parse helper - Refactor integrations/cursor_cli.py to use build_triage_prompt and parse_structured_response - Registry-based backend selection in integrations/__init__.py (TOCIFY_BACKEND) - Slim digest.py to orchestration only; get_triage_backend() from integrations - Single JSON Schema for OpenAI/Claude/Gemini; Cursor remains prompt-only + parse Co-authored-by: Cursor <cursoragent@cursor.com>
- weekly-digest.yml: OpenAI only (uv sync, TOCIFY_BACKEND=openai, no Cursor CLI) - weekly-digest-cursor.yml: Cursor only (install Cursor CLI, TOCIFY_BACKEND=cursor) Co-authored-by: Cursor <cursoragent@cursor.com>
Split backends by agent and unify structured-output
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
integrations/with registry-based selection viaTOCIFY_BACKEND(no hard-coded model list)._shared.pyprovidesSCHEMA,build_triage_prompt(), andparse_structured_response()so all backends use one schema and one prompt builder; Cursor stays prompt-only + parse.get_triage_backend().Changes
integrations/_shared.py: SCHEMA, load_prompt_template, build_triage_prompt, parse_structured_responseintegrations/openai_triage.py: OpenAI backend (from digest.py), uses shared prompt + parseintegrations/cursor_cli.py: uses build_triage_prompt and parse_structured_responseintegrations/__init__.py: registry keyed by TOCIFY_BACKENDdigest.py: slimmed to config, RSS, prefilter, triage_in_batches, render; single call toget_triage_backend()Made with Cursor
Working implementation using Cursor-cli. Requires CURSOR_API_KEY.
Current code replaces OpenAI, but could easily be wrapped to support multi-models.Interestingly ~ Cursor is one of those models that does not support structured outputs, so we take a slightly fuzzier strategy here.
::pa0
p.s. thanks for sharing this tool, Brad!