Commit Graph
62 Commits
Author SHA1 Message Date
agent 00f3738edb feat(usage): emit resource-scoped experience usage records (#3921)
* feat(usage): expand experience tracking and log schema

* fix(usage): preserve experience count event names

* refactor(agent-evolution): use generic OpenViking tools

* fix(usage): capture generic OpenViking tool events

* feat(skills): guide cross-agent experience retrieval

* fix(usage): address generic tool migration review
2026-08-11 22:20:18 +08:00
agent 61c42e3bb0 feat(openclaw): add experience memory tools (#3827) 2026-08-06 15:52:31 +08:00
Qin Haojie b27e326e4d fix(openclaw): restore peer_role routing (#3252)
* fix(openclaw): restore peer_role routing

The plugin refactor stopped applying peer_role to message attribution and data-plane actor headers, causing assistant mode to tag user messages and route every request as the agent. Restore role-aware routing across context and tool flows.

* fix(openclaw): close peer routing isolation gaps

* fix(openclaw): separate message peers from actor scope
2026-07-15 17:39:13 +08:00
Mingjian Que d9e40b0974 refactor(openclaw): add setup and routing modules (#2654)
* refactor(openclaw): add setup and routing modules

* docs(openclaw): align docs and healthcheck with peer routing

* refactor(openclaw): wire modular runtime into core

* fix(openclaw): package plugin runtime directory
2026-06-17 10:26:23 +08:00
Mingjian Que 2d130feb62 test(openclaw): cover install contracts and runtime docs (#2647)
* test(openclaw): cover package install contract

* refactor(openclaw): extract query result formatters

* docs(openclaw): document runtime RPC and install contracts

* docs(openclaw): complete websocket rpc API reference
2026-06-16 22:15:01 +08:00
Mingjian Que 740b7fcbe7 feat(openclaw): add runtime query config (#2646) 2026-06-16 20:47:47 +08:00
Mingjian Que 3727d4bb62 feat(openclaw): enhance recall trace HTTP routes (#2645) 2026-06-16 20:07:56 +08:00
Mingjian Que 06c4fc10ef feat(openclaw): add feature gates RPC (#2642) 2026-06-16 19:13:53 +08:00
Qin HaojieandMijamind719 8353976bc8 feat(plugins): use actor peer scope (#2595)
* feat(plugins): use actor peer scope

* docs(openclaw): clarify actor peer recall scope

---------

Co-authored-by: Mijamind719 <mijamind@163.com>
2026-06-14 10:15:27 +08:00
Mingjian Que 564c7624b8 feat(openclaw): configure recall target types (#2590)
* feat(openclaw): configure recall target types

* fix(openclaw): align recall session target uri

* fix(openclaw): remove session semantic recall target
2026-06-13 11:22:08 +08:00
Mingjian Que d497b05aee feat(openclaw): wire recall trace runtime (#2589)
* feat(openclaw): wire recall trace runtime

* feat(openclaw): expose recall trace gateway routes

* feat(openclaw): align archive recall trace details

* test(openclaw): cover auto recall trace recording

* fix(openclaw): avoid duplicate memory recall search
2026-06-13 11:05:33 +08:00
Mingjian Que 61203e84b2 feat(openclaw): gate agent-visible tools (#2566) 2026-06-12 14:48:21 +08:00
marchpureandhaoxingjun 2dbee8e33d add OpenViking read tools to OpenClaw plugin (#2551)
* add ov_list tool to openclaw plugin

* declare ov_list in OpenClaw plugin manifest

* add OpenViking read tools to OpenClaw plugin

---------

Co-authored-by: haoxingjun <haoxingjun@bytedance.com>
2026-06-11 23:51:47 +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
Qin Haojie a6fc0424bc fix(session): apply memory type policy whitelist (#2530)
* fix(session): apply memory type policy whitelist

Restore top-level memory_types filtering for session memory extraction and validate it against enabled registry schemas. Ensure initialization and peer-aware smoke coverage honor the whitelist.

* fix(session): scope session skills to execution memory policy

* refactor(session): remove per-commit memory policy
2026-06-10 14:54:24 +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
Mingjian Que e42dd12741 docs(openclaw): document explicit memory writes (#2323) 2026-06-01 16:58:41 +08:00
EurakaxunandEurekaxun ab855a43b0 fix: add cjk-aware token estimation (#2348)
Co-authored-by: Eurekaxun <eurekaxun@163.com>
2026-06-01 14:12:27 +08:00
Mingjian Que edb82d56fd fix(openclaw-plugin): report memory_store zero extraction (#2307) 2026-05-29 19:46:51 +08:00
AutoCoder 1d631cd38d Rename search tool to ov_search to avoid conflict with existing OpenClaw tool name (#2235) 2026-05-26 11:58:15 +08:00
HaotianChen616 f39b030926 feat: externalize oversized session tool results (#2058)
Squashed commits:

- 28e175c8 feat: externalize oversized session tool results
- 73d6461d feat: coalesce OpenClaw tool results by turn
- 3bf4a0c2 fix: apply tool result config and filtered listing
- a5bc0582 [bugfix] extractNewTurnMessages会错误过滤掉没有text block的assistant toolCall,用[toolCall: toolName]占位符确保消息传入
- 1d76827b style: format tool result compression changes
- 495b5623 fix: preserve textless toolUse turns
- 399f2dc3 feat: expose tool result access tools
- 43b48dd7 fix: honor min preview chars for source reads
- 6eaaf54f fix: split aggregated tool result messages
- f8ad98c3 fix: hydrate tool outputs for extraction
- f9031458 fix: improve tool descriptions for tool result access tools
- ae3bcd33 fix: hydrate source-read tool outputs
- 8976f8ce test: add tool result compression bench cases
2026-05-21 14:36:10 +08:00
AutoCoderandCodex 15e5284062 fix(openclaw): read L2 content in memory recall (#2002)
Co-authored-by: Codex <codex@example.com>
2026-05-13 15:06:27 +08:00
Mingjian QueandGPT-5.5 0073ce7e05 fix(openclaw): split OpenViking import tools (#1946)
Replace the ambiguous OpenClaw ov_import surface with explicit add_resource and add_skill tools and slash commands.

Guide media attachment imports through the existing OpenViking temp-upload and resource import APIs instead of invented upload endpoints.

Update docs, plugin manifest, and unit coverage for the split import commands.

Co-authored-by: GPT-5.5 <noreply@openai.com>
2026-05-10 15:51:32 +08:00
LinQiang391andLinQiang391 72a3cd29f0 feat(openclaw-plugin): support OpenClaw install and ClawHub release flow (#1904)
Squashes OpenClaw plugin install compatibility, setup helper source-build support, built dist output, and ClawHub release workflow updates into one publish commit.

Co-authored-by: LinQiang391 <linqiang391@users.noreply.github.com>
2026-05-08 17:38:04 +08:00
a5649a4d20 chore(agent-tools): converge MCP tool names (#1851)
* chore(agent-tools): converge MCP tool names

Rename model-visible explicit memory tools without adding a new agent HTTP API or changing existing CLI behavior.

Keep OV server /mcp store renamed to remember while preserving its existing session write and commit implementation.

Rename Codex MCP openviking_store to remember and keep its original session create/message/commit/cleanup flow; leave OpenClaw memory_store and ov add-memory unchanged.

Co-authored-by: GPT-5.5 <noreply@openai.com>

* refactor(agent-tools): align MCP and search tool names

Apply the search-tool alignment patch across Codex MCP, OpenClaw, OV MCP docs, and focused tests.

Co-authored-by: wlff123 <wulf234@163.com>

Co-authored-by: GPT-5.5 <noreply@openai.com>

---------

Co-authored-by: GPT-5.5 <noreply@openai.com>
2026-05-08 10:50:20 +08:00
Mingjian Que 3ebbb5baaa fix(openclaw): support capability contracts on 5.2 (#1866)
OpenClaw 5.2 gates non-bundled plugin capabilities from the manifest before relying on runtime registration. The previous OpenViking manifest only identified the plugin as kind=context-engine, so 5.2 could classify it as non-capability, emit diagnostics for agent tools registered without contracts.tools, and leave real gateway/agent runs falling back from the openviking context engine even when inspect loaded it manually.

Declare startup/capability activation and the tool contract list so the plugin is loaded as a plain capability plugin and its registered tools match manifest contracts. Register the ov_archive_expand factory tool with an explicit name so it can be matched to contracts.tools.

Drop the agent_end hook registration because 5.2 blocks that typed hook for non-bundled plugins without conversation access, and this plugin already records agent routing through session_start/session_end.

Harden the memory-chain e2e to find only the current run's OpenViking session, assert the unique marker is persisted, and exit non-zero on assertion failures.
2026-05-06 16:50:53 +08:00
Eurakaxunandwlff123 51342319b4 Introduce Working Memory v2: 7-section session memory, anti-bloat guards, sliding-window tokens, and OpenClaw integration (#1782)
* feat(wm): WM v2 core - 7-section structure, pending_tokens, anti-bloat guard

Server-side implementation of Working Memory v2:

- 7-section structured WM format with section integrity guards

- pending_tokens sliding window for live session tracking (O(1) read)

- Anti-bloat Key Facts guard (dedup, capping, consolidation sentinel)

- Regex recovery fallback for malformed LLM WM output

- commitKeepRecentCount: keep recent messages live after commit

- WM v2 prompt templates (ov_wm_v2.yaml, ov_wm_v2_update.yaml)

- CommitRequest model with keep_recent_count parameter

* fix(wm): address 4 code review findings

- Replace hardcoded debug log path with configurable workspace path

- Add _rebuild_pending_tokens() after _update_message_in_jsonl()

- Detect WM v2 format via _is_wm_v2 to route legacy sessions to creation path

- Pass latest_archive_overview to creation template for legacy-aware bootstrapping

* test(wm): add unit tests for WM v2 guards, growth, and merge guardrails

- 62 tests for section guards, regex recovery, pending_tokens, merge logic

- 6 tests for anti-bloat growth behavior (dedup, capping, consolidation)

- 3 tests for dynamic reminders, key facts consolidation, and URL pruning guard

* feat(plugin): WM v2 plugin integration + ov_archive_search tool

- Add ov_archive_search tool for keyword-grep across session archives

- Add grepSessionArchives() client method for /api/v1/search/grep endpoint

- Rewrite system prompt to describe WM v2 structured sections

- Simplify archive index assembly (remove preAbstracts/budget processing)

- Add keepRecentCount to commitSession calls (afterTurn=cfg, compact=0)

- Add commitKeepRecentCount to plugin config schema

* fix(wm): post-feature refinements for WM v2

- Replace _wm_debug file logging with logger.debug
- Defensive clamps for pending_tokens / keep_recent_count
- Include tool/context parts in WM generation formatting
- Limit Open Issues anti-drift restore to one round (allow stale resolution)
- Resolve commitSession merge conflict in plugin
- Edge case tests + plugin tests update

* fix(wm): restore Phase 2 request tracking, archive_uri, and agentId

* docs(wm): add WM v2 design overview

---------

Co-authored-by: wlff123 <wlff123@users.noreply.github.com>
2026-05-02 22:09:59 +08:00
AutoCoder 4d6f5b65bd fix(openclaw): route auto recall through assemble (#1835) 2026-05-01 16:39:32 +08:00
x__dot 17cfaac87c fix(openclaw-plugin): unify session and agent-prefix routing across compact, commit, and tools (#1832)
* fix(openclaw): align compact session id and agent prefix routing

* fix(openclaw-plugin): align compact session id and agent prefix routing
2026-05-01 13:49:16 +08:00
bot-of-qin-ctxandqin-ctx 9c08d716ca fix(openclaw): treat agent_prefix as prefix only (#1809)
* fix(openclaw): treat agent_prefix as prefix only

* fix(openclaw): treat agent_prefix as prefix only

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-04-29 22:42:56 +08:00
Qin Haojie 08dcfc10ac fix(openclaw-plugin): stop synthesizing tenant headers (#1789) 2026-04-29 11:49:37 +08:00
LinQiang391 dac750e144 refactor(openclaw-plugin): remove local mode and rename agentId to agent_prefix (#1783)
Made-with: Cursor
2026-04-28 22:42:49 +08:00
Eurakaxun 16c0bfe76f fix(openclaw-plugin): use character budget for auto recall (#1740) 2026-04-28 18:57:25 +08:00
Eurakaxun 299166c928 adjust default value for recallTokenBudget and recallMaxContentChars. (#1617) 2026-04-22 11:47:59 +08:00
x__dotandjohnny ef2513c3e7 feat(openclaw-plugin): align auth, namespace, and role id handling (#1606)
* feat(plugin): multi-tenant identity, agent scope mode, and resource recall

Made-with: Cursor

* fix(openclaw-plugin): avoid default tenant fallback

* feat(openclaw-plugin): add server auth mode handling

* feat(openclaw-plugin): add server auth mode and canonical namespace config

* feat(openclaw-plugin): propagate sender role id in session writes

* test(openclaw-plugin): add multi-tenant coverage and Chinese report

* docs(openclaw-plugin): update Chinese multi-tenant docs

* fix(openclaw-plugin): align default namespace policy and shared role id logic

* test(auth): drop unintended test_auth changes from plugin PR

* fix(openclaw-plugin): preserve tenant headers for api key root flows

---------

Co-authored-by: johnny <1667704220@qq.com>
2026-04-21 16:02:06 +08:00
LinQiang391 09bb76cf61 feat: add ClawHub publishing, setup wizard, and OPENCLAW_STATE_DIR support (#1587)
Made-with: Cursor
2026-04-21 11:27:46 +08:00
AutoCoder 98b47904ee Remove ingestReplyAssist feature and all related config, logic, and tests (#1564)
Made-with: Cursor
2026-04-18 14:02:16 +08:00
AutoCoderandlin-qiang123 edad6ea659 fix(plugin): sanitize prompt fallback in before_prompt_build to prevent query pollution (#1472)
The prompt fallback path bypassed sanitizeUserTextForCapture, allowing
Sender metadata blocks and timestamps to be sent as search queries to
the OpenViking API, causing irrelevant memories to rank highly.

Made-with: Cursor

Co-authored-by: lin-qiang123 <1667704220@qq.com>
2026-04-15 16:29:12 +08:00
chenjwandClaude Opus 4.6 c430b97493 Fix/openclaw addmsg (#1391)
* fix(ragfs): localfs write should respect WriteFlag to truncate file

The localfs write implementation was ignoring the WriteFlag parameter and
not truncating the file when WriteFlag::Create or WriteFlag::Truncate was
specified. This caused files to be appended instead of overwritten when
writing empty content.

Root cause: The _flags parameter was declared but never used. When opening
an existing file, .truncate(true) was not called.

Fix: Use OpenOptions::new().truncate(should_truncate) based on the flags.

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

* fix(session): clear messages.jsonl after commit and improve memory extraction

- Add workaround to delete messages.jsonl before writing to work around
  RAGFS localfs not truncating files (now fixed in ragfs)
- Add _get_latest_archive_last_msg_time to filter messages for memory
  extraction by timestamp
- Fix memory extraction to only process new messages after last archive

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

* update

* fix(openclaw): add HEARTBEAT filtering in sanitizeUserTextForCapture

过滤 HEARTBEAT 健康检查消息,避免 HEARTBEAT.md 和 HEARTBEAT_OK
进入 session 存档。

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

* revert: restore logger.warn instead of warnOrInfo

Reverting to use logger.warn directly. The warnOrInfo wrapper was
unnecessary as logger always has warn method.

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

* chore(session): remove RAGFS truncate workaround

The ragfs localfs write now respects WriteFlag to truncate files,
so the workaround to delete messages.jsonl before writing is no
longer needed.

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

* refactor(openclaw): unify addSessionMessage with parts API

- Remove old addSessionMessage (string content)
- Keep addSessionMessage but accept parts array
- Update index.ts and context-engine.ts to use new format
- Update tests to check parts structure

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

* fix(openclaw): use optional chaining for logger.warn

TypeScript strict mode requires handling possibly undefined warn method.

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

* feat(openclaw): log trace_id from commit results

Add trace_id to CommitSessionResult type and log it for all
commitSession calls (afterTurn, commitOVSession, compact).

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

* fix(openclaw): add tool_input to tool parts

- Add toolInput field to ExtractedMessage type
- Extract tool_input from msg.toolInput in extractNewTurnMessages
- Pass tool_input when constructing tool parts for addSessionMessage

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

* fix(openclaw): lookup toolInput from preceding toolUse messages

When extracting toolResult messages, look up the corresponding toolInput
from the preceding assistant messages' toolUse blocks using toolCallId/
toolUseId as the key.

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

* fix(openclaw): add more field name variations for toolInput/toolCallId

Support additional field names: arguments, toolInput, tool_call_id

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

* fix(openclaw): lookup toolInput from preceding toolCall messages

- Scan all messages to find toolCall/toolUse/tool_call blocks
- Extract tool input from arguments/input/toolInput fields
- Match toolResult with toolCall using toolCallId/toolUseId

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 14:03:04 +08:00
x__dot 23f0775ab5 feat(openclaw-plugin): add unified ov_import and ov_search (#1369) 2026-04-12 22:16:22 +08:00
Qin Haojie ba49d4ca0f fix(openclaw): sanitize and cap recall queries (#1297)
Recall should use cleaned user text and avoid sending oversized prompts
to retrieval. Add unit coverage for sanitization and truncation behavior.
2026-04-08 15:26:47 +08:00
Mingjian QueandGPT-5.4 7bcdb85647 feat(openclaw-plugin): add bypass session patterns (#1194)
Co-authored-by: GPT-5.4 <noreply@openai.com>
2026-04-03 10:30:18 +08:00
AutoCoder 2e7d223abd Handle OpenViking outages without blocking OpenClaw (#1158) 2026-04-01 20:16:05 +08:00
Mingjian QueandGPT-5.4 27f61889bf feat(openclaw-plugin): add session-pattern guard for ingest reply assist (#1136)
Co-authored-by: GPT-5.4 <noreply@openai.com>
2026-03-31 22:27:07 +08:00
AutoCoder c1bd446601 Fix HTTPX recognition issue with SOCKS5 proxy causing OpenViking crash (#1118)
original pr: https://github.com/volcengine/OpenViking/pull/957/changes
Author: wushijian
2026-03-31 15:54:39 +08:00
bot-of-qin-ctx 303cf40955 Revert "feat(examples): mark recalled memories as used (#1079)" (#1090)
This reverts commit 7122c3c7f7.
2026-03-30 16:49:46 +08:00
Brian Le 7122c3c7f7 feat(examples): mark recalled memories as used (#1079) 2026-03-30 11:24:57 +08:00
evaldassandEvaldas 2e8f394d0d fix(openclaw-plugin): remove duplicate const sessionId declaration in ov_archive_expand (#1059)
Line 722 re-declared `const sessionId = ctx.sessionId ?? ""` which was
already declared on line 711 within the same execute() scope. This
caused a ParseError at plugin load time:

    Identifier 'sessionId' has already been declared.
    /home/.../.openclaw/extensions/openviking/index.ts:722:14

Removed the duplicate declaration so the existing sessionId from
line 711 is reused.

Co-authored-by: Evaldas <evaldas@openclaw.ai>
2026-03-29 12:27:59 +08:00
LinQiang391 df632107f5 feat(openclaw-plugin): align agent routing and reduce default log noise; fix(system/status): align resolved user id (#1054) 2026-03-28 19:32:50 +08:00
Eurakaxun 64417f16af fix(openclaw-plugin): add defensive re-spawn for OpenViking subprocess after Gateway restart (#1053) 2026-03-28 18:34:34 +08:00