Reload ensures the tool cache reflects the current config. If config files differ from the last snapshot, a singleflight differential reconnect is driven and Reload waits for it. If the snapshot is current, Reload returns immediately. Starting and running the reload is manager-scoped. Caller conte
(ctx context.Context, paths []string)
| 172 | // may bound only that caller's wait for the reload result. They are |
| 173 | // never passed to, and must not suppress, the reload body. |
| 174 | func (m *Manager) Reload(ctx context.Context, paths []string) error { |
| 175 | ch, started, err := m.startReloadIfNeeded(paths) |
| 176 | if err != nil { |
| 177 | return err |
| 178 | } |
| 179 | if !started { |
| 180 | return nil |
| 181 | } |
| 182 | return m.waitReload(ctx, ch, 0) |
| 183 | } |
| 184 | |
| 185 | // MarkStartupSettled marks startup scripts as terminal for MCP |
| 186 | // config purposes. Missing config files after this point are a real |