feat(studio): surface provider + sourceKind + versionAdvisory on CapabilityInfo
Some checks failed
Security / Security check (push) Failing after 1s

Studio's UI-side `CapabilityInfo` record now carries the
three fields that the F∆I 0.12.0 hub exposes on
CapabilityEntry:

  - `provider` — publisher identity ("fai", "fai.system",
    "bmds.spark", ...)
  - `sourceKind` — transport ("bundle", "system", "mcp",
    "n8n", "temporal", "webhook")
  - `versionAdvisory` — true for federation sources whose
    version pin is a label, not a contract

`allCapabilities()` populates them from the freshly-regenerated
protobuf bindings. Defaults are backward-compatible (empty
strings + false) so a pre-0.12 hub still works against this
Studio build.

Badge rendering in the capability picker / store grid lands
in a follow-up Studio commit; this change is the data-layer
plumbing only. dart analyze green.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-05-28 10:54:48 +02:00
parent a5bd51de33
commit d697339393
3 changed files with 38 additions and 21 deletions

View file

@ -135,6 +135,9 @@ class HubService {
version: c.version,
moduleName: c.moduleName,
kind: c.kind.isEmpty ? 'wasm' : c.kind,
provider: c.provider,
sourceKind: c.sourceKind,
versionAdvisory: c.versionAdvisory,
))
.toList();
}
@ -915,12 +918,27 @@ class CapabilityInfo {
final String version;
final String moduleName;
final String kind;
/// Publisher segment of the fully-qualified identifier.
/// "fai" for legacy bundles, "fai.system" for built-ins,
/// operator-config service name for federated capabilities.
final String provider;
/// Transport that delivers the capability: bundle / system /
/// mcp / n8n / temporal / webhook. Empty string falls back
/// to deriving from `kind` for pre-0.12 hubs.
final String sourceKind;
/// Whether the version on this capability is a label rather
/// than a hard contract. True for federation sources whose
/// upstream service does not honour semver.
final bool versionAdvisory;
const CapabilityInfo({
required this.capability,
required this.version,
required this.moduleName,
required this.kind,
this.provider = '',
this.sourceKind = '',
this.versionAdvisory = false,
});
}