feat: fai_dart_sdk scaffold

Dart package skeleton for the F∆I gRPC client. Used by F∆I
Studio (Tier-2) and Tier-3 domain apps (DigiScout / J∆I /
Scout). Public surface — HubClient, HubEndpoint — is committed
as a typed stub so downstream apps can compile against it
immediately. Generated proto bindings land in a follow-up
commit once the codegen step (planned: tools/generate.sh
wrapping protoc-gen-dart against ../fai_platform/proto) is
wired in.

Future Forgejo path: fai/dart-sdk.

dart analyze: clean. dart test: 4/4.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-05-05 14:19:39 +02:00
commit d405a6a9bd
9 changed files with 216 additions and 0 deletions

View file

@ -0,0 +1,20 @@
// Example: connect to a locally-running FI hub.
//
// Run with `dart run example/fai_dart_sdk_example.dart`.
// Currently the SDK is a stub; once codegen lands, this example
// will exercise the actual Hub RPCs.
import 'package:fai_dart_sdk/fai_dart_sdk.dart';
Future<void> main() async {
final client = HubClient(
endpoint: const HubEndpoint(host: '127.0.0.1', port: 50051),
);
// ignore: avoid_print
print('would connect to ${client.endpoint}');
// ignore: avoid_print
print('(SDK is a stub today; live RPC arrives with codegen)');
await client.close();
}