Skip to content

feat(dsh): let hosts mark relay source kinds as user input - #7684

Open
lkshrk wants to merge 1 commit into
volcengine:mainfrom
lkshrk:feat/dsh-input-source-kinds
Open

lkshrk wants to merge 1 commit into
volcengine:mainfrom
lkshrk:feat/dsh-input-source-kinds

Conversation

@lkshrk

@lkshrk lkshrk commented Nov 14, 2026

Copy link
Copy Markdown

Description

The DSH memory plugin treats every user-role message whose source.kind is not user or tool as injected context, so it neither captures it nor uses it as a recall query. That is right for time-context, job notices and other plugins' blocks. It also drops hosts that relay what people wrote under their own kind: a DSH plugin that forwards Linear comments and PR review findings to a worker as dsh-superagent messages leaves the worker with no user input at all, so recall never fires and OpenViking extracts no memories (it only takes memories from user-role messages).

This adds inputSourceKinds (OPENVIKING_INPUT_SOURCE_KINDS), a list of source kinds whose user-role messages count as genuine input for capture and recall. It is empty by default, so behavior is unchanged.

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

None.

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 list knob inputSourceKinds (synced into the committed claude-code and codex copies)
  • dsh-memory-plugin/capture.mjs: listed kinds are input for captureEvent and promptText; the plugin's own injections stay excluded even when listed, and tool results keep their captureToolResults gate
  • dsh-memory-plugin/runtime.mjs: recall passes the per-session config to promptText
  • README and docs/{en,zh}/agent-integrations/17-dsh.md: document the knob

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

examples/dsh-memory-plugin: npm test passes the three new tests. One existing test (a session never inherits the launch workspace's peer id or source) fails in my environment with and without this change. examples/memory-plugin-shared: node --test *.test.mjs shows the same failure set as main (environment-dependent workspace and desktop-path tests).

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

DSH v4 gives producer-owned context its own source kind, so the plugin drops
every user-role message whose kind is not user or tool. A host plugin that
relays what people wrote (Linear comments, review findings) under its own kind
therefore never reaches capture or recall, and OpenViking only extracts
memories from user-role messages.

inputSourceKinds (OPENVIKING_INPUT_SOURCE_KINDS) lists such kinds. It is empty
by default, so behavior is unchanged; the plugin's own injections stay excluded
even when listed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant