Update main #25

Merged
rawan merged 14 commits from development into main 2026-04-08 12:26:01 +00:00
Member
No description provided.
feat(router): add Python client generation and AI agent executor (#18)
Some checks failed
Build & Test / check (push) Failing after 33s
bb5edefec3
Phase 1: Template-based Python client generation from OpenRPC specs
- python_codegen module: generate_python_client() and generate_python_interface()
- Typed Python client with HTTP-over-Unix-socket transport (stdlib only)
- Lightweight interface stubs for LLM context windows
- Auto-regeneration on spec hash change during scanner refresh
- Cache at ~/.hero/var/router/python/{service}_client.py
- HTTP endpoints: GET /:service/python/client.py and interface.py
- RPC methods: router.python_client, router.python_interface

Phase 2: AI agent executor with LLM-driven code generation
- agent module: Python venv management, script execution with 30s timeout
- LLM integration via hero_aibroker Unix socket (ai.chat method)
- Retry loop: execute → feed error to LLM → regenerate → retry
- HTTP endpoint: POST /:service/agent {prompt, max_retries}
- RPC method: router.agent.run
- Response: {success, result, script, attempts, duration_ms, error}

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
test: add integration test for python_codegen against router's own spec (#18)
Some checks failed
Build & Test / check (push) Failing after 36s
8b7a9d98cb
Verifies all 21 methods are generated correctly from the real OpenRPC spec.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(router): add Python + Agent UI tabs, fix stale socket self-cleanup (#18)
Some checks failed
Build & Test / check (push) Failing after 37s
99d2c28e06
- Add "Python" tab to service detail: download client.py/interface.py,
  quick-start snippet, live preview
- Add "Agent" tab: prompt input, retry selector, output/script sub-views
- Fix scanner deleting its own rpc.sock during stale cleanup (skip
  hero_router directory)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix(agent): pass model parameter to hero_aibroker ai.chat call (#18)
Some checks failed
Build & Test / check (push) Failing after 37s
83e4eea0f8
- Add model field to AgentRequest (default: gpt-4o-mini, overridable via
  HERO_LLM_MODEL env var)
- Pass model, max_tokens, temperature to ai.chat RPC params
- Add model selector dropdown to Agent UI tab (GPT-4o Mini, GPT-4o,
  Claude Sonnet)
- Thread model through run_agent → call_llm → JSON-RPC request

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix missing 'Any' import in generated Python clients
Some checks failed
Build & Test / check (push) Failing after 33s
e651ddbae1
The json_schema_to_python_type() function returns "Any" for unknown
schema types, but the generated client file was missing the
'from typing import Any' import, causing NameError at runtime.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add human-friendly answer summarization to AI agent
Some checks failed
Build & Test / check (push) Failing after 1m6s
4ce77dd08f
The agent now makes a second LLM call after script execution to
interpret raw output and provide a clear, conversational answer.

- AgentResponse gains an `answer` field with the summarized response
- UI shows Answer tab by default, with Raw Output and Script as secondary
- Error cases also get human-friendly explanations
- Improved codegen system prompt with service description context

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: add missing version fields and remove rust-version pin
Some checks failed
Build & Test / check (push) Failing after 58s
38ded6660b
Add version = "0.5.0" to all Hero git dependencies and remove
rust-version pinning per toolchain conventions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: change port
All checks were successful
Build & Test / check (push) Successful in 2m47s
Build & Test / check (pull_request) Successful in 2m31s
dccd523222
fix: remove rust-version workspace inheritance from crate
Some checks failed
Build & Test / check (push) Has been cancelled
8af85e13d2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge branch 'development_18' into development
Some checks failed
Build & Test / check (push) Failing after 21s
dd56c02817
Merge branch 'development' into development_change_port
Some checks failed
Build & Test / check (pull_request) Failing after 43s
Build & Test / check (push) Failing after 48s
d3d30c6523
fix: lint, fmt
All checks were successful
Build & Test / check (push) Successful in 2m27s
Build & Test / check (pull_request) Successful in 3m30s
44b4bc621b
Reviewed-on: #24
Reviewed-by: Mahmoud Emad <emadm@incubaid.com>
chore: bump version to 0.1.1
All checks were successful
Build & Test / check (pull_request) Successful in 2m32s
Build & Test / check (push) Successful in 3m51s
fd1de3ac88
rawan merged commit 48cea44a39 into main 2026-04-08 12:26:01 +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_router!25
No description provided.