contextguru plugin: set keepalive.Record.Identity; context-guru v0.7.11 removes Record.Agent

Offen Anfängerfreundlich
#2,160 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
82/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
go
Bereich
api, backend

Rechercherichtung

Lies core/plugins/contextguru/keepalive.go, insbesondere recordFor, und prüfe die Änderung in context-guru v0.7.11, auf die rossoctl/context-guru#1506 verweist. Ersetze das entfernte Feld Record.Agent durch Identity: agent.Identify(pctx.Headers). Fertig ist die Arbeit, wenn Cortex mit v0.7.11 kompiliert und die Änderung zusammen mit #2154 in denselben PR passt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Summary

context-guru v0.7.11 removes keepalive.Record.Agent. The contextguru plugin sets that field, so Cortex no longer compiles once it embeds v0.7.11. The fix is one line. context-guru v0.7.10 is safe to embed with no change.

What breaks

  • core/plugins/contextguru/keepalive.go, recordFor, sets Agent: pctx.Headers.Get("User-Agent") in keepalive.Record.
  • rossoctl/context-guru#1506 moved client rules into the agent packages and removed Record.Agent. The keeper now reads the client from Record.Identity.

Fix

  • Set Identity: agent.Identify(pctx.Headers) in place of Agent: ....
  • Library code takes agent.Client and no longer reads User-Agent itself (context-guru CLAUDE.md, Client-specific code).
  • #2154 changes the same recordFor function (the open-task counts), so both fit in one PR.

Other changes when Cortex moves to v0.7.11

  • The accountant moves to v0.11.x. Cortex's accountant.Withhold(p.result, before) (core/accounting/host.go) and Observation.TokensBefore (core/accounting/metrics.go) still compile there. Both are deprecated: see #2159. They are removed only in a later accountant minor release (rossoctl/context-guru#1523), after #2159 merges.
  • No other Cortex code uses an API that v0.7.11 removes. waitcause.PromptOf and dash.AgentFor are also removed, and Cortex does not call them. tooldefer.Flow.Prices and the CanKeepAlive names still exist as deprecated aliases.

Refs #2154 #2159

Vorherrschende Sprache
Go
Sterne
31
Forks
49
Ø Merge
9 Std. 43 Min.
Gemergte PRs (30 T.)
367

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus rossoctl/cortex

Alle Issues in rossoctl/cortex

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.