No description
  • Rust 74.2%
  • HTML 19.7%
  • JavaScript 5.5%
  • CSS 0.6%
Find a file
mik-tf 42cb639349 chore(d-10): canonical service.toml + service_base!() triad on 3 binaries + _ui→_admin rename
Closes hero_proc#102 D-10 sweep T2 item for hero_wallet (s112).
Runbook: lhumina_code/hero_proc#105

* Added 3 service.toml (cli + server + admin) shipping
  `[[env]] PATH_ROOT default="~/hero"` per s107 lesson #17. Each crate
  lists all 3 binaries with sockets at canonical paths
  (hero_wallet/rpc.sock for server, hero_wallet/admin.sock for admin).

* Migrated 3 main.rs to canonical-base:
  - `use herolib_core::service_base;` + `service_base!();`
  - `validate_service_toml(SERVICE_TOML)` + `handle_info_flag(SERVICE_TOML)`
    at top of `fn main()`.
  - Daemons (server + admin) also call `print_startup_banner` +
    `prepare_sockets`.
  - Replaced hand-rolled `socket_base_dir()` / `socket_dir()` helpers
    with `herolib_core::base::resolve_socket_dir()` /
    `resolve_socket_path()`.

* Lesson #19 (s109+s110+s111) — CLI `build_service_definition()` now
  calls `forward_env_if_set` to thread PATH_ROOT/PATH_VAR/PATH_BUILD/
  PATH_CODE/HERO_SOCKET_DIR (+ HERO_REDIS_DB/HERO_REDIS_SECRET for the
  server) into the spawned hero_wallet_server and hero_wallet_admin
  ActionSpec env. Verified end-to-end: `hero_wallet --start` spawns
  daemons with PATH_ROOT=/home/pctwo/hero in /proc/$pid/environ.

* _ui → _admin rename (per home#228 workspace convention):
  - `crates/hero_wallet_ui/` → `crates/hero_wallet_admin/` (crate dir).
  - `[package].name`: hero_wallet_ui → hero_wallet_admin.
  - `[[binaries.sockets]]` for admin: type="web" path="hero_wallet/web.sock"
    → type="admin" path="hero_wallet/admin.sock" (in all 3 service.toml).
  - hero_wallet_admin/src/main.rs: web.sock → admin.sock.
  - hero_wallet/src/main.rs (CLI build_service_definition):
    ui_socket web.sock → admin.sock.
  - hero_wallet_admin/heroservice.json: protocol/socket "web" → "admin".
  - Workspace `Cargo.toml`: members `hero_wallet_ui` → `hero_wallet_admin`.
  - Zero external references in workspace (verified across
    hero_skills/hero_demo/hero_router/hero_proxy).

* Opportunistic adjacent fixes required to clear smoke 6/6 + lesson #19
  end-to-end proof:
  - hero_wallet_admin/src/main.rs: Axum 0.7 → 0.8 wildcard syntax:
    /css/*path → /css/{*path} (same for /js/*path). Pre-existing on
    origin/development; admin binary panicked at startup until fixed.
  - hero_wallet/src/main.rs: dropped `.requires(&["hero_db"])` from
    `build_service_definition()`. Pre-existing bug — hero_db is
    registered with hero_proc as `hero_db_server`, not `hero_db`, so
    the CLI's `.requires()` always failed. service.toml `[[dependencies]]`
    is the canonical dep-declaration path (used by lab); s111
    hero_code_indexer doesn't use `.requires()` either.

* Dep audit:
  - Added `herolib_core` to hero_wallet/Cargo.toml (newly needed for
    service_base! macro + base helpers).
  - Stripped `dirs` + `serde_json` from hero_wallet_admin/Cargo.toml
    (zero-match after deletions).
  - hero_wallet_server/Cargo.toml unchanged (all deps still used).
  - No Cargo.lock churn — workspace 0.6.0 pins from 03c0deb already
    absorbed the cascade.

D-10 acceptance (5/5):
  1. service.toml on disk:       3/3 OK
  2. service_base!() in main.rs: 3/3 OK
  3. lab infocheck:              3 clean / 0 findings OK
  4. Smoke 6/6:                  server 4/4 (health + openrpc.json +
                                 well-known + system.ping) + admin 2/2
                                 (health + well-known) OK
  5. cargo test --workspace:     clean (1 doctest passed, 0 failed) OK

Latent / out-of-scope:
  * HERO_WALLET_UI_BASE_PATH env var read by admin still uses old name —
    full BASE_PATH purge tracked under home#230 Phase 2.
  * 2 sqlite db files (apikeys.db, request_logs.db) created at repo
    root by server runtime — not committed; should be added to
    .gitignore in a future cleanup.
  * `hero_wallet --stop` reports stop-timeout 30s but daemons DO exit
    (same OServer-side latency as s110 hero_logic + s111 hero_code_indexer).
2026-05-18 11:40:18 -04:00
crates chore(d-10): canonical service.toml + service_base!() triad on 3 binaries + _ui→_admin rename 2026-05-18 11:40:18 -04:00
.gitignore Initial commit 2026-04-06 10:29:56 +02:00
Cargo.toml chore(d-10): canonical service.toml + service_base!() triad on 3 binaries + _ui→_admin rename 2026-05-18 11:40:18 -04:00
PURPOSE.md fix: logging compliance, socket naming, add PURPOSE.md 2026-05-07 13:40:57 +02:00
README.md fix: logging compliance, socket naming, add PURPOSE.md 2026-05-07 13:40:57 +02:00

hero_wallet

Multi-chain personal wallet daemon for the Hero OS Suite.

Quick Start

service wallet start --update --reset
service wallet stop
service wallet status

Binaries

  • hero_wallet_server — JSON-RPC 2.0 backend (Unix socket: rpc.sock)
  • hero_wallet_admin — Admin dashboard UI (Unix socket: web.sock)
  • hero_wallet — CLI client and lifecycle orchestrator

Dependencies

Requires hero_db (storage) and hero_proc (process supervisor).

See PURPOSE.md for full architecture details.