Skip to content

feat(bot):Refactoring, New Evaluation Module, Feishu channel Opt & Feature Enhancements#428

Merged
MaojiaSheng merged 64 commits intomainfrom
vikingbot_feishu
Mar 5, 2026
Merged

feat(bot):Refactoring, New Evaluation Module, Feishu channel Opt & Feature Enhancements#428
MaojiaSheng merged 64 commits intomainfrom
vikingbot_feishu

Conversation

@yeshion23333
Copy link
Collaborator

@yeshion23333 yeshion23333 commented Mar 5, 2026

Description

1. Document & Configuration Changes / 文档&配置类改动

  • README.md major refactoring: Added descriptions of OpenViking core features, introductions to exclusive tools/hooks, migrated original multi-channel configuration content to independent documents, unified all bot-related configurations under the bot field, and updated deployment instructions / README.md大幅重构:新增OpenViking核心特性说明、专属工具/钩子介绍,将原有多渠道配置内容迁移到独立文档,统一所有bot相关配置嵌套到bot字段下,更新部署说明
  • Updated the link path of channel configuration documentation in README_CN.md / README_CN.md更新渠道配置文档的链接路径
  • Moved the original CHANNEL.md to bot/docs/CHANNEL.md for unified archiving / 原CHANNEL.md移动到bot/docs/CHANNEL.md统一归档

2. New Test Evaluation Module / 新增测试评估模块

  • Added bot/eval/locomo/locomo10.json: locomo test dataset / 新增bot/eval/locomo/locomo10.json:locomo测试数据集
  • Added bot/eval/locomo/run_eval.py: Evaluation task execution script / 新增bot/eval/locomo/run_eval.py:评估任务运行脚本

3. Feature Development & Optimization / 功能开发&优化

  • Feishu channel optimization: Iterated Feishu message processing logic multiple times to support multi-user access / 飞书渠道优化:多次迭代飞书消息处理逻辑,支持多用户接入
  • Agent module upgrade: Optimized context, session loop, memory, and skill modules, and improved session management logic / Agent模块升级:优化上下文、会话循环、记忆、技能模块,优化会话管理逻辑
  • Basic module optimization: Performance optimization of HTTP client/server, sandbox management logic optimization, configuration loading logic optimization, and general tool function upgrade / 基础模块优化:HTTP客户端/服务端性能优化、沙箱管理逻辑优化、配置加载逻辑优化、通用工具函数升级
  • Single-turn conversation channel (single_turn.py): Logic optimization to adapt to fast and simple request scenarios and eval evaluation / 单轮会话渠道single_turn.py,逻辑优化,适配短平快的请求场景,适配eval评测

Related Issue

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

chenjw and others added 30 commits March 2, 2026 10:59
- Add ChatChannel for interactive chat with User:/Bot: labels and thinking display
- Add SingleTurnChannel for one-off -m mode with minimal output
- Add StdioChannel for JSON-based IPC with Rust TUI
- Rename 'vikingbot agent' to 'vikingbot chat'
- Add Python 'ov chat' command that proxies to vikingbot chat
- Add Rust 'ov chat' command that proxies to vikingbot chat
- Refactor ChannelManager to support both config and direct channel addition
- Update event types for better thinking/tool_call/tool_result display
- Default session key: cli__chat__default
…ing into feature/vikingbot_opt

# Conflicts:
#	bot/vikingbot/openviking_mount/ov_server.py
- Update feishu, dingtalk, discord, email, qq, slack, telegram, whatsapp
- Add filter in send() to skip thinking/tool_call/tool_result messages
- Only process is_normal_message (RESPONSE type)
…bility

- Add vikingbot/utils/tracing.py with backend-agnostic @trace decorator
- Use ContextVar for session_id propagation through nested calls
- Implement lazy binding to Langfuse via propagate_attributes
- Update AgentLoop._process_message() to use @trace decorator
- Simplify langfuse initialization logging in commands.py
- Add session_id parameter to litellm_provider.chat()
- Clean up redundant code in utils/helpers.py

The trace decorator abstracts observability concerns, allowing future
switching between Langfuse, OpenTelemetry, or other backends without
modifying business logic.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2. support multi users
2. support multi users
2. support multi users
The propagate_attributes function is a module-level export in Langfuse
Python SDK v3, not a method of the Langfuse client instance.

- Import propagate_attributes from langfuse module
- Remove misleading warning when propagate_kwargs is empty
- Reduce log noise by changing info logs to debug

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Standardize terminology and clean up tracing/Langfuse integration:

- Rename sandbox_key to workspace_id across agent, memory, and tools
- Delete deprecated langfuse_decorator.py (superseded by tracing.py)
- Fix Langfuse v3 SDK propagate_attributes usage (module-level function)
- Improve session_id extraction with better signature inspection
- Reduce log noise in Langfuse attribute propagation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2. support multi users
…ing into feature/vikingbot_opt

# Conflicts:
#	bot/vikingbot/agent/loop.py
#	bot/vikingbot/hooks/base.py
Add extract_user_id parameter to @trace decorator to enable user
tracking in Langfuse. This allows grouping traces by user in the UI.

- Add extract_user_id parameter to @trace decorator
- Extract user_id from InboundMessage.sender_id
- Pass user_id to Langfuse propagate_attributes
- Update loop.py to use new lambda style for session_id extraction

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
chenjw and others added 21 commits March 4, 2026 12:39
- Change usage to usage_details for Langfuse v3 SDK compatibility
- Add support for cache_read_input_tokens (OpenAI/Anthropic prompt caching)
- Add logger import and debug logging for token reporting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the entire legacy test suite including:
- Unit tests (test_agent, test_bus, test_channels, test_config)
- Integration tests (test_agent_e2e)
- Test fixtures, utilities, and OpenSpec config
- Test runner tools (tester/)

These tests were outdated and no longer maintained. Future testing
should use a modern testing framework.
- Update default config path to ~/.openviking/ov.conf
- Add interactive chat mode examples (--no-markdown, --logs flags)
- Remove VKE deployment guide section
- Update Docker volume mount paths
Add detailed Google-style docstrings to:
- AgentLoop.__init__() - parameters and examples
- AgentLoop._publish_thinking_event() - event publishing
- ToolContext - all attributes documented
- Tool base class - complete usage example

Improves code maintainability and IDE support.
Server changes:
- Add --with-bot flag to enable Bot API proxy
- Register bot_router at /bot/v1 prefix
- Add bot_api_url configuration option
- Initialize bot proxy in bootstrap process

CLI changes:
- Update ov chat endpoint to /bot/v1/chat
- Fix UTF-8 input handling
- Add endpoint configuration via env var
- Enhance tool registry with better error handling
- Update OpenAPI channel configuration
- Improve session manager with better state handling
- Enhance Langfuse tracing integration with diagnostic logging
- Enhance CLI commands with new agent tool integration
- Move plugin analysis doc to docs directory
- Add RFC for OpenViking CLI ov-chat command
- Add server restart script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts:
#	bot/vikingbot/agent/context.py
#	bot/vikingbot/agent/loop.py
#	bot/vikingbot/agent/memory.py
#	bot/vikingbot/bus/events.py
#	bot/vikingbot/channels/feishu.py
#	bot/vikingbot/channels/single_turn.py
#	bot/vikingbot/config/loader.py
#	bot/vikingbot/openviking_mount/ov_server.py
@MaojiaSheng MaojiaSheng merged commit 847e86a into main Mar 5, 2026
4 of 6 checks passed
@MaojiaSheng MaojiaSheng deleted the vikingbot_feishu branch March 5, 2026 07:06
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants