Everything Is a Plugin: Understanding Plugin-Based Runtimes and Reversible Computing

    This article breaks down the architecture proposition behind plugin-based runtimes, where every plugin is treated as a reversible delta rather than a feature module. It formalizes the core claim that "everything is a plugin" is equivalent to "everything is a delta," clarifies that reversibility means undoing structural changes instead of executing code backward, and compares the approach with classical reversible computing theory. Engineers will find a minimal delta-interface skeleton, practical boundaries for adoption, and key implementation concerns such as conflict detection and declarative reconciliation.

    1. Background: Why Plugin-Based Runtimes Are Suddenly in Focus

    A recent open-source agent framework built around a plugin-based runtime has drawn heavy attention: the main repository gained traction almost immediately, and the number of extension repositories tied to its plugin label quickly surpassed ten thousand. A paper co-authored by a research institution and a university was released alongside it, formally describing the design principles of the underlying plugin runtime using category theory and a functional style.

    The debate is not about popularity. It centers on three specific technical questions:

    1. Is “everything is a plugin” an unnecessary unification? The agent main loop and the memory mechanism differ enormously in semantics. What is actually gained by forcing both into the same notion of “plugin”?
    2. Is “everything is a plugin” just a repackaging of the highly configurable architectures that already exist? Pluggable components have long been common in the industry.
    3. What does a “reversible plugin” actually mean? Side effects objectively exist, so how can anything be reversible? And why is updating plugins at runtime necessary when version upgrades already exist?

    All three questions share the same root cause: the original paper formalizes the design with category theory and functional notation, and the symbol density makes it hard for engineering readers to get from the notation to the semantics. This article reconstructs the argument in general engineering language and compares it with the classical theory of reversible computing.

    2. Formalizing the Core Claim: Everything Is a Plugin Equals Everything Is a Delta

    Written as the plainest possible equation, “everything is a plugin” becomes:

    1. App = Base + Plugin1 + Plugin2 + ... + PluginN

    This looks trivial. The real information is in what “+” means. In conventional plugin systems, “+” usually means “load/register”: a module is attached to an extension point at runtime, and the semantics are a set union. In the plugin-based runtime paradigm, “+” is required to mean delta composition: each plugin is not a piece of code that gets called, but an additive, subtractable, and (when conditions allow) order-independent delta unit Δ.

    The equation then becomes:

    1. App(S) = Base ⊕ Δ1 ⊕ Δ2 ⊕ ... ⊕ Δn

    where S denotes a state in the runtime structure space. This rewrite yields three verifiable engineering properties:

    • Additivity: adding a capability means appending a delta, with no changes to Base and no changes to other plugins.
    • Subtractivity: removing a plugin means subtracting a delta, and the system returns to a well-defined prior state.
    • Composability: the result of composing several deltas does not depend on load order (assuming no conflicts between deltas), which provides the mathematical basis for runtime updates.

    The point worth stressing is that this “unification” does not make the main loop and memory functionally identical. It requires them to expose the same delta interface externally: declaring their own additions, removals, and modifications to the structure space, plus the information needed to undo their own changes. Functional differences are preserved inside each delta; uniformity happens only at the interface layer. This is the direct answer to the “unnecessary unification” objection: what is unified is not semantics, but the way changes are expressed.

    3. What “Reversible” Actually Means: Undoing Structural Changes, Not Running Backward

    The second objection comes from an intuitive misreading of “reversible.” Classically, reversible often means running in reverse, as in reversible computing’s backward execution and information-preserving computation. In a plugin-based runtime, reversible means:

    Changes to the runtime structure space can be undone, returning the system to a well-defined state from before the change.

    In engineering terms, each delta must carry enough inverse delta information Δ⁻¹ to satisfy:

    1. ( S ⊕ Δ ) ⊕ Δ⁻¹ = S

    Two clarifications follow:

    • It does not promise to eliminate all side effects. Real I/O, external requests, and messages already sent cannot be undone. What it governs is the structural side effects of composite interactions across multiple plugins, such as extension-point registration, dependency changes, and field adjustments in shared context.
    • Therefore the objection “side effects are unavoidable, so reversibility is impossible” does not hold, because the discussion is scoped to the structure space, not the state space of the external world.

    The answer to “why is runtime updating necessary” follows directly: when a change is expressed as a delta with an inverse, an upgrade is no longer “stop the process and swap versions” but an ordered composition of apply(Δ_new) ; apply(Δ_old⁻¹). A version upgrade is a coarse-grained replacement; a delta update is a fine-grained, rollback-capable change that can be negotiated concurrently. The two are not alternatives but the same thing at different granularities.

    4. Relation to and Differences from Classical Reversible Computing

    Comparing this paradigm with reversible computing theory gives a clearer positioning.

    There are three points of contact. First, both take the delta rather than the full state as the basic unit of operation, and both pursue the minimal expression of a change. Second, both require changes to have a well-defined inverse operation, so system state can be traced back. Third, both emphasize composability along two dimensions: the spatial dimension is the composition of modules/structures, and the temporal dimension is the reordering and replay of change sequences.

    There are two differences, and they define the working boundary for engineering adoption.

    • Different action spaces. Classical reversible computing has already completed a full formalization in the compile-time structure space: the algebraic structure of deltas, composition rules, and conflict detection can all be solved statically at build time. The plugin-based runtime moves the battleground to the runtime structure space, where deltas are produced dynamically while the process is alive, and static solving is no longer sufficient.
    • Different levels of formalization completeness. Current public implementations show traces of declarative configuration and runtime reconciliation, meaning “declare the desired state and let the runtime converge to it,” which is necessary engineering support for reversibility. But at the paper level, the runtime layer is mostly described as mechanisms and has not yet been formalized into a delta algebra.

    A pragmatic conclusion follows: a plugin-based runtime can be seen as one concrete application of reversible computing ideas in the runtime structure space, where plugins are elevated to delta units that can be strictly defined mathematically. Full reversibility guarantees, however, still require the mature delta algebra from the compile-time structure space. The two are complementary, not competing.

    5. A Minimal Skeleton: The Delta Interface

    The pseudocode below only expresses the shape of the interface and does not refer to any specific product:

    1. class Delta:
    2. def apply(self, state: RuntimeState) -> RuntimeState: ...
    3. def inverse(self) -> "Delta": ...
    4. def conflicts_with(self, other: "Delta") -> bool: ...
    5. class Runtime:
    6. def __init__(self):
    7. self.state = RuntimeState.base()
    8. def install(self, d: Delta):
    9. if any(d.conflicts_with(x) for x in self.pending):
    10. raise ConflictError(d)
    11. self.state = d.apply(self.state)
    12. self.pending.append(d)
    13. def rollback(self, d: Delta):
    14. self.state = d.inverse().apply(self.state)
    15. self.pending.remove(d)
    16. def reconcile(self, desired: RuntimeState):
    17. # Declarative convergence: compute deltas and apply them in order
    18. for d in diff(self.state, desired):
    19. self.install(d)

    The genuinely hard parts in engineering are not the interface but three things: conflict detection between deltas, reliable construction of inverse deltas (especially when shared mutable state is involved), and idempotency of the convergence process.

    6. Adoption Boundaries and Engineering Essentials

    • Define the reversibility domain. Architecturally separate “reversible structural changes” from “irreversible external effects.” Handle the latter with common mechanisms such as compensating transactions, idempotency keys, and message deduplication. Do not conflate the two.
    • Prefer declarative convergence. Declaring the desired state and letting the runtime compute and converge deltas is more controllable than manually writing apply/rollback imperatively, and it is easier to make idempotent.
    • Control delta granularity. Deltas that are too fine raise the cost of conflict detection; deltas that are too coarse lose the point of runtime updating. Divide along extension-point boundaries.
    • Pair it with observability. Delta application and rollback must leave structured logs and audit trails, combined with general monitoring and alerting, before online changes can be made safely in production.
    • Do not deify unification. The value of unification lies in how changes are expressed and in rollback capability, not in reducing the number of concepts. If a module inherently does not need to be undone, wrapping it as a delta only adds complexity.

    7. Conclusion

    “Everything is a plugin, and every plugin is reversible” is not a marketing slogan but an architectural proposition that can be discussed rigorously. It elevates plugins from feature modules to delta units, corrects reversibility from “backward execution” to “undoing runtime structural changes,” and refines runtime updating from version replacement into rollback-capable delta operations. The innovation is real, but so are the boundaries: it focuses on the runtime structure space and still needs to complement the delta algebra of the compile-time structure space; it governs structural side effects caused by composite interactions, not all side effects. Understanding these two points is enough to judge this class of architecture without either blind following or dismissal.