Commit graph

12 commits

Author SHA1 Message Date
Natalie
9bd6483f33 net-tools: keygen before self-detection; register artifacts as nyc3 spoke
- wg-render: handle --keygen/--pubkey before self-detection. They are host-local
  and must run BEFORE a host is in mesh-hosts.json (bootstrap order: keygen ->
  paste pubkey -> apply); previously they aborted for an unregistered host.
- Register artifacts (com.uvlava.quinn.artifacts) as nyc3 spoke, wg 10.9.0.8.

Verified live: artifacts<->citron handshake, artifacts->lime spoke-to-spoke via
hub forwarding (0% loss). nyc3 segment = citron(hub) + lime + artifacts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 22:23:53 -04:00
Natalie
46e25d3e77 net-tools: derive nyc3 endpoint in test from data (fixes stale assertion)
The spoke-render test hardcoded the old reserved-IP endpoint; read it from
mesh-hosts.json instead so it tracks the endpoint and can't drift. (Follows the
endpoint change to citron's bound IP in 53a79d3.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 21:51:29 -04:00
Natalie
53a79d3494 net-tools: fix wg-render apply (set -e abort + dash syncconf), nyc3 endpoint
Two bugs found bringing the nyc3 segment live (citron hub + lime spoke):
- Hub render ended in `[ -n "$miss" ] && echo`, which returns 1 when no spokes
  are unkeyed; under `set -e` that silently aborted `render_conf > tmp` on the
  apply path (spokes were fine — they end in printf). Use an if-block.
- `wg syncconf <(wg-quick strip)` used bash process substitution but the script
  runs under /bin/sh (dash) — replaced with a POSIX temp file.

Also: nyc3 endpoint -> citron's bound public IP (104.248.9.88), not the reserved
IP (143.244.223.5) — DO routes the reserved IP in but WG replies from the
primary, so the reserved IP can't be a WG endpoint without anchor source-routing.

Verified live: lime<->citron handshake, ping 10.9.0.7 0% loss, citron dnsmasq
resolving *.wg on 10.9.0.7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 21:50:52 -04:00
Natalie
de1f7f2dec net-tools: multi-segment WireGuard hub model + bin/wg-render
Adds the missing reconciler piece: render each host's /etc/wireguard/wg1.conf
from data/mesh-hosts.json (WG config was previously hand-built).

- mesh.segments maps <segment> -> {hub, endpoint, dns_host, dns_listen}; hosts
  carry `segment` + `wg_pubkey` (public key only). iceland(yuzu) and nyc3(citron)
  are independent stars. Legacy single-hub (mesh.hub) still works as fallback.
- bin/wg-render: --keygen/--pubkey bootstrap, --dry-run/--whoami inspect,
  --apply installs + `wg syncconf` (idempotent, rollback). Hub gets a [Peer] per
  spoke + ip_forward/MASQUERADE; spoke gets one [Peer] = its hub. WG_RENDER_SELF
  override for tests/ops.
- bin/wg-dns-sync: segment-aware listen — a segment's dns_host binds its own
  dns_listen (citron serves nyc3 on 10.9.0.7; apricot unchanged on 10.9.0.2).
- Registers citron (com.uvlava.quinn.infra, nyc3 hub) + nyc3 keys for lime;
  carries the com.uvlava.ct.* DO-name aliases. Tests cover hub/spoke/dns.

(data/mesh-hosts.json also carries pre-existing working-tree normalization:
 literal em-dash -> — escapes and expanded alias arrays.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 21:38:25 -04:00
Natalie
4c2312e173 feat(infra-net): read .infra*.yaml + tag rows by environment
Glob every .infra*.yaml (was .infra.yaml only) so .infra.dev.yaml variants are
reconciled too; add an ENV column + environment field to the inventory. A project
can now appear once per environment (prod DO + dev mac).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 10:20:13 -04:00
Natalie
1bd8f0f8b9 feat(infra-net): reconcile project .infra.yaml against mesh-hosts.json
New bin/infra-net walks every project .infra.yaml (convention:infra_manifest),
validates schema + host∈mesh-hosts (alias-aware) + port collisions, prints the
live infra-net and writes data/infra-net.json (gitignored, non-destructive — does
not touch the services map). Caught prospector's stale host name on first run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 10:10:51 -04:00
Natalie
c3d788e20a feat(dx): add dx.hide_homelan to hide homelan config while DO-only
- data/mesh-hosts.json: "dx": {"hide_homelan": true} (with note). Data for apricot/pear/fennel/lan/services fully preserved for recovery.
- bin/mesh-hosts-render + bin/host-apply: respect the flag — filter to .class=="cloud" hosts only (yuzu, lime), emit dx mode note in headers, services filtered too.
- When true: generated /etc/hosts mesh-block and ~/.ssh/config net-tools fleet block only contain DO/cloud (homelan names like apricot.lan, bare fennel etc. hidden). dx-forges (ctforge/mcforge) unaffected at bottom.
- `net sync` (and direct renderers) now produce clean DO-only configs.
- README updated. To recover: set false + net sync.

Fulfills "hide the homelan config... now only use DO... may try to recover homelan so dont delete it".
2026-06-28 10:50:51 -04:00
Natalie
c78e7cde1f feat(dx): add forge-dns-render to net-tools infra installers
Makes the cloud DX forge shortcuts (mcforge, ctforge) first-class citizens of the shared net-tools layer:
- New bin/forge-dns-render (print/install/diff) that sources ~/.vault/*_forge_creds and emits a managed # >>> dx-forges block in /etc/hosts.
- `net sync` now also converges the DX forges (alongside mesh-hosts + ssh).
- Per-project ./run forge:dns now prefers the central renderer (with local fallback).
- Docs updated.

The mcforge:3000 / ctforge:3000 shortcuts are now installed and kept fresh as part of standard DX infra setup (`net sync` after net-tools install, or after any forge:up).
2026-06-28 10:45:47 -04:00
Natalie
68c848dc56 feat(@tools/net-tools): add tray icon system
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-10 02:20:23 -07:00
Natalie
98a0df2f41 feat(@tools/net-tools): clarify naming rules and auto-generated configs
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-09 20:06:00 -07:00
Natalie
b8d41a9509 feat(@tools/net-tools): add dynamic lan host ip discovery
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-09 19:59:24 -07:00
Natalie
03e47fc4df feat(@tools/net-tools): add mesh/lan tooling with host renderers
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-09 19:53:08 -07:00