feat(plugin): AEGIS scan-pipe on all inbound Pilot messages#6
Merged
Conversation
The plugin's package.json was bumped to openclaw ^2026.6.1 but the lockfile still pinned 2026.5.26, so npm ci has been failing on every push since the bump: Invalid: lock file's openclaw@2026.5.26 does not satisfy openclaw@2026.6.1 Re-runs npm install --package-lock-only to refresh the lockfile. Confirmed with npm ci locally — exit 0.
Scan message text and media captions through `aegis scan-pipe` before dispatching to the agent. Exit 2 from aegis drops the message with a warning — prevents prompt injection over the Pilot network from reaching the LLM turn. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Replace the per-message spawnSync("aegis","scan-pipe") in the inbound
pipeline with a non-blocking execFile wrapper. The dispatch pipeline is
fully await-based; spawning synchronously parked the Node event loop for
the whole subprocess lifetime on every inbound message, starving every
other peer's I/O.
The new createAegisScan helper feeds candidate text on stdin, awaits the
child exit, and keeps the exit-code contract (status 2 = block, rule on
stdout). Spawn errors and timeouts resolve fail-open so a scanner outage
never silently drops all inbound DMs. The scanner is injectable via
InboundDeps/LifecycleDeps so tests run without execing a real binary.
Add coverage for the scan-pipe paths: clean pass-through, flagged/blocked
drop, and the error/timeout fail-open branch, for both the text and media
caption code paths.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
aegis scan-pipebefore dispatching to the agentHow it works
Test plan
🤖 Generated with Claude Code