Skip to content

sim-web: generic peer-proxy + visualiser chatbot start/stop panel - #12

Merged
M0LTE merged 1 commit into
mainfrom
chatbot-proxy
May 11, 2026
Merged

sim-web: generic peer-proxy + visualiser chatbot start/stop panel#12
M0LTE merged 1 commit into
mainfrom
chatbot-proxy

Conversation

@M0LTE

@M0LTE M0LTE commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

The test-net chatbot (synthetic chat-traffic generator) grew a small HTTP control plane (POST /start, POST /stop, GET /state) with STOPPED-as-default. To drive it from the visualiser, sim-web needs to forward HTTP requests into the Docker network where the chatbot lives.

Adds a small allowlisted reverse proxy at /api/peer/<name>/<path> that resolves <name> via Docker DNS and forwards the request. Today the only entry in the allowlist is chatbot → 8090; new peer services land by adding an entry. 503 on unreachable so the browser can distinguish "no peer deployed" from "peer broken."

Visualiser side: new CHATBOT HUD panel with START / STOP / status. Polls /api/peer/chatbot/state every 4 s; hides itself silently on 503. Deployments without a chatbot peer see no UI clutter.

Verified end-to-end against the M0LTE/test-net deployment.

🤖 Generated with Claude Code

Adds a small reverse proxy at /api/peer/<name>/<path> that resolves
<name> via Docker DNS (i.e., a container with that name on the same
Docker network) and forwards the request. Hostnames are allowlisted
to avoid SSRF surface; today the only entry is "chatbot" → port 8090,
the chat-traffic generator deployed alongside the test net.

Visualiser gains a CHATBOT HUD panel with START / STOP / status. The
panel polls /api/peer/chatbot/state every 4 s; a 503 (unreachable, no
such peer) hides the panel quietly. So deployments without a chatbot
service show no UI clutter.

Together with the test-net chatbot's HTTP control plane (default
state STOPPED, /start /stop endpoints), this gives operators a
button on the map to turn synthetic chat traffic on and off without
docker exec.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@M0LTE
M0LTE merged commit bcbb99c into main May 11, 2026
1 check passed
@M0LTE
M0LTE deleted the chatbot-proxy branch May 11, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant