modernize ai_rhai for broker-first herolib_ai (child of home#219) #16
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_lib_rhai#16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
crates/ai_rhaiis bound to the pre-rewriteherolib_aiAPI. After the broker-first AI architecture landed onhero_lib(commitlhumina_code/hero_lib@bb69b40arefactor(ai): rewrite as broker-first architecture), this binding crate no longer compiles against currenthero_libdevelopment.This is a child task of home#219 — apps consume LLM/voice via hero_lib AI client → hero_aibroker. hero_lib_rhai is in the same offender bucket as hero_biz#15 — it instantiates a Rhai surface against the old client.
How this surfaced
Filed during session 65 of the home#212 build-binaries arc. PR #15 unblocked the first CI release by rev-pinning all 14
herolib_*deps to commitab985c901e591e69c06fd0abd924a6159c8cc77d(the merge point of the deleteddevelopment_casperbranch). That kept v0.1.0-rc2 bit-identical to the last known-good source state but preserves the pre-rewrite API debt.When we switched the deps to
branch = "development"to test,cargo check --workspacereturned 39 errors incrates/ai_rhai/src/lib.rsclustered into a few API-change patterns:client.generate_image_to_file(model, prompt, path, config)client.generate_image(...)returnsImageGenerationResponse; file save now goes through the response object (seelhumina_code/hero_lib@633810f6feat(ai): ImageRef enum with sync URL/path/bytes resolutionandlhumina_code/hero_lib@19ffd708feat(ai): image generation builder with local-file & multi-image support)Model::all()(iterator over registered models)Modelis no longer iterable. Replaced byModel::new(...)/Model::pinned(...).Model::name()(and several closure-typed.map(|m| ...)callsites)hero_aibroker.Acceptance
crates/ai_rhai/src/lib.rscompiles against currenthero_libdevelopmentHEADcargo check --workspace --target x86_64-unknown-linux-muslcleanherolib_*deps inCargo.tomlswitched fromrev = "ab985c9…"back tobranch = "development"(matchingherolib_coreand the other workspace deps)hero_aibroker(not direct providers), per home#219Related