6 Commits

Author SHA1 Message Date
claude-timemachine cf3ed60bce automc ui: match wrapper-console palette + flat layout
CI / validate (push) Successful in 13s
CI / docker (push) Successful in 9s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 18:43:04 +02:00
claude-timemachine 39d7d4586b automc ui: per-route active connection counts + total in header
CI / validate (push) Successful in 15s
CI / docker (push) Successful in 12s
Pulls mc_router_active_connections + mc_router_server_active_connections
from the Prometheus default registry on every /api/routes call. UI
gains an Active column on the routes table and the header subtitle
shows "N routes · M active conn".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 18:39:59 +02:00
claude-timemachine b995e012be automc ui: relative api paths so /infra/mc-router/ proxying works
CI / validate (push) Successful in 13s
CI / docker (push) Successful in 10s
Same fix as svc-proxy: absolute /api/* hit the server-manager origin
when the UI is reverse-proxied at /infra/mc-router/. Switch to ./api/*
so the requests stay under the proxied prefix.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 18:35:00 +02:00
claude-timemachine e2ce0453fa automc: operator UI on AUTOMC_UI_BINDING
CI / validate (push) Successful in 12s
CI / docker (push) Successful in 15s
Adds a separate HTTP server (not the upstream API on :25590) for the
operator dashboard. Single-page UI with two panes:
  * routes table — current pg-synced mappings, polled every 2s
  * logs — SSE stream backed by a logrus hook + 500-entry ring buffer

Opt-in via AUTOMC_UI_BINDING (e.g. ":8082"); unset = no-op, behaves
exactly like upstream. Designed to live behind server-manager's
/infra/mc-router/* reverse-proxy.

Patch is internal/automc-only, same fork philosophy as the rest —
upstream files stay verbatim.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 18:03:48 +02:00
claude-timemachine 7884fb1c5f automc: schema-fit query + CI + FORK doc
CI / validate (push) Successful in 47s
CI / docker (push) Successful in 44s
- pgsync.go: filter rows where enabled IS NOT FALSE and domain IS NOT NULL,
  matching the existing automc servers table (domain nullable, enabled
  defaults true). Trigger doc now includes UPDATE OF enabled.
- .gitea/workflows/ci.yaml: build/test on push to automc branch + tags,
  publish container as git.timemachine.center/timemachine/mc-router:automc.
- FORK.md: soft-fork relationship doc at repo root.
- docs/AUTOMC.md: quick-start recipe, troubleshooting table,
  sync-lifecycle and waker-dispatch sequence diagrams.
2026-05-27 22:57:51 +02:00
claude-timemachine 657fca325e automc: pg LISTEN/NOTIFY route source + HTTP waker
Adds opt-in extension package internal/automc/ that:
- Subscribes to Postgres notifications on a 'servers' table and pushes
  route changes into server.Routes (no file I/O, no fsnotify).
- Provides a WakerFunc that POSTs to a configurable HTTP control plane
  (server-manager) and polls until state=running.

When AUTOMC_DSN is unset, Wire() is a no-op and the binary behaves
exactly like upstream itzg/mc-router. Single patch site in main.go
(import + 4-line call) keeps upstream rebases trivial.

See docs/AUTOMC.md for env vars and the expected DB schema/trigger.
2026-05-27 11:10:02 +02:00