Skip to content

feat(dependency): multi-repo script downloads via RepositoryRegistry#7335

Closed
MahtraDR wants to merge 2 commits intoelanthia-online:mainfrom
MahtraDR:phase05-repo-registry
Closed

feat(dependency): multi-repo script downloads via RepositoryRegistry#7335
MahtraDR wants to merge 2 commits intoelanthia-online:mainfrom
MahtraDR:phase05-repo-registry

Conversation

@MahtraDR
Copy link
Copy Markdown
Collaborator

Summary

  • Add RepositoryRegistry class for managing multiple GitHub repositories
  • Refactor ScriptManager to iterate registered repos instead of hardcoding dr-scripts URLs
  • DR users now get core scripts (alias, go2, map, etc.) downloaded from EO/scripts alongside dr-scripts
  • New global functions: track_script, untrack_script, list_tracked_scripts
  • Per-repo GitHub tree status caching
  • RepositoryRegistry wrapped in defined? guard for future core lich migration
  • 20 new specs for RepositoryRegistry and track/untrack functions

Registered repos

Repo Mode Behavior
dr-scripts :all Download every .lic at root (current behavior)
eo-scripts :explicit Download default core scripts + user additions

Default EO/scripts

alias.lic, autostart.lic, ewaggle.lic, go2.lic, jinx.lic, lich5-update.lic, log.lic, map.lic, repository.lic, vars.lic, version.lic

User interaction

;e track_script('bigshot')         # add bigshot.lic to eo-scripts tracking
;e untrack_script('bigshot')       # remove it
;e untrack_script('alias')         # blocked — default script
;e list_tracked_scripts            # show all repos and their tracked scripts
;e list_tracked_scripts('eo-scripts')  # show just one repo

Test plan

  • rspec spec/dependency_spec.rb — 96 examples, 0 failures
  • rubocop -A — no offenses
  • In-game: verify dr-scripts download unchanged
  • In-game: verify EO/scripts core scripts download on startup
  • In-game: verify track_script/untrack_script work
  • In-game: verify dependency_status shows registry info

🤖 Generated with Claude Code

MahtraDR and others added 2 commits March 19, 2026 13:49
Add RepositoryRegistry class that manages multiple GitHub repositories
for script downloads. ScriptManager now iterates all registered repos
instead of hardcoding dr-scripts URLs.

Registered repos:
- dr-scripts (mode: :all) — downloads every .lic at root (current behavior)
- eo-scripts (mode: :explicit) — downloads default core scripts + user additions

Default EO/scripts: alias, autostart, ewaggle, go2, jinx, lich5-update,
log, map, repository, vars, version

New global functions:
- track_script(name, repo) — add a script to an explicit repo's tracked list
- untrack_script(name, repo) — remove (blocked for defaults)
- list_tracked_scripts(repo) — show tracked scripts per repo

Per-repo status caching via Settings["status_#{repo_name}"].
RepositoryRegistry wrapped in defined? guard for future core lich migration.
Bumps dependency version to 2.5.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Settings['autostart'] is per-game global (shared across all characters)
but UserVars.autostart_scripts is per-character. The previous migration
cleared Settings after copying to the first character's UserVars,
causing all other characters to lose their global autostarts.

Fix: merge Settings['autostart'] into UserVars on every login as a
read-only baseline. Never clear it. Only log when the merge actually
changes something.

Users who already lost autostarts need to manually re-add them via
;e autostart(['script1', 'script2']) on affected characters.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MahtraDR
Copy link
Copy Markdown
Collaborator Author

Superseded by lich-5 PR #1273 which implements this functionality directly in core Lich via Lich::Util::Update (SCRIPT_REPOS registry, sync_repo, track/untrack, Terminal::Table output). No longer needed in dependency.lic.

@MahtraDR MahtraDR closed this Mar 20, 2026
@MahtraDR MahtraDR deleted the phase05-repo-registry branch March 20, 2026 11:14
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.

1 participant