voidrun 0.0.5__tar.gz → 0.0.6__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 (83) hide show
  1. {voidrun-0.0.5 → voidrun-0.0.6}/PKG-INFO +1 -1
  2. {voidrun-0.0.5 → voidrun-0.0.6}/pyproject.toml +1 -1
  3. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/create_sandbox_request.py +3 -3
  4. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/sandbox.py +3 -3
  5. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/interpreter.py +5 -2
  6. {voidrun-0.0.5 → voidrun-0.0.6}/.gitignore +0 -0
  7. {voidrun-0.0.5 → voidrun-0.0.6}/README.md +0 -0
  8. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/__init__.py +0 -0
  9. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/__init__.py +0 -0
  10. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/api/__init__.py +0 -0
  11. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/api/execution_api.py +0 -0
  12. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/api/file_system_api.py +0 -0
  13. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/api/images_api.py +0 -0
  14. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/api/organizations_api.py +0 -0
  15. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/api/sandboxes_api.py +0 -0
  16. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/api/system_api.py +0 -0
  17. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/api/users_api.py +0 -0
  18. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/api_client.py +0 -0
  19. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/api_response.py +0 -0
  20. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/configuration.py +0 -0
  21. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/exceptions.py +0 -0
  22. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/__init__.py +0 -0
  23. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/activate_api_key_request.py +0 -0
  24. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/api_key_response.py +0 -0
  25. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/api_response_sandbox.py +0 -0
  26. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/api_response_sandboxes_list.py +0 -0
  27. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/api_response_sandboxes_list_meta.py +0 -0
  28. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/command_kill_response.py +0 -0
  29. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/command_list_response.py +0 -0
  30. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/command_run_response.py +0 -0
  31. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/command_wait_response.py +0 -0
  32. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/compress_request.py +0 -0
  33. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/create_file_request.py +0 -0
  34. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/create_image_request.py +0 -0
  35. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/create_pty_session200_response.py +0 -0
  36. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/create_pty_session200_response_all_of_data.py +0 -0
  37. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/create_pty_session_request.py +0 -0
  38. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/create_sandbox201_response.py +0 -0
  39. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/disk_usage.py +0 -0
  40. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/error_response.py +0 -0
  41. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/exec_request.py +0 -0
  42. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/exec_response.py +0 -0
  43. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/exec_response_data.py +0 -0
  44. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/execute_in_session_request.py +0 -0
  45. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/extract_request.py +0 -0
  46. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/file_event.py +0 -0
  47. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/file_info.py +0 -0
  48. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/file_stats.py +0 -0
  49. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/generate_api_key_request.py +0 -0
  50. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/generated_api_key_response.py +0 -0
  51. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/get_current_user200_response.py +0 -0
  52. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/get_current_user200_response_orgs_inner.py +0 -0
  53. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/get_org_users200_response.py +0 -0
  54. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/get_org_users200_response_all_of_data_inner.py +0 -0
  55. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/get_pty_buffer200_response.py +0 -0
  56. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/get_pty_buffer200_response_all_of_data.py +0 -0
  57. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/get_version200_response.py +0 -0
  58. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/image.py +0 -0
  59. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/kill_background_process_request.py +0 -0
  60. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/list_files200_response.py +0 -0
  61. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/list_files200_response_data.py +0 -0
  62. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/list_pty_sessions200_response.py +0 -0
  63. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/list_pty_sessions200_response_all_of_data.py +0 -0
  64. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/organization.py +0 -0
  65. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/process_info.py +0 -0
  66. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/pty_session_info.py +0 -0
  67. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/resize_terminal_request.py +0 -0
  68. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/run_background_command_request.py +0 -0
  69. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/session_exec_request.py +0 -0
  70. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/session_exec_response.py +0 -0
  71. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/session_exec_stream_request.py +0 -0
  72. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/start_watch200_response.py +0 -0
  73. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/start_watch200_response_data.py +0 -0
  74. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/start_watch_request.py +0 -0
  75. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/models/success_response.py +0 -0
  76. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/py.typed +0 -0
  77. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/api_client/rest.py +0 -0
  78. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/client.py +0 -0
  79. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/commands.py +0 -0
  80. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/fs.py +0 -0
  81. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/pty.py +0 -0
  82. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/response.py +0 -0
  83. {voidrun-0.0.5 → voidrun-0.0.6}/voidrun/sandbox.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voidrun
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: Python SDK for VoidRun AI Sandbox
5
5
  Project-URL: Homepage, https://voidrun.io
6
6
  Project-URL: Documentation, https://docs.voidrun.io
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "voidrun"
7
- version = "0.0.5"
7
+ version = "0.0.6"
8
8
  description = "Python SDK for VoidRun AI Sandbox"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -35,10 +35,10 @@ class CreateSandboxRequest(BaseModel):
35
35
  user_id: Optional[StrictStr] = Field(default=None, alias="userId")
36
36
  sync: Optional[StrictBool] = Field(default=True, description="If true (default), creation blocks until the agent responds (fast readiness check, ~2s timeout)")
37
37
  env_vars: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variables to set on the sandbox", alias="envVars")
38
- disable_pause: Optional[StrictBool] = Field(default=None, description="If true, the sandbox will not be auto-paused due to inactivity", alias="disablePause")
38
+ auto_sleep: Optional[StrictBool] = Field(default=None, description="If true, the sandbox will be auto-paused due to inactivity", alias="autoSleep")
39
39
  region: Optional[StrictStr] = Field(default=None, description="Target region for the sandbox")
40
40
  ref_id: Optional[StrictStr] = Field(default=None, description="External reference ID for tracking", alias="refId")
41
- __properties: ClassVar[List[str]] = ["name", "image", "cpu", "mem", "orgId", "userId", "sync", "envVars", "disablePause", "region", "refId"]
41
+ __properties: ClassVar[List[str]] = ["name", "image", "cpu", "mem", "orgId", "userId", "sync", "envVars", "autoSleep", "region", "refId"]
42
42
 
43
43
  @field_validator('name')
44
44
  def name_validate_regular_expression(cls, value):
@@ -106,7 +106,7 @@ class CreateSandboxRequest(BaseModel):
106
106
  "userId": obj.get("userId"),
107
107
  "sync": obj.get("sync") if obj.get("sync") is not None else True,
108
108
  "envVars": obj.get("envVars"),
109
- "disablePause": obj.get("disablePause"),
109
+ "autoSleep": obj.get("autoSleep"),
110
110
  "region": obj.get("region"),
111
111
  "refId": obj.get("refId")
112
112
  })
@@ -38,10 +38,10 @@ class Sandbox(BaseModel):
38
38
  created_by: Optional[StrictStr] = Field(default=None, description="User ID who created the sandbox", alias="createdBy")
39
39
  org_id: Optional[StrictStr] = Field(default=None, description="Organization ID the sandbox belongs to", alias="orgId")
40
40
  env_vars: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variables set on the sandbox (optional, only present if configured)", alias="envVars")
41
- disable_pause: Optional[StrictBool] = Field(default=None, description="Indicates if auto-pause is disabled", alias="disablePause")
41
+ auto_sleep: Optional[StrictBool] = Field(default=None, description="Indicates if auto-sleep is enabled", alias="autoSleep")
42
42
  region: Optional[StrictStr] = Field(default=None, description="Region where the sandbox is hosted")
43
43
  ref_id: Optional[StrictStr] = Field(default=None, description="External reference ID", alias="refId")
44
- __properties: ClassVar[List[str]] = ["id", "name", "image", "cpu", "mem", "diskMB", "status", "createdAt", "createdBy", "orgId", "envVars", "disablePause", "region", "refId"]
44
+ __properties: ClassVar[List[str]] = ["id", "name", "image", "cpu", "mem", "diskMB", "status", "createdAt", "createdBy", "orgId", "envVars", "autoSleep", "region", "refId"]
45
45
 
46
46
  @field_validator('status')
47
47
  def status_validate_enum(cls, value):
@@ -115,7 +115,7 @@ class Sandbox(BaseModel):
115
115
  "createdBy": obj.get("createdBy"),
116
116
  "orgId": obj.get("orgId"),
117
117
  "envVars": obj.get("envVars"),
118
- "disablePause": obj.get("disablePause"),
118
+ "autoSleep": obj.get("autoSleep"),
119
119
  "region": obj.get("region"),
120
120
  "refId": obj.get("refId")
121
121
  })
@@ -78,8 +78,11 @@ class Interpreter:
78
78
  temp_file = f"/tmp/code_{timestamp}.js"
79
79
  return f"cat > {temp_file} << 'EOFJS'\n{code}\nEOFJS\nnode {temp_file} && rm -f {temp_file}"
80
80
  elif language == "typescript":
81
- temp_file = f"/tmp/code_{timestamp}.js"
82
- return f"cat > {temp_file} << 'EOFJS'\n{code}\nEOFJS\nnode {temp_file} && rm -f {temp_file}"
81
+ if len(code) < 1000 and "\n\n" not in code:
82
+ escaped = code.replace("'", "'\\''")
83
+ return f"tsx -e '{escaped}'"
84
+ temp_file = f"/tmp/code_{timestamp}.ts"
85
+ return f"cat > {temp_file} << 'EOFTS'\n{code}\nEOFTS\ntsx {temp_file} && rm -f {temp_file}"
83
86
  elif language in ["bash", "sh"]:
84
87
  escaped = code.replace("'", "'\\''")
85
88
  return f"bash -c '{escaped}'"
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