Commit Graph

11 Commits

Author SHA1 Message Date
6d9dc5982b Updated .gitignore 2026-03-16 12:40:29 -05:00
bc2299824e Fix loop re-processing, branch awareness, and commit message clarity
- Sanitize AI responses by replacing BLIGHT: with BLIGHT: to prevent
  the service's own commits from triggering another processing cycle
- Pass branch (extracted from refs/heads/<branch>) through to Gitea get/update
  calls so pushes to non-default branches are read and written correctly
- Commit message now includes the file path: "BLIGHT: process triggers in <path>"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 12:39:05 -05:00
cf71fb4464 Add BLIGHT:: document-scope triggers and case-insensitive matching
- Split TRIGGER_PATTERN into INLINE_PATTERN (BLIGHT:) and DOCUMENT_PATTERN
  (BLIGHT::), both case-insensitive
- Inline triggers replace only the trigger line (existing behaviour)
- Document-scope triggers replace the entire file; multiple BLIGHT:: triggers
  in one file are processed sequentially, each seeing the previous result
- Updated FAILED_TEMPLATE to two-line format with BLIGHT_FAILED and BLIGHT_ERROR
- Added complete_document() to AIProvider ABC and GeminiProvider with a
  dedicated system prompt instructing the model to return the full document

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 12:36:32 -05:00
90d7089886 Add deployments table to README
Documents the Homelab installation location and service name.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 23:39:20 -05:00
66e4850013 Update README: Docker networking fix and systemd service setup
Documents the gateway IP approach for Docker on Linux and adds
step-by-step systemd service installation instructions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 23:35:19 -05:00
f0ada815c0 Fix null added/modified fields in webhook payload
Gitea's test delivery sends null instead of empty arrays for
added/modified commit fields, causing a TypeError on concatenation.
Also removes temporary debug logging.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 22:49:00 -05:00
3ee1d55584 Add debug logging to signature verification
Temporarily logs received vs expected signatures to diagnose
webhook secret mismatches.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 22:47:09 -05:00
7f7ebc84d7 Fix webhook signature verification for Gitea
Gitea sends X-Gitea-Signature as a raw hex digest with no scheme
prefix, unlike GitHub's sha256=<digest> format. Removed the prefix
parsing that was causing every request to fail validation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 22:41:02 -05:00
a2adda20a8 Update README with Docker webhook setup instructions
Documents the host.docker.internal approach for Gitea running in
a Docker container, including docker-compose config and gotchas.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 21:43:43 -05:00
7819dccb10 Add self-update on startup via git pull
On each restart, CUE pulls the latest code from origin before
binding to the port, so deployments just require a service restart.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 20:21:31 -05:00
4c9fecda16 Initial commit: BLIGHT: CUE
Webhook listener that monitors Gitea repos for BLIGHT: triggers in
markdown files, processes them via Gemini 2.5 Flash-Lite, and writes
results back in-place.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 20:17:31 -05:00