withruntime 0.43.0__tar.gz → 0.44.1__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.
- {withruntime-0.43.0/withruntime.egg-info → withruntime-0.44.1}/PKG-INFO +1 -1
- {withruntime-0.43.0 → withruntime-0.44.1}/pyproject.toml +1 -1
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_package_typing.py +1 -1
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_client.py +10 -5
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_errors.py +1 -1
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_client.py +10 -5
- withruntime-0.44.1/withruntime/_version.py +1 -0
- withruntime-0.44.1/withruntime/_ws.py +403 -0
- {withruntime-0.43.0 → withruntime-0.44.1/withruntime.egg-info}/PKG-INFO +1 -1
- withruntime-0.43.0/withruntime/_version.py +0 -1
- withruntime-0.43.0/withruntime/_ws.py +0 -161
- {withruntime-0.43.0 → withruntime-0.44.1}/LICENSE +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/README.md +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/setup.cfg +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_account_errors.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_agents.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_answer_start.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_apps_builds.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_async_stream_cleanup.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_audit.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_billing.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_blaxel.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_blaxel_0_4_17.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_blaxel_0_4_18.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_blaxel_create_timeout.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_blaxel_wait_deadline.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_browser.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_browsers.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_capacity_wait.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_ci.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_live.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_modal_deadline_errors.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_new_providers.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_prime_contract.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_prime_process_lifecycle.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_prime_validation.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_disk_snapshots.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_e2b_deadline.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_e2b_pty.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_e2b_stream.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_e2b_watch.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_interpreter_deadline.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_modal.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_morph.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_official.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_pins.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_processes.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_request_scope.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_runloop.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_shell.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_snapshot_capture.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_python_sprites.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_compat_router.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_customer_usage.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_daytona.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_daytona_0_223_1.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_daytona_0_224_1.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_daytona_0_225_0.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_daytona_create_cleanup.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_daytona_create_options.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_daytona_download_labels.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_daytona_refusals_lifted.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_deepagents.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_e2b_2_55.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_e2b_code_interpreter.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_e2b_connection_cap.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_e2b_exports.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_e2b_fork_validation.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_e2b_sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_e2b_upstream.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_e2b_watch.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_embed_and_webhook_watch.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_eval_sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_exec_stream.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_exec_stream_names.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_exec_user.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_file_archives.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_files_download.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_files_mode.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_files_upload_parallel.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_files_write_lost_body.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_harbor.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_http_tls_close.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_identity_token.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_image_delete_by_name.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_images_v2.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_images_volumes_interpreter.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_inspect_ai.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_interface_contract.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_jobs.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_late_answer.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_lifecycle_settings.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_limits.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_machine_engine.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_modal_1_6_2.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_modal_dropin.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_modal_examples.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_modal_jobs.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_mounts.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_network_funding.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_network_products.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_observability.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_openai_agents.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_out_of_memory.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_plans.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_previews_network_desktop.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_prime_0_4_5.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_prime_0_4_6.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_prime_0_4_7.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_private_network.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_process_deadline.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_process_input.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_process_object.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_process_output.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_process_write_backpressure.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_product_aliases.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_proxy.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_referrals.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_replayed_create_message.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_reservations.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_runloop_stream_cleanup.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_runloop_v2.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_sandbox_origin.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_sandbox_sessions.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_sandboxes_delete_all.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_sandboxes_stop_all.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_saved_connection.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_secrets.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_signed_requests.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_snapshot_after_fork.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_snapshot_recovery.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_sso.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_start_report_kept.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_stream_cut_short.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_stream_exit_close.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_switch_image.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_switching.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_tailscale.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_tools.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_trace_files.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_transport_body_recovery.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_transport_connection_limits.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_transport_never_sent.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_unpack.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_upload_deadline.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_usage_export.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_vercel.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_vercel_create_validation.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_vercel_disk_snapshot.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_vercel_refusals_lifted.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_volume_backups.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_volume_operations.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_wake_awake.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_wallet.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/tests/test_watch.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_agent_templates.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_api_defaults.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/agents.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/apps.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/audit.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/billing.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/browser.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/browsers.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/builds.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/ci.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/containers.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/desktop.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/images.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/interpreter.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/jobs.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/limits.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/mcp.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/mounts.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/network.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/network_products.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/observability.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/plans.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/previews.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/private_network.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/referrals.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/reservations.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/secrets.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/signed_requests.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/sso.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/switching.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/tailscale.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/volumes.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_async_products/watch.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_clock.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_compat.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_compat_lease.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_compat_lifecycle.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_compat_shell.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_connection.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_eval_sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_http.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_proxy.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_renamed.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_request_scope.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/agents.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/apps.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/audit.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/billing.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/browser.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/browsers.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/builds.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/ci.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/containers.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/desktop.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/images.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/interpreter.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/jobs.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/limits.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/mcp.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/mounts.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/network.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/network_products.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/observability.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/plans.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/previews.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/private_network.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/referrals.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/reservations.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/secrets.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/signed_requests.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/sso.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/switching.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/tailscale.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/volumes.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_sync_products/watch.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_trace.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_tunnel.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/_unpack.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/_async_io.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/_async_sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/_core.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/_sync_io.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/_sync_sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/agents.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/api/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/api/applications/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/api/applications/list_application_revisions.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/api/compute/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/api/compute/get_sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/api/compute/update_sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/api/functions/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/api/functions/create_function.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/api/images.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/api/workspaces.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/client.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/models/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/models/create_job_execution_request.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/models/create_job_execution_request_env.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/models/env.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/models/function.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/models/function_runtime.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/models/function_spec.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/models/metadata.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/models/pagination_meta.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/models/workspace.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/pagination.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/client/types.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/common.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/drive.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/errors.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/jobs.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/sandbox/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/sandbox/types.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/core/secret.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/crewai.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/googleadk.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/langgraph.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/livekit.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/llamaindex.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/openai.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/pydantic.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/blaxel/telemetry.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/daytona/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/daytona/_async_daytona.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/daytona/_async_io.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/daytona/_core.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/daytona/_sync_daytona.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/daytona/_sync_io.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/deepagents.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/_async_io.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/_async_sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/_core.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/_sync_io.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/_sync_sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/code_interpreter/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/code_interpreter/_async_ci.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/code_interpreter/_models.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/code_interpreter/_sync_ci.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/code_interpreter/charts.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/code_interpreter/code_interpreter_async.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/code_interpreter/code_interpreter_sync.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/code_interpreter/models.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/connection_config.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/exceptions.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox/commands/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox/commands/command_handle.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox/commands/main.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox/filesystem/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox/filesystem/filesystem.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox/filesystem/watch_handle.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox/network.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox/sandbox_api.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox/signature.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_async/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_async/commands/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_async/commands/command.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_async/commands/command_handle.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_async/commands/pty.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_async/filesystem/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_async/filesystem/filesystem.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_async/filesystem/watch_handle.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_async/main.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_async/paginator.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_async/utils.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_sync/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_sync/commands/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_sync/commands/command.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_sync/commands/command_handle.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_sync/commands/pty.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_sync/filesystem/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_sync/filesystem/filesystem.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_sync/filesystem/watch_handle.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_sync/git.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_sync/main.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/sandbox_sync/paginator.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/secret/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/template/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/template/dockerfile_parser.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/template/logger.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/template/main.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/template/readycmd.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/template/types.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/template_async/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/template_async/main.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/template_sync/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/template_sync/main.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/volume/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/volume/connection_config.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/volume/types.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/volume/volume_async.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/e2b/volume/volume_sync.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/harbor.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/inspect_ai.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/__main__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/_async.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/_dual.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/_fs_async.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/_fs_common.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/_fs_sync.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/_functions.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/_job_runner.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/_lookup.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/_object.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/_probe.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/_snapshot.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/_tunnel.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/app.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/cloud_bucket_mount.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/container_process.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/exception.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/file_pattern_matcher.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/image.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/io_streams.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/output.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/proxy.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/sandbox/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/sandbox/sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/sandbox_fs.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/secret.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/snapshot.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/stream_type.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/types.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/modal/volume.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/morph/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/morph/api.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/openai_agents.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/prime/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/prime/_async.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/prime/_sync.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/prime/core/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/prime/core/client.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/prime/exceptions.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/prime/models.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/prime/process.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/prime/sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/py.typed +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/runloop/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/runloop/_async.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/runloop/_exceptions.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/runloop/_snapshots.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/runloop/_sync.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/runloop/_v2.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/runloop/lib/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/runloop/lib/polling.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/runloop/sdk/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/_capture.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/_capture_async.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/_features.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/_metadata.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/_stream.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/_stream_async.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/_translate.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/async_client.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/async_exec.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/client.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/control.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/exceptions.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/exec.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/filesystem.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/sprite.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/sprites/types.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/tools.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/vercel/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/vercel/_async_io.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/vercel/_async_sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/vercel/_core.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/vercel/_sync_io.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/vercel/_sync_sandbox.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/vercel/api.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/vercel/sandbox/__init__.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/vercel/sandbox/sync.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/wallet.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime/webhooks.py +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime.egg-info/SOURCES.txt +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime.egg-info/dependency_links.txt +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime.egg-info/entry_points.txt +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime.egg-info/requires.txt +0 -0
- {withruntime-0.43.0 → withruntime-0.44.1}/withruntime.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "withruntime"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.44.1"
|
|
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" }
|
|
@@ -36,6 +36,7 @@ from ._http import NoAnswerStarted, Origin, default_base_url, reachable
|
|
|
36
36
|
from ._proxy import describe as describe_route
|
|
37
37
|
from ._renamed import renamed
|
|
38
38
|
from ._unpack import Unpacker
|
|
39
|
+
from ._ws import AsyncResumableWebSocket
|
|
39
40
|
from ._ws import AsyncWebSocket as WebSocket
|
|
40
41
|
from ._tunnel import AsyncPortForward
|
|
41
42
|
from ._trace import trace_headers
|
|
@@ -497,10 +498,14 @@ class _Transport:
|
|
|
497
498
|
finally:
|
|
498
499
|
await hold.lend()
|
|
499
500
|
|
|
500
|
-
async def websocket(self, path: str, query: dict[str, Any]) ->
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
501
|
+
async def websocket(self, path: str, query: dict[str, Any]) -> AsyncResumableWebSocket:
|
|
502
|
+
"""A terminal's or tunnel's WebSocket. It resumes across a restart of
|
|
503
|
+
the API with nothing lost or repeated (_ws.py)."""
|
|
504
|
+
async def connect(resume: Optional[str]) -> WebSocket:
|
|
505
|
+
socket = WebSocket(self.origin, path + _query({"resume": resume} if resume else query), {
|
|
506
|
+
"Authorization": "Bearer " + self._api_key(), "X-Runtime-Client": f"sdk-python/{VERSION}"})
|
|
507
|
+
return await open_ws(socket)
|
|
508
|
+
return await AsyncResumableWebSocket(connect).connect()
|
|
504
509
|
|
|
505
510
|
async def close(self) -> None:
|
|
506
511
|
await self._http.close()
|
|
@@ -964,7 +969,7 @@ class AsyncProcess:
|
|
|
964
969
|
class AsyncTerminal:
|
|
965
970
|
"""An interactive terminal over a WebSocket: write() types, recv() reads."""
|
|
966
971
|
|
|
967
|
-
def __init__(self, socket:
|
|
972
|
+
def __init__(self, socket: AsyncResumableWebSocket, process_id: Optional[str]) -> None:
|
|
968
973
|
self._socket, self.process_id = socket, process_id
|
|
969
974
|
self.exit_code: Optional[int] = None
|
|
970
975
|
|
|
@@ -29,7 +29,7 @@ _PASSING = frozenset({"no_capacity", "no_credit_running_limit", "no_credit_total
|
|
|
29
29
|
# with the same key and input, for up to wait_for_capacity seconds.
|
|
30
30
|
WAITS_FOR_ROOM = frozenset({"no_credit_running_limit", "no_credit_total_limit", "no_credit_domain_limit",
|
|
31
31
|
"no_credit_capacity_full", "quota_exceeded", "account_share_full", "no_capacity",
|
|
32
|
-
"volume_releasing"})
|
|
32
|
+
"volume_releasing", "sandbox_moving"})
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class RuntimeError(Exception): # noqa: A001 - the SDK's own base error, as in 0.1.0
|
|
@@ -35,6 +35,7 @@ from ._http import NoAnswerStarted, Origin, default_base_url, reachable
|
|
|
35
35
|
from ._proxy import describe as describe_route
|
|
36
36
|
from ._renamed import renamed
|
|
37
37
|
from ._unpack import Unpacker
|
|
38
|
+
from ._ws import ResumableWebSocket
|
|
38
39
|
from ._ws import SyncWebSocket as WebSocket
|
|
39
40
|
from ._tunnel import PortForward
|
|
40
41
|
from ._trace import trace_headers
|
|
@@ -496,10 +497,14 @@ class _Transport:
|
|
|
496
497
|
finally:
|
|
497
498
|
hold.lend()
|
|
498
499
|
|
|
499
|
-
def websocket(self, path: str, query: dict[str, Any]) ->
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
500
|
+
def websocket(self, path: str, query: dict[str, Any]) -> ResumableWebSocket:
|
|
501
|
+
"""A terminal's or tunnel's WebSocket. It resumes across a restart of
|
|
502
|
+
the API with nothing lost or repeated (_ws.py)."""
|
|
503
|
+
def connect(resume: Optional[str]) -> WebSocket:
|
|
504
|
+
socket = WebSocket(self.origin, path + _query({"resume": resume} if resume else query), {
|
|
505
|
+
"Authorization": "Bearer " + self._api_key(), "X-Runtime-Client": f"sdk-python/{VERSION}"})
|
|
506
|
+
return open_ws(socket)
|
|
507
|
+
return ResumableWebSocket(connect).connect()
|
|
503
508
|
|
|
504
509
|
def close(self) -> None:
|
|
505
510
|
self._http.close()
|
|
@@ -963,7 +968,7 @@ class Process:
|
|
|
963
968
|
class Terminal:
|
|
964
969
|
"""An interactive terminal over a WebSocket: write() types, recv() reads."""
|
|
965
970
|
|
|
966
|
-
def __init__(self, socket:
|
|
971
|
+
def __init__(self, socket: ResumableWebSocket, process_id: Optional[str]) -> None:
|
|
967
972
|
self._socket, self.process_id = socket, process_id
|
|
968
973
|
self.exit_code: Optional[int] = None
|
|
969
974
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = "0.44.1"
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
"""A minimal RFC 6455 WebSocket client (client frames masked), for terminals
|
|
2
|
+
and tunnels, and the socket over it that resumes across a restart of the API.
|
|
3
|
+
Standard library only; sync over sockets, async over asyncio streams."""
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import base64
|
|
7
|
+
import json
|
|
8
|
+
import os
|
|
9
|
+
import socket
|
|
10
|
+
import struct
|
|
11
|
+
import threading
|
|
12
|
+
import time
|
|
13
|
+
from typing import Any, Awaitable, Callable, Optional, Tuple
|
|
14
|
+
|
|
15
|
+
from ._http import Origin, _context, open_stream, within
|
|
16
|
+
from ._proxy import route_for, tunnel
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _handshake(origin: Origin, target: str, headers: dict[str, str]) -> Tuple[bytes, str]:
|
|
20
|
+
key = base64.b64encode(os.urandom(16)).decode()
|
|
21
|
+
lines = [f"GET {target} HTTP/1.1", f"Host: {origin.netloc}", "Upgrade: websocket", "Connection: Upgrade",
|
|
22
|
+
f"Sec-WebSocket-Key: {key}", "Sec-WebSocket-Version: 13"]
|
|
23
|
+
lines += [f"{k}: {v}" for k, v in headers.items()]
|
|
24
|
+
return ("\r\n".join(lines) + "\r\n\r\n").encode("latin-1"), key
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _frame(opcode: int, payload: bytes) -> bytes:
|
|
28
|
+
mask = os.urandom(4)
|
|
29
|
+
length = len(payload)
|
|
30
|
+
if length < 126:
|
|
31
|
+
head = struct.pack("!BB", 0x80 | opcode, 0x80 | length)
|
|
32
|
+
elif length < 65536:
|
|
33
|
+
head = struct.pack("!BBH", 0x80 | opcode, 0x80 | 126, length)
|
|
34
|
+
else:
|
|
35
|
+
head = struct.pack("!BBQ", 0x80 | opcode, 0x80 | 127, length)
|
|
36
|
+
return head + mask + bytes(b ^ mask[i % 4] for i, b in enumerate(payload))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _close_code(payload: bytes) -> int:
|
|
40
|
+
return struct.unpack("!H", payload[:2])[0] if len(payload) >= 2 else 1005
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class SyncWebSocket:
|
|
44
|
+
def __init__(self, origin: Origin, target: str, headers: dict[str, str], timeout: float = 30) -> None:
|
|
45
|
+
route = route_for(origin.tls, origin.host, origin.port)
|
|
46
|
+
raw = (tunnel(route, origin.host, origin.port, timeout) if route.proxy_host
|
|
47
|
+
else socket.create_connection((origin.host, origin.port), timeout=timeout))
|
|
48
|
+
self._sock: socket.socket = _context().wrap_socket(raw, server_hostname=origin.host) if origin.tls else raw
|
|
49
|
+
request, _ = _handshake(origin, target, headers)
|
|
50
|
+
self._sock.sendall(request)
|
|
51
|
+
response = b""
|
|
52
|
+
while b"\r\n\r\n" not in response:
|
|
53
|
+
chunk = self._sock.recv(4096)
|
|
54
|
+
if not chunk:
|
|
55
|
+
raise ConnectionError("WebSocket handshake closed")
|
|
56
|
+
response += chunk
|
|
57
|
+
head, self._buffer = response.split(b"\r\n\r\n", 1)
|
|
58
|
+
status = head.split(b"\r\n", 1)[0]
|
|
59
|
+
if b" 101 " not in status + b" ":
|
|
60
|
+
raise ConnectionRefusedError(head.decode("latin-1", "replace").split("\r\n", 1)[0])
|
|
61
|
+
self._sock.settimeout(None)
|
|
62
|
+
self.closed = False
|
|
63
|
+
self.close_code: Optional[int] = None
|
|
64
|
+
|
|
65
|
+
def _read(self, n: int) -> bytes:
|
|
66
|
+
while len(self._buffer) < n:
|
|
67
|
+
chunk = self._sock.recv(65536)
|
|
68
|
+
if not chunk:
|
|
69
|
+
raise ConnectionResetError("WebSocket closed")
|
|
70
|
+
self._buffer += chunk
|
|
71
|
+
data, self._buffer = self._buffer[:n], self._buffer[n:]
|
|
72
|
+
return data
|
|
73
|
+
|
|
74
|
+
def send(self, data: bytes | str) -> None:
|
|
75
|
+
self._sock.sendall(_frame(0x1, data.encode()) if isinstance(data, str) else _frame(0x2, data))
|
|
76
|
+
|
|
77
|
+
def recv(self) -> Optional[bytes | str]:
|
|
78
|
+
"""The next message: bytes, str, or None once the socket closed."""
|
|
79
|
+
while True:
|
|
80
|
+
try:
|
|
81
|
+
first, second = self._read(2)
|
|
82
|
+
except (ConnectionResetError, OSError):
|
|
83
|
+
self.closed = True
|
|
84
|
+
return None
|
|
85
|
+
length = second & 0x7F
|
|
86
|
+
if length == 126:
|
|
87
|
+
length = struct.unpack("!H", self._read(2))[0]
|
|
88
|
+
elif length == 127:
|
|
89
|
+
length = struct.unpack("!Q", self._read(8))[0]
|
|
90
|
+
payload = self._read(length)
|
|
91
|
+
opcode = first & 0x0F
|
|
92
|
+
if opcode == 0x8:
|
|
93
|
+
self.closed = True
|
|
94
|
+
self.close_code = _close_code(payload)
|
|
95
|
+
try:
|
|
96
|
+
self._sock.sendall(_frame(0x8, payload[:2]))
|
|
97
|
+
except OSError:
|
|
98
|
+
pass
|
|
99
|
+
return None
|
|
100
|
+
if opcode == 0x9:
|
|
101
|
+
self._sock.sendall(_frame(0xA, payload))
|
|
102
|
+
continue
|
|
103
|
+
if opcode == 0x1:
|
|
104
|
+
return payload.decode("utf-8", "replace")
|
|
105
|
+
if opcode in (0x0, 0x2):
|
|
106
|
+
return payload
|
|
107
|
+
|
|
108
|
+
def close(self) -> None:
|
|
109
|
+
if not self.closed:
|
|
110
|
+
try:
|
|
111
|
+
self._sock.sendall(_frame(0x8, struct.pack("!H", 1000)))
|
|
112
|
+
except OSError:
|
|
113
|
+
pass
|
|
114
|
+
self.closed = True
|
|
115
|
+
self._sock.close()
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class AsyncWebSocket:
|
|
119
|
+
def __init__(self, origin: Origin, target: str, headers: dict[str, str], timeout: float = 30) -> None:
|
|
120
|
+
self._origin, self._target, self._headers, self._timeout = origin, target, headers, timeout
|
|
121
|
+
self.closed = False
|
|
122
|
+
self.close_code: Optional[int] = None
|
|
123
|
+
|
|
124
|
+
async def connect(self) -> "AsyncWebSocket":
|
|
125
|
+
self._reader, self._writer = await open_stream(self._origin, self._timeout)
|
|
126
|
+
request, _ = _handshake(self._origin, self._target, self._headers)
|
|
127
|
+
self._writer.write(request)
|
|
128
|
+
await self._writer.drain()
|
|
129
|
+
head = await within(self._reader.readuntil(b"\r\n\r\n"), self._timeout)
|
|
130
|
+
if b" 101 " not in head.split(b"\r\n", 1)[0] + b" ":
|
|
131
|
+
raise ConnectionRefusedError(head.decode("latin-1", "replace").split("\r\n", 1)[0])
|
|
132
|
+
return self
|
|
133
|
+
|
|
134
|
+
async def send(self, data: bytes | str) -> None:
|
|
135
|
+
self._writer.write(_frame(0x1, data.encode()) if isinstance(data, str) else _frame(0x2, data))
|
|
136
|
+
await self._writer.drain()
|
|
137
|
+
|
|
138
|
+
async def recv(self) -> Optional[bytes | str]:
|
|
139
|
+
import asyncio
|
|
140
|
+
while True:
|
|
141
|
+
try:
|
|
142
|
+
first, second = await self._reader.readexactly(2)
|
|
143
|
+
except (asyncio.IncompleteReadError, ConnectionError):
|
|
144
|
+
self.closed = True
|
|
145
|
+
return None
|
|
146
|
+
length = second & 0x7F
|
|
147
|
+
if length == 126:
|
|
148
|
+
length = struct.unpack("!H", await self._reader.readexactly(2))[0]
|
|
149
|
+
elif length == 127:
|
|
150
|
+
length = struct.unpack("!Q", await self._reader.readexactly(8))[0]
|
|
151
|
+
payload = await self._reader.readexactly(length)
|
|
152
|
+
opcode = first & 0x0F
|
|
153
|
+
if opcode == 0x8:
|
|
154
|
+
self.closed = True
|
|
155
|
+
self.close_code = _close_code(payload)
|
|
156
|
+
return None
|
|
157
|
+
if opcode == 0x9:
|
|
158
|
+
self._writer.write(_frame(0xA, payload))
|
|
159
|
+
continue
|
|
160
|
+
if opcode == 0x1:
|
|
161
|
+
return payload.decode("utf-8", "replace")
|
|
162
|
+
if opcode in (0x0, 0x2):
|
|
163
|
+
return payload
|
|
164
|
+
|
|
165
|
+
async def close(self) -> None:
|
|
166
|
+
if not self.closed:
|
|
167
|
+
try:
|
|
168
|
+
self._writer.write(_frame(0x8, struct.pack("!H", 1000)))
|
|
169
|
+
await self._writer.drain()
|
|
170
|
+
except OSError:
|
|
171
|
+
pass
|
|
172
|
+
self.closed = True
|
|
173
|
+
self._writer.close()
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
# A terminal's or tunnel's socket that outlives a restart of the API behind it
|
|
177
|
+
# (packages/cloud/src/api/tunnels.ts, "Hand-off"): the API sends {"type":"restart"},
|
|
178
|
+
# this side stops sending, buffers what the caller writes and answers
|
|
179
|
+
# {"type":"restart"}; the API sends {"type":"resume","token":...,"replay":...}
|
|
180
|
+
# and closes with 1012 (Service Restart); this side opens the socket again with
|
|
181
|
+
# ?resume=<token>, sends {"type":"replay"} first when there was input the API
|
|
182
|
+
# had not yet written, then what it buffered. Output and streams continue from
|
|
183
|
+
# the exact byte they stopped at, and the caller sees no close.
|
|
184
|
+
|
|
185
|
+
#: RFC 6455 close code 1012, Service Restart.
|
|
186
|
+
SERVICE_RESTART = 1012
|
|
187
|
+
#: How long reconnecting may take before the socket reads as closed.
|
|
188
|
+
RESUME_SECONDS = 25.0
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
def _refused_for_good(error: OSError) -> bool:
|
|
192
|
+
"""A 4xx answer to the upgrade other than 429: the token or the sandbox
|
|
193
|
+
is not good, and asking again changes nothing."""
|
|
194
|
+
parts = str(error).split(" ")
|
|
195
|
+
status = int(parts[1]) if len(parts) > 1 and parts[1].isdigit() else 0
|
|
196
|
+
return 400 <= status < 500 and status != 429
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
def _control(message: Any) -> dict[str, Any]:
|
|
200
|
+
if not isinstance(message, str):
|
|
201
|
+
return {}
|
|
202
|
+
try:
|
|
203
|
+
event = json.loads(message)
|
|
204
|
+
except ValueError:
|
|
205
|
+
return {}
|
|
206
|
+
return event if isinstance(event, dict) else {}
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
class ResumableWebSocket:
|
|
210
|
+
"""send(), recv() and close() of a WebSocket, resumed across a restart of
|
|
211
|
+
the API. ``open(resume)`` opens the API's socket, with the token once
|
|
212
|
+
there is one. Thread-safe for one reader and any number of senders."""
|
|
213
|
+
|
|
214
|
+
def __init__(self, open: Callable[[Optional[str]], Any]) -> None:
|
|
215
|
+
self._open = open
|
|
216
|
+
self._socket: Any = None
|
|
217
|
+
self._lock = threading.Lock()
|
|
218
|
+
self._paused = False
|
|
219
|
+
self._outbox: list[bytes | str] = []
|
|
220
|
+
self._token: Optional[str] = None
|
|
221
|
+
self._replay: Optional[str] = None
|
|
222
|
+
self._said: Optional[str] = None
|
|
223
|
+
self.closed = False
|
|
224
|
+
#: Times it resumed, and of those how many replayed unwritten input.
|
|
225
|
+
self.resumes = 0
|
|
226
|
+
self.replays = 0
|
|
227
|
+
|
|
228
|
+
def connect(self) -> "ResumableWebSocket":
|
|
229
|
+
self._socket = self._open(None)
|
|
230
|
+
return self
|
|
231
|
+
|
|
232
|
+
def send(self, data: bytes | str) -> None:
|
|
233
|
+
with self._lock:
|
|
234
|
+
if self.closed:
|
|
235
|
+
return
|
|
236
|
+
if self._paused:
|
|
237
|
+
self._outbox.append(data)
|
|
238
|
+
else:
|
|
239
|
+
self._socket.send(data)
|
|
240
|
+
|
|
241
|
+
def recv(self) -> Optional[bytes | str]:
|
|
242
|
+
"""The next message, or None once the socket closed for good."""
|
|
243
|
+
while not self.closed:
|
|
244
|
+
message = self._socket.recv()
|
|
245
|
+
if message is None:
|
|
246
|
+
if self._socket.close_code == SERVICE_RESTART and self._token and self._resume():
|
|
247
|
+
continue
|
|
248
|
+
self.closed = True
|
|
249
|
+
said, self._said = self._said, None
|
|
250
|
+
return said
|
|
251
|
+
event = _control(message)
|
|
252
|
+
if event.get("type") == "restart":
|
|
253
|
+
with self._lock:
|
|
254
|
+
self._paused = True
|
|
255
|
+
self._socket.send(json.dumps({"type": "restart"}))
|
|
256
|
+
continue
|
|
257
|
+
if event.get("type") == "resume" and isinstance(event.get("token"), str):
|
|
258
|
+
self._token = event["token"]
|
|
259
|
+
self._replay = event.get("replay") if isinstance(event.get("replay"), str) else None
|
|
260
|
+
continue
|
|
261
|
+
return message
|
|
262
|
+
return None
|
|
263
|
+
|
|
264
|
+
def _resume(self) -> bool:
|
|
265
|
+
token, replay = self._token, self._replay
|
|
266
|
+
self._token = self._replay = None
|
|
267
|
+
deadline, wait = time.monotonic() + RESUME_SECONDS, 0.05
|
|
268
|
+
while time.monotonic() < deadline and not self.closed:
|
|
269
|
+
try:
|
|
270
|
+
socket = self._open(token)
|
|
271
|
+
except OSError as error:
|
|
272
|
+
if _refused_for_good(error):
|
|
273
|
+
return False
|
|
274
|
+
socket = None
|
|
275
|
+
if socket is not None:
|
|
276
|
+
# A server that never answers must not hold this past the deadline.
|
|
277
|
+
socket._sock.settimeout(max(0.1, deadline - time.monotonic()))
|
|
278
|
+
first = socket.recv()
|
|
279
|
+
socket._sock.settimeout(None)
|
|
280
|
+
event = _control(first)
|
|
281
|
+
if event.get("type") == "ready" and event.get("resumed") is True:
|
|
282
|
+
with self._lock:
|
|
283
|
+
if self.closed:
|
|
284
|
+
socket.close()
|
|
285
|
+
return False
|
|
286
|
+
self._socket = socket
|
|
287
|
+
self.resumes += 1
|
|
288
|
+
if replay:
|
|
289
|
+
self.replays += 1
|
|
290
|
+
socket.send(json.dumps({"type": "replay", "data": replay}))
|
|
291
|
+
for data in self._outbox:
|
|
292
|
+
socket.send(data)
|
|
293
|
+
self._outbox, self._paused = [], False
|
|
294
|
+
return True
|
|
295
|
+
socket.close()
|
|
296
|
+
if event.get("type") == "error":
|
|
297
|
+
# Refused for good (the sandbox stopped, say): the
|
|
298
|
+
# caller reads the error, as on any socket.
|
|
299
|
+
self._said = first
|
|
300
|
+
return False
|
|
301
|
+
time.sleep(wait)
|
|
302
|
+
wait = min(wait * 2, 1.0)
|
|
303
|
+
return False
|
|
304
|
+
|
|
305
|
+
def close(self) -> None:
|
|
306
|
+
with self._lock:
|
|
307
|
+
self.closed = True
|
|
308
|
+
self._outbox = []
|
|
309
|
+
self._socket.close()
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
class AsyncResumableWebSocket:
|
|
313
|
+
"""ResumableWebSocket for asyncio."""
|
|
314
|
+
|
|
315
|
+
def __init__(self, open: Callable[[Optional[str]], Awaitable[Any]]) -> None:
|
|
316
|
+
self._open = open
|
|
317
|
+
self._socket: Any = None
|
|
318
|
+
self._paused = False
|
|
319
|
+
self._outbox: list[bytes | str] = []
|
|
320
|
+
self._token: Optional[str] = None
|
|
321
|
+
self._replay: Optional[str] = None
|
|
322
|
+
self._said: Optional[str] = None
|
|
323
|
+
self.closed = False
|
|
324
|
+
self.resumes = 0
|
|
325
|
+
self.replays = 0
|
|
326
|
+
|
|
327
|
+
async def connect(self) -> "AsyncResumableWebSocket":
|
|
328
|
+
self._socket = await self._open(None)
|
|
329
|
+
return self
|
|
330
|
+
|
|
331
|
+
async def send(self, data: bytes | str) -> None:
|
|
332
|
+
if self.closed:
|
|
333
|
+
return
|
|
334
|
+
if self._paused:
|
|
335
|
+
self._outbox.append(data)
|
|
336
|
+
else:
|
|
337
|
+
await self._socket.send(data)
|
|
338
|
+
|
|
339
|
+
async def recv(self) -> Optional[bytes | str]:
|
|
340
|
+
while not self.closed:
|
|
341
|
+
message = await self._socket.recv()
|
|
342
|
+
if message is None:
|
|
343
|
+
if self._socket.close_code == SERVICE_RESTART and self._token and await self._resume():
|
|
344
|
+
continue
|
|
345
|
+
self.closed = True
|
|
346
|
+
said, self._said = self._said, None
|
|
347
|
+
return said
|
|
348
|
+
event = _control(message)
|
|
349
|
+
if event.get("type") == "restart":
|
|
350
|
+
self._paused = True
|
|
351
|
+
await self._socket.send(json.dumps({"type": "restart"}))
|
|
352
|
+
continue
|
|
353
|
+
if event.get("type") == "resume" and isinstance(event.get("token"), str):
|
|
354
|
+
self._token = event["token"]
|
|
355
|
+
self._replay = event.get("replay") if isinstance(event.get("replay"), str) else None
|
|
356
|
+
continue
|
|
357
|
+
return message
|
|
358
|
+
return None
|
|
359
|
+
|
|
360
|
+
async def _resume(self) -> bool:
|
|
361
|
+
import asyncio
|
|
362
|
+
token, replay = self._token, self._replay
|
|
363
|
+
self._token = self._replay = None
|
|
364
|
+
deadline, wait = time.monotonic() + RESUME_SECONDS, 0.05
|
|
365
|
+
while time.monotonic() < deadline and not self.closed:
|
|
366
|
+
try:
|
|
367
|
+
socket = await self._open(token)
|
|
368
|
+
except OSError as error:
|
|
369
|
+
if _refused_for_good(error):
|
|
370
|
+
return False
|
|
371
|
+
socket = None
|
|
372
|
+
if socket is not None:
|
|
373
|
+
try:
|
|
374
|
+
first = await within(socket.recv(), max(0.1, deadline - time.monotonic()))
|
|
375
|
+
except (asyncio.TimeoutError, TimeoutError):
|
|
376
|
+
first = None
|
|
377
|
+
event = _control(first)
|
|
378
|
+
if event.get("type") == "ready" and event.get("resumed") is True:
|
|
379
|
+
if self.closed:
|
|
380
|
+
await socket.close()
|
|
381
|
+
return False
|
|
382
|
+
self._socket = socket
|
|
383
|
+
self.resumes += 1
|
|
384
|
+
if replay:
|
|
385
|
+
self.replays += 1
|
|
386
|
+
await socket.send(json.dumps({"type": "replay", "data": replay}))
|
|
387
|
+
# Senders append while these go out; the loop takes them too.
|
|
388
|
+
while self._outbox:
|
|
389
|
+
await socket.send(self._outbox.pop(0))
|
|
390
|
+
self._paused = False
|
|
391
|
+
return True
|
|
392
|
+
await socket.close()
|
|
393
|
+
if event.get("type") == "error":
|
|
394
|
+
self._said = first
|
|
395
|
+
return False
|
|
396
|
+
await asyncio.sleep(wait)
|
|
397
|
+
wait = min(wait * 2, 1.0)
|
|
398
|
+
return False
|
|
399
|
+
|
|
400
|
+
async def close(self) -> None:
|
|
401
|
+
self.closed = True
|
|
402
|
+
self._outbox = []
|
|
403
|
+
await self._socket.close()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = "0.43.0"
|