Skip to main content

Module cli

Module cli 

Source

Structs§

BatchOut
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.
BatchPlan
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.
PluginDetails
A plugin’s claude plugin details projection: the always-on token cost every session pays for the plugin being installed.
UpdateOutcome
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.
UpdateRunner
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.

Enums§

PluginRollbackOutcome
How a rollback’s CLI steps landed.

Functions§

execute_update_batch
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_plugin_details
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.
inventory_from_disk_blocking
The disk-only inventory: registry, settings and manifests, no claude spawn. The TTL refresh path runs this; None when no plugins root resolves.
marketplace_head
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.
output_states_restart_required
The CLI’s own contract: an applied update lands only after a restart, stated in the update output.
plugin_details
One plugin’s claude plugin details projection.
plugin_update_args
The claude plugin update invocation for one installed entry.
refresh_inventory
run_cli_command
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.
run_cli_command_and_refresh
run_plugin_rollback
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].
update_plugin
Update one installed plugin in one scope.

Type Aliases§

RunnerFut
One future handed back by the UpdateRunner seams.
RunnerRefreshResult
The refresh seam’s result: the inventory plus a resolved claude path.
RunnerUpdateResult
The update seam’s result: the resolved claude path plus the CLI’s combined stdout+stderr.