Rename _openrpc → _server, _http → _ui, _client → _sdk crates #22

Closed
opened 2026-03-10 09:40:19 +00:00 by timur · 6 comments
Owner

Problem

The crate naming doesn't follow the Hero service naming convention (/hero_crates_best_practices_check).

Current state

Current crate Convention says
hero_aibroker_openrpc hero_aibroker_server
hero_aibroker_http hero_aibroker_ui
hero_aibroker_client hero_aibroker_sdk
hero_aibroker_rhai delete (Rhai bindings handled externally)
(missing) hero_aibroker_examples

What to do

  1. Rename crates/hero_aibroker_openrpc/crates/hero_aibroker_server/
    • Update Cargo.toml package name, [[bin]] name, all internal references
    • Update socket file from hero_aibroker_openrpc.sockhero_aibroker_server.sock
  2. Rename crates/hero_aibroker_http/crates/hero_aibroker_ui/
    • Update package name, binary name, socket name
  3. Rename crates/hero_aibroker_client/crates/hero_aibroker_sdk/
    • Update package name, all dependents
  4. Remove crates/hero_aibroker_rhai/ from workspace
  5. Create crates/hero_aibroker_examples/ with health + basic_usage examples
  6. Update workspace Cargo.toml members list
  7. Update Makefile references

Reference

## Problem The crate naming doesn't follow the Hero service naming convention (`/hero_crates_best_practices_check`). ## Current state | Current crate | Convention says | |---------------|----------------| | `hero_aibroker_openrpc` | `hero_aibroker_server` | | `hero_aibroker_http` | `hero_aibroker_ui` | | `hero_aibroker_client` | `hero_aibroker_sdk` | | `hero_aibroker_rhai` | **delete** (Rhai bindings handled externally) | | (missing) | `hero_aibroker_examples` | ## What to do 1. Rename `crates/hero_aibroker_openrpc/` → `crates/hero_aibroker_server/` - Update `Cargo.toml` package name, `[[bin]]` name, all internal references - Update socket file from `hero_aibroker_openrpc.sock` → `hero_aibroker_server.sock` 2. Rename `crates/hero_aibroker_http/` → `crates/hero_aibroker_ui/` - Update package name, binary name, socket name 3. Rename `crates/hero_aibroker_client/` → `crates/hero_aibroker_sdk/` - Update package name, all dependents 4. Remove `crates/hero_aibroker_rhai/` from workspace 5. Create `crates/hero_aibroker_examples/` with health + basic_usage examples 6. Update workspace `Cargo.toml` members list 7. Update Makefile references ## Reference - Convention: https://forge.ourworld.tf/lhumina_code/home/issues/6 - Skill: `/hero_crates_best_practices_check`
Author
Owner

The zinit lifecycle and serve rename convention have been applied to the current hero_aibroker_openrpc crate in commits 0c273a0 and 415ac19 on development_timur (PR #21).

This issue tracks the next step: renaming the crates themselves to match the naming convention.

Once PR #21 is merged, the rename can be done on top of it.

The zinit lifecycle and serve rename convention have been applied to the current `hero_aibroker_openrpc` crate in commits `0c273a0` and `415ac19` on `development_timur` (PR #21). This issue tracks the **next step**: renaming the crates themselves to match the naming convention. Once PR #21 is merged, the rename can be done on top of it.
Owner

Implementation Spec for Issue #22 — Cleanup of Stale References

Finding: The structural rename (directories, Cargo.toml, Makefile, buildenv.sh) is already complete on the development branch. What remains is cleanup of stale llmbroker string references in documentation and a few source files.

Objective

Complete the crate rename by updating all remaining stale references to llmbroker and old crate names throughout documentation and source code.

Files to Modify

File Description
README.md Update project structure tree, dependency graph, build commands
docs/deployment.md Replace all llmbroker binary references with hero_aibroker_server
docs/component-design.md Replace crates/llmbroker/ paths with crates/hero_aibroker/
docs/architecture.md Update project structure tree
docs/api.md Update x_llmbroker field references
docs/data-flow.md Update x_llmbroker field references
docs/multi-key-support.md Replace crates/llmbroker/ paths
crates/hero_aibroker_ui/src/api/chat.rs Rename x_llmbroker field to x_aibroker
crates/hero_aibroker_ui/src/api/models.rs Change owned_by: "llmbroker" to "aibroker"
crates/hero_aibroker_ui/src/api/mod.rs Change tracing filter from llmbroker= to hero_aibroker=
crates/hero_aibroker/src/registry/loader.rs Change config dir from "llmbroker" to "aibroker"

Implementation Plan

  1. Update README.md — project structure, build commands, dependency graph
  2. Update docs/deployment.md — replace all llmbroker binary references
  3. Update docs/component-design.md — replace crates/llmbroker/ paths
  4. Update docs/architecture.md — project structure tree
  5. Update docs/api.md & docs/data-flow.mdx_llmbrokerx_aibroker field
  6. Update docs/multi-key-support.md — replace crates/llmbroker/ paths
  7. Rename x_llmbroker field in source codechat.rs, models.rs
  8. Update tracing filter & config pathmod.rs, loader.rs
  9. Verify build compilescargo check, cargo test

Acceptance Criteria

  • No occurrences of llmbroker anywhere in the codebase
  • No occurrences of hero_aibroker_rhai anywhere
  • No occurrences of old names (hero_aibroker_openrpc, hero_aibroker_http, hero_aibroker_client)
  • cargo check passes
  • README.md project structure matches actual crates/ directory layout

Notes

  • Renaming x_llmbrokerx_aibroker in the JSON API response is a breaking change for downstream consumers
  • Changing ~/.config/llmbroker/~/.config/aibroker/ changes config file lookup path
## Implementation Spec for Issue #22 — Cleanup of Stale References **Finding:** The structural rename (directories, Cargo.toml, Makefile, buildenv.sh) is **already complete** on the `development` branch. What remains is cleanup of stale `llmbroker` string references in documentation and a few source files. ### Objective Complete the crate rename by updating all remaining stale references to `llmbroker` and old crate names throughout documentation and source code. ### Files to Modify | File | Description | |------|-------------| | `README.md` | Update project structure tree, dependency graph, build commands | | `docs/deployment.md` | Replace all `llmbroker` binary references with `hero_aibroker_server` | | `docs/component-design.md` | Replace `crates/llmbroker/` paths with `crates/hero_aibroker/` | | `docs/architecture.md` | Update project structure tree | | `docs/api.md` | Update `x_llmbroker` field references | | `docs/data-flow.md` | Update `x_llmbroker` field references | | `docs/multi-key-support.md` | Replace `crates/llmbroker/` paths | | `crates/hero_aibroker_ui/src/api/chat.rs` | Rename `x_llmbroker` field to `x_aibroker` | | `crates/hero_aibroker_ui/src/api/models.rs` | Change `owned_by: "llmbroker"` to `"aibroker"` | | `crates/hero_aibroker_ui/src/api/mod.rs` | Change tracing filter from `llmbroker=` to `hero_aibroker=` | | `crates/hero_aibroker/src/registry/loader.rs` | Change config dir from `"llmbroker"` to `"aibroker"` | ### Implementation Plan 1. **Update README.md** — project structure, build commands, dependency graph 2. **Update docs/deployment.md** — replace all `llmbroker` binary references 3. **Update docs/component-design.md** — replace `crates/llmbroker/` paths 4. **Update docs/architecture.md** — project structure tree 5. **Update docs/api.md & docs/data-flow.md** — `x_llmbroker` → `x_aibroker` field 6. **Update docs/multi-key-support.md** — replace `crates/llmbroker/` paths 7. **Rename x_llmbroker field in source code** — `chat.rs`, `models.rs` 8. **Update tracing filter & config path** — `mod.rs`, `loader.rs` 9. **Verify build compiles** — `cargo check`, `cargo test` ### Acceptance Criteria - [ ] No occurrences of `llmbroker` anywhere in the codebase - [ ] No occurrences of `hero_aibroker_rhai` anywhere - [ ] No occurrences of old names (`hero_aibroker_openrpc`, `hero_aibroker_http`, `hero_aibroker_client`) - [ ] `cargo check` passes - [ ] README.md project structure matches actual `crates/` directory layout ### Notes - Renaming `x_llmbroker` → `x_aibroker` in the JSON API response is a breaking change for downstream consumers - Changing `~/.config/llmbroker/` → `~/.config/aibroker/` changes config file lookup path
Owner

Verification Results

Stale Reference Check

  • llmbroker — 0 occurrences (was 30+)
  • hero_aibroker_rhai — 0 occurrences
  • hero_aibroker_openrpc / hero_aibroker_http / hero_aibroker_client — 0 occurrences

Compilation

  • ⚠️ cargo check has pre-existing errors unrelated to this rename:
    • open_zinit_ui deprecated → open_ui (hero_rpc_server API change)
    • MCP McpAggregator type inference issues
    • These errors exist on the development branch before this change

Files Changed (11)

  • README.md — updated project structure, build commands, dependency graph
  • docs/deployment.md — 17 llmbroker → hero_aibroker_server replacements
  • docs/component-design.md — 8 path replacements
  • docs/architecture.md — project structure tree updated
  • docs/api.md — x_llmbroker → x_aibroker, owned_by updated
  • docs/data-flow.md — x_llmbroker → x_aibroker
  • docs/multi-key-support.md — 3 path replacements
  • crates/hero_aibroker_ui/src/api/chat.rs — x_llmbroker → x_aibroker field rename
  • crates/hero_aibroker_ui/src/api/models.rs — owned_by "llmbroker" → "aibroker"
  • crates/hero_aibroker_ui/src/api/mod.rs — tracing filter updated
  • crates/hero_aibroker/src/registry/loader.rs — config dir llmbroker → aibroker
## Verification Results ### Stale Reference Check - ✅ `llmbroker` — 0 occurrences (was 30+) - ✅ `hero_aibroker_rhai` — 0 occurrences - ✅ `hero_aibroker_openrpc` / `hero_aibroker_http` / `hero_aibroker_client` — 0 occurrences ### Compilation - ⚠️ `cargo check` has **pre-existing errors** unrelated to this rename: - `open_zinit_ui` deprecated → `open_ui` (hero_rpc_server API change) - MCP `McpAggregator` type inference issues - These errors exist on the `development` branch before this change ### Files Changed (11) - `README.md` — updated project structure, build commands, dependency graph - `docs/deployment.md` — 17 llmbroker → hero_aibroker_server replacements - `docs/component-design.md` — 8 path replacements - `docs/architecture.md` — project structure tree updated - `docs/api.md` — x_llmbroker → x_aibroker, owned_by updated - `docs/data-flow.md` — x_llmbroker → x_aibroker - `docs/multi-key-support.md` — 3 path replacements - `crates/hero_aibroker_ui/src/api/chat.rs` — x_llmbroker → x_aibroker field rename - `crates/hero_aibroker_ui/src/api/models.rs` — owned_by "llmbroker" → "aibroker" - `crates/hero_aibroker_ui/src/api/mod.rs` — tracing filter updated - `crates/hero_aibroker/src/registry/loader.rs` — config dir llmbroker → aibroker
Owner

Implementation Summary

All stale llmbroker references have been cleaned up across documentation and source code. The structural crate rename (directories, Cargo.toml, Makefile, buildenv.sh) was already completed in prior work.

Changes Made

Documentation (7 files):

  • README.md — Project structure tree, dependency graph, and build commands updated to reflect current crate layout
  • docs/deployment.md — All llmbroker binary references replaced with hero_aibroker_server
  • docs/component-design.md — Path references updated from crates/llmbroker/ to crates/hero_aibroker/
  • docs/architecture.md — Project structure tree updated to current crate names
  • docs/api.mdx_llmbrokerx_aibroker field, owned_by updated
  • docs/data-flow.mdx_llmbrokerx_aibroker field
  • docs/multi-key-support.md — Path references updated

Source code (4 files):

  • crates/hero_aibroker_ui/src/api/chat.rsx_llmbroker field → x_aibroker, LlmBrokerExtensionAiBrokerExtension
  • crates/hero_aibroker_ui/src/api/models.rsowned_by: "llmbroker""aibroker"
  • crates/hero_aibroker_ui/src/api/mod.rs — Tracing filter llmbroker=hero_aibroker=
  • crates/hero_aibroker/src/registry/loader.rs — Config dir .join("llmbroker").join("aibroker")

Verification

  • Zero llmbroker references remain in the entire codebase
  • Zero hero_aibroker_rhai / hero_aibroker_openrpc / hero_aibroker_http / hero_aibroker_client references remain
  • ⚠️ Pre-existing compilation errors (unrelated to rename) exist in development branch

Breaking Changes

  • API response field renamed: x_llmbrokerx_aibroker
  • Config directory changed: ~/.config/llmbroker/~/.config/aibroker/
## Implementation Summary All stale `llmbroker` references have been cleaned up across documentation and source code. The structural crate rename (directories, Cargo.toml, Makefile, buildenv.sh) was already completed in prior work. ### Changes Made **Documentation (7 files):** - `README.md` — Project structure tree, dependency graph, and build commands updated to reflect current crate layout - `docs/deployment.md` — All `llmbroker` binary references replaced with `hero_aibroker_server` - `docs/component-design.md` — Path references updated from `crates/llmbroker/` to `crates/hero_aibroker/` - `docs/architecture.md` — Project structure tree updated to current crate names - `docs/api.md` — `x_llmbroker` → `x_aibroker` field, `owned_by` updated - `docs/data-flow.md` — `x_llmbroker` → `x_aibroker` field - `docs/multi-key-support.md` — Path references updated **Source code (4 files):** - `crates/hero_aibroker_ui/src/api/chat.rs` — `x_llmbroker` field → `x_aibroker`, `LlmBrokerExtension` → `AiBrokerExtension` - `crates/hero_aibroker_ui/src/api/models.rs` — `owned_by: "llmbroker"` → `"aibroker"` - `crates/hero_aibroker_ui/src/api/mod.rs` — Tracing filter `llmbroker=` → `hero_aibroker=` - `crates/hero_aibroker/src/registry/loader.rs` — Config dir `.join("llmbroker")` → `.join("aibroker")` ### Verification - ✅ Zero `llmbroker` references remain in the entire codebase - ✅ Zero `hero_aibroker_rhai` / `hero_aibroker_openrpc` / `hero_aibroker_http` / `hero_aibroker_client` references remain - ⚠️ Pre-existing compilation errors (unrelated to rename) exist in `development` branch ### Breaking Changes - API response field renamed: `x_llmbroker` → `x_aibroker` - Config directory changed: `~/.config/llmbroker/` → `~/.config/aibroker/`
Owner

Implementation committed: f1b1e6f

Browse: f1b1e6f

Implementation committed: `f1b1e6f` Browse: https://forge.ourworld.tf/lhumina_code/hero_aibroker/commit/f1b1e6f
Owner

It looks done. closing.

It looks done. closing.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_aibroker#22
No description provided.