Expand description
Plugin and marketplace actions over the command bus.
The work is reachable through crate::Command so that any view can
act, rather than one view reaching for the forge-agent CLI functions
this module calls from inside its own layer (rule 24βs case). The CLI
calls, the batch runner and the disk scan are forge-agentβs; what
lives here is the orchestration: resolving each actionβs working
directory from forge.toml rather than the launch directory (hard
rule 14), serializing actions one at a time, and reporting through the
Plugins* updates a view already listens to.
One run at a time: an update-all, a check and an action all
serialize through Workspace::plugin_action_running, and the latest
run stays readable mid-flight so a view attaching during one draws it.
Re-exportsΒ§
use std::path::PathBuf;πuse std::sync::Arc;πuse std::sync::atomic::Ordering;πuse std::time::Duration;πuse forge_agent::userdata::plugins::cli;πuse forge_agent::userdata::plugins::cli::UpdateRunner;πuse forge_primitives::plugins::InstalledPluginEntry;πuse forge_primitives::plugins::MarketplaceEntry;πuse forge_primitives::plugins::MarketplaceSourceEntry;πuse forge_primitives::plugins::PluginRunRowStatus;πuse forge_primitives::plugins::PluginUpdateRun;πuse forge_primitives::plugins::PluginUpdateRunRow;πuse forge_primitives::plugins::PluginUpdateTrigger;πuse forge_primitives::plugins::PluginsCliActionSuccess;πuse forge_primitives::plugins::PluginsInventorySnapshot;πuse forge_primitives::plugins::update_availability;πuse crate::protocol::DispatchError;πuse crate::protocol::SessionUpdate;πuse crate::workspace::Workspace;π
StructsΒ§
- Plugin
Action πGuard - Clears the single-action gate however its task ends, panic included: a crashed task that left the gate shut would refuse every later press with no way back.
- Plugin
Cli π - How the plugin actions reach
claudeand the disk. Real in every production build.
ConstantsΒ§
- PLUGIN_
CALL_ πTIMEOUT - Upper bound on one CLI call inside a batch; a hung call fails its row instead of pinning the run forever.
FunctionsΒ§
- fail_
action π - Report a failed action, or a refusal found before one could run, on the frame the page already listens for.
- plugin_
call_ πcwd - The working directory one plugin CLI call runs in.
- run_
action π - Run one CLI action and report its outcome on the
Pluginsframes. - run_
update_ πbatch - Run one update batch, reporting progress per row, persisting the rollback records it earns, and finishing with the refreshed inventory.
- scan_
inventory π - The disk scan, off the runtime.
- stale_
rows π - The run rows one update-all/check queues: exactly the stale installed entries, one per registry entry, each with the cwd its own scope runs in.
Type AliasesΒ§
- Plugin
CliFut π - One future handed back by the plugin CLI seams.
- Refresh
Fn π - RunAnd
Refresh π - ScanFn π