Drop dead exports/helpers with no callers (sysEnv, waitForHealth, estimateTokens, etc.) and remove redundant conditions and stale comments.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Propagate toolCallId through the pipeline and reconstruct
toolUse+toolResult pairs from user-role tool parts stored in OV.
Add mergeConsecutiveAssistants to handle adjacent assistant messages.
Made-with: Cursor
* 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>
* feat(openclaw-context-plugin): migrate OpenViking memory plugin to context engine
1. Rename the OpenClaw plugin from memory-openviking to openclaw-context-plugin and switch its kind from memory to context-engine.
2. Keep auto-recall and ingest-reply-assist on before_prompt_build to preserve the existing prompt injection behavior.
3. Move the canonical auto-capture flow from the old agent_end-style lifecycle to ContextEngine afterTurn.
4. Delegate compact handling to the legacy compact engine when it is available, so existing compaction behavior can still be reused.
5. Preserve the OpenViking tools and local process management while updating setup helpers, installers, docs, and OpenClaw config paths to plugins.slots.contextEngine.
Co-authored-by: GPT-5.4 <noreply@openai.com>
* refactor(openclaw-context-plugin): rename plugin id to context-openviking
- rename the runtime plugin id, package name, install destination, and OpenClaw config keys from openclaw-context-plugin to context-openviking
- keep the source directory at examples/openclaw-context-plugin unchanged while updating docs, installers, and setup helpers to use the new runtime name
- remove unused sys imports from the demo scripts so ruff check stays green
---------
Co-authored-by: GPT-5.4 <noreply@openai.com>