Skip to content

Plugins

The plugin workflow is an intentional extension beyond the upstream daemon surface.

The goal is not “arbitrary user code everywhere.” The goal is a narrow, observable, fast byte-path extension model that can support policy and traffic inspection without turning the daemon into a black box.

  • in-process
  • trait-based
  • explicit attachment and subscription rules
  • fail-open / fail-closed behavior
  • inspect-byte limits
  • bounded async export queueing
  • JSONL export
  • live Unix-socket export
  • /stats counters for observed, blocked, skipped, and error decisions

Related audit/export surface for transport and daemon-socket bytes:

  • JSONL export
  • Unix-socket collector export
  • /stats counters for ingress/egress event counts and sink failures
  • ai-prompt-injection-filter

The plugin path is already benchmarked and gated.

Current enforced regression checks:

Terminal window
just bench-plugin-budget
just bench-control-plane-budget

The normal pass-through path remains zero-copy for unchanged payloads. Plugins inspect borrowed bytes, and the runtime continues by cloning Bytes handles instead of re-materializing payload buffers.

Runtime-loaded third-party plugins are still future work. The current model is focused on built-in or tightly controlled in-process plugins with explicit failure and export behavior.