chain-studio/lib/data
flemming-it c5a96bc8d4
Some checks failed
Security / Security check (push) Failing after 1s
feat(settings): hub bearer-token panel + auto-attach on every RPC
Studio gains a new "HUB AUTHENTICATION" panel in Settings
mirroring the existing registry-credentials panel:

- `lib/data/hub_auth_token.dart` — `~/.fai/hub-auth-token`
  helper (read / write / clear, mode 0600 on Unix). Sister
  of `RegistryToken` with the same on-disk hygiene.
- `HubService.loadPersistedEndpoint` now reads the token at
  startup and reconnects with it. `reconnect()` grew an
  `authToken:` parameter with a sentinel that distinguishes
  "keep current" from "drop". `reloadAuthToken()` is the
  one-liner Settings calls after save / clear.
- `_HubAuthTokenPanel` in `fai_settings_dialog.dart` — paste
  with show/hide toggle, save button, clear button, status
  pill ("Configured (40 chars)" / "Not set (anonymous)"),
  storage-location hint. Trimmed token length only — the
  secret never round-trips back into the UI after save.
- EN + DE ARB entries (`hubAuthToken*`) + regenerated
  `app_localizations.dart` keep the bilingual surface
  consistent.

The hub side (auth.tokens config + tower middleware) shipped
on the platform side 2026-05-28 (43a54a2). Until now an
operator had no GUI path to consume it: they had to find the
file in their home dir, paste the token by hand, and bounce
Studio. This panel closes that loop.

Bumped pubspec to 0.47.0. dart analyze clean (No issues
found!); flutter test green (11 tests pass).

Block E item 1 of 4 done. Capability-picker badges,
default_scope editor, multi-version uninstall picker follow.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-28 23:24:15 +02:00
..
flow_output.dart chore(studio): switch to fai_client_sdk (renamed from fai_dart_sdk) 2026-05-26 13:46:32 +02:00
format.dart feat(studio): typed flow outputs + on-disk docs + UX polish 2026-05-25 11:17:58 +02:00
friendly_error.dart chore(studio): switch to fai_client_sdk (renamed from fai_dart_sdk) 2026-05-26 13:46:32 +02:00
hub.dart feat(settings): hub bearer-token panel + auto-attach on every RPC 2026-05-28 23:24:15 +02:00
hub_auth_token.dart feat(settings): hub bearer-token panel + auto-attach on every RPC 2026-05-28 23:24:15 +02:00
registry_token.dart feat(studio): registry credentials panel in Settings (v0.44.0) 2026-05-09 13:38:47 +02:00
system_actions.dart feat(studio): hub maintenance panel with reset action (v0.45.0) 2026-05-09 18:52:19 +02:00
theme_plugin.dart feat(studio): surface provider + sourceKind + versionAdvisory on CapabilityInfo 2026-05-28 10:54:48 +02:00
today_story_loader.dart feat(studio): daily Today-Hero proposal pipeline (v0.31.0) 2026-05-08 12:59:33 +02:00