Commit Graph
84 Commits
Author SHA1 Message Date
DuTao 4369e28dca fix(memory): expose reasons for skipped empty-URI operations (#4168)
* 增加空uri的原因

* fix  pr bug

* 加入Memory diff

* fix(memory): preserve semantics for skipped URI reporting
2026-08-24 16:21:04 +08:00
9eac8a6d3d feat(sdk): sync go/ts/python SDKs with server find/search, recall, an… (#3737)
* feat(sdk): sync go/ts/python SDKs with server find/search, recall, and admin changes

Server-side changes recently landed that the language SDKs had drifted from:

- find/search results now return `tags` and no longer return
  `category`/`match_reason`/`relations`/`overview` (#3730). Go's strict
  struct was the only one broken; update MatchedContext accordingly.
- new admin endpoints for agent-evolution and per-account settings (#3695).
- public `search/recall` endpoint was missing from all SDKs.

Changes:
- python: add `level`/`since`/`until`/`time_field` to find/search; add an
  `extra` escape hatch to find/search/add_resource/write/batch_write so new
  server fields can be passed without an SDK bump (only forwarded when set,
  preserving `level=0`); add `recall` and the four admin methods.
- go: fix MatchedContext (add Tags, drop removed fields), add Recall and the
  four admin methods.
- typescript: type MatchedContext/FindResult, add RecallOptions, add `recall`
  and the four admin methods.

Co-authored-by: TRAE CLI <noreply@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

feat(sdk): unify options APIs and sync latest server interfaces

- migrate complex Python SDK calls to typed options dictionaries
- add dedicated context search and consistent extra-field handling
- align Go and TypeScript options with omission-aware serialization
- support session config, event tags, Agent Evolution date filters,
  OpenViking Assets, batch write, downloads, and create_parent
- refresh SDK tests and examples across all three languages

Co-authored-by: TRAE CLI <noreply@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

fix(sdk): address options API review findings

- fix Go session extra merging and Python message precedence
- adapt LangChain calls to the Python options API
- migrate repository examples, tests, and documentation

Co-authored-by: TRAE CLI <noreply@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

fix(sdk): complete options migration and message parity

- migrate remaining Python SDK benchmarks to options dictionaries
- normalize empty parts consistently for single and batch messages
- add regression guards for repository SDK call sites

Co-authored-by: TRAE CLI <noreply@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

fix(sdk): align reindex options after main rebase

- preserve reindex tags in Python typed options
- add reindex extra support for Go and TypeScript
- reject official fields passed through extra across SDKs

Co-authored-by: TRAE CLI <noreply@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

feat(sdk): support legacy keyword options

Co-authored-by: TRAE CLI <noreply@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

docs(sdk): use explicit Python SDK arguments

Co-authored-by: TRAE CLI <noreply@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

fix(sdk): support set tags extra options

Co-authored-by: TRAE CLI <noreply@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

fix(sdk): expose Go add resource options

Expose AddType and ProcessingMode through Go AddResourceOptions and serialize them to the resources API. Add a regression test covering the resulting request payload.

Co-authored-by: TRAE CLI <noreply@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

feat(sdk): flatten core Python client options

Co-authored-by: TRAE CLI <traecli@bytedance.com>

docs(sdk): align Python examples with flattened options

Co-authored-by: TRAE CLI <traecli@bytedance.com>

fix(sdk): preserve core API compatibility

Co-authored-by: TRAE CLI <traecli@bytedance.com>

refactor(python-sdk): move resource hints to options

Co-authored-by: TRAE CLI <traecli@bytedance.com>

fix(sdk): align resource option callers

Co-authored-by: TRAE CLI <traecli@bytedance.com>

test(sdk): cover recursive reindex forwarding

Co-authored-by: TRAE CLI <traecli@bytedance.com>

fix(sdk): preserve Go options compatibility

Co-authored-by: TRAE CLI <traecli@bytedance.com>

feat(python-sdk): expose message peer id

Co-authored-by: TRAE CLI <traecli@bytedance.com>

test(python-sdk): consolidate options coverage

Co-authored-by: TRAE CLI <traecli@bytedance.com>

feat(python-sdk): add parts and flatten image search

Co-authored-by: TRAE CLI <traecli@bytedance.com>

* docs(sdk): align Python call examples

Co-authored-by: TRAE CLI <traecli@bytedance.com>

---------

Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: Qin Haojie <qinhaojie.exe@bytedance.com>
2026-08-24 14:09:11 +08:00
t0saki a83b81715b feat(uri)!: remove uid-less current-user shorthand in favor of viking://~ (#4196)
* feat(uri)!: reject uid-less current-user shorthand in favor of viking://~

viking://user/<segment> (memories/resources/skills/peers/privacy/sessions
without a user id) was ambiguous with a user literally named after the
segment, and a user actually named e.g. "memories" was unreachable for
USER/ADMIN callers. Now that the viking://~ home alias (#4167) covers the
same need unambiguously, the shorthand fails closed at the request
boundary instead of expanding:

- resolve_current_user_uri raises NamespaceShapeError with a corrective
  hint naming both viking://~/<rest> and the explicit-uid form. Silently
  parsing the reserved segment as a peer user id would misdirect reads
  and writes, so rejection is the only safe removal.
- Bare viking://user falls through to the canonical parser and keeps
  container semantics (a user key listing it sees only its own space).
- The self-id escape stays: a caller whose user_id equals a reserved
  name keeps viking://user/<own-id> as their canonical root. ROOT-role
  literal parsing and the legacy viking://session alias are unchanged.
- AddTargetsConfig normalizes stored legacy config spellings
  (viking://user/resources|skills) to the viking://~ form at validation
  so existing ov.conf/user_config deployments keep working; the accepted
  per-user spelling is now viking://~/resources and viking://~/skills.
- usage_reporter keeps canonicalizing the historical shorthand found in
  old transcripts and additionally recognizes viking://~/memories/.

BREAKING CHANGE: requests using the uid-less viking://user/<segment>
spelling now fail with 400; use viking://~/<segment> or an explicit
viking://user/{user_id}/<segment> URI.

* refactor(clients): migrate first-party emitters to the viking://~ home alias

Every in-repo client that emitted the removed uid-less current-user
shorthand now sends viking://~/... instead: vikingbot fallbacks and
default sentinels, the LangChain store/tools defaults, the shared
recall-core.mjs (all synced plugin copies), the codex/claude-code/
openclaw/openwebui/dsh/zcode/pi plugin emitters, quick-app examples,
Go SDK example, tau2 benchmark targets, and the eval golden dataset.

Compat kept where legacy strings live in stored user configs: bot and
ov_dream sentinels accept both spellings while emitting only ~, and
recall-core still rewrites legacy viking://user/<reserved> config values
client-side. langchain_openviking._uri now classifies viking://~ with
the explicit-user shape so canonicalized server responses keep matching
a ~ root. Plugin READMEs note the server requirement for the alias.

* docs: replace current-user shorthand guidance with the viking://~ home alias

Rewrite every EN/ZH doc and model-facing prompt that advertised the
uid-less viking://user/<segment> spelling: URI concept catalogue,
context-types/storage/extraction/retrieval/session/privacy concepts,
configuration guide (with the legacy add_targets auto-normalization
note), resources/skills/sessions/retrieval/admin API references, FAQ,
capability reference, and the openviking-memory / ov-experience-memory /
openclaw / ov-resources skills. The stale MCP viking://user/<path>
dialect passage in the MCP guide is replaced by ~ guidance, and bare
viking://user is documented as the container of user spaces.

* test(api): migrate live API session-used tests off the removed shorthand

tests/api_test/sessions sent uid-less viking://user/skills/... URIs to
record_used, which the request boundary now rejects with 400 (caught by
the API & CLI Integration Tests CI job; these tests need a live server
and are not part of the local suites). The api_test client authenticates
as an admin-role user key, so the viking://~ home alias expands for it.
tests/api_test/common/test_edge_cases.py is left as is: it asserts a 400
for a non-resource add target, which still holds.
2026-08-21 19:00:19 +08:00
MaojiaShengandTRAE CLI a7c77e6cf7 feat: add freshness-aware parent aggregation (#4180)
* feat: add freshness-aware parent aggregation

Defer wide-directory abstract/overview regeneration until the configured freshness threshold is reached while continuing changed-file semantic and vector processing.

Persist freshness metadata atomically, make parent bubbling L0-aware, preserve separate semantic/vector statuses, and keep explicit waits synchronous.

Rebuild every sampled summary on threshold refresh and always retry directory vectorization so stale sidecars or transient vector failures cannot be silently accepted.

Add focused coverage for freshness policy, pending-state consumption, sampled-summary refresh, vector retries, and parent bubbling.

Co-authored-by: TRAE CLI <traecli@bytedance.com>

* feat: ov reindex support --recursive

* feat: ov reindex support --recursive

* feat: ov reindex support --recursive

* feat: ov reindex support --recursive, and applied to memory

* feat: ov reindex support --recursive, and applied to memory

---------

Co-authored-by: TRAE CLI <traecli@bytedance.com>
2026-08-21 16:30:44 +08:00
t0saki ff38bb5dd1 feat(uri): add viking://~ home alias for the caller's user root (#4167)
* feat(uri): add viking://~ home alias for the caller's user root

Accept `viking://~` (and `viking://~/<suffix>`) as a server-side alias
for the authenticated caller's user namespace root. The alias is
expanded at the request boundary by resolve_current_user_uri for
USER/ADMIN identities, so every control plane that already funnels
through validate_request_viking_uri (REST, MCP, and therefore CLI/SDK
clients) gets it with no client changes.

Design points:
- `~` is a reserved token that can never collide with a real user id
  (validate_user_id's charset excludes it), so segment-0 aliasing does
  not weaken canonical-first parsing.
- The canonical parser (resolve_uri) rejects the alias outright,
  mirroring the legacy-session handling: root-role requests, internal
  callers, and storage paths fail closed instead of materializing a
  literal '~' directory.
- The alias is accepted but never advertised: scope error copy
  ("Must be one of: ...") filters it at both the parser and the public
  validator, and VikingURI.build refuses to mint it, so responses and
  persisted data stay canonical.
- MCP search now resolves exclude_uris with the same strictness as the
  REST search router (closes the one entry point that skipped it).

* refactor(mcp): drop tilde mention from tool docstrings

Agents pass viking://~ through verbatim and responses echo the
canonical form, so the alias is self-explanatory on contact; carrying
the sentence in 12 tool descriptions costs every MCP session tokens.
Docs keep the alias documented for humans.
2026-08-20 20:44:40 +08:00
zgyandqin-ctx dc39985ad1 refactor: remove resource relation edges (#3956)
* refactor: remove resource relation edges

* fix: remove stale relation references

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-08-19 17:54:29 +08:00
MaojiaShengandqin-ctx 24cc8c6ee9 feat: refine OKF sidecar metadata handling and write protection (#4092)
* feat: implement l0-l1-okf-sidecars

* feat: implement l0-l1-okf-sidecars

* feat: implement l0-l1-okf-sidecars

* feat: implement l0-l1-okf-sidecars, fix review comments

* feat: implement l0-l1-okf-sidecars, fix review comments

* feat: implement l0-l1-okf-sidecars, fix review comments

* feat: implement l0-l1-okf-sidecars, fix review comments

* test: prune semantic sidecar coverage

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-08-18 23:21:06 +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
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
baojun-zhang bd5cce09c7 feat(pathlock): adjust pathlock config (#3854) 2026-08-07 13:21:30 +08:00
Hao Zheandzhiheng.liu c4d2b27c64 fix(ov): harden CLI configuration and command behavior (#3552)
* docs: fix stale commands, paths, and provider claims

Sweep findings: D-03, D-04, D-05, D-06, D-07, D-08, D-09. Align setup and API examples with current configuration and CLI behavior.

(cherry picked from commit 2b21ee513b)

* fix(review): correct crypto output flag

Addresses blocking review finding on #3401.

(cherry picked from commit 85bb502709)

* docs(ov): finish stale CLI path cleanup

Complete the #3401 salvage by updating the API-writing templates and the remaining encryption guide examples to the Rust CLI surface.

* fix(ov): make local content operations race-safe

Salvage the safe-I/O portions of OpenViking#3414: reject unsupported local watch requests before upload, atomically create download targets, and write snapshot output before reporting JSON success. Add focused regression coverage.

* fix(ov): validate timeout and node-limit inputs

Salvage and complete OpenViking#3414 by validating every timeout and node-limit surface consistently while preserving config commands as a repair path for invalid persisted values.

* fix(ov): allow explicit help before language setup

Salvage OpenViking#3416 with a narrower contract: only clap-recognized -h/--help requests bypass first-run language selection. Bare command groups, legacy -help, and option values keep the existing gate.

* docs(ov): align session and snapshot command examples

Salvage OpenViking#3419 by correcting positional session and snapshot examples, documenting the canonical observer filesystem command, and keeping fs as a compatible alias.

* fix(ov): honor configured output defaults safely

Salvage and complete OpenViking#3424 with CLI-over-config precedence, runtime validation for normal commands, and a table fallback that leaves config repair commands usable. Also clarify the Python-client versus Rust-CLI upload-mode controls.

* fix(ov): preserve zero node-limit semantics

* ci: skip embedding-dependent resource test without secrets

* fix(cli): validate compile timeout consistently

---------

Co-authored-by: zhiheng.liu <zhiheng.liu@bytedance.com>
2026-07-31 21:45:53 +08:00
zgy 49b182045b refactor(parser): Refactor code summaries to fixed skeleton-first routing (#3568)
* Refactor code summary skeleton routing

* Simplify code skeleton routing configuration

* Render C tag skeletons as signatures

* Revert "Render C tag skeletons as signatures"

This reverts commit 8e342055f8.

* Simplify fixed code skeleton summary route

* Inline process skeleton rendering

* Simplify code skeleton routing entrypoints

* Fix code summary review issues

* Address final code summary review feedback

* Route failed tags skeletons to LLM fallback

* Restore CUDA and TS extension routing

* Improve code skeleton query coverage

* Route semantic code detection through skeleton support

* Move process skeleton engine into ast package

* Admit skeleton-supported files during directory scan

* Align code summary docs after main merge

* Reduce code skeleton fallback log verbosity

* chore: require grep-ast 0.9.0
2026-07-31 11:38:57 +08:00
baojun-zhang 7c956f23bc feat(config): add compatible default timeout for ragfs pathlock (#3641)
- add storage.agfs.pathlock.lock_timeout_secs
- use pathlock default timeout instead of hardcoded zero in wrapper
- map legacy storage.transaction.lock_timeout when new config is unset
- remote redolog by using  persistent `session_commit` queue.
2026-07-31 11:23:27 +08:00
Hao Zheandzhiheng.liu f0445e0cce docs(build): repair contributor guidance and maintenance tooling (#3551)
* docs: fix broken links and anchors across READMEs and guides

Sweep findings: D-10, D-11, D-12, D-13, D-14, D-15. Restore valid documentation targets and stable cross-page anchors.

(cherry picked from commit e3504d633d)

* docs: correct contributor and release references

Reconstruct the factual parts of draft #3397 against current upstream: use the supported setup wizard, align the repository tree and workflow names with tracked files, document current release paths, and repair the bug-bounty link. Excludes install-policy and subjective content rewrites.

Based-on: b332e19e40
Based-on: c89afb17f2
Co-authored-by: zhiheng.liu <zhiheng.liu@bytedance.com>

* build: propagate recipe failures and align CMake minimum

Keep build failures visible, use isolated temporary extraction paths, and enforce the native build's CMake 3.15 floor across all contributor guides. CMake version parsing accepts prerelease and vendor suffixes.

Based-on: 8943a12285
Co-authored-by: zhiheng.liu <zhiheng.liu@bytedance.com>

* fix(scripts): surface backfill enumeration failures

Preserve the safety fix from draft #3415 while retaining legacy no-op arguments for existing operational scripts. Deprecated arguments now remain parse-compatible, advertise their status in help, and emit explicit warnings when used.

Based-on: 5516d96048
Co-authored-by: zhiheng.liu <zhiheng.liu@bytedance.com>

---------

Co-authored-by: zhiheng.liu <zhiheng.liu@bytedance.com>
2026-07-28 18:11:33 +08:00
Rocke Dongandqin-ctx cfddab1a23 fix(storage): preserve source files when rm index cleanup fails (#3519)
* fix(storage): preserve source files when rm index cleanup fails

* test(storage): trim redundant removal cases

* test(storage): remove PR-specific regression tests

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-07-28 16:03:21 +08:00
Rocke Dong b62a4d2cfa docs: list all AST extraction languages (#3511) 2026-07-26 14:31:08 +08:00
Evo 0d2c1516a2 docs(transaction): align crash-recovery guidance with the 30-minute lock expiry (#3338)
* docs(transaction): align lock expiry guidance

* docs(transaction): align Chinese lock expiry guidance
2026-07-22 19:23:26 +08:00
yufeng a949517f27 docs: add OpenViking Helper integration and fix stale links (#3445)
* docs: add OpenViking Helper integration

* docs: use mock data in Helper screenshots
2026-07-22 14:14:57 +08:00
yufeng 085aaf832d docs: correct context paths and refine navigation (#3385) 2026-07-21 11:45:17 +08:00
Jiahui Zhou 1c46d44fbc Fix/reindex preserve owners (#3096)
* fix: preserve reindex content owners

feat: allow trusted admin role assertion

feat: prune orphan vectors during reindex

fix: harden reindex memory body reads

feat: expose reindex prune options in clients

fix(cli): prefer workspace sdk for compat clients

fix: harden reindex prune orphans

* test: align reindex expectations after rebase
2026-07-14 20:38:30 +08:00
DuTao 41e002fa0b docs(bot): align documentation and tool guidance with current implementation (#3215)
* 优化bot的doc

* 删除无用的security,增加ov的 guides

* ov下增加bot的综述文章
2026-07-13 16:18:07 +08:00
0102a48c2a fix(skills): now we allow viking://agent/skills again, and optimize CLI for skills (#2813)
* chore: clear unused files

* fix(tests): fix unit test

* refactor(auth): introduce plugin-based authentication architecture

Replace the monolithic `openviking/server/auth.py` with an extensible
plugin-based auth system. This refactor extracts the three built-in modes
(`dev`, `api_key`, `trusted`) into separate `AuthPlugin` implementations,
adds a registry for third-party plugins, and preserves all existing behavior
while enabling custom authentication backends (e.g. LDAP, OIDC, mTLS).

Key changes:
- **New public API**: `AuthPlugin` (ABC) and `register_auth_plugin` decorator.
- **New registry**: `AuthPluginRegistry` supports runtime registration.
- **Built-in plugins**: `DevAuthPlugin`, `ApiKeyAuthPlugin`, `TrustedAuthPlugin`.
- **Config change**: `auth_mode` widened from `Literal` to `str` for custom modes.
- **Validation delegated**: `validate_server_config()` now delegates to the active
  plugin's `validate_config()`, preserving existing validation semantics.
- **Router compatibility**: All existing `require_*` decorators and `resolve_identity`
  / `get_request_context` dependencies remain unchanged. Routers import the same
  symbols from `openviking.server.auth`.
- **Tests**: `conftest.py` manually wires the DevAuthPlugin in ASGI tests (lifespan
  not triggered). `test_auth.py` expanded with plugin registration and validation tests.
- **Docs**: `04-authentication.md` (en/zh) updated with plugin registration examples.

Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>

* fix(tests): fix trusted mode test

* fix(tests): fix unit test

* fix(cli): remove unexisted transaction observer

* docs: update skills definition

* docs: update skills definition

* docs: update skills definition

* docs: update skills definition

* fix(skills): now we allow viking://agent/skills again, and optimize CLI for skills

* docs(skills): use -p instead of --parent in agent skills examples

Align the `ov skills add` examples in the context-types and viking-uri
docs with the short flag `-p` introduced for `ov skills list/find/show`,
so all four user-facing examples consistently demonstrate the short form
when targeting `viking://agent/skills`.

Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>

* fix(tests): error check for api key

* fix(tests): unit test wait until resource not busy

* fix(tests): unit test wait until resource not busy

* fix(sdk): args form in skills find

* fix(skills): pass target uri in request body

---------

Co-authored-by: claude-sonnet-4-6 <noreply@anthropic.com>
Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-06-25 14:36:06 +08:00
agent a4aefac1f7 feat(session): Support image message extraction (#2578)
* Support image message extraction

* fix: fix image url

* fix: bug

* fix: image parts readme
2026-06-15 18:03:27 +08:00
Qin Haojie 058cd1f5ea feat(migration): add legacy user-peer migration (#2610)
* feat(migration): add legacy user-peer migration

* test(migration): trim redundant migration tests
2026-06-15 13:21:33 +08:00
Qin Haojie 49e4d76913 feat(core): add actor peer filesystem view (#2594)
* feat(core): enforce actor scoped retrieval

* fix(core): narrow actor peer filtering to retrieval

* fix(core): enforce actor peer filesystem view
2026-06-13 15:49:34 +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
Qin Haojie e06671b351 feat(session): 将 session 存储到 user 命名空间 (#2556)
* feat(session): store sessions in user namespace

* fix(session): tolerate legacy commit body fields
2026-06-11 14:33:00 +08:00
baojun-zhang 7ee1481e1d feature(storage): support multi write storage (#2466)
* feature(storage): support multi write storage

* refactor(storage): simplify multiwrite logic and consolidate test helpers

* refactor(storage): extract multibackend and shape modules and tighten multi-write wrapper boundaries

* refactor(storage): refactor write pipeline
2026-06-08 11:12:15 +08:00
Zayn Jarvis c7f82cceaa docs: fix dead external links (#2458) 2026-06-05 15:50:10 +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
Evo bc3aebbbee docs(retrieval): note intent-analysis model is configurable via query_planner (#2224) (#2269)
* docs(retrieval): note intent-analysis model is configurable via query_planner (#2224)

* docs(retrieval): note intent-analysis model is configurable via query_planner (#2224)
2026-05-28 18:13:10 +08:00
Qin Haojie 96df42f2a9 refactor(memory): remove legacy memory v1 (#2264) 2026-05-27 19:49:38 +08:00
Qin Haojie 578148a855 docs: clarify resource API field names (#2107) 2026-05-18 14:57:43 +08:00
Evo b1c3936ae5 docs(en/metrics): add per-channel one-turn resolution PromQL example from #2037 (#2082) 2026-05-18 14:08:23 +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
Evo 8f9e1c0d97 docs(api): document observer.filesystem from #2045 (#2057)
* docs(api): document observer.filesystem from #2045

* docs(api): document observer.filesystem from #2045

* docs(metrics): list filesystem component from #2045

* docs(metrics): list filesystem component from #2045
2026-05-15 11:27:05 +08:00
Qin Haojie 77b604a641 fix(storage): 优化路径锁与语义刷新并发 (#2029)
* fix(storage): refine path lock semantic refresh concurrency

Use exact path locks for source commits, tree locks only for lifecycle and schema scopes, and coalesce derived semantic writes to avoid stale summary overwrites under concurrent resource and memory updates.

* chore: split benchmark changes into separate PR

* chore: keep semantic refresh design notes out of docs

* style: format lock changes

* fix: preserve resource lifecycle locks

* Revert "fix: preserve resource lifecycle locks"

This reverts commit d2fb274f85.

* fix(resource): simplify lifecycle locking

* fix(queuefs): consolidate semantic sidecar writes
2026-05-14 20:44:28 +08:00
Evo 4237d5018f docs(retrieval): align score_propagation_alpha default 0.5→1.0 with #1947 (#1948)
* docs(retrieval): align score_propagation_alpha default 0.5→1.0 with #1947

* docs(retrieval): align score_propagation_alpha default 0.5→1.0 with #1947

* docs(retrieval): align score_propagation_alpha default 0.5→1.0 with #1947

* docs(retrieval): align score_propagation_alpha default 0.5→1.0 with #1947

* docs(retrieval): align score_propagation_alpha default 0.5→1.0 with #1947
2026-05-11 18:00:39 +08:00
Qin Haojie e648b2679c feat(ovpack): add v2 manifest and backup restore (#1927)
* feat(ovpack): add v2 manifest and conflict policy

Add a portable OVPack manifest for scalar metadata and make imports validate scope, derived files, and conflicts before writing.

* fix(ovpack): remove import vectorize option

Make OVPack imports always rebuild vectors in the target environment, keep legacy packages compatible, and reject unsupported manifest versions before writing.

* fix(ovpack): remove force import alias

Use on_conflict as the single OVPack import conflict policy and reject removed force inputs.

* fix(ovpack): regenerate runtime vector metadata

Keep type portable but stop exporting or applying created_at, updated_at, and active_count from OVPack manifests.

* fix(ovpack): validate manifest contents

* fix(ovpack): require manifests for imports

* fix(ovpack): close manifest validation gaps

* fix(ovpack): defer parent creation until validation passes

* fix(ovpack): remove export size guard

* fix(ovpack): support session and scope-root restores

* docs(ovpack): document full backup migration

* feat(ovpack): add backup restore workflow

* fix(ovpack): validate import scope compatibility
2026-05-11 11:09:35 +08:00
Hao Zhe 66d447187b fix(storage): canonicalize shorthand namespace URIs on write (#1929) 2026-05-09 14:05:36 +08:00
MaojiaShengandopenviking b9a8c4e120 feat: path variables and -p for add-resource (#1896)
* feat:   提交1:路径变量系统
  feat: Add path variable system with calendar variables

  - Implement {calendar:today}, {calendar:ym}, etc.
  - Integrate with all URI-handling API endpoints
  - Add comprehensive unit tests
  - Update documentation

  提交2:Rust CLI重构
  feat: Rust CLI refactor with progress bar support

  - Split HttpClient into BaseClient and FileUploader
  - Add dynamic timeout configuration
  - Add progress bar for compression/upload
  - Configure via --progress flag or config file

* feat:   提交1:路径变量系统
  feat: Add path variable system with calendar variables

  - Implement {calendar:today}, {calendar:ym}, etc.
  - Integrate with all URI-handling API endpoints
  - Add comprehensive unit tests
  - Update documentation

  提交2:Rust CLI重构
  feat: Rust CLI refactor with progress bar support

  - Split HttpClient into BaseClient and FileUploader
  - Add dynamic timeout configuration
  - Add progress bar for compression/upload
  - Configure via --progress flag or config file

* feat: support --parent, and change default root path for image

* feat: support --parent, and change default root path for image

* docs: fix docs

* fix: review comments

---------

Co-authored-by: openviking <openviking@example.com>
2026-05-08 15:06:31 +08:00
chenjw 44d3cc41b1 Feat/memory isolation 支持群聊模式 (#1711) 2026-05-06 10:45:06 +08:00
t0saki 8c01e97ee4 feat(cc-memory-plugin): persistent session and recall redesign (#1615)
## feat(cc-memory-plugin): implement persistent sessions, native MCP, and async write path

This update transitions the Claude Code memory plugin from a one-shot capture model to a persistent, per-session integration with OpenViking. It introduces native MCP support directly from the FastAPI server, significantly expands the tool surface, and optimizes performance via detached async write hooks.

### Core Engineering & Capabilities
* **Persistent Sessions:** Reworked lifecycle hooks (SessionStart, PreCompact, SessionEnd) to maintain stable session IDs across the entire Claude Code conversation.
* **Native MCP Endpoint:** Replaced the Node.js MCP subprocess with a native `/mcp` endpoint on the OpenViking server.
    * Expands to 9 specialized tools: `search`, `read`, `list`, `store`, `add_resource`, `forget`, `grep`, `glob`, and `health`.
    * Propagates identity headers (`X-OpenViking-Account`, `X-OpenViking-User`) through the MCP transport.
* **Async Write Path:** Introduced a detached worker pattern for `auto-capture`, `session-end`, and `subagent-stop` hooks. Claude Code no longer blocks on network round-trips to the OpenViking server.
* **Multi-Source Recall:** Enhanced `auto-recall` to search across memories, resources, and skills with URI-deduplication and score-based filtering.

### Configuration & Integration
* **Unified Auth:** Standardized on `Authorization: Bearer` tokens.
* **Config Resolution:** Established a clear priority chain: **Env Vars → ovcli.conf → ov.conf → Defaults**.
    * Added comprehensive environment variable coverage for all tuning fields (e.g., `OPENVIKING_SCORE_THRESHOLD`, `OPENVIKING_COMMIT_TOKEN_THRESHOLD`).
* **One-Line Installer:** Added an interactive bash installer (`install.sh`) that handles dependencies, `ovcli.conf` setup, and marketplace registration, with support for both self-hosted and Volcengine Cloud options.

### Bug Fixes & Refinement
* **Self-Injection Prevention:** Implemented block-stripping logic in `auto-capture` to prevent the plugin from re-storing its own injected context blocks into the memory pool.
* **Session Bypass:** Fixed a bug where `session-start` and `subagent-start` ignored bypass patterns.
* **Subagent Isolation:** Implemented `SubagentStart/Stop` hooks with isolated session IDs and specialized agent headers for memory segregation.
* **Docs & Maintenance:** Bumped version to `0.2.2`; added comprehensive agent integration guides; fixed Vue interpolation and markdown fence issues in documentation.
2026-05-04 13:10:44 +08:00
Evo 7748036951 docs(multi-tenant): finish agentId→agent_prefix rename in OpenClaw Plugin 2.0 section (#1818)
* docs(multi-tenant): finish agentId→agent_prefix rename in OpenClaw Plugin 2.0 section

* docs(multi-tenant)(zh): finish agentId→agent_prefix rename in OpenClaw Plugin 2.0 section
2026-04-30 14:11:06 +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
sentisso 9b45c21499 feat(upload): respect root and nested .gitignore during filtering (#1812)
* feat: adding .gitignore compliance

* docs

* fix

* revert
2026-04-30 14:01:54 +08:00
baojun-zhang 21c8d08d6c doc(observability): add grpc metadata guide && format test code (#1807) 2026-04-29 20:30:23 +08:00
baojun-zhang d7fdb489ce feat(observability): support header param while OTLP export (#1805)
* feat(observability): support header param while OTLP export

* feat(observability): support header param while OTLP export
2026-04-29 20:14:31 +08:00
Evo ae250fdcfa docs(multi-tenant): rename agentId to agent_prefix per #1783 (#1786)
* docs(multi-tenant): rename agentId to agent_prefix per #1783 (en)

* docs(multi-tenant): rename agentId to agent_prefix per #1783 (zh)
2026-04-29 17:37:23 +08:00
yufeng 39b124d037 fix(docs): simplify docs workflow (#1778) 2026-04-29 10:55:57 +08:00