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

Merged
ai merged 1 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 unchangedblocked, 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)
lfg2025 added 1 commit 2026-07-09 12:06:18 +00:00
`!ai` sends the question to a language model. `!archy` never does: it reads
the same status caches the /bitcoin-status and /electrs-status endpoints
serve, so answers are deterministic, cost no tokens, and stay available when
the assistant is switched off.

Sub-commands: status (default), btc, electrs, version; anything else returns
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, allowlist, trusted_only and federation-Trusted all
behave identically. The one deliberate asymmetry is that !archy does not
require assistant_enabled, since it never calls a model.

Wired into both entry paths: plain radio text (decode.rs) and typed 1:1
chat (dispatch.rs). A command hooked into only one of them would work from
a phone but not the UI, or vice versa.

Adds docs/COMMANDS.md — the user-facing surface for mesh, voice and HTTP,
which had no reference until now.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ai merged commit 6109074748 into main 2026-07-09 12:48:29 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lfg2025/archy#72
No description provided.