Commit Graph
387 Commits
Author SHA1 Message Date
yepper 834b808183 feat(resources): add resource watch scheduling and status tracking (#709)
* feat(resource): add watch interval support for resource monitoring

implement resource watch functionality that allows automatic monitoring and re-processing of resources at specified intervals. key features include:
- add watch_interval parameter to resource APIs
- create watch scheduler service for task execution
- handle conflict detection for active watch tasks
- provide watch status query capability
- include comprehensive tests and examples

the watch feature enables periodic automatic updates of resources without manual intervention, improving data freshness for frequently changing content

* feat(resources): add watch status tracking and improve resource processing

- Implement get_watch_status API for tracking resource watch status
- Add immediate persistence for first-time resource additions
- Improve file change detection with size comparison
- Refactor watch scheduler with better concurrency control
- Add test coverage for watch status and resource processing
- Remove unused watch manager references and clean up code

* refactor: improve code style and fix minor issues

- Simplify logging by removing redundant data copying
- Fix syntax errors in docstrings and string literals
- Add new fields to EmbeddingMsg class
- Improve line wrapping and formatting
- Update watch task storage URIs to use hidden files

* refactor(embedding_msg): simplify EmbeddingMsg constructor by removing unused fields

Remove media_uri, media_mime_type and id parameters as they are not used in the implementation

* feat(watch): add backup task recovery and simplify permission check

Add test case for recovering tasks from backup storage when primary is missing
Remove require_owner parameter from _check_permission as it's redundant with the existing role-based checks

* feat(resources): add watch_interval support for resource updates

Add watch_interval parameter to enable periodic resource updates. When target is specified, watch_interval > 0 creates/updates a watch task, while <= 0 disables it. Also simplify resource moving logic in ResourceProcessor by using direct mv operation.

* refactor(watch): remove deprecated get_watch_status functionality

remove get_watch_status method and related tests, update examples to use direct task access
update watch manager to use ConflictError for URI conflicts and include original_role in tasks
add validation for watch_interval requiring target URI

* fix(resource_service): validate watch interval before processing resource

Move watch interval validation earlier in the flow to fail fast when 'to' parameter is missing

* refactor(resource_processor): remove redundant temp_uri assignment
2026-03-18 15:16:14 +08:00
63b78a35ea fix(mcp): add api_key support and configurable defaults to MCP query server (#691)
* fix(mcp): add api_key support and configurable defaults to MCP query server

The MCP server at examples/mcp-query/server.py had three gaps:

1. No mechanism to pass API key for authenticated OpenViking deployments
2. No server-level default for search target_uri, requiring every client
   to specify the scope on each search call
3. Example URLs used "localhost" which fails on Windows where it resolves
   to ::1 while the server binds to 127.0.0.1

This adds --api-key/OV_API_KEY and --default-uri/OV_DEFAULT_URI CLI flags
with backward-compatible empty-string defaults, and fixes the epilog
examples to use 127.0.0.1.

Fixes #606

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

* fix(mcp): wire api_key to Recipe for LLM auth header

Override Recipe.api_key when --api-key / OV_API_KEY is provided,
so the Authorization header is sent on LLM requests.

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

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 11:55:11 +08:00
Qin Haojie ae35f46c75 Revert "feat(embedder): Gemini Embedding 2 multimodal support (text + image/video/audio/PDF) (#607)" (#703)
This reverts commit 95bd19797f.
2026-03-17 21:29:21 +08:00
chethanuk 95bd19797f feat(embedder): Gemini Embedding 2 multimodal support (text + image/video/audio/PDF) (#607)
* feat(embedder): Gemini Embedding 2 multimodal support (text + image/video/audio/PDF)

Native text + multimodal (image, video, audio, PDF) embedding via `gemini-embedding-2-preview` (google-genai 1.67.0). Additive provider pattern — Volcengine remains the default; Gemini is opt-in via `provider: "gemini"` in `ov.conf`.
    - **Model**: `gemini-embedding-2-preview`
    - **Input**: text, image, video, audio, PDF (17 MIME types)
    - **Output dimension**: 128–3072 (default: **3072**, recommended: 768 / 1536 / 3072)
    - **Input token limit**: **8,192 tokens**
    - **Supported MIME types**: `image/jpeg`, `image/png`, `image/gif`, `image/webp`, `audio/mpeg`, `audio/mp3`, `audio/wav`, `audio/ogg`, `audio/flac`, `video/mp4`, `video/mpeg`, `video/mov`, `video/avi`, `video/webm`, `video/wmv`, `video/3gpp`, `application/pdf`
- Gemini Embedding 2 Multimodal Support: Introduced a new GeminiDenseEmbedder to support native text and multimodal (image, video, audio, PDF) embedding using the gemini-embedding-2-preview model. This is an opt-in provider via configuration.
- Extended Queue Pipeline for Multimodal Content: The EmbeddingMsg now carries media_uri and media_mime_type to facilitate multimodal content processing. The TextEmbeddingHandler.on_dequeue() method was updated to read raw bytes from viking_fs and call embed_multimodal() when applicable.
- End-to-End Configuration and Security: The EmbeddingConfig now registers the 'gemini' provider with a task_type field. A critical security validation was added to ensure media_uri matches context_data['uri'] before file reads, preventing forged queue messages from accessing arbitrary files. If validation fails or multimodal embedding fails, it falls back to text embedding.
- Multimodal Content Representation: A new ModalContent dataclass was introduced to represent media references, including MIME type, URI, and optional raw data, enabling the Vectorize object to encapsulate both text and media for embedding

* feat: Add asynchronous batch embedding with concurrency control to Gemini embedder.

* Reduce scope to use GeminiDenseEmbedder as only text embed
2026-03-17 21:15:12 +08:00
LittleLory d8c0219dd4 Fix memcommit session resolution and legacy commit fallback (#697) 2026-03-17 17:55:58 +08:00
6c60a1d2fb fix(plugin): wrap auto-recall in withTimeout to prevent indefinite agent hang (#688)
The before_agent_start hook calls OpenViking's search API for auto-recall
before every agent run. The Promise.allSettled calls and subsequent
getClient() calls had no timeout protection - if the HTTP calls hang
(e.g. during initialization or after gateway restart), the entire agent
pipeline blocks indefinitely with no timeout, no error, and no fallback.

This wraps the auto-recall block with the existing withTimeout utility
using a 5-second timeout (AUTO_RECALL_TIMEOUT_MS). On timeout, a warning
is logged and the agent starts without memory context.

Fixes #673

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 15:51:14 +08:00
Yaoyao 0f28dc1659 Update INSTALL-ZH.md (#692)
修改md显示问题
2026-03-17 15:25:32 +08:00
5416c815f9 fix(memory-openviking): share pending clientPromise across dual-context registrations (#681)
OpenClaw loads the plugin in two separate contexts ([gateway] and [plugins]),
each calling register() and creating its own pending clientPromise. However,
start() only runs in one context, leaving the other context's promise permanently
pending — causing the before_agent_start hook to hang forever on await getClient().

Fix by introducing a module-level localClientPendingPromises map in client.ts.
All registrations share the same pending promise via this map. The first start()
call to run claims the entry (deletes it from the map) and spawns the process,
resolving the shared promise for all registrations. Subsequent start() calls fall
through to await getClient() which waits for the spawner to resolve. The stop()
service clears the map entry to prevent stale promises across hot-reloads.

Co-authored-by: Wiehan Boshoff <wiehanboshoff@Wiehans-Mac-mini.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 14:33:48 +08:00
Qin HaojieandClaude Opus 4.6 ded21cb432 feat(session): add used() endpoint and overhaul plugin install docs (#684)
Add POST /sessions/{session_id}/used API to record actually used
contexts and skills, enabling active_count tracking on commit.
Overhaul all plugin installation docs: simplify to npm global install,
add OpenClaw >= 2026.3.12 compatibility warning, expand troubleshooting
and configuration reference.

Co-Authored-By: Claude Opus 4.6
2026-03-17 14:17:50 +08:00
yangxinxin-7andClaude Sonnet 4.6 a8dfad048e feat(opencode): update plugin (#678)
* feat(opencode): update plugin

* fix(openviking-opencode): address PR review suggestions (v0.3.3)

- Extract toast helper into makeToast(client) to avoid duplication
- Align pip install command across README and SKILL.md
- Add missing newline at end of SKILL.md

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 13:53:28 +08:00
Yaoyao 06f2602891 Update INSTALL.md (#666)
update plugin's english version
2026-03-16 19:40:29 +08:00
Yaoyao 03cb099bf8 Update INSTALL-ZH.md (#663)
updated ECS openclaw +openviking version
2026-03-16 19:11:19 +08:00
ChenXiaofei e5abe88f04 feat(embedding): add Ollama provider support for local embedding (#644)
- Add 'ollama' as a supported embedding provider

- Ollama runs locally via OpenAI-compatible API, no API key required

- Allow OpenAI provider to work without api_key when api_base is set

  (supports local OpenAI-compatible servers like vLLM, LocalAI)

- Add configuration example and tests for Ollama provider

This enables fully local embedding deployment without cloud API keys.
2026-03-16 17:55:50 +08:00
zhoujiahui b280b56b30 feat(trace): add request-level trace metrics and API support (#640)
refactor: replace operation trace with telemetry

fix telemetry demo skill ingestion

simplify telemetry summary metric keys

rename remaining trace telemetry artifacts

feat: support configurable telemetry payloads

docs: rewrite operation telemetry design in chinese

fix: reject telemetry for async session commit

refactor: isolate telemetry orchestration

refactor: remove telemetry from find payloads

refactor: remove telemetry event payloads

fix(trace): keep only telemetry-related changes

fix(trace): remove top-level usage from telemetry responses

feat(console): default telemetry on proxied operations
2026-03-15 22:44:15 +08:00
yingriyanlongandMac afc15b5cf1 feat(openclaw-plugin): support multi-agent memory isolation via hook context agentId (#637)
When OpenClaw gateway serves multiple agents, each agent's
before_agent_start and agent_end hooks now carry the agent's ID
in the second parameter (PluginHookAgentContext). The plugin
dynamically switches the client's agentId before each recall/capture
operation, ensuring memories are routed to the correct agent_space
(md5(user_id + agent_id)[:12]).

Changes:
- client.ts: Add setAgentId()/getAgentId() to allow dynamic agent
  switching. Clears cached runtimeIdentity and resolvedSpaceByScope
  when switching to ensure correct space derivation.
- index.ts: Extract agentId from hook ctx (2nd param) in both
  before_agent_start and agent_end handlers.

This is backward compatible: if ctx.agentId is absent (single-agent
setup), the plugin falls back to the static config agentId as before.

Co-authored-by: Mac <mac@MacBookPro.lan>
2026-03-15 22:27:23 +08:00
Matt Van HornandMatt Van Horn 76932d3e95 fix(core): add separator to agent_space_name to prevent hash collisions (#609)
agent_space_name() computed md5(user_id + agent_id) without a separator,
so different (user_id, agent_id) pairs could produce the same hash when
their concatenation matched (e.g. ("alice","bot") vs ("aliceb","ot")).

Add ":" separator between user_id and agent_id in the hash input. The ":"
character is safe because the validation regex [a-zA-Z0-9_-] prevents
either field from containing it.

Fix applied to all three implementations:
- openviking_cli/session/user_id.py (Python SDK)
- bot/vikingbot/openviking_mount/ov_server.py (bot server)
- examples/openclaw-memory-plugin/client.ts (TypeScript example)

Note: This is a breaking change for existing agent spaces. Existing data
directories were named using the old hash and will not be found with the
new hash. A migration script or fallback lookup may be needed.

Fixes #595

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
2026-03-15 10:36:46 +08:00
LittleLory 6808588d6f Add attribution notice to OpenCode memory plugin example (#588) 2026-03-14 23:25:16 +08:00
Derek Zen 14f1d0fce2 Limit buffered OpenViking stderr output (#598) 2026-03-14 17:43:11 +08:00
李小默mo cae2c37c0a feat:Add OpenCode memory plugin example (#569)
* Add OpenCode memory plugin example

* Address OpenCode plugin review feedback

* Polish OpenCode plugin buffer and config handling
2026-03-13 17:24:50 +08:00
Qin HaojieandClaude Opus 4.6 7c8217b13b refactor(openclaw-memory-plugin): use openclaw CLI instead of direct JSON manipulation (#550)
Replace manual openclaw.json reading/writing with `openclaw plugins enable`
and `openclaw config set` commands across all three install scripts (sh, ps1, js).
This delegates config validation and merging to the CLI, reducing duplication
and avoiding potential conflicts with other plugins.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 16:58:55 +08:00
qin-ptr 2a9c706e09 Revert "Update install.sh (#545)" (#547)
This reverts commit 5f90fa6803.
2026-03-12 15:43:23 +08:00
qin-ptr 5f90fa6803 Update install.sh (#545) 2026-03-12 15:39:45 +08:00
Qin HaojieandClaude Opus 4.6 b505642528 feat(openclaw-memory-plugin): add default log configuration to install scripts (#541)
Add log section with WARNING level, file output, and 3-day rotation to the generated config across all install scripts (shell, PowerShell, and setup-helper CLI).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:02:52 +08:00
LinQiang391 03d6eefe11 refactor(setup-helper): replace cli.js with install.js, update repo defaults (#524)
- Replace cli.js with install.js; update bin aliases and repo URL to volcengine/OpenViking
- Bump version to 0.2.7; improve venv error message with actionable fix steps for Ubuntu
- Update INSTALL.md and INSTALL-ZH.md: add npm global install as recommended method

Made-with: Cursor
2026-03-11 20:36:06 +08:00
qin-ptr 1d305bb8ea fix install.sh (#517)
* Update config.ts

* Update process-manager.ts

* Refactor sed commands for existing load paths
2026-03-10 21:18:11 +08:00
Qin HaojieandClaude Opus 4.6 1b31130389 fix(openclaw-memory-plugin): add missing files to download list and merge config properly (#516)
Add tsconfig.json and new source files (client.ts, process-manager.ts,
memory-ranking.ts, text-utils.ts) to install scripts. Merge plugin load
paths and allow list instead of overwriting existing config. Adjust
default recallLimit to 6. Update uv.lock with resolved bot-full deps.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:09:55 +08:00
MaojiaShengandopenviking d35152e4ab docs: OpenViking Skills for search, add, operate (#510)
* fix: add log for embedder error

* fix: skills for add, search and operate server

* fix: skills for add, search and operate server

* fix: skills for add, search and operate server

* fix: skills for add, search and operate server

---------

Co-authored-by: openviking <openviking@example.com>
2026-03-10 17:42:34 +08:00
Qin HaojieandClaude Opus 4.6 18ecc8eef8 fix(openclaw-memory-plugin): improve port management and preserve existing config (#513)
Replace fail-on-port-occupied with smart port preparation that kills stale
OpenViking processes or auto-finds free ports. Simplify agent ID to default
to "default" instead of random per-session generation. Change install scripts
to merge into existing allow lists and load paths instead of overwriting them.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 17:17:09 +08:00
Soda-Wong 164c3edf97 Revert "refactor: remove agfs port configuration (#483)" (#498) 2026-03-09 21:57:00 +08:00
Qin Haojie 4fd6ff1020 refactor: remove agfs port configuration (#483) 2026-03-09 16:47:23 +08:00
zhoujiahui f7607408ce fix: fix ov.conf.example (#488) 2026-03-09 14:21:31 +08:00
qin-ptr 5e0efd33e8 fix: openclaw plugin local run (#480)
* Update config.ts

* Update process-manager.ts
2026-03-09 00:10:44 +08:00
qin-ptrandqin-ctx 4f32d3a8a7 [feat]: openclaw-memory-plugin: 全面改进内存插件功能 (#479)
* openclaw-memory-plugin: 改进内存插件功能

* Update README_CN.md

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-03-08 23:13:20 +08:00
LinQiang391 170d38b1ad openclaw-memory-plugin: ov.conf backend/agfs, default embedding 251215, remove agfs mode (install.sh/install.ps1/cli.js) (#460)
Made-with: Cursor
2026-03-06 15:01:36 +08:00
AutoCoder 226db50da1 Enhance OpenViking Status Checks in the OpenClaw Plugin (#453) 2026-03-05 23:27:58 +08:00
AutoCoder 49320bfa4c OpenViking Plugin Exception Handling & Fixing (#449) 2026-03-05 22:19:43 +08:00
LinQiang391 656f483a0e fix(install): PEP 668/venv/get-pip, plugin UX, OPENVIKING_ALLOW_BREAK_SYSTEM_PACKAGES opt-in, configPath absolute (#426)
- install.sh: PEP 668 and no-pip detection; venv (ensurepip / venv --without-pip + get-pip.py / virtualenv); reuse existing venv; plugin download retry and progress; OPENVIKING_ALLOW_BREAK_SYSTEM_PACKAGES opt-in; configPath as OPENVIKING_DIR/ov.conf (absolute)
- install.ps1: configPath absolute (Join-Path OpenVikingDir ov.conf)
- setup-helper/cli.js: configPath absolute (join OPENVIKING_DIR ov.conf)
- INSTALL*.md: FAQ for externally-managed-environment and venv/pipx
2026-03-05 14:34:55 +08:00
MaojiaShengandopenviking c4209da6cc chore: downgrade golang version limit, update vlm version to seed 2.0 (#425)
* feat: define a system path for future deployment

* feat: define a system path for future deployment

* fix: golang downgrade to 1.19

* fix: golang downgrade to 1.19, and change doc

* docs: change model recommendation

* fix: golang downgrade to 1.19, and change doc

* fix: mv test files

* fix: loguru

---------

Co-authored-by: openviking <openviking@example.com>
2026-03-05 14:34:02 +08:00
MaojiaSheng 079efd1177 docs: pip upgrade suggestion (#418) 2026-03-04 20:48:32 +08:00
LinQiang391 bb6087a96a 支持通过curl方式安装部署openclaw+openviking插件 (#415)
* 添加openclaw-openviking-plugin插件安装方式

* feat(openclaw-memory-plugin): add cross-platform one-click installers and docs

Made-with: Cursor
2026-03-04 19:11:27 +08:00
Qin HaojieandClaude Opus 4.6 7ac5ffbbfa fix: Session.add_message() support parts parameter (#397) (#399)
Session wrapper and OVClient example only accepted string content,
missing the parts parameter (TextPart, ContextPart, ToolPart) that
the underlying BaseClient already supports.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 20:27:45 +08:00
MaojiaShengandopenviking ab849f44f2 docs: use openviking-server to launch server (#398)
* feat: support glob -n and cmd echo

* feat: server launch commands

---------

Co-authored-by: openviking <openviking@example.com>
2026-03-03 18:37:05 +08:00
Starflake d011841b3f fix: normalize OpenViking memory target paths (#373) 2026-03-02 11:34:07 +08:00
MaojiaShengandopenviking 41f80495af chore: remove unsupported examples (#359)
* feat: update README.md

* chore: remove unsupported examples

---------

Co-authored-by: openviking <openviking@example.com>
2026-02-28 18:45:06 +08:00
Qin HaojieandClaude Opus 4.6 a2d35cd264 docs: 修复 openviking serve 命令引用并更新贡献文档 (#357)
openviking 入口已改为 Rust CLI,裸命令 `openviking serve` 不再可用,
将示例中的引用统一更新为 `openviking-server`。同时补充 CONTRIBUTING
文档中缺失的 Rust CLI 编译说明、修正测试示例和项目结构。

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 18:00:07 +08:00
yangxinxin-7 c02b4e8b1a eat(opencode): add opencode plugin and update docs (#351) 2026-02-28 17:58:56 +08:00
LinQiang391 62c77a03e4 添加openclaw-openviking-plugin插件安装方式 (#307) 2026-02-27 21:34:13 +08:00
yangxinxin-7 fac6068b26 feat(parse): add AST-based code skeleton extraction mode (#334) 2026-02-27 20:03:34 +08:00
Eric Shaw c85acbb1b1 feat: Enhance add-resource functionality in cli and add unit tests (#323)
* tests(parsers): add unit tests for office extensions within add_resource directory

* feat: enhance add-resource functionality with new options

- Updated CLI commands to support additional parameters: --ignore-dirs, --include, --exclude, and --no-directly-upload-media.
- Modified resource processing to handle new parameters for directory scanning and file inclusion/exclusion.
- Improved README documentation for CLI usage and examples.

This update allows for more flexible resource management and better control over file uploads.

* feat(cli): enhance add-resource command with new options

- Added support for additional parameters: --no-strict, --ignore-dirs, --include, --exclude, and --no-directly-upload-media.
- Updated the handling of resource addition to accommodate new options for improved directory scanning and file management.
- Enhanced README documentation with examples for the new functionality.

This update provides users with greater flexibility in managing resources.

* chore(cli): remove unused cargo feature for edition 2024 in Cargo.toml

* chore(pyproject): update tag_regex in setuptools_scm configuration for version parsing
2026-02-27 11:36:28 +08:00
Qin HaojieandClaude Opus 4.6 048c201b73 feat(docs,ci): 完善云上部署文档与 Docker CI 流程 (#320)
- release workflow 新增 Docker 镜像构建推送至 GHCR
- 重写 examples/cloud/GUIDE.md 云上部署指南,补充架构概览、systemd/Docker/Helm 三种部署方式、多租户管理、FAQ 等章节
- ov.conf.example 占位符改为 <your-xxx> 格式,移除 rerank 配置
- 中英文部署文档(docs/zh|en/guides/03-deployment.md)对齐:Docker 改用 GHCR 预构建镜像,Kubernetes 改用 Helm chart,并引用 GUIDE.md

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 08:47:22 +08:00