methodproof 0.7.25__tar.gz → 0.7.27__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 (86) hide show
  1. {methodproof-0.7.25 → methodproof-0.7.27}/CHANGELOG.md +10 -0
  2. {methodproof-0.7.25 → methodproof-0.7.27}/PKG-INFO +1 -1
  3. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/config.py +4 -0
  4. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/claude_code.py +43 -3
  5. {methodproof-0.7.25 → methodproof-0.7.27}/pyproject.toml +1 -1
  6. {methodproof-0.7.25 → methodproof-0.7.27}/.github/workflows/ci.yml +0 -0
  7. {methodproof-0.7.25 → methodproof-0.7.27}/.gitignore +0 -0
  8. {methodproof-0.7.25 → methodproof-0.7.27}/LICENSE +0 -0
  9. {methodproof-0.7.25 → methodproof-0.7.27}/README.md +0 -0
  10. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/__init__.py +0 -0
  11. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/__main__.py +0 -0
  12. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/_daemon.py +0 -0
  13. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/agents/__init__.py +0 -0
  14. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/agents/base.py +0 -0
  15. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/agents/music.py +0 -0
  16. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/agents/terminal.py +0 -0
  17. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/agents/watcher.py +0 -0
  18. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/analysis.py +0 -0
  19. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/binding.py +0 -0
  20. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/bip39.py +0 -0
  21. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/bridge.py +0 -0
  22. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/cli.py +0 -0
  23. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/crypto.py +0 -0
  24. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/e2e.py +0 -0
  25. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/graph.py +0 -0
  26. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hook.py +0 -0
  27. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/__init__.py +0 -0
  28. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/claude_code.sh +0 -0
  29. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/cline_hook.sh +0 -0
  30. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/codex_hook.sh +0 -0
  31. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/gemini_hook.sh +0 -0
  32. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/install.py +0 -0
  33. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/kiro_hook.sh +0 -0
  34. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/mcp_register.py +0 -0
  35. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/openclaw/HOOK.md +0 -0
  36. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/openclaw/handler.ts +0 -0
  37. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/openclaw_install.py +0 -0
  38. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/opencode_plugin.js +0 -0
  39. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/hooks/wrappers.py +0 -0
  40. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/integrity.py +0 -0
  41. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/kdf.py +0 -0
  42. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/keychain.py +0 -0
  43. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/live.py +0 -0
  44. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/lock.py +0 -0
  45. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/mcp.py +0 -0
  46. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/migrate_db.py +0 -0
  47. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/proxy.py +0 -0
  48. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/proxy_daemon.py +0 -0
  49. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/repos.py +0 -0
  50. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/skills/methodproof/SKILL.md +0 -0
  51. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/store.py +0 -0
  52. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/sync.py +0 -0
  53. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/tui/__init__.py +0 -0
  54. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/tui/consent.py +0 -0
  55. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/tui/init.py +0 -0
  56. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/tui/log.py +0 -0
  57. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/tui/login_success.py +0 -0
  58. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/tui/review.py +0 -0
  59. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/tui/start.py +0 -0
  60. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/tui/status.py +0 -0
  61. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/tui/theme.py +0 -0
  62. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/viewer.py +0 -0
  63. {methodproof-0.7.25 → methodproof-0.7.27}/methodproof/wordlist.py +0 -0
  64. {methodproof-0.7.25 → methodproof-0.7.27}/test_windows_compat.py +0 -0
  65. {methodproof-0.7.25 → methodproof-0.7.27}/tests/__init__.py +0 -0
  66. {methodproof-0.7.25 → methodproof-0.7.27}/tests/conftest.py +0 -0
  67. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_analysis.py +0 -0
  68. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_cli_auth.py +0 -0
  69. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_cli_config.py +0 -0
  70. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_cli_helpers.py +0 -0
  71. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_cli_session.py +0 -0
  72. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_cli_share.py +0 -0
  73. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_cli_start.py +0 -0
  74. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_cli_update.py +0 -0
  75. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_e2e_integration.py +0 -0
  76. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_graph.py +0 -0
  77. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_hooks.py +0 -0
  78. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_live.py +0 -0
  79. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_openclaw_hooks.py +0 -0
  80. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_profiles.py +0 -0
  81. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_security.py +0 -0
  82. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_store.py +0 -0
  83. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_sync.py +0 -0
  84. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_viewer.py +0 -0
  85. {methodproof-0.7.25 → methodproof-0.7.27}/tests/test_wrappers.py +0 -0
  86. {methodproof-0.7.25 → methodproof-0.7.27}/uv.lock +0 -0
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.27] — 2026-04-12
4
+
5
+ ### Fixed
6
+ - **`result_preview` was Python repr for structured tool responses** — `str([{"type": "text", "text": "..."}])` produced unreadable output for Read/Grep/Glob tools. `_extract_result_text` now handles all three shapes Claude Code sends: plain string (Bash/Write/Edit), content block list (Read/Grep/Glob), and dict.
7
+
8
+ ## [0.7.26] — 2026-04-12
9
+
10
+ ### Fixed
11
+ - **Journal mode missing tool and prompt content** — `tool_call`, `tool_result`, and `user_prompt` hook events never captured content even with journal mode on; the extractors never included it. `tool_call` now captures `tool_input_preview` (command/path/query smartly extracted), `tool_result` captures `result_preview` (500 char cap), `user_prompt` captures `prompt_text`. All three fields are added to `JOURNAL_CONTENT_FIELDS` so they're stripped when journal is off.
12
+
3
13
  ## [0.7.25] — 2026-04-12
4
14
 
5
15
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: methodproof
3
- Version: 0.7.25
3
+ Version: 0.7.27
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
@@ -114,6 +114,10 @@ JOURNAL_CONTENT_FIELDS: list[tuple[str, str]] = [
114
114
  ("browser_ai_chat", "url"),
115
115
  # Tasks — subject reveals intent
116
116
  ("task_created", "subject"),
117
+ # Claude Code hooks — tool input/output and raw user prompt
118
+ ("user_prompt", "prompt_text"),
119
+ ("tool_call", "tool_input_preview"),
120
+ ("tool_result", "result_preview"),
117
121
  ]
118
122
 
119
123
 
@@ -16,6 +16,28 @@ except ImportError:
16
16
  analyze_prompt = lambda _: {}
17
17
  compose_summary = lambda _: ""
18
18
 
19
+ def _extract_result_text(response) -> str:
20
+ """Extract plain text from tool_response regardless of shape.
21
+
22
+ Claude Code sends:
23
+ - str — Bash, Write, Edit, simple tools
24
+ - list — Read, Grep, Glob: [{"type": "text", "text": "..."}]
25
+ - dict — rare structured responses
26
+ """
27
+ if isinstance(response, str):
28
+ return response[:500]
29
+ if isinstance(response, list):
30
+ parts = [
31
+ block.get("text", "") if isinstance(block, dict) else str(block)
32
+ for block in response
33
+ if not isinstance(block, dict) or block.get("type") == "text"
34
+ ]
35
+ return "\n".join(parts)[:500]
36
+ if isinstance(response, dict):
37
+ return response.get("text") or response.get("content") or json.dumps(response)[:500]
38
+ return str(response)[:500]
39
+
40
+
19
41
  def _build_prompt_meta(text: str) -> dict:
20
42
  sa = analyze_prompt(text)
21
43
  sa["prompt_length"] = len(text)
@@ -58,13 +80,31 @@ _TYPE_MAP = {
58
80
 
59
81
  _TOOL = "claude_code"
60
82
 
83
+ def _tool_input_preview(d: dict) -> str:
84
+ """Compact one-line summary of tool input for journal mode."""
85
+ inp = d.get("tool_input") or {}
86
+ # Flatten the most useful field per tool rather than dumping the whole dict
87
+ for key in ("command", "file_path", "path", "query", "url", "description"):
88
+ if key in inp:
89
+ return str(inp[key])[:300]
90
+ return json.dumps(inp)[:300] if inp else ""
91
+
92
+
61
93
  _META_EXTRACTORS = {
62
94
  "UserPromptSubmit": lambda d: {
63
- "tool": _TOOL, "prompt_preview": _build_prompt_meta(d.get("prompt") or "").get("prompt_summary", ""),
95
+ "tool": _TOOL,
96
+ "prompt_text": d.get("prompt") or "",
97
+ "prompt_preview": _build_prompt_meta(d.get("prompt") or "").get("prompt_summary", ""),
64
98
  "prompt_length": len(d.get("prompt") or ""),
65
99
  },
66
- "PreToolUse": lambda d: {"tool": _TOOL, "tool_name": d.get("tool_name", "unknown")},
67
- "PostToolUse": lambda d: {"tool": _TOOL, "tool_name": d.get("tool_name", "unknown"), "success": True},
100
+ "PreToolUse": lambda d: {
101
+ "tool": _TOOL, "tool_name": d.get("tool_name", "unknown"),
102
+ "tool_input_preview": _tool_input_preview(d),
103
+ },
104
+ "PostToolUse": lambda d: {
105
+ "tool": _TOOL, "tool_name": d.get("tool_name", "unknown"), "success": True,
106
+ "result_preview": _extract_result_text(d.get("tool_response")),
107
+ },
68
108
  "PostToolUseFailure": lambda d: {
69
109
  "tool": _TOOL, "tool_name": d.get("tool_name", "unknown"),
70
110
  "success": False, "is_interrupt": d.get("is_interrupt", False),
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "methodproof"
3
- version = "0.7.25"
3
+ version = "0.7.27"
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", "cryptography>=43.0", "keyring>=25.0", "textual>=0.59", "rich>=13.7"]
File without changes
File without changes
File without changes
File without changes