methodproof 0.7.34__tar.gz → 0.7.36__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 (87) hide show
  1. {methodproof-0.7.34 → methodproof-0.7.36}/CHANGELOG.md +19 -0
  2. {methodproof-0.7.34 → methodproof-0.7.36}/PKG-INFO +24 -1
  3. {methodproof-0.7.34 → methodproof-0.7.36}/README.md +23 -0
  4. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/cli.py +78 -11
  5. methodproof-0.7.36/methodproof/tui/start.py +812 -0
  6. {methodproof-0.7.34 → methodproof-0.7.36}/pyproject.toml +1 -1
  7. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_cli_start.py +5 -2
  8. methodproof-0.7.34/methodproof/tui/start.py +0 -436
  9. {methodproof-0.7.34 → methodproof-0.7.36}/.github/workflows/ci.yml +0 -0
  10. {methodproof-0.7.34 → methodproof-0.7.36}/.gitignore +0 -0
  11. {methodproof-0.7.34 → methodproof-0.7.36}/LICENSE +0 -0
  12. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/__init__.py +0 -0
  13. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/__main__.py +0 -0
  14. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/_daemon.py +0 -0
  15. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/agents/__init__.py +0 -0
  16. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/agents/base.py +0 -0
  17. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/agents/music.py +0 -0
  18. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/agents/terminal.py +0 -0
  19. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/agents/watcher.py +0 -0
  20. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/analysis.py +0 -0
  21. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/binding.py +0 -0
  22. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/bip39.py +0 -0
  23. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/bridge.py +0 -0
  24. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/config.py +0 -0
  25. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/crypto.py +0 -0
  26. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/e2e.py +0 -0
  27. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/graph.py +0 -0
  28. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hook.py +0 -0
  29. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/__init__.py +0 -0
  30. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/claude_code.py +0 -0
  31. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/claude_code.sh +0 -0
  32. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/cline_hook.sh +0 -0
  33. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/codex_hook.sh +0 -0
  34. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/gemini_hook.sh +0 -0
  35. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/install.py +0 -0
  36. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/kiro_hook.sh +0 -0
  37. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/mcp_register.py +0 -0
  38. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/openclaw/HOOK.md +0 -0
  39. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/openclaw/handler.ts +0 -0
  40. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/openclaw_install.py +0 -0
  41. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/opencode_plugin.js +0 -0
  42. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/hooks/wrappers.py +0 -0
  43. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/integrity.py +0 -0
  44. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/kdf.py +0 -0
  45. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/keychain.py +0 -0
  46. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/live.py +0 -0
  47. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/lock.py +0 -0
  48. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/mcp.py +0 -0
  49. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/migrate_db.py +0 -0
  50. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/proxy.py +0 -0
  51. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/proxy_daemon.py +0 -0
  52. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/repos.py +0 -0
  53. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/skills/methodproof/SKILL.md +0 -0
  54. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/store.py +0 -0
  55. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/sync.py +0 -0
  56. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/tui/__init__.py +0 -0
  57. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/tui/consent.py +0 -0
  58. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/tui/init.py +0 -0
  59. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/tui/log.py +0 -0
  60. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/tui/login_success.py +0 -0
  61. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/tui/review.py +0 -0
  62. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/tui/status.py +0 -0
  63. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/tui/theme.py +0 -0
  64. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/viewer.py +0 -0
  65. {methodproof-0.7.34 → methodproof-0.7.36}/methodproof/wordlist.py +0 -0
  66. {methodproof-0.7.34 → methodproof-0.7.36}/test_windows_compat.py +0 -0
  67. {methodproof-0.7.34 → methodproof-0.7.36}/tests/__init__.py +0 -0
  68. {methodproof-0.7.34 → methodproof-0.7.36}/tests/conftest.py +0 -0
  69. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_analysis.py +0 -0
  70. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_cli_auth.py +0 -0
  71. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_cli_config.py +0 -0
  72. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_cli_helpers.py +0 -0
  73. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_cli_session.py +0 -0
  74. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_cli_share.py +0 -0
  75. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_cli_update.py +0 -0
  76. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_e2e_integration.py +0 -0
  77. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_graph.py +0 -0
  78. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_hooks.py +0 -0
  79. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_live.py +0 -0
  80. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_openclaw_hooks.py +0 -0
  81. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_profiles.py +0 -0
  82. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_security.py +0 -0
  83. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_store.py +0 -0
  84. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_sync.py +0 -0
  85. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_viewer.py +0 -0
  86. {methodproof-0.7.34 → methodproof-0.7.36}/tests/test_wrappers.py +0 -0
  87. {methodproof-0.7.34 → methodproof-0.7.36}/uv.lock +0 -0
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.36] — 2026-04-12
4
+
5
+ ### Added
6
+ - **`mp connect [session_id]`** — attach TUI to an active recording session. Defaults to the current active session. `mp start` with an active session now auto-connects instead of erroring.
7
+ - **Source tracking in TUI** — events display which AI tool session generated them (e.g. `claude`, `codex`). Session bar shows source name and conversation number (`claude #2`). Tracks across multiple AI sessions within one `mp start`.
8
+ - **End session from TUI (`x`)** — confirmation prompt (`y`/`n`) to stop the session and finalize from within the TUI. `q` now exits the TUI without stopping the daemon — reconnect later with `mp connect`.
9
+
10
+ ### Fixed
11
+ - **Tree indentation invisible** — `gold_ember` (`#3d3118`) was near-invisible on dark background; switched to `gold_aged` (`#9a7b3a`).
12
+ - **Orphan tool_call events showed no tree** — `tool_call` after `agent_turn_end`/`agent_complete` fell through to flat rendering. Now implicitly opens a new chain.
13
+ - **`tool_name` field empty in TUI** — hook events store the tool name in `tool` not `tool_name`; formatters now check both fields.
14
+
15
+ ## [0.7.35] — 2026-04-12
16
+
17
+ ### Added
18
+ - **10 TUI controls for `mp start`** — `j` journal toggle, `f` event filter cycle (all/ai_input/ai_output/human/verify), `s` scroll lock, `/` feed search, `tab` sidebar cycle (stats/files/tools), `t` tree collapse (hides chain inners, shows `+N` on closer), `d` timestamp format cycle (clock/relative/elapsed), `c` copy last event to clipboard, `enter` event detail modal, `m` quiet mode (hides dim events). All modes shown as badges in the session bar.
19
+ - **Structural analysis summary on `user_prompt` events** — main line now shows `prompt_summary` from the 35-dimension analysis (e.g. `[instruction/synthesis] refactor auth — DI`) instead of just char count.
20
+ - **Multi-line journal output** — `user_prompt` shows full prompt text wrapped at 100 chars. `agent_complete` shows up to 500 chars / 8 lines preserving natural line breaks. Other event types remain single-line at 120 char cap.
21
+
3
22
  ## [0.7.34] — 2026-04-12
4
23
 
5
24
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: methodproof
3
- Version: 0.7.34
3
+ Version: 0.7.36
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
@@ -69,6 +69,29 @@ methodproof view # explore your session in the browser
69
69
  - **Auto-detection** — hooks for shell, Claude Code, OpenClaw, codex, gemini, aider installed automatically
70
70
  - **Platform sync** — `methodproof push` uploads sessions. `methodproof publish` makes them public and shareable
71
71
 
72
+ ## Live Session TUI
73
+
74
+ `mp start` launches a rich terminal UI that streams captured events in real-time. Events are color-coded by role (purple = AI input, gold = AI output, cream = human, green = verification) and indented into causal chains with Unicode tree characters.
75
+
76
+ ### Controls
77
+
78
+ | Key | Action | Description |
79
+ |-----|--------|-------------|
80
+ | `j` | Journal toggle | Show/hide full content lines (prompts, completions, diffs) mid-session |
81
+ | `f` | Filter cycle | All → AI input → AI output → Human → Verify |
82
+ | `s` | Scroll lock | Freeze scroll position while events buffer; release snaps to bottom |
83
+ | `/` | Search | Filter feed — non-matching lines render dimmed |
84
+ | `tab` | Sidebar cycle | Stats → Recent files → Recent tools |
85
+ | `t` | Tree collapse | Hide chain inners, show `+N` count on closer |
86
+ | `d` | Timestamp format | Clock (`12:34:56`) → Relative (`+1.2s`) → Elapsed (`45.3s`) |
87
+ | `c` | Copy last event | Full JSON metadata to clipboard |
88
+ | `enter` | Event detail | Modal overlay with all metadata fields |
89
+ | `m` | Quiet mode | Hide dim events (music, environment, MCP, context compaction) |
90
+ | `p` | Pause | Pause/resume event polling |
91
+ | `q` | Stop | Stop the session |
92
+
93
+ Active modes display as badges in the session bar: `J` (journal), `⏸` (scroll locked), `Q` (quiet), `T` (tree collapsed), filter name when not "all".
94
+
72
95
  ## Security Architecture
73
96
 
74
97
  Every event passes through consent gating, encryption, and hash chaining before touching disk. The platform adds a server co-signature on push, creating two-party evidence.
@@ -52,6 +52,29 @@ methodproof view # explore your session in the browser
52
52
  - **Auto-detection** — hooks for shell, Claude Code, OpenClaw, codex, gemini, aider installed automatically
53
53
  - **Platform sync** — `methodproof push` uploads sessions. `methodproof publish` makes them public and shareable
54
54
 
55
+ ## Live Session TUI
56
+
57
+ `mp start` launches a rich terminal UI that streams captured events in real-time. Events are color-coded by role (purple = AI input, gold = AI output, cream = human, green = verification) and indented into causal chains with Unicode tree characters.
58
+
59
+ ### Controls
60
+
61
+ | Key | Action | Description |
62
+ |-----|--------|-------------|
63
+ | `j` | Journal toggle | Show/hide full content lines (prompts, completions, diffs) mid-session |
64
+ | `f` | Filter cycle | All → AI input → AI output → Human → Verify |
65
+ | `s` | Scroll lock | Freeze scroll position while events buffer; release snaps to bottom |
66
+ | `/` | Search | Filter feed — non-matching lines render dimmed |
67
+ | `tab` | Sidebar cycle | Stats → Recent files → Recent tools |
68
+ | `t` | Tree collapse | Hide chain inners, show `+N` count on closer |
69
+ | `d` | Timestamp format | Clock (`12:34:56`) → Relative (`+1.2s`) → Elapsed (`45.3s`) |
70
+ | `c` | Copy last event | Full JSON metadata to clipboard |
71
+ | `enter` | Event detail | Modal overlay with all metadata fields |
72
+ | `m` | Quiet mode | Hide dim events (music, environment, MCP, context compaction) |
73
+ | `p` | Pause | Pause/resume event polling |
74
+ | `q` | Stop | Stop the session |
75
+
76
+ Active modes display as badges in the session bar: `J` (journal), `⏸` (scroll locked), `Q` (quiet), `T` (tree collapsed), filter name when not "all".
77
+
55
78
  ## Security Architecture
56
79
 
57
80
  Every event passes through consent gating, encryption, and hash chaining before touching disk. The platform adds a server co-signature on push, creating two-party evidence.
@@ -1098,9 +1098,11 @@ def cmd_start(args: argparse.Namespace) -> None:
1098
1098
 
1099
1099
  if cfg.get("active_session"):
1100
1100
  if _is_daemon_alive():
1101
- print(f"Session active: {cfg['active_session'][:8]}")
1102
- print("Run `methodproof stop` first.")
1103
- sys.exit(1)
1101
+ sid = cfg["active_session"]
1102
+ print(f" Session {sid[:8]} already active. Connecting...")
1103
+ args.session_id = None # connect resolves from config
1104
+ cmd_connect(args)
1105
+ return
1104
1106
  stale_sid = cfg["active_session"]
1105
1107
  _log_step(f"Cleaning stale session {stale_sid[:8]}")
1106
1108
  store.complete_session(stale_sid)
@@ -1301,7 +1303,9 @@ def cmd_start(args: argparse.Namespace) -> None:
1301
1303
  if _resolve_ui(args, cfg):
1302
1304
  session = store.get_session(sid)
1303
1305
  from methodproof.tui.start import run as tui_start
1304
- tui_start(sid, session)
1306
+ result = tui_start(sid, session)
1307
+ if result == "end_session":
1308
+ cmd_stop(args)
1305
1309
  return
1306
1310
  print("Run `mp stop` to finish.")
1307
1311
  return
@@ -1444,6 +1448,33 @@ def cmd_stop(args: argparse.Namespace) -> None:
1444
1448
  _print_summary(session, stats, cfg)
1445
1449
 
1446
1450
 
1451
+ def cmd_connect(args: argparse.Namespace) -> None:
1452
+ """Attach TUI to an active recording session."""
1453
+ cfg = config.load()
1454
+ sid = getattr(args, "session_id", None)
1455
+ if sid:
1456
+ # Resolve prefix
1457
+ sessions = store.list_sessions()
1458
+ match = [s for s in sessions if s["id"].startswith(sid)]
1459
+ if not match:
1460
+ print(f"No session matching '{sid}'")
1461
+ sys.exit(1)
1462
+ sid = match[0]["id"]
1463
+ else:
1464
+ sid = cfg.get("active_session")
1465
+ if not sid:
1466
+ print("No active session. Run `mp start` first.")
1467
+ sys.exit(1)
1468
+ session = store.get_session(sid)
1469
+ if not session:
1470
+ print(f"Session {sid[:8]} not found.")
1471
+ sys.exit(1)
1472
+ from methodproof.tui.start import run as tui_start
1473
+ result = tui_start(sid, session)
1474
+ if result == "end_session":
1475
+ cmd_stop(args)
1476
+
1477
+
1447
1478
  def cmd_view(args: argparse.Namespace) -> None:
1448
1479
  session = _resolve_session(args.session_id)
1449
1480
  from methodproof.viewer import view
@@ -1782,18 +1813,51 @@ def cmd_push(args: argparse.Namespace) -> None:
1782
1813
  local = getattr(args, "local", False)
1783
1814
  cfg = config.load(local=local)
1784
1815
  if not cfg.get("token"):
1785
- target = "local API" if local else "platform"
1786
1816
  print(f"Run `methodproof login{' --api-url http://localhost:8000' if local else ''}` first.")
1787
1817
  sys.exit(1)
1788
1818
  from methodproof.sync import sync_research_consent
1789
1819
  sync_research_consent(cfg["token"], cfg["api_url"])
1790
1820
  cfg = config.load(local=local)
1791
- sid = args.session_id or _latest()
1792
- if not sid:
1793
- print("No sessions to push.")
1794
- sys.exit(1)
1795
- from methodproof.sync import push
1796
1821
  force = getattr(args, "force", False)
1822
+
1823
+ if args.session_id:
1824
+ _push_one(args.session_id, cfg, force=force)
1825
+ return
1826
+
1827
+ # No session_id — check for unsynced completed sessions
1828
+ unsynced = [s for s in store.list_sessions()
1829
+ if not s["synced"] and s.get("completed_at")]
1830
+ if not unsynced:
1831
+ # Fall back to latest session
1832
+ sid = _latest()
1833
+ if not sid:
1834
+ print("No sessions to push.")
1835
+ sys.exit(1)
1836
+ _push_one(sid, cfg, force=force)
1837
+ return
1838
+
1839
+ if len(unsynced) == 1:
1840
+ _push_one(unsynced[0]["id"], cfg, force=force)
1841
+ return
1842
+
1843
+ # Multiple unsynced — offer to push all
1844
+ print(f"Found {len(unsynced)} unsynced sessions:\n")
1845
+ for s in unsynced:
1846
+ events = len(store.get_events(s["id"]))
1847
+ date = s["created_at"][:10] if s.get("created_at") else "?"
1848
+ print(f" {s['id'][:8]} {date} {events} events")
1849
+ print()
1850
+ answer = input(f"Push all {len(unsynced)}? [Y/n] ").strip().lower()
1851
+ if answer in ("", "y", "yes"):
1852
+ for s in unsynced:
1853
+ _push_one(s["id"], cfg, force=force)
1854
+ print()
1855
+ else:
1856
+ print("Cancelled. Push individually with `mp push <session_id>`.")
1857
+
1858
+
1859
+ def _push_one(sid: str, cfg: dict, force: bool = False) -> None:
1860
+ from methodproof.sync import push
1797
1861
  remote_id = push(sid, cfg["token"], cfg["api_url"], force=force)
1798
1862
  app = _app_url(cfg["api_url"])
1799
1863
  print(f"Pushed {sid[:8]} → {cfg['api_url']} (private).")
@@ -2205,6 +2269,9 @@ def main() -> None:
2205
2269
  s.add_argument("--streaming", action="store_true", help="Blocking foreground — stream every captured event to stdout")
2206
2270
  _add_ui_flags(s)
2207
2271
  sub.add_parser("stop", help="Stop recording")
2272
+ cn = sub.add_parser("connect", help="Attach TUI to active session")
2273
+ cn.add_argument("session_id", nargs="?", help="Session ID prefix (defaults to active)")
2274
+ _add_ui_flags(cn)
2208
2275
  v = sub.add_parser("view", help="Inspect captured session data")
2209
2276
  v.add_argument("session_id", nargs="?")
2210
2277
  l_log = sub.add_parser("log", help="List sessions")
@@ -2287,7 +2354,7 @@ def main() -> None:
2287
2354
 
2288
2355
  args = p.parse_args()
2289
2356
  cmds = {
2290
- "init": cmd_init, "start": cmd_start, "stop": cmd_stop,
2357
+ "init": cmd_init, "start": cmd_start, "stop": cmd_stop, "connect": cmd_connect,
2291
2358
  "view": cmd_view, "log": cmd_log, "status": cmd_status,
2292
2359
  "login": cmd_login, "logout": cmd_logout, "accounts": cmd_accounts, "switch": cmd_switch,
2293
2360
  "push": cmd_push, "tag": cmd_tag, "publish": cmd_publish,