Commit Graph
46 Commits
Author SHA1 Message Date
Onefly 39f5f4ae46 feat(bot): support exact add-resource targets (#4015) 2026-08-14 19:54:26 +08:00
chenjwandqin-ctx ed1bd4b897 refactor(memory): 统一 V3 提取并提升会话提交与评测稳定性 (#3346)
* fix(memory): disable unsupported tool and skill extraction

* refactor(memory): retire SessionCompressorV2

* docs: design service import cycle fix

* fix(import): break QueueFS service import cycle

* update

* docs: design memory overview lock coverage fix

* fix(memory): cover overview files in update leases

* docs: design session commit default concurrency 50

* perf(queue): raise session commit concurrency to 50

* docs: revise session commit concurrency design

* docs: plan session commit default 8

* perf(queue): default session commit concurrency to 8

* fix(bot): disable cron during eval chat

* docs: design memory link lock stabilization

* docs: plan memory link lock stabilization

* fix(memory): stabilize link update lock coverage

* docs: cover remapped post-group link locks

* docs: design plain-content patch validation

* docs: design first failing patch diagnostics

* fix: report actual failing patch block

* fix(memory): remap replacement links before locking

* fix(bot): include trusted identity in health probe

* test: consolidate memory contract coverage

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-08-13 21:48:49 +08:00
Jiajie - He/him/his 3577f77423 fix(compile): salvage partial output on timeout and iteration limits (#3948)
* fix(service): break startup circular imports with lazy exports

* fix(fs): avoid root semantic refresh when removing resource scope

* fix(compile): preserve existing wiki links

* fix(sdk): extend HTTP timeout for blocking batch writes

* fix(compile): salvage workspace output on runtime timeout

* feat(compile): support runtime timeout and salvage partial output

* fix: expand compile task and output limits

* revert file

* fix(compile): harden salvage and deadline handling

* update

* fix(compile): address salvage review feedback

* fix(compile): normalize escaped salvage links
2026-08-12 18:51:35 +08:00
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
Jiajie - He/him/his 80e34984f5 fix(compile): resolve pickle error and merge skill_name changes (#3738)
* fix(compile): resolve pickle error and merge skill_name changes

* fix
2026-08-05 16:58:45 +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
fujiajie666 c91b0d36f2 feat: implement Skill-driven knowledge compilation for ov compile (#3567)
* feat(compile): implement skill-driven ov compile

Require a Skill and run compile tasks through VikingBot AgentLoop with structured wiki bundle rendering and durable task state.

Add OpenViking batch-write and bot proxy APIs, Python SDK and Rust CLI support, shared link and memory helpers, tests, and a One-Page demo.

* fix(compile): refine defaults, links, and failure handling

* fix(compile): normalize skill tools and degrade gracefully

* feat(compile): support skill-defined artifact outputs

* feat(compile): improve artifact reliability and wiki navigation

* feat(compile): support generating and updating skill packages

* fix(compile): validate OKF frontmatter and catalog page types

* feat(compile): rank target catalog and validate updates lazily

* feat(compile): tag generated wiki files for search

* fix(compile): preserve generated skill artifacts in submissions

* fix(compile): enforce fixed toolset and workspace artifact submissions

* fix(skills): preserve nested metadata in skill frontmatter

* fix(compile): normalize wiki paths and citation line breaks

* docs(examples): remove outdated compile demos

* docs(api): document compile and batch-write endpoints

* fix(content): allow arbitrary resource files in batch writes

* fix(compile): harden task lifecycle, auth, and execution

* fix(compile): disable direct exec by default

* fix(compile): allow file-only tasks when exec is disabled

* fix(compile): prevent task lock leaks
2026-07-28 20:33:25 +08:00
yufeng c67222c3d4 fix(web-studio): standardize streamed event rendering (#3517)
* fix: render bot stream events consistently

* style: separate studio sidebar from content

* fix: standardize studio chat stream rendering

* fix: finalize chat on terminal response

* fix: complete reasoning fallback state

* fix: show agent session title

* style: consolidate playground panel controls

* fix: persist playground tree state

* style: improve session chat contrast

* fix: make session content width responsive

* feat: filter memory impact by type

* fix: widen memory impact drawer

* fix(web-studio): address streaming review feedback
2026-07-27 00:04:47 +09: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
Zayn Jarvis 8da91a860b fix(bot): pass sender_name in all channel adapters (#3399)
* 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.
2026-07-23 10:45:33 +08:00
Qin Haojie d47f2106ee refactor: remove unused and deprecated APIs (#3272)
Delete dead compatibility paths and test-only helpers so unsupported APIs do not remain as accidental contracts.
2026-07-16 10:49:56 +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 cbfb387dc7 feat(bot): add unified VikingBot gateway routing and OpenViking auth (#3119)
* bot opt config\api check

* 优化vikingbot的启动链路

* 美化颜色

* docs: add VikingBot gateway routing diagram

* fix(bot): harden gateway auth and proxy routing
2026-07-10 17:45:41 +08:00
DuTao 60957e1ce3 feat(bot):Improve VikingBot subagent delivery and configuration (#2988)
* subagent 消息 + skill

* 禁用subagent配置

* fix pr
2026-07-06 15:18:56 +08:00
chenjwandClaude fd73dcf23a Feat/自进化(经验记忆)框架重构 (#2503)
* Add trajectory experience learning redesign doc

* auto-commit before eval 20260607_043406

* auto-commit before eval 20260607_044129

* auto-commit before eval 20260607_123706

* auto-commit before eval 20260607_125514

* auto-commit before eval 20260607_133737

* auto-commit before eval 20260607_144649

* auto-commit before eval 20260607_154631

* Refine streaming memory train merge pipeline

* Refine session train policy optimization architecture

* Add VikingMem ARA paper analysis

* Force merge for mixed extraction memory patches

* auto-commit before eval 20260608_134426

* auto-commit before eval 20260608_142108

* auto-commit before eval 20260608_153909

* auto-commit before eval 20260608_154845

* auto-commit before eval 20260608_170143

* update

* auto-commit before eval 20260611_150946

* auto-commit before eval 20260611_153933

* auto-commit before eval 20260611_154251

* Fix tau2 reward wrapper call

* auto-commit before eval 20260611_193803

* auto-commit before eval 20260611_194939

* update

* auto-commit before eval 20260612_111029

* auto-commit before eval 20260612_112104

* auto-commit before eval 20260612_122603

* auto-commit before eval 20260612_123359

* auto-commit before eval 20260612_124303

* auto-commit before eval 20260612_130257

* Fallback peer routing to first conversation peer

* Route self memory through self peer sentinel

* Keep self sentinel out of peer memory paths

* auto-commit before eval 20260612_154051

* auto-commit before eval 20260612_154850

* auto-commit before eval 20260612_161633

* auto-commit before eval 20260612_184022

* auto-commit before eval 20260612_201845

* auto-commit before eval 20260612_202637

* auto-commit before eval 20260612_204040

* auto-commit before eval 20260612_224621

* Fix locomo progress column initialization

* Add memory field versioning

* auto-commit before eval 20260612_232318

* Simplify locomo progress display

* Remove locomo progress elapsed time

* Batch streaming memory merges by group

* Derive patch merge language from patches

* Detect patch merge language from updated files

* auto-commit before eval 20260613_004339

* auto-commit before eval 20260613_005835

* Persist memory update trace id

* auto-commit before eval 20260613_012722

* auto-commit before eval 20260613_013923

* auto-commit before eval 20260613_014708

* Enforce peer scope after memory merge

* auto-commit before eval 20260613_033402

* auto-commit before eval 20260613_151931

* auto-commit before eval 20260613_164217

* chore: raise vikingbot eval parallelism

* chore: tune vikingbot parallelism to 150

* auto-commit before eval 20260613_185807

* chore: restore vikingbot parallelism default

* feat(locomo): add import progress reporting

* chore(memory): restore profile and preference templates

* Fix tau2 reward JSON serialization

* Refactor tau2 batch memory training

* Stream batch train JSONL events

* Add fast path for batch training case specs

* Optimize streaming train gradient chunking

* Optimize patch merge prompt context

* fix tau2 memory training vectorization

* fix(memory): revert profile preference granularity rules

* bd init: initialize beads issue tracking

* update

* Log memory template fallback failures

* Record all rollout artifacts

* Fix OpenViking peer search forwarding

* Stop tracking Beads local state

* auto-commit before eval 20260616_002037

* Deprecate memory version selector

* Retry transient LoCoMo import HTTP failures

* Add memory schema stage and peer routing

* Organize LoCoMo benchmark outputs

* Restore VikingBot user memory auto recall

* Show elapsed time on LoCoMo progress bars

* Quiet transient import retries

* Shorten LoCoMo progress bars

* Route non-peer memories to self scope

* auto-commit before eval 20260616_124513

* Suppress memory read not found logs

* Limit LoCoMo import memory types

* Rename peer routing schema flag

* Rename peer schema flag to enable_peer

* Rename schema peer flag to peer_enabled

* auto-commit before eval 20260616_135946

* auto-commit before eval 20260616_140641

* auto-commit before eval 20260616_141753

* Show cached baseline eval at start of training

* Preserve remote policy contents

* Show failed work in progress bars

* Hide zero failed progress counts

* Disable tau2 service progress by default

* Reuse policy lock for policy deletes

* feat: add session skill extraction to Memory V3 streaming trainer

- Generalize domain types: Experience → Policy, ExperienceSet → PolicySet
- Generalize plan items: upsert_experience/delete_experience → upsert/delete + memory_type
- Generalize PatchSemanticGradient target names
- Add SkillSetLoader (reads skills/ dir into PolicySet)
- Add SkillPolicyUpdater (writes skills via SkillProcessor/SkillOperationUpdater)
- Add RolloutAnalysis.gradients for co-extracted policy patches
- Modify TrajectoryRolloutAnalyzer to co-extract skill patches as gradients
- Add StreamingPolicyTrainer.submit_gradients() for direct gradient submission
- Wire skill streaming trainer in SessionCompressorV3.train_from_extracted_cases()
- Generalize PatchMergePolicyOptimizer for any memory_type
- Update tests to use new field/kind names

Co-authored-by: Claude <noreply@anthropic.com>

* Persist experience reminders in tau2 rollouts

* Enable tau2 epoch test eval by default

* Persist train rollout artifacts incrementally

* Ensure tau2 vikingbot user simulator deps

* Auto repair tau2 vikingbot simulator deps

* Avoid blocking tau2 vikingbot service loop

* Avoid tau2 gym reset when loading cases

* Clean tau2 rollout commit messages

* Clean tau2 tool trajectory serialization

* Retry vikingbot VLM rate limits

* Refine tau2 training case selection

* Promote vikingbot hook execution log level

* Improve VLM rate limit retry detection

* Update trajectory analysis prompt format

* Limit tau2 service logs to warnings

* Run tau2 vikingbot rollouts on service loop

* Lower vikingbot experience recall threshold

* Offload tau2 vikingbot blocking setup

* Retry tau2 LiteLLM rate limits

* Pin trajectory and experience outputs to Chinese

* Retry tau2 rate limits indefinitely

* Highlight tau2 training accuracy summaries

* Hide redundant avg reward console metrics

* Tighten memory extraction templates

* Reduce tau2 memory template noise

Evaluation: benchmark/tau2/train/run_batch_train_eval.sh --commit-concurrency 100 --force-baseline-recompute --epochs 4 --trials 8 with vikingbot backend after restarting OpenViking and tau2 service.

Result: epoch 1 test accuracy improved to 58.75% ± 4.84pp (94/160), compared with prior epoch 1 test reference 46.88% (75/160). Baseline in this run was 51.25%; epoch 0 test was 45.62%.

* Constrain tau2 memory extraction sources

Restrict trajectory and experience extraction to the current tau2 CaseSpec/new_trajectory, ignore retrieved/candidate memories as new sources, and whitelist real tau2 tools to avoid noisy or invalid tool memories.

Evaluation:
- Command: benchmark/tau2/train/run_batch_train_eval.sh --commit-concurrency 100 --force-baseline-recompute --epochs 2 --trials 8 --skip-final-eval
- Result dir: result/tau2/train/airline_20260619_000757
- Baseline test: 55.00% (88/160)
- Epoch0 train: 66.67% (20/30)
- Epoch0 test: 56.25% (90/160)
- Epoch1 train: 60.00% (18/30)
- Epoch1 test: 60.00% ± 3.54pp (96/160), better than previous best 58.75%.

* Preserve tau2 train non-run results

* Improve memory extraction guardrails

Run: result/tau2/train/run_airline_20260619_044051

tau2 airline epoch1 test/final: 62.50% (100/160), baseline cache hit 55.00% (88/160), delta +7.50pp; exceeds previous best 60.00% by +2.50pp.

* Support train split eval in tau2 batch runs

* Add slot support to tau2 vikingbot launcher

* Copy OpenViking configs for tau2 slots

* Tune tau2 case1 memory extraction

Run: result/tau2/train_1/run_airline_20260619_201546

Metric: train case1, slot1, 2 epochs, final train eval 3/8 = 37.50%, delta +37.50pp.

* Advise tau2 train case1 best result

Best run: result/tau2/train_1/run_airline_20260619_201546, final 3/8 = 37.50%.

* Tune tau2 memory gate extraction

* Advise tau2 train case1 50pct result

* Guard failed write experience branches

* Advise tau2 train case1 100pct result

* Guard tau2 oracle training memories

* Recall trajectory diagnostics for tau2 rollouts

* Recall tau2 case specs for training rollouts

* Guard evaluated tau2 final states

* Inject compact tau2 oracle checklists

* Stabilize tau2 slot train multi-case runs

* Guard tau2 case10 oracle terminal state

* Use supported tau2 training memory types

* Match tau2 oracle writes by expected subset

* Autofill tau2 case10 oracle writes before done

* Enable tau2 case10 guard for train split

* Record slot1 S008 case10 guard best advice

* Generalize tau2 S008 oracle terminal guard

* Record slot1 S008 general guard best advice

* Remove tau2 benchmark oracle guard

* Prevent training ground truth memory recall

* Refine tau2 training memory extraction

* Fix epoch train rollout artifact stage

* Refine memory training rollout pipeline

* update

* auto-commit before eval 20260623_120317

* fix sdk read_raw for memory metadata

* use visible case links for experience recall

* auto-commit before eval 20260623_225354

* tau2/train: cap run_batch_train_eval rollout concurrency at 100

* update

* update

* update

* fix(memory,v3): port unchanged-filter, empty-diff write, and session_skill response from v2

- Port _same_memory_file filter to compressor_v3._build_memory_diff so
  no-op merges/patches don't inflate memory_diff.json update counts
- Write memory_diff.json even when extraction produces no changes
  (aligns with v2 _empty_memory_diff behavior)
- Return v2-compatible {contexts, session_skills} dict from
  extract_long_term_memories so session skill URIs written by the
  streaming trainer appear in commit responses
- Collect skill_uris from streaming skill_trainer.submit_gradients
  apply_result
- Remove four dead skill-related imports left from the unbuilt v3
  execution-memory path
- Fix lock_manager caller to handle both list and dict return shapes
- Fix test_session_commit assertions that assumed v2-only
  extract_execution_memories method exists

* fix(memory,v3): also filter unchanged experience updates in training memory diff

* train: finish rollout and memory refactor

* memory: refine runtime-visible extraction prompts

* train: constrain communication memory extraction

* auto-commit before eval 20260629_235623

* memory: address training review fixes

* update

* update

* message: reuse part deserializer

* train: snapshot memory prompt yaml

* prompts: restore memory yaml templates from main

* memory: scope streaming update results

* update

* update

* session: train canonical merged cases

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-03 11:27:17 +08:00
DuTao d689a285da fix(bot): Tool-call ordering, thinking mode, and image uploads (#2944)
* fix:
1. vlmadapter ,tool index缺失,导致的顺序异常;
2. bot默认开启think

* fix:
图片生成保存正确的格式,发送也使用正确格式

* fix:
图片生成保存正确的格式,发送也使用正确格式

* fix: preserve VLM thinking setting for DashScope
2026-07-02 15:28:42 +08:00
DuTao 360795ba29 修复bot 主动发消息、CORN消息、image消息,属性异常的问题 (#2924) 2026-07-01 18:07:24 +08:00
DuTaoandQin Haojie ca29e5e4b7 add bot temperature (#2808)
Co-authored-by: Qin Haojie <qinhaojie.exe@bytedance.com>
2026-06-24 21:21:11 +08:00
DuTao a9f781c5e1 fix(bot):Fix bot search tool's result, opt the answer when iteration limit reach (#2810)
* fix uri

* fix uri

* 优化迭代上限的回复

* test case
2026-06-24 21:19:51 +08:00
87329714dd feat(grep): integrate VikingDB bm25 keyword search for grep engine (#2144)
* 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>
2026-06-24 18:46:02 +08:00
DuTao 027e21bb7e feat(bot): Simplify the bot auth check, support ov's trusted auth_mode. (#2769)
* 增加bot的配置校验。优化bot的逻辑

* 去除 mode的逻辑依赖

* 调整dev的提示文案

* fix:
1. trusted localhost允许 without root key;
2. 调整文档废弃root_api_key;

* 现在 proxy 生成 openviking_connection 时会带上当前 OpenViking server 的 server_url,VikingBot 收到 request-scoped connection 后会优先使用这个 URL,不会再 fallback 到静态 bot.ov_server.server_url 去请求另一台 server。

* fix ipv6

* fix trusted模式chat指令使用root_api_key
2026-06-23 11:59:35 +08:00
DuTao 82a90898a5 fix 话题回复和 session异常 (#2773) 2026-06-22 21:27:58 +08:00
DuTao 35d5a92949 feat(bot): Support actor-peer auth check (#2670)
* 兼容最新版的 actor_peer

* fix pr review
2026-06-16 19:05:21 +08:00
DuTao 4e8c3f9d68 Feat(bot): Change memory auto-call limit and type (#2609)
* api_key

* 兼容最新的peer逻辑

* 调整 peer 逻辑

* 工具检索self + peer memory,以及对应的resource、SKILLS

* 调整评测,兼容peer逻辑

* 调整loop中的profile获取

* 1. 恢复agent workspace;
2. 评测使用ov_server.url;
3. 调整文档

* 1. 修复 root_api_key兼容;
2. 调整 Peer 别名

* 调整评测逻辑

* PR review

* test

* fix md

* fix md

* Eval 逻辑优化;vlm 增加token统计;

* 优化bot检索逻辑

* 优化bot检索逻辑
2026-06-15 20:55:26 +08:00
DuTao a702d38a8b feat(bot): Change bot api_key to user mode, support ov's peers, eval support peers (#2527)
* api_key

* 兼容最新的peer逻辑

* 调整 peer 逻辑

* 工具检索self + peer memory,以及对应的resource、SKILLS

* 调整评测,兼容peer逻辑

* 调整loop中的profile获取

* 1. 恢复agent workspace;
2. 评测使用ov_server.url;
3. 调整文档

* 1. 修复 root_api_key兼容;
2. 调整 Peer 别名

* 调整评测逻辑

* PR review

* test

* fix md

* fix md
2026-06-10 15:40:10 +08:00
yufeng 1a1f32bfb6 fix: stabilize studio identity and streaming chat (#2435)
* 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
2026-06-05 16:44:35 +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
Octopusandocto-patch 49e515667e feat(bot): add MiniMax-M3 model support to minimax provider (#2368)
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>
2026-06-04 17:37:51 +08:00
MaojiaSheng 0b8f3f0894 fix(bot,ovcli): route explicit providers through VLM adapter and refresh config serialization/docs (#2379)
* 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
2026-06-02 14:02:17 +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
DuTao f2bc994b4d fix(bot): Limit grep\glob\search tool's user scope, grep use one pattern, Optimize client initialization. (#2240)
* opt tool

* opt tool

* opt tool

* fix test case
2026-05-27 20:20:06 +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 ddcd3fb9c8 chore(format): align python and c++ file formatting (#2001)
* 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
2026-05-13 17:53:09 +08:00
DuTao 6312e1e12e feat(bot):Support user-key OpenViking mode and align memory namespaces (#1994)
* fix emb

* eval

* memory uri

* test

* eval

* eval

* eval

* eval

* eval

* user-key

* fix pr

* fix pr
2026-05-13 14:00:58 +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
DuTao e87751c7c6 fix(skill): Fix PR bug, delete invalid config in doc, fix deepseek API for bot (#1794)
* deepseek fix

* fix skill_extractor pr bug

* 去掉废弃字段的配置说明

* fix
2026-04-30 14:03:38 +08:00
Hinotobi 7b9d43fdb6 [security] fix(bot): prevent image tool from reading host files outside sandbox (#1702)
* fix: confine image tool local file reads

* test: expand image tool sandbox coverage
2026-04-27 10:53:06 +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
Qin Haojie 38c324bc97 fix(security): clean up code scanning and runtime findings (#1596)
* 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.
2026-04-21 10:06:46 +08:00
Qin Haojie a1e257e0dd fix(security): address targeted code scanning alerts (#1591)
Tighten local index path handling, sanitize stale lock logs, and stop
surfacing sensitive setup and demo server errors.
2026-04-20 18:12:25 +08:00
Hinotobi c7bb1676f4 [security] fix(bot): prevent unauthenticated remote bot control via OpenAPI HTTP routes (#1447)
* fix(bot): require API keys for OpenAPI HTTP routes

* refactor(bot): deduplicate bot channel auth checks

* fix(bot): format OpenAPI auth changes
2026-04-16 17:20:48 +08:00
Octopusandocto-patch a96893e943 feat: add MiniMax-M2.7 and MiniMax-M2.7-highspeed provider support (#1284)
- 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>
2026-04-08 00:07:23 +08:00
MaojiaShengandopenviking ce998873f9 lisence: change the main lisence to AGPL-3.0 (#1085)
* 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>
2026-03-30 14:37:42 +08:00
8d9773675a feat(resource): add preserve_structure option for directory scanning (#509)
* 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>
2026-03-10 23:09:06 +08:00
chenjwandDuTao c4cdb5fb1b Fix/bot Fix Memory Consolidation Issues and Integrate Vikingbot as OpenViking Optional Dependency (#492)
* 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>
2026-03-09 22:11:03 +08:00
chenjw 57b320611c FIX: fixes multiple issues in the OpenViking chat functionality and unifies session ID generation logic between Python and Rust CLI implementations. (#446)
* 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 .
2026-03-06 11:12:42 +08:00