converge: phase 2 — SSE relay client for realtime pull on push

- RepoConfig gains rcGiteaRepo :: Maybe Text for relay matching
- Options gains optRelayUrl :: Maybe Text (--relay-url CLI, relay_url config)
- connectRelay connects to converge-relay SSE endpoint, parses push events,
  triggers gitPull on matching repos (by gitea_repo + branch)
- Exponential backoff reconnection (1s .. 60s) on disconnect/error
- Skips pull if repo is mid-operation (merge/rebase/etc.)
- Dependencies: http-client, http-client-tls, http-types, aeson, bytestring
- SSE parser handles event:/data: fields, blank-line delimiters, CRLF endings
- Updated SPEC.md, example config, and help text
This commit is contained in:
2026-05-14 14:13:43 -04:00
parent 25881f3ff8
commit 7feff5abfa
5 changed files with 193 additions and 6 deletions
+5
View File
@@ -29,10 +29,15 @@ ghc-options:
dependencies:
- base >= 4.7 && < 5
- aeson
- async
- bytestring
- directory
- filepath
- fsnotify
- http-client
- http-client-tls
- http-types
- optparse-applicative
- process
- text