feat(plugins): decouple runtime cache and add dynamic auto-generation
This commit is contained in:
5
.agents/AGENTS.md
Normal file
5
.agents/AGENTS.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Bootstrap Project Rules
|
||||
|
||||
## Repository Cleanliness & Runtime Separation
|
||||
- **No Repository Clutter**: Do not commit, track, or create runtime configuration, cache, or temporary files in the repository root.
|
||||
- **Dynamic Initialization**: All runtime-generated files (such as `plugin_sources.txt`, `lib/plugin_cache.sh`, or local plugin downloads) must reside strictly under the user's active `$BOOTSTRAP_DIR` (e.g., `~/.config/bootstrap`). The CLI must auto-generate or initialize these files dynamically at runtime if they are missing, ensuring a zero-configuration out-of-the-box experience.
|
||||
@@ -1,13 +0,0 @@
|
||||
# Auto-generated plugin cache. Do not edit manually.
|
||||
declare -g -A PLUGIN_URLS
|
||||
declare -g -A PLUGIN_VERSIONS
|
||||
declare -g -A PLUGIN_BOOTSTRAP_VERSIONS
|
||||
PLUGIN_VERSIONS["weather"]="1.0.0"
|
||||
PLUGIN_URLS["weather"]="https://git.adityagupta.dev/sortedcord/bootstrap/raw/branch/master/official_plugins/weather.sh"
|
||||
PLUGIN_BOOTSTRAP_VERSIONS["weather"]="2.1.0"
|
||||
PLUGIN_VERSIONS["sysinfo"]="1.0.0"
|
||||
PLUGIN_URLS["sysinfo"]="https://git.adityagupta.dev/sortedcord/bootstrap/raw/branch/master/official_plugins/sysinfo.sh"
|
||||
PLUGIN_BOOTSTRAP_VERSIONS["sysinfo"]="2.1.0"
|
||||
PLUGIN_VERSIONS["todo"]="1.0.0"
|
||||
PLUGIN_URLS["todo"]="https://git.adityagupta.dev/sortedcord/bootstrap/raw/branch/master/official_plugins/todo.sh"
|
||||
PLUGIN_BOOTSTRAP_VERSIONS["todo"]="2.1.0"
|
||||
@@ -38,6 +38,10 @@ fi
|
||||
# Source plugin system
|
||||
if [ -f "$BOOTSTRAP_DIR/lib/plugins.sh" ]; then
|
||||
. "$BOOTSTRAP_DIR/lib/plugins.sh"
|
||||
if [ ! -f "$BOOTSTRAP_DIR/lib/plugin_cache.sh" ]; then
|
||||
# Silently auto-generate cache if missing so official plugins are ready instantly
|
||||
update_plugin_cache >/dev/null 2>&1 || true
|
||||
fi
|
||||
if [ -f "$BOOTSTRAP_DIR/lib/plugin_cache.sh" ]; then
|
||||
. "$BOOTSTRAP_DIR/lib/plugin_cache.sh"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user