package main import ( "context" pluginmgr "git.yeij.top/AskaEth/Cyrene_v2/internal/capability/plugin" "git.yeij.top/AskaEth/Cyrene_v2/internal/config/runtimeconfig" "git.yeij.top/AskaEth/Cyrene_v2/internal/logger" ) // wirePlugins builds the runtime plugin manager over the capability registry and // the gitignored plugins.json, then restores every persisted MCP server so an // installed plugin survives a restart. A server that is unreachable at boot is // logged and left in plugins.json (the owner can retry or uninstall it); boot // never fails because an external server is down. func (a *app) wirePlugins(ctx context.Context) { path := runtimeconfig.DefaultPluginsPath(resolveDataDir(a.cfg)) a.plugins = pluginmgr.NewManager(a.caps, path, logger.WithSource(a.log, "capability/plugin")) a.plugins.Restore(ctx) }