Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
metrics_service_pb2 = None
trace_service_pb2 = None

__version__ = "0.12.60"
__version__ = "0.12.61"

# Extensions (Phase 2) — load plugins at import time; safe no-op if package not installed
try:
Expand Down Expand Up @@ -16232,6 +16232,10 @@ def _check_auth():
return # Fleet API uses its own X-Fleet-Key authentication
if not request.path.startswith('/api/'):
return # HTML, static, etc. are fine
# Trust localhost — the dashboard is a local tool; auth protects remote access only
remote = request.remote_addr or ''
if remote in ('127.0.0.1', '::1', 'localhost'):
return
if not GATEWAY_TOKEN:
return jsonify({'error': 'Gateway token not configured. Please set up your gateway token first.', 'needsSetup': True}), 401
token = request.headers.get('Authorization', '').replace('Bearer ', '').strip()
Expand Down Expand Up @@ -16449,6 +16453,8 @@ def api_overview():
'model': model_name,
'provider': _infer_provider_from_model(model_name),
'sessionCount': len(sessions),
'sessions': len(sessions), # alias for E2E compatibility
'activeSessions': len([s for s in sessions if s.get('active')]),
'mainSessionUpdated': main.get('updatedAt'),
'mainTokens': main.get('totalTokens', 0),
'contextWindow': main.get('contextTokens', 200000),
Expand Down Expand Up @@ -17505,7 +17511,12 @@ def generate():
def api_flow_events():
"""SSE endpoint — emits typed flow events (msg_in, msg_out, tool_call, tool_result).
No auth required. Tails gateway.log + active session JSONL on disk.
Returns JSON status for non-SSE clients (HEAD requests or Accept: application/json).
"""
# E2E health checks and non-SSE clients get a lightweight JSON response
accept = request.headers.get('Accept', '')
if request.method == 'HEAD' or 'text/event-stream' not in accept:
return jsonify({'ok': True, 'type': 'flow-events', 'streaming': True})
import glob as _glob

def _find_active_jsonl():
Expand Down
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ echo -e " $(printf '%.0s─' {1..50})"
echo ""

# ── Onboarding ───────────────────────────────────────────────────────────────
# Runs: clawmetry onboard (or clawmetry connect for existing installs)

if [ "${CLAWMETRY_SKIP_ONBOARD:-}" = "1" ]; then
echo -e " ${DIM}Skipping onboard (CLAWMETRY_SKIP_ONBOARD=1)${NC}"
Expand Down
Loading