Skip to content

Releases: slob-coder/ops-agent

v2.3.4

Choose a tag to compare

@slob-coder slob-coder released this 06 May 17:26

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 --3way for 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 --include extensions with --exclude-dir approach
  • 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 _ shadowing i18n.t import (TypeError)
  • Restore ANSI colors by using sys.__stdout__
  • _display_width strips ANSI escape codes before calculating width
  • Treat East Asian Ambiguous width chars as 2 columns in banner
  • Exclude .bak and .orig files from grep search
  • Fix _sanitize_diff orphaned 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

Choose a tag to compare

@slob-coder slob-coder released this 06 May 07:13

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 of root/project/backend/...), fixing git 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_width strips 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 i18n t import — TypeError: 'int' object is not callable resolved

v2.3.2

Choose a tag to compare

@slob-coder slob-coder released this 06 May 06:35

v2.3.2 Bug Fixes

  • fix: for-loop variable _ shadows i18n t import, causing TypeError: 'int' object is not callable in incident loop (#635)
  • fix: 修复 _deploy_patch 中 severity 类型比较错误,改用 status==NORMAL 判断
  • fix: remove raw=True from patch_stdout to prevent ANSI escape garbage output
  • docs: add Docker container patrol requirements to observe.md

v2.3.1

Choose a tag to compare

@slob-coder slob-coder released this 05 May 19:24

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 --lang usage 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

Choose a tag to compare

@slob-coder slob-coder released this 05 May 18:37

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 var t → tgt)
  • 修复 pr_body_default 占位符与 _build_pr_body() 不匹配

Usage

# 中文(默认)
python main.py

# 英文
python main.py --lang en

# 环境变量
OPS_AGENT_LANG=en python main.py

v2.2.5

Choose a tag to compare

@slob-coder slob-coder released this 03 May 15:16

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

Choose a tag to compare

@slob-coder slob-coder released this 03 May 14:03

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

Choose a tag to compare

@slob-coder slob-coder released this 03 May 05:55

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

Choose a tag to compare

@slob-coder slob-coder released this 03 May 04:49

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

Choose a tag to compare

@slob-coder slob-coder released this 02 May 03:17

修复

  • 修复 _ask_llm 中 system prompt trace 引用未赋值变量导致 UnboundLocalError 的问题
  • 新增 list trace (lt) 命令,列出 notebook/trace 下的 trace 文件

v2.2.0 新功能回顾

  • ops-agent trace-view 子命令 — trace 日志分析器
  • Context Budget Breakdown + 截断检测
  • 模板感知 section 切分
  • 交互式浏览模式