Commit Graph
15 Commits
Author SHA1 Message Date
Qin Haojie 7abd6ab249 refactor(client): remove Python embedded mode (#3712)
* refactor(client): remove Python embedded mode

Consolidate Python consumers on the HTTP SDK while keeping shared server and storage capabilities unchanged.

* refactor(client): remove obsolete embedded leftovers
2026-08-10 18:00:00 +08:00
Hao Zheandzhiheng.liu 4237c66031 fix(bot): harden scheduling, sessions, sandbox, and packaging (#3549)
* fix(bot): make SRT sandbox constructible and surface startup failures

Sweep findings: C-02, C-04. Read SRT settings from the correct config and never cache failed startups.

(cherry picked from commit 0d3798399a)

* fix(bot): reject unschedulable cron jobs and honest manual runs

Sweep findings: C-07, C-08. Reject impossible schedules and fail no-op manual execution.

(cherry picked from commit 47413fdffe)

* build: ship VikingBot workspace and bridge assets in wheels

Sweep findings: F-07. Copy required bot assets into the package and resolve installed workspace templates correctly.

(cherry picked from commit 85e9ff2d06)

* fix(bot): OpenAPI channel concurrency, session deletion, and context handling

Sweep findings: C-09, C-10, C-11. Reject ambiguous requests and make session deletion durable.

(cherry picked from commit 68fd70c5be)

* docs(bot): correct channel setup config paths and license metadata

Sweep findings: C-13, C-15. Point channel setup at ov.conf and align package metadata with MIT.

(cherry picked from commit b15c241037)

* fix(review): align bot license metadata

Addresses blocking review finding on #3426.

(cherry picked from commit 001e0fa7ed)

* fix(bot): preserve cron scheduler liveness

Record callback-less scheduled runs as job errors so recurring timers persist and rearm, while manual runs still fail without mutating state. Document the OpenAPI context rejection and same-session concurrency contract.

* fix(ragfs): use stable Windows file identity APIs

---------

Co-authored-by: zhiheng.liu <zhiheng.liu@bytedance.com>
2026-07-31 15:57:43 +08:00
DuTao 0ab85f450a feat(session): add turn-aware retention and reliable archive recovery (#3380)
* 优化OpenViking的 session compact逻辑,active message 改为turn,压缩 assistant,保留完整user。
详见RFC:https://github.com/volcengine/OpenViking/discussions/3330

* Vikingbot 使用 ov turn session

* fix pr comment

* 更新文档

* fix pr issue
2026-07-24 14:26:46 +08:00
DuTao d2670274a4 feat(bot): Opt doc add workspace desc, change the type of messages appended to ov (#3236)
* 1. 默认开启OpenViking session处理;
2. 调整bot传给ov 的message类型

* 增加Agent workspace介绍

* fix pr
2026-07-14 17:37:20 +08:00
DuTao 41e002fa0b docs(bot): align documentation and tool guidance with current implementation (#3215)
* 优化bot的doc

* 删除无用的security,增加ov的 guides

* ov下增加bot的综述文章
2026-07-13 16:18:07 +08:00
MaojiaSheng 47da6ce129 refactor(bot): simplify vikingbot installation - merge all bot-* extras into [bot] (#3037) 2026-07-06 16:17:19 +08:00
Qin Haojie ff258768c2 feat(memory): 引入 User/Peer 记忆隔离模型 (#2236)
* feat(memory): introduce user and peer memory isolation

Unify agent-scoped memory behavior into user-owned memory spaces, add peer_id compatibility for session and retrieval paths, and wire memory_policy through session commit flows.

* feat(memory): align session identity around peer IDs

* feat(search): pass peer id through retrieval

* refactor(memory): remove agent identity from integrations

* fix(memory): isolate peer identity from self extraction

* fix(tau2): provision benchmark user configs

* fix(auth): allow admin keys to access data APIs

* fix(openclaw): enable peer memory policy for peer roles

* fix(openclaw): resolve sender for peer recall

* refactor(session): simplify memory extraction routing

* refactor(ov-cli): reduce formatting-only diff

* refactor(message): remove unused message helpers

* refactor(retrieval): simplify peer target resolution

* refactor(namespace): remove deprecated agent namespace policy

* fix(agent): propagate peer id through integrations

* fix(auth): align integration clients with api-key mode
2026-06-05 10:55:48 +08:00
DuTao de443fdd48 feat(bot): Bot session compact by using openviking, ov client add function and param (#2284)
* bot session compact by using openviking

* fix bug

* fix bug

* 默认值

* 默认值

* fix pr bug

* fix merge bug
2026-05-29 20:47:49 +08:00
yepper 9ebfd59342 feat(metrics): add vikingbot feedback observability (#2037)
* feat(metrics): add vikingbot feedback observability

* fix(bot): align feedback observability contracts

* fix(metrics): decouple feedback collector bootstrap
2026-05-15 17:30:24 +08:00
yepper 21854b5c58 feat(observability): add response feedback tracking to openapi (#1660)
* feat(observability): add response feedback tracking to openapi

Persist response, feedback, and outcome signals so OpenAPI clients can attach stable feedback to assistant replies. Sync the same business events to Langfuse to make Q&A effectiveness observable across restarts.

* refactor: remove response tracking and feedback features

This commit removes the response tracking, feedback submission, and Langfuse integration features. The changes include:
- Removing ResponseCompletedEvent and related response_id fields
- Removing feedback models and endpoints
- Removing Langfuse client integration
- Simplifying the OpenAPI channel by removing response persistence
- Updating tests to reflect these removals

* docs: align feedback observability design with current implementation

* feat(bot): implement phase 1 feedback observability primitives

* feat(bot): add explicit feedback submission flow

* feat(bot): add phase 3 response outcome evaluation

* style: clean up imports and fix code style issues

- remove unnecessary blank lines
- reorder imports to follow conventions
- fix string formatting in logging
- group related imports together
- fix import ordering in multiple files

* refactor: remove unused abstract attribute and update config type

Remove unused abstract attribute from MemoryStore and update config parameter type in resolve_require_mention to MochatChannelConfig for better type clarity

* feat(observability): rename abandoned to follow_up_without_feedback for clarity

refactor(session): add session locking and metadata merging
- Implement per-session file locks to prevent concurrent write conflicts
- Add metadata merging logic to preserve existing data during updates
- Introduce update_session method for atomic read-modify-write operations

fix(agent): skip outcome evaluation for heartbeat messages
2026-04-30 17:12:34 +08:00
r266-tech a392a1b723 docs(bot): sync gateway config example with #1640 security defaults (#1649) 2026-04-23 11:30:03 +08:00
yeshion23333 31c33d7ce9 fix(bot):Fix bot api-channel auth check (#1640)
* 1. 修复bot api鉴权;
2. 修复--with-bot log 路径

* 1. 修复bot api鉴权;
2. 修复--with-bot log 路径

* 修复channel 鉴权

* 移除url的引用
2026-04-22 20:40:28 +08:00
r266-tech f19ddf65c5 docs(feishu): document threadRequireMention + botName post #1534 (#1573)
* docs(channel): document threadRequireMention + botName post #1534

* docs(schema): align thread_require_mention description with post-#1534 behavior
2026-04-20 11:20:22 +08:00
847e86ac36 feat(bot):Refactoring, New Evaluation Module, Feishu channel Opt & Feature Enhancements (#428)
* feat: add ov chat command and refactor channel architecture

- 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

* feishu channel opt

* feishu channel opt

* fix: IM channels only process RESPONSE messages

- 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)

* feat(tracing): add abstract trace decorator for session-aware observability

- 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)

* feat: add tracing base on langfuse

* 1. feishu channel opt
2. support multi users

* 1. feishu channel opt
2. support multi users

* 1. feishu channel opt
2. support multi users

* fix(langfuse): use module-level propagate_attributes from SDK v3

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>

* refactor: unify workspace_id naming and improve tracing integration

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>

* 1. feishu channel opt
2. support multi users

* feat(tracing): add user_id extraction support for Langfuse

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>

* fix http server

* fix http server

* fix http server

* fix(langfuse): change propagate_attributes log level to info

* feat(tracing): add @observe decorator to create Langfuse traces

* fix(tracing): apply @observe at decoration time, not runtime

* fix http server

* fix(tracing): add detailed diagnostics for Langfuse client status

* fix(langfuse): add diagnostic logging for client initialization

* fix(langfuse): add diagnostic logging for config check

* 飞书chat

* opt http client

* docs(readme): add Langfuse observability configuration guide

* opt http client

* opt http client

* opt http client

* opt http client

* opt http client

* fix(langfuse): fix token reporting to use usage_details format

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

* opt http client

* eval command

* eval command

* eval command

* md

* cleanup(tests): remove obsolete test suite and related docs

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.

* docs(readme): update configuration paths and chat examples

- 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

* docs(agent): add comprehensive docstrings to core classes

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.

* feat(server): add bot API proxy support and CLI integration

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

* feat(core): improve agent tools, tracing and session management

- 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

* feat(cli): add agent tools and improve CLI commands

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

* add topic feishu channel

* add locomo run

* opt prompt

* opt prompt

* opt prompt

* opt prompt

* opt prompt

---------

Co-authored-by: chenjunwen <chenjunwen@bytedance.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: fujiajie.1030 <fujiajie.1030@bytedance.com>
2026-03-05 15:06:06 +08:00
1b175344e8 Feature/vikingbot_opt: OpenAPI interface standardization;Feishu multi-user experience; observability enhancements; configuration system modernization. (#419)
* feat: add ov chat command and refactor channel architecture

- 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

* feishu channel opt

* feishu channel opt

* fix: IM channels only process RESPONSE messages

- 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)

* feat(tracing): add abstract trace decorator for session-aware observability

- 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)

* feat: add tracing base on langfuse

* 1. feishu channel opt
2. support multi users

* 1. feishu channel opt
2. support multi users

* 1. feishu channel opt
2. support multi users

* fix(langfuse): use module-level propagate_attributes from SDK v3

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>

* refactor: unify workspace_id naming and improve tracing integration

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>

* 1. feishu channel opt
2. support multi users

* feat(tracing): add user_id extraction support for Langfuse

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>

* fix http server

* fix http server

* fix http server

* fix(langfuse): change propagate_attributes log level to info

* feat(tracing): add @observe decorator to create Langfuse traces

* fix(tracing): apply @observe at decoration time, not runtime

* fix http server

* fix(tracing): add detailed diagnostics for Langfuse client status

* fix(langfuse): add diagnostic logging for client initialization

* fix(langfuse): add diagnostic logging for config check

* 飞书chat

* opt http client

* docs(readme): add Langfuse observability configuration guide

* opt http client

* opt http client

* opt http client

* opt http client

* opt http client

* fix(langfuse): fix token reporting to use usage_details format

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

* opt http client

* eval command

* eval command

* eval command

* md

* cleanup(tests): remove obsolete test suite and related docs

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.

* docs(readme): update configuration paths and chat examples

- 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

* docs(agent): add comprehensive docstrings to core classes

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.

* feat(server): add bot API proxy support and CLI integration

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

* feat(core): improve agent tools, tracing and session management

- 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

* feat(cli): add agent tools and improve CLI commands

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

---------

Co-authored-by: DuTao <dutao.1786@bytedance.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: fujiajie.1030 <fujiajie.1030@bytedance.com>
2026-03-04 20:48:11 +08:00