methodproof 0.4.1__tar.gz → 0.4.3__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.4.1 → methodproof-0.4.3}/PKG-INFO +1 -1
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/__init__.py +1 -1
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/cli.py +78 -8
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/config.py +1 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/pyproject.toml +1 -1
- {methodproof-0.4.1 → methodproof-0.4.3}/.github/workflows/ci.yml +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/.gitignore +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/CHANGELOG.md +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/LICENSE +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/README.md +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/__main__.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/agents/__init__.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/agents/base.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/agents/music.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/agents/terminal.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/agents/watcher.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/analysis.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/bridge.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/crypto.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/graph.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hook.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/__init__.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/claude_code.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/claude_code.sh +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/cline_hook.sh +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/codex_hook.sh +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/gemini_hook.sh +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/install.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/kiro_hook.sh +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/mcp_register.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/openclaw/HOOK.md +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/openclaw/handler.ts +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/openclaw_install.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/opencode_plugin.js +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/hooks/wrappers.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/integrity.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/live.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/mcp.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/proxy.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/proxy_daemon.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/repos.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/skills/methodproof/SKILL.md +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/store.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/sync.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/methodproof/viewer.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/test_windows_compat.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/tests/__init__.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/tests/test_analysis.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/tests/test_graph.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/tests/test_hooks.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/tests/test_live.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/tests/test_openclaw_hooks.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/tests/test_store.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/tests/test_wrappers.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.3}/uv.lock +0 -0
|
@@ -338,6 +338,14 @@ def cmd_init(args: argparse.Namespace) -> None:
|
|
|
338
338
|
capture = cfg.get("capture", {})
|
|
339
339
|
store.init_db()
|
|
340
340
|
|
|
341
|
+
# Offer auto-update (recommended)
|
|
342
|
+
if not cfg.get("auto_update_offered"):
|
|
343
|
+
answer = input("Enable auto-update (recommended)? [Y/n]: ").strip().lower()
|
|
344
|
+
cfg["auto_update_offered"] = True
|
|
345
|
+
cfg["auto_update"] = answer != "n"
|
|
346
|
+
print(f"Auto-update: {'ON — updates install before each session' if cfg['auto_update'] else 'OFF — toggle with: mp update --auto'}")
|
|
347
|
+
config.save(cfg)
|
|
348
|
+
|
|
341
349
|
# Offer mp alias
|
|
342
350
|
if not cfg.get("alias_offered"):
|
|
343
351
|
answer = input("Install `mp` as a shorthand alias? [Y/n]: ").strip().lower()
|
|
@@ -456,6 +464,8 @@ def _print_commands() -> None:
|
|
|
456
464
|
print(f" {_M}mp reset{R} Clear login and consent (keeps sessions)")
|
|
457
465
|
print(f" {_M}mp delete{R} {_D}<id>{R} Delete a session and all its data")
|
|
458
466
|
print(f" {_M}mp update{R} Update to the latest version")
|
|
467
|
+
print(f" {_M}mp update --auto{R} Toggle auto-update on {_D}(recommended){R}")
|
|
468
|
+
print(f" {_M}mp update --no-auto{R} Toggle auto-update off")
|
|
459
469
|
print(f" {_M}mp uninstall{R} Remove all hooks, data, and config")
|
|
460
470
|
print()
|
|
461
471
|
print(f" {_D}To view this at any time run: mp help{R}\n")
|
|
@@ -488,6 +498,8 @@ def _print_commands_plain() -> None:
|
|
|
488
498
|
print(" mp reset Clear login and consent (keeps sessions)")
|
|
489
499
|
print(" mp delete <id> Delete a session and all its data")
|
|
490
500
|
print(" mp update Update to the latest version")
|
|
501
|
+
print(" mp update --auto Toggle auto-update on (recommended)")
|
|
502
|
+
print(" mp update --no-auto Toggle auto-update off")
|
|
491
503
|
print(" mp uninstall Remove all hooks, data, and config")
|
|
492
504
|
print()
|
|
493
505
|
print(" To view this at any time run: mp help\n")
|
|
@@ -497,15 +509,20 @@ def cmd_uninstall(args: argparse.Namespace) -> None:
|
|
|
497
509
|
"""Remove all MethodProof hooks, data, and config."""
|
|
498
510
|
import shutil
|
|
499
511
|
|
|
512
|
+
keep_sessions = getattr(args, "keep_sessions", False)
|
|
513
|
+
|
|
500
514
|
if not args.force:
|
|
501
515
|
sessions = store.list_sessions()
|
|
502
516
|
unsynced = [s for s in sessions if not s["synced"]]
|
|
503
|
-
if
|
|
504
|
-
print(f"
|
|
505
|
-
answer = input("\n Remove all MethodProof
|
|
517
|
+
if sessions:
|
|
518
|
+
print(f" {len(sessions)} session(s) on disk ({len(unsynced)} not pushed).")
|
|
519
|
+
answer = input("\n Remove all MethodProof hooks and config? [y/N]: ").strip().lower()
|
|
506
520
|
if answer not in ("y", "yes"):
|
|
507
521
|
print(" Cancelled.")
|
|
508
522
|
return
|
|
523
|
+
if sessions and not keep_sessions:
|
|
524
|
+
keep = input(" Keep session data? [Y/n]: ").strip().lower()
|
|
525
|
+
keep_sessions = keep != "n"
|
|
509
526
|
|
|
510
527
|
removed = []
|
|
511
528
|
|
|
@@ -560,14 +577,29 @@ def cmd_uninstall(args: argparse.Namespace) -> None:
|
|
|
560
577
|
|
|
561
578
|
# Data directory
|
|
562
579
|
if config.DIR.exists():
|
|
563
|
-
|
|
564
|
-
|
|
580
|
+
if keep_sessions and config.DB_PATH.exists():
|
|
581
|
+
# Remove everything except the session database
|
|
582
|
+
for item in config.DIR.iterdir():
|
|
583
|
+
if item == config.DB_PATH:
|
|
584
|
+
continue
|
|
585
|
+
if item.is_dir():
|
|
586
|
+
shutil.rmtree(item)
|
|
587
|
+
else:
|
|
588
|
+
item.unlink()
|
|
589
|
+
removed.append(str(item))
|
|
590
|
+
removed.append(f"Kept: {config.DB_PATH}")
|
|
591
|
+
else:
|
|
592
|
+
shutil.rmtree(config.DIR)
|
|
593
|
+
removed.append(str(config.DIR))
|
|
565
594
|
|
|
566
595
|
if removed:
|
|
567
596
|
print("\n Removed:")
|
|
568
597
|
for r in removed:
|
|
569
598
|
print(f" {r}")
|
|
570
599
|
print("\n To remove the CLI itself: pip uninstall methodproof")
|
|
600
|
+
if keep_sessions:
|
|
601
|
+
print(f" Session data preserved at: {config.DB_PATH}")
|
|
602
|
+
print(" Re-install and run `mp init` to resume.")
|
|
571
603
|
print(" Restart your shell to clear hooks.\n")
|
|
572
604
|
|
|
573
605
|
|
|
@@ -582,12 +614,12 @@ def cmd_reset(args: argparse.Namespace) -> None:
|
|
|
582
614
|
for key in ("token", "refresh_token", "email", "e2e_key"):
|
|
583
615
|
cfg[key] = config._DEFAULTS[key]
|
|
584
616
|
for key in ("capture", "research_consent", "publish_redact", "consent_acknowledged",
|
|
585
|
-
"journal_mode", "journal_credits"):
|
|
617
|
+
"journal_mode", "journal_credits", "auto_update", "auto_update_offered"):
|
|
586
618
|
cfg[key] = config._DEFAULTS.get(key)
|
|
587
619
|
config.save(cfg)
|
|
588
620
|
cleared = ["login token", "refresh token", "email", "e2e key",
|
|
589
621
|
"capture consent", "research consent", "redaction defaults",
|
|
590
|
-
"journal mode"]
|
|
622
|
+
"journal mode", "auto-update"]
|
|
591
623
|
print(" Cleared:")
|
|
592
624
|
for c in cleared:
|
|
593
625
|
print(f" {c}")
|
|
@@ -670,6 +702,8 @@ def _is_daemon_alive() -> bool:
|
|
|
670
702
|
|
|
671
703
|
def cmd_start(args: argparse.Namespace) -> None:
|
|
672
704
|
cfg = config.load()
|
|
705
|
+
if cfg.get("auto_update"):
|
|
706
|
+
_auto_update()
|
|
673
707
|
if cfg.get("active_session"):
|
|
674
708
|
if _is_daemon_alive():
|
|
675
709
|
print(f"Session active: {cfg['active_session'][:8]}")
|
|
@@ -1104,6 +1138,17 @@ def cmd_review(args: argparse.Namespace) -> None:
|
|
|
1104
1138
|
|
|
1105
1139
|
|
|
1106
1140
|
def cmd_update(args: argparse.Namespace) -> None:
|
|
1141
|
+
# Handle --auto / --no-auto toggle
|
|
1142
|
+
if getattr(args, "auto", None) is not None:
|
|
1143
|
+
cfg = config.load()
|
|
1144
|
+
cfg["auto_update"] = args.auto
|
|
1145
|
+
config.save(cfg)
|
|
1146
|
+
state = "ON" if args.auto else "OFF"
|
|
1147
|
+
print(f"Auto-update: {state}")
|
|
1148
|
+
if args.auto:
|
|
1149
|
+
print(" Updates will install automatically before each `mp start`.")
|
|
1150
|
+
return
|
|
1151
|
+
|
|
1107
1152
|
latest = _check_pypi_version()
|
|
1108
1153
|
current = _get_current_version()
|
|
1109
1154
|
if not latest:
|
|
@@ -1197,6 +1242,25 @@ def _update_check() -> None:
|
|
|
1197
1242
|
t.start()
|
|
1198
1243
|
|
|
1199
1244
|
|
|
1245
|
+
def _auto_update() -> None:
|
|
1246
|
+
"""Check PyPI and install update before starting a session."""
|
|
1247
|
+
latest = _check_pypi_version()
|
|
1248
|
+
current = _get_current_version()
|
|
1249
|
+
if not latest or latest == current:
|
|
1250
|
+
return
|
|
1251
|
+
print(f" Updating v{current} -> v{latest}...", end=" ", flush=True)
|
|
1252
|
+
import subprocess as sp
|
|
1253
|
+
result = sp.run(
|
|
1254
|
+
[sys.executable, "-m", "pip", "install", "--upgrade", "methodproof"],
|
|
1255
|
+
capture_output=True, text=True,
|
|
1256
|
+
)
|
|
1257
|
+
if result.returncode == 0:
|
|
1258
|
+
print("done.")
|
|
1259
|
+
_check_consent_drift()
|
|
1260
|
+
else:
|
|
1261
|
+
print("failed (run `mp update` manually).")
|
|
1262
|
+
|
|
1263
|
+
|
|
1200
1264
|
def cmd_mcp_serve(args: argparse.Namespace) -> None:
|
|
1201
1265
|
from methodproof.mcp import serve
|
|
1202
1266
|
serve()
|
|
@@ -1371,11 +1435,17 @@ def main() -> None:
|
|
|
1371
1435
|
rv = sub.add_parser("review", help="Review session data before pushing")
|
|
1372
1436
|
rv.add_argument("session_id", nargs="?")
|
|
1373
1437
|
sub.add_parser("consent", help="Change capture, research, and redaction settings")
|
|
1374
|
-
sub.add_parser("update", help="Update to the latest version from PyPI")
|
|
1438
|
+
up = sub.add_parser("update", help="Update to the latest version from PyPI")
|
|
1439
|
+
up_auto = up.add_mutually_exclusive_group()
|
|
1440
|
+
up_auto.add_argument("--auto", dest="auto", action="store_true", default=None,
|
|
1441
|
+
help="Enable auto-update before each mp start (recommended)")
|
|
1442
|
+
up_auto.add_argument("--no-auto", dest="auto", action="store_false",
|
|
1443
|
+
help="Disable auto-update")
|
|
1375
1444
|
rs = sub.add_parser("reset", help="Clear login and consent settings (keeps sessions and hooks)")
|
|
1376
1445
|
rs.add_argument("--force", "-f", action="store_true", help="Skip confirmation")
|
|
1377
1446
|
un = sub.add_parser("uninstall", help="Remove all hooks, data, and config")
|
|
1378
1447
|
un.add_argument("--force", "-f", action="store_true", help="Skip confirmation")
|
|
1448
|
+
un.add_argument("--keep-sessions", action="store_true", help="Preserve session database")
|
|
1379
1449
|
ext = sub.add_parser("extension", help="Browser extension pairing and status")
|
|
1380
1450
|
ext_sub = ext.add_subparsers(dest="ext_cmd")
|
|
1381
1451
|
ext_sub.add_parser("pair", help="Pair extension to active session")
|
|
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
|
|
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
|