feat(librechat): live-sync workspace skills without a redeploy#777
Merged
Conversation
Installing/uninstalling a skill in the Workspace panel previously only
reflected in a box on the NEXT redeploy (the modelSpecs were baked at
deploy). Add an in-box live-sync: a sync-skills.sh + systemd timer polls
the cloud's /v1/recipes/workspace/skills (with the in-box MCP token),
re-renders modelSpecs via the now-file-based gen_modelspecs.py, and
restarts LibreChat ONLY when the rendered config changed (rare). The timer
is armed only when MCP is wired (reuses that token + server URL).
Refactors the inline modelspec generator into /opt/lc/gen_modelspecs.py
(reads skills JSON on stdin — bare array or {"skills":[...]}), reused by
both the deploy-time render and the sync timer. Validated: generator for
both input shapes; sync updates on change, preserves the endpoints head,
and is idempotent on no-change.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OSS half of live skill sync (pairs with the cloud read endpoint Containarium-cloud#676).
Problem
Installing/uninstalling a skill in the Workspace panel only reflected in a box on
its next redeploy — the modelSpecs were baked at deploy time. The persona
selector went stale.
What
An in-box live-sync that refreshes personas within ~60s, no redeploy:
/opt/lc/gen_modelspecs.py(reads skills JSON on stdin — bare array or
{"skills":[...]}), reused byboth the deploy-time render and the timer.
sync-skills.shpolls the cloud's/v1/recipes/workspace/skillswith thein-box MCP token, re-renders modelSpecs, and restarts LibreChat only when the
rendered config actually changed (preserving the endpoints head).
OnUnitActiveSec=60) runs it; armed only when MCP iswired (it reuses that token + server URL). Without MCP the box keeps its
deploy-time skills.
Test
go test ./pkg/core/recipes/+ YAML parse green.sync-skills.shexercised against a mock endpoint: updates on change (headpreserved), idempotent on no-change.
Rollout
Needs an OSS release + workhorse roll (recipe is embedded in the daemon). New/
redeployed boxes get the timer; thereafter skill changes sync without redeploy.
🤖 Generated with Claude Code