feat(mesh): !archy command — node status over the mesh, no AI #72

Merged
chaum merged 0 commits from feat/mesh-archy-command into main 2026-07-09 12:48:29 +00:00
Owner

Summary

!ai sends the question to a language model. !archy never does — it reads the same status caches that /bitcoin-status and /electrs-status serve, so answers are deterministic, cost no tokens, and stay available when the assistant is switched off.

!archy         → Archipelago OS v1.7.99-alpha: BTC synced 957295 (12p), electrum 86%.
!archy btc     → BTC: synced, block 957295, 12 peers.
!archy electrs → Electrum: syncing 86.2% (824785/957295).
!archy version → Archipelago OS v1.7.99-alpha

Changes

  • New mesh/listener/node_cmd.rs: strip_archy_trigger + run_node_cmd, sub-commands status (default), btc, electrs, version, else a usage hint. Replies are single-frame terse to respect airtime.
  • Reuses the assistant's trust gate (is_sender_allowed) and reply routing unchanged — blocked, allowed_contacts, trusted_only and federation-Trusted all behave identically. is_sender_allowed/send_reply widened from private to pub(super); no logic touched.
  • One deliberate asymmetry: !archy does not require assistant_enabled, since it never calls a model. Turning the LLM off shouldn't take node status with it. Worth a second opinion if you disagree.
  • Wired into both entry paths — plain radio text (decode.rs) and typed 1:1 chat (dispatch.rs). Hooking only one would make it work from a phone but not the UI. Factored the shared reply-routing closure in decode.rs rather than duplicating it.
  • docs/COMMANDS.md — user-facing surface for mesh, voice and HTTP. No command reference existed before; meshroller-integration-design.md now cross-references it.

Checklist

  • Tests pass (3 new unit tests for trigger parsing + sub-command dispatch; 111 mesh tests still green)
  • Rust clippy clean (no new warnings attributable to these files)
  • No new compiler warnings
  • TypeScript type-check / frontend build — n/a, no frontend changes
  • Tested on live server — not yet; unit-tested only, no radio in the loop

Note for the reviewer

Not exercised against real hardware. The trust gate is shared with !ai, so a regression there would affect both — the mesh suite passing is reassuring but not a substitute for a radio test.

🤖 Generated with Claude Code

## Summary `!ai` sends the question to a language model. `!archy` never does — it reads the same status caches that `/bitcoin-status` and `/electrs-status` serve, so answers are deterministic, cost no tokens, and stay available when the assistant is switched off. ``` !archy → Archipelago OS v1.7.99-alpha: BTC synced 957295 (12p), electrum 86%. !archy btc → BTC: synced, block 957295, 12 peers. !archy electrs → Electrum: syncing 86.2% (824785/957295). !archy version → Archipelago OS v1.7.99-alpha ``` ## Changes - New `mesh/listener/node_cmd.rs`: `strip_archy_trigger` + `run_node_cmd`, sub-commands `status` (default), `btc`, `electrs`, `version`, else a usage hint. Replies are single-frame terse to respect airtime. - Reuses the assistant's trust gate (`is_sender_allowed`) and reply routing **unchanged** — `blocked`, `allowed_contacts`, `trusted_only` and federation-`Trusted` all behave identically. `is_sender_allowed`/`send_reply` widened from private to `pub(super)`; no logic touched. - **One deliberate asymmetry:** `!archy` does not require `assistant_enabled`, since it never calls a model. Turning the LLM off shouldn't take node status with it. Worth a second opinion if you disagree. - Wired into **both** entry paths — plain radio text (`decode.rs`) and typed 1:1 chat (`dispatch.rs`). Hooking only one would make it work from a phone but not the UI. Factored the shared reply-routing closure in `decode.rs` rather than duplicating it. - `docs/COMMANDS.md` — user-facing surface for mesh, voice and HTTP. No command reference existed before; `meshroller-integration-design.md` now cross-references it. ## Checklist - [x] Tests pass (3 new unit tests for trigger parsing + sub-command dispatch; 111 mesh tests still green) - [x] Rust clippy clean (no new warnings attributable to these files) - [x] No new compiler warnings - [ ] TypeScript type-check / frontend build — n/a, no frontend changes - [ ] Tested on live server — **not yet**; unit-tested only, no radio in the loop ## Note for the reviewer Not exercised against real hardware. The trust gate is shared with `!ai`, so a regression there would affect both — the mesh suite passing is reassuring but not a substitute for a radio test. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chaum merged commit 6109074748 into main 2026-07-09 12:48:29 +00:00
Sign in to join this conversation.