// Store-resolvability: which capabilities can the store actually // install? This is the data source behind the flow editor's // "Install" quick-fix and the flow list's install badge — it must // mirror the hub's install resolver (exact entry name, an // installable version, native bundle), or the UI offers installs // that end in "no store entry for ''". import 'hub.dart'; /// Bare capability names a store entry can install right now. /// /// Mirrors the hub's `resolve_install_plan` acceptance rules: /// - only the entry's own `name` counts — `requiresCapabilities` /// are the entry's DEPENDENCIES, not things it provides, and /// must never be offered as installable; /// - `planned` entries have no downloadable version yet; /// - `federated` entries route through a bridge (MCP/n8n), not /// the bundle-install path. /// An empty `status` (older hub without the field) keeps the /// entry installable — the classified install error is the net /// underneath that skew. Set installableStoreCapabilities(Iterable items) { final caps = {}; for (final item in items) { if (item.isFederated) continue; if (item.status == 'planned') continue; caps.add(item.name); } return caps; }