The batchโs outcome: the finished run, the rollback records for the
rows that moved, the plugins whose update stated the restart
contract, and the post-batch inventory when the refresh landed.
Everything one update batch needs beyond its queued rows. The
caller owns plan capture: which plugins, their per-row cwd, and the
marketplace clone HEADs a later rollback restores.
A pluginโs claude plugin details projection: the always-on token
cost every session pays for the plugin being installed. The shape
lives in forge_primitives::plugins beside the snapshot that
carries it.
A pluginโs claude plugin details projection: the always-on token
cost every session pays for the plugin being installed.
One claude plugin update call: the combined CLI output (the
update classifier reads it, the CLI exits 0 on some failures) plus
whether the output states the restart contract.
The CLI surface one update batch runs through; injectable so tests
drive a whole batch without shelling out. The production instance
wraps the claude subprocess calls.
Run a queued update batch: one CLI call per row, sequentially,
continuing past failures. Every row reaches a terminal status in
plan order; on_progress observes each intermediate run state.
Fetch the always-on cost for (plugin id, version) requests,
sequentially, one claude plugin details call each. A plugin whose
details fail is simply absent from the map - a missing cost reads
as no badge, never as an error on the pane.
The requested version travels with the cost: an update landing
between the request and the merge must not pin the old cost under
the new versionโs key.
The marketplace cloneโs HEAD, or None when the location is not a
git checkout (a directory-sourced marketplace) or git fails. This
ref is what a rollback later restores.
The two claude plugin steps of a rollback, in order: install the
version the rolled-back manifest points at, then move the
marketplace clone forward again so other plugins keep tracking the
latest. Swapping them would silently re-pin the clone at the old
ref.
The two git steps of a rollback, in order: fetch the pre-update
ref, then detach the marketplace clone onto it so claude plugin update resolves the version that manifest points at.
Run one claude plugin ... action without the trailing inventory
refresh, so a section-level run can interleave per-plugin work with
progress updates and refresh once at the end. Returns the resolved
claude path (reuse it across a run) plus the CLIโs combined
stdout+stderr - the update classifier needs the output, because the
CLI exits 0 on some failures.
Roll one plugin back to its recorded previous version: restore the
marketplace clone to the pre-update ref, let claude plugin update
install the version that manifest points at, then move the clone
forward again so other plugins keep tracking the latest. A failed
git or plugin-update step aborts with Err; only the trailing
clone-restore failure lands as [PluginRollbackOutcome:: RolledBackCloneParked].