feat(sdk): connect_default() + herolib_ai migration recipes #64

Merged
timur merged 2 commits from development_sdk_63_connect_default into development 2026-05-09 00:34:03 +00:00
Owner

Summary

Refs #63 phase 1 (broker side).

  • default_socket_path() resolver: HERO_AIBROKER_SOCKET$HERO_SOCKET_DIR/hero_aibroker/rpc.sock$HOME/hero/var/sockets/hero_aibroker/rpc.sock/tmp/...
  • AIBrokerAdminAPIClient::connect_default() and AIBrokerRawClient::connect_default() so consumers don't have to assemble the path themselves
  • Migration recipes in crates/hero_aibroker_sdk/src/lib.rs doc-comment: chat (with the new alias-string model field instead of Model::*), model listing, embed/transcribe/tts/image endpoints, streaming, OpenRouter passthrough

Lockfile sync from upstream chore: bump version to 0.6.0.

Test plan

  • cargo build -p hero_aibroker_sdk — clean
  • cargo test -p hero_aibroker_sdk --doc — 2 compile-ok, 1 ignored (no_run runtime example)
  • Hands-on migration of one consumer (planned next: hero_books librarian, since #63 cites it as the trigger case)

🤖 Generated with Claude Code

## Summary Refs #63 phase 1 (broker side). - `default_socket_path()` resolver: `HERO_AIBROKER_SOCKET` → `$HERO_SOCKET_DIR/hero_aibroker/rpc.sock` → `$HOME/hero/var/sockets/hero_aibroker/rpc.sock` → `/tmp/...` - `AIBrokerAdminAPIClient::connect_default()` and `AIBrokerRawClient::connect_default()` so consumers don't have to assemble the path themselves - Migration recipes in `crates/hero_aibroker_sdk/src/lib.rs` doc-comment: chat (with the new alias-string `model` field instead of `Model::*`), model listing, embed/transcribe/tts/image endpoints, streaming, OpenRouter passthrough Lockfile sync from upstream `chore: bump version to 0.6.0`. ## Test plan - [x] `cargo build -p hero_aibroker_sdk` — clean - [x] `cargo test -p hero_aibroker_sdk --doc` — 2 compile-ok, 1 ignored (no_run runtime example) - [ ] Hands-on migration of one consumer (planned next: `hero_books` librarian, since #63 cites it as the trigger case) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(sdk): add connect_default() + migration recipes (#63)
Some checks failed
Build and Test / build-and-test (pull_request) Failing after 2s
63a695fd07
Adds default_socket_path() resolver and connect_default() constructors
on AIBrokerAdminAPIClient and AIBrokerRawClient so consumers don't need
to assemble the canonical $HERO_SOCKET_DIR/hero_aibroker/rpc.sock path
themselves. Resolution honours HERO_AIBROKER_SOCKET, HERO_SOCKET_DIR,
$HOME, and a /tmp fallback.

Also documents the herolib_ai → hero_aibroker_sdk migration in lib.rs:
chat shape, model alias strings, embedding/transcription/tts/image
endpoints, streaming, and OpenRouter passthrough via AIBrokerRawClient.

Cargo.lock sync: workspace crates 0.5.x → 0.6.0 from upstream version
bump.

Refs #63 phase 1 (broker side).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merge branch 'development' into development_sdk_63_connect_default
Some checks failed
Build and Test / build-and-test (pull_request) Failing after 3s
622c55eff6
timur merged commit 9a03f20f77 into development 2026-05-09 00:34:03 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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!64
No description provided.