rlsbl.targets.codehome

Codehome plugin repository target.

Each codehome plugin (or plugin group) lives in its own git repo with a plugin.json at the root. Version management is standard: bump plugin.json, tag v1.2.3, push. Push IS delivery -- codehome polls repos for newer tags.

Plugin Registry Format ---------------------- A central registry file (plugins.json) lists all known plugin repos so that codehome can discover them without scanning GitHub. The schema:

{ "plugins": [ { "name": "supervisor", "repo": "https://github.com/smm-h/supervisor", "description": "Worktree, branch, and git management", "plugins_provided": ["supervisor", "worktree", "branch-tools"] } ] }

Fields:

(from plugin.json "plugins_provided"; falls back to [name] if absent)

Versions are NOT stored in the registry -- they are discovered at runtime by checking git tags on each repo.

Functions

validate_plugin_json

def validate_plugin_json(data)

Validate plugin.json has required fields.

generate_registry_entry

def generate_registry_entry(dir_path)

Generate a registry entry dict from the current plugin repo.

Reads plugin.json and returns a dict suitable for inclusion in a plugin registry (plugins.json): { "name": "supervisor", "repo": "https://github.com/smm-h/supervisor", "description": "Worktree, branch, and git management", "plugins_provided": ["supervisor", "worktree"] }

If plugin.json is missing, raises FileNotFoundError. If git remote "origin" is not configured, the "repo" field is omitted.

_get_git_remote_url

def _get_git_remote_url(dir_path)

Get the HTTPS URL of the git remote 'origin', or None.

Normalizes SSH URLs (git@github.com:user/repo.git) to HTTPS form. Strips trailing .git suffix for cleaner URLs.

Classes

CodehomeTarget

build

def build(self, dir_path, version)

Validate plugin.json schema before release.