Skip to content

Add OpenClaw context-engine lifecycle and incremental memory capture#66

Open
KennyDizi wants to merge 5 commits intoaiming-lab:mainfrom
KennyDizi:openclaw-compat-update
Open

Add OpenClaw context-engine lifecycle and incremental memory capture#66
KennyDizi wants to merge 5 commits intoaiming-lab:mainfrom
KennyDizi:openclaw-compat-update

Conversation

@KennyDizi
Copy link
Copy Markdown

  • Context-engine registration: memory plugin registers as context-engine (assemble/compact lifecycle) on OpenClaw v2026.4.10+, with auto-recall skipped when active to prevent double-injection
  • Incremental per-turn capture: replaces bulk session-end ingest with per-turn bufferTurn + session_end final flush, tracking per-session turn counts
  • Sidecar client extensions: adds bufferTurn() / flushSession() methods with BufferTurnResponse and FlushSessionResponse types
  • OpenClaw compat config section: new openclaw_compat block (context_engine_enabled, active_memory_compat, prefer_proxy_synergy, min_version) wired through MetaClawConfig, ConfigStore, and setup wizard
  • Active memory suppression: claw_adapter sets OpenClaw's plugins.slots.memory to metaclaw-memory to suppress built-in Active Memory
  • Proxy-side dispatch: API server branches on x-metaclaw-contextengine header — skills-only path when context-engine is active, with optional proxy-side synergy escape hatch
  • Test coverage: 10 Python tests covering config defaults, store mapping, adapter toggles, dispatcher conditions, and wizard propagation; vitest + TS unit tests for context-engine and plugin registration
  • Version bump to v0.4.2 with news entries in all 13 READMEs

…atch

- Add openclaw_compat config section (context_engine_enabled,
  active_memory_compat, prefer_proxy_synergy, min_version) to
  MetaClawConfig, ConfigStore defaults, and describe() output
- Extend setup wizard with advanced OpenClaw compatibility prompts
- Refactor API server message augmentation to dispatch on
  x-metaclaw-contextengine header: context-engine path skips
  proxy-side memory injection (skills only), with optional
  prefer_proxy_synergy escape hatch for full synergy
- Suppress OpenClaw built-in Active Memory via plugin slot override
  in claw_adapter when openclaw_active_memory_compat is enabled
- Detect registerContextEngine API in OpenClaw extension and signal
  proxy with x-metaclaw-contextengine header
…pture

- Add context-engine.ts implementing assemble/compact lifecycle:
  retrieve relevant memories on assemble, consolidate on compact,
  no-op ingest/afterTurn (sidecar scheduler handles batching)
- Register as both 'memory' and 'context-engine' plugin kind;
  skip auto-recall when context-engine is active to prevent
  double-injection at gateway level
- Refactor auto-capture from bulk ingest to per-turn bufferTurn
  with session_end final flush, tracking per-session turn counts
  to only enqueue new turns on each agent_end event
- Add bufferTurn/flushSession methods to SidecarClient with
  BufferTurnResponse and FlushSessionResponse types
- Add vitest dev dependency and config, with unit tests for
  context-engine assembly logic and plugin registration
- Rebuild dist/ to reflect all source changes
Cover config defaults, ConfigStore mapping (explicit/defaults/string
'false'), describe() output, claw adapter active memory suppression
toggle, API server dispatcher boolean conditions, and setup wizard
advanced section with override propagation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant