Skip to content

Add backend support - Cursor, Gemini, Claude#2

Draft
palol wants to merge 16 commits intovoytek:mainfrom
palol:main
Draft

Add backend support - Cursor, Gemini, Claude#2
palol wants to merge 16 commits intovoytek:mainfrom
palol:main

Conversation

@palol
Copy link

@palol palol commented Feb 19, 2026

Summary

  • Split by agent: OpenAI and Cursor live in integrations/ with registry-based selection via TOCIFY_BACKEND (no hard-coded model list).
  • Shared prompt/schema: _shared.py provides SCHEMA, build_triage_prompt(), and parse_structured_response() so all backends use one schema and one prompt builder; Cursor stays prompt-only + parse.
  • digest.py is orchestration only; backend is chosen via get_triage_backend().

Changes

  • integrations/_shared.py: SCHEMA, load_prompt_template, build_triage_prompt, parse_structured_response
  • integrations/openai_triage.py: OpenAI backend (from digest.py), uses shared prompt + parse
  • integrations/cursor_cli.py: uses build_triage_prompt and parse_structured_response
  • integrations/__init__.py: registry keyed by TOCIFY_BACKEND
  • digest.py: slimmed to config, RSS, prefilter, triage_in_batches, render; single call to get_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!

@palol palol marked this pull request as draft February 20, 2026 01:39
palol and others added 7 commits February 19, 2026 18:21
- 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
@palol palol changed the title tocify-cursor Add backend support - Cursor, Gemini, Claude Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant