methodproof 0.4.0__tar.gz → 0.4.2__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 (56) hide show
  1. methodproof-0.4.2/.github/workflows/ci.yml +122 -0
  2. {methodproof-0.4.0 → methodproof-0.4.2}/PKG-INFO +1 -1
  3. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/__init__.py +1 -1
  4. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/cli.py +78 -2
  5. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/config.py +1 -0
  6. {methodproof-0.4.0 → methodproof-0.4.2}/pyproject.toml +1 -1
  7. methodproof-0.4.0/.github/workflows/ci.yml +0 -35
  8. {methodproof-0.4.0 → methodproof-0.4.2}/.gitignore +0 -0
  9. {methodproof-0.4.0 → methodproof-0.4.2}/CHANGELOG.md +0 -0
  10. {methodproof-0.4.0 → methodproof-0.4.2}/LICENSE +0 -0
  11. {methodproof-0.4.0 → methodproof-0.4.2}/README.md +0 -0
  12. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/__main__.py +0 -0
  13. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/agents/__init__.py +0 -0
  14. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/agents/base.py +0 -0
  15. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/agents/music.py +0 -0
  16. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/agents/terminal.py +0 -0
  17. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/agents/watcher.py +0 -0
  18. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/analysis.py +0 -0
  19. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/bridge.py +0 -0
  20. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/crypto.py +0 -0
  21. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/graph.py +0 -0
  22. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hook.py +0 -0
  23. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/__init__.py +0 -0
  24. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/claude_code.py +0 -0
  25. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/claude_code.sh +0 -0
  26. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/cline_hook.sh +0 -0
  27. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/codex_hook.sh +0 -0
  28. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/gemini_hook.sh +0 -0
  29. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/install.py +0 -0
  30. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/kiro_hook.sh +0 -0
  31. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/mcp_register.py +0 -0
  32. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/openclaw/HOOK.md +0 -0
  33. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/openclaw/handler.ts +0 -0
  34. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/openclaw_install.py +0 -0
  35. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/opencode_plugin.js +0 -0
  36. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/hooks/wrappers.py +0 -0
  37. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/integrity.py +0 -0
  38. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/live.py +0 -0
  39. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/mcp.py +0 -0
  40. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/proxy.py +0 -0
  41. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/proxy_daemon.py +0 -0
  42. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/repos.py +0 -0
  43. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/skills/methodproof/SKILL.md +0 -0
  44. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/store.py +0 -0
  45. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/sync.py +0 -0
  46. {methodproof-0.4.0 → methodproof-0.4.2}/methodproof/viewer.py +0 -0
  47. {methodproof-0.4.0 → methodproof-0.4.2}/test_windows_compat.py +0 -0
  48. {methodproof-0.4.0 → methodproof-0.4.2}/tests/__init__.py +0 -0
  49. {methodproof-0.4.0 → methodproof-0.4.2}/tests/test_analysis.py +0 -0
  50. {methodproof-0.4.0 → methodproof-0.4.2}/tests/test_graph.py +0 -0
  51. {methodproof-0.4.0 → methodproof-0.4.2}/tests/test_hooks.py +0 -0
  52. {methodproof-0.4.0 → methodproof-0.4.2}/tests/test_live.py +0 -0
  53. {methodproof-0.4.0 → methodproof-0.4.2}/tests/test_openclaw_hooks.py +0 -0
  54. {methodproof-0.4.0 → methodproof-0.4.2}/tests/test_store.py +0 -0
  55. {methodproof-0.4.0 → methodproof-0.4.2}/tests/test_wrappers.py +0 -0
  56. {methodproof-0.4.0 → methodproof-0.4.2}/uv.lock +0 -0
@@ -0,0 +1,122 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: ["v*"]
7
+ pull_request:
8
+ branches: [main]
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: astral-sh/setup-uv@v4
16
+ with: { version: "latest" }
17
+ - uses: actions/setup-python@v5
18
+ with: { python-version: "3.12" }
19
+ - run: uv sync --frozen
20
+ - run: uv run pytest tests/ -v --tb=short
21
+
22
+ publish:
23
+ needs: test
24
+ if: startsWith(github.ref, 'refs/tags/v')
25
+ runs-on: ubuntu-latest
26
+ permissions:
27
+ id-token: write
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - uses: astral-sh/setup-uv@v4
31
+ with: { version: "latest" }
32
+ - uses: actions/setup-python@v5
33
+ with: { python-version: "3.12" }
34
+ - run: uv build
35
+ - uses: pypa/gh-action-pypi-publish@release/v1
36
+
37
+ update-homebrew:
38
+ needs: publish
39
+ if: startsWith(github.ref, 'refs/tags/v')
40
+ runs-on: ubuntu-latest
41
+ steps:
42
+ - uses: actions/checkout@v4
43
+
44
+ - name: Extract version from tag
45
+ id: version
46
+ run: echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"
47
+
48
+ - name: Wait for PyPI availability
49
+ run: |
50
+ VERSION=${{ steps.version.outputs.version }}
51
+ for i in $(seq 1 30); do
52
+ URL="https://files.pythonhosted.org/packages/source/m/methodproof/methodproof-${VERSION}.tar.gz"
53
+ if curl -sfIL "$URL" > /dev/null 2>&1; then
54
+ echo "Package available on PyPI"
55
+ exit 0
56
+ fi
57
+ echo "Waiting for PyPI... ($i/30)"
58
+ sleep 10
59
+ done
60
+ echo "::error::Package not available on PyPI after 5 minutes"
61
+ exit 1
62
+
63
+ - name: Compute SHA256
64
+ id: sha
65
+ run: |
66
+ VERSION=${{ steps.version.outputs.version }}
67
+ URL="https://files.pythonhosted.org/packages/source/m/methodproof/methodproof-${VERSION}.tar.gz"
68
+ SHA=$(curl -sfL "$URL" | sha256sum | cut -d' ' -f1)
69
+ echo "sha256=$SHA" >> "$GITHUB_OUTPUT"
70
+ echo "url=$URL" >> "$GITHUB_OUTPUT"
71
+
72
+ - name: Update Homebrew formula
73
+ env:
74
+ TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
75
+ run: |
76
+ VERSION=${{ steps.version.outputs.version }}
77
+ SHA=${{ steps.sha.outputs.sha256 }}
78
+ URL=${{ steps.sha.outputs.url }}
79
+
80
+ git clone https://x-access-token:${TAP_TOKEN}@github.com/MethodProof/homebrew-tools.git /tmp/tap
81
+ cd /tmp/tap
82
+
83
+ cat > Formula/mp.rb << FORMULA
84
+ class Mp < Formula
85
+ include Language::Python::Virtualenv
86
+
87
+ desc "Capture and visualize your engineering process as a knowledge graph"
88
+ homepage "https://github.com/MethodProof/methodproof-cli"
89
+ url "${URL}"
90
+ sha256 "${SHA}"
91
+ license "Apache-2.0"
92
+
93
+ depends_on "python@3.13"
94
+
95
+ resource "watchdog" do
96
+ url "https://files.pythonhosted.org/packages/source/w/watchdog/watchdog-6.0.0.tar.gz"
97
+ sha256 "9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282"
98
+ end
99
+
100
+ resource "websocket-client" do
101
+ url "https://files.pythonhosted.org/packages/source/w/websocket-client/websocket_client-1.8.0.tar.gz"
102
+ sha256 "3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da"
103
+ end
104
+
105
+ def install
106
+ virtualenv_install_with_resources
107
+ end
108
+
109
+ test do
110
+ assert_match "methodproof", shell_output("#{bin}/methodproof --help")
111
+ end
112
+ end
113
+ FORMULA
114
+
115
+ # Fix heredoc indentation
116
+ sed -i 's/^ //' Formula/mp.rb
117
+
118
+ git config user.name "github-actions[bot]"
119
+ git config user.email "github-actions[bot]@users.noreply.github.com"
120
+ git add Formula/mp.rb
121
+ git commit -m "update methodproof to ${VERSION}"
122
+ git push
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: methodproof
3
- Version: 0.4.0
3
+ Version: 0.4.2
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
@@ -1,3 +1,3 @@
1
1
  """MethodProof — see how you code."""
2
2
 
3
- __version__ = "0.4.0"
3
+ __version__ = "0.4.2"
@@ -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()
@@ -453,8 +461,11 @@ def _print_commands() -> None:
453
461
  print(f" {_W}ACCOUNT{R}")
454
462
  print(f" {_M}mp login{R} Connect to platform (opens browser)")
455
463
  print(f" {_M}mp consent{R} Change capture, research, and redaction settings")
464
+ print(f" {_M}mp reset{R} Clear login and consent (keeps sessions)")
456
465
  print(f" {_M}mp delete{R} {_D}<id>{R} Delete a session and all its data")
457
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")
458
469
  print(f" {_M}mp uninstall{R} Remove all hooks, data, and config")
459
470
  print()
460
471
  print(f" {_D}To view this at any time run: mp help{R}\n")
@@ -484,8 +495,11 @@ def _print_commands_plain() -> None:
484
495
  print(" ACCOUNT")
485
496
  print(" mp login Connect to platform (opens browser)")
486
497
  print(" mp consent Change capture, research, and redaction settings")
498
+ print(" mp reset Clear login and consent (keeps sessions)")
487
499
  print(" mp delete <id> Delete a session and all its data")
488
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")
489
503
  print(" mp uninstall Remove all hooks, data, and config")
490
504
  print()
491
505
  print(" To view this at any time run: mp help\n")
@@ -569,6 +583,29 @@ def cmd_uninstall(args: argparse.Namespace) -> None:
569
583
  print(" Restart your shell to clear hooks.\n")
570
584
 
571
585
 
586
+ def cmd_reset(args: argparse.Namespace) -> None:
587
+ """Wipe login credentials and consent config. Sessions and hooks kept."""
588
+ cfg = config.load()
589
+ if not args.force:
590
+ answer = input(" Clear login and consent settings? Sessions and hooks are kept. [y/N]: ").strip().lower()
591
+ if answer not in ("y", "yes"):
592
+ print(" Cancelled.")
593
+ return
594
+ for key in ("token", "refresh_token", "email", "e2e_key"):
595
+ cfg[key] = config._DEFAULTS[key]
596
+ for key in ("capture", "research_consent", "publish_redact", "consent_acknowledged",
597
+ "journal_mode", "journal_credits", "auto_update", "auto_update_offered"):
598
+ cfg[key] = config._DEFAULTS.get(key)
599
+ config.save(cfg)
600
+ cleared = ["login token", "refresh token", "email", "e2e key",
601
+ "capture consent", "research consent", "redaction defaults",
602
+ "journal mode", "auto-update"]
603
+ print(" Cleared:")
604
+ for c in cleared:
605
+ print(f" {c}")
606
+ print("\n Run `mp init` to reconfigure, or `mp login` to reconnect.\n")
607
+
608
+
572
609
  def cmd_consent(args: argparse.Namespace) -> None:
573
610
  """Review or change capture, research, and redaction settings."""
574
611
  cfg = config.load()
@@ -645,6 +682,8 @@ def _is_daemon_alive() -> bool:
645
682
 
646
683
  def cmd_start(args: argparse.Namespace) -> None:
647
684
  cfg = config.load()
685
+ if cfg.get("auto_update"):
686
+ _auto_update()
648
687
  if cfg.get("active_session"):
649
688
  if _is_daemon_alive():
650
689
  print(f"Session active: {cfg['active_session'][:8]}")
@@ -1079,6 +1118,17 @@ def cmd_review(args: argparse.Namespace) -> None:
1079
1118
 
1080
1119
 
1081
1120
  def cmd_update(args: argparse.Namespace) -> None:
1121
+ # Handle --auto / --no-auto toggle
1122
+ if getattr(args, "auto", None) is not None:
1123
+ cfg = config.load()
1124
+ cfg["auto_update"] = args.auto
1125
+ config.save(cfg)
1126
+ state = "ON" if args.auto else "OFF"
1127
+ print(f"Auto-update: {state}")
1128
+ if args.auto:
1129
+ print(" Updates will install automatically before each `mp start`.")
1130
+ return
1131
+
1082
1132
  latest = _check_pypi_version()
1083
1133
  current = _get_current_version()
1084
1134
  if not latest:
@@ -1172,6 +1222,25 @@ def _update_check() -> None:
1172
1222
  t.start()
1173
1223
 
1174
1224
 
1225
+ def _auto_update() -> None:
1226
+ """Check PyPI and install update before starting a session."""
1227
+ latest = _check_pypi_version()
1228
+ current = _get_current_version()
1229
+ if not latest or latest == current:
1230
+ return
1231
+ print(f" Updating v{current} -> v{latest}...", end=" ", flush=True)
1232
+ import subprocess as sp
1233
+ result = sp.run(
1234
+ [sys.executable, "-m", "pip", "install", "--upgrade", "methodproof"],
1235
+ capture_output=True, text=True,
1236
+ )
1237
+ if result.returncode == 0:
1238
+ print("done.")
1239
+ _check_consent_drift()
1240
+ else:
1241
+ print("failed (run `mp update` manually).")
1242
+
1243
+
1175
1244
  def cmd_mcp_serve(args: argparse.Namespace) -> None:
1176
1245
  from methodproof.mcp import serve
1177
1246
  serve()
@@ -1346,7 +1415,14 @@ def main() -> None:
1346
1415
  rv = sub.add_parser("review", help="Review session data before pushing")
1347
1416
  rv.add_argument("session_id", nargs="?")
1348
1417
  sub.add_parser("consent", help="Change capture, research, and redaction settings")
1349
- sub.add_parser("update", help="Update to the latest version from PyPI")
1418
+ up = sub.add_parser("update", help="Update to the latest version from PyPI")
1419
+ up_auto = up.add_mutually_exclusive_group()
1420
+ up_auto.add_argument("--auto", dest="auto", action="store_true", default=None,
1421
+ help="Enable auto-update before each mp start (recommended)")
1422
+ up_auto.add_argument("--no-auto", dest="auto", action="store_false",
1423
+ help="Disable auto-update")
1424
+ rs = sub.add_parser("reset", help="Clear login and consent settings (keeps sessions and hooks)")
1425
+ rs.add_argument("--force", "-f", action="store_true", help="Skip confirmation")
1350
1426
  un = sub.add_parser("uninstall", help="Remove all hooks, data, and config")
1351
1427
  un.add_argument("--force", "-f", action="store_true", help="Skip confirmation")
1352
1428
  ext = sub.add_parser("extension", help="Browser extension pairing and status")
@@ -1375,7 +1451,7 @@ def main() -> None:
1375
1451
  "view": cmd_view, "log": cmd_log, "login": cmd_login,
1376
1452
  "push": cmd_push, "tag": cmd_tag, "publish": cmd_publish,
1377
1453
  "delete": cmd_delete, "review": cmd_review, "consent": cmd_consent,
1378
- "update": cmd_update, "uninstall": cmd_uninstall,
1454
+ "update": cmd_update, "reset": cmd_reset, "uninstall": cmd_uninstall,
1379
1455
  "extension": cmd_extension,
1380
1456
  "journal": cmd_journal,
1381
1457
  "intro": lambda _: _print_intro(),
@@ -35,6 +35,7 @@ _DEFAULTS: dict[str, Any] = {
35
35
  "research_consent": False,
36
36
  "journal_mode": False,
37
37
  "journal_credits": 2,
38
+ "auto_update": False,
38
39
  "publish_redact": {
39
40
  "command_output": True,
40
41
  "ai_prompts": True,
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "methodproof"
3
- version = "0.4.0"
3
+ version = "0.4.2"
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", "websocket-client>=1.7"]
@@ -1,35 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- tags: ["v*"]
7
- pull_request:
8
- branches: [main]
9
-
10
- jobs:
11
- test:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v4
15
- - uses: astral-sh/setup-uv@v4
16
- with: { version: "latest" }
17
- - uses: actions/setup-python@v5
18
- with: { python-version: "3.12" }
19
- - run: uv sync --frozen
20
- - run: uv run pytest tests/ -v --tb=short
21
-
22
- publish:
23
- needs: test
24
- if: startsWith(github.ref, 'refs/tags/v')
25
- runs-on: ubuntu-latest
26
- permissions:
27
- id-token: write
28
- steps:
29
- - uses: actions/checkout@v4
30
- - uses: astral-sh/setup-uv@v4
31
- with: { version: "latest" }
32
- - uses: actions/setup-python@v5
33
- with: { python-version: "3.12" }
34
- - run: uv build
35
- - uses: pypa/gh-action-pypi-publish@release/v1
File without changes
File without changes
File without changes
File without changes
File without changes