screen-locker/screen_locker
Krzysztof kuhy Rudnicki 494cc74bb5
Some checks are pending
pre-commit / pre-commit (push) Waiting to run
Tests / test (3.10) (push) Waiting to run
Tests / test (3.11) (push) Waiting to run
Tests / test (3.12) (push) Waiting to run
Add read-only MCP server exposing workout/lock status
Expose the screen-locker's compliance and lock-decision state as read-only
MCP tools (screen_locker._mcp) so Claude Code and its subagents can query
workout status without shelling out to the CLI or opening the Tk window.

- _mcp.py: FastMCP stdio server. Read-only tools get_status, get_summary,
  explain_lock, get_flags. Import leaf over stdout-free status functions
  (gather_status, format_summary_line, explain_lock_decision, predicates);
  logs to stderr. NO write/action tools by design — workouts are logged only
  from RunnerUp-verified TCX data, never from a caller's claim. No tool
  exposes the sync token or any HMAC key.
- .mcp.json + scripts/setup_mcp.sh: registration via a dedicated
  ~/.venvs/screen-locker-mcp interpreter; mcp is an optional-dep.
- 100% coverage of the new module; verified end-to-end over stdio.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LQGQj8Ne6TriBExv91nG8v
2026-07-10 21:28:09 +02:00
..
tests Add read-only MCP server exposing workout/lock status 2026-07-10 21:28:09 +02:00
__init__.py Fix test discovery and coverage for python_pkg modules 2025-12-02 22:33:34 +01:00
_auto_upgrade.py Fix silent skip-credit bypass; replace with weekly shutdown-time bonus 2026-07-03 15:27:08 +02:00
_compliance_state.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_constants.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_early_bird.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_extra_benefits.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_heat_skip.py Add heat-skip feature and fix early-bird 9:00 re-check gap 2026-06-29 11:23:19 +02:00
_log_mixin.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_manual_workout_dialog.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_manual_workout.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_mcp.py Add read-only MCP server exposing workout/lock status 2026-07-10 21:28:09 +02:00
_phone_verification.py Restore consistency with WORKOUT_APP_JSON_REMOTES rename in _constants.py 2026-06-22 07:05:07 +02:00
_runnerup_db.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
_runnerup_verification.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
_shutdown_base.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
_shutdown.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_sick_dialog.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_sick_tracker.py Fix silent skip-credit bypass; replace with weekly shutdown-time bonus 2026-07-03 15:27:08 +02:00
_status_data.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_status.py Fix silent skip-credit bypass; replace with weekly shutdown-time bonus 2026-07-03 15:27:08 +02:00
_temperature.py Add heat-skip feature and fix early-bird 9:00 re-check gap 2026-06-29 11:23:19 +02:00
_time_check.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
_ui_flows_relaxed.py refactor: enforce 400-line file limit with pre-commit hook and split outliers 2026-05-28 21:19:18 +02:00
_ui_flows.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_ui_widgets.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_wake_state.py Migrate to the shared gatelock backend 2026-06-21 20:11:16 +02:00
_weekly_check.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
_window_setup.py Migrate to the shared gatelock backend 2026-06-21 20:11:16 +02:00
_workout_credit.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
adjust_shutdown_schedule.sh fix: resolve shutdown-schedule canonical path via guardctl dynamically 2026-07-04 11:48:39 +02:00
screen_lock.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
status_view.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00