Skip to content

feat(plugins): forward an event time-decay window from recall config - #6390

Merged
qin-ctx merged 1 commit into
volcengine:mainfrom
incredible404-rgb:feat/recall-event-decay
Oct 21, 2026
Merged

qin-ctx merged 1 commit into
volcengine:mainfrom
incredible404-rgb:feat/recall-event-decay

Conversation

@incredible404-rgb

Copy link
Copy Markdown
Contributor

Description

Lets the shared memory plugins forward the server's existing event time-decay parameter on auto-recall. Context search already supports events_time_decay_protection, but buildContextSearchBody never sends it and there is no server-side setting, so plugin recall always ranks event memories without decay and old events that record superseded decisions keep outranking the ones that replaced them.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

Closes #6389

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

  • memory-plugin-shared/lib/config-schema.mjs: new string knob recallEventsDecayProtection (OPENVIKING_RECALL_EVENTS_DECAY_PROTECTION), default empty.
  • memory-plugin-shared/lib/recall-core.mjs: buildContextSearchBody sends it as events_time_decay_protection when non-empty; nothing is sent otherwise, so default behavior is unchanged. Validation stays on the server.
  • Vendored copies regenerated with sync.mjs (Claude Code, Codex, OpenClaw); option documented in the Claude Code (EN/CN) and Codex READMEs.

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

node --test examples/memory-plugin-shared/*.test.mjs on Windows: the failure set is identical with and without this change (65 installer/marketplace cases that fail on this machine regardless). Also exercised end to end with the Claude Code plugin's auto-recall.mjs against a 0.5.0 server: with "3d", superseded events from a week earlier drop out of the injected block and the current-state event ranks first.

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

Additional Notes

Implemented with an AI coding agent at the account owner's direction; the owner chose the design and requested the PR. Decay only affects records tagged memory_type=events, so stores that predate the tag get partial decay; see the issue for that note.

The server already ranks event memories with time decay when a context search
carries events_time_decay_protection, but none of the shared plugins could send
it, so a week-old event that records a superseded decision keeps its full
semantic score and outranks the event that replaced it.

recallEventsDecayProtection (OPENVIKING_RECALL_EVENTS_DECAY_PROTECTION, also
settable in the ovcli.conf plugin section) is passed through unchanged as
events_time_decay_protection on the context request. The default is empty,
which sends nothing and keeps the server's default of no decay.
@ZaynJarvis ZaynJarvis added the agent-plugins Agent harness and plugin integrations label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-plugins Agent harness and plugin integrations

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

feat(plugins): let auto-recall send events_time_decay_protection

3 participants