Commit Graph
106 Commits
Author SHA1 Message Date
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
13ec0cf5fe fix(bot): add missing sender_name param in Slack and Email channels (#3104)
Commit 4d34025c added the required `sender_name` parameter to
`BaseChannel._handle_message()` and updated `feishu.py`, but
`slack.py` and `email.py` were not updated in the same change.

This caused a `TypeError` on every inbound message in both channels.
Because Slack SDK swallows exceptions in asyncio listener callbacks,
the error was silent — the bot received events, added emoji reactions,
but never called the LLM or sent any reply.

Fix: pass `sender_name=sender_id` in SlackChannel and
`sender_name=sender` in EmailChannel.

Co-authored-by: scott.kim <scott@ScottMacBookPro.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-10 15:13:08 +08:00
Zayn JarvisandClaude Opus 4.8 bd1c6c628f fix(bot): don't discard vlm-only config when ovcli identity is missing (#2994)
`ov chat --with-bot` regressed in 0.4.5: a config with only a `vlm` section
(no `bot.agents`) and a `server` whose effective auth mode is `api_key` fails
with `litellm.InternalServerError: OpenAIException - Missing credentials ...
set OPENAI_API_KEY`, even though the user configured e.g. deepseek. 0.4.3
worked.

Root cause: the 0.4.5 ov_server auth rewrite made
`_merge_current_ov_server_config` call `_fill_user_api_key_from_ovcli()` ->
`load_ovcli_config()` whenever the effective auth mode is `api_key`. When the
user only configured `vlm` and has no valid ovcli identity, that raises
`ValueError`, which is re-raised. `load_config()`'s broad
`except (json.JSONDecodeError, ValueError)` then swallows it and silently falls
back to a default `Config()` — model `openai/doubao-seed-2-0-pro-260215`, empty
provider, empty api_key. `_make_provider` takes the legacy LiteLLMProvider
branch on that `openai/*` model with no key -> the OpenAI missing-credentials
error. In 0.4.3 the ovcli lookup only ran in `remote` mode (api_key present),
so a vlm-only config never hit it.

Fix: a missing/invalid ovcli (OpenViking user) identity only affects OpenViking
memory/file tools — it must not abort loading the rest of the bot config. On
`load_ovcli_config()` failure, warn and continue with the user api_key unset
instead of re-raising. Degraded OpenViking auth is still surfaced separately by
validate_openviking_auth(). This restores 0.4.3 behavior for vlm-only configs
while keeping the user-key auto-fill when ovcli is configured.

Adds a regression test covering both the ovcli-fails and ovcli-succeeds paths.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 17:37:00 +08:00
MaojiaSheng 47da6ce129 refactor(bot): simplify vikingbot installation - merge all bot-* extras into [bot] (#3037) 2026-07-06 16:17:19 +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
Qin Haojie 07708225cb fix(volcengine): forward model request headers (#2909)
Ensure Volcengine VLM and embedding calls propagate configured headers and default the client request id header for service traffic.
2026-07-01 14:31:39 +08:00
DuTao 9253619a98 add timeout config (#2917) 2026-07-01 11:24:58 +08:00
DuTao 0049630869 fix path_restriction (#2908) 2026-06-30 20:27:59 +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
Qin Haojie fff86058ac feat(core): 支持用户和 peer 级内容目标 (#2564)
* feat(core): support user-scoped content targets

* fix(core): handle scoped skill updates

* fix(core): keep skills user scoped

* chore: drop incidental formatting changes

* fix(storage): revert shared parent existence helper

* docs: update user content target docs

* fix(resource): canonicalize watch cancellation targets
2026-06-12 17:52:44 +08:00
DuTao 07326bd827 feat(eval):Opt memory eval script (#2563)
* 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统计;
2026-06-11 21:23:09 +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
chenjw 738cee7395 Fix/peer fix (#2469)
* auto-commit before eval 20260605_110036

(cherry picked from commit a4741cd60f0ea689b4e65156eb943b76a41cf2ba)

* auto-commit before eval 20260605_154023

(cherry picked from commit 3791a21c8cf88ae3fdabef12cfb99760c7bbbe5f)

* auto-commit before eval 20260605_174235

(cherry picked from commit 323c75b697369db736ff6ce0a071a14458ccc034)

* fix(vikingbot): preserve legacy memory search compatibility

* refactor(vikingbot): restore legacy memory parameter names

* fix(user-dirs): lazily create user subdirectories

* update
2026-06-08 11:03:13 +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
DuTao 3ed89d1f1d fix bot config bug and change default threshold (#2387) 2026-06-02 20:14:16 +08:00
yufeng c9abc2e8af fix: improve playground bot flow (#2381)
* fix: improve playground bot flow

* fix: preserve playground trace refs

* fix: limit playground backend scope

* fix: show automatic memory tool events

* fix: cap automatic memory search results

* fix: limit memory result refs to entries

* fix: cap automatic memory context total

* fix: show memory commit refs

* chore: format memory helper
2026-06-02 16:52:50 +08:00
yangxinxin-7andClaude Sonnet 4.6 936624c24b feat(tau2/vikingbot): config-driven experience recall + per-domain isolation (#2380)
* feat(tau2/vikingbot): config-driven experience recall + per-domain isolation

Switch tau2 self-improvement behaviour from core-code patches to three
ov.conf flags (recall_exp_first_round_only, exp_recall_limit,
exp_recall_max_chars), so the VikingBot core is unchanged for non-tau2
users.

- context.py: when recall_exp_first_round_only=true, skip per-turn
  user+agent memory retrieval and inject experience once on the first
  user-turn; accepts explicit agent_id to scope retrieval per domain
- memory.py: exp_recall_limit and exp_recall_max_chars read from config
  instead of hardcoded values
- schema.py: add three new OpenVikingConfig fields (all default to
  existing behaviour so existing deployments are unaffected)
- ov_server.py: extract _is_session_key() helper to unify the two
  places that distinguish session keys from per-domain agent ids;
  local mode now respects agent_id for namespace isolation (remote mode
  already supported this)
- tau2 runner: pass agent_id= instead of memory_users= to build_messages
- README: document Python >=3.12 prerequisite, correct pip install
  extra, clarify that isolation works in both local and remote modes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(ov_server): remove redundant underscore check in search_experiences

The "_" in self.agent_id guard was a leftover heuristic to distinguish
domain ids from session keys. Now that _is_session_key() handles that
check via "__", the extra "_" condition is unnecessary and actively
breaks agent ids without underscores (e.g. "airline", "retail").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 15:04:40 +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 be1e7fc482 feat(eval)Opt vikingbot eval script (#2305)
* 优化评测逻辑

* 兼容 飞书的卡片消息
2026-05-29 20:01:36 +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
fujiajie666 263d78a8ca 修复缺失role_id的bug,bot开启agent memory检索 (#2108) 2026-05-18 15:26:29 +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
fujiajie666 8b04fd6045 Allowing the evaluation to not call commit_tool (#2041)
* 允许评估时不调用commit_tool

* prompt回滚
2026-05-14 15:49:09 +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
yangxinxin-7andClaude Sonnet 4.6 dcac266985 feat(vikingbot): self-evolving agent memory with experience injection (#2007)
* feat(bot): agent experience memory self-evolve injection

Rebase onto upstream/main (commit 6312e1e1). Conflicts resolved by keeping
upstream namespace-aware logic while preserving our experience memory changes:
- loop.py: inject experience memory before write tool calls (write_file, edit_file)
- subagent.py: prepend relevant experience memory to subagent task prompt
- memory.py: add get_viking_experience_context() for semantic experience search
- hooks.py: replace exact skill lookup with semantic experience search
- ov_server.py: add search_experiences(); search_memory returns agent_memory=[]
- schema.py: add exp_write_tools config; remove agent_memory_enabled gate

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(bot): add [SKILL_EXP] log to skill experience search for observability

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 15:17:23 +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
DuTao 3c31cc40e4 fix(bot\skill): Bot memory build, skill experience only extract existing skill_name, ov chat response field (#1912)
* fix

* fix

* fix pr

* fix pr
2026-05-09 15:11:10 +08:00
chenjw 44d3cc41b1 Feat/memory isolation 支持群聊模式 (#1711) 2026-05-06 10:45:06 +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
DuTao 5063c51d82 fix (#1799) 2026-04-29 17:38:07 +08:00
DuTao 48d0bcd8e1 feat(dot): Doc for agent setup (#1774)
* add relevant memories

* setup doc

* fix limit
2026-04-28 18:23:16 +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 305aa0a71f feat(bot): Fix mention, opt search tool result, Raise the limit count (#1678)
* 群列表兜底

* logger

* search

* add relevant memories
2026-04-25 15:59:10 +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