@yuenwinyun/openclaw-message-stream
v0.1.10
Published
Session message stream analysis plugin for OpenClaw
Readme
openclaw-message-stream
Plugin that scans OpenClaw session transcripts and emits structured findings for keyword, regex, PII, and sentiment signals.
The output is designed for AI agents, assistants, and runtime orchestrators that need clear message-level alerts.
Quick onboarding
Install
- Install from npm:
npm install --save-dev @yuenwinyun/openclaw-message-stream- Or with pnpm:
pnpm add --save-dev @yuenwinyun/openclaw-message-streamAdd plugin to an OpenClaw host
Run in the OpenClaw host project:
npm install --save-dev @yuenwinyun/openclaw-message-streamThen merge plugin settings into OpenClaw config:
node node_modules/@yuenwinyun/openclaw-message-stream/scripts/openclaw-config.mjs \
--config /path/to/openclaw.config.json \
--plugin-root /path/to/openclaw-host/node_modules/@yuenwinyun/openclaw-message-stream \
--mode hybrid \
--writeReload OpenClaw and verify:
openclaw plugins list --json
openclaw plugins inspect openclaw-message-stream --json
openclaw plugins doctorOne-line starter config (optional)
From this package folder:
npm run openclaw:configRuntime commands for agents
Use /msgstream in authorized sessions:
/msgstream
/msgstream one-shot
/msgstream one-shot --dry-run
/msgstream --mode scheduled --sessions session-a,session-bConfiguration
Set under plugins.entries.openclaw-message-stream.config.
mode:hybrid,scheduled,streaming,one-shot(defaulthybrid)scan.limit: max sessions returned from session listscan.batchSize: max messages fetched per session scanscan.maxSessions: per-run session safety capscan.intervalMs: poll interval for scheduled modefilters: label/agent/spawnedBy/search filtersanalysis: keyword + regex + PII + sentiment configgateway: OpenClaw gateway connection settingsoutput: file/webhook/console output controlsoutput.dryRun: analyze and checkpoint without external output
gateway.scopes defaults to include operator.read so the plugin can read sessions for scanning.
Emitted message record
Each emitted record contains:
- plugin
- mode
- session key
- message id and seq
- sender and role
- message content
- score and findings
- match boolean
Common outputs:
- console summary
- JSONL file output (optional)
- webhook POST payload (optional)
Notes
dry-runmode still runs analysis and updates checkpoint state.- Checkpoint deduplication is based on message id/sequence and content hash.
- Streaming mode needs valid gateway credentials/scopes.
Remove plugin safely
- Remove from OpenClaw config (plugin entry + allowed list + load paths).
- Uninstall package:
npm remove @yuenwinyun/openclaw-message-stream
# or
pnpm remove @yuenwinyun/openclaw-message-streamAI skill support
This package also ships an OpenClaw/assistant skill at:
skills/openclaw-message-stream/SKILL.md
You can copy it into your assistant skill folder for easier onboarding and common workflows.
Developer docs
For test, release, and publishing workflows, see:
