v0.2.6 : heartbeat SSE anti-coupure (agents) + jean link en service (start/stop/restart/code)

- fix "TypeError: Load failed" en mode agent : heartbeat SSE (: ping /15s)
  pour que les longs silences (exécution d'outil) ne soient pas coupés en transit
- jean link devient le pilote du service (comme jean) ; worker = jean link serve
- jean link code : codes d'appairage à la demande, usage unique, TTL 10 min
  (store fichier haché, partagé entre le CLI et le worker)
- e2eauth.go ajouté au suivi ; README + aide mis à jour
This commit is contained in:
nathaninline committed 2026-06-25 13:27:57 +02:00
1 parent 949e261538
commit 97fbed8de2
6 files changed
+549 -34

No files matched your search

+4
View File
@@ -160,6 +160,8 @@ func handleE2EChat(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "no-cache")
w.Header().Set("X-Accel-Buffering", "no")
flusher, _ := w.(http.Flusher)
mu, stop := sseHeartbeat(w, flusher)
defer stop()
emit := func(obj map[string]any) bool {
b, _ := json.Marshal(map[string]any{"choices": []any{map[string]any{"delta": obj}}})
nonce := make([]byte, 12)
@@ -167,6 +169,8 @@ func handleE2EChat(w http.ResponseWriter, r *http.Request) {
return false
}
sealedEv := append(nonce, gcm.Seal(nil, nonce, b, nil)...)
mu.Lock()
defer mu.Unlock()
if _, err := w.Write([]byte("data: " + base64.StdEncoding.EncodeToString(sealedEv) + "\n\n")); err != nil {
return false
}