- Rust 81.8%
- Shell 11.1%
- JavaScript 3.6%
- CSS 1.4%
- HTML 1.3%
- Other 0.8%
|
All checks were successful
Build and Test / build (push) Successful in 5m0s
Wholesale D-10 sweep for hero_agent. Matches the s109/s111/s115/s119 template: canonical 3-binary shape (cli + server + admin), service_base!() macro on all 3 main.rs, [[env]] PATH_ROOT default="~/hero" in service.toml per s107 lesson #17. D-10 5/5 met: - 3 new service.toml (daemon/server/admin) listing all 3 binaries each. - service_base!() triad on all 3 main.rs (validate_service_toml + handle_info_flag; daemons also call print_startup_banner + prepare_sockets). - lab infocheck: 3 crates clean / 0 findings. - Smoke 4/4: server rpc.sock (health + well-known) + admin admin.sock (health + well-known). protocol = "http" not OpenRPC, so 2 tests per socket is canonical. - cargo test --workspace --release exit 0, 0 FAILED across 49 hero_agent lib tests + 2 examples-integration + 8 hero_agent_server unit. Lesson #19 verified in /proc/$pid/environ for both daemons spawned via hero_agent --start: PATH_ROOT/PATH_VAR/PATH_BUILD/PATH_CODE all present. forward_env_if_set helper added to hero_agent_daemon/src/main.rs build_service_definition() — threads the standard env set into both spawned ActionSpecs (server + admin). Added /.well-known/heroservice.json route to hero_agent_admin (server already had it). herolib_ai v0.6.0 migration (last AI-rename ripple target — playbook fully validated for chat s118 + transcribe + TTS s119; this commit applies the transcribe-surface recipe): - Workspace Cargo.toml: herolib_ai_broker → herolib_ai with default-features = false, features = ["hero-proc"]. Broker shim comment removed. - crates/hero_agent_server/Cargo.toml: herolib_ai_broker → herolib_ai workspace dep. - crates/hero_agent_server/src/routes.rs voice_transcribe: swap the old AiClient::default_socket().await + .transcribe_file() for the new sync builder chain (Arc::new(builtin::groq_provider()).transcribe().model(...) .audio_bytes(...).send()). Drops inner Handle::current().block_on() dance — new API is sync, outer tokio::task::spawn_blocking remains. WebM detection + ffmpeg conversion + temp file management preserved. Runtime-probed end-to-end: POST /api/voice/transcribe with 244-byte synthetic WAV returned HTTP 401 expired_api_key from Groq, validating the full wire chain (multipart + default_resolver() secret resolution + auth headers + endpoint URL). Same expired-key condition s119 documented; not introduced here. Cargo.lock: 92 packages updated absorbing the s119-tip cascade (herolib_ai v0.6.0@d20792fd added, herolib_ai_broker removed; herolib_core 30a0b34e→d20792fd; hero_proc_sdk ceaea08b→32af77cd; hero_rpc 071e67e0→ 8a8d66d8). Transitive removals: hero_aibroker_sdk + image stack the broker pulled in are gone — net -335 lines in Cargo.lock. Dep audit: - workspace Cargo.toml strips: dirs, axum-extra, tower (zero consumers). - hero_agent_server: strips tokio-stream, axum-extra, tower. - hero_agent_admin: strips serde, tower-http, futures, hero_agent_sdk. Refs: lhumina_code/hero_proc#102 |
||
|---|---|---|
| .forgejo/workflows | ||
| crates | ||
| docs | ||
| examples | ||
| scripts | ||
| tests/browser | ||
| .gitignore | ||
| buildenv.sh | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
hero_agent
Rust-native AI agent for Hero OS. Drop-in replacement for hero_shrimp (Bun/TypeScript), following the same HeroRpcServer pattern as every other Hero service: Unix socket, OpenRPC, auto-MCP.
Status
Fully implemented — 3 crates, 56 built-in tools, SSE streaming, MCP integration, OSIS-backed memory and conversations.
Why Rust
- Native OSIS SDK integration — conversations, memories, user scoping without RPC bridge
- Native SSE streaming via tokio + axum
- One stack — same build, debug, deploy model as every other Hero service
- HeroRpcServer pattern: health, discovery, inspector dashboard — all built in
- LLM APIs are stable REST/SSE — no SDK needed, just
reqwest+serde
Crate structure
crates/
├── hero_agent/ Core library — agent loop, LLM client, MCP, memory, tools
├── hero_agent_server/ Binary — HTTP server, SSE routes, admin dashboard
└── hero_agent_tools/ 56 built-in tools — file ops, git, web, shell, planning
hero_shrimp naming
hero_agent intentionally uses hero_shrimp socket paths and naming conventions (e.g. hero_shrimp.sock) so it slots into the existing Hero ecosystem as a drop-in replacement without requiring changes to other services or the frontend.
When the decision is made to switch from hero_shrimp to hero_agent in production, a proper rename should be done across the ecosystem — updating socket paths, service names, and references in hero_services, hero_archipelagos, and other dependent repos.
Build and run
make build # Build release binary
make run # Run locally (TCP port for dev)
make test # Run unit tests
make smoke-test # Run integration smoke tests
Acknowledgment
hero_agent exists thanks to hero_shrimp. The architecture, tool design, agent loop, skill system, and SSE protocol were all pioneered by hero_shrimp in TypeScript. hero_agent is a Rust port — we followed the same design faithfully and hope it stays true to its origins.
Architecture
See docs/spec.md for the complete design and architecture specification.