contextguru plugin: set keepalive.Record.Identity; context-guru v0.7.11 removes Record.Agent
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
阅读 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, setsAgent: pctx.Headers.Get("User-Agent")inkeepalive.Record.- rossoctl/context-guru#1506 moved client rules into the
agentpackages and removedRecord.Agent. The keeper now reads the client fromRecord.Identity.
Fix
- Set
Identity: agent.Identify(pctx.Headers)in place ofAgent: .... - Library code takes
agent.Clientand no longer reads User-Agent itself (context-guruCLAUDE.md, Client-specific code). - #2154 changes the same
recordForfunction (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) andObservation.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.PromptOfanddash.AgentForare also removed, and Cortex does not call them.tooldefer.Flow.Pricesand theCanKeepAlivenames still exist as deprecated aliases.
Refs #2154 #2159
- 主要语言
- Go
- 星标
- 31
- 派生
- 49
- 平均合并
- 9 小时 43 分钟
- 30 天内合并 PR
- 367
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rossoctl/cortex 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug laptop
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 1 天内回复
相似的 Issue
-
taskmanager: a failed v1alpha1 backup leaves the partial backup behind可能已有人在做 @arshil42 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 80/100
ether/etherpad-go#571 ·
维护者通常 1 天内回复
-
labeler: read a limit above math.MaxInt as math.MaxInt in nonNegative (CodeQL alerts #20 and #21)未关闭cost:approved factory:queued factory:tracking priority:p2 rank:12 ready-for-doing task:approved tokens:50k
难度 2/5 1-3 小时 新手友好度 88/100
sisaku-security/sisakulint#860 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100