gRPC client SDK for the F∆I Platform hub (Dart/Flutter)
Find a file
flemming-it 023adcec31
Some checks failed
Security / Security check (push) Failing after 2s
chore(deps): grpc 4→5, protobuf 4→6
Two coupled majors that have been blocking the rest of the
Dart-side dependency lift in Studio (the constraint solver
pins meta/characters/etc. through these). Picked up:

- grpc 5.1.0 (was 4.2.0)
- protobuf 6.0.0 (was 4.2.0)
- analyzer 13.0.0, _fe_analyzer_shared 100.0.0
- google_cloud 0.5.0, googleapis_auth 2.3.1 (transitive)

The bindings now live in `lib/src/generated/fai/v1/` only —
the well-known-types `lib/src/generated/google/protobuf/`
copy has been deleted. protobuf 6 ships its own bundled
`well_known_types/google/protobuf/empty.pb.dart` and the
`HubAdminClient` API expects the *packaged* Empty type;
emitting a local copy created two distinct Empty types and
broke every `_admin.<rpc>(Empty())` call site.

`tools/generate.sh` now skips the WKT generation pass and
wipes `lib/src/generated/google/` on every run so the
duplicate-types breakage can't regress silently. The
import in `hub_client.dart` switches from the local copy to
`package:protobuf/well_known_types/google/protobuf/empty.pb
.dart`.

Smoke-verified: dart analyze clean, dart test green
(4 tests). Bumped to 0.17.0 — Studio absorbs in the next
commit.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-29 14:35:05 +02:00
.forgejo/workflows ci(security): add self-test harness (mirror of fai/platform) 2026-05-10 21:41:24 +02:00
.githooks ci(hooks): pre-commit security check (mirror of fai/platform) 2026-05-09 13:32:44 +02:00
example chore: rename package + dir + repo to fai_client_sdk 2026-05-26 13:46:16 +02:00
lib chore(deps): grpc 4→5, protobuf 4→6 2026-05-29 14:35:05 +02:00
test chore: rename package + dir + repo to fai_client_sdk 2026-05-26 13:46:16 +02:00
tools chore(deps): grpc 4→5, protobuf 4→6 2026-05-29 14:35:05 +02:00
.gitignore feat: fai_dart_sdk scaffold 2026-05-05 14:19:39 +02:00
analysis_options.yaml feat: live HubClient with generated proto bindings 2026-05-05 16:24:16 +02:00
CHANGELOG.md feat: fai_dart_sdk scaffold 2026-05-05 14:19:39 +02:00
pubspec.yaml chore(deps): grpc 4→5, protobuf 4→6 2026-05-29 14:35:05 +02:00
README.md chore: rename package + dir + repo to fai_client_sdk 2026-05-26 13:46:16 +02:00

fai_client_sdk (Dart)

gRPC client SDK for the F∆I Platform hub. Used by F∆I Studio (Tier-2 generic GUI) and any Tier-3 Dart/Flutter domain app that wants to talk to a running fai serve.

One of the three SDK families documented in fai/platform/docs/architecture/sdks.md:

  • fai-module-sdk (Rust) — flow modules
  • fai-plugin-sdk (Rust) — Studio plugins
  • fai_client_sdk (Dart) — clients ← this package

Dir / repo carries the _dart / -dart language suffix (fai_client_sdk_dart / client-sdk-dart); the Dart package name itself does not (Dart-land doesn't need the suffix).

Status (2026-05-05): scaffold. Public surface (HubClient, HubEndpoint) is committed; generated proto bindings land in a follow-up commit once the codegen step is wired in. Until then, downstream apps can compile against the stub and Studio uses mock data.

Why a separate SDK package

The platform hub speaks gRPC. Each Dart consumer (Studio plus each Tier-3 domain app) would otherwise re-generate proto bindings independently and write near-identical client boilerplate. This package centralises that work:

  • One source of generated proto bindings.
  • One typed HubClient wrapper with helpers.
  • One place to bump when the wire protocol evolves.

Layout

fai_client_sdk_dart/
├── lib/
│   ├── fai_client_sdk.dart        # Public API
│   └── src/
│       ├── hub_client.dart        # Typed client wrapper
│       ├── channel_factory_io.dart   # Native ClientChannel (HTTP/2)
│       ├── channel_factory_web.dart  # GrpcWebClientChannel.xhr (HTTP/1.1)
│       └── generated/             # protoc output (committed; pinned to platform tag)
├── tools/
│   └── generate.sh                # Wraps `protoc --dart_out=...` against ../fai_platform/proto
├── example/
└── pubspec.yaml

Repo placement

Published as fai/client-sdk-dart on Forgejo (git.flemming.ai).

Versioning

Tracks the platform's wire-protocol version, not the platform binary version. As long as fai:platform@1.x is current, this SDK stays at 0.x (will move to 1.0 once API stabilises); when fai:platform@2.0 lands, a 2.x SDK ships in parallel during the transition.