e2b 2.46.4__tar.gz → 2.48.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.
- {e2b-2.46.4 → e2b-2.48.0}/PKG-INFO +1 -1
- {e2b-2.46.4 → e2b-2.48.0}/e2b/__init__.py +4 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/__init__.py +18 -3
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/__init__.py +0 -42
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/connect_sandbox.py +16 -1
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/resumed_sandbox.py +13 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_network_config.py +20 -3
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_network_config_rules.py +6 -2
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_network_update_config.py +7 -2
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_network_update_config_rules.py +8 -1
- {e2b-2.46.4 → e2b-2.48.0}/e2b/exceptions.py +35 -1
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/sandbox_api.py +68 -5
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_async/main.py +26 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_async/sandbox_api.py +8 -1
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_sync/main.py +26 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_sync/sandbox_api.py +8 -1
- {e2b-2.46.4 → e2b-2.48.0}/pyproject.toml +1 -1
- e2b-2.46.4/e2b/api/client/models/admin_build_cancel_result.py +0 -67
- e2b-2.46.4/e2b/api/client/models/admin_sandbox_kill_result.py +0 -67
- e2b-2.46.4/e2b/api/client/models/admin_team_running_sandbox_counts.py +0 -48
- e2b-2.46.4/e2b/api/client/models/created_access_token.py +0 -100
- e2b-2.46.4/e2b/api/client/models/created_team_api_key.py +0 -166
- e2b-2.46.4/e2b/api/client/models/disk_metrics.py +0 -91
- e2b-2.46.4/e2b/api/client/models/identifier_masking_details.py +0 -83
- e2b-2.46.4/e2b/api/client/models/machine_info.py +0 -83
- e2b-2.46.4/e2b/api/client/models/max_team_metric.py +0 -78
- e2b-2.46.4/e2b/api/client/models/new_access_token.py +0 -59
- e2b-2.46.4/e2b/api/client/models/new_team_api_key.py +0 -59
- e2b-2.46.4/e2b/api/client/models/node.py +0 -170
- e2b-2.46.4/e2b/api/client/models/node_detail.py +0 -162
- e2b-2.46.4/e2b/api/client/models/node_metrics.py +0 -154
- e2b-2.46.4/e2b/api/client/models/node_status.py +0 -12
- e2b-2.46.4/e2b/api/client/models/node_status_change.py +0 -82
- e2b-2.46.4/e2b/api/client/models/team.py +0 -83
- e2b-2.46.4/e2b/api/client/models/team_api_key.py +0 -158
- e2b-2.46.4/e2b/api/client/models/team_metric.py +0 -86
- e2b-2.46.4/e2b/api/client/models/update_team_api_key.py +0 -59
- e2b-2.46.4/e2b/api/client/models/volume_token.py +0 -59
- {e2b-2.46.4 → e2b-2.48.0}/README.md +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/get_sandboxes.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/get_v2_sandboxes.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/post_sandboxes.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_fork.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/secrets/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/secrets/delete_secrets_secret_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/secrets/get_secrets.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/secrets/get_secrets_secret_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/secrets/post_secrets.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/secrets/post_secrets_secret_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/snapshots/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/snapshots/get_snapshots.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/tags/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/tags/delete_templates_tags.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/tags/get_templates_template_id_tags.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/tags/post_templates_tags.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/delete_templates_template_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/get_templates.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/get_templates_aliases_alias.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/get_templates_template_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/get_templates_template_id_files_hash.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/get_v2_templates.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/patch_templates_template_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/patch_v_2_templates_template_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/post_templates.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/post_templates_template_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/post_templates_template_id_builds_build_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/post_v2_templates.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/post_v3_templates.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/volumes/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/volumes/delete_volumes_volume_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/volumes/get_volumes.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/volumes/get_volumes_volume_id.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/api/volumes/post_volumes.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/client.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/errors.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/assign_template_tags_request.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/assigned_template_tags.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/aws_registry.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/aws_registry_type.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/build_log_entry.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/build_status_reason.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/delete_template_tags_request.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/error.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/gcp_registry.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/gcp_registry_type.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/general_registry.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/general_registry_type.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/listed_sandbox.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/log_level.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/logs_direction.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/logs_source.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/mcp_type_0.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/new_sandbox.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/new_secret.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/new_volume.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/order_direction.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_auto_resume_config.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_detail.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_egress_proxy_config_type_0.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_fork_request.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_fork_result.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_iam.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_iam_token.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_iam_tokens.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_lifecycle.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_log.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_log_entry.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_log_entry_fields.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_logs.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_logs_v2_response.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_metric.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_network_rule.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_network_transform.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_network_transform_headers.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_on_timeout.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_pause_request.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_refresh_request.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_snapshot_request.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_state.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_timeout_request.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandbox_volume_mount.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/sandboxes_with_metrics.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/secret.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/secret_metadata.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/secret_update.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/snapshot_info.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/team_user.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_alias_response.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_build.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_build_file_upload.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_build_info.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_build_logs_response.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_build_request.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_build_request_v2.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_build_request_v3.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_build_start_v2.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_build_status.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_legacy.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_request_response_v3.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_step.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_tag.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_update_request.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_update_response.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/template_with_builds.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/volume.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/models/volume_and_token.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/py.typed +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client/types.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client_async/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/client_sync/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/api/metadata.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/client.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/connection_config.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/api.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/client_async/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/client_shared.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/client_sync/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/filesystem/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/filesystem/filesystem_connect.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/filesystem/filesystem_pb.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/interceptors.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/process/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/process/process_connect.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/process/process_pb.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/rpc.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/utils.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/envd/versions.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/io_utils.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/paginator.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/py.typed +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/_git/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/_git/args.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/_git/auth.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/_git/config.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/_git/parse.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/_git/types.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/commands/command_handle.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/commands/main.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/filesystem/filesystem.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/filesystem/watch_handle.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/iam.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/main.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/mcp.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/network.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/signature.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox/utils.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_async/commands/command.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_async/commands/command_handle.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_async/commands/pty.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_async/filesystem/filesystem.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_async/filesystem/watch_handle.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_async/git.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_async/paginator.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_async/utils.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_domains.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_sync/commands/command.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_sync/commands/command_handle.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_sync/commands/pty.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_sync/filesystem/filesystem.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_sync/filesystem/watch_handle.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_sync/git.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/sandbox_sync/paginator.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/secret/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/secret/base.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/secret/secret_async.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/secret/secret_sync.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/secret/types.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/template/consts.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/template/dockerfile_parser.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/template/logger.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/template/main.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/template/readycmd.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/template/types.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/template/utils.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/template_async/build_api.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/template_async/main.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/template_sync/build_api.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/template_sync/main.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/api/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/api/volumes/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/api/volumes/delete_volumecontent_volume_id_path.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_dir.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_file.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_path.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/api/volumes/patch_volumecontent_volume_id_path.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/api/volumes/post_volumecontent_volume_id_dir.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/api/volumes/put_volumecontent_volume_id_file.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/client.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/errors.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/models/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/models/error.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/models/patch_volumecontent_volume_id_path_body.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/models/volume_entry_stat.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/models/volume_entry_stat_type.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/py.typed +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client/types.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client_async/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/client_sync/__init__.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/connection_config.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/types.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/utils.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/volume_async.py +0 -0
- {e2b-2.46.4 → e2b-2.48.0}/e2b/volume/volume_sync.py +0 -0
|
@@ -47,6 +47,7 @@ from .exceptions import (
|
|
|
47
47
|
NotEnoughSpaceException,
|
|
48
48
|
NotFoundException,
|
|
49
49
|
RateLimitException,
|
|
50
|
+
ServiceBusyException,
|
|
50
51
|
SandboxException,
|
|
51
52
|
SandboxNotFoundException,
|
|
52
53
|
TemplateException,
|
|
@@ -100,6 +101,7 @@ from .sandbox.sandbox_api import (
|
|
|
100
101
|
SandboxNetworkTransformContext,
|
|
101
102
|
SandboxNetworkTransformResolver,
|
|
102
103
|
SandboxNetworkUpdate,
|
|
104
|
+
SandboxOnResume,
|
|
103
105
|
SandboxListOrder,
|
|
104
106
|
SandboxQuery,
|
|
105
107
|
SandboxState,
|
|
@@ -175,6 +177,7 @@ __all__ = [
|
|
|
175
177
|
"Username",
|
|
176
178
|
# Exceptions
|
|
177
179
|
"SandboxException",
|
|
180
|
+
"ServiceBusyException",
|
|
178
181
|
"TimeoutException",
|
|
179
182
|
"NotFoundException",
|
|
180
183
|
"FileNotFoundException",
|
|
@@ -233,6 +236,7 @@ __all__ = [
|
|
|
233
236
|
"SandboxNetworkUpdate",
|
|
234
237
|
"SandboxLifecycle",
|
|
235
238
|
"SandboxOnTimeout",
|
|
239
|
+
"SandboxOnResume",
|
|
236
240
|
"ALL_TRAFFIC",
|
|
237
241
|
# IAM
|
|
238
242
|
"SandboxIamOpts",
|
|
@@ -19,6 +19,7 @@ from e2b.exceptions import (
|
|
|
19
19
|
AuthenticationException,
|
|
20
20
|
InvalidArgumentException,
|
|
21
21
|
RateLimitException,
|
|
22
|
+
ServiceBusyException,
|
|
22
23
|
SandboxException,
|
|
23
24
|
)
|
|
24
25
|
|
|
@@ -199,9 +200,19 @@ def api_exception_from_code(
|
|
|
199
200
|
text += f" - {message}"
|
|
200
201
|
return RateLimitException(text)
|
|
201
202
|
|
|
202
|
-
|
|
203
|
+
if status_code == 503:
|
|
204
|
+
text = f"{status_code}: Service temporarily unavailable, please retry."
|
|
205
|
+
if message:
|
|
206
|
+
text += f" - {message}"
|
|
207
|
+
return ServiceBusyException(text)
|
|
208
|
+
|
|
209
|
+
err = default_exception_class(f"{status_code}: {message}").with_traceback(
|
|
203
210
|
stack_trace
|
|
204
211
|
)
|
|
212
|
+
if isinstance(err, SandboxException):
|
|
213
|
+
err.status_code = status_code
|
|
214
|
+
|
|
215
|
+
return err
|
|
205
216
|
|
|
206
217
|
|
|
207
218
|
def handle_api_exception(
|
|
@@ -215,10 +226,14 @@ def handle_api_exception(
|
|
|
215
226
|
body = {}
|
|
216
227
|
|
|
217
228
|
message = body["message"] if "message" in body else None
|
|
218
|
-
if message is None and e.status_code not in (401, 429):
|
|
219
|
-
|
|
229
|
+
if message is None and e.status_code not in (401, 429, 503):
|
|
230
|
+
err = default_exception_class(f"{e.status_code}: {e.content}").with_traceback(
|
|
220
231
|
stack_trace
|
|
221
232
|
)
|
|
233
|
+
if isinstance(err, SandboxException):
|
|
234
|
+
err.status_code = e.status_code
|
|
235
|
+
|
|
236
|
+
return err
|
|
222
237
|
|
|
223
238
|
return api_exception_from_code(
|
|
224
239
|
e.status_code,
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"""Contains all the data models used in inputs/outputs"""
|
|
2
2
|
|
|
3
|
-
from .admin_build_cancel_result import AdminBuildCancelResult
|
|
4
|
-
from .admin_sandbox_kill_result import AdminSandboxKillResult
|
|
5
|
-
from .admin_team_running_sandbox_counts import AdminTeamRunningSandboxCounts
|
|
6
3
|
from .assign_template_tags_request import AssignTemplateTagsRequest
|
|
7
4
|
from .assigned_template_tags import AssignedTemplateTags
|
|
8
5
|
from .aws_registry import AWSRegistry
|
|
@@ -10,33 +7,20 @@ from .aws_registry_type import AWSRegistryType
|
|
|
10
7
|
from .build_log_entry import BuildLogEntry
|
|
11
8
|
from .build_status_reason import BuildStatusReason
|
|
12
9
|
from .connect_sandbox import ConnectSandbox
|
|
13
|
-
from .created_access_token import CreatedAccessToken
|
|
14
|
-
from .created_team_api_key import CreatedTeamAPIKey
|
|
15
10
|
from .delete_template_tags_request import DeleteTemplateTagsRequest
|
|
16
|
-
from .disk_metrics import DiskMetrics
|
|
17
11
|
from .error import Error
|
|
18
12
|
from .gcp_registry import GCPRegistry
|
|
19
13
|
from .gcp_registry_type import GCPRegistryType
|
|
20
14
|
from .general_registry import GeneralRegistry
|
|
21
15
|
from .general_registry_type import GeneralRegistryType
|
|
22
|
-
from .identifier_masking_details import IdentifierMaskingDetails
|
|
23
16
|
from .listed_sandbox import ListedSandbox
|
|
24
17
|
from .log_level import LogLevel
|
|
25
18
|
from .logs_direction import LogsDirection
|
|
26
19
|
from .logs_source import LogsSource
|
|
27
|
-
from .machine_info import MachineInfo
|
|
28
|
-
from .max_team_metric import MaxTeamMetric
|
|
29
20
|
from .mcp_type_0 import McpType0
|
|
30
|
-
from .new_access_token import NewAccessToken
|
|
31
21
|
from .new_sandbox import NewSandbox
|
|
32
22
|
from .new_secret import NewSecret
|
|
33
|
-
from .new_team_api_key import NewTeamAPIKey
|
|
34
23
|
from .new_volume import NewVolume
|
|
35
|
-
from .node import Node
|
|
36
|
-
from .node_detail import NodeDetail
|
|
37
|
-
from .node_metrics import NodeMetrics
|
|
38
|
-
from .node_status import NodeStatus
|
|
39
|
-
from .node_status_change import NodeStatusChange
|
|
40
24
|
from .order_direction import OrderDirection
|
|
41
25
|
from .resumed_sandbox import ResumedSandbox
|
|
42
26
|
from .sandbox import Sandbox
|
|
@@ -74,9 +58,6 @@ from .secret import Secret
|
|
|
74
58
|
from .secret_metadata import SecretMetadata
|
|
75
59
|
from .secret_update import SecretUpdate
|
|
76
60
|
from .snapshot_info import SnapshotInfo
|
|
77
|
-
from .team import Team
|
|
78
|
-
from .team_api_key import TeamAPIKey
|
|
79
|
-
from .team_metric import TeamMetric
|
|
80
61
|
from .team_user import TeamUser
|
|
81
62
|
from .template import Template
|
|
82
63
|
from .template_alias_response import TemplateAliasResponse
|
|
@@ -96,15 +77,10 @@ from .template_tag import TemplateTag
|
|
|
96
77
|
from .template_update_request import TemplateUpdateRequest
|
|
97
78
|
from .template_update_response import TemplateUpdateResponse
|
|
98
79
|
from .template_with_builds import TemplateWithBuilds
|
|
99
|
-
from .update_team_api_key import UpdateTeamAPIKey
|
|
100
80
|
from .volume import Volume
|
|
101
81
|
from .volume_and_token import VolumeAndToken
|
|
102
|
-
from .volume_token import VolumeToken
|
|
103
82
|
|
|
104
83
|
__all__ = (
|
|
105
|
-
"AdminBuildCancelResult",
|
|
106
|
-
"AdminSandboxKillResult",
|
|
107
|
-
"AdminTeamRunningSandboxCounts",
|
|
108
84
|
"AssignedTemplateTags",
|
|
109
85
|
"AssignTemplateTagsRequest",
|
|
110
86
|
"AWSRegistry",
|
|
@@ -112,33 +88,20 @@ __all__ = (
|
|
|
112
88
|
"BuildLogEntry",
|
|
113
89
|
"BuildStatusReason",
|
|
114
90
|
"ConnectSandbox",
|
|
115
|
-
"CreatedAccessToken",
|
|
116
|
-
"CreatedTeamAPIKey",
|
|
117
91
|
"DeleteTemplateTagsRequest",
|
|
118
|
-
"DiskMetrics",
|
|
119
92
|
"Error",
|
|
120
93
|
"GCPRegistry",
|
|
121
94
|
"GCPRegistryType",
|
|
122
95
|
"GeneralRegistry",
|
|
123
96
|
"GeneralRegistryType",
|
|
124
|
-
"IdentifierMaskingDetails",
|
|
125
97
|
"ListedSandbox",
|
|
126
98
|
"LogLevel",
|
|
127
99
|
"LogsDirection",
|
|
128
100
|
"LogsSource",
|
|
129
|
-
"MachineInfo",
|
|
130
|
-
"MaxTeamMetric",
|
|
131
101
|
"McpType0",
|
|
132
|
-
"NewAccessToken",
|
|
133
102
|
"NewSandbox",
|
|
134
103
|
"NewSecret",
|
|
135
|
-
"NewTeamAPIKey",
|
|
136
104
|
"NewVolume",
|
|
137
|
-
"Node",
|
|
138
|
-
"NodeDetail",
|
|
139
|
-
"NodeMetrics",
|
|
140
|
-
"NodeStatus",
|
|
141
|
-
"NodeStatusChange",
|
|
142
105
|
"OrderDirection",
|
|
143
106
|
"ResumedSandbox",
|
|
144
107
|
"Sandbox",
|
|
@@ -176,9 +139,6 @@ __all__ = (
|
|
|
176
139
|
"SecretMetadata",
|
|
177
140
|
"SecretUpdate",
|
|
178
141
|
"SnapshotInfo",
|
|
179
|
-
"Team",
|
|
180
|
-
"TeamAPIKey",
|
|
181
|
-
"TeamMetric",
|
|
182
142
|
"TeamUser",
|
|
183
143
|
"Template",
|
|
184
144
|
"TemplateAliasResponse",
|
|
@@ -198,8 +158,6 @@ __all__ = (
|
|
|
198
158
|
"TemplateUpdateRequest",
|
|
199
159
|
"TemplateUpdateResponse",
|
|
200
160
|
"TemplateWithBuilds",
|
|
201
|
-
"UpdateTeamAPIKey",
|
|
202
161
|
"Volume",
|
|
203
162
|
"VolumeAndToken",
|
|
204
|
-
"VolumeToken",
|
|
205
163
|
)
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
7
9
|
T = TypeVar("T", bound="ConnectSandbox")
|
|
8
10
|
|
|
9
11
|
|
|
@@ -12,14 +14,22 @@ class ConnectSandbox:
|
|
|
12
14
|
"""
|
|
13
15
|
Attributes:
|
|
14
16
|
timeout (int): Timeout in seconds from the current time after which the sandbox should expire
|
|
17
|
+
memory (Union[Unset, bool]): Defaults to true. When false and the sandbox is paused, resume from disk state
|
|
18
|
+
only: the sandbox cold-boots fresh and any memory in the snapshot is ignored, never modified or deleted. Disk
|
|
19
|
+
state has crash-recovery semantics — writes not flushed before the pause may be lost. A no-op for snapshots that
|
|
20
|
+
contain no memory. Rejected with an error in environments where this capability is not enabled, never silently
|
|
21
|
+
downgraded to a memory restore.
|
|
15
22
|
"""
|
|
16
23
|
|
|
17
24
|
timeout: int
|
|
25
|
+
memory: Union[Unset, bool] = UNSET
|
|
18
26
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
19
27
|
|
|
20
28
|
def to_dict(self) -> dict[str, Any]:
|
|
21
29
|
timeout = self.timeout
|
|
22
30
|
|
|
31
|
+
memory = self.memory
|
|
32
|
+
|
|
23
33
|
field_dict: dict[str, Any] = {}
|
|
24
34
|
field_dict.update(self.additional_properties)
|
|
25
35
|
field_dict.update(
|
|
@@ -27,6 +37,8 @@ class ConnectSandbox:
|
|
|
27
37
|
"timeout": timeout,
|
|
28
38
|
}
|
|
29
39
|
)
|
|
40
|
+
if memory is not UNSET:
|
|
41
|
+
field_dict["memory"] = memory
|
|
30
42
|
|
|
31
43
|
return field_dict
|
|
32
44
|
|
|
@@ -35,8 +47,11 @@ class ConnectSandbox:
|
|
|
35
47
|
d = dict(src_dict)
|
|
36
48
|
timeout = d.pop("timeout")
|
|
37
49
|
|
|
50
|
+
memory = d.pop("memory", UNSET)
|
|
51
|
+
|
|
38
52
|
connect_sandbox = cls(
|
|
39
53
|
timeout=timeout,
|
|
54
|
+
memory=memory,
|
|
40
55
|
)
|
|
41
56
|
|
|
42
57
|
connect_sandbox.additional_properties = d
|
|
@@ -15,10 +15,16 @@ class ResumedSandbox:
|
|
|
15
15
|
Attributes:
|
|
16
16
|
timeout (Union[Unset, int]): Time to live for the sandbox in seconds. Default: 15.
|
|
17
17
|
auto_pause (Union[Unset, bool]): Automatically pauses the sandbox after the timeout
|
|
18
|
+
memory (Union[Unset, bool]): Defaults to true. When false, resume from disk state only: the sandbox cold-boots
|
|
19
|
+
fresh and any memory in the snapshot is ignored, never modified or deleted. Disk state has crash-recovery
|
|
20
|
+
semantics — writes not flushed before the pause may be lost. A no-op for snapshots that contain no memory.
|
|
21
|
+
Rejected with an error in environments where this capability is not enabled, never silently downgraded to a
|
|
22
|
+
memory restore.
|
|
18
23
|
"""
|
|
19
24
|
|
|
20
25
|
timeout: Union[Unset, int] = 15
|
|
21
26
|
auto_pause: Union[Unset, bool] = UNSET
|
|
27
|
+
memory: Union[Unset, bool] = UNSET
|
|
22
28
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
29
|
|
|
24
30
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -26,6 +32,8 @@ class ResumedSandbox:
|
|
|
26
32
|
|
|
27
33
|
auto_pause = self.auto_pause
|
|
28
34
|
|
|
35
|
+
memory = self.memory
|
|
36
|
+
|
|
29
37
|
field_dict: dict[str, Any] = {}
|
|
30
38
|
field_dict.update(self.additional_properties)
|
|
31
39
|
field_dict.update({})
|
|
@@ -33,6 +41,8 @@ class ResumedSandbox:
|
|
|
33
41
|
field_dict["timeout"] = timeout
|
|
34
42
|
if auto_pause is not UNSET:
|
|
35
43
|
field_dict["autoPause"] = auto_pause
|
|
44
|
+
if memory is not UNSET:
|
|
45
|
+
field_dict["memory"] = memory
|
|
36
46
|
|
|
37
47
|
return field_dict
|
|
38
48
|
|
|
@@ -43,9 +53,12 @@ class ResumedSandbox:
|
|
|
43
53
|
|
|
44
54
|
auto_pause = d.pop("autoPause", UNSET)
|
|
45
55
|
|
|
56
|
+
memory = d.pop("memory", UNSET)
|
|
57
|
+
|
|
46
58
|
resumed_sandbox = cls(
|
|
47
59
|
timeout=timeout,
|
|
48
60
|
auto_pause=auto_pause,
|
|
61
|
+
memory=memory,
|
|
49
62
|
)
|
|
50
63
|
|
|
51
64
|
resumed_sandbox.additional_properties = d
|
|
@@ -31,9 +31,16 @@ class SandboxNetworkConfig:
|
|
|
31
31
|
TCP is tunneled through the proxy after allow/deny filtering; the sandbox is unaware. Domain-matched flows use
|
|
32
32
|
remote DNS (ATYP=domain).
|
|
33
33
|
mask_request_host (Union[Unset, str]): Specify host mask which will be used for all sandbox requests
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
https_ports (Union[Unset, list[int]]): Sandbox ports that serve HTTPS rather than plaintext HTTP. Affects how
|
|
35
|
+
the proxy reaches the service inside the sandbox; the public URL is HTTPS either way. Certificates are not
|
|
36
|
+
verified, so self-signed ones work. The envd port (49983) cannot be listed.
|
|
37
|
+
rules (Union[Unset, SandboxNetworkConfigRules]): Per-domain transform rules applied to matching outbound HTTPS
|
|
38
|
+
requests. Keys may be exact DNS names (for example, "api.example.com") or a leading wildcard (for example,
|
|
39
|
+
"*.example.com"), and are normalized to lowercase on write. Wildcards match subdomains at any depth but not the
|
|
40
|
+
apex domain; a bare "*" is invalid. Exact rules take precedence, followed by the longest matching wildcard
|
|
41
|
+
suffix, and matching rule sets are not merged. Broad wildcards such as "*.com" are allowed and may expose
|
|
42
|
+
transformed credentials to every matching destination the sandbox contacts. Rules do not grant network access;
|
|
43
|
+
configure allowOut separately to permit the destination.
|
|
37
44
|
"""
|
|
38
45
|
|
|
39
46
|
allow_public_traffic: Union[Unset, bool] = True
|
|
@@ -41,6 +48,7 @@ class SandboxNetworkConfig:
|
|
|
41
48
|
deny_out: Union[Unset, list[str]] = UNSET
|
|
42
49
|
egress_proxy: Union["SandboxEgressProxyConfigType0", None, Unset] = UNSET
|
|
43
50
|
mask_request_host: Union[Unset, str] = UNSET
|
|
51
|
+
https_ports: Union[Unset, list[int]] = UNSET
|
|
44
52
|
rules: Union[Unset, "SandboxNetworkConfigRules"] = UNSET
|
|
45
53
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
46
54
|
|
|
@@ -69,6 +77,10 @@ class SandboxNetworkConfig:
|
|
|
69
77
|
|
|
70
78
|
mask_request_host = self.mask_request_host
|
|
71
79
|
|
|
80
|
+
https_ports: Union[Unset, list[int]] = UNSET
|
|
81
|
+
if not isinstance(self.https_ports, Unset):
|
|
82
|
+
https_ports = self.https_ports
|
|
83
|
+
|
|
72
84
|
rules: Union[Unset, dict[str, Any]] = UNSET
|
|
73
85
|
if not isinstance(self.rules, Unset):
|
|
74
86
|
rules = self.rules.to_dict()
|
|
@@ -86,6 +98,8 @@ class SandboxNetworkConfig:
|
|
|
86
98
|
field_dict["egressProxy"] = egress_proxy
|
|
87
99
|
if mask_request_host is not UNSET:
|
|
88
100
|
field_dict["maskRequestHost"] = mask_request_host
|
|
101
|
+
if https_ports is not UNSET:
|
|
102
|
+
field_dict["httpsPorts"] = https_ports
|
|
89
103
|
if rules is not UNSET:
|
|
90
104
|
field_dict["rules"] = rules
|
|
91
105
|
|
|
@@ -128,6 +142,8 @@ class SandboxNetworkConfig:
|
|
|
128
142
|
|
|
129
143
|
mask_request_host = d.pop("maskRequestHost", UNSET)
|
|
130
144
|
|
|
145
|
+
https_ports = cast(list[int], d.pop("httpsPorts", UNSET))
|
|
146
|
+
|
|
131
147
|
_rules = d.pop("rules", UNSET)
|
|
132
148
|
rules: Union[Unset, SandboxNetworkConfigRules]
|
|
133
149
|
if isinstance(_rules, Unset):
|
|
@@ -141,6 +157,7 @@ class SandboxNetworkConfig:
|
|
|
141
157
|
deny_out=deny_out,
|
|
142
158
|
egress_proxy=egress_proxy,
|
|
143
159
|
mask_request_host=mask_request_host,
|
|
160
|
+
https_ports=https_ports,
|
|
144
161
|
rules=rules,
|
|
145
162
|
)
|
|
146
163
|
|
|
@@ -13,8 +13,12 @@ T = TypeVar("T", bound="SandboxNetworkConfigRules")
|
|
|
13
13
|
|
|
14
14
|
@_attrs_define
|
|
15
15
|
class SandboxNetworkConfigRules:
|
|
16
|
-
"""Per-domain transform rules applied to matching
|
|
17
|
-
"example.com")
|
|
16
|
+
"""Per-domain transform rules applied to matching outbound HTTPS requests. Keys may be exact DNS names (for example,
|
|
17
|
+
"api.example.com") or a leading wildcard (for example, "*.example.com"), and are normalized to lowercase on write.
|
|
18
|
+
Wildcards match subdomains at any depth but not the apex domain; a bare "*" is invalid. Exact rules take precedence,
|
|
19
|
+
followed by the longest matching wildcard suffix, and matching rule sets are not merged. Broad wildcards such as
|
|
20
|
+
"*.com" are allowed and may expose transformed credentials to every matching destination the sandbox contacts. Rules
|
|
21
|
+
do not grant network access; configure allowOut separately to permit the destination.
|
|
18
22
|
|
|
19
23
|
"""
|
|
20
24
|
|
|
@@ -32,8 +32,13 @@ class SandboxNetworkUpdateConfig:
|
|
|
32
32
|
egress_proxy (Union['SandboxEgressProxyConfigType0', None, Unset]): SOCKS5 proxy for sandbox egress. Outbound
|
|
33
33
|
TCP is tunneled through the proxy after allow/deny filtering; the sandbox is unaware. Domain-matched flows use
|
|
34
34
|
remote DNS (ATYP=domain).
|
|
35
|
-
rules (Union[Unset, SandboxNetworkUpdateConfigRules]): Per-domain transform rules
|
|
36
|
-
when provided.
|
|
35
|
+
rules (Union[Unset, SandboxNetworkUpdateConfigRules]): Per-domain transform rules applied to matching outbound
|
|
36
|
+
HTTPS requests. Replaces all existing rules when provided. Keys may be exact DNS names or a single leading
|
|
37
|
+
wildcard (for example, "*.example.com"), and are normalized to lowercase on write. Wildcards match subdomains at
|
|
38
|
+
any depth but not the apex domain; a bare "*" is invalid. Exact rules take precedence, followed by the longest
|
|
39
|
+
matching wildcard suffix, and matching rule sets are not merged. Broad wildcards such as "*.com" are allowed and
|
|
40
|
+
may expose transformed credentials to every matching destination the sandbox contacts. Rules do not grant
|
|
41
|
+
network access; configure allowOut separately to permit the destination.
|
|
37
42
|
allow_internet_access (Union[Unset, bool]): Allow sandbox to access the internet. When set to false, it behaves
|
|
38
43
|
the same as specifying denyOut to 0.0.0.0/0 in the network config.
|
|
39
44
|
"""
|
|
@@ -13,7 +13,14 @@ T = TypeVar("T", bound="SandboxNetworkUpdateConfigRules")
|
|
|
13
13
|
|
|
14
14
|
@_attrs_define
|
|
15
15
|
class SandboxNetworkUpdateConfigRules:
|
|
16
|
-
"""Per-domain transform rules. Replaces all existing rules when provided.
|
|
16
|
+
"""Per-domain transform rules applied to matching outbound HTTPS requests. Replaces all existing rules when provided.
|
|
17
|
+
Keys may be exact DNS names or a single leading wildcard (for example, "*.example.com"), and are normalized to
|
|
18
|
+
lowercase on write. Wildcards match subdomains at any depth but not the apex domain; a bare "*" is invalid. Exact
|
|
19
|
+
rules take precedence, followed by the longest matching wildcard suffix, and matching rule sets are not merged.
|
|
20
|
+
Broad wildcards such as "*.com" are allowed and may expose transformed credentials to every matching destination the
|
|
21
|
+
sandbox contacts. Rules do not grant network access; configure allowOut separately to permit the destination.
|
|
22
|
+
|
|
23
|
+
"""
|
|
17
24
|
|
|
18
25
|
additional_properties: dict[str, list["SandboxNetworkRule"]] = _attrs_field(
|
|
19
26
|
init=False, factory=dict
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
|
|
1
4
|
def format_sandbox_timeout_exception(message: str):
|
|
2
5
|
return TimeoutException(
|
|
3
6
|
f"{message}: This error is likely due to sandbox timeout. You can modify the sandbox timeout by passing 'timeout' when starting the sandbox or calling '.set_timeout' on the sandbox with the desired timeout."
|
|
@@ -15,9 +18,17 @@ class SandboxException(Exception):
|
|
|
15
18
|
Base class for all sandbox errors.
|
|
16
19
|
|
|
17
20
|
Raised when a general sandbox exception occurs.
|
|
21
|
+
|
|
22
|
+
:param status_code: HTTP status of the API response that produced this error, when there was one.
|
|
18
23
|
"""
|
|
19
24
|
|
|
20
|
-
|
|
25
|
+
# Class-level default so subclasses that bypass this initializer (dataclass
|
|
26
|
+
# exceptions such as CommandExitException) still expose the attribute.
|
|
27
|
+
status_code: Optional[int] = None
|
|
28
|
+
|
|
29
|
+
def __init__(self, *args, status_code: Optional[int] = None):
|
|
30
|
+
super().__init__(*args)
|
|
31
|
+
self.status_code = status_code
|
|
21
32
|
|
|
22
33
|
|
|
23
34
|
class TimeoutException(SandboxException):
|
|
@@ -116,6 +127,29 @@ class RateLimitException(SandboxException):
|
|
|
116
127
|
Raised when the API rate limit is exceeded.
|
|
117
128
|
"""
|
|
118
129
|
|
|
130
|
+
def __init__(self, *args):
|
|
131
|
+
super().__init__(*args, status_code=429)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class ServiceBusyException(Exception):
|
|
135
|
+
"""
|
|
136
|
+
Raised when the API refused the operation because the service is
|
|
137
|
+
temporarily busy (HTTP 503): no capacity to place a sandbox right now, or
|
|
138
|
+
the node running the sandbox declined a request it cannot serve yet.
|
|
139
|
+
|
|
140
|
+
Nothing was changed by the refused call: for example a refused pause
|
|
141
|
+
leaves the sandbox running with its state intact, so the same call can be
|
|
142
|
+
retried after a short wait.
|
|
143
|
+
|
|
144
|
+
Like `AuthenticationException` and unlike the other API errors, this is not
|
|
145
|
+
a `SandboxException`: it is raised for every 503 whatever the operation, so
|
|
146
|
+
catch it explicitly.
|
|
147
|
+
|
|
148
|
+
:param status_code: HTTP status of the API response: always 503.
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
status_code = 503
|
|
152
|
+
|
|
119
153
|
|
|
120
154
|
class BuildException(Exception):
|
|
121
155
|
"""
|
|
@@ -384,6 +384,18 @@ class SandboxNetworkOpts(TypedDict):
|
|
|
384
384
|
- Custom subdomain: `"${PORT}-myapp.example.com"`
|
|
385
385
|
"""
|
|
386
386
|
|
|
387
|
+
https_ports: NotRequired[List[int]]
|
|
388
|
+
"""
|
|
389
|
+
Ports whose public URLs should connect to the sandbox using HTTPS.
|
|
390
|
+
|
|
391
|
+
Use this when the service listening on the port serves HTTPS (TLS) itself.
|
|
392
|
+
This is not TLS passthrough — traffic is still terminated at the E2B proxy
|
|
393
|
+
and re-encrypted on the hop to the sandbox. The backend certificate is not
|
|
394
|
+
verified, so self-signed certificates work.
|
|
395
|
+
|
|
396
|
+
Example: ``Sandbox.create(network={"https_ports": [3000]})``
|
|
397
|
+
"""
|
|
398
|
+
|
|
387
399
|
|
|
388
400
|
class SandboxNetworkUpdate(TypedDict, total=False):
|
|
389
401
|
"""
|
|
@@ -478,6 +490,7 @@ class SandboxNetworkInfo(TypedDict, total=False):
|
|
|
478
490
|
"""
|
|
479
491
|
allow_public_traffic: bool
|
|
480
492
|
mask_request_host: str
|
|
493
|
+
https_ports: List[int]
|
|
481
494
|
|
|
482
495
|
|
|
483
496
|
class SandboxOnTimeoutPause(TypedDict):
|
|
@@ -539,7 +552,8 @@ class SandboxLifecycle(TypedDict):
|
|
|
539
552
|
What should happen to the sandbox when timeout is reached. `"kill"` terminates
|
|
540
553
|
the sandbox; `"pause"` pauses it for later resume. Accepts either the bare
|
|
541
554
|
action or an object `{"action": "pause", "keep_memory": ...}` /
|
|
542
|
-
`{"action": "kill"}` to also control the pause snapshot kind.
|
|
555
|
+
`{"action": "kill"}` to also control the pause snapshot kind. A value outside
|
|
556
|
+
the two actions raises `InvalidArgumentException`. Omitted from the
|
|
543
557
|
create request when unset, leaving the API's default (currently `"kill"`) in
|
|
544
558
|
effect.
|
|
545
559
|
"""
|
|
@@ -570,6 +584,39 @@ class SandboxInfoLifecycle(TypedDict):
|
|
|
570
584
|
"""
|
|
571
585
|
|
|
572
586
|
|
|
587
|
+
def resolve_connect_memory(
|
|
588
|
+
on_resume: Optional["SandboxOnResume"],
|
|
589
|
+
) -> Union[Unset, bool]:
|
|
590
|
+
"""Resolve ``on_resume`` into ``ConnectSandbox.memory``.
|
|
591
|
+
|
|
592
|
+
``"restore"`` is the API's own default, so it travels as an omitted field.
|
|
593
|
+
"""
|
|
594
|
+
# A nullish value is not a choice of restore, matching how every other
|
|
595
|
+
# nullish option is treated. Any other value outside the union never reaches
|
|
596
|
+
# the API — it is resolved here into the boolean memory field — so it cannot
|
|
597
|
+
# be rejected server-side, and resolving it to restore would silently skip
|
|
598
|
+
# the reboot the caller asked for.
|
|
599
|
+
if on_resume is None:
|
|
600
|
+
return UNSET
|
|
601
|
+
allowed = ("restore", "reboot")
|
|
602
|
+
if on_resume not in allowed:
|
|
603
|
+
raise InvalidArgumentException(
|
|
604
|
+
f"on_resume must be one of: {', '.join(allowed)} (got {on_resume!r})."
|
|
605
|
+
)
|
|
606
|
+
return False if on_resume == "reboot" else UNSET
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
SandboxOnResume = Literal["restore", "reboot"]
|
|
610
|
+
"""
|
|
611
|
+
How a paused sandbox comes back.
|
|
612
|
+
|
|
613
|
+
``"restore"`` restores the memory snapshot, so processes and open connections
|
|
614
|
+
survive the pause. ``"reboot"`` ignores any memory in the snapshot and
|
|
615
|
+
cold-boots from disk state alone — the rescue path for a snapshot whose memory
|
|
616
|
+
image wedges the guest.
|
|
617
|
+
"""
|
|
618
|
+
|
|
619
|
+
|
|
573
620
|
def _resolve_network_selector(
|
|
574
621
|
selector: Optional[SandboxNetworkSelector],
|
|
575
622
|
rules: Mapping[str, List[SandboxNetworkRule]],
|
|
@@ -743,6 +790,8 @@ def build_network_config(
|
|
|
743
790
|
body["allow_public_traffic"] = network["allow_public_traffic"]
|
|
744
791
|
if "mask_request_host" in network:
|
|
745
792
|
body["mask_request_host"] = network["mask_request_host"]
|
|
793
|
+
if network.get("https_ports") is not None:
|
|
794
|
+
body["https_ports"] = list(network["https_ports"])
|
|
746
795
|
|
|
747
796
|
return body
|
|
748
797
|
|
|
@@ -813,16 +862,14 @@ def build_lifecycle_config(
|
|
|
813
862
|
unset unless the caller chose ``keep_memory``.
|
|
814
863
|
"""
|
|
815
864
|
# on_timeout accepts a bare action or {"action", "keep_memory"}; normalize.
|
|
816
|
-
# Only the object form carries keep_memory
|
|
817
|
-
# string, or an unexpected value from an untyped caller) passes through as
|
|
818
|
-
# the action, so a non-"pause" value resolves to kill instead of crashing.
|
|
865
|
+
# Only the object form carries keep_memory.
|
|
819
866
|
on_timeout_raw = lifecycle.get("on_timeout") if lifecycle else None
|
|
820
867
|
# A missing on_timeout — or an explicit None from an untyped caller — is not
|
|
821
868
|
# a choice of kill. It only resolves to kill semantics locally, for the
|
|
822
869
|
# validation below and for keep_memory.
|
|
823
870
|
on_timeout_configured = on_timeout_raw is not None
|
|
824
871
|
if isinstance(on_timeout_raw, dict):
|
|
825
|
-
on_timeout = on_timeout_raw.get("action"
|
|
872
|
+
on_timeout = on_timeout_raw.get("action")
|
|
826
873
|
keep_memory_provided = "keep_memory" in on_timeout_raw
|
|
827
874
|
keep_memory = on_timeout_raw.get("keep_memory")
|
|
828
875
|
else:
|
|
@@ -832,6 +879,20 @@ def build_lifecycle_config(
|
|
|
832
879
|
keep_memory = None
|
|
833
880
|
keep_memory_provided = False
|
|
834
881
|
|
|
882
|
+
allowed_actions = ("pause", "kill")
|
|
883
|
+
if on_timeout_configured and on_timeout not in allowed_actions:
|
|
884
|
+
# Name the field the caller wrote: the object form's bad value is on
|
|
885
|
+
# "action", not on on_timeout itself.
|
|
886
|
+
field = (
|
|
887
|
+
'on_timeout["action"]' if isinstance(on_timeout_raw, dict) else "on_timeout"
|
|
888
|
+
)
|
|
889
|
+
raise InvalidArgumentException(
|
|
890
|
+
f"{field} must be one of: {', '.join(allowed_actions)} (got {on_timeout!r})."
|
|
891
|
+
)
|
|
892
|
+
# The action never reaches the API — it is resolved here into the boolean
|
|
893
|
+
# auto_pause — so an unrecognized value cannot be rejected server-side, and
|
|
894
|
+
# resolving it to kill would delete the sandbox a caller asked to preserve.
|
|
895
|
+
|
|
835
896
|
# keep_memory only governs a pause action. The discriminated union type
|
|
836
897
|
# forbids it on action="kill"; re-check at runtime for callers that
|
|
837
898
|
# bypass the type.
|
|
@@ -938,6 +999,8 @@ def from_client_network_config(
|
|
|
938
999
|
result["allow_public_traffic"] = network.allow_public_traffic
|
|
939
1000
|
if not isinstance(network.mask_request_host, Unset):
|
|
940
1001
|
result["mask_request_host"] = network.mask_request_host
|
|
1002
|
+
if not isinstance(network.https_ports, Unset):
|
|
1003
|
+
result["https_ports"] = list(network.https_ports)
|
|
941
1004
|
|
|
942
1005
|
return result
|
|
943
1006
|
|