methodproof 0.4.1__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.
- methodproof-0.4.2/.github/workflows/ci.yml +122 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/PKG-INFO +1 -1
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/__init__.py +1 -1
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/cli.py +52 -3
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/config.py +1 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/pyproject.toml +1 -1
- methodproof-0.4.1/.github/workflows/ci.yml +0 -35
- {methodproof-0.4.1 → methodproof-0.4.2}/.gitignore +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/CHANGELOG.md +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/LICENSE +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/README.md +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/__main__.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/agents/__init__.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/agents/base.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/agents/music.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/agents/terminal.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/agents/watcher.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/analysis.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/bridge.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/crypto.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/graph.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hook.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/__init__.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/claude_code.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/claude_code.sh +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/cline_hook.sh +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/codex_hook.sh +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/gemini_hook.sh +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/install.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/kiro_hook.sh +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/mcp_register.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/openclaw/HOOK.md +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/openclaw/handler.ts +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/openclaw_install.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/opencode_plugin.js +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/hooks/wrappers.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/integrity.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/live.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/mcp.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/proxy.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/proxy_daemon.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/repos.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/skills/methodproof/SKILL.md +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/store.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/sync.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/methodproof/viewer.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/test_windows_compat.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/tests/__init__.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/tests/test_analysis.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/tests/test_graph.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/tests/test_hooks.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/tests/test_live.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/tests/test_openclaw_hooks.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/tests/test_store.py +0 -0
- {methodproof-0.4.1 → methodproof-0.4.2}/tests/test_wrappers.py +0 -0
- {methodproof-0.4.1 → 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
|
|
@@ -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")
|
|
@@ -582,12 +594,12 @@ def cmd_reset(args: argparse.Namespace) -> None:
|
|
|
582
594
|
for key in ("token", "refresh_token", "email", "e2e_key"):
|
|
583
595
|
cfg[key] = config._DEFAULTS[key]
|
|
584
596
|
for key in ("capture", "research_consent", "publish_redact", "consent_acknowledged",
|
|
585
|
-
"journal_mode", "journal_credits"):
|
|
597
|
+
"journal_mode", "journal_credits", "auto_update", "auto_update_offered"):
|
|
586
598
|
cfg[key] = config._DEFAULTS.get(key)
|
|
587
599
|
config.save(cfg)
|
|
588
600
|
cleared = ["login token", "refresh token", "email", "e2e key",
|
|
589
601
|
"capture consent", "research consent", "redaction defaults",
|
|
590
|
-
"journal mode"]
|
|
602
|
+
"journal mode", "auto-update"]
|
|
591
603
|
print(" Cleared:")
|
|
592
604
|
for c in cleared:
|
|
593
605
|
print(f" {c}")
|
|
@@ -670,6 +682,8 @@ def _is_daemon_alive() -> bool:
|
|
|
670
682
|
|
|
671
683
|
def cmd_start(args: argparse.Namespace) -> None:
|
|
672
684
|
cfg = config.load()
|
|
685
|
+
if cfg.get("auto_update"):
|
|
686
|
+
_auto_update()
|
|
673
687
|
if cfg.get("active_session"):
|
|
674
688
|
if _is_daemon_alive():
|
|
675
689
|
print(f"Session active: {cfg['active_session'][:8]}")
|
|
@@ -1104,6 +1118,17 @@ def cmd_review(args: argparse.Namespace) -> None:
|
|
|
1104
1118
|
|
|
1105
1119
|
|
|
1106
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
|
+
|
|
1107
1132
|
latest = _check_pypi_version()
|
|
1108
1133
|
current = _get_current_version()
|
|
1109
1134
|
if not latest:
|
|
@@ -1197,6 +1222,25 @@ def _update_check() -> None:
|
|
|
1197
1222
|
t.start()
|
|
1198
1223
|
|
|
1199
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
|
+
|
|
1200
1244
|
def cmd_mcp_serve(args: argparse.Namespace) -> None:
|
|
1201
1245
|
from methodproof.mcp import serve
|
|
1202
1246
|
serve()
|
|
@@ -1371,7 +1415,12 @@ def main() -> None:
|
|
|
1371
1415
|
rv = sub.add_parser("review", help="Review session data before pushing")
|
|
1372
1416
|
rv.add_argument("session_id", nargs="?")
|
|
1373
1417
|
sub.add_parser("consent", help="Change capture, research, and redaction settings")
|
|
1374
|
-
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")
|
|
1375
1424
|
rs = sub.add_parser("reset", help="Clear login and consent settings (keeps sessions and hooks)")
|
|
1376
1425
|
rs.add_argument("--force", "-f", action="store_true", help="Skip confirmation")
|
|
1377
1426
|
un = sub.add_parser("uninstall", help="Remove all hooks, data, and config")
|
|
@@ -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
|
|
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
|