methodproof 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. {methodproof-0.2.0 → methodproof-0.2.1}/PKG-INFO +1 -1
  2. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/cli.py +84 -2
  3. {methodproof-0.2.0 → methodproof-0.2.1}/pyproject.toml +1 -1
  4. {methodproof-0.2.0 → methodproof-0.2.1}/.github/workflows/ci.yml +0 -0
  5. {methodproof-0.2.0 → methodproof-0.2.1}/.gitignore +0 -0
  6. {methodproof-0.2.0 → methodproof-0.2.1}/CHANGELOG.md +0 -0
  7. {methodproof-0.2.0 → methodproof-0.2.1}/LICENSE +0 -0
  8. {methodproof-0.2.0 → methodproof-0.2.1}/README.md +0 -0
  9. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/__init__.py +0 -0
  10. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/__main__.py +0 -0
  11. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/agents/__init__.py +0 -0
  12. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/agents/base.py +0 -0
  13. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/agents/music.py +0 -0
  14. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/agents/terminal.py +0 -0
  15. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/agents/watcher.py +0 -0
  16. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/bridge.py +0 -0
  17. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/config.py +0 -0
  18. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/crypto.py +0 -0
  19. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/graph.py +0 -0
  20. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hook.py +0 -0
  21. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/__init__.py +0 -0
  22. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/claude_code.py +0 -0
  23. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/claude_code.sh +0 -0
  24. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/install.py +0 -0
  25. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/openclaw/HOOK.md +0 -0
  26. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/openclaw/handler.ts +0 -0
  27. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/openclaw_install.py +0 -0
  28. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/wrappers.py +0 -0
  29. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/integrity.py +0 -0
  30. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/live.py +0 -0
  31. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/mcp.py +0 -0
  32. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/repos.py +0 -0
  33. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/skills/methodproof/SKILL.md +0 -0
  34. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/store.py +0 -0
  35. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/sync.py +0 -0
  36. {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/viewer.py +0 -0
  37. {methodproof-0.2.0 → methodproof-0.2.1}/test_windows_compat.py +0 -0
  38. {methodproof-0.2.0 → methodproof-0.2.1}/tests/__init__.py +0 -0
  39. {methodproof-0.2.0 → methodproof-0.2.1}/tests/test_graph.py +0 -0
  40. {methodproof-0.2.0 → methodproof-0.2.1}/tests/test_hooks.py +0 -0
  41. {methodproof-0.2.0 → methodproof-0.2.1}/tests/test_openclaw_hooks.py +0 -0
  42. {methodproof-0.2.0 → methodproof-0.2.1}/tests/test_store.py +0 -0
  43. {methodproof-0.2.0 → methodproof-0.2.1}/tests/test_wrappers.py +0 -0
  44. {methodproof-0.2.0 → methodproof-0.2.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: methodproof
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: See how you code. Capture and visualize your engineering process.
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -323,6 +323,7 @@ def _print_commands() -> None:
323
323
  print(f" {_M}mp login{R} Connect to platform (opens browser)")
324
324
  print(f" {_M}mp consent{R} Change capture, research, and redaction settings")
325
325
  print(f" {_M}mp delete{R} {_D}<id>{R} Delete a session and all its data")
326
+ print(f" {_M}mp update{R} Update to the latest version")
326
327
  print(f" {_M}mp uninstall{R} Remove all hooks, data, and config")
327
328
  print()
328
329
  print(f" {_D}To view this at any time run: mp help{R}\n")
@@ -348,6 +349,7 @@ def _print_commands_plain() -> None:
348
349
  print(" mp login Connect to platform (opens browser)")
349
350
  print(" mp consent Change capture, research, and redaction settings")
350
351
  print(" mp delete <id> Delete a session and all its data")
352
+ print(" mp update Update to the latest version")
351
353
  print(" mp uninstall Remove all hooks, data, and config")
352
354
  print()
353
355
  print(" To view this at any time run: mp help\n")
@@ -773,6 +775,80 @@ def cmd_review(args: argparse.Namespace) -> None:
773
775
  print("Run `methodproof push` to upload, or `methodproof delete` to remove.\n")
774
776
 
775
777
 
778
+ def cmd_update(args: argparse.Namespace) -> None:
779
+ latest = _check_pypi_version()
780
+ current = _get_current_version()
781
+ if not latest:
782
+ print("Could not reach PyPI. Try: pip install --upgrade methodproof")
783
+ return
784
+ if latest == current:
785
+ print(f"Already up to date (v{current}).")
786
+ return
787
+ print(f"Updating v{current} -> v{latest}...")
788
+ import subprocess as sp
789
+ result = sp.run(
790
+ [sys.executable, "-m", "pip", "install", "--upgrade", "methodproof"],
791
+ capture_output=True, text=True,
792
+ )
793
+ if result.returncode == 0:
794
+ print(f"Updated to v{latest}.")
795
+ else:
796
+ print(f"Update failed. Try manually: pip install --upgrade methodproof")
797
+
798
+
799
+ def _get_current_version() -> str:
800
+ try:
801
+ from importlib.metadata import version
802
+ return version("methodproof")
803
+ except Exception:
804
+ return "0.0.0"
805
+
806
+
807
+ def _check_pypi_version() -> str | None:
808
+ try:
809
+ import urllib.request
810
+ req = urllib.request.Request(
811
+ "https://pypi.org/pypi/methodproof/json",
812
+ headers={"Accept": "application/json"},
813
+ )
814
+ with urllib.request.urlopen(req, timeout=3) as resp:
815
+ data = json.loads(resp.read())
816
+ return data["info"]["version"]
817
+ except Exception:
818
+ return None
819
+
820
+
821
+ def _update_check() -> None:
822
+ """Background version check. Runs once per day, prints notice if outdated."""
823
+ check_file = config.DIR / ".last_update_check"
824
+ now = time.time()
825
+
826
+ try:
827
+ if check_file.exists():
828
+ last = float(check_file.read_text().strip())
829
+ if now - last < 86400:
830
+ return
831
+ except Exception:
832
+ pass
833
+
834
+ def _check():
835
+ latest = _check_pypi_version()
836
+ current = _get_current_version()
837
+ try:
838
+ config.ensure_dirs()
839
+ check_file.write_text(str(now))
840
+ except Exception:
841
+ pass
842
+ if latest and latest != current:
843
+ sys.stderr.write(
844
+ f"\033[90m Update available: v{current} -> v{latest}."
845
+ f" Run: mp update\033[0m\n"
846
+ )
847
+
848
+ t = threading.Thread(target=_check, daemon=True)
849
+ t.start()
850
+
851
+
776
852
  def cmd_mcp_serve(args: argparse.Namespace) -> None:
777
853
  from methodproof.mcp import serve
778
854
  serve()
@@ -832,6 +908,7 @@ def main() -> None:
832
908
  rv = sub.add_parser("review", help="Review session data before pushing")
833
909
  rv.add_argument("session_id", nargs="?")
834
910
  sub.add_parser("consent", help="Change capture, research, and redaction settings")
911
+ sub.add_parser("update", help="Update to the latest version from PyPI")
835
912
  un = sub.add_parser("uninstall", help="Remove all hooks, data, and config")
836
913
  un.add_argument("--force", "-f", action="store_true", help="Skip confirmation")
837
914
  sub.add_parser("help", help="Show command reference")
@@ -843,7 +920,8 @@ def main() -> None:
843
920
  "view": cmd_view, "log": cmd_log, "login": cmd_login,
844
921
  "push": cmd_push, "tag": cmd_tag, "publish": cmd_publish,
845
922
  "delete": cmd_delete, "review": cmd_review, "consent": cmd_consent,
846
- "uninstall": cmd_uninstall, "help": lambda _: _print_commands(),
923
+ "update": cmd_update, "uninstall": cmd_uninstall,
924
+ "help": lambda _: _print_commands(),
847
925
  "mcp-serve": cmd_mcp_serve,
848
926
  }
849
927
  fn = cmds.get(args.cmd)
@@ -851,6 +929,10 @@ def main() -> None:
851
929
  _print_commands()
852
930
  sys.exit(1)
853
931
 
854
- if args.cmd != "help":
932
+ # Background update check (once per day, non blocking)
933
+ if args.cmd not in ("help", "update", "uninstall", "mcp-serve"):
934
+ _update_check()
935
+
936
+ if args.cmd not in ("help", "update"):
855
937
  store.init_db()
856
938
  fn(args)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "methodproof"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "See how you code. Capture and visualize your engineering process."
5
5
  requires-python = ">=3.11"
6
6
  dependencies = ["watchdog>=4.0"]
File without changes
File without changes
File without changes
File without changes
File without changes