Skip to content

feat(librechat): live-sync workspace skills without a redeploy#777

Merged
hsinatfootprintai merged 1 commit into
mainfrom
feat/librechat-skills-livesync
Jun 22, 2026
Merged

feat(librechat): live-sync workspace skills without a redeploy#777
hsinatfootprintai merged 1 commit into
mainfrom
feat/librechat-skills-livesync

Conversation

@hsinatfootprintai

Copy link
Copy Markdown
Contributor

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:

  • Refactor 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 timer.
  • sync-skills.sh polls the cloud's /v1/recipes/workspace/skills with the
    in-box MCP token, re-renders modelSpecs, and restarts LibreChat only when the
    rendered config actually changed
    (preserving the endpoints head).
  • A systemd timer (OnUnitActiveSec=60) runs it; armed only when MCP is
    wired
    (it reuses that token + server URL). Without MCP the box keeps its
    deploy-time skills.

Test

  • go test ./pkg/core/recipes/ + YAML parse green.
  • Generator verified for bare-array and object inputs (multi-line prompts safe).
  • sync-skills.sh exercised against a mock endpoint: updates on change (head
    preserved), 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

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>
@hsinatfootprintai hsinatfootprintai merged commit 98c658f into main Jun 22, 2026
8 checks passed
@hsinatfootprintai hsinatfootprintai deleted the feat/librechat-skills-livesync branch June 22, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants