Commit Graph
23 Commits
Author SHA1 Message Date
Qin Haojieandsponge225 b877ababa5 perf(queue): 流式调度语义向量化任务 (#3636)
* perf(queue): stream semantic vectorization tasks

* fix(queue): isolate semantic work context

* feat(config): make parse concurrency configurable

* test(queue): update semantic vectorization fakes

* fix(queue): correct semantic vectorization conflict resolution

---------

Co-authored-by: sponge225 <1670519171@qq.com>
2026-08-10 21:24:11 +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
Jiahui Zhou d2056e971d Feat/session auto commit v2 (#3736) 2026-08-05 16:18:49 +08:00
Kchen 8d1d52fe5d 资源导入:支持解析后不拆分文档 (#3645) 2026-08-05 11:34:10 +08:00
baojun-zhang 2f9451231e refactor(pathlock):using rust implement instead python (#3602)
* refactor(pathlock):using rust implement instead python

* refactor(pathlock):using rust implement instead python

* refactor(pathlock):using rust implement instead python

* refactor(pathlock):optimize unit test code

* refactor(pathlock):optimize encryption create func

* refactor(pathlock):avoid releasing handoffed pathlock on enqueue errors

* fix(pathlock): use owned lease capability and handle S3 create-new 409 as conflict

* fix(ragfs): keep original FsContext for multi-write metadata

* fix(pathlock): resolve lease coverage and CAS handling issues

- detect S3 conditional conflicts from structured service errors
- pass transaction leases when deleting skill roots
- let temp cleanup acquire locks for temp paths
- disambiguate cache and pathlock providers in cache tests
- update temp cleanup lease assertions

* fix(ragfs): bypass pathlock for multi-write metadata

* fix(ragfs): revert pathlock fail-fast design

* fix(ragfs):fix(ragfs): use non-blocking fcntl locks for localfs CAS

* fix(ragfs): serialize heartbeat lease refresh with release and report real conflict kind

* fix(ragfs): preserve conflict kind snapshot and drop unused test scaffolding

* fix(ragfs): preserve conflict kind snapshot and drop unused test scaffolding
2026-07-29 19:45:34 +08:00
Jiahui Zhou 34b5a88971 Feat/add resource tags (#3560)
* feat: allow tags during resource import

* feat: support uploaded resource watches with tags

* feat: add resource tag flags to CLI

* fix: reject uploaded resource watches with tags

* docs: untrack add resource tags design draft

* fix: write add_resource tags during ingest

* docs: move add_resource tags docs into resources api

* fix: tighten add_resource tag ingestion semantics

* fix: address add_resource tag review feedback

* fix: merge resource tags at vector upsert

* refactor: carry add_resource tags with ingest options
2026-07-29 15:43:06 +08:00
baojun-zhang 1841dfed81 Revert "refactor(pathlock):using rust implement instead python (#3557)" (#3597)
This reverts commit 6b538db569.
2026-07-29 11:31:41 +08:00
baojun-zhang 6b538db569 refactor(pathlock):using rust implement instead python (#3557)
* refactor(pathlock):using rust implement instead python

* refactor(pathlock):using rust implement instead python

* refactor(pathlock):using rust implement instead python

* refactor(pathlock):optimize unit test code

* refactor(pathlock):optimize encryption create func

* refactor(pathlock):avoid releasing handoffed pathlock on enqueue errors

* fix(pathlock): use owned lease capability and handle S3 create-new 409 as conflict

* fix(ragfs): keep original FsContext for multi-write metadata

* fix(pathlock): resolve lease coverage and CAS handling issues

- detect S3 conditional conflicts from structured service errors
- pass transaction leases when deleting skill roots
- let temp cleanup acquire locks for temp paths
- disambiguate cache and pathlock providers in cache tests
- update temp cleanup lease assertions

* fix(ragfs): bypass pathlock for multi-write metadata

* fix(ragfs): revert pathlock fail-fast design
2026-07-29 11:08:42 +08:00
Jiahui Zhou 5d1ba45be4 Feat/add resource processing mode (#3566)
* feat: add resource processing mode

* fix: keep semantic artifacts in vectors-only add resource

* test: support processing mode in api test client

* docs: document add resource processing mode

* fix: align processing mode after resource ingestion refactor

* feat: expose processing mode in TypeScript SDK

* fix: preserve add resource compatibility
2026-07-28 20:09:06 +08:00
huangruitengandhuangruiteng 2ea129e63b fix(server): preserve graceful SIGTERM shutdown (#3278)
* fix(server): preserve graceful SIGTERM shutdown

* fix(server): preserve shared process lock ownership

* fix(server): harden aliased process lock acquisition

* test(server): cover cancelled lock cleanup

---------

Co-authored-by: huangruiteng <huangruiteng@bytedance.com>
2026-07-24 13:24:37 +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
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