feat(hermes): add offload context engine#376
Open
RerankerGuo wants to merge 1 commit into
Open
Conversation
Signed-off-by: Ziyang Guo <121015044+RerankerGuo@users.noreply.github.com>
Collaborator
|
Thanks for your attention! We’ll review this and get back to you as soon as possible. |
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.
Description | 描述
Add a standalone Hermes
ContextEngineplugin for TencentDB short-term offload underhermes-plugin/context_engine/tencentdb_offload.This is a narrow runtime follow-up to the Hermes short-term memory gap:
TencentdbOffloadContextEnginewith the expectedname,should_compress,compress, andupdate_from_responsemethods.POST /v2/offload/compactand accepts eithermessagesorcompacted_messagesresponse shapes.POST /v2/offload/ingeston a daemon thread so the user path is not blocked.I intentionally did not change the TypeScript Gateway routes in this PR. The plugin defines the Hermes-side adapter and remote HTTP contract first; Gateway-side
/v2/offload/*implementation can remain a follow-up if maintainers want it in this repository rather than an external offload service.Related Issue | 关联 Issue
Related to #102
Change Type | 修改类型
Self-test Checklist | 自测清单
Verification | 验证
python3 hermes-plugin/context_engine/tencentdb_offload/tests/test_context_engine.pypython3 -m py_compile hermes-plugin/context_engine/tencentdb_offload/__init__.py hermes-plugin/context_engine/tencentdb_offload/client.py hermes-plugin/context_engine/tencentdb_offload/fallback.py hermes-plugin/context_engine/tencentdb_offload/tests/test_context_engine.pynpm testnpm run buildgit diff --checkAdditional Notes | 其他说明
The scope is deliberately conservative: it makes the Hermes ContextEngine slot usable and failure-tolerant without changing the existing
memory_tencentdbprovider or the OpenClaw/offload TypeScript runtime.