8 Commits

Author SHA1 Message Date
oudecheng
29060315a3 feat(observability): 端到端可观测性整改,修复 trace_id 断链与指标配对
- 传播 trace_id:BusToolCallEmitter/SubAgentEmitter/processor 全链路设置

- AgentEnd 配对:补发 5 个 cancel/defensive 路径,闭合 AgentStart 指标

- LLM 计时修正:attempt_start 移入 retry 循环,排除退避等待时间

- /metrics auth:非 loopback 部署时纳入 Bearer token 校验

- recorder 复用:OnceLock 缓存 PrometheusHandle,热重启后不再返回 503

- 结构化日志:新增 tracing_ctx + JSON 日志格式支持
2026-08-12 08:26:42 +08:00
oudecheng
510520e08e refactor: 提取公共工具函数,修复飞书正则重复编译和网关路由DRY问题,添加CI安全审计 2026-08-07 08:33:15 +08:00
oudecheng
cda14360af chore: 建立工程化基线(rustfmt + clippy + CI + eslint + prettier)
配置:
- rustfmt.toml: 固化 max_width=100 / 4 空格缩进,cargo fmt 全量格式化
- Cargo.toml: 配置 [lints.rust] 与 [lints.clippy] 渐进式规则
- .github/workflows/ci.yml: Rust(fmt+clippy+test) + 前端(eslint+tsc+test) 双平台 CI
- Makefile: 新增 check/fmt/fix 目标,clippy 对齐 --all-targets --all-features
- web: eslint flat config + prettier 配置 + package.json 脚本与依赖
- src/main.rs: loop→while 修复 clippy::never_loop

对抗性审查发现并修复:
- eslint 缺 caughtErrorsIgnorePattern 导致 catch(_) 误报为 error
- 前端 lint 未接入 CI,现已补上 Lint 步骤
- Makefile 与 CI 的 clippy flags 不一致,已对齐
2026-08-03 23:24:02 +08:00
d802534abe feat(gateway): 支持网关平滑重启功能
- 在 Gateway 运行逻辑中增加重启循环,可根据重启信号自动重启服务
- 添加取消管理器功能,支持取消所有运行中的 Agent 以便平滑重启
- 在 HTTP API 新增 /api/restart 接口,实现基于任务活动检测的安全重启
- GatewayState 增加重启信号通道,支持异步触发重启流程
- 修改主运行逻辑支持重启等待机制,实现优雅关闭或重启
- 日志初始化修复防止重复初始化导致的问题
- 技能和子代理加载支持自定义绝对路径来源,增加灵活性和扩展性
- 调整技能与子代理来源枚举,增加 Custom 选项支持动态路径
- 优化工具与任务运行时代码,完善路径处理和克隆逻辑
- 前端配置页增加时区选择下拉菜单,提供常用时区选项
- 新增来源路径编辑组件,支持启用/禁用已知来源及添加自定义绝对路径
- 配置页新增保存配置后重启提示,支持用户确认立即重启网关
- 实现重启操作的前端调用及重启状态展示,包括任务冲突提示与重启轮询恢复
- 频道绑定 Agent 字段由输入框改为下拉选择,提升配置体验和正确性
2026-06-19 10:40:00 +08:00
73dab09bfe Refactor code for improved readability and consistency
- Adjusted formatting and indentation in various files for better clarity.
- Consolidated multi-line statements into single lines where appropriate.
- Enhanced error handling messages for better debugging.
- Added a new InboundProcessor struct to handle inbound messages more effectively.
- Updated test cases to ensure they align with the new code structure.
2026-04-28 10:33:31 +08:00
e6f23858b8 feat(timezone): 添加时区支持,增强调度和日志功能 2026-04-23 23:50:08 +08:00
7fefd40dca feat: 重构记忆工具提示和代理配置,增强用户指导和系统提示 2026-04-23 17:33:10 +08:00
09899ddb91 添加日志模块,初始化日志记录功能,设置日志目录为 ~/.picobot/logs,支持每日轮换 2026-04-06 22:51:50 +08:00