Skip to main content

Module plugins

Module plugins 

Source
Expand description

Plugin update history on the redb plugin_updates table: one row per installed entry (key plugin_id|scope), holding the latest update forge applied to it - what moved, from where, and the marketplace ref a rollback can restore. Values are serde-json.

Re-exportsΒ§

use std::collections::BTreeMap; πŸ”’
use anyhow::Context; πŸ”’
use redb::ReadableTable; πŸ”’
use redb::TableDefinition; πŸ”’
use super::Db; πŸ”’
use forge_primitives::plugins::PluginUpdateRecord; πŸ”’

ConstantsΒ§

PLUGIN_UPDATES πŸ”’

FunctionsΒ§

clear_update_record
Drop the record for one installed entry - the rollback a record made possible has been used, and there is no earlier version to go back to behind it.
record_key πŸ”’
The store key for one installed entry.
record_updates
Persist one batch of update outcomes in a single transaction, replacing any earlier record for the same installed entries. A mid-batch failure leaves nothing half-written.
update_records
Every remembered update, keyed by plugin_id|scope. A record that fails to decode is skipped with a warn so one corrupt blob can’t take the history down.