feat(aibroker): hero_aibroker admin in hero_components (typed OpenRPC clients) #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_aibroker_admin"
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?
Adds the hero_aibroker service admin to the shared admin bundle, per the
web/hero_admin_ui.mdskill ("service repos ship no admin code"). No changesin the aibroker repo — only
hero_components_app. Once merged, the aibrokerrepo's
hero_aibroker_app+hero_aibroker_admincrates can be deleted.Approach
Built on generated typed OpenRPC clients (
openrpc_client!), per thedioxus_openrpc_clientskill, instead of the repo's usual untypedcall_at.One single-spec
Clientper domain (the browser-safe pattern — multi-domainbundles are native-only), generated from the broker's specs vendored under
src/aibroker/openrpc/.Tabs (
tabs_for("hero_aibroker"))The spec-driven defaults (Playground / Docs / MCP / Agent / Diagnostics) come
free and are domain-scoped over all 10 domains. Added service-specific panes:
listcatalog+models_catalog_refreshprovider_list/priority_*/provider_*_key(masked keys + key_health)api_key_list_full/create(key shown once) /set(enable·disable) /deletemother_list_full/set/deletemcp_health/list_servers/list_tools/refresh/add/remove_servermetrics_detailedchat(operator smoke test)Notes
rust-toolchain.toml(root + app) pins rustc 1.96 —required by herolib (the server via
hero_lifecycle, the app via thegenerated clients).
{request: ChatRequest}withcontentas the{text,parts}struct (verified against the live PR#166broker; the SDK's "flat" note is stale).
"aibroker"(prefix-matchesaibroker.*; not the cratetarget
hero_aibroker_serveror the socket namehero_aibroker).The macro-generated
*.client.generated.rsare gitignored.Client::newis wasm-only, the app no longer host-cargo checks;verify with
cargo check --target wasm32-unknown-unknown/dx build.Verification
cargo check --target wasm32(lib + bin) clean; no-raw-Bootstrap lint rulespass. Built with
make buildand run against a livehero_router+ PR#166broker: discovery healthy, the SPA + wasm bundle serve through the router, and
every pane's read calls return the expected typed shapes (42 models, 6
providers with masked keys, etc.).
Adds the hero_aibroker service admin to the shared admin bundle (no code in the aibroker repo), built on generated typed OpenRPC clients per the dioxus_openrpc_client skill rather than the repo's untyped call_at. - src/aibroker/client.rs: one openrpc_client! Client per domain (models/admin/chat), generated from vendored specs in src/aibroker/openrpc/. - src/aibroker/mod.rs: 8 panes — Models, Catalog (models domain); Providers, API Keys, Mothers, MCP, Metrics (admin domain); Chat (chat domain). Wired in main.rs tabs_for("hero_aibroker"); the spec-driven default tabs stay free and domain-scoped. - chat: request is wrapped {request: ChatRequest} with content as the {text,parts} struct (verified against the live PR#166 broker). - log_source_for("hero_aibroker") -> "aibroker" (prefix-matches aibroker.*). - rust-toolchain.toml (root + app): pin rustc 1.96 — required by herolib (the server via hero_lifecycle, the app via the generated clients). Verified against a live router + broker: discovery healthy, every pane's read calls return the expected typed shapes (42 models, 6 providers, ...), and the SPA + wasm bundle serve through hero_router. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>