hypha-debugger 0.1.7__tar.gz → 0.1.8__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 (22) hide show
  1. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/PKG-INFO +1 -1
  2. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger/__init__.py +1 -1
  3. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger/debugger.py +5 -36
  4. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger.egg-info/PKG-INFO +1 -1
  5. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/pyproject.toml +1 -1
  6. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/tests/test_services.py +5 -3
  7. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/README.md +0 -0
  8. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger/__main__.py +0 -0
  9. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger/services/__init__.py +0 -0
  10. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger/services/execute.py +0 -0
  11. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger/services/filesystem.py +0 -0
  12. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger/services/info.py +0 -0
  13. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger/services/inspect_vars.py +0 -0
  14. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger/services/source.py +0 -0
  15. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger/utils/__init__.py +0 -0
  16. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger/utils/env.py +0 -0
  17. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger.egg-info/SOURCES.txt +0 -0
  18. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger.egg-info/dependency_links.txt +0 -0
  19. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger.egg-info/entry_points.txt +0 -0
  20. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger.egg-info/requires.txt +0 -0
  21. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/hypha_debugger.egg-info/top_level.txt +0 -0
  22. {hypha_debugger-0.1.7 → hypha_debugger-0.1.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hypha-debugger
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: Injectable debugger for Python processes and AI agents, powered by Hypha RPC
5
5
  Author: Amun AI AB
6
6
  License: MIT
@@ -12,5 +12,5 @@ Usage (sync):
12
12
 
13
13
  from hypha_debugger.debugger import start_debugger, start_debugger_sync, DebugSession
14
14
 
15
- __version__ = "0.1.7"
15
+ __version__ = "0.1.8"
16
16
  __all__ = ["start_debugger", "start_debugger_sync", "DebugSession", "__version__"]
@@ -54,24 +54,9 @@ def _build_instruction_block(service_url: str, token: str = "") -> str:
54
54
  auth = f' -H "Authorization: Bearer $TOKEN"' if token else ""
55
55
  lines = [
56
56
  "# Hypha Remote Debugger — Python Process",
57
- "# A debugger is attached to a running Python process.",
58
- "# You can remotely execute code, read/write files, inspect variables,",
59
- "# and query process info via the HTTP API below.",
60
- "#",
61
- "# Available functions:",
62
- "# get_process_info - PID, Python version, CWD, platform, memory",
63
- "# execute_code - Run Python code (persistent REPL, auto-captures last expr)",
64
- "# get_variable - Inspect a variable by name",
65
- "# list_variables - List variables in a namespace",
66
- "# get_stack_trace - Stack traces of all threads",
67
- "# list_files - List directory contents",
68
- "# read_file - Read file content (with offset/limit)",
69
- "# write_file - Write/append to a file",
70
- "# get_installed_packages - List pip packages",
71
- "# get_source - Get debugger source code (for self-inspection)",
72
- "# get_skill_md - Get full API docs as Markdown",
73
- "#",
74
- "# POST endpoints accept JSON body with parameter names as keys.",
57
+ "# A remote debugger is attached to a running Python process.",
58
+ "# You can execute code, read/write files, inspect variables, and more.",
59
+ "# Call get_skill_md for full API docs with all available functions.",
75
60
  "",
76
61
  f'SERVICE_URL="{service_url}"',
77
62
  ]
@@ -79,28 +64,12 @@ def _build_instruction_block(service_url: str, token: str = "") -> str:
79
64
  lines.append(f'TOKEN="{token}"')
80
65
  lines += [
81
66
  "",
82
- "# Get process info (PID, Python version, CWD, memory):",
83
- f'curl "$SERVICE_URL/get_process_info"{auth}',
84
- "",
85
- "# Execute Python code (timeout default 30s):",
67
+ "# Execute Python code:",
86
68
  f'curl -X POST "$SERVICE_URL/execute_code"{auth}'
87
69
  ' -H "Content-Type: application/json"'
88
70
  " -d '{\"code\": \"import sys; sys.version\"}'",
89
71
  "",
90
- "# Write a file:",
91
- f'curl -X POST "$SERVICE_URL/write_file"{auth}'
92
- ' -H "Content-Type: application/json"'
93
- " -d '{\"path\": \"hello.txt\", \"content\": \"Hello, world!\"}'",
94
- "",
95
- "# List files in working directory:",
96
- f'curl "$SERVICE_URL/list_files"{auth}',
97
- "",
98
- "# Read a file:",
99
- f'curl -X POST "$SERVICE_URL/read_file"{auth}'
100
- ' -H "Content-Type: application/json"'
101
- " -d '{\"path\": \"hello.txt\"}'",
102
- "",
103
- "# Get full API documentation:",
72
+ "# Get full API docs (all functions, parameters, examples):",
104
73
  f'curl "$SERVICE_URL/get_skill_md"{auth}',
105
74
  ]
106
75
  return "\n".join(lines)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hypha-debugger
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: Injectable debugger for Python processes and AI agents, powered by Hypha RPC
5
5
  Author: Amun AI AB
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "hypha-debugger"
7
- version = "0.1.7"
7
+ version = "0.1.8"
8
8
  description = "Injectable debugger for Python processes and AI agents, powered by Hypha RPC"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -255,7 +255,7 @@ def test_instruction_block_no_token():
255
255
  assert "TOKEN=" not in block
256
256
  assert "Authorization" not in block
257
257
  assert "execute_code" in block
258
- assert "write_file" in block
258
+ assert "get_skill_md" in block
259
259
 
260
260
 
261
261
  def test_instruction_block_with_token():
@@ -302,11 +302,13 @@ def test_get_skill_md():
302
302
  assert "SERVICE_URL" in md
303
303
 
304
304
 
305
- def test_instruction_block_includes_new_functions():
305
+ def test_instruction_block_concise():
306
306
  from hypha_debugger.debugger import _build_instruction_block
307
307
  block = _build_instruction_block("https://example.com/ws/services/py-debugger-abc")
308
- assert "get_source" in block
309
308
  assert "get_skill_md" in block
309
+ # Should NOT have the verbose function list anymore
310
+ assert "get_variable" not in block
311
+ assert "list_files" not in block
310
312
 
311
313
 
312
314
  def test_debug_session_print_instructions(capsys):
File without changes
File without changes