Skip to content

Plugin architecture: out-of-tree Rust step plugins (modulex-plugin-* crates) #10

Description

@hartsock

Feature

Define how Rust plugins extend modulex beyond the builtins, so feature families (repo caretaking, calendar, email, on-call, system health, …) can ship as disciplined, independently-tested crates without bloating modulex-core.

Proposed shape

  • modulex-plugin-<name> crates in this workspace: each exports pub fn register(registry: &mut StepRegistry) plus its step handlers, MCP tool specs, and (optionally) store migrations.
  • Feature-gated linkage: modulex-cli / modulex-mcp grow cargo features (plugin-git, plugin-calendar, …; a full meta-feature) so a lean build is possible and each plugin's deps stay out of the default graph (the existing web feature is the precedent).
  • Tool-surface extension: tools.rs dispatch becomes registry-driven so plugins can contribute MCP tools (today's match-based dispatch only covers builtins).
  • Store extension: a per-plugin schema-version row in meta (e.g. schema:<plugin>) so plugins own their tables and migrations without touching core's user_version.
  • Leash: plugins declare programs via required_programs() (feeds the declared-default exec grant) and hosts via a parallel required_hosts() for the net axis; nothing escapes ExecGate / the leashed fetcher.
  • Non-Rust extension stays as-is: the subprocess plugin protocol (modulex-plugin/1) and in-process Python registration.

Acceptance

  • One reference plugin crate extracted/landed under this model with its own README, tests, and feature flag
  • steps_list / tools/list reflect plugin registrations dynamically
  • Coverage floor and zero-warnings hold across feature combinations in CI (--no-default-features, default, full)

Development discipline

Rust-first, jujutsu-style (no panics in lib code, RFC-1574 doc comments, lower-level tests over e2e). Follow Foundation contributor rules + the rust-tdd skill: TDD, regression tests, 80% coverage floor, README per crate, exec/net leashed, generation counters not wall-clock, credentials as references only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginNew plugin / step-type family

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions