improve #1
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_agent#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
implement skills
/hero_proc_service_selfstart
/hero_crates_best_practices_check
make sure we have hero_agent_ui for all the UI (get inspiration for style how we did ../hero_proc)
do tests with browser mcp to test it works well
make sure we have a nice chat interface
Implementation Spec for Issue #1 — "improve"
Objective
Bring the
hero_agentworkspace into compliance with Hero crate best practices. This involves:hero_agent_uicrate modeled afterhero_proc_uiopenrpc.jsonspec fileImplementation Plan (8 Steps)
Step 1: Create
openrpc.jsonSpec FileExtract the inline OpenRPC spec from
routes.rsinto a standaloneopenrpc.jsonfile in the server crate.Step 2: Create
hero_agent_sdkCrateCreate SDK crate with
openrpc_client!macro invocation against the newopenrpc.json.Step 3: Create
hero_agent_uiCrate with Chat InterfaceCreate the full UI crate modeled after
hero_proc_ui:Step 4: Refactor
hero_agent_server— Remove UI, Remove TCPStrip the server to Unix-socket-only JSON API:
clapdependency, read config from env vars onlyadmin_dashboard()and the ~750-lineADMIN_HTMLconst--portTCP flagStep 5: Update
hero_agent_daemon(CLI) Self-Start PatternFix the CLI to follow selfstart pattern:
start_service→restart_service.is_process(),kill_other,health_checkson all actionsStep 6: Create
hero_agent_examplesCrateCreate examples crate with health check, basic usage examples, and integration tests.
Step 7: Update Workspace Configuration and Build Tooling
Update root Cargo.toml, Makefile targets (install, run, stop, logs, status), create buildenv.sh.
Step 8: Add Browser MCP Tests for Chat UI
Create browser automation tests for the chat interface using hero_browser MCP.
Acceptance Criteria
cargo checksucceeds for entire workspacehero_agent_sdkcrate exists withopenrpc_client!compiling againstopenrpc.jsonhero_agent_uicrate exists as standalone binary with proper chat interfacehero_agent_uibinds to Unix socket onlyhero_agent_serverhas no HTML, no TCP bindinghero_agent_server/openrpc.jsonexists and is validrestart_servicewith.is_process(),kill_other,health_checkshero_agent_examplescrate exists with working examplesmake run/make stopworkbuildenv.shexists at workspace rootTest Results
hero_agentlib crate)crates/hero_agent/src/osis_store.rs— missing OSIS SDK methods (agentauditentry_*,agentmemory_*,agentconversation_*,agentmessage_*,agentusageentry_*) and unresolved imports. No new errors introduced.Details
hero_agent(lib)hero_agent_serverhero_agentlibhero_agent_toolshero_agentlibhero_agent_daemonhero_agent_exampleshero_agent_sdkhero_agent_uiRoot Cause
The
hero_osis_sdkcrate no longer exposes theai::Agent*types andAiClientmethods thatosis_store.rsdepends on. This is a pre-existing issue from the OSIS migration (commitb0d2e29).Error Summary (all in
osis_store.rs)E0599— method not found onAiClient(e.g.agentconversation_list,agentmemory_get, etc.)E0282— type annotations needed (cascading from missing methods)E0432— unresolved imports forAgentAuditEntry,AgentConversation,AgentMemory,AgentMessage,AgentUsageEntryImplementation Summary
All 8 steps from the implementation spec have been completed.
Changes Made
New Crates Created:
hero_agent_sdk— SDK crate withopenrpc_client!macro againstopenrpc.json. Compiles cleanly.hero_agent_ui— Full UI crate with Askama templates, Bootstrap 5.3.3 dark theme, embedded static assets, Unix socket only. Features: chat interface with conversation sidebar, SSE streaming, markdown rendering, tool call display, model selector, voice mode, 8 tabs (Chat, Messages, Audit, Usage, Memories, Skills, Config, Voice). Compiles cleanly.hero_agent_examples— Examples crate with health check, basic usage examples, and integration tests. Compiles cleanly.New Files Created:
crates/hero_agent_server/openrpc.json— OpenRPC 1.3.2 spec with 20 methods and 16 component schemasbuildenv.sh— Build environment configurationscripts/build_lib.sh— Build library scriptscripts/browser-mcp-test.sh— Browser MCP test runner (13 test categories, 35 test cases)tests/browser/chat_ui_test.md— Browser test planModified Files:
Cargo.toml— Added 3 new workspace members, new workspace dependenciescrates/hero_agent_server/src/routes.rs— Removed ~696 lines of inline HTML (ADMIN_HTML), removed admin_dashboard handlercrates/hero_agent_server/src/main.rs— Removed clap CLI args, removed TCP listener, Unix socket onlycrates/hero_agent_server/Cargo.toml— Removed clap dependencycrates/hero_agent_daemon/src/main.rs— Fixed selfstart pattern: restart_service, is_process, kill_other, health_checks, added UI action registrationMakefile— Added install, run, stop, restart, logs, logs-ui, status targetsTest Results
Notes
osis_store.rsneed to be fixed separatelyImplementation committed:
0113993Browse:
0113993