Skip to content

feat(skills): remote registry sync with /skills sync command (closes #433)#654

Merged
Hmbown merged 3 commits into
Hmbown:mainfrom
merchloubna70-dot:feat/skill-registry-433
May 5, 2026
Merged

feat(skills): remote registry sync with /skills sync command (closes #433)#654
Hmbown merged 3 commits into
Hmbown:mainfrom
merchloubna70-dot:feat/skill-registry-433

Conversation

@merchloubna70-dot

Copy link
Copy Markdown

Summary

  • Adds sync_registry to crates/tui/src/skills/install.rs: fetches index.json from the configured [skills] registry_url, resolves each entry to its download URL (same GitHub main/master fallback logic as /skill install), checks ETag + SHA-256 for freshness, and writes SKILL.md or a full unpacked tarball into ~/.deepseek/cache/skills/<name>/. A .cache-meta.json sidecar persists freshness state so subsequent syncs skip unchanged skills in O(1) round-trips.
  • Adds /skills sync slash command in crates/tui/src/commands/skills.rs, dispatched from list_skills when the arg is sync or --sync. Per-skill failures are non-fatal; the command prints a [+]/[=]/[!] summary and a final tally.
  • Updates COMMANDS usage string in mod.rs to /skills [--remote|sync].
  • Exports default_cache_skills_dir, SkillSyncOutcome, and SyncResult from skills/mod.rs.

Design decisions

Concern Choice
Freshness ETag (If-None-Match → 304) + SHA-256 fallback for CDNs that strip ETags
Cache location ~/.deepseek/cache/skills/ (separate from user-installed ~/.deepseek/skills/)
Tarball detection URL suffix .tar.gz/.tgz or gzip magic bytes 0x1f 0x8b
Per-skill failure Non-fatal — sync continues, error surfaced in summary
Registry loop guard Registry(…) source in index.json → immediate Failed outcome

Test plan

  • cargo +nightly check passes (confirmed: Finished dev profile [unoptimized + debuginfo], 0 errors, 0 warnings)
  • /skills sync with a valid registry_url downloads skills into ~/.deepseek/cache/skills/
  • Second run reports [=] (up-to-date) for unchanged skills
  • /skills --remote still lists registry entries as before
  • Network-denied host surfaces [x] outcome, not a panic

🤖 Generated with Claude Code

macworkers and others added 3 commits May 4, 2026 12:39
All system prompts were English-only, causing DeepSeek V4 to reason
and respond in English even when users wrote in Chinese or other
languages.

Add a Language Mirror section to base.md and base.txt that instructs
the model to detect the user's primary language and use it for both
reasoning (thinking tokens) and the final reply.
base.txt is not referenced via include_str! in prompts.rs.
Only base.md is loaded (BASE_PROMPT). Remove the redundant change
to base.txt as noted by Gemini Code Assist review.
…mbown#433)

Add `sync_registry` to `skills/install.rs` that pulls `index.json` from the
configured `[skills] registry_url`, resolves each entry to a download URL,
checks ETag + SHA-256 for freshness, and writes SKILL.md (or the full
unpacked tarball) into `~/.deepseek/cache/skills/<name>/`.  A `.cache-meta.json`
sidecar records the ETag and hash so subsequent syncs skip unchanged skills in
one round-trip.

Wire the new `/skills sync` slash-command in `commands/skills.rs` (dispatched
from `list_skills`) and update the `COMMANDS` usage string in `mod.rs` to
`/skills [--remote|sync]`.  The per-skill failure model is non-fatal: the
command prints a per-entry `[+]`/`[=]`/`[!]` summary and returns a final
tally.  `default_cache_skills_dir` and the new outcome types are re-exported
from `skills/mod.rs` for downstream consumers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@ILoveScratch2

Copy link
Copy Markdown

谁家PR机器人

Hmbown added a commit that referenced this pull request May 5, 2026
47 fmt drifts had accumulated from the squash-merged community PRs on
this branch (#653, #654, #655, #645, #658, #668, #659, #661, #660,
#667, #656). Pure formatting — no behavioural changes — applied via
`cargo fmt --all` to satisfy CI's `cargo fmt --all -- --check` gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Hmbown Hmbown merged commit caf1ac2 into Hmbown:main May 5, 2026
1 check passed
MMMarcinho pushed a commit to MMMarcinho/DeepSeek-TUI that referenced this pull request May 6, 2026
MMMarcinho pushed a commit to MMMarcinho/DeepSeek-TUI that referenced this pull request May 6, 2026
47 fmt drifts had accumulated from the squash-merged community PRs on
this branch (Hmbown#653, Hmbown#654, Hmbown#655, Hmbown#645, Hmbown#658, Hmbown#668, Hmbown#659, Hmbown#661, Hmbown#660,
Hmbown#667, Hmbown#656). Pure formatting — no behavioural changes — applied via
`cargo fmt --all` to satisfy CI's `cargo fmt --all -- --check` gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

3 participants