Repository navigation
Releases: slob-coder/ops-agent
Releases · slob-coder/ops-agent
Release list
v2.3.4
Patch Generation Robustness Overhaul
This release focuses on hardening the LLM-driven patch generation pipeline — fixing path resolution, diff application, JSON parsing, and observability.
Bug Fixes
- Use
git apply --3wayfor LLM-generated patches (better conflict resolution) - Fuzzy-match diff file paths when LLM fabricates wrong directories
- Include full file contents in patch generator prompt for better context
- Bug-specific source search instead of reusing diagnose-stage locations
- Replace hardcoded
--includeextensions with--exclude-dirapproach - Keyword search prioritizes specific identifiers over generic terms
- Handle LLM illegal JSON escapes (`' and bare newlines)
- Patch generation uses repo-relative paths instead of absolute paths
- Fix severity type comparison in
_deploy_patch - Fix for-loop variable
_shadowingi18n.timport (TypeError) - Restore ANSI colors by using
sys.__stdout__ _display_widthstrips ANSI escape codes before calculating width- Treat East Asian Ambiguous width chars as 2 columns in banner
- Exclude
.bakand.origfiles from grep search - Fix
_sanitize_difforphaned call (reverted but still referenced)
Features
- Log prompt length and LLM empty response details (
finish_reason) - Log LLM raw response in PatchGenerator before parse
- Log diagnose LLM raw response for JSON parse failure debugging
- INFO-level logging for patch generation and application
- Add patch info to trace output
Docs
- Add Docker container patrol requirements to
observe.md
v2.3.3
v2.3.3 Bug Fixes
- fix: patch generation uses repo-relative paths instead of absolute paths —
source_locator.render()now outputs repo-relative paths (e.g.backend/...instead ofroot/project/backend/...), fixinggit apply"No such file or directory" errors - fix: patch applier pre-checks diff file references exist before running
git apply - fix: patch generator prompt explicitly requires repo-relative paths in diff headers
- fix:
_display_widthstrips ANSI escape codes before calculating width — banner border │ no longer sticks to content - fix: console output uses
sys.__stdout__via_raw_print— ANSI colors restored without prompt_toolkit garbage - fix:
for _ in range()variable no longer shadows i18ntimport —TypeError: 'int' object is not callableresolved
v2.3.2
v2.3.2 Bug Fixes
- fix: for-loop variable
_shadows i18ntimport, causingTypeError: 'int' object is not callablein incident loop (#635) - fix: 修复
_deploy_patch中 severity 类型比较错误,改用status==NORMAL判断 - fix: remove
raw=Truefrompatch_stdoutto prevent ANSI escape garbage output - docs: add Docker container patrol requirements to observe.md
v2.3.1
v2.3.1
Bug Fixes
- Fix banner hardcoded Chinese not going through i18n
t() - Fix dynamic banner width for zh/en alignment (CJK double-width character support)
Documentation
- Add English translations:
README.en.md,USER_GUIDE.en.md - Add language switcher links on all documentation
- Add
SCENARIOS.md+SCENARIOS.en.md— 8 usage scenario guides - Add
--langusage guide to README and USER_GUIDE
Misc
- Close GitHub Issue #2 (lessons/ and audit/ not generating content)
项目代码统计
| 类别 | 行数 | 文件数 |
|---|---|---|
| Python 源码 | 14,965 | 56 |
| Python 测试 | 6,243 | 17 |
| Prompt 模板 | 1,561 | 25 |
| i18n 字典 | 866 | 2 |
| 文档 | 5,448 | 6 |
| 配置/脚本 | 1,593 | — |
| 总计 | 30,676 | — |
| 模块 | 行数 |
|---|---|
| src/agent | 3,982 |
| src/infra | 3,294 |
| src/safety | 1,411 |
| src/repair | 1,583 |
| src/reliability | 844 |
| src/i18n | 119 |
v2.3.0 — i18n Support
v2.3.0 — 中英文双语支持
Features
- i18n 基础设施:
src/i18n/模块,YAML 字典 + prompt 目录双轨架构 - 语言切换:
--lang zh|en参数、OPS_AGENT_LANG环境变量、配置文件,默认中文 - 9 个 prompt 双语版本:7 个核心 prompt + reporter + agents_md
- 327 个 i18n key:覆盖所有用户可见文本
- UI 文本国际化:human.py / pipeline.py / core.py / chat.py / check.py
- 通知国际化:notifier.py / reporter.py / production_watcher.py
- 边角文件:pr_workflow.py / agents_md.py
- 向后兼容:默认 zh,现有行为不变
Bug Fixes
- 修复变量名遮蔽 i18n
t()函数(loop vart→tgt) - 修复
pr_body_default占位符与_build_pr_body()不匹配
Usage
# 中文(默认)
python main.py
# 英文
python main.py --lang en
# 环境变量
OPS_AGENT_LANG=en python main.pyv2.2.5
Bug Fixes
- Fix false rollback when grep/find returns exit code 1 — 信息收集类命令(grep/find/test)无匹配时返回退出码 1,此前被误判为步骤失败并触发回滚
Changes
CommandResult.is_tolerable()— 支持步骤级容忍退出码(tools.py)_execute执行前检查tolerate_exit_codes字段(pipeline.py)- plan prompt 新增
tolerate_exit_codes字段文档(plan.md)
v2.2.4
v2.2.4
New Features
- LLM Response Validator — 解析前校验 LLM 输出,校验失败写入
notebook/llm_errors/YYYY-MM-DD.jsonl- 校验阶段:DIAGNOSE / PLAN / VERIFY (JSON) + ASSESS (键值对)
- 错误类型:empty_response / json_parse_failed / missing_required_field / invalid_field_value
- 每条日志含:timestamp, phase, provider, model, error_type, validation checks, request/response snippets, duration
- trace-view analyzer — 支持 JSON 结构化 verify response 解析
Bug Fixes
- verify prompt 误判修复 — LLM 在 evidence 中提及 FAILED 不再导致 SUCCESS 被误判(改为 JSON 结构化输出)
Changes
max\_plan\_rounds默认值从 3 调整为 8- 81 个 LLM validator 测试用例,95% 覆盖率
v2.2.3
Bug Fix
verify prompt 误判修复:LLM 在 evidence 中提到 FAILED 时不再导致 SUCCESS 结果被误判为 FAILED。
Changes
- verify prompt 改为 JSON 结构化输出,与 diagnose/plan 保持一致
- _parse_verify_response 改为 JSON 优先解析,JSON 解析失败时 fallback 到关键词匹配
- 版本号更新至 2.2.3
v2.2.2
What's Changed
🔧 Prompt 优化
- 移除 request 中与 system prompt 重复的字段:
system_map、permissions、mode不再在每个 request prompt 中重复注入,每次 LLM 调用节省 200-500 token
🔍 智能检索重排序(依赖 smart-notebook v2+)
- Hybrid 排序(默认):关键词命中(0.5) + 图距离(0.3) + 热点惩罚(0.2)
- LLM 排序:可选,LLM 对候选结果按相关性排序,异常自动回退 hybrid
- 配置项位于
notebook/config/notebook.yaml→smart.knowledge.ranking
🐛 Bug 修复
- 修复 system prompt 构建时
UnboundLocalError(变量未定义) - 修复 reflect 中 playbook 内容被截断(改用 code fence 包裹)
- 修复 UTF-8 解码错误导致内部错误(添加
errors="replace") - 修复 incident 关闭时跳过 reflect
- 修复 plan READY 但无有效 steps 时未降级为 COLLECT_MORE
- 修复 COLLECT_MORE 超轮次限制时展示空方案
✨ 新功能
- 新增
list trace/lt命令查看 trace 文件列表 - 新增
trace-view子命令分析 trace 日志 max_plan_rounds可通过 LimitsConfig 配置
Full Changelog: v2.2.1...v2.2.2
v2.2.1 — 修复 UnboundLocalError
修复
- 修复
_ask_llm中 system prompt trace 引用未赋值变量导致UnboundLocalError的问题 - 新增
list trace(lt) 命令,列出 notebook/trace 下的 trace 文件
v2.2.0 新功能回顾
ops-agent trace-view子命令 — trace 日志分析器- Context Budget Breakdown + 截断检测
- 模板感知 section 切分
- 交互式浏览模式