* 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
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>
* 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>
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.
* 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>
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>
* 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>
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>