Capstone.Update (Capstone v0.33.3)

Copy Markdown View Source

Applies whatever plugins a project's target.exs newly lists that its plugin.exs hasn't recorded yet — see docs/superpowers/specs/2026-08-26-plugin-ecosystem-design.md.

Never re-resolves or upgrades an already-recorded plugin, even when a better-matching archive now exists for it — that comparison is explicitly out of scope, per the design doc's "Explicitly out of scope" section.

Summary

Functions

Applies every plugin type listed in target's target.exs that is not already recorded in its plugin.exs. Returns the types actually applied, in target.exs's own order.

Functions

run(target, registry_dir, sync \\ &Remote.sync!/2)

@spec run(Path.t(), Path.t(), (atom(), Path.t() -> :ok)) :: {:ok, [atom()]}

Applies every plugin type listed in target's target.exs that is not already recorded in its plugin.exs. Returns the types actually applied, in target.exs's own order.

sync is called once per newly-listed type, immediately before that type is installed — never once for the whole batch up front, so a later type's sync failure never undoes an earlier type's already-completed install. Injectable for the same reason Capstone.New.Bootstrap.run/3's effects.sync is: a test exercising a local, unpublished fixture type should not depend on network access.