Commit graph

17 commits

Author SHA1 Message Date
flemming-it
df6ab995d3 feat: featured flag on StoreEntry (v0.10.1)
Picks up the new `featured: bool` field in the StoreEntry
proto. No new client method — the flag is plumbed through
SearchStore. Studio reads it directly off the entry.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-07 21:05:03 +02:00
flemming-it
6efbdb2ff9 feat: fetchModuleDocs wrapper (v0.10.0)
Picks up HubAdmin.FetchModuleDocs. HubClient exposes it as
fetchModuleDocs(name) returning the FetchModuleDocsResponse
verbatim — Studio maps the error_kind to friendly copy.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-07 20:45:59 +02:00
flemming-it
90405e6fc3 feat: uninstallModule + daemonPaths wrappers (v0.9.0)
HubClient gains:
- daemonPaths() — typed access to the new DaemonPaths RPC.
- uninstallModule(name) — typed wrapper for UninstallModule.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-07 17:46:32 +02:00
flemming-it
6dc058344b feat: System-AI cache surface (v0.8.0)
Picks up cache-related additions in HubAdmin:
- AskAi gains `forceFresh` request flag and `cached` /
  `cachedAt` / `cacheHits` response fields.
- New ClearSystemLlmCache + ForgetCachedExplanation RPCs.
- SystemAiStatus carries `cacheCount` so the UI can render
  "Cache: N cached explanations".

HubClient exposes `clearSystemLlmCache()` returning the
purged count and `forgetCachedExplanation(prompt)` for the
Regenerate flow.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-07 17:29:26 +02:00
flemming-it
26d9d1f502 feat: clearEventLog wrapper (v0.7.1)
Picks up the new HubAdmin.ClearEventLog RPC. Exposed as
HubClient.clearEventLog(reviewer:, reason:) returning the
purged count + active channel for the caller to confirm.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-07 17:09:52 +02:00
flemming-it
4dad51da6d feat: hardwareInfo + listSystemAiCuratedModels RPCs (v0.7.0)
Regenerated protos pick up the two new HubAdmin RPCs. HubClient
exposes them as hardwareInfo() and listSystemAiCuratedModels(),
with HardwareInfoResponse, ListSystemAiCuratedModelsResponse,
CuratedModel re-exported as typedefs so callers don't import
the generated/ directory directly.

Studio uses the pair to colour-code models in the System-AI
editor against the operator's actual hardware.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-07 15:39:12 +02:00
flemming-it
f04da40751 feat: testSystemAi accepts draft config; list+pull models (v0.6.0)
`testSystemAi` now takes optional provider/endpoint/model/
apiKeyEnv/privacyMode params; the editor passes form values so
Test Connection works before Save. New `listSystemAiModels`
fetches the provider's `/v1/models` listing, `pullSystemAiModel`
calls Ollama's `/api/pull` synchronously.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-07 14:02:43 +02:00
flemming-it
8798119903 feat: updateSystemAi + testSystemAi RPCs (v0.5.0)
`HubClient.updateSystemAi(...)` persists a new System-AI config
to ~/.fai/config.yaml AND hot-reloads the live hub state in one
round-trip; returns the resulting SystemAiStatus so the UI
refreshes without a second call.

`HubClient.testSystemAi()` probes the configured provider with
a tiny ping and returns the same error-kind taxonomy as askAi.
Studio's "Test connection" button uses this.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-07 13:41:10 +02:00
flemming-it
f0db42264f feat: SystemAiStatus + AskAi RPCs (v0.4.0)
`HubClient.systemAiStatus()` reports whether the hub-internal LLM
hook is configured and which provider / privacy mode is active.
`HubClient.askAi(prompt)` issues a one-shot prompt and returns
the answer or a structured error kind so the UI can map each
failure to its inline-fix copy.

LoggedEvent gains `detail` upstream (no SDK change required).

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-07 13:18:22 +02:00
flemming-it
73dbdc16ef feat: store + install + channel status (v0.3.0)
Catches the Dart bindings up to the platform's gRPC additions:
  * `searchStore({query, category, tag, status, limit})` — wraps
    HubAdmin.SearchStore so Studio can build a Store browser
    page.
  * `installModule({source, expectedSha256})` — wraps
    HubAdmin.InstallModule so the operator can one-click install
    a `.fai` bundle from the UI.
  * `channelStatus()` — new HubAdmin.ChannelStatus RPC. Returns
    active channel name + per-channel running flag + endpoint.

Re-exports the new proto types (StoreEntry,
StoreSearchResponse, InstallModuleResponse, ChannelStatusResponse,
ChannelEntry) so callers don't import protobuf directly.

LoggedEvent gains a `detail` field (free-form JSON string)
upstream; the regenerated bindings expose it without further
work — Studio's audit drill-down renders it pretty-printed.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-07 11:54:30 +02:00
flemming-it
c5e11395fb feat: regenerate for HubAdmin.CheckUpdate (v0.2.0)
Adds `checkUpdate()` to HubClient and re-exports
`CheckUpdateResponse` so callers (Studio Doctor page) can render
update + offline states without importing protobuf directly.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-06 15:53:13 +02:00
flemming-it
9249fbe4f5 feat: HubClient.listFlows + runSavedFlow
Two more wrappers for Studio's new Flows page. Saved flows can
be listed (FlowSummary: name + path + size) and executed by
name with a map of named text inputs. Returns a SubmitResponse
whose `outputs` map carries the flow's declared outputs as
Payloads.

Common payload type re-exposed via the `Payload` typedef from
common.pb.dart so the Studio side can pattern-match on
text/json/bytes/file without dragging in proto imports.

Bumps fai_dart_sdk 0.4.0 -> 0.5.0.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-05 23:35:47 +02:00
flemming-it
4b67055fc7 refactor: share single ClientChannel between Hub and HubAdmin
Initial scaffold accidentally created three separate gRPC
channels (one for each of `_channel`, `_hub`, `_admin`).
Refactor to a single shared channel — cleaner, fewer file
descriptors, and `close()` actually closes everything now.
Idle timeout raised to 5 minutes so polling-style page loops
don't keep reconnecting.

No public-API change.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-05 22:51:19 +02:00
flemming-it
a2e3f4514a feat: HubClient.moduleInfo for Studio module-detail sheet
Wraps the existing HubAdmin.ModuleInfo RPC so Studio can
render a detail panel for one module without re-implementing
the proto types.

Bumps fai_dart_sdk 0.3.0 -> 0.4.0.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-05 22:13:49 +02:00
flemming-it
1eaa36b1a0 feat: HubClient.verifyEventChain + listServices
Mirrors the two new HubAdmin RPCs in fai_platform 0.10.44.
Studio's Doctor page consumes these directly. Generated proto
bindings refreshed to include VerifyEventChainResponse,
ServiceList, DeclaredService.

Bumps fai_dart_sdk 0.2.0 -> 0.3.0.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-05 22:05:40 +02:00
flemming-it
da10820959 feat: live HubClient with generated proto bindings
Proto codegen wired in. tools/generate.sh wraps protoc against
../fai_platform/proto/, including the well-known types (Empty,
Struct, Timestamp) so they are generated alongside fai's own
messages — protobuf 4.x doesn't ship them as importable Dart
types, so we have to generate them ourselves.

HubClient now exposes typed methods backed by real RPCs:
- healthy() — Hub.Health probe (returns false on connect refused).
- listCapabilities() — HubAdmin.ListCapabilities.
- eventLog() — HubAdmin.EventLog with type filter.
- listApprovals() — HubAdmin.ListApprovals (status filter).
- approve() / reject() — HubAdmin.DecideApproval.

Generated bindings under lib/src/generated/ are excluded from
analyze (out of our style control). protoc_plugin pinned to
22.2.0 in tools/generate.sh comment because newer plugins
generate code against protobuf 6.x, while grpc 4.x still
constrains us to protobuf 4.x.

Bumps fai_dart_sdk 0.1.0 -> 0.2.0.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-05 16:24:16 +02:00
flemming-it
d405a6a9bd 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>
2026-05-05 14:19:39 +02:00