From 6ebec5e3aeede5c1f35b1ed0730d411d56f34c65 Mon Sep 17 00:00:00 2001 From: flemming-it Date: Mon, 25 May 2026 12:35:45 +0200 Subject: [PATCH] chore(proto): regenerate after CapabilityEntry.kind + accepts_mime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tracks the platform's hub.proto v0.11 update — adds the new fields to the generated Dart bindings: - `CapabilityEntry.kind` (string) — wasm / builtin / federated. Studio uses it to gate the Install button so built-ins like `system.approval` and federated MCP/n8n tools never get offered an install path that doesn't exist. - `ModuleInfoResponse.accepts_mime` (repeated string) — MIME allow-list declared in `module.yaml`. Studio reads it for file-picker filtering. No hand-edited code in this commit — `tools/generate.sh` output only. Signed-off-by: flemming-it Signed-off-by: flemming-it --- lib/src/generated/fai/v1/hub.pb.dart | 36 ++++++++++++++++++++++++ lib/src/generated/fai/v1/hub.pbjson.dart | 7 +++-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/lib/src/generated/fai/v1/hub.pb.dart b/lib/src/generated/fai/v1/hub.pb.dart index 5602d9b..52c8fea 100644 --- a/lib/src/generated/fai/v1/hub.pb.dart +++ b/lib/src/generated/fai/v1/hub.pb.dart @@ -336,6 +336,7 @@ class CapabilityEntry extends $pb.GeneratedMessage { $core.String? version, $core.String? moduleName, $core.String? moduleVersion, + $core.String? kind, }) { final $result = create(); if (capability != null) { @@ -350,6 +351,9 @@ class CapabilityEntry extends $pb.GeneratedMessage { if (moduleVersion != null) { $result.moduleVersion = moduleVersion; } + if (kind != null) { + $result.kind = kind; + } return $result; } CapabilityEntry._() : super(); @@ -361,6 +365,7 @@ class CapabilityEntry extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'version') ..aOS(3, _omitFieldNames ? '' : 'moduleName') ..aOS(4, _omitFieldNames ? '' : 'moduleVersion') + ..aOS(5, _omitFieldNames ? '' : 'kind') ..hasRequiredFields = false ; @@ -418,6 +423,24 @@ class CapabilityEntry extends $pb.GeneratedMessage { $core.bool hasModuleVersion() => $_has(3); @$pb.TagNumber(4) void clearModuleVersion() => $_clearField(4); + + /// Where this capability comes from. Studio gates install + /// affordances on this — only "wasm" caps have a bundle to + /// install. Empty string is treated as "wasm" for + /// backwards-compat with older hubs. + /// "wasm" — declared by an installed WASM module + /// "builtin" — implemented in the hub itself + /// (e.g. system.approval) + /// "federated" — discovered from an external MCP/n8n server; + /// not installable via the module-store path + @$pb.TagNumber(5) + $core.String get kind => $_getSZ(4); + @$pb.TagNumber(5) + set kind($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasKind() => $_has(4); + @$pb.TagNumber(5) + void clearKind() => $_clearField(5); } class ModuleInfoRequest extends $pb.GeneratedMessage { @@ -471,6 +494,7 @@ class ModuleInfoResponse extends $pb.GeneratedMessage { $core.Iterable<$4.CapabilityRef>? provides, $core.Iterable<$core.String>? permissions, $core.String? directory, + $core.Iterable<$core.String>? acceptsMime, }) { final $result = create(); if (name != null) { @@ -488,6 +512,9 @@ class ModuleInfoResponse extends $pb.GeneratedMessage { if (directory != null) { $result.directory = directory; } + if (acceptsMime != null) { + $result.acceptsMime.addAll(acceptsMime); + } return $result; } ModuleInfoResponse._() : super(); @@ -500,6 +527,7 @@ class ModuleInfoResponse extends $pb.GeneratedMessage { ..pc<$4.CapabilityRef>(3, _omitFieldNames ? '' : 'provides', $pb.PbFieldType.PM, subBuilder: $4.CapabilityRef.create) ..pPS(4, _omitFieldNames ? '' : 'permissions') ..aOS(5, _omitFieldNames ? '' : 'directory') + ..pPS(6, _omitFieldNames ? '' : 'acceptsMime') ..hasRequiredFields = false ; @@ -552,6 +580,14 @@ class ModuleInfoResponse extends $pb.GeneratedMessage { $core.bool hasDirectory() => $_has(4); @$pb.TagNumber(5) void clearDirectory() => $_clearField(5); + + /// MIME allow-list for bytes-shaped inputs, copied verbatim + /// from `module.yaml`'s `accepts_mime:` field. Empty means + /// "no declared restriction". Studio uses this to pre-filter + /// the OS file-picker so operators don't pick a file the + /// module would reject. + @$pb.TagNumber(6) + $pb.PbList<$core.String> get acceptsMime => $_getList(5); } class CheckPermissionRequest extends $pb.GeneratedMessage { diff --git a/lib/src/generated/fai/v1/hub.pbjson.dart b/lib/src/generated/fai/v1/hub.pbjson.dart index 04132a5..9cb289d 100644 --- a/lib/src/generated/fai/v1/hub.pbjson.dart +++ b/lib/src/generated/fai/v1/hub.pbjson.dart @@ -143,6 +143,7 @@ const CapabilityEntry$json = { {'1': 'version', '3': 2, '4': 1, '5': 9, '10': 'version'}, {'1': 'module_name', '3': 3, '4': 1, '5': 9, '10': 'moduleName'}, {'1': 'module_version', '3': 4, '4': 1, '5': 9, '10': 'moduleVersion'}, + {'1': 'kind', '3': 5, '4': 1, '5': 9, '10': 'kind'}, ], }; @@ -150,7 +151,8 @@ const CapabilityEntry$json = { final $typed_data.Uint8List capabilityEntryDescriptor = $convert.base64Decode( 'Cg9DYXBhYmlsaXR5RW50cnkSHgoKY2FwYWJpbGl0eRgBIAEoCVIKY2FwYWJpbGl0eRIYCgd2ZX' 'JzaW9uGAIgASgJUgd2ZXJzaW9uEh8KC21vZHVsZV9uYW1lGAMgASgJUgptb2R1bGVOYW1lEiUK' - 'Dm1vZHVsZV92ZXJzaW9uGAQgASgJUg1tb2R1bGVWZXJzaW9u'); + 'Dm1vZHVsZV92ZXJzaW9uGAQgASgJUg1tb2R1bGVWZXJzaW9uEhIKBGtpbmQYBSABKAlSBGtpbm' + 'Q='); @$core.Deprecated('Use moduleInfoRequestDescriptor instead') const ModuleInfoRequest$json = { @@ -173,6 +175,7 @@ const ModuleInfoResponse$json = { {'1': 'provides', '3': 3, '4': 3, '5': 11, '6': '.fai.v1.CapabilityRef', '10': 'provides'}, {'1': 'permissions', '3': 4, '4': 3, '5': 9, '10': 'permissions'}, {'1': 'directory', '3': 5, '4': 1, '5': 9, '10': 'directory'}, + {'1': 'accepts_mime', '3': 6, '4': 3, '5': 9, '10': 'acceptsMime'}, ], }; @@ -181,7 +184,7 @@ final $typed_data.Uint8List moduleInfoResponseDescriptor = $convert.base64Decode 'ChJNb2R1bGVJbmZvUmVzcG9uc2USEgoEbmFtZRgBIAEoCVIEbmFtZRIYCgd2ZXJzaW9uGAIgAS' 'gJUgd2ZXJzaW9uEjEKCHByb3ZpZGVzGAMgAygLMhUuZmFpLnYxLkNhcGFiaWxpdHlSZWZSCHBy' 'b3ZpZGVzEiAKC3Blcm1pc3Npb25zGAQgAygJUgtwZXJtaXNzaW9ucxIcCglkaXJlY3RvcnkYBS' - 'ABKAlSCWRpcmVjdG9yeQ=='); + 'ABKAlSCWRpcmVjdG9yeRIhCgxhY2NlcHRzX21pbWUYBiADKAlSC2FjY2VwdHNNaW1l'); @$core.Deprecated('Use checkPermissionRequestDescriptor instead') const CheckPermissionRequest$json = {