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

オープン 初心者向け
#2,160 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
api, backend

調査の方向性

core/plugins/contextguru/keepalive.go、特に recordFor を読み、rossoctl/context-guru#1506 で参照されている context-guru v0.7.11 の変更を確認してください。削除された Record.Agent フィールドを Identity: agent.Identify(pctx.Headers) に置き換えてください。Cortex が v0.7.11 でコンパイルでき、変更が #2154 と同じ PR に組み込めれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Go
スター
31
フォーク
49
平均マージ
9時間 43分
マージ済み PR(30日)
367

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rossoctl/cortex のほかの issue

rossoctl/cortex の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。