chore: merge development into main for v0.2.0 release #17

Merged
mahmoud merged 24 commits from development into main 2026-04-07 13:41:21 +00:00
Owner

Brings main up to date with development for the v0.2.0 release.

Key changes since v0.1.0:

  • Renamed hero_inspector to hero_router
  • Consolidated 5 crates into single binary
  • Added service discovery, MCP gateway, web dashboard
  • Fixed buildenv.sh BINARIES list (was listing 3 non-existent binaries)
Brings main up to date with development for the v0.2.0 release. Key changes since v0.1.0: - Renamed hero_inspector to hero_router - Consolidated 5 crates into single binary - Added service discovery, MCP gateway, web dashboard - Fixed buildenv.sh BINARIES list (was listing 3 non-existent binaries)
Implements issue #10:

1. Sidebar grouping: services with _server and _ui sockets now appear
   as a single entry with dual status badges instead of two separate rows.
   Uses existing derive_group_name() for grouping logic.

2. Remove redundant "socket path" notice card from service detail view.

3. Embedded UI tab: new "UI" tab with iframe embedding the admin UI via
   the existing proxy. Lazy-loads on first tab show. Web-only services
   get the UI tab as their default active tab.

4. UI path discovery: new /api/ui-routes/:service_name endpoint that
   crawls the root page, extracts href links, and checks HTTP status.
   "Discover routes" button in UI tab triggers this.

5. Scrollable tab content: header card and tab bar stay pinned while
   tab content scrolls independently via flex layout. Sidebar also
   scrolls independently.

Also strips x-frame-options from proxied responses to allow iframe
embedding, and adds ui/service-logs to the URL routing regex.

Closes #10

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: consolidate tabs — merge OpenRPC trio and logs, add inner sidebar layout
All checks were successful
Build & Test / check (push) Successful in 3m26s
452e18756a
Merge Methods + Markdown + OpenRPC into single "OpenRPC" tab with an
internal sidebar (Methods, Documentation, Specification). Merge MCP Logs
and Service Logs into single "Logs" tab with pill toggle. Separate
service header and content into two cards. Move tab bar into header card
right-aligned.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
add example config/repos template for hero_proc service definition
Some checks failed
Build & Test / check (push) Has been cancelled
d671c440a9
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix UI health check to use http_url instead of mixed openrpc_socket+tcp_port
Some checks failed
Build & Test / check (push) Failing after 39s
97800e8b0e
UI component serves HTTP (not OpenRPC over socket), so health check should
use http_url pointing to the TCP port. Also adjust start_period_ms to 5000
to give the UI enough time to bind before first health check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: migrate to hero_proc_factory pattern
Some checks failed
Build & Test / check (push) Failing after 55s
ab39e8ca6f
Replace manual socket detection and lifecycle::restart_service/stop_service
with hero_proc_factory() + hp.restart_service/stop_service per current SDK pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Workspace Cargo.toml: fix hero_proc_sdk URL from old forge path to
  canonical git.ourworld.tf/herocode/hero_proc, branch=development
- crates/hero_inspector/Cargo.toml: use workspace = true instead of
  duplicating the git source directly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: revert hero_proc_sdk URL to working forge address
Some checks failed
Build & Test / check (push) Failing after 21s
4f834924fc
git.ourworld.tf/herocode/hero_proc returns 404; the working source is
forge.ourworld.tf/lhumina_code/hero_proc.git — revert to that.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: rename hero_inspector to hero_router with new routing endpoints
Some checks failed
Build & Test / check (push) Failing after 35s
6c9379272c
Rename all crates, types, constants, and references from hero_inspector
to hero_router. Add automatic socket-based routing for /$svc/rpc,
/$svc/admin, and /$svc/$webname endpoints with proper header injection
(X-Hero-Context, X-Forwarded-Prefix, X-Hero-Claims). Add --context CLI
argument. Update scanner for per-service directory layout.

lhumina_code/hero_inspector#14

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: update TCP port to 444 and add HERO_SOCKET_DIR support
Some checks failed
Build & Test / check (push) Failing after 54s
aab1b5a4e0
- Change default TCP port from 9998 to 444 (hero_router standard port)
- Read HERO_SOCKET_DIR env var in RouterConfig::default() instead of
  always using ~/hero/var/sockets
- Add canonical per-service socket path methods (hero_router/rpc.sock,
  hero_router/ui.sock) following the hero_sockets directory convention
- Add flat socket path helpers (_flat suffix) matching what hero_service
  currently binds until it is updated to support directory layout
- Update SocketProxy in hero_router_ui to use the flat path (actual bind)
- Update hero_router CLI kill_other/health_checks to use port 444
- Update Makefile socket paths and port to match new convention
- Update CLAUDE.md to document port 444 and per-service socket layout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- hero_router_server now always binds TCP port 9998 (--port flag)
- hero_router_ui binds TCP port 9997 (--port flag, was 444)
- Added CorsLayer(allow_origin: Any) to hero_router_server for cross-origin /rpc access
- Added ROUTER_UI_PORT / ROUTER_SERVER_PORT env vars
- Updated README and CLAUDE.md with new port assignments and --port usage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The routing was looking for <service>/rpc.sock (per-dir convention) but actual
sockets use flat naming: <service>_server.sock and <service>_ui.sock.

Added resolve_rpc_socket() and resolve_ui_socket() helpers that:
  1. Check the scanner cache first (finds whatever path was actually discovered)
  2. Fall back to per-service directory: <service>/rpc.sock, <service>/ui.sock
  3. Fall back to flat naming: <service>_server.sock, <service>_ui.sock

Same dual-path fallback added for web sockets (per-dir then flat naming).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Architecture:
- hero_router_server (9998): full routing entry point — proxies
  /<service>/rpc → rpc.sock, /<service>/admin → ui.sock,
  /<service>/:webname → web_<name>.sock, plus MCP gateway and /rpc JSON-RPC
- hero_router_ui (9997): dashboard HTML only — no proxy routes

Flat socket layout removed:
- Scanner no longer discovers <service>_server.sock or <service>_ui.sock
- Only per-service directories: $HERO_SOCKET_DIR/<service>/{rpc,ui,...}.sock
- derive_group_name returns parent directory name for typed sockets
- get_by_name_or_title matches by derive_group_name (not raw stem)

Routes:
- build_proxy_router: all proxy + RPC + MCP routes (server only)
- build_dashboard_router: HTML dashboard + fragments + static assets (UI only)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Closes #15

- scanner: probe_ui_socket is now HTML-only — removes try_http_openrpc_discover;
  ui.sock always gets ServiceProtocol::Web only, no OpenRPC probing
- routes: AppState gains server_socket: Option<String>; rpc_handler proxies
  POST /rpc to the server socket when Some, dispatches locally when None
- server: self-registration of "Hero Router" ServiceEntry moved from UI to server
  (server is the authoritative cache/scanner owner)
- ui: spawn_discovery removed — UI no longer runs independent socket scanner;
  replaced with spawn_cache_sync that calls router.services + router.service
  via hero_router_sdk every 30s to populate local cache from server data;
  server_socket set so /rpc proxies transparently to hero_router_server.sock
- ui: added hero_router_sdk dependency for typed cache-sync client

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: migrate to per-service socket paths and correct port assignments
Some checks failed
Build & Test / check (push) Failing after 41s
18fa07a2b3
- hero_router.rs: use RouterConfig for canonical socket paths (hero_router/rpc.sock,
  hero_router/ui.sock) in kill_other; fix server port to 9998, UI port to 9997
- config.rs: remove flat socket path methods, simplify canonical path docs
- hero_router_server: bind HeroRpcServer to "hero_router" service name for correct
  per-service directory layout; use server_socket_path() instead of flat variant
- hero_router_ui: use ui_socket_path() and pass it to HeroUiServer.with_socket();
  update server_socket_path references to canonical method

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update Cargo.toml workspace configuration
- Enhance Makefile with improved build targets and CI/CD support
- Improve scanner service discovery with enhanced socket resolution
- Refactor server routing and remove redundant code
- Update OpenRPC client generation for server integration
- Refine UI implementation with improved state management
- Update dashboard styling and HTML templates

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
feat: add admin dashboard port 9997 to Makefile
Some checks failed
Build & Test / check (push) Failing after 51s
e59e5eeb5c
- Add ADMIN_PORT variable set to 9997
- Add admin target to display admin access URL
- Display admin dashboard URL in rundev output
- Update .PHONY targets

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
refactor: consolidate hero_router crates into single binary
Some checks failed
Build & Test / check (push) Failing after 57s
b4d1aa3b5c
Remove hero_router_examples, hero_router_sdk, hero_router_server, and hero_router_ui crates.
Migrate main entry point to crates/hero_router/src/main.rs and update build system accordingly.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
feat(router): rest/api routing, ui→rpc shortcut, spec-compliance diagnostics
Some checks failed
Build & Test / check (push) Failing after 38s
c84f42abaa
- Add explicit /rest/ → rest.sock and /api/ → openapi.sock dispatch arms so
  these spec-required socket types stop falling through to web_<name>.sock.
- Add a sibling shortcut: POST /<svc>/ui/rpc[/...] (and the admin alias) is
  now rewritten to hit <svc>/rpc.sock directly, so admin UIs can use a
  relative ./rpc URL without implementing their own JSON-RPC proxy.
- Add GET /api/diagnostics/:service_name: enumerates every .sock under
  <socket_dir>/<svc>/, classifies by name, and probes the hero_sockets
  spec-mandated endpoints per type. POST /rpc is validated as a JSON-RPC 2.0
  envelope (method-not-found counts as a pass — proves dispatcher is wired).
- Rewrite the Diagnostics tab as a per-socket compliance card view with a
  green/red summary banner; keep the existing UI link scan as a sub-section.
- Fix the link-scan UI socket lookup to use the per-service layout
  (<dir>/<svc>/ui.sock) with a flat-layout fallback for legacy services.
- proxy_to_socket: clone method when building the request so the new router
  log path can still read method.as_str() after the move.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix(router/ui): drop backend ping from connection status widget
Some checks failed
Build & Test / check (push) Failing after 38s
397db1bb0b
hero_router is a single binary since b4d1aa3 — there is no separate backend
process to ping. The widget was POSTing rpc.health to BASE_PATH+'rpc', which
the router does not expose at its root, returning 404 with an empty body and
showing a permanent "Backend Down" / "Unexpected end of JSON input" error.

- base.html: remove the pingFn so the poller only checks /health on the
  router itself (2-state connected/disconnected indicator).
- connection-status.js: hide the Backend row in the popover when no pingFn
  is configured, instead of showing "Checking…" forever.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(router): web-only service support + dotfile namespace guard
Some checks failed
Build & Test / check (push) Failing after 54s
ecf2011123
- Sidebar/service detail: services that expose only web_<name>.sock (no
  ui.sock) now get an "open in new tab" link and a working iframe preview.
  New SidebarGroup.web_open_path picks the first web socket as fallback;
  ServiceDetailTemplate.web_url_segment selects the right URL segment
  ('ui' vs '<name>') for the badge/iframe/open-in-new-tab links.
- Add first_web_socket_in_service_dir helper to scan a service directory
  for web_*.sock files.
- service_proxy_inner: short-circuit any first-segment starting with '.'
  (e.g. .well-known/* probes) to a silent 404 without writing a router-log
  entry — these are not routing failures, just unaddressed requests.
fix: update BINARIES to single hero_router binary
Some checks failed
Build & Test / check (push) Failing after 37s
Build & Test / check (pull_request) Failing after 58s
cf808538c9
The workspace was consolidated from 3 crates (hero_router, hero_router_server,
hero_router_ui) into a single binary in commit b4d1aa3, but buildenv.sh still
listed all three. This would cause the release workflow to fail when looking
for the non-existent binaries.
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!17
No description provided.