Restructure to Hero Service 5-crate standard (issue #6) #9
No reviewers
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_aibroker!9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_standardize"
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?
Summary
Restructure hero_aibroker to follow the hero_service.md 5-crate standard (issue #6).
Crate Layout
hero_aibrokerhero_aibroker_openrpchero_aibroker_openrpc~/hero/var/sockets/hero_aibroker.sock)hero_aibroker_httphero_aibroker_httphero_aibroker_client_http's/rpcendpoint)hero_aibroker_clihero_aibroker_clihero_aibroker_rhaiWhat Changed
llmbroker→hero_aibroker(pure library, no binary)hero_aibroker_sdk→hero_aibroker_clientllmbroker_cli→hero_aibroker_clihero_aibroker_openrpc— newline-delimited JSON-RPC server withrpc.discover,rpc.health, and all admin methods (models.*,apikeys.*,metrics.*,logs.*,mcp.*)hero_aibroker_ui+ HTTP server intohero_aibroker_http— serves admin dashboard, OpenAI-compat endpoints (/v1/*), and proxies/rpc/proxyto the backend Unix socketllmbroker,hero_aibroker_sdk,hero_aibroker_ui,llmbroker_clicrates--bind unix:/pathfor hero_proxy or--bind host:portfor TCP (default127.0.0.1:3385)/.well-known/heroservice.jsonDesign Note
aibroker is a global service (not context-aware) — single socket, no per-context routing. The OpenAI-compat HTTP endpoints require streaming SSE and multipart uploads, so
_httpuses the core library directly for/v1/*rather than proxying through the raw JSON-RPC backend.Test Plan
cargo check --workspace— zero errorscargo test --workspace— 12 tests passhero_aibroker_openrpc,hero_aibroker_http,hero_aibroker_clihero_aibroker_httpserves admin dashboard at/hero_aibroker_openrpcbinds Unix socket and responds torpc.health