Skip to content

feat(openclaw-plugin 2.0): from memory plugin to context engine#662

Merged
qin-ctx merged 2 commits intovolcengine:mainfrom
Mijamind719:context-engine
Mar 18, 2026
Merged

feat(openclaw-plugin 2.0): from memory plugin to context engine#662
qin-ctx merged 2 commits intovolcengine:mainfrom
Mijamind719:context-engine

Conversation

@Mijamind719
Copy link
Contributor

…ntext 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.

Description

Related Issue

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

@Mijamind719 Mijamind719 changed the title feat(openclaw-context-plugin): migrate OpenViking memory plugin to co… 【WIP】feat(openclaw-context-plugin): migrate OpenViking memory plugin to co… Mar 16, 2026
@Mijamind719 Mijamind719 changed the title 【WIP】feat(openclaw-context-plugin): migrate OpenViking memory plugin to co… feat(openclaw-context-plugin): migrate OpenViking memory plugin to co… Mar 16, 2026
@Mijamind719 Mijamind719 changed the title feat(openclaw-context-plugin): migrate OpenViking memory plugin to co… 【WIP】feat(openclaw-context-plugin): migrate OpenViking memory plugin to co… Mar 16, 2026
…ntext 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>
@Mijamind719 Mijamind719 force-pushed the context-engine branch 2 times, most recently from be152c9 to fa0e1d9 Compare March 18, 2026 00:36
@Mijamind719 Mijamind719 changed the title 【WIP】feat(openclaw-context-plugin): migrate OpenViking memory plugin to co… feat(openclaw-plugin 2.0): from memory plugin to context engine Mar 18, 2026
@Mijamind719 Mijamind719 force-pushed the context-engine branch 12 times, most recently from e29df3d to 9bbe63a Compare March 18, 2026 12:30
@qin-ctx
Copy link
Collaborator

qin-ctx commented Mar 18, 2026

@qin-ptr

Copy link
Contributor

@qin-ptr qin-ptr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up review: 之前提出的硬编码路径问题已修复 ✅

发现了一些命名一致性问题 (non-blocking suggestions):

文档中的旧插件名称引用

examples/openclaw-plugin/INSTALL-ZH.md (行 211, 215)

  • 文档中仍使用旧插件名称 "memory-openviking",应更新为 "openviking"
  • 第 211 行描述和第 215 行 grep 命令中都需要更新

建议改为:

grep -i inject /tmp/openclaw/openclaw-2026-03-13.log | awk -F'"' '{for(i=1;i<=NF;i++) if($i ~ /^[0-9]{2}:[0-9]{2}:[0-9]{2}/) {time=$i; break}} /injecting [0-9]+ memories/ {print time, "openviking:", gensub(/.*(injecting [0-9]+ memories).*/, "\\1", "1")}'

代码中的旧插件名称引用

examples/openclaw-plugin/process-manager.ts:175

  • 错误消息: memory-openviking: port ${port} is occupied...
  • 建议改为: openviking: port ${port} is occupied...

examples/openclaw-plugin/index.ts:97

  • 错误消息: memory-openviking unavailable: ${reason}
  • 建议改为: openviking unavailable: ${reason}

examples/openclaw-plugin/config.ts:116

  • 配置描述: "memory-openviking config"
  • 建议改为: "openviking config"

这些都是小的命名一致性问题,不影响功能,建议修复但不阻塞合并。

🤖 I am a bot owned by @qin-ctx.

@Mijamind719
Copy link
Contributor Author

Follow-up review: 之前提出的硬编码路径问题已修复 ✅

发现了一些命名一致性问题 (non-blocking suggestions):

文档中的旧插件名称引用

examples/openclaw-plugin/INSTALL-ZH.md (行 211, 215)

  • 文档中仍使用旧插件名称 "memory-openviking",应更新为 "openviking"
  • 第 211 行描述和第 215 行 grep 命令中都需要更新

建议改为:

grep -i inject /tmp/openclaw/openclaw-2026-03-13.log | awk -F'"' '{for(i=1;i<=NF;i++) if($i ~ /^[0-9]{2}:[0-9]{2}:[0-9]{2}/) {time=$i; break}} /injecting [0-9]+ memories/ {print time, "openviking:", gensub(/.*(injecting [0-9]+ memories).*/, "\\1", "1")}'

代码中的旧插件名称引用

examples/openclaw-plugin/process-manager.ts:175

  • 错误消息: memory-openviking: port ${port} is occupied...
  • 建议改为: openviking: port ${port} is occupied...

examples/openclaw-plugin/index.ts:97

  • 错误消息: memory-openviking unavailable: ${reason}
  • 建议改为: openviking unavailable: ${reason}

examples/openclaw-plugin/config.ts:116

  • 配置描述: "memory-openviking config"
  • 建议改为: "openviking config"

这些都是小的命名一致性问题,不影响功能,建议修复但不阻塞合并。

🤖 I am a bot owned by @qin-ctx.

已修改

…king

- 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
@qin-ctx qin-ctx merged commit f93d105 into volcengine:main Mar 18, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Mar 18, 2026
qin-ctx added a commit that referenced this pull request Mar 19, 2026
PR #662 renamed the plugin directory and rewrote index.ts from a stale
branch base, silently dropping two merged bug fixes:

- #681: share pending clientPromise across dual-context registrations
  to prevent before_agent_start hook from hanging forever
- #688: wrap auto-recall search in withTimeout(5s) to prevent indefinite
  agent hang when OpenViking search API is slow or unresponsive
chenjw pushed a commit that referenced this pull request Mar 19, 2026
…rge (#779)

PR #662 renamed the plugin directory and rewrote index.ts from a stale
branch base, silently dropping two merged bug fixes:

- #681: share pending clientPromise across dual-context registrations
  to prevent before_agent_start hook from hanging forever
- #688: wrap auto-recall search in withTimeout(5s) to prevent indefinite
  agent hang when OpenViking search API is slow or unresponsive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants