Files
loki/scripts
g-butandClaude Sonnet 4.6 e4cf6f5fca refactor(scripts): extract COCKPIT_URL constant — eliminate hardcoded localhost:3000
beacon.py had 5 raw "http://localhost:3000" literals spread across 3 functions
(_open_cockpit, _cockpit_poll, _web_stop) plus a tooltip string.
agent-hook-bridge.sh had 2 more.

Both scripts now read COCKPIT_URL from the environment with a localhost:3000
default, defined once at the top of each file (module constant in Python,
readonly variable in bash). A single env-var override now propagates everywhere
without touching code — covers non-default ports, remote deployments, and CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 01:14:50 +02:00
..