* fix(bot): pass sender_name in all channel adapters
Sweep findings: C-01. Supply display-name fallbacks so inbound messages reach the bus.
* fix(bot): make sender_name optional and wire real WhatsApp pushName
Root-cause guard: _handle_message required sender_name positionally, but
InboundMessage.sender_name is str|None=None and context.py already falls back
to sender_id, so the required-ness was an accidental signature/contract
mismatch. Make it optional (reordered after the still-required chat_id/content;
all 11 call sites use keyword args) so no future adapter can crash on it.
WhatsApp: the previous call read data.get("senderName")/data.get("pushName"),
neither of which the bridge ever sends, so it silently always fell back to the
numeric id. Forward baileys' msg.pushName through the bridge payload and read it
in Python, so WhatsApp group chats show real display names like other channels.
* feat(grep): integrate VikingDB bm25 keyword search for grep engine
* fix(grep): address CI review feedback: max-size eviction to _count_cache, use Literal, Split regex alternation into individual keywords for bm25 (max 10)
* fix(schema): use dynamic __version__ for schema_version and handle dev suffixes in version comparison
* fix(schema): upsert data to vikingdb lack of content
* chore: add benchmark for retrieval
* fix(grep): vikingdb return 200 and no results means no matching content, not necessary to fallback to local fs
* fix(benchmark): sub uri args; add report
* refactor: code format by ruff
* optimize: move grep config (engine and switch_to_remote_threshold) to ov.conf
* optimize: auto adapt remote_return_limit by agg API; rm unnecessary params in keywords search
* fix: adjust benchmark scripts
* fix(grep): store full content for BM25; use PathScope depth; reduce redundant API calls
* refactor: new benchmark
* fix: step1 add resource by real code data
* feat(benchmark): split grep benchmark into effectiveness/performance suites with async reindex
* optimize (benchmark): adjust keywords and ground truth for testing
* fix: truncate 64KB for content field
* optimize: effectiveness add resource plainly
* optimize: change param use of SearchByKeywords from "keywords" to "query"
* optimize(benchmark): refactor effectiveness scripts
* optimize: ensure raw data for content field
* optimize: fulltext analyzer's stop-words only use symbols
* fix: adapt to new ov cli for benchmark
* optimize: reuse file content to avoid re-read AGFS file
* optimize: tune grep vikingdb defaults and refresh bm25 benchmark scripts
* optimize: benchmark client timeout
* update README
* fix: rm unused param
* fix: default values in docs
* optimize: increase truncate byte size to 1MB for content field for VikingDB
* fix(logger): harden queued stream logging (#2786)
* fix(logger): replace StreamHandler with QueueHandler+QueueListener to prevent thread deadlock
When log.output='stdout' (default) and the server is managed by systemd,
concurrent log writes can deadlock because logging.StreamHandler holds a
thread lock across stream.flush() which blocks on systemd-piped file I/O.
During session.commit() phase 2, multiple async coroutines (memory
extraction, summarization) concurrently call logger.info()/warning()
with large payloads. The first thread's flush() blocks on the pipe,
while all subsequent threads block on handler.acquire() forever.
This permanently silences the server log and prevents _write_done_file()
from executing, leaving phase 2 hanging without .done.
Fix: use QueueHandler + QueueListener from stdlib logging.handlers
(Python 3.2+). QueueHandler.emit() does queue.put(record) with no lock
or I/O, returning immediately. QueueListener has a dedicated single
thread as the sole consumer touching the real StreamHandler, making
lock contention impossible.
Changes in _create_log_handler(): stdout/stderr branches now create
a shared QueueListener with unbounded queue, returning QueueHandler
instances to callers. _build_standard_handler() delegates formatter
and filter setup to the real handler in the listener thread.
Closes: #2752
* fix(logger): harden queued stream logging
---------
Co-authored-by: njuboy11 <njuboy11@users.noreply.github.com>
---------
Co-authored-by: Qin Haojie <qinhaojie.exe@bytedance.com>
Co-authored-by: njuboy11 <njuboy11@users.noreply.github.com>
* fix: stabilize studio identity and streaming chat
* fix: hide unsupported studio terminal commands
* fix: remove unsupported terminal command copy
* fix: run selected terminal suggestion on enter
* fix: group supported terminal commands
* fix: add terminal quick start and history
* fix: scope session visibility by user
* fix: harden bot user scoping
* fix: forward request scoped bot identity
* fix: add terminal quick start translations
* fix: add terminal command group translations
* fix: simplify studio identity scoping
* fix: support api key copy on dev urls
* fix: stop passing agent id to ov http client
* fix: search follow-up memory questions
Add MiniMax-M3 as the new flagship/default recommended model alongside
the existing MiniMax-M2.7 and MiniMax-M2.7-highspeed options.
- Update provider registry comment to list M3 as default with M2.7 as alternative.
- Update bot README recommended models block to suggest M3.
- Add unit tests for M3 keyword match, prefix resolution, and system message merging.
Co-authored-by: octo-patch <octo-patch@github.com>
* fix: embedding images directly
* fix: skip default values in CLI config serialization, relax ovcli.conf validation
- Rust: add skip_serializing_if to Config/UploadConfig fields to avoid
writing null/default values into ovcli.conf
- Python: change OVCLIConfig/OVCLIUploadConfig model_config from
extra: "forbid" to extra: "ignore" for forward compatibility
- Simplify handle_extra_headers_aliases now that extra fields are ignored
- Add VLMProviderAdapter and integrate VLMFactory into _make_provider
* fix(bot): remove unused OpenAI provider and refresh config docs
Drop the unused OpenAI-compatible provider and its stale exports/tests now that explicit provider configs go through the VLM adapter path. Refresh the bot configuration docs with redacted remote OpenViking examples and clarify gateway/chat usage alongside Feishu configuration.
* revert: drop unrelated embedding changes from PR
Restore the embedder and queuefs files to match the upstream volcengine/OpenViking main branch so this PR only carries the bot provider cleanup and documentation updates.
* revert: align remaining embedding helpers with upstream
Restore the context, embedder base, embedding utils, and local index files to match volcengine/OpenViking main so the PR stays focused on bot-only changes.
* docs: sync cn
* chore(format): align python and c++ file formatting
* chore: update urllib3 to 2.7.0 and clean test imports
1. bump urllib3 dependency from 2.6.3 to 2.7.0
2. remove unused pytest import and RoleScope import from test file
* style: format list comprehensions and lambda function for readability
Adjust the line breaks in the list comprehension in the VikingSearchTool class to follow standard Python formatting conventions, and rewrap the lambda assignment in the test case to improve code readability without changing functionality.
* style: fix line wrapping and remove extra blank line
- remove stray blank line in ov_server.py
- wrap long logger.info line in memory.py for better readability
* style: fix targeted ruff lint violations
* chore: clean up unused imports and reorder code
This commit removes unused imports, reorders import statements for better consistency,
and simplifies some test file imports. Changes include:
- Remove redundant blank lines and unused imports across multiple test files and core modules
- Reorder imports in openviking hooks module to follow standard layout
- Fix import ordering in memory isolation handler
- Simplify php parser type imports
- Move volcengine mock import to correct position in test file
* refactor(uri utils): remove extra blank lines in uri.py
clean up redundant whitespace to improve code readability
* 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
* fix(security): clean up code scanning and runtime findings
Harden path and logging boundaries, remove noisy cleanup issues,
and keep observability failures from breaking runtime flows.
* fix(security): close werewolf and feishu validation gaps
Block the remaining path traversal bypass in the werewolf demo,
and validate Feishu hosts on the main parse() entry point.
- Update provider registry to document MiniMax-M2.7 and MiniMax-M2.7-highspeed
as the recommended models (replacing the outdated M2.1 example comment)
- Add explicit note that MiniMax does not support system messages (they are
merged into the first user message automatically)
- Update README to advertise MiniMax-M2.7 and MiniMax-M2.7-highspeed as the
recommended MiniMax models with configuration instructions
- Add comprehensive unit tests (17 tests) covering:
- Registry keyword matching for MiniMax-M2.7 and MiniMax-M2.7-highspeed
- Model prefix resolution (minimax/MiniMax-M2.7)
- System message merging for both LiteLLMProvider and OpenAICompatibleProvider
- Edge cases: multiple system messages, no system messages, non-MiniMax models
- MINIMAX_API_KEY environment variable and international API base URL
Co-authored-by: octo-patch <octo-patch@github.com>
* lisence: change the main lisence from Apache-2.0 to AGPL-v3
* lisence: change the main lisence from Apache-2.0 to AGPL-v3
* lisence: change the main lisence from Apache-2.0 to AGPL-v3
---------
Co-authored-by: openviking <openviking@example.com>
* feat(resource): add preserve_structure option for directory scanning
Support preserving nested directory structure when adding resources.
When preserve_structure=True (default), files maintain their relative
path hierarchy under the resource URI root.
When False, all files are flattened to a single level (legacy behavior).
Configurable default via ov.conf.
Closes#490
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(lint): resolve all ruff format and lint errors for PR
- Fix import sorting (I001) across 15+ files
- Remove unused imports (F401): signal, hashlib, time, asyncio, pytest, etc.
- Remove unused variables (F841): level, e
- Rename unused loop vars (B007): idx -> _idx
- Replace lambda with def (E731) in feishu.py
- Replace dict() with literal (C408) in resources.py
- Remove f-strings without placeholders (F541)
- Add TYPE_CHECKING imports for ExecToolConfig/CronService (F821)
- Add FastAPI/Depends/Header imports in openapi.py (F821)
- Remove duplicate import of load_config (F811)
- Auto-format 4 files with ruff format
---------
Co-authored-by: r266-tech <r266-tech@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* fix
* add log
* add log
* update
* Opt memory
* Opt memory
* Opt memory
* Opt memory
* Fix memory consolidation issues: duplicate session write, hook error, and async
- Fix _consolidate_memory hook error by creating temporary Session when given message list
- Remove duplicate session save logic from _consolidate_memory (handled by caller)
- Make normal memory consolidation async like /new command
- Other fixes: streaming response in CLI and OpenAPI channel
* Integrate vikingbot as openviking optional dependency
- Add vikingbot dependencies to pyproject.toml optional-dependencies
- Update install prompts from vikingbot[X] to openviking[bot-X]
- Update README installation instructions
- Configure setuptools to find vikingbot in bot/ directory
- Add vikingbot package data and script entry
* Remove bot/pyproject.toml
vikingbot is now integrated as part of openviking, no need for separate pyproject.toml
* Update vikingbot installation instructions in root READMEs
- Update from 'uv pip install -e bot/' to 'uv pip install -e ".[bot]"'
- Add quotes around openviking[bot] for shell safety
* update
* Use singleton pattern for VikingClient in hooks
Cache VikingClient instances by workspace_id to avoid repeated client creation
- Add _client_cache dictionary for caching
- Add get_cached_client() helper function
- Update both hooks to use cached client
* Use global singleton for VikingClient instead of per-workspace cache
- Change from per-workspace_id cache to true global singleton
- Create client with None as agent_id (works for all workspaces)
- Simplify client management
* uv run ruff format
---------
Co-authored-by: DuTao <dutao.1786@bytedance.com>
* refactor(sandbox): remove docker/aiosandbox backends, simplify SRT config
- Remove docker and aiosandbox from available backends
- Remove settings_path from SrtBackendConfig (now auto-generated in workspace)
- Update SRT settings path to workspace/sandboxes/{session}-srt-settings.json
- Update README examples to use srt backend and remove settingsPath
* refactor(sandbox): remove docker/aiosandbox backends, simplify SRT config
- Remove docker and aiosandbox from available backends
- Remove settings_path from SrtBackendConfig (now auto-generated in workspace)
- Update SRT settings path to workspace/sandboxes/{session}-srt-settings.json
- Update README examples to use srt backend and remove settingsPath
* fix: remove unused handle_chat_direct function and fix unused logs variable
* Fix UTF-8 issues in chat command
* Add tab indentation to Think, Calling, and Result lines in CLI output
* Add first release workflow
* Update release workflow with correct working directory
* 修改 SessionKey 构建逻辑:统一使用 type="cli",channel_id 默认 "default",chat_id 作为 session_id 使用
* Implement machine unique ID as default session ID for ov chat
* Remove unsupported --logs parameter from chat command
* 统一 Python 和 Rust CLI 的默认 session ID 生成逻辑
* 修改日志
* 去掉log依赖
* docs: add VikingBot quick start section to READMEs
* fix: use vikingbot chat instead of ov chat in READMEs
* Revert "fix: use vikingbot chat instead of ov chat in READMEs"
This reverts commit 59f4e87ba0.
* fix: use UUID v4 for machine ID generation in both Rust and Python
* refactor: move truncate_utf8 to utils, fix chat history path, and use BotProcess dataclass
* refactor: update machine ID generation and remove unused chat_v2
- Update Python to use py-machineid library
- Update Rust to use machine-uid crate
- Remove unused chat_v2.rs
- Move machine ID from file storage to system-provided IDs
- Add fallback to "default" if system ID is unavailable
* 优化格式
* ruff format .