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.
- {methodproof-0.2.0 → methodproof-0.2.1}/PKG-INFO +1 -1
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/cli.py +84 -2
- {methodproof-0.2.0 → methodproof-0.2.1}/pyproject.toml +1 -1
- {methodproof-0.2.0 → methodproof-0.2.1}/.github/workflows/ci.yml +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/.gitignore +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/CHANGELOG.md +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/LICENSE +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/README.md +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/__init__.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/__main__.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/agents/__init__.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/agents/base.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/agents/music.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/agents/terminal.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/agents/watcher.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/bridge.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/config.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/crypto.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/graph.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hook.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/__init__.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/claude_code.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/claude_code.sh +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/install.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/openclaw/HOOK.md +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/openclaw/handler.ts +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/openclaw_install.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/hooks/wrappers.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/integrity.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/live.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/mcp.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/repos.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/skills/methodproof/SKILL.md +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/store.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/sync.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/methodproof/viewer.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/test_windows_compat.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/tests/__init__.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/tests/test_graph.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/tests/test_hooks.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/tests/test_openclaw_hooks.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/tests/test_store.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/tests/test_wrappers.py +0 -0
- {methodproof-0.2.0 → methodproof-0.2.1}/uv.lock +0 -0
|
@@ -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
|
-
"
|
|
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
|
-
|
|
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)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|