Skip to content

Epic: Convert CPEX plugins to Rust-only for 0.2.0 #61

@lucarlig

Description

@lucarlig

Summary

Migrate all plugins in this repo from the current Rust-core/Python-wrapper model to Rust-only plugins. The CPEX framework is moving to Rust, so this work depends on at least partial completion of contextforge-org/contextforge-plugins-framework#12 before the full switch can happen in the 0.2.0 release.

Scope

Convert the existing plugins:

  • cpex-encoded-exfil-detection
  • cpex-pii-filter
  • cpex-rate-limiter
  • cpex-retry-with-backoff
  • cpex-secrets-detection
  • cpex-url-reputation

Goals

  • Remove Python wrappers, Python packaging, and Python runtime requirements.
  • Expose each plugin through the Rust-native CPEX framework API.
  • Replace pyproject.toml/maturin/PyO3 packaging with Rust-native build and release artifacts.
  • Port existing Python integration coverage to Rust tests before deleting Python tests.
  • Preserve existing plugin behavior, configuration, security checks, and performance characteristics.
  • Update CI, docs, and release steps for Rust-only plugins.

Framework Dependency

This is blocked until the Rust plugin framework supports enough of the following:

  • Rust plugin lifecycle/trait API
  • Hook registration and execution
  • Config loading and validation
  • Manifest/discovery format
  • Host test harness or equivalent integration test path

Partial support is enough to start migrating one plugin at a time.

Acceptance Criteria

  • All plugins build and run without Python, PyO3, maturin, or pyproject.toml.
  • Existing behavior is covered by Rust unit/integration tests.
  • Python tests and wrappers are removed only after Rust replacements pass.
  • CI runs Rust format, clippy, unit tests, integration tests, and relevant benchmarks.
  • Plugin manifests and artifacts are compatible with the Rust CPEX framework.
  • 0.2.0 release artifacts have no Python runtime dependency.

Implementation Plan

  1. Confirm the minimum framework API from contextforge-plugins-framework#12.
  2. Migrate one low-risk plugin end to end as the reference implementation.
  3. Migrate the remaining plugins using the same structure.
  4. Port tests and benchmarks to Rust.
  5. Remove Python packaging, wrappers, tooling, and CI steps.
  6. Update docs and release process for 0.2.0.

Done

All plugins are Rust-only, pass Rust-native CI, load through the Rust CPEX framework, and can be released as 0.2.0 without Python compatibility layers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions