ripperdoc 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl

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 (51) hide show
  1. ripperdoc/__init__.py +1 -1
  2. ripperdoc/cli/cli.py +66 -8
  3. ripperdoc/cli/commands/__init__.py +4 -0
  4. ripperdoc/cli/commands/agents_cmd.py +22 -0
  5. ripperdoc/cli/commands/context_cmd.py +11 -1
  6. ripperdoc/cli/commands/doctor_cmd.py +200 -0
  7. ripperdoc/cli/commands/memory_cmd.py +209 -0
  8. ripperdoc/cli/commands/models_cmd.py +25 -0
  9. ripperdoc/cli/commands/tasks_cmd.py +27 -0
  10. ripperdoc/cli/ui/rich_ui.py +156 -9
  11. ripperdoc/core/agents.py +4 -2
  12. ripperdoc/core/config.py +48 -3
  13. ripperdoc/core/default_tools.py +16 -2
  14. ripperdoc/core/permissions.py +19 -0
  15. ripperdoc/core/query.py +231 -297
  16. ripperdoc/core/query_utils.py +537 -0
  17. ripperdoc/core/system_prompt.py +2 -1
  18. ripperdoc/core/tool.py +13 -0
  19. ripperdoc/tools/background_shell.py +9 -3
  20. ripperdoc/tools/bash_tool.py +15 -0
  21. ripperdoc/tools/file_edit_tool.py +7 -0
  22. ripperdoc/tools/file_read_tool.py +7 -0
  23. ripperdoc/tools/file_write_tool.py +7 -0
  24. ripperdoc/tools/glob_tool.py +55 -15
  25. ripperdoc/tools/grep_tool.py +7 -0
  26. ripperdoc/tools/ls_tool.py +242 -73
  27. ripperdoc/tools/mcp_tools.py +32 -10
  28. ripperdoc/tools/multi_edit_tool.py +11 -0
  29. ripperdoc/tools/notebook_edit_tool.py +6 -3
  30. ripperdoc/tools/task_tool.py +7 -0
  31. ripperdoc/tools/todo_tool.py +159 -25
  32. ripperdoc/tools/tool_search_tool.py +9 -0
  33. ripperdoc/utils/git_utils.py +276 -0
  34. ripperdoc/utils/json_utils.py +28 -0
  35. ripperdoc/utils/log.py +130 -29
  36. ripperdoc/utils/mcp.py +71 -6
  37. ripperdoc/utils/memory.py +14 -1
  38. ripperdoc/utils/message_compaction.py +26 -5
  39. ripperdoc/utils/messages.py +63 -4
  40. ripperdoc/utils/output_utils.py +36 -9
  41. ripperdoc/utils/permissions/path_validation_utils.py +6 -0
  42. ripperdoc/utils/safe_get_cwd.py +4 -0
  43. ripperdoc/utils/session_history.py +27 -9
  44. ripperdoc/utils/todo.py +2 -2
  45. {ripperdoc-0.2.0.dist-info → ripperdoc-0.2.2.dist-info}/METADATA +4 -2
  46. ripperdoc-0.2.2.dist-info/RECORD +86 -0
  47. ripperdoc-0.2.0.dist-info/RECORD +0 -81
  48. {ripperdoc-0.2.0.dist-info → ripperdoc-0.2.2.dist-info}/WHEEL +0 -0
  49. {ripperdoc-0.2.0.dist-info → ripperdoc-0.2.2.dist-info}/entry_points.txt +0 -0
  50. {ripperdoc-0.2.0.dist-info → ripperdoc-0.2.2.dist-info}/licenses/LICENSE +0 -0
  51. {ripperdoc-0.2.0.dist-info → ripperdoc-0.2.2.dist-info}/top_level.txt +0 -0
@@ -11,6 +11,9 @@ from typing import Any, Awaitable, Callable, Optional, Set
11
11
  from ripperdoc.core.config import config_manager
12
12
  from ripperdoc.core.tool import Tool
13
13
  from ripperdoc.utils.permissions import PermissionDecision, ToolRule
14
+ from ripperdoc.utils.log import get_logger
15
+
16
+ logger = get_logger()
14
17
 
15
18
 
16
19
  @dataclass
@@ -46,11 +49,19 @@ def permission_key(tool: Tool[Any, Any], parsed_input: Any) -> str:
46
49
  try:
47
50
  return f"{tool.name}::path::{Path(getattr(parsed_input, 'file_path')).resolve()}"
48
51
  except Exception:
52
+ logger.exception(
53
+ "[permissions] Failed to resolve file_path for permission key",
54
+ extra={"tool": getattr(tool, "name", None)},
55
+ )
49
56
  return f"{tool.name}::path::{getattr(parsed_input, 'file_path')}"
50
57
  if hasattr(parsed_input, "path"):
51
58
  try:
52
59
  return f"{tool.name}::path::{Path(getattr(parsed_input, 'path')).resolve()}"
53
60
  except Exception:
61
+ logger.exception(
62
+ "[permissions] Failed to resolve path for permission key",
63
+ extra={"tool": getattr(tool, "name", None)},
64
+ )
54
65
  return f"{tool.name}::path::{getattr(parsed_input, 'path')}"
55
66
  return tool.name
56
67
 
@@ -116,6 +127,10 @@ def make_permission_checker(
116
127
  if hasattr(tool, "needs_permissions") and not tool.needs_permissions(parsed_input):
117
128
  return PermissionResult(result=True)
118
129
  except Exception:
130
+ logger.exception(
131
+ "[permissions] Tool needs_permissions check failed",
132
+ extra={"tool": getattr(tool, "name", None)},
133
+ )
119
134
  return PermissionResult(
120
135
  result=False,
121
136
  message="Permission check failed for this tool invocation.",
@@ -153,6 +168,10 @@ def make_permission_checker(
153
168
  if isinstance(decision, dict) and "behavior" in decision:
154
169
  decision = PermissionDecision(**decision)
155
170
  except Exception:
171
+ logger.exception(
172
+ "[permissions] Tool check_permissions failed",
173
+ extra={"tool": getattr(tool, "name", None)},
174
+ )
156
175
  decision = PermissionDecision(
157
176
  behavior="ask",
158
177
  message="Error checking permissions for this tool.",