Live-refresh connectors after marketplace reinstall
Nightly Build / build (push) Successful in 6m45s
Nightly Build / build (push) Successful in 6m45s
After a reinstall the catalog entry carries new llm_short_description, icon and code. Previously the running servers (global + per-user) kept their old metadata and code until the next login. - Add refresh_connector_after_reinstall on Skald: re-snapshots the description from the catalog, reconciles local files on per-user connectors, and restarts both the global and per-user servers - Add set_description db accessor for mcp_global_servers - user_row_spec_resolved now injects the live catalog description (over the bare name) so user-runtime connectors show the right blurb - marketplace install() fetches a fresh feed instead of the browse cache, so a reinstall reflects the changed manifest immediately
This commit is contained in:
@@ -660,7 +660,12 @@ pub async fn install(
|
||||
) -> Result<Json<Value>, ApiError> {
|
||||
require_cap(&skald, &auth.user_id, role_capabilities::MANAGE_CATALOG).await?;
|
||||
|
||||
let feed = feed(false).await?;
|
||||
// An install (or reinstall) always pulls the **current** feed, never the 300 s
|
||||
// browse cache: a reinstall exists precisely to pick up a changed manifest
|
||||
// (new `llm_short_description`, icon, code), so reading a stale snapshot would
|
||||
// silently reapply the old metadata. Browsing the list stays cached; the
|
||||
// mutating path fetches fresh.
|
||||
let feed = feed(true).await?;
|
||||
let h = feed
|
||||
.iter()
|
||||
.find(|h| h.entry.id == body.id)
|
||||
@@ -789,6 +794,14 @@ pub async fn install(
|
||||
)
|
||||
.await?;
|
||||
|
||||
// Push the (re)installed metadata + code into anything already running it, so a
|
||||
// reinstall lands live instead of waiting for each user's next login: enabled
|
||||
// global servers re-snapshot the description and restart; each live user who
|
||||
// activated it gets its files/deps reconciled and the connector restarted with
|
||||
// the fresh `llm_short_description`. A first-time install matches nothing live
|
||||
// and is a cheap no-op.
|
||||
skald.refresh_connector_after_reinstall(&body.id).await;
|
||||
|
||||
Ok(Json(json!({
|
||||
"id": id,
|
||||
"name": h.entry.id,
|
||||
|
||||
Reference in New Issue
Block a user