Commit Graph
13 Commits
Author SHA1 Message Date
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
baojun-zhang 7e43428f04 refactor(storage): deprecated and remove agfs http mode client (#2425)
* refactor(storage): delete agfs http mode client

* refactor(storage): refactor protocol to support diff return type

* refactor(storage): refactor code format from lint
2026-06-04 17:36:43 +08:00
MaojiaSheng f45b22a9a8 fix: backup vlm token usage stat (#2068)
* ov vlm circuit_breaker

* ov vlm failover

* fix: ov vlm failover

* fix: ov vlm failover
2026-05-15 16:31:36 +08:00
A0nameless0man cdf3482ef9 fix(utils): SIGTERM 使用 sys.exit(0) 替代 signal.default_int_handler (#1883)
signal.default_int_handler 是 SIGINT handler,会 throw KeyboardInterrupt。
SIGTERM 应触发干净退出:先调用 _cleanup() 清理锁文件,
再 sys.exit(0) 触发 atexit handlers 并退出。
2026-05-07 17:06:34 +08:00
ad13850021 fix(semantic): memory queue stall + permanent fs-error classification (#1531)
* fix(semantic): ensure memory processing always reports completion status

_process_memory_directory() had early return paths that could bypass
report_success()/report_error() in on_dequeue(), leaving the queue's
in_progress counter permanently stuck. This caused the semantic queue
to appear stalled with pending items never being processed.

All code paths now properly propagate to the completion callbacks.

Fixes #864.

* fix(semantic): classify filesystem errors as permanent to prevent infinite retry

Address review feedback: filesystem errors (FileNotFoundError,
PermissionError, IsADirectoryError, NotADirectoryError) are now
classified as permanent by classify_api_error(), so they hit
report_error() instead of being infinitely re-enqueued.

Tests updated to exercise real classifier behavior without mocking.

* test: fix set_callbacks signature for DequeueHandlerBase

DequeueHandlerBase.set_callbacks now takes (on_success, on_requeue, on_error);
the original PR #951 test harness called it with only (on_success, on_error).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(semantic): remove dead _mark_failed helper, add transient-error test

_mark_failed's two call sites were removed when _process_memory_directory
started raising on error. The closure itself was left behind. Delete it —
telemetry failure is now reported by on_dequeue's exception handler via
get_request_wait_tracker().mark_semantic_failed().

Add test_memory_ls_transient_error_requeues to cover the transient branch
of the memory path: a 500-class error from ls() must route through
_reenqueue_semantic_msg() and fire report_requeue() + report_success(),
not report_error(). The previous tests only exercised permanent errors.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: deepakdevp <deepakdevp@gmail.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 15:20:26 +08:00
baojun-zhang 8271ef362c fix(security): configurable embedding circuit breaker & log suppression (#1277) 2026-04-07 18:27:48 +08:00
Jiahui Zhou fea7c01ed5 Revert "feat(retrieve): use tags metadata for cross-subtree retrieval (#1162)" (#1200)
This reverts commit e72b614b3d.
2026-04-03 14:37:47 +08:00
13ernkastel e72b614b3d feat(retrieve): use tags metadata for cross-subtree retrieval (#1162)
* feat: use tags to expand cross-subtree retrieval

* fix: harden sync retrieval argument forwarding

* fix: resolve PR lint failures

* feat(tags): namespace stored and queried resource tags

* fix(tags): enforce canonical tag namespaces

* style: sort resource service imports
2026-04-03 13:24:38 +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
Deepak Dev PanwarandClaude Opus 4.6 395267a8ed fix(queue): add circuit breaker to prevent API retry storms (#772)
* feat(utils): add CircuitBreaker and error classification for API protection

Adds a thread-safe CircuitBreaker with three states (CLOSED/OPEN/HALF_OPEN)
and classify_api_error() that distinguishes permanent (403/401) from transient
(429/5xx/timeout) errors. Permanent errors trip the breaker immediately.

Part of fix for #729.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(semantic): add circuit breaker to SemanticProcessor

on_dequeue() now checks a circuit breaker before processing. Permanent
API errors (403/401) trip the breaker immediately and drop the message.
Transient errors (429/5xx/timeout) re-enqueue the message for later
retry. When the breaker is open, messages are re-enqueued with a
throttled sleep to prevent re-enqueue storms.

Part of fix for #729.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(embedding): add circuit breaker to TextEmbeddingHandler

Replaces 429-only error check with classify_api_error() that handles
permanent (403/401), transient (429/5xx/timeout), and unknown errors.
Permanent errors trip the breaker and drop the message. Transient errors
re-enqueue for retry (extending existing 429 behavior to all transient
errors). Circuit breaker check before embedding prevents calling a
known-broken API.

Part of fix for #729.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: restore asyncio import and handle edge cases in circuit breaker integration

- Restore top-level `import asyncio` in collection_schemas.py (was
  accidentally removed, breaking all embedding operations)
- Return error instead of falling through when breaker is open and no
  queue manager is available
- Log warning when queue_manager is None in _reenqueue_semantic_msg
- Only call report_success() when msg was actually re-enqueued, not
  when msg is None

Part of fix for #729.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 11:21:04 +08:00
MaojiaShengandopenviking 0fb8f13a13 fix: windows zip path, code repo indexing, search retrieval, account id, rust cli version... (#577)
* fix: windows zip path norm

* fix: account id in vector db

* fix: add some log

* fix: add some log, and fixed search

* fix: add some log, and fixed search

* fix: add some log, and fixed search

* fix: add some log, and fixed search

* fix: add some log, and fixed search

* fix: add some log, and fixed search

* fix: add some log, and fixed search

* fix: add some log, and fixed search

---------

Co-authored-by: openviking <openviking@example.com>
2026-03-15 10:04:51 +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
jayandTrae AI cc274daad8 feat: add index control to add_resource and refactor embedding logic (#401)
Co-authored-by: Trae AI <trae@bytedance.com>
2026-03-04 11:33:21 +08:00