Skip to content

feat(openclaw-plugin): add configurable capture skipSessionPatterns#1375

Open
duoyidavid-eng wants to merge 1 commit intoMemTensor:mainfrom
duoyidavid-eng:feat/capture-skip-session-patterns-v2
Open

feat(openclaw-plugin): add configurable capture skipSessionPatterns#1375
duoyidavid-eng wants to merge 1 commit intoMemTensor:mainfrom
duoyidavid-eng:feat/capture-skip-session-patterns-v2

Conversation

@duoyidavid-eng
Copy link
Copy Markdown

Summary

Allow users to configure session key substrings to skip memory capture via capture.skipSessionPatterns config option.

Default: [":cron:"] (backward compatible — cron sessions still skipped by default)

Motivation

Previously, only cron sessions were hard-coded to skip capture. Users who run multiple agents (e.g. a dedicated wechat agent) had to modify source code to exclude specific agents from memory capture.

Changes

File Change
src/types.ts Add skipSessionPatterns?: string[] to MemosLocalConfig.capture
src/config.ts Resolve config with default [":cron:"]
src/capture/index.ts Add skipSessionPatterns parameter to captureMessages(), filter before processing
src/index.ts Pass config value to captureMessages()

Example config

{
  "capture": {
    "skipSessionPatterns": [":cron:", "agent:wechat", "agent:bot"]
  }
}

This replaces the previous hard-coded cron check and makes session filtering data-driven.

Allow users to configure session key substrings to skip memory capture
via  config option (default: [:cron:]).

Previously, only cron sessions were hard-coded to skip. This change makes
the filter configurable so users can exclude specific agents or session
types from memory capture without code changes.

Example config:
  capture: { skipSessionPatterns: [:cron:, agent:wechat] }

Co-authored-by: duoyidavid <duoyidavid@gmail.com>
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