Live-refresh connectors after marketplace reinstall
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:
2026-07-22 23:21:03 +01:00
parent aa4f31ec64
commit 42c0eaf2ec
4 changed files with 99 additions and 1 deletions
@@ -147,6 +147,19 @@ pub async fn set_enabled(pool: &SqlitePool, id: i64, enabled: bool) -> Result<()
Ok(())
}
/// Re-snapshots the LLM-facing description on an enabled global server, without
/// touching its config/credentials — used when a marketplace **reinstall** rewrites
/// the catalog's `llm_short_description` and the running server's snapshot must catch
/// up (the caller then restarts the server so its in-RAM description updates too).
pub async fn set_description(pool: &SqlitePool, id: i64, description: Option<&str>) -> Result<()> {
sqlx::query("UPDATE mcp_global_servers SET description = ?1 WHERE id = ?2")
.bind(description)
.bind(id)
.execute(pool)
.await?;
Ok(())
}
pub async fn delete(pool: &SqlitePool, id: i64) -> Result<()> {
sqlx::query("DELETE FROM mcp_global_servers WHERE id = ?")
.bind(id)