Provide a startup hook that detects plugin update availability for oh-my-opencode-slim, reports status through TUI toasts, and optionally performs a cache-safe bun install refresh.
Handle local dev mode and pinned plugin versions distinctly (file://, pinned tags, and latest channel semantics).
Design
createAutoUpdateCheckerHook(ctx, options) in index.ts registers an event handler for session.created and guards one-time startup execution (hasChecked).
runBackgroundUpdateCheck performs version resolution and branches into:
local-dev no-op path,
pinned plugin notification,
manual notification when autoUpdate=false,
or auto-update execution path.
checker.ts is the core discovery layer and exports: