You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
webhook: per-topic filter on the bridge + pilotctl --topics
The webhook plugin subscribed to "*" and forwarded every bus event,
including high-volume internal topics (tunnel.relay_activated,
conn.established, security.*, pubsub.*). Operators who only wanted
the human-meaningful events (message.received, file.received,
handshake.received, trust.changed) had no way to filter at the source.
This change:
- Service gains a topics map<string, struct{}> read by the bridge
goroutine before each Emit. Nil = forward all = pre-filter default
(backwards-compatible — existing webhook configs unchanged).
- Persisted to ~/.pilot/webhook_topics (one topic per line, # comments
and blank lines ignored). Survives daemon restart.
- WebhookManager interface extended: SetTopics / Topics. All four
existing test stubs updated.
- New IPC opcodes CmdSetWebhookTopics / CmdSetWebhookTopicsOK
(0x1D / 0x1E). Driver gets a SetWebhookTopics method.
- pilotctl set-webhook accepts --topics t1,t2,... and --clear-topics.
The URL and topic filter are independent IPCs so neither flag
mutates the other.
Tests cover topicSet normalization, persist round-trip, comment
handling, and the SetTopics/Topics operator surface. Existing webhook
tests still pass.
0 commit comments