feat: runSavedFlow accepts file (bytes) inputs (v0.14.0)

Studio's Flows tab couldn't run any sample flow with a
binary input (extract / extract-summarize / …) because
runSavedFlow only knew how to wrap textInputs as text
Payloads. Operators saw the hub return
"step references missing value '\$inputs.document'" because
the document key never made it into the request.

`runSavedFlow` is now mixed-mode:

  Future<SubmitResponse> runSavedFlow({
    required String name,
    Map<String, String> textInputs = const {},
    Map<String, Uint8List> fileInputs = const {},
  })

Both maps default to empty so existing text-only callers
keep working without code changes — the previous required
`textInputs:` parameter is now optional with a default. File
entries get wrapped as `Bytes` Payloads with
`application/octet-stream` MIME — good enough for the
text.extract / text.summarize chain that the bundled flows
exercise. Per-file MIME-type override is a follow-up if any
operator workflow ever needs it.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-05-09 02:07:07 +02:00
parent 45f60ef77b
commit 193f59302a
2 changed files with 24 additions and 6 deletions

View file

@ -1,6 +1,6 @@
name: fai_dart_sdk
description: gRPC client SDK for the F∆I Platform hub. Used by F∆I Studio and Tier-3 domain apps.
version: 0.13.0
version: 0.14.0
publish_to: 'none'
repository: https://git.flemming.ws/fai/dart-sdk