forked from Rockachopa/Timmy-time-dashboard
ruff (#169)
* polish: streamline nav, extract inline styles, improve tablet UX - Restructure desktop nav from 8+ flat links + overflow dropdown into 5 grouped dropdowns (Core, Agents, Intel, System, More) matching the mobile menu structure to reduce decision fatigue - Extract all inline styles from mission_control.html and base.html notification elements into mission-control.css with semantic classes - Replace JS-built innerHTML with secure DOM construction in notification loader and chat history - Add CONNECTING state to connection indicator (amber) instead of showing OFFLINE before WebSocket connects - Add tablet breakpoint (1024px) with larger touch targets for Apple Pencil / stylus use and safe-area padding for iPad toolbar - Add active-link highlighting in desktop dropdown menus - Rename "Mission Control" page title to "System Overview" to disambiguate from the chat home page - Add "Home — Timmy Time" page title to index.html https://claude.ai/code/session_015uPUoKyYa8M2UAcyk5Gt6h * fix(security): move auth-gate credentials to environment variables Hardcoded username, password, and HMAC secret in auth-gate.py replaced with os.environ lookups. Startup now refuses to run if any variable is unset. Added AUTH_GATE_SECRET/USER/PASS to .env.example. https://claude.ai/code/session_015uPUoKyYa8M2UAcyk5Gt6h * refactor(tooling): migrate from black+isort+bandit to ruff Replace three separate linting/formatting tools with a single ruff invocation. Updates tox.ini (lint, format, pre-push, pre-commit envs), .pre-commit-config.yaml, and CI workflow. Fixes all ruff errors including unused imports, missing raise-from, and undefined names. Ruff config maps existing bandit skips to equivalent S-rules. https://claude.ai/code/session_015uPUoKyYa8M2UAcyk5Gt6h --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
708c8a2477
commit
9d78eb31d1
@@ -23,7 +23,6 @@ Usage
|
||||
|
||||
import json
|
||||
import logging
|
||||
from typing import Optional
|
||||
|
||||
from spark import advisor as spark_advisor
|
||||
from spark import eidos as spark_eidos
|
||||
@@ -52,8 +51,8 @@ class SparkEngine:
|
||||
self,
|
||||
task_id: str,
|
||||
description: str,
|
||||
candidate_agents: Optional[list[str]] = None,
|
||||
) -> Optional[str]:
|
||||
candidate_agents: list[str] | None = None,
|
||||
) -> str | None:
|
||||
"""Capture a task-posted event and generate a prediction."""
|
||||
if not self._enabled:
|
||||
return None
|
||||
@@ -81,7 +80,7 @@ class SparkEngine:
|
||||
task_id: str,
|
||||
agent_id: str,
|
||||
bid_sats: int,
|
||||
) -> Optional[str]:
|
||||
) -> str | None:
|
||||
"""Capture a bid event."""
|
||||
if not self._enabled:
|
||||
return None
|
||||
@@ -101,7 +100,7 @@ class SparkEngine:
|
||||
self,
|
||||
task_id: str,
|
||||
agent_id: str,
|
||||
) -> Optional[str]:
|
||||
) -> str | None:
|
||||
"""Capture a task-assigned event."""
|
||||
if not self._enabled:
|
||||
return None
|
||||
@@ -121,8 +120,8 @@ class SparkEngine:
|
||||
task_id: str,
|
||||
agent_id: str,
|
||||
result: str,
|
||||
winning_bid: Optional[int] = None,
|
||||
) -> Optional[str]:
|
||||
winning_bid: int | None = None,
|
||||
) -> str | None:
|
||||
"""Capture a task-completed event and evaluate EIDOS prediction."""
|
||||
if not self._enabled:
|
||||
return None
|
||||
@@ -168,7 +167,7 @@ class SparkEngine:
|
||||
task_id: str,
|
||||
agent_id: str,
|
||||
reason: str,
|
||||
) -> Optional[str]:
|
||||
) -> str | None:
|
||||
"""Capture a task-failed event and evaluate EIDOS prediction."""
|
||||
if not self._enabled:
|
||||
return None
|
||||
@@ -194,7 +193,7 @@ class SparkEngine:
|
||||
logger.debug("Spark: captured failure %s by %s", task_id[:8], agent_id[:8])
|
||||
return event_id
|
||||
|
||||
def on_agent_joined(self, agent_id: str, name: str) -> Optional[str]:
|
||||
def on_agent_joined(self, agent_id: str, name: str) -> str | None:
|
||||
"""Capture an agent-joined event."""
|
||||
if not self._enabled:
|
||||
return None
|
||||
@@ -211,10 +210,10 @@ class SparkEngine:
|
||||
self,
|
||||
agent_id: str,
|
||||
tool_name: str,
|
||||
task_id: Optional[str] = None,
|
||||
task_id: str | None = None,
|
||||
success: bool = True,
|
||||
duration_ms: Optional[int] = None,
|
||||
) -> Optional[str]:
|
||||
duration_ms: int | None = None,
|
||||
) -> str | None:
|
||||
"""Capture an individual tool invocation.
|
||||
|
||||
Tracks which tools each agent uses, success rates, and latency
|
||||
@@ -243,9 +242,9 @@ class SparkEngine:
|
||||
project_id: str,
|
||||
step_name: str,
|
||||
agent_id: str,
|
||||
output_path: Optional[str] = None,
|
||||
output_path: str | None = None,
|
||||
success: bool = True,
|
||||
) -> Optional[str]:
|
||||
) -> str | None:
|
||||
"""Capture a creative pipeline step (storyboard, music, video, assembly).
|
||||
|
||||
Tracks pipeline progress and creative output quality metrics
|
||||
|
||||
Reference in New Issue
Block a user