Commit Graph
41 Commits
Author SHA1 Message Date
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
LinQiang391andLinQiang391 7fa34c9520 fix(session): make failed archives skippable and tune OpenClaw auto-commit (#2775)
Treat failed session archives as terminal skipped state so later commits can continue, and replace OpenClaw's fixed auto-commit token threshold with a context-window ratio while tolerating the deprecated config key.

Co-authored-by: LinQiang391 <linqiang391@users.noreply.github.com>
2026-06-23 12:00:29 +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 740b7fcbe7 feat(openclaw): add runtime query config (#2646) 2026-06-16 20:47:47 +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 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
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
Mingjian Que 5854dbfdc2 Restrict auto recall to transformContext assemble (#2532) 2026-06-10 14:08:10 +08:00
Mingjian Que 790daaf885 feat(openclaw): inject agent experience memories (#2281) 2026-06-10 10:43:41 +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
EurakaxunandEurekaxun ab855a43b0 fix: add cjk-aware token estimation (#2348)
Co-authored-by: Eurekaxun <eurekaxun@163.com>
2026-06-01 14:12:27 +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
AutoCoderandClaude Sonnet 4.6 5271baff1b chore(openclaw-plugin): remove unused code and redundant guards (#2050)
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>
2026-05-14 19:19:26 +08:00
Eurakaxun 5b3c68c559 fix(openclaw-plugin): merge consecutive user turns (#1724) (#1858) 2026-05-06 09:35:38 +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
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
lililiandMoss 6c76318013 fix(plugin): 修复 OpenClaw 工具调用消息格式不兼容导致的 toolResult 孤儿错误 (#1632)
* fix(plugin): canonicalize tool message format for OpenClaw Responses API

The OpenClaw Responses API replay path only recognizes `toolCall` blocks
(with `arguments` field), but the OpenViking context engine plugin was
emitting `toolUse` blocks (with `input` field) from its assembled context.
This mismatch caused `toolResult` orphan errors on subsequent turns after
tool use.

Changes:
- convertToAgentMessages: emit toolCall+arguments instead of
  toolUse+input, matching the OpenClaw canonical format
- Add canonicalizeAgentMessages() to normalize legacy/variant block
  formats (toolUse, functionCall, tool_call) into toolCall before
  sanitizeToolUseResultPairing
- Add canonicalizeAssistantBlock() for per-block normalization with
  id/name/arguments field mapping
- messageDigest: update type guard from toolUse to toolCall

This preserves backward compatibility on input (old toolUse blocks are
still accepted and normalized) while ensuring output always matches the
current OpenClaw Responses API contract.

* fix(plugin): address review feedback on PR #1632

- Remove 'unknown' fallback for toolResult.toolName in canonicalizeAgentMessages();
  preserve undefined to let downstream normalizeToolResultName() backfill from paired toolCall
- Remove 'unknown' fallback for tool_name in convertToAgentMessages() structured path;
  only set toolName on toolResult when the value exists
- Only include toolName on toolResult when present (not always)
- Update test expectations: toolUse → toolCall, input → arguments
- Update README/README_CN: describe canonical output format with backward-compat note

---------

Co-authored-by: Moss <moss@openclaw.ai>
2026-04-22 18:22:28 +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
e5ceb130b0 fix(context-engine): drop tool-only non-assistant messages instead of emitting empty content (#1512)
When a stored message has only tool-type parts and no text parts, the
else-branch of convertToAgentMessages was pushing { role, content: "" }.
Strict providers (ZAI/GLM) reject requests containing empty-content
messages with 400. Fix: skip the push when texts is empty; preserve any
collected toolResults. Adds a regression test covering the issue-1485
scenario.

Fixes #1485

Co-authored-by: yeyitech <yeyitech@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Codex <codex@local.invalid>
2026-04-18 00:11:00 +08:00
Mingjian Que 00cd0e9422 fix(openclaw-plugin): enforce assemble token budgets (#1511) 2026-04-17 11:36:57 +08:00
AutoCoder d07b733b59 fix(plugin): restore structured tool round-trip in assemble (#1482)
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
2026-04-16 16:06:27 +08:00
AutoCoder 6e8b642464 refactor: assemble context partitioning (Instruction/Archive/Session/Reserved) (#1446)
Extract flat message assembly into 4-layer partition architecture as foundation for progressive compression (L1-L5). Add allocateContextBudget with Archive 15%/8K cap, Session as remainder, Reserved 15%/20K floor. Add buildArchiveMemory with over-budget trim protection. Switch estimatedTokens from backend value to client-side roughEstimate. Enhance diag with partition-level metrics.

Made-with: Cursor
2026-04-14 21:04:40 +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
yeyitechandyeyitech 054c998971 fix(openclaw-plugin): extend phase2 commit wait timeout (#1415)
Co-authored-by: yeyitech <yeyitech@users.noreply.github.com>
2026-04-14 11:43:26 +08:00
AutoCoder 68e4d895d6 afterTurn: store messages with actual roles and skip heartbeat messages (#1340) 2026-04-10 01:21:25 +08:00
AutoCoder ed78b5feff add create time in add_message (#1288) 2026-04-08 10:12:37 +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
Qin Haojie c0b0be4f4c fix(session): align async commit API docs and examples (#1188)
Update docs, tests, and example integrations to reflect accepted + task_id
session commits with task polling for completed results.

Also fix the local PR-Agent model provider prefix in .pr_agent.toml.
2026-04-02 21:09:01 +08:00
AutoCoder 2e7d223abd Handle OpenViking outages without blocking OpenClaw (#1158) 2026-04-01 20:16:05 +08:00
Qin Haojie 0502a9903d fix(session): fold latest archive into abstract list (#1104)
Return the latest archive through pre_archive_abstracts and drop the
separate latest_archive_id field so session context consumers only need
one archive index path.
2026-03-31 15:06:21 +08:00
x__dot 21bb8e9bcb fix(openclaw-plugin): fix compact result mapping (#1058)
* fix(openclaw-plugin): fix compact result mapping

* fix(openclaw-plugin): align compact result fields

* fix(openclaw-plugin): mark unknown tokensBefore as -1
2026-03-29 09:41:00 +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
6d26e7a4fa refactor(openclaw-plugin): Unified session APIs and refactored the OpenClaw context pipeline for more consistent behavior, better maintainability, and stronger test coverage. (#1040)
* feat(openclaw-plugin): unify context assembly and compaction workflows

Co-authored-by: wlff123 <wulf234@163.com>
Co-authored-by: Eurekaxun <eurekaxun@163.com>
Co-authored-by: lin-qiang123 <1667704220@qq.com>
Co-authored-by: jcp0578 <jcp0578@gmail.com>

* feat(openviking-server): unify session context and commit APIs

Authored-by: Qin Haojie <qinhaojie.exe@bytedance.com>

* set default value of DEFAULT_EMIT_STANDARD_DIAGNOSTICS to false

---------

Co-authored-by: Eurekaxun <eurekaxun@163.com>
Co-authored-by: lin-qiang123 <1667704220@qq.com>
Co-authored-by: jcp0578 <jcp0578@gmail.com>
Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-03-28 10:41:03 +08:00
x__dot f5dd276714 fix(openclaw-plugin): use plugin-sdk exports for compaction delegation (fixes #833) openclaw ≥ v2026.3.22 (#1000)
* 增加过程错误信息

* fix(openclaw-plugin): delegate compaction via plugin-sdk exports
2026-03-27 09:03:08 +08:00
Qin Haojie 7b2b910082 fix(openclaw-plugin): sanitize mapped OpenViking session ids (#998)
Map OpenClaw session keys to stable filesystem-safe OpenViking session ids so auto-capture and memory commits work on Windows.
2026-03-26 17:00:38 +08:00
Qin Haojie d8858afad6 Revert "feat(openclaw-plugin): add archive-aware context assembly and async s…" (#953)
This reverts commit 08b278da81.
2026-03-25 11:35:20 +08:00
08b278da81 feat(openclaw-plugin): add archive-aware context assembly and async session commit (#938)
* feat(session): make commit two-phase with async memory extraction

Session commit now returns immediately after archiving messages (Phase 1).
Summary generation and memory extraction (Phase 2) run in the background
via asyncio.create_task(), returning a task_id for polling progress.

- Add get_task() API across all client layers for querying background task status
- get_session() auto-creates session if it does not exist
- Remove wait parameter and telemetry from commit endpoint
- Add .done completion marker to archive directories
- Update docs (EN/ZH) and tests for new two-phase flow

* feat(session): add .meta.json persistence and auto_create control for get_session

SessionService.get() now defaults to auto_create=False, raising NotFoundError
for missing sessions. A new SessionMeta dataclass tracks created_at, updated_at,
message_count, commit_count, memories_extracted (by category), last_commit_at,
and cumulative llm_token_usage. Meta is persisted to .meta.json and updated on
add_message, commit Phase 1 (message clear), and commit Phase 2 completion
(token usage, memory counts via bind_telemetry). All client layers
(local/async/sync/HTTP) and API docs updated accordingly.

* fix: remove session vectorize

* support commit for openclaw-plugin

Made-with: Cursor

* feat(openclaw-plugin): archive-aware context assembler with lazy-read optimization

- Implement get_context_for_assemble with token-budget-aware archive trimming
- Write .meta.json during commit for pre-stored token counts
- Lazy-read archives from newest to oldest, skip old archives when budget exhausted
- Backward-compatible: fall back to reading overview for old archives without .meta.json
- Pass agentId through getContextForAssemble in client.ts
- Use sessionKey from OpenClaw in assemble to match afterTurn session resolution
- Emit non-error toolResult for pending/running tools instead of synthetic error
- Log warning and mark stats on ls(history) failure instead of silent swallow

* refactor(openclaw-plugin): unify OV session identity to sessionId

Made-with: Cursor

* feat(openclaw-plugin): add memory chain integration test script

Made-with: Cursor

* add test and desc of openclaw-plugin

* change commit to async

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
Co-authored-by: wlff123 <wulf234@163.com>
Co-authored-by: Eurekaxun <eurekaxun@163.com>
Co-authored-by: lin-qiang123 <1667704220@qq.com>
2026-03-24 23:40:32 +08:00
Qin HaojieClaude Opus 4.6AutoCoder
2c598e88c5 feat(session): async commit, session metadata, and archive continuity threading (#900)
* feat(session): make commit two-phase with async memory extraction

Session commit now returns immediately after archiving messages (Phase 1).
Summary generation and memory extraction (Phase 2) run in the background
via asyncio.create_task(), returning a task_id for polling progress.

- Add get_task() API across all client layers for querying background task status
- get_session() auto-creates session if it does not exist
- Remove wait parameter and telemetry from commit endpoint
- Add .done completion marker to archive directories
- Update docs (EN/ZH) and tests for new two-phase flow

* feat(session): add .meta.json persistence and auto_create control for get_session

SessionService.get() now defaults to auto_create=False, raising NotFoundError
for missing sessions. A new SessionMeta dataclass tracks created_at, updated_at,
message_count, commit_count, memories_extracted (by category), last_commit_at,
and cumulative llm_token_usage. Meta is persisted to .meta.json and updated on
add_message, commit Phase 1 (message clear), and commit Phase 2 completion
(token usage, memory counts via bind_telemetry). All client layers
(local/async/sync/HTTP) and API docs updated accordingly.

* fix: remove session vectorize

* support commit for openclaw-plugin (#902)

Made-with: Cursor

* fix: reuse latest archive overview in session context

Thread the latest completed archive overview into archive summary generation and memory extraction, and simplify search context assembly to current messages plus the latest archive overview.

Co-Authored-By: Claude Opus 4.6

* refactor: session overview

---------

Co-authored-by: AutoCoder <wulf234@163.com>
2026-03-24 22:30:16 +08:00
Mingjian QueandGPT-5.4 f93d10523b feat(openclaw-plugin 2.0): from memory plugin to context engine (#662)
* 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>
2026-03-18 21:10:20 +08:00