Expand description
First-startup install + post-upgrade refresh hooks for the plugin marketplace layer.
Two distinct user journeys land here:
-
Fresh install — atomcode runs for the first time on a host that has never run it. The marker file
$ATOMCODE_HOME/.plugin_bootstrap_v1does not exist. Wegit clonethe defaultatomcode-skillsmarketplace and touch the marker. Failure (no network, no git on PATH, upstream down) is logged and swallowed — startup proceeds without skills. -
Existing user, just upgraded —
apply_pending_upgradere-exec’d into the new binary and setATOMCODE_UPGRADED_FROM. Wegit pull --ff-onlyevery installed marketplace so the skills track the new binary. Same swallowed-failure semantics.
The marker file makes (1) a one-time event. If the user later runs
/plugin uninstall atomcode-skills, the marker stays and we
respect their intent — no re-install on subsequent startups. To
force a re-bootstrap, the user can rm $ATOMCODE_HOME/.plugin_bootstrap_v1.
Both functions are best-effort and never propagate errors — atomcode must remain usable on offline machines, in air-gapped corporate environments, on systems without git, etc.
Constants§
- DEFAULT_
SKILLS_ URL - Public git URL for the default skills marketplace. The plugin installer dispatches on the SOURCE field (the URL we cloned from), so this string is the identity of the “default skills” entry.
Functions§
- run_
startup_ hooks - Entry point for both Plan A (auto-install default skills) and
Plan B (auto-update marketplaces after upgrade). Call once at
startup AFTER
Config::loadand AFTER any pending self-upgrade has re-exec’d. Synchronous — runsgitsubprocesses inline; budget roughly 1-3 s on a warm path, longer on first install.