withruntime 0.20.0__tar.gz → 0.31.0__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 (433) hide show
  1. {withruntime-0.20.0/withruntime.egg-info → withruntime-0.31.0}/PKG-INFO +25 -4
  2. {withruntime-0.20.0 → withruntime-0.31.0}/README.md +24 -3
  3. {withruntime-0.20.0 → withruntime-0.31.0}/pyproject.toml +1 -1
  4. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_agents.py +66 -13
  5. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_apps_builds.py +137 -12
  6. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_capacity_wait.py +48 -4
  7. withruntime-0.31.0/tests/test_ci.py +184 -0
  8. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_new_providers.py +2 -1
  9. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_prime_contract.py +1 -1
  10. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_prime_validation.py +7 -2
  11. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_request_scope.py +3 -1
  12. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_router.py +1 -1
  13. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_daytona_download_labels.py +4 -2
  14. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_e2b_connection_cap.py +6 -2
  15. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_e2b_sandbox.py +26 -2
  16. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_jobs.py +34 -0
  17. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_lifecycle_settings.py +41 -0
  18. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_modal_dropin.py +25 -12
  19. withruntime-0.31.0/tests/test_modal_examples.py +179 -0
  20. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_package_typing.py +1 -1
  21. withruntime-0.31.0/tests/test_plans.py +120 -0
  22. withruntime-0.31.0/tests/test_prime_0_4_7.py +70 -0
  23. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_product_aliases.py +1 -1
  24. withruntime-0.31.0/tests/test_reservations.py +117 -0
  25. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_secrets.py +116 -0
  26. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_switch_image.py +6 -0
  27. withruntime-0.31.0/tests/test_trace_files.py +72 -0
  28. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/__init__.py +6 -2
  29. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_client.py +159 -39
  30. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/__init__.py +6 -0
  31. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/agents.py +61 -3
  32. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/apps.py +206 -9
  33. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/builds.py +1 -10
  34. withruntime-0.31.0/withruntime/_async_products/ci.py +174 -0
  35. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/jobs.py +79 -9
  36. withruntime-0.31.0/withruntime/_async_products/plans.py +76 -0
  37. withruntime-0.31.0/withruntime/_async_products/reservations.py +107 -0
  38. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/secrets.py +123 -10
  39. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_errors.py +22 -8
  40. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_client.py +159 -39
  41. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/__init__.py +6 -0
  42. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/agents.py +61 -3
  43. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/apps.py +206 -9
  44. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/builds.py +1 -10
  45. withruntime-0.31.0/withruntime/_sync_products/ci.py +175 -0
  46. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/jobs.py +79 -9
  47. withruntime-0.31.0/withruntime/_sync_products/plans.py +77 -0
  48. withruntime-0.31.0/withruntime/_sync_products/reservations.py +108 -0
  49. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/secrets.py +123 -10
  50. withruntime-0.31.0/withruntime/_version.py +1 -0
  51. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/_core.py +2 -1
  52. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/daytona/_core.py +2 -1
  53. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/_async_sandbox.py +23 -2
  54. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/_core.py +2 -1
  55. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/_sync_sandbox.py +23 -2
  56. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/__init__.py +229 -36
  57. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/_async.py +69 -10
  58. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/_fs_common.py +11 -1
  59. withruntime-0.31.0/withruntime/modal/container_process.py +4 -0
  60. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/image.py +43 -6
  61. withruntime-0.31.0/withruntime/modal/io_streams.py +4 -0
  62. withruntime-0.31.0/withruntime/modal/output.py +28 -0
  63. withruntime-0.31.0/withruntime/modal/stream_type.py +22 -0
  64. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/prime/__init__.py +2 -2
  65. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/prime/_async.py +8 -2
  66. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/prime/_sync.py +8 -2
  67. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/prime/models.py +6 -1
  68. {withruntime-0.20.0 → withruntime-0.31.0/withruntime.egg-info}/PKG-INFO +25 -4
  69. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime.egg-info/SOURCES.txt +16 -0
  70. withruntime-0.20.0/withruntime/_version.py +0 -1
  71. {withruntime-0.20.0 → withruntime-0.31.0}/LICENSE +0 -0
  72. {withruntime-0.20.0 → withruntime-0.31.0}/setup.cfg +0 -0
  73. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_account_errors.py +0 -0
  74. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_answer_start.py +0 -0
  75. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_async_stream_cleanup.py +0 -0
  76. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_audit.py +0 -0
  77. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_billing.py +0 -0
  78. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_blaxel.py +0 -0
  79. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_blaxel_0_4_17.py +0 -0
  80. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_blaxel_0_4_18.py +0 -0
  81. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_blaxel_create_timeout.py +0 -0
  82. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_blaxel_wait_deadline.py +0 -0
  83. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_browser.py +0 -0
  84. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_live.py +0 -0
  85. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_modal_deadline_errors.py +0 -0
  86. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_prime_process_lifecycle.py +0 -0
  87. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_disk_snapshots.py +0 -0
  88. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_e2b_deadline.py +0 -0
  89. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_e2b_pty.py +0 -0
  90. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_e2b_stream.py +0 -0
  91. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_e2b_watch.py +0 -0
  92. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_interpreter_deadline.py +0 -0
  93. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_modal.py +0 -0
  94. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_morph.py +0 -0
  95. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_official.py +0 -0
  96. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_pins.py +0 -0
  97. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_processes.py +0 -0
  98. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_runloop.py +0 -0
  99. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_shell.py +0 -0
  100. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_snapshot_capture.py +0 -0
  101. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_compat_python_sprites.py +0 -0
  102. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_customer_usage.py +0 -0
  103. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_daytona.py +0 -0
  104. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_daytona_0_223_1.py +0 -0
  105. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_daytona_0_224_1.py +0 -0
  106. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_daytona_0_225_0.py +0 -0
  107. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_daytona_create_cleanup.py +0 -0
  108. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_daytona_create_options.py +0 -0
  109. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_daytona_refusals_lifted.py +0 -0
  110. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_deepagents.py +0 -0
  111. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_e2b_2_55.py +0 -0
  112. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_e2b_code_interpreter.py +0 -0
  113. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_e2b_exports.py +0 -0
  114. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_e2b_fork_validation.py +0 -0
  115. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_e2b_upstream.py +0 -0
  116. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_e2b_watch.py +0 -0
  117. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_embed_and_webhook_watch.py +0 -0
  118. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_eval_sandbox.py +0 -0
  119. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_exec_stream.py +0 -0
  120. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_exec_stream_names.py +0 -0
  121. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_exec_user.py +0 -0
  122. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_file_archives.py +0 -0
  123. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_files_download.py +0 -0
  124. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_files_mode.py +0 -0
  125. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_files_upload_parallel.py +0 -0
  126. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_files_write_lost_body.py +0 -0
  127. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_harbor.py +0 -0
  128. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_http_tls_close.py +0 -0
  129. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_identity_token.py +0 -0
  130. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_image_delete_by_name.py +0 -0
  131. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_images_v2.py +0 -0
  132. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_images_volumes_interpreter.py +0 -0
  133. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_inspect_ai.py +0 -0
  134. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_interface_contract.py +0 -0
  135. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_late_answer.py +0 -0
  136. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_limits.py +0 -0
  137. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_machine_engine.py +0 -0
  138. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_modal_1_6_2.py +0 -0
  139. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_mounts.py +0 -0
  140. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_network_funding.py +0 -0
  141. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_network_products.py +0 -0
  142. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_observability.py +0 -0
  143. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_openai_agents.py +0 -0
  144. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_out_of_memory.py +0 -0
  145. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_previews_network_desktop.py +0 -0
  146. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_prime_0_4_5.py +0 -0
  147. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_prime_0_4_6.py +0 -0
  148. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_private_network.py +0 -0
  149. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_process_deadline.py +0 -0
  150. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_process_input.py +0 -0
  151. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_process_object.py +0 -0
  152. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_process_output.py +0 -0
  153. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_process_write_backpressure.py +0 -0
  154. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_proxy.py +0 -0
  155. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_referrals.py +0 -0
  156. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_replayed_create_message.py +0 -0
  157. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_runloop_stream_cleanup.py +0 -0
  158. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_runloop_v2.py +0 -0
  159. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_sandbox_origin.py +0 -0
  160. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_sandbox_sessions.py +0 -0
  161. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_sandboxes_delete_all.py +0 -0
  162. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_sandboxes_stop_all.py +0 -0
  163. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_saved_connection.py +0 -0
  164. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_signed_requests.py +0 -0
  165. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_snapshot_after_fork.py +0 -0
  166. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_snapshot_recovery.py +0 -0
  167. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_sso.py +0 -0
  168. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_start_report_kept.py +0 -0
  169. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_stream_cut_short.py +0 -0
  170. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_stream_exit_close.py +0 -0
  171. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_switching.py +0 -0
  172. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_tailscale.py +0 -0
  173. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_tools.py +0 -0
  174. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_transport_body_recovery.py +0 -0
  175. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_transport_connection_limits.py +0 -0
  176. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_transport_never_sent.py +0 -0
  177. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_unpack.py +0 -0
  178. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_upload_deadline.py +0 -0
  179. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_vercel.py +0 -0
  180. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_vercel_create_validation.py +0 -0
  181. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_vercel_disk_snapshot.py +0 -0
  182. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_vercel_refusals_lifted.py +0 -0
  183. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_volume_backups.py +0 -0
  184. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_volume_operations.py +0 -0
  185. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_wake_awake.py +0 -0
  186. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_wallet.py +0 -0
  187. {withruntime-0.20.0 → withruntime-0.31.0}/tests/test_watch.py +0 -0
  188. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_agent_templates.py +0 -0
  189. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_api_defaults.py +0 -0
  190. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/audit.py +0 -0
  191. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/billing.py +0 -0
  192. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/browser.py +0 -0
  193. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/containers.py +0 -0
  194. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/desktop.py +0 -0
  195. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/images.py +0 -0
  196. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/interpreter.py +0 -0
  197. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/limits.py +0 -0
  198. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/mcp.py +0 -0
  199. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/mounts.py +0 -0
  200. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/network.py +0 -0
  201. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/network_products.py +0 -0
  202. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/observability.py +0 -0
  203. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/previews.py +0 -0
  204. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/private_network.py +0 -0
  205. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/referrals.py +0 -0
  206. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/signed_requests.py +0 -0
  207. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/sso.py +0 -0
  208. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/switching.py +0 -0
  209. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/tailscale.py +0 -0
  210. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/volumes.py +0 -0
  211. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_async_products/watch.py +0 -0
  212. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_clock.py +0 -0
  213. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_compat.py +0 -0
  214. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_compat_lease.py +0 -0
  215. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_compat_lifecycle.py +0 -0
  216. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_compat_shell.py +0 -0
  217. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_connection.py +0 -0
  218. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_eval_sandbox.py +0 -0
  219. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_http.py +0 -0
  220. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_proxy.py +0 -0
  221. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_renamed.py +0 -0
  222. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_request_scope.py +0 -0
  223. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/audit.py +0 -0
  224. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/billing.py +0 -0
  225. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/browser.py +0 -0
  226. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/containers.py +0 -0
  227. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/desktop.py +0 -0
  228. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/images.py +0 -0
  229. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/interpreter.py +0 -0
  230. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/limits.py +0 -0
  231. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/mcp.py +0 -0
  232. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/mounts.py +0 -0
  233. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/network.py +0 -0
  234. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/network_products.py +0 -0
  235. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/observability.py +0 -0
  236. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/previews.py +0 -0
  237. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/private_network.py +0 -0
  238. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/referrals.py +0 -0
  239. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/signed_requests.py +0 -0
  240. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/sso.py +0 -0
  241. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/switching.py +0 -0
  242. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/tailscale.py +0 -0
  243. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/volumes.py +0 -0
  244. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_sync_products/watch.py +0 -0
  245. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_tunnel.py +0 -0
  246. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_unpack.py +0 -0
  247. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/_ws.py +0 -0
  248. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/__init__.py +0 -0
  249. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/_async_io.py +0 -0
  250. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/_async_sandbox.py +0 -0
  251. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/_sync_io.py +0 -0
  252. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/_sync_sandbox.py +0 -0
  253. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/__init__.py +0 -0
  254. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/agents.py +0 -0
  255. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/__init__.py +0 -0
  256. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/api/__init__.py +0 -0
  257. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/api/applications/__init__.py +0 -0
  258. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/api/applications/list_application_revisions.py +0 -0
  259. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/api/compute/__init__.py +0 -0
  260. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/api/compute/get_sandbox.py +0 -0
  261. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/api/compute/update_sandbox.py +0 -0
  262. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/api/functions/__init__.py +0 -0
  263. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/api/functions/create_function.py +0 -0
  264. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/api/images.py +0 -0
  265. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/api/workspaces.py +0 -0
  266. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/client.py +0 -0
  267. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/models/__init__.py +0 -0
  268. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/models/create_job_execution_request.py +0 -0
  269. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/models/create_job_execution_request_env.py +0 -0
  270. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/models/env.py +0 -0
  271. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/models/function.py +0 -0
  272. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/models/function_runtime.py +0 -0
  273. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/models/function_spec.py +0 -0
  274. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/models/metadata.py +0 -0
  275. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/models/pagination_meta.py +0 -0
  276. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/models/workspace.py +0 -0
  277. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/pagination.py +0 -0
  278. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/client/types.py +0 -0
  279. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/common.py +0 -0
  280. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/drive.py +0 -0
  281. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/errors.py +0 -0
  282. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/jobs.py +0 -0
  283. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/sandbox/__init__.py +0 -0
  284. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/sandbox/types.py +0 -0
  285. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/core/secret.py +0 -0
  286. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/crewai.py +0 -0
  287. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/googleadk.py +0 -0
  288. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/langgraph.py +0 -0
  289. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/livekit.py +0 -0
  290. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/llamaindex.py +0 -0
  291. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/openai.py +0 -0
  292. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/pydantic.py +0 -0
  293. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/blaxel/telemetry.py +0 -0
  294. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/daytona/__init__.py +0 -0
  295. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/daytona/_async_daytona.py +0 -0
  296. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/daytona/_async_io.py +0 -0
  297. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/daytona/_sync_daytona.py +0 -0
  298. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/daytona/_sync_io.py +0 -0
  299. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/deepagents.py +0 -0
  300. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/__init__.py +0 -0
  301. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/_async_io.py +0 -0
  302. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/_sync_io.py +0 -0
  303. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/code_interpreter/__init__.py +0 -0
  304. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/code_interpreter/_async_ci.py +0 -0
  305. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/code_interpreter/_models.py +0 -0
  306. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/code_interpreter/_sync_ci.py +0 -0
  307. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/code_interpreter/charts.py +0 -0
  308. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/code_interpreter/code_interpreter_async.py +0 -0
  309. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/code_interpreter/code_interpreter_sync.py +0 -0
  310. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/code_interpreter/models.py +0 -0
  311. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/connection_config.py +0 -0
  312. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/exceptions.py +0 -0
  313. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox/__init__.py +0 -0
  314. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox/commands/__init__.py +0 -0
  315. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox/commands/command_handle.py +0 -0
  316. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox/commands/main.py +0 -0
  317. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox/filesystem/__init__.py +0 -0
  318. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox/filesystem/filesystem.py +0 -0
  319. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox/filesystem/watch_handle.py +0 -0
  320. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox/network.py +0 -0
  321. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox/sandbox_api.py +0 -0
  322. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox/signature.py +0 -0
  323. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_async/__init__.py +0 -0
  324. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_async/commands/__init__.py +0 -0
  325. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_async/commands/command.py +0 -0
  326. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_async/commands/command_handle.py +0 -0
  327. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_async/commands/pty.py +0 -0
  328. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_async/filesystem/__init__.py +0 -0
  329. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_async/filesystem/filesystem.py +0 -0
  330. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_async/filesystem/watch_handle.py +0 -0
  331. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_async/main.py +0 -0
  332. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_async/paginator.py +0 -0
  333. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_async/utils.py +0 -0
  334. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_sync/__init__.py +0 -0
  335. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_sync/commands/__init__.py +0 -0
  336. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_sync/commands/command.py +0 -0
  337. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_sync/commands/command_handle.py +0 -0
  338. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_sync/commands/pty.py +0 -0
  339. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_sync/filesystem/__init__.py +0 -0
  340. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_sync/filesystem/filesystem.py +0 -0
  341. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_sync/filesystem/watch_handle.py +0 -0
  342. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_sync/git.py +0 -0
  343. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_sync/main.py +0 -0
  344. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/sandbox_sync/paginator.py +0 -0
  345. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/secret/__init__.py +0 -0
  346. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/template/__init__.py +0 -0
  347. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/template/dockerfile_parser.py +0 -0
  348. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/template/logger.py +0 -0
  349. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/template/main.py +0 -0
  350. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/template/readycmd.py +0 -0
  351. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/template/types.py +0 -0
  352. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/template_async/__init__.py +0 -0
  353. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/template_async/main.py +0 -0
  354. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/template_sync/__init__.py +0 -0
  355. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/template_sync/main.py +0 -0
  356. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/volume/__init__.py +0 -0
  357. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/volume/connection_config.py +0 -0
  358. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/volume/types.py +0 -0
  359. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/volume/volume_async.py +0 -0
  360. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/e2b/volume/volume_sync.py +0 -0
  361. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/harbor.py +0 -0
  362. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/inspect_ai.py +0 -0
  363. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/_dual.py +0 -0
  364. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/_fs_async.py +0 -0
  365. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/_fs_sync.py +0 -0
  366. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/_lookup.py +0 -0
  367. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/_object.py +0 -0
  368. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/_probe.py +0 -0
  369. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/_snapshot.py +0 -0
  370. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/_tunnel.py +0 -0
  371. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/app.py +0 -0
  372. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/cloud_bucket_mount.py +0 -0
  373. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/exception.py +0 -0
  374. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/file_pattern_matcher.py +0 -0
  375. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/proxy.py +0 -0
  376. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/sandbox/__init__.py +0 -0
  377. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/sandbox/sandbox.py +0 -0
  378. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/sandbox_fs.py +0 -0
  379. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/secret.py +0 -0
  380. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/snapshot.py +0 -0
  381. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/types.py +0 -0
  382. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/modal/volume.py +0 -0
  383. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/morph/__init__.py +0 -0
  384. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/morph/api.py +0 -0
  385. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/openai_agents.py +0 -0
  386. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/prime/core/__init__.py +0 -0
  387. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/prime/core/client.py +0 -0
  388. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/prime/exceptions.py +0 -0
  389. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/prime/process.py +0 -0
  390. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/prime/sandbox.py +0 -0
  391. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/py.typed +0 -0
  392. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/runloop/__init__.py +0 -0
  393. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/runloop/_async.py +0 -0
  394. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/runloop/_exceptions.py +0 -0
  395. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/runloop/_snapshots.py +0 -0
  396. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/runloop/_sync.py +0 -0
  397. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/runloop/_v2.py +0 -0
  398. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/runloop/lib/__init__.py +0 -0
  399. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/runloop/lib/polling.py +0 -0
  400. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/runloop/sdk/__init__.py +0 -0
  401. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/__init__.py +0 -0
  402. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/_capture.py +0 -0
  403. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/_capture_async.py +0 -0
  404. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/_features.py +0 -0
  405. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/_metadata.py +0 -0
  406. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/_stream.py +0 -0
  407. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/_stream_async.py +0 -0
  408. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/_translate.py +0 -0
  409. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/async_client.py +0 -0
  410. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/async_exec.py +0 -0
  411. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/client.py +0 -0
  412. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/control.py +0 -0
  413. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/exceptions.py +0 -0
  414. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/exec.py +0 -0
  415. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/filesystem.py +0 -0
  416. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/sprite.py +0 -0
  417. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/sprites/types.py +0 -0
  418. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/tools.py +0 -0
  419. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/vercel/__init__.py +0 -0
  420. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/vercel/_async_io.py +0 -0
  421. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/vercel/_async_sandbox.py +0 -0
  422. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/vercel/_core.py +0 -0
  423. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/vercel/_sync_io.py +0 -0
  424. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/vercel/_sync_sandbox.py +0 -0
  425. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/vercel/api.py +0 -0
  426. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/vercel/sandbox/__init__.py +0 -0
  427. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/vercel/sandbox/sync.py +0 -0
  428. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/wallet.py +0 -0
  429. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime/webhooks.py +0 -0
  430. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime.egg-info/dependency_links.txt +0 -0
  431. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime.egg-info/entry_points.txt +0 -0
  432. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime.egg-info/requires.txt +0 -0
  433. {withruntime-0.20.0 → withruntime-0.31.0}/withruntime.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: withruntime
3
- Version: 0.20.0
3
+ Version: 0.31.0
4
4
  Summary: Runtime Cloud: one client (sync and async) for every Runtime product. Sandboxes first.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://withruntime.com
@@ -85,10 +85,10 @@ Cloud Storage bucket as a folder), `tailscale` (a paid sandbox on your own
85
85
  tailnet), `metrics` and `mcp` (servers from the MCP catalog, run in the
86
86
  sandbox) products. A paused sandbox
87
87
  also wakes by itself on the next call, and `Sandbox.get_or_create(name)` returns
88
- the sandbox with that name or creates it. A sandbox pauses itself after 60 seconds
88
+ the sandbox with that name or creates it. A sandbox pauses itself after 300 seconds
89
89
  with nothing happening in it, keeping its memory and processes, so an
90
- idle sandbox costs no compute; `idle_pause_seconds` sets 10 to 86,400, or 0 for
91
- never. One plural word names each product, as in the CLI: `runtime.sandboxes`, `snapshots`, `images`, `volumes`, `jobs`, `domains`, `ports`, `ips` and `networks`. The old singular names (`runtime.sandbox`, `address`, `tunnel` and the rest) still work for now and are listed in the [guide](https://withruntime.com/docs/python). The client has `sandboxes`, `images`, `volumes`, `snapshots`, `jobs`,
90
+ idle sandbox costs no compute; `idle_pause_seconds` sets 60 to 86,400 (a shorter time
91
+ is raised to 60), or 0 for never. One plural word names each product, as in the CLI: `runtime.sandboxes`, `snapshots`, `images`, `volumes`, `jobs`, `domains`, `ports`, `ips` and `networks`. The old singular names (`runtime.sandbox`, `address`, `tunnel` and the rest) still work for now and are listed in the [guide](https://withruntime.com/docs/python). The client has `sandboxes`, `images`, `volumes`, `snapshots`, `jobs`,
92
92
  `secrets`, `limits`, `feedback` and `support`; `webhooks`, `events`, `otel` and
93
93
  `audit` to watch the account; `domains`, `ports`, `ips` and
94
94
  `networks` (with `networks.wireguard`) to connect sandboxes to your own world (paid accounts); and `mcp`,
@@ -241,6 +241,27 @@ instead), codegen, `system`, schedules, and Blaxel's agents, models,
241
241
  tools, jobs and applications. The sync module is generated from the async one
242
242
  by `scripts/generate_dropin_sync.py`.
243
243
 
244
+ ## Code written for Modal Sandboxes
245
+
246
+ `withruntime.modal` runs code written for Modal's Sandboxes (`modal` 1.6.2),
247
+ sync and `.aio`. Change the import and set `RUNTIME_API_KEY`:
248
+
249
+ ```python no-run
250
+ from withruntime import modal # was: import modal
251
+ ```
252
+
253
+ Modal's own sandbox examples run unchanged where they use none of what is
254
+ refused below, and a Modal token is never needed
255
+ or sent. Commands run as root, as in a Modal container. A `timeout` ends the
256
+ sandbox; an `idle_timeout` pauses it with its memory kept, and the next call
257
+ wakes it. Images build from Modal's recipes; `publish(name)` makes a Runtime
258
+ image name that `Image.from_name` finds. Memory snapshots
259
+ (`_experimental_enable_snapshot`) keep the running entrypoint. GPUs, Modal
260
+ Functions and Dicts, named secrets, volumes made on first use, sidecars,
261
+ connect tokens and directory snapshots raise `CompatibilityError` before
262
+ anything is created, naming what to use instead. `COMPATIBILITY.md` lists
263
+ every mapping.
264
+
244
265
  ## Agent frameworks
245
266
 
246
267
  `withruntime.openai_agents` is a sandbox client for the OpenAI Agents SDK's
@@ -60,10 +60,10 @@ Cloud Storage bucket as a folder), `tailscale` (a paid sandbox on your own
60
60
  tailnet), `metrics` and `mcp` (servers from the MCP catalog, run in the
61
61
  sandbox) products. A paused sandbox
62
62
  also wakes by itself on the next call, and `Sandbox.get_or_create(name)` returns
63
- the sandbox with that name or creates it. A sandbox pauses itself after 60 seconds
63
+ the sandbox with that name or creates it. A sandbox pauses itself after 300 seconds
64
64
  with nothing happening in it, keeping its memory and processes, so an
65
- idle sandbox costs no compute; `idle_pause_seconds` sets 10 to 86,400, or 0 for
66
- never. One plural word names each product, as in the CLI: `runtime.sandboxes`, `snapshots`, `images`, `volumes`, `jobs`, `domains`, `ports`, `ips` and `networks`. The old singular names (`runtime.sandbox`, `address`, `tunnel` and the rest) still work for now and are listed in the [guide](https://withruntime.com/docs/python). The client has `sandboxes`, `images`, `volumes`, `snapshots`, `jobs`,
65
+ idle sandbox costs no compute; `idle_pause_seconds` sets 60 to 86,400 (a shorter time
66
+ is raised to 60), or 0 for never. One plural word names each product, as in the CLI: `runtime.sandboxes`, `snapshots`, `images`, `volumes`, `jobs`, `domains`, `ports`, `ips` and `networks`. The old singular names (`runtime.sandbox`, `address`, `tunnel` and the rest) still work for now and are listed in the [guide](https://withruntime.com/docs/python). The client has `sandboxes`, `images`, `volumes`, `snapshots`, `jobs`,
67
67
  `secrets`, `limits`, `feedback` and `support`; `webhooks`, `events`, `otel` and
68
68
  `audit` to watch the account; `domains`, `ports`, `ips` and
69
69
  `networks` (with `networks.wireguard`) to connect sandboxes to your own world (paid accounts); and `mcp`,
@@ -216,6 +216,27 @@ instead), codegen, `system`, schedules, and Blaxel's agents, models,
216
216
  tools, jobs and applications. The sync module is generated from the async one
217
217
  by `scripts/generate_dropin_sync.py`.
218
218
 
219
+ ## Code written for Modal Sandboxes
220
+
221
+ `withruntime.modal` runs code written for Modal's Sandboxes (`modal` 1.6.2),
222
+ sync and `.aio`. Change the import and set `RUNTIME_API_KEY`:
223
+
224
+ ```python no-run
225
+ from withruntime import modal # was: import modal
226
+ ```
227
+
228
+ Modal's own sandbox examples run unchanged where they use none of what is
229
+ refused below, and a Modal token is never needed
230
+ or sent. Commands run as root, as in a Modal container. A `timeout` ends the
231
+ sandbox; an `idle_timeout` pauses it with its memory kept, and the next call
232
+ wakes it. Images build from Modal's recipes; `publish(name)` makes a Runtime
233
+ image name that `Image.from_name` finds. Memory snapshots
234
+ (`_experimental_enable_snapshot`) keep the running entrypoint. GPUs, Modal
235
+ Functions and Dicts, named secrets, volumes made on first use, sidecars,
236
+ connect tokens and directory snapshots raise `CompatibilityError` before
237
+ anything is created, naming what to use instead. `COMPATIBILITY.md` lists
238
+ every mapping.
239
+
219
240
  ## Agent frameworks
220
241
 
221
242
  `withruntime.openai_agents` is a sandbox client for the OpenAI Agents SDK's
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "withruntime"
7
- version = "0.20.0"
7
+ version = "0.31.0"
8
8
  description = "Runtime Cloud: one client (sync and async) for every Runtime product. Sandboxes first."
9
9
  readme = "README.md"
10
10
  license = { text = "Apache-2.0" }
@@ -23,6 +23,9 @@ AGENT = {"id": AGENT_ID, "name": "dev", "version": 1, "definition": {"command":
23
23
  TRIGGER = {"id": TRIGGER_ID, "agentId": AGENT_ID, "kind": "github",
24
24
  "config": {"repository": "acme/web", "installation": 42}, "pausedAt": None, "pausedWhy": None,
25
25
  "createdAt": "2026-10-18T00:00:00Z"}
26
+ MEMORY = {"scope": "", "path": "notes/tea.md", "bytes": 21, "updatedAt": "2026-10-18T00:00:00Z",
27
+ "updatedBy": "key_1"}
28
+ USAGE = {"bytes": 42, "files": 2, "limitBytes": 1073741824, "limitFiles": 100000}
26
29
  GUIDE = Path(__file__).resolve().parents[3] / "packages" / "cloud-guide" / "agent-templates.json"
27
30
 
28
31
 
@@ -54,7 +57,7 @@ REFUSALS = {
54
57
  "taken": (409, "name_taken", ConflictError),
55
58
  "paused": (409, "trigger_paused", ConflictError),
56
59
  "uninstalled": (409, "not_installed", ConflictError),
57
- "budget": (409, "budget_reached", ConflictError),
60
+ "budget": (402, "budget_reached", RuntimeAPIError),
58
61
  "open": (409, "session_open", ConflictError),
59
62
  "quota": (429, "quota_exceeded", RateLimitError),
60
63
  "invalid": (400, "invalid_request", InvalidRequestError),
@@ -71,6 +74,8 @@ class Stub(BaseHTTPRequestHandler):
71
74
  states: list = []
72
75
  # When set, what a read of one session answers.
73
76
  record = None
77
+ # The server of the test now running.
78
+ live = None
74
79
 
75
80
  def log_message(self, *args):
76
81
  pass
@@ -84,15 +89,30 @@ class Stub(BaseHTTPRequestHandler):
84
89
  self.wfile.write(data)
85
90
 
86
91
  def handle_any(self):
92
+ if self.server is not Stub.live:
93
+ return
87
94
  length = int(self.headers.get("content-length") or 0)
88
95
  body = json.loads(self.rfile.read(length)) if length else None
89
96
  url = urlsplit(self.path)
90
- path, query = url.path, parse_qs(url.query)
97
+ path, query = url.path, parse_qs(url.query, keep_blank_values=True)
91
98
  Stub.seen.append((self.command, path, query, body, self.headers.get("idempotency-key")))
92
99
  if Stub.mode in REFUSALS:
93
100
  status, code, _ = REFUSALS[Stub.mode]
94
101
  return self.answer({"error": {"code": code, "message": f"refused: {code}", "hint": "h"}}, status)
95
102
  method = self.command
103
+ if path == "/v1/agents/dev/memory":
104
+ if "q" in query:
105
+ return self.answer({"data": [{**MEMORY, "snippet": "**tea**", "rank": 0.5}], "nextCursor": None})
106
+ if "cursor" in query:
107
+ return self.answer({"data": [{**MEMORY, "scope": "customer:42"}], "nextCursor": None, "usage": USAGE})
108
+ return self.answer({"data": [MEMORY], "nextCursor": "page-2", "usage": USAGE})
109
+ if path == "/v1/agents/dev/memory/content":
110
+ if method == "PUT":
111
+ return self.answer({"scope": query["scope"][0], "path": query["path"][0], "bytes": 9,
112
+ "created": True, "updatedAt": "2026-10-18T00:00:00Z"})
113
+ if method == "DELETE":
114
+ return self.answer({"deleted": True})
115
+ return self.answer({**MEMORY, "content": "tea, no sugar"})
96
116
  if path == "/v1/agents" and method == "GET":
97
117
  if "cursor" in query:
98
118
  return self.answer({"data": [{**AGENT, "id": "second", "warnings": ["subscription_for_customers"]}],
@@ -133,24 +153,24 @@ class Stub(BaseHTTPRequestHandler):
133
153
  return self.answer(AGENT, 201 if method == "POST" else 200)
134
154
  self.answer({"error": {"code": "not_found", "message": "no"}}, 404)
135
155
 
136
- do_GET = do_POST = do_PATCH = do_DELETE = handle_any
156
+ do_GET = do_POST = do_PATCH = do_PUT = do_DELETE = handle_any
137
157
 
138
158
 
139
159
  class AgentsTest(unittest.TestCase):
140
- @classmethod
141
- def setUpClass(cls):
142
- cls.server = ThreadingHTTPServer(("127.0.0.1", 0), Stub)
143
- threading.Thread(target=cls.server.serve_forever, daemon=True).start()
144
- cls.url = f"http://127.0.0.1:{cls.server.server_address[1]}"
145
-
146
- @classmethod
147
- def tearDownClass(cls):
148
- cls.server.shutdown()
149
-
160
+ # Each test has a stub of its own: a request a test gave up on (a wait past
161
+ # its deadline) that a busy machine handles late reaches its own test's
162
+ # stub, which drops it, never the next test's record.
150
163
  def setUp(self):
164
+ self.server = Stub.live = ThreadingHTTPServer(("127.0.0.1", 0), Stub)
165
+ threading.Thread(target=self.server.serve_forever, kwargs={"poll_interval": 0.01}, daemon=True).start()
166
+ self.url = f"http://127.0.0.1:{self.server.server_address[1]}"
151
167
  Stub.seen, Stub.mode, Stub.pages, Stub.states = [], "ok", [{"data": [], "ended": True}], []
152
168
  Stub.record = None
153
169
 
170
+ def tearDown(self):
171
+ self.server.shutdown()
172
+ self.server.server_close()
173
+
154
174
  def client(self):
155
175
  return Runtime(api_key="rk_test", base_url=self.url, max_retries=2)
156
176
 
@@ -316,6 +336,39 @@ class AgentsTest(unittest.TestCase):
316
336
  self.assertEqual(Stub.seen[0][3], {"kind": "github", "config": {"repository": "acme/web", "installation": 42}})
317
337
  self.assertEqual(Stub.seen[2][3], {"why": "release freeze"})
318
338
 
339
+ def test_every_memory_verb_calls_its_route_with_the_scope_in_the_query(self):
340
+ with self.client() as runtime:
341
+ page = runtime.agents.memory.list("dev", prefix="notes/", limit=1)
342
+ self.assertEqual(page.usage, USAGE)
343
+ self.assertEqual([f["scope"] for f in page], ["", "customer:42"])
344
+ hits = runtime.agents.memory.search("dev", "tea", scope="")
345
+ self.assertEqual(hits[0]["snippet"], "**tea**")
346
+ self.assertEqual(runtime.agents.memory.read("dev", "notes/tea.md")["content"], "tea, no sugar")
347
+ written = runtime.agents.memory.write("dev", "tone.md", "Formal.", scope="customer:42")
348
+ self.assertEqual((written["scope"], written["created"]), ("customer:42", True))
349
+ self.assertTrue(runtime.agents.memory.delete("dev", "notes/tea.md"))
350
+ base = "/v1/agents/dev/memory"
351
+ self.assertEqual(self.routes(), [
352
+ ("GET", base), ("GET", base), ("GET", base), ("GET", f"{base}/content"), ("PUT", f"{base}/content"),
353
+ ("DELETE", f"{base}/content")])
354
+ self.assertEqual([s[2] for s in Stub.seen], [
355
+ {"prefix": ["notes/"], "limit": ["1"]},
356
+ {"prefix": ["notes/"], "cursor": ["page-2"], "limit": ["1"]},
357
+ {"scope": [""], "q": ["tea"]},
358
+ {"scope": [""], "path": ["notes/tea.md"]},
359
+ {"scope": ["customer:42"], "path": ["tone.md"]},
360
+ {"scope": [""], "path": ["notes/tea.md"]}])
361
+ self.assertEqual(Stub.seen[4][3], {"content": "Formal."})
362
+
363
+ async def go():
364
+ async with AsyncRuntime(api_key="rk_test", base_url=self.url, max_retries=2) as runtime:
365
+ page = await runtime.agents.memory.list("dev")
366
+ files = await page.to_list()
367
+ deleted = await runtime.agents.memory.delete("dev", "x.md", scope="customer:42")
368
+ return page.usage, files, deleted
369
+ usage, files, deleted = asyncio.run(go())
370
+ self.assertEqual((usage, len(files), deleted), (USAGE, 2, True))
371
+
319
372
  def test_refusals_are_the_sdks_own_errors(self):
320
373
  for mode, (status, code, kind) in REFUSALS.items():
321
374
  Stub.seen, Stub.mode = [], mode
@@ -16,15 +16,24 @@ APP_ID = "11111111-1111-4111-8111-111111111111"
16
16
  DEPLOY_ID = "22222222-2222-4222-8222-222222222222"
17
17
  BUILD_ID = "33333333-3333-4333-8333-333333333333"
18
18
  REPO_ID = "44444444-4444-4444-8444-444444444444"
19
+ VOLUME_ID = "55555555-5555-4555-8555-555555555555"
19
20
  APP = {"id": APP_ID, "name": "web", "state": "waiting", "error": None}
20
21
  BUILD = {"id": BUILD_ID, "repositoryId": REPO_ID, "ref": "main", "state": "queued", "error": None}
21
22
  REPO = {"id": REPO_ID, "provider": "github", "repository": "acme/web", "state": "connected", "error": None}
23
+ COPY_ID = "55555555-5555-4555-8555-555555555555"
24
+ APP_LOG = {"lines": [{"at": 1, "stream": "stderr", "copy": COPY_ID, "version": 2, "text": "boom"}],
25
+ "nextCursor": "older", "hasMore": True}
22
26
 
23
27
 
24
28
  def line(cursor, text):
25
29
  return {"type": "line", "cursor": cursor, "at": 1, "step": "build", "text": text, "stream": "stdout"}
26
30
 
27
31
 
32
+ def app_line(cursor, text):
33
+ return {"type": "line", "cursor": cursor, "at": 1, "stream": "stdout", "copy": COPY_ID, "version": 2,
34
+ "text": text}
35
+
36
+
28
37
  class Stub(BaseHTTPRequestHandler):
29
38
  seen: list = []
30
39
  mode = "ok"
@@ -65,11 +74,18 @@ class Stub(BaseHTTPRequestHandler):
65
74
  return self.answer({"id": DEPLOY_ID, "version": 2, "url": "https://x/", "state": state})
66
75
  if path.endswith("/deploys") or path.endswith("/rollback"):
67
76
  return self.answer({"id": DEPLOY_ID, "version": 2, "url": "https://x/", "state": "building"})
77
+ if path.endswith(":restart"):
78
+ return self.answer({"id": DEPLOY_ID, "version": 3, "url": "https://x/", "state": "switching",
79
+ "restartOf": 2})
68
80
  if path.endswith("/versions"):
69
81
  return self.answer([{"version": 1, "live": True, "previous": False, "saved": True,
70
82
  "deploy": DEPLOY_ID, "build": None}])
71
83
  if path.endswith("/copies"):
72
84
  return self.answer([])
85
+ if path.endswith("/logs") and query.get("follow") == ["true"]:
86
+ return self.answer(Stub.follows.pop(0), kind="application/x-ndjson")
87
+ if path.endswith("/logs") and not path.startswith("/v1/builds/"):
88
+ return self.answer(APP_LOG)
73
89
  if path.startswith("/v1/apps/") or path.startswith("/v1/functions/"):
74
90
  if self.command == "DELETE":
75
91
  return self.answer({**APP, "state": "deleting"})
@@ -78,8 +94,6 @@ class Stub(BaseHTTPRequestHandler):
78
94
  gets = sum(1 for s in Stub.seen if s[0] == "GET" and s[1] == path)
79
95
  return self.answer({**APP, "state": "deleted" if gets > 1 else "deleting"}
80
96
  if Stub.mode == "deleting" else APP)
81
- if path.endswith("/logs") and query.get("follow") == ["true"]:
82
- return self.answer(Stub.follows.pop(0), kind="application/x-ndjson")
83
97
  if path.endswith("/logs"):
84
98
  return self.answer({"lines": [], "cursor": None, "state": "failed", "reason": "exit 1",
85
99
  "failingStep": {"name": "build", "exitCode": 1, "lastLines": ["boom"]},
@@ -120,29 +134,35 @@ class AppsBuildsTest(unittest.TestCase):
120
134
  def test_every_app_verb_calls_its_route_with_the_apis_names(self):
121
135
  with self.client() as runtime:
122
136
  runtime.apps.create(name="web", max_copies=4, vcpu=1, memory_mib=1024, min_copies=1,
123
- health_path="/healthz")
137
+ health_path="/healthz", release_watch="rollback", cdn=False)
124
138
  runtime.apps.get(APP_ID, wait_for="live", timeout_seconds=5)
125
139
  self.assertEqual([a["id"] for a in runtime.apps.list(label=["team:web"])], [APP_ID, "second"])
126
- runtime.apps.update(APP_ID, name=None, max_copies=8)
140
+ runtime.apps.update(APP_ID, name=None, max_copies=8, release_watch="off", cdn=True)
127
141
  runtime.apps.deploy(APP_ID, image="web:latest", env={"A": "1"}, keep_env=True)
128
142
  runtime.apps.get_deploy(APP_ID, DEPLOY_ID)
129
143
  runtime.apps.rollback(APP_ID)
130
144
  self.assertTrue(runtime.apps.versions(APP_ID)[0]["live"])
131
145
  self.assertEqual(runtime.apps.copies(APP_ID), [])
146
+ log = runtime.apps.logs(APP_ID, since="15m", version=2, copy=COPY_ID, stream="stderr", limit=50,
147
+ cursor="older")
132
148
  runtime.apps.delete(APP_ID)
149
+ self.assertEqual((log["lines"][0]["text"], log["nextCursor"], log["hasMore"]), ("boom", "older", True))
133
150
  base = f"/v1/apps/{APP_ID}"
134
151
  self.assertEqual(self.routes(), [
135
152
  ("POST", "/v1/apps"), ("GET", base), ("GET", "/v1/apps"), ("GET", "/v1/apps"),
136
153
  ("POST", f"{base}:update"), ("POST", f"{base}/deploys"), ("GET", f"{base}/deploys/{DEPLOY_ID}"),
137
154
  ("POST", f"{base}/rollback"), ("GET", f"{base}/versions"), ("GET", f"{base}/copies"),
138
- ("DELETE", base)])
155
+ ("GET", f"{base}/logs"), ("DELETE", base)])
156
+ self.assertEqual(Stub.seen[10][2], {"since": ["15m"], "version": ["2"], "copy": [COPY_ID],
157
+ "stream": ["stderr"], "limit": ["50"], "cursor": ["older"]})
139
158
  self.assertEqual(Stub.seen[0][3], {"name": "web", "maxCopies": 4, "vcpu": 1, "memoryMiB": 1024,
140
- "minCopies": 1, "healthPath": "/healthz"})
159
+ "minCopies": 1, "healthPath": "/healthz",
160
+ "releaseWatch": "rollback", "cdn": False})
141
161
  self.assertEqual(Stub.seen[1][2], {"waitFor": ["live"], "timeoutSeconds": ["5"]})
142
162
  self.assertEqual(Stub.seen[2][2], {"label": ["team:web"]})
143
163
  self.assertEqual(Stub.seen[3][2], {"label": ["team:web"], "cursor": ["page-2"]})
144
164
  # name=None clears the name; a field left out is not sent.
145
- self.assertEqual(Stub.seen[4][3], {"name": None, "maxCopies": 8})
165
+ self.assertEqual(Stub.seen[4][3], {"name": None, "maxCopies": 8, "releaseWatch": "off", "cdn": True})
146
166
  self.assertEqual(Stub.seen[5][3], {"image": "web:latest", "env": {"A": "1"}, "keepEnv": True})
147
167
  self.assertEqual(Stub.seen[7][3], {})
148
168
  # Every write carries a key, so the transport's retries never write twice.
@@ -165,6 +185,37 @@ class AppsBuildsTest(unittest.TestCase):
165
185
  self.assertEqual(runtime.apps.wait_deploy(APP_ID, DEPLOY_ID, poll=0)["state"], "failed")
166
186
  self.assertEqual(runtime.apps.rollback(APP_ID, wait=True, poll=0)["state"], "failed")
167
187
 
188
+ def test_restart_posts_to_its_route_and_with_wait_follows_its_deploy_under_one_key(self):
189
+ Stub.deploys = ["switching", "live"]
190
+ with self.client() as runtime:
191
+ self.assertEqual(runtime.apps.restart(APP_ID)["restartOf"], 2)
192
+ restarted = runtime.apps.restart(APP_ID, wait=True, poll=0, idempotency_key="restart-1")
193
+ runtime.functions.restart(APP_ID)
194
+ self.assertEqual(restarted["state"], "live")
195
+ base = f"/v1/apps/{APP_ID}"
196
+ self.assertEqual(self.routes(), [
197
+ ("POST", f"{base}:restart"), ("POST", f"{base}:restart"), ("GET", f"{base}/deploys/{DEPLOY_ID}"),
198
+ ("GET", f"{base}/deploys/{DEPLOY_ID}"), ("POST", f"/v1/functions/{APP_ID}:restart")])
199
+ self.assertEqual([s[3] for s in Stub.seen if s[0] == "POST"], [{}, {}, {}])
200
+ self.assertEqual(Stub.seen[1][4], "restart-1")
201
+ self.assertTrue(all(s[4] for s in Stub.seen if s[0] == "POST"))
202
+
203
+ def test_a_volume_app_sends_its_volume_grace_and_health_limit_by_the_apis_names(self):
204
+ with self.client() as runtime:
205
+ runtime.apps.create(name="db", max_copies=1, vcpu=1, memory_mib=1024,
206
+ volume={"volume_id": VOLUME_ID, "path": "/data"}, stop_grace_seconds=120,
207
+ health_fail_seconds=300)
208
+ runtime.apps.update(APP_ID, volume=None)
209
+ runtime.apps.update(APP_ID, stop_grace_seconds=0, health_fail_seconds=30)
210
+ runtime.functions.create(max_copies=2, vcpu=1, memory_mib=256, health_fail_seconds=20)
211
+ self.assertEqual(Stub.seen[0][3], {"name": "db", "maxCopies": 1, "vcpu": 1, "memoryMiB": 1024,
212
+ "volume": {"volumeId": VOLUME_ID, "path": "/data"},
213
+ "stopGraceSeconds": 120, "healthFailSeconds": 300})
214
+ # volume=None takes it away; left out, it is not sent.
215
+ self.assertEqual(Stub.seen[1][3], {"volume": None})
216
+ self.assertEqual(Stub.seen[2][3], {"stopGraceSeconds": 0, "healthFailSeconds": 30})
217
+ self.assertEqual(Stub.seen[3][3], {"maxCopies": 2, "vcpu": 1, "memoryMiB": 256, "healthFailSeconds": 20})
218
+
168
219
  def test_a_wait_past_its_deadline_says_timeout_and_keeps_the_writes_key(self):
169
220
  Stub.deploys = ["warming"]
170
221
  with self.client() as runtime:
@@ -196,6 +247,13 @@ class AppsBuildsTest(unittest.TestCase):
196
247
  runtime.apps.deploy(APP_ID)
197
248
  with self.assertRaises(InvalidRequestError):
198
249
  runtime.functions.create(max_copies=1, vcpu=1, memory_mib=256, min_copies=1)
250
+ with self.assertRaises(InvalidRequestError):
251
+ runtime.functions.create(max_copies=1, vcpu=1, memory_mib=256,
252
+ volume={"volume_id": VOLUME_ID, "path": "/data"})
253
+ with self.assertRaises(InvalidRequestError):
254
+ runtime.functions.update(APP_ID, stop_grace_seconds=10)
255
+ with self.assertRaises(InvalidRequestError):
256
+ runtime.functions.update(APP_ID, volume=None)
199
257
  with self.assertRaises(InvalidRequestError):
200
258
  runtime.apps.wait(APP_ID, "live", timeout=-1)
201
259
  with self.assertRaises(RuntimeAPIError) as caught:
@@ -205,9 +263,14 @@ class AppsBuildsTest(unittest.TestCase):
205
263
 
206
264
  def test_functions_share_the_shape_at_their_own_path(self):
207
265
  with self.client() as runtime:
208
- runtime.functions.create(max_copies=2, vcpu=1, memory_mib=256)
266
+ runtime.functions.create(max_copies=2, vcpu=1, memory_mib=256, sleep_after_ms=400)
209
267
  runtime.functions.deploy(APP_ID, image="fn")
210
- self.assertEqual(self.routes(), [("POST", "/v1/functions"), ("POST", f"/v1/functions/{APP_ID}/deploys")])
268
+ runtime.functions.logs("fn/1")
269
+ # The id is encoded into the path, as copies() does.
270
+ self.assertEqual(self.routes(), [("POST", "/v1/functions"), ("POST", f"/v1/functions/{APP_ID}/deploys"),
271
+ ("GET", "/v1/functions/fn%2F1/logs")])
272
+ self.assertEqual(Stub.seen[2][2], {})
273
+ self.assertEqual(Stub.seen[0][3]["sleepAfterMs"], 400)
211
274
 
212
275
  def test_outside_the_beta_the_403_is_the_sdks_permission_error(self):
213
276
  Stub.mode = "beta"
@@ -280,28 +343,90 @@ class AppsBuildsTest(unittest.TestCase):
280
343
  list(runtime.builds.logs(BUILD_ID, follow=True))
281
344
  self.assertEqual((caught.exception.code, caught.exception.details), ("build_log_interrupted", {"cursor": "c1"}))
282
345
 
346
+ def test_an_app_log_follow_resumes_on_continue_with_its_filters_and_gives_each_line_once(self):
347
+ Stub.follows = [
348
+ [app_line("c1", "one"), {"type": "gap", "cursor": "c2"}, app_line("c3", "three"),
349
+ {"type": "continue", "cursor": "c3"}],
350
+ # The server resumes exactly at the cursor; a line given again is skipped.
351
+ [app_line("c3", "three"), app_line("c4", "four"),
352
+ {"type": "error", "cursor": "c4", "code": "app_deleted", "hint": "The app was deleted."}],
353
+ ]
354
+ events = []
355
+ with self.client() as runtime:
356
+ with self.assertRaises(RuntimeAPIError) as caught:
357
+ for event in runtime.apps.logs(APP_ID, follow=True, since="15m", stream="stdout"):
358
+ events.append(event)
359
+ self.assertEqual([e.get("text") or e["type"] for e in events], ["one", "gap", "three", "four"])
360
+ self.assertEqual((caught.exception.code, caught.exception.hint, caught.exception.details),
361
+ ("app_deleted", "The app was deleted.", {"cursor": "c4"}))
362
+ self.assertEqual(self.routes(), [("GET", f"/v1/apps/{APP_ID}/logs")] * 2)
363
+ self.assertEqual([s[2] for s in Stub.seen], [
364
+ {"follow": ["true"], "since": ["15m"], "stream": ["stdout"]},
365
+ {"follow": ["true"], "since": ["15m"], "stream": ["stdout"], "cursor": ["c3"]}])
366
+
367
+ def test_an_app_log_follow_retries_a_dropped_stream_three_times_then_says_where_to_resume(self):
368
+ Stub.follows = [[app_line("c1", "one")], [], [], []]
369
+ with self.client() as runtime:
370
+ with self.assertRaises(RuntimeAPIError) as caught:
371
+ list(runtime.functions.logs(APP_ID, follow=True))
372
+ self.assertEqual((caught.exception.code, caught.exception.details), ("app_log_interrupted", {"cursor": "c1"}))
373
+ self.assertEqual([s[2] for s in Stub.seen],
374
+ [{"follow": ["true"]}] + [{"follow": ["true"], "cursor": ["c1"]}] * 3)
375
+
376
+ def test_an_app_log_follow_refuses_a_malformed_event_and_a_bad_cursor(self):
377
+ Stub.follows = [[{"type": "line", "cursor": "c1", "text": 5}]]
378
+ with self.client() as runtime:
379
+ with self.assertRaises(RuntimeAPIError) as caught:
380
+ list(runtime.apps.logs(APP_ID, follow=True))
381
+ self.assertEqual(caught.exception.code, "app_log_invalid")
382
+ with self.assertRaises(RuntimeAPIError) as caught:
383
+ list(runtime.apps.logs(APP_ID, follow=True, cursor="bad\ncursor"))
384
+ self.assertEqual(caught.exception.code, "invalid_log_options")
385
+ with self.assertRaises(InvalidRequestError):
386
+ list(runtime.apps.logs(APP_ID, follow=True, timeout=-1))
387
+ self.assertEqual(len(Stub.seen), 1)
388
+
283
389
  def test_async_clients_await_and_iterate_the_same_way(self):
284
390
  Stub.deploys = ["warming", "live"]
285
391
  Stub.follows = [[line("c1", "one"), {"type": "terminal", "cursor": "c1", "state": "succeeded",
286
- "reason": "built", "failingStep": None}]]
392
+ "reason": "built", "failingStep": None}],
393
+ [app_line("c0", "old"), app_line("c1", "one"), {"type": "continue", "cursor": "c1"}],
394
+ [{"type": "error", "cursor": "c1", "code": "app_deleted", "hint": "The app was deleted."}]]
287
395
 
288
396
  async def go():
289
397
  async with AsyncRuntime(api_key="rk_test", base_url=self.url, max_retries=2) as runtime:
290
398
  await runtime.apps.create(max_copies=1, vcpu=1, memory_mib=256)
291
399
  ids = [a["id"] async for a in await runtime.apps.list()]
292
400
  deploy = await runtime.apps.deploy(APP_ID, image="web", wait=True, poll=0)
401
+ Stub.deploys = ["switching", "live"]
402
+ restarted = await runtime.apps.restart(APP_ID, wait=True, poll=0)
293
403
  build = await runtime.builds.create(REPO_ID, "main")
294
404
  log = await runtime.builds.logs(BUILD_ID)
295
405
  events = [e async for e in runtime.builds.logs(BUILD_ID, follow=True)]
296
406
  repos = await (await runtime.builds.repositories.list()).to_list()
297
- return ids, deploy, build, log, events, repos
298
- ids, deploy, build, log, events, repos = asyncio.run(go())
407
+ page = await runtime.apps.logs(APP_ID, limit=1)
408
+ app_events, code = [], None
409
+ try:
410
+ # Resuming after c0: that line is not given again.
411
+ async for event in runtime.functions.logs(APP_ID, follow=True, cursor="c0"):
412
+ app_events.append(event)
413
+ except RuntimeAPIError as error:
414
+ code = error.code
415
+ return ids, deploy, restarted, build, log, events, repos, page, app_events, code
416
+ ids, deploy, restarted, build, log, events, repos, page, app_events, code = asyncio.run(go())
417
+ self.assertEqual(restarted["state"], "live")
418
+ self.assertIn(("POST", f"/v1/apps/{APP_ID}:restart"), self.routes())
299
419
  self.assertEqual(ids, [APP_ID, "second"])
300
420
  self.assertEqual(deploy["state"], "live")
301
421
  self.assertEqual(build["id"], BUILD_ID)
302
422
  self.assertEqual(log["state"], "failed")
303
423
  self.assertEqual([e["type"] for e in events], ["line", "terminal"])
304
424
  self.assertEqual(len(repos), 2)
425
+ self.assertEqual(page["lines"][0]["text"], "boom")
426
+ self.assertEqual([e["text"] for e in app_events], ["one"])
427
+ self.assertEqual(code, "app_deleted")
428
+ follows = [s[2] for s in Stub.seen if s[1] == f"/v1/functions/{APP_ID}/logs"]
429
+ self.assertEqual(follows, [{"follow": ["true"], "cursor": ["c0"]}, {"follow": ["true"], "cursor": ["c1"]}])
305
430
 
306
431
 
307
432
  if __name__ == "__main__":
@@ -7,17 +7,21 @@ import json
7
7
  import time
8
8
  import unittest
9
9
 
10
- from withruntime import AsyncRuntime, ConflictError, Runtime
10
+ from withruntime import AsyncRuntime, RateLimitError, Runtime, ServiceUnavailableError
11
11
  from withruntime import _async_client as _async_module
12
12
  from withruntime import _sync_client as _sync_module
13
13
 
14
14
  RUNNING = json.dumps({"id": "sbx", "kind": "sandbox", "state": "running", "status": "active"}).encode()
15
15
 
16
16
 
17
- def refusal(code, status=409, details=None):
17
+ def refusal(code, status=None, details=None, retryable=None):
18
+ # Room is a 503 and the account's own limits are 429s (17 October 2026).
19
+ status = status or {"no_capacity": 503, "quota_exceeded": 429, "no_credit_running_limit": 429}.get(code, 409)
18
20
  error = {"code": code, "status": status, "message": "full", "retryAfterMs": 5}
19
21
  if details is not None:
20
22
  error["details"] = details
23
+ if retryable is not None:
24
+ error["retryable"] = retryable
21
25
  return status, json.dumps({"error": error}).encode()
22
26
 
23
27
 
@@ -127,7 +131,7 @@ class CapacityWait(unittest.TestCase):
127
131
 
128
132
  def test_when_the_wait_runs_out_the_original_refusal_is_raised(self):
129
133
  for wire, outcome, took in create([refusal("no_credit_running_limit")] * 1000, {"wait_for_capacity": 0.2}):
130
- self.assertIsInstance(outcome, ConflictError)
134
+ self.assertIsInstance(outcome, RateLimitError)
131
135
  self.assertEqual(outcome.code, "no_credit_running_limit")
132
136
  self.assertGreater(len(wire.keys), 2)
133
137
  self.assertGreaterEqual(took, 0.19)
@@ -180,10 +184,50 @@ class CapacityWait(unittest.TestCase):
180
184
  runtime._t._http = wire
181
185
  from withruntime._sync_client import Sandbox
182
186
  sandbox = Sandbox(runtime._t, {"id": "sbx", "state": "running"})
183
- with self.assertRaises(ConflictError):
187
+ with self.assertRaises(RateLimitError):
184
188
  sandbox.fork()
185
189
  self.assertEqual(len(wire.keys), 1)
186
190
 
187
191
 
192
+ def test_a_call_without_a_room_wait_retries_what_the_answer_says(self):
193
+ # A volume create has no room wait: the answer's own `retryable`
194
+ # decides, as for any call. A quota on what is kept says false and is
195
+ # told at once; room, or a limit on what runs at once, says true and
196
+ # is sent again after its Retry-After.
197
+ def post(refusals):
198
+ runs = []
199
+ for is_async in (False, True):
200
+ wire = Wire(refusals, is_async)
201
+ options = {"api_key": "rk", "base_url": "https://api.example.test", "max_retries": 3}
202
+ runtime = AsyncRuntime(**options) if is_async else Runtime(**options)
203
+ runtime._t._http = wire
204
+ try:
205
+ if is_async:
206
+ outcome = asyncio.run(runtime._t.json("POST", "/v1/volumes", body={"name": "v"}))
207
+ else:
208
+ outcome = runtime._t.json("POST", "/v1/volumes", body={"name": "v"})
209
+ except Exception as error: # noqa: BLE001 - the outcome under test
210
+ outcome = error
211
+ runs.append((wire, outcome))
212
+ return runs
213
+
214
+ for code, status in (("quota_exceeded", 409), ("no_credit_kept_limit", 409), ("rate_limited", 429)):
215
+ for wire, outcome in post([refusal(code, status, retryable=False)] * 4):
216
+ self.assertEqual((getattr(outcome, "code", None), getattr(outcome, "status", None)), (code, status))
217
+ self.assertEqual(len(wire.keys), 1, code)
218
+ for code, status in (("no_capacity", 503), ("quota_exceeded", 429), ("no_credit_running_limit", 429)):
219
+ for wire, outcome in post([refusal(code, status, retryable=True)]):
220
+ self.assertEqual(len(wire.keys), 2, code)
221
+ self.assertEqual(outcome, json.loads(RUNNING))
222
+ # A host that is only passing is still sent again.
223
+ for wire, outcome in post([refusal("host_unavailable", 503)]):
224
+ self.assertEqual(len(wire.keys), 2)
225
+ self.assertEqual(outcome, json.loads(RUNNING))
226
+
227
+ def test_a_refusal_for_a_limit_is_not_retryable_by_itself_but_room_is(self):
228
+ self.assertFalse(RateLimitError("x", code="quota_exceeded", status=429).retryable)
229
+ self.assertTrue(ServiceUnavailableError("x", code="no_capacity", status=503).retryable)
230
+
231
+
188
232
  if __name__ == "__main__":
189
233
  unittest.main()