Documentation
    Preparing search index...

    Class PluginHost

    The standalone §81 host: capabilities in, plugins in, one install call.

    const host = new PluginHost([bindCapability(SOLVER_REGISTRY, registry)]);
    host.add(rapierPlugin).add(ragdollPlugin);
    await host.install();

    Use it when the capabilities a plugin needs are values the application owns and Application cannot reach — a solver registry, a serializer registry, a render graph. ApplicationOptions.plugins (§45, as amended by RFC 0002 Q1) is the convenience for the capabilities the application does own.

    Index
    • Resolves order, checks ranges, then awaits each install in order (§81).

      Called once. Re-installation and hot reload are deferred by RFC 0002, so a second call is refused rather than quietly installing nothing.

      Returns Promise<void>

    • Removes the installed plugin called name, running its uninstall.

      Uninstall is not symmetric, and this refuses rather than pretending. The registries a capability hands over have different removal stories: SystemRegistry.register returns an idempotent unregister, while registerRenderer/registerSolver offer none and ComponentSerializerRegistry deliberately has no removal at all — a silent overwrite there would make the shape of a document depend on evaluation order. So a capability declares its revocability (DefineCapabilityOptions.revocable, default false), and a plugin that acquired a non-revocable one cannot be uninstalled: this raises naming the capability that pins it, rather than running uninstall and leaving a half-removed registration behind. It is the same contrast rule as removeCollider returning false while addCollider throws.

      Parameters

      • name: string

      Returns void

      FourError INVALID_APPLICATION_STATE when nothing is installed under name, when another installed plugin depends on it, or when a non-revocable capability pins it (§85).