fix(openclaw-plugin): use plugin-sdk exports for compaction delegation (fixes #833) openclaw ≥ v2026.3.22#1000
Merged
Mijamind719 merged 2 commits intovolcengine:mainfrom Mar 27, 2026
Conversation
|
Failed to generate code suggestions for PR |
Contributor
Author
|
Fixes #833 |
Mijamind719
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
继续委托 OpenClaw context engine 中的 compact 逻辑,不过从旧的内部模块路径切换为 OpenClaw 当前公开导出的 plugin-sdk 入口。
原来尝试导入的是:
openclaw/context-engine/legacyopenclaw/dist/context-engine/legacy.js现在改为:
openclaw/plugin-sdk/coreopenclaw/plugin-sdk版本兼容说明
仅支持openclaw ≥ v2026.3.22,后续正式接管compact后可实现全版本支持
相关ISSUE
Fixes #833
主要修改
plugin-sdk导出tryLegacyCompact重命名为tryDelegatedCompactlegacy_compact_*->delegate_compact_*修改原因
原来的实现依赖 OpenClaw 的内部模块路径,在当前运行时下可能因为 package
exports限制导致导入失败。改为使用
plugin-sdk的公开导出,可以减少对内部实现路径的依赖,兼容当前 OpenClaw 版本。